mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-07 23:31:10 +08:00
2 lines
60 KiB
JavaScript
2 lines
60 KiB
JavaScript
import{d as e,I as o,P as t,F as n,G as r,T as l,r as i,J as a,L as s,ad as c,ae as d,k as u,O as v,X as m,H as h,E as p,af as g,ag as f,ah as b,C as x,ai as C,K as w,aj as y,ak as z,al as k,am as S,an as I,q as A,ao as T,ap as _,aq as H,ar as P,as as M,at as R,au as N,av as B,aw as O,ax as L,ay as j,az as $,aA as E,Z as F,_ as V,a0 as D,aB as K,u as U,a5 as G,f as q,aC as W,c as Y,$ as X,aD as J,y as Z,o as Q,a4 as ee,b as oe,aE as te,h as ne,B as re,a6 as le,a as ie,aF as ae,aa as se,U as ce}from"./main-Cz0Kbk_r.js";import{u as de}from"./index-CIL5XN93.js";import{u as ue,a as ve}from"./index-DajjVwSG.js";import{s as me}from"./public-Ig7Z0OE-.js";import{u as he}from"./useStore-Dwy-FZpQ.js";import{g as pe}from"./setting-BpZVFMT6.js";import{L as ge}from"./LogoGithub-DSXkX9e3.js";import{C as fe}from"./ChevronDown-CHubvMoO.js";import{N as be}from"./Badge-CRlWo-nQ.js";import"./index-CJfR-ED3.js";import"./access-BRiMVbLg.js";const xe=e({name:"ChevronDownFilled",render:()=>o("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o("path",{d:"M3.20041 5.73966C3.48226 5.43613 3.95681 5.41856 4.26034 5.70041L8 9.22652L11.7397 5.70041C12.0432 5.41856 12.5177 5.43613 12.7996 5.73966C13.0815 6.0432 13.0639 6.51775 12.7603 6.7996L8.51034 10.7996C8.22258 11.0668 7.77743 11.0668 7.48967 10.7996L3.23966 6.7996C2.93613 6.51775 2.91856 6.0432 3.20041 5.73966Z",fill:"currentColor"}))}),Ce=t("n-layout-sider"),we={type:String,default:"static"},ye=n("layout","\n color: var(--n-text-color);\n background-color: var(--n-color);\n box-sizing: border-box;\n position: relative;\n z-index: auto;\n flex: auto;\n overflow: hidden;\n transition:\n box-shadow .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n color .3s var(--n-bezier);\n",[n("layout-scroll-container","\n overflow-x: hidden;\n box-sizing: border-box;\n height: 100%;\n "),r("absolute-positioned","\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n ")]),ze={embedded:Boolean,position:we,nativeScrollbar:{type:Boolean,default:!0},scrollbarProps:Object,onScroll:Function,contentClass:String,contentStyle:{type:[String,Object],default:""},hasSider:Boolean,siderPlacement:{type:String,default:"left"}},ke=t("n-layout");function Se(t){return e({name:t?"LayoutContent":"Layout",props:Object.assign(Object.assign({},s.props),ze),setup(e){const o=i(null),t=i(null),{mergedClsPrefixRef:n,inlineThemeDisabled:r}=a(e),l=s("Layout","-layout",ye,c,e,n);m(ke,e);let h=0,p=0;d(()=>{if(e.nativeScrollbar){const e=o.value;e&&(e.scrollTop=p,e.scrollLeft=h)}});const g={scrollTo:function(n,r){if(e.nativeScrollbar){const{value:e}=o;e&&(void 0===r?e.scrollTo(n):e.scrollTo(n,r))}else{const{value:e}=t;e&&e.scrollTo(n,r)}}},f=u(()=>{const{common:{cubicBezierEaseInOut:o},self:t}=l.value;return{"--n-bezier":o,"--n-color":e.embedded?t.colorEmbedded:t.color,"--n-text-color":t.textColor}}),b=r?v("layout",u(()=>e.embedded?"e":""),f,e):void 0;return Object.assign({mergedClsPrefix:n,scrollableElRef:o,scrollbarInstRef:t,hasSiderStyle:{display:"flex",flexWrap:"nowrap",width:"100%",flexDirection:"row"},mergedTheme:l,handleNativeElScroll:o=>{var t;const n=o.target;h=n.scrollLeft,p=n.scrollTop,null===(t=e.onScroll)||void 0===t||t.call(e,o)},cssVars:r?void 0:f,themeClass:null==b?void 0:b.themeClass,onRender:null==b?void 0:b.onRender},g)},render(){var e;const{mergedClsPrefix:n,hasSider:r}=this;null===(e=this.onRender)||void 0===e||e.call(this);const i=r?this.hasSiderStyle:void 0,a=[this.themeClass,t&&`${n}-layout-content`,`${n}-layout`,`${n}-layout--${this.position}-positioned`];return o("div",{class:a,style:this.cssVars},this.nativeScrollbar?o("div",{ref:"scrollableElRef",class:[`${n}-layout-scroll-container`,this.contentClass],style:[this.contentStyle,i],onScroll:this.handleNativeElScroll},this.$slots):o(l,Object.assign({},this.scrollbarProps,{onScroll:this.onScroll,ref:"scrollbarInstRef",theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,contentClass:this.contentClass,contentStyle:[this.contentStyle,i]}),this.$slots))}})}const Ie=Se(!1),Ae=Se(!0),Te=n("layout-header","\n transition:\n color .3s var(--n-bezier),\n background-color .3s var(--n-bezier),\n box-shadow .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n box-sizing: border-box;\n width: 100%;\n background-color: var(--n-color);\n color: var(--n-text-color);\n",[r("absolute-positioned","\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n "),r("bordered","\n border-bottom: solid 1px var(--n-border-color);\n ")]),_e={position:we,inverted:Boolean,bordered:{type:Boolean,default:!1}},He=e({name:"LayoutHeader",props:Object.assign(Object.assign({},s.props),_e),setup(e){const{mergedClsPrefixRef:o,inlineThemeDisabled:t}=a(e),n=s("Layout","-layout-header",Te,c,e,o),r=u(()=>{const{common:{cubicBezierEaseInOut:o},self:t}=n.value,r={"--n-bezier":o};return e.inverted?(r["--n-color"]=t.headerColorInverted,r["--n-text-color"]=t.textColorInverted,r["--n-border-color"]=t.headerBorderColorInverted):(r["--n-color"]=t.headerColor,r["--n-text-color"]=t.textColor,r["--n-border-color"]=t.headerBorderColor),r}),l=t?v("layout-header",u(()=>e.inverted?"a":"b"),r,e):void 0;return{mergedClsPrefix:o,cssVars:t?void 0:r,themeClass:null==l?void 0:l.themeClass,onRender:null==l?void 0:l.onRender}},render(){var e;const{mergedClsPrefix:t}=this;return null===(e=this.onRender)||void 0===e||e.call(this),o("div",{class:[`${t}-layout-header`,this.themeClass,this.position&&`${t}-layout-header--${this.position}-positioned`,this.bordered&&`${t}-layout-header--bordered`],style:this.cssVars},this.$slots)}}),Pe=n("layout-sider","\n flex-shrink: 0;\n box-sizing: border-box;\n position: relative;\n z-index: 1;\n color: var(--n-text-color);\n transition:\n color .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n min-width .3s var(--n-bezier),\n max-width .3s var(--n-bezier),\n transform .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n background-color: var(--n-color);\n display: flex;\n justify-content: flex-end;\n",[r("bordered",[h("border",'\n content: "";\n position: absolute;\n top: 0;\n bottom: 0;\n width: 1px;\n background-color: var(--n-border-color);\n transition: background-color .3s var(--n-bezier);\n ')]),h("left-placement",[r("bordered",[h("border","\n right: 0;\n ")])]),r("right-placement","\n justify-content: flex-start;\n ",[r("bordered",[h("border","\n left: 0;\n ")]),r("collapsed",[n("layout-toggle-button",[n("base-icon","\n transform: rotate(180deg);\n ")]),n("layout-toggle-bar",[p("&:hover",[h("top",{transform:"rotate(-12deg) scale(1.15) translateY(-2px)"}),h("bottom",{transform:"rotate(12deg) scale(1.15) translateY(2px)"})])])]),n("layout-toggle-button","\n left: 0;\n transform: translateX(-50%) translateY(-50%);\n ",[n("base-icon","\n transform: rotate(0);\n ")]),n("layout-toggle-bar","\n left: -28px;\n transform: rotate(180deg);\n ",[p("&:hover",[h("top",{transform:"rotate(12deg) scale(1.15) translateY(-2px)"}),h("bottom",{transform:"rotate(-12deg) scale(1.15) translateY(2px)"})])])]),r("collapsed",[n("layout-toggle-bar",[p("&:hover",[h("top",{transform:"rotate(-12deg) scale(1.15) translateY(-2px)"}),h("bottom",{transform:"rotate(12deg) scale(1.15) translateY(2px)"})])]),n("layout-toggle-button",[n("base-icon","\n transform: rotate(0);\n ")])]),n("layout-toggle-button","\n transition:\n color .3s var(--n-bezier),\n right .3s var(--n-bezier),\n left .3s var(--n-bezier),\n border-color .3s var(--n-bezier),\n background-color .3s var(--n-bezier);\n cursor: pointer;\n width: 24px;\n height: 24px;\n position: absolute;\n top: 50%;\n right: 0;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 18px;\n color: var(--n-toggle-button-icon-color);\n border: var(--n-toggle-button-border);\n background-color: var(--n-toggle-button-color);\n box-shadow: 0 2px 4px 0px rgba(0, 0, 0, .06);\n transform: translateX(50%) translateY(-50%);\n z-index: 1;\n ",[n("base-icon","\n transition: transform .3s var(--n-bezier);\n transform: rotate(180deg);\n ")]),n("layout-toggle-bar","\n cursor: pointer;\n height: 72px;\n width: 32px;\n position: absolute;\n top: calc(50% - 36px);\n right: -28px;\n ",[h("top, bottom","\n position: absolute;\n width: 4px;\n border-radius: 2px;\n height: 38px;\n left: 14px;\n transition: \n background-color .3s var(--n-bezier),\n transform .3s var(--n-bezier);\n "),h("bottom","\n position: absolute;\n top: 34px;\n "),p("&:hover",[h("top",{transform:"rotate(12deg) scale(1.15) translateY(-2px)"}),h("bottom",{transform:"rotate(-12deg) scale(1.15) translateY(2px)"})]),h("top, bottom",{backgroundColor:"var(--n-toggle-bar-color)"}),p("&:hover",[h("top, bottom",{backgroundColor:"var(--n-toggle-bar-color-hover)"})])]),h("border","\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 1px;\n transition: background-color .3s var(--n-bezier);\n "),n("layout-sider-scroll-container","\n flex-grow: 1;\n flex-shrink: 0;\n box-sizing: border-box;\n height: 100%;\n opacity: 0;\n transition: opacity .3s var(--n-bezier);\n max-width: 100%;\n "),r("show-content",[n("layout-sider-scroll-container",{opacity:1})]),r("absolute-positioned","\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n ")]),Me=e({props:{clsPrefix:{type:String,required:!0},onClick:Function},render(){const{clsPrefix:e}=this;return o("div",{onClick:this.onClick,class:`${e}-layout-toggle-bar`},o("div",{class:`${e}-layout-toggle-bar__top`}),o("div",{class:`${e}-layout-toggle-bar__bottom`}))}}),Re=e({name:"LayoutToggleButton",props:{clsPrefix:{type:String,required:!0},onClick:Function},render(){const{clsPrefix:e}=this;return o("div",{class:`${e}-layout-toggle-button`,onClick:this.onClick},o(g,{clsPrefix:e},{default:()=>o(f,null)}))}}),Ne={position:we,bordered:Boolean,collapsedWidth:{type:Number,default:48},width:{type:[Number,String],default:272},contentClass:String,contentStyle:{type:[String,Object],default:""},collapseMode:{type:String,default:"transform"},collapsed:{type:Boolean,default:void 0},defaultCollapsed:Boolean,showCollapsedContent:{type:Boolean,default:!0},showTrigger:{type:[Boolean,String],default:!1},nativeScrollbar:{type:Boolean,default:!0},inverted:Boolean,scrollbarProps:Object,triggerClass:String,triggerStyle:[String,Object],collapsedTriggerClass:String,collapsedTriggerStyle:[String,Object],"onUpdate:collapsed":[Function,Array],onUpdateCollapsed:[Function,Array],onAfterEnter:Function,onAfterLeave:Function,onExpand:[Function,Array],onCollapse:[Function,Array],onScroll:Function},Be=e({name:"LayoutSider",props:Object.assign(Object.assign({},s.props),Ne),setup(e){const o=x(ke),t=i(null),n=i(null),r=i(e.defaultCollapsed),l=C(w(e,"collapsed"),r),h=u(()=>b(l.value?e.collapsedWidth:e.width)),p=u(()=>"transform"!==e.collapseMode?{}:{minWidth:b(e.width)}),g=u(()=>o?o.siderPlacement:"left");let f=0,z=0;d(()=>{if(e.nativeScrollbar){const e=t.value;e&&(e.scrollTop=z,e.scrollLeft=f)}}),m(Ce,{collapsedRef:l,collapseModeRef:w(e,"collapseMode")});const{mergedClsPrefixRef:k,inlineThemeDisabled:S}=a(e),I=s("Layout","-layout-sider",Pe,c,e,k);const A={scrollTo:function(o,r){if(e.nativeScrollbar){const{value:e}=t;e&&(void 0===r?e.scrollTo(o):e.scrollTo(o,r))}else{const{value:e}=n;e&&e.scrollTo(o,r)}}},T=u(()=>{const{common:{cubicBezierEaseInOut:o},self:t}=I.value,{siderToggleButtonColor:n,siderToggleButtonBorder:r,siderToggleBarColor:l,siderToggleBarColorHover:i}=t,a={"--n-bezier":o,"--n-toggle-button-color":n,"--n-toggle-button-border":r,"--n-toggle-bar-color":l,"--n-toggle-bar-color-hover":i};return e.inverted?(a["--n-color"]=t.siderColorInverted,a["--n-text-color"]=t.textColorInverted,a["--n-border-color"]=t.siderBorderColorInverted,a["--n-toggle-button-icon-color"]=t.siderToggleButtonIconColorInverted,a.__invertScrollbar=t.__invertScrollbar):(a["--n-color"]=t.siderColor,a["--n-text-color"]=t.textColor,a["--n-border-color"]=t.siderBorderColor,a["--n-toggle-button-icon-color"]=t.siderToggleButtonIconColor),a}),_=S?v("layout-sider",u(()=>e.inverted?"a":"b"),T,e):void 0;return Object.assign({scrollableElRef:t,scrollbarInstRef:n,mergedClsPrefix:k,mergedTheme:I,styleMaxWidth:h,mergedCollapsed:l,scrollContainerStyle:p,siderPlacement:g,handleNativeElScroll:o=>{var t;const n=o.target;f=n.scrollLeft,z=n.scrollTop,null===(t=e.onScroll)||void 0===t||t.call(e,o)},handleTransitionend:function(o){var t,n;"max-width"===o.propertyName&&(l.value?null===(t=e.onAfterLeave)||void 0===t||t.call(e):null===(n=e.onAfterEnter)||void 0===n||n.call(e))},handleTriggerClick:function(){const{"onUpdate:collapsed":o,onUpdateCollapsed:t,onExpand:n,onCollapse:i}=e,{value:a}=l;t&&y(t,!a),o&&y(o,!a),r.value=!a,a?n&&y(n):i&&y(i)},inlineThemeDisabled:S,cssVars:T,themeClass:null==_?void 0:_.themeClass,onRender:null==_?void 0:_.onRender},A)},render(){var e;const{mergedClsPrefix:t,mergedCollapsed:n,showTrigger:r}=this;return null===(e=this.onRender)||void 0===e||e.call(this),o("aside",{class:[`${t}-layout-sider`,this.themeClass,`${t}-layout-sider--${this.position}-positioned`,`${t}-layout-sider--${this.siderPlacement}-placement`,this.bordered&&`${t}-layout-sider--bordered`,n&&`${t}-layout-sider--collapsed`,(!n||this.showCollapsedContent)&&`${t}-layout-sider--show-content`],onTransitionend:this.handleTransitionend,style:[this.inlineThemeDisabled?void 0:this.cssVars,{maxWidth:this.styleMaxWidth,width:b(this.width)}]},this.nativeScrollbar?o("div",{class:[`${t}-layout-sider-scroll-container`,this.contentClass],onScroll:this.handleNativeElScroll,style:[this.scrollContainerStyle,{overflow:"auto"},this.contentStyle],ref:"scrollableElRef"},this.$slots):o(l,Object.assign({},this.scrollbarProps,{onScroll:this.onScroll,ref:"scrollbarInstRef",style:this.scrollContainerStyle,contentStyle:this.contentStyle,contentClass:this.contentClass,theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,builtinThemeOverrides:this.inverted&&"true"===this.cssVars.__invertScrollbar?{colorHover:"rgba(255, 255, 255, .4)",color:"rgba(255, 255, 255, .3)"}:void 0}),this.$slots),r?o("bar"===r?Me:Re,{clsPrefix:t,class:n?this.collapsedTriggerClass:this.triggerClass,style:n?this.collapsedTriggerStyle:this.triggerStyle,onClick:this.handleTriggerClick}):null,this.bordered?o("div",{class:`${t}-layout-sider__border`}):null)}}),Oe=t("n-menu"),Le=t("n-submenu"),je=t("n-menu-item-group"),$e=[p("&::before","background-color: var(--n-item-color-hover);"),h("arrow","\n color: var(--n-arrow-color-hover);\n "),h("icon","\n color: var(--n-item-icon-color-hover);\n "),n("menu-item-content-header","\n color: var(--n-item-text-color-hover);\n ",[p("a","\n color: var(--n-item-text-color-hover);\n "),h("extra","\n color: var(--n-item-text-color-hover);\n ")])],Ee=[h("icon","\n color: var(--n-item-icon-color-hover-horizontal);\n "),n("menu-item-content-header","\n color: var(--n-item-text-color-hover-horizontal);\n ",[p("a","\n color: var(--n-item-text-color-hover-horizontal);\n "),h("extra","\n color: var(--n-item-text-color-hover-horizontal);\n ")])],Fe=p([n("menu","\n background-color: var(--n-color);\n color: var(--n-item-text-color);\n overflow: hidden;\n transition: background-color .3s var(--n-bezier);\n box-sizing: border-box;\n font-size: var(--n-font-size);\n padding-bottom: 6px;\n ",[r("horizontal","\n max-width: 100%;\n width: 100%;\n display: flex;\n overflow: hidden;\n padding-bottom: 0;\n ",[n("submenu","margin: 0;"),n("menu-item","margin: 0;"),n("menu-item-content","\n padding: 0 20px;\n border-bottom: 2px solid #0000;\n ",[p("&::before","display: none;"),r("selected","border-bottom: 2px solid var(--n-border-color-horizontal)")]),n("menu-item-content",[r("selected",[h("icon","color: var(--n-item-icon-color-active-horizontal);"),n("menu-item-content-header","\n color: var(--n-item-text-color-active-horizontal);\n ",[p("a","color: var(--n-item-text-color-active-horizontal);"),h("extra","color: var(--n-item-text-color-active-horizontal);")])]),r("child-active","\n border-bottom: 2px solid var(--n-border-color-horizontal);\n ",[n("menu-item-content-header","\n color: var(--n-item-text-color-child-active-horizontal);\n ",[p("a","\n color: var(--n-item-text-color-child-active-horizontal);\n "),h("extra","\n color: var(--n-item-text-color-child-active-horizontal);\n ")]),h("icon","\n color: var(--n-item-icon-color-child-active-horizontal);\n ")]),z("disabled",[z("selected, child-active",[p("&:focus-within",Ee)]),r("selected",[Ve(null,[h("icon","color: var(--n-item-icon-color-active-hover-horizontal);"),n("menu-item-content-header","\n color: var(--n-item-text-color-active-hover-horizontal);\n ",[p("a","color: var(--n-item-text-color-active-hover-horizontal);"),h("extra","color: var(--n-item-text-color-active-hover-horizontal);")])])]),r("child-active",[Ve(null,[h("icon","color: var(--n-item-icon-color-child-active-hover-horizontal);"),n("menu-item-content-header","\n color: var(--n-item-text-color-child-active-hover-horizontal);\n ",[p("a","color: var(--n-item-text-color-child-active-hover-horizontal);"),h("extra","color: var(--n-item-text-color-child-active-hover-horizontal);")])])]),Ve("border-bottom: 2px solid var(--n-border-color-horizontal);",Ee)]),n("menu-item-content-header",[p("a","color: var(--n-item-text-color-horizontal);")])])]),z("responsive",[n("menu-item-content-header","\n overflow: hidden;\n text-overflow: ellipsis;\n ")]),r("collapsed",[n("menu-item-content",[r("selected",[p("&::before","\n background-color: var(--n-item-color-active-collapsed) !important;\n ")]),n("menu-item-content-header","opacity: 0;"),h("arrow","opacity: 0;"),h("icon","color: var(--n-item-icon-color-collapsed);")])]),n("menu-item","\n height: var(--n-item-height);\n margin-top: 6px;\n position: relative;\n "),n("menu-item-content",'\n box-sizing: border-box;\n line-height: 1.75;\n height: 100%;\n display: grid;\n grid-template-areas: "icon content arrow";\n grid-template-columns: auto 1fr auto;\n align-items: center;\n cursor: pointer;\n position: relative;\n padding-right: 18px;\n transition:\n background-color .3s var(--n-bezier),\n padding-left .3s var(--n-bezier),\n border-color .3s var(--n-bezier);\n ',[p("> *","z-index: 1;"),p("&::before",'\n z-index: auto;\n content: "";\n background-color: #0000;\n position: absolute;\n left: 8px;\n right: 8px;\n top: 0;\n bottom: 0;\n pointer-events: none;\n border-radius: var(--n-border-radius);\n transition: background-color .3s var(--n-bezier);\n '),r("disabled","\n opacity: .45;\n cursor: not-allowed;\n "),r("collapsed",[h("arrow","transform: rotate(0);")]),r("selected",[p("&::before","background-color: var(--n-item-color-active);"),h("arrow","color: var(--n-arrow-color-active);"),h("icon","color: var(--n-item-icon-color-active);"),n("menu-item-content-header","\n color: var(--n-item-text-color-active);\n ",[p("a","color: var(--n-item-text-color-active);"),h("extra","color: var(--n-item-text-color-active);")])]),r("child-active",[n("menu-item-content-header","\n color: var(--n-item-text-color-child-active);\n ",[p("a","\n color: var(--n-item-text-color-child-active);\n "),h("extra","\n color: var(--n-item-text-color-child-active);\n ")]),h("arrow","\n color: var(--n-arrow-color-child-active);\n "),h("icon","\n color: var(--n-item-icon-color-child-active);\n ")]),z("disabled",[z("selected, child-active",[p("&:focus-within",$e)]),r("selected",[Ve(null,[h("arrow","color: var(--n-arrow-color-active-hover);"),h("icon","color: var(--n-item-icon-color-active-hover);"),n("menu-item-content-header","\n color: var(--n-item-text-color-active-hover);\n ",[p("a","color: var(--n-item-text-color-active-hover);"),h("extra","color: var(--n-item-text-color-active-hover);")])])]),r("child-active",[Ve(null,[h("arrow","color: var(--n-arrow-color-child-active-hover);"),h("icon","color: var(--n-item-icon-color-child-active-hover);"),n("menu-item-content-header","\n color: var(--n-item-text-color-child-active-hover);\n ",[p("a","color: var(--n-item-text-color-child-active-hover);"),h("extra","color: var(--n-item-text-color-child-active-hover);")])])]),r("selected",[Ve(null,[p("&::before","background-color: var(--n-item-color-active-hover);")])]),Ve(null,$e)]),h("icon","\n grid-area: icon;\n color: var(--n-item-icon-color);\n transition:\n color .3s var(--n-bezier),\n font-size .3s var(--n-bezier),\n margin-right .3s var(--n-bezier);\n box-sizing: content-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n "),h("arrow","\n grid-area: arrow;\n font-size: 16px;\n color: var(--n-arrow-color);\n transform: rotate(180deg);\n opacity: 1;\n transition:\n color .3s var(--n-bezier),\n transform 0.2s var(--n-bezier),\n opacity 0.2s var(--n-bezier);\n "),n("menu-item-content-header","\n grid-area: content;\n transition:\n color .3s var(--n-bezier),\n opacity .3s var(--n-bezier);\n opacity: 1;\n white-space: nowrap;\n color: var(--n-item-text-color);\n ",[p("a","\n outline: none;\n text-decoration: none;\n transition: color .3s var(--n-bezier);\n color: var(--n-item-text-color);\n ",[p("&::before",'\n content: "";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n ')]),h("extra","\n font-size: .93em;\n color: var(--n-group-text-color);\n transition: color .3s var(--n-bezier);\n ")])]),n("submenu","\n cursor: pointer;\n position: relative;\n margin-top: 6px;\n ",[n("menu-item-content","\n height: var(--n-item-height);\n "),n("submenu-children","\n overflow: hidden;\n padding: 0;\n ",[k({duration:".2s"})])]),n("menu-item-group",[n("menu-item-group-title","\n margin-top: 6px;\n color: var(--n-group-text-color);\n cursor: default;\n font-size: .93em;\n height: 36px;\n display: flex;\n align-items: center;\n transition:\n padding-left .3s var(--n-bezier),\n color .3s var(--n-bezier);\n ")])]),n("menu-tooltip",[p("a","\n color: inherit;\n text-decoration: none;\n ")]),n("menu-divider","\n transition: background-color .3s var(--n-bezier);\n background-color: var(--n-divider-color);\n height: 1px;\n margin: 6px 18px;\n ")]);function Ve(e,o){return[r("hover",e,o),p("&:hover",e,o)]}const De=e({name:"MenuOptionContent",props:{collapsed:Boolean,disabled:Boolean,title:[String,Function],icon:Function,extra:[String,Function],showArrow:Boolean,childActive:Boolean,hover:Boolean,paddingLeft:Number,selected:Boolean,maxIconSize:{type:Number,required:!0},activeIconSize:{type:Number,required:!0},iconMarginRight:{type:Number,required:!0},clsPrefix:{type:String,required:!0},onClick:Function,tmNode:{type:Object,required:!0},isEllipsisPlaceholder:Boolean},setup(e){const{props:o}=x(Oe);return{menuProps:o,style:u(()=>{const{paddingLeft:o}=e;return{paddingLeft:o&&`${o}px`}}),iconStyle:u(()=>{const{maxIconSize:o,activeIconSize:t,iconMarginRight:n}=e;return{width:`${o}px`,height:`${o}px`,fontSize:`${t}px`,marginRight:`${n}px`}})}},render(){const{clsPrefix:e,tmNode:t,menuProps:{renderIcon:n,renderLabel:r,renderExtra:l,expandIcon:i}}=this,a=n?n(t.rawNode):S(this.icon);return o("div",{onClick:e=>{var o;null===(o=this.onClick)||void 0===o||o.call(this,e)},role:"none",class:[`${e}-menu-item-content`,{[`${e}-menu-item-content--selected`]:this.selected,[`${e}-menu-item-content--collapsed`]:this.collapsed,[`${e}-menu-item-content--child-active`]:this.childActive,[`${e}-menu-item-content--disabled`]:this.disabled,[`${e}-menu-item-content--hover`]:this.hover}],style:this.style},a&&o("div",{class:`${e}-menu-item-content__icon`,style:this.iconStyle,role:"none"},[a]),o("div",{class:`${e}-menu-item-content-header`,role:"none"},this.isEllipsisPlaceholder?this.title:r?r(t.rawNode):S(this.title),this.extra||l?o("span",{class:`${e}-menu-item-content-header__extra`}," ",l?l(t.rawNode):S(this.extra)):null),this.showArrow?o(g,{ariaHidden:!0,class:`${e}-menu-item-content__arrow`,clsPrefix:e},{default:()=>i?i(t.rawNode):o(xe,null)}):null)}});function Ke(e){const o=x(Oe),{props:t,mergedCollapsedRef:n}=o,r=x(Le,null),l=x(je,null),i=u(()=>"horizontal"===t.mode),a=u(()=>i.value?t.dropdownPlacement:"tmNodes"in e?"right-start":"right"),s=u(()=>{var e;return Math.max(null!==(e=t.collapsedIconSize)&&void 0!==e?e:t.iconSize,t.iconSize)}),c=u(()=>{var o;return!i.value&&e.root&&n.value&&null!==(o=t.collapsedIconSize)&&void 0!==o?o:t.iconSize}),d=u(()=>{if(i.value)return;const{collapsedWidth:o,indent:a,rootIndent:c}=t,{root:d,isGroup:u}=e,v=void 0===c?a:c;return d?n.value?o/2-s.value/2:v:l&&"number"==typeof l.paddingLeftRef.value?a/2+l.paddingLeftRef.value:r&&"number"==typeof r.paddingLeftRef.value?(u?a/2:a)+r.paddingLeftRef.value:0}),v=u(()=>{const{collapsedWidth:o,indent:r,rootIndent:l}=t,{value:a}=s,{root:c}=e;if(i.value)return 8;if(!c)return 8;if(!n.value)return 8;return(void 0===l?r:l)+a+8-(o+a)/2});return{dropdownPlacement:a,activeIconSize:c,maxIconSize:s,paddingLeft:d,iconMarginRight:v,NMenu:o,NSubmenu:r,NMenuOptionGroup:l}}const Ue={internalKey:{type:[String,Number],required:!0},root:Boolean,isGroup:Boolean,level:{type:Number,required:!0},title:[String,Function],extra:[String,Function]},Ge=e({name:"MenuDivider",setup(){const e=x(Oe),{mergedClsPrefixRef:t,isHorizontalRef:n}=e;return()=>n.value?null:o("div",{class:`${t.value}-menu-divider`})}}),qe=Object.assign(Object.assign({},Ue),{tmNode:{type:Object,required:!0},disabled:Boolean,icon:Function,onClick:Function}),We=I(qe),Ye=e({name:"MenuOption",props:qe,setup(e){const o=Ke(e),{NSubmenu:t,NMenu:n,NMenuOptionGroup:r}=o,{props:l,mergedClsPrefixRef:i,mergedCollapsedRef:a}=n,s=t?t.mergedDisabledRef:r?r.mergedDisabledRef:{value:!1},c=u(()=>s.value||e.disabled);return{mergedClsPrefix:i,dropdownPlacement:o.dropdownPlacement,paddingLeft:o.paddingLeft,iconMarginRight:o.iconMarginRight,maxIconSize:o.maxIconSize,activeIconSize:o.activeIconSize,mergedTheme:n.mergedThemeRef,menuProps:l,dropdownEnabled:T(()=>e.root&&a.value&&"horizontal"!==l.mode&&!c.value),selected:T(()=>n.mergedValueRef.value===e.internalKey),mergedDisabled:c,handleClick:function(o){c.value||(n.doSelect(e.internalKey,e.tmNode.rawNode),function(o){const{onClick:t}=e;t&&t(o)}(o))}}},render(){const{mergedClsPrefix:e,mergedTheme:t,tmNode:n,menuProps:{renderLabel:r,nodeProps:l}}=this,i=null==l?void 0:l(n.rawNode);return o("div",Object.assign({},i,{role:"menuitem",class:[`${e}-menu-item`,null==i?void 0:i.class]}),o(A,{theme:t.peers.Tooltip,themeOverrides:t.peerOverrides.Tooltip,trigger:"hover",placement:this.dropdownPlacement,disabled:!this.dropdownEnabled||void 0===this.title,internalExtraClass:["menu-tooltip"]},{default:()=>r?r(n.rawNode):S(this.title),trigger:()=>o(De,{tmNode:n,clsPrefix:e,paddingLeft:this.paddingLeft,iconMarginRight:this.iconMarginRight,maxIconSize:this.maxIconSize,activeIconSize:this.activeIconSize,selected:this.selected,title:this.title,extra:this.extra,disabled:this.mergedDisabled,icon:this.icon,onClick:this.handleClick})}))}}),Xe=Object.assign(Object.assign({},Ue),{tmNode:{type:Object,required:!0},tmNodes:{type:Array,required:!0}}),Je=I(Xe),Ze=e({name:"MenuOptionGroup",props:Xe,setup(e){const t=Ke(e),{NSubmenu:n}=t,r=u(()=>!!(null==n?void 0:n.mergedDisabledRef.value)||e.tmNode.disabled);m(je,{paddingLeftRef:t.paddingLeft,mergedDisabledRef:r});const{mergedClsPrefixRef:l,props:i}=x(Oe);return function(){const{value:n}=l,r=t.paddingLeft.value,{nodeProps:a}=i,s=null==a?void 0:a(e.tmNode.rawNode);return o("div",{class:`${n}-menu-item-group`,role:"group"},o("div",Object.assign({},s,{class:[`${n}-menu-item-group-title`,null==s?void 0:s.class],style:[(null==s?void 0:s.style)||"",void 0!==r?`padding-left: ${r}px;`:""]}),S(e.title),e.extra?o(_,null," ",S(e.extra)):null),o("div",null,e.tmNodes.map(e=>eo(e,i))))}}});function Qe(e){return"divider"===e.type||"render"===e.type}function eo(e,t){const{rawNode:n}=e,{show:r}=n;if(!1===r)return null;if(Qe(n))return function(e){return"divider"===e.type}(n)?o(Ge,Object.assign({key:e.key},n.props)):null;const{labelField:l}=t,{key:i,level:a,isGroup:s}=e,c=Object.assign(Object.assign({},n),{title:n.title||n[l],extra:n.titleExtra||n.extra,key:i,internalKey:i,level:a,root:0===a,isGroup:s});return e.children?e.isGroup?o(Ze,H(c,Je,{tmNode:e,tmNodes:e.children,key:i})):o(no,H(c,to,{key:i,rawNodes:n[t.childrenField],tmNodes:e.children,tmNode:e})):o(Ye,H(c,We,{key:i,tmNode:e}))}const oo=Object.assign(Object.assign({},Ue),{rawNodes:{type:Array,default:()=>[]},tmNodes:{type:Array,default:()=>[]},tmNode:{type:Object,required:!0},disabled:Boolean,icon:Function,onClick:Function,domId:String,virtualChildActive:{type:Boolean,default:void 0},isEllipsisPlaceholder:Boolean}),to=I(oo),no=e({name:"Submenu",props:oo,setup(e){const o=Ke(e),{NMenu:t,NSubmenu:n}=o,{props:r,mergedCollapsedRef:l,mergedThemeRef:a}=t,s=u(()=>{const{disabled:o}=e;return!!(null==n?void 0:n.mergedDisabledRef.value)||(!!r.disabled||o)}),c=i(!1);return m(Le,{paddingLeftRef:o.paddingLeft,mergedDisabledRef:s}),m(je,null),{menuProps:r,mergedTheme:a,doSelect:t.doSelect,inverted:t.invertedRef,isHorizontal:t.isHorizontalRef,mergedClsPrefix:t.mergedClsPrefixRef,maxIconSize:o.maxIconSize,activeIconSize:o.activeIconSize,iconMarginRight:o.iconMarginRight,dropdownPlacement:o.dropdownPlacement,dropdownShow:c,paddingLeft:o.paddingLeft,mergedDisabled:s,mergedValue:t.mergedValueRef,childActive:T(()=>{var o;return null!==(o=e.virtualChildActive)&&void 0!==o?o:t.activePathRef.value.includes(e.internalKey)}),collapsed:u(()=>"horizontal"!==r.mode&&(!!l.value||!t.mergedExpandedKeysRef.value.includes(e.internalKey))),dropdownEnabled:u(()=>!s.value&&("horizontal"===r.mode||l.value)),handlePopoverShowChange:function(e){c.value=e},handleClick:function(){s.value||(l.value||t.toggleExpand(e.internalKey),function(){const{onClick:o}=e;o&&o()}())}}},render(){var e;const{mergedClsPrefix:t,menuProps:{renderIcon:n,renderLabel:r}}=this,l=()=>{const{isHorizontal:e,paddingLeft:t,collapsed:n,mergedDisabled:r,maxIconSize:l,activeIconSize:i,title:a,childActive:s,icon:c,handleClick:d,menuProps:{nodeProps:u},dropdownShow:v,iconMarginRight:m,tmNode:h,mergedClsPrefix:p,isEllipsisPlaceholder:g,extra:f}=this,b=null==u?void 0:u(h.rawNode);return o("div",Object.assign({},b,{class:[`${p}-menu-item`,null==b?void 0:b.class],role:"menuitem"}),o(De,{tmNode:h,paddingLeft:t,collapsed:n,disabled:r,iconMarginRight:m,maxIconSize:l,activeIconSize:i,title:a,extra:f,showArrow:!e,childActive:s,clsPrefix:p,icon:c,hover:v,onClick:d,isEllipsisPlaceholder:g}))},i=()=>o(M,null,{default:()=>{const{tmNodes:e,collapsed:n}=this;return n?null:o("div",{class:`${t}-submenu-children`,role:"menu"},e.map(e=>eo(e,this.menuProps)))}});return this.root?o(P,Object.assign({size:"large",trigger:"hover"},null===(e=this.menuProps)||void 0===e?void 0:e.dropdownProps,{themeOverrides:this.mergedTheme.peerOverrides.Dropdown,theme:this.mergedTheme.peers.Dropdown,builtinThemeOverrides:{fontSizeLarge:"14px",optionIconSizeLarge:"18px"},value:this.mergedValue,disabled:!this.dropdownEnabled,placement:this.dropdownPlacement,keyField:this.menuProps.keyField,labelField:this.menuProps.labelField,childrenField:this.menuProps.childrenField,onUpdateShow:this.handlePopoverShowChange,options:this.rawNodes,onSelect:this.doSelect,inverted:this.inverted,renderIcon:n,renderLabel:r}),{default:()=>o("div",{class:`${t}-submenu`,role:"menu","aria-expanded":!this.collapsed,id:this.domId},l(),this.isHorizontal?null:i())}):o("div",{class:`${t}-submenu`,role:"menu","aria-expanded":!this.collapsed,id:this.domId},l(),i())}}),ro=Object.assign(Object.assign({},s.props),{options:{type:Array,default:()=>[]},collapsed:{type:Boolean,default:void 0},collapsedWidth:{type:Number,default:48},iconSize:{type:Number,default:20},collapsedIconSize:{type:Number,default:24},rootIndent:Number,indent:{type:Number,default:32},labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},disabledField:{type:String,default:"disabled"},defaultExpandAll:Boolean,defaultExpandedKeys:Array,expandedKeys:Array,value:[String,Number],defaultValue:{type:[String,Number],default:null},mode:{type:String,default:"vertical"},watchProps:{type:Array,default:void 0},disabled:Boolean,show:{type:Boolean,default:!0},inverted:Boolean,"onUpdate:expandedKeys":[Function,Array],onUpdateExpandedKeys:[Function,Array],onUpdateValue:[Function,Array],"onUpdate:value":[Function,Array],expandIcon:Function,renderIcon:Function,renderLabel:Function,renderExtra:Function,dropdownProps:Object,accordion:Boolean,nodeProps:Function,dropdownPlacement:{type:String,default:"bottom"},responsive:Boolean,items:Array,onOpenNamesChange:[Function,Array],onSelect:[Function,Array],onExpandedNamesChange:[Function,Array],expandedNames:Array,defaultExpandedNames:Array}),lo=e({name:"Menu",inheritAttrs:!1,props:ro,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=a(e),r=s("Menu","-menu",Fe,N,e,t),l=x(Ce,null),c=u(()=>{var o;const{collapsed:t}=e;if(void 0!==t)return t;if(l){const{collapseModeRef:e,collapsedRef:t}=l;if("width"===e.value)return null!==(o=t.value)&&void 0!==o&&o}return!1}),d=u(()=>{const{keyField:o,childrenField:t,disabledField:n}=e;return B(e.items||e.options,{getIgnored:e=>Qe(e),getChildren:e=>e[t],getDisabled:e=>e[n],getKey(e){var t;return null!==(t=e[o])&&void 0!==t?t:e.name}})}),h=u(()=>new Set(d.value.treeNodes.map(e=>e.key))),{watchProps:p}=e,g=i(null);(null==p?void 0:p.includes("defaultValue"))?O(()=>{g.value=e.defaultValue}):g.value=e.defaultValue;const f=w(e,"value"),b=C(f,g),z=i([]),k=()=>{z.value=e.defaultExpandAll?d.value.getNonLeafKeys():e.defaultExpandedNames||e.defaultExpandedKeys||d.value.getPath(b.value,{includeSelf:!1}).keyPath};(null==p?void 0:p.includes("defaultExpandedKeys"))?O(k):k();const S=L(e,["expandedNames","expandedKeys"]),I=C(S,z),A=u(()=>d.value.treeNodes),T=u(()=>d.value.getPath(b.value).keyPath);function _(o){const{"onUpdate:expandedKeys":t,onUpdateExpandedKeys:n,onExpandedNamesChange:r,onOpenNamesChange:l}=e;t&&y(t,o),n&&y(n,o),r&&y(r,o),l&&y(l,o),z.value=o}m(Oe,{props:e,mergedCollapsedRef:c,mergedThemeRef:r,mergedValueRef:b,mergedExpandedKeysRef:I,activePathRef:T,mergedClsPrefixRef:t,isHorizontalRef:u(()=>"horizontal"===e.mode),invertedRef:w(e,"inverted"),doSelect:function(o,t){const{"onUpdate:value":n,onUpdateValue:r,onSelect:l}=e;r&&y(r,o,t);n&&y(n,o,t);l&&y(l,o,t);g.value=o},toggleExpand:function(o){const t=Array.from(I.value),n=t.findIndex(e=>e===o);if(~n)t.splice(n,1);else{if(e.accordion&&h.value.has(o)){const e=t.findIndex(e=>h.value.has(e));e>-1&&t.splice(e,1)}t.push(o)}_(t)}});const H=u(()=>{const{inverted:o}=e,{common:{cubicBezierEaseInOut:t},self:n}=r.value,{borderRadius:l,borderColorHorizontal:i,fontSize:a,itemHeight:s,dividerColor:c}=n,d={"--n-divider-color":c,"--n-bezier":t,"--n-font-size":a,"--n-border-color-horizontal":i,"--n-border-radius":l,"--n-item-height":s};return o?(d["--n-group-text-color"]=n.groupTextColorInverted,d["--n-color"]=n.colorInverted,d["--n-item-text-color"]=n.itemTextColorInverted,d["--n-item-text-color-hover"]=n.itemTextColorHoverInverted,d["--n-item-text-color-active"]=n.itemTextColorActiveInverted,d["--n-item-text-color-child-active"]=n.itemTextColorChildActiveInverted,d["--n-item-text-color-child-active-hover"]=n.itemTextColorChildActiveInverted,d["--n-item-text-color-active-hover"]=n.itemTextColorActiveHoverInverted,d["--n-item-icon-color"]=n.itemIconColorInverted,d["--n-item-icon-color-hover"]=n.itemIconColorHoverInverted,d["--n-item-icon-color-active"]=n.itemIconColorActiveInverted,d["--n-item-icon-color-active-hover"]=n.itemIconColorActiveHoverInverted,d["--n-item-icon-color-child-active"]=n.itemIconColorChildActiveInverted,d["--n-item-icon-color-child-active-hover"]=n.itemIconColorChildActiveHoverInverted,d["--n-item-icon-color-collapsed"]=n.itemIconColorCollapsedInverted,d["--n-item-text-color-horizontal"]=n.itemTextColorHorizontalInverted,d["--n-item-text-color-hover-horizontal"]=n.itemTextColorHoverHorizontalInverted,d["--n-item-text-color-active-horizontal"]=n.itemTextColorActiveHorizontalInverted,d["--n-item-text-color-child-active-horizontal"]=n.itemTextColorChildActiveHorizontalInverted,d["--n-item-text-color-child-active-hover-horizontal"]=n.itemTextColorChildActiveHoverHorizontalInverted,d["--n-item-text-color-active-hover-horizontal"]=n.itemTextColorActiveHoverHorizontalInverted,d["--n-item-icon-color-horizontal"]=n.itemIconColorHorizontalInverted,d["--n-item-icon-color-hover-horizontal"]=n.itemIconColorHoverHorizontalInverted,d["--n-item-icon-color-active-horizontal"]=n.itemIconColorActiveHorizontalInverted,d["--n-item-icon-color-active-hover-horizontal"]=n.itemIconColorActiveHoverHorizontalInverted,d["--n-item-icon-color-child-active-horizontal"]=n.itemIconColorChildActiveHorizontalInverted,d["--n-item-icon-color-child-active-hover-horizontal"]=n.itemIconColorChildActiveHoverHorizontalInverted,d["--n-arrow-color"]=n.arrowColorInverted,d["--n-arrow-color-hover"]=n.arrowColorHoverInverted,d["--n-arrow-color-active"]=n.arrowColorActiveInverted,d["--n-arrow-color-active-hover"]=n.arrowColorActiveHoverInverted,d["--n-arrow-color-child-active"]=n.arrowColorChildActiveInverted,d["--n-arrow-color-child-active-hover"]=n.arrowColorChildActiveHoverInverted,d["--n-item-color-hover"]=n.itemColorHoverInverted,d["--n-item-color-active"]=n.itemColorActiveInverted,d["--n-item-color-active-hover"]=n.itemColorActiveHoverInverted,d["--n-item-color-active-collapsed"]=n.itemColorActiveCollapsedInverted):(d["--n-group-text-color"]=n.groupTextColor,d["--n-color"]=n.color,d["--n-item-text-color"]=n.itemTextColor,d["--n-item-text-color-hover"]=n.itemTextColorHover,d["--n-item-text-color-active"]=n.itemTextColorActive,d["--n-item-text-color-child-active"]=n.itemTextColorChildActive,d["--n-item-text-color-child-active-hover"]=n.itemTextColorChildActiveHover,d["--n-item-text-color-active-hover"]=n.itemTextColorActiveHover,d["--n-item-icon-color"]=n.itemIconColor,d["--n-item-icon-color-hover"]=n.itemIconColorHover,d["--n-item-icon-color-active"]=n.itemIconColorActive,d["--n-item-icon-color-active-hover"]=n.itemIconColorActiveHover,d["--n-item-icon-color-child-active"]=n.itemIconColorChildActive,d["--n-item-icon-color-child-active-hover"]=n.itemIconColorChildActiveHover,d["--n-item-icon-color-collapsed"]=n.itemIconColorCollapsed,d["--n-item-text-color-horizontal"]=n.itemTextColorHorizontal,d["--n-item-text-color-hover-horizontal"]=n.itemTextColorHoverHorizontal,d["--n-item-text-color-active-horizontal"]=n.itemTextColorActiveHorizontal,d["--n-item-text-color-child-active-horizontal"]=n.itemTextColorChildActiveHorizontal,d["--n-item-text-color-child-active-hover-horizontal"]=n.itemTextColorChildActiveHoverHorizontal,d["--n-item-text-color-active-hover-horizontal"]=n.itemTextColorActiveHoverHorizontal,d["--n-item-icon-color-horizontal"]=n.itemIconColorHorizontal,d["--n-item-icon-color-hover-horizontal"]=n.itemIconColorHoverHorizontal,d["--n-item-icon-color-active-horizontal"]=n.itemIconColorActiveHorizontal,d["--n-item-icon-color-active-hover-horizontal"]=n.itemIconColorActiveHoverHorizontal,d["--n-item-icon-color-child-active-horizontal"]=n.itemIconColorChildActiveHorizontal,d["--n-item-icon-color-child-active-hover-horizontal"]=n.itemIconColorChildActiveHoverHorizontal,d["--n-arrow-color"]=n.arrowColor,d["--n-arrow-color-hover"]=n.arrowColorHover,d["--n-arrow-color-active"]=n.arrowColorActive,d["--n-arrow-color-active-hover"]=n.arrowColorActiveHover,d["--n-arrow-color-child-active"]=n.arrowColorChildActive,d["--n-arrow-color-child-active-hover"]=n.arrowColorChildActiveHover,d["--n-item-color-hover"]=n.itemColorHover,d["--n-item-color-active"]=n.itemColorActive,d["--n-item-color-active-hover"]=n.itemColorActiveHover,d["--n-item-color-active-collapsed"]=n.itemColorActiveCollapsed),d}),P=n?v("menu",u(()=>e.inverted?"a":"b"),H,e):void 0,M=j(),R=i(null),$=i(null);let E=!0;const F=()=>{var e;E?E=!1:null===(e=R.value)||void 0===e||e.sync({showAllItemsBeforeCalculate:!0})};const V=i(-1);const D=u(()=>{const o=V.value;return{children:-1===o?[]:e.options.slice(o)}}),K=u(()=>{const{childrenField:o,disabledField:t,keyField:n}=e;return B([D.value],{getIgnored:e=>Qe(e),getChildren:e=>e[o],getDisabled:e=>e[t],getKey(e){var o;return null!==(o=e[n])&&void 0!==o?o:e.name}})}),U=u(()=>B([{}]).treeNodes[0]);return{mergedClsPrefix:t,controlledExpandedKeys:S,uncontrolledExpanededKeys:z,mergedExpandedKeys:I,uncontrolledValue:g,mergedValue:b,activePath:T,tmNodes:A,mergedTheme:r,mergedCollapsed:c,cssVars:n?void 0:H,themeClass:null==P?void 0:P.themeClass,overflowRef:R,counterRef:$,updateCounter:()=>{},onResize:F,onUpdateOverflow:function(e){e||(V.value=-1)},onUpdateCount:function(o){V.value=e.options.length-o},renderCounter:function(){var e;if(-1===V.value)return o(no,{root:!0,level:0,key:"__ellpisisGroupPlaceholder__",internalKey:"__ellpisisGroupPlaceholder__",title:"···",tmNode:U.value,domId:M,isEllipsisPlaceholder:!0});const t=K.value.treeNodes[0],n=T.value,r=!!(null===(e=t.children)||void 0===e?void 0:e.some(e=>n.includes(e.key)));return o(no,{level:0,root:!0,key:"__ellpisisGroup__",internalKey:"__ellpisisGroup__",title:"···",virtualChildActive:r,tmNode:t,domId:M,rawNodes:t.rawNode.children||[],tmNodes:t.children||[],isEllipsisPlaceholder:!0})},getCounter:function(){return document.getElementById(M)},onRender:null==P?void 0:P.onRender,showOption:o=>{const t=d.value.getPath(null!=o?o:b.value,{includeSelf:!1}).keyPath;if(!t.length)return;const n=Array.from(I.value),r=new Set([...n,...t]);e.accordion&&h.value.forEach(e=>{r.has(e)&&!t.includes(e)&&r.delete(e)}),_(Array.from(r))},deriveResponsiveState:F}},render(){const{mergedClsPrefix:e,mode:t,themeClass:n,onRender:r}=this;null==r||r();const l=()=>this.tmNodes.map(e=>eo(e,this.$props)),i="horizontal"===t&&this.responsive,a=()=>o("div",E(this.$attrs,{role:"horizontal"===t?"menubar":"menu",class:[`${e}-menu`,n,`${e}-menu--${t}`,i&&`${e}-menu--responsive`,this.mergedCollapsed&&`${e}-menu--collapsed`],style:this.cssVars}),i?o($,{ref:"overflowRef",onUpdateOverflow:this.onUpdateOverflow,getCounter:this.getCounter,onUpdateCount:this.onUpdateCount,updateCounter:this.updateCounter,style:{width:"100%",display:"flex",overflow:"hidden"}},{default:l,counter:this.renderCounter}):l());return i?o(R,{onResize:this.onResize},{default:a}):a()}}),io=Object.assign(Object.assign({},s.props),{trigger:String,xScrollable:Boolean,onScroll:Function,contentClass:String,contentStyle:[Object,String],size:Number,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),ao=e({name:"Scrollbar",props:io,setup(){const e=i(null),o={scrollTo:(...o)=>{var t;null===(t=e.value)||void 0===t||t.scrollTo(o[0],o[1])},scrollBy:(...o)=>{var t;null===(t=e.value)||void 0===t||t.scrollBy(o[0],o[1])}};return Object.assign(Object.assign({},o),{scrollbarInstRef:e})},render(){return o(l,Object.assign({ref:"scrollbarInstRef"},this.$props),this.$slots)}}),so={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},co=e({name:"ApiOutlined",render:function(e,o){return V(),F("svg",so,o[0]||(o[0]=[D("path",{d:"M917.7 148.8l-42.4-42.4c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-76.1 76.1a199.27 199.27 0 0 0-112.1-34.3c-51.2 0-102.4 19.5-141.5 58.6L432.3 308.7a8.03 8.03 0 0 0 0 11.3L704 591.7c1.6 1.6 3.6 2.3 5.7 2.3c2 0 4.1-.8 5.7-2.3l101.9-101.9c68.9-69 77-175.7 24.3-253.5l76.1-76.1c3.1-3.2 3.1-8.3 0-11.4zM769.1 441.7l-59.4 59.4l-186.8-186.8l59.4-59.4c24.9-24.9 58.1-38.7 93.4-38.7c35.3 0 68.4 13.7 93.4 38.7c24.9 24.9 38.7 58.1 38.7 93.4c0 35.3-13.8 68.4-38.7 93.4zm-190.2 105a8.03 8.03 0 0 0-11.3 0L501 613.3L410.7 523l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3L441 408.6a8.03 8.03 0 0 0-11.3 0L363 475.3l-43-43a7.85 7.85 0 0 0-5.7-2.3c-2 0-4.1.8-5.7 2.3L206.8 534.2c-68.9 69-77 175.7-24.3 253.5l-76.1 76.1a8.03 8.03 0 0 0 0 11.3l42.4 42.4c1.6 1.6 3.6 2.3 5.7 2.3s4.1-.8 5.7-2.3l76.1-76.1c33.7 22.9 72.9 34.3 112.1 34.3c51.2 0 102.4-19.5 141.5-58.6l101.9-101.9c3.1-3.1 3.1-8.2 0-11.3l-43-43l66.7-66.7c3.1-3.1 3.1-8.2 0-11.3l-36.6-36.2zM441.7 769.1a131.32 131.32 0 0 1-93.4 38.7c-35.3 0-68.4-13.7-93.4-38.7a131.32 131.32 0 0 1-38.7-93.4c0-35.3 13.7-68.4 38.7-93.4l59.4-59.4l186.8 186.8l-59.4 59.4z",fill:"currentColor"},null,-1)]))}}),uo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},vo=e({name:"MenuFoldOutlined",render:function(e,o){return V(),F("svg",uo,o[0]||(o[0]=[D("path",{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z",fill:"currentColor"},null,-1)]))}}),mo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 1024 1024"},ho=e({name:"MenuUnfoldOutlined",render:function(e,o){return V(),F("svg",mo,o[0]||(o[0]=[D("path",{d:"M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z",fill:"currentColor"},null,-1)]))}}),po={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},go=e({name:"LogOutOutline",render:function(e,o){return V(),F("svg",po,o[0]||(o[0]=[D("path",{d:"M304 336v40a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V136a40 40 0 0 1 40-40h152c22.09 0 48 17.91 48 40v40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 336l80-80l-80-80"},null,-1),D("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 256h256"},null,-1)]))}}),fo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},bo=e({name:"MoonOutline",render:function(e,o){return V(),F("svg",fo,o[0]||(o[0]=[D("path",{d:"M160 136c0-30.62 4.51-61.61 16-88C99.57 81.27 48 159.32 48 248c0 119.29 96.71 216 216 216c88.68 0 166.73-51.57 200-128c-26.39 11.49-57.38 16-88 16c-119.29 0-216-96.71-216-216z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}}),xo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Co=e({name:"SettingsOutline",render:function(e,o){return V(),F("svg",xo,o[0]||(o[0]=[D("path",{d:"M262.29 192.31a64 64 0 1 0 57.4 57.4a64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22a155.3 155.3 0 0 1-21.46-12.57a16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22a155.3 155.3 0 0 1 21.46 12.57a16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}}),wo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},yo=e({name:"ShieldOutline",render:function(e,o){return V(),F("svg",wo,o[0]||(o[0]=[D("path",{d:"M463.1 112.37C373.68 96.33 336.71 84.45 256 48c-80.71 36.45-117.68 48.33-207.1 64.37C32.7 369.13 240.58 457.79 256 464c15.42-6.21 223.3-94.87 207.1-351.63z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1)]))}}),zo={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},ko=e({name:"SunnyOutline",render:function(e,o){return V(),F("svg",zo,o[0]||(o[0]=[K('<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M256 48v48"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M256 416v48"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M403.08 108.92l-33.94 33.94"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M142.86 369.14l-33.94 33.94"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M464 256h-48"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M96 256H48"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M403.08 403.08l-33.94-33.94"></path><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32" d="M142.86 142.86l-33.94-33.94"></path><circle cx="256" cy="256" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="32"></circle>',9)]))}}),So={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Io=e({name:"AddSquare24Regular",render:function(e,o){return V(),F("svg",So,o[0]||(o[0]=[D("g",{fill:"none"},[D("path",{d:"M12 7a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 12 7zm-9-.75A3.25 3.25 0 0 1 6.25 3h11.5A3.25 3.25 0 0 1 21 6.25v11.5A3.25 3.25 0 0 1 17.75 21H6.25A3.25 3.25 0 0 1 3 17.75V6.25zM6.25 4.5A1.75 1.75 0 0 0 4.5 6.25v11.5c0 .966.784 1.75 1.75 1.75h11.5a1.75 1.75 0 0 0 1.75-1.75V6.25a1.75 1.75 0 0 0-1.75-1.75H6.25z",fill:"currentColor"})],-1)]))}}),Ao={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 20 20"},To=e({name:"Certificate20Regular",render:function(e,o){return V(),F("svg",Ao,o[0]||(o[0]=[D("g",{fill:"none"},[D("path",{d:"M2 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v3.146a4.508 4.508 0 0 0-1-.678V5a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h7.258c.076.113.157.223.242.329V15H4a2 2 0 0 1-2-2V5zm16.5 6.5c0 .954-.381 1.818-1 2.45V18a.5.5 0 0 1-.8.4l-1.4-1.05a.5.5 0 0 0-.6 0l-1.4 1.05a.5.5 0 0 1-.8-.4v-4.05a3.5 3.5 0 1 1 6-2.45zM15 15c-.537 0-1.045-.12-1.5-.337v2.087l1.243-.746a.5.5 0 0 1 .514 0l1.243.746v-2.087A3.486 3.486 0 0 1 15 15zm0-1a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5zM5 6.5a.5.5 0 0 1 .5-.5h9a.5.5 0 0 1 0 1h-9a.5.5 0 0 1-.5-.5zm.5 4.5a.5.5 0 0 0 0 1h4a.5.5 0 0 0 0-1h-4z",fill:"currentColor"})],-1)]))}}),_o={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Ho=e({name:"CloudMonitoring",render:function(e,o){return V(),F("svg",_o,o[0]||(o[0]=[D("path",{d:"M28 16v6H4V6h7V4H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8v4H8v2h16v-2h-4v-4h8a2 2 0 0 0 2-2v-6zM18 28h-4v-4h4z",fill:"currentColor"},null,-1),D("path",{d:"M18 18h-.01a1 1 0 0 1-.951-.725L15.246 11H11V9h5a1 1 0 0 1 .962.725l1.074 3.76l3.009-9.78A1.014 1.014 0 0 1 22 3a.98.98 0 0 1 .949.684L24.72 9H30v2h-6a1 1 0 0 1-.949-.684l-1.013-3.04l-3.082 10.018A1 1 0 0 1 18 18z",fill:"currentColor"},null,-1)]))}}),Po={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},Mo=e({name:"Flow",render:function(e,o){return V(),F("svg",Po,o[0]||(o[0]=[D("path",{d:"M27 22.14V17a2 2 0 0 0-2-2h-8V9.86a4 4 0 1 0-2 0V15H7a2 2 0 0 0-2 2v5.14a4 4 0 1 0 2 0V17h18v5.14a4 4 0 1 0 2 0zM8 26a2 2 0 1 1-2-2a2 2 0 0 1 2 2zm6-20a2 2 0 1 1 2 2a2 2 0 0 1-2-2zm12 22a2 2 0 1 1 2-2a2 2 0 0 1-2 2z",fill:"currentColor"},null,-1)]))}}),Ro={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 32 32"},No=e({name:"Home",render:function(e,o){return V(),F("svg",Ro,o[0]||(o[0]=[D("path",{d:"M16.612 2.214a1.01 1.01 0 0 0-1.242 0L1 13.419l1.243 1.572L4 13.621V26a2.004 2.004 0 0 0 2 2h20a2.004 2.004 0 0 0 2-2V13.63L29.757 15L31 13.428zM18 26h-4v-8h4zm2 0v-8a2.002 2.002 0 0 0-2-2h-4a2.002 2.002 0 0 0-2 2v8H6V12.062l10-7.79l10 7.8V26z",fill:"currentColor"},null,-1)]))}}),Bo={layoutContainer:"_layoutContainer_n3o5y_2",sider:"_sider_n3o5y_8",logoContainer:"_logoContainer_n3o5y_14",logoText:"_logoText_n3o5y_21",logoContainerText:"_logoContainerText_n3o5y_30",logoContainerActive:"_logoContainerActive_n3o5y_35",menuToggleButton:"_menuToggleButton_n3o5y_40",headerMenuToggleButton:"_headerMenuToggleButton_n3o5y_51",header:"_header_n3o5y_51",systemInfo:"_systemInfo_n3o5y_75",themeSelector:"_themeSelector_n3o5y_85",themeSelectorTrigger:"_themeSelectorTrigger_n3o5y_90",themeSelectorLabel:"_themeSelectorLabel_n3o5y_108",themeSelectorArrow:"_themeSelectorArrow_n3o5y_114",content:"_content_n3o5y_122",siderMobileOpen:"_siderMobileOpen_n3o5y_129",siderMobileClosed:"_siderMobileClosed_n3o5y_138",mobileMenuBackdrop:"_mobileMenuBackdrop_n3o5y_146"};const Oo=e({name:"UpdateLogModal",props:{show:{type:Boolean,default:!1},versionData:{type:Object,default:null}},emits:{"update:show":e=>"boolean"==typeof e},setup(e,{emit:o}){const{formattedLog:t,goToGitHub:n,handleClose:r}=function(e,o){return{formattedLog:u(()=>{var o;return(null==(o=e.versionData)?void 0:o.log)?e.versionData.log.replace(/\\r\\n/g,"\n").replace(/\\n/g,"\n").split("\n").filter(e=>""!==e.trim()):[]}),goToGitHub:()=>{window.open("https://github.com/allinssl/allinssl","_blank"),o("update:show",!1)},handleClose:()=>{o("update:show",!1)}}}(e,o);return()=>Y(te,{show:e.show,onUpdateShow:e=>o("update:show",e),preset:"card",title:"发现新版本",style:{width:"600px",maxWidth:"90vw"},maskClosable:!1,closable:!0,onClose:r},{default:()=>[e.versionData&&Y("div",{class:"update-log-content"},[Y("div",{class:"mb-[1.6rem]"},[Y("div",{class:"flex items-center justify-between mb-[.8rem]"},[Y("span",{class:"text-[1.5rem] font-medium"},[oe("当前版本: "),e.versionData.version]),Y("span",{class:"text-[1.5rem] font-medium text-primary"},[oe("最新版本: "),e.versionData.new_version])]),Y("div",{class:"text-[1.4rem] text-gray-500"},[oe("发布日期: "),e.versionData.date])]),Y("div",{class:"mb-[2.4rem]"},[Y("h3",{class:"text-[1.6rem] font-medium mb-[1.2rem]"},[oe("更新日志")]),Y(ao,{style:{maxHeight:"300px"}},{default:()=>[Y("div",{class:"update-log-list"},[t.value.map((e,o)=>Y("div",{key:o,class:"mb-[.8rem]"},[e.startsWith("■")?Y("div",{class:"text-[1.4rem] font-medium text-primary mb-[.4rem]"},[e]):e.startsWith("新增:")||e.startsWith("调整:")?Y("div",{class:"ml-[1.6rem] text-[1.3rem] text-green-600"},[e]):Y("div",{class:"ml-[1.6rem] text-[1.3rem] text-gray-700"},[e])]))])]})]),Y("div",{class:"flex justify-end"},[Y(ne,{size:"medium"},{default:()=>[Y(re,{size:"medium",onClick:r},{default:()=>[Y("span",{class:"text-[1.4rem]"},[oe("稍后更新")])]}),Y(re,{size:"medium",type:"primary",onClick:n},{default:()=>[Y("div",{class:"flex items-center"},[Y(ee,{size:"18",class:"mr-[.8rem]"},{default:()=>[Y(ge,null,null)]}),Y("span",{class:"text-[1.4rem]"},[oe("前往GitHub下载")])])]})]})])])]})}}),Lo=e({name:"LayoutView",setup(){const{menuItems:e,menuActive:t,isCollapsed:n,toggleCollapse:r,handleExpand:l,handleCollapse:a,updateMenuActive:s}=(()=>{const e=he(),t=U(),n=G(),r=q(),{handleError:l}=ue(),{isCollapsed:a,menuActive:s,updateMenuActive:c,toggleCollapse:d,handleCollapse:v,handleExpand:m,resetDataInfo:h}=e,p=i(!1),g=i({}),f=e=>{const t={certManage:To,autoDeploy:Mo,home:No,certApply:Io,privateCaManage:To,privateCaCert:Io,monitor:Ho,settings:Co,logout:go,authApiManage:co};return()=>o(ee,null,()=>o(t[e]||"div"))},b=u(()=>{const e=W.filter(e=>{var o;return null==(o=e.meta)?void 0:o.title}),t=[];e.forEach(e=>{const o=e.name;"privateCaManage"!==o&&"privateCaCert"!==o&&t.push({key:o,label:()=>Y(J,{to:e.path},{default:()=>{var o;return[null==(o=null==e?void 0:e.meta)?void 0:o.title]}}),icon:f(o)})});const n={key:"privateCa",label:"私有CA",icon:()=>o(ee,null,()=>o(yo)),children:[{key:"privateCaManage",label:()=>Y(J,{to:"/private-ca-manage"},{default:()=>[oe("CA管理")]})},{key:"privateCaCert",label:()=>Y(J,{to:"/private-ca-cert"},{default:()=>[oe("私有证书")]})}]},r=[];let l=!1;return t.forEach(e=>{r.push(e),"certApply"!==e.key||l||(r.push(n),l=!0)}),l||r.push(n),[...r,{key:"logout",label:()=>Y("a",{onClick:C},[X("t_15_1745457484292")]),icon:f("logout")}]}),x=()=>{const e=n.path;if(p.value=e.includes("/children/"),p.value){const e=W.find(e=>e.name===s.value);if(e&&e.children){const o=e.children.find(e=>n.path.includes(e.path));g.value=o||{}}else g.value={}}else g.value={}};Z(()=>n.name,e=>{e&&e!==s.value&&c(e),x()},{immediate:!0});const C=async()=>{try{await ve({title:X("t_15_1745457484292"),content:X("t_16_1745457491607"),onPositiveClick:async()=>{try{r.success(X("t_17_1745457488251")),await me().fetch(),setTimeout(()=>{h(),sessionStorage.clear(),t.push("/login")},1e3)}catch(e){l(e)}}})}catch(e){}};return Q(async()=>{x()}),{isCollapsed:a,menuActive:s,updateMenuActive:c,toggleCollapse:d,handleCollapse:v,handleExpand:m,resetDataInfo:h,handleLogout:C,menuItems:b,isChildRoute:p,childRouteConfig:g}})(),{themeActive:c}=le(),d=ie(["bodyColor","headerColor","borderColor","textColorBase","textColor1","textColor2","textColor3","textColorSecondary","actionColor","layoutContentBackgroundColor","siderLoginHeight","siderColor","siderBorderColor","contentPadding"]),v=i(!1),m=i(null),h=i(!1),p=i(null),g=pe(),f=async()=>{try{if(await g.fetch(),g.data.value&&g.data.value.data){const e=g.data.value.data;m.value=e,v.value="1"===e.update}}catch(e){}},b=()=>{v.value&&m.value&&(h.value=!0)},x=i(200),C=i(60),w=de("(max-width: 768px)"),y=de("(max-width: 1100px)");Q(()=>{(w.value||y.value)&&(n.value=!0),f(),p.value=setInterval(f,18e5)}),ae(()=>{p.value&&clearInterval(p.value)}),Z(y,e=>{e&&!w.value?n.value=!0:e||w.value||(n.value=!1)});const z=u(()=>!w.value&&n.value),k=u(()=>n.value),S=u(()=>w.value?n.value?Bo.siderMobileClosed:Bo.siderMobileOpen:""),I=u(()=>w.value&&!n.value),T={defaultLight:"Default",defaultDark:"Gold"},_=[{label:"Default",key:"defaultLight",icon:()=>Y(ee,{size:16},{default:()=>[Y(ko,null,null)]})},{label:"Gold",key:"defaultDark",icon:()=>Y(ee,{size:16},{default:()=>[Y(bo,null,null)]})}],H=e=>{"string"==typeof e&&c.value!==e&&(c.value=e)};return()=>{const i="defaultDark"===c.value,u=i?bo:ko,p=T[c.value]||"Default";return Y(Ie,{class:Bo.layoutContainer,hasSider:!0,style:d.value},{default:()=>[Y("svg",{width:"0",height:"0",style:"position: absolute"},[Y("defs",null,[Y("linearGradient",{id:"menu-active-icon-gradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%"},[Y("stop",{offset:"0%","stop-color":"#9C6240"},null),Y("stop",{offset:"100%","stop-color":"#FFCF76"},null)])])]),Y(Be,{width:x.value,collapsed:z.value,showTrigger:!1,collapseMode:"width",collapsedWidth:C.value,onCollapse:a,onExpand:l,class:[Bo.sider,S.value].join(" "),bordered:!0},{default:()=>[Y("div",{class:`${Bo.logoContainer} ${!w.value&&n.value?Bo.logoContainerActive:""}`},[!w.value&&n.value?Y("div",{class:"flex items-center justify-center w-full h-full"},[Y("img",{src:`/static/images/logo${i?"-dark":""}.png`,alt:"logo",class:"h-8 w-8"},null)]):Y("div",{class:Bo.logoContainerText},[Y("img",{src:`/static/images/logo${i?"-dark":""}.png`,alt:"logo",class:"h-8 w-8 mr-2 sm:mr-3"},null),Y("span",{class:`${Bo.logoText} ml-0 font-bold`},[X("t_1_1744164835667")])]),!n.value&&!w.value&&Y(A,{placement:"right",trigger:"hover"},{trigger:()=>Y("div",{class:Bo.menuToggleButton,onClick:()=>r()},[Y(ee,{size:20},{default:()=>[Y(vo,null,null)]})," "]),default:()=>Y("span",null,[X("t_4_1744098802046")])})]),Y(lo,{value:t.value,onUpdateValue:(e,o)=>{s(e),w.value&&!n.value&&(n.value=!0)},options:e.value,class:"border-none",collapsed:k.value,collapsedWidth:C.value,collapsedIconSize:22},null)]}),Y(Ie,null,{default:()=>[Y(He,{class:Bo.header},{default:()=>[(w.value||!w.value&&n.value)&&Y("div",{class:"mr-auto"},[Y(A,{placement:"right",trigger:"hover"},{trigger:()=>Y("div",{class:Bo.headerMenuToggleButton,onClick:()=>r()},[Y(ee,{size:20},{default:()=>[n.value?Y(ho,null,null):Y(vo,null,null)]})]),default:()=>Y("span",null,[oe("展开主菜单")])})]),Y("div",{class:Bo.systemInfo},[Y("div",{class:Bo.themeSelector},[Y(P,{trigger:"click",options:_,onSelect:H},{default:()=>[Y("div",{class:Bo.themeSelectorTrigger},[Y(ee,{size:i?16:18},{default:()=>[Y(u,null,null)]}),Y("span",{class:Bo.themeSelectorLabel},[p]),Y(ee,{size:18,class:Bo.themeSelectorArrow},{default:()=>[Y(fe,null,null)]})])]})]),Y(be,{value:1,show:v.value,dot:!0},{default:()=>[Y("span",{class:"px-[.8rem] sm:px-[.5rem] py-[.4rem] text-[var(--n-text-color-1)] cursor-pointer hover:text-primary transition-colors text-[1.4rem] font-medium",onClick:b},[m.value&&m.value.version])]})])]}),Y(Ae,{class:Bo.content},{default:()=>[Y(se,null,{default:({Component:e})=>Y(ce,{name:"fade",mode:"out-in"},{default:()=>[e&&o(e)]})})]})]}),I.value&&Y("div",{class:Bo.mobileMenuBackdrop,onClick:()=>r()},null),Y(Oo,{show:h.value,"onUpdate:show":e=>h.value=e,versionData:m.value},null)]})}}});export{Lo as default};
|