1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,322066,e=>{"use strict";e.s(["default",()=>o]);let t=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,r=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,n=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function i(e,t){var r;return"__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t?void(r=e,console.warn('[destr] Dropping "'.concat(r,'" key to prevent prototype pollution.'))):t}function o(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)return e;if('"'===e[0]&&'"'===e[e.length-1]&&-1===e.indexOf("\\"))return e.slice(1,-1);let s=e.trim();if(s.length<=9)switch(s.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return NaN;case"infinity":return 1/0;case"-infinity":return-1/0}if(!n.test(e)){if(o.strict)throw SyntaxError("[destr] Invalid JSON");return e}try{if(t.test(e)||r.test(e)){if(o.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse(e,i)}return JSON.parse(e)}catch(t){if(o.strict)throw t;return e}}},219298,(e,t,r)=>{"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(e,t){return new Promise(function(r,n){var i,o,s;function a(r){e.removeListener(t,u),n(r)}function u(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}y(e,t,u,{once:!0}),"error"!==t&&(i=e,o=a,s={once:!0},"function"==typeof i.on&&y(i,"error",o,s))})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){if(l(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=c(e))>0&&s.length>i&&!s.warned){s.warned=!0;var i,o,s,a=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,console&&console.warn&&console.warn(a)}return e}function h(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):g(i,i.length)}function b(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),a.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var s,a=Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,t);else for(var l=u.length,c=g(u,l),r=0;r<l;++r)o(c[r],this,t);return!0},a.prototype.addListener=function(e,t){return f(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return f(this,e,t,!0)},a.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,i,o,s;if(l(t),void 0===(n=this._events)||void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit
1("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):b.call(e,t)},a.prototype.listenerCount=b,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},787267,e=>{"use strict";e.s(["__assign",()=>n,"__asyncDelegator",()=>v,"__asyncGenerator",()=>y,"__asyncValues",()=>m,"__await",()=>g,"__awaiter",()=>u,"__classPrivateFieldGet",()=>x,"__classPrivateFieldSet",()=>_,"__createBinding",()=>c,"__decorate",()=>o,"__exportStar",()=>f,"__extends",()=>r,"__generator",()=>l,"__importDefault",()=>E,"__importStar",()=>
1w,"__makeTemplateObject",()=>D,"__metadata",()=>a,"__param",()=>s,"__read",()=>d,"__rest",()=>i,"__spread",()=>p,"__spreadArrays",()=>b,"__values",()=>h]);var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,r)};function r(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){return function(r,n){t(r,n,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var u=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=t.call(e,s)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function c(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function f(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function b(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function y(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||a(e,t)})})}function a(e,t){try{var r;(r=i[e](t)).value instanceof g?Promise.resolve(r.value.v).then(u,l):c(o[0][2],r)}catch(e){c(o[0][3],e)}}function u(e){a("next",e)}function l(e){a("throw",e)}function c(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function v(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:g(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function m(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var o,s,a;o=n,s=i,a=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:a})},s)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function _(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},417459,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.delay=void 0,r.delay=function(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}},945011,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_THOUSAND=r.ONE_HUNDRED=void 0,r.ONE_HUNDRED=100,r.ONE_THOUSAND=1e3},964194,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ONE_YEAR=r.FOUR_WEEKS=r.THREE_WEEKS=r.TWO_WEEKS=r.ONE_WEEK=r.THIRTY_DAYS=r.SEVEN_DAYS=r.FIVE_DAYS=r.THREE_DAYS=r.ONE_DAY=r.TWENTY_FOUR_HOURS=r.TWELVE_HOURS=r.SIX_HOURS=r.THREE_HOURS=r.ONE_HOUR=r.SIXTY_MINUTES=r.THIRTY_MINUTES=r.TEN_MINUTES=r.FIVE_MINUTES=r.ONE_MINUTE=r.SIXTY_SECONDS=r.THIRTY_SECONDS=r.TEN_SECONDS=r.FIVE_SECONDS=r.ONE_SECOND=void 0,r.ONE_SECOND=1,r.FIVE_SECONDS=5,r.TEN_SECONDS=10,r.THIRTY_SECONDS=30,r.SIXTY_SECONDS=60,r.ONE_MINUTE=r.SIXTY_SECONDS,r.FIVE_MINUTES=5*r.ONE_MINUTE,r.TEN_MINUTES=10*r.ONE_MINUTE,r.THIRTY_MINUTES=30*r.ONE_MINUTE,r.SIXTY_MINUTES=60*r.ONE_MINUTE,r.ONE_HOUR=r.SIXTY_MINUTES,r.THREE_HOURS=3*r.ONE_HOUR,r.SIX_HOURS=6*r.ONE_HOUR,r.TWELVE_HOURS=12*r.ONE_HOUR,r.TWENTY_FOUR_HOURS=24*r.ONE_HOUR,r.ONE_DAY=r.TWENTY_FOUR_HOURS,r.THREE_DAYS=3*r.ONE_DAY,r.FIVE_DAYS=5*r.ONE_DAY,r.SEVEN_DAYS=7*r.ONE_DAY,r.THIRTY_DAYS=30*r.ONE_DAY,r.ONE_WEEK=r.SEVEN_DAYS,r.TWO_WEEKS=2*r.ONE_WEEK,r.THREE_WEEKS=3*r.ONE_WEEK,r.FOUR_WEEKS=4*r.ONE_WEEK,r.ONE_YEAR=365*r.ONE_DAY},881927,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(787267);n.__exportStar(e.r(945011),r),n.__exportStar(e.r(964194),r)},652969,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fromMiliseconds=r.toMiliseconds=void 0;let n=e.r(881927);r.toMiliseconds=function(e){return e*n.ONE_THOUSAND},r.fromMiliseconds=function(e){return Math.floor(e/n.ONE_THOUSAND)}},497525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(787267);n.__exportStar(e.r(417459),r),n.__exportStar(e.r(652969),r)},345382,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Watch=void 0;class n{start(e){if(this.timestamps.has(e))throw Error("Watch already started for label: ".concat(e));this.timestamps.set(e,{started:Date.now()})}stop(e){let t=this.get(e);if(void 0!==t.elapsed)throw Error("Watch already stopped for label: ".concat(e));let r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){let t=this.timestamps.get(e);if(void 0===t)throw Error("No timestamp found for label: ".concat(e));return t}elapsed(e){let t=this.get(e);return t.elapsed||Date.now()-t.started}constructor(){this.timestamps=new Map}}r.Watch=n,r.default=n},208055,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.IWatch=void 0,r.IWatch=class{}},663134,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),e.r(787267).__exportStar(e.r(208055),r)},648512,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(787267);n.__exportStar(e.r(497525),r),n.__exportStar(e.r(345382),r),n.__exportStar(e.r(663134),r),n.__exportStar(e.r(881927),r)},36610,(e,t,r)=>{"use strict";function n(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function i(e){let t=n(e);if(!t)throw Error("".concat(e," is not defined in Window"));return t}Object.defineProperty(r,"__esModule",{value:!0}),r.getLocalStorage=r.getLocalStorageOrThrow=r.getCrypto=r.getCryptoOrThrow=r.getLocation=r.getLocationOrThrow=r.getNavigator=r.getNavigatorOrThrow=r.getDocument=r.getDocumentOrThrow=r.getFromWindowOrThrow=r.getFromWindow=void 0,r.getFromWindow=n,r.getFromWindowOrThrow=i,r.getDocumentOrThrow=function(){return i("document")},r.getDocument=function(){return n("document")},r.getNavigatorOrThrow=function(){return i("navigator")},r.getNavigator=function(){return n("navigator")},r.getLocationOrThrow=function(){return i("location")},r.getLocation=function(){return n("location")},r.getCryptoOrThrow=function(){return i("crypto")},r.getCrypto=function(){return n("crypto")},r.getLocalStorageOrThrow=function(){return i("localStorage")},r.getLocalStorage=function(){return n("localStorage")}},275221,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),r.getWindowMetadata=void 0;let n=e.r(36610);r.getWindowMetadata=function(){let e,t,r;try{e=n.getDocumentOrThrow(),t=n.getLocationOrThrow()}catch(e){return null}function i(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];let i=e.getElementsByTagName("meta");for(let e=0;e<i.length;e++){let t=i[e],n=["itemprop","property","name"].map(e=>t.getAttribute(e)).filter(e=>!!e&&r.includes(e));if(n.length&&n){let e=t.getAttribute("content");if(e)return e}}return""}let o=((r=i("name","og:site_name","og:title","twitter:title"))||(r=e.title),r),s=i("description","og:description","twitter:description","keywords"),a=t.origin;return{description:s,url:a,icons:function(){let r=e.getElementsByTagName("link"),n=[];for(let e=0;e<r.length;e++){let i=r[e],o=i.getAttribute("rel");if(o&&o.toLowerCase().indexOf("icon")>-1){let e=i.getAttribute("href");if(e)if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{let n=t.pathname.split("/");n.pop(),r+=n.join("/")+"/"+e}n.push(r)}else if(0===e.indexOf("//")){let r=t.protocol+e;n.push(r)}else n.push(e)}}return n}(),name:o}}},277945,103476,e=>{"use strict";e.s(["detect",()=>f],277945);var t=e.i(247167),r=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},n=function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"},i=function(e){this.version=e,this.type="node",this.name="node",this.os=t.default.platform},o=function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"},s=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},a=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},u=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],c=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function f(e){return e?h(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new a:"undefined"!=typeof navigator?h(navigator.userAgent):void 0!==t.default&&t.default.version?new i(t.default.version.slice(1)):null}function h(e){var t=""!==e&&l.reduce(function(t,r){var n=r[0],i=r[1];if(t)return t;var o=i.exec(e);return!!o&&[n,o]},!1);if(!t)return null;var i=t[0],a=t[1];if("searchbot"===i)return new s;var f=a[1]&&a[1].split(".").join("_").split("_").slice(0,3);f?f.length<3&&(f=r(r([],f,!0),function(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}(3-f.length),!0)):f=[];var h=f.join("."),d=function(e){for(var t=0,r=c.length;t<r;t++){var n=c[t],i=n[0];if(n[1].exec(e))return i}return null}(e),p=u.exec(e);return p&&p[1]?new o(i,h,d,p[1]):new n(i,h,d)}e.s(["default",()=>d],103476);let d=function(e){if(e.length>=255)throw TypeError("Alphabet too long");let t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let r=0;r<e.length;r++){let n=e.charAt(r),i=n.charCodeAt(0);if(255!==t[i])throw TypeError(n+" is ambiguous");t[i]=r}let r=e.length,n=e.charAt(0),i=Math.log(r)/Math.log(256),o=Math.log(256)/Math.log(r);function s(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;let o=0,s=0,a=0;for(;e[o]===n;)s++,o++;let u=(e.length-o)*i+1>>>0,l=new Uint8Array(u);for(;o<e.length;){let n=e.charCodeAt(o);if(n>255)return;let i=t[n];if(255===i)return;let s=0;for(let e=u-1;(0!==i||s<a)&&-1!==e;e--,s++)i+=r*l[e]>>>0,l[e]=i%256>>>0,i=i/256>>>0;if(0!==i)throw Error("Non-zero carry");a=s,o++}let c=u-a;for(;c!==u&&0===l[c];)c++;let f=new Uint8Array(s+(u-c)),h=s;for(;c!==u;)f[h++]=l[c++];return f}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";let i=0,s=0,a=0,u=t.length;for(;
1a!==u&&0===t[a];)a++,i++;let l=(u-a)*o+1>>>0,c=new Uint8Array(l);for(;a!==u;){let e=t[a],n=0;for(let t=l-1;(0!==e||n<s)&&-1!==t;t--,n++)e+=256*c[t]>>>0,c[t]=e%r>>>0,e=e/r>>>0;if(0!==e)throw Error("Non-zero carry");s=n,a++}let f=l-s;for(;f!==l&&0===c[f];)f++;let h=n.repeat(i);for(;f<l;++f)h+=e.charAt(c[f]);return h},decodeUnsafe:s,decode:function(e){let t=s(e);if(t)return t;throw Error("Non-base"+r+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},31794,e=>{"use strict";function t(e){if("string"!=typeof e)throw Error("Cannot safe json parse value of type ".concat(typeof e));try{return JSON.parse(e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3'),(e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t)}catch(t){return e}}function r(e){return"string"==typeof e?e:JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString()+"n":t)||""}e.s(["safeJsonParse",()=>t,"safeJsonStringify",()=>r])},121609,e=>{"use strict";e.s(["decodeJWT",()=>tv,"encodeIss",()=>ty,"generateKeyPair",()=>tm,"signJWT",()=>tD]);var t=e.i(648512),r=e.i(31794);function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(r.length>0&&!r.includes(e.length))throw Error("Uint8Array expected of length "+r+", got length="+e.length)}function i(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}let o="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,s=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);function a(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),n(e),e}class u{clone(){return this._cloneInto()}}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(o&&"function"==typeof o.getRandomValues)return o.getRandomValues(new Uint8Array(e));if(o&&"function"==typeof o.randomBytes)return o.randomBytes(e);throw Error("crypto.getRandomValues must be defined")}class c extends u{update(e){i(this);let{view:t,buffer:r,blockLen:n}=this,o=(e=a(e)).length;for(let i=0;i<o;){let a=Math.min(n-this.pos,o-i);if(a===n){let t=s(e);for(;n<=o-i;i+=n)this.process(t,i);continue}r.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){i(this),function(e,t){n(e);let r=t.outputLen;if(e.length<r)throw Error("digestInto() expects output buffer of length at least "+r)}(e,this),this.finished=!0;let{buffer:t,view:r,blockLen:o,isLE:a}=this,{pos:u}=this;t[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>o-u&&(this.process(r,0),u=0);for(let e=u;e<o;e++)t[e]=0;(function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(0xffffffff),s=Number(r>>i&o),a=Number(r&o),u=4*!!n,l=4*!n;e.setUint32(t+u,s,n),e.setUint32(t+l,a,n)})(r,o-8,BigInt(8*this.length),a),this.process(r,0);let l=s(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let f=c/4,h=this.get();if(f>h.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<f;e++)l.setUint32(4*e,h[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=s(this.buffer)}}let f=BigInt(0x100000000-1),h=BigInt(32),d={split:function(e){let t=arguments.length>
11&&void 0!==arguments[1]&&arguments[1],r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){let{h:o,l:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?{h:Number(e&f),l:Number(e>>h&f)}:{h:0|Number(e>>h&f),l:0|Number(e&f)}}(e[i],t);[r[i],n[i]]=[o,s]}return[r,n]},shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,add:function(e,t,r,n){let i=(t>>>0)+(n>>>0);return{h:e+r+(i/0x100000000|0)|0,l:0|i}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/0x100000000|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,i)=>t+r+n+i+(e/0x100000000|0)|0,add5H:(e,t,r,n,i,o)=>t+r+n+i+o+(e/0x100000000|0)|0,add5L:(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0)},[p,b]=d.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
15771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),g=new Uint32Array(80),y=new Uint32Array(80);class v extends c{get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:u,El:l,Fh:c,Fl:f,Gh:h,Gl:d,Hh:p,Hl:b}=this;return[e,t,r,n,i,o,s,a,u,l,c,f,h,d,p,b]}set(e,t,r,n,i,o,s,a,u,l,c,f,h,d,p,b){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|u,this.El=0|l,this.Fh=0|c,this.Fl=0|f,this.Gh=0|h,this.Gl=0|d,this.Hh=0|p,this.Hl=0|b}process(e,t){for(let r=0;r<16;r++,t+=4)g[r]=e.getUint32(t),y[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|g[e-15],r=0|y[e-15],n=d.rotrSH(t,r,1)^d.rotrSH(t,r,8)^d.shrSH(t,r,7),i=d.rotrSL(t,r,1)^d.rotrSL(t,r,8)^d.shrSL(t,r,7),o=0|g[e-2],s=0|y[e-2],a=d.rotrSH(o,s,19)^d.rotrBH(o,s,61)^d.shrSH(o,s,6),u=d.rotrSL(o,s,19)^d.rotrBL(o,s,61)^d.shrSL(o,s,6),l=d.add4L(i,u,y[e-7],y[e-16]),c=d.add4H(l,n,a,g[e-7],g[e-16]
1);g[e]=0|c,y[e]=0|l}let{Ah:r,Al:n,Bh:i,Bl:o,Ch:s,Cl:a,Dh:u,Dl:l,Eh:c,El:f,Fh:h,Fl:v,Gh:m,Gl:D,Hh:w,Hl:E}=this;for(let e=0;e<80;e++){let t=d.rotrSH(c,f,14)^d.rotrSH(c,f,18)^d.rotrBH(c,f,41),x=d.rotrSL(c,f,14)^d.rotrSL(c,f,18)^d.rotrBL(c,f,41),_=c&h^~c&m,O=f&v^~f&D,S=d.add5L(E,x,O,b[e],y[e]),A=d.add5H(S,w,t,_,p[e],g[e]),C=0|S,I=d.rotrSH(r,n,28)^d.rotrBH(r,n,34)^d.rotrBH(r,n,39),B=d.rotrSL(r,n,28)^d.rotrBL(r,n,34)^d.rotrBL(r,n,39),T=r&i^r&s^i&s,L=n&o^n&a^o&a;w=0|m,E=0|D,m=0|h,D=0|v,h=0|c,v=0|f,({h:c,l:f}=d.add(0|u,0|l,0|A,0|C)),u=0|s,l=0|a,s=0|i,a=0|o,i=0|r,o=0|n;let P=d.add3L(C,B,L);r=d.add3H(P,A,I,T),n=0|P}({h:r,l:n}=d.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:o}=d.add(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:a}=d.add(0|this.Ch,0|this.Cl,0|s,0|a)),({h:u,l:l}=d.add(0|this.Dh,0|this.Dl,0|u,0|l)),({h:c,l:f}=d.add(0|this.Eh,0|this.El,0|c,0|f)),({h:h,l:v}=d.add(0|this.Fh,0|this.Fl,0|h,0|v)),({h:m,l:D}=d.add(0|this.Gh,0|this.Gl,0|m,0|D)),({h:w,l:E}=d.add(0|this.Hh,0|this.Hl,0|w,0|E)),this.set(r,n,i,o,s,a,u,l,c,f,h,v,m,D,w,E)}roundClean(){g.fill(0),y.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}constructor(){super(128,64,16,!1),this.Ah=0x6a09e667,this.Al=-0xc4336f8,this.Bh=-0x4498517b,this.Bl=-0x7b3558c5,this.Ch=0x3c6ef372,this.Cl=-0x16b07d5,this.Dh=-0x5ab00ac6,this.Dl=0x5f1d36f1,this.Eh=0x510e527f,this.El=-0x52197d2f,this.Fh=-0x64fa9774,this.Fl=0x2b3e6c1f,this.Gh=0x1f83d9ab,this.Gl=-0x4be4295,this.Hh=0x5be0cd19,this.Hl=0x137e2179}}let m=function(e){let t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}(()=>new v),D=BigInt(0),w=BigInt(1),E=BigInt(2);function x(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function _(e){if(!x(e))throw Error("Uint8Array expected")}function O(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}let S=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function A(e){_(e);let t="";for(let r=0;r<e.length;r++)t+=S[e[r]];return t}function C(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?D:BigInt("0x"+e)}let I={_0:48,_9:57,A:65,F:70,a:97,f:102};function B(e){return e>=I._0&&e<=I._9?e-I._0:e>=I.A&&e<=I.F?e-(I.A-10):e>=I.a&&e<=I.f?e-(I.a-10):void 0}function T(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=B(e.charCodeAt(i)),o=B(e.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+o}return n}function L(e){return _(e),C(A(Uint8Array.from(e).reverse()))}function P(e,t){return T(e.toString(16).padStart(2*t,"0"))}function N(e,t){return P(e,t).reverse()}function U(e,t,r){let n;if("string"==typeof t)try{n=T(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(x(t))n=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let i=n.length;if("number"==typeof r&&i!==r)throw Error(e+" of length "+r+" expected, got "+i);return n}function j(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let n=0;for(let e=0;e<t.length;e++){let r=t[e];_(r),n+=r.length}let i=new Uint8Array(n);for(let e=0,r=0;e<t.length;e++){let n=t[e];i.set(n,r),r+=n.length}return i}let R=e=>"bigint"==typeof e&&D<=e;function k(e,t,r,n){if(!(R(t)&&R(r)&&R(n))||!(r<=t)||!(t<n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}let M={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||x(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function F(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(t,r,n)=>{let i=M[r];if("function"!=typeof i)throw Error("invalid validator function");let o=e[t];if(!(n&&void 0===o)&&!i(o,e))throw Error("param "+String(t)+" is invali
1d. Expected "+r+", got "+o)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}function z(e){let t=new WeakMap;return function(r){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];let s=t.get(r);if(void 0!==s)return s;let a=e(r,...i);return t.set(r,a),a}}let H=BigInt(0),W=BigInt(1),V=BigInt(2),q=BigInt(3),K=BigInt(4),J=BigInt(5),Y=BigInt(8);function G(e,t){let r=e%t;return r>=H?r:t+r}function Z(e,t,r){let n=e;for(;t-- >H;)n*=n,n%=r;return n}function X(e,t){if(e===H)throw Error("invert: expected non-zero number");if(t<=H)throw Error("invert: expected positive modulus, got "+t);let r=G(e,t),n=t,i=H,o=W;for(;r!==H;){let e=n/r,t=n%r,s=i-o*e;n=r,r=t,i=o,o=s}if(n!==W)throw Error("invert: does not exist");return G(i,t)}let Q=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function $(e,t){let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function ee(e,t){let r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=H)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:o,nByteLength:s}=$(e,t);if(s>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let a=Object.freeze({ORDER:e,isLE:n,BITS:o,BYTES:s,MASK:(E<<BigInt(o-1))-w,ZERO:H,ONE:W,create:t=>G(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return H<=t&&t<e},is0:e=>e===H,isOdd:e=>(e&W)===W,neg:t=>G(-t,e),eql:(e,t)=>e===t,sqr:t=>G(t*t,e),add:(t,r)=>G(t+r,e),sub:(t,r)=>G(t-r,e),mul:(t,r)=>G(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<H)throw Error("invalid exponent, negatives unsupported");if(r===H)return e.ONE;if(r===W)return t;let n=e.ONE,i=t;for(;r>H;)r&W&&(n=e.mul(n,i)),i=e.sqr(i),r>>=W;return n})(a,e,t),div:(t,r)=>G(t*X(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>X(t,e),sqrt:i.sqrt||(t=>(r||(r=function(e){if(e%K===q){let t=(e+W)/K;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%Y===J){let t=(e-J)/Y;return function(e,r){let n=e.mul(r,V),i=e.pow(n,t),o=e.mul(r,i),s=e.mul(e.mul(o,V),i),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),r))throw Error("Cannot find square root");return a}}return function(e){let t,r,n,i=(e-W)/V;for(t=e-W,r=0;t%V===H;t/=V,r++);for(n=V;n<e&&function(e,t,r){if(t<H)throw Error("invalid exponent, negatives unsupported");if(r<=H)throw Error("invalid modulus");if(r===W)return H;let n=W;for(;t>H;)t&W&&(n=n*e%r),e=e*e%r,t>>=W;return n}(n,i,e)!==e-W;n++)if(n>1e3)throw Error("Cannot find square root: likely non-prime P");if(1===r){let t=(e+W)/K;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let o=(t+W)/V;return function(e,s){if(e.pow(s,i)===e.neg(e.ONE))throw Error("Cannot find square root");let a=r,u=e.pow(e.mul(e.ONE,n),t),l=e.pow(s,o),c=e.pow(s,t);for(;!e.eql(c,e.ONE);){if(e.eql(c,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(c);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(u,W<<BigInt(a-t-1));u=e.sqr(r),l=e.mul(l,r),c=e.mul(c,u),a=t}return l}}(e)}(e)),r(a,t))),invertBatch:e=>(function(e,t){let r=Array(t.length),n=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),i=e.inv(n);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),i),r})(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>n?N(e,s):P(e,s),fromBytes:e=>{if(e.length!==s)throw Error("Field.fromBytes: expected "+s+" bytes, got "+e.length);return n?L(e):C(A(e))}});return Object.freeze(a)}let et=BigInt(0),er=BigInt(1);function en(e,t){let r=t.negate();return e?r:t}function ei(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function eo(e,t){return ei(e,t),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}let es=new WeakMap,ea=new WeakMap;function eu(e){return ea.get(e)||1}let el=BigInt(0),ec=BigInt(1),ef=BigInt(2),eh=BigInt(8),ed={zip215:!0};BigInt(0),BigInt(1);let ep=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),eb=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);let eg=BigInt(1),ey=BigInt(2);BigInt(3);let ev=BigInt(5),em=BigInt(8),eD=ee(ep,void 0,!0),ew=function(e){var t;let r=function(e){let t=(F(e.Fp,Q.reduce((e,t)=>
1(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),F(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...$(e.n,e.nBitLength),...e,p:e.Fp.ORDER}));return F(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:n,n:i,prehash:o,hash:s,randomBytes:a,nByteLength:u,h:l}=r,c=ef<<BigInt(8*u)-ec,f=n.create,h=ee(r.n,r.nBitLength),d=r.uvRatio||((e,t)=>{try{return{isValid:!0,value:n.sqrt(e*n.inv(t))}}catch(e){return{isValid:!1,value:el}}}),p=r.adjustScalarBytes||(e=>e),b=r.domain||((e,t,r)=>{if(O("phflag",r),t.length||r)throw Error("Contexts/pre-hash are not supported");return e});function g(e,t){k("coordinate "+e,t,el,c)}function y(e){if(!(e instanceof E))throw Error("ExtendedPoint expected")}let v=z((e,t)=>{let{ex:r,ey:i,ez:o}=e,s=e.is0();null==t&&(t=s?eh:n.inv(o));let a=f(r*t),u=f(i*t),l=f(o*t);if(s)return{x:el,y:ec};if(l!==ec)throw Error("invZ was invalid");return{x:a,y:u}}),m=z(e=>{let{a:t,d:n}=r;if(e.is0())throw Error("bad point: ZERO");let{ex:i,ey:o,ez:s,et:a}=e,u=f(i*i),l=f(o*o),c=f(s*s),h=f(c*c),d=f(u*t);if(f(c*f(d+l))!==f(h+f(n*f(u*l))))throw Error("bad point: equation left != right (1)");if(f(i*o)!==f(s*a))throw Error("bad point: equation left != right (2)");return!0});class E{get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof E)throw Error("extended point not allowed");let{x:t,y:r}=e||{};return g("x",t),g("y",r),new E(t,r,ec,f(t*r))}static normalizeZ(e){let t=n.invertBatch(e.map(e=>e.ez));return e.map((e,r)=>e.toAffine(t[r])).map(E.fromAffine)}static msm(e,t){return function(e,t,r,n){if(function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})}(r,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}(n,t),r.length!==n.length)throw Error("arrays of points and scalars must have equal length");let i=e.ZERO,o=function(e){let t;for(t=0;e>D;e>>=w,t+=1);return t}(BigInt(r.length)),s=o>12?o-3:o>4?o-2:o?2:1,a=(1<<s)-1,u=Array(a+1).fill(i),l=Math.floor((t.BITS-1)/s)*s,c=i;for(let e=l;e>=0;e-=s){u.fill(i);for(let t=0;t<n.length;t++){let i=Number(n[t]>>BigInt(e)&BigInt(a));u[i]=u[i].add(r[t])}let t=i;for(let e=u.length-1,r=i;e>0;e--)r=r.add(u[e]),t=t.add(r);if(c=c.add(t),0!==e)for(let e=0;e<s;e++)c=c.double()}return c}(E,h,e,t)}_setWindowSize(e){S.setWindowSize(this,e)}assertValidity(){m(this)}equals(e){y(e);let{ex:t,ey:r,ez:n}=this,{ex:i,ey:o,ez:s}=e,a=f(t*s),u=f(i*n),l=f(r*s),c=f(o*n);return a===u&&l===c}is0(){return this.equals(E.ZERO)}negate(){return new E(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:e}=r,{ex:t,ey:n,ez:i}=this,o=f(t*t),s=f(n*n),a=f(ef*f(i*i)),u=f(e*o),l=t+n,c=f(f(l*l)-o-s),h=u+s,d=h-a,p=u-s,b=f(c*d),g=f(h*p),y=f(c*p);return new E(b,g,f(d*h),y)}add(e){y(e);let{a:t,d:n}=r,{ex:i,ey:o,ez:s,et:a}=this,{ex:u,ey:l,ez:c,et:h}=e;if(t===BigInt(-1)){let e=f((o-i)*(l+u)),t=f((o+i)*(l-u)),r=f(t-e);if(r===el)return this.double();let n=f(s*ef*h),d=f(a*ef*c),p=d+n,b=t+e,g=d-n,y=f(p*r),v=f(b*g),m=f(p*g);return new E(y,v,f(r*b),m)}let d=f(i*u),p=f(o*l),b=f(a*n*h),g=f(s*c),v=f((i+o)*(u+l)-d-p),m=g-b,D=g+b,w=f(p-t*d),x=f(v*m),_=f(D*w),O=f(v*w);return new E(x,_,f(m*D),O)}subtract(e){return this.add(e.negate())}wNAF(e){return S.wNAFCached(this,e,E.normalizeZ)}multiply(e){k("scalar",e,ec,i);let{p:t,f:r}=this.wNAF(e);return E.normalizeZ([t,r])[0]}multiplyUnsafe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.ZERO;return k("scalar",e,el,i),e===el?_:this.is0()||e===ec?this:S.wNAFCachedUnsafe(this,e,E.normalizeZ,t)}isSmallOrder(){return this.multiplyUnsafe(l).is0()}isTorsionFree(){return S.unsafeLadder(this,i).is0()}toAffine(e){return v(this,e)}clearCofactor(){let{h:e}=r;return e===ec?this:this.multiplyUnsafe(e)}static fromHex(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{d:i,a:o}=r,s=n.BYTES;e=U("pointHex",e,s),O("zip215",t);let a=e.slice(),u=e[s-1];a[s-1]=-129&u;let l=L(a);k("pointHex.y",l,el,t?c:n.ORDER);let h=f(l*l),{isValid:p,value:b}=d(f(h-ec),f(i*h-o));
1if(!p)throw Error("Point.fromHex: invalid y coordinate");let g=(b&ec)===ec,y=(128&u)!=0;if(!t&&b===el&&y)throw Error("Point.fromHex: x=0 and x_0=1");return y!==g&&(b=f(-b)),E.fromAffine({x:b,y:l})}static fromPrivateKey(e){return C(e).point}toRawBytes(){let{x:e,y:t}=this.toAffine(),r=N(t,n.BYTES);return r[r.length-1]|=e&ec?128:0,r}toHex(){return A(this.toRawBytes())}constructor(e,t,r,n){this.ex=e,this.ey=t,this.ez=r,this.et=n,g("x",e),g("y",t),g("z",r),g("t",n),Object.freeze(this)}}E.BASE=new E(r.Gx,r.Gy,ec,f(r.Gx*r.Gy)),E.ZERO=new E(el,ec,ec,el);let{BASE:x,ZERO:_}=E,S=(t=8*u,{constTimeNegate:en,hasPrecomputes:e=>1!==eu(e),unsafeLadder(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E.ZERO,n=e;for(;t>et;)t&er&&(r=r.add(n)),n=n.double(),t>>=er;return r},precomputeWindow(e,r){let{windows:n,windowSize:i}=eo(r,t),o=[],s=e,a=s;for(let e=0;e<n;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,r,n){let{windows:i,windowSize:o}=eo(e,t),s=E.ZERO,a=E.BASE,u=BigInt(2**e-1),l=2**e,c=BigInt(e);for(let e=0;e<i;e++){let t=e*o,i=Number(n&u);n>>=c,i>o&&(i-=l,n+=er);let f=t+Math.abs(i)-1,h=e%2!=0,d=i<0;0===i?a=a.add(en(h,r[t])):s=s.add(en(d,r[f]))}return{p:s,f:a}},wNAFUnsafe(e,r,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:E.ZERO,{windows:o,windowSize:s}=eo(e,t),a=BigInt(2**e-1),u=2**e,l=BigInt(e);for(let e=0;e<o;e++){let t=e*s;if(n===et)break;let o=Number(n&a);if(n>>=l,o>s&&(o-=u,n+=er),0===o)continue;let c=r[t+Math.abs(o)-1];o<0&&(c=c.negate()),i=i.add(c)}return i},getPrecomputes(e,t,r){let n=es.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&es.set(t,r(n))),n},wNAFCached(e,t,r){let n=eu(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)},wNAFCachedUnsafe(e,t,r,n){let i=eu(e);return 1===i?this.unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)},setWindowSize(e,r){ei(r,t),ea.set(e,r),es.delete(e)}});function C(e){let t=n.BYTES;e=U("private key",e,t);let r=U("hashed private key",s(e),2*t),o=p(r.slice(0,t)),a=r.slice(t,2*t),u=G(L(o),i),l=x.multiply(u),c=l.toRawBytes();return{head:o,prefix:a,scalar:u,point:l,pointBytes:c}}function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Uint8Array;for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return G(L(s(b(j(...r),U("context",e),!!o))),i)}return x._setWindowSize(8),{CURVE:r,getPublicKey:function(e){return C(e).pointBytes},sign:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e=U("message",e),o&&(e=o(e));let{prefix:s,scalar:a,pointBytes:u}=C(t),l=I(r.context,s,e),c=x.multiply(l).toRawBytes(),f=G(l+I(r.context,c,u,e)*a,i);return k("signature.s",f,el,i),U("result",j(c,N(f,n.BYTES)),2*n.BYTES)},verify:function(e,t,r){let i,s,a,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ed,{context:l,zip215:c}=u,f=n.BYTES;e=U("signature",e,2*f),t=U("message",t),r=U("publicKey",r,f),void 0!==c&&O("zip215",c),o&&(t=o(t));let h=L(e.slice(f,2*f));try{i=E.fromHex(r,c),s=E.fromHex(e.slice(0,f),c),a=x.multiplyUnsafe(h)}catch(e){return!1}if(!c&&i.isSmallOrder())return!1;let d=I(l,s.toRawBytes(),i.toRawBytes(),t);return s.add(i.multiplyUnsafe(d)).subtract(a).clearCofactor().equals(E.ZERO)},ExtendedPoint:E,utils:{getExtendedPublicKey:C,randomPrivateKey:()=>a(n.BYTES),precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:E.BASE;return t._setWindowSize(e),t.multiply(BigInt(3)),t}}}}({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:eD,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:em,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:m,randomBytes:l,adjustScalarBytes:function(e){return e[0]&=248,e[31]&=127,e[31]|=64,e},uvRatio:function(e,t){let r=G(t*t*t,ep),n=function(e){let t=BigInt(10),r=BigInt(20),n=BigInt(40),i=BigInt(80),o=e*e%ep*e%ep,s=Z(o,ey,ep)*o%ep,a=Z(s,eg,ep)*e%ep,u=Z(a,ev,ep)*a%ep,l=Z(u,t,ep)*u%ep,c=Z(l,r,ep)*l%ep,f=Z(c,n,ep)*c%ep,h=Z(f,i,ep)*f%ep,d=Z(h,i,ep)*f%ep,p=Z(d,t,ep)*u%ep;return{pow_p_5_8:Z(p,ey,ep)*e%ep,b2:o}}(e*G(r*r*t,ep)).pow_p_5_8,i=G(e*r*n,ep),o=G(t*i*i,ep),s=i,a=G(i*eb,ep),u=o===e,l=o===G(-e,ep),c=o===G(-e*eb,ep);return u&&(i=s),(l||c)&&(i=a),(G(i,ep)&W)===W&&(i=G(-i,ep)),{isValid:u||l,value:i}}}),eE="base64url",ex="utf8",e_="utf8",eO="base58btc";function eS(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function eA(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?eS(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function eC(e,t){t||(t=e.reduce((e,t)=>
1e+t.length,0));let r=eA(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return eS(r)}var eI=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw TypeError(o+" is ambiguous");r[s]=i}var a=e.length,u=e.charAt(0),l=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[0]){for(var n=0,i=0;e[t]===u;)n++,t++;for(var o=(e.length-t)*l+1>>>0,s=new Uint8Array(o);e[t];){var c=r[e.charCodeAt(t)];if(255===c)return;for(var f=0,h=o-1;(0!==c||f<i)&&-1!==h;h--,f++)c+=a*s[h]>>>0,s[h]=c%256>>>0,c=c/256>>>0;if(0!==c)throw Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),b=n;d!==o;)p[b++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*c+1>>>0,l=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<n)&&-1!==d;d--,h++)f+=256*l[d]>>>0,l[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw Error("Non-zero carry");n=h,i++}for(var p=s-n;p!==s&&0===l[p];)p++;for(var b=u.repeat(r);p<s;++p)b+=e.charAt(l[p]);return b},decodeUnsafe:f,decode:function(e){var r=f(e);if(r)return r;throw Error("Non-".concat(t," character"))}}};let eB=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")};class eT{encode(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}}class eL{decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix));return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return eN(this,e)}constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}}class eP{or(e){return eN(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}constructor(e){this.decoders=e}}let eN=(e,t)=>new eP({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class eU{encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new eT(e,t,r),this.decoder=new eL(e,t,n)}}let ej=e=>{let{name:t,prefix:r,encode:n,decode:i}=e;return new eU(t,r,n,i)},eR=e=>{let{prefix:t,name:r,alphabet:n}=e,{encode:i,decode:o}=eI(n,r);return ej({prefix:t,name:r,encode:i,decode:e=>eB(o(e))})},ek=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:i}=e;return ej({prefix:r,name:t,encode:e=>((e,t,r)=>{let n="="===t[t.length-1],i=(1<<r)-1,o="",s=0,a=0;for(let n=0;n<e.length;++n)for(a=a<<8|e[n],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o})(e,i,n),decode:e=>((e,t,r,n)=>{let i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;let s=new Uint8Array(o*r/8|0),a=0,u=0,l=0;for(let t=0;t<o;++t){let o=i[e[t]];if(void 0===o)throw SyntaxError("Non-".concat(n," character"));u=u<<r|o,(a+=r)>=8&&(a-=8,s[l++]=255&u>>a)}if(a>=r||255&u<<8-a)throw SyntaxError("Unexpected end of data");return s})(e,i,n,t)})};var eM=Object.freeze({__proto__:null,identity:ej({prefix:"\0",name:"identity",encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)})}),eF=Object.freeze({__proto__:null,base2:ek({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})}),ez=Object.freeze({__proto__:null,base8:ek({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})}),eH=Object.freeze({__proto__:null,base10:eR({prefix:"9",name:"base10",alphabet:"0123456789"})}),eW=Object.freeze({__proto__:null,base16:ek({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper:ek({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});let eV=ek({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),eq=ek({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),eK=ek({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),eJ=ek({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),eY=ek({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),eG=ek({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),eZ=ek({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5});var eX=Object.freeze({__proto__:null,base32:eV,base32upper:eq,base32pad:eK,base32padupper:eJ,base32hex:eY,base32hexupper:eG,base32hexpad:eZ,base32hexpadupper:ek({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z:ek({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})}),eQ=Object.freeze({__proto__:null,base36:eR({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper:eR({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})}),e$=Object.freeze({__proto__:null,base58btc:eR({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr:eR({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});let e0=ek({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",bitsPerChar:6}),e1=ek({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6});var e8=Object.freeze({__proto__:null,base64:e0,base64pad:e1,base64url:ek({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad:ek({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});let e3=Array.from("ððªâð°ðððððððððððððâð»ð¥ð¾ð¿ðâ¤ðð¤£ððððððð
ððð¥ð¥°ðððð¢ð¤ðððªðâºðð¤ððððð¹ð¤¦ððââ¨ð¤·ð±ðð¸ððððððððð¤©ððð¤ðð¯ððð¶ðð¤â£ððððªðð¥ððð©ð¡ð¤ªðð¥³ð¥ð¤¤ððð³âððð´ðð¬ððð·ð»ðââ
ð¥ºððð¤ð¦âð£ððâ¹ððð âððºðð»ððððð¹ð£ð«ðððµð¤ðð´ð¤ð¼ð«â½ð¤âðð¤«ðð®ðð»ðð¶ðð²ð¿ð§¡ðâ¡ððââðð°ð¤¨ð¶ð¤ð¶ð°ðð¢ð¤ðð¨ð¨ð¤¬âððºð¤ððð±ðð¶ð¥´â¶â¡âðð¸â¬ð¨ðð¦ð·ðºâ ð
ððµðð¤²ð¤ ð¤§ððµð
ð§ð¾ððð¤ðð¤¯ð·âð§ð¯ððð¤ððâð´ð£ð¸ððð¥ð¤¢ð
ð¡ð©ðð¸ð»ð¤ð¤®ð¼ð¥µð©ððð¼ðð£ð¥"),e2=e3.reduce((e,t,r)=>(e[r]=t,e),[]),e5=e3.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);var e6=Object.freeze({__proto__:null,base256emoji:ej({prefix:"ð",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=e2[t],"")},decode:function(e){let t=[];for(let r of e){let e=e5[r.codePointAt(0)];if(void 0===e)throw Error("Non-base256emoji character: ".concat(r));t.push(e)}return new Uint8Array(t)}})});function e4(e,t,r){t=t||[],r=r||0;for(var n=r;e>=0x80000000;)t[r++]=255&e|128,e/=128;for(;-128&e;)t[r++]=255&e|128,e>>>=7;return t[r]=0|e,e4.bytes=r-n+1,t}var e9={encode:e4,encodingLength:function(e){return e<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:e<0x800000000?5:e<0x40000000000?6:e<0x2000000000000?7:e<0x100000000000000?8:e<0x8000000000000000?9:10}};let e7=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e9.encode(e,t,r),t},te=e=>e9.encodingLength(e),tt=(e,t)=>{let r=t.byteLength,n=te(e),i=n+te(r),o=new Uint8Array(i+r);return e7(e,o,0),e7(r,o,n),o.set(t,i),new tr(e,r,t,o)};class tr{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}let tn=e=>{let{name:t,code:r,encode:n}=e;return new ti(t,r,n)};class ti{digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?tt(this.code,t):t.then(e=>tt(this.code,e))}throw Error("Unknown type, must be binary type")}constructor(e,t,r){this.name=e,this.code=t,this.encode=r}}let to=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));var ts=Object.freeze({__proto__:null,sha256:tn({name:"sha2-256",code:18,encode:to("SHA-256")}),sha512:tn({name:"sha2-512",code:19,encode:to("SHA-512")})}),ta=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:eB,digest:e=>tt(0,eB(e))}});new TextEncoder,new TextDecoder;let tu={...eM,...eF,...ez,...eH,...eW,...eX,...eQ,...e$,...e8,...e6};function tl(e,t,r,n){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:n}}}({...ts,...ta});let tc=tl("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),tf=tl("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{let t=eA((e=e.substring(1)).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),th={utf8:tc,"utf-8":tc,hex:tu.base16,latin1:tf,ascii:tf,binary:tf,...tu};function td(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=th[t];if(!r)throw Error('Unsupported encoding "'.concat(t,'"'));return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}function tp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8",r=th[t];if(!r)throw Error('Unsupported encoding "'.concat(t,'"'));return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?eS(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode("".concat(r.prefix).concat(e))}function tb(e){return(0,r.safeJsonParse)(td(tp(e,eE),ex))}function tg(e){return td(tp((0,r.safeJsonStringify)(e),ex),eE)}function ty(e){return["did:key","z"+td(eC([tp("K36",eO),e]),eO)].join(":")}function tv(e){let t=e.split("."),r=tb(t[0]),n=tb(t[1]);return{header:r,payload:n,signature:tp(t[2],eE),data:tp(t.slice(0,2).join("."),e_)}}function tm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l(32),t=ew.getPublicKey(e);return{secretKey:eC([e,t]),publicKey:t}}async function tD(e,r,n,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(0,t.fromMiliseconds)(Date.now()),s={alg:"EdDSA",typ:"JWT"},a={iss:ty(i.publicKey),sub:e,aud:r,iat:o,exp:o+n},u=tp([tg((l={header:s,payload:a}).header),tg(l.payload)].join("."),e_);var l,c={header:s,payload:a,signature:ew.sign(u,i.secretKey.slice(0,32))};return[tg(c.header),tg(c.payload),td(c.signature,eE)].join(".")}},18531,281223,e=>{"use strict";e.s(["bases",()=>eM],18531),e.s(["identity",()=>v],909184);let t=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");
1for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==r[s])throw TypeError(o+" is ambiguous");r[s]=i}var a=e.length,u=e.charAt(0),l=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function f(e){if("string"!=typeof e)throw TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[0]){for(var n=0,i=0;e[t]===u;)n++,t++;for(var o=(e.length-t)*l+1>>>0,s=new Uint8Array(o);e[t];){var c=r[e.charCodeAt(t)];if(255===c)return;for(var f=0,h=o-1;(0!==c||f<i)&&-1!==h;h--,f++)c+=a*s[h]>>>0,s[h]=c%256>>>0,c=c/256>>>0;if(0!==c)throw Error("Non-zero carry");i=f,t++}if(" "!==e[t]){for(var d=o-i;d!==o&&0===s[d];)d++;for(var p=new Uint8Array(n+(o-d)),b=n;d!==o;)p[b++]=s[d++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var s=(o-i)*c+1>>>0,l=new Uint8Array(s);i!==o;){for(var f=t[i],h=0,d=s-1;(0!==f||h<n)&&-1!==d;d--,h++)f+=256*l[d]>>>0,l[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw Error("Non-zero carry");n=h,i++}for(var p=s-n;p!==s&&0===l[p];)p++;for(var b=u.repeat(r);p<s;++p)b+=e.charAt(l[p]);return b},decodeUnsafe:f,decode:function(e){var r=f(e);if(r)return r;throw Error("Non-".concat(t," character"))}}};e.s(["coerce",()=>s,"empty",()=>r,"equals",()=>o,"fromHex",()=>i,"fromString",()=>u,"isBinary",()=>a,"toHex",()=>n,"toString",()=>l],723472);let r=new Uint8Array(0),n=e=>e.reduce((e,t)=>e+t.toString(16).padStart(2,"0"),""),i=e=>{let t=e.match(/../g);return t?new Uint8Array(t.map(e=>parseInt(e,16))):r},o=(e,t)=>{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0},s=e=>{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},a=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),u=e=>new TextEncoder().encode(e),l=e=>new TextDecoder().decode(e);class c{encode(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}}class f{decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix));return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return d(this,e)}constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}}class h{or(e){return d(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}constructor(e){this.decoders=e}}let d=(e,t)=>new h({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class p{encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}constructor(e,t,r,n){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=n,this.encoder=new c(e,t,r),this.decoder=new f(e,t,n)}}let b=e=>{let{name:t,prefix:r,encode:n,decode:i}=e;return new p(t,r,n,i)},g=e=>{let{prefix:r,name:n,alphabet:i}=e,{encode:o,decode:a}=t(i,n);return b({prefix:r,name:n,encode:o,decode:e=>s(a(e))})},y=e=>{let{name:t,prefix:r,bitsPerChar:n,alphabet:i}=e;return b({prefix:r,name:t,encode:e=>((e,t,r)=>{let n="="===t[t.length-1],i=(1<<r)-1,o="",s=0,a=0;for(let n=0;n<e.length;++n)for(a=a<<8|e[n],s+=8;s>r;)s-=r,o+=t[i&a>>s];if(s&&(o+=t[i&a<<r-s]),n)for(;o.length*r&7;)o+="=";return o}
1)(e,i,n),decode:e=>((e,t,r,n)=>{let i={};for(let e=0;e<t.length;++e)i[t[e]]=e;let o=e.length;for(;"="===e[o-1];)--o;let s=new Uint8Array(o*r/8|0),a=0,u=0,l=0;for(let t=0;t<o;++t){let o=i[e[t]];if(void 0===o)throw SyntaxError("Non-".concat(n," character"));u=u<<r|o,(a+=r)>=8&&(a-=8,s[l++]=255&u>>a)}if(a>=r||255&u<<8-a)throw SyntaxError("Unexpected end of data");return s})(e,i,n,t)})},v=b({prefix:"\0",name:"identity",encode:e=>l(e),decode:e=>u(e)});var m=e.i(909184);e.s(["base2",()=>D],347043);let D=y({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var w=e.i(347043);e.s(["base8",()=>E],209626);let E=y({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var x=e.i(209626);e.s(["base10",()=>_],238593);let _=g({prefix:"9",name:"base10",alphabet:"0123456789"});var O=e.i(238593);e.s(["base16",()=>S,"base16upper",()=>A],967748);let S=y({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),A=y({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var C=e.i(967748);e.s(["base32",()=>I,"base32hex",()=>P,"base32hexpad",()=>U,"base32hexpadupper",()=>j,"base32hexupper",()=>N,"base32pad",()=>T,"base32padupper",()=>L,"base32upper",()=>B,"base32z",()=>R],874676);let I=y({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),B=y({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),T=y({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),L=y({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),P=y({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),N=y({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),U=y({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),j=y({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),R=y({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var k=e.i(874676);e.s(["base36",()=>M,"base36upper",()=>F],133198);let M=g({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),F=g({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var z=e.i(133198);e.s(["base58btc",()=>H,"base58flickr",()=>W],201366);let H=g({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),W=g({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var V=e.i(201366);e.s(["base64",()=>q,"base64pad",()=>K,"base64url",()=>J,"base64urlpad",()=>Y],428667);let q=y({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),K=y({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),J=y({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Y=y({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var G=e.i(428667);e.s(["base256emoji",()=>$],968655);let Z=Array.from("\uD83D\uDE80\uD83E\uDE90â\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â\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02â¤\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âº\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9Eââ¨\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â£\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â\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13ââ
\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6â\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90â¹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20â\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â½\uD83E\uDD19â\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â¡\uD83C\uDF1E\uD83C\uDF88ââ\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â\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74â¶â¡â\uD83D\uDC8E\uD83D\uDCB8â¬\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7Aâ \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â\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51â\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"),X=Z.reduce((e,t,r)=>(e[r]=t,e),[]),Q=Z.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]),$=b({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>
1e+=X[t],"")},decode:function(e){let t=[];for(let r of e){let e=Q[r.codePointAt(0)];if(void 0===e)throw Error("Non-base256emoji character: ".concat(r));t.push(e)}return new Uint8Array(t)}});var ee=e.i(968655);e.s(["sha256",()=>ep,"sha512",()=>eb],609583),e.s(["Hasher",()=>eh,"from",()=>ef],529451),e.s(["Digest",()=>ec,"create",()=>ea,"decode",()=>eu,"equals",()=>el],241823),e.s(["decode",()=>ei,"encodeTo",()=>eo,"encodingLength",()=>es],484226);function et(e,t,r){t=t||[];for(var n=r=r||0;e>=0x80000000;)t[r++]=255&e|128,e/=128;for(;-128&e;)t[r++]=255&e|128,e>>>=7;return t[r]=0|e,et.bytes=r-n+1,t}function er(e,t){var r,n=0,t=t||0,i=0,o=t,s=e.length;do{if(o>=s)throw er.bytes=0,RangeError("Could not decode varint");r=e[o++],n+=i<28?(127&r)<<i:(127&r)*Math.pow(2,i),i+=7}while(r>=128)return er.bytes=o-t,n}let en={encode:et,decode:er,encodingLength:function(e){return e<128?1:e<16384?2:e<2097152?3:e<0x10000000?4:e<0x800000000?5:e<0x40000000000?6:e<0x2000000000000?7:e<0x100000000000000?8:e<0x8000000000000000?9:10}},ei=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return[en.decode(e,t),en.decode.bytes]},eo=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return en.encode(e,t,r),t},es=e=>en.encodingLength(e),ea=(e,t)=>{let r=t.byteLength,n=es(e),i=n+es(r),o=new Uint8Array(i+r);return eo(e,o,0),eo(r,o,n),o.set(t,i),new ec(e,r,t,o)},eu=e=>{let t=s(e),[r,n]=ei(t),[i,o]=ei(t.subarray(n)),a=t.subarray(n+o);if(a.byteLength!==i)throw Error("Incorrect length");return new ec(r,i,a,t)},el=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&o(e.bytes,t.bytes);class ec{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}let ef=e=>{let{name:t,code:r,encode:n}=e;return new eh(t,r,n)};class eh{digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?ea(this.code,t):t.then(e=>ea(this.code,e))}throw Error("Unknown type, must be binary type")}constructor(e,t,r){this.name=e,this.code=t,this.encode=r}}let ed=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),ep=ef({name:"sha2-256",code:18,encode:ed("SHA-256")}),eb=ef({name:"sha2-512",code:19,encode:ed("SHA-512")});e.i(609583);e.s(["identity",()=>eg],373173);let eg={code:0,name:"identity",encode:s,digest:e=>ea(0,s(e))};e.i(373173);e.s(["code",()=>ev,"decode",()=>eD,"encode",()=>em,"name",()=>ey],25968);let ey="raw",ev=85,em=e=>s(e),eD=e=>s(e);e.i(25968),e.s(["code",()=>e_,"decode",()=>eS,"encode",()=>eO,"name",()=>ex],167008);let ew=new TextEncoder,eE=new TextDecoder,ex="json",e_=512,eO=e=>ew.encode(JSON.stringify(e)),eS=e=>JSON.parse(eE.decode(e));e.i(167008);class eA{toV0(){if(0===this.version)return this;{let{code:e,multihash:t}=this;if(e!==eT)throw Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==eL)throw Error("Cannot convert non sha2-256 multihash CID to CIDv0");return eA.createV0(t)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,r=ea(e,t);return eA.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(e){return e&&this.code===e.code&&this.version===e.version&&el(this.multihash,e.multihash)}toString(e){let{bytes:t,version:r,_baseCache:n}=this;return 0===r?eI(t,n,e||H.encoder):eB(t,n,e||I.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(e){return eR(/^0\.0/,ek),!!(e&&(e[eN]||e.asCID===e))}get toBaseEncodedString(){throw Error("Deprecated, use .toString()")}get codec(){throw Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw Error('"multibaseName" property is deprecated')}get prefix(){throw Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof eA)return e;if(null!=e&&e.asCID===e){let{version:t,code:r,multihash:n,bytes:i}=e;return new eA(t,r,n,i||eP(t,r,n.bytes))}if(null==e||!0!==e[eN])return null;{let{version:t,multihash:r,code:n}=e,i=eu(r);return eA.create(t,n,i)}}static create(e,t,r){if("number"!=typeof t)throw Error("String codecs are no longer supported");switch(e){case 0:if(t===eT)return new eA(e,t,r,r.bytes);throw Error("Version 0 CID must use dag-pb (code: ".concat(eT,") block encoding"));case 1:{let n=eP(e,t,r.bytes);return new eA(e,t,r,n)}default:throw Error("Invalid version")}}static createV0(e){return eA.create(0,eT,e)}static createV1(e,t){return eA.create(1,e,t)}static decode(e){let[t,r]=eA.decodeFirst(e);
1if(r.length)throw Error("Incorrect length");return t}static decodeFirst(e){let t=eA.inspectBytes(e),r=t.size-t.multihashSize,n=s(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw Error("Incorrect length");let i=n.subarray(t.multihashSize-t.digestSize),o=new ec(t.multihashCode,t.digestSize,i,n);return[0===t.version?eA.createV0(o):eA.createV1(t.codec,o),e.subarray(t.size)]}static inspectBytes(e){let t=0,r=()=>{let[r,n]=ei(e.subarray(t));return t+=n,r},n=r(),i=eT;if(18===n?(n=0,t=0):1===n&&(i=r()),0!==n&&1!==n)throw RangeError("Invalid CID version ".concat(n));let o=t,s=r(),a=r(),u=t+a;return{version:n,codec:i,multihashCode:s,digestSize:a,multihashSize:u-o,size:u}}static parse(e,t){let[r,n]=eC(e,t),i=eA.decode(n);return i._baseCache.set(r,e),i}constructor(e,t,r,n){this.code=t,this.version=e,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:ej,byteLength:ej,code:eU,version:eU,multihash:eU,bytes:eU,_baseCache:ej,asCID:ej})}}let eC=(e,t)=>{switch(e[0]){case"Q":{let r=t||H;return[H.prefix,r.decode("".concat(H.prefix).concat(e))]}case H.prefix:{let r=t||H;return[H.prefix,r.decode(e)]}case I.prefix:{let r=t||I;return[I.prefix,r.decode(e)]}default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},eI=(e,t,r)=>{let{prefix:n}=r;if(n!==H.prefix)throw Error("Cannot string encode V0 in ".concat(r.name," encoding"));let i=t.get(n);if(null!=i)return i;{let i=r.encode(e).slice(1);return t.set(n,i),i}},eB=(e,t,r)=>{let{prefix:n}=r,i=t.get(n);if(null!=i)return i;{let i=r.encode(e);return t.set(n,i),i}},eT=112,eL=18,eP=(e,t,r)=>{let n=es(e),i=n+es(t),o=new Uint8Array(i+r.byteLength);return eo(e,o,0),eo(t,o,n),o.set(r,i),o},eN=Symbol.for("@ipld/js-cid/CID"),eU={writable:!1,configurable:!1,enumerable:!0},ej={writable:!1,enumerable:!1,configurable:!1},eR=(e,t)=>{if(e.test("0.0.0-dev"))console.warn(t);else throw Error(t)},ek="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.i(484226),e.i(723472),e.i(529451),e.i(241823);let eM={...m,...w,...x,...O,...C,...k,...z,...V,...G,...ee};e.s(["RELAY_JSONRPC",()=>eF],281223);let eF={waku:{publish:"waku_publish",batchPublish:"waku_batchPublish",subscribe:"waku_subscribe",batchSubscribe:"waku_batchSubscribe",subscription:"waku_subscription",unsubscribe:"waku_unsubscribe",batchUnsubscribe:"waku_batchUnsubscribe",batchFetchMessages:"waku_batchFetchMessages"},irn:{publish:"irn_publish",batchPublish:"irn_batchPublish",subscribe:"irn_subscribe",batchSubscribe:"irn_batchSubscribe",subscription:"irn_subscription",unsubscribe:"irn_unsubscribe",batchUnsubscribe:"irn_batchUnsubscribe",batchFetchMessages:"irn_batchFetchMessages"},iridium:{publish:"iridium_publish",batchPublish:"iridium_batchPublish",subscribe:"iridium_subscribe",batchSubscribe:"iridium_batchSubscribe",subscription:"iridium_subscription",unsubscribe:"iridium_unsubscribe",batchUnsubscribe:"iridium_batchUnsubscribe",batchFetchMessages:"iridium_batchFetchMessages"}}},180476,81775,826606,e=>{"use strict";e.s(["HEARTBEAT_EVENTS",()=>s,"HeartBeat",()=>a],180476);var t=e.i(219298),r=e.i(648512);e.s([],826606),e.s(["IEvents",()=>n],81775);class n{}class i extends n{constructor(e){super()}}let o=r.FIVE_SECONDS,s={pulse:"heartbeat_pulse"};class a extends i{static async init(e){let t=new a(e);return await t.init(),t}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),(0,r.toMiliseconds)(this.interval))}pulse(){this.events.emit(s.pulse)}constructor(e){super(e),this.events=new t.EventEmitter,this.interval=o,this.interval=(null==e?void 0:e.interval)||o}}},18035,168679,e=>{"use strict";let t;e.s(["createStorage",()=>l],18035);var r=e.i(322066),n=e.i(467034);function i(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];try{return(t=e(...n))&&"function"==typeof t.then?t:Promise.resolve(t)}catch(e){return Promise.reject(e)}}function o(e){if(function(e){let t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){let t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return o(e.toJSON());throw Error("[unstorage] Cannot stringify value!")}let s="base64:";function a(e){var t;return e&&(null==(t=e.split("?")[0])?void 0:t.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""))||""}function u(e){return(e=a(e))?e+":":""}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={mounts:{"":e.driver||(()=>{let e=new Map;return{name:"memory",getInstance:()=>e,hasItem:t=>e.has(t),getItem(t){var r;return null!=(r=e.get(t))?r:null},getItemRaw(t){var r;return null!=(r=e.get(t))?r:null},setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys:()=>[...e.keys()],clear(){e.clear()},dispose(){e.clear()}}})()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}}
1,l=e=>{for(let r of t.mountpoints)if(e.startsWith(r))return{base:r,relativeKey:e.slice(r.length),driver:t.mounts[r]};return{base:"",relativeKey:e,driver:t.mounts[""]}},h=(e,r)=>t.mountpoints.filter(t=>t.startsWith(e)||r&&e.startsWith(t)).map(r=>({relativeBase:e.length>r.length?e.slice(r.length):void 0,mountpoint:r,driver:t.mounts[r]})),d=(e,r)=>{if(t.watching)for(let n of(r=a(r),t.watchListeners))n(e,r)},p=async()=>{if(!t.watching)for(let e in t.watching=!0,t.mounts)t.unwatch[e]=await c(t.mounts[e],d,e)},b=async()=>{if(t.watching){for(let e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},g=(e,t,r)=>{let n=new Map,i=e=>{let t=n.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},n.set(e.base,t)),t};for(let r of e){let e="string"==typeof r,n=a(e?r:r.key),o=e?void 0:r.value,s=e||!r.options?t:{...t,...r.options},u=l(n);i(u).items.push({key:n,value:o,relativeKey:u.relativeKey,options:s})}return Promise.all([...n.values()].map(e=>r(e))).then(e=>e.flat())},y={hasItem(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{relativeKey:r,driver:n}=l(e=a(e));return i(n.hasItem,r,t)},getItem(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{relativeKey:n,driver:o}=l(e=a(e));return i(o.getItem,n,t).then(e=>(0,r.default)(e))},getItems(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return g(e,t,e=>e.driver.getItems?i(e.driver.getItems,e.items.map(e=>({key:e.relativeKey,options:e.options})),t).then(t=>t.map(t=>({key:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return a(t.join(":"))}(e.base,t.key),value:(0,r.default)(t.value)}))):Promise.all(e.items.map(t=>i(e.driver.getItem,t.relativeKey,t.options).then(e=>({key:t.key,value:(0,r.default)(e)})))))},getItemRaw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{relativeKey:r,driver:o}=l(e=a(e));return o.getItemRaw?i(o.getItemRaw,r,t):i(o.getItem,r,t).then(e=>{var t;return"string"==typeof e&&e.startsWith(s)?(t=e.slice(s.length),globalThis.Buffer?n.Buffer.from(t,"base64"):Uint8Array.from(globalThis.atob(t),e=>e.codePointAt(0))):e})},async setItem(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===t)return y.removeItem(e);let{relativeKey:n,driver:s}=l(e=a(e));s.setItem&&(await i(s.setItem,n,o(t),r),s.watch||d("update",e))},async setItems(e,t){await g(e,t,async e=>{if(e.driver.setItems)return i(e.driver.setItems,e.items.map(e=>({key:e.relativeKey,value:o(e.value),options:e.options})),t);e.driver.setItem&&await Promise.all(e.items.map(t=>i(e.driver.setItem,t.relativeKey,o(t.value),t.options)))})},async setItemRaw(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===t)return y.removeItem(e,r);let{relativeKey:o,driver:u}=l(e=a(e));if(u.setItemRaw)await i(u.setItemRaw,o,t,r);else{var c;if(!u.setItem)return;await i(u.setItem,o,"string"==typeof t?t:s+(c=t,globalThis.Buffer?n.Buffer.from(c).toString("base64"):globalThis.btoa(String.fromCodePoint(...c))),r)}u.watch||d("update",e)},async removeItem(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"==typeof t&&(t={removeMeta:t});let{relativeKey:r,driver:n}=l(e=a(e));n.removeItem&&(await i(n.removeItem,r,t),(t.removeMeta||t.removeMata)&&await i(n.removeItem,r+"$",t),n.watch||d("remove",e))},async getMeta(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"boolean"==typeof t&&(t={nativeOnly:t});let{relativeKey:n,driver:o}=l(e=a(e)),s=Object.create(null);if(o.getMeta&&Object.assign(s,await i(o.getMeta,n,t)),!t.nativeOnly){let e=await i(o.getItem,n+"$",t).then(e=>(0,r.default)(e));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(s,e))}return s},setMeta(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.setItem(e+"$",t,r)},removeMeta(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.removeItem(e+"$",t)},async getKeys(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=h(e=u(e),!0),n=[],o=[],s=!0;for(let e of r){var l;
1for(let r of((null==(l=e.driver.flags)?void 0:l.maxDepth)||(s=!1),await i(e.driver.getKeys,e.relativeBase,t))){let t=e.mountpoint+a(r);n.some(e=>t.startsWith(e))||o.push(t)}n=[e.mountpoint,...n.filter(t=>!t.startsWith(e.mountpoint))]}let c=void 0!==t.maxDepth&&!s;return o.filter(r=>{var n;return(!c||function(e,t){if(void 0===t)return!0;let r=0,n=e.indexOf(":");for(;n>-1;)r++,n=e.indexOf(":",n+1);return r<=t}(r,t.maxDepth))&&((n=e)?r.startsWith(n)&&"$"!==r[r.length-1]:"$"!==r[r.length-1])})},async clear(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=u(e),await Promise.all(h(e,!1).map(async e=>e.driver.clear?i(e.driver.clear,e.relativeBase,t):e.driver.removeItem?Promise.all((await e.driver.getKeys(e.relativeBase||"",t)).map(r=>e.driver.removeItem(r,t))):void 0))},async dispose(){await Promise.all(Object.values(t.mounts).map(e=>f(e)))},watch:async e=>(await p(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter(t=>t!==e),0===t.watchListeners.length&&await b()}),async unwatch(){t.watchListeners=[],await b()},mount(e,r){if((e=u(e))&&t.mounts[e])throw Error("already mounted at ".concat(e));return e&&(t.mountpoints.push(e),t.mountpoints.sort((e,t)=>t.length-e.length)),t.mounts[e]=r,t.watching&&Promise.resolve(c(r,d,e)).then(r=>{t.unwatch[e]=r}).catch(console.error),y},async unmount(e){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if((e=u(e))&&t.mounts[e]){if(t.watching&&e in t.unwatch){var n,i;null==(n=(i=t.unwatch)[e])||n.call(i),delete t.unwatch[e]}r&&await f(t.mounts[e]),t.mountpoints=t.mountpoints.filter(t=>t!==e),delete t.mounts[e]}},getMount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=l(e=a(e)+":");return{driver:t.driver,base:t.base}},getMounts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(e=a(e),t.parents).map(e=>({driver:e.driver,base:e.mountpoint}))},keys:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y.getKeys(e,t)},get:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y.getItem(e,t)},set:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return y.setItem(e,t,r)},has:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y.hasItem(e,t)},del:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y.removeItem(e,t)},remove:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return y.removeItem(e,t)}};return y}function c(e,t,r){return e.watch?e.watch((e,n)=>t(e,r+n)):()=>{}}async function f(e){"function"==typeof e.dispose&&await i(e.dispose)}function h(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function d(e,t){let r;return(n,i)=>(()=>{if(r)return r;let n=indexedDB.open(e);return n.onupgradeneeded=()=>n.result.createObjectStore(t),(r=h(n)).then(e=>{e.onclose=()=>r=void 0},()=>{}),r})().then(e=>i(e.transaction(t,n).objectStore(t)))}function p(){return t||(t=d("keyval-store","keyval")),t}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p();return t("readonly",t=>h(t.get(e)))}function g(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p();return r("readwrite",r=>(r.put(t,e),h(r.transaction)))}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p();return t("readwrite",t=>(t.delete(e),h(t.transaction)))}function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p();return e("readwrite",e=>(e.clear(),h(e.transaction)))}function m(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p();return e("readonly",e=>{var t;if(e.getAllKeys)return h(e.getAllKeys());let r=[];return(t=e=>r.push(e.key),e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},h(e.transaction)).then(()=>r)})}e.s(["clear",()=>v,"createStore",()=>d,"del",()=>y,"get",()=>b,"keys",()=>m,"set",()=>g],168679)},71187,(e,t,r)=>{"use strict";function n(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}t.exports=function(e,t,r){var i=r&&r.stringify||n;if("object"==typeof e&&null!==e){var o=t.length+1;if(1===o)return e;var s=Array(o);s[0]=i(e);for(var a=1;a<o;a++)s[a]=i(t[a]);return s.join(" ")}if("string"!=typeof e)return e;var u=t.length;if(0===u)return e;for(var l="",c=0,f=-1,h=e&&e.length||0,d=0;d<h;){if(37===e.charCodeAt(d)&&d+1<h){switch(f=f>-1?f:0,e.charCodeAt(d+1)){case 100:case 102:if(c>=u||null==t[c])break;f<d&&(l+=e.slice(f,d)),l+=Number(t[c]),f=d+2,d++;break;case 105:if(c>=u||null==t[c])break;
1f<d&&(l+=e.slice(f,d)),l+=Math.floor(Number(t[c])),f=d+2,d++;break;case 79:case 111:case 106:if(c>=u||void 0===t[c])break;f<d&&(l+=e.slice(f,d));var p=typeof t[c];if("string"===p){l+="'"+t[c]+"'",f=d+2,d++;break}if("function"===p){l+=t[c].name||"<anonymous>",f=d+2,d++;break}l+=i(t[c]),f=d+2,d++;break;case 115:if(c>=u)break;f<d&&(l+=e.slice(f,d)),l+=String(t[c]),f=d+2,d++;break;case 37:f<d&&(l+=e.slice(f,d)),l+="%",f=d+2,d++,c--}++c}++d}return -1===f?e:(f<h&&(l+=e.slice(f)),l)}},102232,(e,t,r)=>{"use strict";let n=e.r(71187);t.exports=o;let i=function(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function o(e){var t,r;(e=e||{}).browser=e.browser||{};let n=e.browser.transmit;if(n&&"function"!=typeof n.send)throw Error("pino: transmit option must have a send function");let c=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let f=e.serializers||{},b=(t=e.browser.serialize,Array.isArray(t)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(f)),g=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(g=!1),"function"==typeof c&&(c.error=c.fatal=c.warn=c.info=c.debug=c.trace=c),!1===e.enabled&&(e.level="silent");let y=e.level||"info",v=Object.create(c);v.log||(v.log=h),Object.defineProperty(v,"levelVal",{get:function(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(v,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,s(m,v,"error","log"),s(m,v,"fatal","error"),s(m,v,"warn","error"),s(m,v,"info","log"),s(m,v,"debug","log"),s(m,v,"trace","log")}});let m={transmit:n,serialize:b,asObject:e.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?d:p};return v.levels=o.levels,v.level=y,v.setMaxListeners=v.getMaxListeners=v.emit=v.addListener=v.on=v.prependListener=v.once=v.prependOnceListener=v.removeListener=v.removeAllListeners=v.listeners=v.listenerCount=v.eventNames=v.write=v.flush=h,v.serializers=f,v._serialize=b,v._stdErrSerialize=g,v.child=function(t,r){if(!t)throw Error("missing bindings for child Pino");r=r||{},b&&t.serializers&&(r.serializers=t.serializers);let i=r.serializers;if(b&&i){var o=Object.assign({},f,i),s=!0===e.browser.serialize?Object.keys(o):b;delete t.serializers,a([t],s,o,this._stdErrSerialize)}function c(e){this._childLevel=(0|e._childLevel)+1,this.error=u(e,t,"error"),this.fatal=u(e,t,"fatal"),this.warn=u(e,t,"warn"),this.info=u(e,t,"info"),this.debug=u(e,t,"debug"),this.trace=u(e,t,"trace"),o&&(this.serializers=o,this._serialize=s),n&&(this._logEvent=l([].concat(e._logEvent.bindings,t)))}return c.prototype=this,new c(this)},n&&(v._logEvent=l()),v}function s(e,t,r,s){let u=Object.getPrototypeOf(t);t[r]=t.levelVal>t.levels.values[r]?h:u[r]?u[r]:i[r]||i[s]||h,function(e,t,r){if(e.transmit||t[r]!==h){var s;t[r]=(s=t[r],function(){let u=e.timestamp(),c=Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var h=0;h<c.length;h++)c[h]=arguments[h];if(e.serialize&&!e.asObject&&a(c,this._serialize,this.serializers,this._stdErrSerialize),e.asObject?s.call(f,function(e,t,r,i){e._serialize&&a(r,e._serialize,e.serializers,e._stdErrSerialize);let s=r.slice(),u=s[0],l={};i&&(l.time=i),l.level=o.levels.values[t];let c=(0|e._childLevel)+1;if(c<1&&(c=1),null!==u&&"object"==typeof u){for(;c--&&"object"==typeof s[0];)Object.assign(l,s.shift());u=s.length?n(s.shift(),s):void 0}else"string"==typeof u&&(u=n(s.shift(),s));return void 0!==u&&(l.msg=u),l}(this,r,c,u)):s.apply(f,c),e.transmit){let n=e.transmit.level||t.level,i=o.levels.values[n],s=o.levels.values[r];if(s<i)return;!function(e,t,r){let n=t.send,i=t.ts,o=t.methodLevel,s=t.methodValue,u=t.val,c=e._logEvent.bindings;
1a(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(e){return -1===c.indexOf(e)}),e._logEvent.level.label=o,e._logEvent.level.value=s,n(o,e._logEvent,u),e._logEvent=l(c)}(this,{ts:u,methodLevel:r,methodValue:s,transmitLevel:n,transmitValue:o.levels.values[e.transmit.level||t.level],send:e.transmit.send,val:t.levelVal},c)}})}}(e,t,r)}function a(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=o.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i]))for(let n in e[i])t&&t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function u(e,t,r){return function(){let n=Array(1+arguments.length);n[0]=t;for(var i=1;i<n.length;i++)n[i]=arguments[i-1];return e[r].apply(this,n)}}function l(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function c(){return{}}function f(e){return e}function h(){}function d(){return!1}function p(){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={mapHttpRequest:c,mapHttpResponse:c,wrapRequestSerializer:f,wrapResponseSerializer:f,wrapErrorSerializer:f,req:c,res:c,err:function(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}},o.stdTimeFunctions=Object.assign({},{nullTime:d,epochTime:p,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}})},499276,278662,241370,e=>{"use strict";e.s(["default",()=>h],499276);var t=e.i(18035),r=e.i(168679),n=e.i(31794),i=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.base&&t.base.length>0?"".concat(t.base,":"):"";return t.dbName&&t.storeName&&(e=(0,r.createStore)(t.dbName,t.storeName)),{name:"idb-keyval",options:t,hasItem:async t=>!(typeof await (0,r.get)(n+t,e)>"u"),async getItem(t){var i;return null!=(i=await (0,r.get)(n+t,e))?i:null},setItem:(t,i)=>(0,r.set)(n+t,i,e),removeItem:t=>(0,r.del)(n+t,e),getKeys:()=>(0,r.keys)(e),clear:()=>(0,r.clear)(e)}};class o{async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){let t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,(0,n.safeJsonStringify)(t))}async removeItem(e){await this.indexedDb.removeItem(e)}constructor(){this.indexedDb=(0,t.createStorage)({driver:i({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}}var s="u">typeof globalThis?globalThis:"u">typeof window?window:e.g,a={exports:{}};function u(e){var t;return[e[0],(0,n.safeJsonParse)(null!=(t=e[1])?t:"")]}!function(){function e(){}e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){let e=this;Object.keys(e).forEach(function(t){e[t]=void 0,delete e[t]})},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),"u">typeof s&&s.localStorage?a.exports=s.localStorage:"u">typeof window&&window.localStorage?a.exports=window.localStorage:a.exports=new e}();class l{async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(u)}async getItem(e){let t=this.localStorage.getItem(e);if(null!==t)return(0,n.safeJsonParse)(t)}async setItem(e,t){this.localStorage.setItem(e,(0,n.safeJsonStringify)(t))}async removeItem(e){this.localStorage.removeItem(e)}constructor(){this.localStorage=a.exports}}let c=async(e,t,r)=>{let n="wc_storage_version",i=await t.getItem(n);if(i&&i>=1)return void r(t);let o=await e.getKeys();if(!o.length)return void r(t);let s=[];for(;o.length;){let r=o.shift();if(!r)continue;let n=r.toLowerCase();if(n.includes("wc@")||n.includes("walletconnect")||n.includes("wc_")||n.includes("wallet_connect")){let n=await e.getItem(r);await t.setItem(r,n),s.push(r)}}await t.setItem(n,1),r(t),f(e,s)},f=async(e,t)=>{t.length&&t.forEach(async t=>{await e.removeItem(t)})};class h{async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{let t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};let e=new l;this.storage=e;try{let t=new o;c(e,t,this.setInitialized)}catch(e){this.initialized=!0}}}e.s(["generateChildLogger",()=>L,"generatePlatformLogger",()=>P,"getDefaultLoggerOptions",()=>B,"getLoggerContext",()=>T],278662);var d=e.i(102232);let p={level:"info"},b="custom_context";class g{get value(){return this.nodeValue}get size(){return this.sizeInBytes}constructor(e){this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}}class y{append(e){let t=new g(e);if(t.size>this.maxSizeInBytes)throw Error("[LinkedList] Value too big to insert into list: ".concat(e," with size ").concat(t.size));for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?this.tail&&(this.tail.next=t):this.head=t,this.tail=t,this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;let e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){let e=[],t=this.head;for(;null!==t;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};let t=e.value;return e=e.next,{done:!1,value:t}}}}constructor(e){this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}}class v{forwardToConsole(e,t){t===d.levels.values.error?console.error(e):t===d.levels.values.warn?console.warn(e):t===d.levels.values.debug?console.debug(e):t===d.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append((0,n.safeJsonStringify)({timestamp:new Date().toISOString(),log:e}));let t="string"==typeof e?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new y(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){let t=this.getLogArray();return t.push((0,n.safeJsonStringify)({extraMetadata:e})),new Blob(t,{type:"application/json"})}constructor(e,t=1024e3){this.level=null!=e?e:"error",this.levelValue=d.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new y(this.MAX_LOG_SIZE_IN_BYTES)}}class m{write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){let t=URL.createObjectURL(this.logsToBlob(e)),r=document.createElement("a");r.href=t,r.download="walletconnect-logs-".concat(new Date().toISOString(),".txt"),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)}constructor(e,t=1024e3){this.baseChunkLogger=new v(e,t)}}class D{write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}constructor(e,t=1024e3){this.baseChunkLogger=new v(e,t)}}var w=Object.defineProperty,E=Object.defineProperties,x=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,A=(e,t,r)=>t in e?w(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t)=>{for(var r in t||(t={}))O.call(t,r)&&A(e,r,t[r]);if(_)for(var r of _(t))S.call(t,r)&&A(e,r,t[r]);return e},I=(e,t)=>E(e,x(t));function B(e){return I(C({},e),{level:(null==e?void 0:e.level)||p.level})}function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;return typeof e.bindings>"u"?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;return e[t]||""}(e,t):e.bindings().context||""}function L(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b,n=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b,n=T(e,r);return n.trim()?"".concat(n,"/").concat(t):t}(e,t,r);return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;return e[r]=t,e}(e.child({context:n}),n,r)}function P(e){return"u">typeof e.loggerOverride&&"string"!=typeof e.loggerOverride?{logger:e.loggerOverride,chunkLoggerController:null}:"u">typeof window?function(e){var t,r;let n=new m(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:(0,d.default)(I(C({},e.opts),{level:"trace",browser:I(C({},null==(r=e.opts)?void 0:r.browser),{write:e=>n.write(e)})})),chunkLoggerController:n}}(e):function(e){var t;let r=new D(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:(0,d.default)(I(C({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}(e)}e.s(["pino",()=>N.default],241370);var N=d},952439,e=>{"use strict";e.s(["__assign",()=>n,"__asyncDelegator",()=>v,"__asyncGenerator",()=>y,"__asyncValues",()=>m,"__await",()=>g,"__awaiter",()=>u,"__classPrivateFieldGet",()=>x,"__classPrivateFieldSet",()=>_,"__createBinding",()=>c,"__decorate",()=>o,"__exportStar",()=>f,"__extends",()=>r,"__generator",()=>l,"__importDefault",()=>E,"__importStar",()=>
1w,"__makeTemplateObject",()=>D,"__metadata",()=>a,"__param",()=>s,"__read",()=>d,"__rest",()=>i,"__spread",()=>p,"__spreadArrays",()=>b,"__values",()=>h]);var t=function(e,r){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,r)};function r(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function o(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){return function(r,n){t(r,n,e)}}function a(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){var u=[o,a];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=t.call(e,s)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function c(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function f(e,t){for(var r in e)"default"===r||t.hasOwnProperty(r)||(t[r]=e[r])}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function p(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e}function b(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function y(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||a(e,t)})})}function a(e,t){try{var r;(r=i[e](t)).value instanceof g?Promise.resolve(r.value.v).then(u,l):c(o[0][2],r)}catch(e){c(o[0][3],e)}}function u(e){a("next",e)}function l(e){a("throw",e)}function c(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function v(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:g(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function m(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=h(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var o,s,a;o=n,s=i,a=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){o({value:e,done:a})},s)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}
1function w(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function _(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},493599,(e,t,r)=>{"use strict";function n(){return(null===e.g||void 0===e.g?void 0:e.g.crypto)||(null===e.g||void 0===e.g?void 0:e.g.msCrypto)||{}}function i(){let e=n();return e.subtle||e.webkitSubtle}Object.defineProperty(r,"__esModule",{value:!0}),r.isBrowserCryptoAvailable=r.getSubtleCrypto=r.getBrowerCrypto=void 0,r.getBrowerCrypto=n,r.getSubtleCrypto=i,r.isBrowserCryptoAvailable=function(){return!!n()&&!!i()}},431443,(e,t,r)=>{"use strict";var n=e.i(247167);function i(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function o(){return void 0!==n.default&&void 0!==n.default.versions&&void 0!==n.default.versions.node}Object.defineProperty(r,"__esModule",{value:!0}),r.isBrowser=r.isNode=r.isReactNative=void 0,r.isReactNative=i,r.isNode=o,r.isBrowser=function(){return!i()&&!o()}},438005,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let n=e.r(952439);n.__exportStar(e.r(493599),r),n.__exportStar(e.r(431443),r)},756823,(e,t,r)=>{"use strict";t.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},278509,(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||e.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(t){!function(r){var n=void 0!==t&&t||"undefined"!=typeof self&&self||e.g||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(i.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(e){return e&&o.indexOf(Object.prototype.toString.call(e))>-1};function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function l(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i.iterable&&(t[Symbol.iterator]=function(){return t}),t}function c(e){this.map={},e instanceof c?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function f(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function d(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function p(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e)if("string"==typeof e)this._bodyText=e;else if(i.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;i.arrayBuffer&&i.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=p(e):this._bodyText=e=Object.prototype.toString.call(e)}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var e=f(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=f(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i.blob)return this.blob().then(d);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,n,i,o=f(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,r=h(t=new FileReader),i=(n=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?n[1]:"utf-8",t.readAsText(e,i),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(!this._bodyFormData)return Promise.resolve(this._bodyText);throw Error("could not read FormData body as text")},i.formData&&(this.formData=function(){return this.text().then(v)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(e,t){e=a(e),t=u(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},c.prototype.delete=function(e){delete this.map[a(e)]},c.prototype.get=function(e){return e=a(e),this.has(e)?this.map[e]:null},c.prototype.has=function(e){return this.map.hasOwnProperty(a(e))},c.prototype.set=function(e,t){this.map[a(e)]=u(t)},c.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},c.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),l(e)},c.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),l(e)},c.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),l(e)},i.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var g=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function y(e,t){if(!(this instanceof y))throw TypeError('Please use the "new" operator, this DOM object c
1onstructor cannot be called as a function.');var r,i,o=(t=t||{}).body;if(e instanceof y){if(e.bodyUsed)throw TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new c(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new c(t.headers)),this.method=(i=(r=t.method||this.method||"GET").toUpperCase(),g.indexOf(i)>-1?i:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in n)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var s=/([?&])_=[^&]*/;s.test(this.url)?this.url=this.url.replace(s,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function v(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}}),t}function m(e,t){if(!(this instanceof m))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new c(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},b.call(y.prototype),b.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var D=[301,302,303,307,308];m.redirect=function(e,t){if(-1===D.indexOf(t))throw RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},r.DOMException=n.DOMException;try{new r.DOMException}catch(e){r.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},r.DOMException.prototype=Object.create(Error.prototype),r.DOMException.prototype.constructor=r.DOMException}function w(e,t){return new Promise(function(o,s){var l=new y(e,t);if(l.signal&&l.signal.aborted)return s(new r.DOMException("Aborted","AbortError"));var f=new XMLHttpRequest;function h(){f.abort()}if(f.onload=function(){var e,t,r={statusText:f.statusText,headers:(e=f.getAllResponseHeaders()||"",t=new c,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{t.append(n,i)}catch(e){console.warn("Response "+e.message)}}}),t)};0===l.url.indexOf("file://")&&(f.status<200||f.status>599)?r.status=200:r.status=f.status,r.url="responseURL"in f?f.responseURL:r.headers.get("X-Request-URL");var n="response"in f?f.response:f.responseText;setTimeout(function(){o(new m(n,r))},0)},f.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},f.ontimeout=function(){setTimeout(function(){s(TypeError("Network request timed out"))},0)},f.onabort=function(){setTimeout(function(){s(new r.DOMException("Aborted","AbortError"))},0)},f.open(l.method,function(e){try{return""===e&&n.location.href?n.location.href:e}catch(t){return e}}(l.url),!0),"include"===l.credentials?f.withCredentials=!0:"omit"===l.credentials&&(f.withCredentials=!1),"responseType"in f&&(i.blob?f.responseType="blob":i.arrayBuffer&&(f.responseType="arraybuffer")),t&&"object"==typeof t.headers&&!(t.headers instanceof c||n.Headers&&t.headers instanceof n.Headers)){var d=[];
1Object.getOwnPropertyNames(t.headers).forEach(function(e){d.push(a(e)),f.setRequestHeader(e,u(t.headers[e]))}),l.headers.forEach(function(e,t){-1===d.indexOf(t)&&f.setRequestHeader(t,e)})}else l.headers.forEach(function(e,t){f.setRequestHeader(t,e)});l.signal&&(l.signal.addEventListener("abort",h),f.onreadystatechange=function(){4===f.readyState&&l.signal.removeEventListener("abort",h)}),f.send(void 0===l._bodyInit?null:l._bodyInit)})}w.polyfill=!0,n.fetch||(n.fetch=w,n.Headers=c,n.Request=y,n.Response=m),r.Headers=c,r.Request=y,r.Response=m,r.fetch=w,Object.defineProperty(r,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(r=o.fetch).default=o.fetch,r.fetch=o.fetch,r.Headers=o.Headers,r.Request=o.Request,r.Response=o.Response,t.exports=r},501365,329193,850967,424047,112324,98418,e=>{"use strict";e.s(["JsonRpcProvider",()=>O],501365);var t=e.i(219298);e.s([],424047);let r="INTERNAL_ERROR",n="SERVER_ERROR",i=[-32700,-32600,-32601,-32602,-32603],o={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[r]:{code:-32603,message:"Internal error"},[n]:{code:-32e3,message:"Server error"}};function s(e){return Object.keys(o).includes(e)?o[e]:o[n]}function a(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?Error("Unavailable ".concat(r," RPC url at ").concat(t)):e}var u=e.i(438005);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3;
1return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;return BigInt(l(e))}function f(e,t,r){return{id:r||l(),jsonrpc:"2.0",method:e,params:t}}function h(e,t){return{id:e,jsonrpc:"2.0",result:t}}function d(e,t,a){var u,l,c;return{id:e,jsonrpc:"2.0",error:(u=t,l=a,void 0===u?s(r):("string"==typeof u&&(u=Object.assign(Object.assign({},s(n)),{message:u})),void 0!==l&&(u.data=l),c=u.code,i.includes(c)&&(u=function(e){let t=Object.values(o).find(t=>t.code===e);return t||o[n]}(u.code)),u))}}u.isNode,e.s(["formatJsonRpcError",()=>d,"formatJsonRpcRequest",()=>f,"formatJsonRpcResult",()=>h,"getBigIntRpcId",()=>c,"payloadId",()=>l],329193);class p{}class b extends p{constructor(){super()}}class g extends b{constructor(e){super()}}function y(e,t){let r=function(e){let t=e.match(RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==r&&new RegExp(t).test(r)}function v(e){return y(e,"^https?:")}function m(e){return y(e,"^wss?:")}function D(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function w(e){return D(e)&&"method"in e}function E(e){return D(e)&&(x(e)||_(e))}function x(e){return"result"in e}function _(e){return"error"in e}e.s(["isJsonRpcError",()=>_,"isJsonRpcRequest",()=>w,"isJsonRpcResponse",()=>E,"isJsonRpcResult",()=>x],850967);class O extends g{async connect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(f(e.method,e.params||[],e.id||c().toString()),t)}async requestStrict(e,t){return new Promise(async(r,n)=>{if(!this.connection.connected)try{await this.open()}catch(e){n(e)}this.events.on("".concat(e.id),e=>{_(e)?n(e.error):r(e.result)});try{await this.connection.send(e,t)}catch(e){n(e)}})}setConnection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;return e}onPayload(e){this.events.emit("payload",e),E(e)?this.events.emit("".concat(e.id),e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",Error("WebSocket connection closed abnormally with code: ".concat(e.code," ").concat(e.reason?"(".concat(e.reason,")"):""))),this.events.emit("disconnect")}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}constructor(e){super(e),this.events=new t.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}}e.s(["default",()=>I],112324);var S=e.i(31794);let A=e=>e.split("?")[0],C="u">typeof WebSocket?WebSocket:"u">typeof e.g.WebSocket?e.g.WebSocket:"u">typeof window&&"u">typeof window.WebSocket?window.WebSocket:"u">typeof self&&"u">typeof self.WebSocket?self.WebSocket:e.r(756823);class I{get connected(){return"u">typeof this.socket}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>"u")return void t(Error("Connection already closed"));this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send((0,S.safeJsonStringify)(e))}catch(t){this.onError(e.id,t)}}register(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;if(!m(t))throw Error("Provided URL is not compatible with WebSocket connection: ".concat(t));if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise((e,t)=>
1{this.events.once("register_error",e=>{this.resetMaxListeners(),t(e)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(Error("WebSocket connection is missing or invalid"));e(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,n)=>{let i=(0,u.isReactNative)()?void 0:{rejectUnauthorized:!RegExp("wss?://localhost(:d{2,5})?").test(t)},o=new C(t,[],i);"u">typeof WebSocket||"u">typeof e.g.WebSocket||"u">typeof window&&"u">typeof window.WebSocket||"u">typeof self&&"u">typeof self.WebSocket?o.onerror=e=>{n(this.emitError(e.error))}:o.on("error",e=>{n(this.emitError(e))}),o.onopen=()=>{this.onOpen(o),r(o)}})}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?(0,S.safeJsonParse)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),n=d(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return a(e,A(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){let t=this.parseError(Error((null==e?void 0:e.message)||"WebSocket connection failed for host: ".concat(A(this.url))));return this.events.emit("register_error",t),t}constructor(e){if(this.url=e,this.events=new t.EventEmitter,this.registering=!1,!m(e))throw Error("Provided URL is not compatible with WebSocket connection: ".concat(e));this.url=e}}e.s(["HttpConnection",()=>z,"default",()=>z],98418);var B=e.i(278509),T=Object.defineProperty,L=Object.defineProperties,P=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,R=(e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))U.call(t,r)&&R(e,r,t[r]);if(N)for(var r of N(t))j.call(t,r)&&R(e,r,t[r]);return e},M=(e,t)=>L(e,P(t));let F={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class z{get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;await this.register(e)}async close(){if(!this.isAvailable)throw Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{let t=(0,S.safeJsonStringify)(e),r=await (await (0,B.default)(this.url,M(k({},F),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.url;if(!v(e))throw Error("Provided URL is not compatible with HTTP connection: ".concat(e));if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise((e,t)=>{this.events.once("register_error",e=>{this.resetMaxListeners(),t(e)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(Error("HTTP connection is missing or invalid"));e()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){let t=(0,S.safeJsonStringify)({id:1,jsonrpc:"2.0",method:"test",params:[]});await (0,B.default)(e,M(k({},F),{body:t}))}this.onOpen()}catch(t){let e=this.parseError(t);throw this.events.emit("register_error",e),this.onClose(),e}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?(0,S.safeJsonParse)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),n=d(e,r.message||r.toString());this.events.emit("payload",n)}parseError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return a(e,t,"HTTP")}
1resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}constructor(e,r=!1){if(this.url=e,this.disableProviderPing=r,this.events=new t.EventEmitter,this.isAvailable=!1,this.registering=!1,!v(e))throw Error("Provided URL is not compatible with HTTP connection: ".concat(e));this.url=e,this.disableProviderPing=r}}}]);
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.