@1money/protocol-ts-sdk 1.0.15 → 1.0.16
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1money/protocol-ts-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "ts sdk for 1Money protocol network",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"license": "MIT",
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@ethereumjs/rlp": ">=10.0.0 <11.0.0",
|
|
57
|
-
"axios": ">=1.
|
|
57
|
+
"axios": ">=1.12.0 <2.0.0",
|
|
58
58
|
"viem": ">=2.0.0 <3.0.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@types/node": "~18.19.39",
|
|
80
80
|
"@typescript-eslint/eslint-plugin": "~8.30.0",
|
|
81
81
|
"@typescript-eslint/parser": "~8.30.0",
|
|
82
|
-
"axios": "~1.
|
|
82
|
+
"axios": "~1.12.0",
|
|
83
83
|
"chai": "4.5.0",
|
|
84
84
|
"cross-env": "^7.0.3",
|
|
85
85
|
"del": "5.1.0",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).$1money={})}(this,(function(t){"use strict";function e(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var n="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}var i=r,s=o;function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}"function"==typeof n.setTimeout&&(i=setTimeout),"function"==typeof n.clearTimeout&&(s=clearTimeout);var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(s===clearTimeout)return clearTimeout(t);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(t);try{return s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}p.prototype.run=function(){this.fun.apply(null,this.array)};var g=n.performance||{};g.now||g.mozNow||g.msNow||g.oNow||g.webkitNow;var y={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||a(d)}};function m(t,e){return function(){return t.apply(e,arguments)}}const{toString:w}=Object.prototype,{getPrototypeOf:b}=Object,v=(E=Object.create(null),t=>{const e=w.call(t);return E[e]||(E[e]=e.slice(8,-1).toLowerCase())});var E;const A=t=>(t=t.toLowerCase(),e=>v(e)===t),S=t=>e=>typeof e===t,{isArray:O}=Array,R=S("undefined");const _=A("ArrayBuffer");const T=S("string"),x=S("function"),U=S("number"),P=t=>null!==t&&"object"==typeof t,C=t=>{if("object"!==v(t))return!1;const e=b(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},B=A("Date"),j=A("File"),k=A("Blob"),N=A("FileList"),L=A("URLSearchParams"),[I,z,F,M]=["ReadableStream","Request","Response","Headers"].map(A);function $(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),O(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(r=0;r<i;r++)s=o[r],e.call(null,t[s],s,t)}}function D(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n,Y=t=>!R(t)&&t!==q;const H=(W="undefined"!=typeof Uint8Array&&b(Uint8Array),t=>W&&t instanceof W);var W;const J=A("HTMLFormElement"),V=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),K=A("RegExp"),X=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};$(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)};const G=A("AsyncFunction"),Z=(Q="function"==typeof setImmediate,tt=x(q.postMessage),Q?setImmediate:tt?(et=`axios@${Math.random()}`,nt=[],q.addEventListener("message",(({source:t,data:e})=>{t===q&&e===et&&nt.length&&nt.shift()()}),!1),t=>{nt.push(t),q.postMessage(et,"*")}):t=>setTimeout(t));var Q,tt,et,nt;const rt="undefined"!=typeof queueMicrotask?queueMicrotask.bind(q):y.nextTick||Z;var ot={isArray:O,isArrayBuffer:_,isBuffer:function(t){return null!==t&&!R(t)&&null!==t.constructor&&!R(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||x(t.append)&&("formdata"===(e=v(t))||"object"===e&&x(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&_(t.buffer),e},isString:T,isNumber:U,isBoolean:t=>!0===t||!1===t,isObject:P,isPlainObject:C,isReadableStream:I,isRequest:z,isResponse:F,isHeaders:M,isUndefined:R,isDate:B,isFile:j,isBlob:k,isRegExp:K,isFunction:x,isStream:t=>P(t)&&x(t.pipe),isURLSearchParams:L,isTypedArray:H,isFileList:N,forEach:$,merge:function t(){const{caseless:e}=Y(this)&&this||{},n={},r=(r,o)=>{const i=e&&D(n,o)||o;C(n[i])&&C(r)?n[i]=t(n[i],r):C(r)?n[i]=t({},r):O(r)?n[i]=r.slice():n[i]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&$(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>($(e,((e,r)=>{n&&x(e)?t[r]=m(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,s;const a={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],r&&!r(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&b(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:v,kindOfTest:A,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(O(t))return t;let e=t.length;if(!U(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:J,hasOwnProperty:V,hasOwnProp:V,reduceDescriptors:X,freezeMethods:t=>{X(t,((e,n)=>{if(x(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];x(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return O(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:D,global:q,isContextDefined:Y,isSpecCompliantForm:function(t){return!!(t&&x(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(P(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const o=O(t)?[]:{};return $(t,((t,e)=>{const i=n(t,r+1);!R(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:G,isThenable:t=>t&&(P(t)||x(t))&&x(t.then)&&x(t.catch),setImmediate:Z,asap:rt},it=[],st=[],at="undefined"!=typeof Uint8Array?Uint8Array:Array,ut=!1;function ct(){ut=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)it[e]=t[e],st[t.charCodeAt(e)]=e;st["-".charCodeAt(0)]=62,st["_".charCodeAt(0)]=63}function lt(t,e,n){for(var r,o,i=[],s=e;s<n;s+=3)r=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(it[(o=r)>>18&63]+it[o>>12&63]+it[o>>6&63]+it[63&o]);return i.join("")}function ft(t){var e;ut||ct();for(var n=t.length,r=n%3,o="",i=[],s=16383,a=0,u=n-r;a<u;a+=s)i.push(lt(t,a,a+s>u?u:a+s));return 1===r?(e=t[n-1],o+=it[e>>2],o+=it[e<<4&63],o+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],o+=it[e>>10],o+=it[e>>4&63],o+=it[e<<2&63],o+="="),i.push(o),i.join("")}function ht(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?o-1:0,h=n?-1:1,d=t[e+f];for(f+=h,i=d&(1<<-l)-1,d>>=-l,l+=a;l>0;i=256*i+t[e+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=c}return(d?-1:1)*s*Math.pow(2,i-r)}function dt(t,e,n,r,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[n+d]=255&a,d+=p,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;t[n+d]=255&s,d+=p,s/=256,c-=8);t[n+d-p]|=128*g}var pt={}.toString,gt=Array.isArray||function(t){return"[object Array]"==pt.call(t)};function yt(){return wt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function mt(t,e){if(yt()<e)throw new RangeError("Invalid typed array length");return wt.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=wt.prototype:(null===t&&(t=new wt(e)),t.length=e),t}function wt(t,e,n){if(!(wt.TYPED_ARRAY_SUPPORT||this instanceof wt))return new wt(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Et(this,t)}return bt(this,t,e,n)}function bt(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);wt.TYPED_ARRAY_SUPPORT?(t=e).__proto__=wt.prototype:t=At(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!wt.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Rt(e,n);t=mt(t,r);var o=t.write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(Ot(e)){var n=0|St(e.length);return 0===(t=mt(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?mt(t,0):At(t,e);if("Buffer"===e.type&>(e.data))return At(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function vt(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Et(t,e){if(vt(e),t=mt(t,e<0?0:0|St(e)),!wt.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function At(t,e){var n=e.length<0?0:0|St(e.length);t=mt(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function St(t){if(t>=yt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+yt().toString(16)+" bytes");return 0|t}function Ot(t){return!(null==t||!t._isBuffer)}function Rt(t,e){if(Ot(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Zt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Qt(t).length;default:if(r)return Zt(t).length;e=(""+e).toLowerCase(),r=!0}}function _t(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return $t(this,e,n);case"utf8":case"utf-8":return It(this,e,n);case"ascii":return Ft(this,e,n);case"latin1":case"binary":return Mt(this,e,n);case"base64":return Lt(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Dt(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function Tt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function xt(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=wt.from(e,r)),Ot(e))return 0===e.length?-1:Ut(t,e,n,r,o);if("number"==typeof e)return e&=255,wt.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Ut(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function Ut(t,e,n,r,o){var i,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=n;i<a;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+u>a&&(n=a-u),i=n;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){f=!1;break}if(f)return i}return-1}function Pt(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function Ct(t,e,n,r){return te(Zt(e,t.length-n),t,n,r)}function Bt(t,e,n,r){return te(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function jt(t,e,n,r){return Bt(t,e,n,r)}function kt(t,e,n,r){return te(Qt(e),t,n,r)}function Nt(t,e,n,r){return te(function(t,e){for(var n,r,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function Lt(t,e,n){return 0===e&&n===t.length?ft(t):ft(t.slice(e,n))}function It(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,s,a,u,c=t[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(t){var e=t.length;if(e<=zt)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=zt));return n}(r)}wt.TYPED_ARRAY_SUPPORT=void 0===n.TYPED_ARRAY_SUPPORT||n.TYPED_ARRAY_SUPPORT,yt(),wt.poolSize=8192,wt._augment=function(t){return t.__proto__=wt.prototype,t},wt.from=function(t,e,n){return bt(null,t,e,n)},wt.TYPED_ARRAY_SUPPORT&&(wt.prototype.__proto__=Uint8Array.prototype,wt.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&wt[Symbol.species]),wt.alloc=function(t,e,n){return function(t,e,n,r){return vt(e),e<=0?mt(t,e):void 0!==n?"string"==typeof r?mt(t,e).fill(n,r):mt(t,e).fill(n):mt(t,e)}(null,t,e,n)},wt.allocUnsafe=function(t){return Et(null,t)},wt.allocUnsafeSlow=function(t){return Et(null,t)},wt.isBuffer=function(t){return null!=t&&(!!t._isBuffer||ee(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&ee(t.slice(0,0))}(t))},wt.compare=function(t,e){if(!Ot(t)||!Ot(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},wt.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},wt.concat=function(t,e){if(!gt(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return wt.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=wt.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var i=t[n];if(!Ot(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},wt.byteLength=Rt,wt.prototype._isBuffer=!0,wt.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Tt(this,e,e+1);return this},wt.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Tt(this,e,e+3),Tt(this,e+1,e+2);return this},wt.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Tt(this,e,e+7),Tt(this,e+1,e+6),Tt(this,e+2,e+5),Tt(this,e+3,e+4);return this},wt.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?It(this,0,t):_t.apply(this,arguments)},wt.prototype.equals=function(t){if(!Ot(t))throw new TypeError("Argument must be a Buffer");return this===t||0===wt.compare(this,t)},wt.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},wt.prototype.compare=function(t,e,n,r,o){if(!Ot(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(i,s),u=this.slice(r,o),c=t.slice(e,n),l=0;l<a;++l)if(u[l]!==c[l]){i=u[l],s=c[l];break}return i<s?-1:s<i?1:0},wt.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},wt.prototype.indexOf=function(t,e,n){return xt(this,t,e,n,!0)},wt.prototype.lastIndexOf=function(t,e,n){return xt(this,t,e,n,!1)},wt.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return Pt(this,t,e,n);case"utf8":case"utf-8":return Ct(this,t,e,n);case"ascii":return Bt(this,t,e,n);case"latin1":case"binary":return jt(this,t,e,n);case"base64":return kt(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Nt(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},wt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var zt=4096;function Ft(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function Mt(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function $t(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=Gt(t[i]);return o}function Dt(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function qt(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function Yt(t,e,n,r,o,i){if(!Ot(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function Ht(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function Wt(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function Jt(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Vt(t,e,n,r,o){return o||Jt(t,0,n,4),dt(t,e,n,r,23,4),n+4}function Kt(t,e,n,r,o){return o||Jt(t,0,n,8),dt(t,e,n,r,52,8),n+8}wt.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),wt.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=wt.prototype;else{var o=e-t;n=new wt(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},wt.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||qt(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},wt.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||qt(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},wt.prototype.readUInt8=function(t,e){return e||qt(t,1,this.length),this[t]},wt.prototype.readUInt16LE=function(t,e){return e||qt(t,2,this.length),this[t]|this[t+1]<<8},wt.prototype.readUInt16BE=function(t,e){return e||qt(t,2,this.length),this[t]<<8|this[t+1]},wt.prototype.readUInt32LE=function(t,e){return e||qt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},wt.prototype.readUInt32BE=function(t,e){return e||qt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},wt.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||qt(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},wt.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||qt(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},wt.prototype.readInt8=function(t,e){return e||qt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},wt.prototype.readInt16LE=function(t,e){e||qt(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},wt.prototype.readInt16BE=function(t,e){e||qt(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},wt.prototype.readInt32LE=function(t,e){return e||qt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},wt.prototype.readInt32BE=function(t,e){return e||qt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},wt.prototype.readFloatLE=function(t,e){return e||qt(t,4,this.length),ht(this,t,!0,23,4)},wt.prototype.readFloatBE=function(t,e){return e||qt(t,4,this.length),ht(this,t,!1,23,4)},wt.prototype.readDoubleLE=function(t,e){return e||qt(t,8,this.length),ht(this,t,!0,52,8)},wt.prototype.readDoubleBE=function(t,e){return e||qt(t,8,this.length),ht(this,t,!1,52,8)},wt.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||Yt(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},wt.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||Yt(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},wt.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,1,255,0),wt.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},wt.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,2,65535,0),wt.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Ht(this,t,e,!0),e+2},wt.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,2,65535,0),wt.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Ht(this,t,e,!1),e+2},wt.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,4,4294967295,0),wt.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):Wt(this,t,e,!0),e+4},wt.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,4,4294967295,0),wt.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Wt(this,t,e,!1),e+4},wt.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);Yt(this,t,e,n,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+n},wt.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);Yt(this,t,e,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+n},wt.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,1,127,-128),wt.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},wt.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,2,32767,-32768),wt.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Ht(this,t,e,!0),e+2},wt.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,2,32767,-32768),wt.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Ht(this,t,e,!1),e+2},wt.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,4,2147483647,-2147483648),wt.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Wt(this,t,e,!0),e+4},wt.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||Yt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),wt.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Wt(this,t,e,!1),e+4},wt.prototype.writeFloatLE=function(t,e,n){return Vt(this,t,e,!0,n)},wt.prototype.writeFloatBE=function(t,e,n){return Vt(this,t,e,!1,n)},wt.prototype.writeDoubleLE=function(t,e,n){return Kt(this,t,e,!0,n)},wt.prototype.writeDoubleBE=function(t,e,n){return Kt(this,t,e,!1,n)},wt.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!wt.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},wt.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!wt.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var s=Ot(t)?t:Zt(new wt(t,r).toString()),a=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%a]}return this};var Xt=/[^+\/0-9A-Za-z-_]/g;function Gt(t){return t<16?"0"+t.toString(16):t.toString(16)}function Zt(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Qt(t){return function(t){var e,n,r,o,i,s;ut||ct();var a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[a-2]?2:"="===t[a-1]?1:0,s=new at(3*a/4-i),r=i>0?a-4:a;var u=0;for(e=0,n=0;e<r;e+=4,n+=3)o=st[t.charCodeAt(e)]<<18|st[t.charCodeAt(e+1)]<<12|st[t.charCodeAt(e+2)]<<6|st[t.charCodeAt(e+3)],s[u++]=o>>16&255,s[u++]=o>>8&255,s[u++]=255&o;return 2===i?(o=st[t.charCodeAt(e)]<<2|st[t.charCodeAt(e+1)]>>4,s[u++]=255&o):1===i&&(o=st[t.charCodeAt(e)]<<10|st[t.charCodeAt(e+1)]<<4|st[t.charCodeAt(e+2)]>>2,s[u++]=o>>8&255,s[u++]=255&o),s}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Xt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function te(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function ee(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function ne(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}ot.inherits(ne,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:ot.toJSONObject(this.config),code:this.code,status:this.status}}});const re=ne.prototype,oe={};["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((t=>{oe[t]={value:t}})),Object.defineProperties(ne,oe),Object.defineProperty(re,"isAxiosError",{value:!0}),ne.from=(t,e,n,r,o,i)=>{const s=Object.create(re);return ot.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ne.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};function ie(t){return ot.isPlainObject(t)||ot.isArray(t)}function se(t){return ot.endsWith(t,"[]")?t.slice(0,-2):t}function ae(t,e,n){return t?t.concat(e).map((function(t,e){return t=se(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const ue=ot.toFlatObject(ot,{},null,(function(t){return/^is[A-Z]/.test(t)}));function ce(t,e,n){if(!ot.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=ot.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!ot.isUndefined(e[t])}))).metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ot.isSpecCompliantForm(e);if(!ot.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(ot.isDate(t))return t.toISOString();if(!a&&ot.isBlob(t))throw new ne("Blob is not supported. Use a Buffer instead.");return ot.isArrayBuffer(t)||ot.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):wt.from(t):t}function c(t,n,o){let a=t;if(t&&!o&&"object"==typeof t)if(ot.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(ot.isArray(t)&&function(t){return ot.isArray(t)&&!t.some(ie)}(t)||(ot.isFileList(t)||ot.endsWith(n,"[]"))&&(a=ot.toArray(t)))return n=se(n),a.forEach((function(t,r){!ot.isUndefined(t)&&null!==t&&e.append(!0===s?ae([n],r,i):null===s?n:n+"[]",u(t))})),!1;return!!ie(t)||(e.append(ae(o,n,i),u(t)),!1)}const l=[],f=Object.assign(ue,{defaultVisitor:c,convertValue:u,isVisitable:ie});if(!ot.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!ot.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ot.forEach(n,(function(n,i){!0===(!(ot.isUndefined(n)||null===n)&&o.call(e,n,ot.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function le(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function fe(t,e){this._pairs=[],t&&ce(t,this,e)}const he=fe.prototype;function de(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function pe(t,e,n){if(!e)return t;const r=n&&n.encode||de;ot.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(e,n):ot.isURLSearchParams(e)?e.toString():new fe(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}he.append=function(t,e){this._pairs.push([t,e])},he.toString=function(t){const e=t?function(e){return t.call(this,e,le)}:le;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class ge{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ot.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var ye={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},me={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:fe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const we="undefined"!=typeof window&&"undefined"!=typeof document,be="object"==typeof navigator&&navigator||void 0,ve=we&&(!be||["ReactNative","NativeScript","NS"].indexOf(be.product)<0),Ee="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ae=we&&window.location.href||"http://localhost";var Se={...Object.freeze({__proto__:null,hasBrowserEnv:we,hasStandardBrowserEnv:ve,hasStandardBrowserWebWorkerEnv:Ee,navigator:be,origin:Ae}),...me};function Oe(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=t.length;if(i=!i&&ot.isArray(r)?r.length:i,a)return ot.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&ot.isObject(r[i])||(r[i]=[]);return e(t,n,r[i],o)&&ot.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!s}if(ot.isFormData(t)&&ot.isFunction(t.entries)){const n={};return ot.forEachEntry(t,((t,r)=>{e(function(t){return ot.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const Re={transitional:ye,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=ot.isObject(t);o&&ot.isHTMLForm(t)&&(t=new FormData(t));if(ot.isFormData(t))return r?JSON.stringify(Oe(t)):t;if(ot.isArrayBuffer(t)||ot.isBuffer(t)||ot.isStream(t)||ot.isFile(t)||ot.isBlob(t)||ot.isReadableStream(t))return t;if(ot.isArrayBufferView(t))return t.buffer;if(ot.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return ce(t,new Se.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Se.isNode&&ot.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((i=ot.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return ce(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(ot.isString(t))try{return(e||JSON.parse)(t),ot.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Re.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(ot.isResponse(t)||ot.isReadableStream(t))return t;if(t&&ot.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw ne.from(t,ne.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Se.classes.FormData,Blob:Se.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ot.forEach(["delete","get","head","post","put","patch"],(t=>{Re.headers[t]={}}));const _e=ot.toObjectSet(["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"]);const Te=Symbol("internals");function xe(t){return t&&String(t).trim().toLowerCase()}function Ue(t){return!1===t||null==t?t:ot.isArray(t)?t.map(Ue):String(t)}function Pe(t,e,n,r,o){return ot.isFunction(r)?r.call(this,e,n):(o&&(e=n),ot.isString(e)?ot.isString(r)?-1!==e.indexOf(r):ot.isRegExp(r)?r.test(e):void 0:void 0)}let Ce=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=xe(e);if(!o)throw new Error("header name must be a non-empty string");const i=ot.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Ue(t))}const i=(t,e)=>ot.forEach(t,((t,n)=>o(t,n,e)));if(ot.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(ot.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&_e[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(ot.isHeaders(t))for(const[e,r]of t.entries())o(r,e,n);else null!=t&&o(e,t,n);return this}get(t,e){if(t=xe(t)){const n=ot.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(ot.isFunction(e))return e.call(this,t,n);if(ot.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=xe(t)){const n=ot.findKey(this,t);return!(!n||void 0===this[n]||e&&!Pe(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=xe(t)){const o=ot.findKey(n,t);!o||e&&!Pe(0,n[o],o,e)||(delete n[o],r=!0)}}return ot.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!Pe(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return ot.forEach(this,((r,o)=>{const i=ot.findKey(n,o);if(i)return e[i]=Ue(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete e[o],e[s]=Ue(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return ot.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&ot.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Te]=this[Te]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=xe(t);e[r]||(!function(t,e){const n=ot.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return ot.isArray(t)?t.forEach(r):r(t),this}};function Be(t,e){const n=this||Re,r=e||n,o=Ce.from(r.headers);let i=r.data;return ot.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function je(t){return!(!t||!t.__CANCEL__)}function ke(t,e,n){ne.call(this,null==t?"canceled":t,ne.ERR_CANCELED,e,n),this.name="CanceledError"}function Ne(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ne("Request failed with status code "+n.status,[ne.ERR_BAD_REQUEST,ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ot.reduceDescriptors(Ce.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),ot.freezeMethods(Ce),ot.inherits(ke,ne,{__CANCEL__:!0});const Le=(t,e,n=3)=>{let r=0;const o=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),c=r[s];o||(o=u),n[i]=a,r[i]=u;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-o<e)return;const h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}(50,250);return function(t,e){let n,r,o=0,i=1e3/e;const s=(e,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),a=e-o;a>=i?s(t,e):(n=t,r||(r=setTimeout((()=>{r=null,s(n)}),i-a)))},()=>n&&s(n)]}((n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,u=o(a);r=i;t({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0})}),n)},Ie=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},ze=t=>(...e)=>ot.asap((()=>t(...e)));var Fe=Se.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Se.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Se.origin),Se.navigator&&/(msie|trident)/i.test(Se.navigator.userAgent)):()=>!0,Me=Se.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];ot.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),ot.isString(r)&&s.push("path="+r),ot.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function $e(t,e,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(r||0==n)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const De=t=>t instanceof Ce?{...t}:t;function qe(t,e){e=e||{};const n={};function r(t,e,n,r){return ot.isPlainObject(t)&&ot.isPlainObject(e)?ot.merge.call({caseless:r},t,e):ot.isPlainObject(e)?ot.merge({},e):ot.isArray(e)?e.slice():e}function o(t,e,n,o){return ot.isUndefined(e)?ot.isUndefined(t)?void 0:r(void 0,t,0,o):r(t,e,0,o)}function i(t,e){if(!ot.isUndefined(e))return r(void 0,e)}function s(t,e){return ot.isUndefined(e)?ot.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const u={url:i,method:i,data:i,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:a,headers:(t,e,n)=>o(De(t),De(e),0,!0)};return ot.forEach(Object.keys(Object.assign({},t,e)),(function(r){const i=u[r]||o,s=i(t[r],e[r],r);ot.isUndefined(s)&&i!==a||(n[r]=s)})),n}var Ye=t=>{const e=qe({},t);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:u}=e;if(e.headers=a=Ce.from(a),e.url=pe($e(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),ot.isFormData(r))if(Se.hasStandardBrowserEnv||Se.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(n=a.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(Se.hasStandardBrowserEnv&&(o&&ot.isFunction(o)&&(o=o(e)),o||!1!==o&&Fe(e.url))){const t=i&&s&&Me.read(s);t&&a.set(i,t)}return e};var He="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Ye(t);let o=r.data;const i=Ce.from(r.headers).normalize();let s,a,u,c,l,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=r;function p(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function y(){if(!g)return;const r=Ce.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Ne((function(t){e(t),p()}),(function(t){n(t),p()}),{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(n(new ne("Request aborted",ne.ECONNABORTED,t,g)),g=null)},g.onerror=function(){n(new ne("Network Error",ne.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||ye;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new ne(e,o.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,t,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&ot.forEach(i.toJSON(),(function(t,e){g.setRequestHeader(e,t)})),ot.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),f&&"json"!==f&&(g.responseType=r.responseType),d&&([u,l]=Le(d,!0),g.addEventListener("progress",u)),h&&g.upload&&([a,c]=Le(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=e=>{g&&(n(!e||e.type?new ke(null,t,g):e),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const m=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);m&&-1===Se.protocols.indexOf(m)?n(new ne("Unsupported protocol "+m+":",ne.ERR_BAD_REQUEST,t)):g.send(o||null)}))};const We=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const o=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;r.abort(e instanceof ne?e:new ke(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new ne(`timeout ${e} of ms exceeded`,ne.ETIMEDOUT))}),e);const s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=()=>ot.asap(s),a}},Je=function*(t,e){let n=t.byteLength;if(n<e)return void(yield t);let r,o=0;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},Ve=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},Ke=(t,e,n,r)=>{const o=async function*(t,e){for await(const n of Ve(t))yield*Je(n,e)}(t,e);let i,s=0,a=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await o.next();if(e)return a(),void t.close();let i=r.byteLength;if(n){let t=s+=i;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:t=>(a(t),o.return())},{highWaterMark:2})},Xe="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ge=Xe&&"function"==typeof ReadableStream,Ze=Xe&&("function"==typeof TextEncoder?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Qe=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},tn=Ge&&Qe((()=>{let t=!1;const e=new Request(Se.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),en=Ge&&Qe((()=>ot.isReadableStream(new Response("").body))),nn={stream:en&&(t=>t.body)};var rn;Xe&&(rn=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!nn[t]&&(nn[t]=ot.isFunction(rn[t])?e=>e[t]():(e,n)=>{throw new ne(`Response type '${t}' is not supported`,ne.ERR_NOT_SUPPORT,n)})})));const on=async(t,e)=>{const n=ot.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(ot.isBlob(t))return t.size;if(ot.isSpecCompliantForm(t)){const e=new Request(Se.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return ot.isArrayBufferView(t)||ot.isArrayBuffer(t)?t.byteLength:(ot.isURLSearchParams(t)&&(t+=""),ot.isString(t)?(await Ze(t)).byteLength:void 0)})(e):n};var sn=Xe&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:l,withCredentials:f="same-origin",fetchOptions:h}=Ye(t);c=c?(c+"").toLowerCase():"text";let d,p=We([o,i&&i.toAbortSignal()],s);const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let y;try{if(u&&tn&&"get"!==n&&"head"!==n&&0!==(y=await on(l,r))){let t,n=new Request(e,{method:"POST",body:r,duplex:"half"});if(ot.isFormData(r)&&(t=n.headers.get("content-type"))&&l.setContentType(t),n.body){const[t,e]=Ie(y,Le(ze(u)));r=Ke(n.body,65536,t,e)}}ot.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;d=new Request(e,{...h,signal:p,method:n.toUpperCase(),headers:l.normalize().toJSON(),body:r,duplex:"half",credentials:o?f:void 0});let i=await fetch(d);const s=en&&("stream"===c||"response"===c);if(en&&(a||s&&g)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=i[e]}));const e=ot.toFiniteNumber(i.headers.get("content-length")),[n,r]=a&&Ie(e,Le(ze(a),!0))||[];i=new Response(Ke(i.body,65536,n,(()=>{r&&r(),g&&g()})),t)}c=c||"text";let m=await nn[ot.findKey(nn,c)||"text"](i,t);return!s&&g&&g(),await new Promise(((e,n)=>{Ne(e,n,{data:m,headers:Ce.from(i.headers),status:i.status,statusText:i.statusText,config:t,request:d})}))}catch(e){if(g&&g(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new ne("Network Error",ne.ERR_NETWORK,t,d),{cause:e.cause||e});throw ne.from(e,e&&e.code,t,d)}});const an={http:null,xhr:He,fetch:sn};ot.forEach(an,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const un=t=>`- ${t}`,cn=t=>ot.isFunction(t)||null===t||!1===t;var ln=t=>{t=ot.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){let e;if(n=t[i],r=n,!cn(n)&&(r=an[(e=String(n)).toLowerCase()],void 0===r))throw new ne(`Unknown adapter '${e}'`);if(r)break;o[e||"#"+i]=r}if(!r){const t=Object.entries(o).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ne("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(un).join("\n"):" "+un(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function fn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ke(null,t)}function hn(t){fn(t),t.headers=Ce.from(t.headers),t.data=Be.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return ln(t.adapter||Re.adapter)(t).then((function(e){return fn(t),e.data=Be.call(t,t.transformResponse,e),e.headers=Ce.from(e.headers),e}),(function(e){return je(e)||(fn(t),e&&e.response&&(e.response.data=Be.call(t,t.transformResponse,e.response),e.response.headers=Ce.from(e.response.headers))),Promise.reject(e)}))}const dn="1.8.4",pn={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{pn[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const gn={};pn.transitional=function(t,e,n){function r(t,e){return"[Axios v1.8.4] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ne(r(o," has been removed"+(e?" in "+e:"")),ne.ERR_DEPRECATED);return e&&!gn[o]&&(gn[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}},pn.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};var yn={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new ne("option "+i+" must be "+n,ne.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ne("Unknown option "+i,ne.ERR_BAD_OPTION)}},validators:pn};const mn=yn.validators;let wn=class{constructor(t){this.defaults=t,this.interceptors={request:new ge,response:new ge}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=qe(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&yn.assertOptions(n,{silentJSONParsing:mn.transitional(mn.boolean),forcedJSONParsing:mn.transitional(mn.boolean),clarifyTimeoutError:mn.transitional(mn.boolean)},!1),null!=r&&(ot.isFunction(r)?e.paramsSerializer={serialize:r}:yn.assertOptions(r,{encode:mn.function,serialize:mn.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),yn.assertOptions(e,{baseUrl:mn.spelling("baseURL"),withXsrfToken:mn.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&ot.merge(o.common,o[e.method]);o&&ot.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=Ce.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!a){const t=[hn.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,u),l=t.length,c=Promise.resolve(e);f<l;)c=c.then(t[f++],t[f++]);return c}l=s.length;let h=e;for(f=0;f<l;){const t=s[f++],e=s[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{c=hn.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(t){return pe($e((t=qe(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}};ot.forEach(["delete","get","head","options"],(function(t){wn.prototype[t]=function(e,n){return this.request(qe(n||{},{method:t,url:e,data:(n||{}).data}))}})),ot.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(qe(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}wn.prototype[t]=e(),wn.prototype[t+"Form"]=e(!0)}));const bn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bn).forEach((([t,e])=>{bn[e]=t}));const vn=function t(e){const n=new wn(e),r=m(wn.prototype.request,n);return ot.extend(r,wn.prototype,n,{allOwnKeys:!0}),ot.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(qe(e,n))},r}(Re);vn.Axios=wn,vn.CanceledError=ke,vn.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new ke(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t((function(t){e=t})),cancel:e}}},vn.isCancel=je,vn.VERSION=dn,vn.toFormData=ce,vn.AxiosError=ne,vn.Cancel=vn.CanceledError,vn.all=function(t){return Promise.all(t)},vn.spread=function(t){return function(e){return t.apply(null,e)}},vn.isAxiosError=function(t){return ot.isObject(t)&&!0===t.isAxiosError},vn.mergeConfig=qe,vn.AxiosHeaders=Ce,vn.formToJSON=t=>Oe(ot.isHTMLForm(t)?new FormData(t):t),vn.getAdapter=ln,vn.HttpStatusCode=bn,vn.default=vn;const{Axios:En,AxiosError:An,CanceledError:Sn,isCancel:On,CancelToken:Rn,VERSION:_n,all:Tn,Cancel:xn,isAxiosError:Un,spread:Pn,toFormData:Cn,AxiosHeaders:Bn,HttpStatusCode:jn,formToJSON:kn,getAdapter:Nn,mergeConfig:Ln}=vn;function In(t,{strict:e=!0}={}){return!!t&&("string"==typeof t&&(e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")))}function zn(t){return In(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const Fn="2.30.0";let Mn=({docsBaseUrl:t,docsPath:e="",docsSlug:n})=>e?`${t??"https://viem.sh"}${e}${n?`#${n}`:""}`:void 0,$n=`viem@${Fn}`;class Dn extends Error{constructor(t,e={}){const n=e.cause instanceof Dn?e.cause.details:e.cause?.message?e.cause.message:e.details,r=e.cause instanceof Dn&&e.cause.docsPath||e.docsPath,o=Mn?.({...e,docsPath:r});super([t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...n?[`Details: ${n}`]:[],...$n?[`Version: ${$n}`]:[]].join("\n"),e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=r,this.metaMessages=e.metaMessages,this.name=e.name??this.name,this.shortMessage=t,this.version=Fn}walk(t){return qn(this,t)}}function qn(t,e){return e?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?qn(t.cause,e):e?null:t}class Yn extends Dn{constructor({size:t,targetSize:e,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`,{name:"SizeExceedsPaddingSizeError"})}}function Hn(t,{dir:e,size:n=32}={}){return"string"==typeof t?function(t,{dir:e,size:n=32}={}){if(null===n)return t;const r=t.replace("0x","");if(r.length>2*n)throw new Yn({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===e?"padEnd":"padStart"](2*n,"0")}`}(t,{dir:e,size:n}):function(t,{dir:e,size:n=32}={}){if(null===n)return t;if(t.length>n)throw new Yn({size:t.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const i="right"===e;r[i?o:n-o-1]=t[i?o:t.length-o-1]}return r}(t,{dir:e,size:n})}class Wn extends Dn{constructor({max:t,min:e,signed:n,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${e} to ${t})`:`(above ${e})`}`,{name:"IntegerOutOfRangeError"})}}class Jn extends Dn{constructor({givenSize:t,maxSize:e}){super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function Vn(t,{size:e}){if(zn(t)>e)throw new Jn({givenSize:zn(t),maxSize:e})}const Kn=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function Xn(t,e={}){const n=`0x${Number(t)}`;return"number"==typeof e.size?(Vn(n,{size:e.size}),Hn(n,{size:e.size})):n}function Gn(t,e={}){let n="";for(let e=0;e<t.length;e++)n+=Kn[t[e]];const r=`0x${n}`;return"number"==typeof e.size?(Vn(r,{size:e.size}),Hn(r,{dir:"right",size:e.size})):r}function Zn(t,e={}){const{signed:n,size:r}=e,o=BigInt(t);let i;r?i=n?(1n<<8n*BigInt(r)-1n)-1n:2n**(8n*BigInt(r))-1n:"number"==typeof t&&(i=BigInt(Number.MAX_SAFE_INTEGER));const s="bigint"==typeof i&&n?-i-1n:0;if(i&&o>i||o<s){const e="bigint"==typeof t?"n":"";throw new Wn({max:i?`${i}${e}`:void 0,min:`${s}${e}`,signed:n,size:r,value:`${t}${e}`})}const a=`0x${(n&&o<0?(1n<<BigInt(8*r))+BigInt(o):o).toString(16)}`;return r?Hn(a,{size:r}):a}const Qn=new TextEncoder;function tr(t,e={}){return Gn(Qn.encode(t),e)}const er=new TextEncoder;function nr(t,e={}){return"number"==typeof t||"bigint"==typeof t?function(t,e){const n=Zn(t,e);return ir(n)}(t,e):"boolean"==typeof t?function(t,e={}){const n=new Uint8Array(1);if(n[0]=Number(t),"number"==typeof e.size)return Vn(n,{size:e.size}),Hn(n,{size:e.size});return n}(t,e):In(t)?ir(t,e):sr(t,e)}const rr={zero:48,nine:57,A:65,F:70,a:97,f:102};function or(t){return t>=rr.zero&&t<=rr.nine?t-rr.zero:t>=rr.A&&t<=rr.F?t-(rr.A-10):t>=rr.a&&t<=rr.f?t-(rr.a-10):void 0}function ir(t,e={}){let n=t;e.size&&(Vn(n,{size:e.size}),n=Hn(n,{dir:"right",size:e.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,i=new Uint8Array(o);for(let t=0,e=0;t<o;t++){const n=or(r.charCodeAt(e++)),o=or(r.charCodeAt(e++));if(void 0===n||void 0===o)throw new Dn(`Invalid byte sequence ("${r[e-2]}${r[e-1]}" in "${r}").`);i[t]=16*n+o}return i}function sr(t,e={}){const n=er.encode(t);return"number"==typeof e.size?(Vn(n,{size:e.size}),Hn(n,{dir:"right",size:e.size})):n}function ar(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function ur(t,...e){if(!((n=t)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function cr(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}const lr=BigInt(2**32-1),fr=BigInt(32);function hr(t,e=!1){return e?{h:Number(t&lr),l:Number(t>>fr&lr)}:{h:0|Number(t>>fr&lr),l:0|Number(t&lr)}}function dr(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let o=0;o<t.length;o++){const{h:i,l:s}=hr(t[o],e);[n[o],r[o]]=[i,s]}return[n,r]}const pr=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])();function gr(t){for(let n=0;n<t.length;n++)t[n]=(e=t[n])<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;var e}function yr(t){return"string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),ur(t),t}"function"==typeof Uint8Array.from([]).toHex&&Uint8Array.fromHex;class mr{clone(){return this._cloneInto()}}const wr=[],br=[],vr=[],Er=BigInt(0),Ar=BigInt(1),Sr=BigInt(2),Or=BigInt(7),Rr=BigInt(256),_r=BigInt(113);for(let t=0,e=Ar,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],wr.push(2*(5*r+n)),br.push((t+1)*(t+2)/2%64);let o=Er;for(let t=0;t<7;t++)e=(e<<Ar^(e>>Or)*_r)%Rr,e&Sr&&(o^=Ar<<(Ar<<BigInt(t))-Ar);vr.push(o)}const[Tr,xr]=dr(vr,!0),Ur=(t,e,n)=>n>32?((t,e,n)=>e<<n-32|t>>>64-n)(t,e,n):((t,e,n)=>t<<n|e>>>32-n)(t,e,n),Pr=(t,e,n)=>n>32?((t,e,n)=>t<<n-32|e>>>64-n)
|
|
2
|
-
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */(t,e,n):((t,e,n)=>e<<n|t>>>32-n)(t,e,n);class Cr extends mr{constructor(t,e,n,r=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=e,this.outputLen=n,this.enableXOF=r,this.rounds=o,ar(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var i;this.state=new Uint8Array(200),this.state32=(i=this.state,new Uint32Array(i.buffer,i.byteOffset,Math.floor(i.byteLength/4)))}keccak(){pr||gr(this.state32),function(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let e=0;e<10;e++)n[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const r=(e+8)%10,o=(e+2)%10,i=n[o],s=n[o+1],a=Ur(i,s,1)^n[r],u=Pr(i,s,1)^n[r+1];for(let n=0;n<50;n+=10)t[e+n]^=a,t[e+n+1]^=u}let e=t[2],o=t[3];for(let n=0;n<24;n++){const r=br[n],i=Ur(e,o,r),s=Pr(e,o,r),a=wr[n];e=t[a],o=t[a+1],t[a]=i,t[a+1]=s}for(let e=0;e<50;e+=10){for(let r=0;r<10;r++)n[r]=t[e+r];for(let r=0;r<10;r++)t[e+r]^=~n[(r+2)%10]&n[(r+4)%10]}t[0]^=Tr[r],t[1]^=xr[r]}n.fill(0)}(this.state32,this.rounds),pr||gr(this.state32),this.posOut=0,this.pos=0}update(t){cr(this);const{blockLen:e,state:n}=this,r=(t=yr(t)).length;for(let o=0;o<r;){const i=Math.min(e-this.pos,r-o);for(let e=0;e<i;e++)n[this.pos++]^=t[o++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:n,blockLen:r}=this;t[n]^=e,128&e&&n===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){cr(this,!1),ur(t),this.finish();const e=this.state,{blockLen:n}=this;for(let r=0,o=t.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);t.set(e.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ar(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(function(t,e){ur(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return t||(t=new Cr(e,n,r,i,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=r,t.enableXOF=i,t.destroyed=this.destroyed,t}}const Br=((t,e,n)=>function(t){const e=e=>t().update(yr(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}((()=>new Cr(e,t,n))))(1,136,32);function jr(t,e){return function(t,e={}){return"number"==typeof t||"bigint"==typeof t?Zn(t,e):"string"==typeof t?tr(t,e):"boolean"==typeof t?Xn(t,e):Gn(t,e)}(Br(In(t,{strict:!1})?nr(t):t))}function kr(t){if("object"!=typeof t)return(typeof t).toLowerCase();const e=Object.prototype.toString.call(t);return e.slice(8,e.length-1).toLowerCase()}class Nr extends Error{constructor(t,e,n){super(e??t.code),this.type=t,void 0!==n&&(this.stack=n)}getMetadata(){return this.type}toObject(){return{type:this.getMetadata(),message:this.message??"",stack:this.stack??"",className:this.constructor.name}}}function Lr(t,e){return new Nr({code:"ETHEREUMJS_DEFAULT_ERROR_CODE"},t,e)}function Ir(t,e){if(t<56)return Uint8Array.from([t+e]);const n=Dr(t),r=Dr(e+55+n.length/2);return Uint8Array.from(Mr(r+n))}Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));const zr={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Fr(t){return t>=zr._0&&t<=zr._9?t-zr._0:t>=zr._A&&t<=zr._F?t-(zr._A-10):t>=zr._a&&t<=zr._f?t-(zr._a-10):void 0}function Mr(t){if("0x"===t.slice(0,2)&&(t=t.slice(0,2)),"string"!=typeof t)throw Lr("hex string expected, got "+typeof t);const e=t.length,n=e/2;if(e%2)throw Lr("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(n);for(let e=0,o=0;e<n;e++,o+=2){const n=Fr(t.charCodeAt(o)),i=Fr(t.charCodeAt(o+1));if(void 0===n||void 0===i){throw Lr('hex string expected, got non-hex character "'+(t[o]+t[o+1])+'" at index '+o)}r[e]=16*n+i}return r}function $r(...t){if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);for(let e=0,r=0;e<t.length;e++){const o=t[e];n.set(o,r),r+=o.length}return n}function Dr(t){if(t<0)throw Lr("Invalid integer as argument, must be unsigned!");const e=t.toString(16);return e.length%2?`0${e}`:e}function qr(t){return t.length>=2&&"0"===t[0]&&"x"===t[1]}function Yr(t){if(t instanceof Uint8Array)return t;if("string"==typeof t)return qr(t)?Mr((n="string"!=typeof(r=t)?r:qr(r)?r.slice(2):r).length%2?`0${n}`:n):(e=t,(new TextEncoder).encode(e));var e,n,r;if("number"==typeof t||"bigint"==typeof t)return t?Mr(Dr(t)):Uint8Array.from([]);if(null==t)return Uint8Array.from([]);throw Lr("toBytes: received unsupported type "+typeof t)}function Hr(t){if(Array.isArray(t)){const e=[];let n=0;for(let r=0;r<t.length;r++){const o=Hr(t[r]);e.push(o),n+=o.length}return $r(Ir(n,192),...e)}const e=Yr(t);return 1===e.length&&e[0]<128?e:$r(Ir(e.length,128),e)}/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */const{p:Wr,n:Jr,Gx:Vr,Gy:Kr,b:Xr}={p:0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2fn,n:0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n,b:7n,Gx:0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798n,Gy:0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8n},Gr=32,Zr=64,Qr=(t="")=>{throw new Error(t)},to=t=>"bigint"==typeof t,eo=t=>"string"==typeof t,no=(t,e)=>!(t=>t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name)(t)||"number"==typeof e&&e>0&&t.length!==e?Qr("Uint8Array expected"):t,ro=t=>new Uint8Array(t),oo=(t,e)=>t.toString(16).padStart(e,"0"),io=t=>Array.from(no(t)).map((t=>oo(t,2))).join(""),so=48,ao=57,uo=65,co=70,lo=97,fo=102,ho=t=>t>=so&&t<=ao?t-so:t>=uo&&t<=co?t-(uo-10):t>=lo&&t<=fo?t-(lo-10):void 0,po=t=>{const e="hex invalid";if(!eo(t))return Qr(e);const n=t.length,r=n/2;if(n%2)return Qr(e);const o=ro(r);for(let n=0,i=0;n<r;n++,i+=2){const r=ho(t.charCodeAt(i)),s=ho(t.charCodeAt(i+1));if(void 0===r||void 0===s)return Qr(e);o[n]=16*r+s}return o},go=(t,e)=>{return no(eo(t)?po(t):(n=no(t),Uint8Array.from(n)),e);var n},yo=()=>globalThis?.crypto,mo=(...t)=>{const e=ro(t.reduce(((t,e)=>t+no(e).length),0));let n=0;return t.forEach((t=>{e.set(t,n),n+=t.length})),e},wo=(t=Gr)=>yo().getRandomValues(ro(t)),bo=BigInt,vo=(t,e,n,r="bad number: out of range")=>to(t)&&e<=t&&t<n?t:Qr(r),Eo=(t,e=Wr)=>{const n=t%e;return n>=0n?n:e+n},Ao=t=>Eo(t,Jr),So=(t,e)=>{(0n===t||e<=0n)&&Qr("no inverse n="+t+" mod="+e);let n=Eo(t,e),r=e,o=0n,i=1n;for(;0n!==n;){const t=r%n,e=o-i*(r/n);r=n,n=t,o=i,i=e}return 1n===r?Eo(o,e):Qr("no inverse")},Oo=t=>t instanceof Bo?t:Qr("Point expected"),Ro=t=>Eo(Eo(t*t)*t+Xr),_o=t=>vo(t,0n,Wr),To=t=>vo(t,1n,Wr),xo=t=>vo(t,1n,Jr),Uo=t=>0n===(1n&t),Po=t=>Uint8Array.of(t),Co=t=>Po(Uo(t)?2:3);class Bo{static BASE;static ZERO;px;py;pz;constructor(t,e,n){this.px=_o(t),this.py=To(e),this.pz=_o(n),Object.freeze(this)}static fromBytes(t){let e;no(t);const n=t[0],r=t.subarray(1),o=Lo(r,0,Gr),i=t.length;if(33===i&&[2,3].includes(n)){let t=(t=>{const e=Ro(To(t));let n=1n;for(let t=e,r=(Wr+1n)/4n;r>0n;r>>=1n)1n&r&&(n=n*t%Wr),t=t*t%Wr;return Eo(n*n)===e?n:Qr("sqrt invalid")})(o);const r=Uo(t);Uo(bo(n))!==r&&(t=Eo(-t)),e=new Bo(o,t,1n)}return 65===i&&4===n&&(e=new Bo(o,Lo(r,Gr,Zr),1n)),e?e.assertValidity():Qr("bad point: not on curve")}equals(t){const{px:e,py:n,pz:r}=this,{px:o,py:i,pz:s}=Oo(t),a=Eo(e*s),u=Eo(o*r),c=Eo(n*s),l=Eo(i*r);return a===u&&c===l}is0(){return this.equals(ko)}negate(){return new Bo(this.px,Eo(-this.py),this.pz)}double(){return this.add(this)}add(t){const{px:e,py:n,pz:r}=this,{px:o,py:i,pz:s}=Oo(t);let a=0n,u=0n,c=0n;const l=Eo(3n*Xr);let f=Eo(e*o),h=Eo(n*i),d=Eo(r*s),p=Eo(e+n),g=Eo(o+i);p=Eo(p*g),g=Eo(f+h),p=Eo(p-g),g=Eo(e+r);let y=Eo(o+s);return g=Eo(g*y),y=Eo(f+d),g=Eo(g-y),y=Eo(n+r),a=Eo(i+s),y=Eo(y*a),a=Eo(h+d),y=Eo(y-a),c=Eo(0n*g),a=Eo(l*d),c=Eo(a+c),a=Eo(h-c),c=Eo(h+c),u=Eo(a*c),h=Eo(f+f),h=Eo(h+f),d=Eo(0n*d),g=Eo(l*g),h=Eo(h+d),d=Eo(f-d),d=Eo(0n*d),g=Eo(g+d),f=Eo(h*g),u=Eo(u+f),f=Eo(y*g),a=Eo(p*a),a=Eo(a-f),f=Eo(p*h),c=Eo(y*c),c=Eo(c+f),new Bo(a,u,c)}multiply(t,e=!0){if(!e&&0n===t)return ko;if(xo(t),1n===t)return this;if(this.equals(jo))return Go(t).p;let n=ko,r=jo;for(let o=this;t>0n;o=o.double(),t>>=1n)1n&t?n=n.add(o):e&&(r=r.add(o));return n}toAffine(){const{px:t,py:e,pz:n}=this;if(this.equals(ko))return{x:0n,y:0n};if(1n===n)return{x:t,y:e};const r=So(n,Wr);return 1n!==Eo(n*r)&&Qr("inverse invalid"),{x:Eo(t*r),y:Eo(e*r)}}assertValidity(){const{x:t,y:e}=this.toAffine();return To(t),To(e),Eo(e*e)===Ro(t)?this:Qr("bad point: not on curve")}toBytes(t=!0){const{x:e,y:n}=this.assertValidity().toAffine(),r=zo(e);return t?mo(Co(n),r):mo(Po(4),r,zo(n))}static fromAffine(t){const{x:e,y:n}=t;return 0n===e&&0n===n?ko:new Bo(e,n,1n)}toHex(t){return io(this.toBytes(t))}static fromPrivateKey(t){return jo.multiply(Fo(t))}static fromHex(t){return Bo.fromBytes(go(t))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}toRawBytes(t){return this.toBytes(t)}}const jo=new Bo(Vr,Kr,1n),ko=new Bo(0n,1n,0n);Bo.BASE=jo,Bo.ZERO=ko;const No=t=>bo("0x"+(io(t)||"0")),Lo=(t,e,n)=>No(t.subarray(e,n)),Io=2n**256n,zo=t=>po(oo(vo(t,0n,Io),Zr)),Fo=t=>{const e=to(t)?t:No(go(t,Gr));return vo(e,1n,Jr,"private key invalid 3")},Mo=t=>t>Jr>>1n;class $o{r;s;recovery;constructor(t,e,n){this.r=xo(t),this.s=xo(e),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(t){no(t,Zr);const e=Lo(t,0,Gr),n=Lo(t,Gr,Zr);return new $o(e,n)}toBytes(){const{r:t,s:e}=this;return mo(zo(t),zo(e))}addRecoveryBit(t){return new $o(this.r,this.s,t)}hasHighS(){return Mo(this.s)}toCompactRawBytes(){return this.toBytes()}toCompactHex(){return io(this.toBytes())}recoverPublicKey(t){return Wo(this,t)}static fromCompact(t){return $o.fromBytes(go(t,Zr))}assertValidity(){return this}normalizeS(){const{r:t,s:e,recovery:n}=this;return Mo(e)?new $o(t,Ao(-e),n):this}}const Do=t=>{const e=8*t.length-256;e>1024&&Qr("msg invalid");const n=No(t);return e>0?n>>bo(e):n},qo=t=>Ao(Do(no(t))),Yo={lowS:!0},Ho=async(t,e,n=Yo)=>{const{seed:r,k2sig:o}=((t,e,n=Yo)=>{["der","recovered","canonical"].some((t=>t in n))&&Qr("option not supported");let{lowS:r,extraEntropy:o}=n;null==r&&(r=!0);const i=zo,s=qo(go(t)),a=i(s),u=Fo(e),c=[i(u),a];o&&c.push(!0===o?wo(Gr):go(o));const l=s;return{seed:mo(...c),k2sig:t=>{const e=Do(t);if(!(1n<=e&&e<Jr))return;const n=jo.multiply(e).toAffine(),o=Ao(n.x);if(0n===o)return;const i=So(e,Jr),s=Ao(i*Ao(l+Ao(u*o)));if(0n===s)return;let a=s,c=(n.x===o?0:2)|Number(1n&n.y);return r&&Mo(s)&&(a=Ao(-s),c^=1),new $o(o,a,c)}}})(t,e,n),i=await(()=>{let t=ro(Gr),e=ro(Gr),n=0;const r=ro(0),o=()=>{t.fill(1),e.fill(0),n=0};{const i=(...n)=>Jo.hmacSha256Async(e,t,...n),s=async(n=r)=>{e=await i(Po(0),n),t=await i(),0!==n.length&&(e=await i(Po(1),n),t=await i())},a=async()=>(n++>=1e3&&Qr("drbg: tried 1000 values"),t=await i(),t);return async(t,e)=>{let n;for(o(),await s(t);!(n=e(await a()));)await s();return o(),n}}})()(r,o);return i},Wo=(t,e)=>{const{r:n,s:r,recovery:o}=t;[0,1,2,3].includes(o)||Qr("recovery id invalid");const i=qo(go(e,Gr)),s=2===o||3===o?n+Jr:n;To(s);const a=Co(bo(o)),u=mo(a,zo(s)),c=Bo.fromBytes(u),l=So(s,Jr);return((t,e,n)=>jo.multiply(e,!1).add(t.multiply(n,!1)).assertValidity())(c,Ao(-i*l),Ao(r*l))},Jo={hexToBytes:po,bytesToHex:io,concatBytes:mo,bytesToNumberBE:No,numberToBytesBE:zo,mod:Eo,invert:So,hmacSha256Async:async(t,...e)=>{const n=yo()?.subtle??Qr("crypto.subtle must be defined"),r="HMAC",o=await n.importKey("raw",t,{name:r,hash:{name:"SHA-256"}},!1,["sign"]);return ro(await n.sign(r,o,mo(...e)))},hmacSha256Sync:void 0,hashToPrivateKey:t=>{((t=go(t)).length<40||t.length>1024)&&Qr("expected 40-1024b");const e=Eo(No(t),Jr-1n);return zo(e+1n)},randomBytes:wo},Vo=Math.ceil(32)+1;let Ko;const Xo=(t,e)=>{const n=e.negate();return t?n:e},Go=t=>{const e=Ko||(Ko=(()=>{const t=[];let e=jo,n=e;for(let r=0;r<Vo;r++){n=e,t.push(n);for(let r=1;r<128;r++)n=n.add(e),t.push(n);e=n.double()}return t})());let n=ko,r=jo;const o=bo(255),i=bo(8);for(let s=0;s<Vo;s++){let a=Number(t&o);t>>=i,a>128&&(a-=256,t+=1n);const u=128*s,c=u,l=u+Math.abs(a)-1,f=s%2!=0,h=a<0;0===a?r=r.add(Xo(f,e[c])):n=n.add(Xo(h,e[l]))}return{p:n,f:r}};function Zo(t){if("array"===kr(t)){return Hr(t.map((t=>"string"===kr(t)?/^0x[0-9a-fA-F]+$/.test(t)?ir(t):isNaN(+t)?(new TextEncoder).encode(t):"0"===t?new Uint8Array([]):ir(Zn(+t)):"number"===kr(t)||"bigint"===kr(t)?0===t||t===BigInt(0)?new Uint8Array([]):ir(Zn(t)):"boolean"===kr(t)?t?Uint8Array.from([1]):new Uint8Array([]):t)))}return"boolean"===kr(t)?Hr(t?Uint8Array.from([1]):new Uint8Array([])):Hr(t)}class Qo{constructor(){this.promiseWrapper=new Promise(((t,e)=>{this._resolve=t,this._reject=e})),this._restScope=["success","failure","error","login","timeout"];for(let t=0;t<this._restScope.length;t++){const e=this._restScope[t];e&&(this.promiseWrapper[e]=t=>{"function"==typeof t&&(this[`_${e}`]=t);const n=this.promiseWrapper;delete n[e];const r=this._restScope.slice();return r.splice(r.indexOf(e),1),r.every((t=>!!t&&!n[t]))&&delete n.rest,n})}this.promiseWrapper.rest=(t,e)=>{"function"==typeof t&&(this._rest=t);const n=this.promiseWrapper;if(delete n.rest,this._restScope=e||this._restScope,0===this._restScope.length)console.warn('[1Money client]: The ".rest(cb, scope)" scope is empty and will never be triggered!');else{let t=0;this._restScope.forEach((e=>{e&&(n[e]?delete n[e]:t++)})),t===this._restScope.length&&console.warn(`[1Money client]: The "${this._restScope.join(", ")}" had been called and the "rest" will never be triggered!`)}return n}}}const{request:ti,setting:ei,axios:ni}=new class{constructor(t){this._config=t||{},this.axios=vn,this.parseError=this.parseError.bind(this),this.setting=this.setting.bind(this),this.request=this.request.bind(this)}parseError(t){var e,n,r,o,i,s,a,u,c;"string"==typeof t&&(t=new Error(t)),(!t||"object"!==kr(t)&&"error"!==kr(t))&&(t=new Error("Unknown error occurred"));const l=null!==(e=null==t?void 0:t.name)&&void 0!==e?e:"Error",f=null!==(o=null!==(n=null==t?void 0:t.message)&&void 0!==n?n:null===(r=null==t?void 0:t.toString)||void 0===r?void 0:r.call(t))&&void 0!==o?o:"Unknown error",h=null!==(i=null==t?void 0:t.stack)&&void 0!==i?i:"",d=null!==(a=null===(s=null==t?void 0:t.response)||void 0===s?void 0:s.status)&&void 0!==a?a:500,p=null!==(c=null===(u=null==t?void 0:t.response)||void 0===u?void 0:u.data)&&void 0!==c?c:void 0;return"number"!=typeof d||d<100||d>599?{name:"InvalidStatusError",message:"Invalid HTTP status code",stack:h,status:500,data:p}:{name:l,message:f,stack:h,status:d,data:p}}setting(t){if(!t)return console.warn("[1Money client]: setting method required correct parameters!");this._config=Object.assign(Object.assign({},this._config),t)}request(t){t.withCredentials="boolean"!=typeof t.withCredentials||t.withCredentials,t.headers=t.headers||{},t.headers.Accept=t.headers.Accept||"*/*",t.headers["X-Requested-With"]=t.headers["X-Requested-With"]||"XMLHttpRequest",t.headers["X-Content-Type-Options"]=t.headers["X-Content-Type-Options"]||"nosniff";const{onSuccess:n,onFailure:r,onLogin:o,onError:i,onTimeout:s,isSuccess:a,isLogin:u,timeout:c}=this._config,{onSuccess:l,onFailure:f,onLogin:h,onError:d,onTimeout:p,isSuccess:g,isLogin:y,timeout:m}=t,w={success:null!=g?g:a,login:null!=y?y:u},b=new Qo;return Promise.resolve().then((()=>{var a,u,g,y,v,E,A,S,O,R,_,T,x,U,P,C,B,j,k,N;const L={success:null!==(y=null!==(g=null!==(u=null!==(a=b._success)&&void 0!==a?a:~b._restScope.indexOf("success")?b._rest:void 0)&&void 0!==u?u:l)&&void 0!==g?g:n)&&void 0!==y?y:(t,e)=>t,failure:null!==(S=null!==(A=null!==(E=null!==(v=b._failure)&&void 0!==v?v:~b._restScope.indexOf("failure")?b._rest:void 0)&&void 0!==E?E:f)&&void 0!==A?A:r)&&void 0!==S?S:(t,e)=>t,error:null!==(T=null!==(_=null!==(R=null!==(O=b._error)&&void 0!==O?O:~b._restScope.indexOf("error")?b._rest:void 0)&&void 0!==R?R:d)&&void 0!==_?_:i)&&void 0!==T?T:(t,e)=>t,login:null!==(C=null!==(P=null!==(U=null!==(x=b._login)&&void 0!==x?x:~b._restScope.indexOf("login")?b._rest:void 0)&&void 0!==U?U:h)&&void 0!==P?P:o)&&void 0!==C?C:(t,e)=>t,timeout:null!==(N=null!==(k=null!==(j=null!==(B=b._timeout)&&void 0!==B?B:~b._restScope.indexOf("timeout")?b._rest:void 0)&&void 0!==j?j:p)&&void 0!==k?k:s)&&void 0!==N?N:(t,e)=>t},I=(b._success||b._rest&&b._restScope.indexOf("success"),b._failure||b._rest&&b._restScope.indexOf("failure"),b._login||b._rest&&b._restScope.indexOf("login"),!!(b._error||b._rest&&~b._restScope.indexOf("error")||d||i)),z=!!(b._timeout||b._rest&&~b._restScope.indexOf("timeout")||p||s),F=!!(b._success||b._rest&&~b._restScope.indexOf("success")),M=!!(b._failure||b._rest&&~b._restScope.indexOf("failure")),$=!!(b._login||b._rest&&~b._restScope.indexOf("login")),D=!!(b._error||b._rest&&~b._restScope.indexOf("error")),q=!!(b._timeout||b._rest&&~b._restScope.indexOf("timeout")),Y=(t,n)=>e(this,void 0,void 0,(function*(){try{let e=this.parseError(t);const r=yield Promise.resolve(L.error(e,n));D&&(e=r),I?b._resolve(e):b._reject(e)}catch(t){b._reject(this.parseError(t))}}));let H=null,W=!1;const J=null!=m?m:c,V=()=>{null!==H&&(clearTimeout(H),H=null)};J&&(H=setTimeout((()=>e(this,void 0,void 0,(function*(){var e,n;try{W=!0,V();let n=this.parseError("timeout");const r=yield Promise.resolve(L.timeout(n,null!==(e=t.headers)&&void 0!==e?e:{}));q&&(n=r),z?b._resolve(n):b._reject(n)}catch(e){Y(e,null!==(n=t.headers)&&void 0!==n?n:{})}}))),J)),this.axios(t).then((t=>e(this,void 0,void 0,(function*(){var e,n;if(W)return;V();const{status:r,data:o,headers:i}=t;try{const t=null===(e=w.success)||void 0===e?void 0:e.call(w,o,r,i),s=null===(n=w.login)||void 0===n?void 0:n.call(w,o,r,i);let a=o;if(s){const t=yield Promise.resolve(L.login(o,i));$&&(a=t)}else if(t){const t=yield Promise.resolve(L.success(o,i));F&&(a=t)}else{const t=yield Promise.resolve(L.failure(o,i));M&&(a=t)}b._resolve(a)}catch(t){Y(t,i)}})))).catch((t=>e(this,void 0,void 0,(function*(){var e,n,r,o,i,s,a,u,c,l,f,h,d,p,g,y,m,v;if(W)return;V(),console.error(`[1Money client]: Error(${null!==(e=t.status)&&void 0!==e?e:500}, ${null!==(n=t.code)&&void 0!==n?n:"UNKNOWN"}), Message: ${t.message}, Config: ${null===(r=t.config)||void 0===r?void 0:r.method}, ${null!==(i=null===(o=t.config)||void 0===o?void 0:o.baseURL)&&void 0!==i?i:""}${null!==(a=null===(s=t.config)||void 0===s?void 0:s.url)&&void 0!==a?a:""}, ${JSON.stringify(null!==(c=null===(u=t.config)||void 0===u?void 0:u.headers)&&void 0!==c?c:{})}, Request: ${JSON.stringify(null!==(f=null===(l=t.config)||void 0===l?void 0:l.data)&&void 0!==f?f:{})};`);const E=null!==(d=null===(h=t.response)||void 0===h?void 0:h.status)&&void 0!==d?d:500,A=null!==(g=null===(p=t.response)||void 0===p?void 0:p.data)&&void 0!==g?g:{},S=null!==(m=null===(y=t.response)||void 0===y?void 0:y.headers)&&void 0!==m?m:{};try{let e=A;(null===(v=w.login)||void 0===v?void 0:v.call(w,A,E,S))?(e=yield Promise.resolve(L.login(e,S)),b._resolve(e)):Y(t,S)}catch(t){Y(t,S)}}))))})),b.promiseWrapper}}({isSuccess:(t,e)=>200===e&&0==t.code,isLogin:(t,e)=>401===e||401==t.code,timeout:1e4});function ri(t,e){return ti(Object.assign(Object.assign({},e),{method:"get",url:t}))}function oi(t,e,n){return ti(Object.assign(Object.assign({},n),{method:"post",url:t,data:e,headers:Object.assign({"Content-Type":"application/json"},null==n?void 0:n.headers)}))}function ii(t){const{baseURL:e}=t,n=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["baseURL"]);ni.defaults.baseURL=e||("undefined"!=typeof window?location.origin:void 0),ei(n)}var si={get:ri,post:oi,postForm:function(t,e,n){return ti(Object.assign(Object.assign({},n),{method:"post",url:t,data:e,headers:Object.assign({"Content-Type":"multipart/form-data"},null==n?void 0:n.headers)}))},del:function(t,e,n){return ti(Object.assign(Object.assign({},n),{method:"delete",url:t,data:e,headers:Object.assign({"Content-Type":"application/json"},null==n?void 0:n.headers)}))},put:function(t,e,n){return ti(Object.assign(Object.assign({},n),{method:"put",url:t,data:e,headers:Object.assign({"Content-Type":"application/json"},null==n?void 0:n.headers)}))},patch:function(t,e,n){return ti(Object.assign(Object.assign({},n),{method:"patch",url:t,data:e,headers:Object.assign({"Content-Type":"application/json"},null==n?void 0:n.headers)}))},setInitConfig:ii,axiosStatic:ni};const ai="https://api.1money.network",ui="v1",ci=`/${ui}/accounts`,li={getNonce:t=>ri(`${ci}/nonce?address=${t}`,{withCredentials:!1}),getTokenAccount:(t,e)=>ri(`${ci}/token_account?address=${t}&token=${e}`,{withCredentials:!1})},fi=`/${ui}/checkpoints`,hi={getNumber:()=>ri(`${fi}/number`,{withCredentials:!1}),getByHash:(t,e=!1)=>ri(`${fi}/by_hash?hash=${t}&full=${e}`,{withCredentials:!1}),getByNumber:(t,e=!1)=>ri(`${fi}/by_number?number=${t}&full=${e}`,{withCredentials:!1})},di=`/${ui}/tokens`,pi={getTokenMetadata:t=>ri(`${di}/token_metadata?token=${t}`,{withCredentials:!1}),manageBlacklist:t=>oi(`${di}/manage_blacklist`,t,{withCredentials:!1}),manageWhitelist:t=>oi(`${di}/manage_whitelist`,t,{withCredentials:!1}),burnToken:t=>oi(`${di}/burn`,t,{withCredentials:!1}),grantAuthority:t=>oi(`${di}/grant_authority`,t,{withCredentials:!1}),issueToken:t=>oi(`${di}/issue`,t,{withCredentials:!1}),mintToken:t=>oi(`${di}/mint`,t,{withCredentials:!1}),pauseToken:t=>oi(`${di}/pause`,t,{withCredentials:!1}),updateMetadata:t=>oi(`${di}/update_metadata`,t,{withCredentials:!1})},gi=`/${ui}/transactions`,yi={getByHash:t=>ri(`${gi}/by_hash?hash=${t}`,{withCredentials:!1}),getReceiptByHash:t=>ri(`${gi}/receipt/by_hash?hash=${t}`,{withCredentials:!1}),estimateFee:(t,e,n)=>{let r=`${gi}/estimate_fee?from=${t}&value=${e}`;return n&&(r+=`&token=${n}`),ri(r,{withCredentials:!1})},payment:t=>oi(`${gi}/payment`,t,{withCredentials:!1})},mi=`/${ui}/chains`,wi={getChainId:()=>ri(`${mi}/chain_id`,{withCredentials:!1})};var bi,vi,Ei,Ai;function Si(t){const e=(null==t?void 0:t.network)||"mainnet";let n=ai;switch(e){case"mainnet":n=ai;break;case"testnet":n="https://api.testnet.1money.network";break;case"local":n="http://localhost:18555"}return ii({baseURL:n,isSuccess:(t,e)=>200===e,timeout:(null==t?void 0:t.timeout)||1e4}),{accounts:li,checkpoints:hi,tokens:pi,transactions:yi,chain:wi}}!function(t){t.MasterMint="MasterMint",t.MintBurnTokens="MintBurnTokens",t.Pause="Pause",t.ManageList="ManageList",t.UpdateMetadata="UpdateMetadata"}(bi||(bi={})),function(t){t.Grant="Grant",t.Revoke="Revoke"}(vi||(vi={})),function(t){t.Add="Add",t.Remove="Remove"}(Ei||(Ei={})),function(t){t.Pause="Pause",t.Unpause="Unpause"}(Ai||(Ai={}));var Oi={api:Si,client:si};t._typeof=kr,t.api=Si,t.calcTxHash=function(t,e){const n=Zo(t),r=Hr("boolean"==typeof e.v?e.v?Uint8Array.from([1]):new Uint8Array([]):BigInt(e.v)),o=Hr(ir(e.r)),i=Hr(ir(e.s)),s=new Uint8Array(r.length+o.length+i.length);s.set(r,0),s.set(o,r.length),s.set(i,r.length+o.length);const a=function(t){if(t<56)return Uint8Array.from([192+t]);{const e=[];let n=t;for(;n>0;)e.unshift(255&n),n>>=8;return Uint8Array.from([247+e.length,...e])}}(n.length+s.length),u=new Uint8Array(a.length+n.length+s.length);return u.set(a,0),u.set(n,a.length),u.set(s,a.length+n.length),jr(u)},t.client=si,t.default=Oi,t.deriveTokenAddress=function(t,e){const n=t.startsWith("0x")?ir(t):sr(t),r=e.startsWith("0x")?ir(e):sr(e),o=new Uint8Array(n.length+r.length);return o.set(n,0),o.set(r,n.length),Gn(ir(jr(o)).slice(12))},t.encodePayload=Zo,t.safePromiseAll=function(t){return t&&t.length?Promise.all(t):Promise.resolve([])},t.safePromiseLine=function(t){return e(this,void 0,void 0,(function*(){if(!t||!t.length)return[];const e=[];for(let n=0;n<t.length;n++)try{e.push(yield t[n](n))}catch(t){}return e}))},t.signMessage=function(t,n){return e(this,void 0,void 0,(function*(){const e=ir(jr(Zo(t))),r=ir(n),o=yield Ho(e,r,{lowS:!0}),i=o.toCompactRawBytes(),s=i.subarray(0,32),a=i.subarray(32,64);return{r:Gn(s),s:Gn(a),v:o.recovery}}))},t.toHex=function(t){const e=kr(t);try{switch(e){case"boolean":return Xn(t);case"number":case"bigint":return Zn(t);case"string":return isNaN(+t)?tr(t):Zn(+t);case"uint8array":case"uint16array":case"uint32array":case"int8array":case"int16array":case"int32array":case"arraybuffer":return Gn(t);case"array":return 0===t.length?"0x":t.every((t=>"number"==typeof t))?Gn(Uint8Array.from(t)):Gn(sr(JSON.stringify(t)));default:return Gn(sr(JSON.stringify(t)))}}catch(t){return console.error("[1Money toHex]: ",t),"0x"}},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).$1money={})}(this,(function(t){"use strict";function e(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;var n="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}var i=r,s=o;function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}"function"==typeof n.setTimeout&&(i=setTimeout),"function"==typeof n.clearTimeout&&(s=clearTimeout);var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=a(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(s===clearTimeout)return clearTimeout(t);if((s===o||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(t);try{return s(t)}catch(e){try{return s.call(null,t)}catch(e){return s.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}p.prototype.run=function(){this.fun.apply(null,this.array)};var g=n.performance||{};g.now||g.mozNow||g.msNow||g.oNow||g.webkitNow;var y={nextTick:function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||a(d)}};function m(t,e){return function(){return t.apply(e,arguments)}}const{toString:w}=Object.prototype,{getPrototypeOf:b}=Object,{iterator:v,toStringTag:E}=Symbol,A=(O=Object.create(null),t=>{const e=w.call(t);return O[e]||(O[e]=e.slice(8,-1).toLowerCase())});var O;const S=t=>(t=t.toLowerCase(),e=>A(e)===t),R=t=>e=>typeof e===t,{isArray:_}=Array,T=R("undefined");function x(t){return null!==t&&!T(t)&&null!==t.constructor&&!T(t.constructor)&&C(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const U=S("ArrayBuffer");const P=R("string"),C=R("function"),B=R("number"),j=t=>null!==t&&"object"==typeof t,k=t=>{if("object"!==A(t))return!1;const e=b(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||E in t||v in t)},L=S("Date"),N=S("File"),I=S("Blob"),z=S("FileList"),F=S("URLSearchParams"),[M,$,D,q]=["ReadableStream","Request","Response","Headers"].map(S);function H(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,o;if("object"!=typeof t&&(t=[t]),_(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(x(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let s;for(r=0;r<i;r++)s=o[r],e.call(null,t[s],s,t)}}function Y(t,e){if(x(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r,o=n.length;for(;o-- >0;)if(r=n[o],e===r.toLowerCase())return r;return null}const W="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n,J=t=>!T(t)&&t!==W;const V=(K="undefined"!=typeof Uint8Array&&b(Uint8Array),t=>K&&t instanceof K);var K;const X=S("HTMLFormElement"),G=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Z=S("RegExp"),Q=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};H(n,((n,o)=>{let i;!1!==(i=e(n,o,t))&&(r[o]=i||n)})),Object.defineProperties(t,r)};const tt=S("AsyncFunction"),et=(nt="function"==typeof setImmediate,rt=C(W.postMessage),nt?setImmediate:rt?(ot=`axios@${Math.random()}`,it=[],W.addEventListener("message",(({source:t,data:e})=>{t===W&&e===ot&&it.length&&it.shift()()}),!1),t=>{it.push(t),W.postMessage(ot,"*")}):t=>setTimeout(t));var nt,rt,ot,it;const st="undefined"!=typeof queueMicrotask?queueMicrotask.bind(W):y.nextTick||et;var at={isArray:_,isArrayBuffer:U,isBuffer:x,isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||C(t.append)&&("formdata"===(e=A(t))||"object"===e&&C(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&U(t.buffer),e},isString:P,isNumber:B,isBoolean:t=>!0===t||!1===t,isObject:j,isPlainObject:k,isEmptyObject:t=>{if(!j(t)||x(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(t){return!1}},isReadableStream:M,isRequest:$,isResponse:D,isHeaders:q,isUndefined:T,isDate:L,isFile:N,isBlob:I,isRegExp:Z,isFunction:C,isStream:t=>j(t)&&C(t.pipe),isURLSearchParams:F,isTypedArray:V,isFileList:z,forEach:H,merge:function t(){const{caseless:e,skipUndefined:n}=J(this)&&this||{},r={},o=(o,i)=>{const s=e&&Y(r,i)||i;k(r[s])&&k(o)?r[s]=t(r[s],o):k(o)?r[s]=t({},o):_(o)?r[s]=o.slice():n&&T(o)||(r[s]=o)};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&H(arguments[t],o);return r},extend:(t,e,n,{allOwnKeys:r}={})=>(H(e,((e,r)=>{n&&C(e)?t[r]=m(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let o,i,s;const a={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],r&&!r(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&b(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:A,kindOfTest:S,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(_(t))return t;let e=t.length;if(!B(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[v]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:X,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:Q,freezeMethods:t=>{Q(t,((e,n)=>{if(C(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];C(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return _(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:Y,global:W,isContextDefined:J,isSpecCompliantForm:function(t){return!!(t&&C(t.append)&&"FormData"===t[E]&&t[v])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(j(t)){if(e.indexOf(t)>=0)return;if(x(t))return t;if(!("toJSON"in t)){e[r]=t;const o=_(t)?[]:{};return H(t,((t,e)=>{const i=n(t,r+1);!T(i)&&(o[e]=i)})),e[r]=void 0,o}}return t};return n(t,0)},isAsyncFn:tt,isThenable:t=>t&&(j(t)||C(t))&&C(t.then)&&C(t.catch),setImmediate:et,asap:st,isIterable:t=>null!=t&&C(t[v])},ut=[],ct=[],lt="undefined"!=typeof Uint8Array?Uint8Array:Array,ft=!1;function ht(){ft=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)ut[e]=t[e],ct[t.charCodeAt(e)]=e;ct["-".charCodeAt(0)]=62,ct["_".charCodeAt(0)]=63}function dt(t,e,n){for(var r,o,i=[],s=e;s<n;s+=3)r=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(ut[(o=r)>>18&63]+ut[o>>12&63]+ut[o>>6&63]+ut[63&o]);return i.join("")}function pt(t){var e;ft||ht();for(var n=t.length,r=n%3,o="",i=[],s=16383,a=0,u=n-r;a<u;a+=s)i.push(dt(t,a,a+s>u?u:a+s));return 1===r?(e=t[n-1],o+=ut[e>>2],o+=ut[e<<4&63],o+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],o+=ut[e>>10],o+=ut[e>>4&63],o+=ut[e<<2&63],o+="="),i.push(o),i.join("")}function gt(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?o-1:0,h=n?-1:1,d=t[e+f];for(f+=h,i=d&(1<<-l)-1,d>>=-l,l+=a;l>0;i=256*i+t[e+f],f+=h,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=c}return(d?-1:1)*s*Math.pow(2,i-r)}function yt(t,e,n,r,o,i){var s,a,u,c=8*i-o-1,l=(1<<c)-1,f=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,o),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[n+d]=255&a,d+=p,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;t[n+d]=255&s,d+=p,s/=256,c-=8);t[n+d-p]|=128*g}var mt={}.toString,wt=Array.isArray||function(t){return"[object Array]"==mt.call(t)};function bt(){return Et.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function vt(t,e){if(bt()<e)throw new RangeError("Invalid typed array length");return Et.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Et.prototype:(null===t&&(t=new Et(e)),t.length=e),t}function Et(t,e,n){if(!(Et.TYPED_ARRAY_SUPPORT||this instanceof Et))return new Et(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return St(this,t)}return At(this,t,e,n)}function At(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);Et.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Et.prototype:t=Rt(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!Et.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|xt(e,n);t=vt(t,r);var o=t.write(e,n);o!==r&&(t=t.slice(0,o));return t}(t,e,n):function(t,e){if(Tt(e)){var n=0|_t(e.length);return 0===(t=vt(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?vt(t,0):Rt(t,e);if("Buffer"===e.type&&wt(e.data))return Rt(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Ot(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function St(t,e){if(Ot(e),t=vt(t,e<0?0:0|_t(e)),!Et.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function Rt(t,e){var n=e.length<0?0:0|_t(e.length);t=vt(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function _t(t){if(t>=bt())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+bt().toString(16)+" bytes");return 0|t}function Tt(t){return!(null==t||!t._isBuffer)}function xt(t,e){if(Tt(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return ee(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return ne(t).length;default:if(r)return ee(t).length;e=(""+e).toLowerCase(),r=!0}}function Ut(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Ht(this,e,n);case"utf8":case"utf-8":return Mt(this,e,n);case"ascii":return Dt(this,e,n);case"latin1":case"binary":return qt(this,e,n);case"base64":return Ft(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Yt(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function Pt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Ct(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=Et.from(e,r)),Tt(e))return 0===e.length?-1:Bt(t,e,n,r,o);if("number"==typeof e)return e&=255,Et.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Bt(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function Bt(t,e,n,r,o){var i,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var l=-1;for(i=n;i<a;i++)if(c(t,i)===c(e,-1===l?0:i-l)){if(-1===l&&(l=i),i-l+1===u)return l*s}else-1!==l&&(i-=i-l),l=-1}else for(n+u>a&&(n=a-u),i=n;i>=0;i--){for(var f=!0,h=0;h<u;h++)if(c(t,i+h)!==c(e,h)){f=!1;break}if(f)return i}return-1}function jt(t,e,n,r){n=Number(n)||0;var o=t.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function kt(t,e,n,r){return re(ee(e,t.length-n),t,n,r)}function Lt(t,e,n,r){return re(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function Nt(t,e,n,r){return Lt(t,e,n,r)}function It(t,e,n,r){return re(ne(e),t,n,r)}function zt(t,e,n,r){return re(function(t,e){for(var n,r,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)r=(n=t.charCodeAt(s))>>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function Ft(t,e,n){return 0===e&&n===t.length?pt(t):pt(t.slice(e,n))}function Mt(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o<n;){var i,s,a,u,c=t[o],l=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=n)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(l=u);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(u=(15&c)<<12|(63&i)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),o+=f}return function(t){var e=t.length;if(e<=$t)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=$t));return n}(r)}Et.TYPED_ARRAY_SUPPORT=void 0===n.TYPED_ARRAY_SUPPORT||n.TYPED_ARRAY_SUPPORT,bt(),Et.poolSize=8192,Et._augment=function(t){return t.__proto__=Et.prototype,t},Et.from=function(t,e,n){return At(null,t,e,n)},Et.TYPED_ARRAY_SUPPORT&&(Et.prototype.__proto__=Uint8Array.prototype,Et.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Et[Symbol.species]),Et.alloc=function(t,e,n){return function(t,e,n,r){return Ot(e),e<=0?vt(t,e):void 0!==n?"string"==typeof r?vt(t,e).fill(n,r):vt(t,e).fill(n):vt(t,e)}(null,t,e,n)},Et.allocUnsafe=function(t){return St(null,t)},Et.allocUnsafeSlow=function(t){return St(null,t)},Et.isBuffer=function(t){return null!=t&&(!!t._isBuffer||oe(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&oe(t.slice(0,0))}(t))},Et.compare=function(t,e){if(!Tt(t)||!Tt(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0},Et.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Et.concat=function(t,e){if(!wt(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Et.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=Et.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var i=t[n];if(!Tt(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},Et.byteLength=xt,Et.prototype._isBuffer=!0,Et.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Pt(this,e,e+1);return this},Et.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Pt(this,e,e+3),Pt(this,e+1,e+2);return this},Et.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Pt(this,e,e+7),Pt(this,e+1,e+6),Pt(this,e+2,e+5),Pt(this,e+3,e+4);return this},Et.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Mt(this,0,t):Ut.apply(this,arguments)},Et.prototype.equals=function(t){if(!Tt(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Et.compare(this,t)},Et.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},Et.prototype.compare=function(t,e,n,r,o){if(!Tt(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(i,s),u=this.slice(r,o),c=t.slice(e,n),l=0;l<a;++l)if(u[l]!==c[l]){i=u[l],s=c[l];break}return i<s?-1:s<i?1:0},Et.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},Et.prototype.indexOf=function(t,e,n){return Ct(this,t,e,n,!0)},Et.prototype.lastIndexOf=function(t,e,n){return Ct(this,t,e,n,!1)},Et.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return jt(this,t,e,n);case"utf8":case"utf-8":return kt(this,t,e,n);case"ascii":return Lt(this,t,e,n);case"latin1":case"binary":return Nt(this,t,e,n);case"base64":return It(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return zt(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},Et.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $t=4096;function Dt(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(127&t[o]);return r}function qt(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;++o)r+=String.fromCharCode(t[o]);return r}function Ht(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=e;i<n;++i)o+=te(t[i]);return o}function Yt(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function Wt(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function Jt(t,e,n,r,o,i){if(!Tt(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function Vt(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o<i;++o)t[n+o]=(e&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function Kt(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o<i;++o)t[n+o]=e>>>8*(r?o:3-o)&255}function Xt(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Gt(t,e,n,r,o){return o||Xt(t,0,n,4),yt(t,e,n,r,23,4),n+4}function Zt(t,e,n,r,o){return o||Xt(t,0,n,8),yt(t,e,n,r,52,8),n+8}Et.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),Et.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=Et.prototype;else{var o=e-t;n=new Et(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+t]}return n},Et.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||Wt(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r},Et.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||Wt(t,e,this.length);for(var r=this[t+--e],o=1;e>0&&(o*=256);)r+=this[t+--e]*o;return r},Et.prototype.readUInt8=function(t,e){return e||Wt(t,1,this.length),this[t]},Et.prototype.readUInt16LE=function(t,e){return e||Wt(t,2,this.length),this[t]|this[t+1]<<8},Et.prototype.readUInt16BE=function(t,e){return e||Wt(t,2,this.length),this[t]<<8|this[t+1]},Et.prototype.readUInt32LE=function(t,e){return e||Wt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Et.prototype.readUInt32BE=function(t,e){return e||Wt(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Et.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||Wt(t,e,this.length);for(var r=this[t],o=1,i=0;++i<e&&(o*=256);)r+=this[t+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*e)),r},Et.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||Wt(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},Et.prototype.readInt8=function(t,e){return e||Wt(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Et.prototype.readInt16LE=function(t,e){e||Wt(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},Et.prototype.readInt16BE=function(t,e){e||Wt(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},Et.prototype.readInt32LE=function(t,e){return e||Wt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Et.prototype.readInt32BE=function(t,e){return e||Wt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Et.prototype.readFloatLE=function(t,e){return e||Wt(t,4,this.length),gt(this,t,!0,23,4)},Et.prototype.readFloatBE=function(t,e){return e||Wt(t,4,this.length),gt(this,t,!1,23,4)},Et.prototype.readDoubleLE=function(t,e){return e||Wt(t,8,this.length),gt(this,t,!0,52,8)},Et.prototype.readDoubleBE=function(t,e){return e||Wt(t,8,this.length),gt(this,t,!1,52,8)},Et.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||Jt(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i<n&&(o*=256);)this[e+i]=t/o&255;return e+n},Et.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||Jt(this,t,e,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},Et.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,1,255,0),Et.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Et.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,2,65535,0),Et.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Vt(this,t,e,!0),e+2},Et.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,2,65535,0),Et.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Vt(this,t,e,!1),e+2},Et.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,4,4294967295,0),Et.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):Kt(this,t,e,!0),e+4},Et.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,4,4294967295,0),Et.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Kt(this,t,e,!1),e+4},Et.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);Jt(this,t,e,n,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+n},Et.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);Jt(this,t,e,n,o-1,-o)}var i=n-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s|0)-a&255;return e+n},Et.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,1,127,-128),Et.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Et.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,2,32767,-32768),Et.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Vt(this,t,e,!0),e+2},Et.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,2,32767,-32768),Et.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Vt(this,t,e,!1),e+2},Et.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,4,2147483647,-2147483648),Et.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Kt(this,t,e,!0),e+4},Et.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||Jt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Et.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Kt(this,t,e,!1),e+4},Et.prototype.writeFloatLE=function(t,e,n){return Gt(this,t,e,!0,n)},Et.prototype.writeFloatBE=function(t,e,n){return Gt(this,t,e,!1,n)},Et.prototype.writeDoubleLE=function(t,e,n){return Zt(this,t,e,!0,n)},Et.prototype.writeDoubleBE=function(t,e,n){return Zt(this,t,e,!1,n)},Et.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var o,i=r-n;if(this===t&&n<e&&e<r)for(o=i-1;o>=0;--o)t[o+e]=this[o+n];else if(i<1e3||!Et.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+i),e);return i},Et.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!Et.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{var s=Tt(t)?t:ee(new Et(t,r).toString()),a=s.length;for(i=0;i<n-e;++i)this[i+e]=s[i%a]}return this};var Qt=/[^+\/0-9A-Za-z-_]/g;function te(t){return t<16?"0"+t.toString(16):t.toString(16)}function ee(t,e){var n;e=e||1/0;for(var r=t.length,o=null,i=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function ne(t){return function(t){var e,n,r,o,i,s;ft||ht();var a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[a-2]?2:"="===t[a-1]?1:0,s=new lt(3*a/4-i),r=i>0?a-4:a;var u=0;for(e=0,n=0;e<r;e+=4,n+=3)o=ct[t.charCodeAt(e)]<<18|ct[t.charCodeAt(e+1)]<<12|ct[t.charCodeAt(e+2)]<<6|ct[t.charCodeAt(e+3)],s[u++]=o>>16&255,s[u++]=o>>8&255,s[u++]=255&o;return 2===i?(o=ct[t.charCodeAt(e)]<<2|ct[t.charCodeAt(e+1)]>>4,s[u++]=255&o):1===i&&(o=ct[t.charCodeAt(e)]<<10|ct[t.charCodeAt(e+1)]<<4|ct[t.charCodeAt(e+2)]>>2,s[u++]=o>>8&255,s[u++]=255&o),s}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Qt,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function re(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function oe(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function ie(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}at.inherits(ie,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:at.toJSONObject(this.config),code:this.code,status:this.status}}});const se=ie.prototype,ae={};["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((t=>{ae[t]={value:t}})),Object.defineProperties(ie,ae),Object.defineProperty(se,"isAxiosError",{value:!0}),ie.from=(t,e,n,r,o,i)=>{const s=Object.create(se);at.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t));const a=t&&t.message?t.message:"Error",u=null==e&&t?t.code:e;return ie.call(s,a,u,n,r,o),t&&null==s.cause&&Object.defineProperty(s,"cause",{value:t,configurable:!0}),s.name=t&&t.name||"Error",i&&Object.assign(s,i),s};function ue(t){return at.isPlainObject(t)||at.isArray(t)}function ce(t){return at.endsWith(t,"[]")?t.slice(0,-2):t}function le(t,e,n){return t?t.concat(e).map((function(t,e){return t=ce(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const fe=at.toFlatObject(at,{},null,(function(t){return/^is[A-Z]/.test(t)}));function he(t,e,n){if(!at.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=at.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!at.isUndefined(e[t])}))).metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&at.isSpecCompliantForm(e);if(!at.isFunction(o))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(at.isDate(t))return t.toISOString();if(at.isBoolean(t))return t.toString();if(!a&&at.isBlob(t))throw new ie("Blob is not supported. Use a Buffer instead.");return at.isArrayBuffer(t)||at.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Et.from(t):t}function c(t,n,o){let a=t;if(t&&!o&&"object"==typeof t)if(at.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(at.isArray(t)&&function(t){return at.isArray(t)&&!t.some(ue)}(t)||(at.isFileList(t)||at.endsWith(n,"[]"))&&(a=at.toArray(t)))return n=ce(n),a.forEach((function(t,r){!at.isUndefined(t)&&null!==t&&e.append(!0===s?le([n],r,i):null===s?n:n+"[]",u(t))})),!1;return!!ue(t)||(e.append(le(o,n,i),u(t)),!1)}const l=[],f=Object.assign(fe,{defaultVisitor:c,convertValue:u,isVisitable:ue});if(!at.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!at.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),at.forEach(n,(function(n,i){!0===(!(at.isUndefined(n)||null===n)&&o.call(e,n,at.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function de(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function pe(t,e){this._pairs=[],t&&he(t,this,e)}const ge=pe.prototype;function ye(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function me(t,e,n){if(!e)return t;const r=n&&n.encode||ye;at.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(e,n):at.isURLSearchParams(e)?e.toString():new pe(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}ge.append=function(t,e){this._pairs.push([t,e])},ge.toString=function(t){const e=t?function(e){return t.call(this,e,de)}:de;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};class we{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){at.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var be={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ve={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:pe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Ee="undefined"!=typeof window&&"undefined"!=typeof document,Ae="object"==typeof navigator&&navigator||void 0,Oe=Ee&&(!Ae||["ReactNative","NativeScript","NS"].indexOf(Ae.product)<0),Se="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Re=Ee&&window.location.href||"http://localhost";var _e={...Object.freeze({__proto__:null,hasBrowserEnv:Ee,hasStandardBrowserEnv:Oe,hasStandardBrowserWebWorkerEnv:Se,navigator:Ae,origin:Re}),...ve};function Te(t){function e(t,n,r,o){let i=t[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=t.length;if(i=!i&&at.isArray(r)?r.length:i,a)return at.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&at.isObject(r[i])||(r[i]=[]);return e(t,n,r[i],o)&&at.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}(r[i])),!s}if(at.isFormData(t)&&at.isFunction(t.entries)){const n={};return at.forEachEntry(t,((t,r)=>{e(function(t){return at.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const xe={transitional:be,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=at.isObject(t);o&&at.isHTMLForm(t)&&(t=new FormData(t));if(at.isFormData(t))return r?JSON.stringify(Te(t)):t;if(at.isArrayBuffer(t)||at.isBuffer(t)||at.isStream(t)||at.isFile(t)||at.isBlob(t)||at.isReadableStream(t))return t;if(at.isArrayBufferView(t))return t.buffer;if(at.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return he(t,new _e.classes.URLSearchParams,{visitor:function(t,e,n,r){return _e.isNode&&at.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...e})}(t,this.formSerializer).toString();if((i=at.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return he(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),function(t,e,n){if(at.isString(t))try{return(e||JSON.parse)(t),at.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||xe.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(at.isResponse(t)||at.isReadableStream(t))return t;if(t&&at.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(t){if(n){if("SyntaxError"===t.name)throw ie.from(t,ie.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};at.forEach(["delete","get","head","post","put","patch"],(t=>{xe.headers[t]={}}));const Ue=at.toObjectSet(["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"]);const Pe=Symbol("internals");function Ce(t){return t&&String(t).trim().toLowerCase()}function Be(t){return!1===t||null==t?t:at.isArray(t)?t.map(Be):String(t)}function je(t,e,n,r,o){return at.isFunction(r)?r.call(this,e,n):(o&&(e=n),at.isString(e)?at.isString(r)?-1!==e.indexOf(r):at.isRegExp(r)?r.test(e):void 0:void 0)}let ke=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function o(t,e,n){const o=Ce(e);if(!o)throw new Error("header name must be a non-empty string");const i=at.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Be(t))}const i=(t,e)=>at.forEach(t,((t,n)=>o(t,n,e)));if(at.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(at.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,r,o;return t&&t.split("\n").forEach((function(t){o=t.indexOf(":"),n=t.substring(0,o).trim().toLowerCase(),r=t.substring(o+1).trim(),!n||e[n]&&Ue[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(at.isObject(t)&&at.isIterable(t)){let n,r,o={};for(const e of t){if(!at.isArray(e))throw TypeError("Object iterator must return a key-value pair");o[r=e[0]]=(n=o[r])?at.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}i(o,e)}else null!=t&&o(e,t,n);return this}get(t,e){if(t=Ce(t)){const n=at.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(at.isFunction(e))return e.call(this,t,n);if(at.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Ce(t)){const n=at.findKey(this,t);return!(!n||void 0===this[n]||e&&!je(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function o(t){if(t=Ce(t)){const o=at.findKey(n,t);!o||e&&!je(0,n[o],o,e)||(delete n[o],r=!0)}}return at.isArray(t)?t.forEach(o):o(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const o=e[n];t&&!je(0,this[o],o,t,!0)||(delete this[o],r=!0)}return r}normalize(t){const e=this,n={};return at.forEach(this,((r,o)=>{const i=at.findKey(n,o);if(i)return e[i]=Be(r),void delete e[o];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete e[o],e[s]=Be(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return at.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&at.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Pe]=this[Pe]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Ce(t);e[r]||(!function(t,e){const n=at.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,o){return this[r].call(this,e,t,n,o)},configurable:!0})}))}(n,t),e[r]=!0)}return at.isArray(t)?t.forEach(r):r(t),this}};function Le(t,e){const n=this||xe,r=e||n,o=ke.from(r.headers);let i=r.data;return at.forEach(t,(function(t){i=t.call(n,i,o.normalize(),e?e.status:void 0)})),o.normalize(),i}function Ne(t){return!(!t||!t.__CANCEL__)}function Ie(t,e,n){ie.call(this,null==t?"canceled":t,ie.ERR_CANCELED,e,n),this.name="CanceledError"}function ze(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new ie("Request failed with status code "+n.status,[ie.ERR_BAD_REQUEST,ie.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}ke.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),at.reduceDescriptors(ke.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),at.freezeMethods(ke),at.inherits(Ie,ie,{__CANCEL__:!0});const Fe=(t,e,n=3)=>{let r=0;const o=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o,i=0,s=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),c=r[s];o||(o=u),n[i]=a,r[i]=u;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-o<e)return;const h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}(50,250);return function(t,e){let n,r,o=0,i=1e3/e;const s=(e,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),t(...e)};return[(...t)=>{const e=Date.now(),a=e-o;a>=i?s(t,e):(n=t,r||(r=setTimeout((()=>{r=null,s(n)}),i-a)))},()=>n&&s(n)]}((n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,u=o(a);r=i;t({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:n,lengthComputable:null!=s,[e?"download":"upload"]:!0})}),n)},Me=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},$e=t=>(...e)=>at.asap((()=>t(...e)));var De=_e.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,_e.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,qe=_e.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const s=[t+"="+encodeURIComponent(e)];at.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),at.isString(r)&&s.push("path="+r),at.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function He(t,e,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(r||0==n)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Ye=t=>t instanceof ke?{...t}:t;function We(t,e){e=e||{};const n={};function r(t,e,n,r){return at.isPlainObject(t)&&at.isPlainObject(e)?at.merge.call({caseless:r},t,e):at.isPlainObject(e)?at.merge({},e):at.isArray(e)?e.slice():e}function o(t,e,n,o){return at.isUndefined(e)?at.isUndefined(t)?void 0:r(void 0,t,0,o):r(t,e,0,o)}function i(t,e){if(!at.isUndefined(e))return r(void 0,e)}function s(t,e){return at.isUndefined(e)?at.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,o,i){return i in e?r(n,o):i in t?r(void 0,n):void 0}const u={url:i,method:i,data:i,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:a,headers:(t,e,n)=>o(Ye(t),Ye(e),0,!0)};return at.forEach(Object.keys({...t,...e}),(function(r){const i=u[r]||o,s=i(t[r],e[r],r);at.isUndefined(s)&&i!==a||(n[r]=s)})),n}var Je=t=>{const e=We({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=e;if(e.headers=s=ke.from(s),e.url=me(He(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),at.isFormData(n))if(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(at.isFunction(n.getHeaders)){const t=n.getHeaders(),e=["content-type","content-length"];Object.entries(t).forEach((([t,n])=>{e.includes(t.toLowerCase())&&s.set(t,n)}))}if(_e.hasStandardBrowserEnv&&(r&&at.isFunction(r)&&(r=r(e)),r||!1!==r&&De(e.url))){const t=o&&i&&qe.read(i);t&&s.set(o,t)}return e};var Ve="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Je(t);let o=r.data;const i=ke.from(r.headers).normalize();let s,a,u,c,l,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=r;function p(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function y(){if(!g)return;const r=ke.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());ze((function(t){e(t),p()}),(function(t){n(t),p()}),{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(n(new ie("Request aborted",ie.ECONNABORTED,t,g)),g=null)},g.onerror=function(e){const r=new ie(e&&e.message?e.message:"Network Error",ie.ERR_NETWORK,t,g);r.event=e||null,n(r),g=null},g.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||be;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new ie(e,o.clarifyTimeoutError?ie.ETIMEDOUT:ie.ECONNABORTED,t,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&at.forEach(i.toJSON(),(function(t,e){g.setRequestHeader(e,t)})),at.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),f&&"json"!==f&&(g.responseType=r.responseType),d&&([u,l]=Fe(d,!0),g.addEventListener("progress",u)),h&&g.upload&&([a,c]=Fe(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=e=>{g&&(n(!e||e.type?new Ie(null,t,g):e),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const m=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);m&&-1===_e.protocols.indexOf(m)?n(new ie("Unsupported protocol "+m+":",ie.ERR_BAD_REQUEST,t)):g.send(o||null)}))};const Ke=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const o=function(t){if(!n){n=!0,s();const e=t instanceof Error?t:this.reason;r.abort(e instanceof ie?e:new Ie(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,o(new ie(`timeout ${e} of ms exceeded`,ie.ETIMEDOUT))}),e);const s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(o):t.removeEventListener("abort",o)})),t=null)};t.forEach((t=>t.addEventListener("abort",o)));const{signal:a}=r;return a.unsubscribe=()=>at.asap(s),a}},Xe=function*(t,e){let n=t.byteLength;if(n<e)return void(yield t);let r,o=0;for(;o<n;)r=o+e,yield t.slice(o,r),o=r},Ge=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},Ze=(t,e,n,r)=>{const o=async function*(t,e){for await(const n of Ge(t))yield*Xe(n,e)}(t,e);let i,s=0,a=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await o.next();if(e)return a(),void t.close();let i=r.byteLength;if(n){let t=s+=i;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:t=>(a(t),o.return())},{highWaterMark:2})},{isFunction:Qe}=at,tn=(({Request:t,Response:e})=>({Request:t,Response:e}))(at.global),{ReadableStream:en,TextEncoder:nn}=at.global,rn=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},on=t=>{t=at.merge.call({skipUndefined:!0},tn,t);const{fetch:e,Request:n,Response:r}=t,o=e?Qe(e):"function"==typeof fetch,i=Qe(n),s=Qe(r);if(!o)return!1;const a=o&&Qe(en),u=o&&("function"==typeof nn?(t=>e=>t.encode(e))(new nn):async t=>new Uint8Array(await new n(t).arrayBuffer())),c=i&&a&&rn((()=>{let t=!1;const e=new n(_e.origin,{body:new en,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),l=s&&a&&rn((()=>at.isReadableStream(new r("").body))),f={stream:l&&(t=>t.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!f[t]&&(f[t]=(e,n)=>{let r=e&&e[t];if(r)return r.call(e);throw new ie(`Response type '${t}' is not supported`,ie.ERR_NOT_SUPPORT,n)})}));const h=async(t,e)=>{const r=at.toFiniteNumber(t.getContentLength());return null==r?(async t=>{if(null==t)return 0;if(at.isBlob(t))return t.size;if(at.isSpecCompliantForm(t)){const e=new n(_e.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return at.isArrayBufferView(t)||at.isArrayBuffer(t)?t.byteLength:(at.isURLSearchParams(t)&&(t+=""),at.isString(t)?(await u(t)).byteLength:void 0)})(e):r};return async t=>{let{url:o,method:s,data:a,signal:u,cancelToken:d,timeout:p,onDownloadProgress:g,onUploadProgress:y,responseType:m,headers:w,withCredentials:b="same-origin",fetchOptions:v}=Je(t),E=e||fetch;m=m?(m+"").toLowerCase():"text";let A=Ke([u,d&&d.toAbortSignal()],p),O=null;const S=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let R;try{if(y&&c&&"get"!==s&&"head"!==s&&0!==(R=await h(w,a))){let t,e=new n(o,{method:"POST",body:a,duplex:"half"});if(at.isFormData(a)&&(t=e.headers.get("content-type"))&&w.setContentType(t),e.body){const[t,n]=Me(R,Fe($e(y)));a=Ze(e.body,65536,t,n)}}at.isString(b)||(b=b?"include":"omit");const e=i&&"credentials"in n.prototype,u={...v,signal:A,method:s.toUpperCase(),headers:w.normalize().toJSON(),body:a,duplex:"half",credentials:e?b:void 0};O=i&&new n(o,u);let d=await(i?E(O,v):E(o,u));const p=l&&("stream"===m||"response"===m);if(l&&(g||p&&S)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=d[e]}));const e=at.toFiniteNumber(d.headers.get("content-length")),[n,o]=g&&Me(e,Fe($e(g),!0))||[];d=new r(Ze(d.body,65536,n,(()=>{o&&o(),S&&S()})),t)}m=m||"text";let _=await f[at.findKey(f,m)||"text"](d,t);return!p&&S&&S(),await new Promise(((e,n)=>{ze(e,n,{data:_,headers:ke.from(d.headers),status:d.status,statusText:d.statusText,config:t,request:O})}))}catch(e){if(S&&S(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new ie("Network Error",ie.ERR_NETWORK,t,O),{cause:e.cause||e});throw ie.from(e,e&&e.code,t,O)}}},sn=new Map,an=t=>{let e=t?t.env:{};const{fetch:n,Request:r,Response:o}=e,i=[r,o,n];let s,a,u=i.length,c=sn;for(;u--;)s=i[u],a=c.get(s),void 0===a&&c.set(s,a=u?new Map:on(e)),c=a;return a};an();const un={http:null,xhr:Ve,fetch:{get:an}};at.forEach(un,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const cn=t=>`- ${t}`,ln=t=>at.isFunction(t)||null===t||!1===t;var fn=(t,e)=>{t=at.isArray(t)?t:[t];const{length:n}=t;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=t[s],o=r,!ln(r)&&(o=un[(n=String(r)).toLowerCase()],void 0===o))throw new ie(`Unknown adapter '${n}'`);if(o&&(at.isFunction(o)||(o=o.get(e))))break;i[n||"#"+s]=o}if(!o){const t=Object.entries(i).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new ie("There is no suitable adapter to dispatch the request "+(n?t.length>1?"since :\n"+t.map(cn).join("\n"):" "+cn(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function hn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ie(null,t)}function dn(t){hn(t),t.headers=ke.from(t.headers),t.data=Le.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return fn(t.adapter||xe.adapter,t)(t).then((function(e){return hn(t),e.data=Le.call(t,t.transformResponse,e),e.headers=ke.from(e.headers),e}),(function(e){return Ne(e)||(hn(t),e&&e.response&&(e.response.data=Le.call(t,t.transformResponse,e.response),e.response.headers=ke.from(e.response.headers))),Promise.reject(e)}))}const pn="1.12.2",gn={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{gn[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const yn={};gn.transitional=function(t,e,n){function r(t,e){return"[Axios v"+pn+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,o,i)=>{if(!1===t)throw new ie(r(o," has been removed"+(e?" in "+e:"")),ie.ERR_DEPRECATED);return e&&!yn[o]&&(yn[o]=!0,console.warn(r(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,o,i)}},gn.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};var mn={assertOptions:function(t,e,n){if("object"!=typeof t)throw new ie("options must be an object",ie.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const e=t[i],n=void 0===e||s(e,i,t);if(!0!==n)throw new ie("option "+i+" must be "+n,ie.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ie("Unknown option "+i,ie.ERR_BAD_OPTION)}},validators:gn};const wn=mn.validators;let bn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new we,response:new we}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=We(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:o}=e;void 0!==n&&mn.assertOptions(n,{silentJSONParsing:wn.transitional(wn.boolean),forcedJSONParsing:wn.transitional(wn.boolean),clarifyTimeoutError:wn.transitional(wn.boolean)},!1),null!=r&&(at.isFunction(r)?e.paramsSerializer={serialize:r}:mn.assertOptions(r,{encode:wn.function,serialize:wn.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),mn.assertOptions(e,{baseUrl:wn.spelling("baseURL"),withXsrfToken:wn.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=o&&at.merge(o.common,o[e.method]);o&&at.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete o[t]})),e.headers=ke.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!a){const t=[dn.bind(this),void 0];for(t.unshift(...s),t.push(...u),l=t.length,c=Promise.resolve(e);f<l;)c=c.then(t[f++],t[f++]);return c}l=s.length;let h=e;for(;f<l;){const t=s[f++],e=s[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{c=dn.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(t){return me(He((t=We(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}};at.forEach(["delete","get","head","options"],(function(t){bn.prototype[t]=function(e,n){return this.request(We(n||{},{method:t,url:e,data:(n||{}).data}))}})),at.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,o){return this.request(We(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}bn.prototype[t]=e(),bn.prototype[t+"Form"]=e(!0)}));const vn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vn).forEach((([t,e])=>{vn[e]=t}));const En=function t(e){const n=new bn(e),r=m(bn.prototype.request,n);return at.extend(r,bn.prototype,n,{allOwnKeys:!0}),at.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(We(e,n))},r}(xe);En.Axios=bn,En.CanceledError=Ie,En.CancelToken=class t{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,o){n.reason||(n.reason=new Ie(t,r,o),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let e;return{token:new t((function(t){e=t})),cancel:e}}},En.isCancel=Ne,En.VERSION=pn,En.toFormData=he,En.AxiosError=ie,En.Cancel=En.CanceledError,En.all=function(t){return Promise.all(t)},En.spread=function(t){return function(e){return t.apply(null,e)}},En.isAxiosError=function(t){return at.isObject(t)&&!0===t.isAxiosError},En.mergeConfig=We,En.AxiosHeaders=ke,En.formToJSON=t=>Te(at.isHTMLForm(t)?new FormData(t):t),En.getAdapter=fn,En.HttpStatusCode=vn,En.default=En;const{Axios:An,AxiosError:On,CanceledError:Sn,isCancel:Rn,CancelToken:_n,VERSION:Tn,all:xn,Cancel:Un,isAxiosError:Pn,spread:Cn,toFormData:Bn,AxiosHeaders:jn,HttpStatusCode:kn,formToJSON:Ln,getAdapter:Nn,mergeConfig:In}=En;function zn(t,{strict:e=!0}={}){return!!t&&("string"==typeof t&&(e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")))}function Fn(t){return zn(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}const Mn="2.30.0";let $n=({docsBaseUrl:t,docsPath:e="",docsSlug:n})=>e?`${t??"https://viem.sh"}${e}${n?`#${n}`:""}`:void 0,Dn=`viem@${Mn}`;class qn extends Error{constructor(t,e={}){const n=e.cause instanceof qn?e.cause.details:e.cause?.message?e.cause.message:e.details,r=e.cause instanceof qn&&e.cause.docsPath||e.docsPath,o=$n?.({...e,docsPath:r});super([t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...o?[`Docs: ${o}`]:[],...n?[`Details: ${n}`]:[],...Dn?[`Version: ${Dn}`]:[]].join("\n"),e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=r,this.metaMessages=e.metaMessages,this.name=e.name??this.name,this.shortMessage=t,this.version=Mn}walk(t){return Hn(this,t)}}function Hn(t,e){return e?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?Hn(t.cause,e):e?null:t}class Yn extends qn{constructor({size:t,targetSize:e,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`,{name:"SizeExceedsPaddingSizeError"})}}function Wn(t,{dir:e,size:n=32}={}){return"string"==typeof t?function(t,{dir:e,size:n=32}={}){if(null===n)return t;const r=t.replace("0x","");if(r.length>2*n)throw new Yn({size:Math.ceil(r.length/2),targetSize:n,type:"hex"});return`0x${r["right"===e?"padEnd":"padStart"](2*n,"0")}`}(t,{dir:e,size:n}):function(t,{dir:e,size:n=32}={}){if(null===n)return t;if(t.length>n)throw new Yn({size:t.length,targetSize:n,type:"bytes"});const r=new Uint8Array(n);for(let o=0;o<n;o++){const i="right"===e;r[i?o:n-o-1]=t[i?o:t.length-o-1]}return r}(t,{dir:e,size:n})}class Jn extends qn{constructor({max:t,min:e,signed:n,size:r,value:o}){super(`Number "${o}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${e} to ${t})`:`(above ${e})`}`,{name:"IntegerOutOfRangeError"})}}class Vn extends qn{constructor({givenSize:t,maxSize:e}){super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}function Kn(t,{size:e}){if(Fn(t)>e)throw new Vn({givenSize:Fn(t),maxSize:e})}const Xn=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function Gn(t,e={}){const n=`0x${Number(t)}`;return"number"==typeof e.size?(Kn(n,{size:e.size}),Wn(n,{size:e.size})):n}function Zn(t,e={}){let n="";for(let e=0;e<t.length;e++)n+=Xn[t[e]];const r=`0x${n}`;return"number"==typeof e.size?(Kn(r,{size:e.size}),Wn(r,{dir:"right",size:e.size})):r}function Qn(t,e={}){const{signed:n,size:r}=e,o=BigInt(t);let i;r?i=n?(1n<<8n*BigInt(r)-1n)-1n:2n**(8n*BigInt(r))-1n:"number"==typeof t&&(i=BigInt(Number.MAX_SAFE_INTEGER));const s="bigint"==typeof i&&n?-i-1n:0;if(i&&o>i||o<s){const e="bigint"==typeof t?"n":"";throw new Jn({max:i?`${i}${e}`:void 0,min:`${s}${e}`,signed:n,size:r,value:`${t}${e}`})}const a=`0x${(n&&o<0?(1n<<BigInt(8*r))+BigInt(o):o).toString(16)}`;return r?Wn(a,{size:r}):a}const tr=new TextEncoder;function er(t,e={}){return Zn(tr.encode(t),e)}const nr=new TextEncoder;function rr(t,e={}){return"number"==typeof t||"bigint"==typeof t?function(t,e){const n=Qn(t,e);return sr(n)}(t,e):"boolean"==typeof t?function(t,e={}){const n=new Uint8Array(1);if(n[0]=Number(t),"number"==typeof e.size)return Kn(n,{size:e.size}),Wn(n,{size:e.size});return n}(t,e):zn(t)?sr(t,e):ar(t,e)}const or={zero:48,nine:57,A:65,F:70,a:97,f:102};function ir(t){return t>=or.zero&&t<=or.nine?t-or.zero:t>=or.A&&t<=or.F?t-(or.A-10):t>=or.a&&t<=or.f?t-(or.a-10):void 0}function sr(t,e={}){let n=t;e.size&&(Kn(n,{size:e.size}),n=Wn(n,{dir:"right",size:e.size}));let r=n.slice(2);r.length%2&&(r=`0${r}`);const o=r.length/2,i=new Uint8Array(o);for(let t=0,e=0;t<o;t++){const n=ir(r.charCodeAt(e++)),o=ir(r.charCodeAt(e++));if(void 0===n||void 0===o)throw new qn(`Invalid byte sequence ("${r[e-2]}${r[e-1]}" in "${r}").`);i[t]=16*n+o}return i}function ar(t,e={}){const n=nr.encode(t);return"number"==typeof e.size?(Kn(n,{size:e.size}),Wn(n,{dir:"right",size:e.size})):n}function ur(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function cr(t,...e){if(!((n=t)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function lr(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}const fr=BigInt(2**32-1),hr=BigInt(32);function dr(t,e=!1){return e?{h:Number(t&fr),l:Number(t>>hr&fr)}:{h:0|Number(t>>hr&fr),l:0|Number(t&fr)}}function pr(t,e=!1){let n=new Uint32Array(t.length),r=new Uint32Array(t.length);for(let o=0;o<t.length;o++){const{h:i,l:s}=dr(t[o],e);[n[o],r[o]]=[i,s]}return[n,r]}const gr=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])();function yr(t){for(let n=0;n<t.length;n++)t[n]=(e=t[n])<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255;var e}function mr(t){return"string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),cr(t),t}"function"==typeof Uint8Array.from([]).toHex&&Uint8Array.fromHex;class wr{clone(){return this._cloneInto()}}const br=[],vr=[],Er=[],Ar=BigInt(0),Or=BigInt(1),Sr=BigInt(2),Rr=BigInt(7),_r=BigInt(256),Tr=BigInt(113);for(let t=0,e=Or,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],br.push(2*(5*r+n)),vr.push((t+1)*(t+2)/2%64);let o=Ar;for(let t=0;t<7;t++)e=(e<<Or^(e>>Rr)*Tr)%_r,e&Sr&&(o^=Or<<(Or<<BigInt(t))-Or);Er.push(o)}const[xr,Ur]=pr(Er,!0),Pr=(t,e,n)=>n>32?((t,e,n)=>e<<n-32|t>>>64-n)(t,e,n):((t,e,n)=>t<<n|e>>>32-n)(t,e,n),Cr=(t,e,n)=>n>32?((t,e,n)=>t<<n-32|e>>>64-n)
|
|
2
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */(t,e,n):((t,e,n)=>e<<n|t>>>32-n)(t,e,n);class Br extends wr{constructor(t,e,n,r=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=e,this.outputLen=n,this.enableXOF=r,this.rounds=o,ur(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");var i;this.state=new Uint8Array(200),this.state32=(i=this.state,new Uint32Array(i.buffer,i.byteOffset,Math.floor(i.byteLength/4)))}keccak(){gr||yr(this.state32),function(t,e=24){const n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let e=0;e<10;e++)n[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){const r=(e+8)%10,o=(e+2)%10,i=n[o],s=n[o+1],a=Pr(i,s,1)^n[r],u=Cr(i,s,1)^n[r+1];for(let n=0;n<50;n+=10)t[e+n]^=a,t[e+n+1]^=u}let e=t[2],o=t[3];for(let n=0;n<24;n++){const r=vr[n],i=Pr(e,o,r),s=Cr(e,o,r),a=br[n];e=t[a],o=t[a+1],t[a]=i,t[a+1]=s}for(let e=0;e<50;e+=10){for(let r=0;r<10;r++)n[r]=t[e+r];for(let r=0;r<10;r++)t[e+r]^=~n[(r+2)%10]&n[(r+4)%10]}t[0]^=xr[r],t[1]^=Ur[r]}n.fill(0)}(this.state32,this.rounds),gr||yr(this.state32),this.posOut=0,this.pos=0}update(t){lr(this);const{blockLen:e,state:n}=this,r=(t=mr(t)).length;for(let o=0;o<r;){const i=Math.min(e-this.pos,r-o);for(let e=0;e<i;e++)n[this.pos++]^=t[o++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:n,blockLen:r}=this;t[n]^=e,128&e&&n===r-1&&this.keccak(),t[r-1]^=128,this.keccak()}writeInto(t){lr(this,!1),cr(t),this.finish();const e=this.state,{blockLen:n}=this;for(let r=0,o=t.length;r<o;){this.posOut>=n&&this.keccak();const i=Math.min(n-this.posOut,o-r);t.set(e.subarray(this.posOut,this.posOut+i),r),this.posOut+=i,r+=i}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ur(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(function(t,e){cr(t);const n=e.outputLen;if(t.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:n,outputLen:r,rounds:o,enableXOF:i}=this;return t||(t=new Br(e,n,r,i,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=n,t.outputLen=r,t.enableXOF=i,t.destroyed=this.destroyed,t}}const jr=((t,e,n)=>function(t){const e=e=>t().update(mr(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}((()=>new Br(e,t,n))))(1,136,32);function kr(t,e){return function(t,e={}){return"number"==typeof t||"bigint"==typeof t?Qn(t,e):"string"==typeof t?er(t,e):"boolean"==typeof t?Gn(t,e):Zn(t,e)}(jr(zn(t,{strict:!1})?rr(t):t))}function Lr(t){if("object"!=typeof t)return(typeof t).toLowerCase();const e=Object.prototype.toString.call(t);return e.slice(8,e.length-1).toLowerCase()}class Nr extends Error{constructor(t,e,n){super(e??t.code),this.type=t,void 0!==n&&(this.stack=n)}getMetadata(){return this.type}toObject(){return{type:this.getMetadata(),message:this.message??"",stack:this.stack??"",className:this.constructor.name}}}function Ir(t,e){return new Nr({code:"ETHEREUMJS_DEFAULT_ERROR_CODE"},t,e)}function zr(t,e){if(t<56)return Uint8Array.from([t+e]);const n=qr(t),r=qr(e+55+n.length/2);return Uint8Array.from($r(r+n))}Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));const Fr={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Mr(t){return t>=Fr._0&&t<=Fr._9?t-Fr._0:t>=Fr._A&&t<=Fr._F?t-(Fr._A-10):t>=Fr._a&&t<=Fr._f?t-(Fr._a-10):void 0}function $r(t){if("0x"===t.slice(0,2)&&(t=t.slice(0,2)),"string"!=typeof t)throw Ir("hex string expected, got "+typeof t);const e=t.length,n=e/2;if(e%2)throw Ir("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(n);for(let e=0,o=0;e<n;e++,o+=2){const n=Mr(t.charCodeAt(o)),i=Mr(t.charCodeAt(o+1));if(void 0===n||void 0===i){throw Ir('hex string expected, got non-hex character "'+(t[o]+t[o+1])+'" at index '+o)}r[e]=16*n+i}return r}function Dr(...t){if(1===t.length)return t[0];const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);for(let e=0,r=0;e<t.length;e++){const o=t[e];n.set(o,r),r+=o.length}return n}function qr(t){if(t<0)throw Ir("Invalid integer as argument, must be unsigned!");const e=t.toString(16);return e.length%2?`0${e}`:e}function Hr(t){return t.length>=2&&"0"===t[0]&&"x"===t[1]}function Yr(t){if(t instanceof Uint8Array)return t;if("string"==typeof t)return Hr(t)?$r((n="string"!=typeof(r=t)?r:Hr(r)?r.slice(2):r).length%2?`0${n}`:n):(e=t,(new TextEncoder).encode(e));var e,n,r;if("number"==typeof t||"bigint"==typeof t)return t?$r(qr(t)):Uint8Array.from([]);if(null==t)return Uint8Array.from([]);throw Ir("toBytes: received unsupported type "+typeof t)}function Wr(t){if(Array.isArray(t)){const e=[];let n=0;for(let r=0;r<t.length;r++){const o=Wr(t[r]);e.push(o),n+=o.length}return Dr(zr(n,192),...e)}const e=Yr(t);return 1===e.length&&e[0]<128?e:Dr(zr(e.length,128),e)}/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */const{p:Jr,n:Vr,Gx:Kr,Gy:Xr,b:Gr}={p:0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2fn,n:0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n,b:7n,Gx:0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798n,Gy:0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8n},Zr=32,Qr=64,to=(t="")=>{throw new Error(t)},eo=t=>"bigint"==typeof t,no=t=>"string"==typeof t,ro=(t,e)=>!(t=>t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name)(t)||"number"==typeof e&&e>0&&t.length!==e?to("Uint8Array expected"):t,oo=t=>new Uint8Array(t),io=(t,e)=>t.toString(16).padStart(e,"0"),so=t=>Array.from(ro(t)).map((t=>io(t,2))).join(""),ao=48,uo=57,co=65,lo=70,fo=97,ho=102,po=t=>t>=ao&&t<=uo?t-ao:t>=co&&t<=lo?t-(co-10):t>=fo&&t<=ho?t-(fo-10):void 0,go=t=>{const e="hex invalid";if(!no(t))return to(e);const n=t.length,r=n/2;if(n%2)return to(e);const o=oo(r);for(let n=0,i=0;n<r;n++,i+=2){const r=po(t.charCodeAt(i)),s=po(t.charCodeAt(i+1));if(void 0===r||void 0===s)return to(e);o[n]=16*r+s}return o},yo=(t,e)=>{return ro(no(t)?go(t):(n=ro(t),Uint8Array.from(n)),e);var n},mo=()=>globalThis?.crypto,wo=(...t)=>{const e=oo(t.reduce(((t,e)=>t+ro(e).length),0));let n=0;return t.forEach((t=>{e.set(t,n),n+=t.length})),e},bo=(t=Zr)=>mo().getRandomValues(oo(t)),vo=BigInt,Eo=(t,e,n,r="bad number: out of range")=>eo(t)&&e<=t&&t<n?t:to(r),Ao=(t,e=Jr)=>{const n=t%e;return n>=0n?n:e+n},Oo=t=>Ao(t,Vr),So=(t,e)=>{(0n===t||e<=0n)&&to("no inverse n="+t+" mod="+e);let n=Ao(t,e),r=e,o=0n,i=1n;for(;0n!==n;){const t=r%n,e=o-i*(r/n);r=n,n=t,o=i,i=e}return 1n===r?Ao(o,e):to("no inverse")},Ro=t=>t instanceof jo?t:to("Point expected"),_o=t=>Ao(Ao(t*t)*t+Gr),To=t=>Eo(t,0n,Jr),xo=t=>Eo(t,1n,Jr),Uo=t=>Eo(t,1n,Vr),Po=t=>0n===(1n&t),Co=t=>Uint8Array.of(t),Bo=t=>Co(Po(t)?2:3);class jo{static BASE;static ZERO;px;py;pz;constructor(t,e,n){this.px=To(t),this.py=xo(e),this.pz=To(n),Object.freeze(this)}static fromBytes(t){let e;ro(t);const n=t[0],r=t.subarray(1),o=Io(r,0,Zr),i=t.length;if(33===i&&[2,3].includes(n)){let t=(t=>{const e=_o(xo(t));let n=1n;for(let t=e,r=(Jr+1n)/4n;r>0n;r>>=1n)1n&r&&(n=n*t%Jr),t=t*t%Jr;return Ao(n*n)===e?n:to("sqrt invalid")})(o);const r=Po(t);Po(vo(n))!==r&&(t=Ao(-t)),e=new jo(o,t,1n)}return 65===i&&4===n&&(e=new jo(o,Io(r,Zr,Qr),1n)),e?e.assertValidity():to("bad point: not on curve")}equals(t){const{px:e,py:n,pz:r}=this,{px:o,py:i,pz:s}=Ro(t),a=Ao(e*s),u=Ao(o*r),c=Ao(n*s),l=Ao(i*r);return a===u&&c===l}is0(){return this.equals(Lo)}negate(){return new jo(this.px,Ao(-this.py),this.pz)}double(){return this.add(this)}add(t){const{px:e,py:n,pz:r}=this,{px:o,py:i,pz:s}=Ro(t);let a=0n,u=0n,c=0n;const l=Ao(3n*Gr);let f=Ao(e*o),h=Ao(n*i),d=Ao(r*s),p=Ao(e+n),g=Ao(o+i);p=Ao(p*g),g=Ao(f+h),p=Ao(p-g),g=Ao(e+r);let y=Ao(o+s);return g=Ao(g*y),y=Ao(f+d),g=Ao(g-y),y=Ao(n+r),a=Ao(i+s),y=Ao(y*a),a=Ao(h+d),y=Ao(y-a),c=Ao(0n*g),a=Ao(l*d),c=Ao(a+c),a=Ao(h-c),c=Ao(h+c),u=Ao(a*c),h=Ao(f+f),h=Ao(h+f),d=Ao(0n*d),g=Ao(l*g),h=Ao(h+d),d=Ao(f-d),d=Ao(0n*d),g=Ao(g+d),f=Ao(h*g),u=Ao(u+f),f=Ao(y*g),a=Ao(p*a),a=Ao(a-f),f=Ao(p*h),c=Ao(y*c),c=Ao(c+f),new jo(a,u,c)}multiply(t,e=!0){if(!e&&0n===t)return Lo;if(Uo(t),1n===t)return this;if(this.equals(ko))return Zo(t).p;let n=Lo,r=ko;for(let o=this;t>0n;o=o.double(),t>>=1n)1n&t?n=n.add(o):e&&(r=r.add(o));return n}toAffine(){const{px:t,py:e,pz:n}=this;if(this.equals(Lo))return{x:0n,y:0n};if(1n===n)return{x:t,y:e};const r=So(n,Jr);return 1n!==Ao(n*r)&&to("inverse invalid"),{x:Ao(t*r),y:Ao(e*r)}}assertValidity(){const{x:t,y:e}=this.toAffine();return xo(t),xo(e),Ao(e*e)===_o(t)?this:to("bad point: not on curve")}toBytes(t=!0){const{x:e,y:n}=this.assertValidity().toAffine(),r=Fo(e);return t?wo(Bo(n),r):wo(Co(4),r,Fo(n))}static fromAffine(t){const{x:e,y:n}=t;return 0n===e&&0n===n?Lo:new jo(e,n,1n)}toHex(t){return so(this.toBytes(t))}static fromPrivateKey(t){return ko.multiply(Mo(t))}static fromHex(t){return jo.fromBytes(yo(t))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}toRawBytes(t){return this.toBytes(t)}}const ko=new jo(Kr,Xr,1n),Lo=new jo(0n,1n,0n);jo.BASE=ko,jo.ZERO=Lo;const No=t=>vo("0x"+(so(t)||"0")),Io=(t,e,n)=>No(t.subarray(e,n)),zo=2n**256n,Fo=t=>go(io(Eo(t,0n,zo),Qr)),Mo=t=>{const e=eo(t)?t:No(yo(t,Zr));return Eo(e,1n,Vr,"private key invalid 3")},$o=t=>t>Vr>>1n;class Do{r;s;recovery;constructor(t,e,n){this.r=Uo(t),this.s=Uo(e),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(t){ro(t,Qr);const e=Io(t,0,Zr),n=Io(t,Zr,Qr);return new Do(e,n)}toBytes(){const{r:t,s:e}=this;return wo(Fo(t),Fo(e))}addRecoveryBit(t){return new Do(this.r,this.s,t)}hasHighS(){return $o(this.s)}toCompactRawBytes(){return this.toBytes()}toCompactHex(){return so(this.toBytes())}recoverPublicKey(t){return Jo(this,t)}static fromCompact(t){return Do.fromBytes(yo(t,Qr))}assertValidity(){return this}normalizeS(){const{r:t,s:e,recovery:n}=this;return $o(e)?new Do(t,Oo(-e),n):this}}const qo=t=>{const e=8*t.length-256;e>1024&&to("msg invalid");const n=No(t);return e>0?n>>vo(e):n},Ho=t=>Oo(qo(ro(t))),Yo={lowS:!0},Wo=async(t,e,n=Yo)=>{const{seed:r,k2sig:o}=((t,e,n=Yo)=>{["der","recovered","canonical"].some((t=>t in n))&&to("option not supported");let{lowS:r,extraEntropy:o}=n;null==r&&(r=!0);const i=Fo,s=Ho(yo(t)),a=i(s),u=Mo(e),c=[i(u),a];o&&c.push(!0===o?bo(Zr):yo(o));const l=s;return{seed:wo(...c),k2sig:t=>{const e=qo(t);if(!(1n<=e&&e<Vr))return;const n=ko.multiply(e).toAffine(),o=Oo(n.x);if(0n===o)return;const i=So(e,Vr),s=Oo(i*Oo(l+Oo(u*o)));if(0n===s)return;let a=s,c=(n.x===o?0:2)|Number(1n&n.y);return r&&$o(s)&&(a=Oo(-s),c^=1),new Do(o,a,c)}}})(t,e,n),i=await(()=>{let t=oo(Zr),e=oo(Zr),n=0;const r=oo(0),o=()=>{t.fill(1),e.fill(0),n=0};{const i=(...n)=>Vo.hmacSha256Async(e,t,...n),s=async(n=r)=>{e=await i(Co(0),n),t=await i(),0!==n.length&&(e=await i(Co(1),n),t=await i())},a=async()=>(n++>=1e3&&to("drbg: tried 1000 values"),t=await i(),t);return async(t,e)=>{let n;for(o(),await s(t);!(n=e(await a()));)await s();return o(),n}}})()(r,o);return i},Jo=(t,e)=>{const{r:n,s:r,recovery:o}=t;[0,1,2,3].includes(o)||to("recovery id invalid");const i=Ho(yo(e,Zr)),s=2===o||3===o?n+Vr:n;xo(s);const a=Bo(vo(o)),u=wo(a,Fo(s)),c=jo.fromBytes(u),l=So(s,Vr);return((t,e,n)=>ko.multiply(e,!1).add(t.multiply(n,!1)).assertValidity())(c,Oo(-i*l),Oo(r*l))},Vo={hexToBytes:go,bytesToHex:so,concatBytes:wo,bytesToNumberBE:No,numberToBytesBE:Fo,mod:Ao,invert:So,hmacSha256Async:async(t,...e)=>{const n=mo()?.subtle??to("crypto.subtle must be defined"),r="HMAC",o=await n.importKey("raw",t,{name:r,hash:{name:"SHA-256"}},!1,["sign"]);return oo(await n.sign(r,o,wo(...e)))},hmacSha256Sync:void 0,hashToPrivateKey:t=>{((t=yo(t)).length<40||t.length>1024)&&to("expected 40-1024b");const e=Ao(No(t),Vr-1n);return Fo(e+1n)},randomBytes:bo},Ko=Math.ceil(32)+1;let Xo;const Go=(t,e)=>{const n=e.negate();return t?n:e},Zo=t=>{const e=Xo||(Xo=(()=>{const t=[];let e=ko,n=e;for(let r=0;r<Ko;r++){n=e,t.push(n);for(let r=1;r<128;r++)n=n.add(e),t.push(n);e=n.double()}return t})());let n=Lo,r=ko;const o=vo(255),i=vo(8);for(let s=0;s<Ko;s++){let a=Number(t&o);t>>=i,a>128&&(a-=256,t+=1n);const u=128*s,c=u,l=u+Math.abs(a)-1,f=s%2!=0,h=a<0;0===a?r=r.add(Go(f,e[c])):n=n.add(Go(h,e[l]))}return{p:n,f:r}};function Qo(t){if("array"===Lr(t)){return Wr(t.map((t=>"string"===Lr(t)?/^0x[0-9a-fA-F]+$/.test(t)?sr(t):isNaN(+t)?(new TextEncoder).encode(t):"0"===t?new Uint8Array([]):sr(Qn(+t)):"number"===Lr(t)||"bigint"===Lr(t)?0===t||t===BigInt(0)?new Uint8Array([]):sr(Qn(t)):"boolean"===Lr(t)?t?Uint8Array.from([1]):new Uint8Array([]):t)))}return"boolean"===Lr(t)?Wr(t?Uint8Array.from([1]):new Uint8Array([])):Wr(t)}class ti{constructor(){this.promiseWrapper=new Promise(((t,e)=>{this._resolve=t,this._reject=e})),this._restScope=["success","failure","error","login","timeout"];for(let t=0;t<this._restScope.length;t++){const e=this._restScope[t];e&&(this.promiseWrapper[e]=t=>{"function"==typeof t&&(this[`_${e}`]=t);const n=this.promiseWrapper;delete n[e];const r=this._restScope.slice();return r.splice(r.indexOf(e),1),r.every((t=>!!t&&!n[t]))&&delete n.rest,n})}this.promiseWrapper.rest=(t,e)=>{"function"==typeof t&&(this._rest=t);const n=this.promiseWrapper;if(delete n.rest,this._restScope=e||this._restScope,0===this._restScope.length)console.warn('[1Money client]: The ".rest(cb, scope)" scope is empty and will never be triggered!');else{let t=0;this._restScope.forEach((e=>{e&&(n[e]?delete n[e]:t++)})),t===this._restScope.length&&console.warn(`[1Money client]: The "${this._restScope.join(", ")}" had been called and the "rest" will never be triggered!`)}return n}}}const{request:ei,setting:ni,axios:ri}=new class{constructor(t){this._config=t||{},this.axios=En,this.parseError=this.parseError.bind(this),this.setting=this.setting.bind(this),this.request=this.request.bind(this)}parseError(t){var e,n,r,o,i,s,a,u,c;"string"==typeof t&&(t=new Error(t)),(!t||"object"!==Lr(t)&&"error"!==Lr(t))&&(t=new Error("Unknown error occurred"));const l=null!==(e=null==t?void 0:t.name)&&void 0!==e?e:"Error",f=null!==(o=null!==(n=null==t?void 0:t.message)&&void 0!==n?n:null===(r=null==t?void 0:t.toString)||void 0===r?void 0:r.call(t))&&void 0!==o?o:"Unknown error",h=null!==(i=null==t?void 0:t.stack)&&void 0!==i?i:"",d=null!==(a=null===(s=null==t?void 0:t.response)||void 0===s?void 0:s.status)&&void 0!==a?a:500,p=null!==(c=null===(u=null==t?void 0:t.response)||void 0===u?void 0:u.data)&&void 0!==c?c:void 0;return"number"!=typeof d||d<100||d>599?{name:"InvalidStatusError",message:"Invalid HTTP status code",stack:h,status:500,data:p}:{name:l,message:f,stack:h,status:d,data:p}}setting(t){if(!t)return console.warn("[1Money client]: setting method required correct parameters!");this._config=Object.assign(Object.assign({},this._config),t)}request(t){t.withCredentials="boolean"!=typeof t.withCredentials||t.withCredentials,t.headers=t.headers||{},t.headers.Accept=t.headers.Accept||"*/*",t.headers["X-Requested-With"]=t.headers["X-Requested-With"]||"XMLHttpRequest",t.headers["X-Content-Type-Options"]=t.headers["X-Content-Type-Options"]||"nosniff";const{onSuccess:n,onFailure:r,onLogin:o,onError:i,onTimeout:s,isSuccess:a,isLogin:u,timeout:c}=this._config,{onSuccess:l,onFailure:f,onLogin:h,onError:d,onTimeout:p,isSuccess:g,isLogin:y,timeout:m}=t,w={success:null!=g?g:a,login:null!=y?y:u},b=new ti;return Promise.resolve().then((()=>{var a,u,g,y,v,E,A,O,S,R,_,T,x,U,P,C,B,j,k,L;const N={success:null!==(y=null!==(g=null!==(u=null!==(a=b._success)&&void 0!==a?a:~b._restScope.indexOf("success")?b._rest:void 0)&&void 0!==u?u:l)&&void 0!==g?g:n)&&void 0!==y?y:(t,e)=>t,failure:null!==(O=null!==(A=null!==(E=null!==(v=b._failure)&&void 0!==v?v:~b._restScope.indexOf("failure")?b._rest:void 0)&&void 0!==E?E:f)&&void 0!==A?A:r)&&void 0!==O?O:(t,e)=>t,error:null!==(T=null!==(_=null!==(R=null!==(S=b._error)&&void 0!==S?S:~b._restScope.indexOf("error")?b._rest:void 0)&&void 0!==R?R:d)&&void 0!==_?_:i)&&void 0!==T?T:(t,e)=>t,login:null!==(C=null!==(P=null!==(U=null!==(x=b._login)&&void 0!==x?x:~b._restScope.indexOf("login")?b._rest:void 0)&&void 0!==U?U:h)&&void 0!==P?P:o)&&void 0!==C?C:(t,e)=>t,timeout:null!==(L=null!==(k=null!==(j=null!==(B=b._timeout)&&void 0!==B?B:~b._restScope.indexOf("timeout")?b._rest:void 0)&&void 0!==j?j:p)&&void 0!==k?k:s)&&void 0!==L?L:(t,e)=>t},I=(b._success||b._rest&&b._restScope.indexOf("success"),b._failure||b._rest&&b._restScope.indexOf("failure"),b._login||b._rest&&b._restScope.indexOf("login"),!!(b._error||b._rest&&~b._restScope.indexOf("error")||d||i)),z=!!(b._timeout||b._rest&&~b._restScope.indexOf("timeout")||p||s),F=!!(b._success||b._rest&&~b._restScope.indexOf("success")),M=!!(b._failure||b._rest&&~b._restScope.indexOf("failure")),$=!!(b._login||b._rest&&~b._restScope.indexOf("login")),D=!!(b._error||b._rest&&~b._restScope.indexOf("error")),q=!!(b._timeout||b._rest&&~b._restScope.indexOf("timeout")),H=(t,n)=>e(this,void 0,void 0,(function*(){try{let e=this.parseError(t);const r=yield Promise.resolve(N.error(e,n));D&&(e=r),I?b._resolve(e):b._reject(e)}catch(t){b._reject(this.parseError(t))}}));let Y=null,W=!1;const J=null!=m?m:c,V=()=>{null!==Y&&(clearTimeout(Y),Y=null)};J&&(Y=setTimeout((()=>e(this,void 0,void 0,(function*(){var e,n;try{W=!0,V();let n=this.parseError("timeout");const r=yield Promise.resolve(N.timeout(n,null!==(e=t.headers)&&void 0!==e?e:{}));q&&(n=r),z?b._resolve(n):b._reject(n)}catch(e){H(e,null!==(n=t.headers)&&void 0!==n?n:{})}}))),J)),this.axios(t).then((t=>e(this,void 0,void 0,(function*(){var e,n;if(W)return;V();const{status:r,data:o,headers:i}=t;try{const t=null===(e=w.success)||void 0===e?void 0:e.call(w,o,r,i),s=null===(n=w.login)||void 0===n?void 0:n.call(w,o,r,i);let a=o;if(s){const t=yield Promise.resolve(N.login(o,i));$&&(a=t)}else if(t){const t=yield Promise.resolve(N.success(o,i));F&&(a=t)}else{const t=yield Promise.resolve(N.failure(o,i));M&&(a=t)}b._resolve(a)}catch(t){H(t,i)}})))).catch((t=>e(this,void 0,void 0,(function*(){var e,n,r,o,i,s,a,u,c,l,f,h,d,p,g,y,m,v;if(W)return;V(),console.error(`[1Money client]: Error(${null!==(e=t.status)&&void 0!==e?e:500}, ${null!==(n=t.code)&&void 0!==n?n:"UNKNOWN"}), Message: ${t.message}, Config: ${null===(r=t.config)||void 0===r?void 0:r.method}, ${null!==(i=null===(o=t.config)||void 0===o?void 0:o.baseURL)&&void 0!==i?i:""}${null!==(a=null===(s=t.config)||void 0===s?void 0:s.url)&&void 0!==a?a:""}, ${JSON.stringify(null!==(c=null===(u=t.config)||void 0===u?void 0:u.headers)&&void 0!==c?c:{})}, Request: ${JSON.stringify(null!==(f=null===(l=t.config)||void 0===l?void 0:l.data)&&void 0!==f?f:{})};`);const E=null!==(d=null===(h=t.response)||void 0===h?void 0:h.status)&&void 0!==d?d:500,A=null!==(g=null===(p=t.response)||void 0===p?void 0:p.data)&&void 0!==g?g:{},O=null!==(m=null===(y=t.response)||void 0===y?void 0:y.headers)&&void 0!==m?m:{};try{let e=A;(null===(v=w.login)||void 0===v?void 0:v.call(w,A,E,O))?(e=yield Promise.resolve(N.login(e,O)),b._resolve(e)):H(t,O)}catch(t){H(t,O)}}))))})),b.promiseWrapper}}({isSuccess:(t,e)=>200===e&&0==t.code,isLogin:(t,e)=>401===e||401==t.code,timeout:1e4});function oi(t,e){return ei(Object.assign(Object.assign({},e),{method:"get",url:t}))}function ii(t,e,n){return ei(Object.assign(Object.assign({},n),{method:"post",url:t,data:e,headers:Object.assign({"Content-Type":"application/json"},null==n?void 0:n.headers)}))}function si(t){const{baseURL:e}=t,n=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["baseURL"]);ri.defaults.baseURL=e||("undefined"!=typeof window?location.origin:void 0),ni(n)}var ai={get:oi,post:ii,postForm:function(t,e,n){return ei(Object.assign(Object.assign({},n),{method:"post",url:t,data:e,headers:Object.assign({"Content-Type":"multipart/form-data"},null==n?void 0:n.headers)}))},del:function(t,e,n){return ei(Object.assign(Object.assign({},n),{method:"delete",url:t,data:e,headers:Object.assign({"Content-Type":"application/json"},null==n?void 0:n.headers)}))},put:function(t,e,n){return ei(Object.assign(Object.assign({},n),{method:"put",url:t,data:e,headers:Object.assign({"Content-Type":"application/json"},null==n?void 0:n.headers)}))},patch:function(t,e,n){return ei(Object.assign(Object.assign({},n),{method:"patch",url:t,data:e,headers:Object.assign({"Content-Type":"application/json"},null==n?void 0:n.headers)}))},setInitConfig:si,axiosStatic:ri};const ui="https://api.1money.network",ci="v1",li=`/${ci}/accounts`,fi={getNonce:t=>oi(`${li}/nonce?address=${t}`,{withCredentials:!1}),getTokenAccount:(t,e)=>oi(`${li}/token_account?address=${t}&token=${e}`,{withCredentials:!1})},hi=`/${ci}/checkpoints`,di={getNumber:()=>oi(`${hi}/number`,{withCredentials:!1}),getByHash:(t,e=!1)=>oi(`${hi}/by_hash?hash=${t}&full=${e}`,{withCredentials:!1}),getByNumber:(t,e=!1)=>oi(`${hi}/by_number?number=${t}&full=${e}`,{withCredentials:!1})},pi=`/${ci}/tokens`,gi={getTokenMetadata:t=>oi(`${pi}/token_metadata?token=${t}`,{withCredentials:!1}),manageBlacklist:t=>ii(`${pi}/manage_blacklist`,t,{withCredentials:!1}),manageWhitelist:t=>ii(`${pi}/manage_whitelist`,t,{withCredentials:!1}),burnToken:t=>ii(`${pi}/burn`,t,{withCredentials:!1}),grantAuthority:t=>ii(`${pi}/grant_authority`,t,{withCredentials:!1}),issueToken:t=>ii(`${pi}/issue`,t,{withCredentials:!1}),mintToken:t=>ii(`${pi}/mint`,t,{withCredentials:!1}),pauseToken:t=>ii(`${pi}/pause`,t,{withCredentials:!1}),updateMetadata:t=>ii(`${pi}/update_metadata`,t,{withCredentials:!1})},yi=`/${ci}/transactions`,mi={getByHash:t=>oi(`${yi}/by_hash?hash=${t}`,{withCredentials:!1}),getReceiptByHash:t=>oi(`${yi}/receipt/by_hash?hash=${t}`,{withCredentials:!1}),estimateFee:(t,e,n)=>{let r=`${yi}/estimate_fee?from=${t}&value=${e}`;return n&&(r+=`&token=${n}`),oi(r,{withCredentials:!1})},payment:t=>ii(`${yi}/payment`,t,{withCredentials:!1})},wi=`/${ci}/chains`,bi={getChainId:()=>oi(`${wi}/chain_id`,{withCredentials:!1})};var vi,Ei,Ai,Oi;function Si(t){const e=(null==t?void 0:t.network)||"mainnet";let n=ui;switch(e){case"mainnet":n=ui;break;case"testnet":n="https://api.testnet.1money.network";break;case"local":n="http://localhost:18555"}return si({baseURL:n,isSuccess:(t,e)=>200===e,timeout:(null==t?void 0:t.timeout)||1e4}),{accounts:fi,checkpoints:di,tokens:gi,transactions:mi,chain:bi}}!function(t){t.MasterMint="MasterMint",t.MintBurnTokens="MintBurnTokens",t.Pause="Pause",t.ManageList="ManageList",t.UpdateMetadata="UpdateMetadata"}(vi||(vi={})),function(t){t.Grant="Grant",t.Revoke="Revoke"}(Ei||(Ei={})),function(t){t.Add="Add",t.Remove="Remove"}(Ai||(Ai={})),function(t){t.Pause="Pause",t.Unpause="Unpause"}(Oi||(Oi={}));var Ri={api:Si,client:ai};t._typeof=Lr,t.api=Si,t.calcTxHash=function(t,e){const n=Qo(t),r=Wr("boolean"==typeof e.v?e.v?Uint8Array.from([1]):new Uint8Array([]):BigInt(e.v)),o=Wr(sr(e.r)),i=Wr(sr(e.s)),s=new Uint8Array(r.length+o.length+i.length);s.set(r,0),s.set(o,r.length),s.set(i,r.length+o.length);const a=function(t){if(t<56)return Uint8Array.from([192+t]);{const e=[];let n=t;for(;n>0;)e.unshift(255&n),n>>=8;return Uint8Array.from([247+e.length,...e])}}(n.length+s.length),u=new Uint8Array(a.length+n.length+s.length);return u.set(a,0),u.set(n,a.length),u.set(s,a.length+n.length),kr(u)},t.client=ai,t.default=Ri,t.deriveTokenAddress=function(t,e){const n=t.startsWith("0x")?sr(t):ar(t),r=e.startsWith("0x")?sr(e):ar(e),o=new Uint8Array(n.length+r.length);return o.set(n,0),o.set(r,n.length),Zn(sr(kr(o)).slice(12))},t.encodePayload=Qo,t.safePromiseAll=function(t){return t&&t.length?Promise.all(t):Promise.resolve([])},t.safePromiseLine=function(t){return e(this,void 0,void 0,(function*(){if(!t||!t.length)return[];const e=[];for(let n=0;n<t.length;n++)try{e.push(yield t[n](n))}catch(t){}return e}))},t.signMessage=function(t,n){return e(this,void 0,void 0,(function*(){const e=sr(kr(Qo(t))),r=sr(n),o=yield Wo(e,r,{lowS:!0}),i=o.toCompactRawBytes(),s=i.subarray(0,32),a=i.subarray(32,64);return{r:Zn(s),s:Zn(a),v:o.recovery}}))},t.toHex=function(t){const e=Lr(t);try{switch(e){case"boolean":return Gn(t);case"number":case"bigint":return Qn(t);case"string":return isNaN(+t)?er(t):Qn(+t);case"uint8array":case"uint16array":case"uint32array":case"int8array":case"int16array":case"int32array":case"arraybuffer":return Zn(t);case"array":return 0===t.length?"0x":t.every((t=>"number"==typeof t))?Zn(Uint8Array.from(t)):Zn(ar(JSON.stringify(t)));default:return Zn(ar(JSON.stringify(t)))}}catch(t){return console.error("[1Money toHex]: ",t),"0x"}},Object.defineProperty(t,"__esModule",{value:!0})}));
|