UNPKG

@wdp-api/bim-api

Version:

51WORLD BIM/DCP Api is a JavaScript plugin for WdpApi, It provides a set of APIs for developers to integrate BIM/DCP into their own applications.

8 lines 183 kB
(function(ke,xe){typeof exports=="object"&&typeof module<"u"?module.exports=xe():typeof define=="function"&&define.amd?define(xe):(ke=typeof globalThis<"u"?globalThis:ke||self,ke.BimApi=xe())})(this,function(){"use strict";var za=Object.defineProperty;var Va=(ke,xe,Me)=>xe in ke?za(ke,xe,{enumerable:!0,configurable:!0,writable:!0,value:Me}):ke[xe]=Me;var ie=(ke,xe,Me)=>Va(ke,typeof xe!="symbol"?xe+"":xe,Me);class ke{constructor(r,n){ie(this,"subject");ie(this,"level");this.subject=r,this.level=n??10}log(r,n,...s){if(typeof(s==null?void 0:s[0])=="string"&&s[0].match(/\%[sodif]?/gi)){const a=s.shift(),c=new Date;console.log(`${n}%c[${c.toLocaleTimeString()}.${c.getMilliseconds()}]::: %c${a}`,`color: ${r}`,"color: unset",...s)}else for(const a of s){const c=new Date;console.log(`${n}%c[${c.toLocaleTimeString()}.${c.getMilliseconds()}]:::`,`color: ${r}`,a)}}error(r,...n){this.level!==0&&(console.group(`%c${this.subject} %c ${r}`,"color: black; border-radius: 3px 0 0 3px; padding: 2px 2px 1px 10px; background: #ff4d4f","border-radius: 0 3px 3px 0; padding: 2px 10px 1px 2px; background: #ff4d4f20"),this.log("#ff4d4f","⭕",...n),console.groupEnd())}info(r,...n){console.groupCollapsed(`%c${this.subject} %c ${r}`,"color: black; border-radius: 3px 0 0 3px; padding: 2px 2px 1px 10px; background: #00dc82","border-radius: 0 3px 3px 0; padding: 2px 10px 1px 2px; background: #00dc8220"),this.log("#00dc82","🚀",...n),console.groupEnd()}warn(r,...n){console.group(`%c${this.subject} %c ${r}`,"color: black; border-radius: 3px 0 0 3px; padding: 2px 2px 1px 10px; background: #faad14","border-radius: 0 3px 3px 0; padding: 2px 10px 1px 2px; background: #faad1420"),this.log("#faad14","🔥",...n),console.groupEnd()}lowLevel(r,...n){this.level<1||this.info(r,...n)}highLevel(r,...n){this.level<3||this.warn(r,...n)}}const xe=o=>!!o&&o.constructor===Symbol,Me=Array.isArray,hi=o=>!!o&&o.constructor===Object,Lr=o=>!!(o&&o.constructor&&o.call&&o.apply),Rn=o=>{try{return Number(o)===o}catch{return!1}},pi=o=>Object.prototype.toString.call(o)==="[object Date]",U=o=>{if(o===!0||o===!1||o==null)return!0;if(Rn(o))return o===0;if(pi(o))return isNaN(o.getTime());if(Lr(o)||xe(o))return!1;const r=o.length;if(Rn(r))return r===0;const n=o.size;return Rn(n)?n===0:Object.keys(o).length===0},ht=(o,r)=>{if(Object.is(o,r))return!0;if(o instanceof Date&&r instanceof Date)return o.getTime()===r.getTime();if(o instanceof RegExp&&r instanceof RegExp)return o.toString()===r.toString();if(typeof o!="object"||o===null||typeof r!="object"||r===null)return!1;const n=Reflect.ownKeys(o),s=Reflect.ownKeys(r);if(n.length!==s.length)return!1;for(let a=0;a<n.length;a++)if(!Reflect.has(r,n[a])||!ht(o[n[a]],r[n[a]]))return!1;return!0};function mi(o,r){if(!o||!o.length)return{};const n=Lr(r)?r:Me(r)?(s,a)=>r[a]:(s,a)=>r;return o.reduce((s,a,c)=>(s[a]=n(a,c),s),{})}const yi=(o,r,n)=>o?o.reduce((s,a,c)=>(n(a,c)&&s.push(r(a,c)),s),[]):[],gi=(o,r)=>{const n=o.reduce((s,a)=>{const c=r(a);return s[c]||(s[c]=a),s},{});return Object.values(n)},Ue=(o,r)=>!o||!r?o??r??{}:Object.entries({...o,...r}).reduce((n,[s,a])=>({...n,[s]:hi(o[s])?Ue(o[s],a):a}),{});function Fr(o,r){return function(){return o.apply(r,arguments)}}const{toString:bi}=Object.prototype,{getPrototypeOf:jn}=Object,Vt=(o=>r=>{const n=bi.call(r);return o[n]||(o[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ne=o=>(o=o.toLowerCase(),r=>Vt(r)===o),Wt=o=>r=>typeof r===o,{isArray:pt}=Array,xt=Wt("undefined");function vi(o){return o!==null&&!xt(o)&&o.constructor!==null&&!xt(o.constructor)&&Ce(o.constructor.isBuffer)&&o.constructor.isBuffer(o)}const Gr=Ne("ArrayBuffer");function wi(o){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(o):r=o&&o.buffer&&Gr(o.buffer),r}const Si=Wt("string"),Ce=Wt("function"),Kr=Wt("number"),Jt=o=>o!==null&&typeof o=="object",Ai=o=>o===!0||o===!1,Xt=o=>{if(Vt(o)!=="object")return!1;const r=jn(o);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in o)&&!(Symbol.iterator in o)},_i=Ne("Date"),Ei=Ne("File"),Pi=Ne("Blob"),xi=Ne("FileList"),Ci=o=>Jt(o)&&Ce(o.pipe),Ii=o=>{let r;return o&&(typeof FormData=="function"&&o instanceof FormData||Ce(o.append)&&((r=Vt(o))==="formdata"||r==="object"&&Ce(o.toString)&&o.toString()==="[object FormData]"))},ki=Ne("URLSearchParams"),[Oi,Ni,Di,Ti]=["ReadableStream","Request","Response","Headers"].map(Ne),Ri=o=>o.trim?o.trim():o.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ct(o,r,{allOwnKeys:n=!1}={}){if(o===null||typeof o>"u")return;let s,a;if(typeof o!="object"&&(o=[o]),pt(o))for(s=0,a=o.length;s<a;s++)r.call(null,o[s],s,o);else{const c=n?Object.getOwnPropertyNames(o):Object.keys(o),d=c.length;let h;for(s=0;s<d;s++)h=c[s],r.call(null,o[h],h,o)}}function qr(o,r){r=r.toLowerCase();const n=Object.keys(o);let s=n.length,a;for(;s-- >0;)if(a=n[s],r===a.toLowerCase())return a;return null}const Qe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ur=o=>!xt(o)&&o!==Qe;function Bn(){const{caseless:o}=Ur(this)&&this||{},r={},n=(s,a)=>{const c=o&&qr(r,a)||a;Xt(r[c])&&Xt(s)?r[c]=Bn(r[c],s):Xt(s)?r[c]=Bn({},s):pt(s)?r[c]=s.slice():r[c]=s};for(let s=0,a=arguments.length;s<a;s++)arguments[s]&&Ct(arguments[s],n);return r}const ji=(o,r,n,{allOwnKeys:s}={})=>(Ct(r,(a,c)=>{n&&Ce(a)?o[c]=Fr(a,n):o[c]=a},{allOwnKeys:s}),o),Bi=o=>(o.charCodeAt(0)===65279&&(o=o.slice(1)),o),Mi=(o,r,n,s)=>{o.prototype=Object.create(r.prototype,s),o.prototype.constructor=o,Object.defineProperty(o,"super",{value:r.prototype}),n&&Object.assign(o.prototype,n)},Li=(o,r,n,s)=>{let a,c,d;const h={};if(r=r||{},o==null)return r;do{for(a=Object.getOwnPropertyNames(o),c=a.length;c-- >0;)d=a[c],(!s||s(d,o,r))&&!h[d]&&(r[d]=o[d],h[d]=!0);o=n!==!1&&jn(o)}while(o&&(!n||n(o,r))&&o!==Object.prototype);return r},Fi=(o,r,n)=>{o=String(o),(n===void 0||n>o.length)&&(n=o.length),n-=r.length;const s=o.indexOf(r,n);return s!==-1&&s===n},Gi=o=>{if(!o)return null;if(pt(o))return o;let r=o.length;if(!Kr(r))return null;const n=new Array(r);for(;r-- >0;)n[r]=o[r];return n},Ki=(o=>r=>o&&r instanceof o)(typeof Uint8Array<"u"&&jn(Uint8Array)),qi=(o,r)=>{const s=(o&&o[Symbol.iterator]).call(o);let a;for(;(a=s.next())&&!a.done;){const c=a.value;r.call(o,c[0],c[1])}},Ui=(o,r)=>{let n;const s=[];for(;(n=o.exec(r))!==null;)s.push(n);return s},Hi=Ne("HTMLFormElement"),$i=o=>o.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,a){return s.toUpperCase()+a}),Hr=(({hasOwnProperty:o})=>(r,n)=>o.call(r,n))(Object.prototype),zi=Ne("RegExp"),$r=(o,r)=>{const n=Object.getOwnPropertyDescriptors(o),s={};Ct(n,(a,c)=>{let d;(d=r(a,c,o))!==!1&&(s[c]=d||a)}),Object.defineProperties(o,s)},Vi=o=>{$r(o,(r,n)=>{if(Ce(o)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=o[n];if(Ce(s)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wi=(o,r)=>{const n={},s=a=>{a.forEach(c=>{n[c]=!0})};return pt(o)?s(o):s(String(o).split(r)),n},Ji=()=>{},Xi=(o,r)=>o!=null&&Number.isFinite(o=+o)?o:r,Mn="abcdefghijklmnopqrstuvwxyz",zr="0123456789",Vr={DIGIT:zr,ALPHA:Mn,ALPHA_DIGIT:Mn+Mn.toUpperCase()+zr},Yi=(o=16,r=Vr.ALPHA_DIGIT)=>{let n="";const{length:s}=r;for(;o--;)n+=r[Math.random()*s|0];return n};function Qi(o){return!!(o&&Ce(o.append)&&o[Symbol.toStringTag]==="FormData"&&o[Symbol.iterator])}const Zi=o=>{const r=new Array(10),n=(s,a)=>{if(Jt(s)){if(r.indexOf(s)>=0)return;if(!("toJSON"in s)){r[a]=s;const c=pt(s)?[]:{};return Ct(s,(d,h)=>{const b=n(d,a+1);!xt(b)&&(c[h]=b)}),r[a]=void 0,c}}return s};return n(o,0)},eo=Ne("AsyncFunction"),to=o=>o&&(Jt(o)||Ce(o))&&Ce(o.then)&&Ce(o.catch),Wr=((o,r)=>o?setImmediate:r?((n,s)=>(Qe.addEventListener("message",({source:a,data:c})=>{a===Qe&&c===n&&s.length&&s.shift()()},!1),a=>{s.push(a),Qe.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ce(Qe.postMessage)),no=typeof queueMicrotask<"u"?queueMicrotask.bind(Qe):typeof process<"u"&&process.nextTick||Wr,N={isArray:pt,isArrayBuffer:Gr,isBuffer:vi,isFormData:Ii,isArrayBufferView:wi,isString:Si,isNumber:Kr,isBoolean:Ai,isObject:Jt,isPlainObject:Xt,isReadableStream:Oi,isRequest:Ni,isResponse:Di,isHeaders:Ti,isUndefined:xt,isDate:_i,isFile:Ei,isBlob:Pi,isRegExp:zi,isFunction:Ce,isStream:Ci,isURLSearchParams:ki,isTypedArray:Ki,isFileList:xi,forEach:Ct,merge:Bn,extend:ji,trim:Ri,stripBOM:Bi,inherits:Mi,toFlatObject:Li,kindOf:Vt,kindOfTest:Ne,endsWith:Fi,toArray:Gi,forEachEntry:qi,matchAll:Ui,isHTMLForm:Hi,hasOwnProperty:Hr,hasOwnProp:Hr,reduceDescriptors:$r,freezeMethods:Vi,toObjectSet:Wi,toCamelCase:$i,noop:Ji,toFiniteNumber:Xi,findKey:qr,global:Qe,isContextDefined:Ur,ALPHABET:Vr,generateString:Yi,isSpecCompliantForm:Qi,toJSONObject:Zi,isAsyncFn:eo,isThenable:to,setImmediate:Wr,asap:no};function X(o,r,n,s,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=o,this.name="AxiosError",r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),a&&(this.response=a,this.status=a.status?a.status:null)}N.inherits(X,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:N.toJSONObject(this.config),code:this.code,status:this.status}}});const Jr=X.prototype,Xr={};["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(o=>{Xr[o]={value:o}}),Object.defineProperties(X,Xr),Object.defineProperty(Jr,"isAxiosError",{value:!0}),X.from=(o,r,n,s,a,c)=>{const d=Object.create(Jr);return N.toFlatObject(o,d,function(b){return b!==Error.prototype},h=>h!=="isAxiosError"),X.call(d,o.message,r,n,s,a),d.cause=o,d.name=o.name,c&&Object.assign(d,c),d};const ro=null;function Ln(o){return N.isPlainObject(o)||N.isArray(o)}function Yr(o){return N.endsWith(o,"[]")?o.slice(0,-2):o}function Qr(o,r,n){return o?o.concat(r).map(function(a,c){return a=Yr(a),!n&&c?"["+a+"]":a}).join(n?".":""):r}function so(o){return N.isArray(o)&&!o.some(Ln)}const io=N.toFlatObject(N,{},null,function(r){return/^is[A-Z]/.test(r)});function Yt(o,r,n){if(!N.isObject(o))throw new TypeError("target must be an object");r=r||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(V,H){return!N.isUndefined(H[V])});const s=n.metaTokens,a=n.visitor||P,c=n.dots,d=n.indexes,b=(n.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(r);if(!N.isFunction(a))throw new TypeError("visitor must be a function");function y(M){if(M===null)return"";if(N.isDate(M))return M.toISOString();if(!b&&N.isBlob(M))throw new X("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(M)||N.isTypedArray(M)?b&&typeof Blob=="function"?new Blob([M]):Buffer.from(M):M}function P(M,V,H){let te=M;if(M&&!H&&typeof M=="object"){if(N.endsWith(V,"{}"))V=s?V:V.slice(0,-2),M=JSON.stringify(M);else if(N.isArray(M)&&so(M)||(N.isFileList(M)||N.endsWith(V,"[]"))&&(te=N.toArray(M)))return V=Yr(V),te.forEach(function(de,_e){!(N.isUndefined(de)||de===null)&&r.append(d===!0?Qr([V],_e,c):d===null?V:V+"[]",y(de))}),!1}return Ln(M)?!0:(r.append(Qr(H,V,c),y(M)),!1)}const D=[],B=Object.assign(io,{defaultVisitor:P,convertValue:y,isVisitable:Ln});function z(M,V){if(!N.isUndefined(M)){if(D.indexOf(M)!==-1)throw Error("Circular reference detected in "+V.join("."));D.push(M),N.forEach(M,function(te,ae){(!(N.isUndefined(te)||te===null)&&a.call(r,te,N.isString(ae)?ae.trim():ae,V,B))===!0&&z(te,V?V.concat(ae):[ae])}),D.pop()}}if(!N.isObject(o))throw new TypeError("data must be an object");return z(o),r}function Zr(o){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(o).replace(/[!'()~]|%20|%00/g,function(s){return r[s]})}function Fn(o,r){this._pairs=[],o&&Yt(o,this,r)}const es=Fn.prototype;es.append=function(r,n){this._pairs.push([r,n])},es.toString=function(r){const n=r?function(s){return r.call(this,s,Zr)}:Zr;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function oo(o){return encodeURIComponent(o).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ts(o,r,n){if(!r)return o;const s=n&&n.encode||oo;N.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let c;if(a?c=a(r,n):c=N.isURLSearchParams(r)?r.toString():new Fn(r,n).toString(s),c){const d=o.indexOf("#");d!==-1&&(o=o.slice(0,d)),o+=(o.indexOf("?")===-1?"?":"&")+c}return o}class ns{constructor(){this.handlers=[]}use(r,n,s){return this.handlers.push({fulfilled:r,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){N.forEach(this.handlers,function(s){s!==null&&r(s)})}}const rs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ao={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Fn,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Gn=typeof window<"u"&&typeof document<"u",Kn=typeof navigator=="object"&&navigator||void 0,co=Gn&&(!Kn||["ReactNative","NativeScript","NS"].indexOf(Kn.product)<0),uo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lo=Gn&&window.location.href||"http://localhost",ve={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Gn,hasStandardBrowserEnv:co,hasStandardBrowserWebWorkerEnv:uo,navigator:Kn,origin:lo},Symbol.toStringTag,{value:"Module"})),...ao};function fo(o,r){return Yt(o,new ve.classes.URLSearchParams,Object.assign({visitor:function(n,s,a,c){return ve.isNode&&N.isBuffer(n)?(this.append(s,n.toString("base64")),!1):c.defaultVisitor.apply(this,arguments)}},r))}function ho(o){return N.matchAll(/\w+|\[(\w*)]/g,o).map(r=>r[0]==="[]"?"":r[1]||r[0])}function po(o){const r={},n=Object.keys(o);let s;const a=n.length;let c;for(s=0;s<a;s++)c=n[s],r[c]=o[c];return r}function ss(o){function r(n,s,a,c){let d=n[c++];if(d==="__proto__")return!0;const h=Number.isFinite(+d),b=c>=n.length;return d=!d&&N.isArray(a)?a.length:d,b?(N.hasOwnProp(a,d)?a[d]=[a[d],s]:a[d]=s,!h):((!a[d]||!N.isObject(a[d]))&&(a[d]=[]),r(n,s,a[d],c)&&N.isArray(a[d])&&(a[d]=po(a[d])),!h)}if(N.isFormData(o)&&N.isFunction(o.entries)){const n={};return N.forEachEntry(o,(s,a)=>{r(ho(s),a,n,0)}),n}return null}function mo(o,r,n){if(N.isString(o))try{return(r||JSON.parse)(o),N.trim(o)}catch(s){if(s.name!=="SyntaxError")throw s}return(0,JSON.stringify)(o)}const It={transitional:rs,adapter:["xhr","http","fetch"],transformRequest:[function(r,n){const s=n.getContentType()||"",a=s.indexOf("application/json")>-1,c=N.isObject(r);if(c&&N.isHTMLForm(r)&&(r=new FormData(r)),N.isFormData(r))return a?JSON.stringify(ss(r)):r;if(N.isArrayBuffer(r)||N.isBuffer(r)||N.isStream(r)||N.isFile(r)||N.isBlob(r)||N.isReadableStream(r))return r;if(N.isArrayBufferView(r))return r.buffer;if(N.isURLSearchParams(r))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let h;if(c){if(s.indexOf("application/x-www-form-urlencoded")>-1)return fo(r,this.formSerializer).toString();if((h=N.isFileList(r))||s.indexOf("multipart/form-data")>-1){const b=this.env&&this.env.FormData;return Yt(h?{"files[]":r}:r,b&&new b,this.formSerializer)}}return c||a?(n.setContentType("application/json",!1),mo(r)):r}],transformResponse:[function(r){const n=this.transitional||It.transitional,s=n&&n.forcedJSONParsing,a=this.responseType==="json";if(N.isResponse(r)||N.isReadableStream(r))return r;if(r&&N.isString(r)&&(s&&!this.responseType||a)){const d=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(r)}catch(h){if(d)throw h.name==="SyntaxError"?X.from(h,X.ERR_BAD_RESPONSE,this,null,this.response):h}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ve.classes.FormData,Blob:ve.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],o=>{It.headers[o]={}});const yo=N.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"]),go=o=>{const r={};let n,s,a;return o&&o.split(` `).forEach(function(d){a=d.indexOf(":"),n=d.substring(0,a).trim().toLowerCase(),s=d.substring(a+1).trim(),!(!n||r[n]&&yo[n])&&(n==="set-cookie"?r[n]?r[n].push(s):r[n]=[s]:r[n]=r[n]?r[n]+", "+s:s)}),r},is=Symbol("internals");function kt(o){return o&&String(o).trim().toLowerCase()}function Qt(o){return o===!1||o==null?o:N.isArray(o)?o.map(Qt):String(o)}function bo(o){const r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(o);)r[s[1]]=s[2];return r}const vo=o=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(o.trim());function qn(o,r,n,s,a){if(N.isFunction(s))return s.call(this,r,n);if(a&&(r=n),!!N.isString(r)){if(N.isString(s))return r.indexOf(s)!==-1;if(N.isRegExp(s))return s.test(r)}}function wo(o){return o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,n,s)=>n.toUpperCase()+s)}function So(o,r){const n=N.toCamelCase(" "+r);["get","set","has"].forEach(s=>{Object.defineProperty(o,s+n,{value:function(a,c,d){return this[s].call(this,r,a,c,d)},configurable:!0})})}let Pe=class{constructor(r){r&&this.set(r)}set(r,n,s){const a=this;function c(h,b,y){const P=kt(b);if(!P)throw new Error("header name must be a non-empty string");const D=N.findKey(a,P);(!D||a[D]===void 0||y===!0||y===void 0&&a[D]!==!1)&&(a[D||b]=Qt(h))}const d=(h,b)=>N.forEach(h,(y,P)=>c(y,P,b));if(N.isPlainObject(r)||r instanceof this.constructor)d(r,n);else if(N.isString(r)&&(r=r.trim())&&!vo(r))d(go(r),n);else if(N.isHeaders(r))for(const[h,b]of r.entries())c(b,h,s);else r!=null&&c(n,r,s);return this}get(r,n){if(r=kt(r),r){const s=N.findKey(this,r);if(s){const a=this[s];if(!n)return a;if(n===!0)return bo(a);if(N.isFunction(n))return n.call(this,a,s);if(N.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,n){if(r=kt(r),r){const s=N.findKey(this,r);return!!(s&&this[s]!==void 0&&(!n||qn(this,this[s],s,n)))}return!1}delete(r,n){const s=this;let a=!1;function c(d){if(d=kt(d),d){const h=N.findKey(s,d);h&&(!n||qn(s,s[h],h,n))&&(delete s[h],a=!0)}}return N.isArray(r)?r.forEach(c):c(r),a}clear(r){const n=Object.keys(this);let s=n.length,a=!1;for(;s--;){const c=n[s];(!r||qn(this,this[c],c,r,!0))&&(delete this[c],a=!0)}return a}normalize(r){const n=this,s={};return N.forEach(this,(a,c)=>{const d=N.findKey(s,c);if(d){n[d]=Qt(a),delete n[c];return}const h=r?wo(c):String(c).trim();h!==c&&delete n[c],n[h]=Qt(a),s[h]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const n=Object.create(null);return N.forEach(this,(s,a)=>{s!=null&&s!==!1&&(n[a]=r&&N.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,n])=>r+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...n){const s=new this(r);return n.forEach(a=>s.set(a)),s}static accessor(r){const s=(this[is]=this[is]={accessors:{}}).accessors,a=this.prototype;function c(d){const h=kt(d);s[h]||(So(a,d),s[h]=!0)}return N.isArray(r)?r.forEach(c):c(r),this}};Pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(Pe.prototype,({value:o},r)=>{let n=r[0].toUpperCase()+r.slice(1);return{get:()=>o,set(s){this[n]=s}}}),N.freezeMethods(Pe);function Un(o,r){const n=this||It,s=r||n,a=Pe.from(s.headers);let c=s.data;return N.forEach(o,function(h){c=h.call(n,c,a.normalize(),r?r.status:void 0)}),a.normalize(),c}function os(o){return!!(o&&o.__CANCEL__)}function mt(o,r,n){X.call(this,o??"canceled",X.ERR_CANCELED,r,n),this.name="CanceledError"}N.inherits(mt,X,{__CANCEL__:!0});function as(o,r,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?o(n):r(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ao(o){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(o);return r&&r[1]||""}function _o(o,r){o=o||10;const n=new Array(o),s=new Array(o);let a=0,c=0,d;return r=r!==void 0?r:1e3,function(b){const y=Date.now(),P=s[c];d||(d=y),n[a]=b,s[a]=y;let D=c,B=0;for(;D!==a;)B+=n[D++],D=D%o;if(a=(a+1)%o,a===c&&(c=(c+1)%o),y-d<r)return;const z=P&&y-P;return z?Math.round(B*1e3/z):void 0}}function Eo(o,r){let n=0,s=1e3/r,a,c;const d=(y,P=Date.now())=>{n=P,a=null,c&&(clearTimeout(c),c=null),o.apply(null,y)};return[(...y)=>{const P=Date.now(),D=P-n;D>=s?d(y,P):(a=y,c||(c=setTimeout(()=>{c=null,d(a)},s-D)))},()=>a&&d(a)]}const Zt=(o,r,n=3)=>{let s=0;const a=_o(50,250);return Eo(c=>{const d=c.loaded,h=c.lengthComputable?c.total:void 0,b=d-s,y=a(b),P=d<=h;s=d;const D={loaded:d,total:h,progress:h?d/h:void 0,bytes:b,rate:y||void 0,estimated:y&&h&&P?(h-d)/y:void 0,event:c,lengthComputable:h!=null,[r?"download":"upload"]:!0};o(D)},n)},cs=(o,r)=>{const n=o!=null;return[s=>r[0]({lengthComputable:n,total:o,loaded:s}),r[1]]},us=o=>(...r)=>N.asap(()=>o(...r)),Po=ve.hasStandardBrowserEnv?((o,r)=>n=>(n=new URL(n,ve.origin),o.protocol===n.protocol&&o.host===n.host&&(r||o.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,xo=ve.hasStandardBrowserEnv?{write(o,r,n,s,a,c){const d=[o+"="+encodeURIComponent(r)];N.isNumber(n)&&d.push("expires="+new Date(n).toGMTString()),N.isString(s)&&d.push("path="+s),N.isString(a)&&d.push("domain="+a),c===!0&&d.push("secure"),document.cookie=d.join("; ")},read(o){const r=document.cookie.match(new RegExp("(^|;\\s*)("+o+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove(o){this.write(o,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Co(o){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o)}function Io(o,r){return r?o.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):o}function ls(o,r){return o&&!Co(r)?Io(o,r):r}const ds=o=>o instanceof Pe?{...o}:o;function Ze(o,r){r=r||{};const n={};function s(y,P,D,B){return N.isPlainObject(y)&&N.isPlainObject(P)?N.merge.call({caseless:B},y,P):N.isPlainObject(P)?N.merge({},P):N.isArray(P)?P.slice():P}function a(y,P,D,B){if(N.isUndefined(P)){if(!N.isUndefined(y))return s(void 0,y,D,B)}else return s(y,P,D,B)}function c(y,P){if(!N.isUndefined(P))return s(void 0,P)}function d(y,P){if(N.isUndefined(P)){if(!N.isUndefined(y))return s(void 0,y)}else return s(void 0,P)}function h(y,P,D){if(D in r)return s(y,P);if(D in o)return s(void 0,y)}const b={url:c,method:c,data:c,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:h,headers:(y,P,D)=>a(ds(y),ds(P),D,!0)};return N.forEach(Object.keys(Object.assign({},o,r)),function(P){const D=b[P]||a,B=D(o[P],r[P],P);N.isUndefined(B)&&D!==h||(n[P]=B)}),n}const fs=o=>{const r=Ze({},o);let{data:n,withXSRFToken:s,xsrfHeaderName:a,xsrfCookieName:c,headers:d,auth:h}=r;r.headers=d=Pe.from(d),r.url=ts(ls(r.baseURL,r.url),o.params,o.paramsSerializer),h&&d.set("Authorization","Basic "+btoa((h.username||"")+":"+(h.password?unescape(encodeURIComponent(h.password)):"")));let b;if(N.isFormData(n)){if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if((b=d.getContentType())!==!1){const[y,...P]=b?b.split(";").map(D=>D.trim()).filter(Boolean):[];d.setContentType([y||"multipart/form-data",...P].join("; "))}}if(ve.hasStandardBrowserEnv&&(s&&N.isFunction(s)&&(s=s(r)),s||s!==!1&&Po(r.url))){const y=a&&c&&xo.read(c);y&&d.set(a,y)}return r},ko=typeof XMLHttpRequest<"u"&&function(o){return new Promise(function(n,s){const a=fs(o);let c=a.data;const d=Pe.from(a.headers).normalize();let{responseType:h,onUploadProgress:b,onDownloadProgress:y}=a,P,D,B,z,M;function V(){z&&z(),M&&M(),a.cancelToken&&a.cancelToken.unsubscribe(P),a.signal&&a.signal.removeEventListener("abort",P)}let H=new XMLHttpRequest;H.open(a.method.toUpperCase(),a.url,!0),H.timeout=a.timeout;function te(){if(!H)return;const de=Pe.from("getAllResponseHeaders"in H&&H.getAllResponseHeaders()),be={data:!h||h==="text"||h==="json"?H.responseText:H.response,status:H.status,statusText:H.statusText,headers:de,config:o,request:H};as(function(fe){n(fe),V()},function(fe){s(fe),V()},be),H=null}"onloadend"in H?H.onloadend=te:H.onreadystatechange=function(){!H||H.readyState!==4||H.status===0&&!(H.responseURL&&H.responseURL.indexOf("file:")===0)||setTimeout(te)},H.onabort=function(){H&&(s(new X("Request aborted",X.ECONNABORTED,o,H)),H=null)},H.onerror=function(){s(new X("Network Error",X.ERR_NETWORK,o,H)),H=null},H.ontimeout=function(){let _e=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const be=a.transitional||rs;a.timeoutErrorMessage&&(_e=a.timeoutErrorMessage),s(new X(_e,be.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,o,H)),H=null},c===void 0&&d.setContentType(null),"setRequestHeader"in H&&N.forEach(d.toJSON(),function(_e,be){H.setRequestHeader(be,_e)}),N.isUndefined(a.withCredentials)||(H.withCredentials=!!a.withCredentials),h&&h!=="json"&&(H.responseType=a.responseType),y&&([B,M]=Zt(y,!0),H.addEventListener("progress",B)),b&&H.upload&&([D,z]=Zt(b),H.upload.addEventListener("progress",D),H.upload.addEventListener("loadend",z)),(a.cancelToken||a.signal)&&(P=de=>{H&&(s(!de||de.type?new mt(null,o,H):de),H.abort(),H=null)},a.cancelToken&&a.cancelToken.subscribe(P),a.signal&&(a.signal.aborted?P():a.signal.addEventListener("abort",P)));const ae=Ao(a.url);if(ae&&ve.protocols.indexOf(ae)===-1){s(new X("Unsupported protocol "+ae+":",X.ERR_BAD_REQUEST,o));return}H.send(c||null)})},Oo=(o,r)=>{const{length:n}=o=o?o.filter(Boolean):[];if(r||n){let s=new AbortController,a;const c=function(y){if(!a){a=!0,h();const P=y instanceof Error?y:this.reason;s.abort(P instanceof X?P:new mt(P instanceof Error?P.message:P))}};let d=r&&setTimeout(()=>{d=null,c(new X(`timeout ${r} of ms exceeded`,X.ETIMEDOUT))},r);const h=()=>{o&&(d&&clearTimeout(d),d=null,o.forEach(y=>{y.unsubscribe?y.unsubscribe(c):y.removeEventListener("abort",c)}),o=null)};o.forEach(y=>y.addEventListener("abort",c));const{signal:b}=s;return b.unsubscribe=()=>N.asap(h),b}},No=function*(o,r){let n=o.byteLength;if(n<r){yield o;return}let s=0,a;for(;s<n;)a=s+r,yield o.slice(s,a),s=a},Do=async function*(o,r){for await(const n of To(o))yield*No(n,r)},To=async function*(o){if(o[Symbol.asyncIterator]){yield*o;return}const r=o.getReader();try{for(;;){const{done:n,value:s}=await r.read();if(n)break;yield s}}finally{await r.cancel()}},hs=(o,r,n,s)=>{const a=Do(o,r);let c=0,d,h=b=>{d||(d=!0,s&&s(b))};return new ReadableStream({async pull(b){try{const{done:y,value:P}=await a.next();if(y){h(),b.close();return}let D=P.byteLength;if(n){let B=c+=D;n(B)}b.enqueue(new Uint8Array(P))}catch(y){throw h(y),y}},cancel(b){return h(b),a.return()}},{highWaterMark:2})},en=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ps=en&&typeof ReadableStream=="function",Ro=en&&(typeof TextEncoder=="function"?(o=>r=>o.encode(r))(new TextEncoder):async o=>new Uint8Array(await new Response(o).arrayBuffer())),ms=(o,...r)=>{try{return!!o(...r)}catch{return!1}},jo=ps&&ms(()=>{let o=!1;const r=new Request(ve.origin,{body:new ReadableStream,method:"POST",get duplex(){return o=!0,"half"}}).headers.has("Content-Type");return o&&!r}),ys=64*1024,Hn=ps&&ms(()=>N.isReadableStream(new Response("").body)),tn={stream:Hn&&(o=>o.body)};en&&(o=>{["text","arrayBuffer","blob","formData","stream"].forEach(r=>{!tn[r]&&(tn[r]=N.isFunction(o[r])?n=>n[r]():(n,s)=>{throw new X(`Response type '${r}' is not supported`,X.ERR_NOT_SUPPORT,s)})})})(new Response);const Bo=async o=>{if(o==null)return 0;if(N.isBlob(o))return o.size;if(N.isSpecCompliantForm(o))return(await new Request(ve.origin,{method:"POST",body:o}).arrayBuffer()).byteLength;if(N.isArrayBufferView(o)||N.isArrayBuffer(o))return o.byteLength;if(N.isURLSearchParams(o)&&(o=o+""),N.isString(o))return(await Ro(o)).byteLength},Mo=async(o,r)=>{const n=N.toFiniteNumber(o.getContentLength());return n??Bo(r)},$n={http:ro,xhr:ko,fetch:en&&(async o=>{let{url:r,method:n,data:s,signal:a,cancelToken:c,timeout:d,onDownloadProgress:h,onUploadProgress:b,responseType:y,headers:P,withCredentials:D="same-origin",fetchOptions:B}=fs(o);y=y?(y+"").toLowerCase():"text";let z=Oo([a,c&&c.toAbortSignal()],d),M;const V=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let H;try{if(b&&jo&&n!=="get"&&n!=="head"&&(H=await Mo(P,s))!==0){let be=new Request(r,{method:"POST",body:s,duplex:"half"}),me;if(N.isFormData(s)&&(me=be.headers.get("content-type"))&&P.setContentType(me),be.body){const[fe,nt]=cs(H,Zt(us(b)));s=hs(be.body,ys,fe,nt)}}N.isString(D)||(D=D?"include":"omit");const te="credentials"in Request.prototype;M=new Request(r,{...B,signal:z,method:n.toUpperCase(),headers:P.normalize().toJSON(),body:s,duplex:"half",credentials:te?D:void 0});let ae=await fetch(M);const de=Hn&&(y==="stream"||y==="response");if(Hn&&(h||de&&V)){const be={};["status","statusText","headers"].forEach(sn=>{be[sn]=ae[sn]});const me=N.toFiniteNumber(ae.headers.get("content-length")),[fe,nt]=h&&cs(me,Zt(us(h),!0))||[];ae=new Response(hs(ae.body,ys,fe,()=>{nt&&nt(),V&&V()}),be)}y=y||"text";let _e=await tn[N.findKey(tn,y)||"text"](ae,o);return!de&&V&&V(),await new Promise((be,me)=>{as(be,me,{data:_e,headers:Pe.from(ae.headers),status:ae.status,statusText:ae.statusText,config:o,request:M})})}catch(te){throw V&&V(),te&&te.name==="TypeError"&&/fetch/i.test(te.message)?Object.assign(new X("Network Error",X.ERR_NETWORK,o,M),{cause:te.cause||te}):X.from(te,te&&te.code,o,M)}})};N.forEach($n,(o,r)=>{if(o){try{Object.defineProperty(o,"name",{value:r})}catch{}Object.defineProperty(o,"adapterName",{value:r})}});const gs=o=>`- ${o}`,Lo=o=>N.isFunction(o)||o===null||o===!1,bs={getAdapter:o=>{o=N.isArray(o)?o:[o];const{length:r}=o;let n,s;const a={};for(let c=0;c<r;c++){n=o[c];let d;if(s=n,!Lo(n)&&(s=$n[(d=String(n)).toLowerCase()],s===void 0))throw new X(`Unknown adapter '${d}'`);if(s)break;a[d||"#"+c]=s}if(!s){const c=Object.entries(a).map(([h,b])=>`adapter ${h} `+(b===!1?"is not supported by the environment":"is not available in the build"));let d=r?c.length>1?`since : `+c.map(gs).join(` `):" "+gs(c[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return s},adapters:$n};function zn(o){if(o.cancelToken&&o.cancelToken.throwIfRequested(),o.signal&&o.signal.aborted)throw new mt(null,o)}function vs(o){return zn(o),o.headers=Pe.from(o.headers),o.data=Un.call(o,o.transformRequest),["post","put","patch"].indexOf(o.method)!==-1&&o.headers.setContentType("application/x-www-form-urlencoded",!1),bs.getAdapter(o.adapter||It.adapter)(o).then(function(s){return zn(o),s.data=Un.call(o,o.transformResponse,s),s.headers=Pe.from(s.headers),s},function(s){return os(s)||(zn(o),s&&s.response&&(s.response.data=Un.call(o,o.transformResponse,s.response),s.response.headers=Pe.from(s.response.headers))),Promise.reject(s)})}const ws="1.7.9",nn={};["object","boolean","number","function","string","symbol"].forEach((o,r)=>{nn[o]=function(s){return typeof s===o||"a"+(r<1?"n ":" ")+o}});const Ss={};nn.transitional=function(r,n,s){function a(c,d){return"[Axios v"+ws+"] Transitional option '"+c+"'"+d+(s?". "+s:"")}return(c,d,h)=>{if(r===!1)throw new X(a(d," has been removed"+(n?" in "+n:"")),X.ERR_DEPRECATED);return n&&!Ss[d]&&(Ss[d]=!0,console.warn(a(d," has been deprecated since v"+n+" and will be removed in the near future"))),r?r(c,d,h):!0}},nn.spelling=function(r){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${r}`),!0)};function Fo(o,r,n){if(typeof o!="object")throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const s=Object.keys(o);let a=s.length;for(;a-- >0;){const c=s[a],d=r[c];if(d){const h=o[c],b=h===void 0||d(h,c,o);if(b!==!0)throw new X("option "+c+" must be "+b,X.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new X("Unknown option "+c,X.ERR_BAD_OPTION)}}const rn={assertOptions:Fo,validators:nn},Te=rn.validators;let et=class{constructor(r){this.defaults=r,this.interceptors={request:new ns,response:new ns}}async request(r,n){try{return await this._request(r,n)}catch(s){if(s instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const c=a.stack?a.stack.replace(/^.+\n/,""):"";try{s.stack?c&&!String(s.stack).endsWith(c.replace(/^.+\n.+\n/,""))&&(s.stack+=` `+c):s.stack=c}catch{}}throw s}}_request(r,n){typeof r=="string"?(n=n||{},n.url=r):n=r||{},n=Ze(this.defaults,n);const{transitional:s,paramsSerializer:a,headers:c}=n;s!==void 0&&rn.assertOptions(s,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean)},!1),a!=null&&(N.isFunction(a)?n.paramsSerializer={serialize:a}:rn.assertOptions(a,{encode:Te.function,serialize:Te.function},!0)),rn.assertOptions(n,{baseUrl:Te.spelling("baseURL"),withXsrfToken:Te.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let d=c&&N.merge(c.common,c[n.method]);c&&N.forEach(["delete","get","head","post","put","patch","common"],M=>{delete c[M]}),n.headers=Pe.concat(d,c);const h=[];let b=!0;this.interceptors.request.forEach(function(V){typeof V.runWhen=="function"&&V.runWhen(n)===!1||(b=b&&V.synchronous,h.unshift(V.fulfilled,V.rejected))});const y=[];this.interceptors.response.forEach(function(V){y.push(V.fulfilled,V.rejected)});let P,D=0,B;if(!b){const M=[vs.bind(this),void 0];for(M.unshift.apply(M,h),M.push.apply(M,y),B=M.length,P=Promise.resolve(n);D<B;)P=P.then(M[D++],M[D++]);return P}B=h.length;let z=n;for(D=0;D<B;){const M=h[D++],V=h[D++];try{z=M(z)}catch(H){V.call(this,H);break}}try{P=vs.call(this,z)}catch(M){return Promise.reject(M)}for(D=0,B=y.length;D<B;)P=P.then(y[D++],y[D++]);return P}getUri(r){r=Ze(this.defaults,r);const n=ls(r.baseURL,r.url);return ts(n,r.params,r.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(r){et.prototype[r]=function(n,s){return this.request(Ze(s||{},{method:r,url:n,data:(s||{}).data}))}}),N.forEach(["post","put","patch"],function(r){function n(s){return function(c,d,h){return this.request(Ze(h||{},{method:r,headers:s?{"Content-Type":"multipart/form-data"}:{},url:c,data:d}))}}et.prototype[r]=n(),et.prototype[r+"Form"]=n(!0)});let Go=class fi{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(c){n=c});const s=this;this.promise.then(a=>{if(!s._listeners)return;let c=s._listeners.length;for(;c-- >0;)s._listeners[c](a);s._listeners=null}),this.promise.then=a=>{let c;const d=new Promise(h=>{s.subscribe(h),c=h}).then(a);return d.cancel=function(){s.unsubscribe(c)},d},r(function(c,d,h){s.reason||(s.reason=new mt(c,d,h),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const n=this._listeners.indexOf(r);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const r=new AbortController,n=s=>{r.abort(s)};return this.subscribe(n),r.signal.unsubscribe=()=>this.unsubscribe(n),r.signal}static source(){let r;return{token:new fi(function(a){r=a}),cancel:r}}};function Ko(o){return function(n){return o.apply(null,n)}}function qo(o){return N.isObject(o)&&o.isAxiosError===!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(([o,r])=>{Vn[r]=o});function As(o){const r=new et(o),n=Fr(et.prototype.request,r);return N.extend(n,et.prototype,r,{allOwnKeys:!0}),N.extend(n,r,null,{allOwnKeys:!0}),n.create=function(a){return As(Ze(o,a))},n}const le=As(It);le.Axios=et,le.CanceledError=mt,le.CancelToken=Go,le.isCancel=os,le.VERSION=ws,le.toFormData=Yt,le.AxiosError=X,le.Cancel=le.CanceledError,le.all=function(r){return Promise.all(r)},le.spread=Ko,le.isAxiosError=qo,le.mergeConfig=Ze,le.AxiosHeaders=Pe,le.formToJSON=o=>ss(N.isHTMLForm(o)?new FormData(o):o),le.getAdapter=bs.getAdapter,le.HttpStatusCode=Vn,le.default=le;const{Axios:ec,AxiosError:tc,CanceledError:nc,isCancel:rc,CancelToken:sc,VERSION:ic,all:oc,Cancel:ac,isAxiosError:cc,spread:uc,toFormData:lc,AxiosHeaders:dc,HttpStatusCode:_s,formToJSON:fc,getAdapter:hc,mergeConfig:pc}=le,Uo=["SUCCESS",200,"0000","success"],Ho=[_s.Created,_s.Ok],se=le.create();se.interceptors.request.use(o=>{var r,n;return U(o.baseURL)?Promise.reject("proxy is empty, please setting first"):((r=o.headers)!=null&&r.hasContentType()||o.headers.setContentType("application/json",!0),((n=o.method)==null?void 0:n.toUpperCase())==="GET"&&(o.params=(o==null?void 0:o.params)??(o==null?void 0:o.data),o==null||delete o.data),!o.headers.hasAuthorization()&&!o.headers.has("x-render-order")?Promise.reject("Request is not authorized"):o)},o=>Promise.reject(o)),se.interceptors.response.use(o=>{const{data:r,status:n}=o,s=o.config;return Ho.includes(n)?s!=null&&s.customize?r:Uo.includes(r==null?void 0:r.status)?(r==null?void 0:r.result)??r:Promise.reject(r):Promise.reject(o)},o=>{var n;const r=(o==null?void 0:o.response)??o;return(r==null?void 0:r.code)??(r==null?void 0:r.statusCode)??(r==null||r.status),((n=r==null?void 0:r.data)==null?void 0:n.message)??(r==null?void 0:r.message)??(r==null?void 0:r.statusText)??(r==null||r.statusMessage),Promise.reject((r==null?void 0:r.data)??r)});var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $o(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ps={exports:{}};(function(o,r){(function(n,s){o.exports=s()})(Es,function(){var n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,u){i.__proto__=u}||function(i,u){for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(i[l]=u[l])})(e,t)},s=function(){return(s=Object.assign||function(e){for(var t,i=1,u=arguments.length;i<u;i++)for(var l in t=arguments[i])Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l]);return e}).apply(this,arguments)};function a(e,t,i){for(var u,l=0,f=t.length;l<f;l++)!u&&l in t||((u=u||Array.prototype.slice.call(t,0,l))[l]=t[l]);return e.concat(u||Array.prototype.slice.call(t))}var c=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Es,d=Object.keys,h=Array.isArray;function b(e,t){return typeof t!="object"||d(t).forEach(function(i){e[i]=t[i]}),e}typeof Promise>"u"||c.Promise||(c.Promise=Promise);var y=Object.getPrototypeOf,P={}.hasOwnProperty;function D(e,t){return P.call(e,t)}function B(e,t){typeof t=="function"&&(t=t(y(e))),(typeof Reflect>"u"?d:Reflect.ownKeys)(t).forEach(function(i){M(e,i,t[i])})}var z=Object.defineProperty;function M(e,t,i,u){z(e,t,b(i&&D(i,"get")&&typeof i.get=="function"?{get:i.get,set:i.set,configurable:!0}:{value:i,configurable:!0,writable:!0},u))}function V(e){return{from:function(t){return e.prototype=Object.create(t.prototype),M(e.prototype,"constructor",e),{extend:B.bind(null,e.prototype)}}}}var H=Object.getOwnPropertyDescriptor,te=[].slice;function ae(e,t,i){return te.call(e,t,i)}function de(e,t){return t(e)}function _e(e){if(!e)throw new Error("Assertion Failed")}function be(e){c.setImmediate?setImmediate(e):setTimeout(e,0)}function me(e,t){if(typeof t=="string"&&D(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var i=[],u=0,l=t.length;u<l;++u){var f=me(e,t[u]);i.push(f)}return i}var p=t.indexOf(".");if(p!==-1){var m=e[t.substr(0,p)];return m==null?void 0:me(m,t.substr(p+1))}}function fe(e,t,i){if(e&&t!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof t!="string"&&"length"in t){_e(typeof i!="string"&&"length"in i);for(var u=0,l=t.length;u<l;++u)fe(e,t[u],i[u])}else{var f,p,m=t.indexOf(".");m!==-1?(f=t.substr(0,m),(p=t.substr(m+1))===""?i===void 0?h(e)&&!isNaN(parseInt(f))?e.splice(f,1):delete e[f]:e[f]=i:fe(m=!(m=e[f])||!D(e,f)?e[f]={}:m,p,i)):i===void 0?h(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=i}}function nt(e){var t,i={};for(t in e)D(e,t)&&(i[t]=e[t]);return i}var sn=[].concat;function Os(e){return sn.apply([],e)}var Ke="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Os([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(t){return t+e+"Array"})}))).filter(function(e){return c[e]}),Ns=new Set(Ke.map(function(e){return c[e]})),Nt=null;function He(e){return Nt=new WeakMap,e=function t(i){if(!i||typeof i!="object")return i;var u=Nt.get(i);if(u)return u;if(h(i)){u=[],Nt.set(i,u);for(var l=0,f=i.length;l<f;++l)u.push(t(i[l]))}else if(Ns.has(i.constructor))u=i;else{var p,m=y(i);for(p in u=m===Object.prototype?{}:Object.create(m),Nt.set(i,u),i)D(i,p)&&(u[p]=t(i[p]))}return u}(e),Nt=null,e}var fa={}.toString;function Yn(e){return fa.call(e).slice(8,-1)}var Qn=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ha=typeof Qn=="symbol"?function(e){var t;return e!=null&&(t=e[Qn])&&t.apply(e)}:function(){return null};function rt(e,t){return t=e.indexOf(t),0<=t&&e.splice(t,1),0<=t}var yt={};function Fe(e){var t,i,u,l;if(arguments.length===1){if(h(e))return e.slice();if(this===yt&&typeof e=="string")return[e];if(l=ha(e)){for(i=[];!(u=l.next()).done;)i.push(u.value);return i}if(e==null)return[e];if(typeof(t=e.length)!="number")return[e];for(i=new Array(t);t--;)i[t]=e[t];return i}for(t=arguments.length,i=new Array(t);t--;)i[t]=arguments[t];return i}var Zn=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Rt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Oe=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Rt),pa={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function gt(e,t){this.name=e,this.message=t}function Ds(e,t){return e+". Errors: "+Object.keys(t).map(function(i){return t[i].toString()}).filter(function(i,u,l){return l.indexOf(i)===u}).join(` `)}function on(e,t,i,u){this.failures=t,this.failedKeys=u,this.successCount=i,this.message=Ds(e,t)}function bt(e,t){this.name="BulkError",this.failures=Object.keys(t).map(function(i){return t[i]}),this.failuresByPos=t,this.message=Ds(e,this.failures)}V(gt).from(Error).extend({toString:function(){return this.name+": "+this.message}}),V(on).from(gt),V(bt).from(gt);var er=Oe.reduce(function(e,t){return e[t]=t+"Error",e},{}),ma=gt,W=Oe.reduce(function(e,t){var i=t+"Error";function u(l,f){this.name=i,l?typeof l=="string"?(this.message="".concat(l).concat(f?` `+f:""),this.inner=f||null):typeof l=="object"&&(this.message="".concat(l.name," ").concat(l.message),this.inner=l):(this.message=pa[t]||i,this.inner=null)}return V(u).from(ma),e[t]=u,e},{});W.Syntax=SyntaxError,W.Type=TypeError,W.Range=RangeError;var Ts=Rt.reduce(function(e,t){return e[t+"Error"]=W[t],e},{}),an=Oe.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=W[t]),e},{});function oe(){}function Dt(e){return e}function ya(e,t){return e==null||e===Dt?t:function(i){return t(e(i))}}function st(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function ga(e,t){return e===oe?t:function(){var i=e.apply(this,arguments);i!==void 0&&(arguments[0]=i);var u=this.onsuccess,l=this.onerror;this.onsuccess=null,this.onerror=null;var f=t.apply(this,arguments);return u&&(this.onsuccess=this.onsuccess?st(u,this.onsuccess):u),l&&(this.onerror=this.onerror?st(l,this.onerror):l),f!==void 0?f:i}}function ba(e,t){return e===oe?t:function(){e.apply(this,arguments);var i=this.onsuccess,u=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),i&&(this.onsuccess=this.onsuccess?st(i,this.onsuccess):i),u&&(this.onerror=this.onerror?st(u,this.onerror):u)}}function va(e,t){return e===oe?t:function(i){var u=e.apply(this,arguments);b(i,u);var l=this.onsuccess,f=this.onerror;return this.onsuccess=null,this.onerror=null,i=t.apply(this,arguments),l&&(this.onsuccess=this.onsuccess?st(l,this.onsuccess):l),f&&(this.onerror=this.onerror?st(f,this.onerror):f),u===void 0?i===void 0?void 0:i:b(u,i)}}function wa(e,t){return e===oe?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function tr(e,t){return e===oe?t:function(){var i=e.apply(this,arguments);if(i&&typeof i.then=="function"){for(var u=this,l=arguments.length,f=new Array(l);l--;)f[l]=arguments[l];return i.then(function(){return t.apply(u,f)})}return t.apply(this,arguments)}}an.ModifyError=on,an.DexieError=gt,an.BulkError=bt;var Re=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Rs(e){Re=e}var Tt={},js=100,Ke=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,y(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,y(t),e]}(),Rt=Ke[0],Oe=Ke[1],Ke=Ke[2],Oe=Oe&&Oe.then,jt=Rt&&Rt.constructor,nr=!!Ke,Bt=function(e,t){Mt.push([e,t]),cn&&(queueMicrotask(Aa),cn=!1)},rr=!0,cn=!0,it=[],un=[],sr=Dt,$e={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:oe,pgp:!1,env:{},finalize:oe},$=$e,Mt=[],ot=0,ln=[];function q(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=$;if(typeof e!="function"){if(e!==Tt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&or(this,this._value))}this._state=null,this._value=null,++t.ref,function i(u,l){try{l(function(f){if(u._state===null){if(f===u)throw new TypeError("A promise cannot be resolved with itself.");var p=u._lib&&vt();f&&typeof f.then=="function"?i(u,function(m,S){f instanceof q?f._then(m,S):f.then(m,S)}):(u._state=!0,u._value=f,Ms(u)),p&&wt()}},or.bind(null,u))}catch(f){or(u,f)}}(this,e)}var ir={get:function(){var e=$,t=pn;function i(u,l){var f=this,p=!e.global&&(e!==$||t!==pn),m=p&&!Ve(),S=new q(function(v,E){ar(f,new Bs(Fs(u,e,p,m),Fs(l,e,p,m),v,E,e))});return this._consoleTask&&(S._consoleTask=this._consoleTask),S}return i.prototype=Tt,i},set:function(e){M(this,"then",e&&e.prototype===Tt?ir:{get:function(){return e},set:ir.set})}};function Bs(e,t,i,u,l){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=i,this.reject=u,this.psd=l}function or(e,t){var i,u;un.push(t),e._state===null&&(i=e._lib&&vt(),t=sr(t),e._state=!1,e._value=t,u=e,it.some(function(l){return l._value===u._value})||it.push(u),Ms(e),i&&wt())}function Ms(e){var t=e._listeners;e._listeners=[];for(var i=0,u=t.length;i<u;++i)ar(e,t[i]);var l=e._PSD;--l.ref||l.finalize(),ot===0&&(++ot,Bt(function(){--ot==0&&cr()},[]))}function ar(e,t){if(e._state!==null){var i=e._state?t.onFulfilled:t.onRejected;if(i===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++ot,Bt(Sa,[i,e,t])}else e._listeners.push(t)}function Sa(e,t,i){try{var u,l=t._value;!t._state&&un.length&&(un=[]),u=Re&&t._consoleTask?t._consoleTask.run(function(){return e(l)}):e(l),t._state||un.indexOf(l)!==-1||function(f){for(var p=it.length;p;)if(it[--p]._value===f._value)return it.splice(p,1)}(t),i.resolve(u)}catch(f){i.reject(f)}finally{--ot==0&&cr(),--i.psd.ref||i.psd.finalize()}}function Aa(){at($e,function(){vt()&&wt()})}function vt(){var e=rr;return cn=rr=!1,e}function wt(){var e,t,i;do for(;