Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-22 20:09:19 +08:00
v3-admin-vite/static/user-24e19b27.js

2 lines
44 KiB
JavaScript

var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,"symbol"!=typeof n?n+"":n,r),r);import{H as n,as as r,a0 as o,I as s,Q as i,aZ as a,aq as c,Y as u,W as l,aN as f,aO as d,J as p,ag as h,a3 as m,aP as g,j as y}from"./runtime-core.esm-bundler-1857aef3.js";import{c as b,a as E}from"./vue-router-5ddbd26f.js";import{bt as O,N as w}from"./index-98eefc51.js";const _="v3-admin-vite";class v{}t(v,"TOKEN",`${_}-token-key`),t(v,"SIDEBAR_STATUS",`${_}-sidebar-status-key`),t(v,"ACTIVE_THEME_NAME",`${_}-active-theme-name-key`);var R=!1;let S;const A=e=>S=e,T=Symbol();function j(e){return e&&"object"==typeof e&&"[object Object]"===Object.prototype.toString.call(e)&&"function"!=typeof e.toJSON}var P,x;(x=P||(P={})).direct="direct",x.patchObject="patch object",x.patchFunction="patch function";const C=()=>{};function N(e,t,n,r=C){e.push(t);const o=()=>{const n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!n&&p()&&h(o),o}function D(e,...t){e.slice().forEach((e=>{e(...t)}))}function L(e,t){e instanceof Map&&t instanceof Map&&t.forEach(((t,n)=>e.set(n,t))),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];j(o)&&j(r)&&e.hasOwnProperty(n)&&!u(r)&&!l(r)?e[n]=L(o,r):e[n]=r}return e}const k=Symbol();const{assign:U}=Object;function F(e,t,s={},i,d,p){let h;const g=U({actions:{}},s),y={deep:!0};let b,E,O,w=o([]),_=o([]);const v=i.state.value[e];let R;function S(t){let n;b=E=!1,"function"==typeof t?(t(i.state.value[e]),n={type:P.patchFunction,storeId:e,events:O}):(L(i.state.value[e],t),n={type:P.patchObject,payload:t,storeId:e,events:O});const r=R=Symbol();m().then((()=>{R===r&&(b=!0)})),E=!0,D(w,n,i.state.value[e])}p||v||(i.state.value[e]={}),r({});const T=C;function x(t,n){return function(){A(i);const r=Array.from(arguments),o=[],s=[];let a;D(_,{args:r,name:t,store:I,after:function(e){o.push(e)},onError:function(e){s.push(e)}});try{a=n.apply(this&&this.$id===e?this:I,r)}catch(c){throw D(s,c),c}return a instanceof Promise?a.then((e=>(D(o,e),e))).catch((e=>(D(s,e),Promise.reject(e)))):(D(o,a),a)}}const F={_p:i,$id:e,$onAction:N.bind(null,_),$patch:S,$reset:T,$subscribe(t,n={}){const r=N(w,t,n.detached,(()=>o())),o=h.run((()=>a((()=>i.state.value[e]),(r=>{("sync"===n.flush?E:b)&&t({storeId:e,type:P.direct,events:O},r)}),U({},y,n))));return r},$dispose:function(){h.stop(),w=[],_=[],i._s.delete(e)}},I=c(F);i._s.set(e,I);const B=i._e.run((()=>(h=n(),h.run((()=>t())))));for(const n in B){const t=B[n];if(u(t)&&(!u(V=t)||!V.effect)||l(t))p||(!v||j(M=t)&&M.hasOwnProperty(k)||(u(t)?t.value=v[n]:L(t,v[n])),i.state.value[e][n]=t);else if("function"==typeof t){const e=x(n,t);B[n]=e,g.actions[n]=t}}var M,V;return U(I,B),U(f(I),B),Object.defineProperty(I,"$state",{get:()=>i.state.value[e],set:e=>{S((t=>{U(t,e)}))}}),i._p.forEach((e=>{U(I,h.run((()=>e({store:I,app:i._a,pinia:i,options:g}))))})),v&&p&&s.hydrate&&s.hydrate(I.$state,v),b=!0,E=!0,I}function I(e,t,n){let r,a;const c="function"==typeof t;function u(e,n){const u=s();(e=e||u&&i(T,null))&&A(e),(e=S)._s.has(r)||(c?F(r,t,a,e):function(e,t,n,r){const{state:s,actions:i,getters:a}=t,c=n.state.value[e];let u;u=F(e,(function(){c||(n.state.value[e]=s?s():{});const t=g(n.state.value[e]);return U(t,i,Object.keys(a||{}).reduce(((t,r)=>(t[r]=o(y((()=>{A(n);const t=n._s.get(e);return a[r].call(t,t)}))),t)),{}))}),t,n,0,!0),u.$reset=function(){const e=s?s():{};this.$patch((t=>{U(t,e)}))}}(r,a,e));return e._s.get(r)}return"string"==typeof e?(r=e,a=c?n:t):(a=e,r=e.id),u.$id=r,u}function B(e){{e=f(e);const t={};for(const n in e){const r=e[n];(u(r)||l(r))&&(t[n]=d(e,n))}return t}}const M=function(){const e=n(!0),t=e.run((()=>r({})));let s=[],i=[];const a=o({install(e){A(a),a._a=e,e.provide(T,a),e.config.globalProperties.$pinia=a,i.forEach((e=>s.push(e))),i=[]},use(e){return this._a||R?s.push(e):i.push(e),this},_p:s,_a:null,_e:e,_s:new Map,state:t});return a}(),V={},q=function(e,t,n){if(!t||0===t.length)return e();const r=document.getElementsByTagName("link");return Promise.all(t.map((e=>{if((e=function(e){return"/v3-admin-vite/"+e}(e))in V)return;V[e]=!0;const t=e.endsWith(".css"),o=t?'[rel="stylesheet"]':"";if(!!n)for(let n=r.length-1;n>=0;n--){const o=r[n];if(o.href===e&&(!t||"stylesheet"===o.rel))return}else if(document.querySelector(`link[href="${e}"]${o}`))return;const s=document.createElement("link");return s.rel=t?"stylesheet":"modulepreload",t||(s.as="script",s.crossOrigin=""),s.href=e,document.head.appendChild(s),t?new Promise(((t,n)=>{s.addEventListener("load",t),s.addEventListener("error",(()=>n(new Error(`Unable to preload CSS for ${e}`))))})):void 0}))).then((()=>e()))},z=()=>q((()=>import("./index-5a047c4b.js")),["static/index-5a047c4b.js","static/useTheme-f268cb51.js","static/runtime-core.esm-bundler-1857aef3.js","static/index-98eefc51.js","static/vue-router-5ddbd26f.js","static/_plugin-vue_export-helper-1b428a4d.js","static/index.vue_vue_type_script_setup_true_lang-6427aa8d.js","static/dayjs.min-0c3c7af8.js","static/error-c58402b8.js","static/index-48d9e173.css"]),H=[{path:"/redirect",component:z,meta:{hidden:!0},children:[{path:"/redirect/:path(.*)",component:()=>q((()=>import("./index-a7cf2f53.js")),["static/index-a7cf2f53.js","static/vue-router-5ddbd26f.js","static/runtime-core.esm-bundler-1857aef3.js"])}]},{path:"/403",component:()=>q((()=>import("./403-00139298.js")),["static/403-00139298.js","static/ErrorPageLayout-a1323027.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js","static/ErrorPageLayout-155a3ef2.css"]),meta:{hidden:!0}},{path:"/404",component:()=>q((()=>import("./404-9f164162.js")),["static/404-9f164162.js","static/ErrorPageLayout-a1323027.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js","static/ErrorPageLayout-155a3ef2.css"]),meta:{hidden:!0},alias:"/:pathMatch(.*)*"},{path:"/login",component:()=>q((()=>import("./index-d5a272bc.js")),["static/index-d5a272bc.js","static/index-98eefc51.js","static/runtime-core.esm-bundler-1857aef3.js","static/vue-router-5ddbd26f.js","static/index.vue_vue_type_script_setup_true_lang-6427aa8d.js","static/useTheme-f268cb51.js","static/_plugin-vue_export-helper-1b428a4d.js","static/index-27f67676.css"]),meta:{hidden:!0}},{path:"/",component:z,redirect:"/dashboard",children:[{path:"dashboard",component:()=>q((()=>import("./index-c1ee93b5.js")),["static/index-c1ee93b5.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js","static/index-b50f0bdf.js","static/index-98eefc51.js","static/vue-router-5ddbd26f.js","static/index-fde86043.css"]),name:"Dashboard",meta:{title:"首页",svgIcon:"dashboard",affix:!0}}]},{path:"/unocss",component:z,redirect:"/unocss/index",children:[{path:"index",component:()=>q((()=>import("./index-8d03f750.js")),["static/index-8d03f750.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js"]),name:"UnoCSS",meta:{title:"unocss",svgIcon:"unocss"}}]},{path:"/link",component:z,children:[{path:"https://juejin.cn/post/7089377403717287972",component:()=>{},name:"Link",meta:{title:"外链",svgIcon:"link"}}]},{path:"/table",component:z,redirect:"/table/element-plus",name:"Table",meta:{title:"表格",elIcon:"Grid"},children:[{path:"element-plus",component:()=>q((()=>import("./index-fa9f0f60.js")),["static/index-fa9f0f60.js","static/index-a01bf51c.js","static/index-98eefc51.js","static/runtime-core.esm-bundler-1857aef3.js","static/index-56ae682c.js","static/error-c58402b8.js","static/_plugin-vue_export-helper-1b428a4d.js","static/vue-router-5ddbd26f.js","static/index-b23bdb83.css"]),name:"ElementPlus",meta:{title:"Element Plus"}},{path:"vxe-table",component:()=>q((()=>import("./index-82d2ac6c.js")),["static/index-82d2ac6c.js","static/index-a01bf51c.js","static/runtime-core.esm-bundler-1857aef3.js","static/index-56ae682c.js","static/index-98eefc51.js","static/error-c58402b8.js","static/vue-router-5ddbd26f.js"]),name:"VxeTable",meta:{title:"Vxe Table"}}]},{path:"/menu",component:z,redirect:"/menu/menu1",name:"Menu",meta:{title:"多级菜单",svgIcon:"menu"},children:[{path:"menu1",component:()=>q((()=>import("./index-cccce6de.js")),["static/index-cccce6de.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js"]),redirect:"/menu/menu1/menu1-1",name:"Menu1",meta:{title:"menu1"},children:[{path:"menu1-1",component:()=>q((()=>import("./index-199ef882.js")),["static/index-199ef882.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js"]),name:"Menu1-1",meta:{title:"menu1-1"}},{path:"menu1-2",component:()=>q((()=>import("./index-9c03a44d.js")),["static/index-9c03a44d.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js"]),redirect:"/menu/menu1/menu1-2/menu1-2-1",name:"Menu1-2",meta:{title:"menu1-2"},children:[{path:"menu1-2-1",component:()=>q((()=>import("./index-5fa1e1e0.js")),["static/index-5fa1e1e0.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js"]),name:"Menu1-2-1",meta:{title:"menu1-2-1"}},{path:"menu1-2-2",component:()=>q((()=>import("./index-93d9a857.js")),["static/index-93d9a857.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js"]),name:"Menu1-2-2",meta:{title:"menu1-2-2"}}]},{path:"menu1-3",component:()=>q((()=>import("./index-3ca6e550.js")),["static/index-3ca6e550.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js"]),name:"Menu1-3",meta:{title:"menu1-3"}}]},{path:"menu2",component:()=>q((()=>import("./index-9c1bd8e3.js")),["static/index-9c1bd8e3.js","static/_plugin-vue_export-helper-1b428a4d.js","static/runtime-core.esm-bundler-1857aef3.js"]),name:"Menu2",meta:{title:"menu2"}}]},{path:"/hook-demo",component:z,redirect:"/hook-demo/use-fetch-select",name:"HookDemo",meta:{title:"hook 示例",elIcon:"Menu",alwaysShow:!0},children:[{path:"use-fetch-select",component:()=>q((()=>import("./use-fetch-select-4e0f8b3b.js")),["static/use-fetch-select-4e0f8b3b.js","static/runtime-core.esm-bundler-1857aef3.js"]),name:"UseFetchSelect",meta:{title:"useFetchSelect"}},{path:"use-fullscreen-loading",component:()=>q((()=>import("./use-fullscreen-loading-6341f31d.js")),["static/use-fullscreen-loading-6341f31d.js","static/index-19bade01.js","static/runtime-core.esm-bundler-1857aef3.js","static/index-98eefc51.js"]),name:"UseFullscreenLoading",meta:{title:"useFullscreenLoading"}}]}],$=[{path:"/permission",component:z,redirect:"/permission/page",name:"Permission",meta:{title:"权限管理",svgIcon:"lock",roles:["admin","editor"],alwaysShow:!0},children:[{path:"page",component:()=>q((()=>import("./page-d0118cce.js")),["static/page-d0118cce.js","static/vue-router-5ddbd26f.js","static/runtime-core.esm-bundler-1857aef3.js","static/SwitchRoles-9533cf2a.js","static/_plugin-vue_export-helper-1b428a4d.js","static/SwitchRoles-0c18308f.css","static/index-98eefc51.js","static/page-3081310b.css"]),name:"PagePermission",meta:{title:"页面权限",roles:["admin"]}},{path:"directive",component:()=>q((()=>import("./directive-f6c3bd9e.js")),["static/directive-f6c3bd9e.js","static/SwitchRoles-9533cf2a.js","static/runtime-core.esm-bundler-1857aef3.js","static/_plugin-vue_export-helper-1b428a4d.js","static/SwitchRoles-0c18308f.css","static/vue-router-5ddbd26f.js","static/index-98eefc51.js","static/directive-2d230132.css"]),name:"DirectivePermission",meta:{title:"指令权限"}}]},{path:"/:pathMatch(.*)*",redirect:"/404",name:"ErrorPage",meta:{hidden:!0}}],J=b({history:E("/v3-admin-vite/"),routes:H});function K(){try{J.getRoutes().forEach((e=>{var t;const{name:n,meta:r}=e;n&&(null==(t=r.roles)?void 0:t.length)&&J.hasRoute(n)&&J.removeRoute(n)}))}catch(e){window.location.reload()}}const W=(e,t)=>{const n=[];return e.forEach((e=>{const r={...e};((e,t)=>!t.meta||!t.meta.roles||e.some((e=>{var n;return void 0!==(null==(n=t.meta)?void 0:n.roles)&&t.meta.roles.includes(e)})))(t,r)&&(r.children&&(r.children=W(r.children,t)),n.push(r))})),n},G=I("permission",(()=>{const e=r([]),t=r([]);return{routes:e,dynamicRoutes:t,setRoutes:n=>{let r;r=n.includes("admin")?$:W($,n),e.value=H.concat(r),t.value=r}}}));function X(){return G(M)}function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Z=function e(t,n){function r(e,r,o){if("undefined"!=typeof document){"number"==typeof(o=Q({},n,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var i in o)o[i]&&(s+="; "+i,!0!==o[i]&&(s+="="+o[i].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+s}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},o=0;o<n.length;o++){var s=n[o].split("="),i=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(r[a]=t.read(i,a),e===a)break}catch(c){}}return e?r[e]:r}},remove:function(e,t){r(e,"",Q({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,Q({},this.attributes,t))},withConverter:function(t){return e(Q({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const Y=()=>Z.get(v.TOKEN),ee=e=>{Z.set(v.TOKEN,e)},te=()=>{Z.remove(v.TOKEN)};function ne(e,t){return function(){return e.apply(t,arguments)}}const{toString:re}=Object.prototype,{getPrototypeOf:oe}=Object,se=(ie=Object.create(null),e=>{const t=re.call(e);return ie[t]||(ie[t]=t.slice(8,-1).toLowerCase())});var ie;const ae=e=>(e=e.toLowerCase(),t=>se(t)===e),ce=e=>t=>typeof t===e,{isArray:ue}=Array,le=ce("undefined");const fe=ae("ArrayBuffer");const de=ce("string"),pe=ce("function"),he=ce("number"),me=e=>null!==e&&"object"==typeof e,ge=e=>{if("object"!==se(e))return!1;const t=oe(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},ye=ae("Date"),be=ae("File"),Ee=ae("Blob"),Oe=ae("FileList"),we=ae("URLSearchParams");function _e(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),ue(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function ve(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Re="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Se=e=>!le(e)&&e!==Re;const Ae=(Te="undefined"!=typeof Uint8Array&&oe(Uint8Array),e=>Te&&e instanceof Te);var Te;const je=ae("HTMLFormElement"),Pe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),xe=ae("RegExp"),Ce=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};_e(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},Ne="abcdefghijklmnopqrstuvwxyz",De="0123456789",Le={DIGIT:De,ALPHA:Ne,ALPHA_DIGIT:Ne+Ne.toUpperCase()+De};const ke={isArray:ue,isArrayBuffer:fe,isBuffer:function(e){return null!==e&&!le(e)&&null!==e.constructor&&!le(e.constructor)&&pe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||re.call(e)===t||pe(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&fe(e.buffer),t},isString:de,isNumber:he,isBoolean:e=>!0===e||!1===e,isObject:me,isPlainObject:ge,isUndefined:le,isDate:ye,isFile:be,isBlob:Ee,isRegExp:xe,isFunction:pe,isStream:e=>me(e)&&pe(e.pipe),isURLSearchParams:we,isTypedArray:Ae,isFileList:Oe,forEach:_e,merge:function e(){const{caseless:t}=Se(this)&&this||{},n={},r=(r,o)=>{const s=t&&ve(n,o)||o;ge(n[s])&&ge(r)?n[s]=e(n[s],r):ge(r)?n[s]=e({},r):ue(r)?n[s]=r.slice():n[s]=r};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&_e(arguments[o],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(_e(t,((t,r)=>{n&&pe(t)?e[r]=ne(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],r&&!r(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==n&&oe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:se,kindOfTest:ae,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(ue(e))return e;let t=e.length;if(!he(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:je,hasOwnProperty:Pe,hasOwnProp:Pe,reduceDescriptors:Ce,freezeMethods:e=>{Ce(e,((t,n)=>{if(pe(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];pe(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return ue(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:ve,global:Re,isContextDefined:Se,ALPHABET:Le,generateString:(e=16,t=Le.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&pe(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(me(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=ue(e)?[]:{};return _e(e,((e,t)=>{const s=n(e,r+1);!le(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)}};function Ue(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}ke.inherits(Ue,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:ke.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fe=Ue.prototype,Ie={};["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((e=>{Ie[e]={value:e}})),Object.defineProperties(Ue,Ie),Object.defineProperty(Fe,"isAxiosError",{value:!0}),Ue.from=(e,t,n,r,o,s)=>{const i=Object.create(Fe);return ke.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Ue.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};function Be(e){return ke.isPlainObject(e)||ke.isArray(e)}function Me(e){return ke.endsWith(e,"[]")?e.slice(0,-2):e}function Ve(e,t,n){return e?e.concat(t).map((function(e,t){return e=Me(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const qe=ke.toFlatObject(ke,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ze(e,t,n){if(!ke.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ke.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ke.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&ke.isSpecCompliantForm(t);if(!ke.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(ke.isDate(e))return e.toISOString();if(!a&&ke.isBlob(e))throw new Ue("Blob is not supported. Use a Buffer instead.");return ke.isArrayBuffer(e)||ke.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(ke.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(ke.isArray(e)&&function(e){return ke.isArray(e)&&!e.some(Be)}(e)||(ke.isFileList(e)||ke.endsWith(n,"[]"))&&(a=ke.toArray(e)))return n=Me(n),a.forEach((function(e,r){!ke.isUndefined(e)&&null!==e&&t.append(!0===i?Ve([n],r,s):null===i?n:n+"[]",c(e))})),!1;return!!Be(e)||(t.append(Ve(o,n,s),c(e)),!1)}const l=[],f=Object.assign(qe,{defaultVisitor:u,convertValue:c,isVisitable:Be});if(!ke.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!ke.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),ke.forEach(n,(function(n,s){!0===(!(ke.isUndefined(n)||null===n)&&o.call(t,n,ke.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])})),l.pop()}}(e),t}function He(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function $e(e,t){this._pairs=[],e&&ze(e,this,t)}const Je=$e.prototype;function Ke(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function We(e,t,n){if(!t)return e;const r=n&&n.encode||Ke,o=n&&n.serialize;let s;if(s=o?o(t,n):ke.isURLSearchParams(t)?t.toString():new $e(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}Je.append=function(e,t){this._pairs.push([e,t])},Je.toString=function(e){const t=e?function(t){return e.call(this,t,He)}:He;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const Ge=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ke.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Xe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qe="undefined"!=typeof URLSearchParams?URLSearchParams:$e,Ze="undefined"!=typeof FormData?FormData:null,Ye=(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),et="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,tt={isBrowser:!0,classes:{URLSearchParams:Qe,FormData:Ze,Blob:Blob},isStandardBrowserEnv:Ye,isStandardBrowserWebWorkerEnv:et,protocols:["http","https","file","blob","url","data"]};function nt(e){function t(e,n,r,o){let s=e[o++];const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&ke.isArray(r)?r.length:s,a)return ke.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&ke.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&ke.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(ke.isFormData(e)&&ke.isFunction(e.entries)){const n={};return ke.forEachEntry(e,((e,r)=>{t(function(e){return ke.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const rt={"Content-Type":void 0};const ot={transitional:Xe,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=ke.isObject(e);o&&ke.isHTMLForm(e)&&(e=new FormData(e));if(ke.isFormData(e))return r&&r?JSON.stringify(nt(e)):e;if(ke.isArrayBuffer(e)||ke.isBuffer(e)||ke.isStream(e)||ke.isFile(e)||ke.isBlob(e))return e;if(ke.isArrayBufferView(e))return e.buffer;if(ke.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ze(e,new tt.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return tt.isNode&&ke.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=ke.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ze(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(ke.isString(e))try{return(t||JSON.parse)(e),ke.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ot.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&ke.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(n){if("SyntaxError"===o.name)throw Ue.from(o,Ue.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tt.classes.FormData,Blob:tt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ke.forEach(["delete","get","head"],(function(e){ot.headers[e]={}})),ke.forEach(["post","put","patch"],(function(e){ot.headers[e]=ke.merge(rt)}));const st=ot,it=ke.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"]),at=Symbol("internals");function ct(e){return e&&String(e).trim().toLowerCase()}function ut(e){return!1===e||null==e?e:ke.isArray(e)?e.map(ut):String(e)}function lt(e,t,n,r,o){return ke.isFunction(r)?r.call(this,t,n):(o&&(t=n),ke.isString(t)?ke.isString(r)?-1!==t.indexOf(r):ke.isRegExp(r)?r.test(t):void 0:void 0)}class ft{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ct(t);if(!o)throw new Error("header name must be a non-empty string");const s=ke.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ut(e))}const s=(e,t)=>ke.forEach(e,((e,n)=>o(e,n,t)));return ke.isPlainObject(e)||e instanceof this.constructor?s(e,t):ke.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&it[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ct(e)){const n=ke.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ke.isFunction(t))return t.call(this,e,n);if(ke.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ct(e)){const n=ke.findKey(this,e);return!(!n||void 0===this[n]||t&&!lt(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ct(e)){const o=ke.findKey(n,e);!o||t&&!lt(0,n[o],o,t)||(delete n[o],r=!0)}}return ke.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!lt(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return ke.forEach(this,((r,o)=>{const s=ke.findKey(n,o);if(s)return t[s]=ut(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ut(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ke.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ke.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[at]=this[at]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ct(e);t[r]||(!function(e,t){const n=ke.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return ke.isArray(e)?e.forEach(r):r(e),this}}ft.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ke.freezeMethods(ft.prototype),ke.freezeMethods(ft);const dt=ft;function pt(e,t){const n=this||st,r=t||n,o=dt.from(r.headers);let s=r.data;return ke.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ht(e){return!(!e||!e.__CANCEL__)}function mt(e,t,n){Ue.call(this,null==e?"canceled":e,Ue.ERR_CANCELED,t,n),this.name="CanceledError"}ke.inherits(mt,Ue,{__CANCEL__:!0});const gt=tt.isStandardBrowserEnv?{write:function(e,t,n,r,o,s){const i=[];i.push(e+"="+encodeURIComponent(t)),ke.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),ke.isString(r)&&i.push("path="+r),ke.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function yt(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const bt=tt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=ke.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Et(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-n,c=r(a);n=s;const u={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const Ot={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=dt.from(e.headers).normalize(),s=e.responseType;let i;function a(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}ke.isFormData(r)&&(tt.isStandardBrowserEnv||tt.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const u=yt(e.baseURL,e.url);function l(){if(!c)return;const r=dt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ue("Request failed with status code "+n.status,[Ue.ERR_BAD_REQUEST,Ue.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),a()}),(function(e){n(e),a()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),We(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(n(new Ue("Request aborted",Ue.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new Ue("Network Error",Ue.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Xe;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Ue(t,r.clarifyTimeoutError?Ue.ETIMEDOUT:Ue.ECONNABORTED,e,c)),c=null},tt.isStandardBrowserEnv){const t=(e.withCredentials||bt(u))&&e.xsrfCookieName&&gt.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&ke.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),ke.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&"json"!==s&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",Et(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Et(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{c&&(n(!t||t.type?new mt(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const f=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(u);f&&-1===tt.protocols.indexOf(f)?n(new Ue("Unsupported protocol "+f+":",Ue.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};ke.forEach(Ot,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const wt={getAdapter:e=>{e=ke.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=ke.isString(n)?Ot[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new Ue(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(ke.hasOwnProp(Ot,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!ke.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Ot};function _t(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new mt(null,e)}function vt(e){_t(e),e.headers=dt.from(e.headers),e.data=pt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return wt.getAdapter(e.adapter||st.adapter)(e).then((function(t){return _t(e),t.data=pt.call(e,e.transformResponse,t),t.headers=dt.from(t.headers),t}),(function(t){return ht(t)||(_t(e),t&&t.response&&(t.response.data=pt.call(e,e.transformResponse,t.response),t.response.headers=dt.from(t.response.headers))),Promise.reject(t)}))}const Rt=e=>e instanceof dt?e.toJSON():e;function St(e,t){t=t||{};const n={};function r(e,t,n){return ke.isPlainObject(e)&&ke.isPlainObject(t)?ke.merge.call({caseless:n},e,t):ke.isPlainObject(t)?ke.merge({},t):ke.isArray(t)?t.slice():t}function o(e,t,n){return ke.isUndefined(t)?ke.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!ke.isUndefined(t))return r(void 0,t)}function i(e,t){return ke.isUndefined(t)?ke.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t)=>o(Rt(e),Rt(t),!0)};return ke.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const s=c[r]||o,i=s(e[r],t[r],r);ke.isUndefined(i)&&s!==a||(n[r]=i)})),n}const At="1.3.3",Tt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Tt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const jt={};Tt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+At+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new Ue(r(o," has been removed"+(t?" in "+t:"")),Ue.ERR_DEPRECATED);return t&&!jt[o]&&(jt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};const Pt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ue("options must be an object",Ue.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new Ue("option "+s+" must be "+n,Ue.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ue("Unknown option "+s,Ue.ERR_BAD_OPTION)}},validators:Tt},xt=Pt.validators;class Ct{constructor(e){this.defaults=e,this.interceptors={request:new Ge,response:new Ge}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=St(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let s;void 0!==n&&Pt.assertOptions(n,{silentJSONParsing:xt.transitional(xt.boolean),forcedJSONParsing:xt.transitional(xt.boolean),clarifyTimeoutError:xt.transitional(xt.boolean)},!1),void 0!==r&&Pt.assertOptions(r,{encode:xt.function,serialize:xt.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),s=o&&ke.merge(o.common,o[t.method]),s&&ke.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=dt.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(e){c.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[vt.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=i.length;let d=t;for(f=0;f<l;){const e=i[f++],t=i[f++];try{d=e(d)}catch(p){t.call(this,p);break}}try{u=vt.call(this,d)}catch(p){return Promise.reject(p)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return We(yt((e=St(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}ke.forEach(["delete","get","head","options"],(function(e){Ct.prototype[e]=function(t,n){return this.request(St(n||{},{method:e,url:t,data:(n||{}).data}))}})),ke.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(St(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ct.prototype[e]=t(),Ct.prototype[e+"Form"]=t(!0)}));const Nt=Ct;class Dt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new mt(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Dt((function(t){e=t})),cancel:e}}}const Lt=Dt;const kt={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(kt).forEach((([e,t])=>{kt[t]=e}));const Ut=kt;const Ft=function e(t){const n=new Nt(t),r=ne(Nt.prototype.request,n);return ke.extend(r,Nt.prototype,n,{allOwnKeys:!0}),ke.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(St(t,n))},r}(st);Ft.Axios=Nt,Ft.CanceledError=mt,Ft.CancelToken=Lt,Ft.isCancel=ht,Ft.VERSION=At,Ft.toFormData=ze,Ft.AxiosError=Ue,Ft.Cancel=Ft.CanceledError,Ft.all=function(e){return Promise.all(e)},Ft.spread=function(e){return function(t){return e.apply(null,t)}},Ft.isAxiosError=function(e){return ke.isObject(e)&&!0===e.isAxiosError},Ft.mergeConfig=St,Ft.AxiosHeaders=dt,Ft.formToJSON=e=>nt(ke.isHTMLForm(e)?new FormData(e):e),Ft.HttpStatusCode=Ut,Ft.default=Ft;const It=Ft;const Bt=function(){const e=It.create();return e.interceptors.request.use((e=>e),(e=>Promise.reject(e))),e.interceptors.response.use((e=>{const t=e.data,n=t.code;return void 0===n?(O.error("非本系统的接口"),Promise.reject(new Error("非本系统的接口"))):0===n?t:(O.error(t.message||"Error"),Promise.reject(new Error("Error")))}),(e=>{switch(w(e,"response.status")){case 400:e.message="请求错误";break;case 401:Ht().logout(),location.reload();break;case 403:e.message="拒绝访问";break;case 404:e.message="请求地址出错";break;case 408:e.message="请求超时";break;case 500:e.message="服务器内部错误";break;case 501:e.message="服务未实现";break;case 502:e.message="网关错误";break;case 503:e.message="服务不可用";break;case 504:e.message="网关超时";break;case 505:e.message="HTTP 版本不受支持"}return O.error(e.message),Promise.reject(e)})),e}(),Mt=(Vt=Bt,function(e){const t={headers:{Authorization:"Bearer "+Y(),"Content-Type":w(e,"headers.Content-Type","application/json")},timeout:5e3,baseURL:"https://mock.mengxuegu.com/mock/63218b5fb4c53348ed2bc212/api/v1",data:{}};return Vt(Object.assign(t,e))});var Vt;function qt(){return Mt({url:"login/code",method:"get"})}const zt=I("user",(()=>{const e=r(Y()||""),t=r([]),n=r(""),o=()=>new Promise(((e,r)=>{Mt({url:"users/info",method:"get"}).then((r=>{t.value=r.data.roles,n.value=r.data.username,e(r)})).catch((e=>{r(e)}))}));return{token:e,roles:t,username:n,setRoles:e=>{t.value=e},login:t=>new Promise(((n,r)=>{var o;(o={username:t.username,password:t.password,code:t.code},Mt({url:"users/login",method:"post",data:o})).then((t=>{ee(t.data.token),e.value=t.data.token,n(!0)})).catch((e=>{r(e)}))})),getInfo:o,changeRoles:async n=>{const r="token-"+n;e.value=r,ee(r),await o();const s=G();s.setRoutes(t.value),K(),s.dynamicRoutes.forEach((e=>{J.addRoute(e)}))},logout:()=>{te(),e.value="",t.value=[],K()},resetToken:()=>{te(),e.value="",t.value=[]}}}));function Ht(){return zt(M)}export{v as C,X as a,zt as b,G as c,I as d,B as e,qt as f,Y as g,Mt as h,J as r,M as s,Ht as u};