@ethersphere/bee-js 6.8.0 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see index.browser.min.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BeeJs=t():e.BeeJs=t()}(this,(()=>(()=>{var e={6174:(e,t,r)=>{"use strict";t.zB=t.Lg=t.lW=t.rL=t.TC=t.tA=t.gO=void 0;const n=r(5151),i=r(8335);var o;t.gO=27,t.tA=250,t.TC=251,t.rL=64,function(e){e.FEED="feed",e.MANIFEST="manifest"}(o=t.lW||(t.lW={}));const a={[t.TC]:o.FEED,[t.tA]:o.MANIFEST};function s(e){return"string"==typeof e&&(e=n.CID.parse(e)),{reference:f(e.multihash.digest),type:a[e.code]}}function c(e,r){!function(e){if(u(e),e.length!==t.rL)throw new TypeError("Reference does not have expected length 64 characters. Encrypted references are not supported.")}(e);const o=function(e){u(e);const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=e.substr(2*r,2);t[r]=parseInt(n,16)}return t}(e);return n.CID.createV1(r,(0,i.create)(t.gO,o))}function f(e,t){const r=Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("");if(t&&r.length!==t)throw new TypeError(`Resulting HexString does not have expected length ${t}: ${r}`);return r}function u(e,t,r="value"){if(!function(e,t){return"string"==typeof e&&/^[0-9a-f]+$/i.test(e)&&(!t||e.length===t)}(e,t)){throw new TypeError(`${r} not valid hex string${t?` of length ${t}`:""}: ${e}`)}}t.Lg=function(e,r){switch(r){case o.FEED:return c(e,t.TC);case o.MANIFEST:return c(e,t.tA);default:throw new Error("Unknown reference type.")}},t.zB=function(e){return s(e)}},4559:(e,t,r)=>{e.exports=r(9335)},1786:(e,t,r)=>{"use strict";var n=r(8266),i=r(5608),o=r(159),a=r(9568),s=r(3943),c=r(8201),f=r(1745),u=r(4765),d=r(2477),l=r(4132),h=r(4392),p=r(4575);e.exports=function(e){return new Promise((function(t,r){var b,m=e.data,y=e.headers,g=e.responseType,w=e.withXSRFToken;function v(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}n.isFormData(m)&&n.isStandardBrowserEnv()&&delete y["Content-Type"];var _=new XMLHttpRequest;if(e.auth){var S=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(S+":"+E)}var M=s(e.baseURL,e.url);function A(){if(_){var n="getAllResponseHeaders"in _?c(_.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?_.response:_.responseText,status:_.status,statusText:_.statusText,headers:n,config:e,request:_};i((function(e){t(e),v()}),(function(e){r(e),v()}),o),_=null}}if(_.open(e.method.toUpperCase(),a(M,e.params,e.paramsSerializer),!0),_.timeout=e.timeout,"onloadend"in _?_.onloadend=A:_.onreadystatechange=function(){_&&4===_.readyState&&(0!==_.status||_.responseURL&&0===_.responseURL.indexOf("file:"))&&setTimeout(A)},_.onabort=function(){_&&(r(new d("Request aborted",d.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,n.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,_)),_=null},n.isStandardBrowserEnv()&&(w&&n.isFunction(w)&&(w=w(e)),w||!1!==w&&f(M))){var R=e.xsrfHeaderName&&e.xsrfCookieName&&o.read(e.xsrfCookieName);R&&(y[e.xsrfHeaderName]=R)}"setRequestHeader"in _&&n.forEach(y,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete y[t]:_.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(_.withCredentials=!!e.withCredentials),g&&"json"!==g&&(_.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&_.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&_.upload&&_.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(b=function(t){_&&(r(!t||t.type?new l(null,e,req):t),_.abort(),_=null)},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),m||!1===m||0===m||""===m||(m=null);var T=h(M);T&&-1===p.protocols.indexOf(T)?r(new d("Unsupported protocol "+T+":",d.ERR_BAD_REQUEST,e)):_.send(m)}))}},9335:(e,t,r)=>{"use strict";var n=r(8266),i=r(4345),o=r(7929),a=r(650),s=r(3101),c=r(9462);var f=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(s);f.Axios=o,f.CanceledError=r(4132),f.CancelToken=r(7510),f.isCancel=r(8825),f.VERSION=r(992).version,f.toFormData=r(2011),f.AxiosError=r(2477),f.Cancel=f.CanceledError,f.all=function(e){return Promise.all(e)},f.spread=r(4346),f.isAxiosError=r(3276),f.formToJSON=function(e){return c(n.isHTMLForm(e)?new FormData(e):e)},e.exports=f,e.exports.default=f},7510:(e,t,r)=>{"use strict";var n=r(4132);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,i,o){r.reason||(r.reason=new n(e,i,o),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},4132:(e,t,r)=>{"use strict";var n=r(2477);function i(e,t,r){n.call(this,null==e?"canceled":e,n.ERR_CANCELED,t,r),this.name="CanceledError"}r(8266).inherits(i,n,{__CANCEL__:!0}),e.exports=i},8825:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},7929:(e,t,r)=>{"use strict";var n=r(8266),i=r(9568),o=r(6252),a=r(6029),s=r(650),c=r(3943),f=r(123),u=f.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&f.assertOptions(r,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var i=t.paramsSerializer;n.isFunction(i)&&(t.paramsSerializer={serialize:i});var o=[],c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var d,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!c){var h=[a,void 0];for(Array.prototype.unshift.apply(h,o),h=h.concat(l),d=Promise.resolve(t);h.length;)d=d.then(h.shift(),h.shift());return d}for(var p=t;o.length;){var b=o.shift(),m=o.shift();try{p=b(p)}catch(y){m(y);break}}try{d=a(p)}catch(y){return Promise.reject(y)}for(;l.length;)d=d.then(l.shift(),l.shift());return d},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=c(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},2477:(e,t,r)=>{"use strict";var n=r(8266);function i(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,r,a,s,c){var f=Object.create(o);return n.toFlatObject(e,f,(function(e){return e!==Error.prototype})),i.call(f,e.message,t,r,a,s),f.cause=e,f.name=e.name,c&&Object.assign(f,c),f},e.exports=i},6252:(e,t,r)=>{"use strict";var n=r(8266);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.clear=function(){this.handlers&&(this.handlers=[])},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},3943:(e,t,r)=>{"use strict";var n=r(406),i=r(5027);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},6029:(e,t,r)=>{"use strict";var n=r(8266),i=r(2661),o=r(8825),a=r(3101),s=r(4132),c=r(1490);function f(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return f(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,null,e.transformRequest),c(e.headers,"Accept"),c(e.headers,"Content-Type"),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return f(e),t.data=i.call(e,t.data,t.headers,t.status,e.transformResponse),t}),(function(t){return o(t)||(f(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)}))}},650:(e,t,r)=>{"use strict";var n=r(8266);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isEmptyObject(t)?n.merge({},e):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function c(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var f={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=f[e]||o,i=t(e);n.isUndefined(i)&&t!==c||(r[e]=i)})),r}},5608:(e,t,r)=>{"use strict";var n=r(2477);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}},2661:(e,t,r)=>{"use strict";var n=r(8266),i=r(3101);e.exports=function(e,t,r,o){var a=this||i;return n.forEach(o,(function(n){e=n.call(a,e,t,r)})),e}},3101:(e,t,r)=>{"use strict";var n=r(8266),i=r(1490),o=r(2477),a=r(4765),s=r(2011),c=r(7702),f=r(4575),u=r(9462),d={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var h,p={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(h=r(1786)),h),transformRequest:[function(e,t){i(t,"Accept"),i(t,"Content-Type");var r,o=t&&t["Content-Type"]||"",a=o.indexOf("application/json")>-1,f=n.isObject(e);if(f&&n.isHTMLForm(e)&&(e=new FormData(e)),n.isFormData(e))return a?JSON.stringify(u(e)):e;if(n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e))return e;if(n.isArrayBufferView(e))return e.buffer;if(n.isURLSearchParams(e))return l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(f){if(-1!==o.indexOf("application/x-www-form-urlencoded"))return c(e,this.formSerializer).toString();if((r=n.isFileList(e))||o.indexOf("multipart/form-data")>-1){var d=this.env&&this.env.FormData;return s(r?{"files[]":e}:e,d&&new d,this.formSerializer)}}return f||a?(l(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||p.transitional,r=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&n.isString(e)&&(r&&!this.responseType||i)){var a=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o.from(s,o.ERR_BAD_RESPONSE,this,null,this.response);throw s}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:f.classes.FormData,Blob:f.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){p.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){p.headers[e]=n.merge(d)})),e.exports=p},4765:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},3880:(e,t,r)=>{e.exports=r(8612)},992:e=>{e.exports={version:"0.28.0"}},6971:(e,t,r)=>{"use strict";var n=r(2011);function i(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return t[e]}))}function o(e,t){this._pairs=[],e&&n(e,this,t)}var a=o.prototype;a.append=function(e,t){this._pairs.push([e,t])},a.toString=function(e){var t=e?function(t){return e.call(this,t,i)}:i;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")},e.exports=o},4345:e=>{"use strict";e.exports=function(e,t){return function(){return e.apply(t,arguments)}}},9568:(e,t,r)=>{"use strict";var n=r(8266),i=r(6971);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a));var s=r&&r.encode||o,c=n.isURLSearchParams(t)?t.toString():new i(t,r).toString(s);return c&&(e+=(-1===e.indexOf("?")?"?":"&")+c),e}},5027:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},159:(e,t,r)=>{"use strict";var n=r(8266);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},9462:(e,t,r)=>{"use strict";var n=r(8266);e.exports=function(e){function t(e,r,i,o){var a=e[o++],s=Number.isFinite(+a),c=o>=e.length;return a=!a&&n.isArray(i)?i.length:a,c?(n.hasOwnProperty(i,a)?i[a]=[i[a],r]:i[a]=r,!s):(i[a]&&n.isObject(i[a])||(i[a]=[]),t(e,r,i[a],o)&&n.isArray(i[a])&&(i[a]=function(e){var t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(i[a])),!s)}if(n.isFormData(e)&&n.isFunction(e.entries)){var r={};return n.forEachEntry(e,(function(e,i){t(function(e){return n.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),i,r,0)})),r}return null}},406:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},3276:(e,t,r)=>{"use strict";var n=r(8266);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},1745:(e,t,r)=>{"use strict";var n=r(8266);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},1490:(e,t,r)=>{"use strict";var n=r(8266);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},8201:(e,t,r)=>{"use strict";var n=r(8266),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.slice(0,o)).toLowerCase(),r=n.trim(e.slice(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},4392:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},4346:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},2011:(e,t,r)=>{"use strict";var n=r(8266),i=r(2477),o=r(3880);function a(e){return n.isPlainObject(e)||n.isArray(e)}function s(e){return n.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,r){return e?e.concat(t).map((function(e,t){return e=s(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var f=n.toFlatObject(n,{},null,(function(e){return/^is[A-Z]/.test(e)}));e.exports=function(e,t,r){if(!n.isObject(e))throw new TypeError("target must be an object");t=t||new(o||FormData);var u,d=(r=n.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!n.isUndefined(t[e])}))).metaTokens,l=r.visitor||y,h=r.dots,p=r.indexes,b=(r.Blob||"undefined"!=typeof Blob&&Blob)&&((u=t)&&n.isFunction(u.append)&&"FormData"===u[Symbol.toStringTag]&&u[Symbol.iterator]);if(!n.isFunction(l))throw new TypeError("visitor must be a function");function m(e){if(null===e)return"";if(n.isDate(e))return e.toISOString();if(!b&&n.isBlob(e))throw new i("Blob is not supported. Use a Buffer instead.");return n.isArrayBuffer(e)||n.isTypedArray(e)?b&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function y(e,r,i){var o=e;if(e&&!i&&"object"==typeof e)if(n.endsWith(r,"{}"))r=d?r:r.slice(0,-2),e=JSON.stringify(e);else if(n.isArray(e)&&function(e){return n.isArray(e)&&!e.some(a)}(e)||n.isFileList(e)||n.endsWith(r,"[]")&&(o=n.toArray(e)))return r=s(r),o.forEach((function(e,i){!n.isUndefined(e)&&t.append(!0===p?c([r],i,h):null===p?r:r+"[]",m(e))})),!1;return!!a(e)||(t.append(c(i,r,h),m(e)),!1)}var g=[],w=Object.assign(f,{defaultVisitor:y,convertValue:m,isVisitable:a});if(!n.isObject(e))throw new TypeError("data must be an object");return function e(r,i){if(!n.isUndefined(r)){if(-1!==g.indexOf(r))throw Error("Circular reference detected in "+i.join("."));g.push(r),n.forEach(r,(function(r,o){!0===(!n.isUndefined(r)&&l.call(t,r,n.isString(o)?o.trim():o,i,w))&&e(r,i?i.concat(o):[o])})),g.pop()}}(e),t}},7702:(e,t,r)=>{"use strict";var n=r(8266),i=r(2011),o=r(4575);e.exports=function(e,t){return i(e,new o.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,i){return o.isNode&&n.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}},123:(e,t,r)=>{"use strict";var n=r(992).version,i=r(2477),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new i(o(n," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!a[n]&&(a[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var a=n[o],s=t[a];if(s){var c=e[a],f=void 0===c||s(c,a,e);if(!0!==f)throw new i("option "+a+" must be "+f,i.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new i("Unknown option "+a,i.ERR_BAD_OPTION)}},validators:o}},2670:e=>{"use strict";e.exports=FormData},2981:(e,t,r)=>{"use strict";var n=r(6971);e.exports="undefined"!=typeof URLSearchParams?URLSearchParams:n},4294:(e,t,r)=>{"use strict";e.exports={isBrowser:!0,classes:{URLSearchParams:r(2981),FormData:r(2670),Blob:Blob},protocols:["http","https","file","blob","url","data"]}},4575:(e,t,r)=>{"use strict";e.exports=r(4294)},8266:(e,t,r)=>{"use strict";var n,i=r(4345),o=Object.prototype.toString,a=(n=Object.create(null),function(e){var t=o.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function c(e){return Array.isArray(e)}function f(e){return void 0===e}var u=s("ArrayBuffer");function d(e){return"number"==typeof e}function l(e){return null!==e&&"object"==typeof e}function h(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=s("Date"),b=s("File"),m=s("Blob"),y=s("FileList");function g(e){return"[object Function]"===o.call(e)}var w=s("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var _,S=(_="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return _&&e instanceof _});var E,M=s("HTMLFormElement"),A=(E=Object.prototype.hasOwnProperty,function(e,t){return E.call(e,t)});e.exports={isArray:c,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||g(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:d,isObject:l,isPlainObject:h,isEmptyObject:function(e){return e&&0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype},isUndefined:f,isDate:p,isFile:b,isBlob:m,isFunction:g,isStream:function(e){return l(e)&&g(e.pipe)},isURLSearchParams:w,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:v,merge:function e(){var t={};function r(r,n){h(t[n])&&h(r)?t[n]=e(t[n],r):h(r)?t[n]=e({},r):c(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)v(arguments[n],r);return t},extend:function(e,t,r){return v(t,(function(t,n){e[n]=r&&"function"==typeof t?i(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(c(e))return e;var t=e.length;if(!d(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:S,isFileList:y,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var i=r.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:M,hasOwnProperty:A}},9919:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(A){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function f(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=c(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=c(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u<s;u+=n)c=f(e,u,u+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var d=1;for(c=f(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var f=1;f<n;f++){for(var u=c>>>26,d=67108863&c,l=Math.min(f,t.length-1),h=Math.max(0,f-e.length+1);h<=l;h++){var p=f-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[f]=0|d,c=0|u}return 0!==c?r.words[f]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=d[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:u[f-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,f=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),f[s]=a;for(;s<o;s++)f[s]=0}else{for(s=0;s<o-i;s++)f[s]=0;for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),f[o-s-1]=a}return f},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,a=e.words,s=t.words,c=r.words,f=0,u=0|a[0],d=8191&u,l=u>>>13,h=0|a[1],p=8191&h,b=h>>>13,m=0|a[2],y=8191&m,g=m>>>13,w=0|a[3],v=8191&w,_=w>>>13,S=0|a[4],E=8191&S,M=S>>>13,A=0|a[5],R=8191&A,T=A>>>13,x=0|a[6],O=8191&x,I=x>>>13,C=0|a[7],P=8191&C,k=C>>>13,q=0|a[8],N=8191&q,F=q>>>13,j=0|a[9],$=8191&j,L=j>>>13,B=0|s[0],z=8191&B,D=B>>>13,U=0|s[1],W=8191&U,H=U>>>13,V=0|s[2],G=8191&V,X=V>>>13,J=0|s[3],Z=8191&J,Y=J>>>13,K=0|s[4],Q=8191&K,ee=K>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,fe=se>>>13,ue=0|s[8],de=8191&ue,le=ue>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(f+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,D))+Math.imul(l,z)|0))<<13)|0;f=((o=Math.imul(l,D))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,D))+Math.imul(b,z)|0,o=Math.imul(b,D);var ye=(f+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,D))+Math.imul(g,z)|0,o=Math.imul(g,D),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,H)|0;var ge=(f+(n=n+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(l,G)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,D))+Math.imul(_,z)|0,o=Math.imul(_,D),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,X)|0;var we=(f+(n=n+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,D))+Math.imul(M,z)|0,o=Math.imul(M,D),n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0;var ve=(f+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,D))+Math.imul(T,z)|0,o=Math.imul(T,D),n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,H)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(f+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;f=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,D))+Math.imul(I,z)|0,o=Math.imul(I,D),n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(f+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(l,oe)|0))<<13)|0;f=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,z),i=(i=Math.imul(P,D))+Math.imul(k,z)|0,o=Math.imul(k,D),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(f+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(l,ce)|0))<<13)|0;f=((o=o+Math.imul(l,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,D))+Math.imul(F,z)|0,o=Math.imul(F,D),n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,fe)|0;var Me=(f+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;f=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul($,z),i=(i=Math.imul($,D))+Math.imul(L,z)|0,o=Math.imul(L,D),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(F,W)|0,o=o+Math.imul(F,H)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,fe)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,le)|0;var Ae=(f+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;f=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul($,W),i=(i=Math.imul($,H))+Math.imul(L,W)|0,o=Math.imul(L,H),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(F,G)|0,o=o+Math.imul(F,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,fe)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,le)|0;var Re=(f+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;f=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul($,G),i=(i=Math.imul($,X))+Math.imul(L,G)|0,o=Math.imul(L,X),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(F,Z)|0,o=o+Math.imul(F,Y)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,le)|0;var Te=(f+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,be)|0)+Math.imul(g,pe)|0))<<13)|0;f=((o=o+Math.imul(g,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul($,Z),i=(i=Math.imul($,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(F,Q)|0,o=o+Math.imul(F,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,fe)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,le)|0;var xe=(f+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,be)|0)+Math.imul(_,pe)|0))<<13)|0;f=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul($,Q),i=(i=Math.imul($,ee))+Math.imul(L,Q)|0,o=Math.imul(L,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(F,re)|0,o=o+Math.imul(F,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,fe)|0,n=n+Math.imul(R,de)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Oe=(f+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(M,pe)|0))<<13)|0;f=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul($,re),i=(i=Math.imul($,ne))+Math.imul(L,re)|0,o=Math.imul(L,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(F,oe)|0,o=o+Math.imul(F,ae)|0,n=n+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,le)|0;var Ie=(f+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(T,pe)|0))<<13)|0;f=((o=o+Math.imul(T,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul($,oe),i=(i=Math.imul($,ae))+Math.imul(L,oe)|0,o=Math.imul(L,ae),n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(F,ce)|0,o=o+Math.imul(F,fe)|0,n=n+Math.imul(P,de)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,le)|0;var Ce=(f+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,be)|0)+Math.imul(I,pe)|0))<<13)|0;f=((o=o+Math.imul(I,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul($,ce),i=(i=Math.imul($,fe))+Math.imul(L,ce)|0,o=Math.imul(L,fe),n=n+Math.imul(N,de)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(F,de)|0,o=o+Math.imul(F,le)|0;var Pe=(f+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,be)|0)+Math.imul(k,pe)|0))<<13)|0;f=((o=o+Math.imul(k,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul($,de),i=(i=Math.imul($,le))+Math.imul(L,de)|0,o=Math.imul(L,le);var ke=(f+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(F,pe)|0))<<13)|0;f=((o=o+Math.imul(F,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863;var qe=(f+(n=Math.imul($,pe))|0)+((8191&(i=(i=Math.imul($,be))+Math.imul(L,pe)|0))<<13)|0;return f=((o=Math.imul(L,be))+(i>>>13)|0)+(qe>>>26)|0,qe&=67108863,c[0]=me,c[1]=ye,c[2]=ge,c[3]=we,c[4]=ve,c[5]=_e,c[6]=Se,c[7]=Ee,c[8]=Me,c[9]=Ae,c[10]=Re,c[11]=Te,c[12]=xe,c[13]=Oe,c[14]=Ie,c[15]=Ce,c[16]=Pe,c[17]=ke,c[18]=qe,0!==f&&(c[19]=f,r.length++),r};function b(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,c=Math.min(o,t.length-1),f=Math.max(0,o-e.length+1);f<=c;f++){var u=o-f,d=(0|e.words[u])*(0|t.words[f]),l=67108863&d;s=67108863&(l=l+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):b(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},m.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,c=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=c,l=f,h=0;h<a;h++){var p=r[u+h],b=n[u+h],m=r[u+h+a],y=n[u+h+a],g=d*m-l*y;y=d*y+l*m,m=g,r[u+h]=p+m,n[u+h]=b+y,r[u+h+a]=p-m,n[u+h+a]=b-y,h!==s&&(g=c*d-f*l,l=c*l+f*d,d=g)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),c=new Array(n),f=new Array(n),u=new Array(n),d=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,f,n),this.transform(a,o,s,c,n,i),this.transform(f,o,u,d,n,i);for(var h=0;h<n;h++){var p=s[h]*u[h]-c[h]*d[h];c[h]=s[h]*d[h]+c[h]*u[h],s[h]=p}return this.conjugate(s,c,n),this.transform(s,c,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,c=(0|this.words[t])-s<<r;this.words[t]=c|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,c=r;if(i-=a,i=Math.max(0,i),c){for(var f=0;f<a;f++)c.words[f]=this.words[f];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,f=0;f<this.length;f++)this.words[f]=this.words[f+a];else this.words[0]=0,this.length=1;var u=0;for(f=this.length-1;f>=0&&(0!==u||f>=i);f--){var d=0|this.words[f];this.words[f]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var c=(0|e.words[i])*t;s=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var f=0;f<s.length;f++)s.words[f]=0}var u=n.clone()._ishlnsubmul(i,1,c);0===u.negative&&(n=u,s&&(s.words[c]=1));for(var d=c-1;d>=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),f=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++f;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(f)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(w,g),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,g),i(_,g),i(S,g),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new v;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,f).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m<p);var y=this.pow(d,new o(1).iushln(p-m-1));l=l.redMul(y),d=y.redSqr(),h=h.redMul(d),p=m}return l},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var f=t.words[n],u=c-1;u>=0;u--){var d=f>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,E),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7056:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(9214);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(a){}},4615:(e,t)=>{"use strict";async function r(e){return new Promise(((t,r)=>e.then(r,t)))}async function n(e){return new Promise((t=>setTimeout((()=>{t(!0)}),e)))}function i(e,t=Math.random){for(let r=e.length-1;r>0;r--){const n=Math.floor(t()*(r+1)),i=e[r];e[r]=e[n],e[n]=i}return e}function o(e,t,r=Math.random){return i(P(0,e.length-1),r).slice(0,t)}function a(e,t=Math.random){return e[Math.floor(e.length*t())]}function s(e){return e[e.length-1]}function c(e,t){const r=t.split(".");let n=e;for(const i of r){if(!n[i])return n[i];n=n[i]}return n}function f(e,t,r){const n=t.split(/\.|\[/);let i=e;for(let o=0;o<n.length;o++){const e=n[o],t=o<n.length-1&&n[o+1].includes("]"),a=e.includes("]")?e.replace(/\[|\]/g,""):e;if(o===n.length-1)return i[a]=r,r;u(i[a])||(i[a]=t?[]:{}),i=i[a]}return r}function u(e,t=!0){return!(!e||t&&!h(e._readableState)||t&&e.constructor&&(e.constructor.isBuffer||"Uint8Array"==e.constructor.name||"ArrayBuffer"===e.constructor.name))&&"object"==typeof e}function d(e){return u(e)&&!Array.isArray(e)}function l(e){return Array.isArray(e)&&0===e.length}function h(e){return typeof e>"u"}function p(e){return"[object Function]"===Object.prototype.toString.call(e)}function b(e){return"[object String]"===Object.prototype.toString.call(e)}function m(e){return"number"==typeof e&&isFinite(e)}function y(e){return!0===e||!1===e}function g(e){return"[object Date]"===Object.prototype.toString.call(e)}function w(e){return!b(e)||0===e.trim().length}function v(e){return m(e)&&Number.isInteger(e)&&e>=1}t.OW=t.Ct=t.Gi=t.eI=t.Yk=t.tl=t.WP=t.L0=t.jT=t.uI=t.xP=t.tk=t.kk=t.Fi=void 0;const _="!@#$%^&*()_+-=[]{}|;:<>?,./".split(""),S="abcdefghijklmnopqrstuvwxyz",E=S+"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",M=E+"!@#$%^&*()_+-=[]{}|;:<>?,./",A=["—","\\","東","京","都","𝖆","𝖇","𝖈","👾","🙇","💁","🙅"],R="0123456789abcdef";function T(e){if(m(e))return e;if(!b(e)||!e.match(/^-?\d+(\.\d+)?$/))throw new TypeError("Expected number, got: "+e);return parseFloat(e)}function x(e,t){for(const[r,n]of Object.entries(t))if(!n(e[r]))throw TypeError(`${r} in value does not exist or match shape`);for(const r of Object.keys(e))if(!t[r])throw TypeError(`${r} exists in value but not in shape`);return!0}function O(e,t){if(d(e)&&d(t))for(const r in t)d(t[r])?(e[r]||(e[r]={}),O(e[r],t[r])):Array.isArray(t[r])?e[r]=[...t[r]]:(null!==t[r]&&void 0!==t[r]||null===e[r]||void 0===e[r])&&(e[r]=t[r]);return e}function I(e,t){const r={};for(const n of e)for(const e of Object.keys(n))r[e]?r[e]=t(r[e],n[e]):r[e]=n[e];return r}function C(e,t){Array.prototype.push.apply(e,t)}function P(e,t){const r=[];for(let n=e;n<=t;n++)r.push(n);return r}function k(e,t=(()=>!1)){return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").split("").map((e=>/[a-z0-9]/.test(e)||t(e)?e:"-")).join("").replace(/-+/g,"-").replace(/^-|-$/g,"")}function q(e,t){if(0===t.length)return 0;const r=e.toLowerCase(),n=t.toLowerCase();return e===t?1e4:r.startsWith(n)?1e4-e.length:r.includes(n)?5e3-e.length:new RegExp(".*"+n.split("").join(".*")+".*").test(r)?1e3-e.length:0}const N={"&amp;":"&","&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<"};function F(e,t){const r=e.indexOf(t);return-1===r?null:e.slice(0,r)}function j(e,t){const r=e.indexOf(t);return-1===r?null:e.slice(r+t.length)}function $(e,t){const r=e.lastIndexOf(t);return-1===r?null:e.slice(0,r)}function L(e,t){const r=e.lastIndexOf(t);return-1===r?null:e.slice(r+t.length)}function B(e,t,r=!1){const n=r?e.lastIndexOf(t):e.indexOf(t);return-1===n?r?[null,e]:[e,null]:[e.slice(0,n),e.slice(n+t.length)]}function z(e,t){let r=[e];for(const n of t)r=r.flatMap((e=>e.split(n)));return r.filter((e=>e))}function D(e){const t=s(e.split(/\\|\//g)),r=t.lastIndexOf(".",t.length-1);return r<=0?"":t.slice(r+1)}function U(e){const t=s(e.split(/\\|\//g)),r=t.lastIndexOf(".",t.length-1);return r<=0?t:t.slice(0,r)}function W(e){return e.charAt(0).toUpperCase()+e.slice(1)}function H(e){return e.charAt(0).toLowerCase()+e.slice(1)}function V(e){if(!e)return!1;const t=e.charCodeAt(0);return t>=65&&t<=90||t>=97&&t<=122}function G(e){if(!e)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}function X(e){return V(e)||G(e)}function J(e,t,r=0){const n=t.exec(e.slice(r));return n?{index:n.index,match:n[0]}:null}function Z(e,t,r=!0){if(!r)return t.every((t=>t instanceof RegExp?t.test(e):-1!==e.indexOf(t,0)));let n=0;for(const i of t)if(i instanceof RegExp){const t=J(e,i,n);if(!t)return!1;n=t.index+t.match.length}else{const t=e.indexOf(i,n);if(-1===t)return!1;n=t+i.length}return!0}function Y(e,t,r=0){let n=-1;for(const i of t){const t=e.indexOf(i,r);-1!==t&&(-1===n||t<n)&&(n=t)}return n}function K(e,t=0){for(let r=t;r<e.length;r++)if(!X(e[r]))return r;return-1}function Q(e,t=0){for(let r=t;r<e.length;r++)if("#"===e[r]&&X(e[r+1]))return r;return-1}function ee(e,t,r=0){return e.slice(0,r).lastIndexOf(t)}function te(e,t=0,r="{",n="}"){let i=1;for(let o=t;o<e.length;o++)if(e.slice(o,o+n.length)===n){if(0==--i)return o}else e.slice(o,o+r.length)===r&&i++;return-1}function re(e,t){const r=t.wordBoundary?Y(e,[`${t.opening} `,`${t.opening}\n`],t.start||0):e.indexOf(t.opening,t.start||0);if(-1===r)return null;const n=te(e,r+t.opening.length,t.opening,t.closing);return-1===n?null:t.exclusive?e.slice(r+t.opening.length,n):e.slice(r,n+t.closing.length)}const ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function ie(e,t,r){const n=[];for(const i of r)i!==t&&n.push(e.replace(t,i));return n}function oe(e,t){return new RegExp(`\\b${t}\\b`).test(e)}function ae(e,t,r=[]){let n="";for(;t<e.length&&(X(e[t])||r.includes(e[t]));)n+=e[t++];return n}function se(e,t,r,n="$",i=":"){if(""===r)return e;let o=e.indexOf(`${n}${t}`);for(;-1!==o;){if(e[o+t.length+1]===i)if(e[o+t.length+2]===i)e=e.replace(`${n}${t}${i}${i}`,r);else{const a=ae(e,o+t.length+2,["_"]);e=e.replace(`${n}${t}${i}${a}`,r)}else e=e.replace(`${n}${t}`,r);o=e.indexOf(`${n}${t}`,o+r.length)}return e}function ce(e,t="$",r=":"){let n=e.indexOf(t);for(;-1!==n;){const i=ae(e,n+1);if(e[n+i.length+1]===r)if(e[n+i.length+2]===r)e=e.replace(`${t}${i}${r}${r}`,"");else{const o=ae(e,n+i.length+2);e=e.replace(`${t}${i}${r}${o}`,o)}n=e.indexOf(t,n+1)}return e}function fe(e,t=!0){const r=Object.entries(e).filter((([e,t])=>null!=t)).map((([e,t])=>`${e}=${encodeURIComponent(t)}`)).join("&");return r?(t?"?":"")+r:""}function ue(e){return String(Math.floor(e)).padStart(2,"0")}function de(e){const t=Math.floor(e/36e5);e%=36e5;const r=Math.floor(e/6e4);e%=6e4;const n=Math.floor(e/1e3);return t?`${ue(t)}:${ue(r)}:${ue(n)}`:`${ue(r)}:${ue(n)}`}const le={};const he={s:1e3,m:6e4,h:36e5,d:864e5};const pe={0:"sunday",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday"};function be(e){return{zeroBasedIndex:e,day:pe[e]}}function me(e){return be(e.getDay())}const ye=[["ms",1],["milli",1],["millis",1],["millisecond",1],["milliseconds",1],["s",1e3],["sec",1e3],["second",1e3],["seconds",1e3],["m",6e4],["min",6e4],["minute",6e4],["minutes",6e4],["h",36e5],["hour",36e5],["hours",36e5],["d",864e5],["day",864e5],["days",864e5],["w",6048e5],["week",6048e5],["weeks",6048e5]];const ge={};function we(...e){return e.filter((e=>e)).join("/").replace(/(?<!:)\/+/g,"/")}function ve(e){const t=Object.keys(e).sort(((e,t)=>e.localeCompare(t))),r={};for(const n of t)r[n]=Se(e[n]);return r}function _e(e){const t=[];return e.sort(((e,t)=>JSON.stringify(Se(e)).localeCompare(JSON.stringify(Se(t))))).forEach((e=>t.push(Se(e)))),t}function Se(e){return Array.isArray(e)?_e(e):u(e)?ve(e):e}function Ee(e,t){return JSON.stringify(Se(e))===JSON.stringify(Se(t))}function Me(e){const t=Object.keys(e);return t[Math.floor(Math.random()*t.length)]}const Ae=[1e3,1e6,1e9,1e12,1e15,1e18,1e21,1e24,1e27,1e30,1e9,1e16,1e18,1e18,1e18,1e33],Re=["thousand","million","billion","trillion","quadrillion","quintillion","sextillion","septillion","octillion","nonillion","gwei","bzz","btc","eth","dai","decillion"],Te=["K","M","B","T","Qa","Qi","Sx","Sp","O","N","gwei","bzz","eth","btc","dai","D"];function xe(e){const t=parseFloat(e);if(isNaN(t))throw Error("makeNumber got NaN for input");const r=e.replace(/^-?[0-9.]+/,"").trim(),n=Te.findIndex((e=>e.toLowerCase()===r.toLowerCase()));return-1===n?t:t*Ae[n]}function Oe(e,t,r){return e+(r?"["+t+"]":(e.length?".":"")+t)}function Ie(e,t,r,n,i){if(!u(t))return t;for(const[o,a]of Object.entries(t)){const t=Oe(r,o,n);Array.isArray(a)?i?Ie(e,a,t,!0,i):e[t]=a.map((e=>Ie(Array.isArray(e)?[]:{},e,"",!1,i))):u(a)?Ie(e,a,t,!1,i):e[t]=a}return e}function Ce(e,t){const r={};for(const n of e){r[t(n)]=n}return r}function Pe(e,t){const r=Math.ceil(e.length/t),n=[];for(let i=0;i<e.length;i+=r)n.push(e.slice(i,i+r));return n}function ke(e,t){const r=[],n=Math.ceil(e.length/t);for(let i=0;i<n;i++)r.push(e.slice(i*t,i*t+t));return r}function qe(e,t){return Object.fromEntries(Object.entries(e).sort(t))}function Ne(e,t){const r=[];let n=[];e.length&&(r.push(n),n.push(e[0]));for(let i=1;i<e.length;i++)t(e[i],e[i-1])||(n=[],r.push(n)),n.push(e[i]);return r}function Fe(e,t,r,n=100){if(e.map.has(t)){const r=e.keys.indexOf(t);e.keys.splice(r,1)}if(e.map.set(t,r),e.keys.push(t),e.keys.length>n){const t=e.keys.shift();t&&e.map.delete(t)}}class je{constructor(e){this.value=e}ifPresent(e){return this.value&&e(this.value),this}orElse(e){var t;null!==(t=this.value)&&void 0!==t||e()}}function $e(e,t,r,n){const i=e.findIndex((e=>e.endsWith("-"+t)||e.includes("-"+t+"="))),o=e[i];if(!o)return(r||{})[n||t||""]||null;if(o.includes("="))return o.split("=")[1];const a=e[i+1];return a&&!a.startsWith("-")?a:(r||{})[n||t||""]||null}function Le(e,t,r,n){const i=$e(e,t,r,n);if(!i)throw new Error(`Missing argument ${t}`);return i}function Be(e,t){const r=e[t];e.splice(t,1),e.unshift(r)}function ze(e,t){return{x:e.x+t.x,y:e.y+t.y}}function De(e,t){return{x:e.x*t,y:e.y*t}}function Ue(e,t,r){return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}}function We(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function He(e,t,r="row-first"){const n=[];if("column-first"===r)for(let i=0;i<e.length;i++)for(let r=0;r<e[0].length;r++)t(i,r)&&n.push({x:i,y:r});else for(let i=0;i<e[0].length;i++)for(let r=0;r<e.length;r++)t(r,i)&&n.push({x:r,y:i});return n}function Ve(e,t,r){var n;return!(null!==(n=e[t-1])&&void 0!==n&&n[r])}function Ge(e,t,r){var n;return!(null!==(n=e[t+1])&&void 0!==n&&n[r])}function Xe(e,t,r){return!e[t][r-1]}function Je(e,t,r){return!e[t][r+1]}function Ze(e,t,r){var n,i,o,a,s,c,f,u;const d=[];return e[t][r]?function(e,t,r){var n,i;return(null===(n=e[t+1])||void 0===n?void 0:n[r])&&(null===(i=e[t-1])||void 0===i?void 0:i[r])&&!e[t][r-1]&&!e[t][r+1]}(e,t,r)||function(e,t,r){var n,i;return e[t][r+1]&&e[t][r-1]&&!(null!==(n=e[t-1])&&void 0!==n&&n[r])&&!(null!==(i=e[t+1])&&void 0!==i&&i[r])}(e,t,r)?[]:(!(null!==(s=e[t-1])&&void 0!==s&&s[r-1])&&Ve(e,t,r)&&Xe(e,t,r)&&d.push({x:t,y:r}),!(null!==(c=e[t+1])&&void 0!==c&&c[r-1])&&Ge(e,t,r)&&Xe(e,t,r)&&d.push({x:t+1,y:r}),!(null!==(f=e[t-1])&&void 0!==f&&f[r+1])&&Ve(e,t,r)&&Je(e,t,r)&&d.push({x:t,y:r+1}),!(null!==(u=e[t+1])&&void 0!==u&&u[r+1])&&Ge(e,t,r)&&Je(e,t,r)&&d.push({x:t+1,y:r+1}),d):(!(null===(n=e[t-1])||void 0===n)&&n[r]&&e[t][r-1]&&d.push({x:t,y:r}),!(null===(i=e[t+1])||void 0===i)&&i[r]&&e[t][r-1]&&d.push({x:t+1,y:r}),!(null===(o=e[t-1])||void 0===o)&&o[r]&&e[t][r+1]&&d.push({x:t,y:r+1}),!(null===(a=e[t+1])||void 0===a)&&a[r]&&e[t][r+1]&&d.push({x:t+1,y:r+1}),d)}function Ye(e,t){return t.map((t=>function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)}(e,t))).sort(((e,t)=>e-t))}function Ke(e,t,r,n){const i=(n.y-r.y)*(t.x-e.x)-(n.x-r.x)*(t.y-e.y);if(0===i)return null;let o=e.y-r.y,a=e.x-r.x;const s=(n.x-r.x)*o-(n.y-r.y)*a,c=(t.x-e.x)*o-(t.y-e.y)*a;return o=s/i,a=c/i,o>0&&o<1&&a>0&&a<1?{x:e.x+o*(t.x-e.x),y:e.y+o*(t.y-e.y)}:null}function Qe(e,t,r){const n=[],i=Ue(e,r,1e4);for(const o of t){const t=Ke(e,i,o.start,o.end);t&&n.push(t)}return n.length?n.reduce(((t,r)=>We(e,r)<We(e,t)?r:t)):null}t.Fi=je,t.kk={intBetween:function(e,t,r=Math.random){return Math.floor(r()*(t-e+1))+e},floatBetween:function(e,t,r=Math.random){return r()*(t-e)+e},chance:function(e,t=Math.random){return t()<e},signed:function(){return 2*Math.random()-1},makeSeededRng:function(e){let t=e,r=3405648695,n=3735928559;return function(){return t+=r,r^=t<<7,t*=n,n^=t<<13,t^=r^n,(t>>>0)/4294967296}}},t.tk={countUnique:function(e,t,r,n,i){const o=t?e.map(t):e,a={};for(const c of o)a[c]=(a[c]||0)+1;const s=n?qe(a,i?(e,t)=>e[1]-t[1]:(e,t)=>t[1]-e[1]):a;return r?Object.keys(s):s},makeUnique:function(e,t){return Object.values(Ce(e,t))},splitBySize:function(e,t){const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r},splitByCount:Pe,index:Ce,indexCollection:function(e,t){const r={};for(const n of e){const e=t(n);r[e]||(r[e]=[]),r[e].push(n)}return r},onlyOrThrow:function(e){if(e&&1===e.length)return e[0];throw e&&"length"in e?Error("Expected array to have length 1, got: "+e.length):Error("Expected array, got: "+e)},onlyOrNull:function(e){return e&&1===e.length?e[0]:null},firstOrNull:function(e){return e&&e.length>0?e[0]:null},shuffle:i,initialize:function(e,t){const r=[];for(let n=0;n<e;n++)r.push(t(n));return r},initialize2D:function(e,t,r){const n=[];for(let i=0;i<e;i++){n.push([]);for(let e=0;e<t;e++)n[i].push(r)}return n},rotate2D:function(e){const t=[];for(let r=0;r<e[0].length;r++){t.push([]);for(let n=0;n<e.length;n++)t[r].push(e[n][r])}return t},containsShape:function(e,t,r,n){if(r<0||n<0||n+t[0].length>e[0].length||r+t.length>e.length)return!1;for(let i=0;i<t.length;i++)for(let o=0;o<t[i].length;o++)if(void 0!==t[i][o]&&e[r+i][n+o]!==t[i][o])return!1;return!0},glue:function(e,t){const r=[];for(let n=0;n<e.length;n++)r.push(e[n]),n<e.length-1&&(p(t)?r.push(t()):r.push(t));return r},pluck:function(e,t){return e.map((e=>e[t]))},pick:a,pickMany:function(e,t,r=Math.random){if(t>e.length)throw new Error(`Count (${t}) is greater than array length (${e.length})`);return o(e,t,r).map((t=>e[t]))},pickManyUnique:function(e,t,r,n=Math.random){if(t>e.length)throw new Error(`Count (${t}) is greater than array length (${e.length})`);const i=[];for(;i.length<t;){const t=a(e,n);i.some((e=>r(e,t)))||i.push(t)}return i},pickWeighted:function(e,t,r){if(h(r)&&(r=Math.random()),e.length!==t.length)throw new Error("Array length mismatch");let n=t.reduce(((e,t)=>e+t),0);const i=r*n;for(let o=0;o<e.length-1;o++)if(n-=t[o],i>=n)return e[o];return s(e)},pickRandomIndices:o,pickGuaranteed:function(e,r,n,o,a,s=Math.random){const c=e.filter((e=>e!==r&&e!==n)),f=[];for(null!==r&&f.push(r);c.length&&f.length<o;){const e=t.kk.intBetween(0,c.length-1,s);a(c[e],f)&&f.push(c[e]),c.splice(e,1)}return i(f,s),{values:f,indexOfGuaranteed:null!==r?f.indexOf(r):-1}},last:s,sortWeighted:function(e,t,r=Math.random){const n=t.map((e=>r()*e)),i=[];for(let o=0;o<e.length;o++)i.push([e[o],n[o]]);return i.sort(((e,t)=>t[1]-e[1])).map((e=>e[0]))},pushAll:C,unshiftAll:function(e,t){Array.prototype.unshift.apply(e,t)},filterAndRemove:function(e,t){const r=[];for(let n=e.length-1;n>=0;n--)t(e[n])&&r.push(e.splice(n,1)[0]);return r},merge:function(e,t){const r=Object.keys(t);for(const n of r)Array.isArray(t[n])&&Array.isArray(e[n])&&C(e[n],t[n])},empty:function(e){return e.splice(0,e.length),e},pushToBucket:function(e,t,r){e[t]||(e[t]=[]),e[t].push(r)},unshiftAndLimit:function(e,t,r){for(e.unshift(t);e.length>r;)e.pop()},atRolling:function(e,t){let r=t%e.length;return r<0&&(r+=e.length),e[r]},group:Ne,createOscillator:function(e){let t=0;return{next:()=>e[t++%e.length]}},organiseWithLimits:function(e,t,r,n,i){const o={};for(const a of Object.keys(t))o[a]=[];o[n]=[],i&&(e=e.sort(i));for(const a of e){const e=a[r],i=t[e]?e:n;o[i].length>=t[i]?o[n].push(a):o[i].push(a)}return o},tickPlaybook:function(e){if(0===e.length)return null;const t=e[0];return t.ttlMax?--t.ttl<=0&&e.shift():t.ttlMax=t.ttl,{progress:(t.ttlMax-t.ttl)/t.ttlMax,data:t.data}},getArgument:$e,getBooleanArgument:function(e,t,r,n){const i=e.some((e=>e.endsWith("-"+t))),o=$e(e,t,r,n);if(!o&&i)return!0;if(!o&&!i)return null;if(["true","1","yes","y","on"].includes(o.toLowerCase()))return!0;if(["false","0","no","n","off"].includes(o.toLowerCase()))return!1;throw Error(`Invalid boolean argument ${t}: ${o}`)},getNumberArgument:function(e,t,r,n){const i=$e(e,t,r,n);if(!i)return null;try{return xe(i)}catch{throw new Error(`Invalid number argument ${t}: ${i}`)}},requireStringArgument:Le,requireNumberArgument:function(e,t,r,n){const i=Le(e,t,r,n);try{return xe(i)}catch{throw new Error(`Invalid argument ${t}: ${i}`)}},bringToFront:function(e,t){const r=[...e];return Be(r,t),r},bringToFrontInPlace:Be,findInstance:function(e,t){const r=e.find((e=>e instanceof t));return new je(r)}},t.xP={sleepMillis:n,forever:async function(e,t,r){for(;;){try{await e()}catch(i){r&&r("Error in forever",i)}await n(t)}},scheduleMany:function(e,t){for(let r=0;r<e.length;r++){const n=e[r],i=t[r],o=Math.max(0,i.getTime()-Date.now());setTimeout(n,o)}},waitFor:async function(e,t,r){for(let i=0;i<r;i++){try{if(await e())return!0}catch{}i<r-1&&await n(t)}return!1},expandError:function(e,t){if(b(e))return e;const r=Object.keys(e);e.message&&!r.includes("message")&&r.push("message");const n=r.map((t=>`${t}: ${e[t]}`)).join("; ");return t&&e.stack?n+"\n"+e.stack:n}},t.uI={make:xe,sum:function(e){return e.reduce(((e,t)=>e+t),0)},average:function(e){return e.reduce(((e,t)=>e+t),0)/e.length},median:function(e){const t=[...e].sort(((e,t)=>e-t)),r=Math.floor(t.length/2);return t.length%2==0?(t[r]+t[r-1])/2:t[r]},getDistanceFromMidpoint:function(e,t){return e-(t-1)/2},clamp:function(e,t,r){return e<t?t:e>r?r:e},range:P,interpolate:function(e,t,r){return e+(t-e)*r},createSequence:function(){let e=0;return{next:()=>e++}},increment:function(e,t,r){const n=e+t;return n>r?r:n},decrement:function(e,t,r){const n=e-t;return n<r?r:n},format:function(e,t){var r,n;const i=null!==(r=t?.longForm)&&void 0!==r&&r,o=t?.unit?` ${t.unit}`:"",a=i?Re:Te,s=null!==(n=t?.precision)&&void 0!==n?n:1;if(e<Ae[0])return`${e}${o}`;for(let c=0;c<Ae.length-1;c++)if(e<Ae[c+1])return`${(e/Ae[c]).toFixed(s)}${i?" ":""}${a[c]}${o}`;return`${(e/Ae[Ae.length-1]).toFixed(s)}${i?" ":""}${a[Ae.length-1]}${o}`},asMegabytes:function(e){return e/1024/1024},convertBytes:function(e){return e>=1073741824?(e/1024/1024/1024).toFixed(3)+" GB":e>=1048576?(e/1024/1024).toFixed(3)+" MB":e>=1024?(e/1024).toFixed(3)+" KB":e+" B"},hexToRgb:function(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e.toLowerCase());if(!t)throw new Error("Invalid hex color: "+e);return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]},rgbToHex:function(e){return"#"+e.map((e=>e.toString(16).padStart(2,"0"))).join("")}},t.jT={raceFulfilled:async function(e){return r(Promise.all(e.map(r)))},invert:r,runInParallelBatches:async function(e,t=1){const r=Pe(e,t),n=[],i=r.map((async e=>{for(const t of e)n.push(await t())}));return await Promise.all(i),n},makeAsyncQueue:function(e=1){const t=[],r=[];let n=0;async function i(){if(t.length>0&&n<e){n++;const e=t.shift();try{e&&await e()}finally{if(0==--n)for(;r.length>0;)r.shift()();i()}}}return{enqueue(e){t.push(e),i()},drain:async function(){return n?new Promise((e=>{r.push(e)})):Promise.resolve()}}}},t.L0={getAgo:function(e,t){t||(t=Date.now());let r=(t-e.getTime())/1e3;return r<10?"A few seconds ago":r<120?r.toFixed(0)+" seconds ago":(r/=60,r<120?r.toFixed(0)+" minutes ago":(r/=60,r<48?r.toFixed(0)+" hours ago":(r/=24,r.toFixed(0)+" days ago")))},getAgoStructured:function(e,t){t||(t=Date.now());let r=(t-("number"==typeof e?e:e.getTime()))/1e3;return r<120?{value:Math.floor(r),unit:"second"}:(r/=60,r<120?{value:Math.floor(r),unit:"minute"}:(r/=60,r<48?{value:Math.floor(r),unit:"hour"}:(r/=24,{value:Math.floor(r),unit:"day"})))},countCycles:function(e,t,r){var n,i,o;const a=(null!==(n=r?.now)&&void 0!==n?n:Date.now())-e;return{cycles:Math.floor(a/t),remaining:t/(null!==(i=r?.precision)&&void 0!==i?i:1)-Math.ceil(a%t/(null!==(o=r?.precision)&&void 0!==o?o:1))}},isoDate:function(e){return(e||new Date).toISOString().slice(0,10)},throttle:function(e,t){return(!le[e]||Date.now()>le[e])&&(le[e]=Date.now()+t,!0)},timeSince:function(e,t,r){return t=g(t)?t.getTime():t,((r=r?g(r)?r.getTime():r:Date.now())-t)/he[e]},dateTimeSlug:function(e){return(e||new Date).toISOString().slice(0,19).replace(/T|:/g,"-")},unixTimestamp:function(e){return Math.ceil((e||Date.now())/1e3)},fromUtcString:function(e){const t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset())},fromMillis:function(e){return new Date(e)},getProgress:function(e,t,r,n){n||(n=Date.now());const i=n-e,o=i/t,a=o*r;return{deltaMs:i,progress:t/r,baseTimeMs:o,totalTimeMs:a,remainingTimeMs:a-i}},humanizeTime:de,humanizeProgress:function(e){return`[${Math.floor(100*e.progress)}%] ${de(e.deltaMs)} out of ${de(e.totalTimeMs)} (${de(e.remainingTimeMs)} left) [${Math.round(e.baseTimeMs)} ms each]`},createTimeDigits:ue,mapDayNumber:be,getDayInfoFromDate:me,getDayInfoFromDateTimeString:function(e){return me(new Date(e))},seconds:function(e){return 1e3*e},minutes:function(e){return 6e4*e},hours:function(e){return 36e5*e},make:function(e){const t=parseFloat(e);if(isNaN(t))throw Error("makeDate got NaN for input");const r=e.replace(/^-?[0-9.]+/,"").trim(),n=ye.findIndex((e=>e[0]===r.toLowerCase()));return-1===n?t:t*ye[n][1]}},t.WP={safeParse:function(e){try{return JSON.parse(e)}catch{return null}},deleteDeep:function(e,t){const r=$(t,"."),n=L(t,".");if(!r||!n)return;delete c(e,r)[n]},getDeep:c,getDeepOrElse:function(e,t,r){return c(e,t)||r},setDeep:f,incrementDeep:function(e,t,r=1){const n=c(e,t)||0;return f(e,t,n+r),n},ensureDeep:function(e,t,r){return c(e,t)||f(e,t,r)},replaceDeep:function(e,t,r){const n=c(e,t);if(!n)throw new Error("Key '"+t+"' does not exist.");return f(e,t,r),n},getFirstDeep:function(e,t,r){for(const n of t){const t=c(e,n);if(t)return t}if(r){const t=Object.values(e);if(t.length)return t[0]}return null},deepMergeInPlace:O,deepMerge2:function(e,t){const r={};return O(r,e),O(r,t),r},deepMerge3:function(e,t,r){const n={};return O(n,e),O(n,t),O(n,r),n},mapAllAsync:async function(e,t){const r=[];for(const n of e)r.push(await t(n));return r},cloneWithJson:function(e){return JSON.parse(JSON.stringify(e))},sortObject:ve,sortArray:_e,sortAny:Se,deepEquals:Ee,deepEqualsEvery:function(...e){for(let t=1;t<e.length;t++)if(!Ee(e[t-1],e[t]))return!1;return!0},runOn:function(e,t){return t(e),e},ifPresent:function(e,t){e&&t(e)},zip:I,zipSum:function(e){return I(e,((e,t)=>e+t))},removeEmptyArrays:function(e){for(const t of Object.keys(e))(l(e[t])||Array.isArray(e[t])&&e[t].every((e=>null==e)))&&delete e[t];return e},removeEmptyValues:function(e){for(const t of Object.entries(e))(h(t[1])||null===t[1]||b(t[1])&&w(t[1]))&&delete e[t[0]];return e},flatten:function(e,t=!1,r){return Ie({},e,r||"",!1,t)},unflatten:function e(t){if(!u(t))return t;const r=Array.isArray(t)?[]:{};for(const[n,i]of Object.entries(t))Array.isArray(i)?f(r,n,i.map((t=>e(t)))):f(r,n,i);return r},match:function(e,t,r){return t[e]?t[e]:r},sort:qe,map:function(e,t){const r={};for(const n of Object.entries(e))r[n[0]]=t(n[1]);return r},filterKeys:function(e,t){const r={};for(const[n,i]of Object.entries(e))t(n)&&(r[n]=i);return r},filterValues:function(e,t){const r={};for(const[n,i]of Object.entries(e))t(i)&&(r[n]=i);return r},rethrow:async function(e,t){try{return await e()}catch{throw t}},setSomeOnObject:function(e,t,r){typeof r<"u"&&null!==r&&(e[t]=r)},setSomeDeep:function(e,t,r,n){const i=c(r,n);typeof i>"u"||null===i||f(e,t,i)},flip:function(e){const t={};for(const[r,n]of Object.entries(e))t[n]=r;return t},getAllPermutations:function(e){const t=Object.keys(e),r=t.map((t=>e[t].length)),n=r.reduce(((e,t)=>e*t));let i=1;const o=[1];for(let s=0;s<r.length-1;s++)i*=r[s],o.push(i);const a=[];for(let s=0;s<n;s++){const r={};for(let n=0;n<t.length;n++){const i=e[t[n]],a=Math.floor(s/o[n])%i.length;r[t[n]]=i[a]}a.push(r)}return a},countTruthyValues:function(e){return Object.values(e).filter((e=>e)).length},transformToArray:function(e){const t=[],r=Object.keys(e),n=e[r[0]].length;for(let i=0;i<n;i++){const n={};for(const t of r)n[t]=e[t][i];t.push(n)}return t},setMulti:function(e,t,r){for(const n of e)n[t]=r},incrementMulti:function(e,t,r=1){for(const n of e)n[t]+=r},createBidirectionalMap:function(){return{map:new Map,keys:[]}},createTemporalBidirectionalMap:function(){return{map:new Map,keys:[]}},pushToBidirectionalMap:Fe,unshiftToBidirectionalMap:function(e,t,r,n=100){if(e.map.has(t)){const r=e.keys.indexOf(t);e.keys.splice(r,1)}if(e.map.set(t,r),e.keys.unshift(t),e.keys.length>n){const t=e.keys.shift();t&&e.map.delete(t)}},addToTemporalBidirectionalMap:function(e,t,r,n,i=100){Fe(e,t,{validUntil:Date.now()+n,data:r},i)},getFromTemporalBidirectionalMap:function(e,t){const r=e.map.get(t);return r&&r.validUntil>Date.now()?r.data:null},createStatefulToggle:function(e){let t;return r=>{const n=r===e&&t!==e;return t=r,n}},diffKeys:function(e,t){const r=Object.keys(e),n=Object.keys(t);return{uniqueToA:r.filter((e=>!n.includes(e))),uniqueToB:n.filter((e=>!r.includes(e)))}},pickRandomKey:Me,mapRandomKey:function(e,t){const r=Me(e);return e[r]=t(e[r]),r},fromObjectString:function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/(\w+)\((.+)\)/g,((e,t,r)=>`${t}(${r.replaceAll(",","&comma;")})`))).replace(/(,)(\s+})/g,"$2")).replace(/\.\.\..+?,/g,"")).replace(/({\s+)([a-zA-Z]\w+),/g,"$1$2: '$2',")).replace(/(,\s+)([a-zA-Z]\w+),/g,"$1$2: '$2',")).replace(/:(.+)\?(.+):/g,((e,t,r)=>`: (${t.trim()} && ${r.trim()}) ||`))).replace(/([a-zA-Z0-9]+)( ?: ?{)/g,'"$1"$2')).replace(/([a-zA-Z0-9]+) ?: ?(.+?)(,|\n|})/g,((e,t,r,n)=>`"${t}":"${r.trim()}"${n}`))).replace(/("'|'")/g,'"')).replaceAll("&comma;",","),JSON.parse(e)},toQueryString:fe,parseQueryString:function(e){const t={},r=e.split("&");for(const n of r){const[e,r]=n.split("=");e&&r&&(t[e]=decodeURIComponent(r))}return t},hasKey:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t.tl={asPageNumber:function(e){const t=parseInt(e,10);return!t||t<1||t>99999?1:t},pageify:function(e,t,r,n){return{data:e,pageSize:r,totalPages:Math.floor(t/r)+1,totalElements:t,currentPage:n}}},t.Yk={isFunction:p,isObject:u,isStrictlyObject:d,isEmptyArray:l,isEmptyObject:function(e){return d(e)&&0===Object.keys(e).length},isUndefined:h,isString:b,isNumber:m,isBoolean:y,isDate:g,isBlank:w,isId:v,isNullable:function(e,t){return!(!h(t)&&null!==t)||e(t)},asString:function(e){if(w(e))throw new TypeError("Expected string, got: "+e);return e},asNumber:T,asInteger:function(e){return 0|T(e)},asBoolean:function(e){if(!y(e))throw new TypeError("Expected boolean, got: "+e);return e},asDate:function(e){if(!g(e))throw new TypeError("Expected date, got: "+e);return e},asNullableString:function(e){return w(e)?null:e},asEmptiableString:function(e){if(!b(e))throw new TypeError("Expected string, got: "+e);return e},asId:function(e){if(v(e))return e;const t=parseInt(e,10);if(!v(t))throw new TypeError("Expected id, got: "+e);return t},asTime:function(e){if(!b(e))throw new TypeError("Expected time, got: "+e);const t=e.split(":");if(2!==t.length)throw new TypeError("Expected time, got: "+e);const r=parseInt(t[0],10),n=parseInt(t[1],10);if(!m(r)||!m(n)||r<0||r>23||n<0||n>59)throw new TypeError("Expected time, got: "+e);return`${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`},asArray:function(e){if(!Array.isArray(e))throw new TypeError("Expected array, got: "+e);return e},asObject:function(e){if(!d(e))throw new TypeError("Expected object, got: "+e);return e},asNullable:function(e,t){return null===t||h(t)?null:e(t)},enforceObjectShape:x,enforceArrayShape:function(e,t){return e.every((e=>x(e,t)))}},t.eI={tokenizeByCount:function(e,t){return ke(e,Math.ceil(e.length/t))},tokenizeByLength:ke,searchHex:function(e,t){const r=new RegExp(`[0-9a-f]{${t}}`,"i"),n=e.match(r);return n?n[0]:null},searchSubstring:function(e,t,r=_){const n=z(e,r);for(const i of n)if(t(i))return i;return null},randomHex:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=R[Math.floor(t()*R.length)];return r},randomLetter:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=S[Math.floor(t()*S.length)];return r},randomAlphanumeric:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=E[Math.floor(t()*E.length)];return r},randomRichAscii:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=M[Math.floor(t()*M.length)];return r},randomUnicode:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=A[Math.floor(t()*A.length)];return r},includesAny:function(e,t){for(const r of t)if(e.includes(r))return!0;return!1},slugify:k,enumify:function(e){return k(e).replace(/-/g,"_").toUpperCase()},escapeHtml:function(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},decodeHtmlEntities:function(e){let t=e.replace(/&#(\d+);/g,((e,t)=>String.fromCharCode(t))).replace(/&#x(\d+);/g,((e,t)=>String.fromCharCode(parseInt(t,16))));for(const[r,n]of Object.entries(N))t=t.replaceAll(r,n);return t},after:j,afterLast:L,before:F,beforeLast:$,betweenWide:function(e,t,r){const n=$(e,r);return n?j(n,t):null},betweenNarrow:function(e,t,r){const n=j(e,t);return n?F(n,r):null},getPreLine:function(e){return e.replace(/ +/g," ").replace(/^ /gm,"")},containsWord:oe,containsWords:function(e,t,r){return"any"===r?t.some((t=>oe(e,t))):t.every((t=>oe(e,t)))},joinUrl:we,getFuzzyMatchScore:q,sortByFuzzyScore:function(e,t){return e.filter((e=>q(e,t))).sort(((e,r)=>q(r,t)-q(e,t)))},splitOnce:B,splitAll:z,randomize:function(e,t=Math.random){return e.replace(/\{(.+?)\}/g,((e,r)=>a(r.split("|"),t)))},expand:function e(t){const r=t.match(/\{(.+?)\}/);if(!r||!r.index)return[t];const n=r[1].split(","),i=t.slice(0,r.index),o=t.slice(r.index+r[0].length);let a=[];for(const s of n){const t=e(i+s+o);a=a.concat(t)}return a},shrinkTrim:function(e){return e.replace(/\s+/g," ").replace(/\s$|^\s/g,"")},capitalize:W,decapitalize:H,csvEscape:function(e){return e.match(/"|,/)?`"${e.replace(/"/g,'""')}"`:e},parseCsv:function(e,t=",",r='"'){const n=[];let i="",o=!1;const a=e.split("");for(const s of a)s!==t||o?s!==r||(i||o)&&!o?i+=s:o=!o:(n.push(i),i="");return n.push(i),n},surroundInOut:function(e,t){return t+e.split("").join(t)+t},getExtension:D,getBasename:U,normalizeFilename:function(e){const t=U(e),r=D(e);return r?`${t}.${r}`:t},parseFilename:function(e){const t=U(e),r=D(e);return{basename:t,extension:r,filename:r?`${t}.${r}`:t}},camelToTitle:function(e){return W(e.replace(/([A-Z])/g," $1"))},slugToTitle:function(e){return e.split("-").map(W).join(" ")},slugToCamel:function(e){return H(e.split("-").map(W).join(""))},joinHumanly:function(e,t=", ",r=" and "){return e&&e.length?1===e.length?e[0]:2===e.length?`${e[0]}${r}${e[1]}`:`${e.slice(0,e.length-1).join(t)}${r}${e[e.length-1]}`:""},findWeightedPair:te,extractBlock:re,extractAllBlocks:function(e,t){const r=[];let n=t.wordBoundary?Y(e,[`${t.opening} `,`${t.opening}\n`],t.start||0):e.indexOf(t.opening,t.start||0);for(;;){if(-1===n)return r;const i=re(e,Object.assign(Object.assign({},t),{start:n}));if(!i)return r;r.push(i),n=t.wordBoundary?Y(e,[`${t.opening} `,`${t.opening}\n`],n+i.length):e.indexOf(t.opening,n+i.length)}},replaceBlocks:function(e,r,n){let i=0;for(;;){const o=t.eI.extractBlock(e,Object.assign(Object.assign({},n),{start:i}));if(!o)return e;const a=r(o);i=e.indexOf(o,i)+a.length,e=e.replace(o,a)}},indexOfEarliest:Y,lastIndexOfBefore:ee,parseHtmlAttributes:function(e){const t={},r=e.match(/([a-z\-]+)="([^"]+)"/g);if(r)for(const n of r){const[e,r]=B(n,"=");t[e]=r.slice(1,r.length-1)}return t},readNextWord:ae,resolveVariables:function(e,t,r="$",n=":"){for(const i in t)e=se(e,i,t[i],r,n);return e=ce(e)},resolveVariableWithDefaultSyntax:se,resolveRemainingVariablesWithDefaults:ce,isLetter:V,isDigit:G,isLetterOrDigit:X,isValidObjectPathCharacter:function(e){return X(e)||"."===e||"["===e||"]"===e||"_"===e},insert:function(e,t,r,n,i){return e.slice(0,t)+n+e.slice(t,t+r)+i+e.slice(t+r)},indexOfRegex:J,lineMatches:Z,linesMatchInOrder:function(e,t,r=!0){let n=0;for(const i of t){let t=!1;for(;!t&&n<e.length;)Z(e[n],i,r)&&(t=!0),n++;if(!t)return!1}return!0},represent:function e(t,r="json",n=0){if(u(t,!1)){if(n>1)return"[object Object]";if("json"===r){if(Array.isArray(t)){const r=t.map((t=>e(t,"json",n+1)));return 0===n?JSON.stringify(r):r}const r={};t.message&&(r.message=e(t.message,"json",n+1));for(const[i,o]of Object.entries(t))r[i]=e(o,"json",n+1);return 0===n?JSON.stringify(r):r}if("key-value"===r){const r=Object.keys(t);return t.message&&!r.includes("message")&&r.unshift("message"),r.map((r=>`${r}=${JSON.stringify(e(t[r],"json",n+1))}`)).join(" ")}}return h(t)&&(t="undefined"),0===n?JSON.stringify(t):t},resolveMarkdownLinks:function(e,t){let r=e.indexOf("](");for(;-1!==r;){const n=ee(e,"[",r),i=e.indexOf(")",r);if(-1!==n&&-1!==i){const[r,o]=e.slice(n+1,i).split("]("),a=t(r,o);e=e.slice(0,n)+a+e.slice(i+1)}r=e.indexOf("](",r+1)}return e},buildUrl:function(e,t,r){return we(e,t)+fe(r||{})},isChinese:function(e){return/^[\u4E00-\u9FA5]+$/.test(e)},replaceBetweenStrings:function(e,t,r,n,i=!0){const o=e.indexOf(t),a=e.indexOf(r,o+t.length);if(-1===o||-1===a)throw Error("Start or end not found");return i?e.substring(0,o+t.length)+n+e.substring(a):e.substring(0,o)+n+e.substring(a+r.length)},describeMarkdown:function(e){let t="p";return e.startsWith("#")?(t="h1",e=e.slice(1).trim()):e.startsWith("-")&&(t="li",e=e.slice(1).trim()),{type:t,isCapitalized:e[0]===e[0].toUpperCase(),hasPunctuation:/[.?!]$/.test(e),endsWithColon:/:$/.test(e)}},isBalanced:function(e,t="(",r=")"){let n=0,i=0;for(;i<e.length;)if(e.startsWith(t,i)?(n++,i+=t.length):e.startsWith(r,i)?(n--,i+=r.length):i++,n<0)return!1;return t===r?n%2==0:0===n},textToFormat:function(e){let t=(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).length;for(;(e=e.replace(/(\w+)[\s,']+\w+/g,"$1")).length!==t;)t=e.length;return e=(e=(e=e.replaceAll(/[A-Z][a-zA-Z0-9]*/g,"A")).replaceAll(/[a-z][a-zA-Z0-9]*/g,"a")).replaceAll(/[\u4E00-\u9FA5]+/g,"Z")},splitFormatting:function(e,t){const r=[];let n=0;for(;n<e.length;){const i=e.indexOf(t,n);if(-1===i){r.push({string:e.slice(n),symbol:null});break}const o=e.indexOf(t,i+t.length);if(i>n&&-1!==o&&r.push({string:e.slice(n,i),symbol:null}),-1===o){r.push({string:e.slice(n),symbol:null});break}r.push({string:e.slice(i+t.length,o),symbol:t}),n=o+t.length}return r},splitHashtags:function(e){const t=[];let r=0;for(;r<e.length;){const n=Q(e,r);if(-1===n){t.push({string:e.slice(r),symbol:null});break}const i=K(e,n+1);if(-1===i){t.push({string:e.slice(r,n),symbol:null}),t.push({string:e.slice(n+1),symbol:"#"});break}n>r&&t.push({string:e.slice(r,n),symbol:null}),t.push({string:e.slice(n+1,i),symbol:"#"}),r=i}return t},splitUrls:function(e){const t=[];let r=0;for(;r<e.length;){const n=Y(e,["http://","https://"],r);if(-1===n){t.push({string:e.slice(r),symbol:null});break}const i=Y(e,[" ","\n"],n);if(-1===i){n>r&&t.push({string:e.slice(r,n),symbol:null}),t.push({string:e.slice(n),symbol:"http"});break}n>r&&t.push({string:e.slice(r,n),symbol:null}),t.push({string:e.slice(n,i),symbol:"http"}),r=i}return t},hexToUint8Array:function(e){e.startsWith("0x")&&(e=e.slice(2));const t=e.length/2,r=new Uint8Array(t);for(let n=0;n<t;n++){const t=parseInt(e.slice(2*n,2*n+2),16);r[n]=t}return r},uint8ArrayToHex:function(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")},base64ToUint8Array:function(e){let t=0;"="===e.charAt(e.length-1)&&(t++,"="===e.charAt(e.length-2)&&t++);const r=6*e.length/8-t,n=new Uint8Array(r);let i=0,o=0;for(;i<e.length;){const t=ne.indexOf(e.charAt(i++)),a=ne.indexOf(e.charAt(i++)),s=ne.indexOf(e.charAt(i++)),c=t<<2|a>>4,f=(15&a)<<4|s>>2,u=(3&s)<<6|ne.indexOf(e.charAt(i++));n[o++]=c,o<r&&(n[o++]=f),o<r&&(n[o++]=u)}return n},uint8ArrayToBase64:function(e){let t="",r=0;for(let n=0;n<e.length;n+=3){const i=e[n],o=e[n+1],a=e[n+2],s=(15&o)<<2|a>>6,c=63&a;t+=ne[i>>2]+ne[(3&i)<<4|o>>4],n+1<e.length?t+=ne[s]:r++,n+2<e.length?t+=ne[c]:r++}return r&&(t+=1===r?"=":"=="),t},route:function(e,t){const r=e.split("/").filter((e=>e)),n=t.split("/").filter((e=>e));if(r.length!==n.length)return null;const i={};for(let o=0;o<r.length;o++){const e=r[o];if(e.startsWith(":"))i[e.slice(1)]=n[o];else if(e!==n[o])return null}return i},explodeReplace:ie,generateVariants:function(e,r,n,i=Math.random){const o=t.tk.shuffle(r.map((e=>({variants:t.tk.shuffle(e.variants.map((e=>e)),i),avoid:e.avoid}))),i),a=[];for(const t of o){const r=t.variants.filter((e=>e!==t.avoid)),i=r.find((t=>e.includes(t)));if(i&&(C(a,ie(e,i,r)),a.length>=n))break}if(a.length<n)for(const t of o){const r=t.variants.find((t=>e.includes(t)));if(r&&(C(a,ie(e,r,t.variants)),a.length>=n))break}return a.slice(0,n)},hashCode:function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t},replaceWord:function(e,t,r,n=!1){const i=new RegExp(n?`(?<=\\s|^)${t}(?=\\s|$)`:`\\b${t}\\b`,"g");return e.replace(i,r)},replacePascalCaseWords:function(e,t){return e.replace(/\b[A-Z][a-zA-Z0-9]*\b/g,(e=>e.toUpperCase()===e?e:t(e)))},stripHtml:function(e){return e.replace(/<[^>]*>/g,"")}},t.Gi={asEqual:function(e,t){if(e!==t)throw Error(`Expected [${e}] to equal [${t}]`);return[e,t]},asTrue:function(e){if(!0!==e)throw Error(`Expected [true], got: [${e}]`);return e},asTruthy:function(e){if(!e)throw Error(`Expected truthy value, got: [${e}]`);return e},asFalse:function(e){if(!1!==e)throw Error(`Expected [false], got: [${e}]`);return e},asFalsy:function(e){if(e)throw Error(`Expected falsy value, got: [${e}]`);return e},asEither:function(e,t){if(!t.includes(e))throw Error(`Expected any of [${t.join(", ")}], got: [${e}]`);return e}},t.Ct={get:async function(e,t,r){const n=Date.now(),i=ge[e];if(i&&i.validUntil>n)return i.value;const o=await r(),a=n+t;return ge[e]={value:o,validUntil:a},o}},t.OW={addPoint:ze,subtractPoint:function(e,t){return{x:e.x-t.x,y:e.y-t.y}},multiplyPoint:De,normalizePoint:function(e){const t=Math.sqrt(e.x*e.x+e.y*e.y);return{x:e.x/t,y:e.y/t}},pushPoint:Ue,filterCoordinates:He,findCorners:function(e,t,r,n){const i=[{x:0,y:0},{x:r,y:0},{x:0,y:n},{x:r,y:n}];for(let o=0;o<e.length;o++)for(let t=0;t<e[0].length;t++){const r=Ze(e,o,t);for(const e of r)i.some((t=>t.x===e.x&&t.y===e.y))||i.push(e)}return i.map((e=>({x:e.x*t,y:e.y*t})))},findLines:function(e,t){const r=He(e,((t,r)=>0===e[t][r]&&0!==e[t][r+1]),"row-first").map((e=>Object.assign(Object.assign({},e),{dx:1,dy:0}))),n=He(e,((t,r)=>0===e[t][r]&&0!==e[t][r-1]),"row-first").map((e=>Object.assign(Object.assign({},e),{dx:1,dy:0}))),i=He(e,((t,r)=>{var n;return 0===e[t][r]&&0!==(null===(n=e[t-1])||void 0===n?void 0:n[r])}),"column-first").map((e=>Object.assign(Object.assign({},e),{dx:0,dy:1}))),o=He(e,((t,r)=>{var n;return 0===e[t][r]&&0!==(null===(n=e[t+1])||void 0===n?void 0:n[r])}),"column-first").map((e=>Object.assign(Object.assign({},e),{dx:0,dy:1})));return r.forEach((e=>e.y++)),o.forEach((e=>e.x++)),[...Ne([...i,...o],((e,t)=>e.x===t.x&&e.y-1===t.y)),...Ne([...n,...r],((e,t)=>e.y===t.y&&e.x-1===t.x))].map((e=>({start:e[0],end:s(e)}))).map((e=>({start:De(e.start,t),end:De(ze(e.end,{x:e.start.dx,y:e.start.dy}),t)})))},raycast:Qe,raycastCircle:function(e,t,r){const n=Ye(e,r),i=[];for(const o of n){const r=Qe(e,t,o-.001),n=Qe(e,t,o+.001);r&&i.push(r),n&&i.push(n)}return i},getLineIntersectionPoint:Ke}},236:(e,t,r)=>{"use strict";var n=t;n.version=r(8597).i8,n.utils=r(1560),n.rand=r(7056),n.curve=r(5533),n.curves=r(5914),n.ec=r(3090),n.eddsa=r(4082)},4861:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,c,f=[];for(a=0;a<n.length;a+=r.step){c=0;for(var u=a+r.step-1;u>=a;u--)c=(c<<1)+n[u];f.push(c)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a<f.length;a++)(c=f[a])===h?l=l.mixedAdd(r.points[a]):c===-h&&(l=l.mixedAdd(r.points[a].neg()));d=d.add(l)}return d.toP()},c.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(t,r,this._bitLength),c=this.jpoint(null,null,null),f=a.length-1;f>=0;f--){for(var u=0;f>=0&&0===a[f];f--)u++;if(f>=0&&u++,c=c.dblp(u),f<0)break;var d=a[f];s(0!==d),c="affine"===e.type?d>0?c.mixedAdd(i[d-1>>1]):c.mixedAdd(i[-d-1>>1].neg()):d>0?c.add(i[d-1>>1]):c.add(i[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){var s,c,f,u=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(s=0;s<n;s++){var p=(f=t[s])._getNAFPoints(e);u[s]=p.wnd,d[s]=p.points}for(s=n-1;s>=1;s-=2){var b=s-1,m=s;if(1===u[b]&&1===u[m]){var y=[t[b],null,null,t[m]];0===t[b].y.cmp(t[m].y)?(y[1]=t[b].add(t[m]),y[2]=t[b].toJ().mixedAdd(t[m].neg())):0===t[b].y.cmp(t[m].y.redNeg())?(y[1]=t[b].toJ().mixedAdd(t[m]),y[2]=t[b].add(t[m].neg())):(y[1]=t[b].toJ().mixedAdd(t[m]),y[2]=t[b].toJ().mixedAdd(t[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],w=a(r[b],r[m]);for(h=Math.max(w[0].length,h),l[b]=new Array(h),l[m]=new Array(h),c=0;c<h;c++){var v=0|w[0][c],_=0|w[1][c];l[b][c]=g[3*(v+1)+(_+1)],l[m][c]=0,d[b]=y}}else l[b]=o(r[b],u[b],this._bitLength),l[m]=o(r[m],u[m],this._bitLength),h=Math.max(l[b].length,h),h=Math.max(l[m].length,h)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(s=h;s>=0;s--){for(var M=0;s>=0;){var A=!0;for(c=0;c<n;c++)E[c]=0|l[c][s],0!==E[c]&&(A=!1);if(!A)break;M++,s--}if(s>=0&&M++,S=S.dblp(M),s<0)break;for(c=0;c<n;c++){var R=E[c];0!==R&&(R>0?f=d[c][R-1>>1]:R<0&&(f=d[c][-R-1>>1].neg()),S="affine"===f.type?S.mixedAdd(f):S.add(f))}}for(s=0;s<n;s++)d[s]=null;return i?S:S.toP()},c.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(e){return this.encode(e,!0)},f.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},f.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},f.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},f.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},f.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},5649:(e,t,r)=>{"use strict";var n=r(1560),i=r(9919),o=r(5153),a=r(4861),s=n.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function f(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(f,a.BasePoint),c.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new f(this,e,t,r,n)},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),f=o.redMul(s),u=i.redMul(s),d=a.redMul(o);return this.curve.point(c,f,d,u)},f.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var f=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(f.redSub(this.curve.two)),t=f.redMul(n.redSub(c)),r=f.redSqr().redSub(f).redSub(f)):(i=this.z.redSqr(),o=f.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=f.redMul(n.redSub(c)),r=f.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),f=o.redMul(a),u=s.redMul(c),d=o.redMul(c),l=a.redMul(s);return this.curve.point(f,u,l,d)},f.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),f=i.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(c).redMul(u);return this.curve.twisted?(t=n.redMul(f).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(f)):(t=n.redMul(f).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(f)),this.curve.point(d,t,r)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},f.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},5533:(e,t,r)=>{"use strict";var n=t;n.base=r(4861),n.short=r(8707),n.mont=r(7474),n.edwards=r(5649)},7474:(e,t,r)=>{"use strict";var n=r(9919),i=r(5153),o=r(4861),a=r(1560);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},8707:(e,t,r)=>{"use strict";var n=r(1560),i=r(9919),o=r(5153),a=r(4861),s=n.assert;function c(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,c,f,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),m=new i(0),y=new i(1),g=0;0!==l.cmpn(0);){var w=h.div(l);f=h.sub(w.mul(l)),u=m.sub(w.mul(p));var v=y.sub(w.mul(b));if(!n&&f.cmp(d)<0)t=c.neg(),r=p,n=f.neg(),o=u;else if(n&&2==++g)break;c=f,h=l,l=f,m=p,p=u,y=b,b=v}a=f.neg(),s=u;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),f=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(f).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],c=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),c=c.neg(!0)),n[2*o]=s,n[2*o+1]=c,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var f=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return f},o(f,a.BasePoint),c.prototype.point=function(e,t,r){return new f(this,e,t,r)},c.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t)},f.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,a.BasePoint),c.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=s.redSqr(),u=f.redMul(s),d=n.redMul(f),l=c.redSqr().redIAdd(u).redISub(d).redISub(d),h=c.redMul(d.redISub(l)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=r.redMul(c),d=s.redSqr().redIAdd(f).redISub(u).redISub(u),l=s.redMul(u.redISub(d)).redISub(i.redMul(f)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,c=s.redSqr().redSqr(),f=a.redAdd(a);for(t=0;t<e;t++){var u=o.redSqr(),d=f.redSqr(),l=d.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(c)),p=o.redMul(d),b=h.redSqr().redISub(p.redAdd(p)),m=p.redISub(b),y=h.redMul(m);y=y.redIAdd(y).redISub(l);var g=f.redMul(s);t+1<e&&(c=c.redMul(l)),o=b,s=g,f=y}return this.curve.jpoint(o,f.redMul(i),s)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),c=s.redSqr().redISub(a).redISub(a),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=c,t=s.redMul(a.redISub(c)).redISub(f),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),l=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(u).redISub(l);h=h.redIAdd(h);var p=u.redAdd(u).redIAdd(u),b=p.redSqr(),m=l.redIAdd(l);m=(m=m.redIAdd(m)).redIAdd(m),e=b.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},u.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=s.redSqr().redISub(a).redISub(a);e=c;var f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=s.redMul(a.redISub(c)).redISub(f),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),l=this.x.redMul(d),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l),b=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var m=d.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=h.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),f=(c=c.redIAdd(c)).redMul(a),u=s.redSqr().redISub(f.redAdd(f)),d=f.redISub(u),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=s.redMul(d).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(u,h,p)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var f=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(c),u=t.redMul(f);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(s).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var l=this.y.redMul(f.redMul(c.redISub(f)).redISub(a.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(d,l,h)},u.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5914:(e,t,r)=>{"use strict";var n,i=t,o=r(6204),a=r(5533),s=r(1560).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(2970)}catch(u){n=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},3090:(e,t,r)=>{"use strict";var n=r(9919),i=r(4859),o=r(1560),a=r(5914),s=r(7056),c=o.assert,f=r(4858),u=r(3539);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new f(this,e)},d.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),f=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),l=0;;l++){var h=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),m=b.umod(this.n);if(0!==m.cmpn(0)){var y=h.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new u({r:m,s:y,recoveryParam:g})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),f=c.mul(e).umod(this.n),d=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(f,r.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(f,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){c((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,a=new n(e),s=t.r,f=t.s,d=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),b=f.mul(h).umod(o);return this.g.mulAdd(p,s,b)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},4858:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},3539:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function f(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function u(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=c(e,r);if(!1===a)return!1;var f=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var u=c(e,r);if(!1===u)return!1;if(e.length!==u+r.place)return!1;var d=e.slice(r.place,u+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(f),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var o=n.concat(r),a=[48];return u(a,o.length),a=a.concat(o),i.encode(a,e)}},4082:(e,t,r)=>{"use strict";var n=r(6204),i=r(5914),o=r(1560),a=o.assert,s=o.parseBytes,c=r(6958),f=r(6018);function u(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),c=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},u.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return o.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}},6958:(e,t,r)=>{"use strict";var n=r(1560),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},6018:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},2970:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},1560:(e,t,r)=>{"use strict";var n=t,i=r(9919),o=r(6794),a=r(7705);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,c=o.andln(i-1);o.isOdd()?(s=c>(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,f=t.andln(3)+o&3;3===c&&(c=-1),3===f&&(f=-1),a=0==(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==f?c:-c,r[0].push(a),s=0==(1&f)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?f:-f,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},8612:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},6204:(e,t,r)=>{var n=t;n.utils=r(6414),n.common=r(2238),n.sha=r(4538),n.ripemd=r(2185),n.hmac=r(6316),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},2238:(e,t,r)=>{"use strict";var n=r(6414),i=r(6794);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},6316:(e,t,r)=>{"use strict";var n=r(6414),i=r(6794);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},2185:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=n.rotl32,a=n.sum32,s=n.sum32_3,c=n.sum32_4,f=i.BlockHash;function u(){if(!(this instanceof u))return new u;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,f),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],u=this.h[4],g=r,w=n,v=i,_=f,S=u,E=0;E<80;E++){var M=a(o(c(r,d(E,n,i,f),e[p[E]+t],l(E)),m[E]),u);r=u,u=f,f=o(i,10),i=n,n=M,M=a(o(c(g,d(79-E,w,v,_),e[b[E]+t],h(E)),y[E]),S),g=S,S=_,_=o(v,10),v=w,w=M}M=s(this.h[1],i,_),this.h[1]=s(this.h[2],f,S),this.h[2]=s(this.h[3],u,g),this.h[3]=s(this.h[4],r,w),this.h[4]=s(this.h[0],n,v),this.h[0]=M},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},4538:(e,t,r)=>{"use strict";t.sha1=r(6854),t.sha224=r(9104),t.sha256=r(7284),t.sha384=r(8909),t.sha512=r(1260)},6854:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(2181),a=n.rotl32,s=n.sum32,c=n.sum32_5,f=o.ft_1,u=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,u),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],l=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=c(a(i,5),f(p,o,u,l),h,r[n],d[p]);h=l,l=u,u=a(o,30),o=i,i=b}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],h)},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},9104:(e,t,r)=>{"use strict";var n=r(6414),i=r(7284);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},7284:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(2181),a=r(6794),s=n.sum32,c=n.sum32_4,f=n.sum32_5,u=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,m=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=c(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],g=this.h[4],w=this.h[5],v=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=f(_,h(g),u(g,w,v),this.k[n],r[n]),E=s(l(i),d(i,o,m));_=v,v=w,w=g,g=s(y,S),y=m,m=o,o=i,i=s(S,E)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],y),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],w),this.h[6]=s(this.h[6],v),this.h[7]=s(this.h[7],_)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},8909:(e,t,r)=>{"use strict";var n=r(6414),i=r(1260);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},1260:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(6794),a=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,f=n.shr64_lo,u=n.sum64,d=n.sum64_hi,l=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function w(){if(!(this instanceof w))return new w;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function M(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,1)^s(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}function C(e,t){var r=s(e,t,19)^s(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(w,y),e.exports=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=I(r[n-4],r[n-3]),o=C(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],c=x(r[n-30],r[n-29]),f=O(r[n-30],r[n-29]),u=r[n-32],d=r[n-31];r[n]=h(i,o,a,s,c,f,u,d),r[n+1]=p(i,o,a,s,c,f,u,d)}},w.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],c=this.h[4],f=this.h[5],h=this.h[6],p=this.h[7],y=this.h[8],g=this.h[9],w=this.h[10],x=this.h[11],O=this.h[12],I=this.h[13],C=this.h[14],P=this.h[15];o(this.k.length===r.length);for(var k=0;k<r.length;k+=2){var q=C,N=P,F=R(y,g),j=T(y,g),$=v(y,g,w,x,O),L=_(y,g,w,x,O,I),B=this.k[k],z=this.k[k+1],D=r[k],U=r[k+1],W=b(q,N,F,j,$,L,B,z,D,U),H=m(q,N,F,j,$,L,B,z,D,U);q=M(n,i),N=A(n,i),F=S(n,i,a,s,c),j=E(n,i,a,s,c,f);var V=d(q,N,F,j),G=l(q,N,F,j);C=O,P=I,O=w,I=x,w=y,x=g,y=d(h,p,W,H),g=l(p,p,W,H),h=c,p=f,c=a,f=s,a=n,s=i,n=d(W,H,V,G),i=l(W,H,V,G)}u(this.h,0,n,i),u(this.h,2,a,s),u(this.h,4,c,f),u(this.h,6,h,p),u(this.h,8,y,g),u(this.h,10,w,x),u(this.h,12,O,I),u(this.h,14,C,P)},w.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},2181:(e,t,r)=>{"use strict";var n=r(6414).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},6414:(e,t,r)=>{"use strict";var n=r(6794),i=r(5153);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=c(i.toString(16))}return r},t.zero2=s,t.zero8=c,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var a=new Array(o/4),s=0,c=t;s<a.length;s++,c+=4){var f;f="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],a[s]=f>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,f=t;return c+=(f=f+n>>>0)<t?1:0,c+=(f=f+o>>>0)<o?1:0,e+r+i+a+(c+=(f=f+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,f){var u=0,d=t;return u+=(d=d+n>>>0)<t?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+s>>>0)<s?1:0,e+r+i+a+c+(u+=(d=d+f>>>0)<f?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,f){return t+n+o+s+f>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},4859:(e,t,r)=>{"use strict";var n=r(6204),i=r(7705),o=r(6794);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},5153:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2256:(e,t,r)=>{var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:void 0!==r.g?n=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?n=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(n=self.WebSocket||self.MozWebSocket),e.exports=n},8086:(e,t,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,a=o?window:{};a.JS_SHA3_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=r.g:s&&(a=self);var c=!a.JS_SHA3_NO_COMMON_JS&&e.exports,f=r.amdO,u=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),l=[4,1024,262144,67108864],h=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],b=[224,256,384,512],m=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new q(e,t,e).update(n)[r]()}},v=function(e,t,r){return function(n,i){return new q(e,t,i).update(n)[r]()}},_=function(e,t,r){return function(t,n,i,o){return R["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return R["kmac"+e].update(t,n,i,o)[r]()}},E=function(e,t,r,n){for(var i=0;i<y.length;++i){var o=y[i];e[o]=t(r,n,o)}return e},M=function(e,t){var r=w(e,t,"hex");return r.create=function(){return new q(e,t,e)},r.update=function(e){return r.create().update(e)},E(r,w,e,t)},A=[{name:"keccak",padding:[1,256,65536,16777216],bits:b,createMethod:M},{name:"sha3",padding:[6,1536,393216,100663296],bits:b,createMethod:M},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(e,t){var r=v(e,t,"hex");return r.create=function(r){return new q(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},E(r,v,e,t)}},{name:"cshake",padding:l,bits:m,createMethod:function(e,t){var r=g[e],n=_(e,0,"hex");return n.create=function(n,i,o){return i||o?new q(e,t,n).bytepad([i,o],r):R["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},E(n,_,e,t)}},{name:"kmac",padding:l,bits:m,createMethod:function(e,t){var r=g[e],n=S(e,0,"hex");return n.create=function(n,i,o){return new N(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},E(n,S,e,t)}}],R={},T=[],x=0;x<A.length;++x)for(var O=A[x],I=O.bits,C=0;C<I.length;++C){var P=O.name+"_"+I[C];if(T.push(P),R[P]=O.createMethod(I[C],O.padding),"sha3"!==O.name){var k=O.name+I[C];T.push(k),R[k]=R[P]}}function q(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){q.call(this,e,t,r)}q.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,a=this.blocks,s=this.byteCount,c=e.length,f=this.blockCount,d=0,l=this.s;d<c;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<f+1;++n)a[n]=0;if(t)for(n=this.start;d<c&&n<s;++d)a[n>>2]|=e[d]<<h[3&n++];else for(n=this.start;d<c&&n<s;++d)(o=e.charCodeAt(d))<128?a[n>>2]|=o<<h[3&n++]:o<2048?(a[n>>2]|=(192|o>>6)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]):o<55296||o>=57344?(a[n>>2]|=(224|o>>12)<<h[3&n++],a[n>>2]|=(128|o>>6&63)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++d)),a[n>>2]|=(240|o>>18)<<h[3&n++],a[n>>2]|=(128|o>>12&63)<<h[3&n++],a[n>>2]|=(128|o>>6&63)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=a[f],n=0;n<f;++n)l[n]^=a[n];F(l),this.reset=!0}else this.start=n}return this},q.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},q.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;else for(var a=0;a<e.length;++a){var s=e.charCodeAt(a);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},q.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,o=[];return o.length=i,this.update(o),this},q.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];F(n)}},q.prototype.toString=q.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s="";a<n;){for(o=0;o<t&&a<n;++o,++a)e=r[o],s+=d[e>>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},q.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)c[a]=r[o];a%t==0&&F(r)}return i&&(c[o]=r[o],e=e.slice(0,s)),e},q.prototype.buffer=q.prototype.arrayBuffer,q.prototype.digest=q.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,c=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=s<<2,t=n[a],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},N.prototype=new q,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),q.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,c,f,u,d,l,h,b,m,y,g,w,v,_,S,E,M,A,R,T,x,O,I,C,P,k,q,N,F,j,$,L,B,z,D,U,W,H,V,G,X,J,Z,Y,K,Q,ee,te,re,ne,ie,oe,ae,se,ce,fe,ue;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(u<<1|d>>>31),r=s^(d<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(l<<1|h>>>31),r=f^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],m=e[1],G=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,O=e[20]<<3|e[21]>>>29,I=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,U=e[40]<<18|e[41]>>>14,W=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,F=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,fe=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,j=e[14]<<6|e[15]>>>26,$=e[15]<<6|e[14]>>>26,w=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,K=e[35]<<15|e[34]>>>17,k=e[45]<<29|e[44]>>>3,q=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,R=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,B=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,T=e[18]<<20|e[19]>>>12,x=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,D=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,M=e[49]<<14|e[48]>>>18,e[0]=b^~y&w,e[1]=m^~g&v,e[10]=A^~T&O,e[11]=R^~x&I,e[20]=N^~j&L,e[21]=F^~$&B,e[30]=H^~G&J,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~w&_,e[3]=g^~v&S,e[12]=T^~O&C,e[13]=x^~I&P,e[22]=j^~L&z,e[23]=$^~B&D,e[32]=G^~J&Y,e[33]=X^~Z&K,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=w^~_&E,e[5]=v^~S&M,e[14]=O^~C&k,e[15]=I^~P&q,e[24]=L^~z&U,e[25]=B^~D&W,e[34]=J^~Y&Q,e[35]=Z^~K&ee,e[44]=oe^~se&fe,e[45]=ae^~ce&ue,e[6]=_^~E&b,e[7]=S^~M&m,e[16]=C^~k&A,e[17]=P^~q&R,e[26]=z^~U&N,e[27]=D^~W&F,e[36]=Y^~Q&H,e[37]=K^~ee&V,e[46]=se^~fe&te,e[47]=ce^~ue&re,e[8]=E^~b&y,e[9]=M^~m&g,e[18]=k^~A&T,e[19]=q^~R&x,e[28]=U^~N&j,e[29]=W^~F&$,e[38]=Q^~H&G,e[39]=ee^~V&X,e[48]=fe^~te&ne,e[49]=ue^~re&ie,e[0]^=p[n],e[1]^=p[n+1]};if(c)e.exports=R;else{for(x=0;x<T.length;++x)a[T[x]]=R[T[x]];f&&(void 0===(n=function(){return R}.call(t,r,t,e))||(e.exports=n))}}()},6794:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},7705:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},9610:(e,t,r)=>{const n=r(1427),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(5958),{re:a,t:s}=r(6766),c=r(6145),{compareIdentifiers:f}=r(624);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),f(this.major,e.major)||f(this.minor,e.minor)||f(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return f(r,i)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return f(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===f(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},4503:(e,t,r)=>{const n=r(9610);e.exports=(e,t)=>new n(e,t).major},5958:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},1427:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},624:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},6145:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},6766:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(5958),i=r(1427),o=(t=e.exports={}).re=[],a=t.src=[],s=t.t={};let c=0;const f=(e,t,r)=>{const n=c++;i(e,n,t),s[e]=n,a[n]=t,o[n]=new RegExp(t,r?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","[0-9]+"),f("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),f("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER","[0-9A-Za-z-]+"),f("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),f("FULL",`^${a[s.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),f("LOOSE",`^${a[s.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),f("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),f("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),f("COERCERTL",a[s.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},116:(e,t,r)=>{!function(){"use strict";var t,n=r(7096);t=[{field:"fileName",length:100},{field:"fileMode",length:8},{field:"uid",length:8},{field:"gid",length:8},{field:"fileSize",length:12},{field:"mtime",length:12},{field:"checksum",length:8},{field:"type",length:1},{field:"linkName",length:100},{field:"ustar",length:8},{field:"owner",length:32},{field:"group",length:32},{field:"majorNumber",length:8},{field:"minorNumber",length:8},{field:"filenamePrefix",length:155},{field:"padding",length:12}],e.exports.structure=t,e.exports.format=function(e,r){var i=n.clean(512),o=0;return t.forEach((function(t){var r,n,a=e[t.field]||"";for(r=0,n=a.length;r<n;r+=1)i[o]=a.charCodeAt(r),o+=1;o+=t.length-r})),"function"==typeof r?r(i,o):i}}()},1117:(e,t,r)=>{!function(){"use strict";var t,n=r(116),i=r(7096),o=512;function a(e){this.written=0,t=(e||20)*o,this.out=i.clean(t)}a.prototype.append=function(e,r,a,s){var c,f,u,d,l,h,p;if("string"==typeof r)r=i.stringToUint8(r);else if(r.constructor!==Uint8Array.prototype.constructor)throw"Invalid input type. You gave me: "+r.constructor.toString().match(/function\s*([$A-Za-z_][0-9A-Za-z_]*)\s*\(/)[1];return"function"==typeof a&&(s=a,a={}),u=(a=a||{}).mode||4095&parseInt("777",8),d=a.mtime||Math.floor(+new Date/1e3),l=a.uid||0,h=a.gid||0,c={fileName:e,fileMode:i.pad(u,7),uid:i.pad(l,7),gid:i.pad(h,7),fileSize:i.pad(r.length,11),mtime:i.pad(d,11),checksum:" ",type:"0",ustar:"ustar ",owner:a.owner||"",group:a.group||""},f=0,Object.keys(c).forEach((function(e){var t,r,n=c[e];for(t=0,r=n.length;t<r;t+=1)f+=n.charCodeAt(t)})),c.checksum=i.pad(f,6)+"\0 ",p=n.format(c),this.out.set(p,this.written),this.written+=p.length,this.written+r.length>this.out.length&&(this.out=i.extend(this.out,this.written,r.length,t)),this.out.set(r,this.written),this.written+=r.length+(o-(r.length%o||o)),this.out.length-this.written<1024&&(this.out=i.extend(this.out,this.written,1024,t)),"function"==typeof s&&s(this.out),this.out},a.prototype.clear=function(){this.written=0,this.out=i.clean(t)},a.utils=i,a.stringToUint8=i.stringToUint8,a.uint8ToBase64=i.uint8ToBase64,a.base64ToUint8=i.base64ToUint8,e.exports=a}()},7096:e=>{!function(){"use strict";var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function r(e){var t,r=new Uint8Array(e);for(t=0;t<e;t+=1)r[t]=0;return r}e.exports.clean=r,e.exports.pad=function(e,t,r){return e=e.toString(r||8),"000000000000".substr(e.length+12-t)+e},e.exports.extend=function(e,t,n,i){var o=r((parseInt((t+n)/i)+1)*i);return o.set(e),o},e.exports.stringToUint8=function(e,t,n){var i,o;for(t=t||r(e.length),n=n||0,i=0,o=e.length;i<o;i+=1)t[n]=e.charCodeAt(i),n+=1;return t},e.exports.uint8ToBase64=function(e){var r,n,i,o,a=e.length%3,s="";for(r=0,i=e.length-a;r<i;r+=3)n=(e[r]<<16)+(e[r+1]<<8)+e[r+2],s+=t[(o=n)>>18&63]+t[o>>12&63]+t[o>>6&63]+t[63&o];switch(s.length%4){case 1:s+="=";break;case 2:s+="=="}return s},e.exports.base64ToUint8=function(e){for(var n,i=e.match(/^([^=]+)/)[1],o=e.match(/(=*)$/)[1].length,a=0,s=i.length,c=0,f=r(.75*i.length+o);a<s;)n=0,n|=t.indexOf(i.charAt(a)||"A")<<18,a+=1,n|=t.indexOf(i.charAt(a)||"A")<<12,a+=1,n|=t.indexOf(i.charAt(a)||"A")<<6,a+=1,n|=t.indexOf(i.charAt(a)||"A"),a+=1,f[c]=n>>16&255,f[c+=1]=n>>8&255,f[c+=1]=255&n,c+=1;return f}}()},6601:()=>{},9214:()=>{},6787:()=>{},3775:(e,t,r)=>{"use strict";r.r(t),r.d(t,{coerce:()=>s,empty:()=>n,equals:()=>a,fromHex:()=>o,fromString:()=>f,isBinary:()=>c,toHex:()=>i,toString:()=>u});const n=new Uint8Array(0),i=e=>e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),""),o=e=>{const t=e.match(/../g);return t?new Uint8Array(t.map((e=>parseInt(e,16)))):n},a=(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 new Error("Unknown type, must be binary type")},c=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),f=e=>(new TextEncoder).encode(e),u=e=>(new TextDecoder).decode(e)},8335:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Digest:()=>c,create:()=>o,decode:()=>a,equals:()=>s});var n=r(3775),i=r(5712);const o=(e,t)=>{const r=t.byteLength,n=i.encodingLength(e),o=n+i.encodingLength(r),a=new Uint8Array(o+r);return i.encodeTo(e,a,0),i.encodeTo(r,a,n),a.set(t,o),new c(e,r,t,a)},a=e=>{const t=(0,n.coerce)(e),[r,o]=i.decode(t),[a,s]=i.decode(t.subarray(o)),f=t.subarray(o+s);if(f.byteLength!==a)throw new Error("Incorrect length");return new c(r,a,f,t)},s=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&(0,n.equals)(e.bytes,t.bytes);class c{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}},5151:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CID:()=>g,bytes:()=>s,digest:()=>o,hasher:()=>n,varint:()=>i});var n={};r.r(n),r.d(n,{Hasher:()=>C,from:()=>I});var i=r(5712),o=r(8335);const a=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),a=o.charCodeAt(0);if(255!==r[a])throw new TypeError(o+" is ambiguous");r[a]=i}var s=e.length,c=e.charAt(0),f=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*f+1>>>0,a=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var d=0,l=o-1;(0!==u||d<i)&&-1!==l;l--,d++)u+=s*a[l]>>>0,a[l]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(n+(o-h)),b=n;h!==o;)p[b++]=a[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var a=(o-i)*u+1>>>0,f=new Uint8Array(a);i!==o;){for(var d=t[i],l=0,h=a-1;(0!==d||l<n)&&-1!==h;h--,l++)d+=256*f[h]>>>0,f[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");n=l,i++}for(var p=a-n;p!==a&&0===f[p];)p++;for(var b=c.repeat(r);p<a;++p)b+=e.charAt(f[p]);return b},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw new Error(`Non-${t} character`)}}};var s=r(3775);class c{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class f{constructor(e,t,r){this.name=e,this.prefix=t,this.baseDecode=r}decode(e){if("string"==typeof e){if(e[0]===this.prefix)return this.baseDecode(e.slice(1));throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}throw Error("Can only multibase decode strings")}or(e){return d(this,e)}}class u{constructor(e){this.decoders=e}or(e){return d(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const d=(e,t)=>new u({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class l{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)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const h=({name:e,prefix:t,encode:r,decode:n})=>new l(e,t,r,n),p=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=a(r,t);return h({prefix:e,name:t,encode:n,decode:e=>(0,s.coerce)(i(e))})},b=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>h({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",a=0,s=0;for(let c=0;c<e.length;++c)for(s=s<<8|e[c],a+=8;a>r;)a-=r,o+=t[i&s>>a];if(a&&(o+=t[i&s<<r-a]),n)for(;o.length*r&7;)o+="=";return o})(e,n,r),decode:t=>((e,t,r,n)=>{const i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let o=e.length;for(;"="===e[o-1];)--o;const a=new Uint8Array(o*r/8|0);let s=0,c=0,f=0;for(let u=0;u<o;++u){const t=i[e[u]];if(void 0===t)throw new SyntaxError(`Non-${n} character`);c=c<<r|t,s+=r,s>=8&&(s-=8,a[f++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,n,r,e)}),m=p({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),y=(p({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),b({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}));b({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),b({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),b({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),b({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),b({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),b({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),b({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),b({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});class g{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:T,byteLength:T,code:R,version:R,multihash:R,bytes:R,_baseCache:T,asCID:T})}toV0(){if(0===this.version)return this;{const{code:e,multihash:t}=this;if(e!==S)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==E)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return g.createV0(t)}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=o.create(e,t);return g.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&o.equals(this.multihash,e.multihash)}toString(e){const{bytes:t,version:r,_baseCache:n}=this;return 0===r?v(t,n,e||m.encoder):_(t,n,e||y.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 x(/^0\.0/,O),!(!e||!e[A]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof g)return e;if(null!=e&&e.asCID===e){const{version:t,code:r,multihash:n,bytes:i}=e;return new g(t,r,n,i||M(t,r,n.bytes))}if(null!=e&&!0===e[A]){const{version:t,multihash:r,code:n}=e,i=o.decode(r);return g.create(t,n,i)}return null}static create(e,t,r){if("number"!=typeof t)throw new Error("String codecs are no longer supported");switch(e){case 0:if(t!==S)throw new Error(`Version 0 CID must use dag-pb (code: ${S}) block encoding`);return new g(e,t,r,r.bytes);case 1:{const n=M(e,t,r.bytes);return new g(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return g.create(0,S,e)}static createV1(e,t){return g.create(1,e,t)}static decode(e){const[t,r]=g.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=g.inspectBytes(e),r=t.size-t.multihashSize,n=(0,s.coerce)(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=n.subarray(t.multihashSize-t.digestSize),a=new o.Digest(t.multihashCode,t.digestSize,i,n);return[0===t.version?g.createV0(a):g.createV1(t.codec,a),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,n]=i.decode(e.subarray(t));return t+=n,r};let n=r(),o=S;if(18===n?(n=0,t=0):1===n&&(o=r()),0!==n&&1!==n)throw new RangeError(`Invalid CID version ${n}`);const a=t,s=r(),c=r(),f=t+c;return{version:n,codec:o,multihashCode:s,digestSize:c,multihashSize:f-a,size:f}}static parse(e,t){const[r,n]=w(e,t),i=g.decode(n);return i._baseCache.set(r,e),i}}const w=(e,t)=>{switch(e[0]){case"Q":{const r=t||m;return[m.prefix,r.decode(`${m.prefix}${e}`)]}case m.prefix:{const r=t||m;return[m.prefix,r.decode(e)]}case y.prefix:{const r=t||y;return[y.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)]}},v=(e,t,r)=>{const{prefix:n}=r;if(n!==m.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=t.get(n);if(null==i){const i=r.encode(e).slice(1);return t.set(n,i),i}return i},_=(e,t,r)=>{const{prefix:n}=r,i=t.get(n);if(null==i){const i=r.encode(e);return t.set(n,i),i}return i},S=112,E=18,M=(e,t,r)=>{const n=i.encodingLength(e),o=n+i.encodingLength(t),a=new Uint8Array(o+r.byteLength);return i.encodeTo(e,a,0),i.encodeTo(t,a,n),a.set(r,o),a},A=Symbol.for("@ipld/js-cid/CID"),R={writable:!1,configurable:!1,enumerable:!0},T={writable:!1,enumerable:!1,configurable:!1},x=(e,t)=>{if(!e.test("0.0.0-dev"))throw new Error(t);console.warn(t)},O="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",I=({name:e,code:t,encode:r})=>new C(e,t,r);class C{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?o.create(this.code,t):t.then((e=>o.create(this.code,e)))}throw Error("Unknown type, must be binary type")}}},5712:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>m,encodeTo:()=>y,encodingLength:()=>g});var n=function e(t,r,n){r=r||[];var o=n=n||0;for(;t>=i;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-o+1,r},i=Math.pow(2,31);var o=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=a-r,i};var a=Math.pow(2,7),s=Math.pow(2,14),c=Math.pow(2,21),f=Math.pow(2,28),u=Math.pow(2,35),d=Math.pow(2,42),l=Math.pow(2,49),h=Math.pow(2,56),p=Math.pow(2,63);const b={encode:n,decode:o,encodingLength:function(e){return e<a?1:e<s?2:e<c?3:e<f?4:e<u?5:e<d?6:e<l?7:e<h?8:e<p?9:10}},m=e=>[b.decode(e),b.decode.bytes],y=(e,t,r=0)=>(b.encode(e,t,r),t),g=e=>b.encodingLength(e)},8597:e=>{"use strict";e.exports={i8:"6.5.4"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";r.r(n),r.d(n,{ADDRESS_HEX_LENGTH:()=>U,BATCH_ID_HEX_LENGTH:()=>V,BRANCHES:()=>z,Bee:()=>Bo,BeeArgumentError:()=>p,BeeDebug:()=>ea,BeeError:()=>h,BeeModes:()=>$,BeeResponseError:()=>b,CHUNK_SIZE:()=>D,ENCRYPTED_REFERENCE_BYTES_LENGTH:()=>Z,ENCRYPTED_REFERENCE_HEX_LENGTH:()=>X,FEED_INDEX_HEX_LENGTH:()=>te,PSS_TARGET_HEX_LENGTH_MAX:()=>W,PUBKEY_HEX_LENGTH:()=>H,REFERENCE_BYTES_LENGTH:()=>J,REFERENCE_HEX_LENGTH:()=>G,SECTION_SIZE:()=>B,SIGNATURE_BYTES_LENGTH:()=>oe,SIGNATURE_HEX_LENGTH:()=>ie,SPAN_SIZE:()=>L,STAMPS_DEPTH_MAX:()=>K,STAMPS_DEPTH_MIN:()=>Y,SUPPORTED_BEE_VERSION:()=>Jo,SUPPORTED_BEE_VERSION_EXACT:()=>Vo,TAGS_LIMIT_MAX:()=>ee,TAGS_LIMIT_MIN:()=>Q,TOPIC_BYTES_LENGTH:()=>re,TOPIC_HEX_LENGTH:()=>ne,Utils:()=>o});var e={};r.r(e),r.d(e,{hm:()=>S,yx:()=>E,ci:()=>g,nr:()=>y,I4:()=>w,A7:()=>v,Pn:()=>m});var t={};r.r(t),r.d(t,{XB:()=>R,eq:()=>x,mA:()=>O,yK:()=>C,tI:()=>I,Gt:()=>A,_t:()=>M,up:()=>T,k3:()=>P,_z:()=>k});var i={};r.r(i),r.d(i,{OS:()=>to,V4:()=>eo,cX:()=>Ki,c4:()=>Zi,iA:()=>ro,LL:()=>Yi,XA:()=>Qi});var o={};r.r(o),r.d(o,{Bytes:()=>t.Bytes,EthAddress:()=>i.EthAddress,FlexBytes:()=>t.FlexBytes,HexString:()=>e.HexString,PrefixedHexString:()=>e.PrefixedHexString,assertBytes:()=>R,assertFlexBytes:()=>x,assertHexString:()=>S,assertPrefixedHexString:()=>E,bytesAtOffset:()=>O,bytesEqual:()=>C,bytesToHex:()=>g,ethToSwarmAddress:()=>to,flexBytesAtOffset:()=>I,fromLittleEndian:()=>eo,getAmountForTtl:()=>fa,getCollectionSize:()=>So,getDepthForCapacity:()=>ua,getFolderSize:()=>Fo,getStampCostInBzz:()=>sa,getStampCostInPlur:()=>aa,getStampEffectiveBytes:()=>oa,getStampMaximumCapacityBytes:()=>na,getStampTtlSeconds:()=>ca,getStampUsage:()=>ra,hexToBytes:()=>y,intToHex:()=>w,isBytes:()=>M,isFlexBytes:()=>T,isHexEthAddress:()=>Ki,isHexString:()=>v,isNodeReadable:()=>Jn,isReadable:()=>Gn,isReadableStream:()=>Xn,keccak256Hash:()=>j,makeEthAddress:()=>Zi,makeEthereumWalletSigner:()=>ro,makeHexEthAddress:()=>Yi,makeHexString:()=>m,makeMaxTarget:()=>ta,normalizeToReadableStream:()=>Qn,readableNodeToWeb:()=>Zn,readableWebToNode:()=>Kn,toLittleEndian:()=>Qi});var a=r(6174),s=r(4615);s.tk,s.Gi,s.Ct,s.L0,s.uI;const c=s.WP,f=(s.tl,s.jT,s.kk,s.eI),u=s.xP;s.Yk,s.Fi,s.OW;var d=r(236),l=r.n(d);class h extends Error{constructor(e){super(e)}}class p extends h{constructor(e,t){super(e),this.value=t}}class b extends h{constructor(e,t,r,n,i,o,a){super(e),this.code=t,this.axiosStatus=r,this.status=n,this.config=i,this.request=o,this.response=a}}function m(e,t){if("number"==typeof e)return w(e,t);if(e instanceof Uint8Array)return g(e,t);if("string"==typeof e){if(_(e)){const r=e.slice(2);if(t&&r.length!==t)throw new TypeError(`Length mismatch for valid hex string. Expecting length ${t}: ${r}`);return r}return S(e,t),e}throw new TypeError("Not HexString compatible type!")}function y(e){S(e);const t=P(e.length/2);for(let r=0;r<t.length;r++){const n=e.substr(2*r,2);t[r]=parseInt(n,16)}return t}function g(e,t){const r=Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("");if(t&&r.length!==t)throw new TypeError(`Resulting HexString does not have expected length ${t}: ${r}`);return r}function w(e,t){if(!Number.isInteger(e))throw new TypeError("the value provided is not integer");if(e>Number.MAX_SAFE_INTEGER)throw new TypeError("the value provided exceeds safe integer");if(e<0)throw new TypeError("the value provided is a negative integer");const r=e.toString(16);if(t&&r.length!==t)throw new TypeError(`Resulting HexString does not have expected length ${t}: ${r}`);return r}function v(e,t){return"string"==typeof e&&/^[0-9a-f]+$/i.test(e)&&(!t||e.length===t)}function _(e){return"string"==typeof e&&/^0x[0-9a-f]+$/i.test(e)}function S(e,t,r="value"){if(!v(e,t)){if(_(e))throw new TypeError(`${r} not valid non prefixed hex string (has 0x prefix): ${e}`);throw new TypeError(`${r} not valid hex string${t?` of length ${t}`:""}: ${e}`)}}function E(e,t="value"){if(!_(e))throw new TypeError(`${t} not valid prefixed hex string: ${e}`)}function M(e,t){return e instanceof Uint8Array&&e.length===t}function A(e,t,r){if(!(e instanceof Uint8Array))throw new TypeError("Data has to an Uint8Array!");return M(e.slice(t,t+r),r)}function R(e,t){if(!M(e,t))throw new TypeError(`Parameter is not valid Bytes of length: ${t} !== ${e.length}`)}function T(e,t,r){return e instanceof Uint8Array&&e.length>=t&&e.length<=r}function x(e,t,r){if(!T(e,t,r))throw new TypeError(`Parameter is not valid FlexBytes of min: ${t}, max: ${r}, length: ${e.length}`)}function O(e,t,r){const n=e.slice(t,t+r);return R(n,r),n}function I(e,t,r,n){return e.slice(t)}function C(e,t){return e.length===t.length&&e.every(((e,r)=>e===t[r]))}function P(e){return new Uint8Array(e)}function k(e){return Object.assign(e,{text:()=>new TextDecoder("utf-8").decode(e),json:()=>JSON.parse(new TextDecoder("utf-8").decode(e)),hex:()=>g(e)})}var q=r(8086),N=r.n(q);const{keccak256:F}=N();function j(...e){const t=F.create();return e.forEach((e=>t.update(e))),Uint8Array.from(t.digest())}let $;!function(e){e.FULL="full",e.LIGHT="light",e.ULTRA_LIGHT="ultra-light",e.DEV="dev"}($||($={}));const L=8,B=32,z=128,D=B*z,U=64,W=6,H=66,V=64,G=64,X=128,J=32,Z=64,Y=17,K=255,Q=1,ee=1e3,te=16,re=32,ne=64,ie=130,oe=65;function ae(e){if("function"==typeof File)return e instanceof File;const t=e;return"object"==typeof t&&"string"==typeof t.name&&("function"==typeof t.stream||"function"==typeof t.arrayBuffer)}async function se(e){return e.arrayBuffer?e.arrayBuffer():new Promise((t=>{const r=new FileReader;r.onload=()=>t(r.result),r.readAsArrayBuffer(e)}))}var ce=r(6787);const fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`;function ue(){}function de(e){return"object"==typeof e&&null!==e||"function"==typeof e}const le=ue;function he(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}const pe=Promise,be=Promise.prototype.then,me=Promise.resolve.bind(pe),ye=Promise.reject.bind(pe);function ge(e){return new pe(e)}function we(e){return me(e)}function ve(e){return ye(e)}function _e(e,t,r){return be.call(e,t,r)}function Se(e,t,r){_e(_e(e,t,r),void 0,le)}function Ee(e,t){Se(e,t)}function Me(e,t){Se(e,void 0,t)}function Ae(e,t,r){return _e(e,t,r)}function Re(e){_e(e,void 0,le)}let Te=e=>{if("function"==typeof queueMicrotask)Te=queueMicrotask;else{const e=we(void 0);Te=t=>_e(e,t)}return Te(e)};function xe(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function Oe(e,t,r){try{return we(xe(e,t,r))}catch(e){return ve(e)}}class Ie{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let n=r+1;const i=e._elements,o=i[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,o}forEach(e){let t=this._cursor,r=this._front,n=r._elements;for(;!(t===n.length&&void 0===r._next||t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length));)e(n[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}const Ce=fe("[[AbortSteps]]"),Pe=fe("[[ErrorSteps]]"),ke=fe("[[CancelSteps]]"),qe=fe("[[PullSteps]]"),Ne=fe("[[ReleaseSteps]]");function Fe(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?Be(e):"closed"===t._state?function(e){Be(e),Ue(e)}(e):ze(e,t._storedError)}function je(e,t){return un(e._ownerReadableStream,t)}function $e(e){const t=e._ownerReadableStream;"readable"===t._state?De(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){ze(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),t._readableStreamController[Ne](),t._reader=void 0,e._ownerReadableStream=void 0}function Le(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function Be(e){e._closedPromise=ge(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function ze(e,t){Be(e),De(e,t)}function De(e,t){void 0!==e._closedPromise_reject&&(Re(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function Ue(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const We=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},He=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Ve(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError(`${t} is not an object.`);var r}function Ge(e,t){if("function"!=typeof e)throw new TypeError(`${t} is not a function.`)}function Xe(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(`${t} is not an object.`)}function Je(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function Ze(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function Ye(e){return Number(e)}function Ke(e){return 0===e?0:e}function Qe(e,t){const r=Number.MAX_SAFE_INTEGER;let n=Number(e);if(n=Ke(n),!We(n))throw new TypeError(`${t} is not a finite number`);if(n=function(e){return Ke(He(e))}(n),n<0||n>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return We(n)&&0!==n?n:0}function et(e){if(!de(e))return!1;if("function"!=typeof e.getReader)return!1;try{return"boolean"==typeof e.locked}catch(e){return!1}}function tt(e){if(!de(e))return!1;if("function"!=typeof e.getWriter)return!1;try{return"boolean"==typeof e.locked}catch(e){return!1}}function rt(e,t){if(!cn(e))throw new TypeError(`${t} is not a ReadableStream.`)}function nt(e,t){e._reader._readRequests.push(t)}function it(e,t,r){const n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function ot(e){return e._reader._readRequests.length}function at(e){const t=e._reader;return void 0!==t&&!!ct(t)}class st{constructor(e){if(Je(e,1,"ReadableStreamDefaultReader"),rt(e,"First parameter"),fn(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");Fe(this,e),this._readRequests=new Ie}get closed(){return ct(this)?this._closedPromise:ve(ut("closed"))}cancel(e){return ct(this)?void 0===this._ownerReadableStream?ve(Le("cancel")):je(this,e):ve(ut("cancel"))}read(){if(!ct(this))return ve(ut("read"));if(void 0===this._ownerReadableStream)return ve(Le("read from"));let e,t;const r=ge(((r,n)=>{e=r,t=n}));return function(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[qe](t)}(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!ct(this))throw ut("releaseLock");void 0!==this._ownerReadableStream&&function(e){$e(e);ft(e,new TypeError("Reader was released"))}(this)}}function ct(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof st}function ft(e,t){const r=e._readRequests;e._readRequests=new Ie,r.forEach((e=>{e._errorSteps(t)}))}function ut(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}Object.defineProperties(st.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),he(st.prototype.cancel,"cancel"),he(st.prototype.read,"read"),he(st.prototype.releaseLock,"releaseLock"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(st.prototype,fe.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});class dt{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?Ae(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise?Ae(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;return void 0===e?ve(Le("iterate")):_e(e.read(),(e=>{var t;return this._ongoingPromise=void 0,e.done&&(this._isFinished=!0,null===(t=this._reader)||void 0===t||t.releaseLock(),this._reader=void 0),e}),(e=>{var t;throw this._ongoingPromise=void 0,this._isFinished=!0,null===(t=this._reader)||void 0===t||t.releaseLock(),this._reader=void 0,e}))}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(void 0===t)return ve(Le("finish iterating"));if(this._reader=void 0,!this._preventCancel){const r=t.cancel(e);return t.releaseLock(),Ae(r,(()=>({value:e,done:!0})))}return t.releaseLock(),we({value:e,done:!0})}}const lt={next(){return ht(this)?this._asyncIteratorImpl.next():ve(pt("next"))},return(e){return ht(this)?this._asyncIteratorImpl.return(e):ve(pt("return"))}};function ht(e){if(!de(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof dt}catch(e){return!1}}function pt(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}"symbol"==typeof fe.asyncIterator&&Object.defineProperty(lt,fe.asyncIterator,{value(){return this},writable:!0,configurable:!0});const bt=Number.isNaN||function(e){return e!=e};function mt(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function yt(e){const t=function(e,t,r){if(e.slice)return e.slice(t,r);const n=r-t,i=new ArrayBuffer(n);return mt(i,0,e,t,n),i}(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function gt(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function wt(e,t,r){if("number"!=typeof(n=r)||bt(n)||n<0||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var n;e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function vt(e){e._queue=new Ie,e._queueTotalSize=0}class _t{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Mt(this))throw Ut("view");return this._view}respond(e){if(!Mt(this))throw Ut("respond");if(Je(e,1,"respond"),e=Qe(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=r.buffer,jt(e,t)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Mt(this))throw Ut("respondWithNewView");if(Je(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");e.buffer,function(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const n=t.byteLength;r.buffer=t.buffer,jt(e,n)}(this._associatedReadableByteStreamController,e)}}Object.defineProperties(_t.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),he(_t.prototype.respond,"respond"),he(_t.prototype.respondWithNewView,"respondWithNewView"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(_t.prototype,fe.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class St{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!Et(this))throw Wt("byobRequest");return function(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(_t.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(n,e,r),e._byobRequest=n}return e._byobRequest}(this)}get desiredSize(){if(!Et(this))throw Wt("desiredSize");return Dt(this)}close(){if(!Et(this))throw Wt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);!function(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Bt(e,t),t}Lt(e),dn(t)}}(this)}enqueue(e){if(!Et(this))throw Wt("enqueue");if(Je(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);!function(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const n=t.buffer,i=t.byteOffset,o=t.byteLength,a=n;if(e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek();t.buffer,Nt(e),t.buffer=t.buffer,"none"===t.readerType&&Ct(e,t)}at(r)?(function(e){const t=e._controlledReadableByteStream._reader;for(;t._readRequests.length>0;){if(0===e._queueTotalSize)return;zt(e,t._readRequests.shift())}}(e),0===ot(r)?Ot(e,a,i,o):(e._pendingPullIntos.length>0&&$t(e),it(r,new Uint8Array(a,i,o),!1))):Gt(r)?(Ot(e,a,i,o),Ft(e)):Ot(e,a,i,o),At(e)}(this,e)}error(e){if(!Et(this))throw Wt("error");Bt(this,e)}[ke](e){Rt(this),vt(this);const t=this._cancelAlgorithm(e);return Lt(this),t}[qe](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0)return void zt(this,e);const r=this._autoAllocateChunkSize;if(void 0!==r){let n;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}const i={buffer:n,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}nt(t,e),At(this)}[Ne](){if(this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new Ie,this._pendingPullIntos.push(e)}}}function Et(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof St}function Mt(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof _t}function At(e){const t=function(e){const t=e._controlledReadableByteStream;return"readable"===t._state&&(!e._closeRequested&&(!!e._started&&(!!(at(t)&&ot(t)>0)||(!!(Gt(t)&&Vt(t)>0)||Dt(e)>0))))}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Se(e._pullAlgorithm(),(()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,At(e)),null)),(t=>(Bt(e,t),null)))))}function Rt(e){Nt(e),e._pendingPullIntos=new Ie}function Tt(e,t){let r=!1;"closed"===e._state&&(r=!0);const n=xt(t);"default"===t.readerType?it(e,n,r):function(e,t,r){const n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function xt(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Ot(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function It(e,t,r,n){let i;try{i=t.slice(r,r+n)}catch(t){throw Bt(e,t),t}Ot(e,i,0,n)}function Ct(e,t){t.bytesFilled>0&&It(e,t.buffer,t.byteOffset,t.bytesFilled),$t(e)}function Pt(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+i,a=o-o%r;let s=i,c=!1;a>n&&(s=a-t.bytesFilled,c=!0);const f=e._queue;for(;s>0;){const r=f.peek(),n=Math.min(s,r.byteLength),i=t.byteOffset+t.bytesFilled;mt(t.buffer,i,r.buffer,r.byteOffset,n),r.byteLength===n?f.shift():(r.byteOffset+=n,r.byteLength-=n),e._queueTotalSize-=n,kt(e,n,t),s-=n}return c}function kt(e,t,r){r.bytesFilled+=t}function qt(e){0===e._queueTotalSize&&e._closeRequested?(Lt(e),dn(e._controlledReadableByteStream)):At(e)}function Nt(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function Ft(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos.peek();Pt(e,t)&&($t(e),Tt(e._controlledReadableByteStream,t))}}function jt(e,t){const r=e._pendingPullIntos.peek();Nt(e),"closed"===e._controlledReadableByteStream._state?function(e,t){"none"===t.readerType&&$t(e);const r=e._controlledReadableByteStream;if(Gt(r))for(;Vt(r)>0;)Tt(r,$t(e))}(e,r):function(e,t,r){if(kt(0,t,r),"none"===r.readerType)return Ct(e,r),void Ft(e);if(r.bytesFilled<r.elementSize)return;$t(e);const n=r.bytesFilled%r.elementSize;if(n>0){const t=r.byteOffset+r.bytesFilled;It(e,r.buffer,t-n,n)}r.bytesFilled-=n,Tt(e._controlledReadableByteStream,r),Ft(e)}(e,t,r),At(e)}function $t(e){return e._pendingPullIntos.shift()}function Lt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Bt(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(Rt(e),vt(e),Lt(e),ln(r,t))}function zt(e,t){const r=e._queue.shift();e._queueTotalSize-=r.byteLength,qt(e);const n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n)}function Dt(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Ut(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Wt(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function Ht(e,t){e._reader._readIntoRequests.push(t)}function Vt(e){return e._reader._readIntoRequests.length}function Gt(e){const t=e._reader;return void 0!==t&&!!Jt(t)}Object.defineProperties(St.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),he(St.prototype.close,"close"),he(St.prototype.enqueue,"enqueue"),he(St.prototype.error,"error"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(St.prototype,fe.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class Xt{constructor(e){if(Je(e,1,"ReadableStreamBYOBReader"),rt(e,"First parameter"),fn(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!Et(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");Fe(this,e),this._readIntoRequests=new Ie}get closed(){return Jt(this)?this._closedPromise:ve(Yt("closed"))}cancel(e){return Jt(this)?void 0===this._ownerReadableStream?ve(Le("cancel")):je(this,e):ve(Yt("cancel"))}read(e){if(!Jt(this))return ve(Yt("read"));if(!ArrayBuffer.isView(e))return ve(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return ve(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return ve(new TypeError("view's buffer must have non-zero byteLength"));if(e.buffer,void 0===this._ownerReadableStream)return ve(Le("read from"));let t,r;const n=ge(((e,n)=>{t=e,r=n}));return function(e,t,r){const n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const o=t.constructor,a=t.buffer,s={buffer:a,bufferByteLength:a.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:o,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(s),void Ht(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(Pt(e,s)){const t=xt(s);return qt(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return Bt(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(s),Ht(n,r),At(e)}else{const e=new o(s.buffer,s.byteOffset,0);r._closeSteps(e)}}(n._readableStreamController,t,r)}(this,e,{_chunkSteps:e=>t({value:e,done:!1}),_closeSteps:e=>t({value:e,done:!0}),_errorSteps:e=>r(e)}),n}releaseLock(){if(!Jt(this))throw Yt("releaseLock");void 0!==this._ownerReadableStream&&function(e){$e(e);Zt(e,new TypeError("Reader was released"))}(this)}}function Jt(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof Xt}function Zt(e,t){const r=e._readIntoRequests;e._readIntoRequests=new Ie,r.forEach((e=>{e._errorSteps(t)}))}function Yt(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Kt(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(bt(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function Qt(e){const{size:t}=e;return t||(()=>1)}function er(e,t){Ve(e,t);const r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:Ye(r),size:void 0===n?void 0:tr(n,`${t} has member 'size' that`)}}function tr(e,t){return Ge(e,t),t=>Ye(e(t))}function rr(e,t,r){return Ge(e,r),r=>Oe(e,t,[r])}function nr(e,t,r){return Ge(e,r),()=>Oe(e,t,[])}function ir(e,t,r){return Ge(e,r),r=>xe(e,t,[r])}function or(e,t,r){return Ge(e,r),(r,n)=>Oe(e,t,[r,n])}Object.defineProperties(Xt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),he(Xt.prototype.cancel,"cancel"),he(Xt.prototype.read,"read"),he(Xt.prototype.releaseLock,"releaseLock"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(Xt.prototype,fe.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});const ar="function"==typeof AbortController;class sr{constructor(e={},t={}){void 0===e?e=null:Xe(e,"First parameter");const r=er(t,"Second parameter"),n=function(e,t){Ve(e,t);const r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,o=null==e?void 0:e.type,a=null==e?void 0:e.write;return{abort:void 0===r?void 0:rr(r,e,`${t} has member 'abort' that`),close:void 0===n?void 0:nr(n,e,`${t} has member 'close' that`),start:void 0===i?void 0:ir(i,e,`${t} has member 'start' that`),write:void 0===a?void 0:or(a,e,`${t} has member 'write' that`),type:o}}(e,"First parameter");var i;if((i=this)._state="writable",i._storedError=void 0,i._writer=void 0,i._writableStreamController=void 0,i._writeRequests=new Ie,i._inFlightWriteRequest=void 0,i._closeRequest=void 0,i._inFlightCloseRequest=void 0,i._pendingAbortRequest=void 0,i._backpressure=!1,void 0!==n.type)throw new RangeError("Invalid type is specified");const o=Qt(r);!function(e,t,r,n){const i=Object.create(Sr.prototype);let o,a,s,c;o=void 0!==t.start?()=>t.start(i):()=>{},a=void 0!==t.write?e=>t.write(e,i):()=>we(void 0),s=void 0!==t.close?()=>t.close():()=>we(void 0),c=void 0!==t.abort?e=>t.abort(e):()=>we(void 0),function(e,t,r,n,i,o,a,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,vt(t),t._abortReason=void 0,t._abortController=function(){if(ar)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=o;const c=xr(t);yr(e,c);Se(we(r()),(()=>(t._started=!0,Rr(t),null)),(r=>(t._started=!0,lr(e,r),null)))}(e,i,o,a,s,c,r,n)}(this,n,Kt(r,1),o)}get locked(){if(!cr(this))throw Ir("locked");return fr(this)}abort(e){return cr(this)?fr(this)?ve(new TypeError("Cannot abort a stream that already has a writer")):ur(this,e):ve(Ir("abort"))}close(){return cr(this)?fr(this)?ve(new TypeError("Cannot close a stream that already has a writer")):br(this)?ve(new TypeError("Cannot close an already-closing stream")):dr(this):ve(Ir("close"))}getWriter(){if(!cr(this))throw Ir("getWriter");return new gr(this)}}function cr(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof sr}function fr(e){return void 0!==e._writer}function ur(e,t){var r;if("closed"===e._state||"errored"===e._state)return we(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort(t);const n=e._state;if("closed"===n||"errored"===n)return we(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let i=!1;"erroring"===n&&(i=!0,t=void 0);const o=ge(((r,n)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return e._pendingAbortRequest._promise=o,i||hr(e,t),o}function dr(e){const t=e._state;if("closed"===t||"errored"===t)return ve(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=ge(((t,r)=>{const n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;var i;return void 0!==n&&e._backpressure&&"writable"===t&&Dr(n),wt(i=e._writableStreamController,_r,0),Rr(i),r}function lr(e,t){"writable"!==e._state?pr(e):hr(e,t)}function hr(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;void 0!==n&&vr(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&pr(e)}function pr(e){e._state="errored",e._writableStreamController[Pe]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new Ie,void 0===e._pendingAbortRequest)return void mr(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void mr(e);Se(e._writableStreamController[Ce](r._reason),(()=>(r._resolve(),mr(e),null)),(t=>(r._reject(t),mr(e),null)))}function br(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function mr(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&Fr(t,e._storedError)}function yr(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){$r(e)}(r):Dr(r)),e._backpressure=t}Object.defineProperties(sr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),he(sr.prototype.abort,"abort"),he(sr.prototype.close,"close"),he(sr.prototype.getWriter,"getWriter"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(sr.prototype,fe.toStringTag,{value:"WritableStream",configurable:!0});class gr{constructor(e){if(Je(e,1,"WritableStreamDefaultWriter"),function(e,t){if(!cr(e))throw new TypeError("First parameter is not a WritableStream.")}(e),fr(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!br(e)&&e._backpressure?$r(this):Br(this),qr(this);else if("erroring"===t)Lr(this,e._storedError),qr(this);else if("closed"===t)Br(this),qr(this),jr(this);else{const t=e._storedError;Lr(this,t),Nr(this,t)}}get closed(){return wr(this)?this._closedPromise:ve(Pr("closed"))}get desiredSize(){if(!wr(this))throw Pr("desiredSize");if(void 0===this._ownerWritableStream)throw kr("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Ar(t._writableStreamController)}(this)}get ready(){return wr(this)?this._readyPromise:ve(Pr("ready"))}abort(e){return wr(this)?void 0===this._ownerWritableStream?ve(kr("abort")):function(e,t){return ur(e._ownerWritableStream,t)}(this,e):ve(Pr("abort"))}close(){if(!wr(this))return ve(Pr("close"));const e=this._ownerWritableStream;return void 0===e?ve(kr("close")):br(e)?ve(new TypeError("Cannot close an already-closing stream")):dr(this._ownerWritableStream)}releaseLock(){if(!wr(this))throw Pr("releaseLock");void 0!==this._ownerWritableStream&&function(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");vr(e,r),function(e,t){"pending"===e._closedPromiseState?Fr(e,t):function(e,t){Nr(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}(this)}write(e){return wr(this)?void 0===this._ownerWritableStream?ve(kr("write to")):function(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return Tr(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return ve(kr("write to"));const o=r._state;if("errored"===o)return ve(r._storedError);if(br(r)||"closed"===o)return ve(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return ve(r._storedError);const a=function(e){return ge(((t,r)=>{const n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{wt(e,t,r)}catch(t){return void Tr(e,t)}const n=e._controlledWritableStream;br(n)||"writable"!==n._state||yr(n,xr(e)),Rr(e)}(n,t,i),a}(this,e):ve(Pr("write"))}}function wr(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof gr}function vr(e,t){"pending"===e._readyPromiseState?zr(e,t):function(e,t){Lr(e,t)}(e,t)}Object.defineProperties(gr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),he(gr.prototype.abort,"abort"),he(gr.prototype.close,"close"),he(gr.prototype.releaseLock,"releaseLock"),he(gr.prototype.write,"write"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(gr.prototype,fe.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const _r={};class Sr{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Er(this))throw Cr("abortReason");return this._abortReason}get signal(){if(!Er(this))throw Cr("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(e){if(!Er(this))throw Cr("error");"writable"===this._controlledWritableStream._state&&Or(this,e)}[Ce](e){const t=this._abortAlgorithm(e);return Mr(this),t}[Pe](){vt(this)}}function Er(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Sr}function Mr(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ar(e){return e._strategyHWM-e._queueTotalSize}function Rr(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void pr(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===_r?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),gt(e);const r=e._closeAlgorithm();Mr(e),Se(r,(()=>(function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&jr(t)}(t),null)),(e=>(function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),lr(e,t)}(t,e),null)))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r),Se(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(gt(e),!br(r)&&"writable"===t){const t=xr(e);yr(r,t)}return Rr(e),null}),(t=>("writable"===r._state&&Mr(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,lr(e,t)}(r,t),null)))}(e,r)}function Tr(e,t){"writable"===e._controlledWritableStream._state&&Or(e,t)}function xr(e){return Ar(e)<=0}function Or(e,t){const r=e._controlledWritableStream;Mr(e),hr(r,t)}function Ir(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function Cr(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function Pr(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function kr(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function qr(e){e._closedPromise=ge(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function Nr(e,t){qr(e),Fr(e,t)}function Fr(e,t){void 0!==e._closedPromise_reject&&(Re(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function jr(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function $r(e){e._readyPromise=ge(((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function Lr(e,t){$r(e),zr(e,t)}function Br(e){$r(e),Dr(e)}function zr(e,t){void 0!==e._readyPromise_reject&&(Re(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function Dr(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(Sr.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof fe.toStringTag&&Object.defineProperty(Sr.prototype,fe.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const Ur="undefined"!=typeof DOMException?DOMException:void 0,Wr=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(Ur)?Ur:function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}();function Hr(e,t,r,n,i,o){const a=e.getReader(),s=t.getWriter();cn(e)&&(e._disturbed=!0);let c,f,u,d=!1,l=!1,h="readable",p="writable",b=!1,m=!1;const y=ge((e=>{u=e}));let g=Promise.resolve(void 0);return ge(((w,v)=>{let _;function S(){if(d)return;const e=ge(((e,t)=>{!function r(n){n?e():_e(d?we(!0):_e(s.ready,(()=>_e(a.read(),(e=>!!e.done||(g=s.write(e.value),Re(g),!1))))),r,t)}(!1)}));Re(e)}function E(){return h="closed",r?T():R((()=>(cr(t)&&(b=br(t),p=t._state),b||"closed"===p?we(void 0):"erroring"===p||"errored"===p?ve(f):(b=!0,s.close()))),!1,void 0),null}function M(e){return d||(h="errored",c=e,n?T(!0,e):R((()=>s.abort(e)),!0,e)),null}function A(e){return l||(p="errored",f=e,i?T(!0,e):R((()=>a.cancel(e)),!0,e)),null}if(void 0!==o&&(_=()=>{const e=void 0!==o.reason?o.reason:new Wr("Aborted","AbortError"),t=[];n||t.push((()=>"writable"===p?s.abort(e):we(void 0))),i||t.push((()=>"readable"===h?a.cancel(e):we(void 0))),R((()=>Promise.all(t.map((e=>e())))),!0,e)},o.aborted?_():o.addEventListener("abort",_)),cn(e)&&(h=e._state,c=e._storedError),cr(t)&&(p=t._state,f=t._storedError,b=br(t)),cn(e)&&cr(t)&&(m=!0,u()),"errored"===h)M(c);else if("erroring"===p||"errored"===p)A(f);else if("closed"===h)E();else if(b||"closed"===p){const e=new TypeError("the destination writable stream closed before all data could be piped to it");i?T(!0,e):R((()=>a.cancel(e)),!0,e)}function R(e,t,r){function n(){return"writable"!==p||b?i():Ee(function(){let e;return we(function t(){if(e!==g)return e=g,Ae(g,t,t)}())}(),i),null}function i(){return e?Se(e(),(()=>x(t,r)),(e=>x(!0,e))):x(t,r),null}d||(d=!0,m?n():Ee(y,n))}function T(e,t){R(void 0,e,t)}function x(e,t){return l=!0,s.releaseLock(),a.releaseLock(),void 0!==o&&o.removeEventListener("abort",_),e?v(t):w(void 0),null}d||(Se(a.closed,E,M),Se(s.closed,(function(){return l||(p="closed"),null}),A)),m?S():Te((()=>{m=!0,u(),S()}))}))}class Vr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Gr(this))throw Qr("desiredSize");return Yr(this)}close(){if(!Gr(this))throw Qr("close");if(!Kr(this))throw new TypeError("The stream is not in a state that permits close");!function(e){if(!Kr(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Jr(e),dn(t))}(this)}enqueue(e){if(!Gr(this))throw Qr("enqueue");if(!Kr(this))throw new TypeError("The stream is not in a state that permits enqueue");return function(e,t){if(!Kr(e))return;const r=e._controlledReadableStream;if(fn(r)&&ot(r)>0)it(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw Zr(e,t),t}try{wt(e,t,r)}catch(t){throw Zr(e,t),t}}Xr(e)}(this,e)}error(e){if(!Gr(this))throw Qr("error");Zr(this,e)}[ke](e){vt(this);const t=this._cancelAlgorithm(e);return Jr(this),t}[qe](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=gt(this);this._closeRequested&&0===this._queue.length?(Jr(this),dn(t)):Xr(this),e._chunkSteps(r)}else nt(t,e),Xr(this)}[Ne](){}}function Gr(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof Vr}function Xr(e){const t=function(e){const t=e._controlledReadableStream;return!!Kr(e)&&(!!e._started&&(!!(fn(t)&&ot(t)>0)||Yr(e)>0))}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Se(e._pullAlgorithm(),(()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Xr(e)),null)),(t=>(Zr(e,t),null)))))}function Jr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Zr(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(vt(e),Jr(e),ln(r,t))}function Yr(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Kr(e){return!e._closeRequested&&"readable"===e._controlledReadableStream._state}function Qr(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function en(e,t,r){return Ge(e,r),r=>Oe(e,t,[r])}function tn(e,t,r){return Ge(e,r),r=>Oe(e,t,[r])}function rn(e,t,r){return Ge(e,r),r=>xe(e,t,[r])}function nn(e,t){if("bytes"!=(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function on(e,t){if("byob"!=(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function an(e,t){Ve(e,t);const r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,o=null==e?void 0:e.signal;return void 0!==o&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(`${t} is not an AbortSignal.`)}(o,`${t} has member 'signal' that`),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(i),signal:o}}Object.defineProperties(Vr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),he(Vr.prototype.close,"close"),he(Vr.prototype.enqueue,"enqueue"),he(Vr.prototype.error,"error"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(Vr.prototype,fe.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class sn{constructor(e={},t={}){void 0===e?e=null:Xe(e,"First parameter");const r=er(t,"Second parameter"),n=function(e,t){Ve(e,t);const r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,o=null==r?void 0:r.pull,a=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:Qe(n,`${t} has member 'autoAllocateChunkSize' that`),cancel:void 0===i?void 0:en(i,r,`${t} has member 'cancel' that`),pull:void 0===o?void 0:tn(o,r,`${t} has member 'pull' that`),start:void 0===a?void 0:rn(a,r,`${t} has member 'start' that`),type:void 0===s?void 0:nn(s,`${t} has member 'type' that`)}}(e,"First parameter");var i;if((i=this)._state="readable",i._reader=void 0,i._storedError=void 0,i._disturbed=!1,"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){const n=Object.create(St.prototype);let i,o,a;i=void 0!==t.start?()=>t.start(n):()=>{},o=void 0!==t.pull?()=>t.pull(n):()=>we(void 0),a=void 0!==t.cancel?e=>t.cancel(e):()=>we(void 0);const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,n,i,o,a){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,vt(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=a,t._pendingPullIntos=new Ie,e._readableStreamController=t,Se(we(r()),(()=>(t._started=!0,At(t),null)),(e=>(Bt(t,e),null)))}(e,n,i,o,a,r,s)}(this,n,Kt(r,0))}else{const e=Qt(r);!function(e,t,r,n){const i=Object.create(Vr.prototype);let o,a,s;o=void 0!==t.start?()=>t.start(i):()=>{},a=void 0!==t.pull?()=>t.pull(i):()=>we(void 0),s=void 0!==t.cancel?e=>t.cancel(e):()=>we(void 0),function(e,t,r,n,i,o,a){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,vt(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=a,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t,Se(we(r()),(()=>(t._started=!0,Xr(t),null)),(e=>(Zr(t,e),null)))}(e,i,o,a,s,r,n)}(this,n,Kt(r,1),e)}}get locked(){if(!cn(this))throw hn("locked");return fn(this)}cancel(e){return cn(this)?fn(this)?ve(new TypeError("Cannot cancel a stream that already has a reader")):un(this,e):ve(hn("cancel"))}getReader(e){if(!cn(this))throw hn("getReader");return void 0===function(e,t){Ve(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:on(r,`${t} has member 'mode' that`)}}(e,"First parameter").mode?new st(this):function(e){return new Xt(e)}(this)}pipeThrough(e,t={}){if(!et(this))throw hn("pipeThrough");Je(e,1,"pipeThrough");const r=function(e,t){Ve(e,t);const r=null==e?void 0:e.readable;Ze(r,"readable","ReadableWritablePair"),function(e,t){if(!et(e))throw new TypeError(`${t} is not a ReadableStream.`)}(r,`${t} has member 'readable' that`);const n=null==e?void 0:e.writable;return Ze(n,"writable","ReadableWritablePair"),function(e,t){if(!tt(e))throw new TypeError(`${t} is not a WritableStream.`)}(n,`${t} has member 'writable' that`),{readable:r,writable:n}}(e,"First parameter"),n=an(t,"Second parameter");if(this.locked)throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(r.writable.locked)throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return Re(Hr(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable}pipeTo(e,t={}){if(!et(this))return ve(hn("pipeTo"));if(void 0===e)return ve("Parameter 1 is required in 'pipeTo'.");if(!tt(e))return ve(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=an(t,"Second parameter")}catch(e){return ve(e)}return this.locked?ve(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):e.locked?ve(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Hr(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!et(this))throw hn("tee");if(this.locked)throw new TypeError("Cannot tee a stream that already has a reader");return function(e,t){return function(e){try{return e.getReader({mode:"byob"}).releaseLock(),!0}catch(e){return!1}}(e)?function(e){let t,r,n,i,o,a=e.getReader(),s=!1,c=!1,f=!1,u=!1,d=!1,l=!1;const h=ge((e=>{o=e}));function p(e){Me(e.closed,(t=>(e!==a||(n.error(t),i.error(t),d&&l||o(void 0)),null)))}function b(){s&&(a.releaseLock(),a=e.getReader(),p(a),s=!1),Se(a.read(),(e=>{var t,r;if(f=!1,u=!1,e.done)return d||n.close(),l||i.close(),null===(t=n.byobRequest)||void 0===t||t.respond(0),null===(r=i.byobRequest)||void 0===r||r.respond(0),d&&l||o(void 0),null;const s=e.value,h=s;let p=s;if(!d&&!l)try{p=yt(s)}catch(e){return n.error(e),i.error(e),o(a.cancel(e)),null}return d||n.enqueue(h),l||i.enqueue(p),c=!1,f?y():u&&g(),null}),(()=>(c=!1,null)))}function m(t,r){s||(a.releaseLock(),a=e.getReader({mode:"byob"}),p(a),s=!0);const h=r?i:n,b=r?n:i;Se(a.read(t),(e=>{var t;f=!1,u=!1;const n=r?l:d,i=r?d:l;if(e.done){n||h.close(),i||b.close();const r=e.value;return void 0!==r&&(n||h.byobRequest.respondWithNewView(r),i||null===(t=b.byobRequest)||void 0===t||t.respond(0)),n&&i||o(void 0),null}const s=e.value;if(i)n||h.byobRequest.respondWithNewView(s);else{let t;try{t=yt(s)}catch(e){return h.error(e),b.error(e),o(a.cancel(e)),null}n||h.byobRequest.respondWithNewView(s),b.enqueue(t)}return c=!1,f?y():u&&g(),null}),(()=>(c=!1,null)))}function y(){if(c)return f=!0,we(void 0);c=!0;const e=n.byobRequest;return null===e?b():m(e.view,!1),we(void 0)}function g(){if(c)return u=!0,we(void 0);c=!0;const e=i.byobRequest;return null===e?b():m(e.view,!0),we(void 0)}const w=new sn({type:"bytes",start(e){n=e},pull:y,cancel:function(e){if(d=!0,t=e,l){const e=[t,r],n=a.cancel(e);o(n)}return h}}),v=new sn({type:"bytes",start(e){i=e},pull:g,cancel:function(e){if(l=!0,r=e,d){const e=[t,r],n=a.cancel(e);o(n)}return h}});return p(a),[w,v]}(e):function(e,t){const r=e.getReader();let n,i,o,a,s,c=!1,f=!1,u=!1,d=!1;const l=ge((e=>{s=e}));function h(){return c?(f=!0,we(void 0)):(c=!0,Se(r.read(),(e=>{if(f=!1,e.done)return u||o.close(),d||a.close(),u&&d||s(void 0),null;const t=e.value,r=t,n=t;return u||o.enqueue(r),d||a.enqueue(n),c=!1,f&&h(),null}),(()=>(c=!1,null))),we(void 0))}const p=new sn({start(e){o=e},pull:h,cancel:function(e){if(u=!0,n=e,d){const e=[n,i],t=r.cancel(e);s(t)}return l}}),b=new sn({start(e){a=e},pull:h,cancel:function(e){if(d=!0,i=e,u){const e=[n,i],t=r.cancel(e);s(t)}return l}});return Me(r.closed,(e=>(o.error(e),a.error(e),u&&d||s(void 0),null))),[p,b]}(e)}(this)}values(e){if(!et(this))throw hn("values");return function(e,t){const r=e.getReader(),n=new dt(r,t),i=Object.create(lt);return i._asyncIteratorImpl=n,i}(this,function(e,t){Ve(e,"First parameter");const r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}(e).preventCancel)}}function cn(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof sn}function fn(e){return void 0!==e._reader}function un(e,t){if(e._disturbed=!0,"closed"===e._state)return we(void 0);if("errored"===e._state)return ve(e._storedError);dn(e);const r=e._reader;if(void 0!==r&&Jt(r)){const e=r._readIntoRequests;r._readIntoRequests=new Ie,e.forEach((e=>{e._closeSteps(void 0)}))}return Ae(e._readableStreamController[ke](t),ue)}function dn(e){e._state="closed";const t=e._reader;if(void 0!==t&&(Ue(t),ct(t))){const e=t._readRequests;t._readRequests=new Ie,e.forEach((e=>{e._closeSteps()}))}}function ln(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(De(r,t),ct(r)?ft(r,t):Zt(r,t))}function hn(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function pn(e,t){Ve(e,t);const r=null==e?void 0:e.highWaterMark;return Ze(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Ye(r)}}Object.defineProperties(sn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),he(sn.prototype.cancel,"cancel"),he(sn.prototype.getReader,"getReader"),he(sn.prototype.pipeThrough,"pipeThrough"),he(sn.prototype.pipeTo,"pipeTo"),he(sn.prototype.tee,"tee"),he(sn.prototype.values,"values"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(sn.prototype,fe.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof fe.asyncIterator&&Object.defineProperty(sn.prototype,fe.asyncIterator,{value:sn.prototype.values,writable:!0,configurable:!0});const bn=e=>e.byteLength;he(bn,"size");class mn{constructor(e){Je(e,1,"ByteLengthQueuingStrategy"),e=pn(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!gn(this))throw yn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!gn(this))throw yn("size");return bn}}function yn(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function gn(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof mn}Object.defineProperties(mn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof fe.toStringTag&&Object.defineProperty(mn.prototype,fe.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const wn=()=>1;he(wn,"size");class vn{constructor(e){Je(e,1,"CountQueuingStrategy"),e=pn(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Sn(this))throw _n("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Sn(this))throw _n("size");return wn}}function _n(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Sn(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof vn}function En(e,t,r){return Ge(e,r),r=>Oe(e,t,[r])}function Mn(e,t,r){return Ge(e,r),r=>xe(e,t,[r])}function An(e,t,r){return Ge(e,r),(r,n)=>Oe(e,t,[r,n])}Object.defineProperties(vn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof fe.toStringTag&&Object.defineProperty(vn.prototype,fe.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class Rn{constructor(e={},t={},r={}){void 0===e&&(e=null);const n=er(t,"Second parameter"),i=er(r,"Third parameter"),o=function(e,t){Ve(e,t);const r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,i=null==e?void 0:e.start,o=null==e?void 0:e.transform,a=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:En(r,e,`${t} has member 'flush' that`),readableType:n,start:void 0===i?void 0:Mn(i,e,`${t} has member 'start' that`),transform:void 0===o?void 0:An(o,e,`${t} has member 'transform' that`),writableType:a}}(e,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");const a=Kt(i,0),s=Qt(i),c=Kt(n,1),f=Qt(n);let u;!function(e,t,r,n,i,o){function a(){return t}e._writableState="writable",e._writableStoredError=void 0,e._writableHasInFlightOperation=!1,e._writableStarted=!1,e._writable=function(e,t,r,n,i,o,a){return new sr({start(r){e._writableController=r;try{const t=r.signal;void 0!==t&&t.addEventListener("abort",(()=>{"writable"===e._writableState&&(e._writableState="erroring",t.reason&&(e._writableStoredError=t.reason))}))}catch(e){}return Ae(t(),(()=>(e._writableStarted=!0,Hn(e),null)),(t=>{throw e._writableStarted=!0,Dn(e,t),t}))},write:t=>(function(e){e._writableHasInFlightOperation=!0}(e),Ae(r(t),(()=>(function(e){e._writableHasInFlightOperation=!1}(e),Hn(e),null)),(t=>{throw function(e,t){e._writableHasInFlightOperation=!1,Dn(e,t)}(e,t),t}))),close:()=>(function(e){e._writableHasInFlightOperation=!0}(e),Ae(n(),(()=>(function(e){e._writableHasInFlightOperation=!1,"erroring"===e._writableState&&(e._writableStoredError=void 0),e._writableState="closed"}(e),null)),(t=>{throw function(e,t){e._writableHasInFlightOperation=!1,e._writableState,Dn(e,t)}(e,t),t}))),abort:t=>(e._writableState="errored",e._writableStoredError=t,i(t))},{highWaterMark:o,size:a})}(e,a,(function(t){return function(e,t){const r=e._transformStreamController;return e._backpressure?Ae(e._backpressureChangePromise,(()=>{if("erroring"===(cr(e._writable)?e._writable._state:e._writableState))throw cr(e._writable)?e._writable._storedError:e._writableStoredError;return Nn(r,t)})):Nn(r,t)}(e,t)}),(function(){return function(e){const t=e._transformStreamController,r=t._flushAlgorithm();return kn(t),Ae(r,(()=>{if("errored"===e._readableState)throw e._readableStoredError;$n(e)&&Ln(e)}),(t=>{throw xn(e,t),e._readableStoredError}))}(e)}),(function(t){return function(e,t){return xn(e,t),we(void 0)}(e,t)}),r,n),e._readableState="readable",e._readableStoredError=void 0,e._readableCloseRequested=!1,e._readablePulling=!1,e._readable=function(e,t,r,n,i,o){return new sn({start:r=>(e._readableController=r,t().catch((t=>{Bn(e,t)}))),pull:()=>(e._readablePulling=!0,r().catch((t=>{Bn(e,t)}))),cancel:t=>(e._readableState="closed",n(t))},{highWaterMark:i,size:o})}(e,a,(function(){return function(e){return In(e,!1),e._backpressureChangePromise}(e)}),(function(t){return On(e,t),we(void 0)}),i,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,In(e,!0),e._transformStreamController=void 0}(this,ge((e=>{u=e})),c,f,a,s),function(e,t){const r=Object.create(Cn.prototype);let n,i;n=void 0!==t.transform?e=>t.transform(e,r):e=>{try{return qn(r,e),we(void 0)}catch(e){return ve(e)}},i=void 0!==t.flush?()=>t.flush(r):()=>we(void 0),function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,i)}(this,o),void 0!==o.start?u(o.start(this._transformStreamController)):u(void 0)}get readable(){if(!Tn(this))throw jn("readable");return this._readable}get writable(){if(!Tn(this))throw jn("writable");return this._writable}}function Tn(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof Rn}function xn(e,t){Bn(e,t),On(e,t)}function On(e,t){kn(e._transformStreamController),function(e,t){e._writableController.error(t),"writable"===e._writableState&&Un(e,t)}(e,t),e._backpressure&&In(e,!1)}function In(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=ge((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(Rn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof fe.toStringTag&&Object.defineProperty(Rn.prototype,fe.toStringTag,{value:"TransformStream",configurable:!0});class Cn{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Pn(this))throw Fn("desiredSize");return zn(this._controlledTransformStream)}enqueue(e){if(!Pn(this))throw Fn("enqueue");qn(this,e)}error(e){if(!Pn(this))throw Fn("error");var t;t=e,xn(this._controlledTransformStream,t)}terminate(){if(!Pn(this))throw Fn("terminate");!function(e){const t=e._controlledTransformStream;$n(t)&&Ln(t);On(t,new TypeError("TransformStream terminated"))}(this)}}function Pn(e){return!!de(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof Cn}function kn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function qn(e,t){const r=e._controlledTransformStream;if(!$n(r))throw new TypeError("Readable side is not in a state that permits enqueue");try{!function(e,t){e._readablePulling=!1;try{e._readableController.enqueue(t)}catch(t){throw Bn(e,t),t}}(r,t)}catch(e){throw On(r,e),r._readableStoredError}const n=function(e){return!function(e){return!!$n(e)&&(!!e._readablePulling||zn(e)>0)}(e)}(r);n!==r._backpressure&&In(r,!0)}function Nn(e,t){return Ae(e._transformAlgorithm(t),void 0,(t=>{throw xn(e._controlledTransformStream,t),t}))}function Fn(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function jn(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}function $n(e){return!e._readableCloseRequested&&"readable"===e._readableState}function Ln(e){e._readableState="closed",e._readableCloseRequested=!0,e._readableController.close()}function Bn(e,t){"readable"===e._readableState&&(e._readableState="errored",e._readableStoredError=t),e._readableController.error(t)}function zn(e){return e._readableController.desiredSize}function Dn(e,t){"writable"!==e._writableState?Wn(e):Un(e,t)}function Un(e,t){e._writableState="erroring",e._writableStoredError=t,!function(e){return e._writableHasInFlightOperation}(e)&&e._writableStarted&&Wn(e)}function Wn(e){e._writableState="errored"}function Hn(e){"erroring"===e._writableState&&Wn(e)}Object.defineProperties(Cn.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),he(Cn.prototype.enqueue,"enqueue"),he(Cn.prototype.error,"error"),he(Cn.prototype.terminate,"terminate"),"symbol"==typeof fe.toStringTag&&Object.defineProperty(Cn.prototype,fe.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});const Vn=ce.Readable||class{};function Gn(e){return Xn(e)||Jn(e)}function Xn(e){if(!ti(e))return!1;const t=e;return"function"==typeof t.getReader&&void 0!==t.locked&&"function"==typeof t.cancel&&"function"==typeof t.pipeTo&&"function"==typeof t.pipeThrough}function Jn(e){if(!ti(e))return!1;const t=e;return!("function"!=typeof t.pipe||!t.readable||"function"!=typeof t._read)}function Zn(e){return new sn({start(t){e.pause(),e.on("data",(r=>{Buffer.isBuffer(r)?t.enqueue(new Uint8Array(r.buffer)):t.enqueue(r),e.pause()})),e.on("end",(()=>t.close())),e.on("error",(e=>t.error(e)))},pull(){e.resume()},cancel(){e.pause()}})}class Yn extends Vn{constructor(e,t){super(t),this._webStream=e,this._reader=e.getReader(),this._reading=!1}_read(){if(this._reading)return;this._reading=!0;const e=()=>{this._reader.read().then((t=>{if(!t.done)return this.push(t.value)?e():void(this._reading=!1);this.push(null)}))};e()}}function Kn(e,t){if(!ce.Readable)throw new Error("The Node's Readable is not available! If you are running this in browser you have to polyfill 'stream' package!");return new Yn(e,t)}function Qn(e){if(Jn(e))return Zn(e);if(Xn(e))return e;throw new TypeError("Passed stream is not Node Readable nor ReadableStream!")}function ei(e){return null!==e&&"object"==typeof e}function ti(e){return ei(e)&&!Array.isArray(e)}function ri(e,t="value"){if(!ti(e))throw new TypeError(`${t} has to be an object that is not null nor array!`)}function ni(e,t="value"){if(!0!==e&&!1!==e)throw new TypeError(`${t} is not boolean`)}function ii(e,t="value"){if(!function(e){return"string"==typeof e&&/^-?(0|[1-9][0-9]*)$/g.test(e)||"number"==typeof e&&e>Number.MIN_SAFE_INTEGER&&e<Number.MAX_SAFE_INTEGER&&Number.isInteger(e)}(e))throw new TypeError(`${t} is not integer`)}function oi(e,t="Value"){if(ii(e,t),Number(e)<0)throw new p(`${t} has to be bigger or equal to zero`,e)}function ai(e){try{S(e,G)}catch(fe){S(e,X)}}function si(e){if("string"!=typeof e)throw new TypeError("ReferenceOrEns has to be a string!");if(v(e))return void ai(e);if(!/^(?:(?:[^-.\/?:\s][^.\/?:\s]{0,61}[^-.\/?:\s]|[^-.\/?:\s]{1,2})\.)+[^-.\/?:\s][^.\/?:\s]{0,61}[^-.\/?:\s]$/.test(e))throw new TypeError("ReferenceOrEns is not valid Reference, but also not valid ENS domain.")}function ci(e,t){if("string"!=typeof e)throw new TypeError("ReferenceCidOrEns has to be a string!");try{const r=(0,a.zB)(e);if(r.type!==t)throw new h(`CID was expected to be of type ${t}, but got instead ${r.type??"non-Swarm CID"}`);return r.reference}catch(fe){if(fe instanceof h)throw fe}return si(e),e}function fi(e,t){return{...e,cid:()=>(0,a.Lg)(e.reference,t).toString()}}function ui(e){S(e,U,"Address")}function di(e){S(e,V,"BatchId")}function li(e,t="RequestOptions"){if(void 0===e)return;if(!ti(e))throw new TypeError(`${t} has to be an object!`);const r=e;r.retry&&oi(r.retry,`${t}.retry`),r.timeout&&oi(r.timeout,`${t}.timeout`)}function hi(e,t="UploadOptions"){if(!ti(e))throw new TypeError(`${t} has to be an object!`);li(e,t);const r=e;if(r.pin&&"boolean"!=typeof r.pin)throw new TypeError(`options.pin property in ${t} has to be boolean or undefined!`);if(r.encrypt&&"boolean"!=typeof r.encrypt)throw new TypeError(`options.encrypt property in ${t} has to be boolean or undefined!`);if(r.tag){if("number"!=typeof r.tag)throw new TypeError(`options.tag property in ${t} has to be number or undefined!`);oi(r.tag,"options.tag")}}function pi(e){hi(e,"CollectionUploadOptions");const t=e;if(t.indexDocument&&"string"!=typeof t.indexDocument)throw new TypeError("indexDocument property in CollectionUploadOptions has to be string or undefined!");if(t.errorDocument&&"string"!=typeof t.errorDocument)throw new TypeError("errorDocument property in CollectionUploadOptions has to be string or undefined!")}function bi(e){return!!ti(e)&&Boolean(e.uid)}function mi(e,t="TransactionOptions"){if(void 0===e)return;ri(e,t);const r=e;r?.gasLimit&&oi(r.gasLimit,t),r?.gasPrice&&oi(r.gasPrice,t)}function yi(e){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new TypeError("Data must be either string or Uint8Array!")}function gi(e){if(null==e)throw new TypeError("TagUid was expected but got undefined or null instead!");if(bi(e))return e.uid;if("number"==typeof e)return oi(e,"UID"),e;if("string"==typeof e){const t=parseInt(e);if(isNaN(t))throw new TypeError("Passed tagUid string is not valid integer!");if(t<0)throw new TypeError(`TagUid was expected to be positive non-negative integer! Got ${t}`);return t}throw new TypeError("tagUid has to be either Tag or a number (UID)!")}function wi(e){if("string"!=typeof e)throw new TypeError("TransactionHash has to be a string!");if(E(e,"TransactionHash"),66!==e.length)throw new TypeError("TransactionHash has to be prefixed hex string with total length 66 (prefix including)")}const{ec:vi}=l();function _i(e){const t=`Ethereum Signed Message:\n${e.length}`;return j((new TextEncoder).encode(t),e)}function Si(e){return j(e.encode("array",!1).slice(1)).slice(12)}function Ei(e){return{sign:t=>function(e,t){const r=new vi("secp256k1"),n=r.keyFromPrivate(t),i=_i(e),o=r.sign(i,n,{canonical:!0,pers:void 0});if(null===o.recoveryParam)throw new h("signDigest recovery param was null");return new Uint8Array([...o.r.toArray("be",32),...o.s.toArray("be",32),o.recoveryParam+27])}(t,e),address:Si(new vi("secp256k1").keyFromPrivate(e).getPublic())}}function Mi(e){if("string"==typeof e){return Ei(y(m(e,64)))}return e instanceof Uint8Array?(R(e,32),Ei(e)):(function(e){if(!ti(e))throw new TypeError("Signer must be an object!");const t=e;if(!M(t.address,20))throw new TypeError("Signer's address must be Uint8Array with 20 bytes!");if("function"!=typeof t.sign)throw new TypeError("Signer sign property needs to be function!")}(e),e)}function Ai(e){return{name:function(e){if(!e)throw new h("missing content-disposition header");const t=e.match(/filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/i);if(t&&t.length>0)return t[1];throw new h("invalid content-disposition header")}(e["content-disposition"]),tagUid:function(e){if(e)return parseInt(e,10)}(e["swarm-tag-uid"]),contentType:e["content-type"]||void 0}}function Ri(e,t){if(!e)throw new h("Postage BatchID has to be specified!");const r={"swarm-postage-batch-id":e};return t?.pin&&(r["swarm-pin"]=String(t.pin)),t?.encrypt&&(r["swarm-encrypt"]=String(t.encrypt)),t?.tag&&(r["swarm-tag"]=String(t.tag)),"boolean"==typeof t?.deferred&&(r["swarm-deferred-upload"]=t.deferred.toString()),r}var Ti=r(4559),xi=r.n(Ti);const Oi={headers:{accept:"application/json, text/plain, */*"},maxBodyLength:1/0,maxContentLength:1/0};async function Ii(e,t){try{const r=c.deepMerge3(Oi,t,e);!function(e,t){e.onRequest&&e.onRequest({method:t.method||"GET",url:f.joinUrl(t.baseURL,t.url),headers:{...t.headers},params:t.params})}(e,r);return await xi()(r)}catch(fe){if(fe instanceof Ti.AxiosError)throw new b(fe.message,fe.code,fe.status,fe.response?.status,fe.config,fe.request,fe.response);throw fe}}async function Ci(e,t){const r=await Ii(e,{responseType:"arraybuffer",url:`chunks/${t}`});return k(new Uint8Array(r.data))}const{keccak256:Pi}=N(),ki=4096;function qi(e){const t=e.slice(0,8),r=function(e){if(e.length>ki)throw new p("invalid data length",e);let t=new Uint8Array([...e,...new Uint8Array(ki-e.length)]);for(;32!==t.length;){const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=64){const n=Pi.array(t.slice(r,r+64));e.set(n,r/2)}t=e}return t}(e.slice(8));return j(new Uint8Array([...t,...r]))}function Ni(...e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r}const Fi=4096;function ji(e){const t=function(e){if(e<=0)throw new p("invalid length for span",e);if(e>4294967295)throw new p("invalid length (> MAX_SPAN_LENGTH)",e);const t=new Uint8Array(8),r=4294967295&e;return new DataView(t.buffer).setUint32(0,r,!0),t}(e.length);x(e,1,Fi);const r=Ni(t,e);return{data:r,span:()=>t,payload:()=>I(r,8),address:()=>qi(r)}}function $i(e,t){if(!function(e,t){return e instanceof Uint8Array&&C(qi(e),t)}(e,t))throw new h("Address of content address chunk does not match given data!")}function Li(e){const t=qi(e.slice(97)),r=function(e,t){const r=new vi("secp256k1"),n={r:e.slice(0,32),s:e.slice(32,64)},i=e[64]-27,o=_i(t);return Si(r.recoverPubKey(o,n,i))}(O(e,32,65),j(O(e,0,32),t));return r}function Bi(e,t){const r=Li(e),n=O(e,0,32),i=j(n,r);if(!C(t,i))throw new h("SOC Data does not match given address!");return{data:e,identifier:()=>n,signature:()=>O(e,32,65),span:()=>O(e,97,8),payload:()=>I(e,105),address:()=>i,owner:()=>r}}function zi(e,t){return j(e,t)}async function Di(e,t,r){const n=e.address();$i(e.data,n);const i=j(t,n),o=await async function(e,t){const r=await e.sign(k(t));if("string"==typeof r)return y(m(r,ie));if(r instanceof Uint8Array)return R(r,oe),r;throw new TypeError("Invalid output of sign function!")}(r,i),a=Ni(t,o,e.span(),e.payload()),s=zi(t,r.address);return{data:a,identifier:()=>t,signature:()=>o,span:()=>e.span(),payload:()=>e.payload(),address:()=>s,owner:()=>r.address}}async function Ui(e,t,r,n){return async function(e,t,r,n,i,o,a){return(await Ii(e,{method:"post",url:`soc/${t}/${r}`,data:i,headers:{"content-type":"application/octet-stream",...Ri(o,a)},responseType:"json",params:{sig:n}})).data.reference}(e,g(t.owner()),g(t.identifier()),g(t.signature()),Ni(t.span(),t.payload()),r,n)}async function Wi(e,t,r,n,i,o){ui(r);const a=ji(i);return Ui(e,await Di(a,n,t),r,o)}async function Hi(e,t,r){const n=zi(r,t);return Bi(await Ci(e,g(n)),n)}function Vi(e){const t=e["swarm-feed-index"],r=e["swarm-feed-index-next"];if(!t)throw new h("Response did not contain expected swarm-feed-index!");if(!r)throw new h("Response did not contain expected swarm-feed-index-next!");return{feedIndex:t,feedIndexNext:r}}async function Gi(e,t,r,n){const i=await Ii(e,{responseType:"json",url:`feeds/${t}/${r}`,params:n});return{...i.data,...Vi(i.headers)}}const{keccak256:Xi,sha3_256:Ji}=N();function Zi(e){if("string"==typeof e){const t=y(m(e,40));return R(t,20),t}if(e instanceof Uint8Array)return R(e,20),e;throw new TypeError("Invalid EthAddress")}function Yi(e){try{return m(e,40)}catch(fe){throw fe instanceof TypeError&&(fe.message=`Invalid HexEthAddress: ${fe.message}`),fe}}function Ki(e){return function(e){return"string"==typeof e&&(/^(0x|0X)?[0-9a-f]{40}$/.test(e)||/^(0x|0X)?[0-9A-F]{40}$/.test(e))}(e)||function(e){try{const t=m(e,40),r=Xi(t.toLowerCase());for(let e=0;e<40;e+=1)if(parseInt(r[e],16)>7&&t[e].toUpperCase()!==t[e]||parseInt(r[e],16)<=7&&t[e].toLowerCase()!==t[e])return!1;return!0}catch(fe){if(fe instanceof TypeError)return!1;throw fe}}(e)}function Qi(e,t=2){if(!(Number.isInteger(t)&&t>=2&&t%2==0))throw new TypeError("minimal padding for conversion needs to be positive even integer");let r;if("string"==typeof e)r=m(e);else{if("number"!=typeof e)throw new TypeError("incorrect input type");r=w(e)}r=r.padStart(t,"0"),r.length%2!=0&&(r=r.padStart(r.length+1,"0"));const n=r.match(/../g)?.reverse().join("");if(n)return n;throw new Error("failed to convert")}function eo(e,t=2){return Qi(e,t)}function to(e,t=1){!function(e){if(!Ki(e))throw new TypeError("invalid ETH address")}(e),function(e){if(Number.isInteger(e&&e>0&&e<Number.MAX_SAFE_INTEGER))throw new TypeError("swarm network id must be positive integer")}(t);const r=`${m(e)}${Qi(t,16)}`;S(r);return Ji(y(r))}async function ro(e,t){let r;if("object"!=typeof e||null===e)throw new TypeError("We need JsonRPC provider object!");if(e.request)r=e.request;else{if(!e.sendAsync)throw new Error("Incompatible interface of given provider!");r=e.sendAsync}t||(t=(await r({method:"eth_requestAccounts"}))[0]);const n=Zi(t),i=Yi(t);return{address:n,sign:async e=>await r({jsonrpc:"2.0",method:"personal_sign",params:["0x"+e.hex(),"0x"+i]})}}function no(e,t=0){if("string"==typeof e){if(t)throw new Error("Offset property can be set only for UintArray reference!");try{return y(m(e,G))}catch(fe){if(!(fe instanceof TypeError))throw fe;return y(m(e,X))}}else if(e instanceof Uint8Array){if(A(e,t,Z))return O(e,t,Z);if(A(e,t,J))return O(e,t,J)}throw new TypeError("invalid chunk reference")}function io(e,t=P(8)){const r=new DataView(t.buffer),n=4294967295&e;return r.setUint32(0,0),r.setUint32(4,n),t}function oo(e){return new DataView(e.buffer).getUint32(4)}function ao(e,t){return j(y(e),t)}function so(e,t){if("number"==typeof t)return function(e,t){return ao(e,io(t))}(e,t);if("string"==typeof t){const r=function(e){return y(m(e,te))}(t);return ao(e,r)}if("object"==typeof(r=t)&&null!==r&&"time"in r&&"level"in r)throw new TypeError("epoch is not yet implemented");var r;return ao(e,t)}async function co(e,t,r,n,i,o,a="latest"){const s=Yi(t.address),c="latest"===a?await async function(e,t,r,n){try{return m((await Gi(e,t,r,n)).feedIndexNext,te)}catch(fe){if(404===fe?.response?.status)return g(P(8));throw fe}}(e,s,r,o):a;return Wi(e,t,i,so(r,c),Ni(io(o?.at??Date.now()/1e3),n),o)}function fo(e,t,r){return j(so(t,r),e)}function uo(e,t,r,n){return{type:t,owner:n,topic:r,async download(i){if(!i?.index&&0!==i?.index)return Gi(e,n,r,{...i,type:t});const o=await async function(e,t,r,n){const i=fo(t,r,n),o=g(i),a=Bi(await Ci(e,o),i).payload();return{timestamp:oo(O(a,0,8)),reference:no(a,8)}}(e,y(n),r,i.index);return{reference:g(o.reference),feedIndex:i.index,feedIndexNext:""}}}}function lo(e){try{const t=JSON.stringify(e);return(new TextEncoder).encode(t)}catch(fe){throw function(e){return e instanceof Error}(fe)&&(fe.message=`JsonFeed: ${fe.message}`),fe}}function ho(e,t,r){const n=function(e){if(e instanceof Uint8Array)return oo(e);if("string"==typeof e)return parseInt(e);if("number"==typeof e)return e;throw new TypeError("Unknown type of index!")}(r),i=new Array(n+1);for(let o=0;o<=n;o++)i[o]=g(fo(e,t,o));return i}function po(e){if("string"==typeof e)return m(e,ne);if(e instanceof Uint8Array)return R(e,re),g(e,ne);throw new TypeError("invalid topic")}const bo=["sequence","epoch"],mo="sequence";function yo(e){if(!function(e){return"string"==typeof e&&bo.includes(e)}(e))throw new TypeError("invalid feed type")}const go="bytes";function wo(e){return!!Array.isArray(e)&&e.every((e=>"object"==typeof e&&e.data&&e.path&&e.data instanceof Uint8Array))}function vo(e){if(!wo(e))throw new p("invalid collection",e)}function _o(e){if(e.webkitRelativePath&&""!==e.webkitRelativePath)return e.webkitRelativePath.replace(/.*?\//i,"");if(e.name)return e.name;throw new TypeError("file is not valid File object")}function So(e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];n&&(t+=n.size)}return t}var Eo=r(1117),Mo=r.n(Eo);function Ao(e){const t=(new TextEncoder).encode(e);return{length:t.length,charCodeAt:e=>t[e]}}const Ro="bzz";function To(e,t){const r=Ri(e,t);return t?.size&&(r["content-length"]=String(t.size)),t?.contentType&&(r["content-type"]=t.contentType),r}async function xo(e,t,r,n,i){Gn(t)&&!i?.contentType&&(i||(i={}),i.contentType="application/octet-stream");const o=await Ii(e,{method:"post",url:Ro,data:t,headers:{...To(r,i)},params:{name:n},responseType:"json"});return{reference:o.data.reference,tagUid:o.headers["swarm-tag"]?gi(o.headers["swarm-tag"]):void 0}}function Oo(e,t){const r=Ri(e,t);return t?.indexDocument&&(r["swarm-index-document"]=t.indexDocument),t?.errorDocument&&(r["swarm-error-document"]=t.errorDocument),r}async function Io(e,t,r,n){vo(t);const i=function(e){const t=new(Mo())(1);for(const r of e){const e=Ao(r.path);t.append(e,r.data)}return t.out}(t),o=await Ii(e,{method:"post",url:Ro,data:i,responseType:"json",headers:{"content-type":"application/x-tar","swarm-collection":"true",...Oo(r,n)}});return{reference:o.data.reference,tagUid:o.headers["swarm-tag"]?gi(o.headers["swarm-tag"]):void 0}}var Co=r(2256),Po=r.n(Co);async function ko(e,t,r,n,i,o){await Ii(e,{method:"post",url:`pss/send/${t}/${r}`,data:n,responseType:"json",params:{recipient:o},headers:Ri(i)})}async function qo(e){await Ii(e,{url:""})}const No="tags";async function Fo(e){throw new Error("Creating Collection from File System is not supported in browsers!")}function jo(e){try{if("string"!=typeof e)return!1;const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(fe){if(fe instanceof TypeError||function(e){return ei(e)&&"string"==typeof e.code}(fe)&&"ERR_INVALID_URL"===fe.code)return!1;throw fe}}function $o(e){if(!jo(e))throw new p("URL is not valid!",e)}function Lo(e){return e.endsWith("/")?e.slice(0,-1):e}class Bo{constructor(e,t){$o(e),this.url=Lo(e),t?.signer&&(this.signer=Mi(t.signer)),this.requestOptions={baseURL:this.url,timeout:t?.timeout??!1,headers:t?.headers,onRequest:t?.onRequest,adapter:t?.adapter}}async uploadData(e,t,r,n){return di(e),yi(t),r&&hi(r),async function(e,t,r,n){const i=await Ii(e,{url:go,method:"post",responseType:"json",data:t,headers:{"content-type":"application/octet-stream",...Ri(r,n)}});return{reference:i.data.reference,tagUid:i.headers["swarm-tag"]?gi(i.headers["swarm-tag"]):void 0}}(this.getRequestOptionsForCall(n),t,e,r)}async downloadData(e,t){return li(t),si(e),async function(e,t){const r=await Ii(e,{responseType:"arraybuffer",url:`bytes/${t}`});return k(new Uint8Array(r.data))}(this.getRequestOptionsForCall(t),e)}async downloadReadableData(e,t){return li(t),si(e),async function(e,t){return(await Ii(e,{responseType:"stream",url:`bytes/${t}`})).data}(this.getRequestOptionsForCall(t),e)}async uploadChunk(e,t,r,n){if(di(e),!(t instanceof Uint8Array))throw new TypeError("Data has to be Uint8Array instance!");if(t.length<L)throw new p(`Chunk has to have size of at least ${L}.`,t);if(t.length>D+L)throw new p(`Chunk has to have size of at most ${D}.`,t);return r&&hi(r),async function(e,t,r,n){return(await Ii(e,{method:"post",url:"chunks",data:t,headers:{"content-type":"application/octet-stream",...Ri(r,n)},responseType:"json"})).data.reference}(this.getRequestOptionsForCall(n),t,e,r)}async downloadChunk(e,t){return li(t),si(e),Ci(this.getRequestOptionsForCall(t),e)}async uploadFile(e,t,r,n,i){if(di(e),function(e){if(!("string"==typeof e||e instanceof Uint8Array||ae(e)||Gn(e)))throw new TypeError("Data must be either string, Readable, Uint8Array or File!")}(t),n&&function(e){hi(e,"FileUploadOptions");const t=e;if(t.size){if("number"!=typeof t.size)throw new TypeError("tag property in FileUploadOptions has to be number or undefined!");oi(t.size,"options.size")}if(t.contentType&&"string"!=typeof t.contentType)throw new TypeError("contentType property in FileUploadOptions has to be string or undefined!")}(n),r&&"string"!=typeof r)throw new TypeError("name has to be string or undefined!");if(ae(t)){const o=await se(t),s=r??t.name,c={contentType:t.type,...n};return fi(await xo(this.getRequestOptionsForCall(i),o,e,s,c),a.lW.MANIFEST)}if(Gn(t)&&n?.tag&&!n.size){const o=await xo(this.getRequestOptionsForCall(i),t,e,r,n);return await this.updateTag(n.tag,o.reference),fi(o,a.lW.MANIFEST)}return fi(await xo(this.getRequestOptionsForCall(i),t,e,r,n),a.lW.MANIFEST)}async downloadFile(e,t="",r){return li(r),e=ci(e,a.lW.MANIFEST),async function(e,t,r=""){const n=await Ii(e,{method:"GET",responseType:"arraybuffer",url:`bzz/${t}/${r}`});return{...Ai(n.headers),data:k(new Uint8Array(n.data))}}(this.getRequestOptionsForCall(r),e,t)}async downloadReadableFile(e,t="",r){return li(r),e=ci(e,a.lW.MANIFEST),async function(e,t,r=""){const n=await Ii(e,{method:"GET",responseType:"stream",url:`bzz/${t}/${r}`});return{...Ai(n.headers),data:n.data}}(this.getRequestOptionsForCall(r),e,t)}async uploadFiles(e,t,r,n){di(e),r&&pi(r);const i=await async function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];n&&t.push({path:_o(n),data:new Uint8Array(await se(n))})}return t}(t);return fi(await Io(this.getRequestOptionsForCall(n),i,e,r),a.lW.MANIFEST)}async uploadCollection(e,t,r){return di(e),vo(t),r&&pi(r),fi(await Io(this.requestOptions,t,e,r),a.lW.MANIFEST)}async uploadFilesFromDirectory(e,t,r,n){di(e),r&&pi(r);const i=await async function(e){throw new Error("Creating Collection from File System is not supported in browsers!")}();return fi(await Io(this.getRequestOptionsForCall(n),i,e,r),a.lW.MANIFEST)}async createTag(e){return li(e),async function(e){return(await Ii(e,{method:"post",url:No,responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getAllTags(e){return li(e),function(e){if(void 0!==e&&!ti(e))throw new TypeError("options has to be an object or undefined!");li(e,"AllTagsOptions");const t=e;if(void 0!==t?.limit){if("number"!=typeof t.limit)throw new TypeError("AllTagsOptions.limit has to be a number or undefined!");if(t.limit<Q)throw new p(`AllTagsOptions.limit has to be at least ${Q}`,t.limit);if(t.limit>ee)throw new p(`AllTagsOptions.limit has to be at most ${ee}`,t.limit)}void 0!==t?.offset&&oi(t.offset,"AllTagsOptions.offset")}(e),async function(e,t,r){return(await Ii(e,{url:No,params:{offset:t,limit:r},responseType:"json"})).data.tags}(this.getRequestOptionsForCall(e),e?.offset,e?.limit)}async retrieveTag(e,t){return li(t),e=gi(e),async function(e,t){return(await Ii(e,{url:`tags/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async deleteTag(e,t){return li(t),e=gi(e),async function(e,t){await Ii(e,{method:"delete",url:`tags/${t}`})}(this.getRequestOptionsForCall(t),e)}async updateTag(e,t,r){return ai(t),li(r),e=gi(e),async function(e,t,r){await Ii(e,{method:"patch",url:`tags/${t}`,data:{reference:r}})}(this.getRequestOptionsForCall(r),e,t)}async pin(e,t){return li(t),ai(e),async function(e,t){await Ii(e,{method:"post",responseType:"json",url:`pins/${t}`})}(this.getRequestOptionsForCall(t),e)}async unpin(e,t){return li(t),ai(e),async function(e,t){await Ii(e,{method:"delete",responseType:"json",url:`pins/${t}`})}(this.getRequestOptionsForCall(t),e)}async getAllPins(e){return li(e),async function(e){return(await Ii(e,{method:"get",responseType:"json",url:"pins"})).data.references}(this.getRequestOptionsForCall(e))}async getPin(e,t){return li(t),ai(e),async function(e,t){return(await Ii(e,{method:"get",responseType:"json",url:`pins/${t}`})).data}(this.getRequestOptionsForCall(t),e)}async reuploadPinnedData(e,t){li(t),si(e),await async function(e,t){await Ii(e,{method:"put",url:`stewardship/${t}`})}(this.getRequestOptionsForCall(t),e)}async isReferenceRetrievable(e,t){return li(t),si(e),async function(e,t){return(await Ii(e,{method:"get",responseType:"json",url:`stewardship/${t}`})).data.isRetrievable}(this.getRequestOptionsForCall(t),e)}async isFeedRetrievable(e,t,r,n,i){const o=Zi(t),a=po(r);if(!n)try{return await this.makeFeedReader(e,a,o).download(),!0}catch(fe){if(404===fe?.response?.status)return!1;throw fe}if("sequence"!==e)throw new h("Only Sequence type of Feeds is supported at the moment");return async function(e,t,r,n,i){const o=ho(t,r,n).map((async t=>async function(e,t,r){try{return await e.downloadChunk(t,r),!0}catch(fe){if(404===fe?.response?.status)return!1;throw fe}}(e,t,i)));return(await Promise.all(o)).every((e=>e))}(this,o,a,n,this.getRequestOptionsForCall(i))}async pssSend(e,t,r,n,i,o){if(li(o),yi(n),di(e),function(e){if(S(e,void 0,"AddressPrefix"),e.length>W)throw new p(`AddressPrefix must have length of ${W} at most! Got string with ${e.length}`,e)}(r),"string"!=typeof t)throw new TypeError("topic has to be an string!");return i?(S(i,H,"PublicKey"),ko(this.getRequestOptionsForCall(o),t,r,n,e,i)):ko(this.getRequestOptionsForCall(o),t,r,n,e)}pssSubscribe(e,t){if(function(e){if(!ti(e))throw new TypeError("PssMessageHandler has to be object!");const t=e;if("function"!=typeof t.onMessage)throw new TypeError("onMessage property of PssMessageHandler has to be function!");if("function"!=typeof t.onError)throw new TypeError("onError property of PssMessageHandler has to be function!")}(t),"string"!=typeof e)throw new TypeError("topic has to be an string!");const r=function(e,t){const r=e.replace(/^http/i,"ws");return new(Po())(`${r}/pss/subscribe/${t}`)}(this.url,e);let n=!1;const i={topic:e,cancel:()=>{!1===n&&(n=!0,r.terminate?r.terminate():r.close())}};return r.onmessage=async e=>{const r=await async function(e){if("string"==typeof e)return(new TextEncoder).encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await new Response(e).arrayBuffer());throw new TypeError("unknown websocket data type")}(e.data);r.length>0&&t.onMessage(k(r),i)},r.onerror=e=>{n||t.onError(new h(e.message),i)},i}async pssReceive(e,t=0){if("string"!=typeof e)throw new TypeError("topic has to be an string!");if("number"!=typeof t)throw new TypeError("timeoutMsc parameter has to be a number!");return new Promise(((r,n)=>{let i;const o=this.pssSubscribe(e,{onError:e=>{clearTimeout(i),o.cancel(),n(e.message)},onMessage:e=>{clearTimeout(i),o.cancel(),r(e)}});t>0&&(i=setTimeout((()=>{o.cancel(),n(new h("pssReceive timeout"))}),t))}))}async createFeedManifest(e,t,r,n,i){li(i),yo(t),di(e);const o=po(r),s=Yi(n),c=await async function(e,t,r,n,i){return(await Ii(e,{method:"post",responseType:"json",url:`feeds/${t}/${r}`,params:i,headers:Ri(n)})).data.reference}(this.getRequestOptionsForCall(i),s,o,e,{type:t});return fi({reference:c},a.lW.FEED)}makeFeedReader(e,t,r,n){li(n),yo(e);const i=po(t),o=Yi(r);return uo(this.getRequestOptionsForCall(n),e,i,o)}makeFeedWriter(e,t,r,n){li(n),yo(e);const i=po(t),o=this.resolveSigner(r);return function(e,t,r,n){return{...uo(e,t,r,Yi(n.address)),upload:async(i,o,a)=>{ui(i);const s=no(o);return co(e,n,r,s,i,{...a,type:t})}}}(this.getRequestOptionsForCall(n),e,i,o)}async setJsonFeed(e,t,r,n,i){li(n,"JsonFeedOptions"),di(e);const o=this.makeFeedTopic(t),a=n?.type??mo;return async function(e,t,r,n,i,o){const a=lo(n),{reference:s}=await e.uploadData(r,a,i,o);return t.upload(r,s)}(this,this.makeFeedWriter(a,o,n?.signer,i),e,r,n,i)}async getJsonFeed(e,t){li(t,"JsonFeedOptions");const r=this.makeFeedTopic(e),n=t?.type??mo;if(t?.signer&&t?.address)throw new h('Both options "signer" and "address" can not be specified at one time!');let i;if(t?.address)i=Zi(t?.address);else try{i=this.resolveSigner(t?.signer).address}catch(fe){throw fe instanceof h?new h("Either address, signer or default signer has to be specified!"):fe}return async function(e,t){const r=await t.download();return(await e.downloadData(r.reference)).json()}(this,this.makeFeedReader(n,r,i,t))}makeFeedTopic(e){return function(e){if("string"!=typeof e)throw new TypeError("topic has to be string!");return g(j(e),ne)}(e)}makeSOCReader(e,t){li(t);const r=Zi(e);return{owner:Yi(r),download:Hi.bind(null,this.getRequestOptionsForCall(t),r)}}makeSOCWriter(e,t){li(t);const r=this.resolveSigner(e);return{...this.makeSOCReader(r.address,t),upload:Wi.bind(null,this.getRequestOptionsForCall(t),r)}}async checkConnection(e){return li(e,"PostageBatchOptions"),qo(this.getRequestOptionsForCall(e))}async isConnected(e){li(e,"PostageBatchOptions");try{await qo(this.getRequestOptionsForCall(e))}catch(fe){return!1}return!0}resolveSigner(e){if(e)return Mi(e);if(this.signer)return this.signer;throw new h("You have to pass Signer as property to either the method call or constructor! Non found.")}getRequestOptionsForCall(e){return e?c.deepMerge2(this.requestOptions,e):this.requestOptions}}const zo="balances",Do="consumed";const Uo="settlements";var Wo=r(4503),Ho=r.n(Wo);const Vo="1.18.2-759f56f",Go="4.0.0",Xo="4.0.0",Jo=Vo.substring(0,Vo.indexOf("-"));async function Zo(e){return(await Ii(e,{method:"get",url:"health",responseType:"json"})).data}async function Yo(e){const{version:t}=await Zo(e);return t===Vo}async function Ko(e){const{debugApiVersion:t}=await Zo(e);return Ho()(t)===Ho()(Xo)}const Qo="transactions";class ea{constructor(e,t){$o(e),this.url=Lo(e),this.requestOptions={baseURL:this.url,timeout:t?.timeout??!1,headers:t?.headers,onRequest:t?.onRequest,adapter:t?.adapter}}async getNodeAddresses(e){return li(e),async function(e){return(await Ii(e,{url:"addresses",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getBlocklist(e){return li(e),async function(e){return(await Ii(e,{url:"blocklist",responseType:"json"})).data.peers}(this.getRequestOptionsForCall(e))}async retrieveExtendedTag(e,t){if(li(t),bi(e))e=e.uid;else{if("number"!=typeof e)throw new TypeError("tagUid has to be either Tag or a number (UID)!");oi(e,"UID")}return async function(e,t){return(await Ii(e,{url:`tags/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getPeers(e){return li(e),async function(e){return(await Ii(e,{url:"peers",responseType:"json"})).data.peers}(this.getRequestOptionsForCall(e))}async removePeer(e,t){return li(t),ui(e),async function(e,t){return(await Ii(e,{url:`peers/${t}`,responseType:"json",method:"DELETE"})).data}(this.getRequestOptionsForCall(t),e)}async getTopology(e){return li(e),async function(e){return(await Ii(e,{url:"topology",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async pingPeer(e,t){return li(t),ui(e),async function(e,t){return(await Ii(e,{url:`pingpong/${t}`,responseType:"json",method:"POST"})).data}(this.getRequestOptionsForCall(t),e)}async getAllBalances(e){return li(e),async function(e){return(await Ii(e,{url:zo,responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getPeerBalance(e,t){return li(t),ui(e),async function(e,t){return(await Ii(e,{url:`balances/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getPastDueConsumptionBalances(e){return li(e),async function(e){return(await Ii(e,{url:Do,responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getPastDueConsumptionPeerBalance(e,t){return li(t),ui(e),async function(e,t){return(await Ii(e,{url:`consumed/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getChequebookAddress(e){return li(e),async function(e){return(await Ii(e,{url:"chequebook/address",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getChequebookBalance(e){return li(e),async function(e){return(await Ii(e,{url:"chequebook/balance",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getLastCheques(e){return li(e),async function(e){return(await Ii(e,{url:"chequebook/cheque",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getLastChequesForPeer(e,t){return li(t),ui(e),async function(e,t){return(await Ii(e,{url:`chequebook/cheque/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getLastCashoutAction(e,t){return li(t),ui(e),async function(e,t){return(await Ii(e,{url:`chequebook/cashout/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async cashoutLastCheque(e,t,r){return function(e){if(void 0===e)return;ri(e);const t=e;li(t,"CashoutOptions"),mi(t,"CashoutOptions")}(t),ui(e),async function(e,t,r){const n={};return r?.gasPrice&&(n["gas-price"]=r.gasPrice.toString()),r?.gasLimit&&(n["gas-limit"]=r.gasLimit.toString()),(await Ii(e,{method:"post",url:`chequebook/cashout/${t}`,responseType:"json",headers:n})).data.transactionHash}(this.getRequestOptionsForCall(r),e,t)}async depositTokens(e,t,r){return li(r),oi(e),t&&oi(t),async function(e,t,r){const n={};return r&&(n["gas-price"]=r.toString()),(await Ii(e,{method:"post",url:"chequebook/deposit",responseType:"json",params:{amount:t.toString(10)},headers:n})).data.transactionHash}(this.getRequestOptionsForCall(r),e,t)}async withdrawTokens(e,t,r){return li(r),oi(e),t&&oi(t),async function(e,t,r){const n={};return r&&(n["gas-price"]=r.toString()),(await Ii(e,{method:"post",url:"chequebook/withdraw",responseType:"json",params:{amount:t.toString(10)},headers:n})).data.transactionHash}(this.getRequestOptionsForCall(r),e,t)}async getSettlements(e,t){return li(t),ui(e),async function(e,t){return(await Ii(e,{url:`settlements/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getAllSettlements(e){return li(e),async function(e){return(await Ii(e,{url:Uo,responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getStatus(e){return li(e),async function(e){return(await Ii(e,{method:"get",url:"status",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getHealth(e){return li(e),Zo(this.getRequestOptionsForCall(e))}async getReadiness(e){return li(e),async function(e){try{return 200===(await Ii(e,{method:"get",url:"readiness"})).status}catch{return!1}}(this.getRequestOptionsForCall(e))}async getNodeInfo(e){return li(e),async function(e){return(await Ii(e,{method:"get",url:"node",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async isSupportedVersion(e){return li(e),async function(e){return Yo(e)}(this.getRequestOptionsForCall(e))}async isSupportedExactVersion(e){return li(e),Yo(this.getRequestOptionsForCall(e))}async isSupportedMainApiVersion(e){return li(e),async function(e){const{apiVersion:t}=await Zo(e);return Ho()(t)===Ho()(Go)}(this.getRequestOptionsForCall(e))}async isSupportedDebugApiVersion(e){return li(e),Ko(this.getRequestOptionsForCall(e))}async isSupportedApiVersion(e){return li(e),Ko(this.getRequestOptionsForCall(e))}async getVersions(e){return li(e),async function(e){const{version:t,apiVersion:r,debugApiVersion:n}=await Zo(e);return{supportedBeeVersion:Vo,supportedBeeApiVersion:Go,supportedBeeDebugApiVersion:Xo,beeVersion:t,beeApiVersion:r,beeDebugApiVersion:n}}(this.getRequestOptionsForCall(e))}async getReserveState(e){return li(e),async function(e){return(await Ii(e,{method:"get",url:"reservestate",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getChainState(e){return li(e),async function(e){return(await Ii(e,{method:"get",url:"chainstate",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getWalletBalance(e){return li(e),async function(e){const t=await Ii(e,{method:"get",url:"wallet",responseType:"json"});return{bzz:(r=t.data).bzzBalance,xDai:r.nativeTokenBalance,contractAddress:r.chequebookContractAddress,...r};var r}(this.getRequestOptionsForCall(e))}async createPostageBatch(e,t,r,n){if(function(e){if(void 0===e)return;ri(e);const t=e;li(t,"PostageBatchOptions"),t?.gasPrice&&oi(t.gasPrice),void 0!==t?.immutableFlag&&ni(t.immutableFlag),void 0!==t?.waitForUsable&&ni(t.waitForUsable),void 0!==t?.waitForUsableTimeout&&oi(t.waitForUsableTimeout,"options.waitForUsableTimeout")}(r),function(e,t="Value"){if(ii(e,t),Number(e)<=0)throw new p(`${t} has to be bigger then zero`,e)}(e),oi(t),t<Y)throw new p(`Depth has to be at least ${Y}`,t);if(t>K)throw new p(`Depth has to be at most ${K}`,t);const i=await async function(e,t,r,n){const i={};return n?.gasPrice&&(i["gas-price"]=n.gasPrice.toString()),void 0!==n?.immutableFlag&&(i.immutable=String(n.immutableFlag)),(await Ii(e,{method:"post",url:`stamps/${t}/${r}`,responseType:"json",params:{label:n?.label},headers:i})).data.batchID}(this.getRequestOptionsForCall(n),e,t,r);return!1!==r?.waitForUsable&&await this.waitForUsablePostageStamp(i,r?.waitForUsableTimeout),i}async topUpBatch(e,t,r){li(r),oi(t,"Amount"),di(e),await async function(e,t,r){return(await Ii(e,{method:"patch",url:`stamps/topup/${t}/${r}`,responseType:"json"})).data.batchID}(this.getRequestOptionsForCall(r),e,t)}async diluteBatch(e,t,r){li(r),oi(t,"Depth"),di(e),await async function(e,t,r){return(await Ii(e,{method:"patch",url:`stamps/dilute/${t}/${r}`,responseType:"json"})).data.batchID}(this.getRequestOptionsForCall(r),e,t)}async getPostageBatch(e,t){return li(t),di(e),async function(e,t){return(await Ii(e,{method:"get",url:`stamps/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getPostageBatchBuckets(e,t){return li(t),di(e),async function(e,t){return(await Ii(e,{method:"get",url:`stamps/${t}/buckets`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getAllPostageBatch(e){return li(e),async function(e){return(await Ii(e,{method:"get",url:"stamps",responseType:"json"})).data.stamps}(this.getRequestOptionsForCall(e))}async getAllGlobalPostageBatch(e){return li(e),async function(e){return(await Ii(e,{method:"get",url:"batches",responseType:"json"})).data.stamps}(this.getRequestOptionsForCall(e))}async getAllPendingTransactions(e){return li(e),async function(e){return(await Ii(e,{url:Qo,responseType:"json"})).data.pendingTransactions}(this.getRequestOptionsForCall(e))}async getPendingTransaction(e,t){return li(t),wi(e),async function(e,t){return(await Ii(e,{url:`transactions/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async rebroadcastPendingTransaction(e,t){return li(t),wi(e),async function(e,t){return(await Ii(e,{method:"post",url:`transactions/${t}`,responseType:"json"})).data.transactionHash}(this.getRequestOptionsForCall(t),e)}async cancelPendingTransaction(e,t,r){return li(r),wi(e),t&&oi(t),async function(e,t,r){const n={};return r&&(n["gas-price"]=r),(await Ii(e,{method:"delete",headers:n,url:`transactions/${t}`,responseType:"json"})).data.transactionHash}(this.getRequestOptionsForCall(r),e,t)}async getStake(e){return li(e),async function(e){return(await Ii(e,{method:"get",responseType:"json",url:"stake"})).data.stakedAmount.toString()}(this.getRequestOptionsForCall(e))}async depositStake(e,t,r){li(t),mi(t),await async function(e,t,r){const n={};r?.gasPrice&&(n["gas-price"]=r.gasPrice.toString()),r?.gasLimit&&(n["gas-limit"]=r.gasLimit.toString()),await Ii(e,{method:"post",responseType:"json",url:`stake/${t}`,headers:n})}(this.getRequestOptionsForCall(r),e,t)}async getRedistributionState(e){return li(e),async function(e){return(await Ii(e,{method:"get",responseType:"json",url:"redistributionstate"})).data}(this.getRequestOptionsForCall(e))}async waitForUsablePostageStamp(e,t=24e4){for(let n=0;n<t;n+=2e3){try{if((await this.getPostageBatch(e)).usable)return}catch(r){if(!(r?.response?.data?.message||r?.message||"").includes("batch not usable"))throw r}await u.sleepMillis(2e3)}throw new h("Timeout on waiting for postage stamp to become usable")}getRequestOptionsForCall(e){return e?c.deepMerge2(this.requestOptions,e):this.requestOptions}}function ta(e){if("string"!=typeof e)throw new TypeError("target has to be an string!");return e.slice(0,W)}function ra(e,t,r){return e/Math.pow(2,t-r)}function na(e){return 2**e*4096}const ia={22:.2867,23:.4956,24:.6433,25:.7478,26:.8217,27:.8739,28:.9108,29:.9369,30:.9554,31:.9685,32:.9777,33:.9842,34:.9889};function oa(e){if(e<22)return 0;const t=ia[e]??.99;return na(e)*t}function aa(e,t){return 2**e*t}function sa(e,t){return aa(e,t)/10**16}function ca(e,t=24e3,r=5){return e*r/t}function fa(e){return(41472e4*(e<=0?1:e)).toString()}function ua(e){return e<=1?18:Math.ceil(Math.log2(Math.ceil(e))+18)}})(),n})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.BeeJs=t():e.BeeJs=t()}(this,(()=>(()=>{var e={6174:(e,t,r)=>{"use strict";t.zB=t.Lg=t.lW=t.rL=t.TC=t.tA=t.gO=void 0;const n=r(5151),i=r(8335);var o;t.gO=27,t.tA=250,t.TC=251,t.rL=64,function(e){e.FEED="feed",e.MANIFEST="manifest"}(o=t.lW||(t.lW={}));const a={[t.TC]:o.FEED,[t.tA]:o.MANIFEST};function s(e){return"string"==typeof e&&(e=n.CID.parse(e)),{reference:f(e.multihash.digest),type:a[e.code]}}function c(e,r){!function(e){if(u(e),e.length!==t.rL)throw new TypeError("Reference does not have expected length 64 characters. Encrypted references are not supported.")}(e);const o=function(e){u(e);const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const n=e.substr(2*r,2);t[r]=parseInt(n,16)}return t}(e);return n.CID.createV1(r,(0,i.create)(t.gO,o))}function f(e,t){const r=Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("");if(t&&r.length!==t)throw new TypeError(`Resulting HexString does not have expected length ${t}: ${r}`);return r}function u(e,t,r="value"){if(!function(e,t){return"string"==typeof e&&/^[0-9a-f]+$/i.test(e)&&(!t||e.length===t)}(e,t)){throw new TypeError(`${r} not valid hex string${t?` of length ${t}`:""}: ${e}`)}}t.Lg=function(e,r){switch(r){case o.FEED:return c(e,t.TC);case o.MANIFEST:return c(e,t.tA);default:throw new Error("Unknown reference type.")}},t.zB=function(e){return s(e)}},4559:(e,t,r)=>{e.exports=r(9335)},1786:(e,t,r)=>{"use strict";var n=r(8266),i=r(5608),o=r(159),a=r(9568),s=r(3943),c=r(8201),f=r(1745),u=r(4765),d=r(2477),l=r(4132),h=r(4392),p=r(4575);e.exports=function(e){return new Promise((function(t,r){var b,m=e.data,y=e.headers,g=e.responseType,w=e.withXSRFToken;function v(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}n.isFormData(m)&&n.isStandardBrowserEnv()&&delete y["Content-Type"];var _=new XMLHttpRequest;if(e.auth){var S=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";y.Authorization="Basic "+btoa(S+":"+E)}var M=s(e.baseURL,e.url);function A(){if(_){var n="getAllResponseHeaders"in _?c(_.getAllResponseHeaders()):null,o={data:g&&"text"!==g&&"json"!==g?_.response:_.responseText,status:_.status,statusText:_.statusText,headers:n,config:e,request:_};i((function(e){t(e),v()}),(function(e){r(e),v()}),o),_=null}}if(_.open(e.method.toUpperCase(),a(M,e.params,e.paramsSerializer),!0),_.timeout=e.timeout,"onloadend"in _?_.onloadend=A:_.onreadystatechange=function(){_&&4===_.readyState&&(0!==_.status||_.responseURL&&0===_.responseURL.indexOf("file:"))&&setTimeout(A)},_.onabort=function(){_&&(r(new d("Request aborted",d.ECONNABORTED,e,_)),_=null)},_.onerror=function(){r(new d("Network Error",d.ERR_NETWORK,e,_)),_=null},_.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new d(t,n.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,_)),_=null},n.isStandardBrowserEnv()&&(w&&n.isFunction(w)&&(w=w(e)),w||!1!==w&&f(M))){var R=e.xsrfHeaderName&&e.xsrfCookieName&&o.read(e.xsrfCookieName);R&&(y[e.xsrfHeaderName]=R)}"setRequestHeader"in _&&n.forEach(y,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete y[t]:_.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(_.withCredentials=!!e.withCredentials),g&&"json"!==g&&(_.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&_.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&_.upload&&_.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(b=function(t){_&&(r(!t||t.type?new l(null,e,req):t),_.abort(),_=null)},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b))),m||!1===m||0===m||""===m||(m=null);var T=h(M);T&&-1===p.protocols.indexOf(T)?r(new d("Unsupported protocol "+T+":",d.ERR_BAD_REQUEST,e)):_.send(m)}))}},9335:(e,t,r)=>{"use strict";var n=r(8266),i=r(4345),o=r(7929),a=r(650),s=r(3101),c=r(9462);var f=function e(t){var r=new o(t),s=i(o.prototype.request,r);return n.extend(s,o.prototype,r),n.extend(s,r),s.create=function(r){return e(a(t,r))},s}(s);f.Axios=o,f.CanceledError=r(4132),f.CancelToken=r(7510),f.isCancel=r(8825),f.VERSION=r(992).version,f.toFormData=r(2011),f.AxiosError=r(2477),f.Cancel=f.CanceledError,f.all=function(e){return Promise.all(e)},f.spread=r(4346),f.isAxiosError=r(3276),f.formToJSON=function(e){return c(n.isHTMLForm(e)?new FormData(e):e)},e.exports=f,e.exports.default=f},7510:(e,t,r)=>{"use strict";var n=r(4132);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){for(var t=r._listeners.length;t-- >0;)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,i,o){r.reason||(r.reason=new n(e,i,o),t(r.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},4132:(e,t,r)=>{"use strict";var n=r(2477);function i(e,t,r){n.call(this,null==e?"canceled":e,n.ERR_CANCELED,t,r),this.name="CanceledError"}r(8266).inherits(i,n,{__CANCEL__:!0}),e.exports=i},8825:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},7929:(e,t,r)=>{"use strict";var n=r(8266),i=r(9568),o=r(6252),a=r(6029),s=r(650),c=r(3943),f=r(123),u=f.validators;function d(e){this.defaults=e,this.interceptors={request:new o,response:new o}}d.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&f.assertOptions(r,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var i=t.paramsSerializer;n.isFunction(i)&&(t.paramsSerializer={serialize:i});var o=[],c=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));var d,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!c){var h=[a,void 0];for(Array.prototype.unshift.apply(h,o),h=h.concat(l),d=Promise.resolve(t);h.length;)d=d.then(h.shift(),h.shift());return d}for(var p=t;o.length;){var b=o.shift(),m=o.shift();try{p=b(p)}catch(y){m(y);break}}try{d=a(p)}catch(y){return Promise.reject(y)}for(;l.length;)d=d.then(l.shift(),l.shift());return d},d.prototype.getUri=function(e){e=s(this.defaults,e);var t=c(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(e){d.prototype[e]=function(t,r){return this.request(s(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(s(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}d.prototype[e]=t(),d.prototype[e+"Form"]=t(!0)})),e.exports=d},2477:(e,t,r)=>{"use strict";var n=r(8266);function i(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}n.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((function(e){a[e]={value:e}})),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=function(e,t,r,a,s,c){var f=Object.create(o);return n.toFlatObject(e,f,(function(e){return e!==Error.prototype})),i.call(f,e.message,t,r,a,s),f.cause=e,f.name=e.name,c&&Object.assign(f,c),f},e.exports=i},6252:(e,t,r)=>{"use strict";var n=r(8266);function i(){this.handlers=[]}i.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.clear=function(){this.handlers&&(this.handlers=[])},i.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},3943:(e,t,r)=>{"use strict";var n=r(406),i=r(5027);e.exports=function(e,t){return e&&!n(t)?i(e,t):t}},6029:(e,t,r)=>{"use strict";var n=r(8266),i=r(2661),o=r(8825),a=r(3101),s=r(4132),c=r(1490);function f(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return f(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,null,e.transformRequest),c(e.headers,"Accept"),c(e.headers,"Content-Type"),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return f(e),t.data=i.call(e,t.data,t.headers,t.status,e.transformResponse),t}),(function(t){return o(t)||(f(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)}))}},650:(e,t,r)=>{"use strict";var n=r(8266);e.exports=function(e,t){t=t||{};var r={};function i(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isEmptyObject(t)?n.merge({},e):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function o(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(e[r],t[r])}function a(e){if(!n.isUndefined(t[e]))return i(void 0,t[e])}function s(r){return n.isUndefined(t[r])?n.isUndefined(e[r])?void 0:i(void 0,e[r]):i(void 0,t[r])}function c(r){return r in t?i(e[r],t[r]):r in e?i(void 0,e[r]):void 0}var f={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return n.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=f[e]||o,i=t(e);n.isUndefined(i)&&t!==c||(r[e]=i)})),r}},5608:(e,t,r)=>{"use strict";var n=r(2477);e.exports=function(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}},2661:(e,t,r)=>{"use strict";var n=r(8266),i=r(3101);e.exports=function(e,t,r,o){var a=this||i;return n.forEach(o,(function(n){e=n.call(a,e,t,r)})),e}},3101:(e,t,r)=>{"use strict";var n=r(8266),i=r(1490),o=r(2477),a=r(4765),s=r(2011),c=r(7702),f=r(4575),u=r(9462),d={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var h,p={transitional:a,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(h=r(1786)),h),transformRequest:[function(e,t){i(t,"Accept"),i(t,"Content-Type");var r,o=t&&t["Content-Type"]||"",a=o.indexOf("application/json")>-1,f=n.isObject(e);if(f&&n.isHTMLForm(e)&&(e=new FormData(e)),n.isFormData(e))return a?JSON.stringify(u(e)):e;if(n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e))return e;if(n.isArrayBufferView(e))return e.buffer;if(n.isURLSearchParams(e))return l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();if(f){if(-1!==o.indexOf("application/x-www-form-urlencoded"))return c(e,this.formSerializer).toString();if((r=n.isFileList(e))||o.indexOf("multipart/form-data")>-1){var d=this.env&&this.env.FormData;return s(r?{"files[]":e}:e,d&&new d,this.formSerializer)}}return f||a?(l(t,"application/json"),function(e,t,r){if(n.isString(e))try{return(t||JSON.parse)(e),n.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||p.transitional,r=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&n.isString(e)&&(r&&!this.responseType||i)){var a=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(s){if(a){if("SyntaxError"===s.name)throw o.from(s,o.ERR_BAD_RESPONSE,this,null,this.response);throw s}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:f.classes.FormData,Blob:f.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){p.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){p.headers[e]=n.merge(d)})),e.exports=p},4765:e=>{"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},3880:(e,t,r)=>{e.exports=r(8612)},992:e=>{e.exports={version:"0.28.0"}},6971:(e,t,r)=>{"use strict";var n=r(2011);function i(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return t[e]}))}function o(e,t){this._pairs=[],e&&n(e,this,t)}var a=o.prototype;a.append=function(e,t){this._pairs.push([e,t])},a.toString=function(e){var t=e?function(t){return e.call(this,t,i)}:i;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")},e.exports=o},4345:e=>{"use strict";e.exports=function(e,t){return function(){return e.apply(t,arguments)}}},9568:(e,t,r)=>{"use strict";var n=r(8266),i=r(6971);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,r){if(!t)return e;var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a));var s=r&&r.encode||o,c=n.isURLSearchParams(t)?t.toString():new i(t,r).toString(s);return c&&(e+=(-1===e.indexOf("?")?"?":"&")+c),e}},5027:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},159:(e,t,r)=>{"use strict";var n=r(8266);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,r,i,o,a){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(i)&&s.push("path="+i),n.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},9462:(e,t,r)=>{"use strict";var n=r(8266);e.exports=function(e){function t(e,r,i,o){var a=e[o++],s=Number.isFinite(+a),c=o>=e.length;return a=!a&&n.isArray(i)?i.length:a,c?(n.hasOwnProperty(i,a)?i[a]=[i[a],r]:i[a]=r,!s):(i[a]&&n.isObject(i[a])||(i[a]=[]),t(e,r,i[a],o)&&n.isArray(i[a])&&(i[a]=function(e){var t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(i[a])),!s)}if(n.isFormData(e)&&n.isFunction(e.entries)){var r={};return n.forEachEntry(e,(function(e,i){t(function(e){return n.matchAll(/\w+|\[(\w*)]/g,e).map((function(e){return"[]"===e[0]?"":e[1]||e[0]}))}(e),i,r,0)})),r}return null}},406:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},3276:(e,t,r)=>{"use strict";var n=r(8266);e.exports=function(e){return n.isObject(e)&&!0===e.isAxiosError}},1745:(e,t,r)=>{"use strict";var n=r(8266);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function i(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=i(window.location.href),function(t){var r=n.isString(t)?i(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0}},1490:(e,t,r)=>{"use strict";var n=r(8266);e.exports=function(e,t){n.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},8201:(e,t,r)=>{"use strict";var n=r(8266),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,r,o,a={};return e?(n.forEach(e.split("\n"),(function(e){if(o=e.indexOf(":"),t=n.trim(e.slice(0,o)).toLowerCase(),r=n.trim(e.slice(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},4392:e=>{"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},4346:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},2011:(e,t,r)=>{"use strict";var n=r(8266),i=r(2477),o=r(3880);function a(e){return n.isPlainObject(e)||n.isArray(e)}function s(e){return n.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,r){return e?e.concat(t).map((function(e,t){return e=s(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}var f=n.toFlatObject(n,{},null,(function(e){return/^is[A-Z]/.test(e)}));e.exports=function(e,t,r){if(!n.isObject(e))throw new TypeError("target must be an object");t=t||new(o||FormData);var u,d=(r=n.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!n.isUndefined(t[e])}))).metaTokens,l=r.visitor||y,h=r.dots,p=r.indexes,b=(r.Blob||"undefined"!=typeof Blob&&Blob)&&((u=t)&&n.isFunction(u.append)&&"FormData"===u[Symbol.toStringTag]&&u[Symbol.iterator]);if(!n.isFunction(l))throw new TypeError("visitor must be a function");function m(e){if(null===e)return"";if(n.isDate(e))return e.toISOString();if(!b&&n.isBlob(e))throw new i("Blob is not supported. Use a Buffer instead.");return n.isArrayBuffer(e)||n.isTypedArray(e)?b&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function y(e,r,i){var o=e;if(e&&!i&&"object"==typeof e)if(n.endsWith(r,"{}"))r=d?r:r.slice(0,-2),e=JSON.stringify(e);else if(n.isArray(e)&&function(e){return n.isArray(e)&&!e.some(a)}(e)||n.isFileList(e)||n.endsWith(r,"[]")&&(o=n.toArray(e)))return r=s(r),o.forEach((function(e,i){!n.isUndefined(e)&&t.append(!0===p?c([r],i,h):null===p?r:r+"[]",m(e))})),!1;return!!a(e)||(t.append(c(i,r,h),m(e)),!1)}var g=[],w=Object.assign(f,{defaultVisitor:y,convertValue:m,isVisitable:a});if(!n.isObject(e))throw new TypeError("data must be an object");return function e(r,i){if(!n.isUndefined(r)){if(-1!==g.indexOf(r))throw Error("Circular reference detected in "+i.join("."));g.push(r),n.forEach(r,(function(r,o){!0===(!n.isUndefined(r)&&l.call(t,r,n.isString(o)?o.trim():o,i,w))&&e(r,i?i.concat(o):[o])})),g.pop()}}(e),t}},7702:(e,t,r)=>{"use strict";var n=r(8266),i=r(2011),o=r(4575);e.exports=function(e,t){return i(e,new o.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,i){return o.isNode&&n.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}},123:(e,t,r)=>{"use strict";var n=r(992).version,i=r(2477),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,r){function o(e,t){return"[Axios v"+n+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,n,s){if(!1===e)throw new i(o(n," has been removed"+(t?" in "+t:"")),i.ERR_DEPRECATED);return t&&!a[n]&&(a[n]=!0,console.warn(o(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,s)}},e.exports={assertOptions:function(e,t,r){if("object"!=typeof e)throw new i("options must be an object",i.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var a=n[o],s=t[a];if(s){var c=e[a],f=void 0===c||s(c,a,e);if(!0!==f)throw new i("option "+a+" must be "+f,i.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new i("Unknown option "+a,i.ERR_BAD_OPTION)}},validators:o}},2670:e=>{"use strict";e.exports=FormData},2981:(e,t,r)=>{"use strict";var n=r(6971);e.exports="undefined"!=typeof URLSearchParams?URLSearchParams:n},4294:(e,t,r)=>{"use strict";e.exports={isBrowser:!0,classes:{URLSearchParams:r(2981),FormData:r(2670),Blob:Blob},protocols:["http","https","file","blob","url","data"]}},4575:(e,t,r)=>{"use strict";e.exports=r(4294)},8266:(e,t,r)=>{"use strict";var n,i=r(4345),o=Object.prototype.toString,a=(n=Object.create(null),function(e){var t=o.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function c(e){return Array.isArray(e)}function f(e){return void 0===e}var u=s("ArrayBuffer");function d(e){return"number"==typeof e}function l(e){return null!==e&&"object"==typeof e}function h(e){if("object"!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var p=s("Date"),b=s("File"),m=s("Blob"),y=s("FileList");function g(e){return"[object Function]"===o.call(e)}var w=s("URLSearchParams");function v(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var _,S=(_="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return _&&e instanceof _});var E,M=s("HTMLFormElement"),A=(E=Object.prototype.hasOwnProperty,function(e,t){return E.call(e,t)});e.exports={isArray:c,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||g(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:d,isObject:l,isPlainObject:h,isEmptyObject:function(e){return e&&0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype},isUndefined:f,isDate:p,isFile:b,isBlob:m,isFunction:g,isStream:function(e){return l(e)&&g(e.pipe)},isURLSearchParams:w,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:v,merge:function e(){var t={};function r(r,n){h(t[n])&&h(r)?t[n]=e(t[n],r):h(r)?t[n]=e({},r):c(r)?t[n]=r.slice():t[n]=r}for(var n=0,i=arguments.length;n<i;n++)v(arguments[n],r);return t},extend:function(e,t,r){return v(t,(function(t,n){e[n]=r&&"function"==typeof t?i(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(c(e))return e;var t=e.length;if(!d(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:S,isFileList:y,forEachEntry:function(e,t){for(var r,n=(e&&e[Symbol.iterator]).call(e);(r=n.next())&&!r.done;){var i=r.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:M,hasOwnProperty:A}},9919:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(A){}function s(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function c(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function f(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=c(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=c(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,c=0,u=r;u<s;u+=n)c=f(e,u,u+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var d=1;for(c=f(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var f=1;f<n;f++){for(var u=c>>>26,d=67108863&c,l=Math.min(f,t.length-1),h=Math.max(0,f-e.length+1);h<=l;h++){var p=f-h|0;u+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[f]=0|d,c=0|u}return 0!==c?r.words[f]=0|c:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<i|o)).toString(16);r=0!==(o=s>>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+r:c+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var f=d[e],h=l[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?b+r:u[f-b.length]+b+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,f=new e(o),u=this.clone();if(c){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),f[s]=a;for(;s<o;s++)f[s]=0}else{for(s=0;s<o-i;s++)f[s]=0;for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),f[o-s-1]=a}return f},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,a=e.words,s=t.words,c=r.words,f=0,u=0|a[0],d=8191&u,l=u>>>13,h=0|a[1],p=8191&h,b=h>>>13,m=0|a[2],y=8191&m,g=m>>>13,w=0|a[3],v=8191&w,_=w>>>13,S=0|a[4],E=8191&S,M=S>>>13,A=0|a[5],R=8191&A,T=A>>>13,x=0|a[6],O=8191&x,I=x>>>13,C=0|a[7],P=8191&C,k=C>>>13,q=0|a[8],N=8191&q,F=q>>>13,j=0|a[9],$=8191&j,L=j>>>13,B=0|s[0],z=8191&B,D=B>>>13,U=0|s[1],W=8191&U,H=U>>>13,V=0|s[2],G=8191&V,X=V>>>13,J=0|s[3],Z=8191&J,Y=J>>>13,K=0|s[4],Q=8191&K,ee=K>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,fe=se>>>13,ue=0|s[8],de=8191&ue,le=ue>>>13,he=0|s[9],pe=8191&he,be=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(f+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,D))+Math.imul(l,z)|0))<<13)|0;f=((o=Math.imul(l,D))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,D))+Math.imul(b,z)|0,o=Math.imul(b,D);var ye=(f+(n=n+Math.imul(d,W)|0)|0)+((8191&(i=(i=i+Math.imul(d,H)|0)+Math.imul(l,W)|0))<<13)|0;f=((o=o+Math.imul(l,H)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,z),i=(i=Math.imul(y,D))+Math.imul(g,z)|0,o=Math.imul(g,D),n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,H)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,H)|0;var ge=(f+(n=n+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(l,G)|0))<<13)|0;f=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(v,z),i=(i=Math.imul(v,D))+Math.imul(_,z)|0,o=Math.imul(_,D),n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,H)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,H)|0,n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,X)|0;var we=(f+(n=n+Math.imul(d,Z)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(l,Z)|0))<<13)|0;f=((o=o+Math.imul(l,Y)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,D))+Math.imul(M,z)|0,o=Math.imul(M,D),n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,H)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,H)|0,n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0;var ve=(f+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;f=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,D))+Math.imul(T,z)|0,o=Math.imul(T,D),n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,H)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,H)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,Y)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Y)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(f+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;f=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(O,z),i=(i=Math.imul(O,D))+Math.imul(I,z)|0,o=Math.imul(I,D),n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(M,G)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(b,re)|0,o=o+Math.imul(b,ne)|0;var Se=(f+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(l,oe)|0))<<13)|0;f=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(P,z),i=(i=Math.imul(P,D))+Math.imul(k,z)|0,o=Math.imul(k,D),n=n+Math.imul(O,W)|0,i=(i=i+Math.imul(O,H)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,H)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(E,Z)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(f+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,fe)|0)+Math.imul(l,ce)|0))<<13)|0;f=((o=o+Math.imul(l,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(N,z),i=(i=Math.imul(N,D))+Math.imul(F,z)|0,o=Math.imul(F,D),n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,n=n+Math.imul(O,G)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=(i=i+Math.imul(v,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,fe)|0)+Math.imul(b,ce)|0,o=o+Math.imul(b,fe)|0;var Me=(f+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;f=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul($,z),i=(i=Math.imul($,D))+Math.imul(L,z)|0,o=Math.imul(L,D),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(F,W)|0,o=o+Math.imul(F,H)|0,n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,Y)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(v,oe)|0,i=(i=i+Math.imul(v,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(y,ce)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,fe)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(b,de)|0,o=o+Math.imul(b,le)|0;var Ae=(f+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,be)|0)+Math.imul(l,pe)|0))<<13)|0;f=((o=o+Math.imul(l,be)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul($,W),i=(i=Math.imul($,H))+Math.imul(L,W)|0,o=Math.imul(L,H),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(F,G)|0,o=o+Math.imul(F,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,Y)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,ae)|0,n=n+Math.imul(v,ce)|0,i=(i=i+Math.imul(v,fe)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,fe)|0,n=n+Math.imul(y,de)|0,i=(i=i+Math.imul(y,le)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,le)|0;var Re=(f+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;f=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul($,G),i=(i=Math.imul($,X))+Math.imul(L,G)|0,o=Math.imul(L,X),n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,Y)|0)+Math.imul(F,Z)|0,o=o+Math.imul(F,Y)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(O,re)|0,i=(i=i+Math.imul(O,ne)|0)+Math.imul(I,re)|0,o=o+Math.imul(I,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,fe)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(v,de)|0,i=(i=i+Math.imul(v,le)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,le)|0;var Te=(f+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,be)|0)+Math.imul(g,pe)|0))<<13)|0;f=((o=o+Math.imul(g,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul($,Z),i=(i=Math.imul($,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(F,Q)|0,o=o+Math.imul(F,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,n=n+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,fe)|0)+Math.imul(T,ce)|0,o=o+Math.imul(T,fe)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,le)|0;var xe=(f+(n=n+Math.imul(v,pe)|0)|0)+((8191&(i=(i=i+Math.imul(v,be)|0)+Math.imul(_,pe)|0))<<13)|0;f=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul($,Q),i=(i=Math.imul($,ee))+Math.imul(L,Q)|0,o=Math.imul(L,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(F,re)|0,o=o+Math.imul(F,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,fe)|0)+Math.imul(I,ce)|0,o=o+Math.imul(I,fe)|0,n=n+Math.imul(R,de)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Oe=(f+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(M,pe)|0))<<13)|0;f=((o=o+Math.imul(M,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul($,re),i=(i=Math.imul($,ne))+Math.imul(L,re)|0,o=Math.imul(L,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,ae)|0)+Math.imul(F,oe)|0,o=o+Math.imul(F,ae)|0,n=n+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,fe)|0)+Math.imul(k,ce)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(O,de)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(I,de)|0,o=o+Math.imul(I,le)|0;var Ie=(f+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,be)|0)+Math.imul(T,pe)|0))<<13)|0;f=((o=o+Math.imul(T,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul($,oe),i=(i=Math.imul($,ae))+Math.imul(L,oe)|0,o=Math.imul(L,ae),n=n+Math.imul(N,ce)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(F,ce)|0,o=o+Math.imul(F,fe)|0,n=n+Math.imul(P,de)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,le)|0;var Ce=(f+(n=n+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,be)|0)+Math.imul(I,pe)|0))<<13)|0;f=((o=o+Math.imul(I,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul($,ce),i=(i=Math.imul($,fe))+Math.imul(L,ce)|0,o=Math.imul(L,fe),n=n+Math.imul(N,de)|0,i=(i=i+Math.imul(N,le)|0)+Math.imul(F,de)|0,o=o+Math.imul(F,le)|0;var Pe=(f+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,be)|0)+Math.imul(k,pe)|0))<<13)|0;f=((o=o+Math.imul(k,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul($,de),i=(i=Math.imul($,le))+Math.imul(L,de)|0,o=Math.imul(L,le);var ke=(f+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,be)|0)+Math.imul(F,pe)|0))<<13)|0;f=((o=o+Math.imul(F,be)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863;var qe=(f+(n=Math.imul($,pe))|0)+((8191&(i=(i=Math.imul($,be))+Math.imul(L,pe)|0))<<13)|0;return f=((o=Math.imul(L,be))+(i>>>13)|0)+(qe>>>26)|0,qe&=67108863,c[0]=me,c[1]=ye,c[2]=ge,c[3]=we,c[4]=ve,c[5]=_e,c[6]=Se,c[7]=Ee,c[8]=Me,c[9]=Ae,c[10]=Re,c[11]=Te,c[12]=xe,c[13]=Oe,c[14]=Ie,c[15]=Ce,c[16]=Pe,c[17]=ke,c[18]=qe,0!==f&&(c[19]=f,r.length++),r};function b(e,t,r){return(new m).mulp(e,t,r)}function m(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?h(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,c=Math.min(o,t.length-1),f=Math.max(0,o-e.length+1);f<=c;f++){var u=o-f,d=(0|e.words[u])*(0|t.words[f]),l=67108863&d;s=67108863&(l=l+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):b(this,e,t),r},m.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},m.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},m.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},m.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,c=Math.cos(2*Math.PI/s),f=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var d=c,l=f,h=0;h<a;h++){var p=r[u+h],b=n[u+h],m=r[u+h+a],y=n[u+h+a],g=d*m-l*y;y=d*y+l*m,m=g,r[u+h]=p+m,n[u+h]=b+y,r[u+h+a]=p-m,n[u+h+a]=b-y,h!==s&&(g=c*d-f*l,l=c*l+f*d,d=g)}},m.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},m.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},m.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},m.prototype.convert13b=function(e,t,r,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],r[2*a]=8191&o,o>>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)r[a]=0;n(0===o),n(0==(-8192&o))},m.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},m.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),c=new Array(n),f=new Array(n),u=new Array(n),d=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,f,n),this.transform(a,o,s,c,n,i),this.transform(f,o,u,d,n,i);for(var h=0;h<n;h++){var p=s[h]*u[h]-c[h]*d[h];c[h]=s[h]*d[h]+c[h]*u[h],s[h]=p}return this.conjugate(s,c,n),this.transform(s,c,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,c=(0|this.words[t])-s<<r;this.words[t]=c|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,c=r;if(i-=a,i=Math.max(0,i),c){for(var f=0;f<a;f++)c.words[f]=this.words[f];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,f=0;f<this.length;f++)this.words[f]=this.words[f+a];else this.words[0]=0,this.length=1;var u=0;for(f=this.length-1;f>=0&&(0!==u||f>=i);f--){var d=0|this.words[f];this.words[f]=u<<26-o|d>>>o,u=d&s}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,a=e.length+r;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var c=(0|e.words[i])*t;s=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,c=n.length-i.length;if("mod"!==t){(s=new o(null)).length=c+1,s.words=new Array(s.length);for(var f=0;f<s.length;f++)s.words[f]=0}var u=n.clone()._ishlnsubmul(i,1,c);0===u.negative&&(n=u,s&&(s.words[c]=1));for(var d=c-1;d>=0;d--){var l=67108864*(0|n.words[i.length+d])+(0|n.words[i.length+d-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(i,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),c=new o(1),f=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++f;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0==(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(u),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(c)):(r.isub(t),s.isub(i),c.isub(a))}return{a:s,b:c,gcd:r.iushln(f)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var f=0,u=1;0==(t.words[0]&u)&&f<26;++f,u<<=1);if(f>0)for(t.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,l=1;0==(r.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,a=r;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(w,g),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(v,g),i(_,g),i(S,g),S.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new v;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return y[e]=t,t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),c=s.redNeg(),f=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,f).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),l=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var b=h,m=0;0!==b.cmp(s);m++)b=b.redSqr();n(m<p);var y=this.pow(d,new o(1).iushln(p-m-1));l=l.redMul(y),d=y.redSqr(),h=h.redMul(d),p=m}return l},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],a=0,s=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var f=t.words[n],u=c-1;u>=0;u--){var d=f>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}c=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new M(e)},i(M,E),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},7056:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(9214);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(a){}},4615:(e,t)=>{"use strict";async function r(e){return new Promise(((t,r)=>e.then(r,t)))}async function n(e){return new Promise((t=>setTimeout((()=>{t(!0)}),e)))}function i(e,t=Math.random){for(let r=e.length-1;r>0;r--){const n=Math.floor(t()*(r+1)),i=e[r];e[r]=e[n],e[n]=i}return e}function o(e,t,r=Math.random){return i(P(0,e.length-1),r).slice(0,t)}function a(e,t=Math.random){return e[Math.floor(e.length*t())]}function s(e){return e[e.length-1]}function c(e,t){const r=t.split(".");let n=e;for(const i of r){if(!n[i])return n[i];n=n[i]}return n}function f(e,t,r){const n=t.split(/\.|\[/);let i=e;for(let o=0;o<n.length;o++){const e=n[o],t=o<n.length-1&&n[o+1].includes("]"),a=e.includes("]")?e.replace(/\[|\]/g,""):e;if(o===n.length-1)return i[a]=r,r;u(i[a])||(i[a]=t?[]:{}),i=i[a]}return r}function u(e,t=!0){return!(!e||t&&!h(e._readableState)||t&&e.constructor&&(e.constructor.isBuffer||"Uint8Array"==e.constructor.name||"ArrayBuffer"===e.constructor.name))&&"object"==typeof e}function d(e){return u(e)&&!Array.isArray(e)}function l(e){return Array.isArray(e)&&0===e.length}function h(e){return typeof e>"u"}function p(e){return"[object Function]"===Object.prototype.toString.call(e)}function b(e){return"[object String]"===Object.prototype.toString.call(e)}function m(e){return"number"==typeof e&&isFinite(e)}function y(e){return!0===e||!1===e}function g(e){return"[object Date]"===Object.prototype.toString.call(e)}function w(e){return!b(e)||0===e.trim().length}function v(e){return m(e)&&Number.isInteger(e)&&e>=1}t.OW=t.Ct=t.Gi=t.eI=t.Yk=t.tl=t.WP=t.L0=t.jT=t.uI=t.xP=t.tk=t.kk=t.Fi=void 0;const _="!@#$%^&*()_+-=[]{}|;:<>?,./".split(""),S="abcdefghijklmnopqrstuvwxyz",E=S+"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890",M=E+"!@#$%^&*()_+-=[]{}|;:<>?,./",A=["—","\\","東","京","都","𝖆","𝖇","𝖈","👾","🙇","💁","🙅"],R="0123456789abcdef";function T(e){if(m(e))return e;if(!b(e)||!e.match(/^-?\d+(\.\d+)?$/))throw new TypeError("Expected number, got: "+e);return parseFloat(e)}function x(e,t){for(const[r,n]of Object.entries(t))if(!n(e[r]))throw TypeError(`${r} in value does not exist or match shape`);for(const r of Object.keys(e))if(!t[r])throw TypeError(`${r} exists in value but not in shape`);return!0}function O(e,t){if(d(e)&&d(t))for(const r in t)d(t[r])?(e[r]||(e[r]={}),O(e[r],t[r])):Array.isArray(t[r])?e[r]=[...t[r]]:(null!==t[r]&&void 0!==t[r]||null===e[r]||void 0===e[r])&&(e[r]=t[r]);return e}function I(e,t){const r={};for(const n of e)for(const e of Object.keys(n))r[e]?r[e]=t(r[e],n[e]):r[e]=n[e];return r}function C(e,t){Array.prototype.push.apply(e,t)}function P(e,t){const r=[];for(let n=e;n<=t;n++)r.push(n);return r}function k(e,t=(()=>!1)){return e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").split("").map((e=>/[a-z0-9]/.test(e)||t(e)?e:"-")).join("").replace(/-+/g,"-").replace(/^-|-$/g,"")}function q(e,t){if(0===t.length)return 0;const r=e.toLowerCase(),n=t.toLowerCase();return e===t?1e4:r.startsWith(n)?1e4-e.length:r.includes(n)?5e3-e.length:new RegExp(".*"+n.split("").join(".*")+".*").test(r)?1e3-e.length:0}const N={"&amp;":"&","&quot;":'"',"&apos;":"'","&gt;":">","&lt;":"<"};function F(e,t){const r=e.indexOf(t);return-1===r?null:e.slice(0,r)}function j(e,t){const r=e.indexOf(t);return-1===r?null:e.slice(r+t.length)}function $(e,t){const r=e.lastIndexOf(t);return-1===r?null:e.slice(0,r)}function L(e,t){const r=e.lastIndexOf(t);return-1===r?null:e.slice(r+t.length)}function B(e,t,r=!1){const n=r?e.lastIndexOf(t):e.indexOf(t);return-1===n?r?[null,e]:[e,null]:[e.slice(0,n),e.slice(n+t.length)]}function z(e,t){let r=[e];for(const n of t)r=r.flatMap((e=>e.split(n)));return r.filter((e=>e))}function D(e){const t=s(e.split(/\\|\//g)),r=t.lastIndexOf(".",t.length-1);return r<=0?"":t.slice(r+1)}function U(e){const t=s(e.split(/\\|\//g)),r=t.lastIndexOf(".",t.length-1);return r<=0?t:t.slice(0,r)}function W(e){return e.charAt(0).toUpperCase()+e.slice(1)}function H(e){return e.charAt(0).toLowerCase()+e.slice(1)}function V(e){if(!e)return!1;const t=e.charCodeAt(0);return t>=65&&t<=90||t>=97&&t<=122}function G(e){if(!e)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}function X(e){return V(e)||G(e)}function J(e,t,r=0){const n=t.exec(e.slice(r));return n?{index:n.index,match:n[0]}:null}function Z(e,t,r=!0){if(!r)return t.every((t=>t instanceof RegExp?t.test(e):-1!==e.indexOf(t,0)));let n=0;for(const i of t)if(i instanceof RegExp){const t=J(e,i,n);if(!t)return!1;n=t.index+t.match.length}else{const t=e.indexOf(i,n);if(-1===t)return!1;n=t+i.length}return!0}function Y(e,t,r=0){let n=-1;for(const i of t){const t=e.indexOf(i,r);-1!==t&&(-1===n||t<n)&&(n=t)}return n}function K(e,t=0){for(let r=t;r<e.length;r++)if(!X(e[r]))return r;return-1}function Q(e,t=0){for(let r=t;r<e.length;r++)if("#"===e[r]&&X(e[r+1]))return r;return-1}function ee(e,t,r=0){return e.slice(0,r).lastIndexOf(t)}function te(e,t=0,r="{",n="}"){let i=1;for(let o=t;o<e.length;o++)if(e.slice(o,o+n.length)===n){if(0==--i)return o}else e.slice(o,o+r.length)===r&&i++;return-1}function re(e,t){const r=t.wordBoundary?Y(e,[`${t.opening} `,`${t.opening}\n`],t.start||0):e.indexOf(t.opening,t.start||0);if(-1===r)return null;const n=te(e,r+t.opening.length,t.opening,t.closing);return-1===n?null:t.exclusive?e.slice(r+t.opening.length,n):e.slice(r,n+t.closing.length)}const ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function ie(e,t,r){const n=[];for(const i of r)i!==t&&n.push(e.replace(t,i));return n}function oe(e,t){return new RegExp(`\\b${t}\\b`).test(e)}function ae(e,t,r=[]){let n="";for(;t<e.length&&(X(e[t])||r.includes(e[t]));)n+=e[t++];return n}function se(e,t,r,n="$",i=":"){if(""===r)return e;let o=e.indexOf(`${n}${t}`);for(;-1!==o;){if(e[o+t.length+1]===i)if(e[o+t.length+2]===i)e=e.replace(`${n}${t}${i}${i}`,r);else{const a=ae(e,o+t.length+2,["_"]);e=e.replace(`${n}${t}${i}${a}`,r)}else e=e.replace(`${n}${t}`,r);o=e.indexOf(`${n}${t}`,o+r.length)}return e}function ce(e,t="$",r=":"){let n=e.indexOf(t);for(;-1!==n;){const i=ae(e,n+1);if(e[n+i.length+1]===r)if(e[n+i.length+2]===r)e=e.replace(`${t}${i}${r}${r}`,"");else{const o=ae(e,n+i.length+2);e=e.replace(`${t}${i}${r}${o}`,o)}n=e.indexOf(t,n+1)}return e}function fe(e,t=!0){const r=Object.entries(e).filter((([e,t])=>null!=t)).map((([e,t])=>`${e}=${encodeURIComponent(t)}`)).join("&");return r?(t?"?":"")+r:""}function ue(e){return String(Math.floor(e)).padStart(2,"0")}function de(e){const t=Math.floor(e/36e5);e%=36e5;const r=Math.floor(e/6e4);e%=6e4;const n=Math.floor(e/1e3);return t?`${ue(t)}:${ue(r)}:${ue(n)}`:`${ue(r)}:${ue(n)}`}const le={};const he={s:1e3,m:6e4,h:36e5,d:864e5};const pe={0:"sunday",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday"};function be(e){return{zeroBasedIndex:e,day:pe[e]}}function me(e){return be(e.getDay())}const ye=[["ms",1],["milli",1],["millis",1],["millisecond",1],["milliseconds",1],["s",1e3],["sec",1e3],["second",1e3],["seconds",1e3],["m",6e4],["min",6e4],["minute",6e4],["minutes",6e4],["h",36e5],["hour",36e5],["hours",36e5],["d",864e5],["day",864e5],["days",864e5],["w",6048e5],["week",6048e5],["weeks",6048e5]];const ge={};function we(...e){return e.filter((e=>e)).join("/").replace(/(?<!:)\/+/g,"/")}function ve(e){const t=Object.keys(e).sort(((e,t)=>e.localeCompare(t))),r={};for(const n of t)r[n]=Se(e[n]);return r}function _e(e){const t=[];return e.sort(((e,t)=>JSON.stringify(Se(e)).localeCompare(JSON.stringify(Se(t))))).forEach((e=>t.push(Se(e)))),t}function Se(e){return Array.isArray(e)?_e(e):u(e)?ve(e):e}function Ee(e,t){return JSON.stringify(Se(e))===JSON.stringify(Se(t))}function Me(e){const t=Object.keys(e);return t[Math.floor(Math.random()*t.length)]}const Ae=[1e3,1e6,1e9,1e12,1e15,1e18,1e21,1e24,1e27,1e30,1e9,1e16,1e18,1e18,1e18,1e33],Re=["thousand","million","billion","trillion","quadrillion","quintillion","sextillion","septillion","octillion","nonillion","gwei","bzz","btc","eth","dai","decillion"],Te=["K","M","B","T","Qa","Qi","Sx","Sp","O","N","gwei","bzz","eth","btc","dai","D"];function xe(e){const t=parseFloat(e);if(isNaN(t))throw Error("makeNumber got NaN for input");const r=e.replace(/^-?[0-9.]+/,"").trim(),n=Te.findIndex((e=>e.toLowerCase()===r.toLowerCase()));return-1===n?t:t*Ae[n]}function Oe(e,t,r){return e+(r?"["+t+"]":(e.length?".":"")+t)}function Ie(e,t,r,n,i){if(!u(t))return t;for(const[o,a]of Object.entries(t)){const t=Oe(r,o,n);Array.isArray(a)?i?Ie(e,a,t,!0,i):e[t]=a.map((e=>Ie(Array.isArray(e)?[]:{},e,"",!1,i))):u(a)?Ie(e,a,t,!1,i):e[t]=a}return e}function Ce(e,t){const r={};for(const n of e){r[t(n)]=n}return r}function Pe(e,t){const r=Math.ceil(e.length/t),n=[];for(let i=0;i<e.length;i+=r)n.push(e.slice(i,i+r));return n}function ke(e,t){const r=[],n=Math.ceil(e.length/t);for(let i=0;i<n;i++)r.push(e.slice(i*t,i*t+t));return r}function qe(e,t){return Object.fromEntries(Object.entries(e).sort(t))}function Ne(e,t){const r=[];let n=[];e.length&&(r.push(n),n.push(e[0]));for(let i=1;i<e.length;i++)t(e[i],e[i-1])||(n=[],r.push(n)),n.push(e[i]);return r}function Fe(e,t,r,n=100){if(e.map.has(t)){const r=e.keys.indexOf(t);e.keys.splice(r,1)}if(e.map.set(t,r),e.keys.push(t),e.keys.length>n){const t=e.keys.shift();t&&e.map.delete(t)}}class je{constructor(e){this.value=e}ifPresent(e){return this.value&&e(this.value),this}orElse(e){var t;null!==(t=this.value)&&void 0!==t||e()}}function $e(e,t,r,n){const i=e.findIndex((e=>e.endsWith("-"+t)||e.includes("-"+t+"="))),o=e[i];if(!o)return(r||{})[n||t||""]||null;if(o.includes("="))return o.split("=")[1];const a=e[i+1];return a&&!a.startsWith("-")?a:(r||{})[n||t||""]||null}function Le(e,t,r,n){const i=$e(e,t,r,n);if(!i)throw new Error(`Missing argument ${t}`);return i}function Be(e,t){const r=e[t];e.splice(t,1),e.unshift(r)}function ze(e,t){return{x:e.x+t.x,y:e.y+t.y}}function De(e,t){return{x:e.x*t,y:e.y*t}}function Ue(e,t,r){return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}}function We(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function He(e,t,r="row-first"){const n=[];if("column-first"===r)for(let i=0;i<e.length;i++)for(let r=0;r<e[0].length;r++)t(i,r)&&n.push({x:i,y:r});else for(let i=0;i<e[0].length;i++)for(let r=0;r<e.length;r++)t(r,i)&&n.push({x:r,y:i});return n}function Ve(e,t,r){var n;return!(null!==(n=e[t-1])&&void 0!==n&&n[r])}function Ge(e,t,r){var n;return!(null!==(n=e[t+1])&&void 0!==n&&n[r])}function Xe(e,t,r){return!e[t][r-1]}function Je(e,t,r){return!e[t][r+1]}function Ze(e,t,r){var n,i,o,a,s,c,f,u;const d=[];return e[t][r]?function(e,t,r){var n,i;return(null===(n=e[t+1])||void 0===n?void 0:n[r])&&(null===(i=e[t-1])||void 0===i?void 0:i[r])&&!e[t][r-1]&&!e[t][r+1]}(e,t,r)||function(e,t,r){var n,i;return e[t][r+1]&&e[t][r-1]&&!(null!==(n=e[t-1])&&void 0!==n&&n[r])&&!(null!==(i=e[t+1])&&void 0!==i&&i[r])}(e,t,r)?[]:(!(null!==(s=e[t-1])&&void 0!==s&&s[r-1])&&Ve(e,t,r)&&Xe(e,t,r)&&d.push({x:t,y:r}),!(null!==(c=e[t+1])&&void 0!==c&&c[r-1])&&Ge(e,t,r)&&Xe(e,t,r)&&d.push({x:t+1,y:r}),!(null!==(f=e[t-1])&&void 0!==f&&f[r+1])&&Ve(e,t,r)&&Je(e,t,r)&&d.push({x:t,y:r+1}),!(null!==(u=e[t+1])&&void 0!==u&&u[r+1])&&Ge(e,t,r)&&Je(e,t,r)&&d.push({x:t+1,y:r+1}),d):(!(null===(n=e[t-1])||void 0===n)&&n[r]&&e[t][r-1]&&d.push({x:t,y:r}),!(null===(i=e[t+1])||void 0===i)&&i[r]&&e[t][r-1]&&d.push({x:t+1,y:r}),!(null===(o=e[t-1])||void 0===o)&&o[r]&&e[t][r+1]&&d.push({x:t,y:r+1}),!(null===(a=e[t+1])||void 0===a)&&a[r]&&e[t][r+1]&&d.push({x:t+1,y:r+1}),d)}function Ye(e,t){return t.map((t=>function(e,t){return Math.atan2(t.y-e.y,t.x-e.x)}(e,t))).sort(((e,t)=>e-t))}function Ke(e,t,r,n){const i=(n.y-r.y)*(t.x-e.x)-(n.x-r.x)*(t.y-e.y);if(0===i)return null;let o=e.y-r.y,a=e.x-r.x;const s=(n.x-r.x)*o-(n.y-r.y)*a,c=(t.x-e.x)*o-(t.y-e.y)*a;return o=s/i,a=c/i,o>0&&o<1&&a>0&&a<1?{x:e.x+o*(t.x-e.x),y:e.y+o*(t.y-e.y)}:null}function Qe(e,t,r){const n=[],i=Ue(e,r,1e4);for(const o of t){const t=Ke(e,i,o.start,o.end);t&&n.push(t)}return n.length?n.reduce(((t,r)=>We(e,r)<We(e,t)?r:t)):null}t.Fi=je,t.kk={intBetween:function(e,t,r=Math.random){return Math.floor(r()*(t-e+1))+e},floatBetween:function(e,t,r=Math.random){return r()*(t-e)+e},chance:function(e,t=Math.random){return t()<e},signed:function(){return 2*Math.random()-1},makeSeededRng:function(e){let t=e,r=3405648695,n=3735928559;return function(){return t+=r,r^=t<<7,t*=n,n^=t<<13,t^=r^n,(t>>>0)/4294967296}}},t.tk={countUnique:function(e,t,r,n,i){const o=t?e.map(t):e,a={};for(const c of o)a[c]=(a[c]||0)+1;const s=n?qe(a,i?(e,t)=>e[1]-t[1]:(e,t)=>t[1]-e[1]):a;return r?Object.keys(s):s},makeUnique:function(e,t){return Object.values(Ce(e,t))},splitBySize:function(e,t){const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r},splitByCount:Pe,index:Ce,indexCollection:function(e,t){const r={};for(const n of e){const e=t(n);r[e]||(r[e]=[]),r[e].push(n)}return r},onlyOrThrow:function(e){if(e&&1===e.length)return e[0];throw e&&"length"in e?Error("Expected array to have length 1, got: "+e.length):Error("Expected array, got: "+e)},onlyOrNull:function(e){return e&&1===e.length?e[0]:null},firstOrNull:function(e){return e&&e.length>0?e[0]:null},shuffle:i,initialize:function(e,t){const r=[];for(let n=0;n<e;n++)r.push(t(n));return r},initialize2D:function(e,t,r){const n=[];for(let i=0;i<e;i++){n.push([]);for(let e=0;e<t;e++)n[i].push(r)}return n},rotate2D:function(e){const t=[];for(let r=0;r<e[0].length;r++){t.push([]);for(let n=0;n<e.length;n++)t[r].push(e[n][r])}return t},containsShape:function(e,t,r,n){if(r<0||n<0||n+t[0].length>e[0].length||r+t.length>e.length)return!1;for(let i=0;i<t.length;i++)for(let o=0;o<t[i].length;o++)if(void 0!==t[i][o]&&e[r+i][n+o]!==t[i][o])return!1;return!0},glue:function(e,t){const r=[];for(let n=0;n<e.length;n++)r.push(e[n]),n<e.length-1&&(p(t)?r.push(t()):r.push(t));return r},pluck:function(e,t){return e.map((e=>e[t]))},pick:a,pickMany:function(e,t,r=Math.random){if(t>e.length)throw new Error(`Count (${t}) is greater than array length (${e.length})`);return o(e,t,r).map((t=>e[t]))},pickManyUnique:function(e,t,r,n=Math.random){if(t>e.length)throw new Error(`Count (${t}) is greater than array length (${e.length})`);const i=[];for(;i.length<t;){const t=a(e,n);i.some((e=>r(e,t)))||i.push(t)}return i},pickWeighted:function(e,t,r){if(h(r)&&(r=Math.random()),e.length!==t.length)throw new Error("Array length mismatch");let n=t.reduce(((e,t)=>e+t),0);const i=r*n;for(let o=0;o<e.length-1;o++)if(n-=t[o],i>=n)return e[o];return s(e)},pickRandomIndices:o,pickGuaranteed:function(e,r,n,o,a,s=Math.random){const c=e.filter((e=>e!==r&&e!==n)),f=[];for(null!==r&&f.push(r);c.length&&f.length<o;){const e=t.kk.intBetween(0,c.length-1,s);a(c[e],f)&&f.push(c[e]),c.splice(e,1)}return i(f,s),{values:f,indexOfGuaranteed:null!==r?f.indexOf(r):-1}},last:s,sortWeighted:function(e,t,r=Math.random){const n=t.map((e=>r()*e)),i=[];for(let o=0;o<e.length;o++)i.push([e[o],n[o]]);return i.sort(((e,t)=>t[1]-e[1])).map((e=>e[0]))},pushAll:C,unshiftAll:function(e,t){Array.prototype.unshift.apply(e,t)},filterAndRemove:function(e,t){const r=[];for(let n=e.length-1;n>=0;n--)t(e[n])&&r.push(e.splice(n,1)[0]);return r},merge:function(e,t){const r=Object.keys(t);for(const n of r)Array.isArray(t[n])&&Array.isArray(e[n])&&C(e[n],t[n])},empty:function(e){return e.splice(0,e.length),e},pushToBucket:function(e,t,r){e[t]||(e[t]=[]),e[t].push(r)},unshiftAndLimit:function(e,t,r){for(e.unshift(t);e.length>r;)e.pop()},atRolling:function(e,t){let r=t%e.length;return r<0&&(r+=e.length),e[r]},group:Ne,createOscillator:function(e){let t=0;return{next:()=>e[t++%e.length]}},organiseWithLimits:function(e,t,r,n,i){const o={};for(const a of Object.keys(t))o[a]=[];o[n]=[],i&&(e=e.sort(i));for(const a of e){const e=a[r],i=t[e]?e:n;o[i].length>=t[i]?o[n].push(a):o[i].push(a)}return o},tickPlaybook:function(e){if(0===e.length)return null;const t=e[0];return t.ttlMax?--t.ttl<=0&&e.shift():t.ttlMax=t.ttl,{progress:(t.ttlMax-t.ttl)/t.ttlMax,data:t.data}},getArgument:$e,getBooleanArgument:function(e,t,r,n){const i=e.some((e=>e.endsWith("-"+t))),o=$e(e,t,r,n);if(!o&&i)return!0;if(!o&&!i)return null;if(["true","1","yes","y","on"].includes(o.toLowerCase()))return!0;if(["false","0","no","n","off"].includes(o.toLowerCase()))return!1;throw Error(`Invalid boolean argument ${t}: ${o}`)},getNumberArgument:function(e,t,r,n){const i=$e(e,t,r,n);if(!i)return null;try{return xe(i)}catch{throw new Error(`Invalid number argument ${t}: ${i}`)}},requireStringArgument:Le,requireNumberArgument:function(e,t,r,n){const i=Le(e,t,r,n);try{return xe(i)}catch{throw new Error(`Invalid argument ${t}: ${i}`)}},bringToFront:function(e,t){const r=[...e];return Be(r,t),r},bringToFrontInPlace:Be,findInstance:function(e,t){const r=e.find((e=>e instanceof t));return new je(r)}},t.xP={sleepMillis:n,forever:async function(e,t,r){for(;;){try{await e()}catch(i){r&&r("Error in forever",i)}await n(t)}},scheduleMany:function(e,t){for(let r=0;r<e.length;r++){const n=e[r],i=t[r],o=Math.max(0,i.getTime()-Date.now());setTimeout(n,o)}},waitFor:async function(e,t,r){for(let i=0;i<r;i++){try{if(await e())return!0}catch{}i<r-1&&await n(t)}return!1},expandError:function(e,t){if(b(e))return e;const r=Object.keys(e);e.message&&!r.includes("message")&&r.push("message");const n=r.map((t=>`${t}: ${e[t]}`)).join("; ");return t&&e.stack?n+"\n"+e.stack:n}},t.uI={make:xe,sum:function(e){return e.reduce(((e,t)=>e+t),0)},average:function(e){return e.reduce(((e,t)=>e+t),0)/e.length},median:function(e){const t=[...e].sort(((e,t)=>e-t)),r=Math.floor(t.length/2);return t.length%2==0?(t[r]+t[r-1])/2:t[r]},getDistanceFromMidpoint:function(e,t){return e-(t-1)/2},clamp:function(e,t,r){return e<t?t:e>r?r:e},range:P,interpolate:function(e,t,r){return e+(t-e)*r},createSequence:function(){let e=0;return{next:()=>e++}},increment:function(e,t,r){const n=e+t;return n>r?r:n},decrement:function(e,t,r){const n=e-t;return n<r?r:n},format:function(e,t){var r,n;const i=null!==(r=t?.longForm)&&void 0!==r&&r,o=t?.unit?` ${t.unit}`:"",a=i?Re:Te,s=null!==(n=t?.precision)&&void 0!==n?n:1;if(e<Ae[0])return`${e}${o}`;for(let c=0;c<Ae.length-1;c++)if(e<Ae[c+1])return`${(e/Ae[c]).toFixed(s)}${i?" ":""}${a[c]}${o}`;return`${(e/Ae[Ae.length-1]).toFixed(s)}${i?" ":""}${a[Ae.length-1]}${o}`},asMegabytes:function(e){return e/1024/1024},convertBytes:function(e){return e>=1073741824?(e/1024/1024/1024).toFixed(3)+" GB":e>=1048576?(e/1024/1024).toFixed(3)+" MB":e>=1024?(e/1024).toFixed(3)+" KB":e+" B"},hexToRgb:function(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e.toLowerCase());if(!t)throw new Error("Invalid hex color: "+e);return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]},rgbToHex:function(e){return"#"+e.map((e=>e.toString(16).padStart(2,"0"))).join("")}},t.jT={raceFulfilled:async function(e){return r(Promise.all(e.map(r)))},invert:r,runInParallelBatches:async function(e,t=1){const r=Pe(e,t),n=[],i=r.map((async e=>{for(const t of e)n.push(await t())}));return await Promise.all(i),n},makeAsyncQueue:function(e=1){const t=[],r=[];let n=0;async function i(){if(t.length>0&&n<e){n++;const e=t.shift();try{e&&await e()}finally{if(0==--n)for(;r.length>0;)r.shift()();i()}}}return{enqueue(e){t.push(e),i()},drain:async function(){return n?new Promise((e=>{r.push(e)})):Promise.resolve()}}}},t.L0={getAgo:function(e,t){t||(t=Date.now());let r=(t-e.getTime())/1e3;return r<10?"A few seconds ago":r<120?r.toFixed(0)+" seconds ago":(r/=60,r<120?r.toFixed(0)+" minutes ago":(r/=60,r<48?r.toFixed(0)+" hours ago":(r/=24,r.toFixed(0)+" days ago")))},getAgoStructured:function(e,t){t||(t=Date.now());let r=(t-("number"==typeof e?e:e.getTime()))/1e3;return r<120?{value:Math.floor(r),unit:"second"}:(r/=60,r<120?{value:Math.floor(r),unit:"minute"}:(r/=60,r<48?{value:Math.floor(r),unit:"hour"}:(r/=24,{value:Math.floor(r),unit:"day"})))},countCycles:function(e,t,r){var n,i,o;const a=(null!==(n=r?.now)&&void 0!==n?n:Date.now())-e;return{cycles:Math.floor(a/t),remaining:t/(null!==(i=r?.precision)&&void 0!==i?i:1)-Math.ceil(a%t/(null!==(o=r?.precision)&&void 0!==o?o:1))}},isoDate:function(e){return(e||new Date).toISOString().slice(0,10)},throttle:function(e,t){return(!le[e]||Date.now()>le[e])&&(le[e]=Date.now()+t,!0)},timeSince:function(e,t,r){return t=g(t)?t.getTime():t,((r=r?g(r)?r.getTime():r:Date.now())-t)/he[e]},dateTimeSlug:function(e){return(e||new Date).toISOString().slice(0,19).replace(/T|:/g,"-")},unixTimestamp:function(e){return Math.ceil((e||Date.now())/1e3)},fromUtcString:function(e){const t=new Date(e);return new Date(t.getTime()-6e4*t.getTimezoneOffset())},fromMillis:function(e){return new Date(e)},getProgress:function(e,t,r,n){n||(n=Date.now());const i=n-e,o=i/t,a=o*r;return{deltaMs:i,progress:t/r,baseTimeMs:o,totalTimeMs:a,remainingTimeMs:a-i}},humanizeTime:de,humanizeProgress:function(e){return`[${Math.floor(100*e.progress)}%] ${de(e.deltaMs)} out of ${de(e.totalTimeMs)} (${de(e.remainingTimeMs)} left) [${Math.round(e.baseTimeMs)} ms each]`},createTimeDigits:ue,mapDayNumber:be,getDayInfoFromDate:me,getDayInfoFromDateTimeString:function(e){return me(new Date(e))},seconds:function(e){return 1e3*e},minutes:function(e){return 6e4*e},hours:function(e){return 36e5*e},make:function(e){const t=parseFloat(e);if(isNaN(t))throw Error("makeDate got NaN for input");const r=e.replace(/^-?[0-9.]+/,"").trim(),n=ye.findIndex((e=>e[0]===r.toLowerCase()));return-1===n?t:t*ye[n][1]}},t.WP={safeParse:function(e){try{return JSON.parse(e)}catch{return null}},deleteDeep:function(e,t){const r=$(t,"."),n=L(t,".");if(!r||!n)return;delete c(e,r)[n]},getDeep:c,getDeepOrElse:function(e,t,r){return c(e,t)||r},setDeep:f,incrementDeep:function(e,t,r=1){const n=c(e,t)||0;return f(e,t,n+r),n},ensureDeep:function(e,t,r){return c(e,t)||f(e,t,r)},replaceDeep:function(e,t,r){const n=c(e,t);if(!n)throw new Error("Key '"+t+"' does not exist.");return f(e,t,r),n},getFirstDeep:function(e,t,r){for(const n of t){const t=c(e,n);if(t)return t}if(r){const t=Object.values(e);if(t.length)return t[0]}return null},deepMergeInPlace:O,deepMerge2:function(e,t){const r={};return O(r,e),O(r,t),r},deepMerge3:function(e,t,r){const n={};return O(n,e),O(n,t),O(n,r),n},mapAllAsync:async function(e,t){const r=[];for(const n of e)r.push(await t(n));return r},cloneWithJson:function(e){return JSON.parse(JSON.stringify(e))},sortObject:ve,sortArray:_e,sortAny:Se,deepEquals:Ee,deepEqualsEvery:function(...e){for(let t=1;t<e.length;t++)if(!Ee(e[t-1],e[t]))return!1;return!0},runOn:function(e,t){return t(e),e},ifPresent:function(e,t){e&&t(e)},zip:I,zipSum:function(e){return I(e,((e,t)=>e+t))},removeEmptyArrays:function(e){for(const t of Object.keys(e))(l(e[t])||Array.isArray(e[t])&&e[t].every((e=>null==e)))&&delete e[t];return e},removeEmptyValues:function(e){for(const t of Object.entries(e))(h(t[1])||null===t[1]||b(t[1])&&w(t[1]))&&delete e[t[0]];return e},flatten:function(e,t=!1,r){return Ie({},e,r||"",!1,t)},unflatten:function e(t){if(!u(t))return t;const r=Array.isArray(t)?[]:{};for(const[n,i]of Object.entries(t))Array.isArray(i)?f(r,n,i.map((t=>e(t)))):f(r,n,i);return r},match:function(e,t,r){return t[e]?t[e]:r},sort:qe,map:function(e,t){const r={};for(const n of Object.entries(e))r[n[0]]=t(n[1]);return r},filterKeys:function(e,t){const r={};for(const[n,i]of Object.entries(e))t(n)&&(r[n]=i);return r},filterValues:function(e,t){const r={};for(const[n,i]of Object.entries(e))t(i)&&(r[n]=i);return r},rethrow:async function(e,t){try{return await e()}catch{throw t}},setSomeOnObject:function(e,t,r){typeof r<"u"&&null!==r&&(e[t]=r)},setSomeDeep:function(e,t,r,n){const i=c(r,n);typeof i>"u"||null===i||f(e,t,i)},flip:function(e){const t={};for(const[r,n]of Object.entries(e))t[n]=r;return t},getAllPermutations:function(e){const t=Object.keys(e),r=t.map((t=>e[t].length)),n=r.reduce(((e,t)=>e*t));let i=1;const o=[1];for(let s=0;s<r.length-1;s++)i*=r[s],o.push(i);const a=[];for(let s=0;s<n;s++){const r={};for(let n=0;n<t.length;n++){const i=e[t[n]],a=Math.floor(s/o[n])%i.length;r[t[n]]=i[a]}a.push(r)}return a},countTruthyValues:function(e){return Object.values(e).filter((e=>e)).length},transformToArray:function(e){const t=[],r=Object.keys(e),n=e[r[0]].length;for(let i=0;i<n;i++){const n={};for(const t of r)n[t]=e[t][i];t.push(n)}return t},setMulti:function(e,t,r){for(const n of e)n[t]=r},incrementMulti:function(e,t,r=1){for(const n of e)n[t]+=r},createBidirectionalMap:function(){return{map:new Map,keys:[]}},createTemporalBidirectionalMap:function(){return{map:new Map,keys:[]}},pushToBidirectionalMap:Fe,unshiftToBidirectionalMap:function(e,t,r,n=100){if(e.map.has(t)){const r=e.keys.indexOf(t);e.keys.splice(r,1)}if(e.map.set(t,r),e.keys.unshift(t),e.keys.length>n){const t=e.keys.shift();t&&e.map.delete(t)}},addToTemporalBidirectionalMap:function(e,t,r,n,i=100){Fe(e,t,{validUntil:Date.now()+n,data:r},i)},getFromTemporalBidirectionalMap:function(e,t){const r=e.map.get(t);return r&&r.validUntil>Date.now()?r.data:null},createStatefulToggle:function(e){let t;return r=>{const n=r===e&&t!==e;return t=r,n}},diffKeys:function(e,t){const r=Object.keys(e),n=Object.keys(t);return{uniqueToA:r.filter((e=>!n.includes(e))),uniqueToB:n.filter((e=>!r.includes(e)))}},pickRandomKey:Me,mapRandomKey:function(e,t){const r=Me(e);return e[r]=t(e[r]),r},fromObjectString:function(e){return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/(\w+)\((.+)\)/g,((e,t,r)=>`${t}(${r.replaceAll(",","&comma;")})`))).replace(/(,)(\s+})/g,"$2")).replace(/\.\.\..+?,/g,"")).replace(/({\s+)([a-zA-Z]\w+),/g,"$1$2: '$2',")).replace(/(,\s+)([a-zA-Z]\w+),/g,"$1$2: '$2',")).replace(/:(.+)\?(.+):/g,((e,t,r)=>`: (${t.trim()} && ${r.trim()}) ||`))).replace(/([a-zA-Z0-9]+)( ?: ?{)/g,'"$1"$2')).replace(/([a-zA-Z0-9]+) ?: ?(.+?)(,|\n|})/g,((e,t,r,n)=>`"${t}":"${r.trim()}"${n}`))).replace(/("'|'")/g,'"')).replaceAll("&comma;",","),JSON.parse(e)},toQueryString:fe,parseQueryString:function(e){const t={},r=e.split("&");for(const n of r){const[e,r]=n.split("=");e&&r&&(t[e]=decodeURIComponent(r))}return t},hasKey:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t.tl={asPageNumber:function(e){const t=parseInt(e,10);return!t||t<1||t>99999?1:t},pageify:function(e,t,r,n){return{data:e,pageSize:r,totalPages:Math.floor(t/r)+1,totalElements:t,currentPage:n}}},t.Yk={isFunction:p,isObject:u,isStrictlyObject:d,isEmptyArray:l,isEmptyObject:function(e){return d(e)&&0===Object.keys(e).length},isUndefined:h,isString:b,isNumber:m,isBoolean:y,isDate:g,isBlank:w,isId:v,isNullable:function(e,t){return!(!h(t)&&null!==t)||e(t)},asString:function(e){if(w(e))throw new TypeError("Expected string, got: "+e);return e},asNumber:T,asInteger:function(e){return 0|T(e)},asBoolean:function(e){if(!y(e))throw new TypeError("Expected boolean, got: "+e);return e},asDate:function(e){if(!g(e))throw new TypeError("Expected date, got: "+e);return e},asNullableString:function(e){return w(e)?null:e},asEmptiableString:function(e){if(!b(e))throw new TypeError("Expected string, got: "+e);return e},asId:function(e){if(v(e))return e;const t=parseInt(e,10);if(!v(t))throw new TypeError("Expected id, got: "+e);return t},asTime:function(e){if(!b(e))throw new TypeError("Expected time, got: "+e);const t=e.split(":");if(2!==t.length)throw new TypeError("Expected time, got: "+e);const r=parseInt(t[0],10),n=parseInt(t[1],10);if(!m(r)||!m(n)||r<0||r>23||n<0||n>59)throw new TypeError("Expected time, got: "+e);return`${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`},asArray:function(e){if(!Array.isArray(e))throw new TypeError("Expected array, got: "+e);return e},asObject:function(e){if(!d(e))throw new TypeError("Expected object, got: "+e);return e},asNullable:function(e,t){return null===t||h(t)?null:e(t)},enforceObjectShape:x,enforceArrayShape:function(e,t){return e.every((e=>x(e,t)))}},t.eI={tokenizeByCount:function(e,t){return ke(e,Math.ceil(e.length/t))},tokenizeByLength:ke,searchHex:function(e,t){const r=new RegExp(`[0-9a-f]{${t}}`,"i"),n=e.match(r);return n?n[0]:null},searchSubstring:function(e,t,r=_){const n=z(e,r);for(const i of n)if(t(i))return i;return null},randomHex:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=R[Math.floor(t()*R.length)];return r},randomLetter:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=S[Math.floor(t()*S.length)];return r},randomAlphanumeric:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=E[Math.floor(t()*E.length)];return r},randomRichAscii:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=M[Math.floor(t()*M.length)];return r},randomUnicode:function(e,t=Math.random){let r="";for(let n=0;n<e;n++)r+=A[Math.floor(t()*A.length)];return r},includesAny:function(e,t){for(const r of t)if(e.includes(r))return!0;return!1},slugify:k,enumify:function(e){return k(e).replace(/-/g,"_").toUpperCase()},escapeHtml:function(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},decodeHtmlEntities:function(e){let t=e.replace(/&#(\d+);/g,((e,t)=>String.fromCharCode(t))).replace(/&#x(\d+);/g,((e,t)=>String.fromCharCode(parseInt(t,16))));for(const[r,n]of Object.entries(N))t=t.replaceAll(r,n);return t},after:j,afterLast:L,before:F,beforeLast:$,betweenWide:function(e,t,r){const n=$(e,r);return n?j(n,t):null},betweenNarrow:function(e,t,r){const n=j(e,t);return n?F(n,r):null},getPreLine:function(e){return e.replace(/ +/g," ").replace(/^ /gm,"")},containsWord:oe,containsWords:function(e,t,r){return"any"===r?t.some((t=>oe(e,t))):t.every((t=>oe(e,t)))},joinUrl:we,getFuzzyMatchScore:q,sortByFuzzyScore:function(e,t){return e.filter((e=>q(e,t))).sort(((e,r)=>q(r,t)-q(e,t)))},splitOnce:B,splitAll:z,randomize:function(e,t=Math.random){return e.replace(/\{(.+?)\}/g,((e,r)=>a(r.split("|"),t)))},expand:function e(t){const r=t.match(/\{(.+?)\}/);if(!r||!r.index)return[t];const n=r[1].split(","),i=t.slice(0,r.index),o=t.slice(r.index+r[0].length);let a=[];for(const s of n){const t=e(i+s+o);a=a.concat(t)}return a},shrinkTrim:function(e){return e.replace(/\s+/g," ").replace(/\s$|^\s/g,"")},capitalize:W,decapitalize:H,csvEscape:function(e){return e.match(/"|,/)?`"${e.replace(/"/g,'""')}"`:e},parseCsv:function(e,t=",",r='"'){const n=[];let i="",o=!1;const a=e.split("");for(const s of a)s!==t||o?s!==r||(i||o)&&!o?i+=s:o=!o:(n.push(i),i="");return n.push(i),n},surroundInOut:function(e,t){return t+e.split("").join(t)+t},getExtension:D,getBasename:U,normalizeFilename:function(e){const t=U(e),r=D(e);return r?`${t}.${r}`:t},parseFilename:function(e){const t=U(e),r=D(e);return{basename:t,extension:r,filename:r?`${t}.${r}`:t}},camelToTitle:function(e){return W(e.replace(/([A-Z])/g," $1"))},slugToTitle:function(e){return e.split("-").map(W).join(" ")},slugToCamel:function(e){return H(e.split("-").map(W).join(""))},joinHumanly:function(e,t=", ",r=" and "){return e&&e.length?1===e.length?e[0]:2===e.length?`${e[0]}${r}${e[1]}`:`${e.slice(0,e.length-1).join(t)}${r}${e[e.length-1]}`:""},findWeightedPair:te,extractBlock:re,extractAllBlocks:function(e,t){const r=[];let n=t.wordBoundary?Y(e,[`${t.opening} `,`${t.opening}\n`],t.start||0):e.indexOf(t.opening,t.start||0);for(;;){if(-1===n)return r;const i=re(e,Object.assign(Object.assign({},t),{start:n}));if(!i)return r;r.push(i),n=t.wordBoundary?Y(e,[`${t.opening} `,`${t.opening}\n`],n+i.length):e.indexOf(t.opening,n+i.length)}},replaceBlocks:function(e,r,n){let i=0;for(;;){const o=t.eI.extractBlock(e,Object.assign(Object.assign({},n),{start:i}));if(!o)return e;const a=r(o);i=e.indexOf(o,i)+a.length,e=e.replace(o,a)}},indexOfEarliest:Y,lastIndexOfBefore:ee,parseHtmlAttributes:function(e){const t={},r=e.match(/([a-z\-]+)="([^"]+)"/g);if(r)for(const n of r){const[e,r]=B(n,"=");t[e]=r.slice(1,r.length-1)}return t},readNextWord:ae,resolveVariables:function(e,t,r="$",n=":"){for(const i in t)e=se(e,i,t[i],r,n);return e=ce(e)},resolveVariableWithDefaultSyntax:se,resolveRemainingVariablesWithDefaults:ce,isLetter:V,isDigit:G,isLetterOrDigit:X,isValidObjectPathCharacter:function(e){return X(e)||"."===e||"["===e||"]"===e||"_"===e},insert:function(e,t,r,n,i){return e.slice(0,t)+n+e.slice(t,t+r)+i+e.slice(t+r)},indexOfRegex:J,lineMatches:Z,linesMatchInOrder:function(e,t,r=!0){let n=0;for(const i of t){let t=!1;for(;!t&&n<e.length;)Z(e[n],i,r)&&(t=!0),n++;if(!t)return!1}return!0},represent:function e(t,r="json",n=0){if(u(t,!1)){if(n>1)return"[object Object]";if("json"===r){if(Array.isArray(t)){const r=t.map((t=>e(t,"json",n+1)));return 0===n?JSON.stringify(r):r}const r={};t.message&&(r.message=e(t.message,"json",n+1));for(const[i,o]of Object.entries(t))r[i]=e(o,"json",n+1);return 0===n?JSON.stringify(r):r}if("key-value"===r){const r=Object.keys(t);return t.message&&!r.includes("message")&&r.unshift("message"),r.map((r=>`${r}=${JSON.stringify(e(t[r],"json",n+1))}`)).join(" ")}}return h(t)&&(t="undefined"),0===n?JSON.stringify(t):t},resolveMarkdownLinks:function(e,t){let r=e.indexOf("](");for(;-1!==r;){const n=ee(e,"[",r),i=e.indexOf(")",r);if(-1!==n&&-1!==i){const[r,o]=e.slice(n+1,i).split("]("),a=t(r,o);e=e.slice(0,n)+a+e.slice(i+1)}r=e.indexOf("](",r+1)}return e},buildUrl:function(e,t,r){return we(e,t)+fe(r||{})},isChinese:function(e){return/^[\u4E00-\u9FA5]+$/.test(e)},replaceBetweenStrings:function(e,t,r,n,i=!0){const o=e.indexOf(t),a=e.indexOf(r,o+t.length);if(-1===o||-1===a)throw Error("Start or end not found");return i?e.substring(0,o+t.length)+n+e.substring(a):e.substring(0,o)+n+e.substring(a+r.length)},describeMarkdown:function(e){let t="p";return e.startsWith("#")?(t="h1",e=e.slice(1).trim()):e.startsWith("-")&&(t="li",e=e.slice(1).trim()),{type:t,isCapitalized:e[0]===e[0].toUpperCase(),hasPunctuation:/[.?!]$/.test(e),endsWithColon:/:$/.test(e)}},isBalanced:function(e,t="(",r=")"){let n=0,i=0;for(;i<e.length;)if(e.startsWith(t,i)?(n++,i+=t.length):e.startsWith(r,i)?(n--,i+=r.length):i++,n<0)return!1;return t===r?n%2==0:0===n},textToFormat:function(e){let t=(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).length;for(;(e=e.replace(/(\w+)[\s,']+\w+/g,"$1")).length!==t;)t=e.length;return e=(e=(e=e.replaceAll(/[A-Z][a-zA-Z0-9]*/g,"A")).replaceAll(/[a-z][a-zA-Z0-9]*/g,"a")).replaceAll(/[\u4E00-\u9FA5]+/g,"Z")},splitFormatting:function(e,t){const r=[];let n=0;for(;n<e.length;){const i=e.indexOf(t,n);if(-1===i){r.push({string:e.slice(n),symbol:null});break}const o=e.indexOf(t,i+t.length);if(i>n&&-1!==o&&r.push({string:e.slice(n,i),symbol:null}),-1===o){r.push({string:e.slice(n),symbol:null});break}r.push({string:e.slice(i+t.length,o),symbol:t}),n=o+t.length}return r},splitHashtags:function(e){const t=[];let r=0;for(;r<e.length;){const n=Q(e,r);if(-1===n){t.push({string:e.slice(r),symbol:null});break}const i=K(e,n+1);if(-1===i){t.push({string:e.slice(r,n),symbol:null}),t.push({string:e.slice(n+1),symbol:"#"});break}n>r&&t.push({string:e.slice(r,n),symbol:null}),t.push({string:e.slice(n+1,i),symbol:"#"}),r=i}return t},splitUrls:function(e){const t=[];let r=0;for(;r<e.length;){const n=Y(e,["http://","https://"],r);if(-1===n){t.push({string:e.slice(r),symbol:null});break}const i=Y(e,[" ","\n"],n);if(-1===i){n>r&&t.push({string:e.slice(r,n),symbol:null}),t.push({string:e.slice(n),symbol:"http"});break}n>r&&t.push({string:e.slice(r,n),symbol:null}),t.push({string:e.slice(n,i),symbol:"http"}),r=i}return t},hexToUint8Array:function(e){e.startsWith("0x")&&(e=e.slice(2));const t=e.length/2,r=new Uint8Array(t);for(let n=0;n<t;n++){const t=parseInt(e.slice(2*n,2*n+2),16);r[n]=t}return r},uint8ArrayToHex:function(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")},base64ToUint8Array:function(e){let t=0;"="===e.charAt(e.length-1)&&(t++,"="===e.charAt(e.length-2)&&t++);const r=6*e.length/8-t,n=new Uint8Array(r);let i=0,o=0;for(;i<e.length;){const t=ne.indexOf(e.charAt(i++)),a=ne.indexOf(e.charAt(i++)),s=ne.indexOf(e.charAt(i++)),c=t<<2|a>>4,f=(15&a)<<4|s>>2,u=(3&s)<<6|ne.indexOf(e.charAt(i++));n[o++]=c,o<r&&(n[o++]=f),o<r&&(n[o++]=u)}return n},uint8ArrayToBase64:function(e){let t="",r=0;for(let n=0;n<e.length;n+=3){const i=e[n],o=e[n+1],a=e[n+2],s=(15&o)<<2|a>>6,c=63&a;t+=ne[i>>2]+ne[(3&i)<<4|o>>4],n+1<e.length?t+=ne[s]:r++,n+2<e.length?t+=ne[c]:r++}return r&&(t+=1===r?"=":"=="),t},route:function(e,t){const r=e.split("/").filter((e=>e)),n=t.split("/").filter((e=>e));if(r.length!==n.length)return null;const i={};for(let o=0;o<r.length;o++){const e=r[o];if(e.startsWith(":"))i[e.slice(1)]=n[o];else if(e!==n[o])return null}return i},explodeReplace:ie,generateVariants:function(e,r,n,i=Math.random){const o=t.tk.shuffle(r.map((e=>({variants:t.tk.shuffle(e.variants.map((e=>e)),i),avoid:e.avoid}))),i),a=[];for(const t of o){const r=t.variants.filter((e=>e!==t.avoid)),i=r.find((t=>e.includes(t)));if(i&&(C(a,ie(e,i,r)),a.length>=n))break}if(a.length<n)for(const t of o){const r=t.variants.find((t=>e.includes(t)));if(r&&(C(a,ie(e,r,t.variants)),a.length>=n))break}return a.slice(0,n)},hashCode:function(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t},replaceWord:function(e,t,r,n=!1){const i=new RegExp(n?`(?<=\\s|^)${t}(?=\\s|$)`:`\\b${t}\\b`,"g");return e.replace(i,r)},replacePascalCaseWords:function(e,t){return e.replace(/\b[A-Z][a-zA-Z0-9]*\b/g,(e=>e.toUpperCase()===e?e:t(e)))},stripHtml:function(e){return e.replace(/<[^>]*>/g,"")}},t.Gi={asEqual:function(e,t){if(e!==t)throw Error(`Expected [${e}] to equal [${t}]`);return[e,t]},asTrue:function(e){if(!0!==e)throw Error(`Expected [true], got: [${e}]`);return e},asTruthy:function(e){if(!e)throw Error(`Expected truthy value, got: [${e}]`);return e},asFalse:function(e){if(!1!==e)throw Error(`Expected [false], got: [${e}]`);return e},asFalsy:function(e){if(e)throw Error(`Expected falsy value, got: [${e}]`);return e},asEither:function(e,t){if(!t.includes(e))throw Error(`Expected any of [${t.join(", ")}], got: [${e}]`);return e}},t.Ct={get:async function(e,t,r){const n=Date.now(),i=ge[e];if(i&&i.validUntil>n)return i.value;const o=await r(),a=n+t;return ge[e]={value:o,validUntil:a},o}},t.OW={addPoint:ze,subtractPoint:function(e,t){return{x:e.x-t.x,y:e.y-t.y}},multiplyPoint:De,normalizePoint:function(e){const t=Math.sqrt(e.x*e.x+e.y*e.y);return{x:e.x/t,y:e.y/t}},pushPoint:Ue,filterCoordinates:He,findCorners:function(e,t,r,n){const i=[{x:0,y:0},{x:r,y:0},{x:0,y:n},{x:r,y:n}];for(let o=0;o<e.length;o++)for(let t=0;t<e[0].length;t++){const r=Ze(e,o,t);for(const e of r)i.some((t=>t.x===e.x&&t.y===e.y))||i.push(e)}return i.map((e=>({x:e.x*t,y:e.y*t})))},findLines:function(e,t){const r=He(e,((t,r)=>0===e[t][r]&&0!==e[t][r+1]),"row-first").map((e=>Object.assign(Object.assign({},e),{dx:1,dy:0}))),n=He(e,((t,r)=>0===e[t][r]&&0!==e[t][r-1]),"row-first").map((e=>Object.assign(Object.assign({},e),{dx:1,dy:0}))),i=He(e,((t,r)=>{var n;return 0===e[t][r]&&0!==(null===(n=e[t-1])||void 0===n?void 0:n[r])}),"column-first").map((e=>Object.assign(Object.assign({},e),{dx:0,dy:1}))),o=He(e,((t,r)=>{var n;return 0===e[t][r]&&0!==(null===(n=e[t+1])||void 0===n?void 0:n[r])}),"column-first").map((e=>Object.assign(Object.assign({},e),{dx:0,dy:1})));return r.forEach((e=>e.y++)),o.forEach((e=>e.x++)),[...Ne([...i,...o],((e,t)=>e.x===t.x&&e.y-1===t.y)),...Ne([...n,...r],((e,t)=>e.y===t.y&&e.x-1===t.x))].map((e=>({start:e[0],end:s(e)}))).map((e=>({start:De(e.start,t),end:De(ze(e.end,{x:e.start.dx,y:e.start.dy}),t)})))},raycast:Qe,raycastCircle:function(e,t,r){const n=Ye(e,r),i=[];for(const o of n){const r=Qe(e,t,o-.001),n=Qe(e,t,o+.001);r&&i.push(r),n&&i.push(n)}return i},getLineIntersectionPoint:Ke}},236:(e,t,r)=>{"use strict";var n=t;n.version=r(8597).i8,n.utils=r(1560),n.rand=r(7056),n.curve=r(5533),n.curves=r(5914),n.ec=r(3090),n.eddsa=r(4082)},4861:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.getNAF,a=i.getJSF,s=i.assert;function c(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=c,c.prototype.point=function(){throw new Error("Not implemented")},c.prototype.validate=function(){throw new Error("Not implemented")},c.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var a,c,f=[];for(a=0;a<n.length;a+=r.step){c=0;for(var u=a+r.step-1;u>=a;u--)c=(c<<1)+n[u];f.push(c)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a<f.length;a++)(c=f[a])===h?l=l.mixedAdd(r.points[a]):c===-h&&(l=l.mixedAdd(r.points[a].neg()));d=d.add(l)}return d.toP()},c.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,a=o(t,r,this._bitLength),c=this.jpoint(null,null,null),f=a.length-1;f>=0;f--){for(var u=0;f>=0&&0===a[f];f--)u++;if(f>=0&&u++,c=c.dblp(u),f<0)break;var d=a[f];s(0!==d),c="affine"===e.type?d>0?c.mixedAdd(i[d-1>>1]):c.mixedAdd(i[-d-1>>1].neg()):d>0?c.add(i[d-1>>1]):c.add(i[-d-1>>1].neg())}return"affine"===e.type?c.toP():c},c.prototype._wnafMulAdd=function(e,t,r,n,i){var s,c,f,u=this._wnafT1,d=this._wnafT2,l=this._wnafT3,h=0;for(s=0;s<n;s++){var p=(f=t[s])._getNAFPoints(e);u[s]=p.wnd,d[s]=p.points}for(s=n-1;s>=1;s-=2){var b=s-1,m=s;if(1===u[b]&&1===u[m]){var y=[t[b],null,null,t[m]];0===t[b].y.cmp(t[m].y)?(y[1]=t[b].add(t[m]),y[2]=t[b].toJ().mixedAdd(t[m].neg())):0===t[b].y.cmp(t[m].y.redNeg())?(y[1]=t[b].toJ().mixedAdd(t[m]),y[2]=t[b].add(t[m].neg())):(y[1]=t[b].toJ().mixedAdd(t[m]),y[2]=t[b].toJ().mixedAdd(t[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],w=a(r[b],r[m]);for(h=Math.max(w[0].length,h),l[b]=new Array(h),l[m]=new Array(h),c=0;c<h;c++){var v=0|w[0][c],_=0|w[1][c];l[b][c]=g[3*(v+1)+(_+1)],l[m][c]=0,d[b]=y}}else l[b]=o(r[b],u[b],this._bitLength),l[m]=o(r[m],u[m],this._bitLength),h=Math.max(l[b].length,h),h=Math.max(l[m].length,h)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(s=h;s>=0;s--){for(var M=0;s>=0;){var A=!0;for(c=0;c<n;c++)E[c]=0|l[c][s],0!==E[c]&&(A=!1);if(!A)break;M++,s--}if(s>=0&&M++,S=S.dblp(M),s<0)break;for(c=0;c<n;c++){var R=E[c];0!==R&&(R>0?f=d[c][R-1>>1]:R<0&&(f=d[c][-R-1>>1].neg()),S="affine"===f.type?S.mixedAdd(f):S.add(f))}}for(s=0;s<n;s++)d[s]=null;return i?S:S.toP()},c.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},c.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(e){return this.encode(e,!0)},f.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},f.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},f.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},f.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},f.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},5649:(e,t,r)=>{"use strict";var n=r(1560),i=r(9919),o=r(5153),a=r(4861),s=n.assert;function c(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function f(e,t,r,n,o){a.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(c,a),e.exports=c,c.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},c.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},c.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),a=n.redMul(o.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var c=s.fromRed().isOdd();return(t&&!c||!t&&c)&&(s=s.redNeg()),this.point(e,s)},c.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),a=n.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},c.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(f,a.BasePoint),c.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},c.prototype.point=function(e,t,r,n){return new f(this,e,t,r,n)},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),f=o.redMul(s),u=i.redMul(s),d=a.redMul(o);return this.curve.point(c,f,d,u)},f.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var f=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(f.redSub(this.curve.two)),t=f.redMul(n.redSub(c)),r=f.redSqr().redSub(f).redSub(f)):(i=this.z.redSqr(),o=f.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=f.redMul(n.redSub(c)),r=f.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),f=o.redMul(a),u=s.redMul(c),d=o.redMul(c),l=a.redMul(s);return this.curve.point(f,u,l,d)},f.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),f=i.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(c).redMul(u);return this.curve.twisted?(t=n.redMul(f).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(f)):(t=n.redMul(f).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(f)),this.curve.point(d,t,r)},f.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},f.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},5533:(e,t,r)=>{"use strict";var n=t;n.base=r(4861),n.short=r(8707),n.mont=r(7474),n.edwards=r(5649)},7474:(e,t,r)=>{"use strict";var n=r(9919),i=r(5153),o=r(4861),a=r(1560);function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function c(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(c,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new c(this,e,t)},s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},c.prototype.precompute=function(){},c.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},c.fromJSON=function(e,t){return new c(e,t[0],t[1]||e.one)},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},c.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},c.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},c.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},c.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},c.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},c.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},8707:(e,t,r)=>{"use strict";var n=r(1560),i=r(9919),o=r(5153),a=r(4861),s=n.assert;function c(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,r,n){a.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,n){a.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(c,a),e.exports=c,c.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},c.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},c.prototype._getEndoBasis=function(e){for(var t,r,n,o,a,s,c,f,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,h=this.n.clone(),p=new i(1),b=new i(0),m=new i(0),y=new i(1),g=0;0!==l.cmpn(0);){var w=h.div(l);f=h.sub(w.mul(l)),u=m.sub(w.mul(p));var v=y.sub(w.mul(b));if(!n&&f.cmp(d)<0)t=c.neg(),r=p,n=f.neg(),o=u;else if(n&&2==++g)break;c=f,h=l,l=f,m=p,p=u,y=b,b=v}a=f.neg(),s=u;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},c.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),f=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(f).neg()}},c.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},c.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},c.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],c=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),c=c.neg(!0)),n[2*o]=s,n[2*o+1]=c,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var f=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return f},o(f,a.BasePoint),c.prototype.point=function(e,t,r){return new f(this,e,t,r)},c.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t)},f.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},f.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},f.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,a.BasePoint),c.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=s.redSqr(),u=f.redMul(s),d=n.redMul(f),l=c.redSqr().redIAdd(u).redISub(d).redISub(d),h=c.redMul(d.redISub(l)).redISub(o.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),u=r.redMul(c),d=s.redSqr().redIAdd(f).redISub(u).redISub(u),l=s.redMul(u.redISub(d)).redISub(i.redMul(f)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,c=s.redSqr().redSqr(),f=a.redAdd(a);for(t=0;t<e;t++){var u=o.redSqr(),d=f.redSqr(),l=d.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(c)),p=o.redMul(d),b=h.redSqr().redISub(p.redAdd(p)),m=p.redISub(b),y=h.redMul(m);y=y.redIAdd(y).redISub(l);var g=f.redMul(s);t+1<e&&(c=c.redMul(l)),o=b,s=g,f=y}return this.curve.jpoint(o,f.redMul(i),s)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),c=s.redSqr().redISub(a).redISub(a),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=c,t=s.redMul(a.redISub(c)).redISub(f),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),l=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(u).redISub(l);h=h.redIAdd(h);var p=u.redAdd(u).redIAdd(u),b=p.redSqr(),m=l.redIAdd(l);m=(m=m.redIAdd(m)).redIAdd(m),e=b.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},u.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=s.redSqr().redISub(a).redISub(a);e=c;var f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=s.redMul(a.redISub(c)).redISub(f),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),l=this.x.redMul(d),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l),b=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(b),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var m=d.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=h.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),f=(c=c.redIAdd(c)).redMul(a),u=s.redSqr().redISub(f.redAdd(f)),d=f.redISub(u),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=s.redMul(d).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(u,h,p)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var f=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(c),u=t.redMul(f);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(s).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var l=this.y.redMul(f.redMul(c.redISub(f)).redISub(a.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(d,l,h)},u.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},u.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5914:(e,t,r)=>{"use strict";var n,i=t,o=r(6204),a=r(5533),s=r(1560).assert;function c(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(2970)}catch(u){n=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},3090:(e,t,r)=>{"use strict";var n=r(9919),i=r(4859),o=r(1560),a=r(5914),s=r(7056),c=o.assert,f=r(4858),u=r(3539);function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(c(Object.prototype.hasOwnProperty.call(a,e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=d,d.prototype.keyPair=function(e){return new f(this,e)},d.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),c=e.toArray("be",a),f=new i({hash:this.hash,entropy:s,nonce:c,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),l=0;;l++){var h=o.k?o.k(l):new n(f.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var b=p.getX(),m=b.umod(this.n);if(0!==m.cmpn(0)){var y=h.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(y=y.umod(this.n)).cmpn(0)){var g=(p.getY().isOdd()?1:0)|(0!==b.cmp(m)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),g^=1),new u({r:m,s:y,recoveryParam:g})}}}}}},d.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i);var o=(t=new u(t,"hex")).r,a=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,c=a.invm(this.n),f=c.mul(e).umod(this.n),d=c.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(f,r.getPublic(),d)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(f,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},d.prototype.recoverPubKey=function(e,t,r,i){c((3&r)===r,"The recovery param is more than two bits"),t=new u(t,i);var o=this.n,a=new n(e),s=t.r,f=t.s,d=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(o),p=o.sub(a).mul(h).umod(o),b=f.mul(h).umod(o);return this.g.mulAdd(p,s,b)},d.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},4858:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},3539:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function c(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function f(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function u(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=a,a.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var o=c(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var a=c(e,r);if(!1===a)return!1;var f=e.slice(r.place,a+r.place);if(r.place+=a,2!==e[r.place++])return!1;var u=c(e,r);if(!1===u)return!1;if(e.length!==u+r.place)return!1;var d=e.slice(r.place,u+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(f),this.s=new n(d),this.recoveryParam=null,!0},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=f(t),r=f(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];u(n,t.length),(n=n.concat(t)).push(2),u(n,r.length);var o=n.concat(r),a=[48];return u(a,o.length),a=a.concat(o),i.encode(a,e)}},4082:(e,t,r)=>{"use strict";var n=r(6204),i=r(5914),o=r(1560),a=o.assert,s=o.parseBytes,c=r(6958),f=r(6018);function u(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),c=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:c,Rencoded:o})},u.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return c.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return c.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!=(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return o.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}},6958:(e,t,r)=>{"use strict";var n=r(1560),i=n.assert,o=n.parseBytes,a=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},a(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),a(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},6018:(e,t,r)=>{"use strict";var n=r(9919),i=r(1560),o=i.assert,a=i.cachedProperty,s=i.parseBytes;function c(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}a(c,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(c,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(c,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(c,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),c.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},c.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=c},2970:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},1560:(e,t,r)=>{"use strict";var n=t,i=r(9919),o=r(6794),a=r(7705);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,c=o.andln(i-1);o.isOdd()?(s=c>(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,f=t.andln(3)+o&3;3===c&&(c=-1),3===f&&(f=-1),a=0==(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==f?c:-c,r[0].push(a),s=0==(1&f)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?f:-f,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},8612:e=>{e.exports="object"==typeof self?self.FormData:window.FormData},6204:(e,t,r)=>{var n=t;n.utils=r(6414),n.common=r(2238),n.sha=r(4538),n.ripemd=r(2185),n.hmac=r(6316),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},2238:(e,t,r)=>{"use strict";var n=r(6414),i=r(6794);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},6316:(e,t,r)=>{"use strict";var n=r(6414),i=r(6794);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},2185:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=n.rotl32,a=n.sum32,s=n.sum32_3,c=n.sum32_4,f=i.BlockHash;function u(){if(!(this instanceof u))return new u;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,f),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],f=this.h[3],u=this.h[4],g=r,w=n,v=i,_=f,S=u,E=0;E<80;E++){var M=a(o(c(r,d(E,n,i,f),e[p[E]+t],l(E)),m[E]),u);r=u,u=f,f=o(i,10),i=n,n=M,M=a(o(c(g,d(79-E,w,v,_),e[b[E]+t],h(E)),y[E]),S),g=S,S=_,_=o(v,10),v=w,w=M}M=s(this.h[1],i,_),this.h[1]=s(this.h[2],f,S),this.h[2]=s(this.h[3],u,g),this.h[3]=s(this.h[4],r,w),this.h[4]=s(this.h[0],n,v),this.h[0]=M},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},4538:(e,t,r)=>{"use strict";t.sha1=r(6854),t.sha224=r(9104),t.sha256=r(7284),t.sha384=r(8909),t.sha512=r(1260)},6854:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(2181),a=n.rotl32,s=n.sum32,c=n.sum32_5,f=o.ft_1,u=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,u),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],l=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),b=c(a(i,5),f(p,o,u,l),h,r[n],d[p]);h=l,l=u,u=a(o,30),o=i,i=b}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],h)},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},9104:(e,t,r)=>{"use strict";var n=r(6414),i=r(7284);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},7284:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(2181),a=r(6794),s=n.sum32,c=n.sum32_4,f=n.sum32_5,u=o.ch32,d=o.maj32,l=o.s0_256,h=o.s1_256,p=o.g0_256,b=o.g1_256,m=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=c(b(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],g=this.h[4],w=this.h[5],v=this.h[6],_=this.h[7];for(a(this.k.length===r.length),n=0;n<r.length;n++){var S=f(_,h(g),u(g,w,v),this.k[n],r[n]),E=s(l(i),d(i,o,m));_=v,v=w,w=g,g=s(y,S),y=m,m=o,o=i,i=s(S,E)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],y),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],w),this.h[6]=s(this.h[6],v),this.h[7]=s(this.h[7],_)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},8909:(e,t,r)=>{"use strict";var n=r(6414),i=r(1260);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},1260:(e,t,r)=>{"use strict";var n=r(6414),i=r(2238),o=r(6794),a=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,f=n.shr64_lo,u=n.sum64,d=n.sum64_hi,l=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,b=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function w(){if(!(this instanceof w))return new w;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function v(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function M(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function A(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function T(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,1)^s(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}function C(e,t){var r=s(e,t,19)^s(t,e,29)^f(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(w,y),e.exports=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=I(r[n-4],r[n-3]),o=C(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],c=x(r[n-30],r[n-29]),f=O(r[n-30],r[n-29]),u=r[n-32],d=r[n-31];r[n]=h(i,o,a,s,c,f,u,d),r[n+1]=p(i,o,a,s,c,f,u,d)}},w.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],c=this.h[4],f=this.h[5],h=this.h[6],p=this.h[7],y=this.h[8],g=this.h[9],w=this.h[10],x=this.h[11],O=this.h[12],I=this.h[13],C=this.h[14],P=this.h[15];o(this.k.length===r.length);for(var k=0;k<r.length;k+=2){var q=C,N=P,F=R(y,g),j=T(y,g),$=v(y,g,w,x,O),L=_(y,g,w,x,O,I),B=this.k[k],z=this.k[k+1],D=r[k],U=r[k+1],W=b(q,N,F,j,$,L,B,z,D,U),H=m(q,N,F,j,$,L,B,z,D,U);q=M(n,i),N=A(n,i),F=S(n,i,a,s,c),j=E(n,i,a,s,c,f);var V=d(q,N,F,j),G=l(q,N,F,j);C=O,P=I,O=w,I=x,w=y,x=g,y=d(h,p,W,H),g=l(p,p,W,H),h=c,p=f,c=a,f=s,a=n,s=i,n=d(W,H,V,G),i=l(W,H,V,G)}u(this.h,0,n,i),u(this.h,2,a,s),u(this.h,4,c,f),u(this.h,6,h,p),u(this.h,8,y,g),u(this.h,10,w,x),u(this.h,12,O,I),u(this.h,14,C,P)},w.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},2181:(e,t,r)=>{"use strict";var n=r(6414).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function a(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?a(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=a,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},6414:(e,t,r)=>{"use strict";var n=r(6794),i=r(5153);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=c(i.toString(16))}return r},t.zero2=s,t.zero8=c,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var a=new Array(o/4),s=0,c=t;s<a.length;s++,c+=4){var f;f="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],a[s]=f>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var c=0,f=t;return c+=(f=f+n>>>0)<t?1:0,c+=(f=f+o>>>0)<o?1:0,e+r+i+a+(c+=(f=f+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,c,f){var u=0,d=t;return u+=(d=d+n>>>0)<t?1:0,u+=(d=d+o>>>0)<o?1:0,u+=(d=d+s>>>0)<s?1:0,e+r+i+a+c+(u+=(d=d+f>>>0)<f?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,c,f){return t+n+o+s+f>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},4859:(e,t,r)=>{"use strict";var n=r(6204),i=r(7705),o=r(6794);function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=a,a.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,e);return this._update(r),this._reseed++,i.encode(a,t)}},5153:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},2256:(e,t,r)=>{var n=null;"undefined"!=typeof WebSocket?n=WebSocket:"undefined"!=typeof MozWebSocket?n=MozWebSocket:void 0!==r.g?n=r.g.WebSocket||r.g.MozWebSocket:"undefined"!=typeof window?n=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(n=self.WebSocket||self.MozWebSocket),e.exports=n},8086:(e,t,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,a=o?window:{};a.JS_SHA3_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=r.g:s&&(a=self);var c=!a.JS_SHA3_NO_COMMON_JS&&e.exports,f=r.amdO,u=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),l=[4,1024,262144,67108864],h=[0,8,16,24],p=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],b=[224,256,384,512],m=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136};!a.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!a.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var w=function(e,t,r){return function(n){return new q(e,t,e).update(n)[r]()}},v=function(e,t,r){return function(n,i){return new q(e,t,i).update(n)[r]()}},_=function(e,t,r){return function(t,n,i,o){return R["cshake"+e].update(t,n,i,o)[r]()}},S=function(e,t,r){return function(t,n,i,o){return R["kmac"+e].update(t,n,i,o)[r]()}},E=function(e,t,r,n){for(var i=0;i<y.length;++i){var o=y[i];e[o]=t(r,n,o)}return e},M=function(e,t){var r=w(e,t,"hex");return r.create=function(){return new q(e,t,e)},r.update=function(e){return r.create().update(e)},E(r,w,e,t)},A=[{name:"keccak",padding:[1,256,65536,16777216],bits:b,createMethod:M},{name:"sha3",padding:[6,1536,393216,100663296],bits:b,createMethod:M},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(e,t){var r=v(e,t,"hex");return r.create=function(r){return new q(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},E(r,v,e,t)}},{name:"cshake",padding:l,bits:m,createMethod:function(e,t){var r=g[e],n=_(e,0,"hex");return n.create=function(n,i,o){return i||o?new q(e,t,n).bytepad([i,o],r):R["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},E(n,_,e,t)}},{name:"kmac",padding:l,bits:m,createMethod:function(e,t){var r=g[e],n=S(e,0,"hex");return n.create=function(n,i,o){return new N(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},E(n,S,e,t)}}],R={},T=[],x=0;x<A.length;++x)for(var O=A[x],I=O.bits,C=0;C<I.length;++C){var P=O.name+"_"+I[C];if(T.push(P),R[P]=O.createMethod(I[C],O.padding),"sha3"!==O.name){var k=O.name+I[C];T.push(k),R[k]=R[P]}}function q(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function N(e,t,r){q.call(this,e,t,r)}q.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,a=this.blocks,s=this.byteCount,c=e.length,f=this.blockCount,d=0,l=this.s;d<c;){if(this.reset)for(this.reset=!1,a[0]=this.block,n=1;n<f+1;++n)a[n]=0;if(t)for(n=this.start;d<c&&n<s;++d)a[n>>2]|=e[d]<<h[3&n++];else for(n=this.start;d<c&&n<s;++d)(o=e.charCodeAt(d))<128?a[n>>2]|=o<<h[3&n++]:o<2048?(a[n>>2]|=(192|o>>6)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]):o<55296||o>=57344?(a[n>>2]|=(224|o>>12)<<h[3&n++],a[n>>2]|=(128|o>>6&63)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++d)),a[n>>2]|=(240|o>>18)<<h[3&n++],a[n>>2]|=(128|o>>12&63)<<h[3&n++],a[n>>2]|=(128|o>>6&63)<<h[3&n++],a[n>>2]|=(128|63&o)<<h[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=a[f],n=0;n<f;++n)l[n]^=a[n];F(l),this.reset=!0}else this.start=n}return this},q.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},q.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;else for(var a=0;a<e.length;++a){var s=e.charCodeAt(a);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++a)),n+=4)}return n+=this.encode(8*n),this.update(e),n},q.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,o=[];return o.length=i,this.update(o),this},q.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];F(n)}},q.prototype.toString=q.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s="";a<n;){for(o=0;o<t&&a<n;++o,++a)e=r[o],s+=d[e>>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];a%t==0&&(F(r),o=0)}return i&&(e=r[o],s+=d[e>>4&15]+d[15&e],i>1&&(s+=d[e>>12&15]+d[e>>8&15]),i>2&&(s+=d[e>>20&15]+d[e>>16&15])),s},q.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var c=new Uint32Array(e);a<n;){for(o=0;o<t&&a<n;++o,++a)c[a]=r[o];a%t==0&&F(r)}return i&&(c[o]=r[o],e=e.slice(0,s)),e},q.prototype.buffer=q.prototype.arrayBuffer,q.prototype.digest=q.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,a=0,s=0,c=[];s<i;){for(a=0;a<r&&s<i;++a,++s)e=s<<2,t=n[a],c[e]=255&t,c[e+1]=t>>8&255,c[e+2]=t>>16&255,c[e+3]=t>>24&255;s%r==0&&F(n)}return o&&(e=s<<2,t=n[a],c[e]=255&t,o>1&&(c[e+1]=t>>8&255),o>2&&(c[e+2]=t>>16&255)),c},N.prototype=new q,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),q.prototype.finalize.call(this)};var F=function(e){var t,r,n,i,o,a,s,c,f,u,d,l,h,b,m,y,g,w,v,_,S,E,M,A,R,T,x,O,I,C,P,k,q,N,F,j,$,L,B,z,D,U,W,H,V,G,X,J,Z,Y,K,Q,ee,te,re,ne,ie,oe,ae,se,ce,fe,ue;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],c=e[4]^e[14]^e[24]^e[34]^e[44],f=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(c<<1|f>>>31),r=o^(f<<1|c>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(u<<1|d>>>31),r=s^(d<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=c^(l<<1|h>>>31),r=f^(h<<1|l>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(i<<1|o>>>31),r=d^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,b=e[0],m=e[1],G=e[11]<<4|e[10]>>>28,X=e[10]<<4|e[11]>>>28,O=e[20]<<3|e[21]>>>29,I=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ce=e[30]<<9|e[31]>>>23,U=e[40]<<18|e[41]>>>14,W=e[41]<<18|e[40]>>>14,N=e[2]<<1|e[3]>>>31,F=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,fe=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,j=e[14]<<6|e[15]>>>26,$=e[15]<<6|e[14]>>>26,w=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,K=e[35]<<15|e[34]>>>17,k=e[45]<<29|e[44]>>>3,q=e[44]<<29|e[45]>>>3,A=e[6]<<28|e[7]>>>4,R=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,B=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,H=e[8]<<27|e[9]>>>5,V=e[9]<<27|e[8]>>>5,T=e[18]<<20|e[19]>>>12,x=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,D=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,M=e[49]<<14|e[48]>>>18,e[0]=b^~y&w,e[1]=m^~g&v,e[10]=A^~T&O,e[11]=R^~x&I,e[20]=N^~j&L,e[21]=F^~$&B,e[30]=H^~G&J,e[31]=V^~X&Z,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~w&_,e[3]=g^~v&S,e[12]=T^~O&C,e[13]=x^~I&P,e[22]=j^~L&z,e[23]=$^~B&D,e[32]=G^~J&Y,e[33]=X^~Z&K,e[42]=ne^~oe&se,e[43]=ie^~ae&ce,e[4]=w^~_&E,e[5]=v^~S&M,e[14]=O^~C&k,e[15]=I^~P&q,e[24]=L^~z&U,e[25]=B^~D&W,e[34]=J^~Y&Q,e[35]=Z^~K&ee,e[44]=oe^~se&fe,e[45]=ae^~ce&ue,e[6]=_^~E&b,e[7]=S^~M&m,e[16]=C^~k&A,e[17]=P^~q&R,e[26]=z^~U&N,e[27]=D^~W&F,e[36]=Y^~Q&H,e[37]=K^~ee&V,e[46]=se^~fe&te,e[47]=ce^~ue&re,e[8]=E^~b&y,e[9]=M^~m&g,e[18]=k^~A&T,e[19]=q^~R&x,e[28]=U^~N&j,e[29]=W^~F&$,e[38]=Q^~H&G,e[39]=ee^~V&X,e[48]=fe^~te&ne,e[49]=ue^~re&ie,e[0]^=p[n],e[1]^=p[n+1]};if(c)e.exports=R;else{for(x=0;x<T.length;++x)a[T[x]]=R[T[x]];f&&(void 0===(n=function(){return R}.call(t,r,t,e))||(e.exports=n))}}()},6794:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},7705:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},9610:(e,t,r)=>{const n=r(1427),{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=r(5958),{re:a,t:s}=r(6766),c=r(6145),{compareIdentifiers:f}=r(624);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?a[s.LOOSE]:a[s.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<o)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),f(this.major,e.major)||f(this.minor,e.minor)||f(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return f(r,i)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const r=this.build[t],i=e.build[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return f(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(0===f(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},4503:(e,t,r)=>{const n=r(9610);e.exports=(e,t)=>new n(e,t).major},5958:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},1427:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},624:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),i=t.test(r);return n&&i&&(e=+e,r=+r),e===r?0:n&&!i?-1:i&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},6145:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},6766:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=r(5958),i=r(1427),o=(t=e.exports={}).re=[],a=t.src=[],s=t.t={};let c=0;const f=(e,t,r)=>{const n=c++;i(e,n,t),s[e]=n,a[n]=t,o[n]=new RegExp(t,r?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","[0-9]+"),f("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),f("MAINVERSION",`(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})\\.(${a[s.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})\\.(${a[s.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${a[s.NUMERICIDENTIFIER]}|${a[s.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${a[s.NUMERICIDENTIFIERLOOSE]}|${a[s.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${a[s.PRERELEASEIDENTIFIER]}(?:\\.${a[s.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${a[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[s.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER","[0-9A-Za-z-]+"),f("BUILD",`(?:\\+(${a[s.BUILDIDENTIFIER]}(?:\\.${a[s.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${a[s.MAINVERSION]}${a[s.PRERELEASE]}?${a[s.BUILD]}?`),f("FULL",`^${a[s.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${a[s.MAINVERSIONLOOSE]}${a[s.PRERELEASELOOSE]}?${a[s.BUILD]}?`),f("LOOSE",`^${a[s.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${a[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${a[s.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:\\.(${a[s.XRANGEIDENTIFIER]})(?:${a[s.PRERELEASE]})?${a[s.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[s.XRANGEIDENTIFIERLOOSE]})(?:${a[s.PRERELEASELOOSE]})?${a[s.BUILD]}?)?)?`),f("XRANGE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${a[s.GTLT]}\\s*${a[s.XRANGEPLAINLOOSE]}$`),f("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),f("COERCERTL",a[s.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${a[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${a[s.LONETILDE]}${a[s.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${a[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${a[s.LONECARET]}${a[s.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${a[s.LONECARET]}${a[s.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${a[s.GTLT]}\\s*(${a[s.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${a[s.GTLT]}\\s*(${a[s.LOOSEPLAIN]}|${a[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${a[s.XRANGEPLAIN]})\\s+-\\s+(${a[s.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${a[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[s.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},116:(e,t,r)=>{!function(){"use strict";var t,n=r(7096);t=[{field:"fileName",length:100},{field:"fileMode",length:8},{field:"uid",length:8},{field:"gid",length:8},{field:"fileSize",length:12},{field:"mtime",length:12},{field:"checksum",length:8},{field:"type",length:1},{field:"linkName",length:100},{field:"ustar",length:8},{field:"owner",length:32},{field:"group",length:32},{field:"majorNumber",length:8},{field:"minorNumber",length:8},{field:"filenamePrefix",length:155},{field:"padding",length:12}],e.exports.structure=t,e.exports.format=function(e,r){var i=n.clean(512),o=0;return t.forEach((function(t){var r,n,a=e[t.field]||"";for(r=0,n=a.length;r<n;r+=1)i[o]=a.charCodeAt(r),o+=1;o+=t.length-r})),"function"==typeof r?r(i,o):i}}()},1117:(e,t,r)=>{!function(){"use strict";var t,n=r(116),i=r(7096),o=512;function a(e){this.written=0,t=(e||20)*o,this.out=i.clean(t)}a.prototype.append=function(e,r,a,s){var c,f,u,d,l,h,p;if("string"==typeof r)r=i.stringToUint8(r);else if(r.constructor!==Uint8Array.prototype.constructor)throw"Invalid input type. You gave me: "+r.constructor.toString().match(/function\s*([$A-Za-z_][0-9A-Za-z_]*)\s*\(/)[1];return"function"==typeof a&&(s=a,a={}),u=(a=a||{}).mode||4095&parseInt("777",8),d=a.mtime||Math.floor(+new Date/1e3),l=a.uid||0,h=a.gid||0,c={fileName:e,fileMode:i.pad(u,7),uid:i.pad(l,7),gid:i.pad(h,7),fileSize:i.pad(r.length,11),mtime:i.pad(d,11),checksum:" ",type:"0",ustar:"ustar ",owner:a.owner||"",group:a.group||""},f=0,Object.keys(c).forEach((function(e){var t,r,n=c[e];for(t=0,r=n.length;t<r;t+=1)f+=n.charCodeAt(t)})),c.checksum=i.pad(f,6)+"\0 ",p=n.format(c),this.out.set(p,this.written),this.written+=p.length,this.written+r.length>this.out.length&&(this.out=i.extend(this.out,this.written,r.length,t)),this.out.set(r,this.written),this.written+=r.length+(o-(r.length%o||o)),this.out.length-this.written<1024&&(this.out=i.extend(this.out,this.written,1024,t)),"function"==typeof s&&s(this.out),this.out},a.prototype.clear=function(){this.written=0,this.out=i.clean(t)},a.utils=i,a.stringToUint8=i.stringToUint8,a.uint8ToBase64=i.uint8ToBase64,a.base64ToUint8=i.base64ToUint8,e.exports=a}()},7096:e=>{!function(){"use strict";var t=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function r(e){var t,r=new Uint8Array(e);for(t=0;t<e;t+=1)r[t]=0;return r}e.exports.clean=r,e.exports.pad=function(e,t,r){return e=e.toString(r||8),"000000000000".substr(e.length+12-t)+e},e.exports.extend=function(e,t,n,i){var o=r((parseInt((t+n)/i)+1)*i);return o.set(e),o},e.exports.stringToUint8=function(e,t,n){var i,o;for(t=t||r(e.length),n=n||0,i=0,o=e.length;i<o;i+=1)t[n]=e.charCodeAt(i),n+=1;return t},e.exports.uint8ToBase64=function(e){var r,n,i,o,a=e.length%3,s="";for(r=0,i=e.length-a;r<i;r+=3)n=(e[r]<<16)+(e[r+1]<<8)+e[r+2],s+=t[(o=n)>>18&63]+t[o>>12&63]+t[o>>6&63]+t[63&o];switch(s.length%4){case 1:s+="=";break;case 2:s+="=="}return s},e.exports.base64ToUint8=function(e){for(var n,i=e.match(/^([^=]+)/)[1],o=e.match(/(=*)$/)[1].length,a=0,s=i.length,c=0,f=r(.75*i.length+o);a<s;)n=0,n|=t.indexOf(i.charAt(a)||"A")<<18,a+=1,n|=t.indexOf(i.charAt(a)||"A")<<12,a+=1,n|=t.indexOf(i.charAt(a)||"A")<<6,a+=1,n|=t.indexOf(i.charAt(a)||"A"),a+=1,f[c]=n>>16&255,f[c+=1]=n>>8&255,f[c+=1]=255&n,c+=1;return f}}()},6601:()=>{},9214:()=>{},6787:()=>{},3775:(e,t,r)=>{"use strict";r.r(t),r.d(t,{coerce:()=>s,empty:()=>n,equals:()=>a,fromHex:()=>o,fromString:()=>f,isBinary:()=>c,toHex:()=>i,toString:()=>u});const n=new Uint8Array(0),i=e=>e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),""),o=e=>{const t=e.match(/../g);return t?new Uint8Array(t.map((e=>parseInt(e,16)))):n},a=(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 new Error("Unknown type, must be binary type")},c=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),f=e=>(new TextEncoder).encode(e),u=e=>(new TextDecoder).decode(e)},8335:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Digest:()=>c,create:()=>o,decode:()=>a,equals:()=>s});var n=r(3775),i=r(5712);const o=(e,t)=>{const r=t.byteLength,n=i.encodingLength(e),o=n+i.encodingLength(r),a=new Uint8Array(o+r);return i.encodeTo(e,a,0),i.encodeTo(r,a,n),a.set(t,o),new c(e,r,t,a)},a=e=>{const t=(0,n.coerce)(e),[r,o]=i.decode(t),[a,s]=i.decode(t.subarray(o)),f=t.subarray(o+s);if(f.byteLength!==a)throw new Error("Incorrect length");return new c(r,a,f,t)},s=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&(0,n.equals)(e.bytes,t.bytes);class c{constructor(e,t,r,n){this.code=e,this.size=t,this.digest=r,this.bytes=n}}},5151:(e,t,r)=>{"use strict";r.r(t),r.d(t,{CID:()=>g,bytes:()=>s,digest:()=>o,hasher:()=>n,varint:()=>i});var n={};r.r(n),r.d(n,{Hasher:()=>C,from:()=>I});var i=r(5712),o=r(8335);const a=function(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),n=0;n<r.length;n++)r[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),a=o.charCodeAt(0);if(255!==r[a])throw new TypeError(o+" is ambiguous");r[a]=i}var s=e.length,c=e.charAt(0),f=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function d(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,i=0;e[t]===c;)n++,t++;for(var o=(e.length-t)*f+1>>>0,a=new Uint8Array(o);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var d=0,l=o-1;(0!==u||d<i)&&-1!==l;l--,d++)u+=s*a[l]>>>0,a[l]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");i=d,t++}if(" "!==e[t]){for(var h=o-i;h!==o&&0===a[h];)h++;for(var p=new Uint8Array(n+(o-h)),b=n;h!==o;)p[b++]=a[h++];return p}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,n=0,i=0,o=t.length;i!==o&&0===t[i];)i++,r++;for(var a=(o-i)*u+1>>>0,f=new Uint8Array(a);i!==o;){for(var d=t[i],l=0,h=a-1;(0!==d||l<n)&&-1!==h;h--,l++)d+=256*f[h]>>>0,f[h]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");n=l,i++}for(var p=a-n;p!==a&&0===f[p];)p++;for(var b=c.repeat(r);p<a;++p)b+=e.charAt(f[p]);return b},decodeUnsafe:d,decode:function(e){var r=d(e);if(r)return r;throw new Error(`Non-${t} character`)}}};var s=r(3775);class c{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class f{constructor(e,t,r){this.name=e,this.prefix=t,this.baseDecode=r}decode(e){if("string"==typeof e){if(e[0]===this.prefix)return this.baseDecode(e.slice(1));throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)}throw Error("Can only multibase decode strings")}or(e){return d(this,e)}}class u{constructor(e){this.decoders=e}or(e){return d(this,e)}decode(e){const t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const d=(e,t)=>new u({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class l{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)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const h=({name:e,prefix:t,encode:r,decode:n})=>new l(e,t,r,n),p=({prefix:e,name:t,alphabet:r})=>{const{encode:n,decode:i}=a(r,t);return h({prefix:e,name:t,encode:n,decode:e=>(0,s.coerce)(i(e))})},b=({name:e,prefix:t,bitsPerChar:r,alphabet:n})=>h({prefix:t,name:e,encode:e=>((e,t,r)=>{const n="="===t[t.length-1],i=(1<<r)-1;let o="",a=0,s=0;for(let c=0;c<e.length;++c)for(s=s<<8|e[c],a+=8;a>r;)a-=r,o+=t[i&s>>a];if(a&&(o+=t[i&s<<r-a]),n)for(;o.length*r&7;)o+="=";return o})(e,n,r),decode:t=>((e,t,r,n)=>{const i={};for(let u=0;u<t.length;++u)i[t[u]]=u;let o=e.length;for(;"="===e[o-1];)--o;const a=new Uint8Array(o*r/8|0);let s=0,c=0,f=0;for(let u=0;u<o;++u){const t=i[e[u]];if(void 0===t)throw new SyntaxError(`Non-${n} character`);c=c<<r|t,s+=r,s>=8&&(s-=8,a[f++]=255&c>>s)}if(s>=r||255&c<<8-s)throw new SyntaxError("Unexpected end of data");return a})(t,n,r,e)}),m=p({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),y=(p({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),b({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}));b({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),b({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),b({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),b({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),b({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),b({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),b({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),b({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});class g{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:T,byteLength:T,code:R,version:R,multihash:R,bytes:R,_baseCache:T,asCID:T})}toV0(){if(0===this.version)return this;{const{code:e,multihash:t}=this;if(e!==S)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==E)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return g.createV0(t)}}toV1(){switch(this.version){case 0:{const{code:e,digest:t}=this.multihash,r=o.create(e,t);return g.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&o.equals(this.multihash,e.multihash)}toString(e){const{bytes:t,version:r,_baseCache:n}=this;return 0===r?v(t,n,e||m.encoder):_(t,n,e||y.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 x(/^0\.0/,O),!(!e||!e[A]&&e.asCID!==e)}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof g)return e;if(null!=e&&e.asCID===e){const{version:t,code:r,multihash:n,bytes:i}=e;return new g(t,r,n,i||M(t,r,n.bytes))}if(null!=e&&!0===e[A]){const{version:t,multihash:r,code:n}=e,i=o.decode(r);return g.create(t,n,i)}return null}static create(e,t,r){if("number"!=typeof t)throw new Error("String codecs are no longer supported");switch(e){case 0:if(t!==S)throw new Error(`Version 0 CID must use dag-pb (code: ${S}) block encoding`);return new g(e,t,r,r.bytes);case 1:{const n=M(e,t,r.bytes);return new g(e,t,r,n)}default:throw new Error("Invalid version")}}static createV0(e){return g.create(0,S,e)}static createV1(e,t){return g.create(1,e,t)}static decode(e){const[t,r]=g.decodeFirst(e);if(r.length)throw new Error("Incorrect length");return t}static decodeFirst(e){const t=g.inspectBytes(e),r=t.size-t.multihashSize,n=(0,s.coerce)(e.subarray(r,r+t.multihashSize));if(n.byteLength!==t.multihashSize)throw new Error("Incorrect length");const i=n.subarray(t.multihashSize-t.digestSize),a=new o.Digest(t.multihashCode,t.digestSize,i,n);return[0===t.version?g.createV0(a):g.createV1(t.codec,a),e.subarray(t.size)]}static inspectBytes(e){let t=0;const r=()=>{const[r,n]=i.decode(e.subarray(t));return t+=n,r};let n=r(),o=S;if(18===n?(n=0,t=0):1===n&&(o=r()),0!==n&&1!==n)throw new RangeError(`Invalid CID version ${n}`);const a=t,s=r(),c=r(),f=t+c;return{version:n,codec:o,multihashCode:s,digestSize:c,multihashSize:f-a,size:f}}static parse(e,t){const[r,n]=w(e,t),i=g.decode(n);return i._baseCache.set(r,e),i}}const w=(e,t)=>{switch(e[0]){case"Q":{const r=t||m;return[m.prefix,r.decode(`${m.prefix}${e}`)]}case m.prefix:{const r=t||m;return[m.prefix,r.decode(e)]}case y.prefix:{const r=t||y;return[y.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)]}},v=(e,t,r)=>{const{prefix:n}=r;if(n!==m.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=t.get(n);if(null==i){const i=r.encode(e).slice(1);return t.set(n,i),i}return i},_=(e,t,r)=>{const{prefix:n}=r,i=t.get(n);if(null==i){const i=r.encode(e);return t.set(n,i),i}return i},S=112,E=18,M=(e,t,r)=>{const n=i.encodingLength(e),o=n+i.encodingLength(t),a=new Uint8Array(o+r.byteLength);return i.encodeTo(e,a,0),i.encodeTo(t,a,n),a.set(r,o),a},A=Symbol.for("@ipld/js-cid/CID"),R={writable:!1,configurable:!1,enumerable:!0},T={writable:!1,enumerable:!1,configurable:!1},x=(e,t)=>{if(!e.test("0.0.0-dev"))throw new Error(t);console.warn(t)},O="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",I=({name:e,code:t,encode:r})=>new C(e,t,r);class C{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){const t=this.encode(e);return t instanceof Uint8Array?o.create(this.code,t):t.then((e=>o.create(this.code,e)))}throw Error("Unknown type, must be binary type")}}},5712:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>m,encodeTo:()=>y,encodingLength:()=>g});var n=function e(t,r,n){r=r||[];var o=n=n||0;for(;t>=i;)r[n++]=255&t|128,t/=128;for(;-128&t;)r[n++]=255&t|128,t>>>=7;return r[n]=0|t,e.bytes=n-o+1,r},i=Math.pow(2,31);var o=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length;do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint");n=t[a++],i+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7}while(n>=128);return e.bytes=a-r,i};var a=Math.pow(2,7),s=Math.pow(2,14),c=Math.pow(2,21),f=Math.pow(2,28),u=Math.pow(2,35),d=Math.pow(2,42),l=Math.pow(2,49),h=Math.pow(2,56),p=Math.pow(2,63);const b={encode:n,decode:o,encodingLength:function(e){return e<a?1:e<s?2:e<c?3:e<f?4:e<u?5:e<d?6:e<l?7:e<h?8:e<p?9:10}},m=e=>[b.decode(e),b.decode.bytes],y=(e,t,r=0)=>(b.encode(e,t,r),t),g=e=>b.encodingLength(e)},8597:e=>{"use strict";e.exports={i8:"6.5.4"}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";r.r(n),r.d(n,{ADDRESS_HEX_LENGTH:()=>U,BATCH_ID_HEX_LENGTH:()=>V,BRANCHES:()=>z,Bee:()=>Wo,BeeArgumentError:()=>p,BeeDebug:()=>ia,BeeError:()=>h,BeeModes:()=>$,BeeResponseError:()=>b,CHUNK_SIZE:()=>D,ENCRYPTED_REFERENCE_BYTES_LENGTH:()=>Z,ENCRYPTED_REFERENCE_HEX_LENGTH:()=>X,FEED_INDEX_HEX_LENGTH:()=>te,PSS_TARGET_HEX_LENGTH_MAX:()=>W,PUBKEY_HEX_LENGTH:()=>H,REFERENCE_BYTES_LENGTH:()=>J,REFERENCE_HEX_LENGTH:()=>G,RedundancyLevel:()=>re,RedundancyStrategy:()=>ne,SECTION_SIZE:()=>B,SIGNATURE_BYTES_LENGTH:()=>se,SIGNATURE_HEX_LENGTH:()=>ae,SPAN_SIZE:()=>L,STAMPS_DEPTH_MAX:()=>K,STAMPS_DEPTH_MIN:()=>Y,SUPPORTED_BEE_VERSION:()=>Qo,SUPPORTED_BEE_VERSION_EXACT:()=>Zo,TAGS_LIMIT_MAX:()=>ee,TAGS_LIMIT_MIN:()=>Q,TOPIC_BYTES_LENGTH:()=>ie,TOPIC_HEX_LENGTH:()=>oe,Utils:()=>o});var e={};r.r(e),r.d(e,{hm:()=>S,yx:()=>E,ci:()=>g,nr:()=>y,I4:()=>w,A7:()=>v,Pn:()=>m});var t={};r.r(t),r.d(t,{XB:()=>R,eq:()=>x,mA:()=>O,yK:()=>C,tI:()=>I,Gt:()=>A,_t:()=>M,up:()=>T,k3:()=>P,_z:()=>k});var i={};r.r(i),r.d(i,{OS:()=>oo,V4:()=>io,cX:()=>ro,c4:()=>eo,iA:()=>ao,LL:()=>to,XA:()=>no});var o={};r.r(o),r.d(o,{Bytes:()=>t.Bytes,EthAddress:()=>i.EthAddress,FlexBytes:()=>t.FlexBytes,HexString:()=>e.HexString,PrefixedHexString:()=>e.PrefixedHexString,approximateOverheadForRedundancyLevel:()=>ma,assertBytes:()=>R,assertFlexBytes:()=>x,assertHexString:()=>S,assertPrefixedHexString:()=>E,bytesAtOffset:()=>O,bytesEqual:()=>C,bytesToHex:()=>g,ethToSwarmAddress:()=>oo,flexBytesAtOffset:()=>I,fromLittleEndian:()=>io,getAmountForTtl:()=>ha,getCollectionSize:()=>Ro,getDepthForCapacity:()=>pa,getFolderSize:()=>Bo,getRedundancyStat:()=>Sa,getRedundancyStats:()=>_a,getStampCostInBzz:()=>da,getStampCostInPlur:()=>ua,getStampEffectiveBytes:()=>fa,getStampMaximumCapacityBytes:()=>sa,getStampTtlSeconds:()=>la,getStampUsage:()=>aa,hexToBytes:()=>y,intToHex:()=>w,isBytes:()=>M,isFlexBytes:()=>T,isHexEthAddress:()=>ro,isHexString:()=>v,isNodeReadable:()=>Yn,isReadable:()=>Jn,isReadableStream:()=>Zn,keccak256Hash:()=>j,makeEthAddress:()=>eo,makeEthereumWalletSigner:()=>ao,makeHexEthAddress:()=>to,makeHexString:()=>m,makeMaxTarget:()=>oa,normalizeToReadableStream:()=>ti,readableNodeToWeb:()=>Kn,readableWebToNode:()=>ei,toLittleEndian:()=>no});var a=r(6174),s=r(4615);s.tk,s.Gi,s.Ct,s.L0,s.uI;const c=s.WP,f=(s.tl,s.jT,s.kk,s.eI),u=s.xP;s.Yk,s.Fi,s.OW;var d=r(236),l=r.n(d);class h extends Error{constructor(e){super(e)}}class p extends h{constructor(e,t){super(e),this.value=t}}class b extends h{constructor(e,t,r,n,i,o,a){super(e),this.code=t,this.axiosStatus=r,this.status=n,this.config=i,this.request=o,this.response=a}}function m(e,t){if("number"==typeof e)return w(e,t);if(e instanceof Uint8Array)return g(e,t);if("string"==typeof e){if(_(e)){const r=e.slice(2);if(t&&r.length!==t)throw new TypeError(`Length mismatch for valid hex string. Expecting length ${t}: ${r}`);return r}return S(e,t),e}throw new TypeError("Not HexString compatible type!")}function y(e){S(e);const t=P(e.length/2);for(let r=0;r<t.length;r++){const n=e.substr(2*r,2);t[r]=parseInt(n,16)}return t}function g(e,t){const r=Array.from(e,(e=>e.toString(16).padStart(2,"0"))).join("");if(t&&r.length!==t)throw new TypeError(`Resulting HexString does not have expected length ${t}: ${r}`);return r}function w(e,t){if(!Number.isInteger(e))throw new TypeError("the value provided is not integer");if(e>Number.MAX_SAFE_INTEGER)throw new TypeError("the value provided exceeds safe integer");if(e<0)throw new TypeError("the value provided is a negative integer");const r=e.toString(16);if(t&&r.length!==t)throw new TypeError(`Resulting HexString does not have expected length ${t}: ${r}`);return r}function v(e,t){return"string"==typeof e&&/^[0-9a-f]+$/i.test(e)&&(!t||e.length===t)}function _(e){return"string"==typeof e&&/^0x[0-9a-f]+$/i.test(e)}function S(e,t,r="value"){if(!v(e,t)){if(_(e))throw new TypeError(`${r} not valid non prefixed hex string (has 0x prefix): ${e}`);throw new TypeError(`${r} not valid hex string${t?` of length ${t}`:""}: ${e}`)}}function E(e,t="value"){if(!_(e))throw new TypeError(`${t} not valid prefixed hex string: ${e}`)}function M(e,t){return e instanceof Uint8Array&&e.length===t}function A(e,t,r){if(!(e instanceof Uint8Array))throw new TypeError("Data has to an Uint8Array!");return M(e.slice(t,t+r),r)}function R(e,t){if(!M(e,t))throw new TypeError(`Parameter is not valid Bytes of length: ${t} !== ${e.length}`)}function T(e,t,r){return e instanceof Uint8Array&&e.length>=t&&e.length<=r}function x(e,t,r){if(!T(e,t,r))throw new TypeError(`Parameter is not valid FlexBytes of min: ${t}, max: ${r}, length: ${e.length}`)}function O(e,t,r){const n=e.slice(t,t+r);return R(n,r),n}function I(e,t,r,n){return e.slice(t)}function C(e,t){return e.length===t.length&&e.every(((e,r)=>e===t[r]))}function P(e){return new Uint8Array(e)}function k(e){return Object.assign(e,{text:()=>new TextDecoder("utf-8").decode(e),json:()=>JSON.parse(new TextDecoder("utf-8").decode(e)),hex:()=>g(e)})}var q=r(8086),N=r.n(q);const{keccak256:F}=N();function j(...e){const t=F.create();return e.forEach((e=>t.update(e))),Uint8Array.from(t.digest())}let $;!function(e){e.FULL="full",e.LIGHT="light",e.ULTRA_LIGHT="ultra-light",e.DEV="dev"}($||($={}));const L=8,B=32,z=128,D=B*z,U=64,W=6,H=66,V=64,G=64,X=128,J=32,Z=64,Y=17,K=255,Q=1,ee=1e3,te=16;let re,ne;!function(e){e[e.OFF=0]="OFF",e[e.MEDIUM=1]="MEDIUM",e[e.STRONG=2]="STRONG",e[e.INSANE=3]="INSANE",e[e.PARANOID=4]="PARANOID"}(re||(re={})),function(e){e[e.NONE=0]="NONE",e[e.DATA=1]="DATA",e[e.PROX=2]="PROX",e[e.RACE=3]="RACE"}(ne||(ne={}));const ie=32,oe=64,ae=130,se=65;function ce(e){if("function"==typeof File)return e instanceof File;const t=e;return"object"==typeof t&&"string"==typeof t.name&&("function"==typeof t.stream||"function"==typeof t.arrayBuffer)}async function fe(e){return e.arrayBuffer?e.arrayBuffer():new Promise((t=>{const r=new FileReader;r.onload=()=>t(r.result),r.readAsArrayBuffer(e)}))}var ue=r(6787);const de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol:e=>`Symbol(${e})`;function le(){}function he(e){return"object"==typeof e&&null!==e||"function"==typeof e}const pe=le;function be(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(e){}}const me=Promise,ye=Promise.prototype.then,ge=Promise.resolve.bind(me),we=Promise.reject.bind(me);function ve(e){return new me(e)}function _e(e){return ge(e)}function Se(e){return we(e)}function Ee(e,t,r){return ye.call(e,t,r)}function Me(e,t,r){Ee(Ee(e,t,r),void 0,pe)}function Ae(e,t){Me(e,t)}function Re(e,t){Me(e,void 0,t)}function Te(e,t,r){return Ee(e,t,r)}function xe(e){Ee(e,void 0,pe)}let Oe=e=>{if("function"==typeof queueMicrotask)Oe=queueMicrotask;else{const e=_e(void 0);Oe=t=>Ee(e,t)}return Oe(e)};function Ie(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function Ce(e,t,r){try{return _e(Ie(e,t,r))}catch(e){return Se(e)}}class Pe{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){const t=this._back;let r=t;16383===t._elements.length&&(r={_elements:[],_next:void 0}),t._elements.push(e),r!==t&&(this._back=r,t._next=r),++this._size}shift(){const e=this._front;let t=e;const r=this._cursor;let n=r+1;const i=e._elements,o=i[r];return 16384===n&&(t=e._next,n=0),--this._size,this._cursor=n,e!==t&&(this._front=t),i[r]=void 0,o}forEach(e){let t=this._cursor,r=this._front,n=r._elements;for(;!(t===n.length&&void 0===r._next||t===n.length&&(r=r._next,n=r._elements,t=0,0===n.length));)e(n[t]),++t}peek(){const e=this._front,t=this._cursor;return e._elements[t]}}const ke=de("[[AbortSteps]]"),qe=de("[[ErrorSteps]]"),Ne=de("[[CancelSteps]]"),Fe=de("[[PullSteps]]"),je=de("[[ReleaseSteps]]");function $e(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?De(e):"closed"===t._state?function(e){De(e),He(e)}(e):Ue(e,t._storedError)}function Le(e,t){return ln(e._ownerReadableStream,t)}function Be(e){const t=e._ownerReadableStream;"readable"===t._state?We(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){Ue(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}(e),t._readableStreamController[je](),t._reader=void 0,e._ownerReadableStream=void 0}function ze(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function De(e){e._closedPromise=ve(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r}))}function Ue(e,t){De(e),We(e,t)}function We(e,t){void 0!==e._closedPromise_reject&&(xe(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}function He(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0)}const Ve=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},Ge=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Xe(e,t){if(void 0!==e&&"object"!=typeof(r=e)&&"function"!=typeof r)throw new TypeError(`${t} is not an object.`);var r}function Je(e,t){if("function"!=typeof e)throw new TypeError(`${t} is not a function.`)}function Ze(e,t){if(!function(e){return"object"==typeof e&&null!==e||"function"==typeof e}(e))throw new TypeError(`${t} is not an object.`)}function Ye(e,t,r){if(void 0===e)throw new TypeError(`Parameter ${t} is required in '${r}'.`)}function Ke(e,t,r){if(void 0===e)throw new TypeError(`${t} is required in '${r}'.`)}function Qe(e){return Number(e)}function et(e){return 0===e?0:e}function tt(e,t){const r=Number.MAX_SAFE_INTEGER;let n=Number(e);if(n=et(n),!Ve(n))throw new TypeError(`${t} is not a finite number`);if(n=function(e){return et(Ge(e))}(n),n<0||n>r)throw new TypeError(`${t} is outside the accepted range of 0 to ${r}, inclusive`);return Ve(n)&&0!==n?n:0}function rt(e){if(!he(e))return!1;if("function"!=typeof e.getReader)return!1;try{return"boolean"==typeof e.locked}catch(e){return!1}}function nt(e){if(!he(e))return!1;if("function"!=typeof e.getWriter)return!1;try{return"boolean"==typeof e.locked}catch(e){return!1}}function it(e,t){if(!un(e))throw new TypeError(`${t} is not a ReadableStream.`)}function ot(e,t){e._reader._readRequests.push(t)}function at(e,t,r){const n=e._reader._readRequests.shift();r?n._closeSteps():n._chunkSteps(t)}function st(e){return e._reader._readRequests.length}function ct(e){const t=e._reader;return void 0!==t&&!!ut(t)}class ft{constructor(e){if(Ye(e,1,"ReadableStreamDefaultReader"),it(e,"First parameter"),dn(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");$e(this,e),this._readRequests=new Pe}get closed(){return ut(this)?this._closedPromise:Se(lt("closed"))}cancel(e){return ut(this)?void 0===this._ownerReadableStream?Se(ze("cancel")):Le(this,e):Se(lt("cancel"))}read(){if(!ut(this))return Se(lt("read"));if(void 0===this._ownerReadableStream)return Se(ze("read from"));let e,t;const r=ve(((r,n)=>{e=r,t=n}));return function(e,t){const r=e._ownerReadableStream;r._disturbed=!0,"closed"===r._state?t._closeSteps():"errored"===r._state?t._errorSteps(r._storedError):r._readableStreamController[Fe](t)}(this,{_chunkSteps:t=>e({value:t,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:e=>t(e)}),r}releaseLock(){if(!ut(this))throw lt("releaseLock");void 0!==this._ownerReadableStream&&function(e){Be(e);dt(e,new TypeError("Reader was released"))}(this)}}function ut(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")&&e instanceof ft}function dt(e,t){const r=e._readRequests;e._readRequests=new Pe,r.forEach((e=>{e._errorSteps(t)}))}function lt(e){return new TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}Object.defineProperties(ft.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),be(ft.prototype.cancel,"cancel"),be(ft.prototype.read,"read"),be(ft.prototype.releaseLock,"releaseLock"),"symbol"==typeof de.toStringTag&&Object.defineProperty(ft.prototype,de.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});class ht{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){const e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?Te(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){const t=()=>this._returnSteps(e);return this._ongoingPromise?Te(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});const e=this._reader;return void 0===e?Se(ze("iterate")):Ee(e.read(),(e=>{var t;return this._ongoingPromise=void 0,e.done&&(this._isFinished=!0,null===(t=this._reader)||void 0===t||t.releaseLock(),this._reader=void 0),e}),(e=>{var t;throw this._ongoingPromise=void 0,this._isFinished=!0,null===(t=this._reader)||void 0===t||t.releaseLock(),this._reader=void 0,e}))}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;const t=this._reader;if(void 0===t)return Se(ze("finish iterating"));if(this._reader=void 0,!this._preventCancel){const r=t.cancel(e);return t.releaseLock(),Te(r,(()=>({value:e,done:!0})))}return t.releaseLock(),_e({value:e,done:!0})}}const pt={next(){return bt(this)?this._asyncIteratorImpl.next():Se(mt("next"))},return(e){return bt(this)?this._asyncIteratorImpl.return(e):Se(mt("return"))}};function bt(e){if(!he(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof ht}catch(e){return!1}}function mt(e){return new TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}"symbol"==typeof de.asyncIterator&&Object.defineProperty(pt,de.asyncIterator,{value(){return this},writable:!0,configurable:!0});const yt=Number.isNaN||function(e){return e!=e};function gt(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)}function wt(e){const t=function(e,t,r){if(e.slice)return e.slice(t,r);const n=r-t,i=new ArrayBuffer(n);return gt(i,0,e,t,n),i}(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function vt(e){const t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value}function _t(e,t,r){if("number"!=typeof(n=r)||yt(n)||n<0||r===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");var n;e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function St(e){e._queue=new Pe,e._queueTotalSize=0}class Et{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!Rt(this))throw Ht("view");return this._view}respond(e){if(!Rt(this))throw Ht("respond");if(Ye(e,1,"respond"),e=tt(e,"First parameter"),void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");this._view.buffer,function(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(0===t)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range")}r.buffer=r.buffer,Lt(e,t)}(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Rt(this))throw Ht("respondWithNewView");if(Ye(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");e.buffer,function(e,t){const r=e._pendingPullIntos.peek();if("closed"===e._controlledReadableByteStream._state){if(0!==t.byteLength)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(0===t.byteLength)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");const n=t.byteLength;r.buffer=t.buffer,Lt(e,n)}(this._associatedReadableByteStreamController,e)}}Object.defineProperties(Et.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),be(Et.prototype.respond,"respond"),be(Et.prototype.respondWithNewView,"respondWithNewView"),"symbol"==typeof de.toStringTag&&Object.defineProperty(Et.prototype,de.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class Mt{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!At(this))throw Vt("byobRequest");return function(e){if(null===e._byobRequest&&e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(Et.prototype);!function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}(n,e,r),e._byobRequest=n}return e._byobRequest}(this)}get desiredSize(){if(!At(this))throw Vt("desiredSize");return Wt(this)}close(){if(!At(this))throw Vt("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");const e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);!function(e){const t=e._controlledReadableByteStream;if(!e._closeRequested&&"readable"===t._state)if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos.peek().bytesFilled>0){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Dt(e,t),t}zt(e),hn(t)}}(this)}enqueue(e){if(!At(this))throw Vt("enqueue");if(Ye(e,1,"enqueue"),!ArrayBuffer.isView(e))throw new TypeError("chunk must be an array buffer view");if(0===e.byteLength)throw new TypeError("chunk must have non-zero byteLength");if(0===e.buffer.byteLength)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");const t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);!function(e,t){const r=e._controlledReadableByteStream;if(e._closeRequested||"readable"!==r._state)return;const n=t.buffer,i=t.byteOffset,o=t.byteLength,a=n;if(e._pendingPullIntos.length>0){const t=e._pendingPullIntos.peek();t.buffer,jt(e),t.buffer=t.buffer,"none"===t.readerType&&kt(e,t)}ct(r)?(function(e){const t=e._controlledReadableByteStream._reader;for(;t._readRequests.length>0;){if(0===e._queueTotalSize)return;Ut(e,t._readRequests.shift())}}(e),0===st(r)?Ct(e,a,i,o):(e._pendingPullIntos.length>0&&Bt(e),at(r,new Uint8Array(a,i,o),!1))):Jt(r)?(Ct(e,a,i,o),$t(e)):Ct(e,a,i,o),Tt(e)}(this,e)}error(e){if(!At(this))throw Vt("error");Dt(this,e)}[Ne](e){xt(this),St(this);const t=this._cancelAlgorithm(e);return zt(this),t}[Fe](e){const t=this._controlledReadableByteStream;if(this._queueTotalSize>0)return void Ut(this,e);const r=this._autoAllocateChunkSize;if(void 0!==r){let n;try{n=new ArrayBuffer(r)}catch(t){return void e._errorSteps(t)}const i={buffer:n,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(i)}ot(t,e),Tt(this)}[je](){if(this._pendingPullIntos.length>0){const e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new Pe,this._pendingPullIntos.push(e)}}}function At(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")&&e instanceof Mt}function Rt(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")&&e instanceof Et}function Tt(e){const t=function(e){const t=e._controlledReadableByteStream;return"readable"===t._state&&(!e._closeRequested&&(!!e._started&&(!!(ct(t)&&st(t)>0)||(!!(Jt(t)&&Xt(t)>0)||Wt(e)>0))))}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Me(e._pullAlgorithm(),(()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Tt(e)),null)),(t=>(Dt(e,t),null)))))}function xt(e){jt(e),e._pendingPullIntos=new Pe}function Ot(e,t){let r=!1;"closed"===e._state&&(r=!0);const n=It(t);"default"===t.readerType?at(e,n,r):function(e,t,r){const n=e._reader._readIntoRequests.shift();r?n._closeSteps(t):n._chunkSteps(t)}(e,n,r)}function It(e){const t=e.bytesFilled,r=e.elementSize;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function Ct(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Pt(e,t,r,n){let i;try{i=t.slice(r,r+n)}catch(t){throw Dt(e,t),t}Ct(e,i,0,n)}function kt(e,t){t.bytesFilled>0&&Pt(e,t.buffer,t.byteOffset,t.bytesFilled),Bt(e)}function qt(e,t){const r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),o=t.bytesFilled+i,a=o-o%r;let s=i,c=!1;a>n&&(s=a-t.bytesFilled,c=!0);const f=e._queue;for(;s>0;){const r=f.peek(),n=Math.min(s,r.byteLength),i=t.byteOffset+t.bytesFilled;gt(t.buffer,i,r.buffer,r.byteOffset,n),r.byteLength===n?f.shift():(r.byteOffset+=n,r.byteLength-=n),e._queueTotalSize-=n,Nt(e,n,t),s-=n}return c}function Nt(e,t,r){r.bytesFilled+=t}function Ft(e){0===e._queueTotalSize&&e._closeRequested?(zt(e),hn(e._controlledReadableByteStream)):Tt(e)}function jt(e){null!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null)}function $t(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;const t=e._pendingPullIntos.peek();qt(e,t)&&(Bt(e),Ot(e._controlledReadableByteStream,t))}}function Lt(e,t){const r=e._pendingPullIntos.peek();jt(e),"closed"===e._controlledReadableByteStream._state?function(e,t){"none"===t.readerType&&Bt(e);const r=e._controlledReadableByteStream;if(Jt(r))for(;Xt(r)>0;)Ot(r,Bt(e))}(e,r):function(e,t,r){if(Nt(0,t,r),"none"===r.readerType)return kt(e,r),void $t(e);if(r.bytesFilled<r.elementSize)return;Bt(e);const n=r.bytesFilled%r.elementSize;if(n>0){const t=r.byteOffset+r.bytesFilled;Pt(e,r.buffer,t-n,n)}r.bytesFilled-=n,Ot(e._controlledReadableByteStream,r),$t(e)}(e,t,r),Tt(e)}function Bt(e){return e._pendingPullIntos.shift()}function zt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function Dt(e,t){const r=e._controlledReadableByteStream;"readable"===r._state&&(xt(e),St(e),zt(e),pn(r,t))}function Ut(e,t){const r=e._queue.shift();e._queueTotalSize-=r.byteLength,Ft(e);const n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n)}function Wt(e){const t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Ht(e){return new TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function Vt(e){return new TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function Gt(e,t){e._reader._readIntoRequests.push(t)}function Xt(e){return e._reader._readIntoRequests.length}function Jt(e){const t=e._reader;return void 0!==t&&!!Yt(t)}Object.defineProperties(Mt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),be(Mt.prototype.close,"close"),be(Mt.prototype.enqueue,"enqueue"),be(Mt.prototype.error,"error"),"symbol"==typeof de.toStringTag&&Object.defineProperty(Mt.prototype,de.toStringTag,{value:"ReadableByteStreamController",configurable:!0});class Zt{constructor(e){if(Ye(e,1,"ReadableStreamBYOBReader"),it(e,"First parameter"),dn(e))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!At(e._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");$e(this,e),this._readIntoRequests=new Pe}get closed(){return Yt(this)?this._closedPromise:Se(Qt("closed"))}cancel(e){return Yt(this)?void 0===this._ownerReadableStream?Se(ze("cancel")):Le(this,e):Se(Qt("cancel"))}read(e){if(!Yt(this))return Se(Qt("read"));if(!ArrayBuffer.isView(e))return Se(new TypeError("view must be an array buffer view"));if(0===e.byteLength)return Se(new TypeError("view must have non-zero byteLength"));if(0===e.buffer.byteLength)return Se(new TypeError("view's buffer must have non-zero byteLength"));if(e.buffer,void 0===this._ownerReadableStream)return Se(ze("read from"));let t,r;const n=ve(((e,n)=>{t=e,r=n}));return function(e,t,r){const n=e._ownerReadableStream;n._disturbed=!0,"errored"===n._state?r._errorSteps(n._storedError):function(e,t,r){const n=e._controlledReadableByteStream;let i=1;t.constructor!==DataView&&(i=t.constructor.BYTES_PER_ELEMENT);const o=t.constructor,a=t.buffer,s={buffer:a,bufferByteLength:a.byteLength,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:i,viewConstructor:o,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(s),void Gt(n,r);if("closed"!==n._state){if(e._queueTotalSize>0){if(qt(e,s)){const t=It(s);return Ft(e),void r._chunkSteps(t)}if(e._closeRequested){const t=new TypeError("Insufficient bytes to fill elements in the given buffer");return Dt(e,t),void r._errorSteps(t)}}e._pendingPullIntos.push(s),Gt(n,r),Tt(e)}else{const e=new o(s.buffer,s.byteOffset,0);r._closeSteps(e)}}(n._readableStreamController,t,r)}(this,e,{_chunkSteps:e=>t({value:e,done:!1}),_closeSteps:e=>t({value:e,done:!0}),_errorSteps:e=>r(e)}),n}releaseLock(){if(!Yt(this))throw Qt("releaseLock");void 0!==this._ownerReadableStream&&function(e){Be(e);Kt(e,new TypeError("Reader was released"))}(this)}}function Yt(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")&&e instanceof Zt}function Kt(e,t){const r=e._readIntoRequests;e._readIntoRequests=new Pe,r.forEach((e=>{e._errorSteps(t)}))}function Qt(e){return new TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function er(e,t){const{highWaterMark:r}=e;if(void 0===r)return t;if(yt(r)||r<0)throw new RangeError("Invalid highWaterMark");return r}function tr(e){const{size:t}=e;return t||(()=>1)}function rr(e,t){Xe(e,t);const r=null==e?void 0:e.highWaterMark,n=null==e?void 0:e.size;return{highWaterMark:void 0===r?void 0:Qe(r),size:void 0===n?void 0:nr(n,`${t} has member 'size' that`)}}function nr(e,t){return Je(e,t),t=>Qe(e(t))}function ir(e,t,r){return Je(e,r),r=>Ce(e,t,[r])}function or(e,t,r){return Je(e,r),()=>Ce(e,t,[])}function ar(e,t,r){return Je(e,r),r=>Ie(e,t,[r])}function sr(e,t,r){return Je(e,r),(r,n)=>Ce(e,t,[r,n])}Object.defineProperties(Zt.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),be(Zt.prototype.cancel,"cancel"),be(Zt.prototype.read,"read"),be(Zt.prototype.releaseLock,"releaseLock"),"symbol"==typeof de.toStringTag&&Object.defineProperty(Zt.prototype,de.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});const cr="function"==typeof AbortController;class fr{constructor(e={},t={}){void 0===e?e=null:Ze(e,"First parameter");const r=rr(t,"Second parameter"),n=function(e,t){Xe(e,t);const r=null==e?void 0:e.abort,n=null==e?void 0:e.close,i=null==e?void 0:e.start,o=null==e?void 0:e.type,a=null==e?void 0:e.write;return{abort:void 0===r?void 0:ir(r,e,`${t} has member 'abort' that`),close:void 0===n?void 0:or(n,e,`${t} has member 'close' that`),start:void 0===i?void 0:ar(i,e,`${t} has member 'start' that`),write:void 0===a?void 0:sr(a,e,`${t} has member 'write' that`),type:o}}(e,"First parameter");var i;if((i=this)._state="writable",i._storedError=void 0,i._writer=void 0,i._writableStreamController=void 0,i._writeRequests=new Pe,i._inFlightWriteRequest=void 0,i._closeRequest=void 0,i._inFlightCloseRequest=void 0,i._pendingAbortRequest=void 0,i._backpressure=!1,void 0!==n.type)throw new RangeError("Invalid type is specified");const o=tr(r);!function(e,t,r,n){const i=Object.create(Mr.prototype);let o,a,s,c;o=void 0!==t.start?()=>t.start(i):()=>{},a=void 0!==t.write?e=>t.write(e,i):()=>_e(void 0),s=void 0!==t.close?()=>t.close():()=>_e(void 0),c=void 0!==t.abort?e=>t.abort(e):()=>_e(void 0),function(e,t,r,n,i,o,a,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,St(t),t._abortReason=void 0,t._abortController=function(){if(cr)return new AbortController}(),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=o;const c=Ir(t);wr(e,c);Me(_e(r()),(()=>(t._started=!0,xr(t),null)),(r=>(t._started=!0,pr(e,r),null)))}(e,i,o,a,s,c,r,n)}(this,n,er(r,1),o)}get locked(){if(!ur(this))throw Pr("locked");return dr(this)}abort(e){return ur(this)?dr(this)?Se(new TypeError("Cannot abort a stream that already has a writer")):lr(this,e):Se(Pr("abort"))}close(){return ur(this)?dr(this)?Se(new TypeError("Cannot close a stream that already has a writer")):yr(this)?Se(new TypeError("Cannot close an already-closing stream")):hr(this):Se(Pr("close"))}getWriter(){if(!ur(this))throw Pr("getWriter");return new vr(this)}}function ur(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")&&e instanceof fr}function dr(e){return void 0!==e._writer}function lr(e,t){var r;if("closed"===e._state||"errored"===e._state)return _e(void 0);e._writableStreamController._abortReason=t,null===(r=e._writableStreamController._abortController)||void 0===r||r.abort(t);const n=e._state;if("closed"===n||"errored"===n)return _e(void 0);if(void 0!==e._pendingAbortRequest)return e._pendingAbortRequest._promise;let i=!1;"erroring"===n&&(i=!0,t=void 0);const o=ve(((r,n)=>{e._pendingAbortRequest={_promise:void 0,_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return e._pendingAbortRequest._promise=o,i||br(e,t),o}function hr(e){const t=e._state;if("closed"===t||"errored"===t)return Se(new TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));const r=ve(((t,r)=>{const n={_resolve:t,_reject:r};e._closeRequest=n})),n=e._writer;var i;return void 0!==n&&e._backpressure&&"writable"===t&&Wr(n),_t(i=e._writableStreamController,Er,0),xr(i),r}function pr(e,t){"writable"!==e._state?mr(e):br(e,t)}function br(e,t){const r=e._writableStreamController;e._state="erroring",e._storedError=t;const n=e._writer;void 0!==n&&Sr(n,t),!function(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}(e)&&r._started&&mr(e)}function mr(e){e._state="errored",e._writableStreamController[qe]();const t=e._storedError;if(e._writeRequests.forEach((e=>{e._reject(t)})),e._writeRequests=new Pe,void 0===e._pendingAbortRequest)return void gr(e);const r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring)return r._reject(t),void gr(e);Me(e._writableStreamController[ke](r._reason),(()=>(r._resolve(),gr(e),null)),(t=>(r._reject(t),gr(e),null)))}function yr(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function gr(e){void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);const t=e._writer;void 0!==t&&$r(t,e._storedError)}function wr(e,t){const r=e._writer;void 0!==r&&t!==e._backpressure&&(t?function(e){Br(e)}(r):Wr(r)),e._backpressure=t}Object.defineProperties(fr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),be(fr.prototype.abort,"abort"),be(fr.prototype.close,"close"),be(fr.prototype.getWriter,"getWriter"),"symbol"==typeof de.toStringTag&&Object.defineProperty(fr.prototype,de.toStringTag,{value:"WritableStream",configurable:!0});class vr{constructor(e){if(Ye(e,1,"WritableStreamDefaultWriter"),function(e,t){if(!ur(e))throw new TypeError("First parameter is not a WritableStream.")}(e),dr(e))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;const t=e._state;if("writable"===t)!yr(e)&&e._backpressure?Br(this):Dr(this),Fr(this);else if("erroring"===t)zr(this,e._storedError),Fr(this);else if("closed"===t)Dr(this),Fr(this),Lr(this);else{const t=e._storedError;zr(this,t),jr(this,t)}}get closed(){return _r(this)?this._closedPromise:Se(qr("closed"))}get desiredSize(){if(!_r(this))throw qr("desiredSize");if(void 0===this._ownerWritableStream)throw Nr("desiredSize");return function(e){const t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:Tr(t._writableStreamController)}(this)}get ready(){return _r(this)?this._readyPromise:Se(qr("ready"))}abort(e){return _r(this)?void 0===this._ownerWritableStream?Se(Nr("abort")):function(e,t){return lr(e._ownerWritableStream,t)}(this,e):Se(qr("abort"))}close(){if(!_r(this))return Se(qr("close"));const e=this._ownerWritableStream;return void 0===e?Se(Nr("close")):yr(e)?Se(new TypeError("Cannot close an already-closing stream")):hr(this._ownerWritableStream)}releaseLock(){if(!_r(this))throw qr("releaseLock");void 0!==this._ownerWritableStream&&function(e){const t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");Sr(e,r),function(e,t){"pending"===e._closedPromiseState?$r(e,t):function(e,t){jr(e,t)}(e,t)}(e,r),t._writer=void 0,e._ownerWritableStream=void 0}(this)}write(e){return _r(this)?void 0===this._ownerWritableStream?Se(Nr("write to")):function(e,t){const r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return Or(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Se(Nr("write to"));const o=r._state;if("errored"===o)return Se(r._storedError);if(yr(r)||"closed"===o)return Se(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===o)return Se(r._storedError);const a=function(e){return ve(((t,r)=>{const n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){try{_t(e,t,r)}catch(t){return void Or(e,t)}const n=e._controlledWritableStream;yr(n)||"writable"!==n._state||wr(n,Ir(e)),xr(e)}(n,t,i),a}(this,e):Se(qr("write"))}}function _r(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")&&e instanceof vr}function Sr(e,t){"pending"===e._readyPromiseState?Ur(e,t):function(e,t){zr(e,t)}(e,t)}Object.defineProperties(vr.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),be(vr.prototype.abort,"abort"),be(vr.prototype.close,"close"),be(vr.prototype.releaseLock,"releaseLock"),be(vr.prototype.write,"write"),"symbol"==typeof de.toStringTag&&Object.defineProperty(vr.prototype,de.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});const Er={};class Mr{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Ar(this))throw kr("abortReason");return this._abortReason}get signal(){if(!Ar(this))throw kr("signal");if(void 0===this._abortController)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(e){if(!Ar(this))throw kr("error");"writable"===this._controlledWritableStream._state&&Cr(this,e)}[ke](e){const t=this._abortAlgorithm(e);return Rr(this),t}[qe](){St(this)}}function Ar(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")&&e instanceof Mr}function Rr(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Tr(e){return e._strategyHWM-e._queueTotalSize}function xr(e){const t=e._controlledWritableStream;if(!e._started)return;if(void 0!==t._inFlightWriteRequest)return;if("erroring"===t._state)return void mr(t);if(0===e._queue.length)return;const r=e._queue.peek().value;r===Er?function(e){const t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),vt(e);const r=e._closeAlgorithm();Rr(e),Me(r,(()=>(function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";const t=e._writer;void 0!==t&&Lr(t)}(t),null)),(e=>(function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),pr(e,t)}(t,e),null)))}(e):function(e,t){const r=e._controlledWritableStream;!function(e){e._inFlightWriteRequest=e._writeRequests.shift()}(r),Me(e._writeAlgorithm(t),(()=>{!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);const t=r._state;if(vt(e),!yr(r)&&"writable"===t){const t=Ir(e);wr(r,t)}return xr(e),null}),(t=>("writable"===r._state&&Rr(e),function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,pr(e,t)}(r,t),null)))}(e,r)}function Or(e,t){"writable"===e._controlledWritableStream._state&&Cr(e,t)}function Ir(e){return Tr(e)<=0}function Cr(e,t){const r=e._controlledWritableStream;Rr(e),br(r,t)}function Pr(e){return new TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function kr(e){return new TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function qr(e){return new TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Nr(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function Fr(e){e._closedPromise=ve(((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function jr(e,t){Fr(e),$r(e,t)}function $r(e,t){void 0!==e._closedPromise_reject&&(xe(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected")}function Lr(e){void 0!==e._closedPromise_resolve&&(e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved")}function Br(e){e._readyPromise=ve(((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}function zr(e,t){Br(e),Ur(e,t)}function Dr(e){Br(e),Wr(e)}function Ur(e,t){void 0!==e._readyPromise_reject&&(xe(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected")}function Wr(e){void 0!==e._readyPromise_resolve&&(e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled")}Object.defineProperties(Mr.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),"symbol"==typeof de.toStringTag&&Object.defineProperty(Mr.prototype,de.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});const Hr="undefined"!=typeof DOMException?DOMException:void 0,Vr=function(e){if("function"!=typeof e&&"object"!=typeof e)return!1;try{return new e,!0}catch(e){return!1}}(Hr)?Hr:function(){const e=function(e,t){this.message=e||"",this.name=t||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}();function Gr(e,t,r,n,i,o){const a=e.getReader(),s=t.getWriter();un(e)&&(e._disturbed=!0);let c,f,u,d=!1,l=!1,h="readable",p="writable",b=!1,m=!1;const y=ve((e=>{u=e}));let g=Promise.resolve(void 0);return ve(((w,v)=>{let _;function S(){if(d)return;const e=ve(((e,t)=>{!function r(n){n?e():Ee(d?_e(!0):Ee(s.ready,(()=>Ee(a.read(),(e=>!!e.done||(g=s.write(e.value),xe(g),!1))))),r,t)}(!1)}));xe(e)}function E(){return h="closed",r?T():R((()=>(ur(t)&&(b=yr(t),p=t._state),b||"closed"===p?_e(void 0):"erroring"===p||"errored"===p?Se(f):(b=!0,s.close()))),!1,void 0),null}function M(e){return d||(h="errored",c=e,n?T(!0,e):R((()=>s.abort(e)),!0,e)),null}function A(e){return l||(p="errored",f=e,i?T(!0,e):R((()=>a.cancel(e)),!0,e)),null}if(void 0!==o&&(_=()=>{const e=void 0!==o.reason?o.reason:new Vr("Aborted","AbortError"),t=[];n||t.push((()=>"writable"===p?s.abort(e):_e(void 0))),i||t.push((()=>"readable"===h?a.cancel(e):_e(void 0))),R((()=>Promise.all(t.map((e=>e())))),!0,e)},o.aborted?_():o.addEventListener("abort",_)),un(e)&&(h=e._state,c=e._storedError),ur(t)&&(p=t._state,f=t._storedError,b=yr(t)),un(e)&&ur(t)&&(m=!0,u()),"errored"===h)M(c);else if("erroring"===p||"errored"===p)A(f);else if("closed"===h)E();else if(b||"closed"===p){const e=new TypeError("the destination writable stream closed before all data could be piped to it");i?T(!0,e):R((()=>a.cancel(e)),!0,e)}function R(e,t,r){function n(){return"writable"!==p||b?i():Ae(function(){let e;return _e(function t(){if(e!==g)return e=g,Te(g,t,t)}())}(),i),null}function i(){return e?Me(e(),(()=>x(t,r)),(e=>x(!0,e))):x(t,r),null}d||(d=!0,m?n():Ae(y,n))}function T(e,t){R(void 0,e,t)}function x(e,t){return l=!0,s.releaseLock(),a.releaseLock(),void 0!==o&&o.removeEventListener("abort",_),e?v(t):w(void 0),null}d||(Me(a.closed,E,M),Me(s.closed,(function(){return l||(p="closed"),null}),A)),m?S():Oe((()=>{m=!0,u(),S()}))}))}class Xr{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!Jr(this))throw tn("desiredSize");return Qr(this)}close(){if(!Jr(this))throw tn("close");if(!en(this))throw new TypeError("The stream is not in a state that permits close");!function(e){if(!en(e))return;const t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&(Yr(e),hn(t))}(this)}enqueue(e){if(!Jr(this))throw tn("enqueue");if(!en(this))throw new TypeError("The stream is not in a state that permits enqueue");return function(e,t){if(!en(e))return;const r=e._controlledReadableStream;if(dn(r)&&st(r)>0)at(r,t,!1);else{let r;try{r=e._strategySizeAlgorithm(t)}catch(t){throw Kr(e,t),t}try{_t(e,t,r)}catch(t){throw Kr(e,t),t}}Zr(e)}(this,e)}error(e){if(!Jr(this))throw tn("error");Kr(this,e)}[Ne](e){St(this);const t=this._cancelAlgorithm(e);return Yr(this),t}[Fe](e){const t=this._controlledReadableStream;if(this._queue.length>0){const r=vt(this);this._closeRequested&&0===this._queue.length?(Yr(this),hn(t)):Zr(this),e._chunkSteps(r)}else ot(t,e),Zr(this)}[je](){}}function Jr(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")&&e instanceof Xr}function Zr(e){const t=function(e){const t=e._controlledReadableStream;return!!en(e)&&(!!e._started&&(!!(dn(t)&&st(t)>0)||Qr(e)>0))}(e);t&&(e._pulling?e._pullAgain=!0:(e._pulling=!0,Me(e._pullAlgorithm(),(()=>(e._pulling=!1,e._pullAgain&&(e._pullAgain=!1,Zr(e)),null)),(t=>(Kr(e,t),null)))))}function Yr(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Kr(e,t){const r=e._controlledReadableStream;"readable"===r._state&&(St(e),Yr(e),pn(r,t))}function Qr(e){const t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function en(e){return!e._closeRequested&&"readable"===e._controlledReadableStream._state}function tn(e){return new TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function rn(e,t,r){return Je(e,r),r=>Ce(e,t,[r])}function nn(e,t,r){return Je(e,r),r=>Ce(e,t,[r])}function on(e,t,r){return Je(e,r),r=>Ie(e,t,[r])}function an(e,t){if("bytes"!=(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function sn(e,t){if("byob"!=(e=`${e}`))throw new TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function cn(e,t){Xe(e,t);const r=null==e?void 0:e.preventAbort,n=null==e?void 0:e.preventCancel,i=null==e?void 0:e.preventClose,o=null==e?void 0:e.signal;return void 0!==o&&function(e,t){if(!function(e){if("object"!=typeof e||null===e)return!1;try{return"boolean"==typeof e.aborted}catch(e){return!1}}(e))throw new TypeError(`${t} is not an AbortSignal.`)}(o,`${t} has member 'signal' that`),{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(i),signal:o}}Object.defineProperties(Xr.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),be(Xr.prototype.close,"close"),be(Xr.prototype.enqueue,"enqueue"),be(Xr.prototype.error,"error"),"symbol"==typeof de.toStringTag&&Object.defineProperty(Xr.prototype,de.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});class fn{constructor(e={},t={}){void 0===e?e=null:Ze(e,"First parameter");const r=rr(t,"Second parameter"),n=function(e,t){Xe(e,t);const r=e,n=null==r?void 0:r.autoAllocateChunkSize,i=null==r?void 0:r.cancel,o=null==r?void 0:r.pull,a=null==r?void 0:r.start,s=null==r?void 0:r.type;return{autoAllocateChunkSize:void 0===n?void 0:tt(n,`${t} has member 'autoAllocateChunkSize' that`),cancel:void 0===i?void 0:rn(i,r,`${t} has member 'cancel' that`),pull:void 0===o?void 0:nn(o,r,`${t} has member 'pull' that`),start:void 0===a?void 0:on(a,r,`${t} has member 'start' that`),type:void 0===s?void 0:an(s,`${t} has member 'type' that`)}}(e,"First parameter");var i;if((i=this)._state="readable",i._reader=void 0,i._storedError=void 0,i._disturbed=!1,"bytes"===n.type){if(void 0!==r.size)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){const n=Object.create(Mt.prototype);let i,o,a;i=void 0!==t.start?()=>t.start(n):()=>{},o=void 0!==t.pull?()=>t.pull(n):()=>_e(void 0),a=void 0!==t.cancel?e=>t.cancel(e):()=>_e(void 0);const s=t.autoAllocateChunkSize;if(0===s)throw new TypeError("autoAllocateChunkSize must be greater than 0");!function(e,t,r,n,i,o,a){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,St(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=a,t._pendingPullIntos=new Pe,e._readableStreamController=t,Me(_e(r()),(()=>(t._started=!0,Tt(t),null)),(e=>(Dt(t,e),null)))}(e,n,i,o,a,r,s)}(this,n,er(r,0))}else{const e=tr(r);!function(e,t,r,n){const i=Object.create(Xr.prototype);let o,a,s;o=void 0!==t.start?()=>t.start(i):()=>{},a=void 0!==t.pull?()=>t.pull(i):()=>_e(void 0),s=void 0!==t.cancel?e=>t.cancel(e):()=>_e(void 0),function(e,t,r,n,i,o,a){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,St(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=a,t._strategyHWM=o,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t,Me(_e(r()),(()=>(t._started=!0,Zr(t),null)),(e=>(Kr(t,e),null)))}(e,i,o,a,s,r,n)}(this,n,er(r,1),e)}}get locked(){if(!un(this))throw bn("locked");return dn(this)}cancel(e){return un(this)?dn(this)?Se(new TypeError("Cannot cancel a stream that already has a reader")):ln(this,e):Se(bn("cancel"))}getReader(e){if(!un(this))throw bn("getReader");return void 0===function(e,t){Xe(e,t);const r=null==e?void 0:e.mode;return{mode:void 0===r?void 0:sn(r,`${t} has member 'mode' that`)}}(e,"First parameter").mode?new ft(this):function(e){return new Zt(e)}(this)}pipeThrough(e,t={}){if(!rt(this))throw bn("pipeThrough");Ye(e,1,"pipeThrough");const r=function(e,t){Xe(e,t);const r=null==e?void 0:e.readable;Ke(r,"readable","ReadableWritablePair"),function(e,t){if(!rt(e))throw new TypeError(`${t} is not a ReadableStream.`)}(r,`${t} has member 'readable' that`);const n=null==e?void 0:e.writable;return Ke(n,"writable","ReadableWritablePair"),function(e,t){if(!nt(e))throw new TypeError(`${t} is not a WritableStream.`)}(n,`${t} has member 'writable' that`),{readable:r,writable:n}}(e,"First parameter"),n=cn(t,"Second parameter");if(this.locked)throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(r.writable.locked)throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");return xe(Gr(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal)),r.readable}pipeTo(e,t={}){if(!rt(this))return Se(bn("pipeTo"));if(void 0===e)return Se("Parameter 1 is required in 'pipeTo'.");if(!nt(e))return Se(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=cn(t,"Second parameter")}catch(e){return Se(e)}return this.locked?Se(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):e.locked?Se(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Gr(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!rt(this))throw bn("tee");if(this.locked)throw new TypeError("Cannot tee a stream that already has a reader");return function(e,t){return function(e){try{return e.getReader({mode:"byob"}).releaseLock(),!0}catch(e){return!1}}(e)?function(e){let t,r,n,i,o,a=e.getReader(),s=!1,c=!1,f=!1,u=!1,d=!1,l=!1;const h=ve((e=>{o=e}));function p(e){Re(e.closed,(t=>(e!==a||(n.error(t),i.error(t),d&&l||o(void 0)),null)))}function b(){s&&(a.releaseLock(),a=e.getReader(),p(a),s=!1),Me(a.read(),(e=>{var t,r;if(f=!1,u=!1,e.done)return d||n.close(),l||i.close(),null===(t=n.byobRequest)||void 0===t||t.respond(0),null===(r=i.byobRequest)||void 0===r||r.respond(0),d&&l||o(void 0),null;const s=e.value,h=s;let p=s;if(!d&&!l)try{p=wt(s)}catch(e){return n.error(e),i.error(e),o(a.cancel(e)),null}return d||n.enqueue(h),l||i.enqueue(p),c=!1,f?y():u&&g(),null}),(()=>(c=!1,null)))}function m(t,r){s||(a.releaseLock(),a=e.getReader({mode:"byob"}),p(a),s=!0);const h=r?i:n,b=r?n:i;Me(a.read(t),(e=>{var t;f=!1,u=!1;const n=r?l:d,i=r?d:l;if(e.done){n||h.close(),i||b.close();const r=e.value;return void 0!==r&&(n||h.byobRequest.respondWithNewView(r),i||null===(t=b.byobRequest)||void 0===t||t.respond(0)),n&&i||o(void 0),null}const s=e.value;if(i)n||h.byobRequest.respondWithNewView(s);else{let t;try{t=wt(s)}catch(e){return h.error(e),b.error(e),o(a.cancel(e)),null}n||h.byobRequest.respondWithNewView(s),b.enqueue(t)}return c=!1,f?y():u&&g(),null}),(()=>(c=!1,null)))}function y(){if(c)return f=!0,_e(void 0);c=!0;const e=n.byobRequest;return null===e?b():m(e.view,!1),_e(void 0)}function g(){if(c)return u=!0,_e(void 0);c=!0;const e=i.byobRequest;return null===e?b():m(e.view,!0),_e(void 0)}const w=new fn({type:"bytes",start(e){n=e},pull:y,cancel:function(e){if(d=!0,t=e,l){const e=[t,r],n=a.cancel(e);o(n)}return h}}),v=new fn({type:"bytes",start(e){i=e},pull:g,cancel:function(e){if(l=!0,r=e,d){const e=[t,r],n=a.cancel(e);o(n)}return h}});return p(a),[w,v]}(e):function(e,t){const r=e.getReader();let n,i,o,a,s,c=!1,f=!1,u=!1,d=!1;const l=ve((e=>{s=e}));function h(){return c?(f=!0,_e(void 0)):(c=!0,Me(r.read(),(e=>{if(f=!1,e.done)return u||o.close(),d||a.close(),u&&d||s(void 0),null;const t=e.value,r=t,n=t;return u||o.enqueue(r),d||a.enqueue(n),c=!1,f&&h(),null}),(()=>(c=!1,null))),_e(void 0))}const p=new fn({start(e){o=e},pull:h,cancel:function(e){if(u=!0,n=e,d){const e=[n,i],t=r.cancel(e);s(t)}return l}}),b=new fn({start(e){a=e},pull:h,cancel:function(e){if(d=!0,i=e,u){const e=[n,i],t=r.cancel(e);s(t)}return l}});return Re(r.closed,(e=>(o.error(e),a.error(e),u&&d||s(void 0),null))),[p,b]}(e)}(this)}values(e){if(!rt(this))throw bn("values");return function(e,t){const r=e.getReader(),n=new ht(r,t),i=Object.create(pt);return i._asyncIteratorImpl=n,i}(this,function(e,t){Xe(e,"First parameter");const r=null==e?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}(e).preventCancel)}}function un(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")&&e instanceof fn}function dn(e){return void 0!==e._reader}function ln(e,t){if(e._disturbed=!0,"closed"===e._state)return _e(void 0);if("errored"===e._state)return Se(e._storedError);hn(e);const r=e._reader;if(void 0!==r&&Yt(r)){const e=r._readIntoRequests;r._readIntoRequests=new Pe,e.forEach((e=>{e._closeSteps(void 0)}))}return Te(e._readableStreamController[Ne](t),le)}function hn(e){e._state="closed";const t=e._reader;if(void 0!==t&&(He(t),ut(t))){const e=t._readRequests;t._readRequests=new Pe,e.forEach((e=>{e._closeSteps()}))}}function pn(e,t){e._state="errored",e._storedError=t;const r=e._reader;void 0!==r&&(We(r,t),ut(r)?dt(r,t):Kt(r,t))}function bn(e){return new TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function mn(e,t){Xe(e,t);const r=null==e?void 0:e.highWaterMark;return Ke(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Qe(r)}}Object.defineProperties(fn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),be(fn.prototype.cancel,"cancel"),be(fn.prototype.getReader,"getReader"),be(fn.prototype.pipeThrough,"pipeThrough"),be(fn.prototype.pipeTo,"pipeTo"),be(fn.prototype.tee,"tee"),be(fn.prototype.values,"values"),"symbol"==typeof de.toStringTag&&Object.defineProperty(fn.prototype,de.toStringTag,{value:"ReadableStream",configurable:!0}),"symbol"==typeof de.asyncIterator&&Object.defineProperty(fn.prototype,de.asyncIterator,{value:fn.prototype.values,writable:!0,configurable:!0});const yn=e=>e.byteLength;be(yn,"size");class gn{constructor(e){Ye(e,1,"ByteLengthQueuingStrategy"),e=mn(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!vn(this))throw wn("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!vn(this))throw wn("size");return yn}}function wn(e){return new TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function vn(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark")&&e instanceof gn}Object.defineProperties(gn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof de.toStringTag&&Object.defineProperty(gn.prototype,de.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});const _n=()=>1;be(_n,"size");class Sn{constructor(e){Ye(e,1,"CountQueuingStrategy"),e=mn(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Mn(this))throw En("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Mn(this))throw En("size");return _n}}function En(e){return new TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Mn(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark")&&e instanceof Sn}function An(e,t,r){return Je(e,r),r=>Ce(e,t,[r])}function Rn(e,t,r){return Je(e,r),r=>Ie(e,t,[r])}function Tn(e,t,r){return Je(e,r),(r,n)=>Ce(e,t,[r,n])}Object.defineProperties(Sn.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),"symbol"==typeof de.toStringTag&&Object.defineProperty(Sn.prototype,de.toStringTag,{value:"CountQueuingStrategy",configurable:!0});class xn{constructor(e={},t={},r={}){void 0===e&&(e=null);const n=rr(t,"Second parameter"),i=rr(r,"Third parameter"),o=function(e,t){Xe(e,t);const r=null==e?void 0:e.flush,n=null==e?void 0:e.readableType,i=null==e?void 0:e.start,o=null==e?void 0:e.transform,a=null==e?void 0:e.writableType;return{flush:void 0===r?void 0:An(r,e,`${t} has member 'flush' that`),readableType:n,start:void 0===i?void 0:Rn(i,e,`${t} has member 'start' that`),transform:void 0===o?void 0:Tn(o,e,`${t} has member 'transform' that`),writableType:a}}(e,"First parameter");if(void 0!==o.readableType)throw new RangeError("Invalid readableType specified");if(void 0!==o.writableType)throw new RangeError("Invalid writableType specified");const a=er(i,0),s=tr(i),c=er(n,1),f=tr(n);let u;!function(e,t,r,n,i,o){function a(){return t}e._writableState="writable",e._writableStoredError=void 0,e._writableHasInFlightOperation=!1,e._writableStarted=!1,e._writable=function(e,t,r,n,i,o,a){return new fr({start(r){e._writableController=r;try{const t=r.signal;void 0!==t&&t.addEventListener("abort",(()=>{"writable"===e._writableState&&(e._writableState="erroring",t.reason&&(e._writableStoredError=t.reason))}))}catch(e){}return Te(t(),(()=>(e._writableStarted=!0,Gn(e),null)),(t=>{throw e._writableStarted=!0,Wn(e,t),t}))},write:t=>(function(e){e._writableHasInFlightOperation=!0}(e),Te(r(t),(()=>(function(e){e._writableHasInFlightOperation=!1}(e),Gn(e),null)),(t=>{throw function(e,t){e._writableHasInFlightOperation=!1,Wn(e,t)}(e,t),t}))),close:()=>(function(e){e._writableHasInFlightOperation=!0}(e),Te(n(),(()=>(function(e){e._writableHasInFlightOperation=!1,"erroring"===e._writableState&&(e._writableStoredError=void 0),e._writableState="closed"}(e),null)),(t=>{throw function(e,t){e._writableHasInFlightOperation=!1,e._writableState,Wn(e,t)}(e,t),t}))),abort:t=>(e._writableState="errored",e._writableStoredError=t,i(t))},{highWaterMark:o,size:a})}(e,a,(function(t){return function(e,t){const r=e._transformStreamController;return e._backpressure?Te(e._backpressureChangePromise,(()=>{if("erroring"===(ur(e._writable)?e._writable._state:e._writableState))throw ur(e._writable)?e._writable._storedError:e._writableStoredError;return jn(r,t)})):jn(r,t)}(e,t)}),(function(){return function(e){const t=e._transformStreamController,r=t._flushAlgorithm();return Nn(t),Te(r,(()=>{if("errored"===e._readableState)throw e._readableStoredError;Bn(e)&&zn(e)}),(t=>{throw In(e,t),e._readableStoredError}))}(e)}),(function(t){return function(e,t){return In(e,t),_e(void 0)}(e,t)}),r,n),e._readableState="readable",e._readableStoredError=void 0,e._readableCloseRequested=!1,e._readablePulling=!1,e._readable=function(e,t,r,n,i,o){return new fn({start:r=>(e._readableController=r,t().catch((t=>{Dn(e,t)}))),pull:()=>(e._readablePulling=!0,r().catch((t=>{Dn(e,t)}))),cancel:t=>(e._readableState="closed",n(t))},{highWaterMark:i,size:o})}(e,a,(function(){return function(e){return Pn(e,!1),e._backpressureChangePromise}(e)}),(function(t){return Cn(e,t),_e(void 0)}),i,o),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,Pn(e,!0),e._transformStreamController=void 0}(this,ve((e=>{u=e})),c,f,a,s),function(e,t){const r=Object.create(kn.prototype);let n,i;n=void 0!==t.transform?e=>t.transform(e,r):e=>{try{return Fn(r,e),_e(void 0)}catch(e){return Se(e)}},i=void 0!==t.flush?()=>t.flush(r):()=>_e(void 0),function(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}(e,r,n,i)}(this,o),void 0!==o.start?u(o.start(this._transformStreamController)):u(void 0)}get readable(){if(!On(this))throw Ln("readable");return this._readable}get writable(){if(!On(this))throw Ln("writable");return this._writable}}function On(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")&&e instanceof xn}function In(e,t){Dn(e,t),Cn(e,t)}function Cn(e,t){Nn(e._transformStreamController),function(e,t){e._writableController.error(t),"writable"===e._writableState&&Hn(e,t)}(e,t),e._backpressure&&Pn(e,!1)}function Pn(e,t){void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=ve((t=>{e._backpressureChangePromise_resolve=t})),e._backpressure=t}Object.defineProperties(xn.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),"symbol"==typeof de.toStringTag&&Object.defineProperty(xn.prototype,de.toStringTag,{value:"TransformStream",configurable:!0});class kn{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!qn(this))throw $n("desiredSize");return Un(this._controlledTransformStream)}enqueue(e){if(!qn(this))throw $n("enqueue");Fn(this,e)}error(e){if(!qn(this))throw $n("error");var t;t=e,In(this._controlledTransformStream,t)}terminate(){if(!qn(this))throw $n("terminate");!function(e){const t=e._controlledTransformStream;Bn(t)&&zn(t);Cn(t,new TypeError("TransformStream terminated"))}(this)}}function qn(e){return!!he(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")&&e instanceof kn}function Nn(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0}function Fn(e,t){const r=e._controlledTransformStream;if(!Bn(r))throw new TypeError("Readable side is not in a state that permits enqueue");try{!function(e,t){e._readablePulling=!1;try{e._readableController.enqueue(t)}catch(t){throw Dn(e,t),t}}(r,t)}catch(e){throw Cn(r,e),r._readableStoredError}const n=function(e){return!function(e){return!!Bn(e)&&(!!e._readablePulling||Un(e)>0)}(e)}(r);n!==r._backpressure&&Pn(r,!0)}function jn(e,t){return Te(e._transformAlgorithm(t),void 0,(t=>{throw In(e._controlledTransformStream,t),t}))}function $n(e){return new TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function Ln(e){return new TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}function Bn(e){return!e._readableCloseRequested&&"readable"===e._readableState}function zn(e){e._readableState="closed",e._readableCloseRequested=!0,e._readableController.close()}function Dn(e,t){"readable"===e._readableState&&(e._readableState="errored",e._readableStoredError=t),e._readableController.error(t)}function Un(e){return e._readableController.desiredSize}function Wn(e,t){"writable"!==e._writableState?Vn(e):Hn(e,t)}function Hn(e,t){e._writableState="erroring",e._writableStoredError=t,!function(e){return e._writableHasInFlightOperation}(e)&&e._writableStarted&&Vn(e)}function Vn(e){e._writableState="errored"}function Gn(e){"erroring"===e._writableState&&Vn(e)}Object.defineProperties(kn.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),be(kn.prototype.enqueue,"enqueue"),be(kn.prototype.error,"error"),be(kn.prototype.terminate,"terminate"),"symbol"==typeof de.toStringTag&&Object.defineProperty(kn.prototype,de.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});const Xn=ue.Readable||class{};function Jn(e){return Zn(e)||Yn(e)}function Zn(e){if(!ni(e))return!1;const t=e;return"function"==typeof t.getReader&&void 0!==t.locked&&"function"==typeof t.cancel&&"function"==typeof t.pipeTo&&"function"==typeof t.pipeThrough}function Yn(e){if(!ni(e))return!1;const t=e;return!("function"!=typeof t.pipe||!t.readable||"function"!=typeof t._read)}function Kn(e){return new fn({start(t){e.pause(),e.on("data",(r=>{Buffer.isBuffer(r)?t.enqueue(new Uint8Array(r.buffer)):t.enqueue(r),e.pause()})),e.on("end",(()=>t.close())),e.on("error",(e=>t.error(e)))},pull(){e.resume()},cancel(){e.pause()}})}class Qn extends Xn{constructor(e,t){super(t),this._webStream=e,this._reader=e.getReader(),this._reading=!1}_read(){if(this._reading)return;this._reading=!0;const e=()=>{this._reader.read().then((t=>{if(!t.done)return this.push(t.value)?e():void(this._reading=!1);this.push(null)}))};e()}}function ei(e,t){if(!ue.Readable)throw new Error("The Node's Readable is not available! If you are running this in browser you have to polyfill 'stream' package!");return new Qn(e,t)}function ti(e){if(Yn(e))return Kn(e);if(Zn(e))return e;throw new TypeError("Passed stream is not Node Readable nor ReadableStream!")}function ri(e){return null!==e&&"object"==typeof e}function ni(e){return ri(e)&&!Array.isArray(e)}function ii(e,t="value"){if(!ni(e))throw new TypeError(`${t} has to be an object that is not null nor array!`)}function oi(e,t="value"){if(!0!==e&&!1!==e)throw new TypeError(`${t} is not boolean`)}function ai(e,t="value"){if(!function(e){return"string"==typeof e&&/^-?(0|[1-9][0-9]*)$/g.test(e)||"number"==typeof e&&e>Number.MIN_SAFE_INTEGER&&e<Number.MAX_SAFE_INTEGER&&Number.isInteger(e)}(e))throw new TypeError(`${t} is not integer`)}function si(e,t="Value"){if(ai(e,t),Number(e)<0)throw new p(`${t} has to be bigger or equal to zero`,e)}function ci(e){try{S(e,G)}catch(de){S(e,X)}}function fi(e){if("string"!=typeof e)throw new TypeError("ReferenceOrEns has to be a string!");if(v(e))return void ci(e);if(!/^(?:(?:[^-.\/?:\s][^.\/?:\s]{0,61}[^-.\/?:\s]|[^-.\/?:\s]{1,2})\.)+[^-.\/?:\s][^.\/?:\s]{0,61}[^-.\/?:\s]$/.test(e))throw new TypeError("ReferenceOrEns is not valid Reference, but also not valid ENS domain.")}function ui(e,t){if("string"!=typeof e)throw new TypeError("ReferenceCidOrEns has to be a string!");try{const r=(0,a.zB)(e);if(r.type!==t)throw new h(`CID was expected to be of type ${t}, but got instead ${r.type??"non-Swarm CID"}`);return r.reference}catch(de){if(de instanceof h)throw de}return fi(e),e}function di(e,t){return{...e,cid:()=>(0,a.Lg)(e.reference,t).toString()}}function li(e){S(e,U,"Address")}function hi(e){S(e,V,"BatchId")}function pi(e,t="RequestOptions"){if(void 0===e)return;if(!ni(e))throw new TypeError(`${t} has to be an object!`);const r=e;r.retry&&si(r.retry,`${t}.retry`),r.timeout&&si(r.timeout,`${t}.timeout`)}function bi(e,t="UploadOptions"){if(!ni(e))throw new TypeError(`${t} has to be an object!`);pi(e,t);const r=e;if(r.pin&&"boolean"!=typeof r.pin)throw new TypeError(`options.pin property in ${t} has to be boolean or undefined!`);if(r.encrypt&&"boolean"!=typeof r.encrypt)throw new TypeError(`options.encrypt property in ${t} has to be boolean or undefined!`);if(r.tag){if("number"!=typeof r.tag)throw new TypeError(`options.tag property in ${t} has to be number or undefined!`);si(r.tag,"options.tag")}}function mi(e){bi(e,"CollectionUploadOptions");const t=e;if(t.indexDocument&&"string"!=typeof t.indexDocument)throw new TypeError("indexDocument property in CollectionUploadOptions has to be string or undefined!");if(t.errorDocument&&"string"!=typeof t.errorDocument)throw new TypeError("errorDocument property in CollectionUploadOptions has to be string or undefined!")}function yi(e){return!!ni(e)&&Boolean(e.uid)}function gi(e,t="TransactionOptions"){if(void 0===e)return;ii(e,t);const r=e;r?.gasLimit&&si(r.gasLimit,t),r?.gasPrice&&si(r.gasPrice,t)}function wi(e){if("string"!=typeof e&&!(e instanceof Uint8Array))throw new TypeError("Data must be either string or Uint8Array!")}function vi(e){if(null==e)throw new TypeError("TagUid was expected but got undefined or null instead!");if(yi(e))return e.uid;if("number"==typeof e)return si(e,"UID"),e;if("string"==typeof e){const t=parseInt(e);if(isNaN(t))throw new TypeError("Passed tagUid string is not valid integer!");if(t<0)throw new TypeError(`TagUid was expected to be positive non-negative integer! Got ${t}`);return t}throw new TypeError("tagUid has to be either Tag or a number (UID)!")}function _i(e){if("string"!=typeof e)throw new TypeError("TransactionHash has to be a string!");if(E(e,"TransactionHash"),66!==e.length)throw new TypeError("TransactionHash has to be prefixed hex string with total length 66 (prefix including)")}const{ec:Si}=l();function Ei(e){const t=`Ethereum Signed Message:\n${e.length}`;return j((new TextEncoder).encode(t),e)}function Mi(e){return j(e.encode("array",!1).slice(1)).slice(12)}function Ai(e){return{sign:t=>function(e,t){const r=new Si("secp256k1"),n=r.keyFromPrivate(t),i=Ei(e),o=r.sign(i,n,{canonical:!0,pers:void 0});if(null===o.recoveryParam)throw new h("signDigest recovery param was null");return new Uint8Array([...o.r.toArray("be",32),...o.s.toArray("be",32),o.recoveryParam+27])}(t,e),address:Mi(new Si("secp256k1").keyFromPrivate(e).getPublic())}}function Ri(e){if("string"==typeof e){return Ai(y(m(e,64)))}return e instanceof Uint8Array?(R(e,32),Ai(e)):(function(e){if(!ni(e))throw new TypeError("Signer must be an object!");const t=e;if(!M(t.address,20))throw new TypeError("Signer's address must be Uint8Array with 20 bytes!");if("function"!=typeof t.sign)throw new TypeError("Signer sign property needs to be function!")}(e),e)}function Ti(e){return{name:function(e){if(!e)throw new h("missing content-disposition header");const t=e.match(/filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/i);if(t&&t.length>0)return t[1];throw new h("invalid content-disposition header")}(e["content-disposition"]),tagUid:function(e){if(e)return parseInt(e,10)}(e["swarm-tag-uid"]),contentType:e["content-type"]||void 0}}function xi(e,t){if(!e)throw new h("Postage BatchID has to be specified!");const r={"swarm-postage-batch-id":e};return t?.pin&&(r["swarm-pin"]=String(t.pin)),t?.encrypt&&(r["swarm-encrypt"]=String(t.encrypt)),t?.tag&&(r["swarm-tag"]=String(t.tag)),"boolean"==typeof t?.deferred&&(r["swarm-deferred-upload"]=t.deferred.toString()),r}function Oi(e,t){const r=xi(e,t);return t?.redundancyLevel&&(r["swarm-redundancy-level"]=String(t.redundancyLevel)),r}function Ii(e){const t={};return e?.redundancyStrategy&&(t["swarm-redundancy-strategy"]=String(e.redundancyStrategy)),!1===e?.fallback&&(t["swarm-redundancy-fallback-mode"]="false"),void 0!==e?.timeoutMs&&(t["swarm-chunk-retrieval-timeout"]=String(e.timeoutMs)),t}var Ci=r(4559),Pi=r.n(Ci);const ki={headers:{accept:"application/json, text/plain, */*"},maxBodyLength:1/0,maxContentLength:1/0};async function qi(e,t){try{const r=c.deepMerge3(ki,t,e);!function(e,t){e.onRequest&&e.onRequest({method:t.method||"GET",url:f.joinUrl(t.baseURL,t.url),headers:{...t.headers},params:t.params})}(e,r);return await Pi()(r)}catch(de){if(de instanceof Ci.AxiosError)throw new b(de.message,de.code,de.status,de.response?.status,de.config,de.request,de.response);throw de}}async function Ni(e,t){const r=await qi(e,{responseType:"arraybuffer",url:`chunks/${t}`});return k(new Uint8Array(r.data))}const{keccak256:Fi}=N(),ji=4096;function $i(e){const t=e.slice(0,8),r=function(e){if(e.length>ji)throw new p("invalid data length",e);let t=new Uint8Array([...e,...new Uint8Array(ji-e.length)]);for(;32!==t.length;){const e=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=64){const n=Fi.array(t.slice(r,r+64));e.set(n,r/2)}t=e}return t}(e.slice(8));return j(new Uint8Array([...t,...r]))}function Li(...e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;return e.forEach((e=>{r.set(e,n),n+=e.length})),r}const Bi=4096;function zi(e){const t=function(e){if(e<=0)throw new p("invalid length for span",e);if(e>4294967295)throw new p("invalid length (> MAX_SPAN_LENGTH)",e);const t=new Uint8Array(8),r=4294967295&e;return new DataView(t.buffer).setUint32(0,r,!0),t}(e.length);x(e,1,Bi);const r=Li(t,e);return{data:r,span:()=>t,payload:()=>I(r,8),address:()=>$i(r)}}function Di(e,t){if(!function(e,t){return e instanceof Uint8Array&&C($i(e),t)}(e,t))throw new h("Address of content address chunk does not match given data!")}function Ui(e){const t=$i(e.slice(97)),r=function(e,t){const r=new Si("secp256k1"),n={r:e.slice(0,32),s:e.slice(32,64)},i=e[64]-27,o=Ei(t);return Mi(r.recoverPubKey(o,n,i))}(O(e,32,65),j(O(e,0,32),t));return r}function Wi(e,t){const r=Ui(e),n=O(e,0,32),i=j(n,r);if(!C(t,i))throw new h("SOC Data does not match given address!");return{data:e,identifier:()=>n,signature:()=>O(e,32,65),span:()=>O(e,97,8),payload:()=>I(e,105),address:()=>i,owner:()=>r}}function Hi(e,t){return j(e,t)}async function Vi(e,t,r){const n=e.address();Di(e.data,n);const i=j(t,n),o=await async function(e,t){const r=await e.sign(k(t));if("string"==typeof r)return y(m(r,ae));if(r instanceof Uint8Array)return R(r,se),r;throw new TypeError("Invalid output of sign function!")}(r,i),a=Li(t,o,e.span(),e.payload()),s=Hi(t,r.address);return{data:a,identifier:()=>t,signature:()=>o,span:()=>e.span(),payload:()=>e.payload(),address:()=>s,owner:()=>r.address}}async function Gi(e,t,r,n){return async function(e,t,r,n,i,o,a){return(await qi(e,{method:"post",url:`soc/${t}/${r}`,data:i,headers:{"content-type":"application/octet-stream",...xi(o,a)},responseType:"json",params:{sig:n}})).data.reference}(e,g(t.owner()),g(t.identifier()),g(t.signature()),Li(t.span(),t.payload()),r,n)}async function Xi(e,t,r,n,i,o){li(r);const a=zi(i);return Gi(e,await Vi(a,n,t),r,o)}async function Ji(e,t,r){const n=Hi(r,t);return Wi(await Ni(e,g(n)),n)}function Zi(e){const t=e["swarm-feed-index"],r=e["swarm-feed-index-next"];if(!t)throw new h("Response did not contain expected swarm-feed-index!");if(!r)throw new h("Response did not contain expected swarm-feed-index-next!");return{feedIndex:t,feedIndexNext:r}}async function Yi(e,t,r,n){const i=await qi(e,{responseType:"json",url:`feeds/${t}/${r}`,params:n});return{...i.data,...Zi(i.headers)}}const{keccak256:Ki,sha3_256:Qi}=N();function eo(e){if("string"==typeof e){const t=y(m(e,40));return R(t,20),t}if(e instanceof Uint8Array)return R(e,20),e;throw new TypeError("Invalid EthAddress")}function to(e){try{return m(e,40)}catch(de){throw de instanceof TypeError&&(de.message=`Invalid HexEthAddress: ${de.message}`),de}}function ro(e){return function(e){return"string"==typeof e&&(/^(0x|0X)?[0-9a-f]{40}$/.test(e)||/^(0x|0X)?[0-9A-F]{40}$/.test(e))}(e)||function(e){try{const t=m(e,40),r=Ki(t.toLowerCase());for(let e=0;e<40;e+=1)if(parseInt(r[e],16)>7&&t[e].toUpperCase()!==t[e]||parseInt(r[e],16)<=7&&t[e].toLowerCase()!==t[e])return!1;return!0}catch(de){if(de instanceof TypeError)return!1;throw de}}(e)}function no(e,t=2){if(!(Number.isInteger(t)&&t>=2&&t%2==0))throw new TypeError("minimal padding for conversion needs to be positive even integer");let r;if("string"==typeof e)r=m(e);else{if("number"!=typeof e)throw new TypeError("incorrect input type");r=w(e)}r=r.padStart(t,"0"),r.length%2!=0&&(r=r.padStart(r.length+1,"0"));const n=r.match(/../g)?.reverse().join("");if(n)return n;throw new Error("failed to convert")}function io(e,t=2){return no(e,t)}function oo(e,t=1){!function(e){if(!ro(e))throw new TypeError("invalid ETH address")}(e),function(e){if(Number.isInteger(e&&e>0&&e<Number.MAX_SAFE_INTEGER))throw new TypeError("swarm network id must be positive integer")}(t);const r=`${m(e)}${no(t,16)}`;S(r);return Qi(y(r))}async function ao(e,t){let r;if("object"!=typeof e||null===e)throw new TypeError("We need JsonRPC provider object!");if(e.request)r=e.request;else{if(!e.sendAsync)throw new Error("Incompatible interface of given provider!");r=e.sendAsync}t||(t=(await r({method:"eth_requestAccounts"}))[0]);const n=eo(t),i=to(t);return{address:n,sign:async e=>await r({jsonrpc:"2.0",method:"personal_sign",params:["0x"+e.hex(),"0x"+i]})}}function so(e,t=0){if("string"==typeof e){if(t)throw new Error("Offset property can be set only for UintArray reference!");try{return y(m(e,G))}catch(de){if(!(de instanceof TypeError))throw de;return y(m(e,X))}}else if(e instanceof Uint8Array){if(A(e,t,Z))return O(e,t,Z);if(A(e,t,J))return O(e,t,J)}throw new TypeError("invalid chunk reference")}function co(e,t=P(8)){const r=new DataView(t.buffer),n=4294967295&e;return r.setUint32(0,0),r.setUint32(4,n),t}function fo(e){return new DataView(e.buffer).getUint32(4)}function uo(e,t){return j(y(e),t)}function lo(e,t){if("number"==typeof t)return function(e,t){return uo(e,co(t))}(e,t);if("string"==typeof t){const r=function(e){return y(m(e,te))}(t);return uo(e,r)}if("object"==typeof(r=t)&&null!==r&&"time"in r&&"level"in r)throw new TypeError("epoch is not yet implemented");var r;return uo(e,t)}async function ho(e,t,r,n,i,o,a="latest"){const s=to(t.address),c="latest"===a?await async function(e,t,r,n){try{return m((await Yi(e,t,r,n)).feedIndexNext,te)}catch(de){if(404===de?.response?.status)return g(P(8));throw de}}(e,s,r,o):a;return Xi(e,t,i,lo(r,c),Li(co(o?.at??Date.now()/1e3),n),o)}function po(e,t,r){return j(lo(t,r),e)}function bo(e,t,r,n){return{type:t,owner:n,topic:r,async download(i){if(!i?.index&&0!==i?.index)return Yi(e,n,r,{...i,type:t});const o=await async function(e,t,r,n){const i=po(t,r,n),o=g(i),a=Wi(await Ni(e,o),i).payload();return{timestamp:fo(O(a,0,8)),reference:so(a,8)}}(e,y(n),r,i.index);return{reference:g(o.reference),feedIndex:i.index,feedIndexNext:""}}}}function mo(e){try{const t=JSON.stringify(e);return(new TextEncoder).encode(t)}catch(de){throw function(e){return e instanceof Error}(de)&&(de.message=`JsonFeed: ${de.message}`),de}}function yo(e,t,r){const n=function(e){if(e instanceof Uint8Array)return fo(e);if("string"==typeof e)return parseInt(e);if("number"==typeof e)return e;throw new TypeError("Unknown type of index!")}(r),i=new Array(n+1);for(let o=0;o<=n;o++)i[o]=g(po(e,t,o));return i}function go(e){if("string"==typeof e)return m(e,oe);if(e instanceof Uint8Array)return R(e,ie),g(e,oe);throw new TypeError("invalid topic")}const wo=["sequence","epoch"],vo="sequence";function _o(e){if(!function(e){return"string"==typeof e&&wo.includes(e)}(e))throw new TypeError("invalid feed type")}const So="bytes";function Eo(e){return!!Array.isArray(e)&&e.every((e=>"object"==typeof e&&e.data&&e.path&&e.data instanceof Uint8Array))}function Mo(e){if(!Eo(e))throw new p("invalid collection",e)}function Ao(e){if(e.webkitRelativePath&&""!==e.webkitRelativePath)return e.webkitRelativePath.replace(/.*?\//i,"");if(e.name)return e.name;throw new TypeError("file is not valid File object")}function Ro(e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];n&&(t+=n.size)}return t}var To=r(1117),xo=r.n(To);function Oo(e){const t=(new TextEncoder).encode(e);return{length:t.length,charCodeAt:e=>t[e]}}const Io="bzz";function Co(e,t){const r=Oi(e,t);return t?.size&&(r["content-length"]=String(t.size)),t?.contentType&&(r["content-type"]=t.contentType),r}async function Po(e,t,r,n,i){Jn(t)&&!i?.contentType&&(i||(i={}),i.contentType="application/octet-stream");const o=await qi(e,{method:"post",url:Io,data:t,headers:{...Co(r,i)},params:{name:n},responseType:"json"});return{reference:o.data.reference,tagUid:o.headers["swarm-tag"]?vi(o.headers["swarm-tag"]):void 0}}function ko(e,t){const r=Oi(e,t);return t?.indexDocument&&(r["swarm-index-document"]=t.indexDocument),t?.errorDocument&&(r["swarm-error-document"]=t.errorDocument),r}async function qo(e,t,r,n){Mo(t);const i=function(e){const t=new(xo())(1);for(const r of e){const e=Oo(r.path);t.append(e,r.data)}return t.out}(t),o=await qi(e,{method:"post",url:Io,data:i,responseType:"json",headers:{"content-type":"application/x-tar","swarm-collection":"true",...ko(r,n)}});return{reference:o.data.reference,tagUid:o.headers["swarm-tag"]?vi(o.headers["swarm-tag"]):void 0}}var No=r(2256),Fo=r.n(No);async function jo(e,t,r,n,i,o){await qi(e,{method:"post",url:`pss/send/${t}/${r}`,data:n,responseType:"json",params:{recipient:o},headers:xi(i)})}async function $o(e){await qi(e,{url:""})}const Lo="tags";async function Bo(e){throw new Error("Creating Collection from File System is not supported in browsers!")}function zo(e){try{if("string"!=typeof e)return!1;const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(de){if(de instanceof TypeError||function(e){return ri(e)&&"string"==typeof e.code}(de)&&"ERR_INVALID_URL"===de.code)return!1;throw de}}function Do(e){if(!zo(e))throw new p("URL is not valid!",e)}function Uo(e){return e.endsWith("/")?e.slice(0,-1):e}class Wo{constructor(e,t){Do(e),this.url=Uo(e),t?.signer&&(this.signer=Ri(t.signer)),this.requestOptions={baseURL:this.url,timeout:t?.timeout??!1,headers:t?.headers,onRequest:t?.onRequest,adapter:t?.adapter}}async uploadData(e,t,r,n){return hi(e),wi(t),r&&bi(r),async function(e,t,r,n){const i=await qi(e,{url:So,method:"post",responseType:"json",data:t,headers:{"content-type":"application/octet-stream",...Oi(r,n)}});return{reference:i.data.reference,tagUid:i.headers["swarm-tag"]?vi(i.headers["swarm-tag"]):void 0}}(this.getRequestOptionsForCall(n),t,e,r)}async downloadData(e,t){return pi(t),fi(e),async function(e,t,r){const n=await qi(e,{responseType:"arraybuffer",url:`bytes/${t}`,headers:Ii(r)});return k(new Uint8Array(n.data))}(this.getRequestOptionsForCall(t),e)}async downloadReadableData(e,t){return pi(t),fi(e),async function(e,t,r){return(await qi(e,{responseType:"stream",url:`bytes/${t}`,headers:Ii(r)})).data}(this.getRequestOptionsForCall(t),e)}async uploadChunk(e,t,r,n){if(hi(e),!(t instanceof Uint8Array))throw new TypeError("Data has to be Uint8Array instance!");if(t.length<L)throw new p(`Chunk has to have size of at least ${L}.`,t);if(t.length>D+L)throw new p(`Chunk has to have size of at most ${D}.`,t);return r&&bi(r),async function(e,t,r,n){return(await qi(e,{method:"post",url:"chunks",data:t,headers:{"content-type":"application/octet-stream",...xi(r,n)},responseType:"json"})).data.reference}(this.getRequestOptionsForCall(n),t,e,r)}async downloadChunk(e,t){return pi(t),fi(e),Ni(this.getRequestOptionsForCall(t),e)}async uploadFile(e,t,r,n,i){if(hi(e),function(e){if(!("string"==typeof e||e instanceof Uint8Array||ce(e)||Jn(e)))throw new TypeError("Data must be either string, Readable, Uint8Array or File!")}(t),n&&function(e){bi(e,"FileUploadOptions");const t=e;if(t.size){if("number"!=typeof t.size)throw new TypeError("tag property in FileUploadOptions has to be number or undefined!");si(t.size,"options.size")}if(t.contentType&&"string"!=typeof t.contentType)throw new TypeError("contentType property in FileUploadOptions has to be string or undefined!")}(n),r&&"string"!=typeof r)throw new TypeError("name has to be string or undefined!");if(ce(t)){const o=await fe(t),s=r??t.name,c={contentType:t.type,...n};return di(await Po(this.getRequestOptionsForCall(i),o,e,s,c),a.lW.MANIFEST)}if(Jn(t)&&n?.tag&&!n.size){const o=await Po(this.getRequestOptionsForCall(i),t,e,r,n);return await this.updateTag(n.tag,o.reference),di(o,a.lW.MANIFEST)}return di(await Po(this.getRequestOptionsForCall(i),t,e,r,n),a.lW.MANIFEST)}async downloadFile(e,t="",r){return pi(r),e=ui(e,a.lW.MANIFEST),async function(e,t,r="",n){const i=await qi(e,{method:"GET",responseType:"arraybuffer",url:`bzz/${t}/${r}`,headers:Ii(n)});return{...Ti(i.headers),data:k(new Uint8Array(i.data))}}(this.getRequestOptionsForCall(r),e,t)}async downloadReadableFile(e,t="",r){return pi(r),e=ui(e,a.lW.MANIFEST),async function(e,t,r="",n){const i=await qi(e,{method:"GET",responseType:"stream",url:`bzz/${t}/${r}`,headers:Ii(n)});return{...Ti(i.headers),data:i.data}}(this.getRequestOptionsForCall(r),e,t)}async uploadFiles(e,t,r,n){hi(e),r&&mi(r);const i=await async function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];n&&t.push({path:Ao(n),data:new Uint8Array(await fe(n))})}return t}(t);return di(await qo(this.getRequestOptionsForCall(n),i,e,r),a.lW.MANIFEST)}async uploadCollection(e,t,r){return hi(e),Mo(t),r&&mi(r),di(await qo(this.requestOptions,t,e,r),a.lW.MANIFEST)}async uploadFilesFromDirectory(e,t,r,n){hi(e),r&&mi(r);const i=await async function(e){throw new Error("Creating Collection from File System is not supported in browsers!")}();return di(await qo(this.getRequestOptionsForCall(n),i,e,r),a.lW.MANIFEST)}async createTag(e){return pi(e),async function(e){return(await qi(e,{method:"post",url:Lo,responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getAllTags(e){return pi(e),function(e){if(void 0!==e&&!ni(e))throw new TypeError("options has to be an object or undefined!");pi(e,"AllTagsOptions");const t=e;if(void 0!==t?.limit){if("number"!=typeof t.limit)throw new TypeError("AllTagsOptions.limit has to be a number or undefined!");if(t.limit<Q)throw new p(`AllTagsOptions.limit has to be at least ${Q}`,t.limit);if(t.limit>ee)throw new p(`AllTagsOptions.limit has to be at most ${ee}`,t.limit)}void 0!==t?.offset&&si(t.offset,"AllTagsOptions.offset")}(e),async function(e,t,r){return(await qi(e,{url:Lo,params:{offset:t,limit:r},responseType:"json"})).data.tags}(this.getRequestOptionsForCall(e),e?.offset,e?.limit)}async retrieveTag(e,t){return pi(t),e=vi(e),async function(e,t){return(await qi(e,{url:`tags/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async deleteTag(e,t){return pi(t),e=vi(e),async function(e,t){await qi(e,{method:"delete",url:`tags/${t}`})}(this.getRequestOptionsForCall(t),e)}async updateTag(e,t,r){return ci(t),pi(r),e=vi(e),async function(e,t,r){await qi(e,{method:"patch",url:`tags/${t}`,data:{reference:r}})}(this.getRequestOptionsForCall(r),e,t)}async pin(e,t){return pi(t),ci(e),async function(e,t){await qi(e,{method:"post",responseType:"json",url:`pins/${t}`})}(this.getRequestOptionsForCall(t),e)}async unpin(e,t){return pi(t),ci(e),async function(e,t){await qi(e,{method:"delete",responseType:"json",url:`pins/${t}`})}(this.getRequestOptionsForCall(t),e)}async getAllPins(e){return pi(e),async function(e){return(await qi(e,{method:"get",responseType:"json",url:"pins"})).data.references}(this.getRequestOptionsForCall(e))}async getPin(e,t){return pi(t),ci(e),async function(e,t){return(await qi(e,{method:"get",responseType:"json",url:`pins/${t}`})).data}(this.getRequestOptionsForCall(t),e)}async reuploadPinnedData(e,t){pi(t),fi(e),await async function(e,t){await qi(e,{method:"put",url:`stewardship/${t}`})}(this.getRequestOptionsForCall(t),e)}async isReferenceRetrievable(e,t){return pi(t),fi(e),async function(e,t){return(await qi(e,{method:"get",responseType:"json",url:`stewardship/${t}`})).data.isRetrievable}(this.getRequestOptionsForCall(t),e)}async isFeedRetrievable(e,t,r,n,i){const o=eo(t),a=go(r);if(!n)try{return await this.makeFeedReader(e,a,o).download(),!0}catch(de){if(404===de?.response?.status)return!1;throw de}if("sequence"!==e)throw new h("Only Sequence type of Feeds is supported at the moment");return async function(e,t,r,n,i){const o=yo(t,r,n).map((async t=>async function(e,t,r){try{return await e.downloadChunk(t,r),!0}catch(de){if(404===de?.response?.status)return!1;throw de}}(e,t,i)));return(await Promise.all(o)).every((e=>e))}(this,o,a,n,this.getRequestOptionsForCall(i))}async pssSend(e,t,r,n,i,o){if(pi(o),wi(n),hi(e),function(e){if(S(e,void 0,"AddressPrefix"),e.length>W)throw new p(`AddressPrefix must have length of ${W} at most! Got string with ${e.length}`,e)}(r),"string"!=typeof t)throw new TypeError("topic has to be an string!");return i?(S(i,H,"PublicKey"),jo(this.getRequestOptionsForCall(o),t,r,n,e,i)):jo(this.getRequestOptionsForCall(o),t,r,n,e)}pssSubscribe(e,t){if(function(e){if(!ni(e))throw new TypeError("PssMessageHandler has to be object!");const t=e;if("function"!=typeof t.onMessage)throw new TypeError("onMessage property of PssMessageHandler has to be function!");if("function"!=typeof t.onError)throw new TypeError("onError property of PssMessageHandler has to be function!")}(t),"string"!=typeof e)throw new TypeError("topic has to be an string!");const r=function(e,t){const r=e.replace(/^http/i,"ws");return new(Fo())(`${r}/pss/subscribe/${t}`)}(this.url,e);let n=!1;const i={topic:e,cancel:()=>{!1===n&&(n=!0,r.terminate?r.terminate():r.close())}};return r.onmessage=async e=>{const r=await async function(e){if("string"==typeof e)return(new TextEncoder).encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(e instanceof Blob)return new Uint8Array(await new Response(e).arrayBuffer());throw new TypeError("unknown websocket data type")}(e.data);r.length>0&&t.onMessage(k(r),i)},r.onerror=e=>{n||t.onError(new h(e.message),i)},i}async pssReceive(e,t=0){if("string"!=typeof e)throw new TypeError("topic has to be an string!");if("number"!=typeof t)throw new TypeError("timeoutMsc parameter has to be a number!");return new Promise(((r,n)=>{let i;const o=this.pssSubscribe(e,{onError:e=>{clearTimeout(i),o.cancel(),n(e.message)},onMessage:e=>{clearTimeout(i),o.cancel(),r(e)}});t>0&&(i=setTimeout((()=>{o.cancel(),n(new h("pssReceive timeout"))}),t))}))}async createFeedManifest(e,t,r,n,i){pi(i),_o(t),hi(e);const o=go(r),s=to(n),c=await async function(e,t,r,n,i){return(await qi(e,{method:"post",responseType:"json",url:`feeds/${t}/${r}`,params:i,headers:xi(n)})).data.reference}(this.getRequestOptionsForCall(i),s,o,e,{type:t});return di({reference:c},a.lW.FEED)}makeFeedReader(e,t,r,n){pi(n),_o(e);const i=go(t),o=to(r);return bo(this.getRequestOptionsForCall(n),e,i,o)}makeFeedWriter(e,t,r,n){pi(n),_o(e);const i=go(t),o=this.resolveSigner(r);return function(e,t,r,n){return{...bo(e,t,r,to(n.address)),upload:async(i,o,a)=>{li(i);const s=so(o);return ho(e,n,r,s,i,{...a,type:t})}}}(this.getRequestOptionsForCall(n),e,i,o)}async setJsonFeed(e,t,r,n,i){pi(n,"JsonFeedOptions"),hi(e);const o=this.makeFeedTopic(t),a=n?.type??vo;return async function(e,t,r,n,i,o){const a=mo(n),{reference:s}=await e.uploadData(r,a,i,o);return t.upload(r,s)}(this,this.makeFeedWriter(a,o,n?.signer,i),e,r,n,i)}async getJsonFeed(e,t){pi(t,"JsonFeedOptions");const r=this.makeFeedTopic(e),n=t?.type??vo;if(t?.signer&&t?.address)throw new h('Both options "signer" and "address" can not be specified at one time!');let i;if(t?.address)i=eo(t?.address);else try{i=this.resolveSigner(t?.signer).address}catch(de){throw de instanceof h?new h("Either address, signer or default signer has to be specified!"):de}return async function(e,t){const r=await t.download();return(await e.downloadData(r.reference)).json()}(this,this.makeFeedReader(n,r,i,t))}makeFeedTopic(e){return function(e){if("string"!=typeof e)throw new TypeError("topic has to be string!");return g(j(e),oe)}(e)}makeSOCReader(e,t){pi(t);const r=eo(e);return{owner:to(r),download:Ji.bind(null,this.getRequestOptionsForCall(t),r)}}makeSOCWriter(e,t){pi(t);const r=this.resolveSigner(e);return{...this.makeSOCReader(r.address,t),upload:Xi.bind(null,this.getRequestOptionsForCall(t),r)}}async checkConnection(e){return pi(e,"PostageBatchOptions"),$o(this.getRequestOptionsForCall(e))}async isConnected(e){pi(e,"PostageBatchOptions");try{await $o(this.getRequestOptionsForCall(e))}catch(de){return!1}return!0}resolveSigner(e){if(e)return Ri(e);if(this.signer)return this.signer;throw new h("You have to pass Signer as property to either the method call or constructor! Non found.")}getRequestOptionsForCall(e){return e?c.deepMerge2(this.requestOptions,e):this.requestOptions}}const Ho="balances",Vo="consumed";const Go="settlements";var Xo=r(4503),Jo=r.n(Xo);const Zo="1.18.2-759f56f",Yo="4.0.0",Ko="4.0.0",Qo=Zo.substring(0,Zo.indexOf("-"));async function ea(e){return(await qi(e,{method:"get",url:"health",responseType:"json"})).data}async function ta(e){const{version:t}=await ea(e);return t===Zo}async function ra(e){const{debugApiVersion:t}=await ea(e);return Jo()(t)===Jo()(Ko)}const na="transactions";class ia{constructor(e,t){Do(e),this.url=Uo(e),this.requestOptions={baseURL:this.url,timeout:t?.timeout??!1,headers:t?.headers,onRequest:t?.onRequest,adapter:t?.adapter}}async getNodeAddresses(e){return pi(e),async function(e){return(await qi(e,{url:"addresses",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getBlocklist(e){return pi(e),async function(e){return(await qi(e,{url:"blocklist",responseType:"json"})).data.peers}(this.getRequestOptionsForCall(e))}async retrieveExtendedTag(e,t){if(pi(t),yi(e))e=e.uid;else{if("number"!=typeof e)throw new TypeError("tagUid has to be either Tag or a number (UID)!");si(e,"UID")}return async function(e,t){return(await qi(e,{url:`tags/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getPeers(e){return pi(e),async function(e){return(await qi(e,{url:"peers",responseType:"json"})).data.peers}(this.getRequestOptionsForCall(e))}async removePeer(e,t){return pi(t),li(e),async function(e,t){return(await qi(e,{url:`peers/${t}`,responseType:"json",method:"DELETE"})).data}(this.getRequestOptionsForCall(t),e)}async getTopology(e){return pi(e),async function(e){return(await qi(e,{url:"topology",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async pingPeer(e,t){return pi(t),li(e),async function(e,t){return(await qi(e,{url:`pingpong/${t}`,responseType:"json",method:"POST"})).data}(this.getRequestOptionsForCall(t),e)}async getAllBalances(e){return pi(e),async function(e){return(await qi(e,{url:Ho,responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getPeerBalance(e,t){return pi(t),li(e),async function(e,t){return(await qi(e,{url:`balances/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getPastDueConsumptionBalances(e){return pi(e),async function(e){return(await qi(e,{url:Vo,responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getPastDueConsumptionPeerBalance(e,t){return pi(t),li(e),async function(e,t){return(await qi(e,{url:`consumed/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getChequebookAddress(e){return pi(e),async function(e){return(await qi(e,{url:"chequebook/address",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getChequebookBalance(e){return pi(e),async function(e){return(await qi(e,{url:"chequebook/balance",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getLastCheques(e){return pi(e),async function(e){return(await qi(e,{url:"chequebook/cheque",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getLastChequesForPeer(e,t){return pi(t),li(e),async function(e,t){return(await qi(e,{url:`chequebook/cheque/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getLastCashoutAction(e,t){return pi(t),li(e),async function(e,t){return(await qi(e,{url:`chequebook/cashout/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async cashoutLastCheque(e,t,r){return function(e){if(void 0===e)return;ii(e);const t=e;pi(t,"CashoutOptions"),gi(t,"CashoutOptions")}(t),li(e),async function(e,t,r){const n={};return r?.gasPrice&&(n["gas-price"]=r.gasPrice.toString()),r?.gasLimit&&(n["gas-limit"]=r.gasLimit.toString()),(await qi(e,{method:"post",url:`chequebook/cashout/${t}`,responseType:"json",headers:n})).data.transactionHash}(this.getRequestOptionsForCall(r),e,t)}async depositTokens(e,t,r){return pi(r),si(e),t&&si(t),async function(e,t,r){const n={};return r&&(n["gas-price"]=r.toString()),(await qi(e,{method:"post",url:"chequebook/deposit",responseType:"json",params:{amount:t.toString(10)},headers:n})).data.transactionHash}(this.getRequestOptionsForCall(r),e,t)}async withdrawTokens(e,t,r){return pi(r),si(e),t&&si(t),async function(e,t,r){const n={};return r&&(n["gas-price"]=r.toString()),(await qi(e,{method:"post",url:"chequebook/withdraw",responseType:"json",params:{amount:t.toString(10)},headers:n})).data.transactionHash}(this.getRequestOptionsForCall(r),e,t)}async getSettlements(e,t){return pi(t),li(e),async function(e,t){return(await qi(e,{url:`settlements/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getAllSettlements(e){return pi(e),async function(e){return(await qi(e,{url:Go,responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getStatus(e){return pi(e),async function(e){return(await qi(e,{method:"get",url:"status",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getHealth(e){return pi(e),ea(this.getRequestOptionsForCall(e))}async getReadiness(e){return pi(e),async function(e){try{return 200===(await qi(e,{method:"get",url:"readiness"})).status}catch{return!1}}(this.getRequestOptionsForCall(e))}async getNodeInfo(e){return pi(e),async function(e){return(await qi(e,{method:"get",url:"node",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async isSupportedVersion(e){return pi(e),async function(e){return ta(e)}(this.getRequestOptionsForCall(e))}async isSupportedExactVersion(e){return pi(e),ta(this.getRequestOptionsForCall(e))}async isSupportedMainApiVersion(e){return pi(e),async function(e){const{apiVersion:t}=await ea(e);return Jo()(t)===Jo()(Yo)}(this.getRequestOptionsForCall(e))}async isSupportedDebugApiVersion(e){return pi(e),ra(this.getRequestOptionsForCall(e))}async isSupportedApiVersion(e){return pi(e),ra(this.getRequestOptionsForCall(e))}async getVersions(e){return pi(e),async function(e){const{version:t,apiVersion:r,debugApiVersion:n}=await ea(e);return{supportedBeeVersion:Zo,supportedBeeApiVersion:Yo,supportedBeeDebugApiVersion:Ko,beeVersion:t,beeApiVersion:r,beeDebugApiVersion:n}}(this.getRequestOptionsForCall(e))}async getReserveState(e){return pi(e),async function(e){return(await qi(e,{method:"get",url:"reservestate",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getChainState(e){return pi(e),async function(e){return(await qi(e,{method:"get",url:"chainstate",responseType:"json"})).data}(this.getRequestOptionsForCall(e))}async getWalletBalance(e){return pi(e),async function(e){const t=await qi(e,{method:"get",url:"wallet",responseType:"json"});return{bzz:(r=t.data).bzzBalance,xDai:r.nativeTokenBalance,contractAddress:r.chequebookContractAddress,...r};var r}(this.getRequestOptionsForCall(e))}async createPostageBatch(e,t,r,n){if(function(e){if(void 0===e)return;ii(e);const t=e;pi(t,"PostageBatchOptions"),t?.gasPrice&&si(t.gasPrice),void 0!==t?.immutableFlag&&oi(t.immutableFlag),void 0!==t?.waitForUsable&&oi(t.waitForUsable),void 0!==t?.waitForUsableTimeout&&si(t.waitForUsableTimeout,"options.waitForUsableTimeout")}(r),function(e,t="Value"){if(ai(e,t),Number(e)<=0)throw new p(`${t} has to be bigger then zero`,e)}(e),si(t),t<Y)throw new p(`Depth has to be at least ${Y}`,t);if(t>K)throw new p(`Depth has to be at most ${K}`,t);const i=await async function(e,t,r,n){const i={};return n?.gasPrice&&(i["gas-price"]=n.gasPrice.toString()),void 0!==n?.immutableFlag&&(i.immutable=String(n.immutableFlag)),(await qi(e,{method:"post",url:`stamps/${t}/${r}`,responseType:"json",params:{label:n?.label},headers:i})).data.batchID}(this.getRequestOptionsForCall(n),e,t,r);return!1!==r?.waitForUsable&&await this.waitForUsablePostageStamp(i,r?.waitForUsableTimeout),i}async topUpBatch(e,t,r){pi(r),si(t,"Amount"),hi(e),await async function(e,t,r){return(await qi(e,{method:"patch",url:`stamps/topup/${t}/${r}`,responseType:"json"})).data.batchID}(this.getRequestOptionsForCall(r),e,t)}async diluteBatch(e,t,r){pi(r),si(t,"Depth"),hi(e),await async function(e,t,r){return(await qi(e,{method:"patch",url:`stamps/dilute/${t}/${r}`,responseType:"json"})).data.batchID}(this.getRequestOptionsForCall(r),e,t)}async getPostageBatch(e,t){return pi(t),hi(e),async function(e,t){return(await qi(e,{method:"get",url:`stamps/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getPostageBatchBuckets(e,t){return pi(t),hi(e),async function(e,t){return(await qi(e,{method:"get",url:`stamps/${t}/buckets`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async getAllPostageBatch(e){return pi(e),async function(e){return(await qi(e,{method:"get",url:"stamps",responseType:"json"})).data.stamps}(this.getRequestOptionsForCall(e))}async getAllGlobalPostageBatch(e){return pi(e),async function(e){return(await qi(e,{method:"get",url:"batches",responseType:"json"})).data.stamps}(this.getRequestOptionsForCall(e))}async getAllPendingTransactions(e){return pi(e),async function(e){return(await qi(e,{url:na,responseType:"json"})).data.pendingTransactions}(this.getRequestOptionsForCall(e))}async getPendingTransaction(e,t){return pi(t),_i(e),async function(e,t){return(await qi(e,{url:`transactions/${t}`,responseType:"json"})).data}(this.getRequestOptionsForCall(t),e)}async rebroadcastPendingTransaction(e,t){return pi(t),_i(e),async function(e,t){return(await qi(e,{method:"post",url:`transactions/${t}`,responseType:"json"})).data.transactionHash}(this.getRequestOptionsForCall(t),e)}async cancelPendingTransaction(e,t,r){return pi(r),_i(e),t&&si(t),async function(e,t,r){const n={};return r&&(n["gas-price"]=r),(await qi(e,{method:"delete",headers:n,url:`transactions/${t}`,responseType:"json"})).data.transactionHash}(this.getRequestOptionsForCall(r),e,t)}async getStake(e){return pi(e),async function(e){return(await qi(e,{method:"get",responseType:"json",url:"stake"})).data.stakedAmount.toString()}(this.getRequestOptionsForCall(e))}async depositStake(e,t,r){pi(t),gi(t),await async function(e,t,r){const n={};r?.gasPrice&&(n["gas-price"]=r.gasPrice.toString()),r?.gasLimit&&(n["gas-limit"]=r.gasLimit.toString()),await qi(e,{method:"post",responseType:"json",url:`stake/${t}`,headers:n})}(this.getRequestOptionsForCall(r),e,t)}async getRedistributionState(e){return pi(e),async function(e){return(await qi(e,{method:"get",responseType:"json",url:"redistributionstate"})).data}(this.getRequestOptionsForCall(e))}async waitForUsablePostageStamp(e,t=24e4){for(let n=0;n<t;n+=2e3){try{if((await this.getPostageBatch(e)).usable)return}catch(r){if(!(r?.response?.data?.message||r?.message||"").includes("batch not usable"))throw r}await u.sleepMillis(2e3)}throw new h("Timeout on waiting for postage stamp to become usable")}getRequestOptionsForCall(e){return e?c.deepMerge2(this.requestOptions,e):this.requestOptions}}function oa(e){if("string"!=typeof e)throw new TypeError("target has to be an string!");return e.slice(0,W)}function aa(e,t,r){return e/Math.pow(2,t-r)}function sa(e){return 2**e*4096}const ca={22:.2867,23:.4956,24:.6433,25:.7478,26:.8217,27:.8739,28:.9108,29:.9369,30:.9554,31:.9685,32:.9777,33:.9842,34:.9889};function fa(e){if(e<22)return 0;const t=ca[e]??.99;return sa(e)*t}function ua(e,t){return 2**e*t}function da(e,t){return ua(e,t)/10**16}function la(e,t=24e3,r=5){return e*r/t}function ha(e){return(41472e4*(e<=0?1:e)).toString()}function pa(e){return e<=1?18:Math.ceil(Math.log2(Math.ceil(e))+18)}const ba={[re.MEDIUM]:[[[94,68,46,28,14,5,1],[9,8,7,6,5,4,3]],[[47,34,23,14,7,2],[9,8,7,6,5,4]]],[re.STRONG]:[[[104,95,86,77,69,61,53,46,39,32,26,20,15,10,6,3,1],[21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5]],[[52,47,43,38,34,30,26,23,19,16,13,10,7,5,3,1],[21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6]]],[re.INSANE]:[[[92,87,82,77,73,68,63,59,54,50,45,41,37,33,29,26,22,19,16,13,10,8,5,3,2,1],[31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6]],[[46,43,41,38,36,34,31,29,27,25,22,20,18,16,14,13,11,9,8,6,5,4,2,1],[31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,7]]],[re.PARANOID]:[[[37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1],[90,88,87,85,84,82,81,79,77,76,74,72,71,69,67,66,64,62,60,59,57,55,53,51,49,48,46,44,41,39,37,35,32,30,27,24,20]],[[18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1],[88,85,82,79,76,72,69,66,62,59,55,51,48,44,39,35,30,24]]]};function ma(e,t,r){const n=t===re.MEDIUM?ba[re.MEDIUM]:t===re.STRONG?ba[re.STRONG]:t===re.INSANE?ba[re.INSANE]:ba[re.PARANOID],i=r?n[1]:n[0],[o,a]=i;for(let s=0;s<o.length;s++)if(e>=o[s])return a[s]/o[s];return a[a.length-1]/o[o.length-1]}const ya={label:"medium",value:re.MEDIUM,errorTolerance:.01},ga={label:"strong",value:re.STRONG,errorTolerance:.05},wa={label:"insane",value:re.INSANE,errorTolerance:.1},va={label:"paranoid",value:re.PARANOID,errorTolerance:.5};function _a(){return{medium:ya,strong:ga,insane:wa,paranoid:va}}function Sa(e){if("string"==typeof e)switch(e.toLowerCase()){case"medium":return ya;case"strong":return ga;case"insane":return wa;case"paranoid":return va;default:throw new Error(`Unknown redundancy level '${e}'`)}switch(e){case re.MEDIUM:return ya;case re.STRONG:return ga;case re.INSANE:return wa;case re.PARANOID:return va;default:throw new Error(`Unknown redundancy level '${e}'`)}}})(),n})()));
3
3
  //# sourceMappingURL=index.browser.min.js.map