mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:43:35 +00:00
24 lines
20 KiB
JavaScript
24 lines
20 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/LoginView-DoWL8FVG.js","assets/vue-vendor-Bsazo-x0.js","assets/ThemeToggle-DcvDscEo.js","assets/ThemeToggle-BLLHl9nT.css","assets/element-plus-CqiD73Lu.js","assets/vendor-Dr8jvgFu.js","assets/element-plus-nq7etrhL.css","assets/LoginView-tn0RQdqM.css","assets/UserLoginView-DLDQbJ4B.js","assets/UserDashboardView-BYsb4Jjm.js","assets/ConfirmModal-D4ZL95nR.js","assets/ConfirmModal-BvCtxUSJ.css","assets/TutorialView-Yt7QQXDS.js","assets/TutorialView-BjIHOtH3.css","assets/UserManagementView-CeVB9zy-.js","assets/MainLayout-DI98Wpmx.js","assets/LogoTitle-omoSKybB.js","assets/LogoTitle-DXipqypn.css","assets/MainLayout-CCQ2LruH.css","assets/DashboardView-7oo1CngH.js","assets/chart-yFHxLHpB.js","assets/DashboardView-B26ENGfc.css","assets/ApiKeysView-DQid3j6U.js","assets/WindowCountdown-BTXjZ8Dc.js","assets/ActionDropdown-8ouGHGYE.js","assets/ActionDropdown-jjrvIxsf.css","assets/ApiKeysView-DS_7HWR-.css","assets/AccountsView-Def5MYP1.js","assets/AccountsView-m7mDlIW3.css","assets/SettingsView-BAOJwx9G.js","assets/SettingsView-D_bHGGPe.css","assets/ApiStatsView-ehsoouji.js","assets/ApiStatsView-CrMBlyoi.css"])))=>i.map(i=>d[i]);
|
|
import{aP as V,aQ as X,aR as Y,r as g,c as S,o as K,q as N,V as j,I as z,z as p,x as k,ac as Z,Q as ee,a5 as J,y as A,C as $,L as O,P as I,Y as B,B as te,R as C,J as se,T as oe,O as ae,av as re,aM as ne,aS as ie}from"./vue-vendor-Bsazo-x0.js";import{i as ce,z as le}from"./element-plus-CqiD73Lu.js";import{P as w}from"./vendor-Dr8jvgFu.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const n of i.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&a(n)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}})();const ue="modulepreload",de=function(t){return"/admin-next/"+t},H={},_=function(e,s,a){let o=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),c=(n==null?void 0:n.nonce)||(n==null?void 0:n.getAttribute("nonce"));o=Promise.allSettled(s.map(l=>{if(l=de(l),l in H)return;H[l]=!0;const d=l.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const r=document.createElement("link");if(r.rel=d?"stylesheet":ue,d||(r.as="script"),r.crossOrigin="",r.href=l,c&&r.setAttribute("nonce",c),document.head.appendChild(r),d)return new Promise((u,h)=>{r.addEventListener("load",u),r.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(n){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=n,window.dispatchEvent(c),!c.defaultPrevented)throw n}return o.then(n=>{for(const c of n||[])c.status==="rejected"&&i(c.reason);return e().catch(i)})};let x=null,he=0;function F(t,e="info",s="",a=3e3){x||(x=document.createElement("div"),x.id="toast-container",x.style.cssText="position: fixed; top: 20px; right: 20px; z-index: 10000;",document.body.appendChild(x));const o=++he,i=document.createElement("div");i.className=`toast rounded-2xl p-4 shadow-2xl backdrop-blur-sm toast-${e}`,i.style.cssText=`
|
|
position: relative;
|
|
min-width: 320px;
|
|
max-width: 500px;
|
|
margin-bottom: 16px;
|
|
transform: translateX(100%);
|
|
transition: transform 0.3s ease-in-out;
|
|
`;const n={success:"fas fa-check-circle",error:"fas fa-times-circle",warning:"fas fa-exclamation-triangle",info:"fas fa-info-circle"},c=t.replace(/\n/g,"<br>");return i.innerHTML=`
|
|
<div class="flex items-start gap-3">
|
|
<div class="flex-shrink-0 mt-0.5">
|
|
<i class="${n[e]} text-lg"></i>
|
|
</div>
|
|
<div class="flex-1 min-w-0">
|
|
${s?`<h4 class="font-semibold text-sm mb-1">${s}</h4>`:""}
|
|
<p class="text-sm opacity-90 leading-relaxed">${c}</p>
|
|
</div>
|
|
<button onclick="this.parentElement.parentElement.remove()"
|
|
class="flex-shrink-0 text-white/70 hover:text-white transition-colors ml-2">
|
|
<i class="fas fa-times"></i>
|
|
</button>
|
|
</div>
|
|
`,x.appendChild(i),setTimeout(()=>{i.style.transform="translateX(0)"},10),a>0&&setTimeout(()=>{i.style.transform="translateX(100%)",setTimeout(()=>{i.remove()},300)},a),o}const me=Object.freeze(Object.defineProperty({__proto__:null,showToast:F},Symbol.toStringTag,{value:"Module"})),D={basePath:"/admin-next/",apiPrefix:""};function fe(t=""){return t&&!t.startsWith("/")&&(t="/"+t),D.basePath+(t.startsWith("#")?t:"#"+t)}function pe(){return fe("/login")}const q=D.apiPrefix;function P(t){return t.startsWith("/")||(t="/"+t),q+t}class ge{constructor(){this.baseURL=q}getAuthToken(){return localStorage.getItem("authToken")||null}buildConfig(e={}){const s={headers:{"Content-Type":"application/json",...e.headers},...e},a=this.getAuthToken();return a&&(s.headers.Authorization=`Bearer ${a}`),s}async handleResponse(e){if(e.status===401){const a=window.location.pathname+window.location.hash;throw a.includes("/login")||a.endsWith("/")||(localStorage.removeItem("authToken"),window.location.href=pe()),new Error("Unauthorized")}const s=e.headers.get("content-type");if(s&&s.includes("application/json")){const a=await e.json();if(!e.ok){const o=new Error(a.message||`HTTP ${e.status}`);throw o.response={status:e.status,data:a},o.message=a.message||o.message,o}return a}if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return e}async get(e,s={}){let a=P(e);if(s.params){const c=new URLSearchParams(s.params);a+="?"+c.toString()}const{params:o,...i}=s,n=this.buildConfig({...i,method:"GET"});try{const c=await fetch(a,n);return await this.handleResponse(c)}catch(c){throw console.error("API GET Error:",c),c}}async post(e,s=null,a={}){const o=P(e),i=this.buildConfig({...a,method:"POST",body:s?JSON.stringify(s):void 0});try{const n=await fetch(o,i);return await this.handleResponse(n)}catch(n){throw console.error("API POST Error:",n),n}}async put(e,s=null,a={}){const o=P(e),i=this.buildConfig({...a,method:"PUT",body:s?JSON.stringify(s):void 0});try{const n=await fetch(o,i);return await this.handleResponse(n)}catch(n){throw console.error("API PUT Error:",n),n}}async patch(e,s=null,a={}){const o=P(e),i=this.buildConfig({...a,method:"PATCH",body:s?JSON.stringify(s):void 0});try{const n=await fetch(o,i);return await this.handleResponse(n)}catch(n){throw console.error("API PATCH Error:",n),n}}async delete(e,s={}){const a=P(e),{data:o,...i}=s,n=this.buildConfig({...i,method:"DELETE",body:o?JSON.stringify(o):void 0});try{const c=await fetch(a,n);return await this.handleResponse(c)}catch(c){throw console.error("API DELETE Error:",c),c}}}const L=new ge,b=`${q}/users`,G=V("user",{state:()=>({user:null,isAuthenticated:!1,sessionToken:null,loading:!1,config:null}),getters:{isLoggedIn:t=>t.isAuthenticated&&t.user,userName:t=>{var e,s;return((e=t.user)==null?void 0:e.displayName)||((s=t.user)==null?void 0:s.username)},userRole:t=>{var e;return(e=t.user)==null?void 0:e.role}},actions:{async login(t){this.loading=!0;try{const e=await w.post(`${b}/login`,t);if(e.data.success)return this.user=e.data.user,this.sessionToken=e.data.sessionToken,this.isAuthenticated=!0,localStorage.setItem("userToken",this.sessionToken),localStorage.setItem("userData",JSON.stringify(this.user)),this.setAuthHeader(),e.data;throw new Error(e.data.message||"Login failed")}catch(e){throw this.clearAuth(),e}finally{this.loading=!1}},async logout(){try{this.sessionToken&&await w.post(`${b}/logout`,{},{headers:{"x-user-token":this.sessionToken}})}catch(t){console.error("Logout request failed:",t)}finally{this.clearAuth()}},async checkAuth(){const t=localStorage.getItem("userToken"),e=localStorage.getItem("userData"),s=localStorage.getItem("userConfig");if(!t||!e)return this.clearAuth(),!1;try{return this.sessionToken=t,this.user=JSON.parse(e),this.config=s?JSON.parse(s):null,this.isAuthenticated=!0,this.setAuthHeader(),await this.getUserProfile(),!0}catch(a){return console.error("Auth check failed:",a),this.clearAuth(),!1}},async getUserProfile(){var t,e,s,a;try{const o=await w.get(`${b}/profile`);if(o.data.success)return this.user=o.data.user,this.config=o.data.config,localStorage.setItem("userData",JSON.stringify(this.user)),localStorage.setItem("userConfig",JSON.stringify(this.config)),o.data.user}catch(o){throw(((t=o.response)==null?void 0:t.status)===401||((e=o.response)==null?void 0:e.status)===403)&&(this.clearAuth(),((s=o.response)==null?void 0:s.status)===403)?new Error(((a=o.response.data)==null?void 0:a.message)||"Your account has been disabled"):o}},async getUserApiKeys(t=!1){try{const e={};t&&(e.includeDeleted="true");const s=await w.get(`${b}/api-keys`,{params:e});return s.data.success?s.data.apiKeys:[]}catch(e){throw console.error("Failed to fetch API keys:",e),e}},async createApiKey(t){try{return(await w.post(`${b}/api-keys`,t)).data}catch(e){throw console.error("Failed to create API key:",e),e}},async deleteApiKey(t){try{return(await w.delete(`${b}/api-keys/${t}`)).data}catch(e){throw console.error("Failed to delete API key:",e),e}},async getUserUsageStats(t={}){try{const e=await w.get(`${b}/usage-stats`,{params:t});return e.data.success?e.data.stats:null}catch(e){throw console.error("Failed to fetch usage stats:",e),e}},clearAuth(){this.user=null,this.sessionToken=null,this.isAuthenticated=!1,this.config=null,localStorage.removeItem("userToken"),localStorage.removeItem("userData"),localStorage.removeItem("userConfig"),delete w.defaults.headers.common["x-user-token"]},setAuthHeader(){this.sessionToken&&(w.defaults.headers.common["x-user-token"]=this.sessionToken)},setupAxiosInterceptors(){w.interceptors.response.use(t=>t,t=>{var e,s;if(((e=t.response)==null?void 0:e.status)===403){const a=(s=t.response.data)==null?void 0:s.message;a&&(a.includes("disabled")||a.includes("Account disabled"))&&(this.clearAuth(),F(a,"error"),window.location.pathname!=="/user-login"&&(window.location.href="/user-login"))}return Promise.reject(t)})}}}),ve=()=>_(()=>import("./LoginView-DoWL8FVG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),ye=()=>_(()=>import("./UserLoginView-DLDQbJ4B.js"),__vite__mapDeps([8,1,2,3,4,5,6,7])),_e=()=>_(()=>import("./UserDashboardView-BYsb4Jjm.js"),__vite__mapDeps([9,1,2,3,10,11,12,4,5,6,13,7])),we=()=>_(()=>import("./UserManagementView-CeVB9zy-.js"),__vite__mapDeps([14,1,10,11,5,4,6,7])),E=()=>_(()=>import("./MainLayout-DI98Wpmx.js"),__vite__mapDeps([15,1,16,17,2,3,4,5,6,18])),Te=()=>_(()=>import("./DashboardView-7oo1CngH.js"),__vite__mapDeps([19,4,1,5,6,20,21])),Ae=()=>_(()=>import("./ApiKeysView-DQid3j6U.js"),__vite__mapDeps([22,4,1,5,6,23,24,25,26])),be=()=>_(()=>import("./AccountsView-Def5MYP1.js"),__vite__mapDeps([27,4,1,5,6,10,11,20,24,25,28])),ke=()=>_(()=>import("./TutorialView-Yt7QQXDS.js"),__vite__mapDeps([12,1,4,5,6,13])),xe=()=>_(()=>import("./SettingsView-BAOJwx9G.js"),__vite__mapDeps([29,1,4,5,6,30])),Ee=()=>_(()=>import("./ApiStatsView-ehsoouji.js"),__vite__mapDeps([31,1,16,17,2,3,5,23,12,4,6,13,32])),Ie=[{path:"/",redirect:()=>{const t=window.location.pathname,e=D.basePath.replace(/\/$/,"");return t===e||t===e+"/","/api-stats"}},{path:"/login",name:"Login",component:ve,meta:{requiresAuth:!1}},{path:"/admin-login",redirect:"/login"},{path:"/user-login",name:"UserLogin",component:ye,meta:{requiresAuth:!1,userAuth:!0}},{path:"/user-dashboard",name:"UserDashboard",component:_e,meta:{requiresUserAuth:!0}},{path:"/api-stats",name:"ApiStats",component:Ee,meta:{requiresAuth:!1}},{path:"/dashboard",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Dashboard",component:Te}]},{path:"/api-keys",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"ApiKeys",component:Ae}]},{path:"/accounts",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Accounts",component:be}]},{path:"/tutorial",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Tutorial",component:ke}]},{path:"/settings",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"Settings",component:xe}]},{path:"/user-management",component:E,meta:{requiresAuth:!0},children:[{path:"",name:"UserManagement",component:we}]},{path:"/:pathMatch(.*)*",redirect:"/api-stats"}],U=X({history:Y(D.basePath),routes:Ie});U.beforeEach(async(t,e,s)=>{const a=W(),o=G();if(console.log("路由导航:",{to:t.path,from:e.path,fullPath:t.fullPath,requiresAuth:t.meta.requiresAuth,requiresUserAuth:t.meta.requiresUserAuth,isAuthenticated:a.isAuthenticated,isUserAuthenticated:o.isAuthenticated}),t.path===e.path&&t.fullPath===e.fullPath)return s();if(t.meta.requiresUserAuth){if(!o.isAuthenticated)try{if(!await o.checkAuth())return s("/user-login")}catch(i){if(i.message&&i.message.includes("disabled")){const{showToast:n}=await _(async()=>{const{showToast:c}=await Promise.resolve().then(()=>me);return{showToast:c}},void 0);n(i.message,"error")}return s("/user-login")}return s()}t.path==="/api-stats"||t.path.startsWith("/api-stats")?s():t.path==="/user-login"?o.isAuthenticated?s("/user-dashboard"):s():t.meta.requiresAuth&&!a.isAuthenticated?s("/login"):t.path==="/login"&&a.isAuthenticated?s("/dashboard"):s()});const W=V("auth",()=>{const t=g(!1),e=g(localStorage.getItem("authToken")||""),s=g(""),a=g(""),o=g(!1),i=g({siteName:"Claude Relay Service",siteIcon:"",siteIconData:"",faviconData:""}),n=g(!0),c=S(()=>!!e.value&&t.value),l=S(()=>e.value),d=S(()=>({username:s.value}));async function f(m){o.value=!0,a.value="";try{const v=await L.post("/web/auth/login",m);v.success?(e.value=v.token,s.value=v.username||m.username,t.value=!0,localStorage.setItem("authToken",v.token),await U.push("/dashboard")):a.value=v.message||"登录失败"}catch(v){a.value=v.message||"登录失败,请检查用户名和密码"}finally{o.value=!1}}function r(){t.value=!1,e.value="",s.value="",localStorage.removeItem("authToken"),U.push("/login")}function u(){e.value&&(t.value=!0,h())}async function h(){try{const m=await L.get("/web/auth/user");m.success&&m.user&&(s.value=m.user.username),(await L.get("/admin/dashboard")).success||r()}catch{r()}}async function T(){n.value=!0;try{const m=await L.get("/admin/oem-settings");if(m.success&&m.data){if(i.value={...i.value,...m.data},m.data.siteIconData||m.data.siteIcon){const v=document.querySelector("link[rel*='icon']")||document.createElement("link");v.type="image/x-icon",v.rel="shortcut icon",v.href=m.data.siteIconData||m.data.siteIcon,document.getElementsByTagName("head")[0].appendChild(v)}m.data.siteName&&(document.title=`${m.data.siteName} - 管理后台`)}}catch(m){console.error("加载OEM设置失败:",m)}finally{n.value=!1}}return{isLoggedIn:t,authToken:e,username:s,loginError:a,loginLoading:o,oemSettings:i,oemLoading:n,isAuthenticated:c,token:l,user:d,login:f,logout:r,checkAuth:u,loadOemSettings:T}}),y={LIGHT:"light",DARK:"dark",AUTO:"auto"},Pe=V("theme",()=>{const t=g(y.AUTO),e=g(!1),s=S(()=>t.value===y.DARK?!0:t.value===y.LIGHT?!1:e.value),a=S(()=>s.value?y.DARK:y.LIGHT),o=()=>{const r=window.matchMedia("(prefers-color-scheme: dark)");e.value=r.matches;const u=localStorage.getItem("themeMode");u&&Object.values(y).includes(u)?t.value=u:t.value=y.AUTO,i(),l()},i=()=>{const r=document.documentElement;s.value?r.classList.add("dark"):r.classList.remove("dark")},n=r=>{Object.values(y).includes(r)&&(t.value=r)},c=()=>{const r=[y.LIGHT,y.DARK,y.AUTO],h=(r.indexOf(t.value)+1)%r.length;t.value=r[h]};K(t,r=>{localStorage.setItem("themeMode",r),i()}),K(e,()=>{t.value===y.AUTO&&i()});const l=()=>{const r=window.matchMedia("(prefers-color-scheme: dark)"),u=h=>{e.value=h.matches};return e.value=r.matches,r.addEventListener("change",u),()=>{r.removeEventListener("change",u)}};return{themeMode:t,isDarkMode:s,currentTheme:a,systemPrefersDark:e,ThemeMode:y,initTheme:o,setThemeMode:n,cycleThemeMode:c,watchSystemTheme:l,toggleTheme:()=>{c()},setTheme:r=>{r==="dark"?n(y.DARK):r==="light"&&n(y.LIGHT)}}}),M=(t,e)=>{const s=t.__vccOpts||t;for(const[a,o]of e)s[a]=o;return s},Se={class:"toast-container"},Le=["onClick"],Ce={class:"toast-content"},Oe={class:"toast-icon"},Ue={class:"toast-body"},De={key:0,class:"toast-title"},Re={class:"toast-message"},$e=["onClick"],Ve={__name:"ToastNotification",setup(t,{expose:e}){const s=g([]);let a=0;const o=d=>{const f={success:"fas fa-check-circle",error:"fas fa-exclamation-circle",warning:"fas fa-exclamation-triangle",info:"fas fa-info-circle"};return f[d]||f.info},i=(d,f="info",r=null,u=5e3)=>{const h=++a,T={id:h,message:d,type:f,title:r,duration:u,isVisible:!1};return s.value.push(T),setTimeout(()=>{T.isVisible=!0},10),u>0&&setTimeout(()=>{n(h)},u),h},n=d=>{const f=s.value.findIndex(r=>r.id===d);if(f>-1){const r=s.value[f];r.isVisible=!1,setTimeout(()=>{const u=s.value.findIndex(h=>h.id===d);u>-1&&s.value.splice(u,1)},300)}},c=()=>{s.value.forEach(d=>{d.isVisible=!1}),setTimeout(()=>{s.value.length=0},300)},l=(d,f="info",r=null,u=5e3)=>i(d,f,r,u);return N(()=>{window.showToast=l}),j(()=>{window.showToast===l&&delete window.showToast}),e({showToast:l,removeToast:n,clearAllToasts:c}),(d,f)=>(A(),z(J,{to:"body"},[p("div",Se,[(A(!0),k(ee,null,Z(s.value,r=>(A(),k("div",{key:r.id,class:$(["toast",`toast-${r.type}`,r.isVisible?"toast-show":"toast-hide"]),onClick:u=>n(r.id)},[p("div",Ce,[p("div",Oe,[p("i",{class:$(o(r.type))},null,2)]),p("div",Ue,[r.title?(A(),k("div",De,I(r.title),1)):O("",!0),p("div",Re,I(r.message),1)]),p("button",{class:"toast-close",onClick:B(u=>n(r.id),["stop"])},f[0]||(f[0]=[p("i",{class:"fas fa-times"},null,-1)]),8,$e)]),r.duration>0?(A(),k("div",{key:0,class:"toast-progress",style:te({animationDuration:`${r.duration}ms`})},null,4)):O("",!0)],10,Le))),128))])]))}},Ne=M(Ve,[["__scopeId","data-v-c8b24ff5"]]),qe={class:"modal-content mx-auto w-full max-w-md p-6"},Me={class:"mb-6 flex items-start gap-4"},Ke={class:"flex-1"},He={class:"mb-2 text-lg font-semibold text-gray-900 dark:text-white"},je={class:"whitespace-pre-line leading-relaxed text-gray-700 dark:text-gray-400"},ze={class:"flex items-center justify-end gap-3"},Je=["disabled"],Be=["disabled"],Fe={key:0,class:"loading-spinner mr-2"},Ge={__name:"ConfirmDialog",setup(t,{expose:e}){const s=g(!1),a=g(!1),o=g(""),i=g(""),n=g("确认"),c=g("取消");let l=null;const d=(h,T,m="确认",v="取消")=>new Promise(Q=>{o.value=h,i.value=T,n.value=m,c.value=v,s.value=!0,a.value=!1,l=Q}),f=()=>{a.value||(a.value=!0,setTimeout(()=>{s.value=!1,a.value=!1,l&&(l(!0),l=null)},200))},r=()=>{a.value||(s.value=!1,l&&(l(!1),l=null))},u=h=>{s.value&&(h.key==="Escape"?r():h.key==="Enter"&&!h.shiftKey&&!h.ctrlKey&&!h.altKey&&f())};return N(()=>{window.showConfirm=d,document.addEventListener("keydown",u)}),j(()=>{window.showConfirm===d&&delete window.showConfirm,document.removeEventListener("keydown",u)}),e({showConfirm:d}),(h,T)=>(A(),z(J,{to:"body"},[C(oe,{appear:"",name:"modal"},{default:se(()=>[s.value?(A(),k("div",{key:0,class:"modal fixed inset-0 z-[100] flex items-center justify-center p-4",onClick:B(r,["self"])},[p("div",qe,[p("div",Me,[T[0]||(T[0]=p("div",{class:"flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-amber-500 to-amber-600"},[p("i",{class:"fas fa-exclamation-triangle text-lg text-white"})],-1)),p("div",Ke,[p("h3",He,I(o.value),1),p("div",je,I(i.value),1)])]),p("div",ze,[p("button",{class:"btn bg-gray-100 px-6 py-3 text-gray-700 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600",disabled:a.value,onClick:r},I(c.value),9,Je),p("button",{class:$(["btn btn-warning px-6 py-3",{"cursor-not-allowed opacity-50":a.value}]),disabled:a.value,onClick:f},[a.value?(A(),k("div",Fe)):O("",!0),ae(" "+I(n.value),1)],10,Be)])])])):O("",!0)]),_:1})]))}},We=M(Ge,[["__scopeId","data-v-6b3390a6"]]),Qe={id:"app"},Xe={__name:"App",setup(t){const e=W(),s=Pe(),a=g(),o=g();return N(()=>{s.initTheme(),s.watchSystemTheme(),e.checkAuth(),e.loadOemSettings()}),(i,n)=>{const c=re("router-view");return A(),k("div",Qe,[C(c),C(Ne,{ref_key:"toastRef",ref:a},null,512),C(We,{ref_key:"confirmRef",ref:o},null,512)])}}},Ye=M(Xe,[["__scopeId","data-v-dab04b7e"]]),R=ne(Ye),Ze=ie();R.use(Ze);R.use(U);R.use(ce,{locale:le});const et=G();et.setupAxiosInterceptors();R.mount("#app");export{q as A,M as _,Pe as a,G as b,L as c,F as s,W as u};
|