/** * 由 Fantastic-admin 提供技术支持 * Powered by Fantastic-admin * Gitee https://gitee.com/hooray/fantastic-admin * Github https://github.com/hooray/fantastic-admin */ import{d as pe}from"./pinia-7162f4ce.js";import{i as g,j as E,k as K,h as be,l as W,c as J,e as X,b as w,d as P,r as C,m as me,a as S,L as j,f as ge,M as he}from"./_MapCache-1b613190.js";import{r as m,w as v}from"./runtime-core.esm-bundler-5fc1c360.js";function Y(e){return e}var L=Object.create,ye=function(){function e(){}return function(t){if(!g(t))return{};if(L)return L(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const ve=ye;function Z(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Te(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n0){if(++t>=we)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Oe(e){return function(){return e}}var _e=E?function(e,t){return E(e,"toString",{configurable:!0,enumerable:!1,value:Oe(t),writable:!0})}:Y;const xe=_e;var Pe=Se(xe);const Ce=Pe;function je(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i-1&&e%1==0&&e<=Ie}function $(e){return e!=null&&V(e.length)&&!W(e)}function Ee(e,t,n){if(!g(n))return!1;var r=typeof t;return(r=="number"?$(n)&&J(t,n.length):r=="string"&&t in n)?X(n[t],e):!1}function Le(e){return Q(function(t,n){var r=-1,o=n.length,i=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,s&&Ee(n[0],n[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++r{const e=k(nn,rn),t=m(e);v(()=>t.value.app.theme,f=>{document.body.setAttribute("data-theme",f)},{immediate:!0}),v(()=>t.value.app.colorScheme,f=>{switch(f===""&&(f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),f){case"dark":document.documentElement.classList.add("dark");break;case"light":document.documentElement.classList.remove("dark");break}},{immediate:!0}),v(()=>t.value.layout.widthMode,f=>{document.body.setAttribute("data-app-width-mode",f)},{immediate:!0}),v(()=>t.value.menu.menuMode,f=>{document.body.setAttribute("data-menu-mode",f)},{immediate:!0});const n=m("other"),r=navigator.userAgent.toLowerCase();switch(!0){case r.includes("mac os"):n.value="mac";break;case r.includes("windows"):n.value="windows";break;case r.includes("linux"):n.value="linux";break}const o=m(),i=m(!1);function s(f,de=!0){o.value=f,i.value=de}const a=m("pc");function u(f){t.value.layout.enableMobileAdaptation?/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?a.value="mobile":a.value=f<992?"mobile":"pc":a.value="pc"}const c=m(e.menu.subMenuCollapse);function d(){t.value.menu.subMenuCollapse=!t.value.menu.subMenuCollapse,a.value==="pc"&&(c.value=!c.value)}v(a,f=>{switch(f){case"pc":t.value.menu.subMenuCollapse=c.value;break;case"mobile":t.value.menu.subMenuCollapse=!0;break}document.body.setAttribute("data-mode",f)},{immediate:!0});function p(f){t.value.app.defaultLang=f}function y(f){t.value.app.colorScheme=f}const b=m(!1);function A(f){b.value=f??!b.value}function ce(f){t.value=k(f,t.value)}return{settings:t,os:n,title:o,titleFirst:i,setTitle:s,mode:a,setMode:u,subMenuCollapseLastStatus:c,toggleSidebarCollapse:d,setDefaultLang:p,setColorScheme:y,mainPageMaximizeStatus:b,setMainPageMaximize:A,updateSettings:ce}});export{Kt as A,h as S,G as U,re as a,oe as b,V as c,Y as d,Xt as e,$ as f,Le as g,I as h,O as i,Q as j,Yt as k,Mt as l,ee as m,At as n,$e as o,je as p,ie as q,se as r,Ce as s,Gt as t,un as u,kt as v,z as w,gt as x,Te as y,Nt as z};