PageSourceSearch

https://www.overtime.io/static/js/16.a6b6bff7.chunk.js

js overtime.io collected 2026-10-04 06:54:28 UTC 358,416 bytes, 2 lines download raw bytes

1/*! For license information please see 16.a6b6bff7.chunk.js.LICENSE.txt */
2(this["webpackJsonpovertime-io"]=this["webpackJsonpovertime-io"]||[]).push([[16],{1014:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PINO_CUSTOM_CONTEXT_KEY=e.PINO_LOGGER_DEFAULTS=void 0,e.PINO_LOGGER_DEFAULTS={level:"info"},e.PINO_CUSTOM_CONTEXT_KEY="custom_context"},1021:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1333),i=r(1022),s=r(1334),o=r(1023),a=r(1028),c=r(1351);e.compare=n.compare,e.concat=i.concat,e.equals=s.equals,e.fromString=o.fromString,e.toString=a.toString,e.xor=c.xor},1022:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(853),i=r(764);e.concat=function(t,e){e||(e=t.reduce(((t,e)=>t+e.length),0));const r=n.allocUnsafe(e);let s=0;for(const n of t)r.set(n,s),s+=n.length;return i.asUint8Array(r)}},1023:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1024),i=r(764);e.fromString=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=n[e];if(!r)throw new Error('Unsupported encoding "'.concat(e,'"'));return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode("".concat(r.prefix).concat(t)):i.asUint8Array(globalThis.Buffer.from(t,"utf-8"))}},1024:function(t,e,r){"use strict";var n=r(1335),i=r(853);function s(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const o=s("utf8","u",(t=>"u"+new TextDecoder("utf8").decode(t)),(t=>(new TextEncoder).encode(t.substring(1)))),a=s("ascii","a",(t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}),(t=>{t=t.substring(1);const e=i.allocUnsafe(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e})),c={utf8:o,"utf-8":o,hex:n.bases.base16,latin1:a,ascii:a,binary:a,...n.bases};t.exports=c},1025:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(661);const i=n.rfc4648({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),s=n.rfc4648({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),o=n.rfc4648({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),a=n.rfc4648({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),c=n.rfc4648({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),u=n.rfc4648({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),h=n.rfc4648({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),l=n.rfc4648({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),f=n.rfc4648({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});e.base32=i,e.base32hex=c,e.base32hexpad=h,e.base32hexpadupper=l,e.base32hexupper=u,e.base32pad=o,e.base32padupper=a,e.base32upper=s,e.base32z=f},1026:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(661);const i=n.baseX({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),s=n.baseX({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});e.base58btc=i,e.base58flickr=s},1027:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(765),i=r(724),s=r(1026),o=r(1025),a=r(668);class c{constructor(t,e,r,n){this.code=e,this.version=t,this.multihash=r,this.bytes=n,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:v,byteLength:v,code:y,version:y,multihash:y,bytes:y,_baseCache:v,asCID:v})}toV0(){if(0===this.version)return this;{const{code:t,multihash:e}=this;if(t!==f)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(e.code!==p)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return c.createV0(e)}}toV1(){switch(this.version){case 0:{const{code:t,digest:e}=this.multihash,r=i.create(t,e);return c.createV1(this.code,r)}case 1:return this;default:throw Error("Can not convert CID version ".concat(this.version," to version 0. This is a bug please report"))}}equals(t){return t&&this.code===t.code&&this.version===t.version&&i.equals(this.multihash,t.multihash)}toString(t){const{bytes:e,version:r,_baseCache:n}=this;return 0===r?h(e,n,t||s.base58btc.encoder):l(e,n,t||o.base32.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return b(/^0\.0/,_),!(!t||!t[g]&&t.asCID!==t)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof c)return t;if(null!=t&&t.asCID===t){const{version:e,code:r,multihash:n,bytes:i}=t;return new c(e,r,n,i||d(e,r,n.bytes))}if(null!=t&&!0===t[g]){const{version:e,multihash:r,code:n}=t,s=i.decode(r);return c.create(e,n,s)}return null}static create(t,e,r){if("number"!==typeof e)throw new Error("String codecs are no longer supported");switch(t){case 0:if(e!==f)throw new Error("Version 0 CID must use dag-pb (code: ".concat(f,") block encoding"));return new c(t,e,r,r.bytes);case 1:{const n=d(t,e,r.bytes);return new c(t,e,r,n)}default:throw new Error("Invalid version")}}static createV0(t){return c.create(0,f,t)}static createV1(t,e){return c.create(1,t,e)}static decode(t){const[e,r]=c.decodeFirst(t);if(r.length)throw new Error("Incorrect length");return e}static decodeFirst(t){const e=c.inspectBytes(t),r=e.size-e.multihashSize,n=a.coerce(t.subarray(r,r+e.multihashSize));if(n.byteLength!==e.multihashSize)throw new Error("Incorrect length");const s=n.subarray(e.multihashSize-e.digestSize),o=new i.Digest(e.multihashCode,e.digestSize,s,n);return[0===e.version?c.createV0(o):c.createV1(e.codec,o),t.subarray(e.size)]}static inspectBytes(t){let e=0;const r=()=>{const[r,i]=n.decode(t.subarray(e));return e+=i,r};let i=r(),s=f;if(18===i?(i=0,e=0):1===i&&(s=r()),0!==i&&1!==i)throw new RangeError("Invalid CID version ".concat(i));const o=e,a=r(),c=r(),u=e+c;return{version:i,codec:s,multihashCode:a,digestSize:c,multihashSize:u-o,size:u}}static parse(t,e){const[r,n]=u(t,e),i=c.decode(n);return i._baseCache.set(r,t),i}}const u=(t,e)=>{switch(t[0]){case"Q":{const r=e||s.base58btc;return[s.base58btc.prefix,r.decode("".concat(s.base58btc.prefix).concat(t))]}case s.base58btc.prefix:{const r=e||s.base58btc;return[s.base58btc.prefix,r.decode(t)]}case o.base32.prefix:{const r=e||o.base32;return[o.base32.prefix,r.decode(t)]}default:if(null==e)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}},h=(t,e,r)=>{const{prefix:n}=r;if(n!==s.base58btc.prefix)throw Error("Cannot string encode V0 in ".concat(r.name," encoding"));const i=e.get(n);if(null==i){const i=r.encode(t).slice(1);return e.set(n,i),i}return i},l=(t,e,r)=>{const{prefix:n}=r,i=e.get(n);if(null==i){const i=r.encode(t);return e.set(n,i),i}return i},f=112,p=18,d=(t,e,r)=>{const i=n.encodingLength(t),s=i+n.encodingLength(e),o=new Uint8Array(s+r.byteLength);return n.encodeTo(t,o,0),n.encodeTo(e,o,i),o.set(r,s),o}
2,g=Symbol.for("@ipld/js-cid/CID"),y={writable:!1,configurable:!1,enumerable:!0},v={writable:!1,enumerable:!1,configurable:!1},b=(t,e)=>{if(!t.test("0.0.0-dev"))throw new Error(e);console.warn(e)},_="CID.isCID(v) is deprecated and will be removed in the next major release.\nFollowing code pattern:\n\nif (CID.isCID(value)) {\n  doSomethingWithCID(value)\n}\n\nIs replaced with:\n\nconst cid = CID.asCID(value)\nif (cid) {\n  // Make sure to use cid instead of value\n  doSomethingWithCID(cid)\n}\n";e.CID=c},1028:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1024);e.toString=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=n[e];if(!r)throw new Error('Unsupported encoding "'.concat(e,'"'));return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?r.encoder.encode(t).substring(1):globalThis.Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString("utf8")}},1029:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(766);n.__exportStar(r(1355),e),n.__exportStar(r(1356),e)},1035:function(t,e){},1036:function(t,e,r){"use strict";r(1037),r(856)},1037:function(t,e,r){"use strict";function n(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string";if(!t[e]||typeof t[e]!==r)throw new Error('Missing or invalid "'.concat(e,'" param'))}function i(t,e,r){const n=!r.length?function(t,e){return Array.isArray(t)?t.length===e:Object.keys(t).length===e}(t,e.length):function(t,e){return Array.isArray(t)?t.length>=e:Object.keys(t).length>=e}(t,e.length);return!!n&&function(t,e){let r=!0;return e.forEach((e=>{e in t||(r=!1)})),r}(t,e)}function s(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"_";const n=t.split(r);return n[n.length-1].trim().toLowerCase()===e.trim().toLowerCase()}r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return s}))},1038:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n={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"}}},1040:function(t,e,r){"use strict";r.r(e),r.d(e,"__extends",(function(){return i})),r.d(e,"__assign",(function(){return s})),r.d(e,"__rest",(function(){return o})),r.d(e,"__decorate",(function(){return a})),r.d(e,"__param",(function(){return c})),r.d(e,"__metadata",(function(){return u})),r.d(e,"__awaiter",(function(){return h})),r.d(e,"__generator",(function(){return l})),r.d(e,"__createBinding",(function(){return f})),r.d(e,"__exportStar",(function(){return p})),r.d(e,"__values",(function(){return d})),r.d(e,"__read",(function(){return g})),r.d(e,"__spread",(function(){return y})),r.d(e,"__spreadArrays",(function(){return v})),r.d(e,"__await",(function(){return b})),r.d(e,"__asyncGenerator",(function(){return _})),r.d(e,"__asyncDelegator",(function(){return m})),r.d(e,"__asyncValues",(function(){return w}
2)),r.d(e,"__makeTemplateObject",(function(){return E})),r.d(e,"__importStar",(function(){return O})),r.d(e,"__importDefault",(function(){return S})),r.d(e,"__classPrivateFieldGet",(function(){return I})),r.d(e,"__classPrivateFieldSet",(function(){return j}));var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var s=function(){return s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)};function o(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function a(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function c(t,e){return function(r,n){e(r,n,t)}}function u(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{c(n.next(t))}catch(e){s(e)}}function a(t){try{c(n.throw(t))}catch(e){s(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}c((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(a){s=[6,a],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function f(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}function p(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||(e[r]=t[r])}function d(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function v(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function b(t){return this instanceof b?(this.v=t,this):new b(t)}function _(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),s=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){
2s.push([t,e,r,n])>1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(c,u):h(s[0][2],r)}catch(n){h(s[0][3],n)}var r}function c(t){a("next",t)}function u(t){a("throw",t)}function h(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}}function m(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=d(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function E(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function O(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}function I(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function j(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},1041:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.safeJsonParse=function(t){if("string"!==typeof t)throw new Error("Cannot safe json parse value of type ".concat(typeof t));try{return JSON.parse(t)}catch(e){return t}},e.safeJsonStringify=function(t){return"string"===typeof t?t:JSON.stringify(t,((t,e)=>"undefined"===typeof e?null:e))}},1042:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});r(767).__exportStar(r(1369),e)},1043:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});r(767).__exportStar(r(1370),e)},1044:function(t,e,r){"use strict";r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return u}));var n=r(1372),i=r(763),s=r(701),o=r(768),a=r(857);function c(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object(i.randomBytes)(o.j);return n.generateKeyPairFromSeed(t)}async function u(t,e,r,i){let c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Object(s.fromMiliseconds)(Date.now());const u={alg:o.h,typ:o.i},h={iss:Object(a.d)(i.publicKey),sub:t,aud:e,iat:c,exp:c+r},l=Object(a.c)({header:u,payload:h}),f=n.sign(i.secretKey,l);return Object(a.e)({header:u,payload:h,signature:f})}},1045:function(t,e){},1113:function(t,e,r){"use strict";r.r(e),r.d(e,"IEvents",(function(){return n}));class n{}},1312:function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return Q}));var n=r(1564),i=r(762),s=r(850),o=r(1112),a=r(902),c=r(332),u=r.n(c);const h="error",l="".concat("wc","@2:").concat("universal_provider",":"),f="default_chain_changed";var p,d,g=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof t<"u"?t:typeof self<"u"?self:{},y={exports:{}};p=y,d=y.exports,function(){var t,e="Expected a function",r="__lodash_hash_undefined__",n="__lodash_placeholder__",i=16,s=32,o=64,a=128,c=256,u=1/0,h=9007199254740991,l=NaN,f=4294967295,y=[["ary",a],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",s],["partialRight",o],["rearg",c]],v="[object Arguments]",b="[object Array]",_="[object Boolean]",m="[object Date]",w="[object Error]",E="[object Function]",O="[object GeneratorFunction]",S="[object Map]",I="[object Number]",j="[object Object]",P="[object Promise]",A="[object RegExp]",R="[object Set]",C="[object String]",T="[object Symbol]",N="[object WeakMap]",x="[object ArrayBuffer]",L="[object DataView]",U="[object Float32Array]",M="[object Float64Array]",D="[object Int8Array]",k="[object Int16Array]",z="[object Int32Array]",q="[object Uint8Array]",H="[object Uint8ClampedArray]",V="[object Uint16Array]",K="[object Uint32Array]",B=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,F=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,J=RegExp(W.source),X=RegExp(Y.source),Z=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,rt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,it=RegExp(nt.source),st=/^\s+/,ot=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}
vendor: 6,266 bytes, line 2
2\[\]\/\s]/,ft=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,vt=/^\[object .+?Constructor\]$/,bt=/^0o[0-7]+$/i,_t=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wt=/($^)/,Et=/['\n\r\u2028\u2029\\]/g,Ot="\\ud800-\\udfff",St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",It="\\u2700-\\u27bf",jt="a-z\\xdf-\\xf6\\xf8-\\xff",Pt="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",Rt="\\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",Ct="['\u2019]",Tt="["+Ot+"]",Nt="["+Rt+"]",xt="["+St+"]",Lt="\\d+",Ut="["+It+"]",Mt="["+jt+"]",Dt="[^"+Ot+Rt+Lt+It+jt+Pt+"]",kt="\\ud83c[\\udffb-\\udfff]",zt="[^"+Ot+"]",qt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ht="[\\ud800-\\udbff][\\udc00-\\udfff]",Vt="["+Pt+"]",Kt="\\u200d",Bt="(?:"+Mt+"|"+Dt+")",Gt="(?:"+Vt+"|"+Dt+")",Ft="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Wt="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Yt="(?:"+xt+"|"+kt+")?",Jt="["+At+"]?",Xt=Jt+Yt+"(?:"+Kt+"(?:"+[zt,qt,Ht].join("|")+")"+Jt+Yt+")*",Zt="(?:"+[Ut,qt,Ht].join("|")+")"+Xt,Qt="(?:"+[zt+xt+"?",xt,qt,Ht,Tt].join("|")+")",$t=RegExp(Ct,"g"),te=RegExp(xt,"g"),ee=RegExp(kt+"(?="+kt+")|"+Qt+Xt,"g"),re=RegExp([Vt+"?"+Mt+"+"+Ft+"(?="+[Nt,Vt,"$"].join("|")+")",Gt+"+"+Wt+"(?="+[Nt,Vt+Bt,"$"].join("|")+")",Vt+"?"+Bt+"+"+Ft,Vt+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lt,Zt].join("|"),"g"),ne=RegExp("["+Kt+Ot+St+At+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,se=["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"],oe=-1,ae={};ae[U]=ae[M]=ae[D]=ae[k]=ae[z]=ae[q]=ae[H]=ae[V]=ae[K]=!0,ae[v]=ae[b]=ae[x]=ae[_]=ae[L]=ae[m]=ae[w]=ae[E]=ae[S]=ae[I]=ae[j]=ae[A]=ae[R]=ae[C]=ae[N]=!1;var ce={};ce[v]=ce[b]=ce[x]=ce[L]=ce[_]=ce[m]=ce[U]=ce[M]=ce[D]=ce[k]=ce[z]=ce[S]=ce[I]=ce[j]=ce[A]=ce[R]=ce[C]=ce[T]=ce[q]=ce[H]=ce[V]=ce[K]=!0,ce[w]=ce[E]=ce[N]=!1;var ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,le=parseInt,fe="object"==typeof g&&g&&g.Object===Object&&g,pe="object"==typeof self&&self&&self.Object===Object&&self,de=fe||pe||Function("return this")(),ge=d&&!d.nodeType&&d,ye=ge&&p&&!p.nodeType&&p,ve=ye&&ye.exports===ge,be=ve&&fe.process,_e=function(){try{return ye&&ye.require&&ye.require("util").types||be&&be.binding&&be.binding("util")}catch{}}(),me=_e&&_e.isArrayBuffer,we=_e&&_e.isDate,Ee=_e&&_e.isMap,Oe=_e&&_e.isRegExp,Se=_e&&_e.isSet,Ie=_e&&_e.isTypedArray;function je(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Pe(t,e,r,n){for(var i=-1,s=null==t?0:t.length;++i<s;){var o=t[i];e(n,o,r(o),t)}return n}function Ae(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function Re(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function Ce(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Te(t,e){for(var r=-1,n=null==t?0:t.length,i=0,s=[];++r<n;){var o=t[r];e(o,r,t)&&(s[i++]=o)}return s}function Ne(t,e){return!(null==t||!t.length)&&Ve(t,e,0)>-1}function xe(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Le(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function Ue(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function Me(t,e,r,n){var i=-1,s=null==t?0:t.length;for(n&&s&&(r=t[++i]);++i<s;)r=e(r,t[i],i,t);return r}function De(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function ke(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var ze=Fe("length");function qe(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function He(t,e,r,n){for(var i=t.length,s=r+(n?1:-1);n?s--:++s<i;)if(e(t[s],s,t))return s;return-1}function Ve(t,e,r){return e===e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):He(t,Be,r)}function Ke(t,e,r,n){for(var i=r-1,s=t.length;++i<s;)if(n(t[i],e))return i;return-1}function Be(t){return t!==t}function Ge(t,e){var r=null==t?0:t.length;return r?Je(t,e)/r:l}function Fe(e){return function(r){return null==r?t:r[e]}}function We(e){return function(r){return null==e?t:e[r]}}function Ye(t,e,r,n,i){return i(t,(function(t,i,s){r=n?(n=!1,t):e(r,t,i,s)})),r}function Je(e,r){for(var n,i=-1,s=e.length;++i<s;){var o=r(e[i]);o!==t&&(n=n===t?o:n+o)}return n}function Xe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Ze(t){return t&&t.slice(0,pr(t)+1).replace(st,"")}function Qe(t){return function(e){return t(e)}}function $e(t,e){return Le(e,(function(e){return t[e]}))}function tr(t,e){return t.has(e)}function er(t,e){for(var r=-1,n=t.length;++r<n&&Ve(e,t[r],0)>-1;);return r}function rr(t,e){for(var r=t.length;r--&&Ve(e,t[r],0)>-1;);return r}var nr=We({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"
2c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),ir=We({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sr(t){return"\\"+ue[t]}function or(t){return ne.test(t)}function ar(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function cr(t,e){return function(r){return t(e(r))}}function ur(t,e){for(var r=-1,i=t.length,s=0,o=[];++r<i;){var a=t[r];(a===e||a===n)&&(t[r]=n,o[s++]=r)}return o}function hr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function lr(t){return or(t)?function(t){for(var e=ee.lastIndex=0;ee.test(t);)++e;return e}(t):ze(t)}function fr(t){return or(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function pr(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var dr=We({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gr=function p(d){var g=(d=null==d?de:gr.defaults(de.Object(),d,gr.pick(de,se))).Array,ot=d.Date,Ot=d.Error,St=d.Function,It=d.Math,jt=d.Object,Pt=d.RegExp,At=d.String,Rt=d.TypeError,Ct=g.prototype,Tt=St.prototype,Nt=jt.prototype,xt=d["__core-js_shared__"],Lt=Tt.toString,Ut=Nt.hasOwnProperty,Mt=0,Dt=function(){var t=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),kt=Nt.toString,zt=Lt.call(jt),qt=de._,Ht=Pt("^"+Lt.call(Ut).replace(nt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=ve?d.Buffer:t,Kt=d.Symbol,Bt=d.Uint8Array,Gt=Vt?Vt.allocUnsafe:t,Ft=cr(jt.getPrototypeOf,jt),Wt=jt.create,Yt=Nt.propertyIsEnumerable,Jt=Ct.splice,Xt=Kt?Kt.isConcatSpreadable:t,Zt=Kt?Kt.iterator:t,Qt=Kt?Kt.toStringTag:t,ee=function(){try{var t=hs(jt,"defineProperty");return t({},"",{}),t}catch{}}(),ne=d.clearTimeout!==de.clearTimeout&&d.clearTimeout,ue=ot&&ot.now!==de.Date.now&&ot.now,fe=d.setTimeout!==de.setTimeout&&d.setTimeout,pe=It.ceil,ge=It.floor,ye=jt.getOwnPropertySymbols,be=Vt?Vt.isBuffer:t,_e=d.isFinite,ze=Ct.join,We=cr(jt.keys,jt),yr=It.max,vr=It.min,br=ot.now,_r=d.parseInt,mr=It.random,wr=Ct.reverse,Er=hs(d,"DataView"),Or=hs(d,"Map"),Sr=hs(d,"Promise"),Ir=hs(d,"Set"),jr=hs(d,"WeakMap"),Pr=hs(jt,"create"),Ar=jr&&new jr,Rr={},Cr=Ms(Er),Tr=Ms(Or),Nr=Ms(Sr),xr=Ms(Ir),Lr=Ms(jr),Ur=Kt?Kt.prototype:t,Mr=Ur?Ur.valueOf:t,Dr=Ur?Ur.toString:t;function kr(t){if(ta(t)&&!Ko(t)&&!(t instanceof Vr)){if(t instanceof Hr)return t;if(Ut.call(t,"__wrapped__"))return Ds(t)}return new Hr(t)}var zr=function(){function e(){}return function(r){if(!$o(r))return{};if(Wt)return Wt(r);e.prototype=r;var n=new e;return e.prototype=t,n}}();function qr(){}function Hr(e,r){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!r,this.__index__=0,this.__values__=t}function Vr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Kr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Br(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Gr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Fr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Gr;++e<r;)this.add(t[e])}function Wr(t){var e=this.__data__=new Br(t);this.size=e.size}function Yr(t,e){var r=Ko(t),n=!r&&Vo(t),i=!r&&!n&&Wo(t),s=!r&&!n&&!i&&ca(t),o=r||n||i||s,a=o?Xe(t.length,At):[],c=a.length;for(var u in t)(e||Ut.call(t,u))&&(!o||!("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||vs(u,c)))&&a.push(u);return a}function Jr(e){var r=e.length;return r?e[Wn(0,r-1)]:t}function Xr(t,e){return xs(Ai(t),on(e,0,t.length))}function Zr(t){return xs(Ai(t))}function Qr(e,r,n){(n!==t&&!zo(e[r],n)||n===t&&!(r in e))&&nn(e,r,n)}function $r(e,r,n){var i=e[r];(!Ut.call(e,r)||!zo(i,n)||n===t&&!(r in e))&&nn(e,r,n)}function tn(t,e){for(var r=t.length;r--;)if(zo(t[r][0],e))return r;return-1}function en(t,e,r,n){return ln(t,(function(t,i,s){e(n,t,r(t),s)})),n}function rn(t,e){return t&&Ri(e,Ca(e),t)}function nn(t,e,r){"__proto__"==e&&ee?ee(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function sn(e,r){for(var n=-1,i=r.length,s=g(i),o=null==e;++n<i;)s[n]=o?t:Ia(e,r[n]);return s}function on(e,r,n){return e===e&&(n!==t&&(e=e<=n?e:n),r!==t&&(e=e>=r?e:r)),e}function an(e,r,n,i,s,o){var a,c=1&r,u=2&r,h=4&r;if(n&&(a=s?n(e,i,s,o):n(e)),a!==t)return a;
vendor: 6,655 bytes, line 2
2if(!$o(e))return e;var l=Ko(e);if(l){if(a=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Ut.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(e),!c)return Ai(e,a)}else{var f=ps(e),p=f==E||f==O;if(Wo(e))return Ei(e,c);if(f==j||f==v||p&&!s){if(a=u||p?{}:gs(e),!c)return u?function(t,e){return Ri(t,fs(t),e)}(e,function(t,e){return t&&Ri(e,Ta(e),t)}(a,e)):function(t,e){return Ri(t,ls(t),e)}(e,rn(a,e))}else{if(!ce[f])return s?e:{};a=function(t,e,r){var n=t.constructor;switch(e){case x:return Oi(t);case _:case m:return new n(+t);case L:return function(t,e){var r=e?Oi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case U:case M:case D:case k:case z:case q:case H:case V:case K:return Si(t,r);case S:return new n;case I:case C:return new n(t);case A:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case R:return new n;case T:return function(t){return Mr?jt(Mr.call(t)):{}}(t)}}(e,f,c)}}o||(o=new Wr);var d=o.get(e);if(d)return d;o.set(e,a),sa(e)?e.forEach((function(t){a.add(an(t,r,n,t,e,o))})):ea(e)&&e.forEach((function(t,i){a.set(i,an(t,r,n,i,e,o))}));var g=l?t:(h?u?ns:rs:u?Ta:Ca)(e);return Ae(g||e,(function(t,i){g&&(t=e[i=t]),$r(a,i,an(t,r,n,i,e,o))})),a}function cn(e,r,n){var i=n.length;if(null==e)return!i;for(e=jt(e);i--;){var s=n[i],o=r[s],a=e[s];if(a===t&&!(s in e)||!o(a))return!1}return!0}function un(r,n,i){if("function"!=typeof r)throw new Rt(e);return Rs((function(){r.apply(t,i)}),n)}function hn(t,e,r,n){var i=-1,s=Ne,o=!0,a=t.length,c=[],u=e.length;if(!a)return c;r&&(e=Le(e,Qe(r))),n?(s=xe,o=!1):e.length>=200&&(s=tr,o=!1,e=new Fr(e));t:for(;++i<a;){var h=t[i],l=null==r?h:r(h);if(h=n||0!==h?h:0,o&&l===l){for(var f=u;f--;)if(e[f]===l)continue t;c.push(h)}else s(e,l,n)||c.push(h)}return c}kr.templateSettings={escape:Z,evaluate:Q,interpolate:$,variable:"",imports:{_:kr}},kr.prototype=qr.prototype,kr.prototype.constructor=kr,Hr.prototype=zr(qr.prototype),Hr.prototype.constructor=Hr,Vr.prototype=zr(qr.prototype),Vr.prototype.constructor=Vr,Kr.prototype.clear=function(){this.__data__=Pr?Pr(null):{},this.size=0},Kr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kr.prototype.get=function(e){var n=this.__data__;if(Pr){var i=n[e];return i===r?t:i}return Ut.call(n,e)?n[e]:t},Kr.prototype.has=function(e){var r=this.__data__;return Pr?r[e]!==t:Ut.call(r,e)},Kr.prototype.set=function(e,n){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Pr&&n===t?r:n,this},Br.prototype.clear=function(){this.__data__=[],this.size=0},Br.prototype.delete=function(t){var e=this.__data__,r=tn(e,t);return!(r<0)&&(r==e.length-1?e.pop():Jt.call(e,r,1),--this.size,!0)},Br.prototype.get=function(e){var r=this.__data__,n=tn(r,e);return n<0?t:r[n][1]},Br.prototype.has=function(t){return tn(this.__data__,t)>-1},Br.prototype.set=function(t,e){var r=this.__data__,n=tn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new Kr,map:new(Or||Br),string:new Kr}},Gr.prototype.delete=function(t){var e=cs(this,t).delete(t);return this.size-=e?1:0,e},Gr.prototype.get=function(t){return cs(this,t).get(t)},Gr.prototype.has=function(t){return cs(this,t).has(t)},Gr.prototype.set=function(t,e){var r=cs(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Fr.prototype.add=Fr.prototype.push=function(t){return this.__data__.set(t,r),this},Fr.prototype.has=function(t){return this.__data__.has(t)},Wr.prototype.clear=function(){this.__data__=new Br,this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Wr.prototype.get=function(t){return this.__data__.get(t)},Wr.prototype.has=function(t){return this.__data__.has(t)},Wr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Br){var n=r.__data__;if(!Or||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Gr(n)}return r.set(t,e),this.size=r.size,this};var ln=Ni(_n),fn=Ni(mn,!0);function pn(t,e){var r=!0;return ln(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function dn(e,r,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=r(o);if(null!=a&&(c===t?a===a&&!aa(a):n(a,c)))var c=a,u=o}return u}function gn(t,e){var r=[];return ln(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function yn(t,e,r,n,i){var s=-1,o=t.length;for(r||(r=ys),i||(i=[]);++s<o;){var a=t[s];e>0&&r(a)?e>1?yn(a,e-1,r,n,i):Ue(i,a):n||(i[i.length]=a)}return i}var vn=xi(),bn=xi(!0);function _n(t,e){return t&&vn(t,e,Ca)}function mn(t,e){return t&&bn(t,e,Ca)}function wn(t,e){return Te(e,(function(e){return Xo(t[e])}))}function En(e,r){for(var n=0,i=(r=bi(r,e)).length;null!=e&&n<i;)e=e[Us(r[n++])];return n&&n==i?e:t}function On(t,e,r){var n=e(t);return Ko(t)?n:Ue(n,r(t))}function Sn(e){return null==e?e===t?"[object Undefined]":"[object Null]":Qt&&Qt in jt(e)?function(e){var r=Ut.call(e,Qt),n=e[Qt];try{e[Qt]=t;var i=!0}catch{}var s=kt.call(e);return i&&(r?e[Qt]=n:delete e[Qt]),s}(e):function(t){return kt.call(t)}(e)}function In(t,e){return t>e}function jn(t,e){return null!=t&&Ut.call(t,e)}function Pn(t,e){return null!=t&&e in jt(t)}function An(e,r,n){for(var i=n?xe:Ne,s=e[0].length,o=e.length,a=o,c=g(o),u=1/0,h=[];a--;){var l=e[a];a&&r&&(l=Le(l,Qe(r))),u=vr(l.length,u),c[a]=!n&&(r||s>=120&&l.length>=120)?new Fr(a&&l):t}l=e[0];var f=-1,p=c[0];t:for(;++f<s&&h.length<u;){var d=l[f],y=r?r(d):d;if(d=n||0!==d?d:0,!(p?tr(p,y):i(h,y,n))){for(a=o;--a;){var v=c[a];if(!(v?tr(v,y):i(e[a],y,n)))continue t}p&&p.push(y),h.push(d)}}return h}function Rn(e,r,n){var i=null==(e=js(e,r=bi(r,e)))?e:e[Us(Ys(r))];return null==i?t:je(i,e,n)}function Cn(t){return ta(t)&&Sn(t)==v}function Tn(e,r,n,i,s){return e===r||(null==e||null==r||!ta(e)&&!ta(r)?e!==e&&r!==r:function(e,r,n,i,s,o){var a=Ko(e),c=Ko(r),u=a?b:ps(e),h=c?b:ps(r),l=(u=u==v?j:u)==j,f=(h=h==v?j:h)==j,p=u==h;if(p&&Wo(e)){if(!Wo(r))return!1;a=!0,l=!1}if(p&&!l)return o||(o=new Wr),a||ca(e)?ts(e,r,n,i,s,o):function(t,e,r,n,i,s,o){switch(r){case L:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case x:return!(t.byteLength!=e.byteLength||!s(new Bt(t),new Bt(e)));case _:case m:case I:return zo(+t,+e);case w:return t.name==e.name&&t.message==e.message;case A:case C:return t==e+"";case S:var a=ar;case R:var c=1&n;if(a||(a=hr),t.size!=e.size&&!c)return!1;var u=o.get(t);if(u)return u==e;n|=2,o.set(t,e);var h=ts(a(t),a(e),n,i,s,o);return o.delete(t),h;case T:if(Mr)return Mr.call(t)==Mr.call(e)}return!1}(e,r,u,n,i,s,o);if(!(1&n)){var d=l&&Ut.call(e,"__wrapped__"),g=f&&Ut.call(r,"__wrapped__");
vendor: 11,871 bytes, line 2
2if(d||g){var y=d?e.value():e,E=g?r.value():r;return o||(o=new Wr),s(y,E,n,i,o)}}return!!p&&(o||(o=new Wr),function(e,r,n,i,s,o){var a=1&n,c=rs(e),u=c.length,h=rs(r),l=h.length;if(u!=l&&!a)return!1;for(var f=u;f--;){var p=c[f];if(!(a?p in r:Ut.call(r,p)))return!1}var d=o.get(e),g=o.get(r);if(d&&g)return d==r&&g==e;var y=!0;o.set(e,r),o.set(r,e);for(var v=a;++f<u;){var b=e[p=c[f]],_=r[p];if(i)var m=a?i(_,b,p,r,e,o):i(b,_,p,e,r,o);if(!(m===t?b===_||s(b,_,n,i,o):m)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var w=e.constructor,E=r.constructor;w!=E&&"constructor"in e&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof E&&E instanceof E)&&(y=!1)}return o.delete(e),o.delete(r),y}(e,r,n,i,s,o))}(e,r,n,i,Tn,s))}function Nn(e,r,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=jt(e);s--;){var c=n[s];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<o;){var u=(c=n[s])[0],h=e[u],l=c[1];if(a&&c[2]){if(h===t&&!(u in e))return!1}else{var f=new Wr;if(i)var p=i(h,l,u,e,r,f);if(!(p===t?Tn(l,h,3,i,f):p))return!1}}return!0}function xn(t){return!(!$o(t)||function(t){return!!Dt&&Dt in t}(t))&&(Xo(t)?Ht:vt).test(Ms(t))}function Ln(t){return"function"==typeof t?t:null==t?rc:"object"==typeof t?Ko(t)?qn(t[0],t[1]):zn(t):lc(t)}function Un(t){if(!Es(t))return We(t);var e=[];for(var r in jt(t))Ut.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Mn(t){if(!$o(t))return function(t){var e=[];if(null!=t)for(var r in jt(t))e.push(r);return e}(t);var e=Es(t),r=[];for(var n in t)"constructor"==n&&(e||!Ut.call(t,n))||r.push(n);return r}function Dn(t,e){return t<e}function kn(t,e){var r=-1,n=Go(t)?g(t.length):[];return ln(t,(function(t,i,s){n[++r]=e(t,i,s)})),n}function zn(t){var e=us(t);return 1==e.length&&e[0][2]?Ss(e[0][0],e[0][1]):function(r){return r===t||Nn(r,t,e)}}function qn(e,r){return _s(e)&&Os(r)?Ss(Us(e),r):function(n){var i=Ia(n,e);return i===t&&i===r?ja(n,e):Tn(r,i,3)}}function Hn(e,r,n,i,s){e!==r&&vn(r,(function(o,a){if(s||(s=new Wr),$o(o))!function(e,r,n,i,s,o,a){var c=Ps(e,n),u=Ps(r,n),h=a.get(u);if(h)Qr(e,n,h);else{var l=o?o(c,u,n+"",e,r,a):t,f=l===t;if(f){var p=Ko(u),d=!p&&Wo(u),g=!p&&!d&&ca(u);l=u,p||d||g?Ko(c)?l=c:Fo(c)?l=Ai(c):d?(f=!1,l=Ei(u,!0)):g?(f=!1,l=Si(u,!0)):l=[]:na(u)||Vo(u)?(l=c,Vo(c)?l=ya(c):(!$o(c)||Xo(c))&&(l=gs(u))):f=!1}f&&(a.set(u,l),s(l,u,i,o,a),a.delete(u)),Qr(e,n,l)}}(e,r,a,n,Hn,i,s);else{var c=i?i(Ps(e,a),o,a+"",e,r,s):t;c===t&&(c=o),Qr(e,a,c)}}),Ta)}function Vn(e,r){var n=e.length;if(n)return vs(r+=r<0?n:0,n)?e[r]:t}function Kn(t,e,r){e=e.length?Le(e,(function(t){return Ko(t)?function(e){return En(e,1===t.length?t[0]:t)}:t})):[rc];var n=-1;return e=Le(e,Qe(as())),function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}(kn(t,(function(t,r,i){return{criteria:Le(e,(function(e){return e(t)})),index:++n,value:t}})),(function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,s=e.criteria,o=i.length,a=r.length;++n<o;){var c=Ii(i[n],s[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}))}function Bn(t,e,r){for(var n=-1,i=e.length,s={};++n<i;){var o=e[n],a=En(t,o);r(a,o)&&Qn(s,bi(o,t),a)}return s}function Gn(t,e,r,n){var i=n?Ke:Ve,s=-1,o=e.length,a=t;for(t===e&&(e=Ai(e)),r&&(a=Le(t,Qe(r)));++s<o;)for(var c=0,u=e[s],h=r?r(u):u;(c=i(a,h,c,n))>-1;)a!==t&&Jt.call(a,c,1),Jt.call(t,c,1);return t}function Fn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==s){var s=i;vs(i)?Jt.call(t,i,1):hi(t,i)}}return t}function Wn(t,e){return t+ge(mr()*(e-t+1))}function Yn(t,e){var r="";if(!t||e<1||e>h)return r;do{e%2&&(r+=t),(e=ge(e/2))&&(t+=t)}while(e);return r}function Jn(t,e){return Cs(Is(t,e,rc),t+"")}function Xn(t){return Jr(za(t))}function Zn(t,e){var r=za(t);return xs(r,on(e,0,r.length))}function Qn(e,r,n,i){if(!$o(e))return e;for(var s=-1,o=(r=bi(r,e)).length,a=o-1,c=e;null!=c&&++s<o;){var u=Us(r[s]),h=n;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(s!=a){var l=c[u];(h=i?i(l,u,c):t)===t&&(h=$o(l)?l:vs(r[s+1])?[]:{})}$r(c,u,h),c=c[u]}return e}var $n=Ar?function(t,e){return Ar.set(t,e),t}:rc,ti=ee?function(t,e){return ee(t,"toString",{configurable:!0,enumerable:!1,value:$a(e),writable:!0})}:rc;function ei(t){return xs(za(t))}function ri(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var s=g(i);++n<i;)s[n]=t[n+e];return s}function ni(t,e){var r;return ln(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ii(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e===e&&i<=2147483647){for(;n<i;){var s=n+i>>>1,o=t[s];null!==o&&!aa(o)&&(r?o<=e:o<e)?n=s+1:i=s}return i}return si(t,e,rc,r)}function si(e,r,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(r=n(r))!==r,c=null===r,u=aa(r),h=r===t;s<o;){var l=ge((s+o)/2),f=n(e[l]),p=f!==t,d=null===f,g=f===f,y=aa(f);if(a)var v=i||g;else v=h?g&&(i||p):c?g&&p&&(i||!d):u?g&&p&&!d&&(i||!y):!d&&!y&&(i?f<=r:f<r);v?s=l+1:o=l}return vr(o,4294967294)}function oi(t,e){for(var r=-1,n=t.length,i=0,s=[];++r<n;){var o=t[r],a=e?e(o):o;if(!r||!zo(a,c)){var c=a;s[i++]=0===o?0:o}}return s}function ai(t){return"number"==typeof t?t:aa(t)?l:+t}function ci(t){if("string"==typeof t)return t;if(Ko(t))return Le(t,ci)+"";if(aa(t))return Dr?Dr.call(t):"";var e=t+"";return"0"==e&&1/t==-u?"-0":e}function ui(t,e,r){var n=-1,i=Ne,s=t.length,o=!0,a=[],c=a;if(r)o=!1,i=xe;else if(s>=200){var u=e?null:Yi(t);if(u)return hr(u);o=!1,i=tr,c=new Fr}else c=e?[]:a;t:for(;++n<s;){var h=t[n],l=e?e(h):h;if(h=r||0!==h?h:0,o&&l===l){for(var f=c.length;f--;)if(c[f]===l)continue t;e&&c.push(l),a.push(h)}else i(c,l,r)||(c!==a&&c.push(l),a.push(h))}return a}function hi(t,e){return null==(t=js(t,e=bi(e,t)))||delete t[Us(Ys(e))]}function li(t,e,r,n){return Qn(t,e,r(En(t,e)),n)}function fi(t,e,r,n){for(var i=t.length,s=n?i:-1;(n?s--:++s<i)&&e(t[s],s,t););return r?ri(t,n?0:s,n?s+1:i):ri(t,n?s+1:0,n?i:s)}function pi(t,e){var r=t;return r instanceof Vr&&(r=r.value()),Me(e,(function(t,e){return e.func.apply(e.thisArg,Ue([t],e.args))}),r)}function di(t,e,r){var n=t.length;if(n<2)return n?ui(t[0]):[];for(var i=-1,s=g(n);++i<n;)for(var o=t[i],a=-1;++a<n;)a!=i&&(s[i]=hn(s[i]||o,t[a],e,r));return ui(yn(s,1),e,r)}function gi(e,r,n){for(var i=-1,s=e.length,o=r.length,a={};++i<s;){var c=i<o?r[i]:t;n(a,e[i],c)}return a}function yi(t){return Fo(t)?t:[]}function vi(t){return"function"==typeof t?t:rc}function bi(t,e){return Ko(t)?t:_s(t,e)?[t]:Ls(va(t))}var _i=Jn;function mi(e,r,n){var i=e.length;return n=n===t?i:n,!r&&n>=i?e:ri(e,r,n)}var wi=ne||function(t){return de.clearTimeout(t)};function Ei(t,e){if(e)return t.slice();var r=t.length,n=Gt?Gt(r):new t.constructor(r);return t.copy(n),n}function Oi(t){var e=new t.constructor(t.byteLength);return new Bt(e).set(new Bt(t)),e}function Si(t,e){var r=e?Oi(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ii(e,r){if(e!==r){var n=e!==t,i=null===e,s=e===e,o=aa(e),a=r!==t,c=null===r,u=r===r,h=aa(r);if(!c&&!h&&!o&&e>r||o&&a&&u&&!c&&!h||i&&a&&u||!n&&u||!s)return 1;if(!i&&!o&&!h&&e<r||h&&n&&s&&!i&&!o||c&&n&&s||!a&&s||!u)return-1}return 0}function ji(t,e,r,n){for(var i=-1,s=t.length,o=r.length,a=-1,c=e.length,u=yr(s-o,0),h=g(c+u),l=!n;++a<c;)h[a]=e[a];for(;++i<o;)(l||i<s)&&(h[r[i]]=t[i]);for(;u--;)h[a++]=t[i++];return h}function Pi(t,e,r,n){for(var i=-1,s=t.length,o=-1,a=r.length,c=-1,u=e.length,h=yr(s-a,0),l=g(h+u),f=!n;++i<h;)l[i]=t[i];for(var p=i;++c<u;)l[p+c]=e[c];for(;++o<a;)(f||i<s)&&(l[p+r[o]]=t[i++]);return l}function Ai(t,e){var r=-1,n=t.length;for(e||(e=g(n));++r<n;)e[r]=t[r];return e}function Ri(e,r,n,i){var s=!n;n||(n={});for(var o=-1,a=r.length;++o<a;){var c=r[o],u=i?i(n[c],e[c],c,n,e):t;u===t&&(u=e[c]),s?nn(n,c,u):$r(n,c,u)}return n}function Ci(t,e){return function(r,n){var i=Ko(r)?Pe:en,s=e?e():{};return i(r,t,as(n,2),s)}}function Ti(e){return Jn((function(r,n){var i=-1,s=n.length,o=s>1?n[s-1]:t,a=s>2?n[2]:t;for(o=e.length>3&&"function"==typeof o?(s--,o):t,a&&bs(n[0],n[1],a)&&(o=s<3?t:o,s=1),r=jt(r);++i<s;){var c=n[i];c&&e(r,c,i,o)}return r}))}function Ni(t,e){return function(r,n){if(null==r)return r;if(!Go(r))return t(r,n);for(var i=r.length,s=e?i:-1,o=jt(r);(e?s--:++s<i)&&!1!==n(o[s],s,o););return r}}function xi(t){return function(e,r,n){for(var i=-1,s=jt(e),o=n(e),a=o.length;a--;){var c=o[t?a:++i];if(!1===r(s[c],c,s))break}return e}}function Li(e){return function(r){var n=or(r=va(r))?fr(r):t,i=n?n[0]:r.charAt(0),s=n?mi(n,1).join(""):r.slice(1);return i[e]()+s}}function Ui(t){return function(e){return Me(Xa(Va(e).replace($t,"")),t,"")}}function Mi(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=zr(t.prototype),n=t.apply(r,e);return $o(n)?n:r}}function Di(e){return function(r,n,i){var s=jt(r);if(!Go(r)){var o=as(n,3);r=Ca(r),n=function(t){return o(s[t],t,s)}}var a=e(r,n,i);return a>-1?s[o?r[a]:a]:t}}function ki(r){return es((function(n){var i=n.length,s=i,o=Hr.prototype.thru;for(r&&n.reverse();s--;){var a=n[s];if("function"!=typeof a)throw new Rt(e);if(o&&!c&&"wrapper"==ss(a))var c=new Hr([],!0)}for(s=c?s:i;++s<i;){var u=ss(a=n[s]),h="wrapper"==u?is(a):t;c=h&&ms(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?c[ss(h[0])].apply(c,h[3]):1==a.length&&ms(a)?c[u]():c.thru(a)}return function(){var t=arguments,e=t[0];if(c&&1==t.length&&Ko(e))return c.plant(e).value();for(var r=0,s=i?n[r].apply(this,t):e;++r<i;)s=n[r].call(this,s);return s}}))}function zi(e,r,n,i,s,o,c,u,h,l){var f=r&a,p=1&r,d=2&r,y=24&r,v=512&r,b=d?t:Mi(e);return function a(){for(var _=arguments.length,m=g(_),w=_;w--;)m[w]=arguments[w];if(y)var E=os(a),O=function(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}(m,E);if(i&&(m=ji(m,i,s,y)),o&&(m=Pi(m,o,c,y)),_-=O,y&&_<l){var S=ur(m,E);return Fi(e,r,zi,a.placeholder,n,m,S,u,h,l-_)}var I=p?n:this,j=d?I[e]:e;return _=m.length,u?m=function(e,r){for(var n=e.length,i=vr(r.length,n),s=Ai(e);i--;){var o=r[i];e[i]=vs(o,n)?s[o]:t}return e}(m,u):v&&_>1&&m.reverse(),f&&h<_&&(m.length=h),this&&this!==de&&this instanceof a&&(j=b||Mi(j)),j.apply(I,m)}}function qi(t,e){return function(r,n){return function(t,e,r,n){return _n(t,(function(t,i,s){e(n,r(t),i,s)})),n}(r,t,e(n),{})}}function Hi(e,r){return function(n,i){var s;if(n===t&&i===t)return r;if(n!==t&&(s=n),i!==t){if(s===t)return i;"string"==typeof n||"string"==typeof i?(n=ci(n),i=ci(i)):(n=ai(n),i=ai(i)),s=e(n,i)}return s}}function Vi(t){return es((function(e){return e=Le(e,Qe(as())),Jn((function(r){var n=this;return t(e,(function(t){return je(t,n,r)}))}))}))}function Ki(e,r){var n=(r=r===t?" ":ci(r)).length;if(n<2)return n?Yn(r,e):r;var i=Yn(r,pe(e/lr(r)));return or(r)?mi(fr(i),0,e).join(""):i.slice(0,e)}function Bi(e){return function(r,n,i){return i&&"number"!=typeof i&&bs(r,n,i)&&(n=i=t),r=fa(r),n===t?(n=r,r=0):n=fa(n),function(t,e,r,n){for(var i=-1,s=yr(pe((e-t)/(r||1)),0),o=g(s);s--;)o[n?s:++i]=t,t+=r;return o}(r,n,i=i===t?r<n?1:-1:fa(i),e)}}function Gi(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ga(e),r=ga(r)),t(e,r)}}function Fi(e,r,n,i,a,c,u,h,l,f){var p=8&r;r|=p?s:o,4&(r&=~(p?o:s))||(r&=-4);var d=[e,r,a,p?c:t,p?u:t,p?t:c,p?t:u,h,l,f],g=n.apply(t,d);return ms(e)&&As(g,d),g.placeholder=i,Ts(g,e,r)}function Wi(t){var e=It[t];return function(t,r){if(t=ga(t),(r=null==r?0:vr(pa(r),292))&&_e(t)){var n=(va(t)+"e").split("e");return+((n=(va(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Yi=Ir&&1/hr(new Ir([,-0]))[1]==u?function(t){return new Ir(t)}:ac;function Ji(t){return function(e){var r=ps(e);return r==S?ar(e):r==R?function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}
vendor: 5,326 bytes, line 2
2(e):function(t,e){return Le(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Xi(r,u,h,l,f,p,d,y){var v=2&u;if(!v&&"function"!=typeof r)throw new Rt(e);var b=l?l.length:0;if(b||(u&=-97,l=f=t),d=d===t?d:yr(pa(d),0),y=y===t?y:pa(y),b-=f?f.length:0,u&o){var _=l,m=f;l=f=t}var w=v?t:is(r),E=[r,u,h,l,f,_,m,p,d,y];if(w&&function(t,e){var r=t[1],i=e[1],s=r|i,o=s<131,u=i==a&&8==r||i==a&&r==c&&t[7].length<=e[8]||384==i&&e[7].length<=e[8]&&8==r;if(!o&&!u)return t;1&i&&(t[2]=e[2],s|=1&r?0:4);var h=e[3];if(h){var l=t[3];t[3]=l?ji(l,h,e[4]):h,t[4]=l?ur(t[3],n):e[4]}(h=e[5])&&(l=t[5],t[5]=l?Pi(l,h,e[6]):h,t[6]=l?ur(t[5],n):e[6]),(h=e[7])&&(t[7]=h),i&a&&(t[8]=null==t[8]?e[8]:vr(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=s}(E,w),r=E[0],u=E[1],h=E[2],l=E[3],f=E[4],!(y=E[9]=E[9]===t?v?0:r.length:yr(E[9]-b,0))&&24&u&&(u&=-25),u&&1!=u)O=8==u||u==i?function(e,r,n){var i=Mi(e);return function s(){for(var o=arguments.length,a=g(o),c=o,u=os(s);c--;)a[c]=arguments[c];var h=o<3&&a[0]!==u&&a[o-1]!==u?[]:ur(a,u);return(o-=h.length)<n?Fi(e,r,zi,s.placeholder,t,a,h,t,t,n-o):je(this&&this!==de&&this instanceof s?i:e,this,a)}}(r,u,y):u!=s&&33!=u||f.length?zi.apply(t,E):function(t,e,r,n){var i=1&e,s=Mi(t);return function e(){for(var o=-1,a=arguments.length,c=-1,u=n.length,h=g(u+a),l=this&&this!==de&&this instanceof e?s:t;++c<u;)h[c]=n[c];for(;a--;)h[c++]=arguments[++o];return je(l,i?r:this,h)}}(r,u,h,l);else var O=function(t,e,r){var n=1&e,i=Mi(t);return function e(){return(this&&this!==de&&this instanceof e?i:t).apply(n?r:this,arguments)}}(r,u,h);return Ts((w?$n:As)(O,E),r,u)}function Zi(e,r,n,i){return e===t||zo(e,Nt[n])&&!Ut.call(i,n)?r:e}function Qi(e,r,n,i,s,o){return $o(e)&&$o(r)&&(o.set(r,e),Hn(e,r,t,Qi,o),o.delete(r)),e}function $i(e){return na(e)?t:e}function ts(e,r,n,i,s,o){var a=1&n,c=e.length,u=r.length;if(c!=u&&!(a&&u>c))return!1;var h=o.get(e),l=o.get(r);if(h&&l)return h==r&&l==e;var f=-1,p=!0,d=2&n?new Fr:t;for(o.set(e,r),o.set(r,e);++f<c;){var g=e[f],y=r[f];if(i)var v=a?i(y,g,f,r,e,o):i(g,y,f,e,r,o);if(v!==t){if(v)continue;p=!1;break}if(d){if(!ke(r,(function(t,e){if(!tr(d,e)&&(g===t||s(g,t,n,i,o)))return d.push(e)}))){p=!1;break}}else if(g!==y&&!s(g,y,n,i,o)){p=!1;break}}return o.delete(e),o.delete(r),p}function es(e){return Cs(Is(e,t,Ks),e+"")}function rs(t){return On(t,Ca,ls)}function ns(t){return On(t,Ta,fs)}var is=Ar?function(t){return Ar.get(t)}:ac;function ss(t){for(var e=t.name+"",r=Rr[e],n=Ut.call(Rr,e)?r.length:0;n--;){var i=r[n],s=i.func;if(null==s||s==t)return i.name}return e}function os(t){return(Ut.call(kr,"placeholder")?kr:t).placeholder}function as(){var t=kr.iteratee||nc;return t=t===nc?Ln:t,arguments.length?t(arguments[0],arguments[1]):t}function cs(t,e){var r=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?r["string"==typeof e?"string":"hash"]:r.map}function us(t){for(var e=Ca(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Os(i)]}return e}function hs(e,r){var n=function(e,r){return null==e?t:e[r]}(e,r);return xn(n)?n:t}var ls=ye?function(t){return null==t?[]:(t=jt(t),Te(ye(t),(function(e){return Yt.call(t,e)})))}:dc,fs=ye?function(t){for(var e=[];t;)Ue(e,ls(t)),t=Ft(t);return e}:dc,ps=Sn;function ds(t,e,r){for(var n=-1,i=(e=bi(e,t)).length,s=!1;++n<i;){var o=Us(e[n]);if(!(s=null!=t&&r(t,o)))break;t=t[o]}return s||++n!=i?s:!!(i=null==t?0:t.length)&&Qo(i)&&vs(o,i)&&(Ko(t)||Vo(t))}function gs(t){return"function"!=typeof t.constructor||Es(t)?{}:zr(Ft(t))}function ys(t){return Ko(t)||Vo(t)||!!(Xt&&t&&t[Xt])}function vs(t,e){var r,n=typeof t;return!!(e=null!==(r=e)&&void 0!==r?r:h)&&("number"==n||"symbol"!=n&&_t.test(t))&&t>-1&&t%1==0&&t<e}function bs(t,e,r){if(!$o(r))return!1;var n=typeof e;return!!("number"==n?Go(r)&&vs(e,r.length):"string"==n&&e in r)&&zo(r[e],t)}function _s(t,e){if(Ko(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!aa(t))||et.test(t)||!tt.test(t)||null!=e&&t in jt(e)}function ms(t){var e=ss(t),r=kr[e];if("function"!=typeof r||!(e in Vr.prototype))return!1;if(t===r)return!0;var n=is(r);return!!n&&t===n[0]}(Er&&ps(new Er(new ArrayBuffer(1)))!=L||Or&&ps(new Or)!=S||Sr&&ps(Sr.resolve())!=P||Ir&&ps(new Ir)!=R||jr&&ps(new jr)!=N)&&(ps=function(e){var r=Sn(e),n=r==j?e.constructor:t,i=n?Ms(n):"";if(i)switch(i){case Cr:return L;case Tr:return S;case Nr:return P;case xr:return R;case Lr:return N}return r});var ws=xt?Xo:gc;function Es(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Nt)}function Os(t){return t===t&&!$o(t)}function Ss(e,r){return function(n){return null!=n&&n[e]===r&&(r!==t||e in jt(n))}}function Is(e,r,n){return r=yr(r===t?e.length-1:r,0),function(){for(var t=arguments,i=-1,s=yr(t.length-r,0),o=g(s);++i<s;)o[i]=t[r+i];i=-1;for(var a=g(r+1);++i<r;)a[i]=t[i];return a[r]=n(o),je(e,this,a)}}function js(t,e){return e.length<2?t:En(t,ri(e,0,-1))}function Ps(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var As=Ns($n),Rs=fe||function(t,e){return de.setTimeout(t,e)},Cs=Ns(ti);function Ts(t,e,r){var n=e+"";return Cs(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Ae(y,(function(r){var n="_."+r[0];
vendor: 5,630 bytes, line 2
2e&r[1]&&!Ne(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(ut):[]}(n),r)))}function Ns(e){var r=0,n=0;return function(){var i=br(),s=16-(i-n);if(n=i,s>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(t,arguments)}}function xs(e,r){var n=-1,i=e.length,s=i-1;for(r=r===t?i:r;++n<r;){var o=Wn(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=r,e}var Ls=function(t){var e=xo(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(rt,(function(t,r,n,i){e.push(n?i.replace(ft,"$1"):r||t)})),e}));function Us(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-u?"-0":e}function Ms(t){if(null!=t){try{return Lt.call(t)}catch{}try{return t+""}catch{}}return""}function Ds(t){if(t instanceof Vr)return t.clone();var e=new Hr(t.__wrapped__,t.__chain__);return e.__actions__=Ai(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var ks=Jn((function(t,e){return Fo(t)?hn(t,yn(e,1,Fo,!0)):[]})),zs=Jn((function(e,r){var n=Ys(r);return Fo(n)&&(n=t),Fo(e)?hn(e,yn(r,1,Fo,!0),as(n,2)):[]})),qs=Jn((function(e,r){var n=Ys(r);return Fo(n)&&(n=t),Fo(e)?hn(e,yn(r,1,Fo,!0),t,n):[]}));function Hs(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pa(r);return i<0&&(i=yr(n+i,0)),He(t,as(e,3),i)}function Vs(e,r,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==t&&(s=pa(n),s=n<0?yr(i+s,0):vr(s,i-1)),He(e,as(r,3),s,!0)}function Ks(t){return null!=t&&t.length?yn(t,1):[]}function Bs(e){return e&&e.length?e[0]:t}var Gs=Jn((function(t){var e=Le(t,yi);return e.length&&e[0]===t[0]?An(e):[]})),Fs=Jn((function(e){var r=Ys(e),n=Le(e,yi);return r===Ys(n)?r=t:n.pop(),n.length&&n[0]===e[0]?An(n,as(r,2)):[]})),Ws=Jn((function(e){var r=Ys(e),n=Le(e,yi);return(r="function"==typeof r?r:t)&&n.pop(),n.length&&n[0]===e[0]?An(n,t,r):[]}));function Ys(e){var r=null==e?0:e.length;return r?e[r-1]:t}var Js=Jn(Xs);function Xs(t,e){return t&&t.length&&e&&e.length?Gn(t,e):t}var Zs=es((function(t,e){var r=null==t?0:t.length,n=sn(t,e);return Fn(t,Le(e,(function(t){return vs(t,r)?+t:t})).sort(Ii)),n}));function Qs(t){return null==t?t:wr.call(t)}var $s=Jn((function(t){return ui(yn(t,1,Fo,!0))})),to=Jn((function(e){var r=Ys(e);return Fo(r)&&(r=t),ui(yn(e,1,Fo,!0),as(r,2))})),eo=Jn((function(e){var r=Ys(e);return r="function"==typeof r?r:t,ui(yn(e,1,Fo,!0),t,r)}));function ro(t){if(!t||!t.length)return[];var e=0;return t=Te(t,(function(t){if(Fo(t))return e=yr(t.length,e),!0})),Xe(e,(function(e){return Le(t,Fe(e))}))}function no(e,r){if(!e||!e.length)return[];var n=ro(e);return null==r?n:Le(n,(function(e){return je(r,t,e)}))}var io=Jn((function(t,e){return Fo(t)?hn(t,e):[]})),so=Jn((function(t){return di(Te(t,Fo))})),oo=Jn((function(e){var r=Ys(e);return Fo(r)&&(r=t),di(Te(e,Fo),as(r,2))})),ao=Jn((function(e){var r=Ys(e);return r="function"==typeof r?r:t,di(Te(e,Fo),t,r)})),co=Jn(ro),uo=Jn((function(e){var r=e.length,n=r>1?e[r-1]:t;return n="function"==typeof n?(e.pop(),n):t,no(e,n)}));function ho(t){var e=kr(t);return e.__chain__=!0,e}function lo(t,e){return e(t)}var fo=es((function(e){var r=e.length,n=r?e[0]:0,i=this.__wrapped__,s=function(t){return sn(t,e)};return!(r>1||this.__actions__.length)&&i instanceof Vr&&vs(n)?((i=i.slice(n,+n+(r?1:0))).__actions__.push({func:lo,args:[s],thisArg:t}),new Hr(i,this.__chain__).thru((function(e){return r&&!e.length&&e.push(t),e}))):this.thru(s)})),po=Ci((function(t,e,r){Ut.call(t,r)?++t[r]:nn(t,r,1)})),go=Di(Hs),yo=Di(Vs);function vo(t,e){return(Ko(t)?Ae:ln)(t,as(e,3))}function bo(t,e){return(Ko(t)?Re:fn)(t,as(e,3))}var _o=Ci((function(t,e,r){Ut.call(t,r)?t[r].push(e):nn(t,r,[e])})),mo=Jn((function(t,e,r){var n=-1,i="function"==typeof e,s=Go(t)?g(t.length):[];return ln(t,(function(t){s[++n]=i?je(e,t,r):Rn(t,e,r)})),s})),wo=Ci((function(t,e,r){nn(t,r,e)}));function Eo(t,e){return(Ko(t)?Le:kn)(t,as(e,3))}var Oo=Ci((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),So=Jn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&bs(t,e[0],e[1])?e=[]:r>2&&bs(e[0],e[1],e[2])&&(e=[e[0]]),Kn(t,yn(e,1),[])})),Io=ue||function(){return de.Date.now()};function jo(e,r,n){return r=n?t:r,r=e&&null==r?e.length:r,Xi(e,a,t,t,t,t,r)}function Po(r,n){var i;if("function"!=typeof n)throw new Rt(e);return r=pa(r),function(){return--r>0&&(i=n.apply(this,arguments)),r<=1&&(n=t),i}}var Ao=Jn((function(t,e,r){var n=1;if(r.length){var i=ur(r,os(Ao));n|=s}return Xi(t,n,e,r,i)})),Ro=Jn((function(t,e,r){var n=3;if(r.length){var i=ur(r,os(Ro));n|=s}return Xi(e,n,t,r,i)}));function Co(r,n,i){var s,o,a,c,u,h,l=0,f=!1,p=!1,d=!0;if("function"!=typeof r)throw new Rt(e);function g(e){var n=s,i=o;return s=o=t,l=e,c=r.apply(i,n)}function y(e){var r=e-h;return h===t||r>=n||r<0||p&&e-l>=a}function v(){var t=Io();if(y(t))return b(t);u=Rs(v,function(t){var e=n-(t-h);return p?vr(e,a-(t-l)):e}(t))}function b(e){return u=t,d&&s?g(e):(s=o=t,c)}function _(){var e=Io(),r=y(e);if(s=arguments,o=this,h=e,r){if(u===t)return function(t){return l=t,u=Rs(v,n),f?g(t):c}(h);if(p)return wi(u),u=Rs(v,n),g(h)}return u===t&&(u=Rs(v,n)),c}return n=ga(n)||0,$o(i)&&(f=!!i.leading,a=(p="maxWait"in i)?yr(ga(i.maxWait)||0,n):a,d="trailing"in i?!!i.trailing:d),_.cancel=function(){u!==t&&wi(u),l=0,s=h=o=u=t},_.flush=function(){return u===t?c:b(Io())},_}var To=Jn((function(t,e){return un(t,1,e)})),No=Jn((function(t,e,r){return un(t,ga(e)||0,r)}));function xo(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new Rt(e);var n=function(){var e=arguments,i=r?r.apply(this,e):e[0],s=n.cache;if(s.has(i))return s.get(i);
vendor: 4,349 bytes, line 2
2var o=t.apply(this,e);return n.cache=s.set(i,o)||s,o};return n.cache=new(xo.Cache||Gr),n}function Lo(t){if("function"!=typeof t)throw new Rt(e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}xo.Cache=Gr;var Uo=_i((function(t,e){var r=(e=1==e.length&&Ko(e[0])?Le(e[0],Qe(as())):Le(yn(e,1),Qe(as()))).length;return Jn((function(n){for(var i=-1,s=vr(n.length,r);++i<s;)n[i]=e[i].call(this,n[i]);return je(t,this,n)}))})),Mo=Jn((function(e,r){var n=ur(r,os(Mo));return Xi(e,s,t,r,n)})),Do=Jn((function(e,r){var n=ur(r,os(Do));return Xi(e,o,t,r,n)})),ko=es((function(e,r){return Xi(e,c,t,t,t,r)}));function zo(t,e){return t===e||t!==t&&e!==e}var qo=Gi(In),Ho=Gi((function(t,e){return t>=e})),Vo=Cn(function(){return arguments}())?Cn:function(t){return ta(t)&&Ut.call(t,"callee")&&!Yt.call(t,"callee")},Ko=g.isArray,Bo=me?Qe(me):function(t){return ta(t)&&Sn(t)==x};function Go(t){return null!=t&&Qo(t.length)&&!Xo(t)}function Fo(t){return ta(t)&&Go(t)}var Wo=be||gc,Yo=we?Qe(we):function(t){return ta(t)&&Sn(t)==m};function Jo(t){if(!ta(t))return!1;var e=Sn(t);return e==w||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!na(t)}function Xo(t){if(!$o(t))return!1;var e=Sn(t);return e==E||e==O||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Zo(t){return"number"==typeof t&&t==pa(t)}function Qo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function $o(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=Ee?Qe(Ee):function(t){return ta(t)&&ps(t)==S};function ra(t){return"number"==typeof t||ta(t)&&Sn(t)==I}function na(t){if(!ta(t)||Sn(t)!=j)return!1;var e=Ft(t);if(null===e)return!0;var r=Ut.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Lt.call(r)==zt}var ia=Oe?Qe(Oe):function(t){return ta(t)&&Sn(t)==A},sa=Se?Qe(Se):function(t){return ta(t)&&ps(t)==R};function oa(t){return"string"==typeof t||!Ko(t)&&ta(t)&&Sn(t)==C}function aa(t){return"symbol"==typeof t||ta(t)&&Sn(t)==T}var ca=Ie?Qe(Ie):function(t){return ta(t)&&Qo(t.length)&&!!ae[Sn(t)]},ua=Gi(Dn),ha=Gi((function(t,e){return t<=e}));function la(t){if(!t)return[];if(Go(t))return oa(t)?fr(t):Ai(t);if(Zt&&t[Zt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Zt]());var e=ps(t);return(e==S?ar:e==R?hr:za)(t)}function fa(t){return t?(t=ga(t))===u||t===-u?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}function pa(t){var e=fa(t),r=e%1;return e===e?r?e-r:e:0}function da(t){return t?on(pa(t),0,f):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return l;if($o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=$o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ze(t);var r=yt.test(t);return r||bt.test(t)?le(t.slice(2),r?2:8):gt.test(t)?l:+t}function ya(t){return Ri(t,Ta(t))}function va(t){return null==t?"":ci(t)}var ba=Ti((function(t,e){if(Es(e)||Go(e))Ri(e,Ca(e),t);else for(var r in e)Ut.call(e,r)&&$r(t,r,e[r])})),_a=Ti((function(t,e){Ri(e,Ta(e),t)})),ma=Ti((function(t,e,r,n){Ri(e,Ta(e),t,n)})),wa=Ti((function(t,e,r,n){Ri(e,Ca(e),t,n)})),Ea=es(sn),Oa=Jn((function(e,r){e=jt(e);var n=-1,i=r.length,s=i>2?r[2]:t;for(s&&bs(r[0],r[1],s)&&(i=1);++n<i;)for(var o=r[n],a=Ta(o),c=-1,u=a.length;++c<u;){var h=a[c],l=e[h];(l===t||zo(l,Nt[h])&&!Ut.call(e,h))&&(e[h]=o[h])}return e})),Sa=Jn((function(e){return e.push(t,Qi),je(xa,t,e)}));function Ia(e,r,n){var i=null==e?t:En(e,r);return i===t?n:i}function ja(t,e){return null!=t&&ds(t,e,Pn)}var Pa=qi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=kt.call(e)),t[e]=r}),$a(rc)),Aa=qi((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=kt.call(e)),Ut.call(t,e)?t[e].push(r):t[e]=[r]}),as),Ra=Jn(Rn);function Ca(t){return Go(t)?Yr(t):Un(t)}function Ta(t){return Go(t)?Yr(t,!0):Mn(t)}var Na=Ti((function(t,e,r){Hn(t,e,r)})),xa=Ti((function(t,e,r,n){Hn(t,e,r,n)})),La=es((function(t,e){var r={};if(null==t)return r;var n=!1;e=Le(e,(function(e){return e=bi(e,t),n||(n=e.length>1),e})),Ri(t,ns(t),r),n&&(r=an(r,7,$i));for(var i=e.length;i--;)hi(r,e[i]);return r})),Ua=es((function(t,e){return null==t?{}:function(t,e){return Bn(t,e,(function(e,r){return ja(t,r)}
vendor: 4,365 bytes, line 2
2))}(t,e)}));function Ma(t,e){if(null==t)return{};var r=Le(ns(t),(function(t){return[t]}));return e=as(e),Bn(t,r,(function(t,r){return e(t,r[0])}))}var Da=Ji(Ca),ka=Ji(Ta);function za(t){return null==t?[]:$e(t,Ca(t))}var qa=Ui((function(t,e,r){return e=e.toLowerCase(),t+(r?Ha(e):e)}));function Ha(t){return Ja(va(t).toLowerCase())}function Va(t){return(t=va(t))&&t.replace(mt,nr).replace(te,"")}var Ka=Ui((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Ba=Ui((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Ga=Li("toLowerCase"),Fa=Ui((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Wa=Ui((function(t,e,r){return t+(r?" ":"")+Ja(e)})),Ya=Ui((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Ja=Li("toUpperCase");function Xa(e,r,n){return e=va(e),(r=n?t:r)===t?function(t){return ie.test(t)}(e)?function(t){return t.match(re)||[]}(e):function(t){return t.match(ht)||[]}(e):e.match(r)||[]}var Za=Jn((function(e,r){try{return je(e,t,r)}catch(n){return Jo(n)?n:new Ot(n)}})),Qa=es((function(t,e){return Ae(e,(function(e){e=Us(e),nn(t,e,Ao(t[e],t))})),t}));function $a(t){return function(){return t}}var tc=ki(),ec=ki(!0);function rc(t){return t}function nc(t){return Ln("function"==typeof t?t:an(t,1))}var ic=Jn((function(t,e){return function(r){return Rn(r,t,e)}})),sc=Jn((function(t,e){return function(r){return Rn(t,r,e)}}));function oc(t,e,r){var n=Ca(e),i=wn(e,n);null==r&&(!$o(e)||!i.length&&n.length)&&(r=e,e=t,t=this,i=wn(e,Ca(e)));var s=!($o(r)&&"chain"in r)||!!r.chain,o=Xo(t);return Ae(i,(function(r){var n=e[r];t[r]=n,o&&(t.prototype[r]=function(){var e=this.__chain__;if(s||e){var r=t(this.__wrapped__);return(r.__actions__=Ai(this.__actions__)).push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Ue([this.value()],arguments))})})),t}function ac(){}var cc=Vi(Le),uc=Vi(Ce),hc=Vi(ke);function lc(t){return _s(t)?Fe(Us(t)):function(t){return function(e){return En(e,t)}}(t)}var fc=Bi(),pc=Bi(!0);function dc(){return[]}function gc(){return!1}var yc=Hi((function(t,e){return t+e}),0),vc=Wi("ceil"),bc=Hi((function(t,e){return t/e}),1),_c=Wi("floor"),mc=Hi((function(t,e){return t*e}),1),wc=Wi("round"),Ec=Hi((function(t,e){return t-e}),0);return kr.after=function(t,r){if("function"!=typeof r)throw new Rt(e);return t=pa(t),function(){if(--t<1)return r.apply(this,arguments)}},kr.ary=jo,kr.assign=ba,kr.assignIn=_a,kr.assignInWith=ma,kr.assignWith=wa,kr.at=Ea,kr.before=Po,kr.bind=Ao,kr.bindAll=Qa,kr.bindKey=Ro,kr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ko(t)?t:[t]},kr.chain=ho,kr.chunk=function(e,r,n){r=(n?bs(e,r,n):r===t)?1:yr(pa(r),0);var i=null==e?0:e.length;if(!i||r<1)return[];for(var s=0,o=0,a=g(pe(i/r));s<i;)a[o++]=ri(e,s,s+=r);return a},kr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var s=t[e];s&&(i[n++]=s)}return i},kr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=g(t-1),r=arguments[0],n=t;n--;)e[n-1]=arguments[n];return Ue(Ko(r)?Ai(r):[r],yn(e,1))},kr.cond=function(t){var r=null==t?0:t.length,n=as();return t=r?Le(t,(function(t){if("function"!=typeof t[1])throw new Rt(e);return[n(t[0]),t[1]]})):[],Jn((function(e){for(var n=-1;++n<r;){var i=t[n];if(je(i[0],this,e))return je(i[1],this,e)}}))},kr.conforms=function(t){return function(t){var e=Ca(t);return function(r){return cn(r,t,e)}}(an(t,1))},kr.constant=$a,kr.countBy=po,kr.create=function(t,e){var r=zr(t);return null==e?r:rn(r,e)},kr.curry=function e(r,n,i){var s=Xi(r,8,t,t,t,t,t,n=i?t:n);return s.placeholder=e.placeholder,s},kr.curryRight=function e(r,n,s){var o=Xi(r,i,t,t,t,t,t,n=s?t:n);return o.placeholder=e.placeholder,o},kr.debounce=Co,kr.defaults=Oa,kr.defaultsDeep=Sa,kr.defer=To,kr.delay=No,kr.difference=ks,kr.differenceBy=zs,kr.differenceWith=qs,kr.drop=function(e,r,n){var i=null==e?0:e.length;return i?ri(e,(r=n||r===t?1:pa(r))<0?0:r,i):[]},kr.dropRight=function(e,r,n){var i=null==e?0:e.length;return i?ri(e,0,(r=i-(r=n||r===t?1:pa(r)))<0?0:r):[]},kr.dropRightWhile=function(t,e){return t&&t.length?fi(t,as(e,3),!0,!0):[]},kr.dropWhile=function(t,e){return t&&t.length?fi(t,as(e,3),!0):[]},kr.fill=function(e,r,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&bs(e,r,n)&&(n=0,i=s),function(e,r,n,i){var s=e.length;for((n=pa(n))<0&&(n=-n>s?0:s+n),(i=i===t||i>s?s:pa(i))<0&&(i+=s),i=n>i?0:da(i);n<i;)e[n++]=r;return e}
vendor: 4,791 bytes, line 2
2(e,r,n,i)):[]},kr.filter=function(t,e){return(Ko(t)?Te:gn)(t,as(e,3))},kr.flatMap=function(t,e){return yn(Eo(t,e),1)},kr.flatMapDeep=function(t,e){return yn(Eo(t,e),u)},kr.flatMapDepth=function(e,r,n){return n=n===t?1:pa(n),yn(Eo(e,r),n)},kr.flatten=Ks,kr.flattenDeep=function(t){return null!=t&&t.length?yn(t,u):[]},kr.flattenDepth=function(e,r){return null!=e&&e.length?yn(e,r=r===t?1:pa(r)):[]},kr.flip=function(t){return Xi(t,512)},kr.flow=tc,kr.flowRight=ec,kr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},kr.functions=function(t){return null==t?[]:wn(t,Ca(t))},kr.functionsIn=function(t){return null==t?[]:wn(t,Ta(t))},kr.groupBy=_o,kr.initial=function(t){return null!=t&&t.length?ri(t,0,-1):[]},kr.intersection=Gs,kr.intersectionBy=Fs,kr.intersectionWith=Ws,kr.invert=Pa,kr.invertBy=Aa,kr.invokeMap=mo,kr.iteratee=nc,kr.keyBy=wo,kr.keys=Ca,kr.keysIn=Ta,kr.map=Eo,kr.mapKeys=function(t,e){var r={};return e=as(e,3),_n(t,(function(t,n,i){nn(r,e(t,n,i),t)})),r},kr.mapValues=function(t,e){var r={};return e=as(e,3),_n(t,(function(t,n,i){nn(r,n,e(t,n,i))})),r},kr.matches=function(t){return zn(an(t,1))},kr.matchesProperty=function(t,e){return qn(t,an(e,1))},kr.memoize=xo,kr.merge=Na,kr.mergeWith=xa,kr.method=ic,kr.methodOf=sc,kr.mixin=oc,kr.negate=Lo,kr.nthArg=function(t){return t=pa(t),Jn((function(e){return Vn(e,t)}))},kr.omit=La,kr.omitBy=function(t,e){return Ma(t,Lo(as(e)))},kr.once=function(t){return Po(2,t)},kr.orderBy=function(e,r,n,i){return null==e?[]:(Ko(r)||(r=null==r?[]:[r]),Ko(n=i?t:n)||(n=null==n?[]:[n]),Kn(e,r,n))},kr.over=cc,kr.overArgs=Uo,kr.overEvery=uc,kr.overSome=hc,kr.partial=Mo,kr.partialRight=Do,kr.partition=Oo,kr.pick=Ua,kr.pickBy=Ma,kr.property=lc,kr.propertyOf=function(e){return function(r){return null==e?t:En(e,r)}},kr.pull=Js,kr.pullAll=Xs,kr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Gn(t,e,as(r,2)):t},kr.pullAllWith=function(e,r,n){return e&&e.length&&r&&r.length?Gn(e,r,t,n):e},kr.pullAt=Zs,kr.range=fc,kr.rangeRight=pc,kr.rearg=ko,kr.reject=function(t,e){return(Ko(t)?Te:gn)(t,Lo(as(e,3)))},kr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],s=t.length;for(e=as(e,3);++n<s;){var o=t[n];e(o,n,t)&&(r.push(o),i.push(n))}return Fn(t,i),r},kr.rest=function(r,n){if("function"!=typeof r)throw new Rt(e);return Jn(r,n=n===t?n:pa(n))},kr.reverse=Qs,kr.sampleSize=function(e,r,n){return r=(n?bs(e,r,n):r===t)?1:pa(r),(Ko(e)?Xr:Zn)(e,r)},kr.set=function(t,e,r){return null==t?t:Qn(t,e,r)},kr.setWith=function(e,r,n,i){return i="function"==typeof i?i:t,null==e?e:Qn(e,r,n,i)},kr.shuffle=function(t){return(Ko(t)?Zr:ei)(t)},kr.slice=function(e,r,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&bs(e,r,n)?(r=0,n=i):(r=null==r?0:pa(r),n=n===t?i:pa(n)),ri(e,r,n)):[]},kr.sortBy=So,kr.sortedUniq=function(t){return t&&t.length?oi(t):[]},kr.sortedUniqBy=function(t,e){return t&&t.length?oi(t,as(e,2)):[]},kr.split=function(e,r,n){return n&&"number"!=typeof n&&bs(e,r,n)&&(r=n=t),(n=n===t?f:n>>>0)?(e=va(e))&&("string"==typeof r||null!=r&&!ia(r))&&!(r=ci(r))&&or(e)?mi(fr(e),0,n):e.split(r,n):[]},kr.spread=function(t,r){if("function"!=typeof t)throw new Rt(e);return r=null==r?0:yr(pa(r),0),Jn((function(e){var n=e[r],i=mi(e,0,r);return n&&Ue(i,n),je(t,this,i)}))},kr.tail=function(t){var e=null==t?0:t.length;return e?ri(t,1,e):[]},kr.take=function(e,r,n){return e&&e.length?ri(e,0,(r=n||r===t?1:pa(r))<0?0:r):[]},kr.takeRight=function(e,r,n){var i=null==e?0:e.length;return i?ri(e,(r=i-(r=n||r===t?1:pa(r)))<0?0:r,i):[]},kr.takeRightWhile=function(t,e){return t&&t.length?fi(t,as(e,3),!1,!0):[]},kr.takeWhile=function(t,e){return t&&t.length?fi(t,as(e,3)):[]},kr.tap=function(t,e){return e(t),t},kr.throttle=function(t,r,n){var i=!0,s=!0;if("function"!=typeof t)throw new Rt(e);return $o(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),Co(t,r,{leading:i,maxWait:r,trailing:s})},kr.thru=lo,kr.toArray=la,kr.toPairs=Da,kr.toPairsIn=ka,kr.toPath=function(t){return Ko(t)?Le(t,Us):aa(t)?[t]:Ai(Ls(va(t)))},kr.toPlainObject=ya,kr.transform=function(t,e,r){var n=Ko(t),i=n||Wo(t)||ca(t);if(e=as(e,4),null==r){var s=t&&t.constructor;r=i?n?new s:[]:$o(t)&&Xo(s)?zr(Ft(t)):{}}return(i?Ae:_n)(t,(function(t,n,i){return e(r,t,n,i)})),r},kr.unary=function(t){return jo(t,1)},kr.union=$s,kr.unionBy=to,kr.unionWith=eo,kr.uniq=function(t){return t&&t.length?ui(t):[]},kr.uniqBy=function(t,e){return t&&t.length?ui(t,as(e,2)):[]},kr.uniqWith=function(e,r){return r="function"==typeof r?r:t,e&&e.length?ui(e,t,r):[]},kr.unset=function(t,e){return null==t||hi(t,e)},kr.unzip=ro,kr.unzipWith=no,kr.update=function(t,e,r){return null==t?t:li(t,e,vi(r))},kr.updateWith=function(e,r,n,i){return i="function"==typeof i?i:t,null==e?e:li(e,r,vi(n),i)}
vendor: 6,791 bytes, line 2
2,kr.values=za,kr.valuesIn=function(t){return null==t?[]:$e(t,Ta(t))},kr.without=io,kr.words=Xa,kr.wrap=function(t,e){return Mo(vi(e),t)},kr.xor=so,kr.xorBy=oo,kr.xorWith=ao,kr.zip=co,kr.zipObject=function(t,e){return gi(t||[],e||[],$r)},kr.zipObjectDeep=function(t,e){return gi(t||[],e||[],Qn)},kr.zipWith=uo,kr.entries=Da,kr.entriesIn=ka,kr.extend=_a,kr.extendWith=ma,oc(kr,kr),kr.add=yc,kr.attempt=Za,kr.camelCase=qa,kr.capitalize=Ha,kr.ceil=vc,kr.clamp=function(e,r,n){return n===t&&(n=r,r=t),n!==t&&(n=(n=ga(n))===n?n:0),r!==t&&(r=(r=ga(r))===r?r:0),on(ga(e),r,n)},kr.clone=function(t){return an(t,4)},kr.cloneDeep=function(t){return an(t,5)},kr.cloneDeepWith=function(e,r){return an(e,5,r="function"==typeof r?r:t)},kr.cloneWith=function(e,r){return an(e,4,r="function"==typeof r?r:t)},kr.conformsTo=function(t,e){return null==e||cn(t,e,Ca(e))},kr.deburr=Va,kr.defaultTo=function(t,e){return null==t||t!==t?e:t},kr.divide=bc,kr.endsWith=function(e,r,n){e=va(e),r=ci(r);var i=e.length,s=n=n===t?i:on(pa(n),0,i);return(n-=r.length)>=0&&e.slice(n,s)==r},kr.eq=zo,kr.escape=function(t){return(t=va(t))&&X.test(t)?t.replace(Y,ir):t},kr.escapeRegExp=function(t){return(t=va(t))&&it.test(t)?t.replace(nt,"\\$&"):t},kr.every=function(e,r,n){var i=Ko(e)?Ce:pn;return n&&bs(e,r,n)&&(r=t),i(e,as(r,3))},kr.find=go,kr.findIndex=Hs,kr.findKey=function(t,e){return qe(t,as(e,3),_n)},kr.findLast=yo,kr.findLastIndex=Vs,kr.findLastKey=function(t,e){return qe(t,as(e,3),mn)},kr.floor=_c,kr.forEach=vo,kr.forEachRight=bo,kr.forIn=function(t,e){return null==t?t:vn(t,as(e,3),Ta)},kr.forInRight=function(t,e){return null==t?t:bn(t,as(e,3),Ta)},kr.forOwn=function(t,e){return t&&_n(t,as(e,3))},kr.forOwnRight=function(t,e){return t&&mn(t,as(e,3))},kr.get=Ia,kr.gt=qo,kr.gte=Ho,kr.has=function(t,e){return null!=t&&ds(t,e,jn)},kr.hasIn=ja,kr.head=Bs,kr.identity=rc,kr.includes=function(t,e,r,n){t=Go(t)?t:za(t),r=r&&!n?pa(r):0;var i=t.length;return r<0&&(r=yr(i+r,0)),oa(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Ve(t,e,r)>-1},kr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:pa(r);return i<0&&(i=yr(n+i,0)),Ve(t,e,i)},kr.inRange=function(e,r,n){return r=fa(r),n===t?(n=r,r=0):n=fa(n),function(t,e,r){return t>=vr(e,r)&&t<yr(e,r)}(e=ga(e),r,n)},kr.invoke=Ra,kr.isArguments=Vo,kr.isArray=Ko,kr.isArrayBuffer=Bo,kr.isArrayLike=Go,kr.isArrayLikeObject=Fo,kr.isBoolean=function(t){return!0===t||!1===t||ta(t)&&Sn(t)==_},kr.isBuffer=Wo,kr.isDate=Yo,kr.isElement=function(t){return ta(t)&&1===t.nodeType&&!na(t)},kr.isEmpty=function(t){if(null==t)return!0;if(Go(t)&&(Ko(t)||"string"==typeof t||"function"==typeof t.splice||Wo(t)||ca(t)||Vo(t)))return!t.length;var e=ps(t);if(e==S||e==R)return!t.size;if(Es(t))return!Un(t).length;for(var r in t)if(Ut.call(t,r))return!1;return!0},kr.isEqual=function(t,e){return Tn(t,e)},kr.isEqualWith=function(e,r,n){var i=(n="function"==typeof n?n:t)?n(e,r):t;return i===t?Tn(e,r,t,n):!!i},kr.isError=Jo,kr.isFinite=function(t){return"number"==typeof t&&_e(t)},kr.isFunction=Xo,kr.isInteger=Zo,kr.isLength=Qo,kr.isMap=ea,kr.isMatch=function(t,e){return t===e||Nn(t,e,us(e))},kr.isMatchWith=function(e,r,n){return n="function"==typeof n?n:t,Nn(e,r,us(r),n)},kr.isNaN=function(t){return ra(t)&&t!=+t},kr.isNative=function(t){if(ws(t))throw new Ot("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xn(t)},kr.isNil=function(t){return null==t},kr.isNull=function(t){return null===t},kr.isNumber=ra,kr.isObject=$o,kr.isObjectLike=ta,kr.isPlainObject=na,kr.isRegExp=ia,kr.isSafeInteger=function(t){return Zo(t)&&t>=-h&&t<=h},kr.isSet=sa,kr.isString=oa,kr.isSymbol=aa,kr.isTypedArray=ca,kr.isUndefined=function(e){return e===t},kr.isWeakMap=function(t){return ta(t)&&ps(t)==N},kr.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==Sn(t)},kr.join=function(t,e){return null==t?"":ze.call(t,e)},kr.kebabCase=Ka,kr.last=Ys,kr.lastIndexOf=function(e,r,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==t&&(s=(s=pa(n))<0?yr(i+s,0):vr(s,i-1)),r===r?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(e,r,s):He(e,Be,s,!0)},kr.lowerCase=Ba,kr.lowerFirst=Ga,kr.lt=ua,kr.lte=ha,kr.max=function(e){return e&&e.length?dn(e,rc,In):t},kr.maxBy=function(e,r){return e&&e.length?dn(e,as(r,2),In):t},kr.mean=function(t){return Ge(t,rc)},kr.meanBy=function(t,e){return Ge(t,as(e,2))},kr.min=function(e){return e&&e.length?dn(e,rc,Dn):t},kr.minBy=function(e,r){return e&&e.length?dn(e,as(r,2),Dn):t},kr.stubArray=dc,kr.stubFalse=gc,kr.stubObject=function(){return{}},kr.stubString=function(){return""},kr.stubTrue=function(){return!0},kr.multiply=mc,kr.nth=function(e,r){return e&&e.length?Vn(e,pa(r)):t},kr.noConflict=function(){return de._===this&&(de._=qt),this},kr.noop=ac,kr.now=Io,kr.pad=function(t,e,r){t=va(t);var n=(e=pa(e))?lr(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Ki(ge(i),r)+t+Ki(pe(i),r)},kr.padEnd=function(t,e,r){t=va(t);var n=(e=pa(e))?lr(t):0;return e&&n<e?t+Ki(e-n,r):t},kr.padStart=function(t,e,r){t=va(t);var n=(e=pa(e))?lr(t):0;return e&&n<e?Ki(e-n,r)+t:t},kr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),_r(va(t).replace(st,""),e||0)},kr.random=function(e,r,n){if(n&&"boolean"!=typeof n&&bs(e,r,n)&&(r=n=t),n===t&&("boolean"==typeof r?(n=r,r=t):"boolean"==typeof e&&(n=e,e=t)),e===t&&r===t?(e=0,r=1):(e=fa(e),r===t?(r=e,e=0):r=fa(r)),e>r){var i=e;e=r,r=i}if(n||e%1||r%1){var s=mr();return vr(e+s*(r-e+he("1e-"+((s+"").length-1))),r)}return Wn(e,r)},kr.reduce=function(t,e,r){var n=Ko(t)?Me:Ye,i=arguments.length<3;return n(t,as(e,4),r,i,ln)},kr.reduceRight=function(t,e,r){var n=Ko(t)?De:Ye,i=arguments.length<3;return n(t,as(e,4),r,i,fn)},kr.repeat=function(e,r,n){return r=(n?bs(e,r,n):r===t)?1:pa(r),Yn(va(e),r)},kr.replace=function(){var t=arguments,e=va(t[0]);return t.length<3?e:e.replace(t[1],t[2])},kr.result=function(e,r,n){var i=-1,s=(r=bi(r,e)).length;for(s||(s=1,e=t);++i<s;){var o=null==e?t:e[Us(r[i])];o===t&&(i=s,o=n),e=Xo(o)?o.call(e):o}return e},kr.round=wc,kr.runInContext=p,kr.sample=function(t){return(Ko(t)?Jr:Xn)(t)},kr.size=function(t){if(null==t)return 0;if(Go(t))return oa(t)?lr(t):t.length;var e=ps(t);return e==S||e==R?t.size:Un(t).length},kr.snakeCase=Fa,kr.some=function(e,r,n){var i=Ko(e)?ke:ni;return n&&bs(e,r,n)&&(r=t),i(e,as(r,3))},kr.sortedIndex=function(t,e){return ii(t,e)},kr.sortedIndexBy=function(t,e,r){return si(t,e,as(r,2))},kr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ii(t,e);if(n<r&&zo(t[n],e))return n}return-1},kr.sortedLastIndex=function(t,e){return ii(t,e,!0)},kr.sortedLastIndexBy=function(t,e,r){return si(t,e,as(r,2),!0)},kr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ii(t,e,!0)-1;if(zo(t[r],e))return r}return-1},kr.startCase=Wa,kr.startsWith=function(t,e,r){return t=va(t),r=null==r?0:on(p
vendor: 4,333 bytes, line 2
2a(r),0,t.length),e=ci(e),t.slice(r,r+e.length)==e},kr.subtract=Ec,kr.sum=function(t){return t&&t.length?Je(t,rc):0},kr.sumBy=function(t,e){return t&&t.length?Je(t,as(e,2)):0},kr.template=function(e,r,n){var i=kr.templateSettings;n&&bs(e,r,n)&&(r=t),e=va(e),r=ma({},r,i,Zi);var s,o,a=ma({},r.imports,i.imports,Zi),c=Ca(a),u=$e(a,c),h=0,l=r.interpolate||wt,f="__p += '",p=Pt((r.escape||wt).source+"|"+l.source+"|"+(l===$?pt:wt).source+"|"+(r.evaluate||wt).source+"|$","g"),d="//# sourceURL="+(Ut.call(r,"sourceURL")?(r.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(p,(function(t,r,n,i,a,c){return n||(n=i),f+=e.slice(h,c).replace(Et,sr),r&&(s=!0,f+="' +\n__e("+r+") +\n'"),a&&(o=!0,f+="';\n"+a+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=c+t.length,t})),f+="';\n";var g=Ut.call(r,"variable")&&r.variable;if(g){if(lt.test(g))throw new Ot("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(o?f.replace(B,""):f).replace(G,"$1").replace(F,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=Za((function(){return St(c,d+"return "+f).apply(t,u)}));if(y.source=f,Jo(y))throw y;return y},kr.times=function(t,e){if((t=pa(t))<1||t>h)return[];var r=f,n=vr(t,f);e=as(e),t-=f;for(var i=Xe(n,e);++r<t;)e(r);return i},kr.toFinite=fa,kr.toInteger=pa,kr.toLength=da,kr.toLower=function(t){return va(t).toLowerCase()},kr.toNumber=ga,kr.toSafeInteger=function(t){return t?on(pa(t),-h,h):0===t?t:0},kr.toString=va,kr.toUpper=function(t){return va(t).toUpperCase()},kr.trim=function(e,r,n){if((e=va(e))&&(n||r===t))return Ze(e);if(!e||!(r=ci(r)))return e;var i=fr(e),s=fr(r);return mi(i,er(i,s),rr(i,s)+1).join("")},kr.trimEnd=function(e,r,n){if((e=va(e))&&(n||r===t))return e.slice(0,pr(e)+1);if(!e||!(r=ci(r)))return e;var i=fr(e);return mi(i,0,rr(i,fr(r))+1).join("")},kr.trimStart=function(e,r,n){if((e=va(e))&&(n||r===t))return e.replace(st,"");if(!e||!(r=ci(r)))return e;var i=fr(e);return mi(i,er(i,fr(r))).join("")},kr.truncate=function(e,r){var n=30,i="...";if($o(r)){var s="separator"in r?r.separator:s;n="length"in r?pa(r.length):n,i="omission"in r?ci(r.omission):i}var o=(e=va(e)).length;if(or(e)){var a=fr(e);o=a.length}if(n>=o)return e;var c=n-lr(i);if(c<1)return i;var u=a?mi(a,0,c).join(""):e.slice(0,c);if(s===t)return u+i;if(a&&(c+=u.length-c),ia(s)){if(e.slice(c).search(s)){var h,l=u;for(s.global||(s=Pt(s.source,va(dt.exec(s))+"g")),s.lastIndex=0;h=s.exec(l);)var f=h.index;u=u.slice(0,f===t?c:f)}}else if(e.indexOf(ci(s),c)!=c){var p=u.lastIndexOf(s);p>-1&&(u=u.slice(0,p))}return u+i},kr.unescape=function(t){return(t=va(t))&&J.test(t)?t.replace(W,dr):t},kr.uniqueId=function(t){var e=++Mt;return va(t)+e},kr.upperCase=Ya,kr.upperFirst=Ja,kr.each=vo,kr.eachRight=bo,kr.first=Bs,oc(kr,function(){var t={};return _n(kr,(function(e,r){Ut.call(kr.prototype,r)||(t[r]=e)})),t}(),{chain:!1}),kr.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){kr[t].placeholder=kr})),Ae(["drop","take"],(function(e,r){Vr.prototype[e]=function(n){n=n===t?1:yr(pa(n),0);var i=this.__filtered__&&!r?new Vr(this):this.clone();return i.__filtered__?i.__takeCount__=vr(n,i.__takeCount__):i.__views__.push({size:vr(n,f),type:e+(i.__dir__<0?"Right":"")}),i},Vr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Vr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:as(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),Ae(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Vr.prototype[t]=function(){return this[r](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Vr.prototype[t]=function(){return this.__filtered__?new Vr(this):this[r](1)}})),Vr.prototype.compact=function(){return this.filter(rc)},Vr.prototype.find=function(t){return this.filter(t).head()},Vr.prototype.findLast=function(t){return this.reverse().find(t)},Vr.prototype.invokeMap=Jn((function(t,e){return"function"==typeof t?new Vr(this):this.map((function(r){return Rn(r,t,e)}))}
2)),Vr.prototype.reject=function(t){return this.filter(Lo(as(t)))},Vr.prototype.slice=function(e,r){e=pa(e);var n=this;return n.__filtered__&&(e>0||r<0)?new Vr(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),r!==t&&(n=(r=pa(r))<0?n.dropRight(-r):n.take(r-e)),n)},Vr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Vr.prototype.toArray=function(){return this.take(f)},_n(Vr.prototype,(function(e,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),i=/^(?:head|last)$/.test(r),s=kr[i?"take"+("last"==r?"Right":""):r],o=i||/^find/.test(r);s&&(kr.prototype[r]=function(){var r=this.__wrapped__,a=i?[1]:arguments,c=r instanceof Vr,u=a[0],h=c||Ko(r),l=function(t){var e=s.apply(kr,Ue([t],a));return i&&f?e[0]:e};h&&n&&"function"==typeof u&&1!=u.length&&(c=h=!1);var f=this.__chain__,p=!!this.__actions__.length,d=o&&!f,g=c&&!p;if(!o&&h){r=g?r:new Vr(this);var y=e.apply(r,a);return y.__actions__.push({func:lo,args:[l],thisArg:t}),new Hr(y,f)}return d&&g?e.apply(this,a):(y=this.thru(l),d?i?y.value()[0]:y.value():y)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ct[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);kr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(Ko(i)?i:[],t)}return this[r]((function(r){return e.apply(Ko(r)?r:[],t)}))}})),_n(Vr.prototype,(function(t,e){var r=kr[e];if(r){var n=r.name+"";Ut.call(Rr,n)||(Rr[n]=[]),Rr[n].push({name:e,func:r})}})),Rr[zi(t,2).name]=[{name:"wrapper",func:t}],Vr.prototype.clone=function(){var t=new Vr(this.__wrapped__);return t.__actions__=Ai(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ai(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ai(this.__views__),t},Vr.prototype.reverse=function(){if(this.__filtered__){var t=new Vr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Vr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Ko(t),n=e<0,i=r?t.length:0,s=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var s=r[n],o=s.size;switch(s.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=vr(e,t+o);break;case"takeRight":t=yr(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=s.start,a=s.end,c=a-o,u=n?a:o-1,h=this.__iteratees__,l=h.length,f=0,p=vr(c,this.__takeCount__);if(!r||!n&&i==c&&p==c)return pi(t,this.__actions__);var d=[];t:for(;c--&&f<p;){for(var g=-1,y=t[u+=e];++g<l;){var v=h[g],b=v.iteratee,_=v.type,m=b(y);if(2==_)y=m;else if(!m){if(1==_)continue t;break t}}d[f++]=y}return d},kr.prototype.at=fo,kr.prototype.chain=function(){return ho(this)},kr.prototype.commit=function(){return new Hr(this.value(),this.__chain__)},kr.prototype.next=function(){this.__values__===t&&(this.__values__=la(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},kr.prototype.plant=function(e){for(var r,n=this;n instanceof qr;){var i=Ds(n);i.__index__=0,i.__values__=t,r?s.__wrapped__=i:r=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,r},kr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vr){var r=e;return this.__actions__.length&&(r=new Vr(this)),(r=r.reverse()).__actions__.push({func:lo,args:[Qs],thisArg:t}),new Hr(r,this.__chain__)}return this.thru(Qs)},kr.prototype.toJSON=kr.prototype.valueOf=kr.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},kr.prototype.first=kr.prototype.head,Zt&&(kr.prototype[Zt]=function(){return this}),kr}();ye?((ye.exports=gr)._=gr,ge._=gr):de._=gr}.call(g);var v=Object.defineProperty,b=Object.defineProperties,_=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,O=(t,e,r)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S=(t,e)=>{for(var r in e||(e={}))w.call(e,r)&&O(t,r,e[r]);if(m)for(var r of m(e))E.call(e,r)&&O(t,r,e[r]);return t},I=(t,e)=>b(t,_(e));function j(t,e,r){let n;const i=P(t);return e.rpcMap&&(n=e.rpcMap[i]),n||(n="".concat("https://rpc.walletconnect.com/v1","?chainId=eip155:").concat(i,"&projectId=").concat(r)),n}function P(t){return t.includes("eip155")?Number(t.split(":")[1]):Number(t)}function A(t){return t.map((t=>"".concat(t.split(":")[0],":").concat(t.split(":")[1])))}function R(t){var e,r,n,s;const o={};if(!Object(i.V)(t))return o;for(const[a,c]of Object.entries(t)){const t=Object(i.C)(a)?[a]:c.chains,u=c.methods||[],h=c.events||[],l=c.rpcMap||{},f=Object(i.jb)(a);o[f]=I(S(S({},o[f]),c),{chains:Object(i.gb)(t,null==(e=o[f])?void 0:e.chains),methods:Object(i.gb)(u,null==(r=o[f])?void 0:r.methods),events:Object(i.gb)(h,null==(n=o[f])?void 0:n.events),rpcMap:S(S({},l),null==(s=o[f])?void 0:s.rpcMap)})}return o}function C(t){return t.includes(":")?t.split(":")[2]:t}function T(t){const e={};for(const[r,n]of Object.entries(t)){const t=n.methods||[],s=n.events||[],o=n.accounts||[],a=Object(i.C)(r)?[r]:n.chains?n.chains:A(n.accounts);e[r]={chains:a,methods:t,events:s,accounts:o}}return e}const N={},x=t=>N[t],L=(t,e)=>{N[t]=e};class U{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=x("events"),this.client=x("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const r=e||j("".concat(this.name,":").concat(t),this.namespace);if(!r)throw new Error("No RPC url provided for chainId: ".concat(t));this.setHttpProvider(t,r)}this.events.emit(f,"".concat(this.name,":").concat(this.chainId))}getAccounts(){const t=this.namespace.accounts;return t&&t.filter((t=>t.split(":")[1]===this.chainId.toString())).map((t=>t.split(":")[2]))||[]}createHttpProviders(){const t={};return this.namespace.chains.forEach((e=>{var r;t[e]=this.createHttpProvider(e,null==(r=this.namespace.rpcMap)?void 0:r[e])})),t}getHttpProvider(){const t="".concat(this.name,":").concat(this.chainId),e=this.httpProviders[t];if(typeof e>"u")throw new Error("JSON-RPC provider for ".concat(t," not found"));return e}setHttpProvider(t,e){const r=this.createHttpProvider(t,e);r&&(this.httpProviders[t]=r)}createHttpProvider(t,e){const r=e||j(t,this.namespace);return typeof r>"u"?void 0:new a.a(new o.b(r,x("disableProviderPing")))}}class M{constructor(t){this.name="eip155",this.namespace=t.namespace,this.events=x("events"),this.client=x("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}async request(t){switch(t.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(t);case"eth_chainId":return parseInt(this.getDefaultChain())}return this.namespace.methods.includes(t.request.method)?await this.client.request(t):this.getHttpProvider().request(t.request)}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,e){const r=P(t);if(!this.httpProviders[r]){const t=e||j("".concat(this.name,":").concat(r),this.namespace,this.client.core.projectId);if(!t)throw new Error("No RPC url provided for chainId: ".concat(r));this.setHttpProvider(r,t)}this.chainId=r,this.events.emit(f,"".concat(this.name,":").concat(r))}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,e){const r=e||j("".concat(this.name,":").concat(t),this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new a.a(new o.a(r,x("disableProviderPing")))}setHttpProvider(t,e){const r=this.createHttpProvider(t,e);r&&(this.httpProviders[t]=r)}createHttpProviders(){const t={};return this.namespace.chains.forEach((e=>{var r;const n=P(e);t[n]=this.createHttpProvider(n,null==(r=this.namespace.rpcMap)?void 0:r[e])})),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter((t=>t.split(":")[1]===this.chainId.toString())).map((t=>t.split(":")[2])))]:[]}getHttpProvider(){const t=this.chainId,e=this.httpProviders[t];if(typeof e>"u")throw new Error("JSON-RPC provider for ".concat(t," not found"));return e}async handleSwitchChain(t){var e,r;let n=t.request.params?null==(e=t.request.params[0])?void 0:e.chainId:"0x0";n=n.startsWith("0x")?n:"0x".concat(n);const i=parseInt(n,16);if(this.isChainApproved(i))this.setDefaultChain("".concat(i));else{if(!this.namespace.methods.includes("wallet_switchEthereumChain"))throw new Error("Failed to switch to chain 'eip155:".concat(i,"'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method."));
2await this.client.request({topic:t.topic,request:{method:t.request.method,params:[{chainId:n}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain("".concat(i))}return null}isChainApproved(t){return this.namespace.chains.includes("".concat(this.name,":").concat(t))}}class D{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=x("events"),this.client=x("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const r=e||j("".concat(this.name,":").concat(t),this.namespace,this.client.core.projectId);if(!r)throw new Error("No RPC url provided for chainId: ".concat(t));this.setHttpProvider(t,r)}this.chainId=t,this.events.emit(f,"".concat(this.name,":").concat(this.chainId))}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter((t=>t.split(":")[1]===this.chainId.toString())).map((t=>t.split(":")[2])))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach((e=>{var r;t[e]=this.createHttpProvider(e,null==(r=this.namespace.rpcMap)?void 0:r[e])})),t}getHttpProvider(){const t="".concat(this.name,":").concat(this.chainId),e=this.httpProviders[t];if(typeof e>"u")throw new Error("JSON-RPC provider for ".concat(t," not found"));return e}setHttpProvider(t,e){const r=this.createHttpProvider(t,e);r&&(this.httpProviders[t]=r)}createHttpProvider(t,e){const r=e||j(t,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new a.a(new o.b(r,x("disableProviderPing")))}}class k{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=x("events"),this.client=x("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const r=e||j("".concat(this.name,":").concat(t),this.namespace,this.client.core.projectId);if(!r)throw new Error("No RPC url provided for chainId: ".concat(t));this.setHttpProvider(t,r)}this.events.emit(f,"".concat(this.name,":").concat(this.chainId))}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter((t=>t.split(":")[1]===this.chainId.toString())).map((t=>t.split(":")[2])))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach((e=>{var r;t[e]=this.createHttpProvider(e,null==(r=this.namespace.rpcMap)?void 0:r[e])})),t}getHttpProvider(){const t="".concat(this.name,":").concat(this.chainId),e=this.httpProviders[t];if(typeof e>"u")throw new Error("JSON-RPC provider for ".concat(t," not found"));return e}setHttpProvider(t,e){const r=this.createHttpProvider(t,e);r&&(this.httpProviders[t]=r)}createHttpProvider(t,e){const r=e||j(t,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new a.a(new o.b(r,x("disableProviderPing")))}}class z{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=x("events"),this.client=x("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(this.chainId=t,!this.httpProviders[t]){const r=e||this.getCardanoRPCUrl(t);if(!r)throw new Error("No RPC url provided for chainId: ".concat(t));this.setHttpProvider(t,r)}this.events.emit(f,"".concat(this.name,":").concat(this.chainId))}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter((t=>t.split(":")[1]===this.chainId.toString())).map((t=>t.split(":")[2])))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach((e=>{const r=this.getCardanoRPCUrl(e);t[e]=this.createHttpProvider(e,r)})),t}getHttpProvider(){const t="".concat(this.name,":").concat(this.chainId),e=this.httpProviders[t];if(typeof e>"u")throw new Error("JSON-RPC provider for ".concat(t," not found"));return e}getCardanoRPCUrl(t){const e=this.namespace.rpcMap;if(e)return e[t]}setHttpProvider(t,e){const r=this.createHttpProvider(t,e);r&&(this.httpProviders[t]=r)}createHttpProvider(t,e){const r=e||this.getCardanoRPCUrl(t);return typeof r>"u"?void 0:new a.a(new o.b(r,x("disableProviderPing")))}}class q{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=x("events"),this.client=x("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const r=e||j("".concat(this.name,":").concat(t),this.namespace,this.client.core.projectId);if(!r)throw new Error("No RPC url provided for chainId: ".concat(t));this.setHttpProvider(t,r)}this.chainId=t,this.events.emit(f,"".concat(this.name,":").concat(this.chainId))}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter((t=>t.split(":")[1]===this.chainId.toString())).map((t=>t.split(":")[2])))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach((e=>{var r;t[e]=this.createHttpProvider(e,null==(r=this.namespace.rpcMap)?void 0:r[e])})),t}getHttpProvider(){const t="".concat(this.name,":").concat(this.chainId),e=this.httpProviders[t];if(typeof e>"u")throw new Error("JSON-RPC provider for ".concat(t," not found"));return e}setHttpProvider(t,e){const r=this.createHttpProvider(t,e);r&&(this.httpProviders[t]=r)}createHttpProvider(t,e){const r=e||j(t,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new a.a(new o.b(r,x("disableProviderPing")))}}class H{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=x("events"),this.client=x("client"),this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?this.client.request(t):this.getHttpProvider().request(t.request)}setDefaultChain(t,e){if(!this.httpProviders[t]){const r=e||j("".concat(this.name,":").concat(t),this.namespace,this.client.core.projectId);if(!r)throw new Error("No RPC url provided for chainId: ".concat(t));this.setHttpProvider(t,r)}this.chainId=t,this.events.emit(f,"".concat(this.name,":").concat(this.chainId))}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter((t=>t.split(":")[1]===this.chainId.toString())).map((t=>t.split(":")[2])))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach((e=>{var r;t[e]=this.createHttpProvider(e,null==(r=this.namespace.rpcMap)?void 0:r[e])})),t}getHttpProvider(){const t="".concat(this.name,":").concat(this.chainId),e=this.httpProviders[t];if(typeof e>"u")throw new Error("JSON-RPC provider for ".concat(t," not found"));return e}setHttpProvider(t,e){const r=this.createHttpProvider(t,e);r&&(this.httpProviders[t]=r)}createHttpProvider(t,e){const r=e||j(t,this.namespace,this.client.core.projectId);return typeof r>"u"?void 0:new a.a(new o.b(r,x("disableProviderPing")))}}var V=Object.defineProperty,K=Object.defineProperties,B=Object.getOwnPropertyDescriptors,G=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,Y=(t,e,r)=>e in t?V(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,J=(t,e)=>{for(var r in e||(e={}))F.call(e,r)&&Y(t,r,e[r]);if(G)for(var r of G(e))W.call(e,r)&&Y(t,r,e[r]);return t},X=(t,e)=>K(t,B(e));class Z{constructor(t){this.events=new u.a,this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.disableProviderPing=!1,this.providerOpts=t,this.logger=typeof(null===t||void 0===t?void 0:t.logger)<"u"&&"string"!=typeof(null===t||void 0===t?void 0:t.logger)?t.logger:Object(s.pino)(Object(s.getDefaultLoggerOptions)({level:(null===t||void 0===t?void 0:t.logger)||h})),this.disableProviderPing=(null===t||void 0===t?void 0:t.disableProviderPing)||!1}static async init(t){const e=new Z(t);return await e.initialize(),e}async request(t,e){const[r,n]=this.validateChain(e);if(!this.session)throw new Error("Please call connect() before request()");return await this.getProvider(r).request({request:J({},t),chainId:"".concat(r,":").concat(n),topic:this.session.topic})}sendAsync(t,e,r){this.request(t,r).then((t=>e(null,t))).catch((t=>e(t,void 0)))}async enable(){if(!this.client)throw new Error("Sign Client not initialized");
2return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties}),await this.requestAccounts()}async disconnect(){var t;if(!this.session)throw new Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(t=this.session)?void 0:t.topic,reason:Object(i.x)("USER_DISCONNECTED")}),await this.cleanup()}async connect(t){if(!this.client)throw new Error("Sign Client not initialized");if(this.setNamespaces(t),await this.cleanupPendingPairings(),!t.skipPairing)return await this.pair(t.pairingTopic)}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}removeListener(t,e){this.events.removeListener(t,e)}off(t,e){this.events.off(t,e)}get isWalletConnect(){return!0}async pair(t){this.shouldAbortPairingAttempt=!1;let e=0;do{if(this.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(e>=this.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:r,approval:i}=await this.client.connect({pairingTopic:t,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties});r&&(this.uri=r,this.events.emit("display_uri",r)),await i().then((t=>{this.session=t,this.namespaces||(this.namespaces=T(t.namespaces),this.persist("namespaces",this.namespaces))})).catch((t=>{if(t.message!==n.a)throw t;e++}))}while(!this.session);return this.onConnect(),this.session}setDefaultChain(t,e){try{if(!this.session)return;const[r,n]=this.validateChain(t);this.getProvider(r).setDefaultChain(n,e)}catch(r){if(!/Please call connect/.test(r.message))throw r}}async cleanupPendingPairings(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger.info("Cleaning up inactive pairings...");const e=this.client.pairing.getAll();if(Object(i.M)(e)){for(const r of e)t.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info("Inactive pairings cleared: ".concat(e.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 t=this.client.session.keys.length-1;this.session=this.client.session.get(this.client.session.keys[t]),this.createProviders()}}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){this.client=this.providerOpts.client||await n.b.init({logger:this.providerOpts.logger||h,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,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 t=[...new Set(Object.keys(this.session.namespaces).map((t=>Object(i.jb)(t))))];L("client",this.client),L("events",this.events),L("disableProviderPing",this.disableProviderPing),t.forEach((t=>{if(!this.session)return;const e=function(t,e){const r=Object.keys(e.namespaces).filter((e=>e.includes(t)));if(!r.length)return[];const n=[];return r.forEach((t=>{const r=e.namespaces[t].accounts;n.push(...r)})),n}(t,this.session),r=A(e),n=function(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const e=R(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),r=R(t);return y.exports.merge(e,r)}(this.namespaces,this.optionalNamespaces),i=X(J({},n[t]),{accounts:e,chains:r});switch(t){case"eip155":this.rpcProviders[t]=new M({namespace:i});break;case"solana":this.rpcProviders[t]=new D({namespace:i});break;case"cosmos":this.rpcProviders[t]=new k({namespace:i});break;case"polkadot":this.rpcProviders[t]=new U({namespace:i});break;case"cip34":this.rpcProviders[t]=new z({namespace:i});break;case"elrond":this.rpcProviders[t]=new q({namespace:i});break;case"multiversx":this.rpcProviders[t]=new H({namespace:i})}}))}registerEventListeners(){if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",(t=>{this.events.emit("session_ping",t)})),this.client.on("session_event",(t=>{const{params:e}=t,{event:r}=e;
2if("accountsChanged"===r.name){const t=r.data;t&&Object(i.M)(t)&&this.events.emit("accountsChanged",t.map(C))}else"chainChanged"===r.name?this.onChainChanged(e.chainId):this.events.emit(r.name,r.data);this.events.emit("session_event",t)})),this.client.on("session_update",(t=>{let{topic:e,params:r}=t;var n;const{namespaces:i}=r,s=null==(n=this.client)?void 0:n.session.get(e);this.session=X(J({},s),{namespaces:i}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:r})})),this.client.on("session_delete",(async t=>{await this.cleanup(),this.events.emit("session_delete",t),this.events.emit("disconnect",X(J({},Object(i.x)("USER_DISCONNECTED")),{data:t.topic}))})),this.on(f,(t=>{this.onChainChanged(t,!0)}))}getProvider(t){if(!this.rpcProviders[t])throw new Error("Provider not found: ".concat(t));return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach((t=>{var e;this.getProvider(t).updateNamespace(null==(e=this.session)?void 0:e.namespaces[t])}))}setNamespaces(t){const{namespaces:e,optionalNamespaces:r,sessionProperties:n}=t;e&&Object.keys(e).length&&(this.namespaces=e),r&&Object.keys(r).length&&(this.optionalNamespaces=r),this.sessionProperties=n,this.persist("namespaces",e),this.persist("optionalNamespaces",r)}validateChain(t){const[e,r]=(null===t||void 0===t?void 0:t.split(":"))||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[e,r];if(e&&!Object.keys(this.namespaces||{}).map((t=>Object(i.jb)(t))).includes(e))throw new Error("Namespace '".concat(e,"' is not configured. Please call connect() first with namespace config."));if(e&&r)return[e,r];const n=Object(i.jb)(Object.keys(this.namespaces)[0]);return[n,this.rpcProviders[n].getDefaultChain()]}async requestAccounts(){const[t]=this.validateChain();return await this.getProvider(t).requestAccounts()}onChainChanged(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var r;if(!this.namespaces)return;const[n,i]=this.validateChain(t);e||this.getProvider(n).setDefaultChain(i),(null!=(r=this.namespaces[n])?r:this.namespaces["".concat(n,":").concat(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(t,e){this.client.core.storage.setItem("".concat(l,"/").concat(t),e)}async getFromStore(t){return await this.client.core.storage.getItem("".concat(l,"/").concat(t))}}const Q=Z}).call(this,r(72))},1313:function(t,e,r){"use strict";r.r(e),r.d(e,"__extends",(function(){return i})),r.d(e,"__assign",(function(){return s})),r.d(e,"__rest",(function(){return o})),r.d(e,"__decorate",(function(){return a})),r.d(e,"__param",(function(){return c})),r.d(e,"__metadata",(function(){return u})),r.d(e,"__awaiter",(function(){return h})),r.d(e,"__generator",(function(){return l})),r.d(e,"__createBinding",(function(){return f})),r.d(e,"__exportStar",(function(){return p})),r.d(e,"__values",(function(){return d})),r.d(e,"__read",(function(){return g})),r.d(e,"__spread",(function(){return y})),r.d(e,"__spreadArrays",(function(){return v})),r.d(e,"__await",(function(){return b})),r.d(e,"__asyncGenerator",(function(){return _})),r.d(e,"__asyncDelegator",(function(){return m})),r.d(e,"__asyncValues",(function(){return w}
2)),r.d(e,"__makeTemplateObject",(function(){return E})),r.d(e,"__importStar",(function(){return O})),r.d(e,"__importDefault",(function(){return S})),r.d(e,"__classPrivateFieldGet",(function(){return I})),r.d(e,"__classPrivateFieldSet",(function(){return j}));var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var s=function(){return s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)};function o(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function a(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function c(t,e){return function(r,n){e(r,n,t)}}function u(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{c(n.next(t))}catch(e){s(e)}}function a(t){try{c(n.throw(t))}catch(e){s(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}c((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(a){s=[6,a],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function f(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}function p(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||(e[r]=t[r])}function d(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function v(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function b(t){return this instanceof b?(this.v=t,this):new b(t)}function _(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),s=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){
2s.push([t,e,r,n])>1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(c,u):h(s[0][2],r)}catch(n){h(s[0][3],n)}var r}function c(t){a("next",t)}function u(t){a("throw",t)}function h(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}}function m(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=d(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function E(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function O(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}function I(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function j(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},1314:function(t,e,r){"use strict";const n=r(1315);t.exports=o;const i=function(){function t(t){return"undefined"!==typeof t&&t}try{return"undefined"!==typeof globalThis||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(e){return t(self)||t(window)||t(this)||{}}}().console||{},s={mapHttpRequest:f,mapHttpResponse:f,wrapRequestSerializer:p,wrapResponseSerializer:p,wrapErrorSerializer:p,req:f,res:f,err:function(t){const e={type:t.constructor.name,msg:t.message,stack:t.stack};for(const r in t)void 0===e[r]&&(e[r]=t[r]);return e}};function o(t){(t=t||{}).browser=t.browser||{};const e=t.browser.transmit;if(e&&"function"!==typeof e.send)throw Error("pino: transmit option must have a send function");const r=t.browser.write||i;t.browser.write&&(t.browser.asObject=!0);const n=t.serializers||{},s=function(t,e){if(Array.isArray(t))return t.filter((function(t){return"!stdSerializers.err"!==t}));return!0===t&&Object.keys(e)}(t.browser.serialize,n);let f=t.browser.serialize;Array.isArray(t.browser.serialize)&&t.browser.serialize.indexOf("!stdSerializers.err")>-1&&(f=!1);"function"===typeof r&&(r.error=r.fatal=r.warn=r.info=r.debug=r.trace=r),!1===t.enabled&&(t.level="silent");const p=t.level||"info",g=Object.create(r);g.log||(g.log=d),Object.defineProperty(g,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(g,"level",{get:function(){return this._level},set:function(t){if("silent"!==t&&!this.levels.values[t])throw Error("unknown level "+t);this._level=t,a(y,g,"error","log"),a(y,g,"fatal","error"),a(y,g,"warn","error"),a(y,g,"info","log"),a(y,g,"debug","log"),a(y,g,"trace","log")}});const y={transmit:e,serialize:s,asObject:t.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:l(t)};return g.levels=o.levels,g.level=p,g.setMaxListeners=g.getMaxListeners=g.emit=g.addListener=g.on=g.prependListener=g.once=g.prependOnceListener=g.removeListener=g.removeAllListeners=g.listeners=g.listenerCount=g.eventNames=g.write=g.flush=d,g.serializers=n,g._serialize=s,g._stdErrSerialize=f,g.child=function(r,i){if(!r)throw new Error("missing bindings for child Pino");i=i||{},s&&r.serializers&&(i.serializers=r.serializers);const o=i.serializers;if(s&&o){var a=Object.assign({},n,o),l=!0===t.browser.serialize?Object.keys(a):s;delete r.serializers,c([r],l,a,this._stdErrSerialize)}function f(t){this._childLevel=1+(0|t._childLevel),this.error=u(t,r,"error"),this.fatal=u(t,r,"fatal"),this.warn=u(t,r,"warn"),this.info=u(t,r,"info"),this.debug=u(t,r,"debug"),this.trace=u(t,r,"trace"),a&&(this.serializers=a,this._serialize=l),e&&(this._logEvent=h([].concat(t._logEvent.bindings,r)))}return f.prototype=this,new f(this)},e&&(g._logEvent=h()),g}function a(t,e,r,s){const a=Object.getPrototypeOf(e);e[r]=e.levelVal>e.levels.values[r]?d:a[r]?a[r]:i[r]||i[s]||d,function(t,e,r){if(!t.transmit&&e[r]===d)return;e[r]=(s=e[r],function(){const a=t.timestamp(),u=new Array(arguments.length),l=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var f=0;f<u.length;f++)u[f]=arguments[f];if(t.serialize&&!t.asObject&&c(u,this._serialize,this.serializers,this._stdErrSerialize),t.asObject?s.call(l,function(t,e,r,i){t._serialize&&c(r,t._serialize,t.serializers,t._stdErrSerialize);const s=r.slice();let a=s[0];const u={};i&&(u.time=i),u.level=o.levels.values[e];let h=1+(0|t._childLevel);if(h<1&&(h=1),null!==a&&"object"===typeof a){for(;h--&&"object"===typeof s[0];)Object.assign(u,s.shift());a=s.length?n(s.shift(),s):void 0}else"string"===typeof a&&(a=n(s.shift(),s));return void 0!==a&&(u.msg=a),u}(this,r,u,a)):s.apply(l,u),t.transmit){const n=t.transmit.level||e.level,i=o.levels.values[n],s=o.levels.values[r];if(s<i)return;!function(t,e,r){const n=e.send,i=e.ts,s=e.methodLevel,o=e.methodValue,a=e.val,u=t._logEvent.bindings;c(r,t._serialize||Object.keys(t.serializers),t.serializers,void 0===t._stdErrSerialize||t._stdErrSerialize),t._logEvent.ts=i,t._logEvent.messages=r.filter((function(t){return-1===u.indexOf(t)})),t._logEvent.level.label=s,t._logEvent.level.value=o,n(s,t._logEvent,a),t._logEvent=h(u)}(this,{ts:a,methodLevel:r,methodValue:s,transmitLevel:n,transmitValue:o.levels.values[t.transmit.level||e.level],send:t.transmit.send,val:e.levelVal},u)}});var s}(t,e,r)}function c(t,e,r,n){for(const i in t)if(n&&t[i]instanceof Error)t[i]=o.stdSerializers.err(t[i]);else if("object"===typeof t[i]&&!Array.isArray(t[i]))for(const n in t[i])e&&e.indexOf(n)>-1&&n in r&&(t[i][n]=r[n](t[i][n]))}function u(t,e,r){return function(){const n=new Array(1+arguments.length);n[0]=e;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return t[r].apply(this,n)}}function h(t){return{ts:0,messages:[],bindings:t||[],level:{label:"",value:0}}}function l(t){return"function"===typeof t.timestamp?t.timestamp:!1===t.timestamp?g:y}function f(){return{}}function p(t){return t}function d(){}function g(){return!1}function y(){return Date.now()}o.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"}},o.stdSerializers=s,o.stdTimeFunctions=Object.assign({},{nullTime:g,epochTime:y,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})},1315:function(t,e,r){"use strict";function n(t){try{return JSON.stringify(t)}catch(e){return'"[Circular]"'}}t.exports=function(t,e,r){var i=r&&r.stringify||n;if("object"===typeof t&&null!==t){var s=e.length+1;if(1===s)return t;var o=new Array(s);o[0]=i(t);for(var a=1;a<s;a++)o[a]=i(e[a]);return o.join(" ")}if("string"!==typeof t)return t;var c=e.length;if(0===c)return t;for(var u="",h=0,l=-1,f=t&&t.length||0,p=0;p<f;){if(37===t.charCodeAt(p)&&p+1<f){switch(l=l>-1?l:0,t.charCodeAt(p+1)){case 100:case 102:if(h>=c)break;if(null==e[h])break;l<p&&(u+=t.slice(l,p)),u+=Number(e[h]),l=p+2,p++;break;case 105:if(h>=c)break;if(null==e[h])break;l<p&&(u+=t.slice(l,p)),u+=Math.floor(Number(e[h])),l=p+2,p++;break;case 79:case 111:case 106:if(h>=c)break;if(void 0===e[h])break;l<p&&(u+=t.slice(l,p));var d=typeof e[h];if("string"===d){u+="'"+e[h]+"'",l=p+2,p++;break}if("function"===d){u+=e[h].name||"<anonymous>",l=p+2,p++;break}u+=i(e[h]),l=p+2,p++;break;case 115:if(h>=c)break;l<p&&(u+=t.slice(l,p)),u+=String(e[h]),l=p+2,p++;break;case 37:l<p&&(u+=t.slice(l,p)),u+="%",l=p+2,p++,h--}++h}++p}if(-1===l)return t;l<f&&(u+=t.slice(l));return u}},1316:function(t,e,r){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.generateChildLogger=e.formatChildLoggerContext=e.getLoggerContext=e.setBrowserLoggerContext=e.getBrowserLoggerContext=e.getDefaultLoggerOptions=void 0;const n=r(1014);function i(t){return t[arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.PINO_CUSTOM_CONTEXT_KEY]||""}function s(t,e){return t[arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY]=e,t}function o(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.PINO_CUSTOM_CONTEXT_KEY,r="";return r="undefined"===typeof t.bindings?i(t,e):t.bindings().context||"",r}function a(t,e){const r=o(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY);return r.trim()?"".concat(r,"/").concat(e):e}e.getDefaultLoggerOptions=function(t){return Object.assign(Object.assign({},t),{level:(null===t||void 0===t?void 0:t.level)||n.PINO_LOGGER_DEFAULTS.level})},e.getBrowserLoggerContext=i,e.setBrowserLoggerContext=s,e.getLoggerContext=o,e.formatChildLoggerContext=a,e.generateChildLogger=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.PINO_CUSTOM_CONTEXT_KEY;const i=a(t,e,r);return s(t.child({context:i}),i,r)}},1320:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1321),i=r(1323),s=r(652),o=r(723),a=r(852);e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var c=new Uint8Array(16),u=function(){function t(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 t.prototype.seal=function(t,e,r,i){if(t.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var o=new Uint8Array(16);o.set(t,o.length-t.length);var a=new Uint8Array(32);n.stream(this._key,o,a,4);var c,u=e.length+this.tagLength;if(i){if(i.length!==u)throw new Error("ChaCha20Poly1305: incorrect destination length");c=i}else c=new Uint8Array(u);return n.streamXOR(this._key,o,e,c,4),this._authenticate(c.subarray(c.length-this.tagLength,c.length),a,c.subarray(0,c.length-this.tagLength),r),s.wipe(o),c},t.prototype.open=function(t,e,r,i){if(t.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(e.length<this.tagLength)return null;var o=new Uint8Array(16);o.set(t,o.length-t.length);var c=new Uint8Array(32);n.stream(this._key,o,c,4);var u=new Uint8Array(this.tagLength);if(this._authenticate(u,c,e.subarray(0,e.length-this.tagLength),r),!a.equal(u,e.subarray(e.length-this.tagLength,e.length)))return null;var h,l=e.length-this.tagLength;if(i){if(i.length!==l)throw new Error("ChaCha20Poly1305: incorrect destination length");h=i}else h=new Uint8Array(l);return n.streamXOR(this._key,o,e.subarray(0,e.length-this.tagLength),h,4),s.wipe(o),h},t.prototype.clean=function(){return s.wipe(this._key),this},t.prototype._authenticate=function(t,e,r,n){var a=new i.Poly1305(e);n&&(a.update(n),n.length%16>0&&a.update(c.subarray(n.length%16))),a.update(r),r.length%16>0&&a.update(c.subarray(r.length%16));var u=new Uint8Array(8);n&&o.writeUint64LE(n.length,u),a.update(u),o.writeUint64LE(r.length,u),a.update(u);for(var h=a.digest(),l=0;l<h.length;l++)t[l]=h[l];a.clean(),s.wipe(h),s.wipe(u)},t}();e.ChaCha20Poly1305=u},1321:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(723),i=r(652),s=20;function o(t,e,r){for(var i=1634760805,o=857760878,a=2036477234,c=1797285236,u=r[3]<<24|r[2]<<16|r[1]<<8|r[0],h=r[7]<<24|r[6]<<16|r[5]<<8|r[4],l=r[11]<<24|r[10]<<16|r[9]<<8|r[8],f=r[15]<<24|r[14]<<16|r[13]<<8|r[12],p=r[19]<<24|r[18]<<16|r[17]<<8|r[16],d=r[23]<<24|r[22]<<16|r[21]<<8|r[20],g=r[27]<<24|r[26]<<16|r[25]<<8|r[24],y=r[31]<<24|r[30]<<16|r[29]<<8|r[28],v=e[3]<<24|e[2]<<16|e[1]<<8|e[0],b=e[7]<<24|e[6]<<16|e[5]<<8|e[4],_=e[11]<<24|e[10]<<16|e[9]<<8|e[8],m=e[15]<<24|e[14]<<16|e[13]<<8|e[12],w=i,E=o,O=a,S=c,I=u,j=h,P=l,A=f,R=p,C=d,T=g,N=y,x=v,L=b,U=_,M=m,D=0;D<s;D+=2)I=(I^=R=R+(x=(x^=w=w+I|0)>>>16|x<<16)|0)>>>20|I<<12,j=(j^=C=C+(L=(L^=E=E+j|0)>>>16|L<<16)|0)>>>20|j<<12,P=(P^=T=T+(U=(U^=O=O+P|0)>>>16|U<<16)|0)>>>20|P<<12,A=(A^=N=N+(M=(M^=S=S+A|0)>>>16|M<<16)|0)>>>20|A<<12,P=(P^=T=T+(U=(U^=O=O+P|0)>>>24|U<<8)|0)>>>25|P<<7,A=(A^=N=N+(M=(M^=S=S+A|0)>>>24|M<<8)|0)>>>25|A<<7,j=(j^=C=C+(L=(L^=E=E+j|0)>>>24|L<<8)|0)>>>25|j<<7,I=(I^=R=R+(x=(x^=w=w+I|0)>>>24|x<<8)|0)>>>25|I<<7,j=(j^=T=T+(M=(M^=w=w+j|0)>>>16|M<<16)|0)>>>20|j<<12,P=(P^=N=N+(x=(x^=E=E+P|0)>>>16|x<<16)|0)>>>20|P<<12,A=(A^=R=R+(L=(L^=O=O+A|0)>>>16|L<<16)|0)>>>20|A<<12,I=(I^=C=C+(U=(U^=S=S+I|0)>>>16|U<<16)|0)>>>20|I<<12,A=(A^=R=R+(L=(L^=O=O+A|0)>>>24|L<<8)|0)>>>25|A<<7,I=(I^=C=C+(U=(U^=S=S+I|0)>>>24|U<<8)|0)>>>25|I<<7,P=(P^=N=N+(x=(x^=E=E+P|0)>>>24|x<<8)|0)>>>25|P<<7,j=(j^=T=T+(M=(M^=w=w+j|0)>>>24|M<<8)|0)>>>25|j<<7;n.writeUint32LE(w+i|0,t,0),n.writeUint32LE(E+o|0,t,4),n.writeUint32LE(O+a|0,t,8),n.writeUint32LE(S+c|0,t,12),n.writeUint32LE(I+u|0,t,16),n.writeUint32LE(j+h|0,t,20),n.writeUint32LE(P+l|0,t,24),n.writeUint32LE(A+f|0,t,28),n.writeUint32LE(R+p|0,t,32),n.writeUint32LE(C+d|0,t,36),n.writeUint32LE(T+g|0,t,40),n.writeUint32LE(N+y|0,t,44),n.writeUint32LE(x+v|0,t,48),n.writeUint32LE(L+b|0,t,52),n.writeUint32LE(U+_|
20,t,56),n.writeUint32LE(M+m|0,t,60)}function a(t,e,r,n,s){if(void 0===s&&(s=0),32!==t.length)throw new Error("ChaCha: key size must be 32 bytes");if(n.length<r.length)throw new Error("ChaCha: destination is shorter than source");var a,u;if(0===s){if(8!==e.length&&12!==e.length)throw new Error("ChaCha nonce must be 8 or 12 bytes");u=(a=new Uint8Array(16)).length-e.length,a.set(e,u)}else{if(16!==e.length)throw new Error("ChaCha nonce with counter must be 16 bytes");a=e,u=s}for(var h=new Uint8Array(64),l=0;l<r.length;l+=64){o(h,a,t);for(var f=l;f<l+64&&f<r.length;f++)n[f]=r[f]^h[f-l];c(a,0,u)}return i.wipe(h),0===s&&i.wipe(a),n}function c(t,e,r){for(var n=1;r--;)n=n+(255&t[e])|0,t[e]=255&n,n>>>=8,e++;if(n>0)throw new Error("ChaCha: counter overflow")}e.streamXOR=a,e.stream=function(t,e,r,n){return void 0===n&&(n=0),i.wipe(r),a(t,e,r,r,n)}},1322:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(t,e){var r=65535&t,n=65535&e;return r*n+((t>>>16&65535)*n+r*(e>>>16&65535)<<16>>>0)|0},e.add=function(t,e){return t+e|0},e.sub=function(t,e){return t-e|0},e.rotl=function(t,e){return t<<e|t>>>32-e},e.rotr=function(t,e){return t<<32-e|t>>>e},e.isInteger=Number.isInteger||function(t){return"number"===typeof t&&isFinite(t)&&Math.floor(t)===t},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}},1323:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(852),i=r(652);e.DIGEST_LENGTH=16;var s=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 r=t[0]|t[1]<<8;this._r[0]=8191&r;var n=t[2]|t[3]<<8;this._r[1]=8191&(r>>>13|n<<3);var i=t[4]|t[5]<<8;this._r[2]=7939&(n>>>10|i<<6);var s=t[6]|t[7]<<8;this._r[3]=8191&(i>>>7|s<<9);var o=t[8]|t[9]<<8;this._r[4]=255&(s>>>4|o<<12),this._r[5]=o>>>1&8190;var a=t[10]|t[11]<<8;this._r[6]=8191&(o>>>14|a<<2);var c=t[12]|t[13]<<8;this._r[7]=8065&(a>>>11|c<<5);var u=t[14]|t[15]<<8;this._r[8]=8191&(c>>>8|u<<8),this._r[9]=u>>>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(t,e,r){for(var n=this._fin?0:2048,i=this._h[0],s=this._h[1],o=this._h[2],a=this._h[3],c=this._h[4],u=this._h[5],h=this._h[6],l=this._h[7],f=this._h[8],p=this._h[9],d=this._r[0],g=this._r[1],y=this._r[2],v=this._r[3],b=this._r[4],_=this._r[5],m=this._r[6],w=this._r[7],E=this._r[8],O=this._r[9];r>=16;){var S=t[e+0]|t[e+1]<<8;i+=8191&S;var I=t[e+2]|t[e+3]<<8;s+=8191&(S>>>13|I<<3);var j=t[e+4]|t[e+5]<<8;o+=8191&(I>>>10|j<<6);var P=t[e+6]|t[e+7]<<8;a+=8191&(j>>>7|P<<9);var A=t[e+8]|t[e+9]<<8;c+=8191&(P>>>4|A<<12),u+=A>>>1&8191;var R=t[e+10]|t[e+11]<<8;h+=8191&(A>>>14|R<<2);var C=t[e+12]|t[e+13]<<8;l+=8191&(R>>>11|C<<5);var T=t[e+14]|t[e+15]<<8,N=0,x=N;x+=i*d,x+=s*(5*O),x+=o*(5*E),x+=a*(5*w),N=(x+=c*(5*m))>>>13,x&=8191,x+=u*(5*_),x+=h*(5*b),x+=l*(5*v),x+=(f+=8191&(C>>>8|T<<8))*(5*y);var L=N+=(x+=(p+=T>>>5|n)*(5*g))>>>13;L+=i*g,L+=s*d,L+=o*(5*O),L+=a*(5*E),N=(L+=c*(5*w))>>>13,L&=8191,L+=u*(5*m),L+=h*(5*_),L+=l*(5*b),L+=f*(5*v),N+=(L+=p*(5*y))>>>13,L&=8191;var U=N;U+=i*y,U+=s*g,U+=o*d,U+=a*(5*O),N=(U+=c*(5*E))>>>13,U&=8191,U+=u*(5*w),U+=h*(5*m),U+=l*(5*_),U+=f*(5*b);var M=N+=(U+=p*(5*v))>>>13;M+=i*v,M+=s*y,M+=o*g,M+=a*d,N=(M+=c*(5*O))>>>13,M&=8191,M+=u*(5*E),M+=h*(5*w),M+=l*(5*m),M+=f*(5*_);var D=N+=(M+=p*(5*b))>>>13;D+=i*b,D+=s*v,D+=o*y,D+=a*g,N=(D+=c*d)>>>13,D&=8191,D+=u*(5*O),D+=h*(5*E),D+=l*(5*w),D+=f*(5*m);var k=N+=(D+=p*(5*_))>>>13;k+=i*_,k+=s*b,k+=o*v,k+=a*y,N=(k+=c*g)>>>13,k&=8191,k+=u*d,k+=h*(5*O),k+=l*(5*E),k+=f*(5*w);var z=N+=(k+=p*(5*m))>>>13;z+=i*m,z+=s*_,z+=o*b,z+=a*v,N=(z+=c*y)>>>13,z&=8191,z+=u*g,z+=h*d,z+=l*(5*O),z+=f*(5*E);var q=N+=(z+=p*(5*w))>>>13;q+=i*w,q+=s*m,q+=o*_,q+=a*b,N=(q+=c*v)>>>13,q&=8191,q+=u*y,q+=h*g,q+=l*d,q+=f*(5*O);var H=N+=(q+=p*(5*E))>>>13;H+=i*E,H+=s*w,H+=o*m,H+=a*_,N=(H+=c*b)>>>13,H&=8191,H+=u*v,H+=h*y,H+=l*g,H+=f*d;var V=N+=(H+=p*(5*O))>>>13;V+=i*O,V+=s*E,V+=o*w,V+=a*m,N=(V+=c*_)>>>13,V&=8191,V+=u*b,V+=h*v,V+=l*y,V+=f*g,i=x=8191&(N=(N=((N+=(V+=p*d)>>>13)<<2)+N|0)+(x&=8191)|0),s=L+=N>>>=13,o=U&=8191,a=M&=8191,c=D&=8191,u=k&=8191,h=z&=8191,l=q&=8191,f=H&=8191,p=V&=8191,e+=16,r-=16}this._h[0]=i,this._h[1]=s,this._h[2]=o,this._h[3]=a,this._h[4]=c,this._h[5]=u,this._h[6]=h,this._h[7]=l,this._h[8]=f,this._h[9]=p},t.prototype.finish=function(t,e){void 0===e&&(e=0);var r,n,i,s,o=new Uint16Array(10);if(this._leftover){for(s=this._leftover,this._buffer[s++]=1;s<16;s++)this._buffer[s]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(r=this._h[1]>>>13,this._h[1]&=8191,s=2;s<10;s++)this._h[s]+=r,r=this._h[s]>>>13,this._h[s]&=8191;for(this._h[0]+=5*r,r=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=r,r=this._h[1]>>>
213,this._h[1]&=8191,this._h[2]+=r,o[0]=this._h[0]+5,r=o[0]>>>13,o[0]&=8191,s=1;s<10;s++)o[s]=this._h[s]+r,r=o[s]>>>13,o[s]&=8191;for(o[9]-=8192,n=(1^r)-1,s=0;s<10;s++)o[s]&=n;for(n=~n,s=0;s<10;s++)this._h[s]=this._h[s]&n|o[s];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,s=1;s<8;s++)i=(this._h[s]+this._pad[s]|0)+(i>>>16)|0,this._h[s]=65535&i;return t[e+0]=this._h[0]>>>0,t[e+1]=this._h[0]>>>8,t[e+2]=this._h[1]>>>0,t[e+3]=this._h[1]>>>8,t[e+4]=this._h[2]>>>0,t[e+5]=this._h[2]>>>8,t[e+6]=this._h[3]>>>0,t[e+7]=this._h[3]>>>8,t[e+8]=this._h[4]>>>0,t[e+9]=this._h[4]>>>8,t[e+10]=this._h[5]>>>0,t[e+11]=this._h[5]>>>8,t[e+12]=this._h[6]>>>0,t[e+13]=this._h[6]>>>8,t[e+14]=this._h[7]>>>0,t[e+15]=this._h[7]>>>8,this._finished=!0,this},t.prototype.update=function(t){var e,r=0,n=t.length;if(this._leftover){(e=16-this._leftover)>n&&(e=n);for(var i=0;i<e;i++)this._buffer[this._leftover+i]=t[r+i];if(n-=e,r+=e,this._leftover+=e,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(n>=16&&(e=n-n%16,this._blocks(t,r,e),r+=e,n-=e),n){for(i=0;i<n;i++)this._buffer[this._leftover+i]=t[r+i];this._leftover+=n}return this},t.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var t=new Uint8Array(16);return this.finish(t),t},t.prototype.clean=function(){return i.wipe(this._buffer),i.wipe(this._r),i.wipe(this._h),i.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},t}();e.Poly1305=s,e.oneTimeAuth=function(t,e){var r=new s(t);r.update(e);var n=r.digest();return r.clean(),n},e.equal=function(t,r){return t.length===e.DIGEST_LENGTH&&r.length===e.DIGEST_LENGTH&&n.equal(t,r)}},1324:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1325),i=r(652),s=function(){function t(t,e,r,i){void 0===r&&(r=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=t,this._info=i;var s=n.hmac(this._hash,r,e);this._hmac=new n.HMAC(t,s),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return t.prototype._fillBuffer=function(){this._counter[0]++;var t=this._counter[0];if(0===t)throw new Error("hkdf: cannot expand more");this._hmac.reset(),t>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},t.prototype.expand=function(t){for(var e=new Uint8Array(t),r=0;r<e.length;r++)this._bufpos===this._buffer.length&&this._fillBuffer(),e[r]=this._buffer[this._bufpos++];return e},t.prototype.clean=function(){this._hmac.clean(),i.wipe(this._buffer),i.wipe(this._counter),this._bufpos=0},t}();e.HKDF=s},1325:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1326),i=r(852),s=r(652),o=function(){function t(t,e){this._finished=!1,this._inner=new t,this._outer=new t,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var r=new Uint8Array(this.blockSize);e.length>this.blockSize?this._inner.update(e).finish(r).clean():r.set(e);for(var i=0;i<r.length;i++)r[i]^=54;this._inner.update(r);for(i=0;i<r.length;i++)r[i]^=106;this._outer.update(r),n.isSerializableHash(this._inner)&&n.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),s.wipe(r)}return t.prototype.reset=function(){if(!n.isSerializableHash(this._inner)||!n.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},t.prototype.clean=function(){n.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),n.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},t.prototype.update=function(t){return this._inner.update(t),this},t.prototype.finish=function(t){return this._finished?(this._outer.finish(t),this):(this._inner.finish(t),this._outer.update(t.subarray(0,this.digestLength)).finish(t),this._finished=!0,this)},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t.prototype.saveState=function(){if(!n.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},t.prototype.restoreState=function(t){if(!n.isSerializableHash(this._inner)||!n.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(t),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},t.prototype.cleanSavedState=function(t){if(!n.isSerializableHash(this._inner))throw new Error("hmac: can't 
2cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(t)},t}();e.HMAC=o,e.hmac=function(t,e,r){var n=new o(t,e);n.update(r);var i=n.digest();return n.clean(),i},e.equal=i.equal},1326:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSerializableHash=function(t){return"undefined"!==typeof t.saveState&&"undefined"!==typeof t.restoreState&&"undefined"!==typeof t.cleanSavedState}},1327:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;const n=r(1328),i=r(1329);e.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new n.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new i.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}},1328:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0;e.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t="undefined"!==typeof self?self.crypto||self.msCrypto:null;t&&void 0!==t.getRandomValues&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const e=new Uint8Array(t);for(let r=0;r<e.length;r+=65536)this._crypto.getRandomValues(e.subarray(r,r+Math.min(e.length-r,65536)));return e}}},1329:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRandomSource=void 0;const n=r(652);e.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const t=r(1330);t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let e=this._crypto.randomBytes(t);if(e.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(t);for(let n=0;n<r.length;n++)r[n]=e[n];return(0,n.wipe)(e),r}}},1331:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(723),i=r(652);e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var s=function(){function t(){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 t.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},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._temp),this.reset()},t.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this._bytesHashed+=e,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&e>0;)this._buffer[this._bufferLength++]=t[r++],e--;this._bufferLength===this.blockSize&&(a(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(e>=this.blockSize&&(r=a(this._temp,this._state,t,r,e),e%=this.blockSize);e>0;)this._buffer[this._bufferLength++]=t[r++],e--;return this},t.prototype.finish=function(t){if(!this._finished){var e=this._bytesHashed,r=this._bufferLength,i=e/536870912|0,s=e<<3,o=e%64<56?64:128;this._buffer[r]=128;for(var c=r+1;c<o-8;c++)this._buffer[c]=0;n.writeUint32BE(i,this._buffer,o-8),n.writeUint32BE(s,this._buffer,o-4),a(this._temp,this._state,this._buffer,0,o),this._finished=!0}for(c=0;c<this.digestLength/4;c++)n.writeUint32BE(this._state[c],t,4*c);return this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t.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}},t.prototype.restoreState=function(t){return this._state.set(t.state),this._bufferLength=t.bufferLength,t.buffer&&this._buffer.set(t.buffer),this._bytesHashed=t.bytesHashed,this._finished=!1,this},t.prototype.cleanSavedState=function(t){i.wipe(t.state),t.buffer&&i.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},t}();e.SHA256=s;var o=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,2756
2734187,3204031479,3329325298]);function a(t,e,r,i,s){for(;s>=64;){for(var a=e[0],c=e[1],u=e[2],h=e[3],l=e[4],f=e[5],p=e[6],d=e[7],g=0;g<16;g++){var y=i+4*g;t[g]=n.readUint32BE(r,y)}for(g=16;g<64;g++){var v=t[g-2],b=(v>>>17|v<<15)^(v>>>19|v<<13)^v>>>10,_=((v=t[g-15])>>>7|v<<25)^(v>>>18|v<<14)^v>>>3;t[g]=(b+t[g-7]|0)+(_+t[g-16]|0)}for(g=0;g<64;g++){b=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&f^~l&p)|0)+(d+(o[g]+t[g]|0)|0)|0,_=((a>>>2|a<<30)^(a>>>13|a<<19)^(a>>>22|a<<10))+(a&c^a&u^c&u)|0;d=p,p=f,f=l,l=h+b|0,h=u,u=c,c=a,a=b+_|0}e[0]+=a,e[1]+=c,e[2]+=u,e[3]+=h,e[4]+=l,e[5]+=f,e[6]+=p,e[7]+=d,i+=64,s-=64}return i}e.hash=function(t){var e=new s;e.update(t);var r=e.digest();return e.clean(),r}},1332:function(t,e,r){"use strict";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 n=r(763),i=r(652);function s(t){const e=new Float64Array(16);if(t)for(let r=0;r<t.length;r++)e[r]=t[r];return e}e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;const o=new Uint8Array(32);o[0]=9;const a=s([56129,1]);function c(t){let e=1;for(let r=0;r<16;r++){let n=t[r]+e+65535;e=Math.floor(n/65536),t[r]=n-65536*e}t[0]+=e-1+37*(e-1)}function u(t,e,r){const n=~(r-1);for(let i=0;i<16;i++){const r=n&(t[i]^e[i]);t[i]^=r,e[i]^=r}}function h(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]+r[n]}function l(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]-r[n]}function f(t,e,r){let n,i,s=0,o=0,a=0,c=0,u=0,h=0,l=0,f=0,p=0,d=0,g=0,y=0,v=0,b=0,_=0,m=0,w=0,E=0,O=0,S=0,I=0,j=0,P=0,A=0,R=0,C=0,T=0,N=0,x=0,L=0,U=0,M=r[0],D=r[1],k=r[2],z=r[3],q=r[4],H=r[5],V=r[6],K=r[7],B=r[8],G=r[9],F=r[10],W=r[11],Y=r[12],J=r[13],X=r[14],Z=r[15];n=e[0],s+=n*M,o+=n*D,a+=n*k,c+=n*z,u+=n*q,h+=n*H,l+=n*V,f+=n*K,p+=n*B,d+=n*G,g+=n*F,y+=n*W,v+=n*Y,b+=n*J,_+=n*X,m+=n*Z,n=e[1],o+=n*M,a+=n*D,c+=n*k,u+=n*z,h+=n*q,l+=n*H,f+=n*V,p+=n*K,d+=n*B,g+=n*G,y+=n*F,v+=n*W,b+=n*Y,_+=n*J,m+=n*X,w+=n*Z,n=e[2],a+=n*M,c+=n*D,u+=n*k,h+=n*z,l+=n*q,f+=n*H,p+=n*V,d+=n*K,g+=n*B,y+=n*G,v+=n*F,b+=n*W,_+=n*Y,m+=n*J,w+=n*X,E+=n*Z,n=e[3],c+=n*M,u+=n*D,h+=n*k,l+=n*z,f+=n*q,p+=n*H,d+=n*V,g+=n*K,y+=n*B,v+=n*G,b+=n*F,_+=n*W,m+=n*Y,w+=n*J,E+=n*X,O+=n*Z,n=e[4],u+=n*M,h+=n*D,l+=n*k,f+=n*z,p+=n*q,d+=n*H,g+=n*V,y+=n*K,v+=n*B,b+=n*G,_+=n*F,m+=n*W,w+=n*Y,E+=n*J,O+=n*X,S+=n*Z,n=e[5],h+=n*M,l+=n*D,f+=n*k,p+=n*z,d+=n*q,g+=n*H,y+=n*V,v+=n*K,b+=n*B,_+=n*G,m+=n*F,w+=n*W,E+=n*Y,O+=n*J,S+=n*X,I+=n*Z,n=e[6],l+=n*M,f+=n*D,p+=n*k,d+=n*z,g+=n*q,y+=n*H,v+=n*V,b+=n*K,_+=n*B,m+=n*G,w+=n*F,E+=n*W,O+=n*Y,S+=n*J,I+=n*X,j+=n*Z,n=e[7],f+=n*M,p+=n*D,d+=n*k,g+=n*z,y+=n*q,v+=n*H,b+=n*V,_+=n*K,m+=n*B,w+=n*G,E+=n*F,O+=n*W,S+=n*Y,I+=n*J,j+=n*X,P+=n*Z,n=e[8],p+=n*M,d+=n*D,g+=n*k,y+=n*z,v+=n*q,b+=n*H,_+=n*V,m+=n*K,w+=n*B,E+=n*G,O+=n*F,S+=n*W,I+=n*Y,j+=n*J,P+=n*X,A+=n*Z,n=e[9],d+=n*M,g+=n*D,y+=n*k,v+=n*z,b+=n*q,_+=n*H,m+=n*V,w+=n*K,E+=n*B,O+=n*G,S+=n*F,I+=n*W,j+=n*Y,P+=n*J,A+=n*X,R+=n*Z,n=e[10],g+=n*M,y+=n*D,v+=n*k,b+=n*z,_+=n*q,m+=n*H,w+=n*V,E+=n*K,O+=n*B,S+=n*G,I+=n*F,j+=n*W,P+=n*Y,A+=n*J,R+=n*X,C+=n*Z,n=e[11],y+=n*M,v+=n*D,b+=n*k,_+=n*z,m+=n*q,w+=n*H,E+=n*V,O+=n*K,S+=n*B,I+=n*G,j+=n*F,P+=n*W,A+=n*Y,R+=n*J,C+=n*X,T+=n*Z,n=e[12],v+=n*M,b+=n*D,_+=n*k,m+=n*z,w+=n*q,E+=n*H,O+=n*V,S+=n*K,I+=n*B,j+=n*G,P+=n*F,A+=n*W,R+=n*Y,C+=n*J,T+=n*X,N+=n*Z,n=e[13],b+=n*M,_+=n*D,m+=n*k,w+=n*z,E+=n*q,O+=n*H,S+=n*V,I+=n*K,j+=n*B,P+=n*G,A+=n*F,R+=n*W,C+=n*Y,T+=n*J,N+=n*X,x+=n*Z,n=e[14],_+=n*M,m+=n*D,w+=n*k,E+=n*z,O+=n*q,S+=n*H,I+=n*V,j+=n*K,P+=n*B,A+=n*G,R+=n*F,C+=n*W,T+=n*Y,N+=n*J,x+=n*X,L+=n*Z,n=e[15],m+=n*M,w+=n*D,E+=n*k,O+=n*z,S+=n*q,I+=n*H,j+=n*V,P+=n*K,A+=n*B,R+=n*G,C+=n*F,T+=n*W,N+=n*Y,x+=n*J,L+=n*X,U+=n*Z,s+=38*w,o+=38*E,a+=38*O,c+=38*S,u+=38*I,h+=38*j,l+=38*P,f+=38*A,p+=38*R,d+=38*C,g+=38*T,y+=38*N,v+=38*x,b+=38*L,_+=38*U,i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-6
25536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=_+i+65535,i=Math.floor(n/65536),_=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,s+=i-1+37*(i-1),i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=_+i+65535,i=Math.floor(n/65536),_=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,s+=i-1+37*(i-1),t[0]=s,t[1]=o,t[2]=a,t[3]=c,t[4]=u,t[5]=h,t[6]=l,t[7]=f,t[8]=p,t[9]=d,t[10]=g,t[11]=y,t[12]=v,t[13]=b,t[14]=_,t[15]=m}function p(t,e){f(t,e,e)}function d(t,e){const r=new Uint8Array(32),n=new Float64Array(80),i=s(),o=s(),d=s(),g=s(),y=s(),v=s();for(let s=0;s<31;s++)r[s]=t[s];r[31]=127&t[31]|64,r[0]&=248,function(t,e){for(let r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}(n,e);for(let s=0;s<16;s++)o[s]=n[s];i[0]=g[0]=1;for(let s=254;s>=0;--s){const t=r[s>>>3]>>>(7&s)&1;u(i,o,t),u(d,g,t),h(y,i,d),l(i,i,d),h(d,o,g),l(o,o,g),p(g,y),p(v,i),f(i,d,i),f(d,o,y),h(y,i,d),l(i,i,d),p(o,i),l(d,g,v),f(i,d,a),h(i,i,g),f(d,d,i),f(i,g,v),f(g,o,n),p(o,y),u(i,o,t),u(d,g,t)}for(let s=0;s<16;s++)n[s+16]=i[s],n[s+32]=d[s],n[s+48]=o[s],n[s+64]=g[s];const b=n.subarray(32),_=n.subarray(16);!function(t,e){const r=s();for(let n=0;n<16;n++)r[n]=e[n];for(let n=253;n>=0;n--)p(r,r),2!==n&&4!==n&&f(r,r,e);for(let n=0;n<16;n++)t[n]=r[n]}(b,b),f(_,_,b);const m=new Uint8Array(32);return function(t,e){const r=s(),n=s();for(let i=0;i<16;i++)n[i]=e[i];c(n),c(n),c(n);for(let i=0;i<2;i++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const t=r[15]>>16&1;r[14]&=65535,u(n,r,1-t)}for(let i=0;i<16;i++)t[2*i]=255&n[i],t[2*i+1]=n[i]>>8}(m,_),m}function g(t){return d(t,o)}function y(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error("x25519: seed must be ".concat(e.SECRET_KEY_LENGTH," bytes"));const r=new Uint8Array(t);return{publicKey:g(r),secretKey:r}}e.scalarMult=d,e.scalarMultBase=g,e.generateKeyPairFromSeed=y,e.generateKeyPair=function(t){const e=(0,n.randomBytes)(32,t),r=y(e);return(0,i.wipe)(e),r},e.sharedKey=function(t,r){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(r.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const i=d(t,r);if(n){let t=0;for(let e=0;e<i.length;e++)t|=i[e];if(0===t)throw new Error("X25519: invalid shared key")}return i}},1333:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compare=function(t,e){for(let r=0;r<t.byteLength;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return t.byteLength>e.byteLength?1:t.byteLength<e.byteLength?-1:0}},1334:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.equals=function(t,e){if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}},1335:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1336),i=r(1338),s=r(1339),o=r(1340),a=r(1341),c=r(1025),u=r(1342),h=r(1026),l=r(1343),f=r(1344),p=r(1345),d=r(1347),g=r(1348),y=r(1349);r(1350);var v=r(1027),b=r(854),_=r(724),m=r(765),w=r(668);const E={...n,...i,...s,...o,...a,...c,...u,...h,...l,...f},O={...p,...d},S={raw:g,json:y};e.CID=v.CID,e.hasher=b,e.digest=_,e.varint=m,e.bytes=w,e.bases=E,e.codecs=S,e.hashes=O},1336:function(t,e,r){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var n=r(661),i=r(668);const s=n.from({prefix:"\0",name:"identity",encode:t=>i.toString(t),decode:t=>i.fromString(t)});e.identity=s},1337:function(t,e,r){"use strict";var n=function(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(255!==r[o])throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function l(t){if("string"!==typeof t)throw new TypeError("Expected String");if(0===t.length)return new Uint8Array;var e=0;if(" "!==t[e]){for(var n=0,i=0;t[e]===c;)n++,e++;for(var s=(t.length-e)*u+1>>>0,o=new Uint8Array(s);t[e];){var h=r[t.charCodeAt(e)];if(255===h)return;for(var l=0,f=s-1;(0!==h||l<i)&&-1!==f;f--,l++)h+=a*o[f]>>>0,o[f]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var p=s-i;p!==s&&0===o[p];)p++;for(var d=new Uint8Array(n+(s-p)),g=n;p!==s;)d[g++]=o[p++];return d}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,s=e.length;i!==s&&0===e[i];)i++,r++;for(var o=(s-i)*h+1>>>0,u=new Uint8Array(o);i!==s;){for(var l=e[i],f=0,p=o-1;(0!==l||f<n)&&-1!==p;p--,f++)l+=256*u[p]>>>0,u[p]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var d=o-n;d!==o&&0===u[d];)d++;for(var g=c.repeat(r);d<o;++d)g+=t.charAt(u[d]);return g},decodeUnsafe:l,decode:function(t){var r=l(t);if(r)return r;throw new Error("Non-".concat(e," character"))}}};t.exports=n},1338:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(661).rfc4648({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});e.base2=n},1339:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(661).rfc4648({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});e.base8=n},1340:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(661).baseX({prefix:"9",name:"base10",alphabet:"0123456789"});e.base10=n},1341:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(661);const i=n.rfc4648({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),s=n.rfc4648({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});e.base16=i,e.base16upper=s},1342:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(661);const i=n.baseX({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),s=n.baseX({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});e.base36=i,e.base36upper=s},1343:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(661);const i=n.rfc4648({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),s=n.rfc4648({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),o=n.rfc4648({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),a=n.rfc4648({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});e.base64=i,e.base64pad=s,e.base64url=o,e.base64urlpad=a},1344:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(661);const i=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),s=i.reduce(((t,e,r)=>(t[r]=e,t)),[]),o=i.reduce(((t,e,r)=>(t[e.codePointAt(0)]=r,t)),[]);const a=n.from({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(t){return t.reduce(((t,e)=>t+=s[e]),"")},decode:function(t){const e=[];for(const r of t){const t=o[r.codePointAt(0)];if(void 0===t)throw new Error("Non-base256emoji character: ".concat(r));e.push(t)}return new Uint8Array(e)}});e.base256emoji=a},1345:function(t,e,r){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});var n=r(854);const i=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),s=n.from({name:"sha2-256",code:18,encode:i("SHA-256")}),o=n.from({name:"sha2-512",code:19,encode:i("SHA-512")});e.sha256=s,e.sha512=o},1346:function(t,e,r){"use strict";var n=function t(e,r,n){r=r||[];var a=n=n||0;for(;e>=o;)r[n++]=255&e|i,e/=128;for(;e&s;)r[n++]=255&e|i,e>>>=7;return r[n]=0|e,t.bytes=n-a+1,r},i=128,s=-128,o=Math.pow(2,31);var a=function t(e,r){var n,i=0,s=0,o=r=r||0,a=e.length;do{if(o>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[o++],i+=s<28?(n&u)<<s:(n&u)*Math.pow(2,s),s+=7}while(n>=c);return t.bytes=o-r,i},c=128,u=127;var h=Math.pow(2,7),l=Math.pow(2,14),f=Math.pow(2,21),p=Math.pow(2,28),d=Math.pow(2,35),g=Math.pow(2,42),y=Math.pow(2,49),v=Math.pow(2,56),b=Math.pow(2,63),_={encode:n,decode:a,encodingLength:function(t){return t<h?1:t<l?2:t<f?3:t<p?4:t<d?5:t<g?6:t<y?7:t<v?8:t<b?9:10}};t.exports=_},1347:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(668),i=r(724);const s=n.coerce,o={code:0,name:"identity",encode:s,digest:t=>i.create(0,s(t))};e.identity=o},1348:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(668);e.code=85,e.decode=t=>n.coerce(t),e.encode=t=>n.coerce(t),e.name="raw"},1349:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=new TextEncoder,i=new TextDecoder;e.code=512,e.decode=t=>JSON.parse(i.decode(t)),e.encode=t=>n.encode(JSON.stringify(t)),e.name="json"},1350:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1027),i=r(765),s=r(668),o=r(854),a=r(724);e.CID=n.CID,e.varint=i,e.bytes=s,e.hasher=o,e.digest=a},1351:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(853),i=r(764);e.xor=function(t,e){if(t.length!==e.length)throw new Error("Inputs should have the same length");const r=n.allocUnsafe(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return i.asUint8Array(r)}},1352:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(766);n.__exportStar(r(1353),e),n.__exportStar(r(1354),e)},1353:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.delay=void 0,e.delay=function(t){return new Promise((e=>{setTimeout((()=>{e(!0)}),t)}))}},1354:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fromMiliseconds=e.toMiliseconds=void 0;const n=r(1029);e.toMiliseconds=function(t){return t*n.ONE_THOUSAND},e.fromMiliseconds=function(t){return Math.floor(t/n.ONE_THOUSAND)}},1355:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ONE_THOUSAND=e.ONE_HUNDRED=void 0,e.ONE_HUNDRED=100,e.ONE_THOUSAND=1e3},1356:function(t,e,r){"use strict";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},1357:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Watch=void 0;class n{constructor(){this.timestamps=new Map}start(t){if(this.timestamps.has(t))throw new Error("Watch already started for label: ".concat(t));this.timestamps.set(t,{started:Date.now()})}stop(t){const e=this.get(t);if("undefined"!==typeof e.elapsed)throw new Error("Watch already stopped for label: ".concat(t));const r=Date.now()-e.started;this.timestamps.set(t,{started:e.started,elapsed:r})}get(t){const e=this.timestamps.get(t);if("undefined"===typeof e)throw new Error("No timestamp found for label: ".concat(t));return e}elapsed(t){const e=this.get(t);return e.elapsed||Date.now()-e.started}}e.Watch=n,e.default=n},1358:function(t,e,r){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0});r(766).__exportStar(r(1359),e)},1359:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWatch=void 0;e.IWatch=class{}},1360:function(t,e,r){"use strict";const n=r(1031),i=r(1032),s=r(1033),o=r(1034),a=Symbol("encodeFragmentIdentifier");function c(t){if("string"!==typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function u(t,e){return e.encode?e.strict?n(t):encodeURIComponent(t):t}function h(t,e){return e.decode?i(t):t}function l(t){return Array.isArray(t)?t.sort():"object"===typeof t?l(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function f(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function p(t){const e=(t=f(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function d(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"===typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function g(t,e){c((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const r=function(t){let e;switch(t.arrayFormat){case"index":return(t,r,n)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===n[t]&&(n[t]={}),n[t][e[1]]=r):n[t]=r};case"bracket":return(t,r,n)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"colon-list-separator":return(t,r,n)=>{e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),e?void 0!==n[t]?n[t]=[].concat(n[t],r):n[t]=[r]:n[t]=r};case"comma":case"separator":return(e,r,n)=>{const i="string"===typeof r&&r.includes(t.arrayFormatSeparator),s="string"===typeof r&&!i&&h(r,t).includes(t.arrayFormatSeparator);r=s?h(r,t):r;const o=i||s?r.split(t.arrayFormatSeparator).map((e=>h(e,t))):null===r?r:h(r,t);n[e]=o};case"bracket-separator":return(e,r,n)=>{const i=/(\[\])$/.test(e);if(e=e.replace(/\[\]$/,""),!i)return void(n[e]=r?h(r,t):r);const s=null===r?[]:r.split(t.arrayFormatSeparator).map((e=>h(e,t)));void 0!==n[e]?n[e]=[].concat(n[e],s):n[e]=s};default:return(t,e,r)=>{void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),n=Object.create(null);if("string"!==typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(const i of t.split("&")){if(""===i)continue;let[t,o]=s(e.decode?i.replace(/\+/g," "):i,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?o:h(o,e),r(h(t,e),o,n)}for(const i of Object.keys(n)){const t=n[i];if("object"===typeof t&&null!==t)for(const r of Object.keys(t))t[r]=d(t[r],e);else n[i]=d(t,e)}return!1===e.sort?n:(!0===e.sort?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce(((t,e)=>{const r=n[e];return Boolean(r)&&"object"===typeof r&&!Array.isArray(r)?t[e]=l(r):t[e]=r,t}),Object.create(null))}e.extract=p,e.parse=g,e.stringify=(t,e)=>{if(!t)return"";c((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const r=r=>{return e.skipNull&&(null===(n=t[r])||void 0===n)||e.skipEmptyString&&""===t[r];var n},n=function(t){switch(t.arrayFormat){case"index":return e=>(r,n)=>{const i=r.length;return void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[u(e,t),"[",i,"]"].join("")]:[...r,[u(e,t),"[",u(i,t),"]=",u(n,t)].join("")]};case"bracket":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[u(e,t),"[]"].join("")]:[...r,[u(e,t),"[]=",u(n,t)].join("")];case"colon-list-separator":return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,[u(e,t),":list="].join("")]:[...r,[u(e,t),":list=",u(n,t)].join("")];case"comma":case"separator":case"bracket-separator":{const e="bracket-separator"===t.arrayFormat?"[]=":"=";return r=>(n,i)=>void 0===i||t.skipNull&&null===i||t.skipEmptyString&&""===i?n:(i=null===i?"":i,0===n.length?[[u(r,t),e,u(i,t)].join("")]:[[n,u(i,t)].join(t.arrayFormatSeparator)])}default:return e=>(r,n)=>void 0===n||t.skipNull&&null===n||t.skipEmptyString&&""===n?r:null===n?[...r,u(e,t)]:[...r,[u(e,t),"=",u(n,t)].join("")]}}(e),i={};
2for(const o of Object.keys(t))r(o)||(i[o]=t[o]);const s=Object.keys(i);return!1!==e.sort&&s.sort(e.sort),s.map((r=>{const i=t[r];return void 0===i?"":null===i?u(r,e):Array.isArray(i)?0===i.length&&"bracket-separator"===e.arrayFormat?u(r,e)+"[]":i.reduce(n(r),[]).join("&"):u(r,e)+"="+u(i,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[r,n]=s(t,"#");return Object.assign({url:r.split("?")[0]||"",query:g(p(t),e)},e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:h(n,e)}:{})},e.stringifyUrl=(t,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);const n=f(t.url).split("?")[0]||"",i=e.extract(t.url),s=e.parse(i,{sort:!1}),o=Object.assign(s,t.query);let c=e.stringify(o,r);c&&(c="?".concat(c));let h=function(t){let e="";const r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(h="#".concat(r[a]?u(t.fragmentIdentifier,r):t.fragmentIdentifier)),"".concat(n).concat(c).concat(h)},e.pick=(t,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);const{url:i,query:s,fragmentIdentifier:c}=e.parseUrl(t,n);return e.stringifyUrl({url:i,query:o(s,r),fragmentIdentifier:c},n)},e.exclude=(t,r,n)=>{const i=Array.isArray(r)?t=>!r.includes(t):(t,e)=>!r(t,e);return e.pick(t,i,n)}},1361:function(t,e,r){"use strict";var n=r(1035);r.o(n,"RELAY_JSONRPC")&&r.d(e,"RELAY_JSONRPC",(function(){return n.RELAY_JSONRPC}));r(1036);var i=r(1038);r.d(e,"RELAY_JSONRPC",(function(){return i.a}));r(856)},1362:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyValueStorage=void 0;const n=r(1040),i=r(1041),s=n.__importDefault(r(1363)),o=r(1364);class a{constructor(){this.localStorage=s.default}getKeys(){return n.__awaiter(this,void 0,void 0,(function*(){return Object.keys(this.localStorage)}))}getEntries(){return n.__awaiter(this,void 0,void 0,(function*(){return Object.entries(this.localStorage).map(o.parseEntry)}))}getItem(t){return n.__awaiter(this,void 0,void 0,(function*(){const e=this.localStorage.getItem(t);if(null!==e)return i.safeJsonParse(e)}))}setItem(t,e){return n.__awaiter(this,void 0,void 0,(function*(){this.localStorage.setItem(t,i.safeJsonStringify(e))}))}removeItem(t){return n.__awaiter(this,void 0,void 0,(function*(){this.localStorage.removeItem(t)}))}}e.KeyValueStorage=a,e.default=a},1363:function(t,e,r){"use strict";(function(e){!function(){let r;function n(){}r=n,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,e){this[t]=String(e)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach((function(e){t[e]=void 0,delete t[e]}))},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),"undefined"!==typeof e&&e.localStorage?t.exports=e.localStorage:"undefined"!==typeof window&&window.localStorage?t.exports=window.localStorage:t.exports=new n}()}).call(this,r(72))},1364:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(1040);n.__exportStar(r(1365),e),n.__exportStar(r(1366),e)},1365:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeyValueStorage=void 0;e.IKeyValueStorage=class{}},1366:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseEntry=void 0;const n=r(1041);e.parseEntry=function(t){var e;return[t[0],n.safeJsonParse(null!==(e=t[1])&&void 0!==e?e:"")]}},1367:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(767);n.__exportStar(r(1368),e),n.__exportStar(r(1042),e),n.__exportStar(r(1043),e)},1368:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HeartBeat=void 0;const n=r(767),i=r(332),s=r(701),o=r(1042),a=r(1043);class c extends o.IHeartBeat{constructor(t){super(t),this.events=new i.EventEmitter,this.interval=a.HEARTBEAT_INTERVAL,this.interval=(null===t||void 0===t?void 0:t.interval)||a.HEARTBEAT_INTERVAL}static init(t){return n.__awaiter(this,void 0,void 0,(function*(){const e=new c(t);return yield e.init(),e}))}init(){return n.__awaiter(this,void 0,void 0,(function*(){yield this.initialize()}))}stop(){clearInterval(this.intervalRef)}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}initialize(){return n.__awaiter(this,void 0,void 0,(function*(){this.intervalRef=setInterval((()=>this.pulse()),s.toMiliseconds(this.interval))}))}pulse(){this.events.emit(a.HEARTBEAT_EVENTS.pulse)}}e.HeartBeat=c},1369:function(t,e,r){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.IHeartBeat=void 0;const n=r(1113);class i extends n.IEvents{constructor(t){super()}}e.IHeartBeat=i},1370:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HEARTBEAT_EVENTS=e.HEARTBEAT_INTERVAL=void 0;const n=r(701);e.HEARTBEAT_INTERVAL=n.FIVE_SECONDS,e.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},1371:function(t,e,r){"use strict";var n=r(1044);r.d(e,"generateKeyPair",(function(){return n.a})),r.d(e,"signJWT",(function(){return n.b}));r(768);var i=r(1045);r.o(i,"encodeIss")&&r.d(e,"encodeIss",(function(){return i.encodeIss}));var s=r(857);r.d(e,"encodeIss",(function(){return s.d}))},1372:function(t,e,r){"use strict";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 n=r(763),i=r(1373),s=r(652);function o(t){const e=new Float64Array(16);if(t)for(let r=0;r<t.length;r++)e[r]=t[r];return e}e.SIGNATURE_LENGTH=64,e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=64,e.SEED_LENGTH=32;new Uint8Array(32)[0]=9;const a=o(),c=o([1]),u=o([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=o([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=o([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=o([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=o([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(t,e){for(let r=0;r<16;r++)t[r]=0|e[r]}function g(t){let e=1;for(let r=0;r<16;r++){let n=t[r]+e+65535;e=Math.floor(n/65536),t[r]=n-65536*e}t[0]+=e-1+37*(e-1)}function y(t,e,r){const n=~(r-1);for(let i=0;i<16;i++){const r=n&(t[i]^e[i]);t[i]^=r,e[i]^=r}}function v(t,e){const r=o(),n=o();for(let i=0;i<16;i++)n[i]=e[i];g(n),g(n),g(n);for(let i=0;i<2;i++){r[0]=n[0]-65517;for(let e=1;e<15;e++)r[e]=n[e]-65535-(r[e-1]>>16&1),r[e-1]&=65535;r[15]=n[15]-32767-(r[14]>>16&1);const t=r[15]>>16&1;r[14]&=65535,y(n,r,1-t)}for(let i=0;i<16;i++)t[2*i]=255&n[i],t[2*i+1]=n[i]>>8}function b(t,e){let r=0;for(let n=0;n<32;n++)r|=t[n]^e[n];return(1&r-1>>>8)-1}function _(t,e){const r=new Uint8Array(32),n=new Uint8Array(32);return v(r,t),v(n,e),b(r,n)}function m(t){const e=new Uint8Array(32);return v(e,t),1&e[0]}function w(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]+r[n]}function E(t,e,r){for(let n=0;n<16;n++)t[n]=e[n]-r[n]}function O(t,e,r){let n,i,s=0,o=0,a=0,c=0,u=0,h=0,l=0,f=0,p=0,d=0,g=0,y=0,v=0,b=0,_=0,m=0,w=0,E=0,O=0,S=0,I=0,j=0,P=0,A=0,R=0,C=0,T=0,N=0,x=0,L=0,U=0,M=r[0],D=r[1],k=r[2],z=r[3],q=r[4],H=r[5],V=r[6],K=r[7],B=r[8],G=r[9],F=r[10],W=r[11],Y=r[12],J=r[13],X=r[14],Z=r[15];n=e[0],s+=n*M,o+=n*D,a+=n*k,c+=n*z,u+=n*q,h+=n*H,l+=n*V,f+=n*K,p+=n*B,d+=n*G,g+=n*F,y+=n*W,v+=n*Y,b+=n*J,_+=n*X,m+=n*Z,n=e[1],o+=n*M,a+=n*D,c+=n*k,u+=n*z,h+=n*q,l+=n*H,f+=n*V,p+=n*K,d+=n*B,g+=n*G,y+=n*F,v+=n*W,b+=n*Y,_+=n*J,m+=n*X,w+=n*Z,n=e[2],a+=n*M,c+=n*D,u+=n*k,h+=n*z,l+=n*q,f+=n*H,p+=n*V,d+=n*K,g+=n*B,y+=n*G,v+=n*F,b+=n*W,_+=n*Y,m+=n*J,w+=n*X,E+=n*Z,n=e[3],c+=n*M,u+=n*D,h+=n*k,l+=n*z,f+=n*q,p+=n*H,d+=n*V,g+=n*K,y+=n*B,v+=n*G,b+=n*F,_+=n*W,m+=n*Y,w+=n*J,E+=n*X,O+=n*Z,n=e[4],u+=n*M,h+=n*D,l+=n*k,f+=n*z,p+=n*q,d+=n*H,g+=n*V,y+=n*K,v+=n*B,b+=n*G,_+=n*F,m+=n*W,w+=n*Y,E+=n*J,O+=n*X,S+=n*Z,n=e[5],h+=n*M,l+=n*D,f+=n*k,p+=n*z,d+=n*q,g+=n*H,y+=n*V,v+=n*K,b+=n*B,_+=n*G,m+=n*F,w+=n*W,E+=n*Y,O+=n*J,S+=n*X,I+=n*Z,n=e[6],l+=n*M,f+=n*D,p+=n*k,d+=n*z,g+=n*q,y+=n*H,v+=n*V,b+=n*K,_+=n*B,m+=n*G,w+=n*F,E+=n*W,O+=n*Y,S+=n*J,I+=n*X,j+=n*Z,n=e[7],f+=n*M,p+=n*D,d+=n*k,g+=n*z,y+=n*q,v+=n*H,b+=n*V,_+=n*K,m+=n*B,w+=n*G,E+=n*F,O+=n*W,S+=n*Y,I+=n*J,j+=n*X,P+=n*Z,n=e[8],p+=n*M,d+=n*D,g+=n*k,y+=n*z,v+=n*q,b+=n*H,_+=n*V,m+=n*K,w+=n*B,E+=n*G,O+=n*F,S+=n*W,I+=n*Y,j+=n*J,P+=n*X,A+=n*Z,n=e[9],d+=n*M,g+=n*D,y+=n*k,v+=n*z,b+=n*q,_+=n*H,m+=n*V,w+=n*K,E+=n*B,O+=n*G,S+=n*F,I+=n*W,j+=n*Y,P+=n*J,A+=n*X,R+=n*Z,n=e[10],g+=n*M,y+=n*D,v+=n*k,b+=n*z,_+=n*q,m+=n*H,w+=n*V,E+=n*K,O+=n*B,S+=n*G,I+=n*F,j+=n*W,P+=n*Y,A+=n*J,R+=n*X,C+=n*Z,n=e[11],y+=n*M,v+=n*D,b+=n*k,_+=n*z,m+=n*q,w+=n*H,E+=n*V,O+=n*K,S+=n*B,I+=n*G,j+=n*F,P+=n*W,A+=n*Y,R+=n*J,C+=n*X,T+=n*Z,n=e[12],v+=n*M,b+=n*D,_+=n*k,m+=n*z,w+=n*q,E+=n*H,O+=n*V,S+=n*K,I+=n*B,j+=n*G,P+=n*F,A+=n*W,R+=n*Y,C+=n*J,T+=n*X,N+=n*Z,n=e[13],b+=n*M,_+=n*D,m+=n*k,w+=n*z,E+=n*q,O+=n*H,S+=n*V,I+=n*K,j+=n*B,P+=n*G,A+=n*F,R+=n*W,C+=n*Y,T+=n*J,N+=n*X,x+=n*Z,n=e[14],_+=n*M,m+=n*D,w+=n*k,E+=n*z,O+=n*q,S+=n*H,I+=n*V,j+=n*K,P+=n*B,A+=n*G,R+=n*F,C+=n*W,T+=n*Y,N+=n*J,x+=n*X,L+=n*Z,n=e[15],m+=n*M,w+=n*D,E+=n*k,O+=n*z,S+=n*q,I+=n*H,j+=n*V,P+=n*K,A+=n*B,R+=n*G,C+=n*F,T+=n*W,N+=n*Y,x+=n*J,L+=n*X,U+=n*Z,s+=38*w,o+=38*E,a+=38*O,c+=38*S,u+=38*I,h+=38*j,l+=38*P,f+=38*A,p+=38*R,d+=38*C,g+=38*T,y+=38*N,v+=38*x,b+=38*L,_+=38*U,i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-6
25536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=_+i+65535,i=Math.floor(n/65536),_=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,s+=i-1+37*(i-1),i=1,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=_+i+65535,i=Math.floor(n/65536),_=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,s+=i-1+37*(i-1),t[0]=s,t[1]=o,t[2]=a,t[3]=c,t[4]=u,t[5]=h,t[6]=l,t[7]=f,t[8]=p,t[9]=d,t[10]=g,t[11]=y,t[12]=v,t[13]=b,t[14]=_,t[15]=m}function S(t,e){O(t,e,e)}function I(t,e){const r=o();let n;for(n=0;n<16;n++)r[n]=e[n];for(n=253;n>=0;n--)S(r,r),2!==n&&4!==n&&O(r,r,e);for(n=0;n<16;n++)t[n]=r[n]}function j(t,e){const r=o(),n=o(),i=o(),s=o(),a=o(),c=o(),u=o(),l=o(),f=o();E(r,t[1],t[0]),E(f,e[1],e[0]),O(r,r,f),w(n,t[0],t[1]),w(f,e[0],e[1]),O(n,n,f),O(i,t[3],e[3]),O(i,i,h),O(s,t[2],e[2]),w(s,s,s),E(a,n,r),E(c,s,i),w(u,s,i),w(l,n,r),O(t[0],a,c),O(t[1],l,u),O(t[2],u,c),O(t[3],a,l)}function P(t,e,r){for(let n=0;n<4;n++)y(t[n],e[n],r)}function A(t,e){const r=o(),n=o(),i=o();I(i,e[2]),O(r,e[0],i),O(n,e[1],i),v(t,n),t[31]^=m(r)<<7}function R(t,e,r){d(t[0],a),d(t[1],c),d(t[2],c),d(t[3],a);for(let n=255;n>=0;--n){const i=r[n/8|0]>>(7&n)&1;P(t,e,i),j(e,t),j(t,t),P(t,e,i)}}function C(t,e){const r=[o(),o(),o(),o()];d(r[0],l),d(r[1],f),d(r[2],c),O(r[3],l,f),R(t,r,e)}function T(t){if(t.length!==e.SEED_LENGTH)throw new Error("ed25519: seed must be ".concat(e.SEED_LENGTH," bytes"));const r=(0,i.hash)(t);r[0]&=248,r[31]&=127,r[31]|=64;const n=new Uint8Array(32),s=[o(),o(),o(),o()];C(s,r),A(n,s);const a=new Uint8Array(64);return a.set(t),a.set(n,32),{publicKey:n,secretKey:a}}e.generateKeyPairFromSeed=T,e.generateKeyPair=function(t){const e=(0,n.randomBytes)(32,t),r=T(e);return(0,s.wipe)(e),r},e.extractPublicKeyFromSecretKey=function(t){if(t.length!==e.SECRET_KEY_LENGTH)throw new Error("ed25519: secret key must be ".concat(e.SECRET_KEY_LENGTH," bytes"));return new Uint8Array(t.subarray(32))};const N=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 x(t,e){let r,n,i,s;for(n=63;n>=32;--n){for(r=0,i=n-32,s=n-12;i<s;++i)e[i]+=r-16*e[n]*N[i-(n-32)],r=Math.floor((e[i]+128)/256),e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*N[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*N[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function L(t){const e=new Float64Array(64);for(let r=0;r<64;r++)e[r]=t[r];for(let r=0;r<64;r++)t[r]=0;x(t,e)}function U(t,e){const r=o(),n=o(),i=o(),s=o(),h=o(),l=o(),f=o();return d(t[2],c),function(t,e){for(let r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}(t[1],e),S(i,t[1]),O(s,i,u),E(i,i,t[2]),w(s,t[2],s),S(h,s),S(l,h),O(f,l,h),O(r,f,i),O(r,r,s),function(t,e){const r=o();let n;for(n=0;n<16;n++)r[n]=e[n];for(n=250;n>=0;n--)S(r,r),1!==n&&O(r,r,e);for(n=0;n<16;n++)t[n]=r[n]}(r,r),O(r,r,i),O(r,r,s),O(r,r,s),O(t[0],r,s),S(n,t[0]),O(n,n,s),_(n,i)&&O(t[0],t[0],p),S(n,t[0]),O(n,n,s),_(n,i)?-1:(m(t[0])===e[31]>>7&&E(t[0],a,t[0]),O(t[3],t[0],t[1]),0)}e.sign=function(t,e){const r=new Float64Array(64),n=[o(),o(),o(),o()],s=(0,i.hash)(t.subarray(0,32));s[0]&=248,s[31]&=127,s[31]|=64;const a=new Uint8Array(64);a.set(s.subarray(32),32);const c=new i.SHA512;c.update(a.subarray(32)),c.update(e);const u=c.digest();c.clean(),L(u),C(n,u),A(a,n),c.reset(),c.update(a.subarray(0,32)),c.update(t.subarray(32)),c.update(e);const h=c.digest();L(h);for(let i=0;i<32;i++)r[i]=u[i];for(let i=0;i<32;i++)for(let t=0;t<32;t++)r[i+t]+=h[i]*s[t];return x(a.subarray(32),r),a},e.verify=function(t,r,n){const s=new Uint8Array(32),a=[o(),o(),o(),o()],c=[o(),o(),o(),o()];if(n.length!==e.SIGNATURE_LENGTH)throw new Error("ed25519: signature must be ".concat(e.SIGNATURE_LENGTH," bytes"));if(U(c,t))return!1;const u=new i.SHA512;u.update(n.subarray(0,32)),u.update(t),u.update(r);const h=u.digest();return L(h),R(a,c,h),C(c,n.subarray(32)),j(a,c),A(s,a),!b(n,s)},e.convertPublicKeyToX25519=function(t){let e=[o(),o(),o(),o()];if(U(e,t))throw new Error("Ed25519: invalid public key");let r=o(),n=o(),i=e[1];w(r,c,i),E(n,c,i),I(n,n),O(r,r,n);let s=new Uint8Array(32);return v(s,r),s},e.convertSecretKeyToX25519=function(t){const e=(0,i.hash)(t.subarray(0,32));
2e[0]&=248,e[31]&=127,e[31]|=64;const r=new Uint8Array(e.subarray(0,32));return(0,s.wipe)(e),r}},1373:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(723),i=r(652);e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var s=function(){function t(){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 t.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},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){i.wipe(this._buffer),i.wipe(this._tempHi),i.wipe(this._tempLo),this.reset()},t.prototype.update=function(t,r){if(void 0===r&&(r=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=t[n++],r--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(n=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,n,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=t[n++],r--;return this},t.prototype.finish=function(t){if(!this._finished){var e=this._bytesHashed,r=this._bufferLength,i=e/536870912|0,s=e<<3,o=e%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<o-8;c++)this._buffer[c]=0;n.writeUint32BE(i,this._buffer,o-8),n.writeUint32BE(s,this._buffer,o-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,o),this._finished=!0}for(c=0;c<this.digestLength/8;c++)n.writeUint32BE(this._stateHi[c],t,8*c),n.writeUint32BE(this._stateLo[c],t,8*c+4);return this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t.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}},t.prototype.restoreState=function(t){return this._stateHi.set(t.stateHi),this._stateLo.set(t.stateLo),this._bufferLength=t.bufferLength,t.buffer&&this._buffer.set(t.buffer),this._bytesHashed=t.bytesHashed,this._finished=!1,this},t.prototype.cleanSavedState=function(t){i.wipe(t.stateHi),i.wipe(t.stateLo),t.buffer&&i.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},t}();e.SHA512=s;var o=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,
21322822218,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 a(t,e,r,i,s,a,c){for(var u,h,l,f,p,d,g,y,v=r[0],b=r[1],_=r[2],m=r[3],w=r[4],E=r[5],O=r[6],S=r[7],I=i[0],j=i[1],P=i[2],A=i[3],R=i[4],C=i[5],T=i[6],N=i[7];c>=128;){for(var x=0;x<16;x++){var L=8*x+a;t[x]=n.readUint32BE(s,L),e[x]=n.readUint32BE(s,L+4)}for(x=0;x<80;x++){var U,M,D=v,k=b,z=_,q=m,H=w,V=E,K=O,B=I,G=j,F=P,W=A,Y=R,J=C,X=T;if(p=65535&(h=N),d=h>>>16,g=65535&(u=S),y=u>>>16,p+=65535&(h=(R>>>14|w<<18)^(R>>>18|w<<14)^(w>>>9|R<<23)),d+=h>>>16,g+=65535&(u=(w>>>14|R<<18)^(w>>>18|R<<14)^(R>>>9|w<<23)),y+=u>>>16,p+=65535&(h=R&C^~R&T),d+=h>>>16,g+=65535&(u=w&E^~w&O),y+=u>>>16,u=o[2*x],p+=65535&(h=o[2*x+1]),d+=h>>>16,g+=65535&u,y+=u>>>16,u=t[x%16],d+=(h=e[x%16])>>>16,g+=65535&u,y+=u>>>16,g+=(d+=(p+=65535&h)>>>16)>>>16,p=65535&(h=f=65535&p|d<<16),d=h>>>16,g=65535&(u=l=65535&g|(y+=g>>>16)<<16),y=u>>>16,p+=65535&(h=(I>>>28|v<<4)^(v>>>2|I<<30)^(v>>>7|I<<25)),d+=h>>>16,g+=65535&(u=(v>>>28|I<<4)^(I>>>2|v<<30)^(I>>>7|v<<25)),y+=u>>>16,d+=(h=I&j^I&P^j&P)>>>16,g+=65535&(u=v&b^v&_^b&_),y+=u>>>16,U=65535&(g+=(d+=(p+=65535&h)>>>16)>>>16)|(y+=g>>>16)<<16,M=65535&p|d<<16,p=65535&(h=W),d=h>>>16,g=65535&(u=q),y=u>>>16,d+=(h=f)>>>16,g+=65535&(u=l),y+=u>>>16,b=D,_=k,m=z,w=q=65535&(g+=(d+=(p+=65535&h)>>>16)>>>16)|(y+=g>>>16)<<16,E=H,O=V,S=K,v=U,j=B,P=G,A=F,R=W=65535&p|d<<16,C=Y,T=J,N=X,I=M,x%16===15)for(L=0;L<16;L++)u=t[L],p=65535&(h=e[L]),d=h>>>16,g=65535&u,y=u>>>16,u=t[(L+9)%16],p+=65535&(h=e[(L+9)%16]),d+=h>>>16,g+=65535&u,y+=u>>>16,l=t[(L+1)%16],p+=65535&(h=((f=e[(L+1)%16])>>>1|l<<31)^(f>>>8|l<<24)^(f>>>7|l<<25)),d+=h>>>16,g+=65535&(u=(l>>>1|f<<31)^(l>>>8|f<<24)^l>>>7),y+=u>>>16,l=t[(L+14)%16],d+=(h=((f=e[(L+14)%16])>>>19|l<<13)^(l>>>29|f<<3)^(f>>>6|l<<26))>>>16,g+=65535&(u=(l>>>19|f<<13)^(f>>>29|l<<3)^l>>>6),y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,t[L]=65535&g|y<<16,e[L]=65535&p|d<<16}p=65535&(h=I),d=h>>>16,g=65535&(u=v),y=u>>>16,u=r[0],d+=(h=i[0])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,r[0]=v=65535&g|y<<16,i[0]=I=65535&p|d<<16,p=65535&(h=j),d=h>>>16,g=65535&(u=b),y=u>>>16,u=r[1],d+=(h=i[1])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,r[1]=b=65535&g|y<<16,i[1]=j=65535&p|d<<16,p=65535&(h=P),d=h>>>16,g=65535&(u=_),y=u>>>16,u=r[2],d+=(h=i[2])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,r[2]=_=65535&g|y<<16,i[2]=P=65535&p|d<<16,p=65535&(h=A),d=h>>>16,g=65535&(u=m),y=u>>>16,u=r[3],d+=(h=i[3])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,r[3]=m=65535&g|y<<16,i[3]=A=65535&p|d<<16,p=65535&(h=R),d=h>>>16,g=65535&(u=w),y=u>>>16,u=r[4],d+=(h=i[4])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,r[4]=w=65535&g|y<<16,i[4]=R=65535&p|d<<16,p=65535&(h=C),d=h>>>16,g=65535&(u=E),y=u>>>16,u=r[5],d+=(h=i[5])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,r[5]=E=65535&g|y<<16,i[5]=C=65535&p|d<<16,p=65535&(h=T),d=h>>>16,g=65535&(u=O),y=u>>>16,u=r[6],d+=(h=i[6])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,r[6]=O=65535&g|y<<16,i[6]=T=65535&p|d<<16,p=65535&(h=N),d=h>>>16,g=65535&(u=S),y=u>>>16,u=r[7],d+=(h=i[7])>>>16,g+=65535&u,y+=u>>>16,y+=(g+=(d+=(p+=65535&h)>>>16)>>>16)>>>16,r[7]=S=65535&g|y<<16,i[7]=N=65535&p|d<<16,a+=128,c-=128}return a}e.hash=function(t){var e=new s;e.update(t);var r=e.digest();return e.clean(),r}},1374:function(t,e,r){"use strict";(function(t){r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return i})),r.d(e,"c",(function(){return s}));const n=()=>"undefined"!==typeof t&&"undefined"!==typeof t.WebSocket?t.WebSocket:"undefined"!==typeof window&&"undefined"!==typeof window.WebSocket?window.WebSocket:r(1375),i=()=>"undefined"!==typeof window,s=t=>t.split("?")[0]}).call(this,r(72))},1375:function(t,e,r){"use strict";
vendor: 4,543 bytes, line 2
2t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},1376:function(t,e,r){(function(t,r){var n="__lodash_hash_undefined__",i=1,s=2,o=9007199254740991,a="[object Arguments]",c="[object Array]",u="[object AsyncFunction]",h="[object Boolean]",l="[object Date]",f="[object Error]",p="[object Function]",d="[object GeneratorFunction]",g="[object Map]",y="[object Number]",v="[object Null]",b="[object Object]",_="[object Promise]",m="[object Proxy]",w="[object RegExp]",E="[object Set]",O="[object String]",S="[object Symbol]",I="[object Undefined]",j="[object WeakMap]",P="[object ArrayBuffer]",A="[object DataView]",R=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[c]=T[P]=T[h]=T[A]=T[l]=T[f]=T[p]=T[g]=T[y]=T[b]=T[w]=T[E]=T[O]=T[j]=!1;var N="object"==typeof t&&t&&t.Object===Object&&t,x="object"==typeof self&&self&&self.Object===Object&&self,L=N||x||Function("return this")(),U=e&&!e.nodeType&&e,M=U&&"object"==typeof r&&r&&!r.nodeType&&r,D=M&&M.exports===U,k=D&&N.process,z=function(){try{return k&&k.binding&&k.binding("util")}catch(t){}}(),q=z&&z.isTypedArray;function H(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function V(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function K(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var B,G,F=Array.prototype,W=Function.prototype,Y=Object.prototype,J=L["__core-js_shared__"],X=W.toString,Z=Y.hasOwnProperty,Q=function(){var t=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),$=Y.toString,tt=RegExp("^"+X.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),et=D?L.Buffer:void 0,rt=L.Symbol,nt=L.Uint8Array,it=Y.propertyIsEnumerable,st=F.splice,ot=rt?rt.toStringTag:void 0,at=Object.getOwnPropertySymbols,ct=et?et.isBuffer:void 0,ut=(B=Object.keys,G=Object,function(t){return B(G(t))}),ht=kt(L,"DataView"),lt=kt(L,"Map"),ft=kt(L,"Promise"),pt=kt(L,"Set"),dt=kt(L,"WeakMap"),gt=kt(Object,"create"),yt=Vt(ht),vt=Vt(lt),bt=Vt(ft),_t=Vt(pt),mt=Vt(dt),wt=rt?rt.prototype:void 0,Et=wt?wt.valueOf:void 0;function Ot(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function St(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function It(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function jt(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new It;++e<r;)this.add(t[e])}function Pt(t){var e=this.__data__=new St(t);this.size=e.size}function At(t,e){var r=Gt(t),n=!r&&Bt(t),i=!r&&!n&&Ft(t),s=!r&&!n&&!i&&Zt(t),o=r||n||i||s,a=o?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=a.length;for(var u in t)!e&&!Z.call(t,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||s&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ht(u,c))||a.push(u);return a}function Rt(t,e){for(var r=t.length;r--;)if(Kt(t[r][0],e))return r;return-1}function Ct(t){return null==t?void 0===t?I:v:ot&&ot in Object(t)?function(t){var e=Z.call(t,ot),r=t[ot];try{t[ot]=void 0;var n=!0}catch(s){}var i=$.call(t);n&&(e?t[ot]=r:delete t[ot]);return i}(t):function(t){return $.call(t)}(t)}function Tt(t){return Xt(t)&&Ct(t)==a}function Nt(t,e,r,n,o){return t===e||(null==t||null==e||!Xt(t)&&!Xt(e)?t!==t&&e!==e:function(t,e,r,n,o,u){var p=Gt(t),d=Gt(e),v=p?c:qt(t),_=d?c:qt(e),m=(v=v==a?b:v)==b,I=(_=_==a?b:_)==b,j=v==_;if(j&&Ft(t)){if(!Ft(e))return!1;p=!0,m=!1}if(j&&!m)return u||(u=new Pt),p||Zt(t)?Ut(t,e,r,n,o,u):function(t,e,r,n,o,a,c){switch(r){case A:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case P:return!(t.byteLength!=e.byteLength||!a(new nt(t),new nt(e)));case h:case l:case y:return Kt(+t,+e);case f:return t.name==e.name&&t.message==e.message;case w:case O:return t==e+"";case g:var u=V;case E:var p=n&i;if(u||(u=K),t.size!=e.size&&!p)return!1;var d=c.get(t);if(d)return d==e;n|=s,c.set(t,e);var v=Ut(u(t),u(e),n,o,a,c);return c.delete(t),v;case S:if(Et)return Et.call(t)==Et.call(e)}return!1}(t,e,v,r,n,o,u);if(!(r&i)){var R=m&&Z.call(t,"__wrapped__"),C=I&&Z.call(e,"__wrapped__");
2if(R||C){var T=R?t.value():t,N=C?e.value():e;return u||(u=new Pt),o(T,N,r,n,u)}}if(!j)return!1;return u||(u=new Pt),function(t,e,r,n,s,o){var a=r&i,c=Mt(t),u=c.length,h=Mt(e),l=h.length;if(u!=l&&!a)return!1;var f=u;for(;f--;){var p=c[f];if(!(a?p in e:Z.call(e,p)))return!1}var d=o.get(t);if(d&&o.get(e))return d==e;var g=!0;o.set(t,e),o.set(e,t);var y=a;for(;++f<u;){var v=t[p=c[f]],b=e[p];if(n)var _=a?n(b,v,p,e,t,o):n(v,b,p,t,e,o);if(!(void 0===_?v===b||s(v,b,r,n,o):_)){g=!1;break}y||(y="constructor"==p)}if(g&&!y){var m=t.constructor,w=e.constructor;m==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof w&&w instanceof w||(g=!1)}return o.delete(t),o.delete(e),g}(t,e,r,n,o,u)}(t,e,r,n,Nt,o))}function xt(t){return!(!Jt(t)||function(t){return!!Q&&Q in t}(t))&&(Wt(t)?tt:R).test(Vt(t))}function Lt(t){if(!function(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||Y;return t===r}(t))return ut(t);var e=[];for(var r in Object(t))Z.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Ut(t,e,r,n,o,a){var c=r&i,u=t.length,h=e.length;if(u!=h&&!(c&&h>u))return!1;var l=a.get(t);if(l&&a.get(e))return l==e;var f=-1,p=!0,d=r&s?new jt:void 0;for(a.set(t,e),a.set(e,t);++f<u;){var g=t[f],y=e[f];if(n)var v=c?n(y,g,f,e,t,a):n(g,y,f,t,e,a);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!H(e,(function(t,e){if(i=e,!d.has(i)&&(g===t||o(g,t,r,n,a)))return d.push(e);var i}))){p=!1;break}}else if(g!==y&&!o(g,y,r,n,a)){p=!1;break}}return a.delete(t),a.delete(e),p}function Mt(t){return function(t,e,r){var n=e(t);return Gt(t)?n:function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}(n,r(t))}(t,Qt,zt)}function Dt(t,e){var r=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?r["string"==typeof e?"string":"hash"]:r.map}function kt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return xt(r)?r:void 0}Ot.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},Ot.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ot.prototype.get=function(t){var e=this.__data__;if(gt){var r=e[t];return r===n?void 0:r}return Z.call(e,t)?e[t]:void 0},Ot.prototype.has=function(t){var e=this.__data__;return gt?void 0!==e[t]:Z.call(e,t)},Ot.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gt&&void 0===e?n:e,this},St.prototype.clear=function(){this.__data__=[],this.size=0},St.prototype.delete=function(t){var e=this.__data__,r=Rt(e,t);return!(r<0)&&(r==e.length-1?e.pop():st.call(e,r,1),--this.size,!0)},St.prototype.get=function(t){var e=this.__data__,r=Rt(e,t);return r<0?void 0:e[r][1]},St.prototype.has=function(t){return Rt(this.__data__,t)>-1},St.prototype.set=function(t,e){var r=this.__data__,n=Rt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},It.prototype.clear=function(){this.size=0,this.__data__={hash:new Ot,map:new(lt||St),string:new Ot}},It.prototype.delete=function(t){var e=Dt(this,t).delete(t);return this.size-=e?1:0,e},It.prototype.get=function(t){return Dt(this,t).get(t)},It.prototype.has=function(t){return Dt(this,t).has(t)},It.prototype.set=function(t,e){var r=Dt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},jt.prototype.add=jt.prototype.push=function(t){return this.__data__.set(t,n),this},jt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.clear=function(){this.__data__=new St,this.size=0},Pt.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Pt.prototype.get=function(t){return this.__data__.get(t)},Pt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof St){var n=r.__data__;if(!lt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new It(n)}return r.set(t,e),this.size=r.size,this};var zt=at?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,s=[];++r<n;){var o=t[r];e(o,r,t)&&(s[i++]=o)}return s}(at(t),(function(e){return it.call(t,e)})))}:function(){return[]},qt=Ct;function Ht(t,e){return!!(e=null==e?o:e)&&("number"==typeof t||C.test(t))&&t>-1&&t%1==0&&t<e}function Vt(t){if(null!=t){try{return X.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function Kt(t,e){return t===e||t!==t&&e!==e}(ht&&qt(new ht(new ArrayBuffer(1)))!=A||lt&&qt(new lt)!=g||ft&&qt(ft.resolve())!=_||pt&&qt(new pt)!=E||dt&&qt(new dt)!=j)&&(qt=function(t){var e=Ct(t),r=e==b?t.constructor:void 0,n=r?Vt(r):"";if(n)switch(n){case yt:return A;case vt:return g;case bt:return _;case _t:return E;case mt:return j}return e});var Bt=Tt(function(){return arguments}())?Tt:function(t){return Xt(t)&&Z.call(t,"callee")&&!it.call(t,"callee")},Gt=Array.isArray;var Ft=ct||function(){return!1};function Wt(t){if(!Jt(t))return!1;var e=Ct(t);return e==p||e==d||e==u||e==m}function Yt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=o}function Jt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Xt(t){return null!=t&&"object"==typeof t}var Zt=q?function(t){return function(e){return t(e)}}(q):function(t){return Xt(t)&&Yt(t.length)&&!!T[Ct(t)]};function Qt(t){return null!=(e=t)&&Yt(e.length)&&!Wt(e)?At(t):Lt(t);var e}r.exports=function(t,e){return Nt(t,e)}}).call(this,r(72),r(200)(t))},1564:function(t,e,r){"use strict";r.d(e,"a",(function(){return Mr})),r.d(e,"b",(function(){return tn}));var n=r(332),i=r.n(n),s=r(1362),o=r.n(s),a=r(1367),c=r(850),u=r(1113);class h extends u.IEvents{constructor(t){super(),this.opts=t,this.protocol="wc",this.version=2}}class l extends u.IEvents{constructor(t,e){super(),this.core=t,this.logger=e,this.records=new Map}}class f{constructor(t,e){this.logger=t,this.core=e}}class p extends u.IEvents{constructor(t,e){super(),this.relayer=t,this.logger=e}}class d extends u.IEvents{constructor(t){super()}}class g{constructor(t,e,r,n){this.core=t,this.logger=e,this.name=r}}class y extends u.IEvents{constructor(t,e){super(),this.relayer=t,this.logger=e}}class v extends u.IEvents{constructor(t,e){super(),this.core=t,this.logger=e}}class b{constructor(t,e){this.projectId=t,this.logger=e}}i.a;class _{constructor(t){this.opts=t,this.protocol="wc",this.version=2}}n.EventEmitter;class m{constructor(t){this.client=t}}
2var w=r(722),E=r(1371),O=r(762),S=r(1021),I=r(701),j=r(902),P=r(682),A=r(1374);const R=Object(A.b)();var C=class{constructor(t){if(this.url=t,this.events=new n.EventEmitter,this.registering=!1,!Object(P.isWsUrl)(t))throw new Error("Provided URL is not compatible with WebSocket connection: ".concat(t));this.url=t}get connected(){return"undefined"!==typeof this.socket}get connecting(){return this.registering}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async open(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(t)}async close(){return new Promise(((t,e)=>{"undefined"!==typeof this.socket?(this.socket.onclose=e=>{this.onClose(e),t()},this.socket.close()):e(new Error("Connection already closed"))}))}async send(t,e){"undefined"===typeof this.socket&&(this.socket=await this.register());try{this.socket.send(Object(w.b)(t))}catch(r){this.onError(t.id,r)}}register(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;if(!Object(P.isWsUrl)(t))throw new Error("Provided URL is not compatible with WebSocket connection: ".concat(t));if(this.registering){const t=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),new Promise(((t,e)=>{this.events.once("register_error",(t=>{this.resetMaxListeners(),e(t)})),this.events.once("open",(()=>{if(this.resetMaxListeners(),"undefined"===typeof this.socket)return e(new Error("WebSocket connection is missing or invalid"));t(this.socket)}))}))}return this.url=t,this.registering=!0,new Promise(((e,r)=>{const n=Object(P.isReactNative)()?void 0:{rejectUnauthorized:!Object(P.isLocalhostUrl)(t)},i=new R(t,[],n);Object(A.a)()?i.onerror=t=>{const e=t;r(this.emitError(e.error))}:i.on("error",(t=>{r(this.emitError(t))})),i.onopen=()=>{this.onOpen(i),e(i)}}))}onOpen(t){t.onmessage=t=>this.onPayload(t),t.onclose=t=>this.onClose(t),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if("undefined"===typeof t.data)return;const e="string"===typeof t.data?Object(w.a)(t.data):t.data;this.events.emit("payload",e)}onError(t,e){const r=this.parseError(e),n=r.message||r.toString(),i=Object(P.formatJsonRpcError)(t,n);this.events.emit("payload",i)}parseError(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return Object(P.parseConnectionError)(t,Object(A.c)(e),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(t){const e=this.parseError(new Error((null===t||void 0===t?void 0:t.message)||"WebSocket connection failed for host: ".concat(Object(A.c)(this.url))));return this.events.emit("register_error",e),e}},T=C,N=r(1376),x=r.n(N);var L=function(t,e){if(t.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<t.length;i++){var s=t.charAt(i),o=s.charCodeAt(0);if(255!==r[o])throw new TypeError(s+" is ambiguous");r[o]=i}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function l(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return new Uint8Array;var e=0;if(" "!==t[e]){for(var n=0,i=0;t[e]===c;)n++,e++;for(var s=(t.length-e)*u+1>>>0,o=new Uint8Array(s);t[e];){var h=r[t.charCodeAt(e)];if(255===h)return;for(var l=0,f=s-1;(0!==h||l<i)&&-1!==f;f--,l++)h+=a*o[f]>>>0,o[f]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");i=l,e++}if(" "!==t[e]){for(var p=s-i;p!==s&&0===o[p];)p++;for(var d=new Uint8Array(n+(s-p)),g=n;p!==s;)d[g++]=o[p++];return d}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var r=0,n=0,i=0,s=e.length;i!==s&&0===e[i];)i++,r++;for(var o=(s-i)*h+1>>>0,u=new Uint8Array(o);i!==s;){for(var l=e[i],f=0,p=o-1;(0!==l||f<n)&&-1!==p;p--,f++)l+=256*u[p]>>>0,u[p]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");n=f,i++}for(var d=o-n;d!==o&&0===u[d];)d++;for(var g=c.repeat(r);d<o;++d)g+=t.charAt(u[d]);return g},decodeUnsafe:l,decode:function(t){var r=l(t);if(r)return r;throw new Error("Non-".concat(e," character"))}}},U=L;const M=t=>{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")};class D{constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(t));throw Error("Unknown type, must be binary type")}}class k{constructor(t,e,r){if(this.name=t,this.prefix=e,void 0===e.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=r}decode(t){if("string"==typeof t){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(t),", ").concat(this.name," decoder only supports input
2s prefixed with ").concat(this.prefix));return this.baseDecode(t.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(t){return q(this,t)}}class z{constructor(t){this.decoders=t}or(t){return q(this,t)}decode(t){const e=t[0],r=this.decoders[e];if(r)return r.decode(t);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(t),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}}const q=(t,e)=>new z({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class H{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new D(t,e,r),this.decoder=new k(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const V=t=>{let{name:e,prefix:r,encode:n,decode:i}=t;return new H(e,r,n,i)},K=t=>{let{prefix:e,name:r,alphabet:n}=t;const{encode:i,decode:s}=U(n,r);return V({prefix:e,name:r,encode:i,decode:t=>M(s(t))})},B=t=>{let{name:e,prefix:r,bitsPerChar:n,alphabet:i}=t;return V({prefix:r,name:e,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s})(t,i,n),decode:t=>((t,e,r,n)=>{const i={};for(let h=0;h<e.length;++h)i[e[h]]=h;let s=t.length;for(;"="===t[s-1];)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,u=0;for(let h=0;h<s;++h){const e=i[t[h]];if(void 0===e)throw new SyntaxError("Non-".concat(n," character"));c=c<<r|e,a+=r,a>=8&&(a-=8,o[u++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o})(t,i,n,e)})},G=V({prefix:"\0",name:"identity",encode:t=>(t=>(new TextDecoder).decode(t))(t),decode:t=>(t=>(new TextEncoder).encode(t))(t)});var F=Object.freeze({__proto__:null,identity:G});const W=B({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var Y=Object.freeze({__proto__:null,base2:W});const J=B({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var X=Object.freeze({__proto__:null,base8:J});const Z=K({prefix:"9",name:"base10",alphabet:"0123456789"});var Q=Object.freeze({__proto__:null,base10:Z});const $=B({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),tt=B({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var et=Object.freeze({__proto__:null,base16:$,base16upper:tt});const rt=B({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),nt=B({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),it=B({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),st=B({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ot=B({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),at=B({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),ct=B({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),ut=B({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ht=B({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var lt=Object.freeze({__proto__:null,base32:rt,base32upper:nt,base32pad:it,base32padupper:st,base32hex:ot,base32hexupper:at,base32hexpad:ct,base32hexpadupper:ut,base32z:ht});
2const ft=K({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),pt=K({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var dt=Object.freeze({__proto__:null,base36:ft,base36upper:pt});const gt=K({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),yt=K({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var vt=Object.freeze({__proto__:null,base58btc:gt,base58flickr:yt});const bt=B({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),_t=B({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),mt=B({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),wt=B({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Et=Object.freeze({__proto__:null,base64:bt,base64pad:_t,base64url:mt,base64urlpad:wt});const Ot=Array.from("\ud83d\ude80\ud83e\ude90\u2604\ud83d\udef0\ud83c\udf0c\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\ud83c\udf0d\ud83c\udf0f\ud83c\udf0e\ud83d\udc09\u2600\ud83d\udcbb\ud83d\udda5\ud83d\udcbe\ud83d\udcbf\ud83d\ude02\u2764\ud83d\ude0d\ud83e\udd23\ud83d\ude0a\ud83d\ude4f\ud83d\udc95\ud83d\ude2d\ud83d\ude18\ud83d\udc4d\ud83d\ude05\ud83d\udc4f\ud83d\ude01\ud83d\udd25\ud83e\udd70\ud83d\udc94\ud83d\udc96\ud83d\udc99\ud83d\ude22\ud83e\udd14\ud83d\ude06\ud83d\ude44\ud83d\udcaa\ud83d\ude09\u263a\ud83d\udc4c\ud83e\udd17\ud83d\udc9c\ud83d\ude14\ud83d\ude0e\ud83d\ude07\ud83c\udf39\ud83e\udd26\ud83c\udf89\ud83d\udc9e\u270c\u2728\ud83e\udd37\ud83d\ude31\ud83d\ude0c\ud83c\udf38\ud83d\ude4c\ud83d\ude0b\ud83d\udc97\ud83d\udc9a\ud83d\ude0f\ud83d\udc9b\ud83d\ude42\ud83d\udc93\ud83e\udd29\ud83d\ude04\ud83d\ude00\ud83d\udda4\ud83d\ude03\ud83d\udcaf\ud83d\ude48\ud83d\udc47\ud83c\udfb6\ud83d\ude12\ud83e\udd2d\u2763\ud83d\ude1c\ud83d\udc8b\ud83d\udc40\ud83d\ude2a\ud83d\ude11\ud83d\udca5\ud83d\ude4b\ud83d\ude1e\ud83d\ude29\ud83d\ude21\ud83e\udd2a\ud83d\udc4a\ud83e\udd73\ud83d\ude25\ud83e\udd24\ud83d\udc49\ud83d\udc83\ud83d\ude33\u270b\ud83d\ude1a\ud83d\ude1d\ud83d\ude34\ud83c\udf1f\ud83d\ude2c\ud83d\ude43\ud83c\udf40\ud83c\udf37\ud83d\ude3b\ud83d\ude13\u2b50\u2705\ud83e\udd7a\ud83c\udf08\ud83d\ude08\ud83e\udd18\ud83d\udca6\u2714\ud83d\ude23\ud83c\udfc3\ud83d\udc90\u2639\ud83c\udf8a\ud83d\udc98\ud83d\ude20\u261d\ud83d\ude15\ud83c\udf3a\ud83c\udf82\ud83c\udf3b\ud83d\ude10\ud83d\udd95\ud83d\udc9d\ud83d\ude4a\ud83d\ude39\ud83d\udde3\ud83d\udcab\ud83d\udc80\ud83d\udc51\ud83c\udfb5\ud83e\udd1e\ud83d\ude1b\ud83d\udd34\ud83d\ude24\ud83c\udf3c\ud83d\ude2b\u26bd\ud83e\udd19\u2615\ud83c\udfc6\ud83e\udd2b\ud83d\udc48\ud83d\ude2e\ud83d\ude46\ud83c\udf7b\ud83c\udf43\ud83d\udc36\ud83d\udc81\ud83d\ude32\ud83c\udf3f\ud83e\udde1\ud83c\udf81\u26a1\ud83c\udf1e\ud83c\udf88\u274c\u270a\ud83d\udc4b\ud83d\ude30\ud83e\udd28\ud83d\ude36\ud83e\udd1d\ud83d\udeb6\ud83d\udcb0\ud83c\udf53\ud83d\udca2\ud83e\udd1f\ud83d\ude41\ud83d\udea8\ud83d\udca8\ud83e\udd2c\u2708\ud83c\udf80\ud83c\udf7a\ud83e\udd13\ud83d\ude19\ud83d\udc9f\ud83c\udf31\ud83d\ude16\ud83d\udc76\ud83e\udd74\u25b6\u27a1\u2753\ud83d\udc8e\ud83d\udcb8\u2b07\ud83d\ude28\ud83c\udf1a\ud83e\udd8b\ud83d\ude37\ud83d\udd7a\u26a0\ud83d\ude45\ud83d\ude1f\ud83d\ude35\ud83d\udc4e\ud83e\udd32\ud83e\udd20\ud83e\udd27\ud83d\udccc\ud83d\udd35\ud83d\udc85\ud83e\uddd0\ud83d\udc3e\ud83c\udf52\ud83d\ude17\ud83e\udd11\ud83c\udf0a\ud83e\udd2f\ud83d\udc37\u260e\ud83d\udca7\ud83d\ude2f\ud83d\udc86\ud83d\udc46\ud83c\udfa4\ud83d\ude47\ud83c\udf51\u2744\ud83c\udf34\ud83d\udca3\ud83d\udc38\ud83d\udc8c\ud83d\udccd\ud83e\udd40\ud83e\udd22\ud83d\udc45\ud83d\udca1\ud83d\udca9\ud83d\udc50\ud83d\udcf8\ud83d\udc7b\ud83e\udd10\ud83e\udd2e\ud83c\udfbc\ud83e\udd75\ud83d\udea9\ud83c\udf4e\ud83c\udf4a\ud83d\udc7c\ud83d\udc8d\ud83d\udce3\ud83e\udd42"),St=Ot.reduce(((t,e,r)=>(t[r]=e,t)),[]),It=Ot.reduce(((t,e,r)=>(t[e.codePointAt(0)]=r,t)),[]);const jt=V({prefix:"\ud83d\ude80",name:"base256emoji",encode:function(t){return t.reduce(((t,e)=>t+=St[e]),"")},decode:function(t){const e=[];for(const r of t){const t=It[r.codePointAt(0)];if(void 0===t)throw new Error("Non-base256emoji character: ".concat(r));e.push(t)}return new Uint8Array(e)}});var Pt=Object.freeze({__proto__:null,base256emoji:jt}),At=function t(e,r,n){r=r||[];for(var i=n=n||0;e>=Tt;)r[n++]=255&e|Rt,e/=128;for(;e&Ct;)r[n++]=255&e|Rt,e>>>=7;return r[n]=0|e,t.bytes=n-i+1,r},Rt=128,Ct=-128,Tt=Math.pow(2,31);var Nt=function t(e,r){var n,i=0,s=0,o=r=r||0,a=e.length;do{if(o>=a)throw t.bytes=0,new RangeError("Could not decode varint");n=e[o++],i+=s<28?(n&Lt)<<s:(n&Lt)*Math.pow(2,s),s+=7}while(n>=xt);return t.bytes=o-r,i},xt=128,Lt=127;var Ut=Math.pow(2,7),Mt=Math.pow(2,14),Dt=Math.pow(2,21),kt=Math.pow(2,28),zt=M
2ath.pow(2,35),qt=Math.pow(2,42),Ht=Math.pow(2,49),Vt=Math.pow(2,56),Kt=Math.pow(2,63),Bt={encode:At,decode:Nt,encodingLength:function(t){return t<Ut?1:t<Mt?2:t<Dt?3:t<kt?4:t<zt?5:t<qt?6:t<Ht?7:t<Vt?8:t<Kt?9:10}};const Gt=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Bt.encode(t,e,r),e},Ft=t=>Bt.encodingLength(t),Wt=(t,e)=>{const r=e.byteLength,n=Ft(t),i=n+Ft(r),s=new Uint8Array(i+r);return Gt(t,s,0),Gt(r,s,n),s.set(e,i),new Yt(t,r,e,s)};class Yt{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}const Jt=t=>{let{name:e,code:r,encode:n}=t;return new Xt(e,r,n)};class Xt{constructor(t,e,r){this.name=t,this.code=e,this.encode=r}digest(t){if(t instanceof Uint8Array){const e=this.encode(t);return e instanceof Uint8Array?Wt(this.code,e):e.then((t=>Wt(this.code,t)))}throw Error("Unknown type, must be binary type")}}const Zt=t=>async e=>new Uint8Array(await crypto.subtle.digest(t,e)),Qt=Jt({name:"sha2-256",code:18,encode:Zt("SHA-256")}),$t=Jt({name:"sha2-512",code:19,encode:Zt("SHA-512")});Object.freeze({__proto__:null,sha256:Qt,sha512:$t});const te=M,ee={code:0,name:"identity",encode:te,digest:t=>Wt(0,te(t))};Object.freeze({__proto__:null,identity:ee});new TextEncoder,new TextDecoder;const re={...F,...Y,...X,...Q,...et,...lt,...dt,...vt,...Et,...Pt};function ne(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}function ie(t,e,r,n){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:n}}}const se=ie("utf8","u",(t=>"u"+new TextDecoder("utf8").decode(t)),(t=>(new TextEncoder).encode(t.substring(1)))),oe=ie("ascii","a",(t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}),(t=>{const e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?ne(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}((t=t.substring(1)).length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e})),ae={utf8:se,"utf-8":se,hex:re.base16,latin1:oe,ascii:oe,binary:oe,...re};const ce="core",ue="".concat("wc","@2:").concat(ce,":"),he="error",le={database:":memory:"},fe="client_ed25519_seed",pe=I.ONE_DAY,de=I.SIX_HOURS,ge="wss://relay.walletconnect.com",ye="wss://relay.walletconnect.org",ve="relayer_message",be="relayer_message_ack",_e="relayer_connect",me="relayer_disconnect",we="relayer_error",Ee="relayer_connection_stalled",Oe="relayer_transport_closed",Se="relayer_publish",Ie="payload",je="connect",Pe="disconnect",Ae="error",Re=I.ONE_SECOND/2,Ce="subscription_created",Te="subscription_deleted",Ne="subscription_sync",xe="subscription_resubscribed",Le=(I.THIRTY_DAYS,1e3*I.FIVE_SECONDS),Ue=(I.THIRTY_DAYS,{wc_pairingDelete:{req:{ttl:I.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:I.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:I.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:I.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:I.ONE_DAY,prompt:!1,tag:0},res:{ttl:I.ONE_DAY,prompt:!1,tag:0}}}),Me="history_created",De="history_updated",ke="history_deleted",ze="history_sync",qe="expirer_created",He="expirer_deleted",Ve="expirer_expired",Ke="expirer_sync",Be=(I.ONE_DAY,"verify-api"),Ge="https://verify.walletconnect.com";class Fe{constructor(t,e){this.core=t,this.logger=e,this.keychain=new Map,this.name="keychain",this.version="0.3",this.initialized=!1,this.storagePrefix=ue,this.init=async()=>{if(!this.initialized){const t=await this.getKeyChain();typeof t<"u"&&(this.keychain=t),this.initialized=!0}},this.has=t=>(this.isInitialized(),this.keychain.has(t)),this.set=async(t,e)=>{this.isInitialized(),this.keychain.set(t,e),await this.persist()},this.get=t=>{this.isInitialized();const e=this.keychain.get(t);if(typeof e>"u"){const{message:e}=Object(O.t)("NO_MATCHING_KEY","".concat(this.name,": ").concat(t));throw new Error(e)}return e},this.del=async t=>{this.isInitialized(),this.keychain.delete(t),await this.persist()},this.core=t,this.logger=Object(c.generateChildLogger)(e,this.name)}get context(){return Object(c.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setKeyChain(t){await this.core.storage.setItem(this.storageKey,Object(O.fb)(t))}async getKeyChain(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?Object(O.hb)(t):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}}class We{constructor(t,e,r){this.core=t,this.logger=e,this.name="crypto",this.initialized=!1,this.init=async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)},this.hasKeys=t=>(this.isInitialized(),this.keychain.has(t)),this.getClientId=async()=>{this.isInitialized();const t=await this.getClientSeed(),e=E.generateKeyPair(t);return E.encodeIss(e.publicKey)},this.generateKeyPair=()=>{this.isInitialized();const t=Object(O.p)();return this.setPrivateKey(t.publicKey,t.privateKey)},this.signJWT=async t=>{this.isInitialized();const e=await this.getClientSeed(),r=E.generateKeyPair(e),n=Object(O.q)(),i=pe;return await E.signJWT(n,t,i,r)},this.generateSharedKey=(t,e,r)=>{this.isInitialized();const n=this.getPrivateKey(t),i=Object(O.h)(n,e);return this.setSymKey(i,r)},this.setSymKey=async(t,e)=>{this.isInitialized();const r=e||Object(O.z)(t);return await this.keychain.set(r,t),r},this.deleteKeyPair=async t=>{this.isInitialized(),await this.keychain.del(t)},this.deleteSymKey=async t=>{this.isInitialized(),await this.keychain.del(t)},this.encode=async(t,e,r)=>{this.isInitialized();const n=Object(O.mb)(r),i=Object(w.b)(e);if(Object(O.K)(n)){const e=n.senderPublicKey,r=n.receiverPublicKey;t=await this.generateSharedKey(e,r)}const s=this.getSymKey(t),{type:o,senderPublicKey:a}=n;return Object(O.j)({type:o,symKey:s,message:i,senderPublicKey:a})},this.decode=async(t,e,r)=>{this.isInitialized();const n=Object(O.lb)(e,r);if(Object(O.K)(n)){const e=n.receiverPublicKey,r=n.senderPublicKey;t=await this.generateSharedKey(e,r)}const i=this.getSymKey(t),s=Object(O.g)({symKey:i,encoded:e});return Object(w.a)(s)},this.getPayloadType=t=>{const e=Object(O.i)(t);return Object(O.f)(e.type)},this.getPayloadSenderPublicKey=t=>{const e=Object(O.i)(t);return e.senderPublicKey?Object(S.toString)(e.senderPublicKey,O.a):void 0},this.core=t,this.logger=Object(c.generateChildLogger)(e,this.name),this.keychain=r||new Fe(this.core,this.logger)}get context(){return Object(c.getLoggerContext)(this.logger)}async setPrivateKey(t,e){return await this.keychain.set(t,e),t}getPrivateKey(t){return this.keychain.get(t)}async getClientSeed(){let t="";try{t=this.keychain.get(fe)}catch{t=Object(O.q)(),await this.keychain.set(fe,t)}return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";const r=ae[e];if(!r)throw new Error('Unsupported encoding "'.concat(e,'"'));return"utf8"!==e&&"utf-8"!==e||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode("".concat(r.prefix).concat(t)):ne(globalThis.Buffer.from(t,"utf-8"))}(t,"base16")}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}}class Ye extends f{constructor(t,e){super(t,e),this.logger=t,this.core=e,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=ue,this.init=async()=>
2{if(!this.initialized){this.logger.trace("Initialized");try{const t=await this.getRelayerMessages();typeof t<"u"&&(this.messages=t),this.logger.debug("Successfully Restored records for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(t){this.logger.debug("Failed to Restore records for ".concat(this.name)),this.logger.error(t)}finally{this.initialized=!0}}},this.set=async(t,e)=>{this.isInitialized();const r=Object(O.A)(e);let n=this.messages.get(t);return typeof n>"u"&&(n={}),typeof n[r]<"u"||(n[r]=e,this.messages.set(t,n),await this.persist()),r},this.get=t=>{this.isInitialized();let e=this.messages.get(t);return typeof e>"u"&&(e={}),e},this.has=(t,e)=>{this.isInitialized();return typeof this.get(t)[Object(O.A)(e)]<"u"},this.del=async t=>{this.isInitialized(),this.messages.delete(t),await this.persist()},this.logger=Object(c.generateChildLogger)(t,this.name),this.core=e}get context(){return Object(c.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}async setRelayerMessages(t){await this.core.storage.setItem(this.storageKey,Object(O.fb)(t))}async getRelayerMessages(){const t=await this.core.storage.getItem(this.storageKey);return typeof t<"u"?Object(O.hb)(t):void 0}async persist(){await this.setRelayerMessages(this.messages)}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}}class Je extends p{constructor(t,e){super(t,e),this.relayer=t,this.logger=e,this.events=new n.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=Object(I.toMiliseconds)(I.TEN_SECONDS),this.queueTimeout=Object(I.toMiliseconds)(I.FIVE_SECONDS),this.needsTransportRestart=!1,this.publish=async(t,e,r)=>{this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:t,message:e,opts:r}});try{const n=(null===r||void 0===r?void 0:r.ttl)||de,i=Object(O.v)(r),s=(null===r||void 0===r?void 0:r.prompt)||!1,o=(null===r||void 0===r?void 0:r.tag)||0,a=(null===r||void 0===r?void 0:r.id)||Object(P.getBigIntRpcId)().toString(),c={topic:t,message:e,opts:{ttl:n,relay:i,prompt:s,tag:o,id:a}},u=setTimeout((()=>this.queue.set(a,c)),this.queueTimeout);try{await await Object(O.e)(this.rpcPublish(t,e,n,i,s,o,a),this.publishTimeout),clearTimeout(u),this.relayer.events.emit(Se,c)}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:t,message:e,opts:r}})}catch(n){throw this.logger.debug("Failed to Publish Payload"),this.logger.error(n),n}},this.on=(t,e)=>{this.events.on(t,e)},this.once=(t,e)=>{this.events.once(t,e)},this.off=(t,e)=>{this.events.off(t,e)},this.removeListener=(t,e)=>{this.events.removeListener(t,e)},this.relayer=t,this.logger=Object(c.generateChildLogger)(e,this.name),this.registerEventListeners()}get context(){return Object(c.getLoggerContext)(this.logger)}rpcPublish(t,e,r,n,i,s,o){var a,c,u,h;const l={method:Object(O.u)(n.protocol).publish,params:{topic:t,message:e,ttl:r,prompt:i,tag:s},id:o};return Object(O.L)(null==(a=l.params)?void 0:a.prompt)&&(null==(c=l.params)||delete c.prompt),Object(O.L)(null==(u=l.params)?void 0:u.tag)&&(null==(h=l.params)||delete h.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:l}),this.relayer.request(l)}onPublish(t){this.queue.delete(t)}checkQueue(){this.queue.forEach((async t=>{const{topic:e,message:r,opts:n}=t;await this.publish(e,r,n)}))}registerEventListeners(){this.relayer.core.heartbeat.on(a.HEARTBEAT_EVENTS.pulse,(()=>{if(this.needsTransportRestart)return this.needsTransportRestart=!1,void this.relayer.events.emit(Ee);this.checkQueue()})),this.relayer.on(be,(t=>{this.onPublish(t.id.toString())}))}}class Xe{constructor(){this.map=new Map,this.set=(t,e)=>{const r=this.get(t);this.exists(t,e)||this.map.set(t,[...r,e])},this.get=t=>this.map.get(t)||[],this.exists=(t,e)=>this.get(t).includes(e),this.delete=(t,e)=>{if(typeof e>"u")return void this.map.delete(t);if(!this.map.has(t))return;const r=this.get(t);if(!this.exists(t,e))return;const n=r.filter((t=>t!==e));n.length?this.map.set(t,n):this.map.delete(t)},this.clear=()=>{this.map.clear()}}
2get topics(){return Array.from(this.map.keys())}}var Ze=Object.defineProperty,Qe=Object.defineProperties,$e=Object.getOwnPropertyDescriptors,tr=Object.getOwnPropertySymbols,er=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,nr=(t,e,r)=>e in t?Ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ir=(t,e)=>{for(var r in e||(e={}))er.call(e,r)&&nr(t,r,e[r]);if(tr)for(var r of tr(e))rr.call(e,r)&&nr(t,r,e[r]);return t},sr=(t,e)=>Qe(t,$e(e));class or extends y{constructor(t,e){super(t,e),this.relayer=t,this.logger=e,this.subscriptions=new Map,this.topicMap=new Xe,this.events=new n.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=ue,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(t,e)=>{await this.restartToComplete(),this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:t,opts:e}});try{const r=Object(O.v)(e),n={topic:t,relay:r};this.pending.set(t,n);const i=await this.rpcSubscribe(t,r);return this.onSubscribe(i,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:t,opts:e}}),i}catch(r){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(r),r}},this.unsubscribe=async(t,e)=>{await this.restartToComplete(),this.isInitialized(),typeof(null===e||void 0===e?void 0:e.id)<"u"?await this.unsubscribeById(t,e.id,e):await this.unsubscribeByTopic(t,e)},this.isSubscribed=async t=>!!this.topics.includes(t)||await new Promise(((e,r)=>{const n=new I.Watch;n.start(this.pendingSubscriptionWatchLabel);const i=setInterval((()=>{!this.pending.has(t)&&this.topics.includes(t)&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),e(!0)),n.elapsed(this.pendingSubscriptionWatchLabel)>=Le&&(clearInterval(i),n.stop(this.pendingSubscriptionWatchLabel),r(new Error("Subscription resolution timeout")))}),this.pollingInterval)})).catch((()=>!1)),this.on=(t,e)=>{this.events.on(t,e)},this.once=(t,e)=>{this.events.once(t,e)},this.off=(t,e)=>{this.events.off(t,e)},this.removeListener=(t,e)=>{this.events.removeListener(t,e)},this.restart=async()=>{this.restartInProgress=!0,await this.restore(),await this.reset(),this.restartInProgress=!1},this.relayer=t,this.logger=Object(c.generateChildLogger)(e,this.name),this.clientId=""}get context(){return Object(c.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(t,e){let r=!1;try{r=this.getSubscription(t).topic===e}catch{}return r}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(t,e){const r=this.topicMap.get(t);await Promise.all(r.map((async r=>await this.unsubscribeById(t,r,e))))}async unsubscribeById(t,e,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:e,opts:r}});try{const n=Object(O.v)(r);await this.rpcUnsubscribe(t,e,n);const i=Object(O.x)("USER_DISCONNECTED","".concat(this.name,", ").concat(t));await this.onUnsubscribe(t,e,i),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:e,opts:r}})}catch(n){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(n),n}}async rpcSubscribe(t,e){const r={method:Object(O.u)(e.protocol).subscribe,params:{topic:t}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{await await Object(O.e)(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(Ee)}return Object(O.A)(t+this.clientId)}async rpcBatchSubscribe(t){if(!t.length)return;const e=t[0].relay,r={method:Object(O.u)(e.protocol).batchSubscribe,params:{topics:t.map((t=>t.topic))}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{return await await Object(O.e)(this.relayer.request(r),this.subscribeTimeout)}catch{this.logger.debug("Outgoing Relay Payload stalled"),this.relayer.events.emit(Ee)}}rpcUnsubscribe(t,e,r){const n={method:Object(O.u)(r.protocol).unsubscribe,params:{topic:t,i
2d:e}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:n}),this.relayer.request(n)}onSubscribe(t,e){this.setSubscription(t,sr(ir({},e),{id:t})),this.pending.delete(e.topic)}onBatchSubscribe(t){t.length&&t.forEach((t=>{this.setSubscription(t.id,ir({},t)),this.pending.delete(t.topic)}))}async onUnsubscribe(t,e,r){this.events.removeAllListeners(e),this.hasSubscription(e,t)&&this.deleteSubscription(e,r),await this.relayer.messages.del(t)}async setRelayerSubscriptions(t){await this.relayer.core.storage.setItem(this.storageKey,t)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(t,e){this.subscriptions.has(t)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:e}),this.addSubscription(t,e))}addSubscription(t,e){this.subscriptions.set(t,ir({},e)),this.topicMap.set(e.topic,t),this.events.emit(Ce,e)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const e=this.subscriptions.get(t);if(!e){const{message:e}=Object(O.t)("NO_MATCHING_KEY","".concat(this.name,": ").concat(t));throw new Error(e)}return e}deleteSubscription(t,e){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:e});const r=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(r.topic,t),this.events.emit(Te,sr(ir({},r),{reason:e}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(Ne)}async reset(){if(this.cached.length){const t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let e=0;e<t;e++){const t=this.cached.splice(0,this.batchSubscribeTopicsLimit);await this.batchSubscribe(t)}}this.events.emit(xe)}async restore(){try{const t=await this.getRelayerSubscriptions();if(typeof t>"u"||!t.length)return;if(this.subscriptions.size){const{message:t}=Object(O.t)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),this.logger.error("".concat(this.name,": ").concat(JSON.stringify(this.values))),new Error(t)}this.cached=t,this.logger.debug("Successfully Restored subscriptions for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(t){this.logger.debug("Failed to Restore subscriptions for ".concat(this.name)),this.logger.error(t)}}async batchSubscribe(t){if(!t.length)return;const e=await this.rpcBatchSubscribe(t);Object(O.M)(e)&&this.onBatchSubscribe(e.map(((e,r)=>sr(ir({},t[r]),{id:e}))))}async onConnect(){this.restartInProgress||(await this.restart(),this.onEnable())}onDisconnect(){this.onDisable()}async checkPending(){if(this.relayer.transportExplicitlyClosed)return;const t=[];this.pending.forEach((e=>{t.push(e)})),await this.batchSubscribe(t)}registerEventListeners(){this.relayer.core.heartbeat.on(a.HEARTBEAT_EVENTS.pulse,(async()=>{await this.checkPending()})),this.relayer.on(_e,(async()=>{await this.onConnect()})),this.relayer.on(me,(()=>{this.onDisconnect()})),this.events.on(Ce,(async t=>{const e=Ce;this.logger.info("Emitting ".concat(e)),this.logger.debug({type:"event",event:e,data:t}),await this.persist()})),this.events.on(Te,(async t=>{const e=Te;this.logger.info("Emitting ".concat(e)),this.logger.debug({type:"event",event:e,data:t}),await this.persist()}))}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}async restartToComplete(){this.restartInProgress&&await new Promise((t=>{const e=setInterval((()=>{this.restartInProgress||(clearInterval(e),t())}),this.pollingInterval)}))}}var ar=Object.defineProperty,cr=Object.getOwnPropertySymbols,ur=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable,lr=(t,e,r)=>e in t?ar(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;class fr extends d{constructor(t){super(t),this.protocol="wc",this.version=2,this.events=new n.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["s
2ocket hang up","socket stalled"],this.request=async t=>{this.logger.debug("Publishing Request Payload");try{return await this.toEstablishConnection(),await this.provider.request(t)}catch(e){throw this.logger.debug("Failed to Publish Request"),this.logger.error(e),e}},this.core=t.core,this.logger=typeof t.logger<"u"&&"string"!=typeof t.logger?Object(c.generateChildLogger)(t.logger,this.name):Object(c.pino)(Object(c.getDefaultLoggerOptions)({level:t.logger||"error"})),this.messages=new Ye(this.logger,t.core),this.subscriber=new or(this,this.logger),this.publisher=new Je(this,this.logger),this.relayUrl=(null===t||void 0===t?void 0:t.relayUrl)||ge,this.projectId=t.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 ".concat(this.relayUrl," failed, attempting to connect via failover domain ").concat(ye,"...")),await this.restartTransport(ye)}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)}),1e4)}get context(){return Object(c.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}async publish(t,e,r){this.isInitialized(),await this.publisher.publish(t,e,r),await this.recordMessageEvent({topic:t,message:e,publishedAt:Date.now()})}async subscribe(t,e){var r;this.isInitialized();let n=(null==(r=this.subscriber.topicMap.get(t))?void 0:r[0])||"";return n||(await Promise.all([new Promise((e=>{this.subscriber.once(Ce,(r=>{r.topic===t&&e()}))})),new Promise((async r=>{n=await this.subscriber.subscribe(t,e),r()}))]),n)}async unsubscribe(t,e){this.isInitialized(),await this.subscriber.unsubscribe(t,e)}on(t,e){this.events.on(t,e)}once(t,e){this.events.once(t,e)}off(t,e){this.events.off(t,e)}removeListener(t,e){this.events.removeListener(t,e)}async transportClose(){this.transportExplicitlyClosed=!0,this.connected&&(await this.provider.disconnect(),this.events.emit(Oe))}async transportOpen(t){if(this.transportExplicitlyClosed=!1,!this.reconnecting){this.relayUrl=t||this.relayUrl,this.reconnecting=!0;try{await Promise.all([new Promise((t=>{this.initialized||t(),this.subscriber.once(xe,(()=>{t()}))})),await Promise.race([new Promise((async(t,e)=>{await Object(O.e)(this.provider.connect(),5e3,"Socket stalled when trying to connect to ".concat(this.relayUrl)).catch((t=>e(t))).then((()=>t())).finally((()=>this.removeListener(Oe,this.rejectTransportOpen)))})),new Promise((t=>this.once(Oe,this.rejectTransportOpen)))])])}catch(e){this.logger.error(e);const t=e;if(!this.isConnectionStalled(t.message))throw e;this.events.emit(Oe)}finally{this.reconnecting=!1}}}async restartTransport(t){this.transportExplicitlyClosed||this.reconnecting||(this.relayUrl=t||this.relayUrl,this.connected&&await Promise.all([new Promise((t=>{this.provider.once(Pe,(()=>{t()}))})),this.transportClose()]),await this.createProvider(),await this.transportOpen())}isConnectionStalled(t){return this.staleConnectionErrors.some((e=>t.includes(e)))}rejectTransportOpen(){throw new Error("Attempt to connect to relay via `transportOpen` has stalled. Retrying...")}async createProvider(){const t=await this.core.crypto.signJWT(this.relayUrl);this.provider=new j.a(new T(Object(O.m)({sdkVersion:"2.9.0",protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:t,useOnCloseEvent:!0}))),this.registerProviderListeners()}async recordMessageEvent(t){const{topic:e,message:r}=t;await this.messages.set(e,r)}async shouldIgnoreMessageEvent(t){const{topic:e,message:r}=t;return!await this.subscriber.isSubscribed(e)||this.messages.has(e,r)}async onProviderPayload(t){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:t}),Object(P.isJsonRpcRequest)(t)){if(!t.method.endsWith("_subscription"))return;const e=t.params,{topic:r,message:n,publishedAt:i}=e.data,s={topic:r,message:n,publishedAt:i};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(((t,e)=>{for(var r in e||(e={}))ur.call(e,r)&&lr(t,r,e[r]);if(cr)for(var r of cr(e))hr.call(e,r)&&lr(t,r,e[r]);return t})({type:"event",event:e.id},s)),this.events.emit(e.id,s),await this.acknowledgePayload(t),await this.onMessageEvent(s)}else Object(P.isJsonRpcResponse)(t)&&this.events.emit(be,t)}async onMessageEvent(t){await this.shouldIgnoreMessageEvent(t)||(this.events.emit(ve,t),await this.recordMessageEvent(t))}async acknowledgePayload(t){const e=Object(P.formatJsonRpcResult)(t.id,!0);await this.provider.connection.send(e)}registerProviderListeners(){this.provider.on(Ie,(t=>this.onProviderPayload(t))),this.provider.on(je,(()=>{this.events.emit(_e)})),this.provider.on(Pe,(()=>{this.onProviderDisconnect()})),this.provider.on(Ae,(t=>{this.logger.error(t),this.events.emit(we,t)}))}registerEventListeners(){this.events.on(Ee,(async()=>{await this.restartTransport()}))}onProviderDisconnect(){this.events.emit(me),this.attemptToReconnect()}attemptToReconnect(){this.transportExplicitlyClosed||setTimeout((async()=>{await this.restartTransport()}),Object(I.toMiliseconds)(Re))}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}async toEstablishConnection(){if(!this.connected){if(this.connecting)return await new Promise((t=>{const e=setInterval((()=>{this.connected&&(clearInterval(e),t())}),this.connectionStatusPollingInterval)}));await this.restartTransport()}}}var pr=Object.defineProperty,dr=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,yr=Object.prototype.propertyIsEnumerable,vr=(t,e,r)=>e in t?pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,br=(t,e)=>{for(var r in e||(e={}))gr.call(e,r)&&vr(t,r,e[r]);if(dr)for(var r of dr(e))yr.call(e,r)&&vr(t,r,e[r]);return t};class _r extends g{constructor(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ue,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;super(t,e,r,n),this.core=t,this.logger=e,this.name=r,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ue,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(
2),this.cached.forEach((t=>{this.getKey&&null!==t&&!Object(O.L)(t)?this.map.set(this.getKey(t),t):Object(O.G)(t)?this.map.set(t.id,t):Object(O.J)(t)&&this.map.set(t.topic,t)})),this.cached=[],this.initialized=!0)},this.set=async(t,e)=>{this.isInitialized(),this.map.has(t)?await this.update(t,e):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:t,value:e}),this.map.set(t,e),await this.persist())},this.get=t=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:t}),this.getData(t)),this.getAll=t=>(this.isInitialized(),t?this.values.filter((e=>Object.keys(t).every((r=>x()(e[r],t[r]))))):this.values),this.update=async(t,e)=>{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:t,update:e});const r=br(br({},this.getData(t)),e);this.map.set(t,r),await this.persist()},this.delete=async(t,e)=>{this.isInitialized(),this.map.has(t)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:t,reason:e}),this.map.delete(t),await this.persist())},this.logger=Object(c.generateChildLogger)(e,this.name),this.storagePrefix=n,this.getKey=i}get context(){return Object(c.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(t){await this.core.storage.setItem(this.storageKey,t)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(t){const e=this.map.get(t);if(!e){const{message:e}=Object(O.t)("NO_MATCHING_KEY","".concat(this.name,": ").concat(t));throw this.logger.error(e),new Error(e)}return e}async persist(){await this.setDataStore(this.values)}async restore(){try{const t=await this.getDataStore();if(typeof t>"u"||!t.length)return;if(this.map.size){const{message:t}=Object(O.t)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=t,this.logger.debug("Successfully Restored value for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(t){this.logger.debug("Failed to Restore value for ".concat(this.name)),this.logger.error(t)}}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}}class mr{constructor(t,e){this.core=t,this.logger=e,this.name="pairing",this.version="0.3",this.events=new i.a,this.initialized=!1,this.storagePrefix=ue,this.ignoredPayloadTypes=[O.b],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=t=>{let{methods:e}=t;this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]},this.create=async()=>{this.isInitialized();const t=Object(O.q)(),e=await this.core.crypto.setSymKey(t),r=Object(O.c)(I.FIVE_MINUTES),n={protocol:"irn"},i={topic:e,expiry:r,relay:n,active:!1},s=Object(O.o)({protocol:this.core.protocol,version:this.core.version,topic:e,symKey:t,relay:n});return await this.pairings.set(e,i),await this.core.relayer.subscribe(e),this.core.expirer.set(e,r),{topic:e,uri:s}},this.pair=async t=>{this.isInitialized(),this.isValidPair(t);const{topic:e,symKey:r,relay:n}=Object(O.kb)(t.uri);if(this.pairings.keys.includes(e))throw new Error("Pairing already exists: ".concat(e));if(this.core.crypto.hasKeys(e))throw new Error("Keychain already exists: ".concat(e));const i=Object(O.c)(I.FIVE_MINUTES),s={topic:e,relay:n,expiry:i,active:!1};return await this.pairings.set(e,s),await this.core.crypto.setSymKey(r,e),await this.core.relayer.subscribe(e,{relay:n}),this.core.expirer.set(e,i),t.activatePairing&&await this.activate({topic:e}),s},this.activate=async t=>{let{topic:e}=t;this.isInitialized();const r=Object(O.c)(I.THIRTY_DAYS);await this.pairings.update(e,{active:!0,expiry:r}),this.core.expirer.set(e,r)},this.ping=async t=>{this.isInitialized(),await this.isValidPing(t);const{topic:e}=t;if(this.pairings.keys.includes(e)){const t=await this.sendRequest(e,"wc_pairingPing",{}),{done:r,resolve:n,reject:i}=Object(O.d)();this.events.once(Object(O.k)("pairing_ping",t),(t=>{let{error:e}=t;e?i(e):n()})),await r()}},this.updateExpiry=async t=>{let{topic:e,expiry:r}=t;this.isInitialized(),await this.pairings.update(e,{expiry:r})},this.updateMetadata=async t=>{let{topic:e,metadata:r}=t;this.isInitialized(),await this.pairings.update(e,{peerMetadata:r})},this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=async t=>{this.isInitialized(),await this.isValidDisconnect(t);const{topic:e}=t;this.pairings.keys.includes(e)&&(await this.sendRequest(e,"wc_pairingDelete",Object(O.x)("USER_DISCONNECTED")),await this.deletePairing(e))},this.sendRequest=async(t,e,r)=>{const n=Object(P.formatJsonRpcRequest)(e,r),i=await this.core.crypto.encode(t,n),s=Ue[e].req;return this.core.history.set(t,n),this.core.relayer.publish(t,i,s),n.id},this.sendResult=async(t,e,r)=>{const n=Object(P.formatJsonRpcResult)(t,r),i=await this.core.crypto.encode(e,n),s=await this.core.history.get(e,t),o=Ue[s.request.method].res;await this.core.relayer.publish(e,i,o),await this.core.history.resolve(n)},this.sendError=async(t,e,r)=>{const n=Object(P.formatJsonRpcError)(t,r),i=await this.core.crypto.encode(e,n),s=await this.core.history.get(e,t),o=Ue[s.request.method]?Ue[s.request.method].res:Ue.unregistered_method.res;await this.core.relayer.publish(e,i,o),await this.core.history.resolve(n)},this.deletePairing=async(t,e)=>{await this.core.relayer.unsubscribe(t),await Promise.all([this.pairings.delete(t,Object(O.x)("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(t),e?Promise.resolve():this.core.expirer.del(t)])},this.cleanup=async()=>{const t=this.pairings.getAll().filter((t=>Object(O.E)(t.expiry)));await Promise.all(t.map((t=>this.deletePairing(t.topic))))},this.onRelayEventRequest=t=>{const{topic:e,payload:r}=t,n=r.method;if(this.pairings.keys.includes(e))switch(n){case"wc_pairingPing":return this.onPairingPingRequest(e,r);case"wc_pairingDelete":return this.onPairingDeleteRequest(e,r);default:return this.onUnknownRpcMethodRequest(e,r)}},this.onRelayEventResponse=async t=>{const{topic:e,payload:r}=t,n=(await this.core.history.get(e,r.id)).request.method;if(this.pairings.keys.includes(e)){if("wc_pairingPing"===n)return this.onPairingPingResponse(e,r);return this.onUnknownRpcMethodResponse(n)}},this.onPairingPingRequest=async(t,e)=>{const{id:r}=e;try{this.isValidPing({topic:t}),await this.sendResult(r,t,!0),this.events.emit("pairing_ping",{id:r,topic:t})}catch(n){await this.sendError(r,t,n),this.logger.error(n)}},this.onPairingPingResponse=(t,e)=>{const{id:r}=e;setTimeout((()=>{Object(P.isJsonRpcResult)(e)?this.events.emit(Object(O.k)("pairing_ping",r),{}):Object(P.isJsonRpcError)(e)&&this.events.emit(Object(O.k)("pairing_ping",r),{error:e.error})}),500)},this.onPairingDeleteRequest=async(t,e)=>{const{id:r}=e;try{this.isValidDisconnect({topic:t}),await this.deletePairing(t),this.events.emit("pairing_delete",{id:r,topic:t})}catch(n){await this.sendError(r,t,n),this.logger.error(n)}},this.onUnknownRpcMethodRequest=async(t,e)=>{const{id:r,method:n}=e;try{if(this.registeredMethods.includes(n))return;const e=Object(O.x)("WC_METHOD_UNSUPPORTED",n);await this.sendError(r,t,e),this.logger.error(e)}catch(i){await this.sendError(r,t,i),this.logger.error(i)}},this.onUnknownRpcMethodResponse=t=>{this.registeredMethods.includes(t)||this.logger.error(Object(O.x)("WC_METHOD_UNSUPPORTED",t))},this.isValidPair=t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","pair() params: ".concat(t));throw new Error(e)}if(!Object(O.eb)(t.uri)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","pair() uri: ".concat(t.uri));throw new Error(e)}},this.isValidPing=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","ping() params: ".concat(t));throw new Error(e)}const{topic:e}=t;await this.isValidPairingTopic(e)},this.isValidDisconnect=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","disconnect() params: ".concat(t));throw new Error(e)}const{topic:e}=t;await this.isValidPairingTopic(e)},this.isValidPairingTopic=async t=>{if(!Object(O.db)(t,!1)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","pairing topic should be a string: ".concat(t));throw new Error(e)}if(!this.pairings.keys.includes(t)){const{message:e}=Object(O.t)("NO_MATCHING_KEY","pairing topic doesn't exist: ".concat(t));throw new Error(e)}if(Object(O.E)(this.pairings.get(t).expiry)){await this.deletePairing(t);const{message:e}=Object(O.t)("EXPIRED","pairing topic: ".concat(t));throw new Error(e)}},this.core=t,this.logger=Object(c.generateChildLogger)(e,this.name),this.pairings=new _r(this.core,this.logger,this.name,this.storagePrefix)}get context(){return Object(c.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.core.relayer.on(ve,(async t=>{const{topic:e,message:r}=t;if(this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))return;const n=await this.core.crypto.decode(e,r);Object(P.isJsonRpcRequest)(n)?(this.core.history.set(e,n),this.onRelayEventRequest({topic:e,payload:n})):Object(P.isJsonRpcResponse)(n)&&(await this.core.history.resolve(n),await this.onRelayEventResponse({topic:e,payload:n}),this.core.history.delete(e,n.id))}))}registerExpirerEvents(){this.core.expirer.on(Ve,(async t=>{const{topic:e}=Object(O.ib)(t.target);e&&this.pairings.keys.includes(e)&&(await this.deletePairing(e,!0),this.events.emit("pairing_expire",{topic:e}))}))}}class wr extends l{constructor(t,e){super(t,e),this.core=t,this.logger=e,this.records=new Map,this.events=new n.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ue,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(
2),this.cached.forEach((t=>this.records.set(t.id,t))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.set=(t,e,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:t,request:e,chainId:r}),this.records.has(e.id))return;const n={id:e.id,topic:t,request:{method:e.method,params:e.params||null},chainId:r,expiry:Object(O.c)(I.THIRTY_DAYS)};this.records.set(n.id,n),this.events.emit(Me,n)},this.resolve=async t=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:t}),!this.records.has(t.id))return;const e=await this.getRecord(t.id);typeof e.response>"u"&&(e.response=Object(P.isJsonRpcError)(t)?{error:t.error}:{result:t.result},this.records.set(e.id,e),this.events.emit(De,e))},this.get=async(t,e)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:t,id:e}),await this.getRecord(e)),this.delete=(t,e)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:e}),this.values.forEach((r=>{if(r.topic===t){if(typeof e<"u"&&r.id!==e)return;this.records.delete(r.id),this.events.emit(ke,r)}}))},this.exists=async(t,e)=>(this.isInitialized(),!!this.records.has(e)&&(await this.getRecord(e)).topic===t),this.on=(t,e)=>{this.events.on(t,e)},this.once=(t,e)=>{this.events.once(t,e)},this.off=(t,e)=>{this.events.off(t,e)},this.removeListener=(t,e)=>{this.events.removeListener(t,e)},this.logger=Object(c.generateChildLogger)(e,this.name)}get context(){return Object(c.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 t=[];return this.values.forEach((e=>{if(typeof e.response<"u")return;const r={topic:e.topic,request:Object(P.formatJsonRpcRequest)(e.request.method,e.request.params,e.id),chainId:e.chainId};return t.push(r)})),t}async setJsonRpcRecords(t){await this.core.storage.setItem(this.storageKey,t)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(t){this.isInitialized();const e=this.records.get(t);if(!e){const{message:e}=Object(O.t)("NO_MATCHING_KEY","".concat(this.name,": ").concat(t));throw new Error(e)}return e}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(ze)}async restore(){try{const t=await this.getJsonRpcRecords();if(typeof t>"u"||!t.length)return;if(this.records.size){const{message:t}=Object(O.t)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=t,this.logger.debug("Successfully Restored records for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(t){this.logger.debug("Failed to Restore records for ".concat(this.name)),this.logger.error(t)}}registerEventListeners(){this.events.on(Me,(t=>{const e=Me;this.logger.info("Emitting ".concat(e)),this.logger.debug({type:"event",event:e,record:t}),this.persist()})),this.events.on(De,(t=>{const e=De;this.logger.info("Emitting ".concat(e)),this.logger.debug({type:"event",event:e,record:t}),this.persist()})),this.events.on(ke,(t=>{const e=ke;this.logger.info("Emitting ".concat(e)),this.logger.debug({type:"event",event:e,record:t}),this.persist()})),this.core.heartbeat.on(a.HEARTBEAT_EVENTS.pulse,(()=>{this.cleanup()}))}cleanup(){try{this.records.forEach((t=>{Object(I.toMiliseconds)(t.expiry||0)-Date.now()<=0&&(this.logger.info("Deleting expired history log: ".concat(t.id)),this.delete(t.topic,t.id))}))}catch(t){this.logger.warn(t)}}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}}class Er extends v{constructor(t,e){super(t,e),this.core=t,this.logger=e,this.expirations=new Map,this.events=new n.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=ue,this.init=async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(
2),this.cached.forEach((t=>this.expirations.set(t.target,t))),this.cached=[],this.registerEventListeners(),this.initialized=!0)},this.has=t=>{try{const e=this.formatTarget(t);return typeof this.getExpiration(e)<"u"}catch{return!1}},this.set=(t,e)=>{this.isInitialized();const r=this.formatTarget(t),n={target:r,expiry:e};this.expirations.set(r,n),this.checkExpiry(r,n),this.events.emit(qe,{target:r,expiration:n})},this.get=t=>{this.isInitialized();const e=this.formatTarget(t);return this.getExpiration(e)},this.del=t=>{if(this.isInitialized(),this.has(t)){const e=this.formatTarget(t),r=this.getExpiration(e);this.expirations.delete(e),this.events.emit(He,{target:e,expiration:r})}},this.on=(t,e)=>{this.events.on(t,e)},this.once=(t,e)=>{this.events.once(t,e)},this.off=(t,e)=>{this.events.off(t,e)},this.removeListener=(t,e)=>{this.events.removeListener(t,e)},this.logger=Object(c.generateChildLogger)(e,this.name)}get context(){return Object(c.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(t){if("string"==typeof t)return Object(O.n)(t);if("number"==typeof t)return Object(O.l)(t);const{message:e}=Object(O.t)("UNKNOWN_TYPE","Target type: ".concat(typeof t));throw new Error(e)}async setExpirations(t){await this.core.storage.setItem(this.storageKey,t)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(Ke)}async restore(){try{const t=await this.getExpirations();if(typeof t>"u"||!t.length)return;if(this.expirations.size){const{message:t}=Object(O.t)("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(t),new Error(t)}this.cached=t,this.logger.debug("Successfully Restored expirations for ".concat(this.name)),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(t){this.logger.debug("Failed to Restore expirations for ".concat(this.name)),this.logger.error(t)}}getExpiration(t){const e=this.expirations.get(t);if(!e){const{message:e}=Object(O.t)("NO_MATCHING_KEY","".concat(this.name,": ").concat(t));throw this.logger.error(e),new Error(e)}return e}checkExpiry(t,e){const{expiry:r}=e;Object(I.toMiliseconds)(r)-Date.now()<=0&&this.expire(t,e)}expire(t,e){this.expirations.delete(t),this.events.emit(Ve,{target:t,expiration:e})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach(((t,e)=>this.checkExpiry(e,t)))}registerEventListeners(){this.core.heartbeat.on(a.HEARTBEAT_EVENTS.pulse,(()=>this.checkExpirations())),this.events.on(qe,(t=>{const e=qe;this.logger.info("Emitting ".concat(e)),this.logger.debug({type:"event",event:e,data:t}),this.persist()})),this.events.on(Ve,(t=>{const e=Ve;this.logger.info("Emitting ".concat(e)),this.logger.debug({type:"event",event:e,data:t}),this.persist()})),this.events.on(He,(t=>{const e=He;this.logger.info("Emitting ".concat(e)),this.logger.debug({type:"event",event:e,data:t}),this.persist()}))}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}}class Or extends b{constructor(t,e){super(t,e),this.projectId=t,this.logger=e,this.name=Be,this.initialized=!1,this.init=async t=>{Object(O.H)()||!Object(O.B)()||(this.verifyUrl=(null===t||void 0===t?void 0:t.verifyUrl)||Ge,await this.createIframe())},this.register=async t=>{var e;if(this.initialized||await this.init(),this.iframe)try{null==(e=this.iframe.contentWindow)||e.postMessage(t.attestationId,this.verifyUrl),this.logger.info("postMessage sent: ".concat(t.attestationId," ").concat(this.verifyUrl))}catch{}},this.resolve=async t=>{var e;if(this.isDevEnv)return"";this.logger.info("resolving attestation: ".concat(t.attestationId));const r=this.startAbortTimer(I.FIVE_SECONDS),n=await fetch("".concat(this.verifyUrl,"/attestation/").concat(t.attestationId),{signal:this.abortController.signal});return clearTimeout(r),200===n.status?null==(e=await n.json())?void 0:e.origin:""},this.createIframe=async()=>{try{await Promise.race([new Promise(((t,e)=>{if(document.getElementById(Be))return t();const r=document.createElement("iframe");r.setAttribute("id",Be),r.setAttribute("src","".concat(this.verifyUrl,"/").concat(this.projectId)),r.style.display="none",r.addEventListener("load",(()=>{this.initialized=!0,t()})),r.addEventListener("error",(t=>{e(t)})),document.body.append(r),this.iframe=r})),new Promise((t=>{setTimeout((()=>t("iframe load timeout")),Object(I.toMiliseconds)(I.ONE_SECOND/2))}))])}catch(t){this.logger.error("Verify iframe failed to load: ".concat(this.verifyUrl)),this.logger.error(t)}},this.logger=Object(c.generateChildLogger)(e,this.name),this.verifyUrl=Ge,this.abortController=new AbortController,this.isDevEnv=Object(O.F)()&&Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Vladan Thales",REACT_APP_VERCEL_GIT_PROVIDER:"github",REACT_APP_VERCEL_PROJECT_ID:"prj_7QwG9A3KpqOwVrsry9Gy7vG8zqpQ",REACT_APP_INFURA_PROJECT_ID:"f1dcc59b45714aa6988f3c3574352daf",REACT_APP_VERCEL_GIT_PULL_REQUEST_ID:"",REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"28cc74e6c3203e0d/script.
2js","viewEndpoint":"28cc74e6c3203e0d/view","eventEndpoint":"28cc74e6c3203e0d/event","sessionEndpoint":"28cc74e6c3203e0d/session"},"speedInsights":{"scriptSrc":"df6b016f633354c4/script.js","endpoint":"df6b016f633354c4/vitals"}}',REACT_APP_VERCEL_BRANCH_URL:"thales-io-dapp-git-main-thales-market.vercel.app",REACT_APP_VERCEL_GIT_COMMIT_MESSAGE:"Merge pull request #167 from thales-markets/dev\n\nDev",REACT_APP_SNAPSHOT_API_KEY:"4423b11bfbf2496efd0e04c488195c35ff278c2f428a27a999884ec305c79d86",REACT_APP_VERCEL_DEPLOYMENT_ID:"dpl_GSSFSVcUG2Q7nT8deJTKKnQJSEfd",REACT_APP_CHAINNODE_PROJECT_ID:"114832a4-cf63-4168-b251-808d06c32cc8",REACT_APP_WALLET_CONNECT_PROJECT_ID:"c7a9a069cacf4cab5d8941ce24f185d6",REACT_APP_DRPC_PROJECT_ID:"AjhxsdhGNEmAnwOgwsM6EStospAlgnAR8JQfIgaNGuYu",REACT_APP_ANKR_PROJECT_ID:"8f5ac462671f0848cbee9e4ee5b3e4693a2528521bc78a373b9eb4ad11d9b2c9",REACT_APP_VERCEL_GIT_REPO_SLUG:"thales-io-dapp",REACT_APP_VERCEL_TARGET_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_SHA:"818d2f7520e80936ada6be36d0fafd0a177166f6",REACT_APP_VERCEL_ENV:"production",REACT_APP_VERCEL_GIT_COMMIT_REF:"main",REACT_APP_VERCEL_URL:"thales-io-dapp-g4ijju4rz-thales-market.vercel.app",REACT_APP_PRIMARY_PROVIDER_ID:"INFURA",REACT_APP_VERCEL_PROJECT_PRODUCTION_URL:"www.overtime.io",REACT_APP_VERCEL_GIT_PREVIOUS_SHA:"",REACT_APP_VERCEL_GIT_REPO_ID:"714972257",REACT_APP_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"vladanthales",REACT_APP_VERCEL_GIT_REPO_OWNER:"thales-markets"}).IS_VITEST}get context(){return Object(c.getLoggerContext)(this.logger)}startAbortTimer(t){return setTimeout((()=>this.abortController.abort()),Object(I.toMiliseconds)(t))}}var Sr=Object.defineProperty,Ir=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Ar=(t,e,r)=>e in t?Sr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Rr=(t,e)=>{for(var r in e||(e={}))jr.call(e,r)&&Ar(t,r,e[r]);if(Ir)for(var r of Ir(e))Pr.call(e,r)&&Ar(t,r,e[r]);return t};class Cr extends h{constructor(t){super(t),this.protocol="wc",this.version=2,this.name=ce,this.events=new n.EventEmitter,this.initialized=!1,this.on=(t,e)=>this.events.on(t,e),this.once=(t,e)=>this.events.once(t,e),this.off=(t,e)=>this.events.off(t,e),this.removeListener=(t,e)=>this.events.removeListener(t,e),this.projectId=null===t||void 0===t?void 0:t.projectId,this.relayUrl=(null===t||void 0===t?void 0:t.relayUrl)||ge;const e=typeof(null===t||void 0===t?void 0:t.logger)<"u"&&"string"!=typeof(null===t||void 0===t?void 0:t.logger)?t.logger:Object(c.pino)(Object(c.getDefaultLoggerOptions)({level:(null===t||void 0===t?void 0:t.logger)||he}));this.logger=Object(c.generateChildLogger)(e,this.name),this.heartbeat=new a.HeartBeat,this.crypto=new We(this,this.logger,null===t||void 0===t?void 0:t.keychain),this.history=new wr(this,this.logger),this.expirer=new Er(this,this.logger),this.storage=null!=t&&t.storage?t.storage:new o.a(Rr(Rr({},le),null===t||void 0===t?void 0:t.storageOptions)),this.relayer=new fr({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new mr(this,this.logger),this.verify=new Or(this.projectId||"",this.logger)}static async init(t){const e=new Cr(t);await e.initialize();const r=await e.crypto.getClientId();return await e.storage.setItem("WALLETCONNECT_CLIENT_ID",r),e}get context(){return Object(c.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(t){throw this.logger.warn("Core Initialization Failure at epoch ".concat(Date.now()),t),this.logger.error(t.message),t}}}const Tr=Cr,Nr="client",xr="".concat("wc","@").concat(2,":").concat(Nr,":"),Lr=Nr,Ur="error",Mr=(I.THIRTY_DAYS,"Proposal expired"),Dr=I.SEVEN_DAYS,kr={wc_sessionPropose:{req:{ttl:I.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:I.ONE_DAY,prompt:!1,tag:1104},res:{ttl:I.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:I.ONE_DAY,prompt:!1,tag:1106},res:{ttl:I.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:I.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:I.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:I.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:I.ONE_DAY,prompt:!1,tag:1112},res:{ttl:I.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:I.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:I.THIRTY_SECONDS,prompt:!1,tag:1115}}},zr={min:I.FIVE_MINUTES,max:I.SEVEN_DAYS},qr=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var Hr=Object.defineProperty,Vr=Object.defineProperties,Kr=Object.getOwnPropertyDescriptors,Br=Object.getOwnPropertySymbols,Gr=Object.prototype.hasOwnProperty,Fr=Object.prototype.propertyIsEnumerable,Wr=(t,e,r)=>e in t?Hr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Yr=(t,e)=>{for(var r in e||(e={}))Gr.call(e,r)&&Wr(t,r,e[r]);if(Br)for(var r of Br(e))Fr.call(e,r)&&Wr(t,r,e[r]);return t},Jr=(t,e)=>Vr(t,Kr(e));class Xr extends m{constructor(t){var e;super(t),e=this,this.name="engine",this.events=new i.a,this.initialized=!1,this.ignoredPayloadTypes=[O.b],this.init=async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.client.core.pairing.register({methods:Object.keys(kr)}),this.initialized=!0)},this.connect=async t=>{this.isInitialized();const e=Jr(Yr({},t),{requiredNamespaces:t.requiredNamespaces||{},optionalNamespaces:t.optionalNamespaces||{}});await this.isValidConnect(e);const{pairingTopic:r,requiredNamespaces:n,optionalNamespaces:i,sessionProperties:s,relays:o}=e;let a,c=r,u=!1;if(c&&(u=this.client.core.pairing.pairings.get(c).active),!c||!u){const{topic:t,uri:e}=await this.client.core.pairing.create();c=t,a=e}const h=await this.client.core.crypto.generateKeyPair(),l=Yr({requiredNamespaces:n,optionalNamespaces:i,relays:null!==o&&void 0!==o?o:[{protocol:"irn"}],proposer:{publicKey:h,metadata:this.client.metadata}},s&&{sessionProperties:s}),{reject:f,resolve:p,done:d}=Object(O.d)(I.FIVE_MINUTES,Mr);if(this.events.once(Object(O.k)("session_connect"),(async t=>{let{error:e,session:r}=t;if(e)f(e);else if(r){r.self.publicKey=h;const t=Jr(Yr({},r),{requiredNamespaces:r.requiredNamespaces,optionalNamespaces:r.optionalNamespaces});await this.client.session.set(r.topic,t),await this.setExpiry(r.topic,r.expiry),c&&await this.client.core.pairing.updateMetadata({topic:c,metadata:r.peer.metadata}),p(t)}}
2)),!c){const{message:t}=Object(O.t)("NO_MATCHING_KEY","connect() pairing topic: ".concat(c));throw new Error(t)}const g=await this.sendRequest(c,"wc_sessionPropose",l),y=Object(O.c)(I.FIVE_MINUTES);return await this.setProposal(g,Yr({id:g,expiry:y},l)),{uri:a,approval:d}},this.pair=async t=>(this.isInitialized(),await this.client.core.pairing.pair(t)),this.approve=async t=>{this.isInitialized(),await this.isValidApprove(t);const{id:e,relayProtocol:r,namespaces:n,sessionProperties:i}=t,s=this.client.proposal.get(e);let{pairingTopic:o,proposer:a,requiredNamespaces:c,optionalNamespaces:u}=s;o=o||"",Object(O.V)(c)||(c=Object(O.w)(n,"approve()"));const h=await this.client.core.crypto.generateKeyPair(),l=a.publicKey,f=await this.client.core.crypto.generateSharedKey(h,l);o&&e&&(await this.client.core.pairing.updateMetadata({topic:o,metadata:a.metadata}),await this.sendResult(e,o,{relay:{protocol:null!==r&&void 0!==r?r:"irn"},responderPublicKey:h}),await this.client.proposal.delete(e,Object(O.x)("USER_DISCONNECTED")),await this.client.core.pairing.activate({topic:o}));const p=Yr({relay:{protocol:null!==r&&void 0!==r?r:"irn"},namespaces:n,requiredNamespaces:c,optionalNamespaces:u,pairingTopic:o,controller:{publicKey:h,metadata:this.client.metadata},expiry:Object(O.c)(Dr)},i&&{sessionProperties:i});await this.client.core.relayer.subscribe(f),await this.sendRequest(f,"wc_sessionSettle",p);const d=Jr(Yr({},p),{topic:f,pairingTopic:o,acknowledged:!1,self:p.controller,peer:{publicKey:a.publicKey,metadata:a.metadata},controller:h});return await this.client.session.set(f,d),await this.setExpiry(f,Object(O.c)(Dr)),{topic:f,acknowledged:()=>new Promise((t=>setTimeout((()=>t(this.client.session.get(f))),500)))}},this.reject=async t=>{this.isInitialized(),await this.isValidReject(t);const{id:e,reason:r}=t,{pairingTopic:n}=this.client.proposal.get(e);n&&(await this.sendError(e,n,r),await this.client.proposal.delete(e,Object(O.x)("USER_DISCONNECTED")))},this.update=async t=>{this.isInitialized(),await this.isValidUpdate(t);const{topic:e,namespaces:r}=t,n=await this.sendRequest(e,"wc_sessionUpdate",{namespaces:r}),{done:i,resolve:s,reject:o}=Object(O.d)();return this.events.once(Object(O.k)("session_update",n),(t=>{let{error:e}=t;e?o(e):s()})),await this.client.session.update(e,{namespaces:r}),{acknowledged:i}},this.extend=async t=>{this.isInitialized(),await this.isValidExtend(t);const{topic:e}=t,r=await this.sendRequest(e,"wc_sessionExtend",{}),{done:n,resolve:i,reject:s}=Object(O.d)();return this.events.once(Object(O.k)("session_extend",r),(t=>{let{error:e}=t;e?s(e):i()})),await this.setExpiry(e,Object(O.c)(Dr)),{acknowledged:n}},this.request=async t=>{this.isInitialized(),await this.isValidRequest(t);const{chainId:e,request:r,topic:n,expiry:i}=t,s=await this.sendRequest(n,"wc_sessionRequest",{request:r,chainId:e},i),{done:o,resolve:a,reject:c}=Object(O.d)(i);this.events.once(Object(O.k)("session_request",s),(t=>{let{error:e,result:r}=t;e?c(e):a(r)})),this.client.events.emit("session_request_sent",{topic:n,request:r,chainId:e,id:s});const u=await this.client.core.storage.getItem("WALLETCONNECT_DEEPLINK_CHOICE");return Object(O.y)({id:s,topic:n,wcDeepLink:u}),await o()},this.respond=async t=>{this.isInitialized(),await this.isValidRespond(t);const{topic:e,response:r}=t,{id:n}=r;Object(P.isJsonRpcResult)(r)?await this.sendResult(n,e,r.result):Object(P.isJsonRpcError)(r)&&await this.sendError(n,e,r.error),this.deletePendingSessionRequest(t.response.id,{message:"fulfilled",code:0})},this.ping=async t=>{this.isInitialized(),await this.isValidPing(t);const{topic:e}=t;if(this.client.session.keys.includes(e)){const t=await this.sendRequest(e,"wc_sessionPing",{}),{done:r,resolve:n,reject:i}=Object(O.d)();this.events.once(Object(O.k)("session_ping",t),(t=>{let{error:e}=t;e?i(e):n()})),await r()}else this.client.core.pairing.pairings.keys.includes(e)&&await this.client.core.pairing.ping({topic:e})},this.emit=async t=>{this.isInitialized(),await this.isValidEmit(t);const{topic:e,event:r,chainId:n}=t;await this.sendRequest(e,"wc_sessionEvent",{event:r,chainId:n})},this.disconnect=async t=>{this.isInitialized(),await this.isValidDisconnect(t);const{topic:e}=t;if(this.client.session.keys.includes(e)){const t=Object(P.getBigIntRpcId)().toString();let r;const n=e=>{(null===e||void 0===e?void 0:e.id.toString())===t&&(this.client.core.relayer.events.removeListener(be,n),r())};await Promise.all([new Promise((t=>{r=t,this.client.core.relayer.on(be,n)})),this.sendRequest(e,"wc_sessionDelete",Object(O.x)("USER_DISCONNECTED"),void 0,t)]),await this.deleteSession(e)}else await this.client.core.pairing.disconnect({topic:e})},this.find=t=>(this.isInitialized(),this.client.session.getAll().filter((e=>Object(O.I)(e,t)))),this.getPendingSessionRequests=()=>
2(this.isInitialized(),this.client.pendingRequest.getAll()),this.cleanupDuplicatePairings=async t=>{if(t.pairingTopic)try{const e=this.client.core.pairing.pairings.get(t.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter((r=>{var n,i;return(null==(n=r.peerMetadata)?void 0:n.url)&&(null==(i=r.peerMetadata)?void 0:i.url)===t.peer.metadata.url&&r.topic&&r.topic!==e.topic}));if(0===r.length)return;this.client.logger.info("Cleaning up ".concat(r.length," duplicate pairing(s)")),await Promise.all(r.map((t=>this.client.core.pairing.disconnect({topic:t.topic})))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}},this.deleteSession=async(t,e)=>{const{self:r}=this.client.session.get(t);await this.client.core.relayer.unsubscribe(t),this.client.session.delete(t,Object(O.x)("USER_DISCONNECTED")),this.client.core.crypto.keychain.has(r.publicKey)&&await this.client.core.crypto.deleteKeyPair(r.publicKey),this.client.core.crypto.keychain.has(t)&&await this.client.core.crypto.deleteSymKey(t),e||this.client.core.expirer.del(t)},this.deleteProposal=async(t,e)=>{await Promise.all([this.client.proposal.delete(t,Object(O.x)("USER_DISCONNECTED")),e?Promise.resolve():this.client.core.expirer.del(t)])},this.deletePendingSessionRequest=async function(t,r){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];await Promise.all([e.client.pendingRequest.delete(t,r),n?Promise.resolve():e.client.core.expirer.del(t)])},this.setExpiry=async(t,e)=>{this.client.session.keys.includes(t)&&await this.client.session.update(t,{expiry:e}),this.client.core.expirer.set(t,e)},this.setProposal=async(t,e)=>{await this.client.proposal.set(t,e),this.client.core.expirer.set(t,e.expiry)},this.setPendingSessionRequest=async t=>{const e=kr.wc_sessionRequest.req.ttl,{id:r,topic:n,params:i}=t;await this.client.pendingRequest.set(r,{id:r,topic:n,params:i}),e&&this.client.core.expirer.set(r,Object(O.c)(e))},this.sendRequest=async(t,e,r,n,i)=>{const s=Object(P.formatJsonRpcRequest)(e,r);if(Object(O.B)()&&qr.includes(e)){const t=Object(O.A)(JSON.stringify(s));await this.client.core.verify.register({attestationId:t})}const o=await this.client.core.crypto.encode(t,s),a=kr[e].req;return n&&(a.ttl=n),i&&(a.id=i),this.client.core.history.set(t,s),this.client.core.relayer.publish(t,o,a),s.id},this.sendResult=async(t,e,r)=>{const n=Object(P.formatJsonRpcResult)(t,r),i=await this.client.core.crypto.encode(e,n),s=await this.client.core.history.get(e,t),o=kr[s.request.method].res;this.client.core.relayer.publish(e,i,o),await this.client.core.history.resolve(n)},this.sendError=async(t,e,r)=>{const n=Object(P.formatJsonRpcError)(t,r),i=await this.client.core.crypto.encode(e,n),s=await this.client.core.history.get(e,t),o=kr[s.request.method].res;this.client.core.relayer.publish(e,i,o),await this.client.core.history.resolve(n)},this.cleanup=async()=>{const t=[],e=[];this.client.session.getAll().forEach((e=>{Object(O.E)(e.expiry)&&t.push(e.topic)})),this.client.proposal.getAll().forEach((t=>{Object(O.E)(t.expiry)&&e.push(t.id)})),await Promise.all([...t.map((t=>this.deleteSession(t))),...e.map((t=>this.deleteProposal(t)))])},this.onRelayEventRequest=t=>{const{topic:e,payload:r}=t,n=r.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeRequest
2(e,r);case"wc_sessionSettle":return this.onSessionSettleRequest(e,r);case"wc_sessionUpdate":return this.onSessionUpdateRequest(e,r);case"wc_sessionExtend":return this.onSessionExtendRequest(e,r);case"wc_sessionPing":return this.onSessionPingRequest(e,r);case"wc_sessionDelete":return this.onSessionDeleteRequest(e,r);case"wc_sessionRequest":return this.onSessionRequest(e,r);case"wc_sessionEvent":return this.onSessionEventRequest(e,r);default:return this.client.logger.info("Unsupported request method ".concat(n))}},this.onRelayEventResponse=async t=>{const{topic:e,payload:r}=t,n=(await this.client.core.history.get(e,r.id)).request.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeResponse(e,r);case"wc_sessionSettle":return this.onSessionSettleResponse(e,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(e,r);case"wc_sessionExtend":return this.onSessionExtendResponse(e,r);case"wc_sessionPing":return this.onSessionPingResponse(e,r);case"wc_sessionRequest":return this.onSessionRequestResponse(e,r);default:return this.client.logger.info("Unsupported response method ".concat(n))}},this.onRelayEventUnknownPayload=t=>{const{topic:e}=t,{message:r}=Object(O.t)("MISSING_OR_INVALID","Decoded payload on topic ".concat(e," is not identifiable as a JSON-RPC request or a response."));throw new Error(r)},this.onSessionProposeRequest=async(t,e)=>{const{params:r,id:n}=e;try{this.isValidConnect(Yr({},e.params));const i=Object(O.c)(I.FIVE_MINUTES),s=Yr({id:n,pairingTopic:t,expiry:i},r);await this.setProposal(n,s);const o=Object(O.A)(JSON.stringify(e)),a=await this.getVerifyContext(o,s.proposer.metadata);this.client.events.emit("session_proposal",{id:n,params:s,verifyContext:a})}catch(i){await this.sendError(n,t,i),this.client.logger.error(i)}},this.onSessionProposeResponse=async(t,e)=>{const{id:r}=e;if(Object(P.isJsonRpcResult)(e)){const{result:n}=e;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:n});const i=this.client.proposal.get(r);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:i});const s=i.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});const o=n.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:o});const a=await this.client.core.crypto.generateSharedKey(s,o);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:a});const c=await this.client.core.relayer.subscribe(a);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:t})}else Object(P.isJsonRpcError)(e)&&(await this.client.proposal.delete(r,Object(O.x)("USER_DISCONNECTED")),this.events.emit(Object(O.k)("session_connect"),{error:e.error}))},this.onSessionSettleRequest=async(t,e)=>{const{id:r,params:n}=e;try{this.isValidSessionSettleRequest(n);const{relay:r,controller:i,expiry:s,namespaces:o,requiredNamespaces:a,optionalNamespaces:c,sessionProperties:u,pairingTopic:h}=e.params,l=Yr({topic:t,relay:r,expiry:s,namespaces:o,acknowledged:!0,pairingTopic:h,requiredNamespaces:a,optionalNamespaces:c,controller:i.publicKey,self:{publicKey:"",metadata:this.client.metadata},peer:{publicKey:i.publicKey,metadata:i.metadata}},u&&{sessionProperties:u});await this.sendResult(e.id,t,!0),this.events.emit(Object(O.k)("session_connect"),{session:l}),this.cleanupDuplicatePairings(l)}catch(i){await this.sendError(r,t,i),this.client.logger.error(i)}},this.onSessionSettleResponse=async(t,e)=>{const{id:r}=e;Object(P.isJsonRpcResult)(e)?(await this.client.session.update(t,{acknowledged:!0}),this.events.emit(Object(O.k)("session_approve",r),{})):Object(P.isJsonRpcError)(e)&&(await this.client.session.delete(t,Object(O.x)("USER_DISCONNECTED")),this.events.emit(Object(O.k)("session_approve",r),{error:e.error}))},this.onSessionUpdateRequest=async(t,e)=>{const{params:r,id:n}=e;try{this.isValidUpdate(Yr({topic:t},r)),await this.client.session.update(t,{namespaces:r.namespaces}),await this.sendResult(n,t,!0),this.client.events.emit("session_update",{id:n,topic:t,params:r})}catch(i){await this.sendError(n,t,i),this.client.logger.error(i)}},this.onSessionUpdateResponse=(t,e)=>{const{id:r}=e;Object(P.isJsonRpcResult)(e)?this.events.emit(Object(O.k)("session_update",r),{}):Object(P.isJsonRpcError)(e)&&this.events.emit(Object(O.k)("session_update",r),{error:e.error})},this.onSessionExtendRequest=async(t,e)=>{const{id:r}=e;try{this.isValidExtend({topic:t}),await this.setExpiry(t,Object(O.c)(Dr)),await this.sendResult(r,t,!0),this.client.events.emit("session_extend",{id:r,topic:t})}catch(n){await this.sendError(r,t,n),this.client.logger.error(n)}},this.onSessionExtendResponse=(t,e)=>{const{id:r}=e;Object(P.isJsonRpcResult)(e)?this.events.emit(Object(O.k)("session_extend",r),{}):Object(P.isJsonRpcError)(e)&&this.events.emit(Object(O.k)("session_extend",r),{error:e.error})},this.onSessionPingRequest=async(t,e)=>{const{id:r}=e;try{this.isValidPing({topic:t}),await this.sendResult(r,t,!0),this.client.events.emit("session_ping",{id:r,topic:t})}catch(n){await this.sendError(r,t,n),this.client.logger.error(n)}},this.onSessionPingResponse=(t,e)=>{const{id:r}=e;setTimeout((()=>{Object(P.isJsonRpcResult)(e)?this.events.emit(Object(O.k)("session_ping",r),{}):Object(P.isJsonRpcError)(e)&&this.events.emit(Object(O.k)("session_ping",r),{error:e.error})}),500)},this.onSessionDeleteRequest=async(t,e)=>{const{id:r}=e;try{this.isValidDisconnect({topic:t,reason:e.params}),await Promise.all([new Promise((e=>{this.client.core.relayer.once(Se,(async()=>{e(await this.deleteSession(t))}))})),this.sendResult(r,t,!0)]),this.client.events.emit("session_delete",{id:r,topic:t})}catch(n){this.client.logger.error(n)}},this.onSessionRequest=async(t,e)=>{const{id:r,params:n}=e;try{this.isValidRequest(Yr({topic:t},n)),await this.setPendingSessionRequest({id:r,topic:t,params:n});const i=Object(O.A)(JSON.stringify(e)),s=this.client.session.get(t),o=await this.getVerifyContext(i,s.peer.metadata);this.client.events.emit("session_request",{id:r,topic:t,params:n,verifyContext:o})}catch(i){await this.sendError(r,t,i),this.client.logger.error(i)}},this.onSessionRequestResponse=(t,e)=>{const{id:r}=e;Object(P.isJsonRpcResult)(e)?this.events.emit(Object(O.k)("session_request",r),{result:e.result}):Object(P.isJsonRpcError)(e)&&this.events.emit(Object(O.k)("session_request",r),{error:e.error})},this.onSessionEventRequest=async(t,e)=>{const{id:r,params:n}=e;try{this.isValidEmit(Yr({topic:t},n)),this.client.events.emit("session_event",{id:r,topic:t,params:n})}catch(i){await this.sendError(r,t,i),this.client.logger.error(i)}},this.isValidConnect=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","connect() params: ".concat(JSON.stringify(t)));throw new Error(e)}const{pairingTopic:e,requiredNamespaces:r,optionalNamespaces:n,sessionProperties:i,relays:s}=t;if(Object(O.L)(e)||await this.isValidPairingTopic(e),!Object(O.Y)(s,!0)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","connect() relays: ".concat(s));throw new Error(t)}!Object(O.L)(r)&&0!==Object(O.V)(r)&&this.validateNamespaces(r,"requiredNamespaces"),!Object(O.L)(n)&&0!==Object(O.V)(n)&&this.validateNamespaces(n,"optionalNamespaces"),Object(O.L)(i)||this.validateSessionProps(i,"sessionProperties")},this.validateNamespaces=(t,e)=>{const r=Object(O.bb)(t,"connect()",e);if(r)throw new Error(r.message)},this.isValidApprove=async t=>{if(!Object(O.W)(t))throw new Error(Object(O.t)("MISSING_OR_INVALID","approve() params: ".concat(t)).message);const{id:e,namespaces:r,relayProtocol:n,sessionProperties:i}=t;await this.isValidProposalId(e);const s=this.client.proposal.get(e),o=Object(O.R)(r,"approve()");if(o)throw new Error(o.message);const a=Object(O.D)(s.requiredNamespaces,r,"approve()");if(a)throw new Error(a.message);if(!Object(O.db)(n,!0)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","approve() relayProtocol: ".concat(n));throw new Error(t)}Object(O.L)(i)||this.validateSessionProps(i,"sessionProperties")},this.isValidReject=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","reject() params: ".concat(t));throw new Error(e)}const{id:e,reason:r}=t;if(await this.isValidProposalId(e),!Object(O.O)(r)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","reject() reason: ".concat(JSON.stringify(r)));throw new Error(t)}},this.isValidSessionSettleRequest=t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","onSessionSettleRequest() params: ".concat(t));throw new Error(e)}
2const{relay:e,controller:r,namespaces:n,expiry:i}=t;if(!Object(O.X)(e)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(t)}const s=Object(O.N)(r,"onSessionSettleRequest()");if(s)throw new Error(s.message);const o=Object(O.R)(n,"onSessionSettleRequest()");if(o)throw new Error(o.message);if(Object(O.E)(i)){const{message:t}=Object(O.t)("EXPIRED","onSessionSettleRequest()");throw new Error(t)}},this.isValidUpdate=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","update() params: ".concat(t));throw new Error(e)}const{topic:e,namespaces:r}=t;await this.isValidSessionTopic(e);const n=this.client.session.get(e),i=Object(O.R)(r,"update()");if(i)throw new Error(i.message);const s=Object(O.D)(n.requiredNamespaces,r,"update()");if(s)throw new Error(s.message)},this.isValidExtend=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","extend() params: ".concat(t));throw new Error(e)}const{topic:e}=t;await this.isValidSessionTopic(e)},this.isValidRequest=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","request() params: ".concat(t));throw new Error(e)}const{topic:e,request:r,chainId:n,expiry:i}=t;await this.isValidSessionTopic(e);const{namespaces:s}=this.client.session.get(e);if(!Object(O.S)(s,n)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","request() chainId: ".concat(n));throw new Error(t)}if(!Object(O.Z)(r)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","request() ".concat(JSON.stringify(r)));throw new Error(t)}if(!Object(O.U)(s,n,r.method)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","request() method: ".concat(r.method));throw new Error(t)}if(i&&!Object(O.ab)(i,zr)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","request() expiry: ".concat(i,". Expiry must be a number (in seconds) between ").concat(zr.min," and ").concat(zr.max));throw new Error(t)}},this.isValidRespond=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","respond() params: ".concat(t));throw new Error(e)}const{topic:e,response:r}=t;if(await this.isValidSessionTopic(e),!Object(O.cb)(r)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","respond() response: ".concat(JSON.stringify(r)));throw new Error(t)}},this.isValidPing=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","ping() params: ".concat(t));throw new Error(e)}const{topic:e}=t;await this.isValidSessionOrPairingTopic(e)},this.isValidEmit=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","emit() params: ".concat(t));throw new Error(e)}const{topic:e,event:r,chainId:n}=t;await this.isValidSessionTopic(e);const{namespaces:i}=this.client.session.get(e);if(!Object(O.S)(i,n)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","emit() chainId: ".concat(n));throw new Error(t)}if(!Object(O.P)(r)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","emit() event: ".concat(JSON.stringify(r)));throw new Error(t)}if(!Object(O.T)(i,n,r.name)){const{message:t}=Object(O.t)("MISSING_OR_INVALID","emit() event: ".concat(JSON.stringify(r)));throw new Error(t)}},this.isValidDisconnect=async t=>{if(!Object(O.W)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","disconnect() params: ".concat(t));throw new Error(e)}const{topic:e}=t;await this.isValidSessionOrPairingTopic(e)},this.getVerifyContext=async(t,e)=>{const r={verified:{verifyUrl:e.verifyUrl||"",validation:"UNKNOWN",origin:e.url||""}};try{const n=await this.client.core.verify.resolve({attestationId:t,verifyUrl:e.verifyUrl});n&&(r.verified.origin=n,r.verified.validation=n===e.url?"VALID":"INVALID")}catch(n){this.client.logger.error(n)}return this.client.logger.info("Verify context: ".concat(JSON.stringify(r))),r},this.validateSessionProps=(t,e)=>{Object.values(t).forEach((t=>{if(!Object(O.db)(t,!1)){const{message:r}=Object(O.t)("MISSING_OR_INVALID","".concat(e," must be in Record<string, string> format. Received: ").concat(JSON.stringify(t)));throw new Error(r)}}))}}isInitialized(){if(!this.initialized){const{message:t}=Object(O.t)("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){this.client.core.relayer.on(ve,(async t=>{const{topic:e,message:r}=t;if(this.ignoredPayloadTypes.includes(this.client.core.crypto.getPayloadType(r)))return;const n=await this.client.core.crypto.decode(e,r);Object(P.isJsonRpcRequest)(n)?(this.client.core.history.set(e,n),this.onRelayEventRequest({topic:e,payload:n})):Object(P.isJsonRpcResponse)(n)?(await this.client.core.history.resolve(n),await this.onRelayEventResponse({topic:e,payload:n}),this.client.core.history.delete(e,n.id)):this.onRelayEventUnknownPayload({topic:e,payload:n})}))}registerExpirerEvents(){this.client.core.expirer.on(Ve,(async t=>{const{topic:e,id:r}=Object(O.ib)(t.target);
2if(r&&this.client.pendingRequest.keys.includes(r))return await this.deletePendingSessionRequest(r,Object(O.t)("EXPIRED"),!0);e?this.client.session.keys.includes(e)&&(await this.deleteSession(e,!0),this.client.events.emit("session_expire",{topic:e})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r}))}))}isValidPairingTopic(t){if(!Object(O.db)(t,!1)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","pairing topic should be a string: ".concat(t));throw new Error(e)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:e}=Object(O.t)("NO_MATCHING_KEY","pairing topic doesn't exist: ".concat(t));throw new Error(e)}if(Object(O.E)(this.client.core.pairing.pairings.get(t).expiry)){const{message:e}=Object(O.t)("EXPIRED","pairing topic: ".concat(t));throw new Error(e)}}async isValidSessionTopic(t){if(!Object(O.db)(t,!1)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","session topic should be a string: ".concat(t));throw new Error(e)}if(!this.client.session.keys.includes(t)){const{message:e}=Object(O.t)("NO_MATCHING_KEY","session topic doesn't exist: ".concat(t));throw new Error(e)}if(Object(O.E)(this.client.session.get(t).expiry)){await this.deleteSession(t);const{message:e}=Object(O.t)("EXPIRED","session topic: ".concat(t));throw new Error(e)}}async isValidSessionOrPairingTopic(t){if(this.client.session.keys.includes(t))await this.isValidSessionTopic(t);else{if(!this.client.core.pairing.pairings.keys.includes(t)){if(Object(O.db)(t,!1)){const{message:e}=Object(O.t)("NO_MATCHING_KEY","session or pairing topic doesn't exist: ".concat(t));throw new Error(e)}{const{message:e}=Object(O.t)("MISSING_OR_INVALID","session or pairing topic should be a string: ".concat(t));throw new Error(e)}}this.isValidPairingTopic(t)}}async isValidProposalId(t){if(!Object(O.Q)(t)){const{message:e}=Object(O.t)("MISSING_OR_INVALID","proposal id should be a number: ".concat(t));throw new Error(e)}if(!this.client.proposal.keys.includes(t)){const{message:e}=Object(O.t)("NO_MATCHING_KEY","proposal id doesn't exist: ".concat(t));throw new Error(e)}if(Object(O.E)(this.client.proposal.get(t).expiry)){await this.deleteProposal(t);const{message:e}=Object(O.t)("EXPIRED","proposal id: ".concat(t));throw new Error(e)}}}class Zr extends _r{constructor(t,e){super(t,e,"proposal",xr),this.core=t,this.logger=e}}class Qr extends _r{constructor(t,e){super(t,e,"session",xr),this.core=t,this.logger=e}}class $r extends _r{constructor(t,e){super(t,e,"request",xr,(t=>t.id)),this.core=t,this.logger=e}}class tn extends _{constructor(t){super(t),this.protocol="wc",this.version=2,this.name=Lr,this.events=new n.EventEmitter,this.on=(t,e)=>this.events.on(t,e),this.once=(t,e)=>this.events.once(t,e),this.off=(t,e)=>this.events.off(t,e),this.removeListener=(t,e)=>this.events.removeListener(t,e),this.removeAllListeners=t=>this.events.removeAllListeners(t),this.connect=async t=>{try{return await this.engine.connect(t)}catch(e){throw this.logger.error(e.message),e}},this.pair=async t=>{try{return await this.engine.pair(t)}catch(e){throw this.logger.error(e.message),e}},this.approve=async t=>{try{return await this.engine.approve(t)}catch(e){throw this.logger.error(e.message),e}},this.reject=async t=>{try{return await this.engine.reject(t)}catch(e){throw this.logger.error(e.message),e}},this.update=async t=>{try{return await this.engine.update(t)}catch(e){throw this.logger.error(e.message),e}},this.extend=async t=>{try{return await this.engine.extend(t)}catch(e){throw this.logger.error(e.message),e}},this.request=async t=>{try{return await this.engine.request(t)}catch(e){throw this.logger.error(e.message),e}},this.respond=async t=>{try{return await this.engine.respond(t)}catch(e){throw this.logger.error(e.message),e}},this.ping=async t=>{try{return await this.engine.ping(t)}catch(e){throw this.logger.error(e.message),e}},this.emit=async t=>{try{return await this.engine.emit(t)}catch(e){throw this.logger.error(e.message),e}},this.disconnect=async t=>{try{return await this.engine.disconnect(t)}catch(e){throw this.logger.error(e.message),e}},this.find=t=>{try{return this.engine.find(t)}catch(e){throw this.logger.error(e.message),e}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(t){throw this.logger.error(t.message),t}},this.name=(null===t||void 0===t?void 0:t.name)||Lr,this.metadata=(null===t||void 0===t?void 0:t.metadata)||Object(O.s)();const e=typeof(null===t||void 0===t?void 0:t.logger)<"u"&&"string"!=typeof(null===t||void 0===t?void 0:t.logger)?t.logger:Object(c.pino)(Object(c.getDefaultLoggerOptions)({level:(null===t||void 0===t?void 0:t.logger)||Ur}));this.core=(null===t||void 0===t?void 0:t.core)||new Tr(t),this.logger=Object(c.generateChildLogger)(e,this.name),this.session=new Qr(this.core,this.logger),this.proposal=new Zr(this.core,this.logger),this.pendingRequest=new $r(this.core,this.logger),this.engine=new Xr(this)}static async init(t){const e=new tn(t);return await e.initialize(),e}get context(){return Object(c.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(t){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(t.message),t}}}},572:function(t,e,r){"use strict";r.r(e),r.d(e,"EthereumProvider",(function(){return O})),r.d(e,"OPTIONAL_EVENTS",(function(){return h})),r.d(e,"OPTIONAL_METHODS",(function(){return c})),r.d(e,"REQUIRED_EVENTS",(function(){return u})),r.d(e,"REQUIRED_METHODS",(function(){return a})),r.d(e,"default",(function(){return E}));var n=r(332),i=r(762),s=r(1312);const o="".concat("wc","@2:").concat("ethereum_provider",":"),a=["eth_sendTransaction","personal_sign"],c=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"],u=["chainChanged","accountsChanged"],h=["message","disconnect","connect"];var l=Object.defineProperty,f=Object.defineProperties,p=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,v=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||(e={}))g.call(e,r)&&v(t,r,e[r]);if(d)for(var r of d(e))y.call(e,r)&&v(t,r,e[r]);return t},_=(t,e)=>f(t,p(e));function m(t){return Number(t[0].split(":")[1])}function w(t){return"0x".concat(t.toString(16))}class E{constructor(){this.events=new n.EventEmitter,this.namespace="eip155",this.accounts=[],this.chainId=1,this.STORAGE_KEY=o,this.on=(t,e)=>(this.events.on(t,e),this),this.once=(t,e)=>(this.events.once(t,e),this),this.removeListener=(t,e)=>(this.events.removeListener(t,e),this),this.off=(t,e)=>(this.events.off(t,e),this),this.parseAccount=t=>this.isCompatibleChainId(t)?this.parseAccountId(t).address:t,this.signer={},this.rpc={}}static async init(t){const e=new E;return await e.initialize(t),e}async request(t){return await this.signer.request(t,this.formatChainId(this.chainId))}sendAsync(t,e){this.signer.sendAsync(t,e,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}async enable(){return this.session||await this.connect(),await this.request({method:"eth_requestAccounts"})}async connect(t){if(!this.signer.client)throw new Error("Provider not initialized. Call init() first");this.loadConnectOpts(t);const{required:e,optional:r}=function(t){const{chains:e,optionalChains:r,methods:n,optionalMethods:s,events:o,optionalEvents:l,rpcMap:f}=t;if(!Object(i.M)(e))throw new Error("Invalid chains");const p={chains:e,methods:n||a,events:o||u,rpcMap:b({}
2,e.length?{[m(e)]:f[m(e)]}:{})},d=null===o||void 0===o?void 0:o.filter((t=>!u.includes(t))),g=null===n||void 0===n?void 0:n.filter((t=>!a.includes(t)));if(!r&&!l&&!s&&(null==d||!d.length)&&(null==g||!g.length))return{required:e.length?p:void 0};const y=(null===d||void 0===d?void 0:d.length)&&(null===g||void 0===g?void 0:g.length)||!r,v={chains:[...new Set(y?p.chains.concat(r||[]):r)],methods:[...new Set(p.methods.concat(null!=s&&s.length?s:c))],events:[...new Set(p.events.concat(l||h))],rpcMap:f};return{required:e.length?p:void 0,optional:r.length?v:void 0}}(this.rpc);try{const n=await new Promise((async(n,i)=>{var s;this.rpc.showQrModal&&(null==(s=this.modal)||s.subscribeModal((t=>{!t.open&&!this.signer.session&&(this.signer.abortPairingAttempt(),i(new Error("Connection request reset. Please try again.")))}))),await this.signer.connect(_(b({namespaces:b({},e&&{[this.namespace]:e})},r&&{optionalNamespaces:{[this.namespace]:r}}),{pairingTopic:null===t||void 0===t?void 0:t.pairingTopic})).then((t=>{n(t)})).catch((t=>{i(new Error(t.message))}))}));if(!n)return;this.setChainIds(this.rpc.chains);const s=Object(i.r)(n.namespaces,[this.namespace]);this.setAccounts(s),this.events.emit("connect",{chainId:w(this.chainId)})}catch(n){throw this.signer.logger.error(n),n}finally{this.modal&&this.modal.closeModal()}}async disconnect(){this.session&&await this.signer.disconnect(),this.reset()}get isWalletConnect(){return!0}get session(){return this.signer.session}registerEventListeners(){this.signer.on("session_event",(t=>{const{params:e}=t,{event:r}=e;"accountsChanged"===r.name?(this.accounts=this.parseAccounts(r.data),this.events.emit("accountsChanged",this.accounts)):"chainChanged"===r.name?this.setChainId(this.formatChainId(r.data)):this.events.emit(r.name,r.data),this.events.emit("session_event",t)})),this.signer.on("chainChanged",(t=>{const e=parseInt(t);this.chainId=e,this.events.emit("chainChanged",w(this.chainId)),this.persist()})),this.signer.on("session_update",(t=>{this.events.emit("session_update",t)})),this.signer.on("session_delete",(t=>{this.reset(),this.events.emit("session_delete",t),this.events.emit("disconnect",_(b({},Object(i.x)("USER_DISCONNECTED")),{data:t.topic,name:"USER_DISCONNECTED"}))})),this.signer.on("display_uri",(t=>{var e,r;this.rpc.showQrModal&&(null==(e=this.modal)||e.closeModal(),null==(r=this.modal)||r.openModal({uri:t})),this.events.emit("display_uri",t)}))}switchEthereumChain(t){this.request({method:"wallet_switchEthereumChain",params:[{chainId:t.toString(16)}]})}isCompatibleChainId(t){return"string"==typeof t&&t.startsWith("".concat(this.namespace,":"))}formatChainId(t){return"".concat(this.namespace,":").concat(t)}parseChainId(t){return Number(t.split(":")[1])}setChainIds(t){const e=t.filter((t=>this.isCompatibleChainId(t))).map((t=>this.parseChainId(t)));e.length&&(this.chainId=e[0],this.events.emit("chainChanged",w(this.chainId)),this.persist())}setChainId(t){if(this.isCompatibleChainId(t)){const e=this.parseChainId(t);this.chainId=e,this.switchEthereumChain(e)}}parseAccountId(t){const[e,r,n]=t.split(":");return{chainId:"".concat(e,":").concat(r),address:n}}setAccounts(t){this.accounts=t.filter((t=>this.parseChainId(this.parseAccountId(t).chainId)===this.chainId)).map((t=>this.parseAccountId(t).address)),this.events.emit("accountsChanged",this.accounts)}getRpcConfig(t){var e,r;const n=null!=(e=null===t||void 0===t?void 0:t.chains)?e:[],i=null!=(r=null===t||void 0===t?void 0:t.optionalChains)?r:[],s=n.concat(i);if(!s.length)throw new Error("No chains specified in either `chains` or `optionalChains`");const o=n.length?(null===t||void 0===t?void 0:t.methods)||a:[],c=n.length?(null===t||void 0===t?void 0:t.events)||u:[],h=(null===t||void 0===t?void 0:t.optionalMethods)||[],l=(null===t||void 0===t?void 0:t.optionalEvents)||[],f=(null===t||void 0===t?void 0:t.rpcMap)||this.buildRpcMap(s,t.projectId),p=(null===t||void 0===t?void 0:t.qrModalOptions)||void 0;return{chains:null===n||void 0===n?void 0:n.map((t=>this.formatChainId(t))),optionalChains:i.map((t=>this.formatChainId(t))),methods:o,events:c,optionalMethods:h,optionalEvents:l,rpcMap:f,showQrModal:!(null==t||!t.showQrModal),qrModalOptions:p,projectId:t.projectId,metadata:t.metadata}}buildRpcMap(t,e){const r={};return t.forEach((t=>{r[t]=this.getRpcUrl(t,e)})),r}async initialize(t){if(this.rpc=this.getRpcConfig(t),this.chainId=this.rpc.chains.length?m(this.rpc.chains):m(this.rpc.optionalChains),this.signer=await s.a.init({projectId:this.rpc.projectId,metadata:this.rpc.metadata,disableProviderPing:t.disableProviderPing,relayUrl:t.relayUrl,storageOptions:t.storageOptions}),this.registerEventListeners(),await this.loadPersistedSession(),this.rpc.showQrModal){let t;
2try{const{WalletConnectModal:e}=await r.e(22).then(r.bind(null,1538));t=e}catch{throw new Error("To use QR modal, please install @walletconnect/modal package")}if(t)try{this.modal=new t(b({walletConnectVersion:2,projectId:this.rpc.projectId,standaloneChains:this.rpc.chains},this.rpc.qrModalOptions))}catch(e){throw this.signer.logger.error(e),new Error("Could not generate WalletConnectModal Instance")}}}loadConnectOpts(t){if(!t)return;const{chains:e,optionalChains:r,rpcMap:n}=t;e&&Object(i.M)(e)&&(this.rpc.chains=e.map((t=>this.formatChainId(t))),e.forEach((t=>{this.rpc.rpcMap[t]=(null===n||void 0===n?void 0:n[t])||this.getRpcUrl(t)}))),r&&Object(i.M)(r)&&(this.rpc.optionalChains=[],this.rpc.optionalChains=null===r||void 0===r?void 0:r.map((t=>this.formatChainId(t))),r.forEach((t=>{this.rpc.rpcMap[t]=(null===n||void 0===n?void 0:n[t])||this.getRpcUrl(t)})))}getRpcUrl(t,e){var r;return(null==(r=this.rpc.rpcMap)?void 0:r[t])||"".concat("https://rpc.walletconnect.com/v1/","?chainId=eip155:").concat(t,"&projectId=").concat(e||this.rpc.projectId)}async loadPersistedSession(){if(!this.session)return;const t=await this.signer.client.core.storage.getItem("".concat(this.STORAGE_KEY,"/chainId")),e=this.session.namespaces["".concat(this.namespace,":").concat(t)]?this.session.namespaces["".concat(this.namespace,":").concat(t)]:this.session.namespaces[this.namespace];this.setChainIds(t?[this.formatChainId(t)]:null===e||void 0===e?void 0:e.accounts),this.setAccounts(null===e||void 0===e?void 0:e.accounts)}reset(){this.chainId=1,this.accounts=[]}persist(){this.session&&this.signer.client.core.storage.setItem("".concat(this.STORAGE_KEY,"/chainId"),this.chainId)}parseAccounts(t){return"string"==typeof t||t instanceof String?[this.parseAccount(t)]:t.map((t=>this.parseAccount(t)))}}const O=E},652:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wipe=function(t){for(var e=0;e<t.length;e++)t[e]=0;return t}},661:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1337),i=r(668);class s{constructor(t,e,r){this.name=t,this.prefix=e,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(t));throw Error("Unknown type, must be binary type")}}class o{constructor(t,e,r){if(this.name=t,this.prefix=e,void 0===e.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=e.codePointAt(0),this.baseDecode=r}decode(t){if("string"===typeof t){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(t),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix));return this.baseDecode(t.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(t){return c(this,t)}}class a{constructor(t){this.decoders=t}or(t){return c(this,t)}decode(t){const e=t[0],r=this.decoders[e];if(r)return r.decode(t);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(t),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}}const c=(t,e)=>new a({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class u{constructor(t,e,r,n){this.name=t,this.prefix=e,this.baseEncode=r,this.baseDecode=n,this.encoder=new s(t,e,r),this.decoder=new o(t,e,n)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const h=t=>{let{name:e,prefix:r,encode:n,decode:i}=t;return new u(e,r,n,i)};e.Codec=u,e.baseX=t=>{let{prefix:e,name:r,alphabet:s}=t;const{encode:o,decode:a}=n(s,r);return h({prefix:e,name:r,encode:o,decode:t=>i.coerce(a(t))})},e.from=h,e.or=c,e.rfc4648=t=>{let{name:e,prefix:r,bitsPerChar:n,alphabet:i}=t;return h({prefix:r,name:e,encode:t=>((t,e,r)=>{const n="="===e[e.length-1],i=(1<<r)-1;let s="",o=0,a=0;for(let c=0;c<t.length;++c)for(a=a<<8|t[c],o+=8;o>r;)o-=r,s+=e[i&a>>o];if(o&&(s+=e[i&a<<r-o]),n)for(;s.length*r&7;)s+="=";return s})(t,i,n),decode:t=>((t,e,r,n)=>{const i={};for(let h=0;h<e.length;++h)i[e[h]]=h;let s=t.length;for(;"="===t[s-1];)--s;const o=new Uint8Array(s*r/8|0);let a=0,c=0,u=0;for(let h=0;h<s;++h){const e=i[t[h]];if(void 0===e)throw new SyntaxError("Non-".concat(n," character"));c=c<<r|e,a+=r,a>=8&&(a-=8,o[u++]=255&c>>a)}if(a>=r||255&c<<8-a)throw new SyntaxError("Unexpected end of data");return o}
2)(t,i,n,e)})}},668:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=new Uint8Array(0);e.coerce=t=>{if(t instanceof Uint8Array&&"Uint8Array"===t.constructor.name)return t;if(t instanceof ArrayBuffer)return new Uint8Array(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength);throw new Error("Unknown type, must be binary type")},e.empty=n,e.equals=(t,e)=>{if(t===e)return!0;if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},e.fromHex=t=>{const e=t.match(/../g);return e?new Uint8Array(e.map((t=>parseInt(t,16)))):n},e.fromString=t=>(new TextEncoder).encode(t),e.isBinary=t=>t instanceof ArrayBuffer||ArrayBuffer.isView(t),e.toHex=t=>t.reduce(((t,e)=>t+e.toString(16).padStart(2,"0")),""),e.toString=t=>(new TextDecoder).decode(t)},701:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(766);n.__exportStar(r(1352),e),n.__exportStar(r(1357),e),n.__exportStar(r(1358),e),n.__exportStar(r(1029),e)},723:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1322);function i(t,e,r){return void 0===e&&(e=new Uint8Array(2)),void 0===r&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}function s(t,e,r){return void 0===e&&(e=new Uint8Array(2)),void 0===r&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}function o(t,e){return void 0===e&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}function a(t,e){return void 0===e&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}function c(t,e){return void 0===e&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}function u(t,e){return void 0===e&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}function h(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}function l(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}function f(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),h(t/4294967296>>>0,e,r),h(t>>>0,e,r+4),e}function p(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),l(t>>>0,e,r),l(t/4294967296>>>0,e,r+4),e}e.readInt16BE=function(t,e){return void 0===e&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16},e.readUint16BE=function(t,e){return void 0===e&&(e=0),(t[e+0]<<8|t[e+1])>>>0},e.readInt16LE=function(t,e){return void 0===e&&(e=0),(t[e+1]<<8|t[e])<<16>>16},e.readUint16LE=function(t,e){return void 0===e&&(e=0),(t[e+1]<<8|t[e])>>>0},e.writeUint16BE=i,e.writeInt16BE=i,e.writeUint16LE=s,e.writeInt16LE=s,e.readInt32BE=o,e.readUint32BE=a,e.readInt32LE=c,e.readUint32LE=u,e.writeUint32BE=h,e.writeInt32BE=h,e.writeUint32LE=l,e.writeInt32LE=l,e.readInt64BE=function(t,e){void 0===e&&(e=0);var r=o(t,e),n=o(t,e+4);return 4294967296*r+n-4294967296*(n>>31)},e.readUint64BE=function(t,e){return void 0===e&&(e=0),4294967296*a(t,e)+a(t,e+4)},e.readInt64LE=function(t,e){void 0===e&&(e=0);var r=c(t,e);return 4294967296*c(t,e+4)+r-4294967296*(r>>31)},e.readUint64LE=function(t,e){void 0===e&&(e=0);var r=u(t,e);return 4294967296*u(t,e+4)+r},e.writeUint64BE=f,e.writeInt64BE=f,e.writeUint64LE=p,e.writeInt64LE=p,e.readUintBE=function(t,e,r){if(void 0===r&&(r=0),t%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given b
2itLength");for(var n=0,i=1,s=t/8+r-1;s>=r;s--)n+=e[s]*i,i*=256;return n},e.readUintLE=function(t,e,r){if(void 0===r&&(r=0),t%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var n=0,i=1,s=r;s<r+t/8;s++)n+=e[s]*i,i*=256;return n},e.writeUintBE=function(t,e,r,i){if(void 0===r&&(r=new Uint8Array(t/8)),void 0===i&&(i=0),t%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!n.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var s=1,o=t/8+i-1;o>=i;o--)r[o]=e/s&255,s*=256;return r},e.writeUintLE=function(t,e,r,i){if(void 0===r&&(r=new Uint8Array(t/8)),void 0===i&&(i=0),t%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!n.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var s=1,o=i;o<i+t/8;o++)r[o]=e/s&255,s*=256;return r},e.readFloat32BE=function(t,e){return void 0===e&&(e=0),new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat32(e)},e.readFloat32LE=function(t,e){return void 0===e&&(e=0),new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat32(e,!0)},e.readFloat64BE=function(t,e){return void 0===e&&(e=0),new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat64(e)},e.readFloat64LE=function(t,e){return void 0===e&&(e=0),new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat64(e,!0)},e.writeFloat32BE=function(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat32(r,t),e},e.writeFloat32LE=function(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat32(r,t,!0),e},e.writeFloat64BE=function(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat64(r,t),e},e.writeFloat64LE=function(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat64(r,t,!0),e}},724:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(668),i=r(765);class s{constructor(t,e,r,n){this.code=t,this.size=e,this.digest=r,this.bytes=n}}e.Digest=s,e.create=(t,e)=>{const r=e.byteLength,n=i.encodingLength(t),o=n+i.encodingLength(r),a=new Uint8Array(o+r);return i.encodeTo(t,a,0),i.encodeTo(r,a,n),a.set(e,o),new s(t,r,e,a)},e.decode=t=>{const e=n.coerce(t),[r,o]=i.decode(e),[a,c]=i.decode(e.subarray(o)),u=e.subarray(o+c);if(u.byteLength!==a)throw new Error("Incorrect length");return new s(r,a,u,e)},e.equals=(t,e)=>t===e||t.code===e.code&&t.size===e.size&&n.equals(t.bytes,e.bytes)},762:function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return _})),r.d(e,"b",(function(){return O})),r.d(e,"c",(function(){return lt})),r.d(e,"d",(function(){return st})),r.d(e,"e",(function(){return ot})),r.d(e,"f",(function(){return x})),r.d(e,"g",(function(){return U})),r.d(e,"h",(function(){return C})),r.d(e,"i",(function(){return M})),r.d(e,"j",(function(){return L})),r.d(e,"k",(function(){return pt})),r.d(e,"l",(function(){return ut})),r.d(e,"m",(function(){return et})),r.d(e,"n",(function(){return ct})),r.d(e,"o",(function(){return At})),r.d(e,"p",(function(){return A})),r.d(e,"q",(function(){return R})),r.d(e,"r",(function(){return y})),r.d(e,"s",(function(){return $})),r.d(e,"t",(function(){return Ut})),r.d(e,"u",(function(){return bt})),r.d(e,"v",(function(){return vt})),r.d(e,"w",(function(){return Ct})),r.d(e,"x",(function(){return Mt})),r.d(e,"y",(function(){return gt})),r.d(e,"z",(function(){return T})),r.d(e,"A",(function(){return N})),r.d(e,"B",(function(){return Z})),r.d(e,"C",(function(){return Tt})),r.d(e,"D",(function(){return le})),r.d(e,"E",(function(){return ft})),r.d(e,"F",(function(){return J})),r.d(e,"G",(function(){return Gt})),r.d(e,"H",(function(){return X})),r.d(e,"I",(function(){return Vt})),r.d(e,"J",(function(){return Ft})),r.d(e,"K",(function(){return z})),r.d(e,"L",(function(){return zt})),r.d(e,"M",(function(){return Dt})),r.d(e,"N",(function(){return Wt})),r.d(e,"O",(function(){return ie})),r.d(e,"P",(function(){return ae})),r.d(e,"Q",(function(){return re})),r.d(e,"R",(function(){return $t})),r.d(e,"S",(function(){return ce})),r.d(e,"T",(function(){return he})),r.d(e,"U",(function(){return ue})),r.d(e,"V",(function(){return kt})),r.d(e,"W",(function(){return ne})),r.d(e,"X",(function(){return te})),r.d(e,"Y",(function(){return ee})),r.d(e,"Z",(function(){return se})),r.d(e,"ab",(function(){return pe})),r.d(e,"bb",(function(){return Qt})),r.d(e,"cb",(function(){return oe})),r.d(e,"db",(function(){return qt})),r.d(e,"eb",(function(){return Bt})),r.d(e,"fb",(function(){return nt})),r.d(e,"gb",(function(){return dt})),r.d(e,"hb",(function(){return it})),r.d(e,"ib",(function(){return ht})),r.d(e,"jb",(function(){return Nt})),r.d(e,"kb",(function(){return jt})),r.d(e,"lb",(function(){return D})),r.d(e,"mb",(function(){return k}));var i=r(1320),s=r(1324),o=r(763),a=r(1331),c=r(1332),u=r(1021),h=r(1039),l=r(701),f=r(855),p=r(1030),d=r(1360),g=r(1361);function y(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return Object.keys(t).forEach((n=>{if(e.length&&!e.includes(n))return;const i=t[n];
2r.push(...i.accounts)})),r}function v(t,e){return t.includes(":")?[t]:e.chains||[]}const b="base10",_="base16",m="base64pad",w="utf8",E=0,O=1,S=0,I=1,j=12,P=32;function A(){const t=c.generateKeyPair();return{privateKey:Object(u.toString)(t.secretKey,_),publicKey:Object(u.toString)(t.publicKey,_)}}function R(){const t=Object(o.randomBytes)(P);return Object(u.toString)(t,_)}function C(t,e){const r=c.sharedKey(Object(u.fromString)(t,_),Object(u.fromString)(e,_)),n=new s.HKDF(a.SHA256,r).expand(P);return Object(u.toString)(n,_)}function T(t){const e=Object(a.hash)(Object(u.fromString)(t,_));return Object(u.toString)(e,_)}function N(t){const e=Object(a.hash)(Object(u.fromString)(t,w));return Object(u.toString)(e,_)}function x(t){return Number(Object(u.toString)(t,b))}function L(t){const e=function(t){return Object(u.fromString)("".concat(t),b)}(typeof t.type<"u"?t.type:E);if(x(e)===O&&typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof t.senderPublicKey<"u"?Object(u.fromString)(t.senderPublicKey,_):void 0,n=typeof t.iv<"u"?Object(u.fromString)(t.iv,_):Object(o.randomBytes)(j);return function(t){if(x(t.type)===O){if(typeof t.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return Object(u.toString)(Object(u.concat)([t.type,t.senderPublicKey,t.iv,t.sealed]),m)}return Object(u.toString)(Object(u.concat)([t.type,t.iv,t.sealed]),m)}({type:e,sealed:new i.ChaCha20Poly1305(Object(u.fromString)(t.symKey,_)).seal(n,Object(u.fromString)(t.message,w)),iv:n,senderPublicKey:r})}function U(t){const e=new i.ChaCha20Poly1305(Object(u.fromString)(t.symKey,_)),{sealed:r,iv:n}=M(t.encoded),s=e.open(n,r);if(null===s)throw new Error("Failed to decrypt");return Object(u.toString)(s,w)}function M(t){const e=Object(u.fromString)(t,m),r=e.slice(S,I),n=I;if(x(r)===O){const t=n+P,i=t+j,s=e.slice(n,t),o=e.slice(t,i);return{type:r,sealed:e.slice(i),iv:o,senderPublicKey:s}}const i=n+j,s=e.slice(n,i);return{type:r,sealed:e.slice(i),iv:s}}function D(t,e){const r=M(t);return k({type:x(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?Object(u.toString)(r.senderPublicKey,_):void 0,receiverPublicKey:null===e||void 0===e?void 0:e.receiverPublicKey})}function k(t){const e=(null===t||void 0===t?void 0:t.type)||E;if(e===O){if(typeof(null===t||void 0===t?void 0:t.senderPublicKey)>"u")throw new Error("missing sender public key");if(typeof(null===t||void 0===t?void 0:t.receiverPublicKey)>"u")throw new Error("missing receiver public key")}return{type:e,senderPublicKey:null===t||void 0===t?void 0:t.senderPublicKey,receiverPublicKey:null===t||void 0===t?void 0:t.receiverPublicKey}}function z(t){return t.type===O&&"string"==typeof t.senderPublicKey&&"string"==typeof t.receiverPublicKey}var q=Object.defineProperty,H=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable,B=(t,e,r)=>e in t?q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G=(t,e)=>{for(var r in e||(e={}))V.call(e,r)&&B(t,r,e[r]);if(H)for(var r of H(e))K.call(e,r)&&B(t,r,e[r]);return t};const F="ReactNative",W={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"},Y="js";function J(){return typeof t<"u"&&typeof t.versions<"u"&&typeof t.versions.node<"u"}function X(){return!Object(f.getDocument)()&&!!Object(f.getNavigator)()&&navigator.product===F}function Z(){return!J()&&!!Object(f.getNavigator)()}function Q(){return X()?W.reactNative:J()?W.node:Z()?W.browser:W.unknown}function $(){return Object(p.getWindowMetadata)()||{name:"",description:"",url:"",icons:[""]}}function tt(t,e,r){const i=function(){if(Q()===W.reactNative&&typeof n<"u"&&typeof(null==n?void 0:n.Platform)<"u"){const{OS:t,Version:e}=n.Platform;return[t,e].join("-")}const t=Object(h.a)();if(null===t)return"unknown";const e=t.os?t.os.replace(" ","").toLowerCase():"unknown";return"browser"===t.type?[e,t.name,t.version].join("-"):[e,t.version].join("-")}(),s=function(){var t;const e=Q();return e===W.browser?[e,(null==(t=Object(f.getLocation)())?void 0:t.host)||"unknown"].join(":"):e}();return[[t,e].join("-"),[Y,r].join("-"),i,s].join("/")}function et(t){let{protocol:e,version:r,relayUrl:n,sdkVersion:i,auth:s,projectId:o,useOnCloseEvent:a}=t;const c=n.split("?"),u={auth:s,ua:tt(e,r,i),projectId:o,useOnCloseEvent:a||void 0},h=function(t,e){let r=d.parse(t);return r=G(G({},r),e),d.stringify(r)}(c[1]||"",u);return c[0]+"?"+h}function rt(t,e){return t.filter((t=>e.includes(t))).length===t.length}function nt(t){return Object.fromEntries(t.entries())}function it(t){return new Map(Object.entries(t))}function st(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.FIVE_MINUTES,e=arguments.length>1?arguments[1]:void 0;const r=Object(l.toMiliseconds)(t||l.FIVE_MINUTES);let n,i,s;return{resolve:t=>{s&&n&&(clearTimeout(s),n(t))},reject:t=>{s&&i&&(clearTimeout(s),i(t))},done:()=>new Promise(((t,o)=>{s=setTimeout((()=>{o(new Error(e))}),r),n=t,i=o}))}}function ot(t,e,r){return new Promise((async(n,i)=>{const s=setTimeout((()=>i(new Error(r))),e);try{n(await t)}catch(o){i(o)}clearTimeout(s)}))}function at(t,e){if("string"==typeof e&&e.startsWith("".concat(t,":")))return e;if("topic"===t.toLowerCase()){if("string"!=typeof e)throw new Error('Value must be "string" for expirer target type: topic');return"topic:".concat(e)}if("id"===t.toLowerCase()){if("number"!=typeof e)throw new Error('Value must be "number" for expirer target type: id');return"id:".concat(e)}throw new Error("Unknown expirer target type: ".concat(t))}function ct(t){return at("topic",t)}function ut(t){return at("id",t)}function ht(t){const[e,r]=t.split(":"),n={id:void 0,topic:void 0};if("topic"===e&&"string"==typeof r)n.topic=r;else{if("id"!==e||!Number.isInteger(Number(r)))throw new Error("Invalid target, expected id:number or topic:string, got ".concat(e,":").concat(r));n.id=Number(r)}return n}function lt(t,e){return Object(l.fromMiliseconds)((e||Date.now())+Object(l.toMiliseconds)(t))}function ft(t){return Date.now()>=Object(l.toMiliseconds)(t)}function pt(t,e){return"".concat(t).concat(e?":".concat(e):"")}function dt(){return[...new Set([...arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],...arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]])]}async function gt(t){let{id:e,topic:r,wcDeepLink:i}=t;try{if(!i)return;const t="string"==typeof i?JSON.parse(i):i;let s=null===t||void 0===t?void 0:t.href;if("string"!=typeof s)return;s.endsWith("/")&&(s=s.slice(0,-1));const o="".concat(s,"/wc?requestId=").concat(e,"&sessionTopic=").concat(r),a=Q();a===W.browser?o.startsWith("https://")?window.open(o,"_blank","noreferrer noopener"):window.open(o,"_self","noreferrer noopener"):a===W.reactNative&&typeof(null==n?void 0:n.Linking)<"u"&&await n.Linking.openURL(o)}catch(s){console.error(s)}}const yt="irn";function vt(t){return(null===t||void 0===t?void 0:t.relay)||{protocol:yt}}function bt(t){const e=g.RELAY_JSONRPC[t];
2if(typeof e>"u")throw new Error("Relay Protocol not supported: ".concat(t));return e}var _t=Object.defineProperty,mt=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,Ot=(t,e,r)=>e in t?_t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,St=(t,e)=>{for(var r in e||(e={}))wt.call(e,r)&&Ot(t,r,e[r]);if(mt)for(var r of mt(e))Et.call(e,r)&&Ot(t,r,e[r]);return t};function It(t){const e={},r="relay"+(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-");return Object.keys(t).forEach((n=>{if(n.startsWith(r)){const i=n.replace(r,""),s=t[n];e[i]=s}})),e}function jt(t){const e=t.indexOf(":"),r=-1!==t.indexOf("?")?t.indexOf("?"):void 0,n=t.substring(0,e),i=t.substring(e+1,r).split("@"),s=typeof r<"u"?t.substring(r):"",o=d.parse(s);return{protocol:n,topic:Pt(i[0]),version:parseInt(i[1],10),symKey:o.symKey,relay:It(o)}}function Pt(t){return t.startsWith("//")?t.substring(2):t}function At(t){return"".concat(t.protocol,":").concat(t.topic,"@").concat(t.version,"?")+d.stringify(St({symKey:t.symKey},function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"-";const r={};return Object.keys(t).forEach((n=>{const i="relay"+e+n;t[n]&&(r[i]=t[n])})),r}(t.relay)))}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Rt(t){const e=[];return t.forEach((t=>{const[r,n]=t.split(":");e.push("".concat(r,":").concat(n))})),e}function Ct(t,e){const r=$t(t,e);if(r)throw new Error(r.message);const n={};for(const[i,s]of Object.entries(t))n[i]={methods:s.methods,events:s.events,chains:s.accounts.map((t=>"".concat(t.split(":")[0],":").concat(t.split(":")[1])))};return n}function Tt(t){return t.includes(":")}function Nt(t){return Tt(t)?t.split(":")[0]:t}const xt={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}},Lt={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 Ut(t,e){const{message:r,code:n}=Lt[t];return{message:e?"".concat(r," ").concat(e):r,code:n}}function Mt(t,e){const{message:r,code:n}=xt[t];return{message:e?"".concat(r," ").concat(e):r,code:n}}function Dt(t,e){return!!Array.isArray(t)&&(!(typeof e<"u"&&t.length)||t.every(e))}function kt(t){return Object.getPrototypeOf(t)===Object.prototype&&Object.keys(t).length}function zt(t){return typeof t>"u"}function qt(t,e){return!(!e||!zt(t))||"string"==typeof t&&!!t.trim().length}function Ht(t,e){return!(!e||!zt(t))||"number"==typeof t&&!isNaN(t)}function Vt(t,e){const{requiredNamespaces:r}=e,n=Object.keys(t.namespaces),i=Object.keys(r);let s=!0;return!!rt(i,n)&&(n.forEach((e=>{const{accounts:n,methods:i,events:o}=t.namespaces[e],a=Rt(n),c=r[e];(!rt(v(e,c),a)||!rt(c.methods,i)||!rt(c.events,o))&&(s=!1)})),s)}function Kt(t){return!(!qt(t,!1)||!t.includes(":"))&&2===t.split(":").length}function Bt(t){if(qt(t,!1))try{return typeof new URL(t)<"u"}catch{return!1}return!1}function Gt(t){var e;return null==(e=null===t||void 0===t?void 0:t.proposer)?void 0:e.publicKey}function Ft(t){return null===t||void 0===t?void 0:t.topic}function Wt(t,e){let r=null;return qt(null===t||void 0===t?void 0:t.publicKey,!1)||(r=Ut("MISSING_OR_INVALID","".concat(e," controller public key should be a string"))),r}function Yt(t){let e=!0;return Dt(t)?t.length&&(e=t.every((t=>qt(t,!1)))):e=!1,e}function Jt(t,e,r){let n=null;return Object.entries(t).forEach((t=>{let[i,s]=t;if(n)return;const o=function(t,e,r){let n=null;return Dt(e)&&e.length?e.forEach((t=>{n||Kt(t)||(n=Mt("UNSUPPORTED_CHAINS","".concat(r,", chain ").concat(t,' should be a string and conform to "namespace:chainId" format')))})):Kt(t)||(n=Mt("UNSUPPORTED_CHAINS","".concat(r,', 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:
25"] }'))),n}(i,v(i,s),"".concat(e," ").concat(r));o&&(n=o)})),n}function Xt(t,e){let r=null;return Dt(t)?t.forEach((t=>{r||function(t){if(qt(t,!1)&&t.includes(":")){const e=t.split(":");if(3===e.length){const t=e[0]+":"+e[1];return!!e[2]&&Kt(t)}}return!1}(t)||(r=Mt("UNSUPPORTED_ACCOUNTS","".concat(e,", account ").concat(t,' should be a string and conform to "namespace:chainId:address" format')))})):r=Mt("UNSUPPORTED_ACCOUNTS","".concat(e,', accounts should be an array of strings conforming to "namespace:chainId:address" format')),r}function Zt(t,e){let r=null;return Object.values(t).forEach((t=>{if(r)return;const n=function(t,e){let r=null;return Yt(null===t||void 0===t?void 0:t.methods)?Yt(null===t||void 0===t?void 0:t.events)||(r=Mt("UNSUPPORTED_EVENTS","".concat(e,", events should be an array of strings or empty array for no events"))):r=Mt("UNSUPPORTED_METHODS","".concat(e,", methods should be an array of strings or empty array for no methods")),r}(t,"".concat(e,", namespace"));n&&(r=n)})),r}function Qt(t,e,r){let n=null;if(t&&kt(t)){const i=Zt(t,e);i&&(n=i);const s=Jt(t,e,r);s&&(n=s)}else n=Ut("MISSING_OR_INVALID","".concat(e,", ").concat(r," should be an object with data"));return n}function $t(t,e){let r=null;if(t&&kt(t)){const n=Zt(t,e);n&&(r=n);const i=function(t,e){let r=null;return Object.values(t).forEach((t=>{if(r)return;const n=Xt(null===t||void 0===t?void 0:t.accounts,"".concat(e," namespace"));n&&(r=n)})),r}(t,e);i&&(r=i)}else r=Ut("MISSING_OR_INVALID","".concat(e,", namespaces should be an object with data"));return r}function te(t){return qt(t.protocol,!0)}function ee(t,e){let r=!1;return e&&!t?r=!0:t&&Dt(t)&&t.length&&t.forEach((t=>{r=te(t)})),r}function re(t){return"number"==typeof t}function ne(t){return typeof t<"u"&&null!==typeof t}function ie(t){return!(!t||"object"!=typeof t||!t.code||!Ht(t.code,!1)||!t.message||!qt(t.message,!1))}function se(t){return!(zt(t)||!qt(t.method,!1))}function oe(t){return!(zt(t)||zt(t.result)&&zt(t.error)||!Ht(t.id,!1)||!qt(t.jsonrpc,!1))}function ae(t){return!(zt(t)||!qt(t.name,!1))}function ce(t,e){return!(!Kt(e)||!function(t){const e=[];return Object.values(t).forEach((t=>{e.push(...Rt(t.accounts))})),e}(t).includes(e))}function ue(t,e,r){return!!qt(r,!1)&&function(t,e){const r=[];return Object.values(t).forEach((t=>{Rt(t.accounts).includes(e)&&r.push(...t.methods)})),r}(t,e).includes(r)}function he(t,e,r){return!!qt(r,!1)&&function(t,e){const r=[];return Object.values(t).forEach((t=>{Rt(t.accounts).includes(e)&&r.push(...t.events)})),r}(t,e).includes(r)}function le(t,e,r){let n=null;const i=function(t){const e={};return Object.keys(t).forEach((r=>{var n;r.includes(":")?e[r]=t[r]:null==(n=t[r].chains)||n.forEach((n=>{e[n]={methods:t[r].methods,events:t[r].events}}))})),e}(t),s=function(t){const e={};return Object.keys(t).forEach((r=>{if(r.includes(":"))e[r]=t[r];else{const n=Rt(t[r].accounts);null===n||void 0===n||n.forEach((n=>{e[n]={accounts:t[r].accounts.filter((t=>t.includes("".concat(n,":")))),methods:t[r].methods,events:t[r].events}}))}})),e}(e),o=Object.keys(i),a=Object.keys(s),c=fe(Object.keys(t)),u=fe(Object.keys(e)),h=c.filter((t=>!u.includes(t)));return h.length&&(n=Ut("NON_CONFORMING_NAMESPACES","".concat(r," namespaces keys don't satisfy requiredNamespaces.\n      Required: ").concat(h.toString(),"\n      Received: ").concat(Object.keys(e).toString()))),rt(o,a)||(n=Ut("NON_CONFORMING_NAMESPACES","".concat(r," namespaces chains don't satisfy required namespaces.\n      Required: ").concat(o.toString(),"\n      Approved: ").concat(a.toString()))),Object.keys(e).forEach((t=>{if(!t.includes(":")||n)return;const i=Rt(e[t].accounts);i.includes(t)||(n=Ut("NON_CONFORMING_NAMESPACES","".concat(r," namespaces accounts don't satisfy namespace accounts for ").concat(t,"\n        Required: ").concat(t,"\n        Approved: ").concat(i.toString())))})),o.forEach((t=>{n||(rt(i[t].methods,s[t].methods)?rt(i[t].events,s[t].events)||(n=Ut("NON_CONFORMING_NAMESPACES","".concat(r," namespaces events don't satisfy namespace events for ").concat(t))):n=Ut("NON_CONFORMING_NAMESPACES","".concat(r," namespaces methods don't satisfy namespace methods for ").concat(t)))})),n}function fe(t){return[...new Set(t.map((t=>t.includes(":")?t.split(":")[0]:t)))]}function pe(t,e){return Ht(t,!1)&&t<=e.max&&t>=e.min}}).call(this,r(133),r(72))},763:function(t,e,r){"use strict";
2Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const n=r(1327),i=r(723),s=r(652);function o(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.defaultRandomSource).randomBytes(t)}e.defaultRandomSource=new n.SystemRandomSource,e.randomBytes=o,e.randomUint32=function(){const t=o(4,arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.defaultRandomSource),r=(0,i.readUint32LE)(t);return(0,s.wipe)(t),r};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultRandomSource;if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let i="";const c=r.length,u=256-256%c;for(;t>0;){const e=o(Math.ceil(256*t/u),n);for(let n=0;n<e.length&&t>0;n++){const s=e[n];s<u&&(i+=r.charAt(s%c),t--)}(0,s.wipe)(e)}return i}e.randomString=c,e.randomStringForEntropy=function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.defaultRandomSource;return c(Math.ceil(t/(Math.log(r.length)/Math.LN2)),r,n)}},764:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asUint8Array=function(t){return null!=globalThis.Buffer?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t}},765:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(1346);e.decode=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return[n.decode(t,e),n.decode.bytes]},e.encodeTo=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n.encode(t,e,r),e},e.encodingLength=t=>n.encodingLength(t)},766:function(t,e,r){"use strict";r.r(e),r.d(e,"__extends",(function(){return i})),r.d(e,"__assign",(function(){return s})),r.d(e,"__rest",(function(){return o})),r.d(e,"__decorate",(function(){return a})),r.d(e,"__param",(function(){return c})),r.d(e,"__metadata",(function(){return u})),r.d(e,"__awaiter",(function(){return h})),r.d(e,"__generator",(function(){return l})),r.d(e,"__createBinding",(function(){return f})),r.d(e,"__exportStar",(function(){return p})),r.d(e,"__values",(function(){return d})),r.d(e,"__read",(function(){return g})),r.d(e,"__spread",(function(){return y})),r.d(e,"__spreadArrays",(function(){return v})),r.d(e,"__await",(function(){return b})),r.d(e,"__asyncGenerator",(function(){return _})),r.d(e,"__asyncDelegator",(function(){return m})),r.d(e,"__asyncValues",(function(){return w}
2)),r.d(e,"__makeTemplateObject",(function(){return E})),r.d(e,"__importStar",(function(){return O})),r.d(e,"__importDefault",(function(){return S})),r.d(e,"__classPrivateFieldGet",(function(){return I})),r.d(e,"__classPrivateFieldSet",(function(){return j}));var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var s=function(){return s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)};function o(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function a(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function c(t,e){return function(r,n){e(r,n,t)}}function u(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{c(n.next(t))}catch(e){s(e)}}function a(t){try{c(n.throw(t))}catch(e){s(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}c((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(a){s=[6,a],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function f(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}function p(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||(e[r]=t[r])}function d(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function v(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function b(t){return this instanceof b?(this.v=t,this):new b(t)}function _(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),s=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){
vendor: 2,292 bytes, line 2
2s.push([t,e,r,n])>1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(c,u):h(s[0][2],r)}catch(n){h(s[0][3],n)}var r}function c(t){a("next",t)}function u(t){a("throw",t)}function h(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}}function m(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=d(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function E(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function O(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}function I(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function j(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},767:function(t,e,r){"use strict";r.r(e),r.d(e,"__extends",(function(){return i})),r.d(e,"__assign",(function(){return s})),r.d(e,"__rest",(function(){return o})),r.d(e,"__decorate",(function(){return a})),r.d(e,"__param",(function(){return c})),r.d(e,"__metadata",(function(){return u})),r.d(e,"__awaiter",(function(){return h})),r.d(e,"__generator",(function(){return l})),r.d(e,"__createBinding",(function(){return f})),r.d(e,"__exportStar",(function(){return p})),r.d(e,"__values",(function(){return d})),r.d(e,"__read",(function(){return g})),r.d(e,"__spread",(function(){return y})),r.d(e,"__spreadArrays",(function(){return v})),r.d(e,"__await",(function(){return b})),r.d(e,"__asyncGenerator",(function(){return _})),r.d(e,"__asyncDelegator",(function(){return m})),r.d(e,"__asyncValues",(function(){return w}
2)),r.d(e,"__makeTemplateObject",(function(){return E})),r.d(e,"__importStar",(function(){return O})),r.d(e,"__importDefault",(function(){return S})),r.d(e,"__classPrivateFieldGet",(function(){return I})),r.d(e,"__classPrivateFieldSet",(function(){return j}));var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)};function i(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var s=function(){return s=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},s.apply(this,arguments)};function o(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}function a(t,e,r,n){var i,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function c(t,e){return function(r,n){e(r,n,t)}}function u(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,r,n){return new(r||(r=Promise))((function(i,s){function o(t){try{c(n.next(t))}catch(e){s(e)}}function a(t){try{c(n.throw(t))}catch(e){s(e)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(o,a)}c((n=n.apply(t,e||[])).next())}))}function l(t,e){var r,n,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(a){s=[6,a],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function f(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}function p(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||(e[r]=t[r])}function d(t){var e="function"===typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var r="function"===typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(a){i={error:a}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}function y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function v(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)n[i]=s[o];return n}function b(t){return this instanceof b?(this.v=t,this):new b(t)}function _(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(t,e||[]),s=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(t){i[t]&&(n[t]=function(e){return new Promise((function(r,n){
2s.push([t,e,r,n])>1||a(t,e)}))})}function a(t,e){try{(r=i[t](e)).value instanceof b?Promise.resolve(r.value.v).then(c,u):h(s[0][2],r)}catch(n){h(s[0][3],n)}var r}function c(t){a("next",t)}function u(t){a("throw",t)}function h(t,e){t(e),s.shift(),s.length&&a(s[0][0],s[0][1])}}function m(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:b(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=d(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,i,(e=t[r](e)).done,e.value)}))}}}function E(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function O(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function S(t){return t&&t.__esModule?t:{default:t}}function I(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function j(t,e,r){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,r),r}},768:function(t,e,r){"use strict";r.d(e,"h",(function(){return n})),r.d(e,"i",(function(){return i})),r.d(e,"f",(function(){return s})),r.d(e,"g",(function(){return o})),r.d(e,"e",(function(){return a})),r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return u})),r.d(e,"d",(function(){return h})),r.d(e,"c",(function(){return l})),r.d(e,"l",(function(){return f})),r.d(e,"k",(function(){return p})),r.d(e,"m",(function(){return d})),r.d(e,"n",(function(){return g})),r.d(e,"j",(function(){return y}));const n="EdDSA",i="JWT",s=".",o="base64url",a="utf8",c="utf8",u=":",h="did",l="key",f="base58btc",p="z",d="K36",g=32,y=32},850:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pino=void 0;const n=r(1313),i=n.__importDefault(r(1314));Object.defineProperty(e,"pino",{enumerable:!0,get:function(){return i.default}}),n.__exportStar(r(1014),e),n.__exportStar(r(1316),e)},852:function(t,e,r){"use strict";function n(t,e){if(t.length!==e.length)return 0;for(var r=0,n=0;n<t.length;n++)r|=t[n]^e[n];return 1&r-1>>>8}Object.defineProperty(e,"__esModule",{value:!0}),e.select=function(t,e,r){return~(t-1)&e|t-1&r},e.lessOrEqual=function(t,e){return(0|t)-(0|e)-1>>>31&1},e.compare=n,e.equal=function(t,e){return 0!==t.length&&0!==e.length&&0!==n(t,e)}},853:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(764);e.alloc=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.alloc?n.asUint8Array(globalThis.Buffer.alloc(t)):new Uint8Array(t)},e.allocUnsafe=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?n.asUint8Array(globalThis.Buffer.allocUnsafe(t)):new Uint8Array(t)}},854:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(724);class i{constructor(t,e,r){this.name=t,this.code=e,this.encode=r}digest(t){if(t instanceof Uint8Array){const e=this.encode(t);return e instanceof Uint8Array?n.create(this.code,e):e.then((t=>n.create(this.code,t)))}throw Error("Unknown type, must be binary type")}}e.Hasher=i,e.from=t=>{let{name:e,code:r,encode:n}=t;return new i(e,r,n)}},856:function(t,e,r){"use strict";r.d(e,"c",(function(){return i})),r.d(e,"d",(function(){return s})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return a})),r.d(e,"g",(function(){return c})),r.d(e,"h",(function(){return u})),r.d(e,"e",(function(){return h})),r.d(e,"f",(function(){return l}));var n=r(1037);function i(t){return Object(n.c)(t,"subscribe")}function s(t){return Object(n.b)(t,["topic"],[])}function o(t){return Object(n.c)(t,"publish")}function a(t){return Object(n.b)(t,["message","topic","ttl"],["prompt","tag"])}function c(t){return Object(n.c)(t,"unsubscribe")}function u(t){return Object(n.b)(t,["id","topic"],[])}
2function h(t){return Object(n.c)(t,"subscription")}function l(t){return Object(n.b)(t,["id","data"],[])}},857:function(t,e,r){"use strict";r.d(e,"d",(function(){return h})),r.d(e,"a",(function(){return l})),r.d(e,"c",(function(){return f})),r.d(e,"e",(function(){return p})),r.d(e,"b",(function(){return d}));var n=r(1022),i=r(1028),s=r(1023),o=r(722),a=r(768);function c(t){return Object(o.a)(Object(i.toString)(Object(s.fromString)(t,a.g),a.e))}function u(t){return Object(i.toString)(Object(s.fromString)(Object(o.b)(t),a.e),a.g)}function h(t){const e=Object(s.fromString)(a.m,a.l),r=a.k+Object(i.toString)(Object(n.concat)([e,t]),a.l);return[a.d,a.c,r].join(a.b)}function l(t){const[e,r,n]=t.split(a.b);if(e!==a.d||r!==a.c)throw new Error('Issuer must be a DID with method "key"');if(n.slice(0,1)!==a.k)throw new Error("Issuer must be a key in mulicodec format");const o=Object(s.fromString)(n.slice(1),a.l);if(Object(i.toString)(o.slice(0,2),a.l)!==a.m)throw new Error('Issuer must be a public key with type "Ed25519"');const c=o.slice(2);if(c.length!==a.n)throw new Error("Issuer must be a public key with length 32 bytes");return c}function f(t){return Object(s.fromString)([u(t.header),u(t.payload)].join(a.f),a.a)}function p(t){return[u(t.header),u(t.payload),(e=t.signature,Object(i.toString)(e,a.g))].join(a.f);var e}function d(t){const e=t.split(a.f);var r;return{header:c(e[0]),payload:c(e[1]),signature:(r=e[2],Object(s.fromString)(r,a.g)),data:Object(s.fromString)(e.slice(0,2).join(a.f),a.a)}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.