UNPKG

@mkody/twitch-emoticons

Version:

Gets Twitch, BTTV, FFZ and 7TV emotes as well as parsing text to emotes!

6 lines 365 kB
var Ja=Object.defineProperty;var lw=Object.getOwnPropertyDescriptor;var uw=Object.getOwnPropertyNames;var cw=Object.prototype.hasOwnProperty;var n=(i,e)=>Ja(i,"name",{value:e,configurable:!0});var dw=(i,e)=>()=>(i&&(e=i(i=0)),e);var u=(i,e)=>()=>(e||i((e={exports:{}}).exports,e),e.exports),hw=(i,e)=>{for(var t in e)Ja(i,t,{get:e[t],enumerable:!0})},pw=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of uw(e))!cw.call(i,a)&&a!==t&&Ja(i,a,{get:()=>e[a],enumerable:!(r=lw(e,a))||r.enumerable});return i};var b=i=>pw(Ja({},"__esModule",{value:!0}),i);var fr=u((zR,Wm)=>{var Bu=class i{static{n(this,"Emote")}constructor(e,t,r){if(new.target.name===i.name)throw new Error("Base Emote class cannot be used");this.fetcher=e.fetcher,this.channel=e,this.id=t,this.type=null,this._setup(r)}_setup(e){this.code=e.code}toLink(){return null}toString(){return this.code}toObject(){return{code:this.code,id:this.id,channel_id:this.channel.channel_id}}};Wm.exports=Bu});var qt=u((JR,Vm)=>{Vm.exports={Twitch:{CDN:n((i,e)=>`https://static-cdn.jtvnw.net/emoticons/v2/${i}/default/dark/${e+1}.0`,"CDN")},BTTV:{Global:"https://api.betterttv.net/3/cached/emotes/global",Channel:n(i=>`https://api.betterttv.net/3/cached/users/twitch/${i}`,"Channel"),CDN:n((i,e)=>`https://cdn.betterttv.net/emote/${i}/${e+1}x.webp`,"CDN")},SevenTV:{Global:"https://7tv.io/v3/emote-sets/global",Channel:n(i=>`https://7tv.io/v3/users/twitch/${i}`,"Channel"),CDN:n((i,e)=>`https://cdn.7tv.app/emote/${i}/${e}`,"CDN")},FFZ:{sets:{Global:3,Modifiers:1532818},Set:n(i=>`https://api.frankerfacez.com/v1/set/${i}`,"Set"),Channel:n(i=>`https://api.frankerfacez.com/v1/room/id/${i}`,"Channel"),CDN:n((i,e)=>`https://cdn.frankerfacez.com/emote/${i}/${e}`,"CDN"),CDNAnimated:n((i,e)=>`https://cdn.frankerfacez.com/emote/${i}/animated/${e}.webp`,"CDNAnimated")},Templates:{html:'<img alt="{name}" title="{name}" class="twitch-emote twitch-emote-{size}" src="{link}">',markdown:'![{name}]({link} "{name}")',bbcode:"[img]{link}[/img]",plain:"{link}"}}});var ju=u((XR,$m)=>{var mw=fr(),_w=qt(),Ou=class i extends mw{static{n(this,"BTTVEmote")}constructor(e,t,r){super(e,t,r),this.type="bttv"}get owner(){return this.fetcher.channels.get(this.ownerName)}_setup(e){super._setup(e),this.ownerName="user"in e?e.user.name:null,this.animated=e.animated,this.imageType="webp"}toLink(e=0){return _w.BTTV.CDN(this.id,e)}toObject(){return Object.assign({},super.toObject(),{animated:this.animated,ownerName:this.ownerName,type:this.type})}static fromObject(e,t=null){return new i(t,e.id,{code:e.code,animated:e.animated,user:{name:e.ownerName}})}};$m.exports=Ou});var Za=u((eU,zm)=>{var ku=class extends Map{static{n(this,"Collection")}find(e,t){if(typeof e=="string"){if(typeof t>"u")return null;for(let r of this.values())if(r[e]===t)return r;return null}if(typeof e=="function"){let r=0;for(let a of this.values()){if(e(a,r,this))return a;r++}return null}return null}filter(e,t){t&&(e=e.bind(t));let r=new this.constructor,a=0;for(let[s,o]of this)e(o,a,this)&&r.set(s,o),a++;return r}map(e,t){t&&(e=e.bind(t));let r=new Array(this.size),a=0;for(let s of this.values())r[a]=e(s,a,this),a++;return r}};zm.exports=ku});var Lu=u((rU,Km)=>{var yw=Za(),Mu=class{static{n(this,"Channel")}constructor(e,t){this.fetcher=e,this.channel_id=t,this.emotes=new yw}fetchBTTVEmotes(){return this.fetcher.fetchBTTVEmotes(this.id)}fetchFFZEmotes(){return this.fetcher.fetchFFZEmotes(this.id)}fetchSevenTVEmotes(){return this.fetcher.fetchSevenTVEmotes(this.id)}};Km.exports=Mu});var Nu=u((nU,Zm)=>{var fw=fr(),Jm=qt(),Fu=class i extends fw{static{n(this,"FFZEmote")}constructor(e,t,r){super(e,t,r),this.type="ffz"}get owner(){return this.fetcher.channels.get(this.ownerName)}_setup(e){super._setup(e),this.code=e.name,this.ownerName="owner"in e?e.owner.name:null,this.sizes="animated"in e?Object.keys(e.animated):Object.keys(e.urls),this.animated="animated"in e,this.imageType="animated"in e?"webp":"png",this.modifier=e.modifier&&(e.modifier_flags&1)!==0}toLink(e=0){return e=this.sizes[e],this.animated?Jm.FFZ.CDNAnimated(this.id,e):Jm.FFZ.CDN(this.id,e)}toObject(){return Object.assign({},super.toObject(),{animated:this.animated,sizes:this.sizes,ownerName:this.ownerName,type:this.type,modifier:this.modifier})}static fromObject(e,t=null){let r=e.sizes.reduce((a,s)=>(a[s]=s,a),{});return new i(t,e.id,{code:e.code,name:e.code,urls:r,...e.animated?{animated:r}:{},owner:{name:e.ownerName},modifier:e.modifier,modifier_flags:e.modifier})}};Zm.exports=Fu});var Gu=u((sU,Xm)=>{var gw=fr(),bw=qt(),Qu=class i extends gw{static{n(this,"SevenTVEmote")}constructor(e,t,r){super(e,t,r),this.type="7tv"}get owner(){return this.fetcher.channels.get(this.ownerName)}_setup(e){super._setup(e),this.code=e.name,this.ownerName="owner"in e.data?e.data.owner.display_name:null,this.sizes=e.data.host.files.filter(t=>t.format===this.channel.format.toUpperCase()).map(t=>t.name),this.animated=e.data.animated,this.imageType=this.channel.format}toLink(e=0){return e=this.sizes[e],bw.SevenTV.CDN(this.id,e)}toObject(){return Object.assign({},super.toObject(),{animated:this.animated,sizes:this.sizes,ownerName:this.ownerName,type:this.type,imageType:this.imageType})}static fromObject(e,t){let r=e.sizes.map(a=>({format:t.format.toUpperCase(),name:a}));return new i(t,e.id,{code:e.code,name:e.code,data:{animated:e.animated,owner:{display_name:e.ownerName},host:{files:r}}})}};Xm.exports=Qu});var Vu=u((lU,Ym)=>{var xw=fr(),ww=qt(),Wu=class i extends xw{static{n(this,"TwitchEmote")}constructor(e,t,r){super(e,t,r),this.type="twitch"}get owner(){return this.channel}_setup(e){super._setup(e),this.set=e.emoticon_set,this.animated="animated"in e.formats,this.imageType="animated"in e.formats?"gif":"png"}toLink(e=0){return ww.Twitch.CDN(this.id,e)}toObject(){return Object.assign({},super.toObject(),{animated:this.animated,set:this.set,type:this.type})}static fromObject(e,t=null){return new i(t,e.id,{code:e.code,animated:e.animated,emoticon_set:e.set,formats:e.animated?{animated:e.animated}:{}})}};Ym.exports=Wu});var k_=u((cU,j_)=>{"use strict";function p_(i,e){return n(function(){return i.apply(e,arguments)},"wrap")}n(p_,"bind");var{toString:vw}=Object.prototype,{getPrototypeOf:nc}=Object,{iterator:ns,toStringTag:m_}=Symbol,as=(i=>e=>{let t=vw.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Ke=n(i=>(i=i.toLowerCase(),e=>as(e)===i),"kindOfTest"),ss=n(i=>e=>typeof e===i,"typeOfTest"),{isArray:xr}=Array,li=ss("undefined");function ui(i){return i!==null&&!li(i)&&i.constructor!==null&&!li(i.constructor)&&Ce(i.constructor.isBuffer)&&i.constructor.isBuffer(i)}n(ui,"isBuffer");var __=Ke("ArrayBuffer");function Sw(i){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(i):e=i&&i.buffer&&__(i.buffer),e}n(Sw,"isArrayBufferView");var Hw=ss("string"),Ce=ss("function"),y_=ss("number"),ci=n(i=>i!==null&&typeof i=="object","isObject"),Cw=n(i=>i===!0||i===!1,"isBoolean"),Xa=n(i=>{if(as(i)!=="object")return!1;let e=nc(i);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(m_ in i)&&!(ns in i)},"isPlainObject"),qw=n(i=>{if(!ci(i)||ui(i))return!1;try{return Object.keys(i).length===0&&Object.getPrototypeOf(i)===Object.prototype}catch{return!1}},"isEmptyObject"),Ew=Ke("Date"),Pw=Ke("File"),Aw=Ke("Blob"),Dw=Ke("FileList"),Iw=n(i=>ci(i)&&Ce(i.pipe),"isStream"),Tw=n(i=>{let e;return i&&(typeof FormData=="function"&&i instanceof FormData||Ce(i.append)&&((e=as(i))==="formdata"||e==="object"&&Ce(i.toString)&&i.toString()==="[object FormData]"))},"isFormData"),Rw=Ke("URLSearchParams"),[Uw,Bw,Ow,jw]=["ReadableStream","Request","Response","Headers"].map(Ke),kw=n(i=>i.trim?i.trim():i.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),"trim");function di(i,e,{allOwnKeys:t=!1}={}){if(i===null||typeof i>"u")return;let r,a;if(typeof i!="object"&&(i=[i]),xr(i))for(r=0,a=i.length;r<a;r++)e.call(null,i[r],r,i);else{if(ui(i))return;let s=t?Object.getOwnPropertyNames(i):Object.keys(i),o=s.length,l;for(r=0;r<o;r++)l=s[r],e.call(null,i[l],l,i)}}n(di,"forEach");function f_(i,e){if(ui(i))return null;e=e.toLowerCase();let t=Object.keys(i),r=t.length,a;for(;r-- >0;)if(a=t[r],e===a.toLowerCase())return a;return null}n(f_,"findKey");var Kt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,g_=n(i=>!li(i)&&i!==Kt,"isContextDefined");function Ju(){let{caseless:i}=g_(this)&&this||{},e={},t=n((r,a)=>{let s=i&&f_(e,a)||a;Xa(e[s])&&Xa(r)?e[s]=Ju(e[s],r):Xa(r)?e[s]=Ju({},r):xr(r)?e[s]=r.slice():e[s]=r},"assignValue");for(let r=0,a=arguments.length;r<a;r++)arguments[r]&&di(arguments[r],t);return e}n(Ju,"merge");var Mw=n((i,e,t,{allOwnKeys:r}={})=>(di(e,(a,s)=>{t&&Ce(a)?i[s]=p_(a,t):i[s]=a},{allOwnKeys:r}),i),"extend"),Lw=n(i=>(i.charCodeAt(0)===65279&&(i=i.slice(1)),i),"stripBOM"),Fw=n((i,e,t,r)=>{i.prototype=Object.create(e.prototype,r),i.prototype.constructor=i,Object.defineProperty(i,"super",{value:e.prototype}),t&&Object.assign(i.prototype,t)},"inherits"),Nw=n((i,e,t,r)=>{let a,s,o,l={};if(e=e||{},i==null)return e;do{for(a=Object.getOwnPropertyNames(i),s=a.length;s-- >0;)o=a[s],(!r||r(o,i,e))&&!l[o]&&(e[o]=i[o],l[o]=!0);i=t!==!1&&nc(i)}while(i&&(!t||t(i,e))&&i!==Object.prototype);return e},"toFlatObject"),Qw=n((i,e,t)=>{i=String(i),(t===void 0||t>i.length)&&(t=i.length),t-=e.length;let r=i.indexOf(e,t);return r!==-1&&r===t},"endsWith"),Gw=n(i=>{if(!i)return null;if(xr(i))return i;let e=i.length;if(!y_(e))return null;let t=new Array(e);for(;e-- >0;)t[e]=i[e];return t},"toArray"),Ww=(i=>e=>i&&e instanceof i)(typeof Uint8Array<"u"&&nc(Uint8Array)),Vw=n((i,e)=>{let r=(i&&i[ns]).call(i),a;for(;(a=r.next())&&!a.done;){let s=a.value;e.call(i,s[0],s[1])}},"forEachEntry"),$w=n((i,e)=>{let t,r=[];for(;(t=i.exec(e))!==null;)r.push(t);return r},"matchAll"),zw=Ke("HTMLFormElement"),Kw=n(i=>i.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,n(function(t,r,a){return r.toUpperCase()+a},"replacer")),"toCamelCase"),e_=(({hasOwnProperty:i})=>(e,t)=>i.call(e,t))(Object.prototype),Jw=Ke("RegExp"),b_=n((i,e)=>{let t=Object.getOwnPropertyDescriptors(i),r={};di(t,(a,s)=>{let o;(o=e(a,s,i))!==!1&&(r[s]=o||a)}),Object.defineProperties(i,r)},"reduceDescriptors"),Zw=n(i=>{b_(i,(e,t)=>{if(Ce(i)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;let r=i[t];if(Ce(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},"freezeMethods"),Xw=n((i,e)=>{let t={},r=n(a=>{a.forEach(s=>{t[s]=!0})},"define");return xr(i)?r(i):r(String(i).split(e)),t},"toObjectSet"),Yw=n(()=>{},"noop"),ev=n((i,e)=>i!=null&&Number.isFinite(i=+i)?i:e,"toFiniteNumber");function tv(i){return!!(i&&Ce(i.append)&&i[m_]==="FormData"&&i[ns])}n(tv,"isSpecCompliantForm");var rv=n(i=>{let e=new Array(10),t=n((r,a)=>{if(ci(r)){if(e.indexOf(r)>=0)return;if(ui(r))return r;if(!("toJSON"in r)){e[a]=r;let s=xr(r)?[]:{};return di(r,(o,l)=>{let d=t(o,a+1);!li(d)&&(s[l]=d)}),e[a]=void 0,s}}return r},"visit");return t(i,0)},"toJSONObject"),iv=Ke("AsyncFunction"),nv=n(i=>i&&(ci(i)||Ce(i))&&Ce(i.then)&&Ce(i.catch),"isThenable"),x_=((i,e)=>i?setImmediate:e?((t,r)=>(Kt.addEventListener("message",({source:a,data:s})=>{a===Kt&&s===t&&r.length&&r.shift()()},!1),a=>{r.push(a),Kt.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",Ce(Kt.postMessage)),av=typeof queueMicrotask<"u"?queueMicrotask.bind(Kt):typeof process<"u"&&process.nextTick||x_,sv=n(i=>i!=null&&Ce(i[ns]),"isIterable"),_={isArray:xr,isArrayBuffer:__,isBuffer:ui,isFormData:Tw,isArrayBufferView:Sw,isString:Hw,isNumber:y_,isBoolean:Cw,isObject:ci,isPlainObject:Xa,isEmptyObject:qw,isReadableStream:Uw,isRequest:Bw,isResponse:Ow,isHeaders:jw,isUndefined:li,isDate:Ew,isFile:Pw,isBlob:Aw,isRegExp:Jw,isFunction:Ce,isStream:Iw,isURLSearchParams:Rw,isTypedArray:Ww,isFileList:Dw,forEach:di,merge:Ju,extend:Mw,trim:kw,stripBOM:Lw,inherits:Fw,toFlatObject:Nw,kindOf:as,kindOfTest:Ke,endsWith:Qw,toArray:Gw,forEachEntry:Vw,matchAll:$w,isHTMLForm:zw,hasOwnProperty:e_,hasOwnProp:e_,reduceDescriptors:b_,freezeMethods:Zw,toObjectSet:Xw,toCamelCase:Kw,noop:Yw,toFiniteNumber:ev,findKey:f_,global:Kt,isContextDefined:g_,isSpecCompliantForm:tv,toJSONObject:rv,isAsyncFn:iv,isThenable:nv,setImmediate:x_,asap:av,isIterable:sv};function I(i,e,t,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=i,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}n(I,"AxiosError");_.inherits(I,Error,{toJSON:n(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:_.toJSONObject(this.config),code:this.code,status:this.status}},"toJSON")});var w_=I.prototype,v_={};["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(i=>{v_[i]={value:i}});Object.defineProperties(I,v_);Object.defineProperty(w_,"isAxiosError",{value:!0});I.from=(i,e,t,r,a,s)=>{let o=Object.create(w_);return _.toFlatObject(i,o,n(function(d){return d!==Error.prototype},"filter"),l=>l!=="isAxiosError"),I.call(o,i.message,e,t,r,a),o.cause=i,o.name=i.name,s&&Object.assign(o,s),o};var ov=null;function Zu(i){return _.isPlainObject(i)||_.isArray(i)}n(Zu,"isVisitable");function S_(i){return _.endsWith(i,"[]")?i.slice(0,-2):i}n(S_,"removeBrackets");function t_(i,e,t){return i?i.concat(e).map(n(function(a,s){return a=S_(a),!t&&s?"["+a+"]":a},"each")).join(t?".":""):e}n(t_,"renderKey");function lv(i){return _.isArray(i)&&!i.some(Zu)}n(lv,"isFlatArray");var uv=_.toFlatObject(_,{},null,n(function(e){return/^is[A-Z]/.test(e)},"filter"));function os(i,e,t){if(!_.isObject(i))throw new TypeError("target must be an object");e=e||new FormData,t=_.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,n(function(P,v){return!_.isUndefined(v[P])},"defined"));let r=t.metaTokens,a=t.visitor||p,s=t.dots,o=t.indexes,d=(t.Blob||typeof Blob<"u"&&Blob)&&_.isSpecCompliantForm(e);if(!_.isFunction(a))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(_.isDate(w))return w.toISOString();if(_.isBoolean(w))return w.toString();if(!d&&_.isBlob(w))throw new I("Blob is not supported. Use a Buffer instead.");return _.isArrayBuffer(w)||_.isTypedArray(w)?d&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}n(h,"convertValue");function p(w,P,v){let B=w;if(w&&!v&&typeof w=="object"){if(_.endsWith(P,"{}"))P=r?P:P.slice(0,-2),w=JSON.stringify(w);else if(_.isArray(w)&&lv(w)||(_.isFileList(w)||_.endsWith(P,"[]"))&&(B=_.toArray(w)))return P=S_(P),B.forEach(n(function($,z){!(_.isUndefined($)||$===null)&&e.append(o===!0?t_([P],z,s):o===null?P:P+"[]",h($))},"each")),!1}return Zu(w)?!0:(e.append(t_(v,P,s),h(w)),!1)}n(p,"defaultVisitor");let x=[],q=Object.assign(uv,{defaultVisitor:p,convertValue:h,isVisitable:Zu});function E(w,P){if(!_.isUndefined(w)){if(x.indexOf(w)!==-1)throw Error("Circular reference detected in "+P.join("."));x.push(w),_.forEach(w,n(function(B,V){(!(_.isUndefined(B)||B===null)&&a.call(e,B,_.isString(V)?V.trim():V,P,q))===!0&&E(B,P?P.concat(V):[V])},"each")),x.pop()}}if(n(E,"build"),!_.isObject(i))throw new TypeError("data must be an object");return E(i),e}n(os,"toFormData");function r_(i){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(i).replace(/[!'()~]|%20|%00/g,n(function(r){return e[r]},"replacer"))}n(r_,"encode$1");function ac(i,e){this._pairs=[],i&&os(i,this,e)}n(ac,"AxiosURLSearchParams");var H_=ac.prototype;H_.append=n(function(e,t){this._pairs.push([e,t])},"append");H_.toString=n(function(e){let t=e?function(r){return e.call(this,r,r_)}:r_;return this._pairs.map(n(function(a){return t(a[0])+"="+t(a[1])},"each"),"").join("&")},"toString");function cv(i){return encodeURIComponent(i).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}n(cv,"encode");function C_(i,e,t){if(!e)return i;let r=t&&t.encode||cv;_.isFunction(t)&&(t={serialize:t});let a=t&&t.serialize,s;if(a?s=a(e,t):s=_.isURLSearchParams(e)?e.toString():new ac(e,t).toString(r),s){let o=i.indexOf("#");o!==-1&&(i=i.slice(0,o)),i+=(i.indexOf("?")===-1?"?":"&")+s}return i}n(C_,"buildURL");var Xu=class{static{n(this,"InterceptorManager")}constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_.forEach(this.handlers,n(function(r){r!==null&&e(r)},"forEachHandler"))}},i_=Xu,q_={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dv=typeof URLSearchParams<"u"?URLSearchParams:ac,hv=typeof FormData<"u"?FormData:null,pv=typeof Blob<"u"?Blob:null,mv={isBrowser:!0,classes:{URLSearchParams:dv,FormData:hv,Blob:pv},protocols:["http","https","file","blob","url","data"]},sc=typeof window<"u"&&typeof document<"u",Yu=typeof navigator=="object"&&navigator||void 0,_v=sc&&(!Yu||["ReactNative","NativeScript","NS"].indexOf(Yu.product)<0),yv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fv=sc&&window.location.href||"http://localhost",gv=Object.freeze({__proto__:null,hasBrowserEnv:sc,hasStandardBrowserWebWorkerEnv:yv,hasStandardBrowserEnv:_v,navigator:Yu,origin:fv}),ve={...gv,...mv};function bv(i,e){return os(i,new ve.classes.URLSearchParams,{visitor:n(function(t,r,a,s){return ve.isNode&&_.isBuffer(t)?(this.append(r,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},"visitor"),...e})}n(bv,"toURLEncodedForm");function xv(i){return _.matchAll(/\w+|\[(\w*)]/g,i).map(e=>e[0]==="[]"?"":e[1]||e[0])}n(xv,"parsePropPath");function wv(i){let e={},t=Object.keys(i),r,a=t.length,s;for(r=0;r<a;r++)s=t[r],e[s]=i[s];return e}n(wv,"arrayToObject");function E_(i){function e(t,r,a,s){let o=t[s++];if(o==="__proto__")return!0;let l=Number.isFinite(+o),d=s>=t.length;return o=!o&&_.isArray(a)?a.length:o,d?(_.hasOwnProp(a,o)?a[o]=[a[o],r]:a[o]=r,!l):((!a[o]||!_.isObject(a[o]))&&(a[o]=[]),e(t,r,a[o],s)&&_.isArray(a[o])&&(a[o]=wv(a[o])),!l)}if(n(e,"buildPath"),_.isFormData(i)&&_.isFunction(i.entries)){let t={};return _.forEachEntry(i,(r,a)=>{e(xv(r),a,t,0)}),t}return null}n(E_,"formDataToJSON");function vv(i,e,t){if(_.isString(i))try{return(e||JSON.parse)(i),_.trim(i)}catch(r){if(r.name!=="SyntaxError")throw r}return(t||JSON.stringify)(i)}n(vv,"stringifySafely");var oc={transitional:q_,adapter:["xhr","http","fetch"],transformRequest:[n(function(e,t){let r=t.getContentType()||"",a=r.indexOf("application/json")>-1,s=_.isObject(e);if(s&&_.isHTMLForm(e)&&(e=new FormData(e)),_.isFormData(e))return a?JSON.stringify(E_(e)):e;if(_.isArrayBuffer(e)||_.isBuffer(e)||_.isStream(e)||_.isFile(e)||_.isBlob(e)||_.isReadableStream(e))return e;if(_.isArrayBufferView(e))return e.buffer;if(_.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return bv(e,this.formSerializer).toString();if((l=_.isFileList(e))||r.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return os(l?{"files[]":e}:e,d&&new d,this.formSerializer)}}return s||a?(t.setContentType("application/json",!1),vv(e)):e},"transformRequest")],transformResponse:[n(function(e){let t=this.transitional||oc.transitional,r=t&&t.forcedJSONParsing,a=this.responseType==="json";if(_.isResponse(e)||_.isReadableStream(e))return e;if(e&&_.isString(e)&&(r&&!this.responseType||a)){let o=!(t&&t.silentJSONParsing)&&a;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?I.from(l,I.ERR_BAD_RESPONSE,this,null,this.response):l}}return e},"transformResponse")],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:n(function(e){return e>=200&&e<300},"validateStatus"),headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch"],i=>{oc.headers[i]={}});var lc=oc,Sv=_.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"]),Hv=n(i=>{let e={},t,r,a;return i&&i.split(` `).forEach(n(function(o){a=o.indexOf(":"),t=o.substring(0,a).trim().toLowerCase(),r=o.substring(a+1).trim(),!(!t||e[t]&&Sv[t])&&(t==="set-cookie"?e[t]?e[t].push(r):e[t]=[r]:e[t]=e[t]?e[t]+", "+r:r)},"parser")),e},"parseHeaders"),n_=Symbol("internals");function oi(i){return i&&String(i).trim().toLowerCase()}n(oi,"normalizeHeader");function Ya(i){return i===!1||i==null?i:_.isArray(i)?i.map(Ya):String(i)}n(Ya,"normalizeValue");function Cv(i){let e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=t.exec(i);)e[r[1]]=r[2];return e}n(Cv,"parseTokens");var qv=n(i=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(i.trim()),"isValidHeaderName");function $u(i,e,t,r,a){if(_.isFunction(r))return r.call(this,e,t);if(a&&(e=t),!!_.isString(e)){if(_.isString(r))return e.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(e)}}n($u,"matchHeaderValue");function Ev(i){return i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}n(Ev,"formatHeader");function Pv(i,e){let t=_.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(i,r+t,{value:n(function(a,s,o){return this[r].call(this,e,a,s,o)},"value"),configurable:!0})})}n(Pv,"buildAccessors");var gr=class{static{n(this,"AxiosHeaders")}constructor(e){e&&this.set(e)}set(e,t,r){let a=this;function s(l,d,h){let p=oi(d);if(!p)throw new Error("header name must be a non-empty string");let x=_.findKey(a,p);(!x||a[x]===void 0||h===!0||h===void 0&&a[x]!==!1)&&(a[x||d]=Ya(l))}n(s,"setHeader");let o=n((l,d)=>_.forEach(l,(h,p)=>s(h,p,d)),"setHeaders");if(_.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(_.isString(e)&&(e=e.trim())&&!qv(e))o(Hv(e),t);else if(_.isObject(e)&&_.isIterable(e)){let l={},d,h;for(let p of e){if(!_.isArray(p))throw TypeError("Object iterator must return a key-value pair");l[h=p[0]]=(d=l[h])?_.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}o(l,t)}else e!=null&&s(t,e,r);return this}get(e,t){if(e=oi(e),e){let r=_.findKey(this,e);if(r){let a=this[r];if(!t)return a;if(t===!0)return Cv(a);if(_.isFunction(t))return t.call(this,a,r);if(_.isRegExp(t))return t.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=oi(e),e){let r=_.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||$u(this,this[r],r,t)))}return!1}delete(e,t){let r=this,a=!1;function s(o){if(o=oi(o),o){let l=_.findKey(r,o);l&&(!t||$u(r,r[l],l,t))&&(delete r[l],a=!0)}}return n(s,"deleteHeader"),_.isArray(e)?e.forEach(s):s(e),a}clear(e){let t=Object.keys(this),r=t.length,a=!1;for(;r--;){let s=t[r];(!e||$u(this,this[s],s,e,!0))&&(delete this[s],a=!0)}return a}normalize(e){let t=this,r={};return _.forEach(this,(a,s)=>{let o=_.findKey(r,s);if(o){t[o]=Ya(a),delete t[s];return}let l=e?Ev(s):String(s).trim();l!==s&&delete t[s],t[l]=Ya(a),r[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return _.forEach(this,(r,a)=>{r!=null&&r!==!1&&(t[a]=e&&_.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(a=>r.set(a)),r}static accessor(e){let r=(this[n_]=this[n_]={accessors:{}}).accessors,a=this.prototype;function s(o){let l=oi(o);r[l]||(Pv(a,o),r[l]=!0)}return n(s,"defineAccessor"),_.isArray(e)?e.forEach(s):s(e),this}};gr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(gr.prototype,({value:i},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:n(()=>i,"get"),set(r){this[t]=r}}});_.freezeMethods(gr);var ze=gr;function zu(i,e){let t=this||lc,r=e||t,a=ze.from(r.headers),s=r.data;return _.forEach(i,n(function(l){s=l.call(t,s,a.normalize(),e?e.status:void 0)},"transform")),a.normalize(),s}n(zu,"transformData");function P_(i){return!!(i&&i.__CANCEL__)}n(P_,"isCancel");function wr(i,e,t){I.call(this,i??"canceled",I.ERR_CANCELED,e,t),this.name="CanceledError"}n(wr,"CanceledError");_.inherits(wr,I,{__CANCEL__:!0});function A_(i,e,t){let r=t.config.validateStatus;!t.status||!r||r(t.status)?i(t):e(new I("Request failed with status code "+t.status,[I.ERR_BAD_REQUEST,I.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}n(A_,"settle");function Av(i){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return e&&e[1]||""}n(Av,"parseProtocol");function Dv(i,e){i=i||10;let t=new Array(i),r=new Array(i),a=0,s=0,o;return e=e!==void 0?e:1e3,n(function(d){let h=Date.now(),p=r[s];o||(o=h),t[a]=d,r[a]=h;let x=s,q=0;for(;x!==a;)q+=t[x++],x=x%i;if(a=(a+1)%i,a===s&&(s=(s+1)%i),h-o<e)return;let E=p&&h-p;return E?Math.round(q*1e3/E):void 0},"push")}n(Dv,"speedometer");function Iv(i,e){let t=0,r=1e3/e,a,s,o=n((h,p=Date.now())=>{t=p,a=null,s&&(clearTimeout(s),s=null),i(...h)},"invoke");return[n((...h)=>{let p=Date.now(),x=p-t;x>=r?o(h,p):(a=h,s||(s=setTimeout(()=>{s=null,o(a)},r-x)))},"throttled"),n(()=>a&&o(a),"flush")]}n(Iv,"throttle");var rs=n((i,e,t=3)=>{let r=0,a=Dv(50,250);return Iv(s=>{let o=s.loaded,l=s.lengthComputable?s.total:void 0,d=o-r,h=a(d),p=o<=l;r=o;let x={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:h||void 0,estimated:h&&l&&p?(l-o)/h:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};i(x)},t)},"progressEventReducer"),a_=n((i,e)=>{let t=i!=null;return[r=>e[0]({lengthComputable:t,total:i,loaded:r}),e[1]]},"progressEventDecorator"),s_=n(i=>(...e)=>_.asap(()=>i(...e)),"asyncDecorator"),Tv=ve.hasStandardBrowserEnv?((i,e)=>t=>(t=new URL(t,ve.origin),i.protocol===t.protocol&&i.host===t.host&&(e||i.port===t.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,Rv=ve.hasStandardBrowserEnv?{write(i,e,t,r,a,s){let o=[i+"="+encodeURIComponent(e)];_.isNumber(t)&&o.push("expires="+new Date(t).toGMTString()),_.isString(r)&&o.push("path="+r),_.isString(a)&&o.push("domain="+a),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(i){let e=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(i){this.write(i,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Uv(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}n(Uv,"isAbsoluteURL");function Bv(i,e){return e?i.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):i}n(Bv,"combineURLs");function D_(i,e,t){let r=!Uv(e);return i&&(r||t==!1)?Bv(i,e):e}n(D_,"buildFullPath");var o_=n(i=>i instanceof ze?{...i}:i,"headersToObject");function Jt(i,e){e=e||{};let t={};function r(h,p,x,q){return _.isPlainObject(h)&&_.isPlainObject(p)?_.merge.call({caseless:q},h,p):_.isPlainObject(p)?_.merge({},p):_.isArray(p)?p.slice():p}n(r,"getMergedValue");function a(h,p,x,q){if(_.isUndefined(p)){if(!_.isUndefined(h))return r(void 0,h,x,q)}else return r(h,p,x,q)}n(a,"mergeDeepProperties");function s(h,p){if(!_.isUndefined(p))return r(void 0,p)}n(s,"valueFromConfig2");function o(h,p){if(_.isUndefined(p)){if(!_.isUndefined(h))return r(void 0,h)}else return r(void 0,p)}n(o,"defaultToConfig2");function l(h,p,x){if(x in e)return r(h,p);if(x in i)return r(void 0,h)}n(l,"mergeDirectKeys");let d={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:n((h,p,x)=>a(o_(h),o_(p),x,!0),"headers")};return _.forEach(Object.keys({...i,...e}),n(function(p){let x=d[p]||a,q=x(i[p],e[p],p);_.isUndefined(q)&&x!==l||(t[p]=q)},"computeConfigValue")),t}n(Jt,"mergeConfig");var I_=n(i=>{let e=Jt({},i),{data:t,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:s,headers:o,auth:l}=e;e.headers=o=ze.from(o),e.url=C_(D_(e.baseURL,e.url,e.allowAbsoluteUrls),i.params,i.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(_.isFormData(t)){if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){let[h,...p]=d?d.split(";").map(x=>x.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...p].join("; "))}}if(ve.hasStandardBrowserEnv&&(r&&_.isFunction(r)&&(r=r(e)),r||r!==!1&&Tv(e.url))){let h=a&&s&&Rv.read(s);h&&o.set(a,h)}return e},"resolveConfig"),Ov=typeof XMLHttpRequest<"u",jv=Ov&&function(i){return new Promise(n(function(t,r){let a=I_(i),s=a.data,o=ze.from(a.headers).normalize(),{responseType:l,onUploadProgress:d,onDownloadProgress:h}=a,p,x,q,E,w;function P(){E&&E(),w&&w(),a.cancelToken&&a.cancelToken.unsubscribe(p),a.signal&&a.signal.removeEventListener("abort",p)}n(P,"done");let v=new XMLHttpRequest;v.open(a.method.toUpperCase(),a.url,!0),v.timeout=a.timeout;function B(){if(!v)return;let $=ze.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),xe={data:!l||l==="text"||l==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:$,config:i,request:v};A_(n(function(he){t(he),P()},"_resolve"),n(function(he){r(he),P()},"_reject"),xe),v=null}n(B,"onloadend"),"onloadend"in v?v.onloadend=B:v.onreadystatechange=n(function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(B)},"handleLoad"),v.onabort=n(function(){v&&(r(new I("Request aborted",I.ECONNABORTED,i,v)),v=null)},"handleAbort"),v.onerror=n(function(){r(new I("Network Error",I.ERR_NETWORK,i,v)),v=null},"handleError"),v.ontimeout=n(function(){let z=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",xe=a.transitional||q_;a.timeoutErrorMessage&&(z=a.timeoutErrorMessage),r(new I(z,xe.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,i,v)),v=null},"handleTimeout"),s===void 0&&o.setContentType(null),"setRequestHeader"in v&&_.forEach(o.toJSON(),n(function(z,xe){v.setRequestHeader(xe,z)},"setRequestHeader")),_.isUndefined(a.withCredentials)||(v.withCredentials=!!a.withCredentials),l&&l!=="json"&&(v.responseType=a.responseType),h&&([q,w]=rs(h,!0),v.addEventListener("progress",q)),d&&v.upload&&([x,E]=rs(d),v.upload.addEventListener("progress",x),v.upload.addEventListener("loadend",E)),(a.cancelToken||a.signal)&&(p=n($=>{v&&(r(!$||$.type?new wr(null,i,v):$),v.abort(),v=null)},"onCanceled"),a.cancelToken&&a.cancelToken.subscribe(p),a.signal&&(a.signal.aborted?p():a.signal.addEventListener("abort",p)));let V=Av(a.url);if(V&&ve.protocols.indexOf(V)===-1){r(new I("Unsupported protocol "+V+":",I.ERR_BAD_REQUEST,i));return}v.send(s||null)},"dispatchXhrRequest"))},kv=n((i,e)=>{let{length:t}=i=i?i.filter(Boolean):[];if(e||t){let r=new AbortController,a,s=n(function(h){if(!a){a=!0,l();let p=h instanceof Error?h:this.reason;r.abort(p instanceof I?p:new wr(p instanceof Error?p.message:p))}},"onabort"),o=e&&setTimeout(()=>{o=null,s(new I(`timeout ${e} of ms exceeded`,I.ETIMEDOUT))},e),l=n(()=>{i&&(o&&clearTimeout(o),o=null,i.forEach(h=>{h.unsubscribe?h.unsubscribe(s):h.removeEventListener("abort",s)}),i=null)},"unsubscribe");i.forEach(h=>h.addEventListener("abort",s));let{signal:d}=r;return d.unsubscribe=()=>_.asap(l),d}},"composeSignals"),Mv=kv,Lv=n(function*(i,e){let t=i.byteLength;if(!e||t<e){yield i;return}let r=0,a;for(;r<t;)a=r+e,yield i.slice(r,a),r=a},"streamChunk"),Fv=n(async function*(i,e){for await(let t of Nv(i))yield*Lv(t,e)},"readBytes"),Nv=n(async function*(i){if(i[Symbol.asyncIterator]){yield*i;return}let e=i.getReader();try{for(;;){let{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},"readStream"),l_=n((i,e,t,r)=>{let a=Fv(i,e),s=0,o,l=n(d=>{o||(o=!0,r&&r(d))},"_onFinish");return new ReadableStream({async pull(d){try{let{done:h,value:p}=await a.next();if(h){l(),d.close();return}let x=p.byteLength;if(t){let q=s+=x;t(q)}d.enqueue(new Uint8Array(p))}catch(h){throw l(h),h}},cancel(d){return l(d),a.return()}},{highWaterMark:2})},"trackStream"),ls=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",T_=ls&&typeof ReadableStream=="function",Qv=ls&&(typeof TextEncoder=="function"?(i=>e=>i.encode(e))(new TextEncoder):async i=>new Uint8Array(await new Response(i).arrayBuffer())),R_=n((i,...e)=>{try{return!!i(...e)}catch{return!1}},"test"),Gv=T_&&R_(()=>{let i=!1,e=new Request(ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!e}),u_=64*1024,ec=T_&&R_(()=>_.isReadableStream(new Response("").body)),is={stream:ec&&(i=>i.body)};ls&&(i=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!is[e]&&(is[e]=_.isFunction(i[e])?t=>t[e]():(t,r)=>{throw new I(`Response type '${e}' is not supported`,I.ERR_NOT_SUPPORT,r)})})})(new Response);var Wv=n(async i=>{if(i==null)return 0;if(_.isBlob(i))return i.size;if(_.isSpecCompliantForm(i))return(await new Request(ve.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(_.isArrayBufferView(i)||_.isArrayBuffer(i))return i.byteLength;if(_.isURLSearchParams(i)&&(i=i+""),_.isString(i))return(await Qv(i)).byteLength},"getBodyLength"),Vv=n(async(i,e)=>{let t=_.toFiniteNumber(i.getContentLength());return t??Wv(e)},"resolveBodyLength"),$v=ls&&(async i=>{let{url:e,method:t,data:r,signal:a,cancelToken:s,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:h,headers:p,withCredentials:x="same-origin",fetchOptions:q}=I_(i);h=h?(h+"").toLowerCase():"text";let E=Mv([a,s&&s.toAbortSignal()],o),w,P=E&&E.unsubscribe&&(()=>{E.unsubscribe()}),v;try{if(d&&Gv&&t!=="get"&&t!=="head"&&(v=await Vv(p,r))!==0){let xe=new Request(e,{method:"POST",body:r,duplex:"half"}),it;if(_.isFormData(r)&&(it=xe.headers.get("content-type"))&&p.setContentType(it),xe.body){let[he,_r]=a_(v,rs(s_(d)));r=l_(xe.body,u_,he,_r)}}_.isString(x)||(x=x?"include":"omit");let B="credentials"in Request.prototype;w=new Request(e,{...q,signal:E,method:t.toUpperCase(),headers:p.normalize().toJSON(),body:r,duplex:"half",credentials:B?x:void 0});let V=await fetch(w,q),$=ec&&(h==="stream"||h==="response");if(ec&&(l||$&&P)){let xe={};["status","statusText","headers"].forEach(yr=>{xe[yr]=V[yr]});let it=_.toFiniteNumber(V.headers.get("content-length")),[he,_r]=l&&a_(it,rs(s_(l),!0))||[];V=new Response(l_(V.body,u_,he,()=>{_r&&_r(),P&&P()}),xe)}h=h||"text";let z=await is[_.findKey(is,h)||"text"](V,i);return!$&&P&&P(),await new Promise((xe,it)=>{A_(xe,it,{data:z,headers:ze.from(V.headers),status:V.status,statusText:V.statusText,config:i,request:w})})}catch(B){throw P&&P(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new I("Network Error",I.ERR_NETWORK,i,w),{cause:B.cause||B}):I.from(B,B&&B.code,i,w)}}),tc={http:ov,xhr:jv,fetch:$v};_.forEach(tc,(i,e)=>{if(i){try{Object.defineProperty(i,"name",{value:e})}catch{}Object.defineProperty(i,"adapterName",{value:e})}});var c_=n(i=>`- ${i}`,"renderReason"),zv=n(i=>_.isFunction(i)||i===null||i===!1,"isResolvedHandle"),U_={getAdapter:n(i=>{i=_.isArray(i)?i:[i];let{length:e}=i,t,r,a={};for(let s=0;s<e;s++){t=i[s];let o;if(r=t,!zv(t)&&(r=tc[(o=String(t)).toLowerCase()],r===void 0))throw new I(`Unknown adapter '${o}'`);if(r)break;a[o||"#"+s]=r}if(!r){let s=Object.entries(a).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build")),o=e?s.length>1?`since : `+s.map(c_).join(` `):" "+c_(s[0]):"as no adapter specified";throw new I("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},"getAdapter"),adapters:tc};function Ku(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new wr(null,i)}n(Ku,"throwIfCancellationRequested");function d_(i){return Ku(i),i.headers=ze.from(i.headers),i.data=zu.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),U_.getAdapter(i.adapter||lc.adapter)(i).then(n(function(r){return Ku(i),r.data=zu.call(i,i.transformResponse,r),r.headers=ze.from(r.headers),r},"onAdapterResolution"),n(function(r){return P_(r)||(Ku(i),r&&r.response&&(r.response.data=zu.call(i,i.transformResponse,r.response),r.response.headers=ze.from(r.response.headers))),Promise.reject(r)},"onAdapterRejection"))}n(d_,"dispatchRequest");var B_="1.11.0",us={};["object","boolean","number","function","string","symbol"].forEach((i,e)=>{us[i]=n(function(r){return typeof r===i||"a"+(e<1?"n ":" ")+i},"validator")});var h_={};us.transitional=n(function(e,t,r){function a(s,o){return"[Axios v"+B_+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return n(a,"formatMessage"),(s,o,l)=>{if(e===!1)throw new I(a(o," has been removed"+(t?" in "+t:"")),I.ERR_DEPRECATED);return t&&!h_[o]&&(h_[o]=!0,console.warn(a(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,l):!0}},"transitional");us.spelling=n(function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)},"spelling");function Kv(i,e,t){if(typeof i!="object")throw new I("options must be an object",I.ERR_BAD_OPTION_VALUE);let r=Object.keys(i),a=r.length;for(;a-- >0;){let s=r[a],o=e[s];if(o){let l=i[s],d=l===void 0||o(l,s,i);if(d!==!0)throw new I("option "+s+" must be "+d,I.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new I("Unknown option "+s,I.ERR_BAD_OPTION)}}n(Kv,"assertOptions");var es={assertOptions:Kv,validators:us},nt=es.validators,br=class{static{n(this,"Axios")}constructor(e){this.defaults=e||{},this.interceptors={request:new i_,response:new i_}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;let s=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+s):r.stack=s}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Jt(this.defaults,t);let{transitional:r,paramsSerializer:a,headers:s}=t;r!==void 0&&es.assertOptions(r,{silentJSONParsing:nt.transitional(nt.boolean),forcedJSONParsing:nt.transitional(nt.boolean),clarifyTimeoutError:nt.transitional(nt.boolean)},!1),a!=null&&(_.isFunction(a)?t.paramsSerializer={serialize:a}:es.assertOptions(a,{encode:nt.function,serialize:nt.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),es.assertOptions(t,{baseUrl:nt.spelling("baseURL"),withXsrfToken:nt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&_.merge(s.common,s[t.method]);s&&_.forEach(["delete","get","head","post","put","patch","common"],w=>{delete s[w]}),t.headers=ze.concat(o,s);let l=[],d=!0;this.interceptors.request.forEach(n(function(P){typeof P.runWhen=="function"&&P.runWhen(t)===!1||(d=d&&P.synchronous,l.unshift(P.fulfilled,P.rejected))},"unshiftRequestInterceptors"));let h=[];this.interceptors.response.forEach(n(function(P){h.push(P.fulfilled,P.rejected)},"pushResponseInterceptors"));let p,x=0,q;if(!d){let w=[d_.bind(this),void 0];for(w.unshift(...l),w.push(...h),q=w.length,p=Promise.resolve(t);x<q;)p=p.then(w[x++],w[x++]);return p}q=l.length;let E=t;for(x=0;x<q;){let w=l[x++],P=l[x++];try{E=w(E)}catch(v){P.call(this,v);break}}try{p=d_.call(this,E)}catch(w){return Promise.reject(w)}for(x=0,q=h.length;x<q;)p=p.then(h[x++],h[x++]);return p}getUri(e){e=Jt(this.defaults,e);let t=D_(e.baseURL,e.url,e.allowAbsoluteUrls);return C_(t,e.params,e.paramsSerializer)}};_.forEach(["delete","get","head","options"],n(function(e){br.prototype[e]=function(t,r){return this.request(Jt(r||{},{method:e,url:t,data:(r||{}).data}))}},"forEachMethodNoData"));_.forEach(["post","put","patch"],n(function(e){function t(r){return n(function(s,o,l){return this.request(Jt(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))},"httpMethod")}n(t,"generateHTTPMethod"),br.prototype[e]=t(),br.prototype[e+"Form"]=t(!0)},"forEachMethodWithData"));var ts=br,rc=class i{static{n(this,"CancelToken")}constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(n(function(s){t=s},"promiseExecutor"));let r=this;this.promise.then(a=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](a);r._listeners=null}),this.promise.then=a=>{let s,o=new Promise(l=>{r.subscribe(l),s=l}).then(a);return o.cancel=n(function(){r.unsubscribe(s)},"reject"),o},e(n(function(s,o,l){r.reason||(r.reason=new wr(s,o,l),t(r.reason))},"cancel"))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=n(r=>{e.abort(r)},"abort");return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new i(n(function(a){e=a},"executor")),cancel:e}}},Jv=rc;function Zv(i){return n(function(t){return i.apply(null,t)},"wrap")}n(Zv,"spread");function Xv(i){return _.isObject(i)&&i.isAxiosError===!0}n(Xv,"isAxiosError");var ic={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(ic).forEach(([i,e])=>{ic[e]=i});var Yv=ic;function O_(i){let e=new ts(i),t=p_(ts.prototype.request,e);return _.extend(t,ts.prototype,e,{allOwnKeys:!0}),_.extend(t,e,null,{allOwnKeys:!0}),t.create=n(function(a){return O_(Jt(i,a))},"create"),t}n(O_,"createInstance");var ie=O_(lc);ie.Axios=ts;ie.CanceledError=wr;ie.CancelToken=Jv;ie.isCancel=P_;ie.VERSION=B_;ie.toFormData=os;ie.AxiosError=I;ie.Cancel=ie.CanceledError;ie.all=n(function(e){return Promise.all(e)},"all");ie.spread=Zv;ie.isAxiosError=Xv;ie.mergeConfig=Jt;ie.AxiosHeaders=ze;ie.formToJSON=i=>E_(_.isHTMLForm(i)?new FormData(i):i);ie.getAdapter=U_.getAdapter;ie.HttpStatusCode=Yv;ie.default=ie;j_.exports=ie});var y={};hw(y,{__addDisposableResource:()=>uy,__assign:()=>cs,__asyncDelegator:()=>ty,__asyncGenerator:()=>ey,__asyncValues:()=>ry,__await:()=>vr,__awaiter:()=>z_,__classPrivateFieldGet:()=>sy,__classPrivateFieldIn:()=>ly,__classPrivateFieldSet:()=>oy,__createBinding:()=>hs,__decorate:()=>F_,__disposeResources:()=>cy,__esDecorate:()=>Q_,__exportStar:()=>J_,__extends:()=>M_,__generator:()=>K_,__importDefault:()=>ay,__importStar:()=>ny,__makeTemplateObject:()=>iy,__metadata:()=>$_,__param:()=>N_,__propKey:()=>W_,__read:()=>dc,__rest:()=>L_,__rewriteRelativeImportExtension:()=>dy,__runInitializers:()=>G_,__setFunctionName:()=>V_,__spread:()=>Z_,__spreadArray:()=>Y_,__spreadArrays:()=>X_,__values:()=>ds,default:()=>rS});function M_(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");uc(i,e);function t(){this.constructor=i}n(t,"__"),i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function L_(i,e){var t={};for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(i);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(i,r[a])&&(t[r[a]]=i[r[a]]);return t}function F_(i,e,t,r){var a=arguments.length,s=a<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(i,e,t,r);else for(var l=i.length-1;l>=0;l--)(o=i[l])&&(s=(a<3?o(s):a>3?o(e,t,s):o(e,t))||s);return a>3&&s&&Object.defineProperty(e,t,s),s}function N_(i,e){return function(t,r){e(t,r,i)}}function Q_(i,e,t,r,a,s){function o(B){if(B!==void 0&&typeof B!="function")throw new TypeError("Function expected");return B}n(o,"accept");for(var l=r.kind,d=l==="getter"?"get":l==="setter"?"set":"value",h=!e&&i?r.static?i:i.prototype:null,p=e||(h?Object.getOwnPropertyDescriptor(h,r.name):{}),x,q=!1,E=t.length-1;E>=0;E--){var w={};for(var P in r)w[P]=P==="access"?{}:r[P];for(var P in r.access)w.access[P]=r.access[P];w.addInitializer=function(B){if(q)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(B||null))};var v=(0,t[E])(l==="accessor"?{get:p.get,set:p.set}:p[d],w);if(l==="accessor"){if(v===void 0)continue;if(v===null||typeof v!="object")throw new TypeError("Object expected");(x=o(v.get))&&(p.get=x),(x=o(v.set))&&(p.set=x),(x=o(v.init))&&a.unshift(x)}else(x=o(v))&&(l==="field"?a.unshift(x):p[d]=x)}h&&Object.defineProperty(h,r.name,p),q=!0}function G_(i,e,t){for(var r=arguments.length>2,a=0;a<e.length;a++)t=r?e[a].call(i,t):e[a].call(i);return r?t:void 0}function W_(i){return typeof i=="symbol"?i:"".concat(i)}function V_(i,e,t){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(i,"name",{configurable:!0,value:t?"".concat(t," ",e):e})}function $_(i,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,e)}function z_(i,e,t,r){function a(s){return s instanceof t?s:new t(function(o){o(s)})}return n(a,"adopt"),new(t||(t=Promise))(function(s,o){function l(p){try{h(r.next(p))}catch(x){o(x)}}n(l,"fulfilled");function d(p){try{h(r.throw(p))}catch(x){o(x)}}n(d,"rejected");function h(p){p.done?s(p.value):a(p.value).then(l,d)}n(h,"step"),h((r=r.apply(i,e||[])).next())})}function K_(i,e){var t={label:0,sent:n(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},r,a,s,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=l(0),o.throw=l(1),o.return=l(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(h){return function(p){return d([h,p])}}function d(h){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,h[0]&&(t=0)),t;)try{if(r=1,a&&(s=h[0]&2?a.return:h[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,h[1])).done)return s;switch(a=0,s&&(h=[h[0]&2,s.value]),h[0]){case 0:case 1:s=h;break;case 4:return t.label++,{value:h[1],done:!1};case 5:t.label++,a=h[1],h=[0];continue;case 7:h=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]<s[3])){t.label=h[1];break}if(h[0]===6&&t.label<s[1]){t.label=s[1],s=h;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(h);break}s[2]&&t.ops.pop(),t.trys.pop();continue}h=e.call(i,t)}catch(p){h=[6,p],a=0}finally{r=s=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function J_(i,e){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&hs(e,i,t)}function ds(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],r=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:n(function(){return i&&r>=i.length&&(i=void 0),{value:i&&i[r++],done:!i}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function dc(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var r=t.call(i),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=r.next()).done;)s.push(a.value)}catch(l){o={error:l}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return s}function Z_(){for(var i=[],e=0;e<arguments.length;e++)i=i.concat(dc(arguments[e]));return i}function X_(){for(var i=0,e=0,t=arguments.length;e<t;e++)i+=arguments[e].length;for(var r=Array(i),a=0,e=0;e<t;e++)for(var s=arguments[e],o=0,l=s.length;o<l;o++,a++)r[a]=s[o];return r}function Y_(i,e,t){if(t||arguments.length===2)for(var r=0,a=e.length,s;r<a;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return i.concat(s||Array.prototype.slice.call(e))}function vr(i){return this instanceof vr?(this.