hermes-web-ui 0.2.8 → 0.2.9
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/dist/client/assets/Add-XpaL69a7.js +1 -0
- package/dist/client/assets/{Button-Cxh6x3Um.js → Button-DZWlvt3_.js} +14 -14
- package/dist/client/assets/{ChannelsView-CQJ1fX8O.js → ChannelsView-DsFZWVNp.js} +1 -1
- package/dist/client/assets/ChatView-DoqDlZLC.js +127 -0
- package/dist/client/assets/{Close-hb0eNgAb.js → Close-CynFIaWE.js} +10 -10
- package/dist/client/assets/FormItem-9JbgiHgw.js +110 -0
- package/dist/client/assets/Input-BUMpvosL.js +234 -0
- package/dist/client/assets/InputNumber-BOptkZXt.js +13 -0
- package/dist/client/assets/{JobsView-rFyONi-b.js → JobsView-C-nRY00Q.js} +2 -2
- package/dist/client/assets/{LoginView-C6C3nX0Y.js → LoginView-CLrTbJPK.js} +1 -1
- package/dist/client/assets/{LogsView-CO8aslfu.js → LogsView-BjeUz4w_.js} +1 -1
- package/dist/client/assets/{MarkdownRenderer-Cy_O_tQS.js → MarkdownRenderer-pJXYVaJf.js} +1 -1
- package/dist/client/assets/{MemoryView-DZjJTdI6.js → MemoryView-B_b0Bw4s.js} +1 -1
- package/dist/client/assets/{Modal-BLinjj9c.js → Modal-Gb5CDHOn.js} +56 -56
- package/dist/client/assets/{ModelsView-CvHz1aiJ.js → ModelsView-BHO6JeeK.js} +1 -1
- package/dist/client/assets/Popconfirm-f3hviugz.js +16 -0
- package/dist/client/assets/Popover-BtQeULHo.js +117 -0
- package/dist/client/assets/ProfilesView-C4GoKpgi.js +440 -0
- package/dist/client/assets/{ProfilesView-oIk8yBVG.css → ProfilesView-jqeO8Zv3.css} +1 -1
- package/dist/client/assets/{Scrollbar-BHJ682ve.js → Scrollbar-Bui9E0cT.js} +17 -17
- package/dist/client/assets/Select-By6oALhZ.js +340 -0
- package/dist/client/assets/{SettingRow-pvADoOth.js → SettingRow-CWqG1TP7.js} +1 -1
- package/dist/client/assets/SettingsView-CzgT0dAx.js +352 -0
- package/dist/client/assets/{SkillsView-Bl8tqv9V.js → SkillsView-2xeOBpxm.js} +1 -1
- package/dist/client/assets/{Spin-BbaC-FmW.js → Spin-DD5RgTEV.js} +4 -4
- package/dist/client/assets/{Suffix-yRSbGVfA.js → Suffix-CkTuXehC.js} +5 -5
- package/dist/client/assets/{Switch-Svs0Rnhi.js → Switch-BqpUglHp.js} +15 -15
- package/dist/client/assets/{Tag-DdwPhG9T.js → Tag-BdqJCtwA.js} +15 -15
- package/dist/client/assets/{TerminalView-XDDNp69h.js → TerminalView-DOvaJfhr.js} +1 -1
- package/dist/client/assets/{Tooltip-CHbB9ntH.js → Tooltip-2f394xdV.js} +1 -1
- package/dist/client/assets/{UsageView-xqsO8W9W.js → UsageView-Cd7Gui1x.js} +1 -1
- package/dist/client/assets/{Warning-Srffo82k.js → Warning-21tMOc2L.js} +1 -1
- package/dist/client/assets/{_plugin-vue_export-helper-TyZ5GTTn.js → _plugin-vue_export-helper-C39Y8Snr.js} +1 -1
- package/dist/client/assets/{app-DTyari-k.js → app-Dc1GzlQi.js} +1 -1
- package/dist/client/assets/app-DjAPGKg7.js +1 -0
- package/dist/client/assets/{browser-DbKCW2k6.js → browser-DMdqvQBg.js} +9 -9
- package/dist/client/assets/{chat-BmXwfHmM.js → chat-1kL3Ps59.js} +2 -2
- package/dist/client/assets/composables-BxlGNoT-.js +1 -0
- package/dist/client/assets/{fade-in-scale-up.cssr-CiZdBCR3.js → fade-in-scale-up.cssr-HXBs3oL0.js} +1 -1
- package/dist/client/assets/index-CFIEnaxD.js +284 -0
- package/dist/client/assets/{jobs-DxRPm5Sf.js → jobs-YFhNrsBu.js} +1 -1
- package/dist/client/assets/{pinia-BTE-WqCz.js → pinia-BPgWlB7x.js} +1 -1
- package/dist/client/assets/profiles-H8Bd9mDO.js +23 -0
- package/dist/client/assets/{router-mPoLLYeq.js → router-cAIqC_mO.js} +2 -2
- package/dist/client/assets/{sessions-Bv5JsX3U.js → sessions-fFwnFvo3.js} +1 -1
- package/dist/client/assets/{skills-CXFhBwRj.js → skills-DZWMwFIf.js} +1 -1
- package/dist/client/assets/use-compitable-esQP7BHf.js +1 -0
- package/dist/client/assets/{use-message-B3svE98N.js → use-message-CnDHqZf8.js} +1 -1
- package/dist/client/index.html +22 -23
- package/dist/server/routes/hermes/profiles.js +52 -5
- package/package.json +1 -1
- package/dist/client/assets/ChatView-nxyDDB73.js +0 -127
- package/dist/client/assets/FormItem-dHtHjgtl.js +0 -110
- package/dist/client/assets/Input-CZZ9TfBw.js +0 -234
- package/dist/client/assets/InputNumber-qFTlSmmT.js +0 -13
- package/dist/client/assets/Popconfirm-JTALkPda.js +0 -16
- package/dist/client/assets/Popover-0__1CUa3.js +0 -117
- package/dist/client/assets/ProfilesView-Dv1-Qa9-.js +0 -1
- package/dist/client/assets/Select-DqPBeTT3.js +0 -340
- package/dist/client/assets/SettingsView-Y522req-.js +0 -352
- package/dist/client/assets/app-CpUVwd9n.js +0 -1
- package/dist/client/assets/composables-BoU_Wud6.js +0 -1
- package/dist/client/assets/get-DUDt1SRf.js +0 -1
- package/dist/client/assets/index-WIPEA9ik.js +0 -306
- package/dist/client/assets/profiles-C9UmdPLd.js +0 -1
- package/dist/client/assets/use-compitable-aofta5ri.js +0 -1
- /package/dist/client/assets/{omit-DKSz8IbY.js → omit-1BRB6K75.js} +0 -0
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import{C as e,F as t,K as n,M as r,N as i,R as a,U as o,X as s,Z as c,ct as l,dt as u,j as d,y as f}from"./router-mPoLLYeq.js";import{B as ee,G as p,K as m,Q as h,R as g,W as _,at as v,c as y,ct as b,d as te,dt as x,et as S,l as C,lt as w,n as T,ot as E,q as D,s as O,t as ne,tt as k,ut as A,z as j}from"./browser-DbKCW2k6.js";import{f as re,g as ie,h as ae,m as oe,o as M,r as N,s as se,t as P,v as ce}from"./Scrollbar-BHJ682ve.js";import{n as F,t as I}from"./Suffix-yRSbGVfA.js";var L=d({name:`Eye`,render(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},i(`path`,{d:`M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z`,fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`32`}),i(`circle`,{cx:`256`,cy:`256`,r:`80`,fill:`none`,stroke:`currentColor`,"stroke-miterlimit":`10`,"stroke-width":`32`}))}}),R=d({name:`EyeOff`,render(){return i(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},i(`path`,{d:`M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z`,fill:`currentColor`}),i(`path`,{d:`M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z`,fill:`currentColor`}),i(`path`,{d:`M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z`,fill:`currentColor`}),i(`path`,{d:`M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z`,fill:`currentColor`}),i(`path`,{d:`M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z`,fill:`currentColor`}))}}),z={paddingTiny:`0 8px`,paddingSmall:`0 10px`,paddingMedium:`0 12px`,paddingLarge:`0 14px`,clearSize:`16px`};function B(e){let{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:i,primaryColorHover:a,inputColor:o,inputColorDisabled:s,borderColor:c,warningColor:l,warningColorHover:u,errorColor:d,errorColorHover:f,borderRadius:ee,lineHeight:p,fontSizeTiny:m,fontSizeSmall:h,fontSizeMedium:g,fontSizeLarge:_,heightTiny:v,heightSmall:y,heightMedium:b,heightLarge:te,actionColor:x,clearColor:S,clearColorHover:C,clearColorPressed:w,placeholderColor:T,placeholderColorDisabled:E,iconColor:D,iconColorDisabled:O,iconColorHover:ne,iconColorPressed:A,fontWeight:j}=e;return Object.assign(Object.assign({},z),{fontWeight:j,countTextColorDisabled:r,countTextColor:n,heightTiny:v,heightSmall:y,heightMedium:b,heightLarge:te,fontSizeTiny:m,fontSizeSmall:h,fontSizeMedium:g,fontSizeLarge:_,lineHeight:p,lineHeightTextarea:p,borderRadius:ee,iconSize:`16px`,groupLabelColor:x,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:i,placeholderColor:T,placeholderColorDisabled:E,color:o,colorDisabled:s,colorFocus:o,groupLabelBorder:`1px solid ${c}`,border:`1px solid ${c}`,borderHover:`1px solid ${a}`,borderDisabled:`1px solid ${c}`,borderFocus:`1px solid ${a}`,boxShadowFocus:`0 0 0 2px ${k(i,{alpha:.2})}`,loadingColor:i,loadingColorWarning:l,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:o,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${k(l,{alpha:.2})}`,caretColorWarning:l,loadingColorError:d,borderError:`1px solid ${d}`,borderHoverError:`1px solid ${f}`,colorFocusError:o,borderFocusError:`1px solid ${f}`,boxShadowFocusError:`0 0 0 2px ${k(d,{alpha:.2})}`,caretColorError:d,clearColor:S,clearColorHover:C,clearColorPressed:w,iconColor:D,iconColorDisabled:O,iconColorHover:ne,iconColorPressed:A,suffixTextColor:t})}var V=O({name:`Input`,common:T,peers:{Scrollbar:N},self:B}),H=h(`n-input`),le=E(`input`,`
|
|
2
|
-
max-width: 100%;
|
|
3
|
-
cursor: text;
|
|
4
|
-
line-height: 1.5;
|
|
5
|
-
z-index: auto;
|
|
6
|
-
outline: none;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
position: relative;
|
|
9
|
-
display: inline-flex;
|
|
10
|
-
border-radius: var(--n-border-radius);
|
|
11
|
-
background-color: var(--n-color);
|
|
12
|
-
transition: background-color .3s var(--n-bezier);
|
|
13
|
-
font-size: var(--n-font-size);
|
|
14
|
-
font-weight: var(--n-font-weight);
|
|
15
|
-
--n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
|
|
16
|
-
`,[b(`input, textarea`,`
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
flex-grow: 1;
|
|
19
|
-
position: relative;
|
|
20
|
-
`),b(`input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder`,`
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
font-size: inherit;
|
|
23
|
-
line-height: 1.5;
|
|
24
|
-
font-family: inherit;
|
|
25
|
-
border: none;
|
|
26
|
-
outline: none;
|
|
27
|
-
background-color: #0000;
|
|
28
|
-
text-align: inherit;
|
|
29
|
-
transition:
|
|
30
|
-
-webkit-text-fill-color .3s var(--n-bezier),
|
|
31
|
-
caret-color .3s var(--n-bezier),
|
|
32
|
-
color .3s var(--n-bezier),
|
|
33
|
-
text-decoration-color .3s var(--n-bezier);
|
|
34
|
-
`),b(`input-el, textarea-el`,`
|
|
35
|
-
-webkit-appearance: none;
|
|
36
|
-
scrollbar-width: none;
|
|
37
|
-
width: 100%;
|
|
38
|
-
min-width: 0;
|
|
39
|
-
text-decoration-color: var(--n-text-decoration-color);
|
|
40
|
-
color: var(--n-text-color);
|
|
41
|
-
caret-color: var(--n-caret-color);
|
|
42
|
-
background-color: transparent;
|
|
43
|
-
`,[v(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
44
|
-
width: 0;
|
|
45
|
-
height: 0;
|
|
46
|
-
display: none;
|
|
47
|
-
`),v(`&::placeholder`,`
|
|
48
|
-
color: #0000;
|
|
49
|
-
-webkit-text-fill-color: transparent !important;
|
|
50
|
-
`),v(`&:-webkit-autofill ~`,[b(`placeholder`,`display: none;`)])]),w(`round`,[A(`textarea`,`border-radius: calc(var(--n-height) / 2);`)]),b(`placeholder`,`
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
position: absolute;
|
|
53
|
-
left: 0;
|
|
54
|
-
right: 0;
|
|
55
|
-
top: 0;
|
|
56
|
-
bottom: 0;
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
color: var(--n-placeholder-color);
|
|
59
|
-
`,[v(`span`,`
|
|
60
|
-
width: 100%;
|
|
61
|
-
display: inline-block;
|
|
62
|
-
`)]),w(`textarea`,[b(`placeholder`,`overflow: visible;`)]),A(`autosize`,`width: 100%;`),w(`autosize`,[b(`textarea-el, input-el`,`
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: 0;
|
|
65
|
-
left: 0;
|
|
66
|
-
height: 100%;
|
|
67
|
-
`)]),E(`input-wrapper`,`
|
|
68
|
-
overflow: hidden;
|
|
69
|
-
display: inline-flex;
|
|
70
|
-
flex-grow: 1;
|
|
71
|
-
position: relative;
|
|
72
|
-
padding-left: var(--n-padding-left);
|
|
73
|
-
padding-right: var(--n-padding-right);
|
|
74
|
-
`),b(`input-mirror`,`
|
|
75
|
-
padding: 0;
|
|
76
|
-
height: var(--n-height);
|
|
77
|
-
line-height: var(--n-height);
|
|
78
|
-
overflow: hidden;
|
|
79
|
-
visibility: hidden;
|
|
80
|
-
position: static;
|
|
81
|
-
white-space: pre;
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
`),b(`input-el`,`
|
|
84
|
-
padding: 0;
|
|
85
|
-
height: var(--n-height);
|
|
86
|
-
line-height: var(--n-height);
|
|
87
|
-
`,[v(`&[type=password]::-ms-reveal`,`display: none;`),v(`+`,[b(`placeholder`,`
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: center;
|
|
90
|
-
`)])]),A(`textarea`,[b(`placeholder`,`white-space: nowrap;`)]),b(`eye`,`
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: center;
|
|
94
|
-
transition: color .3s var(--n-bezier);
|
|
95
|
-
`),w(`textarea`,`width: 100%;`,[E(`input-word-count`,`
|
|
96
|
-
position: absolute;
|
|
97
|
-
right: var(--n-padding-right);
|
|
98
|
-
bottom: var(--n-padding-vertical);
|
|
99
|
-
`),w(`resizable`,[E(`input-wrapper`,`
|
|
100
|
-
resize: vertical;
|
|
101
|
-
min-height: var(--n-height);
|
|
102
|
-
`)]),b(`textarea-el, textarea-mirror, placeholder`,`
|
|
103
|
-
height: 100%;
|
|
104
|
-
padding-left: 0;
|
|
105
|
-
padding-right: 0;
|
|
106
|
-
padding-top: var(--n-padding-vertical);
|
|
107
|
-
padding-bottom: var(--n-padding-vertical);
|
|
108
|
-
word-break: break-word;
|
|
109
|
-
display: inline-block;
|
|
110
|
-
vertical-align: bottom;
|
|
111
|
-
box-sizing: border-box;
|
|
112
|
-
line-height: var(--n-line-height-textarea);
|
|
113
|
-
margin: 0;
|
|
114
|
-
resize: none;
|
|
115
|
-
white-space: pre-wrap;
|
|
116
|
-
scroll-padding-block-end: var(--n-padding-vertical);
|
|
117
|
-
`),b(`textarea-mirror`,`
|
|
118
|
-
width: 100%;
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
overflow: hidden;
|
|
121
|
-
visibility: hidden;
|
|
122
|
-
position: static;
|
|
123
|
-
white-space: pre-wrap;
|
|
124
|
-
overflow-wrap: break-word;
|
|
125
|
-
`)]),w(`pair`,[b(`input-el, placeholder`,`text-align: center;`),b(`separator`,`
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: center;
|
|
128
|
-
transition: color .3s var(--n-bezier);
|
|
129
|
-
color: var(--n-text-color);
|
|
130
|
-
white-space: nowrap;
|
|
131
|
-
`,[E(`icon`,`
|
|
132
|
-
color: var(--n-icon-color);
|
|
133
|
-
`),E(`base-icon`,`
|
|
134
|
-
color: var(--n-icon-color);
|
|
135
|
-
`)])]),w(`disabled`,`
|
|
136
|
-
cursor: not-allowed;
|
|
137
|
-
background-color: var(--n-color-disabled);
|
|
138
|
-
`,[b(`border`,`border: var(--n-border-disabled);`),b(`input-el, textarea-el`,`
|
|
139
|
-
cursor: not-allowed;
|
|
140
|
-
color: var(--n-text-color-disabled);
|
|
141
|
-
text-decoration-color: var(--n-text-color-disabled);
|
|
142
|
-
`),b(`placeholder`,`color: var(--n-placeholder-color-disabled);`),b(`separator`,`color: var(--n-text-color-disabled);`,[E(`icon`,`
|
|
143
|
-
color: var(--n-icon-color-disabled);
|
|
144
|
-
`),E(`base-icon`,`
|
|
145
|
-
color: var(--n-icon-color-disabled);
|
|
146
|
-
`)]),E(`input-word-count`,`
|
|
147
|
-
color: var(--n-count-text-color-disabled);
|
|
148
|
-
`),b(`suffix, prefix`,`color: var(--n-text-color-disabled);`,[E(`icon`,`
|
|
149
|
-
color: var(--n-icon-color-disabled);
|
|
150
|
-
`),E(`internal-icon`,`
|
|
151
|
-
color: var(--n-icon-color-disabled);
|
|
152
|
-
`)])]),A(`disabled`,[b(`eye`,`
|
|
153
|
-
color: var(--n-icon-color);
|
|
154
|
-
cursor: pointer;
|
|
155
|
-
`,[v(`&:hover`,`
|
|
156
|
-
color: var(--n-icon-color-hover);
|
|
157
|
-
`),v(`&:active`,`
|
|
158
|
-
color: var(--n-icon-color-pressed);
|
|
159
|
-
`)]),v(`&:hover`,[b(`state-border`,`border: var(--n-border-hover);`)]),w(`focus`,`background-color: var(--n-color-focus);`,[b(`state-border`,`
|
|
160
|
-
border: var(--n-border-focus);
|
|
161
|
-
box-shadow: var(--n-box-shadow-focus);
|
|
162
|
-
`)])]),b(`border, state-border`,`
|
|
163
|
-
box-sizing: border-box;
|
|
164
|
-
position: absolute;
|
|
165
|
-
left: 0;
|
|
166
|
-
right: 0;
|
|
167
|
-
top: 0;
|
|
168
|
-
bottom: 0;
|
|
169
|
-
pointer-events: none;
|
|
170
|
-
border-radius: inherit;
|
|
171
|
-
border: var(--n-border);
|
|
172
|
-
transition:
|
|
173
|
-
box-shadow .3s var(--n-bezier),
|
|
174
|
-
border-color .3s var(--n-bezier);
|
|
175
|
-
`),b(`state-border`,`
|
|
176
|
-
border-color: #0000;
|
|
177
|
-
z-index: 1;
|
|
178
|
-
`),b(`prefix`,`margin-right: 4px;`),b(`suffix`,`
|
|
179
|
-
margin-left: 4px;
|
|
180
|
-
`),b(`suffix, prefix`,`
|
|
181
|
-
transition: color .3s var(--n-bezier);
|
|
182
|
-
flex-wrap: nowrap;
|
|
183
|
-
flex-shrink: 0;
|
|
184
|
-
line-height: var(--n-height);
|
|
185
|
-
white-space: nowrap;
|
|
186
|
-
display: inline-flex;
|
|
187
|
-
align-items: center;
|
|
188
|
-
justify-content: center;
|
|
189
|
-
color: var(--n-suffix-text-color);
|
|
190
|
-
`,[E(`base-loading`,`
|
|
191
|
-
font-size: var(--n-icon-size);
|
|
192
|
-
margin: 0 2px;
|
|
193
|
-
color: var(--n-loading-color);
|
|
194
|
-
`),E(`base-clear`,`
|
|
195
|
-
font-size: var(--n-icon-size);
|
|
196
|
-
`,[b(`placeholder`,[E(`base-icon`,`
|
|
197
|
-
transition: color .3s var(--n-bezier);
|
|
198
|
-
color: var(--n-icon-color);
|
|
199
|
-
font-size: var(--n-icon-size);
|
|
200
|
-
`)])]),v(`>`,[E(`icon`,`
|
|
201
|
-
transition: color .3s var(--n-bezier);
|
|
202
|
-
color: var(--n-icon-color);
|
|
203
|
-
font-size: var(--n-icon-size);
|
|
204
|
-
`)]),E(`base-icon`,`
|
|
205
|
-
font-size: var(--n-icon-size);
|
|
206
|
-
`)]),E(`input-word-count`,`
|
|
207
|
-
pointer-events: none;
|
|
208
|
-
line-height: 1.5;
|
|
209
|
-
font-size: .85em;
|
|
210
|
-
color: var(--n-count-text-color);
|
|
211
|
-
transition: color .3s var(--n-bezier);
|
|
212
|
-
margin-left: 4px;
|
|
213
|
-
font-variant: tabular-nums;
|
|
214
|
-
`),[`warning`,`error`].map(e=>w(`${e}-status`,[A(`disabled`,[E(`base-loading`,`
|
|
215
|
-
color: var(--n-loading-color-${e})
|
|
216
|
-
`),b(`input-el, textarea-el`,`
|
|
217
|
-
caret-color: var(--n-caret-color-${e});
|
|
218
|
-
`),b(`state-border`,`
|
|
219
|
-
border: var(--n-border-${e});
|
|
220
|
-
`),v(`&:hover`,[b(`state-border`,`
|
|
221
|
-
border: var(--n-border-hover-${e});
|
|
222
|
-
`)]),v(`&:focus`,`
|
|
223
|
-
background-color: var(--n-color-focus-${e});
|
|
224
|
-
`,[b(`state-border`,`
|
|
225
|
-
box-shadow: var(--n-box-shadow-focus-${e});
|
|
226
|
-
border: var(--n-border-focus-${e});
|
|
227
|
-
`)]),w(`focus`,`
|
|
228
|
-
background-color: var(--n-color-focus-${e});
|
|
229
|
-
`,[b(`state-border`,`
|
|
230
|
-
box-shadow: var(--n-box-shadow-focus-${e});
|
|
231
|
-
border: var(--n-border-focus-${e});
|
|
232
|
-
`)])])]))]),ue=E(`input`,[w(`disabled`,[b(`input-el, textarea-el`,`
|
|
233
|
-
-webkit-text-fill-color: var(--n-text-color-disabled);
|
|
234
|
-
`)])]);function U(e){let t=0;for(let n of e)t++;return t}function W(e){return e===``||e==null}function de(e){let t=l(null);function n(){let{value:n}=e;if(!n?.focus){i();return}let{selectionStart:r,selectionEnd:a,value:o}=n;if(r==null||a==null){i();return}t.value={start:r,end:a,beforeText:o.slice(0,r),afterText:o.slice(a)}}function r(){var n;let{value:r}=t,{value:i}=e;if(!r||!i)return;let{value:a}=i,{start:o,beforeText:s,afterText:c}=r,l=a.length;if(a.endsWith(c))l=a.length-c.length;else if(a.startsWith(s))l=s.length;else{let e=s[o-1],t=a.indexOf(e,o-1);t!==-1&&(l=t+1)}(n=i.setSelectionRange)==null||n.call(i,l,l)}function i(){t.value=null}return s(e,i),{recordCursor:n,restoreCursor:r}}var G=d({name:`InputWordCount`,setup(n,{slots:r}){let{mergedValueRef:a,maxlengthRef:o,mergedClsPrefixRef:s,countGraphemesRef:c}=t(H),l=e(()=>{let{value:e}=a;return e===null||Array.isArray(e)?0:(c.value||U)(e)});return()=>{let{value:e}=o,{value:t}=a;return i(`span`,{class:`${s.value}-input-word-count`},p(r.default,{value:t===null||Array.isArray(t)?``:t},()=>[e===void 0?l.value:`${l.value} / ${e}`]))}}}),K=d({name:`Input`,props:Object.assign(Object.assign({},y.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:`text`},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),slots:Object,setup(t){let{mergedClsPrefixRef:i,mergedBorderedRef:d,inlineThemeDisabled:f,mergedRtlRef:p,mergedComponentPropsRef:m}=ee(t),h=y(`Input`,`-input`,le,V,t,i);ne&&C(`-input-safari`,ue,i);let _=l(null),v=l(null),b=l(null),w=l(null),T=l(null),E=l(null),O=l(null),k=de(O),A=l(null),{localeRef:re}=se(`Input`),M=l(t.defaultValue),N=oe(u(t,`value`),M),P=g(t,{mergedSize:e=>{let{size:n}=t;if(n)return n;let{mergedSize:r}=e||{};return r?.value?r.value:m?.value?.Input?.size||`medium`}}),{mergedSizeRef:F,mergedDisabledRef:I,mergedStatusRef:L}=P,R=l(!1),z=l(!1),B=l(!1),U=l(!1),G=null,K=e(()=>{let{placeholder:e,pair:n}=t;return n?Array.isArray(e)?e:e===void 0?[``,``]:[e,e]:e===void 0?[re.value.placeholder]:[e]}),fe=e(()=>{let{value:e}=B,{value:t}=N,{value:n}=K;return!e&&(W(t)||Array.isArray(t)&&W(t[0]))&&n[0]}),pe=e(()=>{let{value:e}=B,{value:t}=N,{value:n}=K;return!e&&n[1]&&(W(t)||Array.isArray(t)&&W(t[1]))}),q=S(()=>t.internalForceFocus||R.value),me=S(()=>{if(I.value||t.readonly||!t.clearable||!q.value&&!z.value)return!1;let{value:e}=N,{value:n}=q;return t.pair?!!(Array.isArray(e)&&(e[0]||e[1]))&&(z.value||n):!!e&&(z.value||n)}),he=e(()=>{let{showPasswordOn:e}=t;if(e)return e;if(t.showPasswordToggle)return`click`}),J=l(!1),ge=e(()=>{let{textDecoration:e}=t;return e?Array.isArray(e)?e.map(e=>({textDecoration:e})):[{textDecoration:e}]:[``,``]}),_e=l(void 0),ve=()=>{if(t.type===`textarea`){let{autosize:e}=t;if(e&&(_e.value=A.value?.$el?.offsetWidth),!v.value||typeof e==`boolean`)return;let{paddingTop:n,paddingBottom:r,lineHeight:i}=window.getComputedStyle(v.value),a=Number(n.slice(0,-2)),o=Number(r.slice(0,-2)),s=Number(i.slice(0,-2)),{value:c}=b;if(!c)return;if(e.minRows){let t=Math.max(e.minRows,1),n=`${a+o+s*t}px`;c.style.minHeight=n}if(e.maxRows){let t=`${a+o+s*e.maxRows}px`;c.style.maxHeight=t}}},ye=e(()=>{let{maxlength:e}=t;return e===void 0?void 0:Number(e)});o(()=>{let{value:e}=N;Array.isArray(e)||nt(e)});let be=r().proxy;function Y(e,n){let{onUpdateValue:r,"onUpdate:value":i,onInput:a}=t,{nTriggerFormInput:o}=P;r&&D(r,e,n),i&&D(i,e,n),a&&D(a,e,n),M.value=e,o()}function X(e,n){let{onChange:r}=t,{nTriggerFormChange:i}=P;r&&D(r,e,n),M.value=e,i()}function xe(e){let{onBlur:n}=t,{nTriggerFormBlur:r}=P;n&&D(n,e),r()}function Se(e){let{onFocus:n}=t,{nTriggerFormFocus:r}=P;n&&D(n,e),r()}function Ce(e){let{onClear:n}=t;n&&D(n,e)}function we(e){let{onInputBlur:n}=t;n&&D(n,e)}function Te(e){let{onInputFocus:n}=t;n&&D(n,e)}function Ee(){let{onDeactivate:e}=t;e&&D(e)}function De(){let{onActivate:e}=t;e&&D(e)}function Oe(e){let{onClick:n}=t;n&&D(n,e)}function ke(e){let{onWrapperFocus:n}=t;n&&D(n,e)}function Ae(e){let{onWrapperBlur:n}=t;n&&D(n,e)}function je(){B.value=!0}function Me(e){B.value=!1,e.target===E.value?Z(e,1):Z(e,0)}function Z(e,n=0,r=`input`){let i=e.target.value;if(nt(i),e instanceof InputEvent&&!e.isComposing&&(B.value=!1),t.type===`textarea`){let{value:e}=A;e&&e.syncUnifiedContainer()}if(G=i,B.value)return;k.recordCursor();let o=Ne(i);if(o)if(!t.pair)r===`input`?Y(i,{source:n}):X(i,{source:n});else{let{value:e}=N;e=Array.isArray(e)?[e[0],e[1]]:[``,``],e[n]=i,r===`input`?Y(e,{source:n}):X(e,{source:n})}be.$forceUpdate(),o||a(k.restoreCursor)}function Ne(e){let{countGraphemes:n,maxlength:r,minlength:i}=t;if(n){let t;if(r!==void 0&&(t===void 0&&(t=n(e)),t>Number(r))||i!==void 0&&(t===void 0&&(t=n(e)),t<Number(r)))return!1}let{allowInput:a}=t;return typeof a==`function`?a(e):!0}function Pe(e){we(e),e.relatedTarget===_.value&&Ee(),e.relatedTarget!==null&&(e.relatedTarget===T.value||e.relatedTarget===E.value||e.relatedTarget===v.value)||(U.value=!1),Q(e,`blur`),O.value=null}function Fe(e,t){Te(e),R.value=!0,U.value=!0,De(),Q(e,`focus`),t===0?O.value=T.value:t===1?O.value=E.value:t===2&&(O.value=v.value)}function Ie(e){t.passivelyActivated&&(Ae(e),Q(e,`blur`))}function Le(e){t.passivelyActivated&&(R.value=!0,ke(e),Q(e,`focus`))}function Q(e,t){e.relatedTarget!==null&&(e.relatedTarget===T.value||e.relatedTarget===E.value||e.relatedTarget===v.value||e.relatedTarget===_.value)||(t===`focus`?(Se(e),R.value=!0):t===`blur`&&(xe(e),R.value=!1))}function Re(e,t){Z(e,t,`change`)}function ze(e){Oe(e)}function Be(e){Ce(e),Ve()}function Ve(){t.pair?(Y([``,``],{source:`clear`}),X([``,``],{source:`clear`})):(Y(``,{source:`clear`}),X(``,{source:`clear`}))}function He(e){let{onMousedown:n}=t;n&&n(e);let{tagName:r}=e.target;if(r!==`INPUT`&&r!==`TEXTAREA`){if(t.resizable){let{value:t}=_;if(t){let{left:n,top:r,width:i,height:a}=t.getBoundingClientRect();if(n+i-14<e.clientX&&e.clientX<n+i&&r+a-14<e.clientY&&e.clientY<r+a)return}}e.preventDefault(),R.value||Xe()}}function Ue(){var e;z.value=!0,t.type===`textarea`&&((e=A.value)==null||e.handleMouseEnterWrapper())}function We(){var e;z.value=!1,t.type===`textarea`&&((e=A.value)==null||e.handleMouseLeaveWrapper())}function Ge(){I.value||he.value===`click`&&(J.value=!J.value)}function Ke(e){if(I.value)return;e.preventDefault();let t=e=>{e.preventDefault(),ae(`mouseup`,document,t)};if(ie(`mouseup`,document,t),he.value!==`mousedown`)return;J.value=!0;let n=()=>{J.value=!1,ae(`mouseup`,document,n)};ie(`mouseup`,document,n)}function qe(e){t.onKeyup&&D(t.onKeyup,e)}function Je(e){switch(t.onKeydown&&D(t.onKeydown,e),e.key){case`Escape`:$();break;case`Enter`:Ye(e);break}}function Ye(e){var n,r;if(t.passivelyActivated){let{value:i}=U;if(i){t.internalDeactivateOnEnter&&$();return}e.preventDefault(),t.type===`textarea`?(n=v.value)==null||n.focus():(r=T.value)==null||r.focus()}}function $(){t.passivelyActivated&&(U.value=!1,a(()=>{var e;(e=_.value)==null||e.focus()}))}function Xe(){var e,n,r;I.value||(t.passivelyActivated?(e=_.value)==null||e.focus():((n=v.value)==null||n.focus(),(r=T.value)==null||r.focus()))}function Ze(){_.value?.contains(document.activeElement)&&document.activeElement.blur()}function Qe(){var e,t;(e=v.value)==null||e.select(),(t=T.value)==null||t.select()}function $e(){I.value||(v.value?v.value.focus():T.value&&T.value.focus())}function et(){let{value:e}=_;e?.contains(document.activeElement)&&e!==document.activeElement&&$()}function tt(e){if(t.type===`textarea`){let{value:t}=v;t?.scrollTo(e)}else{let{value:t}=T;t?.scrollTo(e)}}function nt(e){let{type:n,pair:r,autosize:i}=t;if(!r&&i)if(n===`textarea`){let{value:t}=b;t&&(t.textContent=`${e??``}\r\n`)}else{let{value:t}=w;t&&(e?t.textContent=e:t.innerHTML=` `)}}function rt(){ve()}let it=l({top:`0`});function at(e){var t;let{scrollTop:n}=e.target;it.value.top=`${-n}px`,(t=A.value)==null||t.syncUnifiedContainer()}let ot=null;c(()=>{let{autosize:e,type:n}=t;e&&n===`textarea`?ot=s(N,e=>{!Array.isArray(e)&&e!==G&&nt(e)}):ot?.()});let st=null;c(()=>{t.type===`textarea`?st=s(N,e=>{var t;!Array.isArray(e)&&e!==G&&((t=A.value)==null||t.syncUnifiedContainer())}):st?.()}),n(H,{mergedValueRef:N,maxlengthRef:ye,mergedClsPrefixRef:i,countGraphemesRef:u(t,`countGraphemes`)});let ct={wrapperElRef:_,inputElRef:T,textareaElRef:v,isCompositing:B,clear:Ve,focus:Xe,blur:Ze,select:Qe,deactivate:et,activate:$e,scrollTo:tt},lt=te(`Input`,p,i),ut=e(()=>{let{value:e}=F,{common:{cubicBezierEaseInOut:t},self:{color:n,borderRadius:r,textColor:i,caretColor:a,caretColorError:o,caretColorWarning:s,textDecorationColor:c,border:l,borderDisabled:u,borderHover:d,borderFocus:f,placeholderColor:ee,placeholderColorDisabled:p,lineHeightTextarea:m,colorDisabled:g,colorFocus:_,textColorDisabled:v,boxShadowFocus:y,iconSize:b,colorFocusWarning:te,boxShadowFocusWarning:S,borderWarning:C,borderFocusWarning:w,borderHoverWarning:T,colorFocusError:E,boxShadowFocusError:D,borderError:O,borderFocusError:ne,borderHoverError:k,clearSize:A,clearColor:j,clearColorHover:re,clearColorPressed:ie,iconColor:ae,iconColorDisabled:oe,suffixTextColor:M,countTextColor:N,countTextColorDisabled:se,iconColorHover:P,iconColorPressed:I,loadingColor:L,loadingColorError:R,loadingColorWarning:z,fontWeight:B,[x(`padding`,e)]:V,[x(`fontSize`,e)]:H,[x(`height`,e)]:le}}=h.value,{left:ue,right:U}=ce(V);return{"--n-bezier":t,"--n-count-text-color":N,"--n-count-text-color-disabled":se,"--n-color":n,"--n-font-size":H,"--n-font-weight":B,"--n-border-radius":r,"--n-height":le,"--n-padding-left":ue,"--n-padding-right":U,"--n-text-color":i,"--n-caret-color":a,"--n-text-decoration-color":c,"--n-border":l,"--n-border-disabled":u,"--n-border-hover":d,"--n-border-focus":f,"--n-placeholder-color":ee,"--n-placeholder-color-disabled":p,"--n-icon-size":b,"--n-line-height-textarea":m,"--n-color-disabled":g,"--n-color-focus":_,"--n-text-color-disabled":v,"--n-box-shadow-focus":y,"--n-loading-color":L,"--n-caret-color-warning":s,"--n-color-focus-warning":te,"--n-box-shadow-focus-warning":S,"--n-border-warning":C,"--n-border-focus-warning":w,"--n-border-hover-warning":T,"--n-loading-color-warning":z,"--n-caret-color-error":o,"--n-color-focus-error":E,"--n-box-shadow-focus-error":D,"--n-border-error":O,"--n-border-focus-error":ne,"--n-border-hover-error":k,"--n-loading-color-error":R,"--n-clear-color":j,"--n-clear-size":A,"--n-clear-color-hover":re,"--n-clear-color-pressed":ie,"--n-icon-color":ae,"--n-icon-color-hover":P,"--n-icon-color-pressed":I,"--n-icon-color-disabled":oe,"--n-suffix-text-color":M}}),dt=f?j(`input`,e(()=>{let{value:e}=F;return e[0]}),ut,t):void 0;return Object.assign(Object.assign({},ct),{wrapperElRef:_,inputElRef:T,inputMirrorElRef:w,inputEl2Ref:E,textareaElRef:v,textareaMirrorElRef:b,textareaScrollbarInstRef:A,rtlEnabled:lt,uncontrolledValue:M,mergedValue:N,passwordVisible:J,mergedPlaceholder:K,showPlaceholder1:fe,showPlaceholder2:pe,mergedFocus:q,isComposing:B,activated:U,showClearButton:me,mergedSize:F,mergedDisabled:I,textDecorationStyle:ge,mergedClsPrefix:i,mergedBordered:d,mergedShowPasswordOn:he,placeholderStyle:it,mergedStatus:L,textAreaScrollContainerWidth:_e,handleTextAreaScroll:at,handleCompositionStart:je,handleCompositionEnd:Me,handleInput:Z,handleInputBlur:Pe,handleInputFocus:Fe,handleWrapperBlur:Ie,handleWrapperFocus:Le,handleMouseEnter:Ue,handleMouseLeave:We,handleMouseDown:He,handleChange:Re,handleClick:ze,handleClear:Be,handlePasswordToggleClick:Ge,handlePasswordToggleMousedown:Ke,handleWrapperKeydown:Je,handleWrapperKeyup:qe,handleTextAreaMirrorResize:rt,getTextareaScrollContainer:()=>v.value,mergedTheme:h,cssVars:f?void 0:ut,themeClass:dt?.themeClass,onRender:dt?.onRender})},render(){let{mergedClsPrefix:e,mergedStatus:t,themeClass:n,type:r,countGraphemes:a,onRender:o}=this,s=this.$slots;return o?.(),i(`div`,{ref:`wrapperElRef`,class:[`${e}-input`,`${e}-input--${this.mergedSize}-size`,n,t&&`${e}-input--${t}-status`,{[`${e}-input--rtl`]:this.rtlEnabled,[`${e}-input--disabled`]:this.mergedDisabled,[`${e}-input--textarea`]:r===`textarea`,[`${e}-input--resizable`]:this.resizable&&!this.autosize,[`${e}-input--autosize`]:this.autosize,[`${e}-input--round`]:this.round&&r!==`textarea`,[`${e}-input--pair`]:this.pair,[`${e}-input--focus`]:this.mergedFocus,[`${e}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},i(`div`,{class:`${e}-input-wrapper`},m(s.prefix,t=>t&&i(`div`,{class:`${e}-input__prefix`},t)),r===`textarea`?i(P,{ref:`textareaScrollbarInstRef`,class:`${e}-input__textarea`,container:this.getTextareaScrollContainer,theme:this.theme?.peers?.Scrollbar,themeOverrides:this.themeOverrides?.peers?.Scrollbar,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{let{textAreaScrollContainerWidth:t}=this,n={width:this.autosize&&t&&`${t}px`};return i(f,null,i(`textarea`,Object.assign({},this.inputProps,{ref:`textareaElRef`,class:[`${e}-input__textarea-el`,this.inputProps?.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],this.inputProps?.style,n],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?i(`div`,{class:`${e}-input__placeholder`,style:[this.placeholderStyle,n],key:`placeholder`},this.mergedPlaceholder[0]):null,this.autosize?i(re,{onResize:this.handleTextAreaMirrorResize},{default:()=>i(`div`,{ref:`textareaMirrorElRef`,class:`${e}-input__textarea-mirror`,key:`mirror`})}):null)}}):i(`div`,{class:`${e}-input__input`},i(`input`,Object.assign({type:r===`password`&&this.mergedShowPasswordOn&&this.passwordVisible?`text`:r},this.inputProps,{ref:`inputElRef`,class:[`${e}-input__input-el`,this.inputProps?.class],style:[this.textDecorationStyle[0],this.inputProps?.style],tabindex:this.passivelyActivated&&!this.activated?-1:this.inputProps?.tabindex,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,0)},onInput:e=>{this.handleInput(e,0)},onChange:e=>{this.handleChange(e,0)}})),this.showPlaceholder1?i(`div`,{class:`${e}-input__placeholder`},i(`span`,null,this.mergedPlaceholder[0])):null,this.autosize?i(`div`,{class:`${e}-input__input-mirror`,key:`mirror`,ref:`inputMirrorElRef`},`\xA0`):null),!this.pair&&m(s.suffix,t=>t||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?i(`div`,{class:`${e}-input__suffix`},[m(s[`clear-icon-placeholder`],t=>(this.clearable||t)&&i(F,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>t,icon:()=>{var e;return(e=this.$slots)[`clear-icon`]?.call(e)}})),this.internalLoadingBeforeSuffix?null:t,this.loading===void 0?null:i(I,{clsPrefix:e,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}),this.internalLoadingBeforeSuffix?t:null,this.showCount&&this.type!==`textarea`?i(G,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null,this.mergedShowPasswordOn&&this.type===`password`?i(`div`,{class:`${e}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?_(s[`password-visible-icon`],()=>[i(M,{clsPrefix:e},{default:()=>i(L,null)})]):_(s[`password-invisible-icon`],()=>[i(M,{clsPrefix:e},{default:()=>i(R,null)})])):null]):null)),this.pair?i(`span`,{class:`${e}-input__separator`},_(s.separator,()=>[this.separator])):null,this.pair?i(`div`,{class:`${e}-input-wrapper`},i(`div`,{class:`${e}-input__input`},i(`input`,{ref:`inputEl2Ref`,type:this.type,class:`${e}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:e=>{this.handleInputFocus(e,1)},onInput:e=>{this.handleInput(e,1)},onChange:e=>{this.handleChange(e,1)}}),this.showPlaceholder2?i(`div`,{class:`${e}-input__placeholder`},i(`span`,null,this.mergedPlaceholder[1])):null),m(s.suffix,t=>(this.clearable||t)&&i(`div`,{class:`${e}-input__suffix`},[this.clearable&&i(F,{clsPrefix:e,show:this.showClearButton,onClear:this.handleClear},{icon:()=>s[`clear-icon`]?.call(s),placeholder:()=>s[`clear-icon-placeholder`]?.call(s)}),t]))):null,this.mergedBordered?i(`div`,{class:`${e}-input__border`}):null,this.mergedBordered?i(`div`,{class:`${e}-input__state-border`}):null,this.showCount&&r===`textarea`?i(G,null,{default:e=>{let{renderCount:t}=this;return t?t(e):s.count?.call(s,e)}}):null)}});export{V as n,K as t};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{C as e,N as t,R as n,X as r,ct as i,dt as a,j as o}from"./router-mPoLLYeq.js";import{B as s,K as c,R as ee,W as l,at as u,c as d,d as te,et as f,n as p,ot as m,q as h,rt as ne,s as g}from"./browser-DbKCW2k6.js";import{g as _,m as re,o as v,s as ie}from"./Scrollbar-BHJ682ve.js";import{n as y,r as b}from"./Button-Cxh6x3Um.js";import{n as x,t as S}from"./Input-CZZ9TfBw.js";var C=o({name:`Add`,render(){return t(`svg`,{width:`512`,height:`512`,viewBox:`0 0 512 512`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},t(`path`,{d:`M256 112V400M400 256H112`,stroke:`currentColor`,"stroke-width":`32`,"stroke-linecap":`round`,"stroke-linejoin":`round`}))}}),w=o({name:`Remove`,render(){return t(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},t(`line`,{x1:`400`,y1:`256`,x2:`112`,y2:`256`,style:`
|
|
2
|
-
fill: none;
|
|
3
|
-
stroke: currentColor;
|
|
4
|
-
stroke-linecap: round;
|
|
5
|
-
stroke-linejoin: round;
|
|
6
|
-
stroke-width: 32px;
|
|
7
|
-
`}))}});function T(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}var ae=g({name:`InputNumber`,common:p,peers:{Button:b,Input:x},self:T}),oe=u([m(`input-number-suffix`,`
|
|
8
|
-
display: inline-block;
|
|
9
|
-
margin-right: 10px;
|
|
10
|
-
`),m(`input-number-prefix`,`
|
|
11
|
-
display: inline-block;
|
|
12
|
-
margin-left: 10px;
|
|
13
|
-
`)]);function se(e){return e==null||typeof e==`string`&&e.trim()===``?null:Number(e)}function E(e){return e.includes(`.`)&&(/^(-)?\d+.*(\.|0)$/.test(e)||/^-?\d*$/.test(e))||e===`-`||e===`-0`}function D(e){return e==null?!0:!Number.isNaN(e)}function O(e,t){return typeof e==`number`?t===void 0?String(e):e.toFixed(t):``}function k(e){if(e===null)return null;if(typeof e==`number`)return e;{let t=Number(e);return Number.isNaN(t)?null:t}}var A=800,j=100,M=o({name:`InputNumber`,props:Object.assign(Object.assign({},d.props),{autofocus:Boolean,loading:{type:Boolean,default:void 0},placeholder:String,defaultValue:{type:Number,default:null},value:Number,step:{type:[Number,String],default:1},min:[Number,String],max:[Number,String],size:String,disabled:{type:Boolean,default:void 0},validator:Function,bordered:{type:Boolean,default:void 0},showButton:{type:Boolean,default:!0},buttonPlacement:{type:String,default:`right`},inputProps:Object,readonly:Boolean,clearable:Boolean,keyboard:{type:Object,default:{}},updateValueOnInput:{type:Boolean,default:!0},round:{type:Boolean,default:void 0},parse:Function,format:Function,precision:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClear:[Function,Array],onChange:[Function,Array]}),slots:Object,setup(t){let{mergedBorderedRef:o,mergedClsPrefixRef:c,mergedRtlRef:l,mergedComponentPropsRef:u}=s(t),p=d(`InputNumber`,`-input-number`,oe,ae,t,c),{localeRef:m}=ie(`InputNumber`),g=ee(t,{mergedSize:e=>{let{size:n}=t;if(n)return n;let{mergedSize:r}=e||{};return r?.value?r.value:u?.value?.InputNumber?.size||`medium`}}),{mergedSizeRef:v,mergedDisabledRef:y,mergedStatusRef:b}=g,x=i(null),S=i(null),C=i(null),w=i(t.defaultValue),T=re(a(t,`value`),w),M=i(``),N=e=>{let t=String(e).split(`.`)[1];return t?t.length:0},P=e=>{let n=[t.min,t.max,t.step,e].map(e=>e===void 0?0:N(e));return Math.max(...n)},ce=f(()=>{let{placeholder:e}=t;return e===void 0?m.value.placeholder:e}),F=f(()=>{let e=k(t.step);return e===null||e===0?1:Math.abs(e)}),I=f(()=>{let e=k(t.min);return e===null?null:e}),L=f(()=>{let e=k(t.max);return e===null?null:e}),R=()=>{let{value:e}=T;if(D(e)){let{format:n,precision:r}=t;n?M.value=n(e):e===null||r===void 0||N(e)>r?M.value=O(e,void 0):M.value=O(e,r)}else M.value=String(e)};R();let z=e=>{let{value:n}=T;if(e===n){R();return}let{"onUpdate:value":r,onUpdateValue:i,onChange:a}=t,{nTriggerFormInput:o,nTriggerFormChange:s}=g;a&&h(a,e),i&&h(i,e),r&&h(r,e),w.value=e,o(),s()},B=({offset:e,doUpdateIfValid:n,fixPrecision:r,isInputing:i})=>{let{value:a}=M;if(i&&E(a))return!1;let o=(t.parse||se)(a);if(o===null)return n&&z(null),null;if(D(o)){let a=N(o),{precision:s}=t;if(s!==void 0&&s<a&&!r)return!1;let c=Number.parseFloat((o+e).toFixed(s??P(o)));if(D(c)){let{value:e}=L,{value:r}=I;if(e!==null&&c>e){if(!n||i)return!1;c=e}if(r!==null&&c<r){if(!n||i)return!1;c=r}return t.validator&&!t.validator(c)?!1:(n&&z(c),c)}}return!1},le=f(()=>B({offset:0,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})===!1),V=f(()=>{let{value:e}=T;if(t.validator&&e===null)return!1;let{value:n}=F;return B({offset:-n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1}),H=f(()=>{let{value:e}=T;if(t.validator&&e===null)return!1;let{value:n}=F;return B({offset:+n,doUpdateIfValid:!1,isInputing:!1,fixPrecision:!1})!==!1});function U(e){let{onFocus:n}=t,{nTriggerFormFocus:r}=g;n&&h(n,e),r()}function ue(e){if(e.target===x.value?.wrapperElRef)return;let r=B({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0});if(r!==!1){let e=x.value?.inputElRef;e&&(e.value=String(r||``)),T.value===r&&R()}else R();let{onBlur:i}=t,{nTriggerFormBlur:a}=g;i&&h(i,e),a(),n(()=>{R()})}function de(e){let{onClear:n}=t;n&&h(n,e)}function W(){let{value:e}=H;if(!e){Q();return}let{value:n}=T;if(n===null)t.validator||z(K());else{let{value:e}=F;B({offset:e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}function G(){let{value:e}=V;if(!e){X();return}let{value:n}=T;if(n===null)t.validator||z(K());else{let{value:e}=F;B({offset:-e,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})}}let fe=U,pe=ue;function K(){if(t.validator)return null;let{value:e}=I,{value:n}=L;return e===null?n===null?0:Math.min(0,n):Math.max(0,e)}function me(e){de(e),z(null)}function he(e){var t;C.value?.$el.contains(e.target)&&e.preventDefault(),S.value?.$el.contains(e.target)&&e.preventDefault(),(t=x.value)==null||t.activate()}let q=null,J=null,Y=null;function X(){Y&&=(window.clearTimeout(Y),null),q&&=(window.clearInterval(q),null)}let Z=null;function Q(){Z&&=(window.clearTimeout(Z),null),J&&=(window.clearInterval(J),null)}function $(){X(),Y=window.setTimeout(()=>{q=window.setInterval(()=>{G()},j)},A),_(`mouseup`,document,X,{once:!0})}function ge(){Q(),Z=window.setTimeout(()=>{J=window.setInterval(()=>{W()},j)},A),_(`mouseup`,document,Q,{once:!0})}let _e=()=>{J||W()},ve=()=>{q||G()};function ye(e){var n;if(e.key===`Enter`){if(e.target===x.value?.wrapperElRef)return;B({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&((n=x.value)==null||n.deactivate())}else if(e.key===`ArrowUp`){if(!H.value||t.keyboard.ArrowUp===!1)return;e.preventDefault(),B({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&W()}else if(e.key===`ArrowDown`){if(!V.value||t.keyboard.ArrowDown===!1)return;e.preventDefault(),B({offset:0,doUpdateIfValid:!0,isInputing:!1,fixPrecision:!0})!==!1&&G()}}function be(e){M.value=e,t.updateValueOnInput&&!t.format&&!t.parse&&t.precision===void 0&&B({offset:0,doUpdateIfValid:!0,isInputing:!0,fixPrecision:!1})}r(T,()=>{R()});let xe={focus:()=>x.value?.focus(),blur:()=>x.value?.blur(),select:()=>x.value?.select()},Se=te(`InputNumber`,l,c);return Object.assign(Object.assign({},xe),{rtlEnabled:Se,inputInstRef:x,minusButtonInstRef:S,addButtonInstRef:C,mergedClsPrefix:c,mergedBordered:o,uncontrolledValue:w,mergedValue:T,mergedPlaceholder:ce,displayedValueInvalid:le,mergedSize:v,mergedDisabled:y,displayedValue:M,addable:H,minusable:V,mergedStatus:b,handleFocus:fe,handleBlur:pe,handleClear:me,handleMouseDown:he,handleAddClick:_e,handleMinusClick:ve,handleAddMousedown:ge,handleMinusMousedown:$,handleKeyDown:ye,handleUpdateDisplayedValue:be,mergedTheme:p,inputThemeOverrides:{paddingSmall:`0 8px 0 10px`,paddingMedium:`0 8px 0 12px`,paddingLarge:`0 8px 0 14px`},buttonThemeOverrides:e(()=>{let{self:{iconColorDisabled:e}}=p.value,[t,n,r,i]=ne(e);return{textColorTextDisabled:`rgb(${t}, ${n}, ${r})`,opacityDisabled:`${i}`}})})},render(){let{mergedClsPrefix:e,$slots:n}=this,r=()=>t(y,{text:!0,disabled:!this.minusable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleMinusClick,onMousedown:this.handleMinusMousedown,ref:`minusButtonInstRef`},{icon:()=>l(n[`minus-icon`],()=>[t(v,{clsPrefix:e},{default:()=>t(w,null)})])}),i=()=>t(y,{text:!0,disabled:!this.addable||this.mergedDisabled||this.readonly,focusable:!1,theme:this.mergedTheme.peers.Button,themeOverrides:this.mergedTheme.peerOverrides.Button,builtinThemeOverrides:this.buttonThemeOverrides,onClick:this.handleAddClick,onMousedown:this.handleAddMousedown,ref:`addButtonInstRef`},{icon:()=>l(n[`add-icon`],()=>[t(v,{clsPrefix:e},{default:()=>t(C,null)})])});return t(`div`,{class:[`${e}-input-number`,this.rtlEnabled&&`${e}-input-number--rtl`]},t(S,{ref:`inputInstRef`,autofocus:this.autofocus,status:this.mergedStatus,bordered:this.mergedBordered,loading:this.loading,value:this.displayedValue,onUpdateValue:this.handleUpdateDisplayedValue,theme:this.mergedTheme.peers.Input,themeOverrides:this.mergedTheme.peerOverrides.Input,builtinThemeOverrides:this.inputThemeOverrides,size:this.mergedSize,placeholder:this.mergedPlaceholder,disabled:this.mergedDisabled,readonly:this.readonly,round:this.round,textDecoration:this.displayedValueInvalid?`line-through`:void 0,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeyDown,onMousedown:this.handleMouseDown,onClear:this.handleClear,clearable:this.clearable,inputProps:this.inputProps,internalLoadingBeforeSuffix:!0},{prefix:()=>this.showButton&&this.buttonPlacement===`both`?[r(),c(n.prefix,n=>n?t(`span`,{class:`${e}-input-number-prefix`},n):null)]:n.prefix?.call(n),suffix:()=>this.showButton?[c(n.suffix,n=>n?t(`span`,{class:`${e}-input-number-suffix`},n):null),this.buttonPlacement===`right`?r():null,i()]:n.suffix?.call(n)}))}});export{C as n,M as t};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{C as e,F as t,K as n,N as r,ct as i,dt as a,j as o}from"./router-mPoLLYeq.js";import{B as s,K as c,Q as l,W as u,at as d,c as f,ct as p,n as m,ot as h,q as g,s as _,z as v}from"./browser-DbKCW2k6.js";import{i as y,n as b,t as x}from"./Popover-0__1CUa3.js";import{o as S,s as C}from"./Scrollbar-BHJ682ve.js";import{o as w}from"./get-DUDt1SRf.js";import{r as T,t as E}from"./Button-Cxh6x3Um.js";import{n as D,t as O}from"./Warning-Srffo82k.js";import{t as k}from"./omit-DKSz8IbY.js";var A={iconSize:`22px`};function j(e){let{fontSize:t,warningColor:n}=e;return Object.assign(Object.assign({},A),{fontSize:t,iconColor:n})}var M=_({name:`Popconfirm`,common:m,peers:{Button:T,Popover:y},self:j}),N=l(`n-popconfirm`),P={positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0}},F=D(P),I=o({name:`NPopconfirmPanel`,props:P,setup(n){let{localeRef:r}=C(`Popconfirm`),{inlineThemeDisabled:i}=s(),{mergedClsPrefixRef:o,mergedThemeRef:c,props:l}=t(N),u=e(()=>{let{common:{cubicBezierEaseInOut:e},self:{fontSize:t,iconSize:n,iconColor:r}}=c.value;return{"--n-bezier":e,"--n-font-size":t,"--n-icon-size":n,"--n-icon-color":r}}),d=i?v(`popconfirm-panel`,void 0,u,l):void 0;return Object.assign(Object.assign({},C(`Popconfirm`)),{mergedClsPrefix:o,cssVars:i?void 0:u,localizedPositiveText:e(()=>n.positiveText||r.value.positiveText),localizedNegativeText:e(()=>n.negativeText||r.value.negativeText),positiveButtonProps:a(l,`positiveButtonProps`),negativeButtonProps:a(l,`negativeButtonProps`),handlePositiveClick(e){n.onPositiveClick(e)},handleNegativeClick(e){n.onNegativeClick(e)},themeClass:d?.themeClass,onRender:d?.onRender})},render(){var e;let{mergedClsPrefix:t,showIcon:n,$slots:i}=this,a=u(i.action,()=>this.negativeText===null&&this.positiveText===null?[]:[this.negativeText!==null&&r(E,Object.assign({size:`small`,onClick:this.handleNegativeClick},this.negativeButtonProps),{default:()=>this.localizedNegativeText}),this.positiveText!==null&&r(E,Object.assign({size:`small`,type:`primary`,onClick:this.handlePositiveClick},this.positiveButtonProps),{default:()=>this.localizedPositiveText})]);return(e=this.onRender)==null||e.call(this),r(`div`,{class:[`${t}-popconfirm__panel`,this.themeClass],style:this.cssVars},c(i.default,e=>n||e?r(`div`,{class:`${t}-popconfirm__body`},n?r(`div`,{class:`${t}-popconfirm__icon`},u(i.icon,()=>[r(S,{clsPrefix:t},{default:()=>r(O,null)})])):null,e):null),a?r(`div`,{class:[`${t}-popconfirm__action`]},a):null)}}),L=h(`popconfirm`,[p(`body`,`
|
|
2
|
-
font-size: var(--n-font-size);
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
flex-wrap: nowrap;
|
|
6
|
-
position: relative;
|
|
7
|
-
`,[p(`icon`,`
|
|
8
|
-
display: flex;
|
|
9
|
-
font-size: var(--n-icon-size);
|
|
10
|
-
color: var(--n-icon-color);
|
|
11
|
-
transition: color .3s var(--n-bezier);
|
|
12
|
-
margin: 0 8px 0 0;
|
|
13
|
-
`)]),p(`action`,`
|
|
14
|
-
display: flex;
|
|
15
|
-
justify-content: flex-end;
|
|
16
|
-
`,[d(`&:not(:first-child)`,`margin-top: 8px`),h(`button`,[d(`&:not(:last-child)`,`margin-right: 8px;`)])])]),R=o({name:`Popconfirm`,props:Object.assign(Object.assign(Object.assign({},f.props),b),{positiveText:String,negativeText:String,showIcon:{type:Boolean,default:!0},trigger:{type:String,default:`click`},positiveButtonProps:Object,negativeButtonProps:Object,onPositiveClick:Function,onNegativeClick:Function}),slots:Object,__popover__:!0,setup(e){let{mergedClsPrefixRef:t}=s(),r=f(`Popconfirm`,`-popconfirm`,L,M,e,t),a=i(null);function o(t){if(!a.value?.getMergedShow())return;let{onPositiveClick:n,"onUpdate:show":r}=e;Promise.resolve(n?n(t):!0).then(e=>{var t;e!==!1&&((t=a.value)==null||t.setShow(!1),r&&g(r,!1))})}function c(t){if(!a.value?.getMergedShow())return;let{onNegativeClick:n,"onUpdate:show":r}=e;Promise.resolve(n?n(t):!0).then(e=>{var t;e!==!1&&((t=a.value)==null||t.setShow(!1),r&&g(r,!1))})}return n(N,{mergedThemeRef:r,mergedClsPrefixRef:t,props:e}),{setShow(e){var t;(t=a.value)==null||t.setShow(e)},syncPosition(){var e;(e=a.value)==null||e.syncPosition()},mergedTheme:r,popoverInstRef:a,handlePositiveClick:o,handleNegativeClick:c}},render(){let{$slots:e,$props:t,mergedTheme:n}=this;return r(x,Object.assign({},k(t,F),{theme:n.peers.Popover,themeOverrides:n.peerOverrides.Popover,internalExtraClass:[`popconfirm`],ref:`popoverInstRef`}),{trigger:e.trigger,default:()=>{let n=w(t,F);return r(I,Object.assign({},n,{onPositiveClick:this.handlePositiveClick,onNegativeClick:this.handleNegativeClick}),e)}})}});export{R as t};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import{$ as e,C as t,F as n,K as r,L as i,M as a,N as o,R as s,S as c,U as l,V as u,X as d,Z as f,ct as p,d as m,dt as h,h as g,j as _,x as v,y}from"./router-mPoLLYeq.js";import{$ as b,A as x,B as S,C,D as w,E as T,F as E,I as D,K as O,M as k,N as A,O as j,P as M,Q as N,S as P,T as F,U as ee,X as te,_ as I,at as L,b as ne,c as re,ct as ie,d as ae,et as R,g as oe,h as z,j as se,k as B,lt as V,m as ce,mt as le,n as ue,ot as H,p as de,q as U,s as fe,st as pe,ut as me,v as he,w as ge,x as _e,y as ve,z as ye}from"./browser-DbKCW2k6.js";import{b as be,g as W,h as G,l as xe,m as Se,n as Ce,r as we}from"./Scrollbar-BHJ682ve.js";import{C as Te,_ as Ee,a as De,d as Oe,f as ke,g as Ae,h as je,i as Me,m as Ne,n as Pe,o as Fe,p as Ie,r as Le,s as Re,t as ze,u as Be,v as Ve,x as He}from"./get-DUDt1SRf.js";import{t as Ue}from"./use-compitable-aofta5ri.js";var We=[],Ge=new WeakMap;function Ke(){We.forEach(e=>e(...Ge.get(e))),We=[]}function qe(e,...t){Ge.set(e,t),!We.includes(e)&&We.push(e)===1&&requestAnimationFrame(Ke)}var Je=Te?document?.fonts?.ready:void 0,Ye=!1;Je===void 0?Ye=!0:Je.then(()=>{Ye=!0});function Xe(e){if(Ye)return;let t=!1;l(()=>{Ye||Je?.then(()=>{t||e()})}),u(()=>{t=!0})}var Ze=N(`n-internal-select-menu`),Qe=N(`n-internal-select-menu-body`),$e=`__disabled__`;function K(e){let t=n(Ve,null),r=n(He,null),i=n(Ee,null),a=n(Qe,null),o=p();if(typeof document<`u`){o.value=document.fullscreenElement;let e=()=>{o.value=document.fullscreenElement};l(()=>{W(`fullscreenchange`,document,e)}),u(()=>{G(`fullscreenchange`,document,e)})}return R(()=>{let{to:n}=e;return n===void 0?t?.value?t.value.$el??t.value:r?.value?r.value:i?.value?i.value:a?.value?a.value:n??(o.value||`body`):n===!1?$e:n===!0?o.value||`body`:n})}K.tdkey=$e,K.propTo={type:[String,Object,Boolean],default:void 0};var q=null;function et(){if(q===null&&(q=document.getElementById(`v-binder-view-measurer`),q===null)){q=document.createElement(`div`),q.id=`v-binder-view-measurer`;let{style:e}=q;e.position=`fixed`,e.left=`0`,e.right=`0`,e.top=`0`,e.bottom=`0`,e.pointerEvents=`none`,e.visibility=`hidden`,document.body.appendChild(q)}return q.getBoundingClientRect()}function tt(e,t){let n=et();return{top:t,left:e,height:0,width:0,right:n.width-e,bottom:n.height-t}}function nt(e){let t=e.getBoundingClientRect(),n=et();return{left:t.left-n.left,top:t.top-n.top,bottom:n.height+n.top-t.bottom,right:n.width+n.left-t.right,width:t.width,height:t.height}}function rt(e){return e.nodeType===9?null:e.parentNode}function it(e){if(e===null)return null;let t=rt(e);if(t===null)return null;if(t.nodeType===9)return document;if(t.nodeType===1){let{overflow:e,overflowX:n,overflowY:r}=getComputedStyle(t);if(/(auto|scroll|overlay)/.test(e+r+n))return t}return it(t)}var at=_({name:`Binder`,props:{syncTargetWithParent:Boolean,syncTarget:{type:Boolean,default:!0}},setup(e){r(`VBinder`,a()?.proxy);let t=n(`VBinder`,null),i=p(null),o=n=>{i.value=n,t&&e.syncTargetWithParent&&t.setTargetRef(n)},s=[],c=()=>{let e=i.value;for(;e=it(e),e!==null;)s.push(e);for(let e of s)W(`scroll`,e,h,!0)},l=()=>{for(let e of s)G(`scroll`,e,h,!0);s=[]},d=new Set,f=e=>{d.size===0&&c(),d.has(e)||d.add(e)},m=e=>{d.has(e)&&d.delete(e),d.size===0&&l()},h=()=>{qe(g)},g=()=>{d.forEach(e=>e())},_=new Set,v=e=>{_.size===0&&W(`resize`,window,b),_.has(e)||_.add(e)},y=e=>{_.has(e)&&_.delete(e),_.size===0&&G(`resize`,window,b)},b=()=>{_.forEach(e=>e())};return u(()=>{G(`resize`,window,b),l()}),{targetRef:i,setTargetRef:o,addScrollListener:f,removeScrollListener:m,addResizeListener:v,removeResizeListener:y}},render(){return Ae(`binder`,this.$slots)}}),ot=_({name:`Target`,setup(){let{setTargetRef:e,syncTarget:t}=n(`VBinder`);return{syncTarget:t,setTargetDirective:{mounted:e,updated:e}}},render(){let{syncTarget:t,setTargetDirective:n}=this;return t?e(je(`follower`,this.$slots),[[n]]):je(`follower`,this.$slots)}}),J=`@@mmoContext`,st={mounted(e,{value:t}){e[J]={handler:void 0},typeof t==`function`&&(e[J].handler=t,W(`mousemoveoutside`,e,t))},updated(e,{value:t}){let n=e[J];typeof t==`function`?n.handler?n.handler!==t&&(G(`mousemoveoutside`,e,n.handler),n.handler=t,W(`mousemoveoutside`,e,t)):(e[J].handler=t,W(`mousemoveoutside`,e,t)):n.handler&&=(G(`mousemoveoutside`,e,n.handler),void 0)},unmounted(e){let{handler:t}=e[J];t&&G(`mousemoveoutside`,e,t),e[J].handler=void 0}},{c:Y}=le(),ct=`vueuc-style`,lt={top:`bottom`,bottom:`top`,left:`right`,right:`left`},ut={start:`end`,center:`center`,end:`start`},dt={top:`height`,bottom:`height`,left:`width`,right:`width`},ft={"bottom-start":`top left`,bottom:`top center`,"bottom-end":`top right`,"top-start":`bottom left`,top:`bottom center`,"top-end":`bottom right`,"right-start":`top left`,right:`center left`,"right-end":`bottom left`,"left-start":`top right`,left:`center right`,"left-end":`bottom right`},pt={"bottom-start":`bottom left`,bottom:`bottom center`,"bottom-end":`bottom right`,"top-start":`top left`,top:`top center`,"top-end":`top right`,"right-start":`top right`,right:`center right`,"right-end":`bottom right`,"left-start":`top left`,left:`center left`,"left-end":`bottom left`},mt={"bottom-start":`right`,"bottom-end":`left`,"top-start":`right`,"top-end":`left`,"right-start":`bottom`,"right-end":`top`,"left-start":`bottom`,"left-end":`top`},ht={top:!0,bottom:!1,left:!0,right:!1},gt={top:`end`,bottom:`start`,left:`end`,right:`start`};function _t(e,t,n,r,i,a){if(!i||a)return{placement:e,top:0,left:0};let[o,s]=e.split(`-`),c=s??`center`,l={top:0,left:0},u=(e,i,a)=>{let o=0,s=0,c=n[e]-t[i]-t[e];return c>0&&r&&(a?s=ht[i]?c:-c:o=ht[i]?c:-c),{left:o,top:s}},d=o===`left`||o===`right`;if(c!==`center`){let r=mt[e],i=lt[r],a=dt[r];if(n[a]>t[a]){if(t[r]+t[a]<n[a]){let e=(n[a]-t[a])/2;t[r]<e||t[i]<e?t[r]<t[i]?(c=ut[s],l=u(a,i,d)):l=u(a,r,d):c=`center`}}else n[a]<t[a]&&t[i]<0&&t[r]>t[i]&&(c=ut[s])}else{let e=o===`bottom`||o===`top`?`left`:`top`,r=lt[e],i=dt[e],a=(n[i]-t[i])/2;(t[e]<a||t[r]<a)&&(t[e]>t[r]?(c=gt[e],l=u(i,e,d)):(c=gt[r],l=u(i,r,d)))}let f=o;return t[o]<n[dt[o]]&&t[o]<t[lt[o]]&&(f=lt[o]),{placement:c===`center`?f:`${f}-${c}`,left:l.left,top:l.top}}function vt(e,t){return t?pt[e]:ft[e]}function yt(e,t,n,r,i,a){if(a)switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`top-end`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%)`};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left)}px`,transform:``};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left+n.width)}px`,transform:`translateX(-100%) translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2)}px`,left:`${Math.round(n.left-t.left)}px`,transform:`translateY(-50%)`};default:return{top:`${Math.round(n.top-t.top+n.height)}px`,left:`${Math.round(n.left-t.left+n.width/2)}px`,transform:`translateX(-50%) translateY(-100%)`}}switch(e){case`bottom-start`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:``};case`bottom-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%)`};case`top-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-100%)`};case`top-end`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`right-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:``};case`right-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-100%)`};case`left-start`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%)`};case`left-end`:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateX(-100%) translateY(-100%)`};case`top`:return{top:`${Math.round(n.top-t.top+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateY(-100%) translateX(-50%)`};case`right`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+n.width+i)}px`,transform:`translateY(-50%)`};case`left`:return{top:`${Math.round(n.top-t.top+n.height/2+r)}px`,left:`${Math.round(n.left-t.left+i)}px`,transform:`translateY(-50%) translateX(-100%)`};default:return{top:`${Math.round(n.top-t.top+n.height+r)}px`,left:`${Math.round(n.left-t.left+n.width/2+i)}px`,transform:`translateX(-50%)`}}}var bt=Y([Y(`.v-binder-follower-container`,{position:`absolute`,left:`0`,right:`0`,top:`0`,height:`0`,pointerEvents:`none`,zIndex:`auto`}),Y(`.v-binder-follower-content`,{position:`absolute`,zIndex:`auto`},[Y(`> *`,{pointerEvents:`all`})])]),xt=_({name:`Follower`,inheritAttrs:!1,props:{show:Boolean,enabled:{type:Boolean,default:void 0},placement:{type:String,default:`bottom`},syncTrigger:{type:Array,default:[`resize`,`scroll`]},to:[String,Object],flip:{type:Boolean,default:!0},internalShift:Boolean,x:Number,y:Number,width:String,minWidth:String,containerClass:String,teleportDisabled:Boolean,zindexable:{type:Boolean,default:!0},zIndex:Number,overlap:Boolean},setup(e){let t=n(`VBinder`),r=R(()=>e.enabled===void 0?e.show:e.enabled),i=p(null),a=p(null),o=()=>{let{syncTrigger:n}=e;n.includes(`scroll`)&&t.addScrollListener(m),n.includes(`resize`)&&t.addResizeListener(m)},c=()=>{t.removeScrollListener(m),t.removeResizeListener(m)};l(()=>{r.value&&(m(),o())});let f=te();bt.mount({id:`vueuc/binder`,head:!0,anchorMetaName:ct,ssr:f}),u(()=>{c()}),Xe(()=>{r.value&&m()});let m=()=>{if(!r.value)return;let n=i.value;if(n===null)return;let o=t.targetRef,{x:s,y:c,overlap:l}=e,u=s!==void 0&&c!==void 0?tt(s,c):nt(o);n.style.setProperty(`--v-target-width`,`${Math.round(u.width)}px`),n.style.setProperty(`--v-target-height`,`${Math.round(u.height)}px`);let{width:d,minWidth:f,placement:p,internalShift:m,flip:h}=e;n.setAttribute(`v-placement`,p),l?n.setAttribute(`v-overlap`,``):n.removeAttribute(`v-overlap`);let{style:g}=n;d===`target`?g.width=`${u.width}px`:d===void 0?g.width=``:g.width=d,f===`target`?g.minWidth=`${u.width}px`:f===void 0?g.minWidth=``:g.minWidth=f;let _=nt(n),v=nt(a.value),{left:y,top:b,placement:x}=_t(p,u,_,m,h,l),S=vt(x,l),{left:C,top:w,transform:T}=yt(x,v,u,b,y,l);n.setAttribute(`v-placement`,x),n.style.setProperty(`--v-offset-left`,`${Math.round(y)}px`),n.style.setProperty(`--v-offset-top`,`${Math.round(b)}px`),n.style.transform=`translateX(${C}) translateY(${w}) ${T}`,n.style.setProperty(`--v-transform-origin`,S),n.style.transformOrigin=S};d(r,e=>{e?(o(),g()):c()});let g=()=>{s().then(m).catch(e=>console.error(e))};[`placement`,`x`,`y`,`internalShift`,`flip`,`width`,`overlap`,`minWidth`].forEach(t=>{d(h(e,t),m)}),[`teleportDisabled`].forEach(t=>{d(h(e,t),g)}),d(h(e,`syncTrigger`),e=>{e.includes(`resize`)?t.addResizeListener(m):t.removeResizeListener(m),e.includes(`scroll`)?t.addScrollListener(m):t.removeScrollListener(m)});let _=b();return{VBinder:t,mergedEnabled:r,offsetContainerRef:a,followerRef:i,mergedTo:R(()=>{let{to:t}=e;if(t!==void 0)return t;_.value}),syncPosition:m}},render(){return o(ke,{show:this.show,to:this.mergedTo,disabled:this.teleportDisabled},{default:()=>{var t;let n=o(`div`,{class:[`v-binder-follower-container`,this.containerClass],ref:`offsetContainerRef`},[o(`div`,{class:`v-binder-follower-content`,ref:`followerRef`},(t=this.$slots).default?.call(t))]);return this.zindexable?e(n,[[Ie,{enabled:this.mergedEnabled,zIndex:this.zIndex}]]):n}})}}),St;function Ct(){return St===void 0&&(St=navigator.userAgent.includes(`Node.js`)||navigator.userAgent.includes(`jsdom`)),St}var wt=j(D,`WeakMap`),Tt=he(Object.keys,Object),Et=Object.prototype.hasOwnProperty;function Dt(e){if(!C(e))return Tt(e);var t=[];for(var n in Object(e))Et.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Ot(e){return ge(e)?ve(e):Dt(e)}function kt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function At(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function jt(){return[]}var Mt=Object.prototype.propertyIsEnumerable,Nt=Object.getOwnPropertySymbols,Pt=Nt?function(e){return e==null?[]:(e=Object(e),At(Nt(e),function(t){return Mt.call(e,t)}))}:jt;function Ft(e,t,n){var r=t(e);return k(e)?r:kt(r,n(e))}function It(e){return Ft(e,Ot,Pt)}var Lt=j(D,`DataView`),Rt=j(D,`Promise`),zt=j(D,`Set`),Bt=`[object Map]`,Vt=`[object Object]`,Ht=`[object Promise]`,Ut=`[object Set]`,Wt=`[object WeakMap]`,Gt=`[object DataView]`,Kt=B(Lt),qt=B(I),Jt=B(Rt),Yt=B(zt),Xt=B(wt),X=M;(Lt&&X(new Lt(new ArrayBuffer(1)))!=Gt||I&&X(new I)!=Bt||Rt&&X(Rt.resolve())!=Ht||zt&&X(new zt)!=Ut||wt&&X(new wt)!=Wt)&&(X=function(e){var t=M(e),n=t==Vt?e.constructor:void 0,r=n?B(n):``;if(r)switch(r){case Kt:return Gt;case qt:return Bt;case Jt:return Ht;case Yt:return Ut;case Xt:return Wt}return t});var Zt=X,Qt=`__lodash_hash_undefined__`;function $t(e){return this.__data__.set(e,Qt),this}function en(e){return this.__data__.has(e)}function tn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new oe;++t<n;)this.add(e[t])}tn.prototype.add=tn.prototype.push=$t,tn.prototype.has=en;function nn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function rn(e,t){return e.has(t)}var an=1,on=2;function sn(e,t,n,r,i,a){var o=n&an,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&on?new tn:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!nn(t,function(e,t){if(!rn(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function cn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var un=1,dn=2,fn=`[object Boolean]`,pn=`[object Date]`,mn=`[object Error]`,hn=`[object Map]`,gn=`[object Number]`,_n=`[object RegExp]`,vn=`[object Set]`,yn=`[object String]`,bn=`[object Symbol]`,xn=`[object ArrayBuffer]`,Sn=`[object DataView]`,Cn=E?E.prototype:void 0,wn=Cn?Cn.valueOf:void 0;function Tn(e,t,n,r,i,a,o){switch(n){case Sn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xn:return!(e.byteLength!=t.byteLength||!a(new ce(e),new ce(t)));case fn:case pn:case gn:return T(+e,+t);case mn:return e.name==t.name&&e.message==t.message;case _n:case yn:return e==t+``;case hn:var s=cn;case vn:var c=r&un;if(s||=ln,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=dn,o.set(e,t);var u=sn(s(e),s(t),r,i,a,o);return o.delete(e),u;case bn:if(wn)return wn.call(e)==wn.call(t)}return!1}var En=1,Dn=Object.prototype.hasOwnProperty;function On(e,t,n,r,i,a){var o=n&En,s=It(e),c=s.length;if(c!=It(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Dn.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var kn=1,An=`[object Arguments]`,jn=`[object Array]`,Mn=`[object Object]`,Nn=Object.prototype.hasOwnProperty;function Pn(e,t,n,r,i,a){var o=k(e),s=k(t),c=o?jn:Zt(e),l=s?jn:Zt(t);c=c==An?Mn:c,l=l==An?Mn:l;var u=c==Mn,d=l==Mn,f=c==l;if(f&&_e(e)){if(!_e(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new z,o||ne(e)?sn(e,t,n,r,i,a):Tn(e,t,c,n,r,i,a);if(!(n&kn)){var p=u&&Nn.call(e,`__wrapped__`),m=d&&Nn.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new z,i(h,g,n,r,a)}}return f?(a||=new z,On(e,t,n,r,i,a)):!1}function Fn(e,t,n,r,i){return e===t?!0:e==null||t==null||!A(e)&&!A(t)?e!==e&&t!==t:Pn(e,t,n,r,Fn,i)}var In=1,Ln=2;function Rn(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new z;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?Fn(u,l,In|Ln,r,d):f))return!1}}return!0}function zn(e){return e===e&&!se(e)}function Bn(e){for(var t=Ot(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,zn(i)]}return t}function Vn(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function Hn(e){var t=Bn(e);return t.length==1&&t[0][2]?Vn(t[0][0],t[0][1]):function(n){return n===e||Rn(n,e,t)}}function Un(e,t){return e!=null&&t in Object(e)}function Wn(e,t,n){t=Me(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=Le(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&F(i)&&w(o,i)&&(k(e)||P(e)))}function Gn(e,t){return e!=null&&Wn(e,t,Un)}var Kn=1,qn=2;function Jn(e,t){return De(e)&&zn(t)?Vn(Le(e),t):function(n){var r=ze(n,e);return r===void 0&&r===t?Gn(n,e):Fn(t,r,Kn|qn)}}function Yn(e){return function(t){return t?.[e]}}function Xn(e){return function(t){return Pe(t,e)}}function Zn(e){return De(e)?Yn(Le(e)):Xn(e)}function Qn(e){return typeof e==`function`?e:e==null?x:typeof e==`object`?k(e)?Jn(e[0],e[1]):Hn(e):Zn(e)}function $n(e,t){return e&&de(e,t,Ot)}function er(e,t){return function(n,r){if(n==null)return n;if(!ge(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var tr=er($n);function nr(e,t){var n=-1,r=ge(e)?Array(e.length):[];return tr(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function rr(e,t){return(k(e)?xe:nr)(e,Qn(t,3))}var ir={space:`6px`,spaceArrow:`10px`,arrowOffset:`10px`,arrowOffsetVertical:`10px`,arrowHeight:`6px`,padding:`8px 14px`};function ar(e){let{boxShadow2:t,popoverColor:n,textColor2:r,borderRadius:i,fontSize:a,dividerColor:o}=e;return Object.assign(Object.assign({},ir),{fontSize:a,borderRadius:i,color:n,dividerColor:o,textColor:r,boxShadow:t})}var or=fe({name:`Popover`,common:ue,peers:{Scrollbar:we},self:ar}),sr={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Z=`var(--n-arrow-height) * 1.414`,cr=L([H(`popover`,`
|
|
2
|
-
transition:
|
|
3
|
-
box-shadow .3s var(--n-bezier),
|
|
4
|
-
background-color .3s var(--n-bezier),
|
|
5
|
-
color .3s var(--n-bezier);
|
|
6
|
-
position: relative;
|
|
7
|
-
font-size: var(--n-font-size);
|
|
8
|
-
color: var(--n-text-color);
|
|
9
|
-
box-shadow: var(--n-box-shadow);
|
|
10
|
-
word-break: break-word;
|
|
11
|
-
`,[L(`>`,[H(`scrollbar`,`
|
|
12
|
-
height: inherit;
|
|
13
|
-
max-height: inherit;
|
|
14
|
-
`)]),me(`raw`,`
|
|
15
|
-
background-color: var(--n-color);
|
|
16
|
-
border-radius: var(--n-border-radius);
|
|
17
|
-
`,[me(`scrollable`,[me(`show-header-or-footer`,`padding: var(--n-padding);`)])]),ie(`header`,`
|
|
18
|
-
padding: var(--n-padding);
|
|
19
|
-
border-bottom: 1px solid var(--n-divider-color);
|
|
20
|
-
transition: border-color .3s var(--n-bezier);
|
|
21
|
-
`),ie(`footer`,`
|
|
22
|
-
padding: var(--n-padding);
|
|
23
|
-
border-top: 1px solid var(--n-divider-color);
|
|
24
|
-
transition: border-color .3s var(--n-bezier);
|
|
25
|
-
`),V(`scrollable, show-header-or-footer`,[ie(`content`,`
|
|
26
|
-
padding: var(--n-padding);
|
|
27
|
-
`)])]),H(`popover-shared`,`
|
|
28
|
-
transform-origin: inherit;
|
|
29
|
-
`,[H(`popover-arrow-wrapper`,`
|
|
30
|
-
position: absolute;
|
|
31
|
-
overflow: hidden;
|
|
32
|
-
pointer-events: none;
|
|
33
|
-
`,[H(`popover-arrow`,`
|
|
34
|
-
transition: background-color .3s var(--n-bezier);
|
|
35
|
-
position: absolute;
|
|
36
|
-
display: block;
|
|
37
|
-
width: calc(${Z});
|
|
38
|
-
height: calc(${Z});
|
|
39
|
-
box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12);
|
|
40
|
-
transform: rotate(45deg);
|
|
41
|
-
background-color: var(--n-color);
|
|
42
|
-
pointer-events: all;
|
|
43
|
-
`)]),L(`&.popover-transition-enter-from, &.popover-transition-leave-to`,`
|
|
44
|
-
opacity: 0;
|
|
45
|
-
transform: scale(.85);
|
|
46
|
-
`),L(`&.popover-transition-enter-to, &.popover-transition-leave-from`,`
|
|
47
|
-
transform: scale(1);
|
|
48
|
-
opacity: 1;
|
|
49
|
-
`),L(`&.popover-transition-enter-active`,`
|
|
50
|
-
transition:
|
|
51
|
-
box-shadow .3s var(--n-bezier),
|
|
52
|
-
background-color .3s var(--n-bezier),
|
|
53
|
-
color .3s var(--n-bezier),
|
|
54
|
-
opacity .15s var(--n-bezier-ease-out),
|
|
55
|
-
transform .15s var(--n-bezier-ease-out);
|
|
56
|
-
`),L(`&.popover-transition-leave-active`,`
|
|
57
|
-
transition:
|
|
58
|
-
box-shadow .3s var(--n-bezier),
|
|
59
|
-
background-color .3s var(--n-bezier),
|
|
60
|
-
color .3s var(--n-bezier),
|
|
61
|
-
opacity .15s var(--n-bezier-ease-in),
|
|
62
|
-
transform .15s var(--n-bezier-ease-in);
|
|
63
|
-
`)]),$(`top-start`,`
|
|
64
|
-
top: calc(${Z} / -2);
|
|
65
|
-
left: calc(${Q(`top-start`)} - var(--v-offset-left));
|
|
66
|
-
`),$(`top`,`
|
|
67
|
-
top: calc(${Z} / -2);
|
|
68
|
-
transform: translateX(calc(${Z} / -2)) rotate(45deg);
|
|
69
|
-
left: 50%;
|
|
70
|
-
`),$(`top-end`,`
|
|
71
|
-
top: calc(${Z} / -2);
|
|
72
|
-
right: calc(${Q(`top-end`)} + var(--v-offset-left));
|
|
73
|
-
`),$(`bottom-start`,`
|
|
74
|
-
bottom: calc(${Z} / -2);
|
|
75
|
-
left: calc(${Q(`bottom-start`)} - var(--v-offset-left));
|
|
76
|
-
`),$(`bottom`,`
|
|
77
|
-
bottom: calc(${Z} / -2);
|
|
78
|
-
transform: translateX(calc(${Z} / -2)) rotate(45deg);
|
|
79
|
-
left: 50%;
|
|
80
|
-
`),$(`bottom-end`,`
|
|
81
|
-
bottom: calc(${Z} / -2);
|
|
82
|
-
right: calc(${Q(`bottom-end`)} + var(--v-offset-left));
|
|
83
|
-
`),$(`left-start`,`
|
|
84
|
-
left: calc(${Z} / -2);
|
|
85
|
-
top: calc(${Q(`left-start`)} - var(--v-offset-top));
|
|
86
|
-
`),$(`left`,`
|
|
87
|
-
left: calc(${Z} / -2);
|
|
88
|
-
transform: translateY(calc(${Z} / -2)) rotate(45deg);
|
|
89
|
-
top: 50%;
|
|
90
|
-
`),$(`left-end`,`
|
|
91
|
-
left: calc(${Z} / -2);
|
|
92
|
-
bottom: calc(${Q(`left-end`)} + var(--v-offset-top));
|
|
93
|
-
`),$(`right-start`,`
|
|
94
|
-
right: calc(${Z} / -2);
|
|
95
|
-
top: calc(${Q(`right-start`)} - var(--v-offset-top));
|
|
96
|
-
`),$(`right`,`
|
|
97
|
-
right: calc(${Z} / -2);
|
|
98
|
-
transform: translateY(calc(${Z} / -2)) rotate(45deg);
|
|
99
|
-
top: 50%;
|
|
100
|
-
`),$(`right-end`,`
|
|
101
|
-
right: calc(${Z} / -2);
|
|
102
|
-
bottom: calc(${Q(`right-end`)} + var(--v-offset-top));
|
|
103
|
-
`),...rr({top:[`right-start`,`left-start`],right:[`top-end`,`bottom-end`],bottom:[`right-end`,`left-end`],left:[`top-start`,`bottom-start`]},(e,t)=>{let n=[`right`,`left`].includes(t),r=n?`width`:`height`;return e.map(e=>{let i=e.split(`-`)[1]===`end`,a=`calc((${`var(--v-target-${r}, 0px)`} - ${Z}) / 2)`,o=Q(e);return L(`[v-placement="${e}"] >`,[H(`popover-shared`,[V(`center-arrow`,[H(`popover-arrow`,`${t}: calc(max(${a}, ${o}) ${i?`+`:`-`} var(--v-offset-${n?`left`:`top`}));`)])])])})})]);function Q(e){return[`top`,`bottom`].includes(e.split(`-`)[0])?`var(--n-arrow-offset)`:`var(--n-arrow-offset-vertical)`}function $(e,t){let n=e.split(`-`)[0],r=[`top`,`bottom`].includes(n)?`height: var(--n-space-arrow);`:`width: var(--n-space-arrow);`;return L(`[v-placement="${e}"] >`,[H(`popover-shared`,`
|
|
104
|
-
margin-${sr[n]}: var(--n-space);
|
|
105
|
-
`,[V(`show-arrow`,`
|
|
106
|
-
margin-${sr[n]}: var(--n-space-arrow);
|
|
107
|
-
`),V(`overlap`,`
|
|
108
|
-
margin: 0;
|
|
109
|
-
`),pe(`popover-arrow-wrapper`,`
|
|
110
|
-
right: 0;
|
|
111
|
-
left: 0;
|
|
112
|
-
top: 0;
|
|
113
|
-
bottom: 0;
|
|
114
|
-
${n}: 100%;
|
|
115
|
-
${sr[n]}: auto;
|
|
116
|
-
${r}
|
|
117
|
-
`,[H(`popover-arrow`,t)])])])}var lr=Object.assign(Object.assign({},re.props),{to:K.propTo,show:Boolean,trigger:String,showArrow:Boolean,delay:Number,duration:Number,raw:Boolean,arrowPointToCenter:Boolean,arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],displayDirective:String,x:Number,y:Number,flip:Boolean,overlap:Boolean,placement:String,width:[Number,String],keepAliveOnHover:Boolean,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],internalDeactivateImmediately:Boolean,animated:Boolean,onClickoutside:Function,internalTrapFocus:Boolean,internalOnAfterLeave:Function,minWidth:Number,maxWidth:Number});function ur({arrowClass:e,arrowStyle:t,arrowWrapperClass:n,arrowWrapperStyle:r,clsPrefix:i}){return o(`div`,{key:`__popover-arrow__`,style:r,class:[`${i}-popover-arrow-wrapper`,n]},o(`div`,{class:[`${i}-popover-arrow`,e],style:t}))}var dr=_({name:`PopoverBody`,inheritAttrs:!1,props:lr,setup(a,{slots:s,attrs:c}){let{namespaceRef:l,mergedClsPrefixRef:m,inlineThemeDisabled:_,mergedRtlRef:v}=S(a),b=re(`Popover`,`-popover`,cr,or,a,m),x=ae(`Popover`,v,m),C=p(null),w=n(`NPopover`),T=p(null),E=p(a.show),D=p(!1);f(()=>{let{show:e}=a;e&&!Ct()&&!a.internalDeactivateImmediately&&(D.value=!0)});let k=t(()=>{let{trigger:e,onClickoutside:t}=a,n=[],{positionManuallyRef:{value:r}}=w;return r||(e===`click`&&!t&&n.push([Ne,I,void 0,{capture:!0}]),e===`hover`&&n.push([st,te])),t&&n.push([Ne,I,void 0,{capture:!0}]),(a.displayDirective===`show`||a.animated&&D.value)&&n.push([g,a.show]),n}),A=t(()=>{let{common:{cubicBezierEaseInOut:e,cubicBezierEaseIn:t,cubicBezierEaseOut:n},self:{space:r,spaceArrow:i,padding:a,fontSize:o,textColor:s,dividerColor:c,color:l,boxShadow:u,borderRadius:d,arrowHeight:f,arrowOffset:p,arrowOffsetVertical:m}}=b.value;return{"--n-box-shadow":u,"--n-bezier":e,"--n-bezier-ease-in":t,"--n-bezier-ease-out":n,"--n-font-size":o,"--n-text-color":s,"--n-color":l,"--n-divider-color":c,"--n-border-radius":d,"--n-arrow-height":f,"--n-arrow-offset":p,"--n-arrow-offset-vertical":m,"--n-padding":a,"--n-space":r,"--n-space-arrow":i}}),j=t(()=>{let e=a.width===`trigger`?void 0:Be(a.width),t=[];e&&t.push({width:e});let{maxWidth:n,minWidth:r}=a;return n&&t.push({maxWidth:Be(n)}),r&&t.push({maxWidth:Be(r)}),_||t.push(A.value),t}),M=_?ye(`popover`,void 0,A,a):void 0;w.setBodyInstance({syncPosition:N}),u(()=>{w.setBodyInstance(null)}),d(h(a,`show`),e=>{a.animated||(e?E.value=!0:E.value=!1)});function N(){var e;(e=C.value)==null||e.syncPosition()}function P(e){a.trigger===`hover`&&a.keepAliveOnHover&&a.show&&w.handleMouseEnter(e)}function F(e){a.trigger===`hover`&&a.keepAliveOnHover&&w.handleMouseLeave(e)}function te(e){a.trigger===`hover`&&!L().contains(be(e))&&w.handleMouseMoveOutside(e)}function I(e){(a.trigger===`click`&&!L().contains(be(e))||a.onClickoutside)&&w.handleClickOutside(e)}function L(){return w.getTriggerElement()}r(Ee,T),r(He,null),r(Ve,null);function ne(){if(M?.onRender(),!(a.displayDirective===`show`||a.show||a.animated&&D.value))return null;let t,n=w.internalRenderBodyRef.value,{value:r}=m;if(n)t=n([`${r}-popover-shared`,x?.value&&`${r}-popover--rtl`,M?.themeClass.value,a.overlap&&`${r}-popover-shared--overlap`,a.showArrow&&`${r}-popover-shared--show-arrow`,a.arrowPointToCenter&&`${r}-popover-shared--center-arrow`],T,j.value,P,F);else{let{value:e}=w.extraClassRef,{internalTrapFocus:n}=a,l=!ee(s.header)||!ee(s.footer),u=()=>{let e=l?o(y,null,O(s.header,e=>e?o(`div`,{class:[`${r}-popover__header`,a.headerClass],style:a.headerStyle},e):null),O(s.default,e=>e?o(`div`,{class:[`${r}-popover__content`,a.contentClass],style:a.contentStyle},s):null),O(s.footer,e=>e?o(`div`,{class:[`${r}-popover__footer`,a.footerClass],style:a.footerStyle},e):null)):a.scrollable?s.default?.call(s):o(`div`,{class:[`${r}-popover__content`,a.contentClass],style:a.contentStyle},s);return[a.scrollable?o(Ce,{themeOverrides:b.value.peerOverrides.Scrollbar,theme:b.value.peers.Scrollbar,contentClass:l?void 0:`${r}-popover__content ${a.contentClass??``}`,contentStyle:l?void 0:a.contentStyle},{default:()=>e}):e,a.showArrow?ur({arrowClass:a.arrowClass,arrowStyle:a.arrowStyle,arrowWrapperClass:a.arrowWrapperClass,arrowWrapperStyle:a.arrowWrapperStyle,clsPrefix:r}):null]};t=o(`div`,i({class:[`${r}-popover`,`${r}-popover-shared`,x?.value&&`${r}-popover--rtl`,M?.themeClass.value,e.map(e=>`${r}-${e}`),{[`${r}-popover--scrollable`]:a.scrollable,[`${r}-popover--show-header-or-footer`]:l,[`${r}-popover--raw`]:a.raw,[`${r}-popover-shared--overlap`]:a.overlap,[`${r}-popover-shared--show-arrow`]:a.showArrow,[`${r}-popover-shared--center-arrow`]:a.arrowPointToCenter}],ref:T,style:j.value,onKeydown:w.handleKeydown,onMouseenter:P,onMouseleave:F},c),n?o(Oe,{active:a.show,autoFocus:!0},{default:u}):u())}return e(t,k.value)}return{displayed:D,namespace:l,isMounted:w.isMountedRef,zIndex:w.zIndexRef,followerRef:C,adjustedTo:K(a),followerEnabled:E,renderContentNode:ne}},render(){return o(xt,{ref:`followerRef`,zIndex:this.zIndex,show:this.show,enabled:this.followerEnabled,to:this.adjustedTo,x:this.x,y:this.y,flip:this.flip,placement:this.placement,containerClass:this.namespace,overlap:this.overlap,width:this.width===`trigger`?`target`:void 0,teleportDisabled:this.adjustedTo===K.tdkey},{default:()=>this.animated?o(m,{name:`popover-transition`,appear:this.isMounted,onEnter:()=>{this.followerEnabled=!0},onAfterLeave:()=>{var e;(e=this.internalOnAfterLeave)==null||e.call(this),this.followerEnabled=!1,this.displayed=!1}},{default:this.renderContentNode}):this.renderContentNode()})}}),fr=Object.keys(lr),pr={focus:[`onFocus`,`onBlur`],click:[`onClick`],hover:[`onMouseenter`,`onMouseleave`],manual:[],nested:[`onFocus`,`onBlur`,`onMouseenter`,`onMouseleave`,`onClick`]};function mr(e,t,n){pr[t].forEach(t=>{e.props?e.props=Object.assign({},e.props):e.props={};let r=e.props[t],i=n[t];r?e.props[t]=(...e)=>{r(...e),i(...e)}:e.props[t]=i})}var hr={show:{type:Boolean,default:void 0},defaultShow:Boolean,showArrow:{type:Boolean,default:!0},trigger:{type:String,default:`hover`},delay:{type:Number,default:100},duration:{type:Number,default:100},raw:Boolean,placement:{type:String,default:`top`},x:Number,y:Number,arrowPointToCenter:Boolean,disabled:Boolean,getDisabled:Function,displayDirective:{type:String,default:`if`},arrowClass:String,arrowStyle:[String,Object],arrowWrapperClass:String,arrowWrapperStyle:[String,Object],flip:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},width:{type:[Number,String],default:void 0},overlap:Boolean,keepAliveOnHover:{type:Boolean,default:!0},zIndex:Number,to:K.propTo,scrollable:Boolean,contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],footerClass:String,footerStyle:[Object,String],onClickoutside:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],internalDeactivateImmediately:Boolean,internalSyncTargetWithParent:Boolean,internalInheritedEventHandlers:{type:Array,default:()=>[]},internalTrapFocus:Boolean,internalExtraClass:{type:Array,default:()=>[]},onShow:[Function,Array],onHide:[Function,Array],arrow:{type:Boolean,default:void 0},minWidth:Number,maxWidth:Number},gr=_({name:`Popover`,inheritAttrs:!1,props:Object.assign(Object.assign(Object.assign({},re.props),hr),{internalOnAfterLeave:Function,internalRenderBody:Function}),slots:Object,__popover__:!0,setup(e){let n=b(),i=p(null),a=t(()=>e.show),o=p(e.defaultShow),s=Se(a,o),c=R(()=>e.disabled?!1:s.value),l=()=>{if(e.disabled)return!0;let{getDisabled:t}=e;return!!t?.()},u=()=>l()?!1:s.value,d=Ue(e,[`arrow`,`showArrow`]),m=t(()=>e.overlap?!1:d.value),g=null,_=p(null),v=p(null),y=R(()=>e.x!==void 0&&e.y!==void 0);function x(t){let{"onUpdate:show":n,onUpdateShow:r,onShow:i,onHide:a}=e;o.value=t,n&&U(n,t),r&&U(r,t),t&&i&&U(i,!0),t&&a&&U(a,!1)}function S(){g&&g.syncPosition()}function C(){let{value:e}=_;e&&(window.clearTimeout(e),_.value=null)}function w(){let{value:e}=v;e&&(window.clearTimeout(e),v.value=null)}function T(){let t=l();if(e.trigger===`focus`&&!t){if(u())return;x(!0)}}function E(){let t=l();if(e.trigger===`focus`&&!t){if(!u())return;x(!1)}}function D(){let t=l();if(e.trigger===`hover`&&!t){if(w(),_.value!==null||u())return;let t=()=>{x(!0),_.value=null},{delay:n}=e;n===0?t():_.value=window.setTimeout(t,n)}}function O(){let t=l();if(e.trigger===`hover`&&!t){if(C(),v.value!==null||!u())return;let t=()=>{x(!1),v.value=null},{duration:n}=e;n===0?t():v.value=window.setTimeout(t,n)}}function k(){O()}function A(t){var n;u()&&(e.trigger===`click`&&(C(),w(),x(!1)),(n=e.onClickoutside)==null||n.call(e,t))}function j(){e.trigger===`click`&&!l()&&(C(),w(),x(!u()))}function M(t){e.internalTrapFocus&&t.key===`Escape`&&(C(),w(),x(!1))}function N(e){o.value=e}function P(){return i.value?.targetRef}function F(e){g=e}return r(`NPopover`,{getTriggerElement:P,handleKeydown:M,handleMouseEnter:D,handleMouseLeave:O,handleClickOutside:A,handleMouseMoveOutside:k,setBodyInstance:F,positionManuallyRef:y,isMountedRef:n,zIndexRef:h(e,`zIndex`),extraClassRef:h(e,`internalExtraClass`),internalRenderBodyRef:h(e,`internalRenderBody`)}),f(()=>{s.value&&l()&&x(!1)}),{binderInstRef:i,positionManually:y,mergedShowConsideringDisabledProp:c,uncontrolledShow:o,mergedShowArrow:m,getMergedShow:u,setShow:N,handleClick:j,handleMouseEnter:D,handleMouseLeave:O,handleFocus:T,handleBlur:E,syncPosition:S}},render(){let{positionManually:t,$slots:n}=this,r,i=!1;if(!t&&(r=Re(n,`trigger`),r)){r=c(r),r=r.type===v?o(`span`,[r]):r;let e={onClick:this.handleClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur};if(r.type?.__popover__)i=!0,r.props||={internalSyncTargetWithParent:!0,internalInheritedEventHandlers:[]},r.props.internalSyncTargetWithParent=!0,r.props.internalInheritedEventHandlers?r.props.internalInheritedEventHandlers=[e,...r.props.internalInheritedEventHandlers]:r.props.internalInheritedEventHandlers=[e];else{let{internalInheritedEventHandlers:n}=this,i=[e,...n];mr(r,n?`nested`:t?`manual`:this.trigger,{onBlur:e=>{i.forEach(t=>{t.onBlur(e)})},onFocus:e=>{i.forEach(t=>{t.onFocus(e)})},onClick:e=>{i.forEach(t=>{t.onClick(e)})},onMouseenter:e=>{i.forEach(t=>{t.onMouseenter(e)})},onMouseleave:e=>{i.forEach(t=>{t.onMouseleave(e)})}})}}return o(at,{ref:`binderInstRef`,syncTarget:!i,syncTargetWithParent:this.internalSyncTargetWithParent},{default:()=>{this.mergedShowConsideringDisabledProp;let n=this.getMergedShow();return[this.internalTrapFocus&&n?e(o(`div`,{style:{position:`fixed`,top:0,right:0,bottom:0,left:0}}),[[Ie,{enabled:n,zIndex:this.zIndex}]]):null,t?null:o(ot,null,{default:()=>r}),o(dr,Fe(this.$props,fr,Object.assign(Object.assign({},this.$attrs),{showArrow:this.mergedShowArrow,show:n})),{default:()=>{var e;return(e=this.$slots).default?.call(e)},header:()=>{var e;return(e=this.$slots).header?.call(e)},footer:()=>{var e;return(e=this.$slots).footer?.call(e)}})]}})}});export{xt as a,ot as c,Qe as d,Ze as f,or as i,at as l,qe as m,hr as n,Y as o,Xe as p,ur as r,ct as s,gr as t,K as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,C as t,D as n,E as r,G as i,Q as a,T as o,U as s,ct as c,g as l,gt as u,j as d,k as f,mt as p,pt as m,q as h,w as g,y as _}from"./router-mPoLLYeq.js";import{r as v,t as y}from"./_plugin-vue_export-helper-TyZ5GTTn.js";import{t as b}from"./Modal-BLinjj9c.js";import{n as x,t as S}from"./FormItem-dHtHjgtl.js";import{t as C}from"./Button-Cxh6x3Um.js";import{t as w}from"./Input-CZZ9TfBw.js";import{t as T}from"./Tag-DdwPhG9T.js";import{t as E}from"./composables-BoU_Wud6.js";import{t as D}from"./use-message-B3svE98N.js";import{t as O}from"./Spin-BbaC-FmW.js";import{t as k}from"./Switch-Svs0Rnhi.js";import{t as A}from"./profiles-C9UmdPLd.js";var ee={class:`card-header`},te={class:`profile-name`},ne={class:`card-body`},re={class:`info-row`},ie={class:`info-label`},ae={class:`info-value mono`},oe={class:`info-row`},se={class:`info-label`},ce={class:`info-value mono`},j={class:`toggle-text`},M={key:0,class:`card-detail`},N={class:`info-row`},P={class:`info-label`},F={class:`info-value`},I={class:`info-row`},L={class:`info-label`},R={class:`info-value mono detail-path`},z={class:`info-row`},B={class:`info-label`},V={class:`info-value`},H={class:`info-row`},U={class:`info-label`},W={class:`info-value`},G={class:`info-row`},le={class:`info-label`},ue={class:`info-value`},de={class:`card-actions`},K=y(d({__name:`ProfileCard`,props:{profile:{}},emits:[`rename`],setup(s,{emit:l}){let d=s,h=l,{t:y}=v(),b=A(),x=D(),S=E(),w=c(!1),k=c(!1),K=c(!1),q=c(null),J=t(()=>d.profile.name===`default`);async function Y(){if(w.value){w.value=!1;return}w.value=!0,k.value=!0;try{q.value=await b.fetchProfileDetail(d.profile.name)}finally{k.value=!1}}function X(){S.warning({title:y(`profiles.switchTo`),content:y(`profiles.switchConfirm`,{name:d.profile.name}),positiveText:y(`common.confirm`),negativeText:y(`common.cancel`),onPositiveClick:async()=>{b.switchProfile(d.profile.name).then(e=>{e?window.location.reload():x.error(y(`profiles.switchFailed`))})}})}function Z(){S.warning({title:y(`profiles.delete`),content:y(`profiles.deleteConfirm`,{name:d.profile.name}),positiveText:y(`common.delete`),negativeText:y(`common.cancel`),onPositiveClick:async()=>{await b.deleteProfile(d.profile.name)?x.success(y(`profiles.deleteSuccess`)):x.error(y(`profiles.deleteFailed`))}})}async function Q(){K.value=!0;try{await b.exportProfile(d.profile.name)?x.success(y(`profiles.exportSuccess`)):x.error(y(`profiles.exportFailed`))}finally{K.value=!1}}return(t,c)=>(i(),n(`div`,{class:p([`profile-card`,{active:s.profile.active}])},[g(`div`,ee,[g(`h3`,te,u(s.profile.name),1),s.profile.active?(i(),o(m(T),{key:0,size:`tiny`,type:`success`,bordered:!1},{default:a(()=>[f(u(m(y)(`profiles.active`)),1)]),_:1})):r(``,!0)]),g(`div`,ne,[g(`div`,re,[g(`span`,ie,u(m(y)(`profiles.model`)),1),g(`code`,ae,u(s.profile.model),1)]),g(`div`,oe,[g(`span`,se,u(m(y)(`profiles.gateway`)),1),g(`code`,ce,u(s.profile.gateway),1)])]),g(`div`,{class:`card-detail-toggle`,onClick:Y},[(i(),n(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:p([`toggle-icon`,{expanded:w.value}])},[...c[1]||=[g(`polyline`,{points:`6 9 12 15 18 9`},null,-1)]],2)),g(`span`,j,u(w.value?m(y)(`common.collapse`):m(y)(`common.expand`)),1)]),w.value?(i(),n(`div`,M,[e(m(O),{show:k.value,size:`small`},{default:a(()=>[q.value?(i(),n(_,{key:0},[g(`div`,N,[g(`span`,P,u(m(y)(`profiles.provider`)),1),g(`span`,F,u(q.value.provider),1)]),g(`div`,I,[g(`span`,L,u(m(y)(`profiles.path`)),1),g(`code`,R,u(q.value.path),1)]),g(`div`,z,[g(`span`,B,u(m(y)(`profiles.skills`)),1),g(`span`,V,u(q.value.skills),1)]),g(`div`,H,[g(`span`,U,u(m(y)(`profiles.hasEnv`)),1),g(`span`,W,u(q.value.hasEnv?`Yes`:`No`),1)]),g(`div`,G,[g(`span`,le,u(m(y)(`profiles.hasSoulMd`)),1),g(`span`,ue,u(q.value.hasSoulMd?`Yes`:`No`),1)])],64)):r(``,!0)]),_:1},8,[`show`])])):r(``,!0),g(`div`,de,[s.profile.active?r(``,!0):(i(),o(m(C),{key:0,size:`tiny`,loading:m(b).switching,quaternary:``,type:`primary`,onClick:X},{default:a(()=>[f(u(m(y)(`profiles.switchTo`)),1)]),_:1},8,[`loading`])),e(m(C),{size:`tiny`,quaternary:``,onClick:c[0]||=e=>h(`rename`,s.profile.name)},{default:a(()=>[f(u(m(y)(`profiles.rename`)),1)]),_:1}),e(m(C),{size:`tiny`,quaternary:``,type:`error`,disabled:J.value||s.profile.active,onClick:Z},{default:a(()=>[f(u(m(y)(`common.delete`)),1)]),_:1},8,[`disabled`]),e(m(C),{size:`tiny`,quaternary:``,loading:K.value,onClick:Q},{default:a(()=>[f(u(m(y)(`profiles.export`)),1)]),_:1},8,[`loading`])])],2))}}),[[`__scopeId`,`data-v-9b44731e`]]),q={key:0,class:`empty-state`},J={key:1,class:`profiles-grid`},Y=y(d({__name:`ProfilesPanel`,emits:[`rename`],setup(e){let{t}=v(),r=A();return(e,a)=>m(r).profiles.length===0?(i(),n(`div`,q,[a[1]||=g(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`1`,class:`empty-icon`},[g(`path`,{d:`M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2`}),g(`circle`,{cx:`12`,cy:`7`,r:`4`})],-1),g(`p`,null,u(m(t)(`profiles.noProfiles`)),1)])):(i(),n(`div`,J,[(i(!0),n(_,null,h(m(r).profiles,t=>(i(),o(K,{key:t.name,profile:t,onRename:a[0]||=t=>e.$emit(`rename`,t)},null,8,[`profile`]))),128))]))}}),[[`__scopeId`,`data-v-51e73d5a`]]),X={class:`modal-footer`},Z=y(d({__name:`ProfileCreateModal`,emits:[`close`,`saved`],setup(t,{emit:n}){let r=n,{t:s}=v(),d=A(),p=D(),h=c(!0),_=c(!1),y=c(``),T=c(!1);async function E(){if(!y.value.trim()){p.warning(s(`profiles.namePlaceholder`));return}_.value=!0;try{await d.createProfile(y.value.trim(),T.value)?(p.success(s(`profiles.createSuccess`,{name:y.value.trim()})),r(`saved`)):p.error(s(`profiles.createFailed`))}finally{_.value=!1}}function O(){h.value=!1,setTimeout(()=>r(`close`),200)}return(t,n)=>(i(),o(m(b),{show:h.value,"onUpdate:show":n[2]||=e=>h.value=e,preset:`card`,title:m(s)(`profiles.create`),style:{width:`min(420px, calc(100vw - 32px))`},"mask-closable":!_.value,onAfterLeave:n[3]||=e=>r(`close`)},{footer:a(()=>[g(`div`,X,[e(m(C),{onClick:O},{default:a(()=>[f(u(m(s)(`common.cancel`)),1)]),_:1}),e(m(C),{type:`primary`,loading:_.value,onClick:E},{default:a(()=>[f(u(m(s)(`common.create`)),1)]),_:1},8,[`loading`])])]),default:a(()=>[e(m(x),{"label-placement":`top`},{default:a(()=>[e(m(S),{label:m(s)(`profiles.name`),required:``},{default:a(()=>[e(m(w),{value:y.value,"onUpdate:value":n[0]||=e=>y.value=e,placeholder:m(s)(`profiles.namePlaceholder`),onKeyup:l(E,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),e(m(S),{label:m(s)(`profiles.cloneFromCurrent`)},{default:a(()=>[e(m(k),{value:T.value,"onUpdate:value":n[1]||=e=>T.value=e},null,8,[`value`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-c5bb8bdc`]]),Q={class:`modal-footer`},fe=y(d({__name:`ProfileRenameModal`,props:{profileName:{}},emits:[`close`,`saved`],setup(t,{emit:n}){let r=t,s=n,{t:d}=v(),p=A(),h=D(),_=c(!0),y=c(!1),T=c(``);async function E(){if(!T.value.trim()){h.warning(d(`profiles.newNamePlaceholder`));return}y.value=!0;try{await p.renameProfile(r.profileName,T.value.trim())?(h.success(d(`profiles.renameSuccess`)),s(`saved`)):h.error(d(`profiles.renameFailed`))}finally{y.value=!1}}function O(){_.value=!1,setTimeout(()=>s(`close`),200)}return(t,n)=>(i(),o(m(b),{show:_.value,"onUpdate:show":n[1]||=e=>_.value=e,preset:`card`,title:m(d)(`profiles.rename`),style:{width:`min(420px, calc(100vw - 32px))`},"mask-closable":!y.value,onAfterLeave:n[2]||=e=>s(`close`)},{footer:a(()=>[g(`div`,Q,[e(m(C),{onClick:O},{default:a(()=>[f(u(m(d)(`common.cancel`)),1)]),_:1}),e(m(C),{type:`primary`,loading:y.value,onClick:E},{default:a(()=>[f(u(m(d)(`common.confirm`)),1)]),_:1},8,[`loading`])])]),default:a(()=>[e(m(x),{"label-placement":`top`},{default:a(()=>[e(m(S),{label:m(d)(`profiles.newName`),required:``},{default:a(()=>[e(m(w),{value:T.value,"onUpdate:value":n[0]||=e=>T.value=e,placeholder:m(d)(`profiles.newNamePlaceholder`),onKeyup:l(E,[`enter`])},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-e31a23a9`]]),pe={class:`modal-footer`},me=y(d({__name:`ProfileImportModal`,emits:[`close`,`saved`],setup(t,{emit:n}){let r=n,{t:s}=v(),l=A(),d=D(),p=c(!0),h=c(!1),_=c(``),y=c(``);async function T(){if(!_.value.trim()){d.warning(s(`profiles.archivePathPlaceholder`));return}h.value=!0;try{await l.importProfile(_.value.trim(),y.value.trim()||void 0)?(d.success(s(`profiles.importSuccess`)),r(`saved`)):d.error(s(`profiles.importFailed`))}finally{h.value=!1}}function E(){p.value=!1,setTimeout(()=>r(`close`),200)}return(t,n)=>(i(),o(m(b),{show:p.value,"onUpdate:show":n[2]||=e=>p.value=e,preset:`card`,title:m(s)(`profiles.import`),style:{width:`min(420px, calc(100vw - 32px))`},"mask-closable":!h.value,onAfterLeave:n[3]||=e=>r(`close`)},{footer:a(()=>[g(`div`,pe,[e(m(C),{onClick:E},{default:a(()=>[f(u(m(s)(`common.cancel`)),1)]),_:1}),e(m(C),{type:`primary`,loading:h.value,onClick:T},{default:a(()=>[f(u(m(s)(`common.confirm`)),1)]),_:1},8,[`loading`])])]),default:a(()=>[e(m(x),{"label-placement":`top`},{default:a(()=>[e(m(S),{label:m(s)(`profiles.archivePath`),required:``},{default:a(()=>[e(m(w),{value:_.value,"onUpdate:value":n[0]||=e=>_.value=e,placeholder:m(s)(`profiles.archivePathPlaceholder`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`]),e(m(S),{label:m(s)(`profiles.importName`)},{default:a(()=>[e(m(w),{value:y.value,"onUpdate:value":n[1]||=e=>y.value=e,placeholder:m(s)(`profiles.importNamePlaceholder`)},null,8,[`value`,`placeholder`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`show`,`title`,`mask-closable`]))}}),[[`__scopeId`,`data-v-79cb60c4`]]),he={class:`profiles-view`},ge={class:`page-header`},$={class:`header-title`},_e={class:`header-actions`},ve={class:`profiles-content`},ye=y(d({__name:`ProfilesView`,setup(t){let{t:l}=v(),d=A(),p=c(!1),h=c(!1),_=c(null);s(()=>{d.fetchProfiles()});function y(){p.value=!1}function b(){_.value=null}function x(){h.value=!1}return(t,s)=>(i(),n(`div`,he,[g(`header`,ge,[g(`h2`,$,u(m(l)(`profiles.title`)),1),g(`div`,_e,[e(m(C),{size:`small`,onClick:s[0]||=e=>h.value=!0},{icon:a(()=>[...s[6]||=[g(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[g(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),g(`polyline`,{points:`17 8 12 3 7 8`}),g(`line`,{x1:`12`,y1:`3`,x2:`12`,y2:`15`})],-1)]]),default:a(()=>[f(` `+u(m(l)(`profiles.import`)),1)]),_:1}),e(m(C),{type:`primary`,size:`small`,onClick:s[1]||=e=>p.value=!0},{icon:a(()=>[...s[7]||=[g(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[g(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),g(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})],-1)]]),default:a(()=>[f(` `+u(m(l)(`profiles.create`)),1)]),_:1})])]),g(`div`,ve,[e(m(O),{show:m(d).loading&&m(d).profiles.length===0},{default:a(()=>[e(Y,{onRename:s[2]||=e=>_.value=e})]),_:1},8,[`show`])]),p.value?(i(),o(Z,{key:0,onClose:s[3]||=e=>p.value=!1,onSaved:y})):r(``,!0),_.value?(i(),o(fe,{key:1,"profile-name":_.value,onClose:s[4]||=e=>_.value=null,onSaved:b},null,8,[`profile-name`])):r(``,!0),h.value?(i(),o(me,{key:2,onClose:s[5]||=e=>h.value=!1,onSaved:x})):r(``,!0)]))}}),[[`__scopeId`,`data-v-fcdc8d6b`]]);export{ye as default};
|