hermes-web-ui 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -205
- package/bin/hermes-web-ui.mjs +14 -2
- package/dist/assets/{Button-DBOPt_s1.js → Button-BHvh9zmj.js} +1 -1
- package/dist/assets/{ChannelsView-BU9QAub-.css → ChannelsView-C7Wor1FB.css} +1 -1
- package/dist/assets/ChannelsView-DZMniRoi.js +1 -0
- package/dist/assets/ChatView-Dt1eqp6-.js +127 -0
- package/dist/assets/{ChatView-D1SaZAvQ.css → ChatView-gR62J-Xr.css} +1 -1
- package/dist/assets/Close-DYPlamoH.js +45 -0
- package/dist/assets/{FormItem-De01hN-G.js → FormItem-C75Y2lpf.js} +1 -1
- package/dist/assets/Input-CS0p63GR.js +234 -0
- package/dist/assets/InputNumber-lHTE1DBf.js +13 -0
- package/dist/assets/JobsView-DoUtVQm_.css +1 -0
- package/dist/assets/JobsView-kGXDpDGq.js +2 -0
- package/dist/assets/LoginView-BXByybMK.css +1 -0
- package/dist/assets/LoginView-HQwDR5A7.js +1 -0
- package/dist/assets/{LogsView-BgmSycD4.js → LogsView-KPcTBGzh.js} +1 -1
- package/dist/assets/{MarkdownRenderer-z5xC7cOw.js → MarkdownRenderer-Bp-uAEtp.js} +1 -1
- package/dist/assets/{MemoryView-BUZGXC60.js → MemoryView-CWEya0jB.js} +1 -1
- package/dist/assets/{Modal-BLLYorfc.js → Modal-mFCAbKPD.js} +5 -5
- package/dist/assets/{ModelsView-ByryHyh7.js → ModelsView-BdPt2Mo_.js} +1 -1
- package/dist/assets/{ModelsView-DCR-0I10.css → ModelsView-DbBXgw4g.css} +1 -1
- package/dist/assets/Popconfirm-C2OzcGTX.js +16 -0
- package/dist/assets/Popover-CRZpNb8Q.js +117 -0
- package/dist/assets/Scrollbar-CA0Mq0os.js +77 -0
- package/dist/assets/Select-DLECSo9D.js +340 -0
- package/dist/assets/SettingRow-CsKwX-jv.js +1 -0
- package/dist/assets/{SettingsView-Y2Et1YHr.css → SettingsView-Citzr3ci.css} +1 -1
- package/dist/assets/SettingsView-DWXjfdpD.js +352 -0
- package/dist/assets/{SkillsView-CREfL6dQ.css → SkillsView-BNEWlriU.css} +1 -1
- package/dist/assets/{SkillsView-Blcv_g2_.js → SkillsView-Gb4tyJjH.js} +1 -1
- package/dist/assets/{Spin-DiwsqMEC.js → Spin-BbbA3R-G.js} +1 -1
- package/dist/assets/Suffix-BMwB7UJK.js +25 -0
- package/dist/assets/{Switch-Ce0Tgpcj.js → Switch-Xa0U6jwA.js} +2 -2
- package/dist/assets/{Tag-BUJuCRNX.js → Tag-NMAaTGW7.js} +2 -2
- package/dist/assets/TerminalView-B7iMIrM8.css +1 -0
- package/dist/assets/TerminalView-CvTXTM3W.js +36 -0
- package/dist/assets/{Tooltip-C65FWX0W.js → Tooltip-C9RmASqV.js} +1 -1
- package/dist/assets/{UsageView-CKMaJ5W0.css → UsageView-DKigFrVY.css} +1 -1
- package/dist/assets/UsageView-DiCHVrs8.js +1 -0
- package/dist/assets/Warning-CmJYhk3M.js +1 -0
- package/dist/assets/{_plugin-vue_export-helper-DkLSTLBi.js → _plugin-vue_export-helper-NLzeiXdV.js} +1 -1
- package/dist/assets/{app-DtII96CF.js → app-CQZfHgyy.js} +1 -1
- package/dist/assets/app-DeeNNd_a.js +1 -0
- package/dist/assets/{browser-oMT2KRlV.js → browser-DNwI2j4X.js} +1 -1
- package/dist/assets/{chat-nPd2Ount.js → chat-DnFbBAAK.js} +2 -2
- package/dist/assets/context-DLFTSrww.js +1 -0
- package/dist/assets/fade-in-scale-up.cssr-BMJXPg-3.js +1 -0
- package/dist/assets/index-DlNQjiQP.js +306 -0
- package/dist/assets/{index-8v0lZOmS.css → index-TVVcuwR0.css} +1 -1
- package/dist/assets/{jobs-fIgcRW5v.js → jobs-B7U8gZia.js} +1 -1
- package/dist/assets/{pinia-D41F8A9y.js → pinia-DKSOddVw.js} +1 -1
- package/dist/assets/{router-B0PaAFys.js → router-CpYvE976.js} +2 -2
- package/dist/assets/{sessions-Dsqr5aLA.js → sessions-DTV2WuAE.js} +1 -1
- package/dist/assets/{skills-COmQAkb0.js → skills-DwX9oZGG.js} +1 -1
- package/dist/assets/use-compitable-D2-fMbL2.js +1 -0
- package/dist/assets/{use-message-CG8KB3t0.js → use-message-17mZlZe3.js} +1 -1
- package/dist/index.html +22 -18
- package/dist/server/index.js +3 -0
- package/dist/server/routes/terminal.d.ts +2 -0
- package/dist/server/routes/terminal.js +288 -0
- package/package.json +28 -4
- package/dist/assets/ChannelsView-CIZXL3vY.js +0 -1
- package/dist/assets/ChatView-DvAYfM24.js +0 -142
- package/dist/assets/Close-Ck11Jegf.js +0 -45
- package/dist/assets/Input-CyvPny5v.js +0 -234
- package/dist/assets/InputNumber-v7Tkrv97.js +0 -13
- package/dist/assets/JobsView-Cch6Sv2Y.js +0 -2
- package/dist/assets/JobsView-DARa8llR.css +0 -1
- package/dist/assets/LoginView-Cp-xfwtv.css +0 -1
- package/dist/assets/LoginView-DsClZpVT.js +0 -1
- package/dist/assets/Popover-ZzeCeChJ.js +0 -117
- package/dist/assets/Select-CPQQRbMt.js +0 -340
- package/dist/assets/SettingRow-BvAmImkg.js +0 -1
- package/dist/assets/SettingsView-B_5pGI0B.js +0 -352
- package/dist/assets/Suffix-La8FFPWu.js +0 -101
- package/dist/assets/UsageView-MZGY4EKW.js +0 -1
- package/dist/assets/app-DVSCPXta.js +0 -1
- package/dist/assets/context-DRBiUHq_.js +0 -1
- package/dist/assets/index-DNNVWa6r.js +0 -306
- /package/dist/assets/{omit-C6t0n7Zy.js → omit-C4dR5R2G.js} +0 -0
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,C as n,D as r,F as i,G as a,K as o,L as s,N as c,Q as l,R as u,S as d,U as f,X as p,Z as m,ct as h,dt as g,f as _,gt as v,h as y,j as b,pt as x,w as S,y as C}from"./router-B0PaAFys.js";import{r as w,t as T}from"./_plugin-vue_export-helper-DkLSTLBi.js";import{B as ee,I as E,J as D,K as O,Q as k,X as te,at as A,c as ne,ct as j,dt as M,j as N,lt as P,n as F,ot as I,q as L,ut as R,z as re}from"./browser-oMT2KRlV.js";import{N as ie,b as ae,f as oe,l as se,y as z}from"./Popover-ZzeCeChJ.js";import{b as B,c as V,f as H,g as ce,m as U,y as le}from"./Suffix-La8FFPWu.js";import{n as ue,t as de}from"./Close-Ck11Jegf.js";import{t as W}from"./Select-CPQQRbMt.js";import{t as fe}from"./omit-C6t0n7Zy.js";import{n as pe,t as G}from"./InputNumber-v7Tkrv97.js";import{t as K}from"./Input-CyvPny5v.js";import{t as q}from"./use-message-CG8KB3t0.js";import{t as me}from"./Spin-DiwsqMEC.js";import{t as J}from"./Switch-Ce0Tgpcj.js";import{n as Y,t as X}from"./SettingRow-BvAmImkg.js";var he=z(`.v-x-scroll`,{overflow:`auto`,scrollbarWidth:`none`},[z(`&::-webkit-scrollbar`,{width:0,height:0})]),ge=b({name:`XScroll`,props:{disabled:Boolean,onScroll:Function},setup(){let e=h(null);function t(e){!(e.currentTarget.offsetWidth<e.currentTarget.scrollWidth)||e.deltaY===0||(e.currentTarget.scrollLeft+=e.deltaY+e.deltaX,e.preventDefault())}let n=te();return he.mount({id:`vueuc/x-scroll`,head:!0,anchorMetaName:ae,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...t){var n;(n=e.value)==null||n.scrollTo(...t)}})},render(){return c(`div`,{ref:`selfRef`,onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:`v-x-scroll`},this.$slots)}}),Z=/\s/;function _e(e){for(var t=e.length;t--&&Z.test(e.charAt(t)););return t}var ve=/^\s+/;function ye(e){return e&&e.slice(0,_e(e)+1).replace(ve,``)}var Q=NaN,be=/^[-+]0x[0-9a-f]+$/i,xe=/^0b[01]+$/i,Se=/^0o[0-7]+$/i,Ce=parseInt;function we(e){if(typeof e==`number`)return e;if(H(e))return Q;if(N(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=N(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=ye(e);var n=xe.test(e);return n||Se.test(e)?Ce(e.slice(2),n?2:8):be.test(e)?Q:+e}var Te=function(){return E.Date.now()},Ee=`Expected a function`,De=Math.max,Oe=Math.min;function ke(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Ee);t=we(t)||0,N(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?De(we(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Oe(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=Te();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(Te())}function x(){var e=Te(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}var Ae=`Expected a function`;function je(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(Ae);return N(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),ke(e,t,{leading:r,maxWait:t,trailing:i})}var Me={tabFontSizeSmall:`14px`,tabFontSizeMedium:`14px`,tabFontSizeLarge:`16px`,tabGapSmallLine:`36px`,tabGapMediumLine:`36px`,tabGapLargeLine:`36px`,tabGapSmallLineVertical:`8px`,tabGapMediumLineVertical:`8px`,tabGapLargeLineVertical:`8px`,tabPaddingSmallLine:`6px 0`,tabPaddingMediumLine:`10px 0`,tabPaddingLargeLine:`14px 0`,tabPaddingVerticalSmallLine:`6px 12px`,tabPaddingVerticalMediumLine:`8px 16px`,tabPaddingVerticalLargeLine:`10px 20px`,tabGapSmallBar:`36px`,tabGapMediumBar:`36px`,tabGapLargeBar:`36px`,tabGapSmallBarVertical:`8px`,tabGapMediumBarVertical:`8px`,tabGapLargeBarVertical:`8px`,tabPaddingSmallBar:`4px 0`,tabPaddingMediumBar:`6px 0`,tabPaddingLargeBar:`10px 0`,tabPaddingVerticalSmallBar:`6px 12px`,tabPaddingVerticalMediumBar:`8px 16px`,tabPaddingVerticalLargeBar:`10px 20px`,tabGapSmallCard:`4px`,tabGapMediumCard:`4px`,tabGapLargeCard:`4px`,tabGapSmallCardVertical:`4px`,tabGapMediumCardVertical:`4px`,tabGapLargeCardVertical:`4px`,tabPaddingSmallCard:`8px 16px`,tabPaddingMediumCard:`10px 20px`,tabPaddingLargeCard:`12px 24px`,tabPaddingSmallSegment:`4px 0`,tabPaddingMediumSegment:`6px 0`,tabPaddingLargeSegment:`8px 0`,tabPaddingVerticalLargeSegment:`0 8px`,tabPaddingVerticalSmallCard:`8px 12px`,tabPaddingVerticalMediumCard:`10px 16px`,tabPaddingVerticalLargeCard:`12px 20px`,tabPaddingVerticalSmallSegment:`0 4px`,tabPaddingVerticalMediumSegment:`0 6px`,tabGapSmallSegment:`0`,tabGapMediumSegment:`0`,tabGapLargeSegment:`0`,tabGapSmallSegmentVertical:`0`,tabGapMediumSegmentVertical:`0`,tabGapLargeSegmentVertical:`0`,panePaddingSmall:`8px 0 0 0`,panePaddingMedium:`12px 0 0 0`,panePaddingLarge:`16px 0 0 0`,closeSize:`18px`,closeIconSize:`14px`};function Ne(e){let{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,tabColor:l,baseColor:u,dividerColor:d,fontWeight:f,textColor1:p,borderRadius:m,fontSize:h,fontWeightStrong:g}=e;return Object.assign(Object.assign({},Me),{colorSegment:l,tabFontSizeCard:h,tabTextColorLine:p,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:p,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:p,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:p,tabTextColorHoverCard:p,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:i,closeIconColorHover:a,closeIconColorPressed:o,closeColorHover:s,closeColorPressed:c,closeBorderRadius:m,tabColor:l,tabColorSegment:u,tabBorderColor:d,tabFontWeightActive:f,tabFontWeight:f,tabBorderRadius:m,paneTextColor:t,fontWeightStrong:g})}var Pe={name:`Tabs`,common:F,self:Ne},Fe=k(`n-tabs`),Ie={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:`if`},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},$=b({__TAB_PANE__:!0,name:`TabPane`,alias:[`TabPanel`],props:Ie,slots:Object,setup(e){let t=i(Fe,null);return t||D(`tab-pane`,"`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return c(`div`,{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),Le=b({__TAB__:!0,inheritAttrs:!1,name:`Tab`,props:Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},fe(Ie,[`displayDirective`])),setup(e){let{mergedClsPrefixRef:t,valueRef:r,typeRef:a,closableRef:o,tabStyleRef:s,addTabStyleRef:c,tabClassRef:l,addTabClassRef:u,tabChangeIdRef:d,onBeforeLeaveRef:f,triggerRef:p,handleAdd:m,activateTab:h,handleClose:g}=i(Fe);return{trigger:p,mergedClosable:n(()=>{if(e.internalAddable)return!1;let{closable:t}=e;return t===void 0?o.value:t}),style:s,addStyle:c,tabClass:l,addTabClass:u,clsPrefix:t,value:r,type:a,handleClose(t){t.stopPropagation(),!e.disabled&&g(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){m();return}let{name:t}=e,n=++d.id;if(t!==r.value){let{value:i}=f;i?Promise.resolve(i(e.name,r.value)).then(e=>{e&&d.id===n&&h(t)}):h(t)}}}},render(){let{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:i,tab:a,value:o,mergedClosable:l,trigger:u,$slots:{default:d}}=this,f=i??a;return c(`div`,{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?c(`div`,{class:`${t}-tabs-tab-pad`}):null,c(`div`,Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},s({class:[`${t}-tabs-tab`,o===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,l&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:u===`click`?this.activateTab:void 0,onMouseenter:u===`hover`?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),c(`span`,{class:`${t}-tabs-tab__label`},e?c(C,null,c(`div`,{class:`${t}-tabs-tab__height-placeholder`},`\xA0`),c(V,{clsPrefix:t},{default:()=>c(pe,null)})):d?d():typeof f==`object`?f:se(f??n)),l&&this.type===`card`?c(de,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),Re=I(`tabs`,`
|
|
2
|
-
box-sizing: border-box;
|
|
3
|
-
width: 100%;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
transition:
|
|
7
|
-
background-color .3s var(--n-bezier),
|
|
8
|
-
border-color .3s var(--n-bezier);
|
|
9
|
-
`,[P(`segment-type`,[I(`tabs-rail`,[A(`&.transition-disabled`,[I(`tabs-capsule`,`
|
|
10
|
-
transition: none;
|
|
11
|
-
`)])])]),P(`top`,[I(`tab-pane`,`
|
|
12
|
-
padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);
|
|
13
|
-
`)]),P(`left`,[I(`tab-pane`,`
|
|
14
|
-
padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top);
|
|
15
|
-
`)]),P(`left, right`,`
|
|
16
|
-
flex-direction: row;
|
|
17
|
-
`,[I(`tabs-bar`,`
|
|
18
|
-
width: 2px;
|
|
19
|
-
right: 0;
|
|
20
|
-
transition:
|
|
21
|
-
top .2s var(--n-bezier),
|
|
22
|
-
max-height .2s var(--n-bezier),
|
|
23
|
-
background-color .3s var(--n-bezier);
|
|
24
|
-
`),I(`tabs-tab`,`
|
|
25
|
-
padding: var(--n-tab-padding-vertical);
|
|
26
|
-
`)]),P(`right`,`
|
|
27
|
-
flex-direction: row-reverse;
|
|
28
|
-
`,[I(`tab-pane`,`
|
|
29
|
-
padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom);
|
|
30
|
-
`),I(`tabs-bar`,`
|
|
31
|
-
left: 0;
|
|
32
|
-
`)]),P(`bottom`,`
|
|
33
|
-
flex-direction: column-reverse;
|
|
34
|
-
justify-content: flex-end;
|
|
35
|
-
`,[I(`tab-pane`,`
|
|
36
|
-
padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left);
|
|
37
|
-
`),I(`tabs-bar`,`
|
|
38
|
-
top: 0;
|
|
39
|
-
`)]),I(`tabs-rail`,`
|
|
40
|
-
position: relative;
|
|
41
|
-
padding: 3px;
|
|
42
|
-
border-radius: var(--n-tab-border-radius);
|
|
43
|
-
width: 100%;
|
|
44
|
-
background-color: var(--n-color-segment);
|
|
45
|
-
transition: background-color .3s var(--n-bezier);
|
|
46
|
-
display: flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
`,[I(`tabs-capsule`,`
|
|
49
|
-
border-radius: var(--n-tab-border-radius);
|
|
50
|
-
position: absolute;
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
background-color: var(--n-tab-color-segment);
|
|
53
|
-
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
|
|
54
|
-
transition: transform 0.3s var(--n-bezier);
|
|
55
|
-
`),I(`tabs-tab-wrapper`,`
|
|
56
|
-
flex-basis: 0;
|
|
57
|
-
flex-grow: 1;
|
|
58
|
-
display: flex;
|
|
59
|
-
align-items: center;
|
|
60
|
-
justify-content: center;
|
|
61
|
-
`,[I(`tabs-tab`,`
|
|
62
|
-
overflow: hidden;
|
|
63
|
-
border-radius: var(--n-tab-border-radius);
|
|
64
|
-
width: 100%;
|
|
65
|
-
display: flex;
|
|
66
|
-
align-items: center;
|
|
67
|
-
justify-content: center;
|
|
68
|
-
`,[P(`active`,`
|
|
69
|
-
font-weight: var(--n-font-weight-strong);
|
|
70
|
-
color: var(--n-tab-text-color-active);
|
|
71
|
-
`),A(`&:hover`,`
|
|
72
|
-
color: var(--n-tab-text-color-hover);
|
|
73
|
-
`)])])]),P(`flex`,[I(`tabs-nav`,`
|
|
74
|
-
width: 100%;
|
|
75
|
-
position: relative;
|
|
76
|
-
`,[I(`tabs-wrapper`,`
|
|
77
|
-
width: 100%;
|
|
78
|
-
`,[I(`tabs-tab`,`
|
|
79
|
-
margin-right: 0;
|
|
80
|
-
`)])])]),I(`tabs-nav`,`
|
|
81
|
-
box-sizing: border-box;
|
|
82
|
-
line-height: 1.5;
|
|
83
|
-
display: flex;
|
|
84
|
-
transition: border-color .3s var(--n-bezier);
|
|
85
|
-
`,[j(`prefix, suffix`,`
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
`),j(`prefix`,`padding-right: 16px;`),j(`suffix`,`padding-left: 16px;`)]),P(`top, bottom`,[A(`>`,[I(`tabs-nav`,[I(`tabs-nav-scroll-wrapper`,[A(`&::before`,`
|
|
89
|
-
top: 0;
|
|
90
|
-
bottom: 0;
|
|
91
|
-
left: 0;
|
|
92
|
-
width: 20px;
|
|
93
|
-
`),A(`&::after`,`
|
|
94
|
-
top: 0;
|
|
95
|
-
bottom: 0;
|
|
96
|
-
right: 0;
|
|
97
|
-
width: 20px;
|
|
98
|
-
`),P(`shadow-start`,[A(`&::before`,`
|
|
99
|
-
box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
100
|
-
`)]),P(`shadow-end`,[A(`&::after`,`
|
|
101
|
-
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
102
|
-
`)])])])])]),P(`left, right`,[I(`tabs-nav-scroll-content`,`
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
`),A(`>`,[I(`tabs-nav`,[I(`tabs-nav-scroll-wrapper`,[A(`&::before`,`
|
|
105
|
-
top: 0;
|
|
106
|
-
left: 0;
|
|
107
|
-
right: 0;
|
|
108
|
-
height: 20px;
|
|
109
|
-
`),A(`&::after`,`
|
|
110
|
-
bottom: 0;
|
|
111
|
-
left: 0;
|
|
112
|
-
right: 0;
|
|
113
|
-
height: 20px;
|
|
114
|
-
`),P(`shadow-start`,[A(`&::before`,`
|
|
115
|
-
box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);
|
|
116
|
-
`)]),P(`shadow-end`,[A(`&::after`,`
|
|
117
|
-
box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);
|
|
118
|
-
`)])])])])]),I(`tabs-nav-scroll-wrapper`,`
|
|
119
|
-
flex: 1;
|
|
120
|
-
position: relative;
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
`,[I(`tabs-nav-y-scroll`,`
|
|
123
|
-
height: 100%;
|
|
124
|
-
width: 100%;
|
|
125
|
-
overflow-y: auto;
|
|
126
|
-
scrollbar-width: none;
|
|
127
|
-
`,[A(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
128
|
-
width: 0;
|
|
129
|
-
height: 0;
|
|
130
|
-
display: none;
|
|
131
|
-
`)]),A(`&::before, &::after`,`
|
|
132
|
-
transition: box-shadow .3s var(--n-bezier);
|
|
133
|
-
pointer-events: none;
|
|
134
|
-
content: "";
|
|
135
|
-
position: absolute;
|
|
136
|
-
z-index: 1;
|
|
137
|
-
`)]),I(`tabs-nav-scroll-content`,`
|
|
138
|
-
display: flex;
|
|
139
|
-
position: relative;
|
|
140
|
-
min-width: 100%;
|
|
141
|
-
min-height: 100%;
|
|
142
|
-
width: fit-content;
|
|
143
|
-
box-sizing: border-box;
|
|
144
|
-
`),I(`tabs-wrapper`,`
|
|
145
|
-
display: inline-flex;
|
|
146
|
-
flex-wrap: nowrap;
|
|
147
|
-
position: relative;
|
|
148
|
-
`),I(`tabs-tab-wrapper`,`
|
|
149
|
-
display: flex;
|
|
150
|
-
flex-wrap: nowrap;
|
|
151
|
-
flex-shrink: 0;
|
|
152
|
-
flex-grow: 0;
|
|
153
|
-
`),I(`tabs-tab`,`
|
|
154
|
-
cursor: pointer;
|
|
155
|
-
white-space: nowrap;
|
|
156
|
-
flex-wrap: nowrap;
|
|
157
|
-
display: inline-flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
color: var(--n-tab-text-color);
|
|
160
|
-
font-size: var(--n-tab-font-size);
|
|
161
|
-
background-clip: padding-box;
|
|
162
|
-
padding: var(--n-tab-padding);
|
|
163
|
-
transition:
|
|
164
|
-
box-shadow .3s var(--n-bezier),
|
|
165
|
-
color .3s var(--n-bezier),
|
|
166
|
-
background-color .3s var(--n-bezier),
|
|
167
|
-
border-color .3s var(--n-bezier);
|
|
168
|
-
`,[P(`disabled`,{cursor:`not-allowed`}),j(`close`,`
|
|
169
|
-
margin-left: 6px;
|
|
170
|
-
transition:
|
|
171
|
-
background-color .3s var(--n-bezier),
|
|
172
|
-
color .3s var(--n-bezier);
|
|
173
|
-
`),j(`label`,`
|
|
174
|
-
display: flex;
|
|
175
|
-
align-items: center;
|
|
176
|
-
z-index: 1;
|
|
177
|
-
`)]),I(`tabs-bar`,`
|
|
178
|
-
position: absolute;
|
|
179
|
-
bottom: 0;
|
|
180
|
-
height: 2px;
|
|
181
|
-
border-radius: 1px;
|
|
182
|
-
background-color: var(--n-bar-color);
|
|
183
|
-
transition:
|
|
184
|
-
left .2s var(--n-bezier),
|
|
185
|
-
max-width .2s var(--n-bezier),
|
|
186
|
-
opacity .3s var(--n-bezier),
|
|
187
|
-
background-color .3s var(--n-bezier);
|
|
188
|
-
`,[A(`&.transition-disabled`,`
|
|
189
|
-
transition: none;
|
|
190
|
-
`),P(`disabled`,`
|
|
191
|
-
background-color: var(--n-tab-text-color-disabled)
|
|
192
|
-
`)]),I(`tabs-pane-wrapper`,`
|
|
193
|
-
position: relative;
|
|
194
|
-
overflow: hidden;
|
|
195
|
-
transition: max-height .2s var(--n-bezier);
|
|
196
|
-
`),I(`tab-pane`,`
|
|
197
|
-
color: var(--n-pane-text-color);
|
|
198
|
-
width: 100%;
|
|
199
|
-
transition:
|
|
200
|
-
color .3s var(--n-bezier),
|
|
201
|
-
background-color .3s var(--n-bezier),
|
|
202
|
-
opacity .2s var(--n-bezier);
|
|
203
|
-
left: 0;
|
|
204
|
-
right: 0;
|
|
205
|
-
top: 0;
|
|
206
|
-
`,[A(`&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active`,`
|
|
207
|
-
transition:
|
|
208
|
-
color .3s var(--n-bezier),
|
|
209
|
-
background-color .3s var(--n-bezier),
|
|
210
|
-
transform .2s var(--n-bezier),
|
|
211
|
-
opacity .2s var(--n-bezier);
|
|
212
|
-
`),A(`&.next-transition-leave-active, &.prev-transition-leave-active`,`
|
|
213
|
-
position: absolute;
|
|
214
|
-
`),A(`&.next-transition-enter-from, &.prev-transition-leave-to`,`
|
|
215
|
-
transform: translateX(32px);
|
|
216
|
-
opacity: 0;
|
|
217
|
-
`),A(`&.next-transition-leave-to, &.prev-transition-enter-from`,`
|
|
218
|
-
transform: translateX(-32px);
|
|
219
|
-
opacity: 0;
|
|
220
|
-
`),A(`&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to`,`
|
|
221
|
-
transform: translateX(0);
|
|
222
|
-
opacity: 1;
|
|
223
|
-
`)]),I(`tabs-tab-pad`,`
|
|
224
|
-
box-sizing: border-box;
|
|
225
|
-
width: var(--n-tab-gap);
|
|
226
|
-
flex-grow: 0;
|
|
227
|
-
flex-shrink: 0;
|
|
228
|
-
`),P(`line-type, bar-type`,[I(`tabs-tab`,`
|
|
229
|
-
font-weight: var(--n-tab-font-weight);
|
|
230
|
-
box-sizing: border-box;
|
|
231
|
-
vertical-align: bottom;
|
|
232
|
-
`,[A(`&:hover`,{color:`var(--n-tab-text-color-hover)`}),P(`active`,`
|
|
233
|
-
color: var(--n-tab-text-color-active);
|
|
234
|
-
font-weight: var(--n-tab-font-weight-active);
|
|
235
|
-
`),P(`disabled`,{color:`var(--n-tab-text-color-disabled)`})])]),I(`tabs-nav`,[P(`line-type`,[P(`top`,[j(`prefix, suffix`,`
|
|
236
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
237
|
-
`),I(`tabs-nav-scroll-content`,`
|
|
238
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
239
|
-
`),I(`tabs-bar`,`
|
|
240
|
-
bottom: -1px;
|
|
241
|
-
`)]),P(`left`,[j(`prefix, suffix`,`
|
|
242
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
243
|
-
`),I(`tabs-nav-scroll-content`,`
|
|
244
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
245
|
-
`),I(`tabs-bar`,`
|
|
246
|
-
right: -1px;
|
|
247
|
-
`)]),P(`right`,[j(`prefix, suffix`,`
|
|
248
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
249
|
-
`),I(`tabs-nav-scroll-content`,`
|
|
250
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
251
|
-
`),I(`tabs-bar`,`
|
|
252
|
-
left: -1px;
|
|
253
|
-
`)]),P(`bottom`,[j(`prefix, suffix`,`
|
|
254
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
255
|
-
`),I(`tabs-nav-scroll-content`,`
|
|
256
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
257
|
-
`),I(`tabs-bar`,`
|
|
258
|
-
top: -1px;
|
|
259
|
-
`)]),j(`prefix, suffix`,`
|
|
260
|
-
transition: border-color .3s var(--n-bezier);
|
|
261
|
-
`),I(`tabs-nav-scroll-content`,`
|
|
262
|
-
transition: border-color .3s var(--n-bezier);
|
|
263
|
-
`),I(`tabs-bar`,`
|
|
264
|
-
border-radius: 0;
|
|
265
|
-
`)]),P(`card-type`,[j(`prefix, suffix`,`
|
|
266
|
-
transition: border-color .3s var(--n-bezier);
|
|
267
|
-
`),I(`tabs-pad`,`
|
|
268
|
-
flex-grow: 1;
|
|
269
|
-
transition: border-color .3s var(--n-bezier);
|
|
270
|
-
`),I(`tabs-tab-pad`,`
|
|
271
|
-
transition: border-color .3s var(--n-bezier);
|
|
272
|
-
`),I(`tabs-tab`,`
|
|
273
|
-
font-weight: var(--n-tab-font-weight);
|
|
274
|
-
border: 1px solid var(--n-tab-border-color);
|
|
275
|
-
background-color: var(--n-tab-color);
|
|
276
|
-
box-sizing: border-box;
|
|
277
|
-
position: relative;
|
|
278
|
-
vertical-align: bottom;
|
|
279
|
-
display: flex;
|
|
280
|
-
justify-content: space-between;
|
|
281
|
-
font-size: var(--n-tab-font-size);
|
|
282
|
-
color: var(--n-tab-text-color);
|
|
283
|
-
`,[P(`addable`,`
|
|
284
|
-
padding-left: 8px;
|
|
285
|
-
padding-right: 8px;
|
|
286
|
-
font-size: 16px;
|
|
287
|
-
justify-content: center;
|
|
288
|
-
`,[j(`height-placeholder`,`
|
|
289
|
-
width: 0;
|
|
290
|
-
font-size: var(--n-tab-font-size);
|
|
291
|
-
`),R(`disabled`,[A(`&:hover`,`
|
|
292
|
-
color: var(--n-tab-text-color-hover);
|
|
293
|
-
`)])]),P(`closable`,`padding-right: 8px;`),P(`active`,`
|
|
294
|
-
background-color: #0000;
|
|
295
|
-
font-weight: var(--n-tab-font-weight-active);
|
|
296
|
-
color: var(--n-tab-text-color-active);
|
|
297
|
-
`),P(`disabled`,`color: var(--n-tab-text-color-disabled);`)])]),P(`left, right`,`
|
|
298
|
-
flex-direction: column;
|
|
299
|
-
`,[j(`prefix, suffix`,`
|
|
300
|
-
padding: var(--n-tab-padding-vertical);
|
|
301
|
-
`),I(`tabs-wrapper`,`
|
|
302
|
-
flex-direction: column;
|
|
303
|
-
`),I(`tabs-tab-wrapper`,`
|
|
304
|
-
flex-direction: column;
|
|
305
|
-
`,[I(`tabs-tab-pad`,`
|
|
306
|
-
height: var(--n-tab-gap-vertical);
|
|
307
|
-
width: 100%;
|
|
308
|
-
`)])]),P(`top`,[P(`card-type`,[I(`tabs-scroll-padding`,`border-bottom: 1px solid var(--n-tab-border-color);`),j(`prefix, suffix`,`
|
|
309
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
310
|
-
`),I(`tabs-tab`,`
|
|
311
|
-
border-top-left-radius: var(--n-tab-border-radius);
|
|
312
|
-
border-top-right-radius: var(--n-tab-border-radius);
|
|
313
|
-
`,[P(`active`,`
|
|
314
|
-
border-bottom: 1px solid #0000;
|
|
315
|
-
`)]),I(`tabs-tab-pad`,`
|
|
316
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
317
|
-
`),I(`tabs-pad`,`
|
|
318
|
-
border-bottom: 1px solid var(--n-tab-border-color);
|
|
319
|
-
`)])]),P(`left`,[P(`card-type`,[I(`tabs-scroll-padding`,`border-right: 1px solid var(--n-tab-border-color);`),j(`prefix, suffix`,`
|
|
320
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
321
|
-
`),I(`tabs-tab`,`
|
|
322
|
-
border-top-left-radius: var(--n-tab-border-radius);
|
|
323
|
-
border-bottom-left-radius: var(--n-tab-border-radius);
|
|
324
|
-
`,[P(`active`,`
|
|
325
|
-
border-right: 1px solid #0000;
|
|
326
|
-
`)]),I(`tabs-tab-pad`,`
|
|
327
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
328
|
-
`),I(`tabs-pad`,`
|
|
329
|
-
border-right: 1px solid var(--n-tab-border-color);
|
|
330
|
-
`)])]),P(`right`,[P(`card-type`,[I(`tabs-scroll-padding`,`border-left: 1px solid var(--n-tab-border-color);`),j(`prefix, suffix`,`
|
|
331
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
332
|
-
`),I(`tabs-tab`,`
|
|
333
|
-
border-top-right-radius: var(--n-tab-border-radius);
|
|
334
|
-
border-bottom-right-radius: var(--n-tab-border-radius);
|
|
335
|
-
`,[P(`active`,`
|
|
336
|
-
border-left: 1px solid #0000;
|
|
337
|
-
`)]),I(`tabs-tab-pad`,`
|
|
338
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
339
|
-
`),I(`tabs-pad`,`
|
|
340
|
-
border-left: 1px solid var(--n-tab-border-color);
|
|
341
|
-
`)])]),P(`bottom`,[P(`card-type`,[I(`tabs-scroll-padding`,`border-top: 1px solid var(--n-tab-border-color);`),j(`prefix, suffix`,`
|
|
342
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
343
|
-
`),I(`tabs-tab`,`
|
|
344
|
-
border-bottom-left-radius: var(--n-tab-border-radius);
|
|
345
|
-
border-bottom-right-radius: var(--n-tab-border-radius);
|
|
346
|
-
`,[P(`active`,`
|
|
347
|
-
border-top: 1px solid #0000;
|
|
348
|
-
`)]),I(`tabs-tab-pad`,`
|
|
349
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
350
|
-
`),I(`tabs-pad`,`
|
|
351
|
-
border-top: 1px solid var(--n-tab-border-color);
|
|
352
|
-
`)])])])]),ze=je,Be=b({name:`Tabs`,props:Object.assign(Object.assign({},ne.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:`click`},type:{type:String,default:`bar`},closable:Boolean,justifyContent:String,size:String,placement:{type:String,default:`top`},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),slots:Object,setup(e,{slots:t}){let{mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedComponentPropsRef:a}=ee(e),s=ne(`Tabs`,`-tabs`,Re,Pe,e,r),c=h(null),l=h(null),d=h(null),_=h(null),v=h(null),y=h(null),b=h(!0),x=h(!0),S=ue(e,[`labelSize`,`size`]),C=n(()=>S.value?S.value:a?.value?.Tabs?.size||`medium`),w=ue(e,[`activeName`,`value`]),T=h(w.value??e.defaultValue??(t.default?oe(t.default())[0]?.props?.name:null)),E=ce(w,T),D={id:0},O=n(()=>{if(!(!e.justifyContent||e.type===`card`))return{display:`flex`,justifyContent:e.justifyContent}});p(E,()=>{D.id=0,N(),P()});function k(){let{value:e}=E;return e===null?null:c.value?.querySelector(`[data-name="${e}"]`)}function te(t){if(e.type===`card`)return;let{value:n}=l;if(!n)return;let i=n.style.opacity===`0`;if(t){let a=`${r.value}-tabs-bar--disabled`,{barWidth:o,placement:s}=e;if(t.dataset.disabled===`true`?n.classList.add(a):n.classList.remove(a),[`top`,`bottom`].includes(s)){if(j([`top`,`maxHeight`,`height`]),typeof o==`number`&&t.offsetWidth>=o){let e=Math.floor((t.offsetWidth-o)/2)+t.offsetLeft;n.style.left=`${e}px`,n.style.maxWidth=`${o}px`}else n.style.left=`${t.offsetLeft}px`,n.style.maxWidth=`${t.offsetWidth}px`;n.style.width=`8192px`,i&&(n.style.transition=`none`),n.offsetWidth,i&&(n.style.transition=``,n.style.opacity=`1`)}else{if(j([`left`,`maxWidth`,`width`]),typeof o==`number`&&t.offsetHeight>=o){let e=Math.floor((t.offsetHeight-o)/2)+t.offsetTop;n.style.top=`${e}px`,n.style.maxHeight=`${o}px`}else n.style.top=`${t.offsetTop}px`,n.style.maxHeight=`${t.offsetHeight}px`;n.style.height=`8192px`,i&&(n.style.transition=`none`),n.offsetHeight,i&&(n.style.transition=``,n.style.opacity=`1`)}}}function A(){if(e.type===`card`)return;let{value:t}=l;t&&(t.style.opacity=`0`)}function j(e){let{value:t}=l;if(t)for(let n of e)t.style[n]=``}function N(){if(e.type===`card`)return;let t=k();t?te(t):A()}function P(){let e=v.value?.$el;if(!e)return;let t=k();if(!t)return;let{scrollLeft:n,offsetWidth:r}=e,{offsetLeft:i,offsetWidth:a}=t;n>i?e.scrollTo({top:0,left:i,behavior:`smooth`}):i+a>n+r&&e.scrollTo({top:0,left:i+a-r,behavior:`smooth`})}let F=h(null),I=0,R=null;function ae(e){let t=F.value;if(t){I=e.getBoundingClientRect().height;let n=`${I}px`,r=()=>{t.style.height=n,t.style.maxHeight=n};R?(r(),R(),R=null):R=r}}function se(e){let t=F.value;if(t){let n=e.getBoundingClientRect().height,r=()=>{document.body.offsetHeight,t.style.maxHeight=`${n}px`,t.style.height=`${Math.max(I,n)}px`};R?(R(),R=null,r()):R=r}}function z(){let t=F.value;if(t){t.style.maxHeight=``,t.style.height=``;let{paneWrapperStyle:n}=e;if(typeof n==`string`)t.style.cssText=n;else if(n){let{maxHeight:e,height:r}=n;e!==void 0&&(t.style.maxHeight=e),r!==void 0&&(t.style.height=r)}}}let V={value:[]},H=h(`next`);function U(e){let t=E.value,n=`next`;for(let r of V.value){if(r===t)break;if(r===e){n=`prev`;break}}H.value=n,de(e)}function de(t){let{onActiveNameChange:n,onUpdateValue:r,"onUpdate:value":i}=e;n&&L(n,t),r&&L(r,t),i&&L(i,t),T.value=t}function W(t){let{onClose:n}=e;n&&L(n,t)}let fe=!0;function pe(){let{value:e}=l;if(!e)return;fe||=!1;let t=`transition-disabled`;e.classList.add(t),N(),e.classList.remove(t)}let G=h(null);function K({transitionDisabled:e}){let t=c.value;if(!t)return;e&&t.classList.add(`transition-disabled`);let n=k();n&&G.value&&(G.value.style.width=`${n.offsetWidth}px`,G.value.style.height=`${n.offsetHeight}px`,G.value.style.transform=`translateX(${n.offsetLeft-le(getComputedStyle(t).paddingLeft)}px)`,e&&G.value.offsetWidth),e&&t.classList.remove(`transition-disabled`)}p([E],()=>{e.type===`segment`&&u(()=>{K({transitionDisabled:!1})})}),f(()=>{e.type===`segment`&&K({transitionDisabled:!0})});let q=0;function me(t){if(t.contentRect.width===0&&t.contentRect.height===0||q===t.contentRect.width)return;q=t.contentRect.width;let{type:n}=e;if((n===`line`||n===`bar`)&&(fe||e.justifyContent?.startsWith(`space`))&&pe(),n!==`segment`){let{placement:t}=e;Z((t===`top`||t===`bottom`?v.value?.$el:y.value)||null)}}let J=ze(me,64);p([()=>e.justifyContent,()=>e.size],()=>{u(()=>{let{type:t}=e;(t===`line`||t===`bar`)&&pe()})});let Y=h(!1);function X(t){let{target:n,contentRect:{width:r,height:i}}=t,a=n.parentElement.parentElement.offsetWidth,o=n.parentElement.parentElement.offsetHeight,{placement:s}=e;if(!Y.value)s===`top`||s===`bottom`?a<r&&(Y.value=!0):o<i&&(Y.value=!0);else{let{value:e}=_;if(!e)return;s===`top`||s===`bottom`?a-r>e.$el.offsetWidth&&(Y.value=!1):o-i>e.$el.offsetHeight&&(Y.value=!1)}Z(v.value?.$el||null)}let he=ze(X,64);function ge(){let{onAdd:t}=e;t&&t(),u(()=>{let e=k(),{value:t}=v;!e||!t||t.scrollTo({left:e.offsetLeft,top:0,behavior:`smooth`})})}function Z(t){if(!t)return;let{placement:n}=e;if(n===`top`||n===`bottom`){let{scrollLeft:e,scrollWidth:n,offsetWidth:r}=t;b.value=e<=0,x.value=e+r>=n}else{let{scrollTop:e,scrollHeight:n,offsetHeight:r}=t;b.value=e<=0,x.value=e+r>=n}}let _e=ze(e=>{Z(e.target)},64);o(Fe,{triggerRef:g(e,`trigger`),tabStyleRef:g(e,`tabStyle`),tabClassRef:g(e,`tabClass`),addTabStyleRef:g(e,`addTabStyle`),addTabClassRef:g(e,`addTabClass`),paneClassRef:g(e,`paneClass`),paneStyleRef:g(e,`paneStyle`),mergedClsPrefixRef:r,typeRef:g(e,`type`),closableRef:g(e,`closable`),valueRef:E,tabChangeIdRef:D,onBeforeLeaveRef:g(e,`onBeforeLeave`),activateTab:U,handleClose:W,handleAdd:ge}),ie(()=>{N(),P()}),m(()=>{let{value:e}=d;if(!e)return;let{value:t}=r,n=`${t}-tabs-nav-scroll-wrapper--shadow-start`,i=`${t}-tabs-nav-scroll-wrapper--shadow-end`;b.value?e.classList.remove(n):e.classList.add(n),x.value?e.classList.remove(i):e.classList.add(i)});let ve={syncBarPosition:()=>{N()}},ye=()=>{K({transitionDisabled:!0})},Q=n(()=>{let{value:t}=C,{type:n}=e,r=`${t}${{card:`Card`,bar:`Bar`,line:`Line`,segment:`Segment`}[n]}`,{self:{barColor:i,closeIconColor:a,closeIconColorHover:o,closeIconColorPressed:c,tabColor:l,tabBorderColor:u,paneTextColor:d,tabFontWeight:f,tabBorderRadius:p,tabFontWeightActive:m,colorSegment:h,fontWeightStrong:g,tabColorSegment:_,closeSize:v,closeIconSize:y,closeColorHover:b,closeColorPressed:x,closeBorderRadius:S,[M(`panePadding`,t)]:w,[M(`tabPadding`,r)]:T,[M(`tabPaddingVertical`,r)]:ee,[M(`tabGap`,r)]:E,[M(`tabGap`,`${r}Vertical`)]:D,[M(`tabTextColor`,n)]:O,[M(`tabTextColorActive`,n)]:k,[M(`tabTextColorHover`,n)]:te,[M(`tabTextColorDisabled`,n)]:A,[M(`tabFontSize`,t)]:ne},common:{cubicBezierEaseInOut:j}}=s.value;return{"--n-bezier":j,"--n-color-segment":h,"--n-bar-color":i,"--n-tab-font-size":ne,"--n-tab-text-color":O,"--n-tab-text-color-active":k,"--n-tab-text-color-disabled":A,"--n-tab-text-color-hover":te,"--n-pane-text-color":d,"--n-tab-border-color":u,"--n-tab-border-radius":p,"--n-close-size":v,"--n-close-icon-size":y,"--n-close-color-hover":b,"--n-close-color-pressed":x,"--n-close-border-radius":S,"--n-close-icon-color":a,"--n-close-icon-color-hover":o,"--n-close-icon-color-pressed":c,"--n-tab-color":l,"--n-tab-font-weight":f,"--n-tab-font-weight-active":m,"--n-tab-padding":T,"--n-tab-padding-vertical":ee,"--n-tab-gap":E,"--n-tab-gap-vertical":D,"--n-pane-padding-left":B(w,`left`),"--n-pane-padding-right":B(w,`right`),"--n-pane-padding-top":B(w,`top`),"--n-pane-padding-bottom":B(w,`bottom`),"--n-font-weight-strong":g,"--n-tab-color-segment":_}}),be=i?re(`tabs`,n(()=>`${C.value[0]}${e.type[0]}`),Q,e):void 0;return Object.assign({mergedClsPrefix:r,mergedValue:E,renderedNames:new Set,segmentCapsuleElRef:G,tabsPaneWrapperRef:F,tabsElRef:c,barElRef:l,addTabInstRef:_,xScrollInstRef:v,scrollWrapperElRef:d,addTabFixed:Y,tabWrapperStyle:O,handleNavResize:J,mergedSize:C,handleScroll:_e,handleTabsResize:he,cssVars:i?void 0:Q,themeClass:be?.themeClass,animationDirection:H,renderNameListRef:V,yScrollElRef:y,handleSegmentResize:ye,onAnimationBeforeLeave:ae,onAnimationEnter:se,onAnimationAfterEnter:z,onRender:be?.onRender},ve)},render(){let{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:o,onRender:s,paneWrapperClass:l,paneWrapperStyle:u,$slots:{default:d,prefix:f,suffix:p}}=this;s?.();let m=d?oe(d()).filter(e=>e.type.__TAB_PANE__===!0):[],h=d?oe(d()).filter(e=>e.type.__TAB__===!0):[],g=!h.length,_=t===`card`,v=t===`segment`,y=!_&&!v&&this.justifyContent;o.value=[];let b=()=>{let t=c(`div`,{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},y?null:c(`div`,{class:`${e}-tabs-scroll-padding`,style:n===`top`||n===`bottom`?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?m.map((e,t)=>(o.value.push(e.props.name),We(c(Le,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0&&(!y||y===`center`||y===`start`||y===`end`)}),e.children?{default:e.children.tab}:void 0)))):h.map((e,t)=>(o.value.push(e.props.name),We(t!==0&&!y?Ue(e):e))),!r&&i&&_?He(i,(g?m.length:h.length)!==0):null,y?null:c(`div`,{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return c(`div`,{ref:`tabsElRef`,class:`${e}-tabs-nav-scroll-content`},_&&i?c(U,{onResize:this.handleTabsResize},{default:()=>t}):t,_?c(`div`,{class:`${e}-tabs-pad`}):null,_?null:c(`div`,{ref:`barElRef`,class:`${e}-tabs-bar`}))},x=v?`top`:n;return c(`div`,{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,y&&`${e}-tabs--flex`,`${e}-tabs--${x}`],style:this.cssVars},c(`div`,{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${x}`,`${e}-tabs-nav`]},O(f,t=>t&&c(`div`,{class:`${e}-tabs-nav__prefix`},t)),v?c(U,{onResize:this.handleSegmentResize},{default:()=>c(`div`,{class:`${e}-tabs-rail`,ref:`tabsElRef`},c(`div`,{class:`${e}-tabs-capsule`,ref:`segmentCapsuleElRef`},c(`div`,{class:`${e}-tabs-wrapper`},c(`div`,{class:`${e}-tabs-tab`}))),g?m.map((e,t)=>(o.value.push(e.props.name),c(Le,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0}),e.children?{default:e.children.tab}:void 0))):h.map((e,t)=>(o.value.push(e.props.name),t===0?e:Ue(e))))}):c(U,{onResize:this.handleNavResize},{default:()=>c(`div`,{class:`${e}-tabs-nav-scroll-wrapper`,ref:`scrollWrapperElRef`},[`top`,`bottom`].includes(x)?c(ge,{ref:`xScrollInstRef`,onScroll:this.handleScroll},{default:b}):c(`div`,{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:`yScrollElRef`},b()))}),r&&i&&_?He(i,!0):null,O(p,t=>t&&c(`div`,{class:`${e}-tabs-nav__suffix`},t))),g&&(this.animated&&(x===`top`||x===`bottom`)?c(`div`,{ref:`tabsPaneWrapperRef`,style:u,class:[`${e}-tabs-pane-wrapper`,l]},Ve(m,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Ve(m,this.mergedValue,this.renderedNames)))}});function Ve(t,n,r,i,a,o,s){let l=[];return t.forEach(t=>{let{name:i,displayDirective:a,"display-directive":o}=t.props,s=e=>a===e||o===e,c=n===i;if(t.key!==void 0&&(t.key=i),c||s(`show`)||s(`show:lazy`)&&r.has(i)){r.has(i)||r.add(i);let n=!s(`if`);l.push(n?e(t,[[y,c]]):t)}}),s?c(_,{name:`${s}-transition`,onBeforeLeave:i,onEnter:a,onAfterEnter:o},{default:()=>l}):l}function He(e,t){return c(Le,{ref:`addTabInstRef`,key:`__addable`,name:`__addable`,internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e==`object`&&e.disabled})}function Ue(e){let t=d(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function We(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes(`internalLeftPadded`)||e.dynamicProps.push(`internalLeftPadded`):e.dynamicProps=[`internalLeftPadded`],e}var Ge={class:`settings-section`},Ke=T(b({__name:`DisplaySettings`,setup(e){let n=Y(),i=q(),{t:o}=w();async function s(e){try{await n.saveSection(`display`,e),i.success(o(`settings.saved`))}catch{i.error(o(`settings.saveFailed`))}}return(e,i)=>(a(),r(`section`,Ge,[t(X,{label:x(o)(`settings.display.streaming`),hint:x(o)(`settings.display.streamingHint`)},{default:l(()=>[t(x(J),{value:x(n).display.streaming,"onUpdate:value":i[0]||=e=>s({streaming:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.display.compact`),hint:x(o)(`settings.display.compactHint`)},{default:l(()=>[t(x(J),{value:x(n).display.compact,"onUpdate:value":i[1]||=e=>s({compact:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.display.showReasoning`),hint:x(o)(`settings.display.showReasoningHint`)},{default:l(()=>[t(x(J),{value:x(n).display.show_reasoning,"onUpdate:value":i[2]||=e=>s({show_reasoning:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.display.showCost`),hint:x(o)(`settings.display.showCostHint`)},{default:l(()=>[t(x(J),{value:x(n).display.show_cost,"onUpdate:value":i[3]||=e=>s({show_cost:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.display.inlineDiffs`),hint:x(o)(`settings.display.inlineDiffsHint`)},{default:l(()=>[t(x(J),{value:x(n).display.inline_diffs,"onUpdate:value":i[4]||=e=>s({inline_diffs:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.display.bellOnComplete`),hint:x(o)(`settings.display.bellOnCompleteHint`)},{default:l(()=>[t(x(J),{value:x(n).display.bell_on_complete,"onUpdate:value":i[5]||=e=>s({bell_on_complete:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.display.busyInputMode`),hint:x(o)(`settings.display.busyInputModeHint`)},{default:l(()=>[t(x(J),{value:x(n).display.busy_input_mode===`interrupt`,"onUpdate:value":i[6]||=e=>s({busy_input_mode:e?`interrupt`:`off`})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-c8db8205`]]),qe={class:`settings-section`},Je=T(b({__name:`AgentSettings`,setup(e){let n=Y(),i=q(),{t:o}=w();async function s(e){try{await n.saveSection(`agent`,e),i.success(o(`settings.saved`))}catch{i.error(o(`settings.saveFailed`))}}return(e,i)=>(a(),r(`section`,qe,[t(X,{label:x(o)(`settings.agent.maxTurns`),hint:x(o)(`settings.agent.maxTurnsHint`)},{default:l(()=>[t(x(G),{value:x(n).agent.max_turns,min:1,max:200,step:5,size:`small`,class:`input-sm`,"onUpdate:value":i[0]||=e=>e!=null&&s({max_turns:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.agent.gatewayTimeout`),hint:x(o)(`settings.agent.gatewayTimeoutHint`)},{default:l(()=>[t(x(G),{value:x(n).agent.gateway_timeout,min:60,max:7200,step:60,size:`small`,class:`input-sm`,"onUpdate:value":i[1]||=e=>e!=null&&s({gateway_timeout:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.agent.restartDrainTimeout`),hint:x(o)(`settings.agent.restartDrainTimeoutHint`)},{default:l(()=>[t(x(G),{value:x(n).agent.restart_drain_timeout,min:10,max:300,step:10,size:`small`,class:`input-sm`,"onUpdate:value":i[2]||=e=>e!=null&&s({restart_drain_timeout:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.agent.toolEnforcement`),hint:x(o)(`settings.agent.toolEnforcementHint`)},{default:l(()=>[t(x(W),{value:x(n).agent.tool_use_enforcement||`auto`,options:[{label:x(o)(`settings.agent.auto`),value:`auto`},{label:x(o)(`settings.agent.always`),value:`always`},{label:x(o)(`settings.agent.never`),value:`never`}],size:`small`,class:`input-sm`,"onUpdate:value":i[3]||=e=>s({tool_use_enforcement:e})},null,8,[`value`,`options`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-ef76d803`]]),Ye={class:`settings-section`},Xe=T(b({__name:`MemorySettings`,setup(e){let n=Y(),i=q(),{t:o}=w();async function s(e){try{await n.saveSection(`memory`,e),i.success(o(`settings.saved`))}catch{i.error(o(`settings.saveFailed`))}}return(e,i)=>(a(),r(`section`,Ye,[t(X,{label:x(o)(`settings.memory.enabled`),hint:x(o)(`settings.memory.enabledHint`)},{default:l(()=>[t(x(J),{value:x(n).memory.memory_enabled,"onUpdate:value":i[0]||=e=>s({memory_enabled:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.memory.userProfile`),hint:x(o)(`settings.memory.userProfileHint`)},{default:l(()=>[t(x(J),{value:x(n).memory.user_profile_enabled,"onUpdate:value":i[1]||=e=>s({user_profile_enabled:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.memory.charLimit`),hint:x(o)(`settings.memory.charLimitHint`)},{default:l(()=>[t(x(G),{value:x(n).memory.memory_char_limit,min:100,max:1e4,step:100,size:`small`,class:`input-sm`,"onUpdate:value":i[2]||=e=>e!=null&&s({memory_char_limit:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.memory.userCharLimit`),hint:x(o)(`settings.memory.userCharLimitHint`)},{default:l(()=>[t(x(G),{value:x(n).memory.user_char_limit,min:100,max:1e4,step:100,size:`small`,class:`input-sm`,"onUpdate:value":i[3]||=e=>e!=null&&s({user_char_limit:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-0dfe4428`]]),Ze={class:`settings-section`},Qe=T(b({__name:`SessionSettings`,setup(e){let n=Y(),i=q(),{t:o}=w();async function s(e){try{await n.saveSection(`session_reset`,e),i.success(o(`settings.saved`))}catch{i.error(o(`settings.saveFailed`))}}return(e,i)=>(a(),r(`section`,Ze,[t(X,{label:x(o)(`settings.session.mode`),hint:x(o)(`settings.session.modeHint`)},{default:l(()=>[t(x(W),{value:x(n).sessionReset.mode||`both`,options:[{label:x(o)(`settings.session.modeBoth`),value:`both`},{label:x(o)(`settings.session.modeIdle`),value:`idle`},{label:x(o)(`settings.session.modeHourly`),value:`hourly`}],size:`small`,class:`input-md`,"onUpdate:value":i[0]||=e=>s({mode:e})},null,8,[`value`,`options`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.session.idleMinutes`),hint:x(o)(`settings.session.idleMinutesHint`)},{default:l(()=>[t(x(G),{value:x(n).sessionReset.idle_minutes,min:10,max:10080,step:30,size:`small`,class:`input-sm`,"onUpdate:value":i[1]||=e=>e!=null&&s({idle_minutes:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.session.atHour`),hint:x(o)(`settings.session.atHourHint`)},{default:l(()=>[t(x(G),{value:x(n).sessionReset.at_hour,min:0,max:23,step:1,size:`small`,class:`input-sm`,"onUpdate:value":i[2]||=e=>e!=null&&s({at_hour:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-b7d98a60`]]),$e={class:`settings-section`},et=T(b({__name:`PrivacySettings`,setup(e){let n=Y(),i=q(),{t:o}=w();async function s(e){try{await n.saveSection(`privacy`,e),i.success(o(`settings.saved`))}catch{i.error(o(`settings.saveFailed`))}}return(e,i)=>(a(),r(`section`,$e,[t(X,{label:x(o)(`settings.privacy.redactPii`),hint:x(o)(`settings.privacy.redactPiiHint`)},{default:l(()=>[t(x(J),{value:x(n).privacy.redact_pii,"onUpdate:value":i[0]||=e=>s({redact_pii:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])]))}}),[[`__scopeId`,`data-v-eecbcbf4`]]),tt={class:`settings-view`},nt={class:`page-header`},rt={class:`header-title`},it={class:`settings-content`},at={class:`settings-section`},ot=T(b({__name:`SettingsView`,setup(e){let n=Y(),i=q(),{t:o}=w();f(()=>{n.fetchSettings()});async function s(e){try{await n.saveSection(`platforms`,{api_server:e}),i.success(o(`settings.saved`))}catch{i.error(o(`settings.saveFailed`))}}return(e,i)=>(a(),r(`div`,tt,[S(`header`,nt,[S(`h2`,rt,v(x(o)(`settings.title`)),1)]),S(`div`,it,[t(x(me),{show:x(n).loading},{default:l(()=>[t(x(Be),{type:`line`,animated:``},{default:l(()=>[t(x($),{name:`display`,tab:x(o)(`settings.tabs.display`)},{default:l(()=>[t(Ke)]),_:1},8,[`tab`]),t(x($),{name:`agent`,tab:x(o)(`settings.tabs.agent`)},{default:l(()=>[t(Je)]),_:1},8,[`tab`]),t(x($),{name:`memory`,tab:x(o)(`settings.tabs.memory`)},{default:l(()=>[t(Xe)]),_:1},8,[`tab`]),t(x($),{name:`session`,tab:x(o)(`settings.tabs.session`)},{default:l(()=>[t(Qe)]),_:1},8,[`tab`]),t(x($),{name:`privacy`,tab:x(o)(`settings.tabs.privacy`)},{default:l(()=>[t(et)]),_:1},8,[`tab`]),t(x($),{name:`api_server`,tab:x(o)(`settings.tabs.apiServer`)},{default:l(()=>[S(`section`,at,[t(X,{label:x(o)(`settings.apiServer.enable`),hint:x(o)(`settings.apiServer.enableHint`)},{default:l(()=>[t(x(J),{value:x(n).platforms?.api_server?.enabled,"onUpdate:value":i[0]||=e=>s({enabled:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.apiServer.host`),hint:x(o)(`settings.apiServer.hostHint`)},{default:l(()=>[t(x(K),{value:x(n).platforms?.api_server?.host||``,size:`small`,class:`input-md`,"onUpdate:value":i[1]||=e=>s({host:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.apiServer.port`),hint:x(o)(`settings.apiServer.portHint`)},{default:l(()=>[t(x(G),{value:x(n).platforms?.api_server?.port,min:1024,max:65535,size:`small`,class:`input-sm`,"onUpdate:value":i[2]||=e=>e!=null&&s({port:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.apiServer.key`),hint:x(o)(`settings.apiServer.keyHint`)},{default:l(()=>[t(x(K),{value:x(n).platforms?.api_server?.key||``,type:`password`,"show-password-on":`click`,size:`small`,class:`input-md`,"onUpdate:value":i[3]||=e=>s({key:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`]),t(X,{label:x(o)(`settings.apiServer.cors`),hint:x(o)(`settings.apiServer.corsHint`)},{default:l(()=>[t(x(K),{value:x(n).platforms?.api_server?.cors_origins||``,size:`small`,class:`input-md`,"onUpdate:value":i[4]||=e=>s({cors_origins:e})},null,8,[`value`])]),_:1},8,[`label`,`hint`])])]),_:1},8,[`tab`])]),_:1})]),_:1},8,[`show`])])]))}}),[[`__scopeId`,`data-v-0025565a`]]);export{ot as default};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import{C as e,F as t,H as n,J as r,L as i,M as a,N as o,U as s,V as c,X as l,Z as u,ct as d,d as f,dt as p,j as m,y as h,z as g}from"./router-B0PaAFys.js";import{B as _,F as v,M as y,N as b,P as x,V as S,W as C,a as w,at as T,c as ee,ct as E,d as te,l as D,lt as O,n as k,o as ne,ot as A,r as re,u as ie,z as ae}from"./browser-oMT2KRlV.js";function oe(e){return e.composedPath()[0]||null}function se(e){return typeof e==`string`?e.endsWith(`px`)?Number(e.slice(0,e.length-2)):Number(e):e}function ce(e){if(e!=null)return typeof e==`number`?`${e}px`:e.endsWith(`px`)?e:`${e}px`}function j(e,t){let n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw Error(`[seemly/getMargin]:`+e+` is not a valid value.`)}return t===void 0?r:r[t]}function M(e){return e.composedPath()[0]}var N={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function le(e,t,n){if(e===`mousemoveoutside`){let e=e=>{t.contains(M(e))||n(e)};return{mousemove:e,touchstart:e}}else if(e===`clickoutside`){let e=!1,r=n=>{e=!t.contains(M(n))},i=r=>{e&&(t.contains(M(r))||n(r))};return{mousedown:r,mouseup:i,touchstart:r,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function P(e,t,n){let r=N[e],i=r.get(t);i===void 0&&r.set(t,i=new WeakMap);let a=i.get(n);return a===void 0&&i.set(n,a=le(e,t,n)),a}function ue(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=P(e,t,n);return Object.keys(i).forEach(e=>{F(e,document,i[e],r)}),!0}return!1}function de(e,t,n,r){if(e===`mousemoveoutside`||e===`clickoutside`){let i=P(e,t,n);return Object.keys(i).forEach(e=>{I(e,document,i[e],r)}),!0}return!1}function fe(){if(typeof window>`u`)return{on:()=>{},off:()=>{}};let e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function i(e,t,n){let r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function a(e,t){e[t]=Event.prototype[t]}let o=new WeakMap,s=Object.getOwnPropertyDescriptor(Event.prototype,`currentTarget`);function c(){return o.get(this)??null}function l(e,t){s!==void 0&&Object.defineProperty(e,`currentTarget`,{configurable:!0,enumerable:!0,get:t??s.get})}let u={bubble:{},capture:{}},d={};function f(){let s=function(s){let{type:d,eventPhase:f,bubbles:p}=s,m=M(s);if(f===2)return;let h=f===1?`capture`:`bubble`,g=m,_=[];for(;g===null&&(g=window),_.push(g),g!==window;)g=g.parentNode||null;let v=u.capture[d],y=u.bubble[d];if(i(s,`stopPropagation`,n),i(s,`stopImmediatePropagation`,r),l(s,c),h===`capture`){if(v===void 0)return;for(let n=_.length-1;n>=0&&!e.has(s);--n){let e=_[n],r=v.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}if(n===0&&!p&&y!==void 0){let n=y.get(e);if(n!==void 0)for(let e of n){if(t.has(s))break;e(s)}}}}else if(h===`bubble`){if(y===void 0)return;for(let n=0;n<_.length&&!e.has(s);++n){let e=_[n],r=y.get(e);if(r!==void 0){o.set(s,e);for(let e of r){if(t.has(s))break;e(s)}}}}a(s,`stopPropagation`),a(s,`stopImmediatePropagation`),l(s)};return s.displayName=`evtdUnifiedHandler`,s}function p(){let e=function(e){let{type:t,eventPhase:n}=e;if(n!==2)return;let r=d[t];r!==void 0&&r.forEach(t=>t(e))};return e.displayName=`evtdUnifiedWindowEventHandler`,e}let m=f(),h=p();function g(e,t){let n=u[e];return n[t]===void 0&&(n[t]=new Map,window.addEventListener(t,m,e===`capture`)),n[t]}function _(e){return d[e]===void 0&&(d[e]=new Set,window.addEventListener(e,h)),d[e]}function v(e,t){let n=e.get(t);return n===void 0&&e.set(t,n=new Set),n}function y(e,t,n,r){let i=u[t][n];if(i!==void 0){let t=i.get(e);if(t!==void 0&&t.has(r))return!0}return!1}function b(e,t){let n=d[e];return!!(n!==void 0&&n.has(t))}function x(e,t,n,r){let i;if(i=typeof r==`object`&&r.once===!0?a=>{S(e,t,i,r),n(a)}:n,ue(e,t,i,r))return;let a=v(g(r===!0||typeof r==`object`&&r.capture===!0?`capture`:`bubble`,e),t);if(a.has(i)||a.add(i),t===window){let t=_(e);t.has(i)||t.add(i)}}function S(e,t,n,r){if(de(e,t,n,r))return;let i=r===!0||typeof r==`object`&&r.capture===!0,a=i?`capture`:`bubble`,o=g(a,e),s=v(o,t);if(t===window&&!y(t,i?`bubble`:`capture`,e,n)&&b(e,n)){let t=d[e];t.delete(n),t.size===0&&(window.removeEventListener(e,h),d[e]=void 0)}s.has(n)&&s.delete(n),s.size===0&&o.delete(t),o.size===0&&(window.removeEventListener(e,m,a===`capture`),u[a][e]=void 0)}return{on:x,off:S}}var{on:F,off:I}=fe();function pe(t,n){return l(t,e=>{e!==void 0&&(n.value=e)}),e(()=>t.value===void 0?n.value:t.value)}var me=(typeof window>`u`?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1)&&!window.MSStream;function he(){return me}function ge(e){let t={isDeactivated:!1},r=!1;return g(()=>{if(t.isDeactivated=!1,!r){r=!0;return}e()}),n(()=>{t.isDeactivated=!0,r||=!0}),t}function L(e,t){console.error(`[vueuc/${e}]: ${t}`)}var R=[],_e=function(){return R.some(function(e){return e.activeTargets.length>0})},ve=function(){return R.some(function(e){return e.skippedTargets.length>0})},z=`ResizeObserver loop completed with undelivered notifications.`,ye=function(){var e;typeof ErrorEvent==`function`?e=new ErrorEvent(`error`,{message:z}):(e=document.createEvent(`Event`),e.initEvent(`error`,!1,!1),e.message=z),window.dispatchEvent(e)},B;(function(e){e.BORDER_BOX=`border-box`,e.CONTENT_BOX=`content-box`,e.DEVICE_PIXEL_CONTENT_BOX=`device-pixel-content-box`})(B||={});var V=function(e){return Object.freeze(e)},be=function(){function e(e,t){this.inlineSize=e,this.blockSize=t,V(this)}return e}(),xe=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,V(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),H=function(e){return e instanceof SVGElement&&`getBBox`in e},U=function(e){if(H(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,a=i.offsetWidth,o=i.offsetHeight;return!(a||o||e.getClientRects().length)},Se=function(e){if(e instanceof Element)return!0;var t=e?.ownerDocument?.defaultView;return!!(t&&e instanceof t.Element)},Ce=function(e){switch(e.tagName){case`INPUT`:if(e.type!==`image`)break;case`VIDEO`:case`AUDIO`:case`EMBED`:case`OBJECT`:case`CANVAS`:case`IFRAME`:case`IMG`:return!0}return!1},W=typeof window<`u`?window:{},G=new WeakMap,we=/auto|scroll/,Te=/^tb|vertical/,Ee=/msie|trident/i.test(W.navigator&&W.navigator.userAgent),K=function(e){return parseFloat(e||`0`)},q=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new be((n?t:e)||0,(n?e:t)||0)},De=V({devicePixelContentBoxSize:q(),borderBoxSize:q(),contentBoxSize:q(),contentRect:new xe(0,0,0,0)}),J=function(e,t){if(t===void 0&&(t=!1),G.has(e)&&!t)return G.get(e);if(U(e))return G.set(e,De),De;var n=getComputedStyle(e),r=H(e)&&e.ownerSVGElement&&e.getBBox(),i=!Ee&&n.boxSizing===`border-box`,a=Te.test(n.writingMode||``),o=!r&&we.test(n.overflowY||``),s=!r&&we.test(n.overflowX||``),c=r?0:K(n.paddingTop),l=r?0:K(n.paddingRight),u=r?0:K(n.paddingBottom),d=r?0:K(n.paddingLeft),f=r?0:K(n.borderTopWidth),p=r?0:K(n.borderRightWidth),m=r?0:K(n.borderBottomWidth),h=r?0:K(n.borderLeftWidth),g=d+l,_=c+u,v=h+p,y=f+m,b=s?e.offsetHeight-y-e.clientHeight:0,x=o?e.offsetWidth-v-e.clientWidth:0,S=i?g+v:0,C=i?_+y:0,w=r?r.width:K(n.width)-S-x,T=r?r.height:K(n.height)-C-b,ee=w+g+x+v,E=T+_+b+y,te=V({devicePixelContentBoxSize:q(Math.round(w*devicePixelRatio),Math.round(T*devicePixelRatio),a),borderBoxSize:q(ee,E,a),contentBoxSize:q(w,T,a),contentRect:new xe(d,c,w,T)});return G.set(e,te),te},Y=function(e,t,n){var r=J(e,n),i=r.borderBoxSize,a=r.contentBoxSize,o=r.devicePixelContentBoxSize;switch(t){case B.DEVICE_PIXEL_CONTENT_BOX:return o;case B.BORDER_BOX:return i;default:return a}},Oe=function(){function e(e){var t=J(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=V([t.borderBoxSize]),this.contentBoxSize=V([t.contentBoxSize]),this.devicePixelContentBoxSize=V([t.devicePixelContentBoxSize])}return e}(),ke=function(e){if(U(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},Ae=function(){var e=1/0,t=[];R.forEach(function(n){if(n.activeTargets.length!==0){var r=[];n.activeTargets.forEach(function(t){var n=new Oe(t.target),i=ke(t.target);r.push(n),t.lastReportedSize=Y(t.target,t.observedBox),i<e&&(e=i)}),t.push(function(){n.callback.call(n.observer,r,n.observer)}),n.activeTargets.splice(0,n.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var i=r[n];i()}return e},je=function(e){R.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(n){n.isActive()&&(ke(n.target)>e?t.activeTargets.push(n):t.skippedTargets.push(n))})})},Me=function(){var e=0;for(je(e);_e();)e=Ae(),je(e);return ve()&&ye(),e>0},X,Z=[],Ne=function(){return Z.splice(0).forEach(function(e){return e()})},Pe=function(e){if(!X){var t=0,n=document.createTextNode(``);new MutationObserver(function(){return Ne()}).observe(n,{characterData:!0}),X=function(){n.textContent=`${t?t--:t++}`}}Z.push(e),X()},Fe=function(e){Pe(function(){requestAnimationFrame(e)})},Ie=0,Le=function(){return!!Ie},Re=250,ze={attributes:!0,characterData:!0,childList:!0,subtree:!0},Be=[`resize`,`load`,`transitionend`,`animationend`,`animationstart`,`animationiteration`,`keyup`,`keydown`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`blur`,`focus`],Ve=function(e){return e===void 0&&(e=0),Date.now()+e},He=!1,Ue=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(e===void 0&&(e=Re),!He){He=!0;var n=Ve(e);Fe(function(){var r=!1;try{r=Me()}finally{if(He=!1,e=n-Ve(),!Le())return;r?t.run(1e3):e>0?t.run(e):t.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,ze)};document.body?t():W.addEventListener(`DOMContentLoaded`,t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Be.forEach(function(t){return W.addEventListener(t,e.listener,!0)}))},e.prototype.stop=function(){var e=this;this.stopped||=(this.observer&&this.observer.disconnect(),Be.forEach(function(t){return W.removeEventListener(t,e.listener,!0)}),!0)},e}()),We=function(e){!Ie&&e>0&&Ue.start(),Ie+=e,!Ie&&Ue.stop()},Ge=function(e){return!H(e)&&!Ce(e)&&getComputedStyle(e).display===`inline`},Ke=function(){function e(e,t){this.target=e,this.observedBox=t||B.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e=Y(this.target,this.observedBox,!0);return Ge(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},e}(),qe=function(){function e(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t}return e}(),Je=new WeakMap,Ye=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},Xe=function(){function e(){}return e.connect=function(e,t){var n=new qe(e,t);Je.set(e,n)},e.observe=function(e,t,n){var r=Je.get(e),i=r.observationTargets.length===0;Ye(r.observationTargets,t)<0&&(i&&R.push(r),r.observationTargets.push(new Ke(t,n&&n.box)),We(1),Ue.schedule())},e.unobserve=function(e,t){var n=Je.get(e),r=Ye(n.observationTargets,t),i=n.observationTargets.length===1;r>=0&&(i&&R.splice(R.indexOf(n),1),n.observationTargets.splice(r,1),We(-1))},e.disconnect=function(e){var t=this,n=Je.get(e);n.observationTargets.slice().forEach(function(n){return t.unobserve(e,n.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e}(),Ze=function(){function e(e){if(arguments.length===0)throw TypeError(`Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.`);if(typeof e!=`function`)throw TypeError(`Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.`);Xe.connect(this,e)}return e.prototype.observe=function(e,t){if(arguments.length===0)throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!Se(e))throw TypeError(`Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element`);Xe.observe(this,e,t)},e.prototype.unobserve=function(e){if(arguments.length===0)throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.`);if(!Se(e))throw TypeError(`Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element`);Xe.unobserve(this,e)},e.prototype.disconnect=function(){Xe.disconnect(this)},e.toString=function(){return`function ResizeObserver () { [polyfill code] }`},e}(),Qe=new class{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<`u`&&window.ResizeObserver||Ze)(this.handleResize),this.elHandlersMap=new Map}handleResize(e){for(let t of e){let e=this.elHandlersMap.get(t.target);e!==void 0&&e(t)}}registerHandler(e,t){this.elHandlersMap.set(e,t),this.observer.observe(e)}unregisterHandler(e){this.elHandlersMap.has(e)&&(this.elHandlersMap.delete(e),this.observer.unobserve(e))}},$e=m({name:`ResizeObserver`,props:{onResize:Function},setup(e){let t=!1,n=a().proxy;function r(t){let{onResize:n}=e;n!==void 0&&n(t)}s(()=>{let e=n.$el;if(e===void 0){L(`resize-observer`,`$el does not exist.`);return}if(e.nextElementSibling!==e.nextSibling&&e.nodeType===3&&e.nodeValue!==``){L(`resize-observer`,`$el can not be observed (it may be a text node).`);return}e.nextElementSibling!==null&&(Qe.registerHandler(e.nextElementSibling,r),t=!0)}),c(()=>{t&&Qe.unregisterHandler(n.$el.nextElementSibling)})},render(){return r(this.$slots,`default`)}});function et(e){let{left:t,right:n,top:r,bottom:i}=j(e);return`${r} ${t} ${i} ${n}`}var tt=m({render(){var e;return(e=this.$slots).default?.call(e)}}),nt={name:`en-US`,global:{undo:`Undo`,redo:`Redo`,confirm:`Confirm`,clear:`Clear`},Popconfirm:{positiveText:`Confirm`,negativeText:`Cancel`},Cascader:{placeholder:`Please Select`,loading:`Loading`,loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`},DatePicker:{yearFormat:`yyyy`,monthFormat:`MMM`,dayFormat:`eeeeee`,yearTypeFormat:`yyyy`,monthTypeFormat:`yyyy-MM`,dateFormat:`yyyy-MM-dd`,dateTimeFormat:`yyyy-MM-dd HH:mm:ss`,quarterFormat:`yyyy-qqq`,weekFormat:`YYYY-w`,clear:`Clear`,now:`Now`,confirm:`Confirm`,selectTime:`Select Time`,selectDate:`Select Date`,datePlaceholder:`Select Date`,datetimePlaceholder:`Select Date and Time`,monthPlaceholder:`Select Month`,yearPlaceholder:`Select Year`,quarterPlaceholder:`Select Quarter`,weekPlaceholder:`Select Week`,startDatePlaceholder:`Start Date`,endDatePlaceholder:`End Date`,startDatetimePlaceholder:`Start Date and Time`,endDatetimePlaceholder:`End Date and Time`,startMonthPlaceholder:`Start Month`,endMonthPlaceholder:`End Month`,monthBeforeYear:!0,firstDayOfWeek:6,today:`Today`},DataTable:{checkTableAll:`Select all in the table`,uncheckTableAll:`Unselect all in the table`,confirm:`Confirm`,clear:`Clear`},LegacyTransfer:{sourceTitle:`Source`,targetTitle:`Target`},Transfer:{selectAll:`Select all`,unselectAll:`Unselect all`,clearAll:`Clear`,total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:`No Data`},Select:{placeholder:`Please Select`},TimePicker:{placeholder:`Select Time`,positiveText:`OK`,negativeText:`Cancel`,now:`Now`,clear:`Clear`},Pagination:{goto:`Goto`,selectionSuffix:`page`},DynamicTags:{add:`Add`},Log:{loading:`Loading`},Input:{placeholder:`Please Input`},InputNumber:{placeholder:`Please Input`},DynamicInput:{create:`Create`},ThemeEditor:{title:`Theme Editor`,clearAllVars:`Clear All Variables`,clearSearch:`Clear Search`,filterCompName:`Filter Component Name`,filterVarName:`Filter Variable Name`,import:`Import`,export:`Export`,restore:`Reset to Default`},Image:{tipPrevious:`Previous picture (←)`,tipNext:`Next picture (→)`,tipCounterclockwise:`Counterclockwise`,tipClockwise:`Clockwise`,tipZoomOut:`Zoom out`,tipZoomIn:`Zoom in`,tipDownload:`Download`,tipClose:`Close (Esc)`,tipOriginalSize:`Zoom to original size`},Heatmap:{less:`less`,more:`more`,monthFormat:`MMM`,weekdayFormat:`eee`}};function rt(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function Q(e){return(t,n)=>{let r=n?.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;i=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;i=e.values[r]||e.values[t]}let a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}function $(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;let o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?at(s,e=>e.test(o)):it(s,e=>e.test(o)),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;let u=t.slice(o.length);return{value:l,rest:u}}}function it(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function at(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function ot(e){return(t,n={})=>{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;let s=t.slice(i.length);return{value:o,rest:s}}}var st={lessThanXSeconds:{one:`less than a second`,other:`less than {{count}} seconds`},xSeconds:{one:`1 second`,other:`{{count}} seconds`},halfAMinute:`half a minute`,lessThanXMinutes:{one:`less than a minute`,other:`less than {{count}} minutes`},xMinutes:{one:`1 minute`,other:`{{count}} minutes`},aboutXHours:{one:`about 1 hour`,other:`about {{count}} hours`},xHours:{one:`1 hour`,other:`{{count}} hours`},xDays:{one:`1 day`,other:`{{count}} days`},aboutXWeeks:{one:`about 1 week`,other:`about {{count}} weeks`},xWeeks:{one:`1 week`,other:`{{count}} weeks`},aboutXMonths:{one:`about 1 month`,other:`about {{count}} months`},xMonths:{one:`1 month`,other:`{{count}} months`},aboutXYears:{one:`about 1 year`,other:`about {{count}} years`},xYears:{one:`1 year`,other:`{{count}} years`},overXYears:{one:`over 1 year`,other:`over {{count}} years`},almostXYears:{one:`almost 1 year`,other:`almost {{count}} years`}},ct=(e,t,n)=>{let r,i=st[e];return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?`in `+r:r+` ago`:r},lt={lastWeek:`'last' eeee 'at' p`,yesterday:`'yesterday at' p`,today:`'today at' p`,tomorrow:`'tomorrow at' p`,nextWeek:`eeee 'at' p`,other:`P`},ut=(e,t,n,r)=>lt[e],dt={ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+`st`;case 2:return n+`nd`;case 3:return n+`rd`}return n+`th`},era:Q({values:{narrow:[`B`,`A`],abbreviated:[`BC`,`AD`],wide:[`Before Christ`,`Anno Domini`]},defaultWidth:`wide`}),quarter:Q({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`Q1`,`Q2`,`Q3`,`Q4`],wide:[`1st quarter`,`2nd quarter`,`3rd quarter`,`4th quarter`]},defaultWidth:`wide`,argumentCallback:e=>e-1}),month:Q({values:{narrow:[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`],abbreviated:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],wide:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]},defaultWidth:`wide`}),day:Q({values:{narrow:[`S`,`M`,`T`,`W`,`T`,`F`,`S`],short:[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],abbreviated:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],wide:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`]},defaultWidth:`wide`}),dayPeriod:Q({values:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`a`,pm:`p`,midnight:`mi`,noon:`n`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},abbreviated:{am:`AM`,pm:`PM`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`},wide:{am:`a.m.`,pm:`p.m.`,midnight:`midnight`,noon:`noon`,morning:`in the morning`,afternoon:`in the afternoon`,evening:`in the evening`,night:`at night`}},defaultFormattingWidth:`wide`})},ft={ordinalNumber:ot({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:$({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:`any`}),quarter:$({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:e=>e+1}),month:$({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:`any`}),day:$({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:`any`}),dayPeriod:$({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:`any`})},pt={name:`en-US`,locale:{code:`en-US`,formatDistance:ct,formatLong:{date:rt({formats:{full:`EEEE, MMMM do, y`,long:`MMMM do, y`,medium:`MMM d, y`,short:`MM/dd/yyyy`},defaultWidth:`full`}),time:rt({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:rt({formats:{full:`{{date}} 'at' {{time}}`,long:`{{date}} 'at' {{time}}`,medium:`{{date}}, {{time}}`,short:`{{date}}, {{time}}`},defaultWidth:`full`})},formatRelative:ut,localize:dt,match:ft,options:{weekStartsOn:0,firstWeekContainsDate:1}}},mt=`[object Symbol]`;function ht(e){return typeof e==`symbol`||b(e)&&x(e)==mt}function gt(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var _t=1/0,vt=v?v.prototype:void 0,yt=vt?vt.toString:void 0;function bt(e){if(typeof e==`string`)return e;if(y(e))return gt(e,bt)+``;if(ht(e))return yt?yt.call(e):``;var t=e+``;return t==`0`&&1/e==-_t?`-0`:t}function xt(e){return e==null?``:bt(e)}function St(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function Ct(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:St(e,t,n)}var wt=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function Tt(e){return wt.test(e)}function Et(e){return e.split(``)}var Dt=`\\ud800-\\udfff`,Ot=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,kt=`\\ufe0e\\ufe0f`,At=`[`+Dt+`]`,jt=`[`+Ot+`]`,Mt=`\\ud83c[\\udffb-\\udfff]`,Nt=`(?:`+jt+`|`+Mt+`)`,Pt=`[^`+Dt+`]`,Ft=`(?:\\ud83c[\\udde6-\\uddff]){2}`,It=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Lt=`\\u200d`,Rt=Nt+`?`,zt=`[`+kt+`]?`,Bt=`(?:`+Lt+`(?:`+[Pt,Ft,It].join(`|`)+`)`+zt+Rt+`)*`,Vt=zt+Rt+Bt,Ht=`(?:`+[Pt+jt+`?`,jt,Ft,It,At].join(`|`)+`)`,Ut=RegExp(Mt+`(?=`+Mt+`)|`+Ht+Vt,`g`);function Wt(e){return e.match(Ut)||[]}function Gt(e){return Tt(e)?Wt(e):Et(e)}function Kt(e){return function(t){t=xt(t);var n=Tt(t)?Gt(t):void 0,r=n?n[0]:t.charAt(0),i=n?Ct(n,1).join(``):t.slice(1);return r[e]()+i}}var qt=Kt(`toUpperCase`);function Jt(n){let{mergedLocaleRef:r,mergedDateLocaleRef:i}=t(S,null)||{},a=e(()=>r?.value?.[n]??nt[n]);return{dateLocaleRef:e(()=>i?.value??pt),localeRef:a}}var Yt=A(`base-icon`,`
|
|
2
|
-
height: 1em;
|
|
3
|
-
width: 1em;
|
|
4
|
-
line-height: 1em;
|
|
5
|
-
text-align: center;
|
|
6
|
-
display: inline-block;
|
|
7
|
-
position: relative;
|
|
8
|
-
fill: currentColor;
|
|
9
|
-
`,[T(`svg`,`
|
|
10
|
-
height: 1em;
|
|
11
|
-
width: 1em;
|
|
12
|
-
`)]),Xt=m({name:`BaseIcon`,props:{role:String,ariaLabel:String,ariaDisabled:{type:Boolean,default:void 0},ariaHidden:{type:Boolean,default:void 0},clsPrefix:{type:String,required:!0},onClick:Function,onMousedown:Function,onMouseup:Function},setup(e){D(`-base-icon`,Yt,p(e,`clsPrefix`))},render(){return o(`i`,{class:`${this.clsPrefix}-base-icon`,onClick:this.onClick,onMousedown:this.onMousedown,onMouseup:this.onMouseup,role:this.role,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,"aria-disabled":this.ariaDisabled},this.$slots)}});function Zt(e,n){let r=m({render(){return n()}});return m({name:qt(e),setup(){let n=t(S,null)?.mergedIconsRef;return()=>{let t=n?.value?.[e];return t?t():o(r,null)}}})}var Qt=m({name:`ChevronDown`,render(){return o(`svg`,{viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},o(`path`,{d:`M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z`,fill:`currentColor`}))}}),$t=Zt(`clear`,()=>o(`svg`,{viewBox:`0 0 16 16`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},o(`g`,{stroke:`none`,"stroke-width":`1`,fill:`none`,"fill-rule":`evenodd`},o(`g`,{fill:`currentColor`,"fill-rule":`nonzero`},o(`path`,{d:`M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z`}))))),en=A(`base-clear`,`
|
|
13
|
-
flex-shrink: 0;
|
|
14
|
-
height: 1em;
|
|
15
|
-
width: 1em;
|
|
16
|
-
position: relative;
|
|
17
|
-
`,[T(`>`,[E(`clear`,`
|
|
18
|
-
font-size: var(--n-clear-size);
|
|
19
|
-
height: 1em;
|
|
20
|
-
width: 1em;
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
color: var(--n-clear-color);
|
|
23
|
-
transition: color .3s var(--n-bezier);
|
|
24
|
-
display: flex;
|
|
25
|
-
`,[T(`&:hover`,`
|
|
26
|
-
color: var(--n-clear-color-hover)!important;
|
|
27
|
-
`),T(`&:active`,`
|
|
28
|
-
color: var(--n-clear-color-pressed)!important;
|
|
29
|
-
`)]),E(`placeholder`,`
|
|
30
|
-
display: flex;
|
|
31
|
-
`),E(`clear, placeholder`,`
|
|
32
|
-
position: absolute;
|
|
33
|
-
left: 50%;
|
|
34
|
-
top: 50%;
|
|
35
|
-
transform: translateX(-50%) translateY(-50%);
|
|
36
|
-
`,[w({originalTransform:`translateX(-50%) translateY(-50%)`,left:`50%`,top:`50%`})])])]),tn=m({name:`BaseClear`,props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return D(`-base-clear`,en,p(e,`clsPrefix`)),{handleMouseDown(e){e.preventDefault()}}},render(){let{clsPrefix:e}=this;return o(`div`,{class:`${e}-base-clear`},o(ne,null,{default:()=>{var t;return this.show?o(`div`,{key:`dismiss`,class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},C(this.$slots.icon,()=>[o(Xt,{clsPrefix:e},{default:()=>o($t,null)})])):o(`div`,{key:`icon`,class:`${e}-base-clear__placeholder`},(t=this.$slots).placeholder?.call(t))}}))}}),{cubicBezierEaseInOut:nn}=ie;function rn({name:e=`fade-in`,enterDuration:t=`0.2s`,leaveDuration:n=`0.2s`,enterCubicBezier:r=nn,leaveCubicBezier:i=nn}={}){return[T(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),T(`&.${e}-transition-leave-active`,{transition:`all ${n} ${i}!important`}),T(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),T(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}var an={railInsetHorizontalBottom:`auto 2px 4px 2px`,railInsetHorizontalTop:`4px 2px auto 2px`,railInsetVerticalRight:`2px 4px 2px auto`,railInsetVerticalLeft:`2px auto 2px 4px`,railColor:`transparent`};function on(e){let{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:i,scrollbarBorderRadius:a}=e;return Object.assign(Object.assign({},an),{height:r,width:i,borderRadius:a,color:t,colorHover:n})}var sn={name:`Scrollbar`,common:k,self:on},cn=A(`scrollbar`,`
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
position: relative;
|
|
39
|
-
z-index: auto;
|
|
40
|
-
height: 100%;
|
|
41
|
-
width: 100%;
|
|
42
|
-
`,[T(`>`,[A(`scrollbar-container`,`
|
|
43
|
-
width: 100%;
|
|
44
|
-
overflow: scroll;
|
|
45
|
-
height: 100%;
|
|
46
|
-
min-height: inherit;
|
|
47
|
-
max-height: inherit;
|
|
48
|
-
scrollbar-width: none;
|
|
49
|
-
`,[T(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
50
|
-
width: 0;
|
|
51
|
-
height: 0;
|
|
52
|
-
display: none;
|
|
53
|
-
`),T(`>`,[A(`scrollbar-content`,`
|
|
54
|
-
box-sizing: border-box;
|
|
55
|
-
min-width: 100%;
|
|
56
|
-
`)])])]),T(`>, +`,[A(`scrollbar-rail`,`
|
|
57
|
-
position: absolute;
|
|
58
|
-
pointer-events: none;
|
|
59
|
-
user-select: none;
|
|
60
|
-
background: var(--n-scrollbar-rail-color);
|
|
61
|
-
-webkit-user-select: none;
|
|
62
|
-
`,[O(`horizontal`,`
|
|
63
|
-
height: var(--n-scrollbar-height);
|
|
64
|
-
`,[T(`>`,[E(`scrollbar`,`
|
|
65
|
-
height: var(--n-scrollbar-height);
|
|
66
|
-
border-radius: var(--n-scrollbar-border-radius);
|
|
67
|
-
right: 0;
|
|
68
|
-
`)])]),O(`horizontal--top`,`
|
|
69
|
-
top: var(--n-scrollbar-rail-top-horizontal-top);
|
|
70
|
-
right: var(--n-scrollbar-rail-right-horizontal-top);
|
|
71
|
-
bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
|
|
72
|
-
left: var(--n-scrollbar-rail-left-horizontal-top);
|
|
73
|
-
`),O(`horizontal--bottom`,`
|
|
74
|
-
top: var(--n-scrollbar-rail-top-horizontal-bottom);
|
|
75
|
-
right: var(--n-scrollbar-rail-right-horizontal-bottom);
|
|
76
|
-
bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
|
|
77
|
-
left: var(--n-scrollbar-rail-left-horizontal-bottom);
|
|
78
|
-
`),O(`vertical`,`
|
|
79
|
-
width: var(--n-scrollbar-width);
|
|
80
|
-
`,[T(`>`,[E(`scrollbar`,`
|
|
81
|
-
width: var(--n-scrollbar-width);
|
|
82
|
-
border-radius: var(--n-scrollbar-border-radius);
|
|
83
|
-
bottom: 0;
|
|
84
|
-
`)])]),O(`vertical--left`,`
|
|
85
|
-
top: var(--n-scrollbar-rail-top-vertical-left);
|
|
86
|
-
right: var(--n-scrollbar-rail-right-vertical-left);
|
|
87
|
-
bottom: var(--n-scrollbar-rail-bottom-vertical-left);
|
|
88
|
-
left: var(--n-scrollbar-rail-left-vertical-left);
|
|
89
|
-
`),O(`vertical--right`,`
|
|
90
|
-
top: var(--n-scrollbar-rail-top-vertical-right);
|
|
91
|
-
right: var(--n-scrollbar-rail-right-vertical-right);
|
|
92
|
-
bottom: var(--n-scrollbar-rail-bottom-vertical-right);
|
|
93
|
-
left: var(--n-scrollbar-rail-left-vertical-right);
|
|
94
|
-
`),O(`disabled`,[T(`>`,[E(`scrollbar`,`pointer-events: none;`)])]),T(`>`,[E(`scrollbar`,`
|
|
95
|
-
z-index: 1;
|
|
96
|
-
position: absolute;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
pointer-events: all;
|
|
99
|
-
background-color: var(--n-scrollbar-color);
|
|
100
|
-
transition: background-color .2s var(--n-scrollbar-bezier);
|
|
101
|
-
`,[rn(),T(`&:hover`,`background-color: var(--n-scrollbar-color-hover);`)])])])])]),ln=m({name:`Scrollbar`,props:Object.assign(Object.assign({},ee.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:`hover`},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,internalExposeWidthCssVar:Boolean,yPlacement:{type:String,default:`right`},xPlacement:{type:String,default:`bottom`}}),inheritAttrs:!1,setup(t){let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=_(t),a=te(`Scrollbar`,i,n),o=d(null),l=d(null),f=d(null),p=d(null),m=d(null),h=d(null),g=d(null),v=d(null),y=d(null),b=d(null),x=d(null),S=d(0),C=d(0),w=d(!1),T=d(!1),E=!1,D=!1,O,k,ne=0,A=0,re=0,ie=0,ce=he(),M=ee(`Scrollbar`,`-scrollbar`,cn,sn,t,n),N=e(()=>{let{value:e}=v,{value:t}=h,{value:n}=b;return e===null||t===null||n===null?0:Math.min(e,n*e/t+se(M.value.self.width)*1.5)}),le=e(()=>`${N.value}px`),P=e(()=>{let{value:e}=y,{value:t}=g,{value:n}=x;return e===null||t===null||n===null?0:n*e/t+se(M.value.self.height)*1.5}),ue=e(()=>`${P.value}px`),de=e(()=>{let{value:e}=v,{value:t}=S,{value:n}=h,{value:r}=b;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-N.value):0}}),fe=e(()=>`${de.value}px`),pe=e(()=>{let{value:e}=y,{value:t}=C,{value:n}=g,{value:r}=x;if(e===null||n===null||r===null)return 0;{let i=n-e;return i?t/i*(r-P.value):0}}),me=e(()=>`${pe.value}px`),L=e(()=>{let{value:e}=v,{value:t}=h;return e!==null&&t!==null&&t>e}),R=e(()=>{let{value:e}=y,{value:t}=g;return e!==null&&t!==null&&t>e}),_e=e(()=>{let{trigger:e}=t;return e===`none`||w.value}),ve=e(()=>{let{trigger:e}=t;return e===`none`||T.value}),z=e(()=>{let{container:e}=t;return e?e():l.value}),ye=e(()=>{let{content:e}=t;return e?e():f.value}),B=(e,n)=>{if(!t.scrollable)return;if(typeof e==`number`){U(e,n??0,0,!1,`auto`);return}let{left:r,top:i,index:a,elSize:o,position:s,behavior:c,el:l,debounce:u=!0}=e;(r!==void 0||i!==void 0)&&U(r??0,i??0,0,!1,c),l===void 0?a!==void 0&&o!==void 0?U(0,a*o,o,u,c):s===`bottom`?U(0,2**53-1,0,!1,c):s===`top`&&U(0,0,0,!1,c):U(0,l.offsetTop,l.offsetHeight,u,c)},V=ge(()=>{t.container||B({top:S.value,left:C.value})}),be=()=>{V.isDeactivated||Y()},xe=e=>{if(V.isDeactivated)return;let{onResize:n}=t;n&&n(e),Y()},H=(e,n)=>{if(!t.scrollable)return;let{value:r}=z;r&&(typeof e==`object`?r.scrollBy(e):r.scrollBy(e,n||0))};function U(e,t,n,r,i){let{value:a}=z;if(a){if(r){let{scrollTop:r,offsetHeight:o}=a;if(t>r){t+n<=r+o||a.scrollTo({left:e,top:t+n-o,behavior:i});return}}a.scrollTo({left:e,top:t,behavior:i})}}function Se(){Te(),Ee(),Y()}function Ce(){W()}function W(){G(),we()}function G(){k!==void 0&&window.clearTimeout(k),k=window.setTimeout(()=>{T.value=!1},t.duration)}function we(){O!==void 0&&window.clearTimeout(O),O=window.setTimeout(()=>{w.value=!1},t.duration)}function Te(){O!==void 0&&window.clearTimeout(O),w.value=!0}function Ee(){k!==void 0&&window.clearTimeout(k),T.value=!0}function K(e){let{onScroll:n}=t;n&&n(e),q()}function q(){let{value:e}=z;e&&(S.value=e.scrollTop,C.value=e.scrollLeft*(a?.value?-1:1))}function De(){let{value:e}=ye;e&&(h.value=e.offsetHeight,g.value=e.offsetWidth);let{value:t}=z;t&&(v.value=t.offsetHeight,y.value=t.offsetWidth);let{value:n}=m,{value:r}=p;n&&(x.value=n.offsetWidth),r&&(b.value=r.offsetHeight)}function J(){let{value:e}=z;e&&(S.value=e.scrollTop,C.value=e.scrollLeft*(a?.value?-1:1),v.value=e.offsetHeight,y.value=e.offsetWidth,h.value=e.scrollHeight,g.value=e.scrollWidth);let{value:t}=m,{value:n}=p;t&&(x.value=t.offsetWidth),n&&(b.value=n.offsetHeight)}function Y(){t.scrollable&&(t.useUnifiedContainer?J():(De(),q()))}function Oe(e){return!o.value?.contains(oe(e))}function ke(e){e.preventDefault(),e.stopPropagation(),D=!0,F(`mousemove`,window,Ae,!0),F(`mouseup`,window,je,!0),A=C.value,re=a?.value?window.innerWidth-e.clientX:e.clientX}function Ae(e){if(!D)return;O!==void 0&&window.clearTimeout(O),k!==void 0&&window.clearTimeout(k);let{value:n}=y,{value:r}=g,{value:i}=P;if(n===null||r===null)return;let o=(a?.value?window.innerWidth-e.clientX-re:e.clientX-re)*(r-n)/(n-i),s=r-n,c=A+o;c=Math.min(s,c),c=Math.max(c,0);let{value:l}=z;if(l){l.scrollLeft=c*(a?.value?-1:1);let{internalOnUpdateScrollLeft:e}=t;e&&e(c)}}function je(e){e.preventDefault(),e.stopPropagation(),I(`mousemove`,window,Ae,!0),I(`mouseup`,window,je,!0),D=!1,Y(),Oe(e)&&W()}function Me(e){e.preventDefault(),e.stopPropagation(),E=!0,F(`mousemove`,window,X,!0),F(`mouseup`,window,Z,!0),ne=S.value,ie=e.clientY}function X(e){if(!E)return;O!==void 0&&window.clearTimeout(O),k!==void 0&&window.clearTimeout(k);let{value:t}=v,{value:n}=h,{value:r}=N;if(t===null||n===null)return;let i=(e.clientY-ie)*(n-t)/(t-r),a=n-t,o=ne+i;o=Math.min(a,o),o=Math.max(o,0);let{value:s}=z;s&&(s.scrollTop=o)}function Z(e){e.preventDefault(),e.stopPropagation(),I(`mousemove`,window,X,!0),I(`mouseup`,window,Z,!0),E=!1,Y(),Oe(e)&&W()}u(()=>{let{value:e}=R,{value:t}=L,{value:r}=n,{value:i}=m,{value:a}=p;i&&(e?i.classList.remove(`${r}-scrollbar-rail--disabled`):i.classList.add(`${r}-scrollbar-rail--disabled`)),a&&(t?a.classList.remove(`${r}-scrollbar-rail--disabled`):a.classList.add(`${r}-scrollbar-rail--disabled`))}),s(()=>{t.container||Y()}),c(()=>{O!==void 0&&window.clearTimeout(O),k!==void 0&&window.clearTimeout(k),I(`mousemove`,window,X,!0),I(`mouseup`,window,Z,!0)});let Ne=e(()=>{let{common:{cubicBezierEaseInOut:e},self:{color:t,colorHover:n,height:r,width:i,borderRadius:o,railInsetHorizontalTop:s,railInsetHorizontalBottom:c,railInsetVerticalRight:l,railInsetVerticalLeft:u,railColor:d}}=M.value,{top:f,right:p,bottom:m,left:h}=j(s),{top:g,right:_,bottom:v,left:y}=j(c),{top:b,right:x,bottom:S,left:C}=j(a?.value?et(l):l),{top:w,right:T,bottom:ee,left:E}=j(a?.value?et(u):u);return{"--n-scrollbar-bezier":e,"--n-scrollbar-color":t,"--n-scrollbar-color-hover":n,"--n-scrollbar-border-radius":o,"--n-scrollbar-width":i,"--n-scrollbar-height":r,"--n-scrollbar-rail-top-horizontal-top":f,"--n-scrollbar-rail-right-horizontal-top":p,"--n-scrollbar-rail-bottom-horizontal-top":m,"--n-scrollbar-rail-left-horizontal-top":h,"--n-scrollbar-rail-top-horizontal-bottom":g,"--n-scrollbar-rail-right-horizontal-bottom":_,"--n-scrollbar-rail-bottom-horizontal-bottom":v,"--n-scrollbar-rail-left-horizontal-bottom":y,"--n-scrollbar-rail-top-vertical-right":b,"--n-scrollbar-rail-right-vertical-right":x,"--n-scrollbar-rail-bottom-vertical-right":S,"--n-scrollbar-rail-left-vertical-right":C,"--n-scrollbar-rail-top-vertical-left":w,"--n-scrollbar-rail-right-vertical-left":T,"--n-scrollbar-rail-bottom-vertical-left":ee,"--n-scrollbar-rail-left-vertical-left":E,"--n-scrollbar-rail-color":d}}),Pe=r?ae(`scrollbar`,void 0,Ne,t):void 0;return Object.assign(Object.assign({},{scrollTo:B,scrollBy:H,sync:Y,syncUnifiedContainer:J,handleMouseEnterWrapper:Se,handleMouseLeaveWrapper:Ce}),{mergedClsPrefix:n,rtlEnabled:a,containerScrollTop:S,wrapperRef:o,containerRef:l,contentRef:f,yRailRef:p,xRailRef:m,needYBar:L,needXBar:R,yBarSizePx:le,xBarSizePx:ue,yBarTopPx:fe,xBarLeftPx:me,isShowXBar:_e,isShowYBar:ve,isIos:ce,handleScroll:K,handleContentResize:be,handleContainerResize:xe,handleYScrollMouseDown:Me,handleXScrollMouseDown:ke,containerWidth:y,cssVars:r?void 0:Ne,themeClass:Pe?.themeClass,onRender:Pe?.onRender})},render(){let{$slots:e,mergedClsPrefix:t,triggerDisplayManually:n,rtlEnabled:r,internalHoistYRail:a,yPlacement:s,xPlacement:c,xScrollable:l}=this;if(!this.scrollable)return e.default?.call(e);let u=this.trigger===`none`,d=(e,n)=>o(`div`,{ref:`yRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--vertical`,`${t}-scrollbar-rail--vertical--${s}`,e],"data-scrollbar-rail":!0,style:[n||``,this.verticalRailStyle],"aria-hidden":!0},o(u?tt:f,u?null:{name:`fade-in-transition`},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?o(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),p=()=>{var s;return(s=this.onRender)==null||s.call(this),o(`div`,i(this.$attrs,{role:`none`,ref:`wrapperRef`,class:[`${t}-scrollbar`,this.themeClass,r&&`${t}-scrollbar--rtl`],style:this.cssVars,onMouseenter:n?void 0:this.handleMouseEnterWrapper,onMouseleave:n?void 0:this.handleMouseLeaveWrapper}),[this.container?e.default?.call(e):o(`div`,{role:`none`,ref:`containerRef`,class:[`${t}-scrollbar-container`,this.containerClass],style:[this.containerStyle,this.internalExposeWidthCssVar?{"--n-scrollbar-current-width":ce(this.containerWidth)}:void 0],onScroll:this.handleScroll,onWheel:this.onWheel},o($e,{onResize:this.handleContentResize},{default:()=>o(`div`,{ref:`contentRef`,role:`none`,style:[{width:this.xScrollable?`fit-content`:null},this.contentStyle],class:[`${t}-scrollbar-content`,this.contentClass]},e)})),a?null:d(void 0,void 0),l&&o(`div`,{ref:`xRailRef`,class:[`${t}-scrollbar-rail`,`${t}-scrollbar-rail--horizontal`,`${t}-scrollbar-rail--horizontal--${c}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},o(u?tt:f,u?null:{name:`fade-in-transition`},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?o(`div`,{class:`${t}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:r?this.xBarLeftPx:void 0,left:r?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},m=this.container?p():o($e,{onResize:this.handleContainerResize},{default:p});return a?o(h,null,m,d(this.themeClass,this.cssVars)):m}}),un=ln,dn=m({name:`InternalSelectionSuffix`,props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{let{clsPrefix:n}=e;return o(re,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?o(tn,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>o(Xt,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>C(t.default,()=>[o(Qt,null)])})}):null})}}});export{oe as S,I as _,rn as a,j as b,Xt as c,gt as d,ht as f,pe as g,Qe as h,sn as i,Jt as l,$e as m,ln as n,tn as o,tt as p,un as r,Zt as s,dn as t,xt as u,F as v,ce as x,se as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,C as t,D as n,E as r,G as i,Q as a,U as o,ct as s,gt as c,ht as l,j as u,k as d,pt as f,q as p,w as m,y as h}from"./router-B0PaAFys.js";import{n as ee}from"./pinia-D41F8A9y.js";import{r as g,t as _}from"./_plugin-vue_export-helper-DkLSTLBi.js";import{t as v}from"./Button-DBOPt_s1.js";import{r as y}from"./sessions-Dsqr5aLA.js";var b=ee(`usage`,()=>{let e=s([]),n=s(!1);async function r(){n.value=!0;try{e.value=await y()}catch(e){console.error(`Failed to load sessions for usage:`,e)}finally{n.value=!1}}let i=t(()=>e.value.reduce((e,t)=>e+(t.input_tokens||0),0)),a=t(()=>e.value.reduce((e,t)=>e+(t.output_tokens||0),0)),o=t(()=>i.value+a.value),c=t(()=>e.value.length),l=t(()=>e.value.reduce((e,t)=>e+(t.cache_read_tokens||0),0));return{sessions:e,isLoading:n,loadSessions:r,totalInputTokens:i,totalOutputTokens:a,totalTokens:o,totalSessions:c,totalCacheTokens:l,cacheHitRate:t(()=>{let e=i.value;return e===0?null:l.value/e*100}),estimatedCost:t(()=>e.value.reduce((e,t)=>e+(t.actual_cost_usd??t.estimated_cost_usd??0),0)),modelUsage:t(()=>{let t=new Map;for(let n of e.value){let e=n.model||`unknown`;t.has(e)||t.set(e,{model:e,inputTokens:0,outputTokens:0,cacheTokens:0,totalTokens:0,sessions:0});let r=t.get(e);r.inputTokens+=n.input_tokens||0,r.outputTokens+=n.output_tokens||0,r.cacheTokens+=n.cache_read_tokens||0,r.totalTokens+=(n.input_tokens||0)+(n.output_tokens||0),r.sessions+=1}return[...t.values()].sort((e,t)=>t.totalTokens-e.totalTokens)}),dailyUsage:t(()=>{let t=new Map,n=new Date;for(let e=29;e>=0;e--){let r=new Date(n);r.setDate(r.getDate()-e);let i=r.toISOString().slice(0,10);t.set(i,{date:i,tokens:0,cache:0,sessions:0,cost:0})}for(let n of e.value){let e=new Date(n.started_at*1e3).toISOString().slice(0,10),r=t.get(e);if(r){r.tokens+=(n.input_tokens||0)+(n.output_tokens||0),r.cache+=n.cache_read_tokens||0,r.sessions+=1;let e=n.actual_cost_usd??n.estimated_cost_usd??0;r.cost+=e}}return[...t.values()]}),avgSessionsPerDay:t(()=>{let t=e.value.length>0?new Date(e.value[e.value.length-1].started_at*1e3):new Date,n=Math.max(1,Math.ceil((Date.now()-t.getTime())/(1e3*60*60*24)));return c.value/n})}}),x={class:`stat-cards`},S={class:`stat-card`},C={class:`stat-label`},w={class:`stat-value`},T={class:`stat-sub`},E={class:`stat-card`},D={class:`stat-label`},O={class:`stat-value`},k={class:`stat-sub`},A={class:`stat-card`},j={class:`stat-label`},M={class:`stat-value`},N={class:`stat-card`},P={class:`stat-label`},F={class:`stat-value`},I={key:0,class:`stat-sub`},L=_(u({__name:`StatCards`,setup(e){let{t}=g(),a=b();function o(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function s(e){return e===0?`$0.00`:e<.01?`<$0.01`:`$`+e.toFixed(2)}return(e,l)=>(i(),n(`div`,x,[m(`div`,S,[m(`div`,C,c(f(t)(`usage.totalTokens`)),1),m(`div`,w,c(o(f(a).totalTokens)),1),m(`div`,T,c(o(f(a).totalInputTokens))+` `+c(f(t)(`usage.inputTokens`))+` / `+c(o(f(a).totalOutputTokens))+` `+c(f(t)(`usage.outputTokens`)),1)]),m(`div`,E,[m(`div`,D,c(f(t)(`usage.totalSessions`)),1),m(`div`,O,c(f(a).totalSessions),1),m(`div`,k,c(f(t)(`usage.avgPerDay`,{n:f(a).avgSessionsPerDay.toFixed(1)})),1)]),m(`div`,A,[m(`div`,j,c(f(t)(`usage.estimatedCost`)),1),m(`div`,M,c(s(f(a).estimatedCost)),1)]),m(`div`,N,[m(`div`,P,c(f(t)(`usage.cacheHitRate`)),1),m(`div`,F,c(f(a).cacheHitRate===null?`--`:f(a).cacheHitRate.toFixed(1)+`%`),1),f(a).cacheHitRate===null?r(``,!0):(i(),n(`div`,I,c(o(f(a).totalCacheTokens))+` tokens `,1))])]))}}),[[`__scopeId`,`data-v-4d1744aa`]]),te={class:`model-breakdown`},R={class:`section-title`},z={class:`model-list`},B={class:`model-name`},V={class:`model-bar-wrap`},H={class:`model-tokens`},U=_(u({__name:`ModelBreakdown`,setup(e){let{t}=g(),r=b();function a(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}return(e,o)=>(i(),n(`div`,te,[m(`h3`,R,c(f(t)(`usage.modelBreakdown`)),1),m(`div`,z,[(i(!0),n(h,null,p(f(r).modelUsage,e=>(i(),n(`div`,{key:e.model,class:`model-row`},[m(`span`,B,c(e.model),1),m(`div`,V,[m(`div`,{class:`model-bar`,style:l({width:e.totalTokens/f(r).modelUsage[0].totalTokens*100+`%`})},null,4)]),m(`span`,H,c(a(e.totalTokens)),1)]))),128))])]))}}),[[`__scopeId`,`data-v-26d187bc`]]),W={class:`daily-trend`},G={class:`section-title`},K={class:`bar-chart`},q={class:`bar-track`},J={class:`bar-tooltip`},Y={class:`tooltip-date`},X={class:`tooltip-row`},Z={class:`tooltip-row`},Q={class:`tooltip-row`},ne={class:`tooltip-row`},re={class:`bar-dates`},ie={class:`trend-table`},ae=_(u({__name:`DailyTrend`,setup(e){let{t:r}=g(),a=b();function o(e){return e>=1e6?(e/1e6).toFixed(1)+`M`:e>=1e3?(e/1e3).toFixed(1)+`K`:String(e)}function s(e){return e===0?`$0.00`:e<.01?`<$0.01`:`$`+e.toFixed(2)}let u=t(()=>Math.max(...a.dailyUsage.map(e=>e.tokens),1));return(e,t)=>(i(),n(`div`,W,[m(`h3`,G,c(f(r)(`usage.dailyTrend`)),1),m(`div`,K,[(i(!0),n(h,null,p(f(a).dailyUsage,e=>(i(),n(`div`,{key:e.date,class:`bar-col`},[m(`div`,q,[m(`div`,{class:`bar-fill`,style:l({height:e.tokens/u.value*100+`%`})},null,4)]),m(`div`,J,[m(`div`,Y,c(e.date),1),m(`div`,X,c(f(r)(`usage.tokens`))+`: `+c(o(e.tokens)),1),m(`div`,Z,c(f(r)(`usage.cache`))+`: `+c(o(e.cache)),1),m(`div`,Q,c(f(r)(`usage.sessions`))+`: `+c(e.sessions),1),m(`div`,ne,c(f(r)(`usage.cost`))+`: `+c(s(e.cost)),1)])]))),128))]),m(`div`,re,[m(`span`,null,c(f(a).dailyUsage[0]?.date.slice(5)),1),m(`span`,null,c(f(a).dailyUsage[f(a).dailyUsage.length-1]?.date.slice(5)),1)]),m(`div`,ie,[m(`table`,null,[m(`thead`,null,[m(`tr`,null,[m(`th`,null,c(f(r)(`usage.date`)),1),m(`th`,null,c(f(r)(`usage.tokens`)),1),m(`th`,null,c(f(r)(`usage.cache`)),1),m(`th`,null,c(f(r)(`usage.sessions`)),1),m(`th`,null,c(f(r)(`usage.cost`)),1)])]),m(`tbody`,null,[(i(!0),n(h,null,p([...f(a).dailyUsage].reverse().slice(0,30),e=>(i(),n(`tr`,{key:e.date},[m(`td`,null,c(e.date),1),m(`td`,null,c(o(e.tokens)),1),m(`td`,null,c(o(e.cache)),1),m(`td`,null,c(e.sessions),1),m(`td`,null,c(s(e.cost)),1)]))),128))])])])]))}}),[[`__scopeId`,`data-v-42ea27be`]]),oe={class:`usage-view`},$={class:`page-header`},se={class:`header-title`},ce={class:`usage-content`},le={key:0,class:`usage-loading`},ue={key:2,class:`usage-empty`},de=_(u({__name:`UsageView`,setup(t){let{t:r}=g(),s=b();return o(()=>{s.loadSessions()}),(t,o)=>(i(),n(`div`,oe,[m(`header`,$,[m(`h2`,se,c(f(r)(`usage.title`)),1),e(f(v),{size:`small`,quaternary:``,loading:f(s).isLoading,onClick:o[0]||=e=>f(s).loadSessions()},{default:a(()=>[d(c(f(r)(`usage.refresh`)),1)]),_:1},8,[`loading`])]),m(`div`,ce,[f(s).isLoading&&f(s).sessions.length===0?(i(),n(`div`,le,c(f(r)(`common.loading`)),1)):f(s).sessions.length>0?(i(),n(h,{key:1},[e(L),e(U),e(ae)],64)):(i(),n(`div`,ue,c(f(r)(`usage.noData`)),1))])]))}}),[[`__scopeId`,`data-v-e14e424d`]]);export{de as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./app-DtII96CF.js";export{e as useAppStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as e}from"./browser-oMT2KRlV.js";var t=e(`n-message-api`),n=e(`n-message-provider`);export{n,t};
|