vuesp-components 2.3.3 → 2.4.1
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/{VDialog.vue_vue_type_script_setup_true_lang-DFNvEwYK.js → VDialog.vue_vue_type_script_setup_true_lang-DSrvFSFT.js} +405 -304
- package/dist/components/block/energy/EnergyFlowBlock.vue.d.ts +8 -0
- package/dist/components/block/energy/EnergyFlowBlock.vue.d.ts.map +1 -0
- package/dist/components/block/energy/types.d.ts +16 -0
- package/dist/components/block/energy/types.d.ts.map +1 -0
- package/dist/components/block/index.d.ts +2 -1
- package/dist/components/block/index.d.ts.map +1 -1
- package/dist/components/card/main/CardMain.vue.d.ts.map +1 -1
- package/dist/components/card/main/types.d.ts +3 -2
- package/dist/components/card/main/types.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardButton.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardDate.vue.d.ts +6 -0
- package/dist/components/dashboard/cards/CardDate.vue.d.ts.map +1 -1
- package/dist/components/index.es.js +1445 -1353
- package/dist/components/ui/autocomplete/VAutocomplete.vue.d.ts.map +1 -1
- package/dist/components/ui/dropdown/VDropdown.vue.d.ts +2 -0
- package/dist/components/ui/dropdown/VDropdown.vue.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +1 -3
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/list/types.d.ts +2 -0
- package/dist/components/ui/list/types.d.ts.map +1 -1
- package/dist/components/ui/loader/VLoader.vue.d.ts +2 -1
- package/dist/components/ui/loader/VLoader.vue.d.ts.map +1 -1
- package/dist/components/ui/loader/types.d.ts +3 -0
- package/dist/components/ui/loader/types.d.ts.map +1 -1
- package/dist/components/ui/select/VSelect.vue.d.ts.map +1 -1
- package/dist/components/ui/tabs/types.d.ts +1 -0
- package/dist/components/ui/tabs/types.d.ts.map +1 -1
- package/dist/components/ui/text-field/VTextField.vue.d.ts.map +1 -1
- package/dist/components/ui/text-field/types.d.ts +3 -0
- package/dist/components/ui/text-field/types.d.ts.map +1 -1
- package/dist/components/ui/vision/VisionIcon.vue.d.ts.map +1 -1
- package/dist/index.es.js +3 -3
- package/dist/style.css +1 -1
- package/dist/theme.css +13 -3
- package/package.json +1 -1
- package/dist/components/ui/vision/VisionCard.vue.d.ts +0 -21
- package/dist/components/ui/vision/VisionCard.vue.d.ts.map +0 -1
- package/dist/components/ui/vision/VisionInput.vue.d.ts +0 -19
- package/dist/components/ui/vision/VisionInput.vue.d.ts.map +0 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
4
|
-
import { f as
|
|
5
|
-
import { d as
|
|
6
|
-
import { getDataValue as
|
|
7
|
-
import { useForm as
|
|
8
|
-
import { required as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as S, resolveComponent as Ae, openBlock as f, createElementBlock as v, Fragment as E, createCommentVNode as T, createElementVNode as s, normalizeClass as z, createVNode as g, withCtx as y, createBlock as I, renderSlot as k, markRaw as O, computed as B, withModifiers as U, toDisplayString as x, unref as q, TransitionGroup as De, renderList as j, mergeProps as H, ref as M, watch as oe, resolveDynamicComponent as fe, Transition as $e, normalizeStyle as ce, createTextVNode as D, normalizeProps as K, guardReactiveProps as R, onMounted as ee, onUnmounted as ke, reactive as nt, useTemplateRef as Pe, withDirectives as we, vShow as st, vModelText as Ie, createSlots as lt, isRef as at, Teleport as ot, nextTick as je } from "vue";
|
|
2
|
+
import { a as it, V as He, j as A, h as Ne, g as Ce, k as ue, l as rt, d as dt, i as ct, e as ae, b as ut, m as Q, _ as Oe, f as J } from "../VDialog.vue_vue_type_script_setup_true_lang-DSrvFSFT.js";
|
|
3
|
+
import { n as pi } from "../VDialog.vue_vue_type_script_setup_true_lang-DSrvFSFT.js";
|
|
4
|
+
import { f as mt, t as ft, g as pt, u as pe, s as vt, d as ht, m as gt, c as bt } from "../app-B45sALrX.js";
|
|
5
|
+
import { d as Se, e as yt, o as xt } from "../useDialog-ALG4kFE7.js";
|
|
6
|
+
import { getDataValue as _t } from "../dashboard/index.es.js";
|
|
7
|
+
import { useForm as $t } from "../composables/index.es.js";
|
|
8
|
+
import { required as kt, maxLen as wt } from "../validate/index.es.js";
|
|
9
|
+
const Ct = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Po = /* @__PURE__ */ S({
|
|
10
10
|
__name: "AppAside",
|
|
11
11
|
props: {
|
|
12
12
|
isSidebar: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
emits: ["sidebar"],
|
|
15
15
|
setup(e, { emit: n }) {
|
|
16
|
-
const
|
|
17
|
-
e.isSidebar &&
|
|
16
|
+
const o = n, l = () => {
|
|
17
|
+
e.isSidebar && o("sidebar", !e.isSidebar);
|
|
18
18
|
};
|
|
19
19
|
return (t, r) => {
|
|
20
20
|
const c = Ae("router-link");
|
|
21
|
-
return
|
|
22
|
-
e.isSidebar ? (
|
|
21
|
+
return f(), v(E, null, [
|
|
22
|
+
e.isSidebar ? (f(), v("div", {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "lg:hidden overlay fixed left-0 top-0 h-full w-full bg-black/40 z-10 bg-blur",
|
|
25
25
|
onClick: l
|
|
26
|
-
})) :
|
|
27
|
-
|
|
28
|
-
class:
|
|
26
|
+
})) : T("", !0),
|
|
27
|
+
s("aside", {
|
|
28
|
+
class: z([e.isSidebar ? "translate-x-0 lg:w-[90px]" : "-translate-x-full", "overflow-x-hidden fixed top-0 left-0 z-10 flex lg:static h-full w-[290px] flex-col overflow-y-auto border-r border-gray-200/70 bg-white/70 px-5 backdrop-blur-2xl transition-all duration-350 lg:translate-x-0 dark:border-white/10 dark:bg-[#07112c]/70"])
|
|
29
29
|
}, [
|
|
30
|
-
|
|
31
|
-
class:
|
|
30
|
+
s("div", {
|
|
31
|
+
class: z([e.isSidebar ? "justify-center" : "justify-between", "sidebar-header flex items-center gap-2 border-b border-gray-200/60 pt-6 pb-6 justify-between dark:border-white/5"])
|
|
32
32
|
}, [
|
|
33
33
|
g(c, { to: "/" }, {
|
|
34
|
-
default:
|
|
35
|
-
e.isSidebar ? (
|
|
34
|
+
default: y(() => [
|
|
35
|
+
e.isSidebar ? (f(), I(it, {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "h-[30px] text-primary"
|
|
38
|
-
})) : (
|
|
38
|
+
})) : (f(), I(He, {
|
|
39
39
|
key: 1,
|
|
40
40
|
class: "h-[30px] text-primary"
|
|
41
41
|
}))
|
|
@@ -43,7 +43,7 @@ const zt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
43
43
|
_: 1
|
|
44
44
|
})
|
|
45
45
|
], 2),
|
|
46
|
-
|
|
46
|
+
s("div", Ct, [
|
|
47
47
|
k(t.$slots, "default")
|
|
48
48
|
])
|
|
49
49
|
], 2)
|
|
@@ -55,80 +55,80 @@ const zt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
55
55
|
width: "1.2em",
|
|
56
56
|
height: "1.2em"
|
|
57
57
|
};
|
|
58
|
-
function
|
|
59
|
-
return
|
|
60
|
-
|
|
58
|
+
function zt(e, n) {
|
|
59
|
+
return f(), v("svg", St, [...n[0] || (n[0] = [
|
|
60
|
+
s("path", {
|
|
61
61
|
fill: "currentColor",
|
|
62
62
|
d: "M4.5 10.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S6 12.825 6 12s-.675-1.5-1.5-1.5m15 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S21 12.825 21 12s-.675-1.5-1.5-1.5m-7.5 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5s1.5-.675 1.5-1.5s-.675-1.5-1.5-1.5"
|
|
63
63
|
}, null, -1)
|
|
64
64
|
])]);
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const Fe = O({ name: "ri-more-line", render: zt }), Vt = {
|
|
67
67
|
viewBox: "0 0 24 24",
|
|
68
68
|
width: "1.2em",
|
|
69
69
|
height: "1.2em"
|
|
70
70
|
};
|
|
71
|
-
function
|
|
72
|
-
return
|
|
73
|
-
|
|
71
|
+
function Tt(e, n) {
|
|
72
|
+
return f(), v("svg", Vt, [...n[0] || (n[0] = [
|
|
73
|
+
s("path", {
|
|
74
74
|
fill: "currentColor",
|
|
75
75
|
d: "M4 18h2v2h12V4H6v2H4V3a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm2-7h7v2H6v3l-5-4l5-4z"
|
|
76
76
|
}, null, -1)
|
|
77
77
|
])]);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const Lt = O({ name: "ri-logout-box-line", render: Tt }), Et = {
|
|
80
80
|
viewBox: "0 0 24 24",
|
|
81
81
|
width: "1.2em",
|
|
82
82
|
height: "1.2em"
|
|
83
83
|
};
|
|
84
|
-
function
|
|
85
|
-
return
|
|
86
|
-
|
|
84
|
+
function Bt(e, n) {
|
|
85
|
+
return f(), v("svg", Et, [...n[0] || (n[0] = [
|
|
86
|
+
s("path", {
|
|
87
87
|
fill: "currentColor",
|
|
88
88
|
d: "M5 18h14v-6.969C19 7.148 15.866 4 12 4s-7 3.148-7 7.031zm7-16c4.97 0 9 4.043 9 9.031V20H3v-8.969C3 6.043 7.03 2 12 2M9.5 21h5a2.5 2.5 0 0 1-5 0"
|
|
89
89
|
}, null, -1)
|
|
90
90
|
])]);
|
|
91
91
|
}
|
|
92
|
-
const Ke = O({ name: "ri-notification-line", render:
|
|
92
|
+
const Ke = O({ name: "ri-notification-line", render: Bt }), Mt = {
|
|
93
93
|
viewBox: "0 0 24 24",
|
|
94
94
|
width: "1.2em",
|
|
95
95
|
height: "1.2em"
|
|
96
96
|
};
|
|
97
|
-
function
|
|
98
|
-
return
|
|
99
|
-
|
|
97
|
+
function At(e, n) {
|
|
98
|
+
return f(), v("svg", Mt, [...n[0] || (n[0] = [
|
|
99
|
+
s("path", {
|
|
100
100
|
fill: "currentColor",
|
|
101
101
|
d: "M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2h.1A6.98 6.98 0 0 0 10 7m-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938A8 8 0 0 0 4 12"
|
|
102
102
|
}, null, -1)
|
|
103
103
|
])]);
|
|
104
104
|
}
|
|
105
|
-
const
|
|
105
|
+
const Dt = O({ name: "ri-moon-line", render: At }), Pt = {
|
|
106
106
|
viewBox: "0 0 24 24",
|
|
107
107
|
width: "1.2em",
|
|
108
108
|
height: "1.2em"
|
|
109
109
|
};
|
|
110
|
-
function
|
|
111
|
-
return
|
|
112
|
-
|
|
110
|
+
function It(e, n) {
|
|
111
|
+
return f(), v("svg", Pt, [...n[0] || (n[0] = [
|
|
112
|
+
s("path", {
|
|
113
113
|
fill: "currentColor",
|
|
114
114
|
d: "M12 18a6 6 0 1 1 0-12a6 6 0 0 1 0 12m0-2a4 4 0 1 0 0-8a4 4 0 0 0 0 8M11 1h2v3h-2zm0 19h2v3h-2zM3.515 4.929l1.414-1.414L7.05 5.636L5.636 7.05zM16.95 18.364l1.414-1.414l2.121 2.121l-1.414 1.414zm2.121-14.85l1.414 1.415l-2.121 2.121l-1.414-1.414zM5.636 16.95l1.414 1.414l-2.121 2.121l-1.414-1.414zM23 11v2h-3v-2zM4 11v2H1v-2z"
|
|
115
115
|
}, null, -1)
|
|
116
116
|
])]);
|
|
117
117
|
}
|
|
118
|
-
const
|
|
118
|
+
const jt = O({ name: "ri-sun-line", render: It }), Ht = {
|
|
119
119
|
viewBox: "0 0 24 24",
|
|
120
120
|
width: "1.2em",
|
|
121
121
|
height: "1.2em"
|
|
122
122
|
};
|
|
123
|
-
function
|
|
124
|
-
return
|
|
125
|
-
|
|
123
|
+
function Nt(e, n) {
|
|
124
|
+
return f(), v("svg", Ht, [...n[0] || (n[0] = [
|
|
125
|
+
s("path", {
|
|
126
126
|
fill: "currentColor",
|
|
127
127
|
d: "M3 4h18v2H3zm0 7h18v2H3zm0 7h18v2H3z"
|
|
128
128
|
}, null, -1)
|
|
129
129
|
])]);
|
|
130
130
|
}
|
|
131
|
-
const
|
|
131
|
+
const Ot = O({ name: "ri-menu-line", render: Nt }), Ft = { class: "glass-header relative sticky top-0 left-0 z-10 w-full border-b shadow-[0_20px_60px_-35px_rgba(0,0,0,0.9)]" }, Kt = { class: "px-4 py-4 sm:px-6 lg:px-8" }, Rt = { class: "container mx-auto flex flex-auto items-center" }, Ut = { class: "lg:hidden h-[30px]" }, Wt = { class: "gap-4 hidden lg:flex" }, qt = { class: "lg:hidden flex gap-4" }, Gt = { class: "ms-2" }, Io = /* @__PURE__ */ S({
|
|
132
132
|
__name: "AppHeader",
|
|
133
133
|
props: {
|
|
134
134
|
changeTheme: { type: Function },
|
|
@@ -136,48 +136,48 @@ const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header
|
|
|
136
136
|
},
|
|
137
137
|
emits: ["sidebar", "notif"],
|
|
138
138
|
setup(e, { emit: n }) {
|
|
139
|
-
const
|
|
139
|
+
const o = n, l = [
|
|
140
140
|
{ name: "Theme", value: 1 },
|
|
141
141
|
{ name: "Notification", value: 2 },
|
|
142
142
|
{ name: "Logout", value: 3 }
|
|
143
|
-
], t =
|
|
143
|
+
], t = B(() => !!e.notifications.find((a) => a.isNew)), r = (a) => o("sidebar", a), c = (a) => o("notif", a), d = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), m = () => {
|
|
144
144
|
e.changeTheme && e.changeTheme();
|
|
145
|
-
},
|
|
146
|
-
|
|
145
|
+
}, i = ({ value: a }, u) => {
|
|
146
|
+
a == 1 && m(), a == 2 && c(u), a == 3 && d();
|
|
147
147
|
};
|
|
148
|
-
return (
|
|
149
|
-
const
|
|
150
|
-
return
|
|
151
|
-
u[3] || (u[3] =
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
return (a, u) => {
|
|
149
|
+
const p = Ot, b = Ae("router-link"), h = jt, _ = Dt, V = Ke, L = Lt, w = Fe;
|
|
150
|
+
return f(), v("header", Ft, [
|
|
151
|
+
u[3] || (u[3] = s("div", { class: "pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-white/35 to-transparent" }, null, -1)),
|
|
152
|
+
s("div", Kt, [
|
|
153
|
+
s("div", Rt, [
|
|
154
154
|
g(A, {
|
|
155
155
|
type: "icon",
|
|
156
156
|
onClick: r
|
|
157
157
|
}, {
|
|
158
|
-
default:
|
|
159
|
-
g(
|
|
158
|
+
default: y(() => [
|
|
159
|
+
g(p, { class: "size-5" })
|
|
160
160
|
]),
|
|
161
161
|
_: 1
|
|
162
162
|
}),
|
|
163
|
-
u[1] || (u[1] =
|
|
164
|
-
|
|
163
|
+
u[1] || (u[1] = s("div", { class: "lg:hidden flex-auto" }, null, -1)),
|
|
164
|
+
s("div", Ut, [
|
|
165
165
|
g(b, { to: "/" }, {
|
|
166
|
-
default:
|
|
167
|
-
g(
|
|
166
|
+
default: y(() => [
|
|
167
|
+
g(He, { class: "h-[30px] text-primary" })
|
|
168
168
|
]),
|
|
169
169
|
_: 1
|
|
170
170
|
})
|
|
171
171
|
]),
|
|
172
|
-
u[2] || (u[2] =
|
|
173
|
-
|
|
172
|
+
u[2] || (u[2] = s("div", { class: "flex-auto" }, null, -1)),
|
|
173
|
+
s("div", Wt, [
|
|
174
174
|
g(A, {
|
|
175
175
|
type: "icon",
|
|
176
176
|
onClick: m
|
|
177
177
|
}, {
|
|
178
|
-
default:
|
|
178
|
+
default: y(() => [
|
|
179
179
|
g(h, { class: "dark:hidden" }),
|
|
180
|
-
g(
|
|
180
|
+
g(_, { class: "hidden dark:flex" })
|
|
181
181
|
]),
|
|
182
182
|
_: 1
|
|
183
183
|
}),
|
|
@@ -185,51 +185,51 @@ const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header
|
|
|
185
185
|
type: "icon",
|
|
186
186
|
onClick: c
|
|
187
187
|
}, {
|
|
188
|
-
default:
|
|
189
|
-
|
|
190
|
-
class:
|
|
188
|
+
default: y(() => [
|
|
189
|
+
s("span", {
|
|
190
|
+
class: z([t.value ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
|
|
191
191
|
}, [...u[0] || (u[0] = [
|
|
192
|
-
|
|
192
|
+
s("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
|
|
193
193
|
])], 2),
|
|
194
|
-
g(
|
|
194
|
+
g(V, { class: "size-5" })
|
|
195
195
|
]),
|
|
196
196
|
_: 1
|
|
197
197
|
}),
|
|
198
198
|
g(A, {
|
|
199
199
|
type: "icon",
|
|
200
|
-
onClick:
|
|
200
|
+
onClick: U(d, ["prevent"])
|
|
201
201
|
}, {
|
|
202
|
-
default:
|
|
203
|
-
g(
|
|
202
|
+
default: y(() => [
|
|
203
|
+
g(L, { class: "size-5" })
|
|
204
204
|
]),
|
|
205
205
|
_: 1
|
|
206
206
|
})
|
|
207
207
|
]),
|
|
208
|
-
|
|
208
|
+
s("div", qt, [
|
|
209
209
|
g(Ne, {
|
|
210
210
|
left: "unset",
|
|
211
211
|
right: "0",
|
|
212
212
|
top: "0"
|
|
213
213
|
}, {
|
|
214
|
-
activator:
|
|
214
|
+
activator: y(({ on: N }) => [
|
|
215
215
|
g(A, {
|
|
216
216
|
type: "icon",
|
|
217
217
|
class: "flex",
|
|
218
|
-
onClick:
|
|
218
|
+
onClick: N.click
|
|
219
219
|
}, {
|
|
220
|
-
default:
|
|
220
|
+
default: y(() => [
|
|
221
221
|
g(w)
|
|
222
222
|
]),
|
|
223
223
|
_: 1
|
|
224
224
|
}, 8, ["onClick"])
|
|
225
225
|
]),
|
|
226
|
-
default:
|
|
226
|
+
default: y(() => [
|
|
227
227
|
g(Ce, {
|
|
228
228
|
items: l,
|
|
229
|
-
onClick:
|
|
229
|
+
onClick: i
|
|
230
230
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
|
|
231
|
+
default: y(({ item: N }) => [
|
|
232
|
+
s("span", Gt, x(N.name), 1)
|
|
233
233
|
]),
|
|
234
234
|
_: 1
|
|
235
235
|
})
|
|
@@ -242,7 +242,7 @@ const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header
|
|
|
242
242
|
]);
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
}),
|
|
245
|
+
}), Jt = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, Zt = { class: "flex-auto text-xs" }, Xt = { class: "text-gray-500 dark:text-gray-400 mt-1" }, Yt = /* @__PURE__ */ S({
|
|
246
246
|
__name: "CardNotification",
|
|
247
247
|
props: {
|
|
248
248
|
empty: {},
|
|
@@ -255,31 +255,31 @@ const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header
|
|
|
255
255
|
},
|
|
256
256
|
emits: ["remove", "read"],
|
|
257
257
|
setup(e, { emit: n }) {
|
|
258
|
-
const
|
|
259
|
-
return (m,
|
|
260
|
-
const
|
|
261
|
-
return
|
|
262
|
-
|
|
263
|
-
class:
|
|
258
|
+
const o = e, l = n, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], r = (m) => t[m], c = (m) => l("remove", m), d = (m) => l("read", m);
|
|
259
|
+
return (m, i) => {
|
|
260
|
+
const a = Ke, u = ue;
|
|
261
|
+
return f(), v("div", Jt, [
|
|
262
|
+
s("div", {
|
|
263
|
+
class: z(["absolute left-0 top-0 w-[3px] h-full", r(o.color)])
|
|
264
264
|
}, null, 2),
|
|
265
265
|
g(A, {
|
|
266
266
|
class: "shrink-0",
|
|
267
267
|
type: "icon",
|
|
268
268
|
onClick: d
|
|
269
269
|
}, {
|
|
270
|
-
default:
|
|
271
|
-
|
|
272
|
-
class:
|
|
273
|
-
}, [...
|
|
274
|
-
|
|
270
|
+
default: y(() => [
|
|
271
|
+
s("span", {
|
|
272
|
+
class: z([o.isNew ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
|
|
273
|
+
}, [...i[0] || (i[0] = [
|
|
274
|
+
s("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
|
|
275
275
|
])], 2),
|
|
276
|
-
g(
|
|
276
|
+
g(a, { class: "size-5" })
|
|
277
277
|
]),
|
|
278
278
|
_: 1
|
|
279
279
|
}),
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
s("div", Zt, [
|
|
281
|
+
s("div", null, x(o.text), 1),
|
|
282
|
+
s("div", Xt, x(q(mt)(o.date)) + " (" + x(q(ft)(o.date)) + ")", 1)
|
|
283
283
|
]),
|
|
284
284
|
g(A, {
|
|
285
285
|
class: "shrink-0",
|
|
@@ -287,7 +287,7 @@ const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header
|
|
|
287
287
|
size: "sm",
|
|
288
288
|
onClick: c
|
|
289
289
|
}, {
|
|
290
|
-
default:
|
|
290
|
+
default: y(() => [
|
|
291
291
|
g(u, { class: "size-4" })
|
|
292
292
|
]),
|
|
293
293
|
_: 1
|
|
@@ -295,10 +295,10 @@ const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header
|
|
|
295
295
|
]);
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
|
-
}),
|
|
298
|
+
}), Qt = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, en = {
|
|
299
299
|
key: 0,
|
|
300
300
|
class: "flex flex-col gap-2 p-2"
|
|
301
|
-
},
|
|
301
|
+
}, jo = /* @__PURE__ */ S({
|
|
302
302
|
__name: "AppNotification",
|
|
303
303
|
props: {
|
|
304
304
|
value: { type: Boolean },
|
|
@@ -306,19 +306,19 @@ const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header
|
|
|
306
306
|
},
|
|
307
307
|
emits: ["close", "remove", "read"],
|
|
308
308
|
setup(e, { emit: n }) {
|
|
309
|
-
const
|
|
310
|
-
return (
|
|
311
|
-
|
|
309
|
+
const o = e, l = n, t = B(() => !!o.notifications.find((i) => i.isNew)), r = B(() => !!o.notifications.length), c = (i) => l("close", i), d = (i) => l("remove", i), m = (i) => l("read", i);
|
|
310
|
+
return (i, a) => (f(), v(E, null, [
|
|
311
|
+
o.value ? (f(), v("div", {
|
|
312
312
|
key: 0,
|
|
313
313
|
class: "overlay fixed left-0 top-0 h-full w-full bg-black/40 bg-blur",
|
|
314
314
|
onClick: c
|
|
315
|
-
})) :
|
|
316
|
-
|
|
317
|
-
class:
|
|
315
|
+
})) : T("", !0),
|
|
316
|
+
s("aside", {
|
|
317
|
+
class: z([o.value ? "translate-x-0 " : "translate-x-full", "overflow-x-hidden fixed top-[73px] right-0 flex h-[calc(100%-73px)] w-[290px] md:w-80 border-l border-gray-200/70 flex-col overflow-y-auto transition-all duration-350 dark:border-white/10 bg-white/90 backdrop-blur-2xl dark:bg-[#07112c]/80"])
|
|
318
318
|
}, [
|
|
319
|
-
|
|
320
|
-
k(
|
|
321
|
-
r.value ? (
|
|
319
|
+
s("div", Qt, [
|
|
320
|
+
k(i.$slots, "header", { isNew: t.value }),
|
|
321
|
+
r.value ? (f(), v("div", en, [
|
|
322
322
|
g(De, {
|
|
323
323
|
"enter-active-class": "transition-all duration-300 ",
|
|
324
324
|
"enter-from-class": "opacity-0 translate-x-1/2",
|
|
@@ -327,53 +327,53 @@ const Kt = O({ name: "ri-menu-line", render: Ut }), Rt = { class: "glass-header
|
|
|
327
327
|
"leave-from-class": "opacity-100 translate-x-0",
|
|
328
328
|
"leave-to-class": "opacity-0 translate-x-1/2"
|
|
329
329
|
}, {
|
|
330
|
-
default:
|
|
331
|
-
(
|
|
330
|
+
default: y(() => [
|
|
331
|
+
(f(!0), v(E, null, j(o.notifications, (u) => (f(), v("div", {
|
|
332
332
|
key: u.date,
|
|
333
333
|
class: "relative"
|
|
334
334
|
}, [
|
|
335
|
-
k(
|
|
336
|
-
g(
|
|
335
|
+
k(i.$slots, "card", { item: u }, () => [
|
|
336
|
+
g(Yt, H({ ref_for: !0 }, u, {
|
|
337
337
|
class: "rounded-md border border-gray-200/60 bg-white/50 dark:border-white/5 dark:bg-white/[0.03]",
|
|
338
|
-
onRemove: (
|
|
339
|
-
onRead: (
|
|
338
|
+
onRemove: (p) => d(u),
|
|
339
|
+
onRead: (p) => m(u)
|
|
340
340
|
}), null, 16, ["onRemove", "onRead"])
|
|
341
341
|
])
|
|
342
342
|
]))), 128))
|
|
343
343
|
]),
|
|
344
344
|
_: 3
|
|
345
345
|
})
|
|
346
|
-
])) : k(
|
|
346
|
+
])) : k(i.$slots, "empty", {}, void 0, void 0, 1)
|
|
347
347
|
])
|
|
348
348
|
], 2)
|
|
349
349
|
], 64));
|
|
350
350
|
}
|
|
351
|
-
}),
|
|
352
|
-
function
|
|
353
|
-
return
|
|
354
|
-
n[0] || (n[0] =
|
|
355
|
-
|
|
351
|
+
}), tn = {}, nn = { class: "fixed h-full w-full top-0 left-0 z-20" }, sn = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" };
|
|
352
|
+
function ln(e, n) {
|
|
353
|
+
return f(), v("div", nn, [
|
|
354
|
+
n[0] || (n[0] = s("div", { class: "absolute h-full w-full top-0 left-0 bg-black/60 bg-blur" }, null, -1)),
|
|
355
|
+
s("div", sn, [
|
|
356
356
|
k(e.$slots, "default")
|
|
357
357
|
])
|
|
358
358
|
]);
|
|
359
359
|
}
|
|
360
|
-
const
|
|
360
|
+
const Ho = /* @__PURE__ */ rt(tn, [["render", ln]]), an = {
|
|
361
361
|
viewBox: "0 0 24 24",
|
|
362
362
|
width: "1.2em",
|
|
363
363
|
height: "1.2em"
|
|
364
364
|
};
|
|
365
|
-
function
|
|
366
|
-
return
|
|
367
|
-
|
|
365
|
+
function on(e, n) {
|
|
366
|
+
return f(), v("svg", an, [...n[0] || (n[0] = [
|
|
367
|
+
s("path", {
|
|
368
368
|
fill: "currentColor",
|
|
369
369
|
d: "m13.172 12l-4.95-4.95l1.414-1.413L16 12l-6.364 6.364l-1.414-1.415z"
|
|
370
370
|
}, null, -1)
|
|
371
371
|
])]);
|
|
372
372
|
}
|
|
373
|
-
const
|
|
373
|
+
const rn = O({ name: "ri-arrow-right-s-line", render: on }), dn = { class: "mb-4 flex flex-col gap-2" }, cn = { class: "size-6 flex-[0_0_24px] opacity-60" }, un = ["onClick"], mn = { class: "flex flex-col gap-2" }, fn = { class: "flex gap-2 ms-8" }, pn = { class: "size-5 flex-[0_0_24px]" }, vn = { class: "flex-1 first-letter:uppercase text-sm" }, hn = {
|
|
374
374
|
key: 0,
|
|
375
375
|
class: "mt-2"
|
|
376
|
-
},
|
|
376
|
+
}, gn = { class: "flex flex-col gap-2" }, bn = { class: "flex gap-2 ms-14" }, yn = { class: "size-5 flex-[0_0_24px]" }, xn = { class: "flex-1 first-letter:uppercase text-sm" }, No = /* @__PURE__ */ S({
|
|
377
377
|
__name: "AppNav",
|
|
378
378
|
props: {
|
|
379
379
|
menu: { default: () => [] },
|
|
@@ -382,116 +382,116 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
382
382
|
},
|
|
383
383
|
emits: ["sidebar"],
|
|
384
384
|
setup(e, { emit: n }) {
|
|
385
|
-
const
|
|
386
|
-
e.isSidebar &&
|
|
387
|
-
}, r = (
|
|
385
|
+
const o = n, l = M(""), t = ({ name: i }) => {
|
|
386
|
+
e.isSidebar && o("sidebar", !e.isSidebar), l.value !== i && (l.value = l.value === i ? "" : i);
|
|
387
|
+
}, r = (i) => e.fullPath === i, c = (i) => i ? e.fullPath === i || e.fullPath.startsWith(i) : !1, d = (i, a) => !i.path || a === "/" || i.path === "/" ? !1 : i.path === a || a.includes(i.path), m = (i, a) => (i == null ? void 0 : i.find(
|
|
388
388
|
(u) => {
|
|
389
|
-
var
|
|
390
|
-
return d(u,
|
|
389
|
+
var p;
|
|
390
|
+
return d(u, a) || ((p = u.children) == null ? void 0 : p.some(
|
|
391
391
|
(b) => {
|
|
392
392
|
var h;
|
|
393
|
-
return d(b,
|
|
393
|
+
return d(b, a) || ((h = b.children) == null ? void 0 : h.some((_) => d(_, a)));
|
|
394
394
|
}
|
|
395
395
|
));
|
|
396
396
|
}
|
|
397
397
|
)) ?? null;
|
|
398
|
-
return
|
|
398
|
+
return oe(
|
|
399
399
|
() => e.menu,
|
|
400
400
|
() => {
|
|
401
|
-
var
|
|
402
|
-
return l.value = ((
|
|
401
|
+
var i;
|
|
402
|
+
return l.value = ((i = m(e.menu, e.fullPath) ?? pt(e.menu, e.fullPath)) == null ? void 0 : i.name) || "";
|
|
403
403
|
}
|
|
404
|
-
), (
|
|
405
|
-
const u =
|
|
406
|
-
return
|
|
407
|
-
|
|
408
|
-
(
|
|
409
|
-
key:
|
|
404
|
+
), (i, a) => {
|
|
405
|
+
const u = rn;
|
|
406
|
+
return f(), v("nav", null, [
|
|
407
|
+
s("ul", dn, [
|
|
408
|
+
(f(!0), v(E, null, j(e.menu, (p) => (f(), v("li", {
|
|
409
|
+
key: p.name
|
|
410
410
|
}, [
|
|
411
|
-
(
|
|
412
|
-
to:
|
|
413
|
-
class:
|
|
414
|
-
onClick:
|
|
411
|
+
(f(), I(fe(p.path ? "router-link" : "span"), {
|
|
412
|
+
to: p.path,
|
|
413
|
+
class: z(["flex gap-2 items-center px-3 py-2 rounded", r(p.path) ? "bg-primary/10 text-primary" : "hover:bg-white/5"]),
|
|
414
|
+
onClick: U((b) => t(p), ["prevent", "stop"])
|
|
415
415
|
}, {
|
|
416
|
-
default:
|
|
417
|
-
|
|
418
|
-
k(
|
|
416
|
+
default: y(() => [
|
|
417
|
+
s("div", cn, [
|
|
418
|
+
k(i.$slots, "icon", { item: p })
|
|
419
419
|
]),
|
|
420
|
-
|
|
421
|
-
class:
|
|
422
|
-
},
|
|
423
|
-
|
|
424
|
-
class:
|
|
425
|
-
onClick:
|
|
420
|
+
s("span", {
|
|
421
|
+
class: z(["flex-1 first-letter:uppercase text-sm", e.isSidebar ? "lg:hidden" : ""])
|
|
422
|
+
}, x(p.name), 3),
|
|
423
|
+
s("button", {
|
|
424
|
+
class: z(["cursor-pointer", [e.isSidebar ? "lg:hidden" : ""]]),
|
|
425
|
+
onClick: U((b) => t(p), ["prevent", "stop"])
|
|
426
426
|
}, [
|
|
427
|
-
|
|
428
|
-
], 10,
|
|
427
|
+
p.children ? (f(), I(u, { key: 0 })) : T("", !0)
|
|
428
|
+
], 10, un)
|
|
429
429
|
]),
|
|
430
430
|
_: 2
|
|
431
431
|
}, 1032, ["to", "class", "onClick"])),
|
|
432
|
-
|
|
432
|
+
p.children ? (f(), v("div", {
|
|
433
433
|
key: 0,
|
|
434
|
-
class:
|
|
434
|
+
class: z(["translate transform overflow-hidden mt-2", [e.isSidebar ? "lg:hidden" : "", l.value === p.name ? "block" : "hidden"]])
|
|
435
435
|
}, [
|
|
436
|
-
|
|
437
|
-
(
|
|
438
|
-
(
|
|
436
|
+
s("ul", mn, [
|
|
437
|
+
(f(!0), v(E, null, j(p.children, ({ name: b, path: h, icon: _, children: V }) => (f(), v("li", { key: b }, [
|
|
438
|
+
(f(), I(fe(h ? "router-link" : "span"), {
|
|
439
439
|
to: h,
|
|
440
|
-
class:
|
|
440
|
+
class: z(["flex gap-2 items-center px-3 py-2 rounded", r(h) ? "bg-primary/10 text-primary" : "hover:bg-white/5"])
|
|
441
441
|
}, {
|
|
442
|
-
default:
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
k(
|
|
446
|
-
item: { name: b, path: h, icon:
|
|
442
|
+
default: y(() => [
|
|
443
|
+
s("div", fn, [
|
|
444
|
+
s("div", pn, [
|
|
445
|
+
k(i.$slots, "icon-children", {
|
|
446
|
+
item: { name: b, path: h, icon: _ }
|
|
447
447
|
})
|
|
448
448
|
]),
|
|
449
|
-
|
|
449
|
+
s("span", vn, x(b), 1)
|
|
450
450
|
])
|
|
451
451
|
]),
|
|
452
452
|
_: 2
|
|
453
453
|
}, 1032, ["to", "class"])),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
(
|
|
457
|
-
key:
|
|
454
|
+
V != null && V.length && c(h) ? (f(), v("div", hn, [
|
|
455
|
+
s("ul", gn, [
|
|
456
|
+
(f(!0), v(E, null, j(V, (L) => (f(), v("li", {
|
|
457
|
+
key: L.name
|
|
458
458
|
}, [
|
|
459
|
-
(
|
|
460
|
-
to:
|
|
461
|
-
class:
|
|
459
|
+
(f(), I(fe(L.path ? "router-link" : "span"), {
|
|
460
|
+
to: L.path,
|
|
461
|
+
class: z(["flex gap-2 items-center px-3 py-2 rounded", r(L.path) ? "bg-primary/10 text-primary" : "hover:bg-white/5"])
|
|
462
462
|
}, {
|
|
463
|
-
default:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
k(
|
|
463
|
+
default: y(() => [
|
|
464
|
+
s("div", bn, [
|
|
465
|
+
s("div", yn, [
|
|
466
|
+
k(i.$slots, "icon-children", { item: L })
|
|
467
467
|
]),
|
|
468
|
-
|
|
468
|
+
s("span", xn, x(L.name), 1)
|
|
469
469
|
])
|
|
470
470
|
]),
|
|
471
471
|
_: 2
|
|
472
472
|
}, 1032, ["to", "class"]))
|
|
473
473
|
]))), 128))
|
|
474
474
|
])
|
|
475
|
-
])) :
|
|
475
|
+
])) : T("", !0)
|
|
476
476
|
]))), 128))
|
|
477
477
|
])
|
|
478
|
-
], 2)) :
|
|
478
|
+
], 2)) : T("", !0)
|
|
479
479
|
]))), 128))
|
|
480
480
|
])
|
|
481
481
|
]);
|
|
482
482
|
};
|
|
483
483
|
}
|
|
484
|
-
}),
|
|
484
|
+
}), _n = {
|
|
485
485
|
key: 0,
|
|
486
486
|
class: "glass-panel w-full min-w-[260px] max-w-xs p-4 shadow-lg",
|
|
487
487
|
role: "alert"
|
|
488
|
-
},
|
|
488
|
+
}, $n = { class: "flex items-center gap-4 text-sm" }, kn = {
|
|
489
489
|
key: 0,
|
|
490
490
|
class: "text-green-600"
|
|
491
|
-
},
|
|
491
|
+
}, wn = {
|
|
492
492
|
key: 1,
|
|
493
493
|
class: "relative mt-2 block h-4 w-full select-none overflow-hidden rounded-md bg-gray-200/70 dark:bg-white/10"
|
|
494
|
-
},
|
|
494
|
+
}, Cn = { class: "absolute left-[140px] top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, Sn = { class: "absolute left-[140px] top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Oo = /* @__PURE__ */ S({
|
|
495
495
|
__name: "AppProgress",
|
|
496
496
|
props: {
|
|
497
497
|
timeout: { default: 5e3 },
|
|
@@ -502,17 +502,17 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
502
502
|
length: { default: 0 }
|
|
503
503
|
},
|
|
504
504
|
setup(e) {
|
|
505
|
-
const n =
|
|
505
|
+
const n = M(!1), o = B(() => !!e.length), l = B(() => !!(o.value && t.value === 100 && !e.status)), t = B(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), r = Se(() => {
|
|
506
506
|
n.value = !1;
|
|
507
507
|
}, e.timeout);
|
|
508
|
-
return
|
|
508
|
+
return oe(
|
|
509
509
|
() => [e.size, e.status],
|
|
510
510
|
() => {
|
|
511
511
|
n.value = !0, r();
|
|
512
512
|
}
|
|
513
513
|
), (c, d) => {
|
|
514
|
-
const m =
|
|
515
|
-
return
|
|
514
|
+
const m = ue;
|
|
515
|
+
return f(), I($e, {
|
|
516
516
|
"enter-active-class": "duration-300 ease-out",
|
|
517
517
|
"enter-from-class": "transform opacity-0 translate-x-full",
|
|
518
518
|
"enter-to-class": "opacity-100 translate-x-0",
|
|
@@ -520,41 +520,41 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
520
520
|
"leave-from-class": "opacity-100 translate-y-0",
|
|
521
521
|
"leave-to-class": "transform opacity-0 -translate-y-8"
|
|
522
522
|
}, {
|
|
523
|
-
default:
|
|
524
|
-
n.value ? (
|
|
525
|
-
|
|
523
|
+
default: y(() => [
|
|
524
|
+
n.value ? (f(), v("div", _n, [
|
|
525
|
+
s("div", $n, [
|
|
526
526
|
k(c.$slots, "default", { isDone: l.value }, () => [
|
|
527
|
-
d[1] || (d[1] =
|
|
528
|
-
l.value ? (
|
|
527
|
+
d[1] || (d[1] = s("div", { class: "flex-auto" }, "Progress...", -1)),
|
|
528
|
+
l.value ? (f(), v("span", kn, "Done")) : T("", !0)
|
|
529
529
|
]),
|
|
530
|
-
|
|
530
|
+
s("button", {
|
|
531
531
|
class: "cursor-pointer transition text-gray-700 dark:text-gray-400 self-start hover:text-gray-600",
|
|
532
|
-
onClick: d[0] || (d[0] = (
|
|
532
|
+
onClick: d[0] || (d[0] = (i) => n.value = !1)
|
|
533
533
|
}, [
|
|
534
534
|
g(m, { class: "size-4" })
|
|
535
535
|
])
|
|
536
536
|
]),
|
|
537
|
-
|
|
537
|
+
o.value ? (f(), v("div", {
|
|
538
538
|
key: 0,
|
|
539
539
|
class: "h-[2px] fixed top-0 left-0 w-full bg-blue-600 transition-all duration-500",
|
|
540
|
-
style:
|
|
541
|
-
}, null, 4)) :
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
540
|
+
style: ce(`width: ${t.value}%`)
|
|
541
|
+
}, null, 4)) : T("", !0),
|
|
542
|
+
o.value ? (f(), v("div", wn, [
|
|
543
|
+
s("div", Cn, x(t.value) + "%", 1),
|
|
544
|
+
s("div", {
|
|
545
545
|
class: "bg-blue-600 rounded h-4 overflow-hidden relative transition-all duration-500",
|
|
546
|
-
style:
|
|
546
|
+
style: ce(`width: ${t.value}%`)
|
|
547
547
|
}, [
|
|
548
|
-
|
|
548
|
+
s("div", Sn, x(t.value) + "%", 1)
|
|
549
549
|
], 4)
|
|
550
|
-
])) :
|
|
551
|
-
])) :
|
|
550
|
+
])) : T("", !0)
|
|
551
|
+
])) : T("", !0)
|
|
552
552
|
]),
|
|
553
553
|
_: 3
|
|
554
554
|
});
|
|
555
555
|
};
|
|
556
556
|
}
|
|
557
|
-
}),
|
|
557
|
+
}), zn = { class: "my-4 text-gray-700 dark:text-gray-400" }, Vn = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, Tn = { class: "flex gap-2" }, Ln = { class: "text-gray-700 dark:text-gray-400" }, En = { class: "flex gap-2" }, Bn = { class: "flex gap-2" }, Mn = { class: "text-gray-700 dark:text-gray-400" }, An = { class: "flex gap-2" }, Dn = { class: "text-gray-700 dark:text-gray-400" }, Pn = { class: "flex flex-col gap-4 text-sm" }, In = { class: "flex gap-4" }, Fo = /* @__PURE__ */ S({
|
|
558
558
|
__name: "BlockInfo",
|
|
559
559
|
props: {
|
|
560
560
|
pkg: {},
|
|
@@ -568,85 +568,85 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
568
568
|
board: {}
|
|
569
569
|
},
|
|
570
570
|
setup(e) {
|
|
571
|
-
const n =
|
|
572
|
-
var t, r, c, d, m,
|
|
571
|
+
const n = B(() => e.firmware.join(".")), o = B(() => {
|
|
572
|
+
var t, r, c, d, m, i, a;
|
|
573
573
|
const l = [];
|
|
574
|
-
return (t = e.pkg) != null && t.homepage && l.push({ name: "homepage", href: e.pkg.homepage }), (c = (r = e.pkg) == null ? void 0 : r.repository) != null && c.url && l.push({ name: "repository", href: e.pkg.repository.url }), (m = (d = e.pkg) == null ? void 0 : d.bugs) != null && m.url && l.push({ name: "bugs", href: e.pkg.bugs.url }), (
|
|
574
|
+
return (t = e.pkg) != null && t.homepage && l.push({ name: "homepage", href: e.pkg.homepage }), (c = (r = e.pkg) == null ? void 0 : r.repository) != null && c.url && l.push({ name: "repository", href: e.pkg.repository.url }), (m = (d = e.pkg) == null ? void 0 : d.bugs) != null && m.url && l.push({ name: "bugs", href: e.pkg.bugs.url }), (i = e.pkg) != null && i.author && l.push({ name: "author", href: `mailto:${(a = e.pkg) == null ? void 0 : a.author}` }), l;
|
|
575
575
|
});
|
|
576
576
|
return (l, t) => {
|
|
577
577
|
var r, c;
|
|
578
|
-
return
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
t[0] || (t[0] =
|
|
583
|
-
|
|
578
|
+
return f(), v("div", null, [
|
|
579
|
+
s("p", zn, x((r = e.pkg) == null ? void 0 : r.description), 1),
|
|
580
|
+
s("div", Vn, [
|
|
581
|
+
s("div", Tn, [
|
|
582
|
+
t[0] || (t[0] = D(" Firmware (hw): ", -1)),
|
|
583
|
+
s("span", Ln, x(n.value), 1)
|
|
584
584
|
]),
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
t[1] || (t[1] =
|
|
588
|
-
|
|
585
|
+
s("div", En, [
|
|
586
|
+
s("div", Bn, [
|
|
587
|
+
t[1] || (t[1] = D(" Version (web): ", -1)),
|
|
588
|
+
s("span", Mn, x((c = e.pkg) == null ? void 0 : c.version), 1)
|
|
589
589
|
])
|
|
590
590
|
]),
|
|
591
|
-
t[3] || (t[3] =
|
|
592
|
-
|
|
593
|
-
t[2] || (t[2] =
|
|
594
|
-
|
|
591
|
+
t[3] || (t[3] = s("div", { class: "flex-auto" }, null, -1)),
|
|
592
|
+
s("div", An, [
|
|
593
|
+
t[2] || (t[2] = D(" ID: ", -1)),
|
|
594
|
+
s("span", Dn, x(e.id.toString(16)), 1)
|
|
595
595
|
])
|
|
596
596
|
]),
|
|
597
|
-
t[4] || (t[4] =
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
k(l.$slots, "links", { links:
|
|
597
|
+
t[4] || (t[4] = s("hr", { class: "dark:text-gray-700 text-gray-200 my-2" }, null, -1)),
|
|
598
|
+
s("div", Pn, [
|
|
599
|
+
s("div", In, [
|
|
600
|
+
k(l.$slots, "links", { links: o.value })
|
|
601
601
|
])
|
|
602
602
|
])
|
|
603
603
|
]);
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
|
-
}),
|
|
606
|
+
}), jn = ["onClick"], Hn = { class: "mr-2" }, Nn = { class: "text-sm" }, On = { class: "text-gray-400 text-xs" }, Fn = {
|
|
607
607
|
key: 0,
|
|
608
608
|
class: "flex justify-center"
|
|
609
|
-
},
|
|
609
|
+
}, Kn = { class: "flex justify-end mt-4" }, Ko = /* @__PURE__ */ S({
|
|
610
610
|
__name: "BlockScan",
|
|
611
611
|
props: {
|
|
612
612
|
items: { default: () => [] }
|
|
613
613
|
},
|
|
614
614
|
emits: ["scan", "select"],
|
|
615
615
|
setup(e, { emit: n }) {
|
|
616
|
-
const
|
|
616
|
+
const o = n, l = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (c) => o("select", c), r = (c) => o("scan", c);
|
|
617
617
|
return (c, d) => {
|
|
618
|
-
const m =
|
|
619
|
-
return
|
|
620
|
-
g(
|
|
618
|
+
const m = dt, i = Ce, a = ct, u = A;
|
|
619
|
+
return f(), v("div", null, [
|
|
620
|
+
g(i, {
|
|
621
621
|
items: e.items,
|
|
622
622
|
class: "bg-transparent! ring-0!"
|
|
623
623
|
}, {
|
|
624
|
-
default:
|
|
625
|
-
|
|
624
|
+
default: y(({ item: p }) => [
|
|
625
|
+
s("div", {
|
|
626
626
|
class: "flex items-center w-full",
|
|
627
|
-
onClick: (b) => t(
|
|
627
|
+
onClick: (b) => t(p)
|
|
628
628
|
}, [
|
|
629
|
-
|
|
630
|
-
g(m, K(R(
|
|
629
|
+
s("div", Hn, [
|
|
630
|
+
g(m, K(R(p)), null, 16)
|
|
631
631
|
]),
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
632
|
+
s("div", null, [
|
|
633
|
+
s("div", Nn, x(p.ssid), 1),
|
|
634
|
+
s("div", On, x(c.$t("security")) + " : " + x(l[p.encryptionType] || "unknown"), 1)
|
|
635
635
|
])
|
|
636
|
-
], 8,
|
|
636
|
+
], 8, jn)
|
|
637
637
|
]),
|
|
638
638
|
_: 1
|
|
639
639
|
}, 8, ["items"]),
|
|
640
|
-
e.items.length ?
|
|
641
|
-
g(
|
|
640
|
+
e.items.length ? T("", !0) : (f(), v("div", Fn, [
|
|
641
|
+
g(a, { class: "text-primary" })
|
|
642
642
|
])),
|
|
643
|
-
|
|
643
|
+
s("div", Kn, [
|
|
644
644
|
g(u, {
|
|
645
645
|
color: "blue",
|
|
646
646
|
onClick: r
|
|
647
647
|
}, {
|
|
648
|
-
default:
|
|
649
|
-
|
|
648
|
+
default: y(() => [
|
|
649
|
+
D(x(c.$t("scan")), 1)
|
|
650
650
|
]),
|
|
651
651
|
_: 1
|
|
652
652
|
})
|
|
@@ -654,7 +654,7 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
654
654
|
]);
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
|
-
}),
|
|
657
|
+
}), Rn = { class: "md:flex items-center mb-4" }, Un = { class: "flex-auto text-gray-600 bg:text-gray-400 mb-2" }, Wn = { class: "md:max-w-50" }, qn = { class: "flex items-center mb-4" }, Gn = { class: "flex-auto text-gray-600 bg:text-gray-400" }, Jn = { class: "flex items-center mb-4" }, Zn = { class: "flex-auto text-gray-600 bg:text-gray-400" }, Ro = /* @__PURE__ */ S({
|
|
658
658
|
__name: "BlockService",
|
|
659
659
|
props: {
|
|
660
660
|
locale: {},
|
|
@@ -662,16 +662,16 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
662
662
|
},
|
|
663
663
|
emits: ["reboot", "reset", "locale"],
|
|
664
664
|
setup(e, { emit: n }) {
|
|
665
|
-
const
|
|
665
|
+
const o = n, l = (r) => o("locale", r), t = (r) => {
|
|
666
666
|
var c;
|
|
667
667
|
return (c = e.locales.find((d) => d.value === r)) == null ? void 0 : c.name;
|
|
668
668
|
};
|
|
669
669
|
return (r, c) => {
|
|
670
|
-
const d =
|
|
671
|
-
return
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
670
|
+
const d = ae, m = A;
|
|
671
|
+
return f(), v(E, null, [
|
|
672
|
+
s("div", Rn, [
|
|
673
|
+
s("div", Un, x(r.$t("selectLang")), 1),
|
|
674
|
+
s("div", Wn, [
|
|
675
675
|
g(d, {
|
|
676
676
|
"model-value": t(e.locale),
|
|
677
677
|
label: r.$t("lang"),
|
|
@@ -680,29 +680,29 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
680
680
|
}, null, 8, ["model-value", "label", "items"])
|
|
681
681
|
])
|
|
682
682
|
]),
|
|
683
|
-
|
|
684
|
-
|
|
683
|
+
s("div", qn, [
|
|
684
|
+
s("div", Gn, x(r.$t("rebootDev")), 1),
|
|
685
685
|
g(m, {
|
|
686
686
|
class: "min-w-[100px]",
|
|
687
687
|
color: "red",
|
|
688
688
|
outline: "",
|
|
689
|
-
onClick: c[0] || (c[0] = (
|
|
689
|
+
onClick: c[0] || (c[0] = (i) => o("reboot", i))
|
|
690
690
|
}, {
|
|
691
|
-
default:
|
|
692
|
-
|
|
691
|
+
default: y(() => [
|
|
692
|
+
D(x(r.$t("reboot")), 1)
|
|
693
693
|
]),
|
|
694
694
|
_: 1
|
|
695
695
|
})
|
|
696
696
|
]),
|
|
697
|
-
|
|
698
|
-
|
|
697
|
+
s("div", Jn, [
|
|
698
|
+
s("div", Zn, x(r.$t("resetConf")), 1),
|
|
699
699
|
g(m, {
|
|
700
700
|
class: "min-w-[100px]",
|
|
701
701
|
color: "red",
|
|
702
|
-
onClick: c[1] || (c[1] = (
|
|
702
|
+
onClick: c[1] || (c[1] = (i) => o("reset", i))
|
|
703
703
|
}, {
|
|
704
|
-
default:
|
|
705
|
-
|
|
704
|
+
default: y(() => [
|
|
705
|
+
D(x(r.$t("reset")), 1)
|
|
706
706
|
]),
|
|
707
707
|
_: 1
|
|
708
708
|
})
|
|
@@ -710,7 +710,7 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
710
710
|
], 64);
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
|
-
}),
|
|
713
|
+
}), Xn = { class: "grid grid-cols-1 gap-4 lg:max-w-[360px] min-w-[250px]" }, Yn = { class: "flex flex-col w-full items-center gap-2" }, Qn = ["title"], es = { class: "absolute left-[110px] top-1/2 -translate-1/2 text-center text-sm font-bold leading-none text-gray-900 dark:text-white" }, ts = { class: "absolute left-[110px] top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, ns = { class: "flex justify-between w-full text-xs" }, ss = { class: "text-gray-500 dark:text-white/50" }, ls = { class: "text-sm" }, as = { class: "text-gray-500 dark:text-white/50 text-left" }, os = { class: "text-right text-xs" }, Uo = /* @__PURE__ */ S({
|
|
714
714
|
__name: "BlockStatus",
|
|
715
715
|
props: {
|
|
716
716
|
pkg: {},
|
|
@@ -724,138 +724,138 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
724
724
|
board: {}
|
|
725
725
|
},
|
|
726
726
|
setup(e) {
|
|
727
|
-
const n =
|
|
728
|
-
let
|
|
729
|
-
const l =
|
|
727
|
+
const n = M(e.uptime);
|
|
728
|
+
let o = null;
|
|
729
|
+
const l = B(() => e.firmware.join(".")), t = B(() => [
|
|
730
730
|
{ name: "used", value: pe(e.usedBytes) },
|
|
731
731
|
{ name: "available", value: pe(e.totalBytes - e.usedBytes) },
|
|
732
732
|
{ name: "total", value: pe(e.totalBytes) }
|
|
733
|
-
]), r =
|
|
733
|
+
]), r = B(() => {
|
|
734
734
|
var m;
|
|
735
735
|
return [
|
|
736
|
-
{ name: "uptime", value:
|
|
736
|
+
{ name: "uptime", value: vt(n.value) },
|
|
737
737
|
{ name: "id", value: `${e.id.toString(16)} (${e.id})` },
|
|
738
738
|
{ name: "firmware", value: l.value },
|
|
739
739
|
{ name: "version", value: (m = e.pkg) == null ? void 0 : m.version }
|
|
740
740
|
];
|
|
741
|
-
}), c =
|
|
742
|
-
n.value++,
|
|
741
|
+
}), c = B(() => e.usedBytes ? Math.round(e.usedBytes * 100 / e.totalBytes) : 0), d = () => {
|
|
742
|
+
n.value++, o = setTimeout(d, 1e3);
|
|
743
743
|
};
|
|
744
|
-
return
|
|
744
|
+
return ee(() => {
|
|
745
745
|
d();
|
|
746
|
-
}),
|
|
747
|
-
n.value = 0,
|
|
748
|
-
}), (m,
|
|
749
|
-
var
|
|
750
|
-
return
|
|
751
|
-
|
|
752
|
-
|
|
746
|
+
}), ke(() => {
|
|
747
|
+
n.value = 0, o && clearTimeout(o);
|
|
748
|
+
}), (m, i) => {
|
|
749
|
+
var a, u, p;
|
|
750
|
+
return f(), v("div", Xn, [
|
|
751
|
+
s("div", Yn, [
|
|
752
|
+
s("div", {
|
|
753
753
|
class: "relative block h-4 w-full select-none overflow-hidden rounded-md bg-gray-200/70 dark:bg-white/10",
|
|
754
754
|
title: `${c.value}%`
|
|
755
755
|
}, [
|
|
756
|
-
|
|
757
|
-
|
|
756
|
+
s("div", es, x(c.value) + "%", 1),
|
|
757
|
+
s("div", {
|
|
758
758
|
class: "relative h-4 overflow-hidden rounded-md bg-primary transition-all duration-500",
|
|
759
|
-
style:
|
|
759
|
+
style: ce(`width: ${c.value}%`)
|
|
760
760
|
}, [
|
|
761
|
-
|
|
761
|
+
s("div", ts, x(c.value) + "%", 1)
|
|
762
762
|
], 4)
|
|
763
|
-
], 8,
|
|
764
|
-
|
|
765
|
-
(
|
|
763
|
+
], 8, Qn),
|
|
764
|
+
s("div", ns, [
|
|
765
|
+
(f(!0), v(E, null, j(t.value, (b) => (f(), v("div", {
|
|
766
766
|
key: b.name,
|
|
767
767
|
class: "flex-auto"
|
|
768
768
|
}, [
|
|
769
|
-
|
|
769
|
+
s("div", ss, [
|
|
770
770
|
k(m.$slots, "name", { item: b })
|
|
771
771
|
]),
|
|
772
|
-
|
|
772
|
+
s("div", null, x(b.value), 1)
|
|
773
773
|
]))), 128))
|
|
774
774
|
])
|
|
775
775
|
]),
|
|
776
|
-
|
|
777
|
-
(
|
|
776
|
+
s("div", ls, [
|
|
777
|
+
(f(!0), v(E, null, j(r.value, (b) => (f(), v("div", {
|
|
778
778
|
key: b.name,
|
|
779
779
|
class: "flex justify-between items-center"
|
|
780
780
|
}, [
|
|
781
|
-
|
|
781
|
+
s("div", as, [
|
|
782
782
|
k(m.$slots, "name", { item: b })
|
|
783
783
|
]),
|
|
784
|
-
|
|
784
|
+
s("div", os, x(b.value), 1)
|
|
785
785
|
]))), 128))
|
|
786
786
|
]),
|
|
787
|
-
|
|
787
|
+
s("div", null, [
|
|
788
788
|
k(m.$slots, "default", {
|
|
789
|
-
home: (
|
|
790
|
-
repo: (
|
|
789
|
+
home: (a = e.pkg) == null ? void 0 : a.homepage,
|
|
790
|
+
repo: (p = (u = e.pkg) == null ? void 0 : u.repository) == null ? void 0 : p.url
|
|
791
791
|
})
|
|
792
792
|
])
|
|
793
793
|
]);
|
|
794
794
|
};
|
|
795
795
|
}
|
|
796
|
-
}),
|
|
796
|
+
}), is = { class: "flex items-center cursor-pointer" }, rs = /* @__PURE__ */ S({
|
|
797
797
|
__name: "VFile",
|
|
798
798
|
emits: ["change"],
|
|
799
799
|
setup(e, { emit: n }) {
|
|
800
|
-
const
|
|
800
|
+
const o = n, l = async (t) => {
|
|
801
801
|
const r = t.target;
|
|
802
|
-
r.files &&
|
|
802
|
+
r.files && o("change", r.files);
|
|
803
803
|
};
|
|
804
|
-
return (t, r) => (
|
|
805
|
-
|
|
804
|
+
return (t, r) => (f(), v("label", is, [
|
|
805
|
+
s("input", H({
|
|
806
806
|
type: "file",
|
|
807
807
|
class: "hidden"
|
|
808
808
|
}, t.$attrs, { onChange: l }), null, 16),
|
|
809
809
|
k(t.$slots, "default")
|
|
810
810
|
]));
|
|
811
811
|
}
|
|
812
|
-
}),
|
|
812
|
+
}), ds = { class: "md:flex" }, cs = { class: "text-gray-600 bg:text-gray-400 first-letter:uppercase min-w-19" }, Wo = /* @__PURE__ */ S({
|
|
813
813
|
__name: "BlockUpdate",
|
|
814
814
|
emits: ["update"],
|
|
815
815
|
setup(e, { emit: n }) {
|
|
816
|
-
const
|
|
817
|
-
const
|
|
818
|
-
for (let
|
|
819
|
-
const u = d.item(
|
|
816
|
+
const o = n, l = nt({ firmware: null, littlefs: null }), t = (d) => d ? Array.from(d).map((m) => `${m.name} (${pe(m.size)})`).join("") : "", r = (d, m) => {
|
|
817
|
+
const i = new FormData();
|
|
818
|
+
for (let a = 0; a < d.length; a++) {
|
|
819
|
+
const u = d.item(a);
|
|
820
820
|
if (!u) return;
|
|
821
|
-
|
|
821
|
+
i.append(`file[${a}]`, u, m);
|
|
822
822
|
}
|
|
823
|
-
return
|
|
823
|
+
return i;
|
|
824
824
|
}, c = (d, m) => {
|
|
825
825
|
if (!m) return;
|
|
826
|
-
const
|
|
827
|
-
|
|
826
|
+
const i = r(m, d);
|
|
827
|
+
i && o("update", d, i);
|
|
828
828
|
};
|
|
829
829
|
return (d, m) => {
|
|
830
|
-
const
|
|
831
|
-
return
|
|
832
|
-
(
|
|
830
|
+
const i = A;
|
|
831
|
+
return f(), v("div", null, [
|
|
832
|
+
(f(!0), v(E, null, j(l, (a, u) => (f(), v("div", {
|
|
833
833
|
key: u,
|
|
834
834
|
class: "mb-4 flex items-center"
|
|
835
835
|
}, [
|
|
836
|
-
g(
|
|
836
|
+
g(rs, {
|
|
837
837
|
accept: ".bin",
|
|
838
|
-
onChange: (
|
|
838
|
+
onChange: (p) => l[u] = p,
|
|
839
839
|
class: "flex-auto"
|
|
840
840
|
}, {
|
|
841
|
-
default:
|
|
842
|
-
|
|
843
|
-
|
|
841
|
+
default: y(() => [
|
|
842
|
+
s("div", ds, [
|
|
843
|
+
s("h6", cs, x(u) + ":", 1),
|
|
844
844
|
k(d.$slots, "default", {
|
|
845
|
-
file: t(
|
|
845
|
+
file: t(a)
|
|
846
846
|
})
|
|
847
847
|
])
|
|
848
848
|
]),
|
|
849
849
|
_: 2
|
|
850
850
|
}, 1032, ["onChange"]),
|
|
851
|
-
g(
|
|
851
|
+
g(i, {
|
|
852
852
|
class: "min-w-[100px]",
|
|
853
853
|
color: "blue",
|
|
854
|
-
disabled: !
|
|
855
|
-
onClick: (
|
|
854
|
+
disabled: !a,
|
|
855
|
+
onClick: (p) => c(`${u}.bin`, a)
|
|
856
856
|
}, {
|
|
857
|
-
default:
|
|
858
|
-
|
|
857
|
+
default: y(() => [
|
|
858
|
+
D(x(d.$t("btnUpdate")), 1)
|
|
859
859
|
]),
|
|
860
860
|
_: 1
|
|
861
861
|
}, 8, ["disabled", "onClick"])
|
|
@@ -863,72 +863,286 @@ const cn = O({ name: "ri-arrow-right-s-line", render: dn }), un = { class: "mb-4
|
|
|
863
863
|
]);
|
|
864
864
|
};
|
|
865
865
|
}
|
|
866
|
-
}),
|
|
866
|
+
}), us = {
|
|
867
867
|
viewBox: "0 0 24 24",
|
|
868
868
|
width: "1.2em",
|
|
869
869
|
height: "1.2em"
|
|
870
870
|
};
|
|
871
|
-
function
|
|
872
|
-
return
|
|
873
|
-
|
|
871
|
+
function ms(e, n) {
|
|
872
|
+
return f(), v("svg", us, [...n[0] || (n[0] = [
|
|
873
|
+
s("path", {
|
|
874
874
|
fill: "currentColor",
|
|
875
875
|
d: "M12.172 12L9.343 9.173l1.415-1.414L15 12l-4.242 4.242l-1.415-1.414z"
|
|
876
876
|
}, null, -1)
|
|
877
877
|
])]);
|
|
878
878
|
}
|
|
879
|
-
const Re = O({ name: "ri-arrow-drop-right-line", render:
|
|
879
|
+
const Re = O({ name: "ri-arrow-drop-right-line", render: ms }), fs = { class: "flex items-center gap-1.5" }, qo = /* @__PURE__ */ S({
|
|
880
880
|
__name: "BlockBreadcrumb",
|
|
881
881
|
props: {
|
|
882
882
|
items: { default: () => [] }
|
|
883
883
|
},
|
|
884
884
|
emits: ["click"],
|
|
885
885
|
setup(e, { emit: n }) {
|
|
886
|
-
const
|
|
886
|
+
const o = n, l = (t) => o("click", t);
|
|
887
887
|
return (t, r) => {
|
|
888
888
|
const c = Re;
|
|
889
|
-
return
|
|
890
|
-
|
|
891
|
-
(
|
|
889
|
+
return f(), v("nav", null, [
|
|
890
|
+
s("ol", fs, [
|
|
891
|
+
(f(!0), v(E, null, j(e.items, (d, m) => (f(), v("li", {
|
|
892
892
|
key: m,
|
|
893
|
-
class:
|
|
893
|
+
class: z(["inline-flex items-center gap-1.5 text-sm text-gray-500 dark:text-gray-400", d.path ? "" : "text-gray-800 dark:text-white/90"])
|
|
894
894
|
}, [
|
|
895
895
|
k(t.$slots, "default", { item: d }, () => [
|
|
896
|
-
(
|
|
896
|
+
(f(), I(fe(d.path ? "a" : "span"), {
|
|
897
897
|
href: d.path,
|
|
898
|
-
onClick: (
|
|
898
|
+
onClick: (i) => l(d)
|
|
899
899
|
}, {
|
|
900
|
-
default:
|
|
901
|
-
|
|
900
|
+
default: y(() => [
|
|
901
|
+
D(x(d.name), 1)
|
|
902
902
|
]),
|
|
903
903
|
_: 2
|
|
904
904
|
}, 1032, ["href", "onClick"]))
|
|
905
905
|
]),
|
|
906
|
-
d.path ? (
|
|
906
|
+
d.path ? (f(), I(c, {
|
|
907
907
|
key: 0,
|
|
908
908
|
class: "rotate-270"
|
|
909
|
-
})) :
|
|
909
|
+
})) : T("", !0)
|
|
910
910
|
], 2))), 128))
|
|
911
911
|
])
|
|
912
912
|
]);
|
|
913
913
|
};
|
|
914
914
|
}
|
|
915
|
-
}),
|
|
915
|
+
}), ps = { class: "flex items-center gap-2" }, vs = { class: "grid gap-4 lg:grid-cols-[minmax(0,1fr)_260px]" }, hs = { class: "relative min-h-80 sm:min-h-96" }, gs = {
|
|
916
|
+
class: "pointer-events-none absolute inset-0 size-full",
|
|
917
|
+
viewBox: "0 0 100 100",
|
|
918
|
+
preserveAspectRatio: "none",
|
|
919
|
+
"aria-hidden": "true"
|
|
920
|
+
}, bs = ["id", "d"], ys = ["d"], xs = ["dur", "begin", "keyPoints"], _s = ["href"], $s = { class: "relative grid h-full grid-cols-2 grid-rows-3 gap-3" }, ks = { class: "glass-inset flex min-w-0 items-center gap-2 rounded-md px-2.5 py-2" }, ws = { class: "min-w-0" }, Cs = { class: "block truncate text-xs text-gray-500 dark:text-gray-400" }, Ss = { class: "block text-sm font-semibold" }, zs = { class: "col-span-2 row-start-2 grid place-items-center" }, Vs = { class: "relative grid size-20 place-items-center rounded-full border border-primary/30 bg-primary/10 text-primary" }, Ts = { class: "relative flex flex-col items-center" }, Ls = { class: "mt-1 text-xs font-semibold text-gray-600 dark:text-gray-300" }, Es = { class: "flex flex-col gap-2" }, Bs = { class: "grid grid-cols-2 gap-2" }, Ms = { class: "flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400" }, As = { class: "mt-1 text-sm font-semibold" }, Ds = { class: "rounded-md bg-white/5 p-3" }, Ps = { class: "flex items-center justify-between gap-2 text-xs" }, Is = { class: "font-semibold" }, js = { class: "mt-2 h-1.5 overflow-hidden rounded-full bg-gray-200/70 dark:bg-white/10" }, Hs = { class: "mt-2 text-xs text-gray-500 dark:text-gray-400" }, Ns = { class: "rounded-md bg-white/5 p-3 text-xs text-gray-500 dark:text-gray-400" }, Os = { class: "font-medium text-gray-600 dark:text-gray-300" }, Fs = { class: "mt-1" }, Go = /* @__PURE__ */ S({
|
|
921
|
+
__name: "EnergyFlowBlock",
|
|
922
|
+
props: {
|
|
923
|
+
title: { default: "Сетевой инвертор" },
|
|
924
|
+
online: { type: Boolean, default: !0 },
|
|
925
|
+
solarPower: { default: 3.2 },
|
|
926
|
+
gridPower: { default: () => -0.6 },
|
|
927
|
+
batteryPower: { default: 0.8 },
|
|
928
|
+
batterySoc: { default: 78 },
|
|
929
|
+
loadPower: { default: 1.8 },
|
|
930
|
+
gridVoltage: { default: 230 },
|
|
931
|
+
gridFrequency: { default: 50 },
|
|
932
|
+
temperature: { default: 34 }
|
|
933
|
+
},
|
|
934
|
+
emits: ["refresh"],
|
|
935
|
+
setup(e, { emit: n }) {
|
|
936
|
+
const o = n, l = (m) => `${Math.abs(m).toFixed(1)} кВт`, t = B(() => [
|
|
937
|
+
{ id: "solar", d: "M24 16 L50 50", tone: "text-amber-500", active: e.solarPower > 0, reverse: !1, path: "solar" },
|
|
938
|
+
{ id: "battery", d: "M76 16 L50 50", tone: "text-emerald-500", active: e.batteryPower !== 0, reverse: e.batteryPower > 0, path: "battery" },
|
|
939
|
+
{ id: "grid", d: "M24 84 L50 50", tone: "text-primary", active: e.gridPower !== 0, reverse: e.gridPower < 0, path: "grid" },
|
|
940
|
+
{ id: "home", d: "M76 84 L50 50", tone: "text-violet-500", active: e.loadPower > 0, reverse: !0, path: "home" }
|
|
941
|
+
]), r = B(() => [
|
|
942
|
+
{
|
|
943
|
+
key: "solar",
|
|
944
|
+
wrapper: "col-start-1 row-start-1 justify-self-start",
|
|
945
|
+
icon: "sun",
|
|
946
|
+
label: "Солнечная панель",
|
|
947
|
+
value: l(e.solarPower),
|
|
948
|
+
tone: "text-amber-500",
|
|
949
|
+
surface: "border-amber-500/20 bg-amber-500/10",
|
|
950
|
+
active: e.solarPower > 0
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
key: "battery",
|
|
954
|
+
wrapper: "col-start-2 row-start-1 justify-self-end",
|
|
955
|
+
icon: "battery",
|
|
956
|
+
label: "Батарея",
|
|
957
|
+
value: `${e.batterySoc} %`,
|
|
958
|
+
tone: "text-emerald-500",
|
|
959
|
+
surface: "border-emerald-500/20 bg-emerald-500/10",
|
|
960
|
+
active: e.batterySoc > 0
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
key: "grid",
|
|
964
|
+
wrapper: "col-start-1 row-start-3 self-end justify-self-start",
|
|
965
|
+
icon: "plug",
|
|
966
|
+
label: "Сеть",
|
|
967
|
+
value: `${e.gridVoltage} В`,
|
|
968
|
+
tone: "text-primary",
|
|
969
|
+
surface: "border-primary/20 bg-primary/10",
|
|
970
|
+
active: e.gridVoltage > 0
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
key: "home",
|
|
974
|
+
wrapper: "col-start-2 row-start-3 justify-self-end self-end",
|
|
975
|
+
icon: "home",
|
|
976
|
+
label: "Дом",
|
|
977
|
+
value: l(e.loadPower),
|
|
978
|
+
tone: "text-violet-500",
|
|
979
|
+
surface: "border-violet-500/20 bg-violet-500/10",
|
|
980
|
+
active: e.loadPower > 0
|
|
981
|
+
}
|
|
982
|
+
]), c = B(() => [
|
|
983
|
+
{ label: "Напряжение сети", value: `${e.gridVoltage} В`, icon: "bolt" },
|
|
984
|
+
{ label: "Частота", value: `${e.gridFrequency} Гц`, icon: "chart" },
|
|
985
|
+
{ label: "Генерация", value: l(e.solarPower), icon: "sun" },
|
|
986
|
+
{ label: "Нагрузка", value: l(e.loadPower), icon: "home" },
|
|
987
|
+
{ label: "Температура", value: `${e.temperature} °C`, icon: "temperature" }
|
|
988
|
+
]), d = B(() => e.gridPower < 0 ? "Отдаём в сеть" : "Берём из сети");
|
|
989
|
+
return (m, i) => (f(), I(ut, { title: e.title }, {
|
|
990
|
+
header: y(() => [
|
|
991
|
+
s("div", ps, [
|
|
992
|
+
s("span", {
|
|
993
|
+
class: z(["inline-flex items-center gap-2 rounded-full border px-2.5 py-1 text-xs font-medium", e.online ? "border-emerald-500/25 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400" : "border-gray-300/60 bg-gray-500/10 text-gray-500 dark:border-white/10 dark:text-gray-400"])
|
|
994
|
+
}, [
|
|
995
|
+
s("span", {
|
|
996
|
+
class: z(["size-1.5 rounded-full", e.online ? "animate-pulse bg-emerald-500" : "bg-gray-400"])
|
|
997
|
+
}, null, 2),
|
|
998
|
+
D(" " + x(e.online ? "Онлайн" : "Не в сети"), 1)
|
|
999
|
+
], 2),
|
|
1000
|
+
g(A, {
|
|
1001
|
+
type: "icon",
|
|
1002
|
+
size: "sm",
|
|
1003
|
+
"aria-label": "Обновить данные",
|
|
1004
|
+
title: "Обновить данные",
|
|
1005
|
+
onClick: i[0] || (i[0] = (a) => o("refresh"))
|
|
1006
|
+
}, {
|
|
1007
|
+
default: y(() => [
|
|
1008
|
+
g(Q, {
|
|
1009
|
+
name: "refresh",
|
|
1010
|
+
size: 16
|
|
1011
|
+
})
|
|
1012
|
+
]),
|
|
1013
|
+
_: 1
|
|
1014
|
+
})
|
|
1015
|
+
])
|
|
1016
|
+
]),
|
|
1017
|
+
default: y(() => [
|
|
1018
|
+
s("div", vs, [
|
|
1019
|
+
s("div", hs, [
|
|
1020
|
+
(f(), v("svg", gs, [
|
|
1021
|
+
(f(!0), v(E, null, j(t.value, (a) => (f(), v("path", {
|
|
1022
|
+
id: `energy-line-${a.id}`,
|
|
1023
|
+
key: `base-${a.id}`,
|
|
1024
|
+
class: "energy-base",
|
|
1025
|
+
d: a.d,
|
|
1026
|
+
fill: "none",
|
|
1027
|
+
"vector-effect": "non-scaling-stroke"
|
|
1028
|
+
}, null, 8, bs))), 128)),
|
|
1029
|
+
(f(!0), v(E, null, j(t.value.filter((a) => a.active), (a) => (f(), v("path", {
|
|
1030
|
+
key: `flow-${a.id}`,
|
|
1031
|
+
class: z(["energy-line", [a.tone, { "energy-line--reverse": a.reverse }]]),
|
|
1032
|
+
d: a.d,
|
|
1033
|
+
fill: "none",
|
|
1034
|
+
"vector-effect": "non-scaling-stroke"
|
|
1035
|
+
}, null, 10, ys))), 128)),
|
|
1036
|
+
(f(!0), v(E, null, j(t.value.filter((a) => a.active), (a, u) => (f(), v("circle", {
|
|
1037
|
+
key: `dot-${a.id}`,
|
|
1038
|
+
r: "1.5",
|
|
1039
|
+
fill: "currentColor",
|
|
1040
|
+
class: z(a.tone)
|
|
1041
|
+
}, [
|
|
1042
|
+
s("animateMotion", {
|
|
1043
|
+
dur: `${3 + u * 0.4}s`,
|
|
1044
|
+
begin: `${u * 0.25}s`,
|
|
1045
|
+
repeatCount: "indefinite",
|
|
1046
|
+
calcMode: "linear",
|
|
1047
|
+
keyTimes: "0;1",
|
|
1048
|
+
keyPoints: a.reverse ? "1;0" : "0;1"
|
|
1049
|
+
}, [
|
|
1050
|
+
s("mpath", {
|
|
1051
|
+
href: `#energy-line-${a.id}`
|
|
1052
|
+
}, null, 8, _s)
|
|
1053
|
+
], 8, xs)
|
|
1054
|
+
], 2))), 128))
|
|
1055
|
+
])),
|
|
1056
|
+
s("div", $s, [
|
|
1057
|
+
(f(!0), v(E, null, j(r.value, (a) => (f(), v("div", {
|
|
1058
|
+
key: a.key,
|
|
1059
|
+
class: z(a.wrapper)
|
|
1060
|
+
}, [
|
|
1061
|
+
s("div", ks, [
|
|
1062
|
+
s("span", {
|
|
1063
|
+
class: z(["grid size-9 shrink-0 place-items-center rounded-md border", [a.tone, a.surface, { "opacity-40": !a.active }]])
|
|
1064
|
+
}, [
|
|
1065
|
+
g(Q, {
|
|
1066
|
+
name: a.icon,
|
|
1067
|
+
size: 18
|
|
1068
|
+
}, null, 8, ["name"])
|
|
1069
|
+
], 2),
|
|
1070
|
+
s("span", ws, [
|
|
1071
|
+
s("span", Cs, x(a.label), 1),
|
|
1072
|
+
s("span", Ss, x(a.value), 1)
|
|
1073
|
+
])
|
|
1074
|
+
])
|
|
1075
|
+
], 2))), 128)),
|
|
1076
|
+
s("div", zs, [
|
|
1077
|
+
s("div", Vs, [
|
|
1078
|
+
i[1] || (i[1] = s("span", { class: "absolute inset-0 animate-ping rounded-full border border-primary/20" }, null, -1)),
|
|
1079
|
+
s("span", Ts, [
|
|
1080
|
+
g(Q, {
|
|
1081
|
+
name: "inverter",
|
|
1082
|
+
size: 26
|
|
1083
|
+
}),
|
|
1084
|
+
s("span", Ls, x(l(e.loadPower)), 1)
|
|
1085
|
+
])
|
|
1086
|
+
])
|
|
1087
|
+
])
|
|
1088
|
+
])
|
|
1089
|
+
]),
|
|
1090
|
+
s("div", Es, [
|
|
1091
|
+
s("dl", Bs, [
|
|
1092
|
+
(f(!0), v(E, null, j(c.value, (a) => (f(), v("div", {
|
|
1093
|
+
key: a.label,
|
|
1094
|
+
class: "rounded-md bg-white/5 p-3"
|
|
1095
|
+
}, [
|
|
1096
|
+
s("dt", Ms, [
|
|
1097
|
+
g(Q, {
|
|
1098
|
+
name: a.icon,
|
|
1099
|
+
size: 14
|
|
1100
|
+
}, null, 8, ["name"]),
|
|
1101
|
+
D(" " + x(a.label), 1)
|
|
1102
|
+
]),
|
|
1103
|
+
s("dd", As, x(a.value), 1)
|
|
1104
|
+
]))), 128))
|
|
1105
|
+
]),
|
|
1106
|
+
s("div", Ds, [
|
|
1107
|
+
s("div", Ps, [
|
|
1108
|
+
i[2] || (i[2] = s("span", { class: "text-gray-500 dark:text-gray-400" }, "Батарея", -1)),
|
|
1109
|
+
s("span", Is, x(e.batterySoc) + " %", 1)
|
|
1110
|
+
]),
|
|
1111
|
+
s("div", js, [
|
|
1112
|
+
s("div", {
|
|
1113
|
+
class: "h-full rounded-full bg-emerald-500 transition-all duration-500",
|
|
1114
|
+
style: ce({ width: `${e.batterySoc}%` })
|
|
1115
|
+
}, null, 4)
|
|
1116
|
+
]),
|
|
1117
|
+
s("p", Hs, x(e.batteryPower >= 0 ? "Зарядка" : "Разрядка") + " · " + x(l(e.batteryPower)), 1)
|
|
1118
|
+
]),
|
|
1119
|
+
s("div", Ns, [
|
|
1120
|
+
s("p", Os, x(d.value), 1),
|
|
1121
|
+
s("p", Fs, x(l(e.gridPower)) + " · " + x(e.gridFrequency) + " Гц", 1)
|
|
1122
|
+
])
|
|
1123
|
+
])
|
|
1124
|
+
])
|
|
1125
|
+
]),
|
|
1126
|
+
_: 1
|
|
1127
|
+
}, 8, ["title"]));
|
|
1128
|
+
}
|
|
1129
|
+
}), Ks = {
|
|
916
1130
|
viewBox: "0 0 24 24",
|
|
917
1131
|
width: "1.2em",
|
|
918
1132
|
height: "1.2em"
|
|
919
1133
|
};
|
|
920
|
-
function
|
|
921
|
-
return
|
|
922
|
-
|
|
1134
|
+
function Rs(e, n) {
|
|
1135
|
+
return f(), v("svg", Ks, [...n[0] || (n[0] = [
|
|
1136
|
+
s("path", {
|
|
923
1137
|
fill: "currentColor",
|
|
924
1138
|
d: "M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9zm-2 5h6v2H7zm0 4h6v2H7z"
|
|
925
1139
|
}, null, -1)
|
|
926
1140
|
])]);
|
|
927
1141
|
}
|
|
928
|
-
const
|
|
1142
|
+
const Us = O({ name: "ri-file-copy2-line", render: Rs }), Ws = { class: "flex-auto flex justify-between" }, qs = { class: "text-sm text-gray-500 font-medium line-clamp-2 overflow-hidden" }, Gs = { class: "text-sm text-ellipsis overflow-hidden text-nowrap" }, Js = {
|
|
929
1143
|
key: 0,
|
|
930
1144
|
class: "absolute left-1/2 top-1/2 size-[calc(50%)] text-gray-200/30 dark:text-gray-800/30 -translate-1/2"
|
|
931
|
-
},
|
|
1145
|
+
}, Zs = { class: "min-h-60 relative" }, Xs = { class: "pt-6" }, Ys = { class: "text-center text-3xl text-ellipsis overflow-hidden" }, Qs = { class: "text-center text-xl mt-4" }, ie = /* @__PURE__ */ S({
|
|
932
1146
|
__name: "CardBase",
|
|
933
1147
|
props: {
|
|
934
1148
|
size: {},
|
|
@@ -948,53 +1162,53 @@ const bl = O({ name: "ri-file-copy2-line", render: gl }), xl = { class: "flex-au
|
|
|
948
1162
|
},
|
|
949
1163
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
950
1164
|
setup(e, { emit: n }) {
|
|
951
|
-
const
|
|
1165
|
+
const o = e, l = n, t = M(!1), r = B(() => ["button", "dimmer"].includes(o.type || "") && o.value ? "text-amber-500" : "text-gray-400"), c = (u) => l("edit", u), d = (u) => l("clone", u), m = () => t.value = !0, i = (u) => l("open", u), a = (u) => {
|
|
952
1166
|
t.value = !1, l("close", u);
|
|
953
1167
|
};
|
|
954
|
-
return (u,
|
|
955
|
-
const b =
|
|
956
|
-
return
|
|
1168
|
+
return (u, p) => {
|
|
1169
|
+
const b = Fe, h = Us;
|
|
1170
|
+
return f(), v("div", {
|
|
957
1171
|
class: "glass-panel relative flex aspect-square cursor-pointer flex-col p-2 transition-all hover:border-primary/25 hover:shadow-[inset_0_1px_0_rgba(255,255,255,0.18),0_0_50px_-18px_rgba(40,183,240,0.25)]",
|
|
958
1172
|
onClick: m
|
|
959
1173
|
}, [
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
class:
|
|
1174
|
+
s("div", Ws, [
|
|
1175
|
+
s("div", {
|
|
1176
|
+
class: z([r.value, "size-8 animate-shake"])
|
|
963
1177
|
}, [
|
|
964
|
-
k(u.$slots, "icon", K(R(
|
|
1178
|
+
k(u.$slots, "icon", K(R(o)))
|
|
965
1179
|
], 2),
|
|
966
|
-
k(u.$slots, "header", K(R(
|
|
1180
|
+
k(u.$slots, "header", K(R(o)))
|
|
967
1181
|
]),
|
|
968
|
-
|
|
969
|
-
k(u.$slots, "body", K(R(
|
|
970
|
-
|
|
971
|
-
k(u.$slots, "name", K(R(
|
|
972
|
-
|
|
1182
|
+
s("div", null, [
|
|
1183
|
+
k(u.$slots, "body", K(R(o)), () => [
|
|
1184
|
+
s("h6", qs, [
|
|
1185
|
+
k(u.$slots, "name", K(R(o)), () => [
|
|
1186
|
+
D(x(o.name), 1)
|
|
973
1187
|
])
|
|
974
1188
|
]),
|
|
975
|
-
|
|
976
|
-
k(u.$slots, "value", K(R(
|
|
977
|
-
|
|
1189
|
+
s("div", Gs, [
|
|
1190
|
+
k(u.$slots, "value", K(R(o)), () => [
|
|
1191
|
+
D(x(o.valueTo || o.value), 1)
|
|
978
1192
|
])
|
|
979
1193
|
])
|
|
980
1194
|
])
|
|
981
1195
|
]),
|
|
982
|
-
|
|
983
|
-
k(u.$slots, "icon", K(R(
|
|
984
|
-
])) :
|
|
985
|
-
t.value ? (
|
|
1196
|
+
o.icon ? (f(), v("div", Js, [
|
|
1197
|
+
k(u.$slots, "icon", K(R(o)))
|
|
1198
|
+
])) : T("", !0),
|
|
1199
|
+
t.value ? (f(), I(Oe, {
|
|
986
1200
|
key: 1,
|
|
987
|
-
size:
|
|
1201
|
+
size: o.size || "sm",
|
|
988
1202
|
title: e.name,
|
|
989
|
-
onClose:
|
|
990
|
-
onOpen:
|
|
1203
|
+
onClose: a,
|
|
1204
|
+
onOpen: i
|
|
991
1205
|
}, {
|
|
992
|
-
"header-btn":
|
|
1206
|
+
"header-btn": y(() => [
|
|
993
1207
|
g(A, {
|
|
994
1208
|
color: "transparent",
|
|
995
1209
|
onClick: c
|
|
996
1210
|
}, {
|
|
997
|
-
default:
|
|
1211
|
+
default: y(() => [
|
|
998
1212
|
g(b)
|
|
999
1213
|
]),
|
|
1000
1214
|
_: 1
|
|
@@ -1003,48 +1217,48 @@ const bl = O({ name: "ri-file-copy2-line", render: gl }), xl = { class: "flex-au
|
|
|
1003
1217
|
color: "transparent",
|
|
1004
1218
|
onClick: d
|
|
1005
1219
|
}, {
|
|
1006
|
-
default:
|
|
1220
|
+
default: y(() => [
|
|
1007
1221
|
g(h, { class: "size-4 text-gray-500" })
|
|
1008
1222
|
]),
|
|
1009
1223
|
_: 1
|
|
1010
1224
|
})
|
|
1011
1225
|
]),
|
|
1012
|
-
default:
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
k(u.$slots, "dialog-name", K(R(
|
|
1017
|
-
|
|
1226
|
+
default: y(() => [
|
|
1227
|
+
s("div", Zs, [
|
|
1228
|
+
s("div", Xs, [
|
|
1229
|
+
s("h3", Ys, [
|
|
1230
|
+
k(u.$slots, "dialog-name", K(R(o)), () => [
|
|
1231
|
+
D(x(o.name), 1)
|
|
1018
1232
|
])
|
|
1019
1233
|
]),
|
|
1020
|
-
k(u.$slots, "dialog", K(R(
|
|
1021
|
-
|
|
1022
|
-
k(u.$slots, "dialog-value", K(R(
|
|
1023
|
-
|
|
1234
|
+
k(u.$slots, "dialog", K(R(o))),
|
|
1235
|
+
s("p", Qs, [
|
|
1236
|
+
k(u.$slots, "dialog-value", K(R(o)), () => [
|
|
1237
|
+
D(x(o.valueTo || o.value), 1)
|
|
1024
1238
|
])
|
|
1025
1239
|
])
|
|
1026
1240
|
])
|
|
1027
1241
|
])
|
|
1028
1242
|
]),
|
|
1029
1243
|
_: 3
|
|
1030
|
-
}, 8, ["size", "title"])) :
|
|
1244
|
+
}, 8, ["size", "title"])) : T("", !0)
|
|
1031
1245
|
]);
|
|
1032
1246
|
};
|
|
1033
1247
|
}
|
|
1034
|
-
}),
|
|
1248
|
+
}), el = {
|
|
1035
1249
|
viewBox: "0 0 24 24",
|
|
1036
1250
|
width: "1.2em",
|
|
1037
1251
|
height: "1.2em"
|
|
1038
1252
|
};
|
|
1039
|
-
function
|
|
1040
|
-
return
|
|
1041
|
-
|
|
1253
|
+
function tl(e, n) {
|
|
1254
|
+
return f(), v("svg", el, [...n[0] || (n[0] = [
|
|
1255
|
+
s("path", {
|
|
1042
1256
|
fill: "currentColor",
|
|
1043
1257
|
d: "m6.265 3.807l1.147 1.639a8 8 0 1 0 9.176 0l1.147-1.639A9.99 9.99 0 0 1 22 12c0 5.523-4.477 10-10 10S2 17.523 2 12a9.99 9.99 0 0 1 4.265-8.193M11 12V2h2v10z"
|
|
1044
1258
|
}, null, -1)
|
|
1045
1259
|
])]);
|
|
1046
1260
|
}
|
|
1047
|
-
const
|
|
1261
|
+
const nl = O({ name: "ri-shut-down-line", render: tl }), sl = { class: "flex justify-end" }, ll = { class: "flex justify-center py-4" }, Jo = /* @__PURE__ */ S({
|
|
1048
1262
|
__name: "CardButton",
|
|
1049
1263
|
props: {
|
|
1050
1264
|
size: {},
|
|
@@ -1064,42 +1278,42 @@ const Vl = O({ name: "ri-shut-down-line", render: Sl }), Tl = { class: "flex jus
|
|
|
1064
1278
|
},
|
|
1065
1279
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1066
1280
|
setup(e, { emit: n }) {
|
|
1067
|
-
const
|
|
1281
|
+
const o = e, l = n, t = ({ opts: c = {} }) => {
|
|
1068
1282
|
const { disabled: d } = c;
|
|
1069
|
-
return { disabled: d };
|
|
1070
|
-
}, r = () => l("setState", !
|
|
1283
|
+
return { disabled: !!d };
|
|
1284
|
+
}, r = () => l("setState", !o.value);
|
|
1071
1285
|
return (c, d) => {
|
|
1072
|
-
const m =
|
|
1073
|
-
return
|
|
1074
|
-
onClick: d[0] || (d[0] = (
|
|
1075
|
-
onEdit: d[1] || (d[1] = (
|
|
1076
|
-
onClone: d[2] || (d[2] = (
|
|
1286
|
+
const m = nl;
|
|
1287
|
+
return f(), I(ie, H(o, {
|
|
1288
|
+
onClick: d[0] || (d[0] = (i) => l("click", i)),
|
|
1289
|
+
onEdit: d[1] || (d[1] = (i) => l("edit", i)),
|
|
1290
|
+
onClone: d[2] || (d[2] = (i) => l("clone", i))
|
|
1077
1291
|
}), {
|
|
1078
|
-
icon:
|
|
1079
|
-
k(c.$slots, "icon", K(R(
|
|
1292
|
+
icon: y((i) => [
|
|
1293
|
+
k(c.$slots, "icon", K(R(i)))
|
|
1080
1294
|
]),
|
|
1081
|
-
header:
|
|
1082
|
-
|
|
1083
|
-
g(A,
|
|
1295
|
+
header: y((i) => [
|
|
1296
|
+
s("div", sl, [
|
|
1297
|
+
g(A, H(t(i), {
|
|
1084
1298
|
type: "icon",
|
|
1085
|
-
class:
|
|
1086
|
-
onClick:
|
|
1299
|
+
class: o.value ? "text-amber-500" : "text-gray-500",
|
|
1300
|
+
onClick: U(r, ["stop"])
|
|
1087
1301
|
}), {
|
|
1088
|
-
default:
|
|
1302
|
+
default: y(() => [
|
|
1089
1303
|
g(m, { class: "size-8" })
|
|
1090
1304
|
]),
|
|
1091
1305
|
_: 1
|
|
1092
1306
|
}, 16, ["class"])
|
|
1093
1307
|
])
|
|
1094
1308
|
]),
|
|
1095
|
-
dialog:
|
|
1096
|
-
|
|
1097
|
-
g(A,
|
|
1309
|
+
dialog: y((i) => [
|
|
1310
|
+
s("div", ll, [
|
|
1311
|
+
g(A, H(t(i), {
|
|
1098
1312
|
type: "icon",
|
|
1099
|
-
class: ["size-18",
|
|
1100
|
-
onClick:
|
|
1313
|
+
class: ["size-18", o.value ? "text-amber-500" : "text-gray-500"],
|
|
1314
|
+
onClick: U(r, ["stop"])
|
|
1101
1315
|
}), {
|
|
1102
|
-
default:
|
|
1316
|
+
default: y(() => [
|
|
1103
1317
|
g(m, { class: "size-16" })
|
|
1104
1318
|
]),
|
|
1105
1319
|
_: 1
|
|
@@ -1110,20 +1324,20 @@ const Vl = O({ name: "ri-shut-down-line", render: Sl }), Tl = { class: "flex jus
|
|
|
1110
1324
|
}, 16);
|
|
1111
1325
|
};
|
|
1112
1326
|
}
|
|
1113
|
-
}),
|
|
1327
|
+
}), al = {
|
|
1114
1328
|
viewBox: "0 0 24 24",
|
|
1115
1329
|
width: "1.2em",
|
|
1116
1330
|
height: "1.2em"
|
|
1117
1331
|
};
|
|
1118
|
-
function
|
|
1119
|
-
return
|
|
1120
|
-
|
|
1332
|
+
function ol(e, n) {
|
|
1333
|
+
return f(), v("svg", al, [...n[0] || (n[0] = [
|
|
1334
|
+
s("path", {
|
|
1121
1335
|
fill: "currentColor",
|
|
1122
1336
|
d: "M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m1-8h4v2h-6V7h2z"
|
|
1123
1337
|
}, null, -1)
|
|
1124
1338
|
])]);
|
|
1125
1339
|
}
|
|
1126
|
-
const
|
|
1340
|
+
const il = O({ name: "ri-time-line", render: ol }), rl = { class: "flex justify-center relative mx-2 my-6" }, Zo = /* @__PURE__ */ S({
|
|
1127
1341
|
__name: "CardDate",
|
|
1128
1342
|
props: {
|
|
1129
1343
|
size: {},
|
|
@@ -1143,44 +1357,44 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1143
1357
|
},
|
|
1144
1358
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1145
1359
|
setup(e, { emit: n }) {
|
|
1146
|
-
const
|
|
1360
|
+
const o = e, l = n, t = Pe("time"), r = (i) => new Date(+i * 1e3).toISOString().slice(0, 16), c = (i) => {
|
|
1147
1361
|
var u;
|
|
1148
|
-
const
|
|
1149
|
-
|
|
1150
|
-
}, d = ({ name:
|
|
1151
|
-
const { disabled:
|
|
1152
|
-
return { label:
|
|
1362
|
+
const a = (u = i == null ? void 0 : i.target) == null ? void 0 : u.valueAsNumber;
|
|
1363
|
+
a && l("setState", a / 1e3);
|
|
1364
|
+
}, d = ({ name: i, value: a, opts: u = {} }) => {
|
|
1365
|
+
const { disabled: p } = u;
|
|
1366
|
+
return { label: i, modelValue: r(a), disabled: p };
|
|
1153
1367
|
}, m = () => {
|
|
1154
|
-
var
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1368
|
+
var a, u;
|
|
1369
|
+
const i = (u = (a = t.value) == null ? void 0 : a.$el) == null ? void 0 : u.querySelector("input");
|
|
1370
|
+
i != null && i.showPicker && i.showPicker();
|
|
1157
1371
|
};
|
|
1158
|
-
return (
|
|
1159
|
-
const u =
|
|
1160
|
-
return
|
|
1161
|
-
onClick:
|
|
1162
|
-
onEdit:
|
|
1163
|
-
onClone:
|
|
1372
|
+
return (i, a) => {
|
|
1373
|
+
const u = il;
|
|
1374
|
+
return f(), I(ie, H(o, {
|
|
1375
|
+
onClick: a[0] || (a[0] = (p) => l("click", p)),
|
|
1376
|
+
onEdit: a[1] || (a[1] = (p) => l("edit", p)),
|
|
1377
|
+
onClone: a[2] || (a[2] = (p) => l("clone", p))
|
|
1164
1378
|
}), {
|
|
1165
|
-
icon:
|
|
1166
|
-
k(
|
|
1379
|
+
icon: y((p) => [
|
|
1380
|
+
k(i.$slots, "icon", K(R(p)))
|
|
1167
1381
|
]),
|
|
1168
|
-
header:
|
|
1169
|
-
|
|
1382
|
+
header: y((p) => [
|
|
1383
|
+
s("div", null, [
|
|
1170
1384
|
g(A, {
|
|
1171
1385
|
type: "icon",
|
|
1172
1386
|
class: "text-gray-500",
|
|
1173
|
-
onClick:
|
|
1387
|
+
onClick: U(m, ["stop"])
|
|
1174
1388
|
}, {
|
|
1175
|
-
default:
|
|
1389
|
+
default: y(() => [
|
|
1176
1390
|
g(u, { class: "size-7" })
|
|
1177
1391
|
]),
|
|
1178
1392
|
_: 1
|
|
1179
1393
|
}),
|
|
1180
|
-
g(J,
|
|
1394
|
+
g(J, H({
|
|
1181
1395
|
ref_key: "time",
|
|
1182
1396
|
ref: t
|
|
1183
|
-
}, d(
|
|
1397
|
+
}, d(p), {
|
|
1184
1398
|
type: "datetime-local",
|
|
1185
1399
|
class: "size-0",
|
|
1186
1400
|
hidden: "",
|
|
@@ -1188,9 +1402,9 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1188
1402
|
}), null, 16)
|
|
1189
1403
|
])
|
|
1190
1404
|
]),
|
|
1191
|
-
dialog:
|
|
1192
|
-
|
|
1193
|
-
g(J,
|
|
1405
|
+
dialog: y((p) => [
|
|
1406
|
+
s("div", rl, [
|
|
1407
|
+
g(J, H(d(p), {
|
|
1194
1408
|
type: "datetime-local",
|
|
1195
1409
|
onChange: c
|
|
1196
1410
|
}), null, 16)
|
|
@@ -1200,15 +1414,15 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1200
1414
|
}, 16);
|
|
1201
1415
|
};
|
|
1202
1416
|
}
|
|
1203
|
-
}),
|
|
1204
|
-
class: /* @__PURE__ */
|
|
1205
|
-
},
|
|
1417
|
+
}), dl = { class: "flex justify-end" }, cl = { class: "flex justify-end" }, ul = {
|
|
1418
|
+
class: /* @__PURE__ */ z("text-blue-600 dark:text-blue-400")
|
|
1419
|
+
}, ml = {
|
|
1206
1420
|
width: "30",
|
|
1207
1421
|
height: "30",
|
|
1208
1422
|
viewBox: "-7.5 -7.5 75 75",
|
|
1209
1423
|
version: "1.1",
|
|
1210
1424
|
style: { transform: "rotate(-90deg)" }
|
|
1211
|
-
},
|
|
1425
|
+
}, fl = ["stroke-dashoffset"], pl = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" }, Xo = /* @__PURE__ */ S({
|
|
1212
1426
|
__name: "CardDimmer",
|
|
1213
1427
|
props: {
|
|
1214
1428
|
size: {},
|
|
@@ -1228,31 +1442,31 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1228
1442
|
},
|
|
1229
1443
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1230
1444
|
setup(e, { emit: n }) {
|
|
1231
|
-
const
|
|
1232
|
-
const { min:
|
|
1233
|
-
return { min:
|
|
1234
|
-
}, m = (
|
|
1235
|
-
+
|
|
1445
|
+
const o = e, l = n, t = M(0), r = ({ opts: a, value: u }) => Math.round(100 * +u / ((a == null ? void 0 : a.max) || 255)), c = ({ opts: a, value: u }) => Math.round(187 - +u / ((a == null ? void 0 : a.max) || 255) * 187), d = ({ value: a, opts: u }) => {
|
|
1446
|
+
const { min: p = 0, max: b = 255, step: h = 1, disabled: _ } = u || {};
|
|
1447
|
+
return { min: p, max: b, step: h, value: a, disabled: !!_, class: _ ? "" : "cursor-pointer" };
|
|
1448
|
+
}, m = (a) => l("setState", +a.target.value || 0), i = ({ value: a }) => {
|
|
1449
|
+
+a != 0 ? (t.value = +a, l("setState", 0)) : l("setState", a ? 0 : t.value || 255);
|
|
1236
1450
|
};
|
|
1237
|
-
return (
|
|
1238
|
-
onClick: u[0] || (u[0] = (
|
|
1239
|
-
onEdit: u[1] || (u[1] = (
|
|
1240
|
-
onClone: u[2] || (u[2] = (
|
|
1451
|
+
return (a, u) => (f(), I(ie, H(o, {
|
|
1452
|
+
onClick: u[0] || (u[0] = (p) => l("click", p)),
|
|
1453
|
+
onEdit: u[1] || (u[1] = (p) => l("edit", p)),
|
|
1454
|
+
onClone: u[2] || (u[2] = (p) => l("clone", p))
|
|
1241
1455
|
}), {
|
|
1242
|
-
icon:
|
|
1243
|
-
k(
|
|
1456
|
+
icon: y((p) => [
|
|
1457
|
+
k(a.$slots, "icon", K(R(p)))
|
|
1244
1458
|
]),
|
|
1245
|
-
header:
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
g(A,
|
|
1459
|
+
header: y((p) => [
|
|
1460
|
+
s("div", dl, [
|
|
1461
|
+
s("div", cl, [
|
|
1462
|
+
g(A, H(d(p), {
|
|
1249
1463
|
type: "icon",
|
|
1250
|
-
onClick:
|
|
1464
|
+
onClick: U((b) => i(p), ["stop"])
|
|
1251
1465
|
}), {
|
|
1252
|
-
default:
|
|
1253
|
-
|
|
1254
|
-
(
|
|
1255
|
-
u[3] || (u[3] =
|
|
1466
|
+
default: y(() => [
|
|
1467
|
+
s("div", ul, [
|
|
1468
|
+
(f(), v("svg", ml, [
|
|
1469
|
+
u[3] || (u[3] = s("circle", {
|
|
1256
1470
|
class: "stroke-gray-300 dark:stroke-gray-700",
|
|
1257
1471
|
r: "30",
|
|
1258
1472
|
cx: "30",
|
|
@@ -1260,17 +1474,17 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1260
1474
|
fill: "transparent",
|
|
1261
1475
|
"stroke-width": "10"
|
|
1262
1476
|
}, null, -1)),
|
|
1263
|
-
|
|
1477
|
+
s("circle", {
|
|
1264
1478
|
r: "30",
|
|
1265
1479
|
cx: "30",
|
|
1266
1480
|
cy: "30",
|
|
1267
1481
|
stroke: "currentColor",
|
|
1268
1482
|
"stroke-width": "8",
|
|
1269
1483
|
"stroke-linecap": "butt",
|
|
1270
|
-
"stroke-dashoffset": c(
|
|
1484
|
+
"stroke-dashoffset": c(p),
|
|
1271
1485
|
fill: "transparent",
|
|
1272
1486
|
"stroke-dasharray": "187"
|
|
1273
|
-
}, null, 8,
|
|
1487
|
+
}, null, 8, fl)
|
|
1274
1488
|
]))
|
|
1275
1489
|
])
|
|
1276
1490
|
]),
|
|
@@ -1279,17 +1493,17 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1279
1493
|
])
|
|
1280
1494
|
])
|
|
1281
1495
|
]),
|
|
1282
|
-
dialog:
|
|
1283
|
-
|
|
1284
|
-
class:
|
|
1496
|
+
dialog: y((p) => [
|
|
1497
|
+
s("div", {
|
|
1498
|
+
class: z(["flex justify-center relative mx-2 my-6", d(p).disabled ? "opacity-40" : ""])
|
|
1285
1499
|
}, [
|
|
1286
|
-
u[4] || (u[4] =
|
|
1287
|
-
|
|
1500
|
+
u[4] || (u[4] = s("div", { class: "absolute h-10 w-full top-0 left-0 bg-gray-400 dark:bg-gray-700 z-0 rounded-md" }, null, -1)),
|
|
1501
|
+
s("div", {
|
|
1288
1502
|
class: "absolute h-10 top-0 left-0 bg-blue-600 dark:bg-blue-400 z-0 rounded-md transition-[width_0.3s_linear]",
|
|
1289
|
-
style:
|
|
1503
|
+
style: ce(`width: ${r(p)}%`)
|
|
1290
1504
|
}, null, 4),
|
|
1291
|
-
|
|
1292
|
-
|
|
1505
|
+
s("div", pl, x(r(p)) + " %", 1),
|
|
1506
|
+
s("input", H({ type: "range" }, d(p), {
|
|
1293
1507
|
class: "w-full h-10 z-10 appearance-none opacity-0",
|
|
1294
1508
|
onChange: m
|
|
1295
1509
|
}), null, 16)
|
|
@@ -1298,7 +1512,7 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1298
1512
|
_: 3
|
|
1299
1513
|
}, 16));
|
|
1300
1514
|
}
|
|
1301
|
-
}),
|
|
1515
|
+
}), Yo = /* @__PURE__ */ S({
|
|
1302
1516
|
__name: "CardInfo",
|
|
1303
1517
|
props: {
|
|
1304
1518
|
size: {},
|
|
@@ -1318,22 +1532,22 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1318
1532
|
},
|
|
1319
1533
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1320
1534
|
setup(e, { emit: n }) {
|
|
1321
|
-
const
|
|
1322
|
-
return (t, r) => (
|
|
1535
|
+
const o = e, l = n;
|
|
1536
|
+
return (t, r) => (f(), I(ie, H(o, {
|
|
1323
1537
|
onClick: r[0] || (r[0] = (c) => l("click", c)),
|
|
1324
1538
|
onEdit: r[1] || (r[1] = (c) => l("edit", c)),
|
|
1325
1539
|
onClone: r[2] || (r[2] = (c) => l("clone", c))
|
|
1326
1540
|
}), {
|
|
1327
|
-
icon:
|
|
1541
|
+
icon: y((c) => [
|
|
1328
1542
|
k(t.$slots, "icon", K(R(c)))
|
|
1329
1543
|
]),
|
|
1330
|
-
default:
|
|
1544
|
+
default: y(() => [
|
|
1331
1545
|
k(t.$slots, "dialog")
|
|
1332
1546
|
]),
|
|
1333
1547
|
_: 3
|
|
1334
1548
|
}, 16));
|
|
1335
1549
|
}
|
|
1336
|
-
}),
|
|
1550
|
+
}), vl = { class: "flex justify-center relative mx-2 my-6" }, Qo = /* @__PURE__ */ S({
|
|
1337
1551
|
__name: "CardInput",
|
|
1338
1552
|
props: {
|
|
1339
1553
|
size: {},
|
|
@@ -1353,36 +1567,36 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1353
1567
|
},
|
|
1354
1568
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1355
1569
|
setup(e, { emit: n }) {
|
|
1356
|
-
const
|
|
1357
|
-
const { disabled:
|
|
1358
|
-
return { label: d, disabled:
|
|
1570
|
+
const o = e, l = n, t = M(o.value || ""), r = ({ name: d, opts: m = {} }) => {
|
|
1571
|
+
const { disabled: i } = m;
|
|
1572
|
+
return { label: d, disabled: i };
|
|
1359
1573
|
}, c = (d) => l("setState", d.target.value);
|
|
1360
|
-
return
|
|
1361
|
-
() =>
|
|
1574
|
+
return oe(
|
|
1575
|
+
() => o.value,
|
|
1362
1576
|
(d) => {
|
|
1363
1577
|
t.value = d;
|
|
1364
1578
|
}
|
|
1365
1579
|
), (d, m) => {
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1368
|
-
onClick: m[1] || (m[1] = (
|
|
1369
|
-
onEdit: m[2] || (m[2] = (
|
|
1370
|
-
onClone: m[3] || (m[3] = (
|
|
1580
|
+
const i = Re;
|
|
1581
|
+
return f(), I(ie, H(o, {
|
|
1582
|
+
onClick: m[1] || (m[1] = (a) => l("click", a)),
|
|
1583
|
+
onEdit: m[2] || (m[2] = (a) => l("edit", a)),
|
|
1584
|
+
onClone: m[3] || (m[3] = (a) => l("clone", a))
|
|
1371
1585
|
}), {
|
|
1372
|
-
icon:
|
|
1373
|
-
k(d.$slots, "icon", K(R(
|
|
1586
|
+
icon: y((a) => [
|
|
1587
|
+
k(d.$slots, "icon", K(R(a)))
|
|
1374
1588
|
]),
|
|
1375
|
-
dialog:
|
|
1376
|
-
|
|
1377
|
-
g(J,
|
|
1589
|
+
dialog: y((a) => [
|
|
1590
|
+
s("div", vl, [
|
|
1591
|
+
g(J, H({
|
|
1378
1592
|
modelValue: t.value,
|
|
1379
1593
|
"onUpdate:modelValue": m[0] || (m[0] = (u) => t.value = u)
|
|
1380
|
-
}, r(
|
|
1594
|
+
}, r(a), {
|
|
1381
1595
|
onEnter: c,
|
|
1382
1596
|
onBlur: c
|
|
1383
1597
|
}), {
|
|
1384
|
-
icon:
|
|
1385
|
-
g(
|
|
1598
|
+
icon: y(() => [
|
|
1599
|
+
g(i, { class: "size-8" })
|
|
1386
1600
|
]),
|
|
1387
1601
|
_: 1
|
|
1388
1602
|
}, 16, ["modelValue"])
|
|
@@ -1392,20 +1606,20 @@ const Al = O({ name: "ri-time-line", render: Bl }), Dl = { class: "flex justify-
|
|
|
1392
1606
|
}, 16);
|
|
1393
1607
|
};
|
|
1394
1608
|
}
|
|
1395
|
-
}),
|
|
1609
|
+
}), hl = {
|
|
1396
1610
|
viewBox: "0 0 24 24",
|
|
1397
1611
|
width: "1.2em",
|
|
1398
1612
|
height: "1.2em"
|
|
1399
1613
|
};
|
|
1400
|
-
function
|
|
1401
|
-
return
|
|
1402
|
-
|
|
1614
|
+
function gl(e, n) {
|
|
1615
|
+
return f(), v("svg", hl, [...n[0] || (n[0] = [
|
|
1616
|
+
s("path", {
|
|
1403
1617
|
fill: "currentColor",
|
|
1404
1618
|
d: "M8 4h13v2H8zm-5-.5h3v3H3zm0 7h3v3H3zm0 7h3v3H3zM8 11h13v2H8zm0 7h13v2H8z"
|
|
1405
1619
|
}, null, -1)
|
|
1406
1620
|
])]);
|
|
1407
1621
|
}
|
|
1408
|
-
const
|
|
1622
|
+
const bl = O({ name: "ri-list-check", render: gl }), yl = { class: "flex justify-center py-4" }, ei = /* @__PURE__ */ S({
|
|
1409
1623
|
__name: "CardList",
|
|
1410
1624
|
props: {
|
|
1411
1625
|
size: {},
|
|
@@ -1425,49 +1639,49 @@ const Fl = O({ name: "ri-list-check", render: Rl }), Wl = { class: "flex justify
|
|
|
1425
1639
|
},
|
|
1426
1640
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
1427
1641
|
setup(e, { emit: n }) {
|
|
1428
|
-
const
|
|
1429
|
-
var
|
|
1430
|
-
return Array.isArray(d == null ? void 0 : d.items) && ((
|
|
1431
|
-
}, c = ({ name: d, value: m, opts:
|
|
1642
|
+
const o = e, l = n, t = ({ value: d }) => l("setState", d), r = ({ opts: d, value: m }) => {
|
|
1643
|
+
var i;
|
|
1644
|
+
return Array.isArray(d == null ? void 0 : d.items) && ((i = d == null ? void 0 : d.items.find((a) => a.value == m)) == null ? void 0 : i.name) || m;
|
|
1645
|
+
}, c = ({ name: d, value: m, opts: i = {} }) => {
|
|
1432
1646
|
var b;
|
|
1433
|
-
const { items:
|
|
1434
|
-
return { label: d, modelValue:
|
|
1647
|
+
const { items: a = [], disabled: u } = i, p = ((b = a.find((h) => h.value == m)) == null ? void 0 : b.name) || m;
|
|
1648
|
+
return { label: d, modelValue: p, items: a, disabled: !!u };
|
|
1435
1649
|
};
|
|
1436
1650
|
return (d, m) => {
|
|
1437
|
-
const
|
|
1438
|
-
return
|
|
1439
|
-
onClick: m[1] || (m[1] = (
|
|
1440
|
-
onEdit: m[2] || (m[2] = (
|
|
1441
|
-
onClone: m[3] || (m[3] = (
|
|
1651
|
+
const i = bl;
|
|
1652
|
+
return f(), I(ie, H(o, {
|
|
1653
|
+
onClick: m[1] || (m[1] = (a) => l("click", a)),
|
|
1654
|
+
onEdit: m[2] || (m[2] = (a) => l("edit", a)),
|
|
1655
|
+
onClone: m[3] || (m[3] = (a) => l("clone", a))
|
|
1442
1656
|
}), {
|
|
1443
|
-
icon:
|
|
1444
|
-
k(d.$slots, "icon", K(R(
|
|
1657
|
+
icon: y((a) => [
|
|
1658
|
+
k(d.$slots, "icon", K(R(a)))
|
|
1445
1659
|
]),
|
|
1446
|
-
value:
|
|
1447
|
-
|
|
1660
|
+
value: y((a) => [
|
|
1661
|
+
D(x(r(a)), 1)
|
|
1448
1662
|
]),
|
|
1449
|
-
"dialog-value":
|
|
1450
|
-
|
|
1663
|
+
"dialog-value": y((a) => [
|
|
1664
|
+
D(x(r(a)), 1)
|
|
1451
1665
|
]),
|
|
1452
|
-
header:
|
|
1453
|
-
|
|
1454
|
-
onClick: m[0] || (m[0] =
|
|
1666
|
+
header: y((a) => [
|
|
1667
|
+
s("div", {
|
|
1668
|
+
onClick: m[0] || (m[0] = U(() => {
|
|
1455
1669
|
}, ["prevent", "stop"]))
|
|
1456
1670
|
}, [
|
|
1457
|
-
g(
|
|
1671
|
+
g(ae, H(c(a), {
|
|
1458
1672
|
"is-popup": "",
|
|
1459
1673
|
top: "0",
|
|
1460
1674
|
left: "-115px",
|
|
1461
1675
|
onChange: t
|
|
1462
1676
|
}), {
|
|
1463
|
-
activator:
|
|
1677
|
+
activator: y(({ on: u }) => [
|
|
1464
1678
|
g(A, {
|
|
1465
1679
|
type: "icon",
|
|
1466
1680
|
class: "text-gray-500",
|
|
1467
|
-
onClick:
|
|
1681
|
+
onClick: U(u.click, ["stop"])
|
|
1468
1682
|
}, {
|
|
1469
|
-
default:
|
|
1470
|
-
g(
|
|
1683
|
+
default: y(() => [
|
|
1684
|
+
g(i, { class: "size-6" })
|
|
1471
1685
|
]),
|
|
1472
1686
|
_: 1
|
|
1473
1687
|
}, 8, ["onClick"])
|
|
@@ -1476,9 +1690,9 @@ const Fl = O({ name: "ri-list-check", render: Rl }), Wl = { class: "flex justify
|
|
|
1476
1690
|
}, 16)
|
|
1477
1691
|
])
|
|
1478
1692
|
]),
|
|
1479
|
-
dialog:
|
|
1480
|
-
|
|
1481
|
-
g(
|
|
1693
|
+
dialog: y((a) => [
|
|
1694
|
+
s("div", yl, [
|
|
1695
|
+
g(ae, H(c(a), {
|
|
1482
1696
|
top: "-50%",
|
|
1483
1697
|
left: "50%",
|
|
1484
1698
|
onChange: t
|
|
@@ -1489,33 +1703,33 @@ const Fl = O({ name: "ri-list-check", render: Rl }), Wl = { class: "flex justify
|
|
|
1489
1703
|
}, 16);
|
|
1490
1704
|
};
|
|
1491
1705
|
}
|
|
1492
|
-
}),
|
|
1706
|
+
}), xl = {
|
|
1493
1707
|
viewBox: "0 0 24 24",
|
|
1494
1708
|
width: "1.2em",
|
|
1495
1709
|
height: "1.2em"
|
|
1496
1710
|
};
|
|
1497
|
-
function
|
|
1498
|
-
return
|
|
1499
|
-
|
|
1711
|
+
function _l(e, n) {
|
|
1712
|
+
return f(), v("svg", xl, [...n[0] || (n[0] = [
|
|
1713
|
+
s("path", {
|
|
1500
1714
|
fill: "currentColor",
|
|
1501
1715
|
d: "M15.5 5a3.5 3.5 0 1 0 0 7a3.5 3.5 0 0 0 0-7M10 8.5a5.5 5.5 0 1 1 10.032 3.117l2.675 2.676l-1.414 1.414l-2.675-2.675A5.5 5.5 0 0 1 10 8.5M3 4h5v2H3zm0 7h5v2H3zm18 7v2H3v-2z"
|
|
1502
1716
|
}, null, -1)
|
|
1503
1717
|
])]);
|
|
1504
1718
|
}
|
|
1505
|
-
const
|
|
1719
|
+
const $l = O({ name: "ri-menu-search-line", render: _l }), kl = {
|
|
1506
1720
|
viewBox: "0 0 24 24",
|
|
1507
1721
|
width: "1.2em",
|
|
1508
1722
|
height: "1.2em"
|
|
1509
1723
|
};
|
|
1510
|
-
function
|
|
1511
|
-
return
|
|
1512
|
-
|
|
1724
|
+
function wl(e, n) {
|
|
1725
|
+
return f(), v("svg", kl, [...n[0] || (n[0] = [
|
|
1726
|
+
s("path", {
|
|
1513
1727
|
fill: "currentColor",
|
|
1514
1728
|
d: "M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"
|
|
1515
1729
|
}, null, -1)
|
|
1516
1730
|
])]);
|
|
1517
1731
|
}
|
|
1518
|
-
const
|
|
1732
|
+
const he = O({ name: "ri-add-line", render: wl }), Cl = { class: "flex w-full relative" }, Sl = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, zl = ["disabled"], Ue = /* @__PURE__ */ S({
|
|
1519
1733
|
__name: "VTextWrapper",
|
|
1520
1734
|
props: {
|
|
1521
1735
|
active: { type: Boolean },
|
|
@@ -1525,66 +1739,66 @@ const ge = O({ name: "ri-add-line", render: Xl }), Yl = { class: "flex w-full re
|
|
|
1525
1739
|
},
|
|
1526
1740
|
emits: ["icon"],
|
|
1527
1741
|
setup(e, { emit: n }) {
|
|
1528
|
-
const
|
|
1742
|
+
const o = n, l = B(() => e.active ? "top-0 left-3 text-xs" : "top-1/2"), t = B(() => [e.disabled ? "border-gray-400 opacity-40" : "border-gray-300 hover:border-gray-400 dark:border-gray-700/50 hover:dark:border-gray-600/50"]);
|
|
1529
1743
|
return (r, c) => {
|
|
1530
|
-
const d =
|
|
1531
|
-
return
|
|
1532
|
-
|
|
1533
|
-
class:
|
|
1744
|
+
const d = he;
|
|
1745
|
+
return f(), v("div", Cl, [
|
|
1746
|
+
s("div", {
|
|
1747
|
+
class: z(["glass-inset relative flex min-h-[40px] w-full items-center rounded-md transition focus-within:border-primary/60", t.value])
|
|
1534
1748
|
}, [
|
|
1535
|
-
|
|
1536
|
-
class:
|
|
1537
|
-
},
|
|
1538
|
-
|
|
1749
|
+
s("span", {
|
|
1750
|
+
class: z(["absolute left-4 transition-all rounded -translate-y-1/2 text-gray-600 dark:text-gray-400", l.value])
|
|
1751
|
+
}, x(e.label), 3),
|
|
1752
|
+
s("div", Sl, [
|
|
1539
1753
|
k(r.$slots, "default")
|
|
1540
1754
|
]),
|
|
1541
|
-
e.hideIcon ?
|
|
1755
|
+
e.hideIcon ? T("", !0) : (f(), v("button", {
|
|
1542
1756
|
key: 0,
|
|
1543
1757
|
disabled: e.disabled,
|
|
1544
|
-
class:
|
|
1545
|
-
onClick: c[0] || (c[0] = (m) =>
|
|
1758
|
+
class: z([{ "cursor-pointer": !e.disabled }, "h-full flex items-center justify-center text-gray-400 border-l border-gray-300 dark:border-gray-700/50 flex-[0_0_50px]"]),
|
|
1759
|
+
onClick: c[0] || (c[0] = (m) => o("icon", m))
|
|
1546
1760
|
}, [
|
|
1547
1761
|
k(r.$slots, "icon", {}, () => [
|
|
1548
1762
|
g(d, { class: "size-4" })
|
|
1549
1763
|
])
|
|
1550
|
-
], 10,
|
|
1764
|
+
], 10, zl))
|
|
1551
1765
|
], 2)
|
|
1552
1766
|
]);
|
|
1553
1767
|
};
|
|
1554
1768
|
}
|
|
1555
|
-
}),
|
|
1769
|
+
}), Vl = {
|
|
1556
1770
|
viewBox: "0 0 24 24",
|
|
1557
1771
|
width: "1.2em",
|
|
1558
1772
|
height: "1.2em"
|
|
1559
1773
|
};
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
1562
|
-
|
|
1774
|
+
function Tl(e, n) {
|
|
1775
|
+
return f(), v("svg", Vl, [...n[0] || (n[0] = [
|
|
1776
|
+
s("path", {
|
|
1563
1777
|
fill: "currentColor",
|
|
1564
1778
|
d: "M7 6V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-3v3c0 .552-.45 1-1.007 1H4.007A1 1 0 0 1 3 21l.003-14c0-.552.45-1 1.006-1zM5.002 8L5 20h10V8zM9 6h8v10h2V4H9z"
|
|
1565
1779
|
}, null, -1)
|
|
1566
1780
|
])]);
|
|
1567
1781
|
}
|
|
1568
|
-
const
|
|
1782
|
+
const Ll = O({ name: "ri-file-copy-line", render: Tl }), El = {
|
|
1569
1783
|
viewBox: "0 0 24 24",
|
|
1570
1784
|
width: "1.2em",
|
|
1571
1785
|
height: "1.2em"
|
|
1572
1786
|
};
|
|
1573
|
-
function
|
|
1574
|
-
return
|
|
1575
|
-
|
|
1787
|
+
function Bl(e, n) {
|
|
1788
|
+
return f(), v("svg", El, [...n[0] || (n[0] = [
|
|
1789
|
+
s("path", {
|
|
1576
1790
|
fill: "currentColor",
|
|
1577
1791
|
d: "M2 4a1 1 0 0 1 1-1h7.414l2 2H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3c-.55 0-1-.45-1-1zm8.586 2l-1-1H4v2h5.586zM4 9v10h16V7h-7.586l-2 2z"
|
|
1578
1792
|
}, null, -1)
|
|
1579
1793
|
])]);
|
|
1580
1794
|
}
|
|
1581
|
-
const
|
|
1795
|
+
const Ml = O({ name: "ri-folder6-line", render: Bl }), Al = ["onClick"], Dl = {
|
|
1582
1796
|
key: 0,
|
|
1583
1797
|
class: "me-1"
|
|
1584
|
-
},
|
|
1798
|
+
}, Pl = { class: "dark:text-gray-300" }, Il = { class: "flex gap-3 items-center z-10" }, jl = {
|
|
1585
1799
|
key: 0,
|
|
1586
1800
|
class: "flex ps-5"
|
|
1587
|
-
},
|
|
1801
|
+
}, Hl = { class: "font-medium dark:text-gray-300" }, We = /* @__PURE__ */ S({
|
|
1588
1802
|
__name: "VListObject",
|
|
1589
1803
|
props: {
|
|
1590
1804
|
items: { default: () => ({}) },
|
|
@@ -1593,82 +1807,82 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1593
1807
|
},
|
|
1594
1808
|
emits: ["click"],
|
|
1595
1809
|
setup(e, { emit: n }) {
|
|
1596
|
-
const
|
|
1810
|
+
const o = n, l = () => "before:absolute before:w-full before:h-8 before:t-0 before:left-0 before:border-b before:border-gray-200 dark:before:border-gray-800/50 hover:before:bg-gray-400/10", t = M({}), { text: r, copy: c, copied: d, isSupported: m } = yt(), i = (b) => {
|
|
1597
1811
|
t.value[b] = !t.value[b];
|
|
1598
|
-
},
|
|
1599
|
-
|
|
1812
|
+
}, a = (b) => typeof b == "object", u = (b) => `${e.path ? e.path + "." : ""}${b}`, p = (b, h) => {
|
|
1813
|
+
o("click", { key: b, path: u(b), isObject: h });
|
|
1600
1814
|
};
|
|
1601
1815
|
return (b, h) => {
|
|
1602
|
-
const
|
|
1603
|
-
return
|
|
1604
|
-
(
|
|
1605
|
-
key:
|
|
1606
|
-
class:
|
|
1816
|
+
const _ = Ml, V = Ll, L = he;
|
|
1817
|
+
return f(), v("ul", null, [
|
|
1818
|
+
(f(!0), v(E, null, j(e.items, (w, N) => (f(), v("li", {
|
|
1819
|
+
key: N,
|
|
1820
|
+
class: z(a(w) ? "" : `flex items-center ${l()}`)
|
|
1607
1821
|
}, [
|
|
1608
|
-
|
|
1609
|
-
class:
|
|
1610
|
-
onClick: (Z) =>
|
|
1822
|
+
s("div", {
|
|
1823
|
+
class: z(["flex items-center cursor-pointer ps-2 h-8", a(w) ? `${l()}` : ""]),
|
|
1824
|
+
onClick: (Z) => i(N)
|
|
1611
1825
|
}, [
|
|
1612
|
-
|
|
1613
|
-
g(
|
|
1614
|
-
])) :
|
|
1615
|
-
|
|
1616
|
-
q(m) ? (
|
|
1826
|
+
a(w) ? (f(), v("div", Dl, [
|
|
1827
|
+
g(_, { class: "size-5" })
|
|
1828
|
+
])) : T("", !0),
|
|
1829
|
+
s("div", Pl, x(N), 1),
|
|
1830
|
+
q(m) ? (f(), I(A, {
|
|
1617
1831
|
key: 1,
|
|
1618
1832
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
1619
1833
|
color: "transparent",
|
|
1620
1834
|
size: "sm",
|
|
1621
|
-
onClick:
|
|
1835
|
+
onClick: U((Z) => q(c)(u(N)), ["stop"])
|
|
1622
1836
|
}, {
|
|
1623
|
-
default:
|
|
1624
|
-
g(
|
|
1837
|
+
default: y(() => [
|
|
1838
|
+
g(V, { class: "size-5" })
|
|
1625
1839
|
]),
|
|
1626
1840
|
_: 1
|
|
1627
|
-
}, 8, ["onClick"])) :
|
|
1628
|
-
q(r) === u(
|
|
1841
|
+
}, 8, ["onClick"])) : T("", !0),
|
|
1842
|
+
q(r) === u(N) ? (f(), v("span", {
|
|
1629
1843
|
key: 2,
|
|
1630
|
-
class:
|
|
1631
|
-
},
|
|
1632
|
-
!e.onlyValue &&
|
|
1633
|
-
h[1] || (h[1] =
|
|
1634
|
-
|
|
1844
|
+
class: z(["text-gray-500 transition-all duration-1000 text-sm", q(d) ? "opacity-100" : "opacity-0"])
|
|
1845
|
+
}, x(b.$t("copied")), 3)) : T("", !0),
|
|
1846
|
+
!e.onlyValue && a(w) ? (f(), v(E, { key: 3 }, [
|
|
1847
|
+
h[1] || (h[1] = s("div", { class: "flex-auto" }, null, -1)),
|
|
1848
|
+
s("div", Il, [
|
|
1635
1849
|
g(A, {
|
|
1636
1850
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
1637
1851
|
color: "transparent",
|
|
1638
1852
|
size: "sm",
|
|
1639
1853
|
title: b.$t("add"),
|
|
1640
|
-
onClick:
|
|
1854
|
+
onClick: U((Z) => p(N, a(w)), ["stop"])
|
|
1641
1855
|
}, {
|
|
1642
|
-
default:
|
|
1643
|
-
g(
|
|
1856
|
+
default: y(() => [
|
|
1857
|
+
g(L, { class: "size-5" })
|
|
1644
1858
|
]),
|
|
1645
1859
|
_: 1
|
|
1646
1860
|
}, 8, ["title", "onClick"])
|
|
1647
1861
|
])
|
|
1648
|
-
], 64)) :
|
|
1649
|
-
], 10,
|
|
1650
|
-
|
|
1651
|
-
|
|
1862
|
+
], 64)) : T("", !0)
|
|
1863
|
+
], 10, Al),
|
|
1864
|
+
a(w) ? (f(), v("div", jl, [
|
|
1865
|
+
we(g(We, {
|
|
1652
1866
|
class: "flex-auto",
|
|
1653
|
-
path: u(
|
|
1867
|
+
path: u(N),
|
|
1654
1868
|
items: w,
|
|
1655
1869
|
onlyValue: e.onlyValue,
|
|
1656
|
-
onClick: h[0] || (h[0] = (Z) =>
|
|
1870
|
+
onClick: h[0] || (h[0] = (Z) => o("click", Z))
|
|
1657
1871
|
}, null, 8, ["path", "items", "onlyValue"]), [
|
|
1658
|
-
[
|
|
1872
|
+
[st, t.value[N]]
|
|
1659
1873
|
])
|
|
1660
|
-
])) : (
|
|
1661
|
-
h[2] || (h[2] =
|
|
1662
|
-
|
|
1874
|
+
])) : (f(), v(E, { key: 1 }, [
|
|
1875
|
+
h[2] || (h[2] = s("div", { class: "flex-auto gap-3" }, null, -1)),
|
|
1876
|
+
s("div", Hl, x(w), 1),
|
|
1663
1877
|
g(A, {
|
|
1664
1878
|
class: "opacity-20 hover:opacity-70 transition-all",
|
|
1665
1879
|
color: "gray",
|
|
1666
1880
|
size: "sm",
|
|
1667
1881
|
title: b.$t("add"),
|
|
1668
|
-
onClick:
|
|
1882
|
+
onClick: U((Z) => p(N, a(w)), ["stop"])
|
|
1669
1883
|
}, {
|
|
1670
|
-
default:
|
|
1671
|
-
g(
|
|
1884
|
+
default: y(() => [
|
|
1885
|
+
g(L, { class: "size-5" })
|
|
1672
1886
|
]),
|
|
1673
1887
|
_: 1
|
|
1674
1888
|
}, 8, ["title", "onClick"])
|
|
@@ -1677,15 +1891,16 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1677
1891
|
]);
|
|
1678
1892
|
};
|
|
1679
1893
|
}
|
|
1680
|
-
}),
|
|
1894
|
+
}), Nl = { class: "glass-inset rounded-md p-1" }, Ol = { class: "flex gap-1" }, Fl = ["onClick"], Kl = { class: "relative my-4" }, Rl = { key: 0 }, Ul = /* @__PURE__ */ S({
|
|
1681
1895
|
__name: "VTabs",
|
|
1682
1896
|
props: {
|
|
1683
1897
|
value: {},
|
|
1684
|
-
items: {}
|
|
1898
|
+
items: {},
|
|
1899
|
+
size: { default: "md" }
|
|
1685
1900
|
},
|
|
1686
1901
|
emits: ["click"],
|
|
1687
|
-
setup(e, { expose: n, emit:
|
|
1688
|
-
const l =
|
|
1902
|
+
setup(e, { expose: n, emit: o }) {
|
|
1903
|
+
const l = o, t = M(e.value || 0), r = (d) => [
|
|
1689
1904
|
t.value === d ? "bg-primary/10 text-primary" : "text-gray-500 hover:bg-white/5 dark:text-white/50 dark:hover:bg-white/5"
|
|
1690
1905
|
], c = (d) => {
|
|
1691
1906
|
t.value = d, l("click", d);
|
|
@@ -1693,38 +1908,40 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1693
1908
|
return n({
|
|
1694
1909
|
setActiveTab: c,
|
|
1695
1910
|
activeTab: t
|
|
1696
|
-
}), (d, m) => (
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
(
|
|
1700
|
-
key:
|
|
1911
|
+
}), (d, m) => (f(), v("div", null, [
|
|
1912
|
+
s("div", Nl, [
|
|
1913
|
+
s("div", Ol, [
|
|
1914
|
+
(f(!0), v(E, null, j(e.items, (i, a) => (f(), v("div", {
|
|
1915
|
+
key: a,
|
|
1701
1916
|
class: "relative flex-auto"
|
|
1702
1917
|
}, [
|
|
1703
|
-
|
|
1918
|
+
s("button", {
|
|
1704
1919
|
type: "button",
|
|
1705
1920
|
class: "w-full",
|
|
1706
|
-
onClick: (u) => c(
|
|
1921
|
+
onClick: (u) => c(a)
|
|
1707
1922
|
}, [
|
|
1708
|
-
|
|
1709
|
-
class:
|
|
1923
|
+
s("div", {
|
|
1924
|
+
class: z([[r(a), e.size === "sm" ? "px-2 py-1 text-xs" : "px-3 py-2 text-sm"], "rounded-md font-medium transition"])
|
|
1710
1925
|
}, [
|
|
1711
1926
|
k(d.$slots, "header", {
|
|
1712
|
-
tab:
|
|
1713
|
-
i
|
|
1927
|
+
tab: i,
|
|
1928
|
+
i: a
|
|
1714
1929
|
}, () => [
|
|
1715
|
-
|
|
1930
|
+
s("div", {
|
|
1931
|
+
class: z(e.size === "sm" ? "px-2 py-0.5" : "px-3 py-1")
|
|
1932
|
+
}, x(i.title), 3)
|
|
1716
1933
|
])
|
|
1717
1934
|
], 2)
|
|
1718
|
-
], 8,
|
|
1935
|
+
], 8, Fl)
|
|
1719
1936
|
]))), 128))
|
|
1720
1937
|
])
|
|
1721
1938
|
]),
|
|
1722
|
-
|
|
1723
|
-
(
|
|
1724
|
-
key:
|
|
1939
|
+
s("div", Kl, [
|
|
1940
|
+
(f(!0), v(E, null, j(e.items, (i, a) => (f(), v("div", {
|
|
1941
|
+
key: a,
|
|
1725
1942
|
class: "tab-panel"
|
|
1726
1943
|
}, [
|
|
1727
|
-
g(
|
|
1944
|
+
g($e, {
|
|
1728
1945
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
1729
1946
|
"enter-from-class": "transform opacity-0 translate-x-2",
|
|
1730
1947
|
"enter-to-class": "transform opacity-100 translate-x-0",
|
|
@@ -1732,10 +1949,10 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1732
1949
|
"leave-from-class": "transform opacity-100 translate-x-0",
|
|
1733
1950
|
"leave-to-class": "transform opacity-0 -translate-x-2"
|
|
1734
1951
|
}, {
|
|
1735
|
-
default:
|
|
1736
|
-
t.value ===
|
|
1737
|
-
k(d.$slots, `tab-${
|
|
1738
|
-
])) :
|
|
1952
|
+
default: y(() => [
|
|
1953
|
+
t.value === a ? (f(), v("div", Rl, [
|
|
1954
|
+
k(d.$slots, `tab-${a}`)
|
|
1955
|
+
])) : T("", !0)
|
|
1739
1956
|
]),
|
|
1740
1957
|
_: 2
|
|
1741
1958
|
}, 1024)
|
|
@@ -1743,7 +1960,7 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1743
1960
|
])
|
|
1744
1961
|
]));
|
|
1745
1962
|
}
|
|
1746
|
-
}),
|
|
1963
|
+
}), Wl = { class: "flex gap-1 text-amber-500 self-start text-nowrap select-none" }, ql = ["title", "onMouseenter", "onMouseleave"], Gl = { class: "flex flex-auto" }, Jl = ["disabled"], be = /* @__PURE__ */ S({
|
|
1747
1964
|
__name: "VFunc",
|
|
1748
1965
|
props: {
|
|
1749
1966
|
label: {},
|
|
@@ -1754,73 +1971,73 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1754
1971
|
},
|
|
1755
1972
|
emits: ["change", "icon", "hover"],
|
|
1756
1973
|
setup(e, { emit: n }) {
|
|
1757
|
-
const
|
|
1974
|
+
const o = n, l = ["v", "a", "b", "c"], t = M(e.value || ""), r = (m) => {
|
|
1758
1975
|
try {
|
|
1759
1976
|
return new Function(m), !0;
|
|
1760
|
-
} catch (
|
|
1761
|
-
return console.warn(
|
|
1977
|
+
} catch (i) {
|
|
1978
|
+
return console.warn(i), !1;
|
|
1762
1979
|
}
|
|
1763
|
-
}, c =
|
|
1764
|
-
const
|
|
1765
|
-
r(
|
|
1766
|
-
}, 500), d = (m) =>
|
|
1767
|
-
return
|
|
1980
|
+
}, c = Se((m) => {
|
|
1981
|
+
const i = m.target;
|
|
1982
|
+
r(i.value) && o("change", i.value);
|
|
1983
|
+
}, 500), d = (m) => o("icon", m);
|
|
1984
|
+
return oe(
|
|
1768
1985
|
() => e.value,
|
|
1769
1986
|
() => {
|
|
1770
1987
|
e.value && (t.value = e.value);
|
|
1771
1988
|
}
|
|
1772
|
-
), (m,
|
|
1773
|
-
const
|
|
1774
|
-
return
|
|
1989
|
+
), (m, i) => {
|
|
1990
|
+
const a = ue, u = he;
|
|
1991
|
+
return f(), I(Ue, {
|
|
1775
1992
|
active: !!e.value,
|
|
1776
1993
|
disabled: e.disabled,
|
|
1777
1994
|
label: e.label,
|
|
1778
1995
|
hideIcon: e.hideIcon,
|
|
1779
1996
|
onIcon: d
|
|
1780
1997
|
}, {
|
|
1781
|
-
icon:
|
|
1782
|
-
e.value ? (
|
|
1998
|
+
icon: y(() => [
|
|
1999
|
+
e.value ? (f(), I(a, {
|
|
1783
2000
|
key: 0,
|
|
1784
2001
|
class: "size-4"
|
|
1785
|
-
})) : (
|
|
2002
|
+
})) : (f(), I(u, {
|
|
1786
2003
|
key: 1,
|
|
1787
2004
|
class: "size-4"
|
|
1788
2005
|
}))
|
|
1789
2006
|
]),
|
|
1790
|
-
default:
|
|
1791
|
-
e.value ? (
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
(
|
|
1795
|
-
|
|
2007
|
+
default: y(() => [
|
|
2008
|
+
e.value ? (f(), v(E, { key: 0 }, [
|
|
2009
|
+
s("div", Wl, [
|
|
2010
|
+
i[3] || (i[3] = D(" ( ", -1)),
|
|
2011
|
+
(f(!0), v(E, null, j(e.args, (p, b) => (f(), v(E, { key: p }, [
|
|
2012
|
+
s("span", {
|
|
1796
2013
|
class: "text-blue-400/80",
|
|
1797
|
-
title:
|
|
1798
|
-
onMouseenter: (h) =>
|
|
1799
|
-
onMouseleave: (h) =>
|
|
1800
|
-
},
|
|
1801
|
-
|
|
2014
|
+
title: p,
|
|
2015
|
+
onMouseenter: (h) => o("hover", "enter", b),
|
|
2016
|
+
onMouseleave: (h) => o("hover", "leave", b)
|
|
2017
|
+
}, x(l[b]), 41, ql),
|
|
2018
|
+
i[2] || (i[2] = s("span", { class: "last:hidden" }, ",", -1))
|
|
1802
2019
|
], 64))), 128)),
|
|
1803
|
-
|
|
2020
|
+
i[4] || (i[4] = D(" ) => ", -1))
|
|
1804
2021
|
]),
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
"onUpdate:modelValue":
|
|
2022
|
+
s("div", Gl, [
|
|
2023
|
+
we(s("textarea", {
|
|
2024
|
+
"onUpdate:modelValue": i[0] || (i[0] = (p) => t.value = p),
|
|
1808
2025
|
class: "outline-0 w-full resize-none field-sizing-content",
|
|
1809
2026
|
type: "text",
|
|
1810
2027
|
disabled: e.disabled,
|
|
1811
|
-
onInput:
|
|
1812
|
-
(...
|
|
1813
|
-
}, null, 40,
|
|
1814
|
-
[
|
|
2028
|
+
onInput: i[1] || (i[1] = //@ts-ignore
|
|
2029
|
+
(...p) => q(c) && q(c)(...p))
|
|
2030
|
+
}, null, 40, Jl), [
|
|
2031
|
+
[Ie, t.value]
|
|
1815
2032
|
])
|
|
1816
2033
|
])
|
|
1817
|
-
], 64)) :
|
|
2034
|
+
], 64)) : T("", !0)
|
|
1818
2035
|
]),
|
|
1819
2036
|
_: 1
|
|
1820
2037
|
}, 8, ["active", "disabled", "label", "hideIcon"]);
|
|
1821
2038
|
};
|
|
1822
2039
|
}
|
|
1823
|
-
}),
|
|
2040
|
+
}), Zl = ["checked", "disabled"], Xl = { class: "text-sm ms-2 peer-disabled:opacity-40" }, Yl = /* @__PURE__ */ S({
|
|
1824
2041
|
__name: "VCheckbox",
|
|
1825
2042
|
props: {
|
|
1826
2043
|
modelValue: { type: [Number, Boolean], default: !1 },
|
|
@@ -1828,48 +2045,48 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1828
2045
|
},
|
|
1829
2046
|
emits: ["update:modelValue", "click"],
|
|
1830
2047
|
setup(e, { emit: n }) {
|
|
1831
|
-
const
|
|
2048
|
+
const o = n, l = (r) => {
|
|
1832
2049
|
const c = r.target;
|
|
1833
|
-
|
|
1834
|
-
}, t = (r) =>
|
|
1835
|
-
return (r, c) => (
|
|
1836
|
-
class:
|
|
2050
|
+
o("update:modelValue", c.checked);
|
|
2051
|
+
}, t = (r) => o("click", r);
|
|
2052
|
+
return (r, c) => (f(), v("label", {
|
|
2053
|
+
class: z(["inline-flex items-center relative", { "cursor-pointer": !e.disabled }]),
|
|
1837
2054
|
onClick: t
|
|
1838
2055
|
}, [
|
|
1839
|
-
|
|
2056
|
+
s("input", {
|
|
1840
2057
|
type: "checkbox",
|
|
1841
2058
|
checked: !!e.modelValue,
|
|
1842
2059
|
disabled: e.disabled,
|
|
1843
|
-
class: "peer size-5 appearance-none rounded-md border border-gray-300/80 bg-
|
|
2060
|
+
class: "peer size-5 appearance-none rounded-md border border-gray-300/80 bg-transparent transition-all checked:border-[var(--accent-blue)] disabled:opacity-40 not-disabled:cursor-pointer dark:border-white/15",
|
|
1844
2061
|
onChange: l
|
|
1845
|
-
}, null, 40,
|
|
1846
|
-
c[0] || (c[0] =
|
|
1847
|
-
|
|
2062
|
+
}, null, 40, Zl),
|
|
2063
|
+
c[0] || (c[0] = s("button", { class: "pointer-events-none absolute left-[10px] top-1/2 -translate-x-1/2 -translate-y-1/2 text-[var(--accent-blue)] opacity-0 peer-checked:opacity-100 peer-disabled:opacity-40 dark:text-white" }, [
|
|
2064
|
+
s("svg", {
|
|
1848
2065
|
class: "h-3.5 w-3.5",
|
|
1849
2066
|
viewBox: "0 0 20 20",
|
|
1850
2067
|
fill: "currentColor",
|
|
1851
2068
|
stroke: "currentColor",
|
|
1852
2069
|
"stroke-width": "1"
|
|
1853
2070
|
}, [
|
|
1854
|
-
|
|
2071
|
+
s("path", {
|
|
1855
2072
|
"fill-rule": "evenodd",
|
|
1856
2073
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
1857
2074
|
"clip-rule": "evenodd"
|
|
1858
2075
|
})
|
|
1859
2076
|
])
|
|
1860
2077
|
], -1)),
|
|
1861
|
-
|
|
2078
|
+
s("span", Xl, [
|
|
1862
2079
|
k(r.$slots, "default")
|
|
1863
2080
|
])
|
|
1864
2081
|
], 2));
|
|
1865
2082
|
}
|
|
1866
|
-
}),
|
|
2083
|
+
}), Ql = { class: "flex flex-col" }, ea = { class: "flex gap-4 mb-6" }, ta = {
|
|
1867
2084
|
key: 0,
|
|
1868
2085
|
class: "flex gap-4"
|
|
1869
|
-
},
|
|
2086
|
+
}, na = {
|
|
1870
2087
|
key: 1,
|
|
1871
2088
|
class: ""
|
|
1872
|
-
},
|
|
2089
|
+
}, sa = { class: "flex flex-col md:flex-row gap-4" }, la = { class: "flex gap-4" }, aa = { class: "flex justify-between flex-auto" }, oa = ["onClick"], ia = /* @__PURE__ */ S({
|
|
1873
2090
|
__name: "ItemOptions",
|
|
1874
2091
|
props: {
|
|
1875
2092
|
min: { default: 0 },
|
|
@@ -1882,57 +2099,57 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1882
2099
|
},
|
|
1883
2100
|
emits: ["update"],
|
|
1884
2101
|
setup(e, { emit: n }) {
|
|
1885
|
-
const
|
|
2102
|
+
const o = n, l = B(() => e.items.map((h, _) => ({ ...h, id: ++_ }))), t = M({ name: "", value: "" }), r = B(() => e.items.length + 1), c = B(() => {
|
|
1886
2103
|
var h;
|
|
1887
2104
|
return !((h = t.value) != null && h.id);
|
|
1888
|
-
}), d = (h) => e.type === h, m = (h,
|
|
2105
|
+
}), d = (h) => e.type === h, m = (h, _) => o("update", h, _), i = (h) => h.map(({ name: _, value: V }) => ({ name: _, value: V })), a = ({ id: h, name: _, value: V }) => t.value = { id: h, name: _, value: V }, u = () => {
|
|
1889
2106
|
const h = r.value;
|
|
1890
|
-
t.value = { name: `New_${h}`, value: `${h}`, id: h }, m("items",
|
|
1891
|
-
},
|
|
1892
|
-
t.value.name === h.name && (t.value = { name: "", value: "" }), m("items",
|
|
1893
|
-
}, b =
|
|
2107
|
+
t.value = { name: `New_${h}`, value: `${h}`, id: h }, m("items", i([...l.value, t.value]));
|
|
2108
|
+
}, p = (h) => {
|
|
2109
|
+
t.value.name === h.name && (t.value = { name: "", value: "" }), m("items", i(l.value.filter((_) => _.value !== h.value)));
|
|
2110
|
+
}, b = Se(() => {
|
|
1894
2111
|
const h = t.value;
|
|
1895
2112
|
if (!h.name || !h.value) return;
|
|
1896
|
-
const
|
|
1897
|
-
m("items",
|
|
2113
|
+
const _ = l.value.map((V) => V.id === h.id ? h : V);
|
|
2114
|
+
m("items", i(_));
|
|
1898
2115
|
}, 300);
|
|
1899
|
-
return (h,
|
|
1900
|
-
const
|
|
1901
|
-
return
|
|
1902
|
-
|
|
1903
|
-
g(
|
|
2116
|
+
return (h, _) => {
|
|
2117
|
+
const V = ue, L = he;
|
|
2118
|
+
return f(), v("div", Ql, [
|
|
2119
|
+
s("div", ea, [
|
|
2120
|
+
g(Yl, {
|
|
1904
2121
|
modelValue: e.disabled,
|
|
1905
|
-
"onUpdate:modelValue":
|
|
2122
|
+
"onUpdate:modelValue": _[0] || (_[0] = (w) => m("disabled", w ? 1 : 0))
|
|
1906
2123
|
}, {
|
|
1907
|
-
default:
|
|
1908
|
-
|
|
2124
|
+
default: y(() => [..._[6] || (_[6] = [
|
|
2125
|
+
D("Disabled", -1)
|
|
1909
2126
|
])]),
|
|
1910
2127
|
_: 1
|
|
1911
2128
|
}, 8, ["modelValue"])
|
|
1912
2129
|
]),
|
|
1913
|
-
d("dimmer") ? (
|
|
2130
|
+
d("dimmer") ? (f(), v("div", ta, [
|
|
1914
2131
|
g(J, {
|
|
1915
2132
|
modelValue: e.min,
|
|
1916
2133
|
label: "Min",
|
|
1917
|
-
"onUpdate:modelValue":
|
|
2134
|
+
"onUpdate:modelValue": _[1] || (_[1] = (w) => m("min", +w))
|
|
1918
2135
|
}, null, 8, ["modelValue"]),
|
|
1919
2136
|
g(J, {
|
|
1920
2137
|
modelValue: e.max,
|
|
1921
2138
|
label: "Max",
|
|
1922
|
-
"onUpdate:modelValue":
|
|
2139
|
+
"onUpdate:modelValue": _[2] || (_[2] = (w) => m("max", +w))
|
|
1923
2140
|
}, null, 8, ["modelValue"]),
|
|
1924
2141
|
g(J, {
|
|
1925
2142
|
modelValue: e.step,
|
|
1926
2143
|
label: "Step",
|
|
1927
|
-
"onUpdate:modelValue":
|
|
2144
|
+
"onUpdate:modelValue": _[3] || (_[3] = (w) => m("step", +w))
|
|
1928
2145
|
}, null, 8, ["modelValue"])
|
|
1929
|
-
])) :
|
|
1930
|
-
d("list") ? (
|
|
1931
|
-
|
|
2146
|
+
])) : T("", !0),
|
|
2147
|
+
d("list") ? (f(), v("div", na, [
|
|
2148
|
+
s("div", sa, [
|
|
1932
2149
|
g(J, {
|
|
1933
2150
|
modelValue: t.value.name,
|
|
1934
2151
|
"onUpdate:modelValue": [
|
|
1935
|
-
|
|
2152
|
+
_[4] || (_[4] = (w) => t.value.name = w),
|
|
1936
2153
|
q(b)
|
|
1937
2154
|
],
|
|
1938
2155
|
disabled: c.value,
|
|
@@ -1941,31 +2158,31 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1941
2158
|
g(J, {
|
|
1942
2159
|
modelValue: t.value.value,
|
|
1943
2160
|
"onUpdate:modelValue": [
|
|
1944
|
-
|
|
2161
|
+
_[5] || (_[5] = (w) => t.value.value = w),
|
|
1945
2162
|
q(b)
|
|
1946
2163
|
],
|
|
1947
2164
|
disabled: c.value,
|
|
1948
2165
|
label: "Value"
|
|
1949
2166
|
}, null, 8, ["modelValue", "disabled", "onUpdate:modelValue"])
|
|
1950
2167
|
]),
|
|
1951
|
-
|
|
1952
|
-
g(
|
|
2168
|
+
s("div", la, [
|
|
2169
|
+
g(ae, {
|
|
1953
2170
|
"model-value": t.value.value,
|
|
1954
2171
|
label: "List",
|
|
1955
2172
|
items: l.value,
|
|
1956
2173
|
top: "unset",
|
|
1957
2174
|
bottom: "0",
|
|
1958
|
-
onChange:
|
|
2175
|
+
onChange: a
|
|
1959
2176
|
}, {
|
|
1960
|
-
item:
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
2177
|
+
item: y(({ item: w }) => [
|
|
2178
|
+
s("div", aa, [
|
|
2179
|
+
s("span", null, x(w.name), 1),
|
|
2180
|
+
s("button", {
|
|
1964
2181
|
class: "cursor-pointer size-4",
|
|
1965
|
-
onClick:
|
|
2182
|
+
onClick: U((N) => p(w), ["prevent", "stop"])
|
|
1966
2183
|
}, [
|
|
1967
|
-
g(
|
|
1968
|
-
], 8,
|
|
2184
|
+
g(V)
|
|
2185
|
+
], 8, oa)
|
|
1969
2186
|
])
|
|
1970
2187
|
]),
|
|
1971
2188
|
_: 1
|
|
@@ -1975,17 +2192,17 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1975
2192
|
color: "blue",
|
|
1976
2193
|
onClick: u
|
|
1977
2194
|
}, {
|
|
1978
|
-
default:
|
|
1979
|
-
g(
|
|
2195
|
+
default: y(() => [
|
|
2196
|
+
g(L)
|
|
1980
2197
|
]),
|
|
1981
2198
|
_: 1
|
|
1982
2199
|
})
|
|
1983
2200
|
])
|
|
1984
|
-
])) :
|
|
2201
|
+
])) : T("", !0)
|
|
1985
2202
|
]);
|
|
1986
2203
|
};
|
|
1987
2204
|
}
|
|
1988
|
-
}),
|
|
2205
|
+
}), ra = { class: "flex flex-col" }, da = { class: "flex flex-col md:flex-row gap-6 min-h-[300px]" }, ca = { class: "flex-auto order-1" }, ua = { class: "flex-auto gap-x-2 order-1" }, ma = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, fa = { class: "flex gap-2 items-center" }, pa = { class: "flex flex-col gap-4" }, va = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, ha = { class: "relative group" }, ga = { class: "select-none" }, ba = ["onClick"], ya = { class: "flex justify-center order-0 md:order-1 md:mt-11" }, xa = { class: "flex-[0_0_130px] size-[130px]" }, _a = { class: "flex gap-4 justify-end" }, $a = { class: "relative min-h-[200px] max-h-100dvh overflow-auto scrollbar" }, ti = /* @__PURE__ */ S({
|
|
1989
2206
|
__name: "ItemEdit",
|
|
1990
2207
|
props: {
|
|
1991
2208
|
items: {},
|
|
@@ -1996,7 +2213,7 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
1996
2213
|
},
|
|
1997
2214
|
emits: ["button"],
|
|
1998
2215
|
setup(e, { emit: n }) {
|
|
1999
|
-
const
|
|
2216
|
+
const o = n, l = [{ title: "Main" }, { title: "Data" }, { title: "Options" }], t = M({
|
|
2000
2217
|
id: "",
|
|
2001
2218
|
name: "",
|
|
2002
2219
|
type: "button",
|
|
@@ -2006,64 +2223,64 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
2006
2223
|
set: "",
|
|
2007
2224
|
get: "",
|
|
2008
2225
|
getTo: ""
|
|
2009
|
-
}), r =
|
|
2226
|
+
}), r = M(!1), c = B(() => {
|
|
2010
2227
|
var $;
|
|
2011
2228
|
return !(($ = e.item) != null && $.id);
|
|
2012
|
-
}), d =
|
|
2229
|
+
}), d = B(() => !!e.items.filter(($) => {
|
|
2013
2230
|
var C;
|
|
2014
2231
|
return $.id !== ((C = e.item) == null ? void 0 : C.id);
|
|
2015
|
-
}).find(($) => $.id === (t == null ? void 0 : t.value.id))), m =
|
|
2232
|
+
}).find(($) => $.id === (t == null ? void 0 : t.value.id))), m = B(() => t.value.type === "info"), i = B(() => {
|
|
2016
2233
|
var $;
|
|
2017
2234
|
return ($ = t.value.args) == null ? void 0 : $.length;
|
|
2018
|
-
}),
|
|
2235
|
+
}), a = B(() => t.value.args.length > 3), u = B(() => {
|
|
2019
2236
|
if (d.value) return !0;
|
|
2020
2237
|
const { id: $, args: C } = t.value;
|
|
2021
2238
|
return !$ || !C.length;
|
|
2022
|
-
}),
|
|
2239
|
+
}), p = ({ value: $ }) => t.value.icon = $, b = ({ value: $ }) => {
|
|
2023
2240
|
const C = $;
|
|
2024
2241
|
t.value.type = C, delete t.value.opts, ["button", "list", "dimmer"].includes(C) && ($ === "button" && (t.value.opts = {}), $ === "list" && (t.value.opts = { items: [] }), $ === "dimmer" && (t.value.opts = { min: 0, max: 255, step: 1 }));
|
|
2025
2242
|
}, h = ($) => {
|
|
2026
2243
|
$ === "get" && (t.value.get ? delete t.value.get : t.value.get = "v"), $ === "set" && (t.value.set ? delete t.value.set : t.value.set = "v"), $ === "getTo" && (t.value.getTo ? delete t.value.getTo : t.value.getTo = "v");
|
|
2027
|
-
},
|
|
2244
|
+
}, _ = ($) => o("button", $, t.value), V = ($) => t.value.args = t.value.args.filter((C) => C !== $), L = ({ path: $ }) => {
|
|
2028
2245
|
!t.value.args.length && !t.value.id && (t.value.id = $), t.value.args.push($), r.value = !1;
|
|
2029
|
-
}, w =
|
|
2246
|
+
}, w = M(-1), N = ($) => w.value === $, Z = ($, C) => {
|
|
2030
2247
|
$ === "enter" && (w.value = C), $ === "leave" && (w.value = -1);
|
|
2031
|
-
},
|
|
2248
|
+
}, ge = ($, C) => {
|
|
2032
2249
|
$ === "set" && (t.value.set = C), $ === "get" && (t.value.get = C), $ === "getTo" && (t.value.getTo = C), C || delete t.value[$];
|
|
2033
2250
|
}, Ye = () => {
|
|
2034
2251
|
r.value = !0;
|
|
2035
2252
|
}, Qe = ($, C) => {
|
|
2036
2253
|
t.value.opts || (t.value.opts = {}), t.value.opts[$] = C, $ === "disabled" && !C && delete t.value.opts[$];
|
|
2037
2254
|
};
|
|
2038
|
-
return
|
|
2255
|
+
return ee(() => {
|
|
2039
2256
|
var $;
|
|
2040
|
-
($ = e.item) != null && $.id && (t.value =
|
|
2257
|
+
($ = e.item) != null && $.id && (t.value = ht(e.item));
|
|
2041
2258
|
}), ($, C) => {
|
|
2042
|
-
const et =
|
|
2043
|
-
return
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
g(
|
|
2259
|
+
const et = $l, tt = ue;
|
|
2260
|
+
return f(), v("div", ra, [
|
|
2261
|
+
s("div", da, [
|
|
2262
|
+
s("div", ca, [
|
|
2263
|
+
g(Ul, {
|
|
2047
2264
|
class: "flex-auto min-h-75",
|
|
2048
2265
|
value: 0,
|
|
2049
2266
|
items: l
|
|
2050
2267
|
}, {
|
|
2051
|
-
"tab-0":
|
|
2052
|
-
|
|
2268
|
+
"tab-0": y(() => [
|
|
2269
|
+
s("div", ua, [
|
|
2053
2270
|
g(J, {
|
|
2054
2271
|
modelValue: t.value.id,
|
|
2055
|
-
"onUpdate:modelValue": C[0] || (C[0] = (
|
|
2272
|
+
"onUpdate:modelValue": C[0] || (C[0] = (P) => t.value.id = P),
|
|
2056
2273
|
label: "ID",
|
|
2057
2274
|
message: d.value ? $.$t("used") : ""
|
|
2058
|
-
},
|
|
2059
|
-
|
|
2275
|
+
}, lt({ _: 2 }, [
|
|
2276
|
+
i.value ? void 0 : {
|
|
2060
2277
|
name: "icon",
|
|
2061
|
-
fn:
|
|
2278
|
+
fn: y(() => [
|
|
2062
2279
|
g(A, {
|
|
2063
2280
|
color: "transparent",
|
|
2064
2281
|
onClick: Ye
|
|
2065
2282
|
}, {
|
|
2066
|
-
default:
|
|
2283
|
+
default: y(() => [
|
|
2067
2284
|
g(et)
|
|
2068
2285
|
]),
|
|
2069
2286
|
_: 1
|
|
@@ -2074,30 +2291,30 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
2074
2291
|
]), 1032, ["modelValue", "message"]),
|
|
2075
2292
|
g(J, {
|
|
2076
2293
|
modelValue: t.value.name,
|
|
2077
|
-
"onUpdate:modelValue": C[1] || (C[1] = (
|
|
2294
|
+
"onUpdate:modelValue": C[1] || (C[1] = (P) => t.value.name = P),
|
|
2078
2295
|
label: "Name"
|
|
2079
2296
|
}, null, 8, ["modelValue"]),
|
|
2080
|
-
|
|
2081
|
-
g(
|
|
2297
|
+
s("div", ma, [
|
|
2298
|
+
g(ae, {
|
|
2082
2299
|
"model-value": t.value.icon,
|
|
2083
2300
|
bottom: "0",
|
|
2084
2301
|
top: "unset",
|
|
2085
2302
|
label: "Icon",
|
|
2086
2303
|
class: "mb-6",
|
|
2087
2304
|
items: e.listIcons,
|
|
2088
|
-
onChange:
|
|
2305
|
+
onChange: p
|
|
2089
2306
|
}, {
|
|
2090
|
-
item:
|
|
2091
|
-
|
|
2307
|
+
item: y(({ item: P }) => [
|
|
2308
|
+
s("div", fa, [
|
|
2092
2309
|
k($.$slots, "icon", {
|
|
2093
|
-
icon:
|
|
2310
|
+
icon: P.value
|
|
2094
2311
|
}),
|
|
2095
|
-
|
|
2312
|
+
s("div", null, x(P.name), 1)
|
|
2096
2313
|
])
|
|
2097
2314
|
]),
|
|
2098
2315
|
_: 3
|
|
2099
2316
|
}, 8, ["model-value", "items"]),
|
|
2100
|
-
g(
|
|
2317
|
+
g(ae, {
|
|
2101
2318
|
"model-value": t.value.type,
|
|
2102
2319
|
bottom: "0",
|
|
2103
2320
|
top: "unset",
|
|
@@ -2108,71 +2325,71 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
2108
2325
|
])
|
|
2109
2326
|
])
|
|
2110
2327
|
]),
|
|
2111
|
-
"tab-1":
|
|
2112
|
-
|
|
2113
|
-
g(
|
|
2328
|
+
"tab-1": y(() => [
|
|
2329
|
+
s("div", pa, [
|
|
2330
|
+
g(Ue, {
|
|
2114
2331
|
active: !!t.value.args.length,
|
|
2115
|
-
disabled:
|
|
2332
|
+
disabled: a.value,
|
|
2116
2333
|
label: "Arguments",
|
|
2117
|
-
onIcon: C[2] || (C[2] = (
|
|
2334
|
+
onIcon: C[2] || (C[2] = (P) => r.value = !0)
|
|
2118
2335
|
}, {
|
|
2119
|
-
default:
|
|
2120
|
-
|
|
2121
|
-
(
|
|
2122
|
-
key:
|
|
2336
|
+
default: y(() => [
|
|
2337
|
+
s("div", va, [
|
|
2338
|
+
(f(!0), v(E, null, j(t.value.args, (P, Te) => (f(), v("div", {
|
|
2339
|
+
key: P,
|
|
2123
2340
|
class: "flex items-center rounded-full bg-gray-200 dark:bg-gray-900/50 px-2 py-[2px] text-xs"
|
|
2124
2341
|
}, [
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
class:
|
|
2342
|
+
s("div", ha, [
|
|
2343
|
+
s("span", ga, x(P), 1),
|
|
2344
|
+
s("div", {
|
|
2345
|
+
class: z(["fixed left-1/2 top-1/2 p-4 text-white bg-gray-900 rounded-md group-hover:visible invisible opacity-0 group-hover:opacity-100 z-50 transition-all -translate-1/2", N(Te) ? "visible opacity-100" : ""])
|
|
2129
2346
|
}, [
|
|
2130
|
-
|
|
2347
|
+
s("pre", null, x(q(_t)(P, e.object)), 1)
|
|
2131
2348
|
], 2)
|
|
2132
2349
|
]),
|
|
2133
|
-
|
|
2350
|
+
Te || t.value.args.length < 2 ? (f(), v("button", {
|
|
2134
2351
|
key: 0,
|
|
2135
2352
|
class: "cursor-pointer ms-1",
|
|
2136
|
-
onClick: (
|
|
2353
|
+
onClick: (Vo) => V(P)
|
|
2137
2354
|
}, [
|
|
2138
2355
|
g(tt, { class: "size-5" })
|
|
2139
|
-
], 8,
|
|
2356
|
+
], 8, ba)) : T("", !0)
|
|
2140
2357
|
]))), 128))
|
|
2141
2358
|
])
|
|
2142
2359
|
]),
|
|
2143
2360
|
_: 1
|
|
2144
2361
|
}, 8, ["active", "disabled"]),
|
|
2145
|
-
g(
|
|
2362
|
+
g(be, {
|
|
2146
2363
|
value: t.value.set,
|
|
2147
2364
|
args: t.value.args,
|
|
2148
|
-
disabled: !
|
|
2365
|
+
disabled: !i.value || m.value,
|
|
2149
2366
|
label: "Set",
|
|
2150
|
-
onIcon: C[3] || (C[3] = (
|
|
2367
|
+
onIcon: C[3] || (C[3] = (P) => h("set")),
|
|
2151
2368
|
onHover: Z,
|
|
2152
|
-
onChange: C[4] || (C[4] = (
|
|
2369
|
+
onChange: C[4] || (C[4] = (P) => ge("set", P))
|
|
2153
2370
|
}, null, 8, ["value", "args", "disabled"]),
|
|
2154
|
-
g(
|
|
2371
|
+
g(be, {
|
|
2155
2372
|
value: t.value.get,
|
|
2156
2373
|
args: t.value.args,
|
|
2157
|
-
disabled: !
|
|
2374
|
+
disabled: !i.value,
|
|
2158
2375
|
label: "Get",
|
|
2159
|
-
onIcon: C[5] || (C[5] = (
|
|
2376
|
+
onIcon: C[5] || (C[5] = (P) => h("get")),
|
|
2160
2377
|
onHover: Z,
|
|
2161
|
-
onChange: C[6] || (C[6] = (
|
|
2378
|
+
onChange: C[6] || (C[6] = (P) => ge("get", P))
|
|
2162
2379
|
}, null, 8, ["value", "args", "disabled"]),
|
|
2163
|
-
g(
|
|
2380
|
+
g(be, {
|
|
2164
2381
|
value: t.value.getTo,
|
|
2165
2382
|
args: t.value.args,
|
|
2166
|
-
disabled: !
|
|
2383
|
+
disabled: !i.value,
|
|
2167
2384
|
label: "GetTo",
|
|
2168
|
-
onIcon: C[7] || (C[7] = (
|
|
2385
|
+
onIcon: C[7] || (C[7] = (P) => h("getTo")),
|
|
2169
2386
|
onHover: Z,
|
|
2170
|
-
onChange: C[8] || (C[8] = (
|
|
2387
|
+
onChange: C[8] || (C[8] = (P) => ge("getTo", P))
|
|
2171
2388
|
}, null, 8, ["value", "args", "disabled"])
|
|
2172
2389
|
])
|
|
2173
2390
|
]),
|
|
2174
|
-
"tab-2":
|
|
2175
|
-
g(
|
|
2391
|
+
"tab-2": y(() => [
|
|
2392
|
+
g(ia, H(t.value.opts, {
|
|
2176
2393
|
value: t.value.value,
|
|
2177
2394
|
type: t.value.type,
|
|
2178
2395
|
onUpdate: Qe
|
|
@@ -2181,21 +2398,21 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
2181
2398
|
_: 3
|
|
2182
2399
|
})
|
|
2183
2400
|
]),
|
|
2184
|
-
|
|
2185
|
-
|
|
2401
|
+
s("div", ya, [
|
|
2402
|
+
s("div", xa, [
|
|
2186
2403
|
k($.$slots, "default", { item: t.value })
|
|
2187
2404
|
])
|
|
2188
2405
|
])
|
|
2189
2406
|
]),
|
|
2190
|
-
|
|
2407
|
+
s("div", _a, [
|
|
2191
2408
|
g(A, {
|
|
2192
2409
|
class: "px-4",
|
|
2193
2410
|
color: "blue",
|
|
2194
2411
|
disabled: u.value,
|
|
2195
|
-
onClick: C[9] || (C[9] = (
|
|
2412
|
+
onClick: C[9] || (C[9] = (P) => _(c.value ? "add" : "save"))
|
|
2196
2413
|
}, {
|
|
2197
|
-
default:
|
|
2198
|
-
|
|
2414
|
+
default: y(() => [
|
|
2415
|
+
D(x(c.value ? $.$t("add") : $.$t("save")), 1)
|
|
2199
2416
|
]),
|
|
2200
2417
|
_: 1
|
|
2201
2418
|
}, 8, ["disabled"]),
|
|
@@ -2203,82 +2420,82 @@ const os = O({ name: "ri-folder6-line", render: as }), is = ["onClick"], rs = {
|
|
|
2203
2420
|
class: "px-4",
|
|
2204
2421
|
color: "red",
|
|
2205
2422
|
outline: "",
|
|
2206
|
-
onClick: C[10] || (C[10] = (
|
|
2423
|
+
onClick: C[10] || (C[10] = (P) => _("remove"))
|
|
2207
2424
|
}, {
|
|
2208
|
-
default:
|
|
2209
|
-
|
|
2425
|
+
default: y(() => [
|
|
2426
|
+
D(x($.$t("remove")), 1)
|
|
2210
2427
|
]),
|
|
2211
2428
|
_: 1
|
|
2212
2429
|
})
|
|
2213
2430
|
]),
|
|
2214
|
-
r.value ? (
|
|
2431
|
+
r.value ? (f(), I(Oe, {
|
|
2215
2432
|
key: 0,
|
|
2216
2433
|
size: "md",
|
|
2217
2434
|
title: $.$t("select"),
|
|
2218
|
-
onClose: C[11] || (C[11] = (
|
|
2435
|
+
onClose: C[11] || (C[11] = (P) => r.value = !1)
|
|
2219
2436
|
}, {
|
|
2220
|
-
default:
|
|
2221
|
-
|
|
2437
|
+
default: y(() => [
|
|
2438
|
+
s("div", $a, [
|
|
2222
2439
|
g(We, {
|
|
2223
2440
|
items: e.object,
|
|
2224
|
-
onlyValue: !
|
|
2225
|
-
onClick:
|
|
2441
|
+
onlyValue: !i.value,
|
|
2442
|
+
onClick: L
|
|
2226
2443
|
}, null, 8, ["items", "onlyValue"])
|
|
2227
2444
|
])
|
|
2228
2445
|
]),
|
|
2229
2446
|
_: 1
|
|
2230
|
-
}, 8, ["title"])) :
|
|
2447
|
+
}, 8, ["title"])) : T("", !0)
|
|
2231
2448
|
]);
|
|
2232
2449
|
};
|
|
2233
2450
|
}
|
|
2234
|
-
}),
|
|
2235
|
-
function
|
|
2451
|
+
}), Le = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, ka = { lineHeight: "inherit", whiteSpace: "pre-wrap", wordBreak: "keep-all", overflowWrap: "break-word", background: "none", position: "absolute", width: "100%", height: "100%", zIndex: "1", resize: "none", caretColor: "currentColor", padding: "inherit", outline: "none", fontSize: "inherit", fontFamily: "inherit", letterSpacing: "inherit", boxSizing: "border-box", border: "none", top: "0px", left: "0px", color: "inherit", overflow: "hidden", "-webkit-font-smoothing": "antialiased", "-webkit-text-fill-color": "transparent" }, wa = { lineHeight: "inherit", position: "relative", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "0", width: "100%", margin: "0", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, Ca = { lineHeight: "inherit", position: "absolute", width: "100%", height: "100%", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "inherit", margin: "0", top: "0px", left: "0px", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, qe = (e) => Ge(e);
|
|
2452
|
+
function Ee(e) {
|
|
2236
2453
|
const n = Array.isArray(e) ? e : [e];
|
|
2237
|
-
return n.length === 0 ? qe : (
|
|
2454
|
+
return n.length === 0 ? qe : (o) => n.reduce((l, t, r) => t(l, { html: r > 0 }), o);
|
|
2238
2455
|
}
|
|
2239
|
-
class
|
|
2240
|
-
constructor(n,
|
|
2456
|
+
class Sa {
|
|
2457
|
+
constructor(n, o = {}) {
|
|
2241
2458
|
if (this.lines = null, !n) throw new Error("selector is not defined");
|
|
2242
2459
|
if (this.root = n instanceof Node ? n : document.querySelector(n), !this.root) throw new Error(`element with "${n}" selector is not exist`);
|
|
2243
|
-
const l = { value: "", styles: {}, plugins: [], highlighter: qe }, { highlighters: t, ...r } =
|
|
2244
|
-
this.options = { ...l, ...r, highlighter: t ?
|
|
2460
|
+
const l = { value: "", styles: {}, plugins: [], highlighter: qe }, { highlighters: t, ...r } = o;
|
|
2461
|
+
this.options = { ...l, ...r, highlighter: t ? Ee(t) : l.highlighter }, this.options.value = this.options.value == null ? "" : String(this.options.value), this.init();
|
|
2245
2462
|
}
|
|
2246
2463
|
init() {
|
|
2247
2464
|
this.textarea = document.createElement("textarea"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocomplete", "off"), this.pre = document.createElement("pre");
|
|
2248
|
-
const n = Object.keys(
|
|
2465
|
+
const n = Object.keys(Le).concat(Object.keys(this.options.styles)).concat(["paddingLeft"]);
|
|
2249
2466
|
this.initialRootStyles = {};
|
|
2250
|
-
const
|
|
2467
|
+
const o = this.root.style;
|
|
2251
2468
|
n.forEach((l) => {
|
|
2252
|
-
this.initialRootStyles[l] =
|
|
2253
|
-
}), Object.assign(this.root.style,
|
|
2469
|
+
this.initialRootStyles[l] = o[l] || "";
|
|
2470
|
+
}), Object.assign(this.root.style, Le, this.options.styles), Object.assign(this.textarea.style, ka), Object.assign(this.pre.style, wa), this.basePaddingLeft = this.root.style.paddingLeft || "", this.root.appendChild(this.textarea), this.root.appendChild(this.pre), this.addTextareaEvents(), this.update({ value: this.options.value }), this.updateLines();
|
|
2254
2471
|
}
|
|
2255
2472
|
addTextareaEvents() {
|
|
2256
2473
|
this.handleEvent = (n) => {
|
|
2257
2474
|
if (n.type === "keydown" && this.textarea.readOnly) return;
|
|
2258
|
-
const
|
|
2259
|
-
if (
|
|
2475
|
+
const o = n;
|
|
2476
|
+
if (o.isComposing || o.keyCode === 229) return;
|
|
2260
2477
|
const l = function(t, r) {
|
|
2261
2478
|
const { value: c, selectionStart: d, selectionEnd: m } = r.target;
|
|
2262
|
-
return t.reduce((
|
|
2479
|
+
return t.reduce((i, a) => ({ ...i, ...a(i, r) }), { value: c, selectionStart: d, selectionEnd: m });
|
|
2263
2480
|
}(this.options.plugins, n);
|
|
2264
2481
|
this.update(l);
|
|
2265
2482
|
}, this.textarea.addEventListener("input", this.handleEvent), this.textarea.addEventListener("keydown", this.handleEvent), this.textarea.addEventListener("compositionend", this.handleEvent);
|
|
2266
2483
|
}
|
|
2267
2484
|
update(n) {
|
|
2268
2485
|
if (!this.textarea) return;
|
|
2269
|
-
let { value:
|
|
2270
|
-
|
|
2486
|
+
let { value: o, selectionStart: l, selectionEnd: t } = n;
|
|
2487
|
+
o != null && (o = String(o), l == null && (l = this.textarea.selectionStart), t == null && (t = this.textarea.selectionEnd), this.textarea.value !== o && (this.textarea.value = o)), l != null && (this.textarea.selectionStart = l), t != null && (this.textarea.selectionEnd = t), o !== this.value && o != null && (this.value = o, this.render(), this.updateCallback && this.updateCallback(o));
|
|
2271
2488
|
}
|
|
2272
2489
|
updateOptions(n) {
|
|
2273
2490
|
if (!this.textarea) return;
|
|
2274
|
-
const { highlighters:
|
|
2275
|
-
if (this.options = { ...this.options, ...l, highlighter:
|
|
2491
|
+
const { highlighters: o, ...l } = n;
|
|
2492
|
+
if (this.options = { ...this.options, ...l, highlighter: o ? Ee(o) : this.options.highlighter }, n.styles) {
|
|
2276
2493
|
const t = this.root.style;
|
|
2277
2494
|
Object.keys(n.styles).forEach((r) => {
|
|
2278
2495
|
r in this.initialRootStyles || (this.initialRootStyles[r] = t[r] || "");
|
|
2279
2496
|
}), Object.assign(this.root.style, n.styles), ("paddingLeft" in n.styles || "padding" in n.styles) && (this.basePaddingLeft = this.root.style.paddingLeft || "");
|
|
2280
2497
|
}
|
|
2281
|
-
this.lines && !this.options.lineNumbers && (
|
|
2498
|
+
this.lines && !this.options.lineNumbers && (me(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft), n.value != null && this.update({ value: n.value }), this.render();
|
|
2282
2499
|
}
|
|
2283
2500
|
render() {
|
|
2284
2501
|
const n = this.options.highlighter(this.value);
|
|
@@ -2286,201 +2503,201 @@ class ea {
|
|
|
2286
2503
|
}
|
|
2287
2504
|
updateLines() {
|
|
2288
2505
|
if (!this.options.lineNumbers) return;
|
|
2289
|
-
this.lines || (this.lines = document.createElement("pre"), this.root.appendChild(this.lines), Object.assign(this.lines.style,
|
|
2506
|
+
this.lines || (this.lines = document.createElement("pre"), this.root.appendChild(this.lines), Object.assign(this.lines.style, Ca));
|
|
2290
2507
|
const n = this.value.split(`
|
|
2291
|
-
`),
|
|
2292
|
-
this.root.style.paddingLeft = `${
|
|
2508
|
+
`), o = n.length.toString().length;
|
|
2509
|
+
this.root.style.paddingLeft = `${o + 1}ch`, this.lines.innerHTML = n.map((l, t) => `${`<span class="yace-line" style="position: absolute; opacity: .3; left: 0; width: ${o}ch; text-align: right">${1 + t}</span>`}${`<span style="color: transparent; pointer-events: none">${Ge(l)}</span>`}`).join(`
|
|
2293
2510
|
`);
|
|
2294
2511
|
}
|
|
2295
2512
|
destroy() {
|
|
2296
|
-
this.textarea && (this.textarea.removeEventListener("input", this.handleEvent), this.textarea.removeEventListener("keydown", this.handleEvent), this.textarea.removeEventListener("compositionend", this.handleEvent),
|
|
2513
|
+
this.textarea && (this.textarea.removeEventListener("input", this.handleEvent), this.textarea.removeEventListener("keydown", this.handleEvent), this.textarea.removeEventListener("compositionend", this.handleEvent), me(this.textarea), me(this.pre), me(this.lines), Object.assign(this.root.style, this.initialRootStyles), Object.assign(this, { textarea: null, pre: null, lines: null, updateCallback: null, handleEvent: null, initialRootStyles: null, options: null, root: null }));
|
|
2297
2514
|
}
|
|
2298
2515
|
onUpdate(n) {
|
|
2299
2516
|
this.updateCallback = n;
|
|
2300
2517
|
}
|
|
2301
2518
|
}
|
|
2302
|
-
function
|
|
2519
|
+
function me(e) {
|
|
2303
2520
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
2304
2521
|
}
|
|
2305
2522
|
function Ge(e) {
|
|
2306
2523
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2307
2524
|
}
|
|
2308
|
-
const
|
|
2309
|
-
function
|
|
2310
|
-
const
|
|
2311
|
-
if (!
|
|
2312
|
-
const t = n.key != null && n.key.toLowerCase() ===
|
|
2525
|
+
const Be = { alt: "altKey", control: "ctrlKey", ctrl: "ctrlKey", meta: "metaKey", shift: "shiftKey", "ctrl/cmd": typeof window < "u" && window.navigator && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform) ? "metaKey" : "ctrlKey" }, za = { add: "=" }, Va = { ";": "semicolon", "=": "equal", ",": "comma", "-": "minus", ".": "period", "/": "slash", "`": "backquote", "[": "bracketleft", "\\": "backslash", "]": "bracketright", "'": "quote" };
|
|
2526
|
+
function de(e, n) {
|
|
2527
|
+
const o = e.split("+").reduce((m, i) => Be[i] ? (m.modifiers[Be[i]] = !0, m) : { ...m, key: za[i] || i.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), l = Object.keys(o.modifiers).every((m) => o.modifiers[m] ? n[m] : !n[m]);
|
|
2528
|
+
if (!o.key) return l;
|
|
2529
|
+
const t = n.key != null && n.key.toLowerCase() === o.key, r = (c = o.key, /^[a-z]$/.test(c) ? `key${c}` : /^[0-9]$/.test(c) ? `digit${c}` : Va[c] || null);
|
|
2313
2530
|
var c;
|
|
2314
2531
|
const d = !n.isComposing && r != null && n.code != null && n.code.toLowerCase() === r;
|
|
2315
2532
|
return l && (t || d);
|
|
2316
2533
|
}
|
|
2317
|
-
function
|
|
2318
|
-
const n = Math.max(1, e.limit == null ? 300 : e.limit),
|
|
2534
|
+
function Ta(e = {}) {
|
|
2535
|
+
const n = Math.max(1, e.limit == null ? 300 : e.limit), o = e.coalesceMs == null ? 300 : e.coalesceMs;
|
|
2319
2536
|
let l = [], t = null, r = null;
|
|
2320
2537
|
const c = (d) => {
|
|
2321
2538
|
l = l.slice(0, t + 1), l.push(d), l.length > n && (l = l.slice(l.length - n)), t = l.length - 1;
|
|
2322
2539
|
};
|
|
2323
2540
|
return (d, m) => {
|
|
2324
|
-
const
|
|
2325
|
-
if ((
|
|
2326
|
-
if (
|
|
2327
|
-
if (
|
|
2541
|
+
const i = m.type === "keydown" && de("ctrl/cmd+z", m), a = m.type === "keydown" && (de("ctrl/cmd+shift+z", m) || de("ctrl+y", m));
|
|
2542
|
+
if ((i || a) && m.preventDefault(), t === null) return l = [d], void (t = 0);
|
|
2543
|
+
if (i) return r = null, l[t].value !== d.value ? c(d) : l[t] = d, t = Math.max(0, t - 1), l[t];
|
|
2544
|
+
if (a) return r = null, l[t].value !== d.value ? void c(d) : (t = Math.min(l.length - 1, t + 1), l[t]);
|
|
2328
2545
|
if (m.type === "keydown") return l[t].value !== d.value ? (r = null, void c(d)) : void (l[t] = d);
|
|
2329
2546
|
if (m.type === "input") {
|
|
2330
|
-
const u = m.timeStamp,
|
|
2331
|
-
if (r = u ?? null,
|
|
2547
|
+
const u = m.timeStamp, p = u != null && r != null && u - r <= o;
|
|
2548
|
+
if (r = u ?? null, p) return void (l[t] = d);
|
|
2332
2549
|
c(d);
|
|
2333
2550
|
}
|
|
2334
2551
|
};
|
|
2335
2552
|
}
|
|
2336
|
-
const
|
|
2337
|
-
const { value:
|
|
2338
|
-
if (!
|
|
2339
|
-
const r =
|
|
2553
|
+
const La = () => (e, n) => {
|
|
2554
|
+
const { value: o, selectionStart: l, selectionEnd: t } = e;
|
|
2555
|
+
if (!de("enter", n) || n.type !== "keydown") return;
|
|
2556
|
+
const r = o.substring(0, l).split(`
|
|
2340
2557
|
`).pop(), c = /^\s+/.exec(r);
|
|
2341
2558
|
if (!c) return;
|
|
2342
2559
|
n.preventDefault();
|
|
2343
2560
|
const d = `
|
|
2344
2561
|
` + c[0];
|
|
2345
|
-
return { value:
|
|
2346
|
-
},
|
|
2562
|
+
return { value: o.substring(0, l) + d + o.substring(t), selectionStart: l + d.length, selectionEnd: l + d.length };
|
|
2563
|
+
}, Ea = () => (e, n) => {
|
|
2347
2564
|
if (typeof KeyboardEvent > "u" || !(n instanceof KeyboardEvent) || n.key !== "Enter")
|
|
2348
2565
|
return;
|
|
2349
|
-
const { value:
|
|
2566
|
+
const { value: o, selectionStart: l, selectionEnd: t } = e;
|
|
2350
2567
|
if (l !== t)
|
|
2351
2568
|
return;
|
|
2352
|
-
const r =
|
|
2353
|
-
`, l - 1) + 1, c =
|
|
2354
|
-
`, l), d = c === -1 ?
|
|
2355
|
-
if (
|
|
2569
|
+
const r = o.lastIndexOf(`
|
|
2570
|
+
`, l - 1) + 1, c = o.indexOf(`
|
|
2571
|
+
`, l), d = c === -1 ? o.length : c;
|
|
2572
|
+
if (o.slice(l, d).trim().length > 0)
|
|
2356
2573
|
return;
|
|
2357
|
-
const
|
|
2358
|
-
if (
|
|
2574
|
+
const a = o.substring(r, d).trimEnd();
|
|
2575
|
+
if (a.endsWith(";") || a.length === 0)
|
|
2359
2576
|
return;
|
|
2360
|
-
const u =
|
|
2577
|
+
const u = o.slice(0, d) + ";" + o.slice(d), p = l + 1;
|
|
2361
2578
|
return {
|
|
2362
2579
|
value: u,
|
|
2363
|
-
selectionStart:
|
|
2364
|
-
selectionEnd:
|
|
2580
|
+
selectionStart: p,
|
|
2581
|
+
selectionEnd: p
|
|
2365
2582
|
};
|
|
2366
2583
|
};
|
|
2367
|
-
let ze = [], W = null,
|
|
2368
|
-
const
|
|
2369
|
-
const { customSuggestions: n = [], minPrefixLength:
|
|
2584
|
+
let ze = [], W = null, F = 0, X = [], te = null, ne = null, Ve, Je, G = null, le = null;
|
|
2585
|
+
const Ba = (e) => {
|
|
2586
|
+
const { customSuggestions: n = [], minPrefixLength: o = 1, maxSuggestions: l = 20, tabSize: t = 2, tooltip: r = { enabled: !0 }, i18n: c, renderMenu: d, renderTooltip: m } = e;
|
|
2370
2587
|
if (!d || !m)
|
|
2371
2588
|
throw new Error("renderMenu and renderTooltip are required");
|
|
2372
|
-
return ze = [...n].map((
|
|
2373
|
-
if (typeof KeyboardEvent > "u" || !(
|
|
2589
|
+
return ze = [...n].map((i) => c(i)), Ve = d, Je = m, (i, a) => {
|
|
2590
|
+
if (typeof KeyboardEvent > "u" || !(a instanceof KeyboardEvent))
|
|
2374
2591
|
return;
|
|
2375
|
-
const { value: u, selectionStart:
|
|
2376
|
-
if (
|
|
2377
|
-
setTimeout(() =>
|
|
2592
|
+
const { value: u, selectionStart: p } = i, b = a.target;
|
|
2593
|
+
if (ne = b, r.enabled !== !1 && !b.dataset.tooltipInitialized && (b.dataset.tooltipInitialized = "true", b.addEventListener("mouseup", () => {
|
|
2594
|
+
setTimeout(() => Me(b), 100);
|
|
2378
2595
|
}), b.addEventListener("keyup", () => {
|
|
2379
|
-
setTimeout(() =>
|
|
2596
|
+
setTimeout(() => Me(b), 100);
|
|
2380
2597
|
})), W) {
|
|
2381
|
-
switch (
|
|
2598
|
+
switch (a.key) {
|
|
2382
2599
|
case "ArrowDown":
|
|
2383
|
-
return
|
|
2600
|
+
return a.preventDefault(), F < X.length - 1 && (F++, se()), { ...i };
|
|
2384
2601
|
case "ArrowUp":
|
|
2385
|
-
return
|
|
2602
|
+
return a.preventDefault(), F > 0 && (F--, se()), { ...i };
|
|
2386
2603
|
case "Enter":
|
|
2387
|
-
if (
|
|
2388
|
-
const h =
|
|
2604
|
+
if (a.preventDefault(), X[F]) {
|
|
2605
|
+
const h = xe(i, X[F]);
|
|
2389
2606
|
return Y(), h;
|
|
2390
2607
|
}
|
|
2391
2608
|
return;
|
|
2392
2609
|
case "Tab":
|
|
2393
|
-
if (
|
|
2394
|
-
const h =
|
|
2610
|
+
if (a.preventDefault(), X[F]) {
|
|
2611
|
+
const h = xe(i, X[F]);
|
|
2395
2612
|
return Y(), h;
|
|
2396
2613
|
}
|
|
2397
2614
|
return;
|
|
2398
2615
|
case "Escape":
|
|
2399
|
-
return
|
|
2616
|
+
return a.preventDefault(), Y(), { ...i };
|
|
2400
2617
|
case "Backspace":
|
|
2401
2618
|
setTimeout(() => {
|
|
2402
|
-
if (
|
|
2403
|
-
const h =
|
|
2404
|
-
if (
|
|
2619
|
+
if (ne) {
|
|
2620
|
+
const h = ne.value, _ = ne.selectionStart, V = ve(h, _), L = h.slice(V, _);
|
|
2621
|
+
if (L.length < o)
|
|
2405
2622
|
Y();
|
|
2406
2623
|
else {
|
|
2407
|
-
const w = ye(
|
|
2408
|
-
w.length === 0 ? Y() : (X = w,
|
|
2624
|
+
const w = ye(L).slice(0, l);
|
|
2625
|
+
w.length === 0 ? Y() : (X = w, F = 0, se());
|
|
2409
2626
|
}
|
|
2410
2627
|
}
|
|
2411
2628
|
}, 0);
|
|
2412
2629
|
return;
|
|
2413
2630
|
}
|
|
2414
|
-
if (["ArrowDown", "ArrowUp", "Enter", "Tab", "Escape", "Backspace"].includes(
|
|
2415
|
-
return { ...
|
|
2631
|
+
if (["ArrowDown", "ArrowUp", "Enter", "Tab", "Escape", "Backspace"].includes(a.key))
|
|
2632
|
+
return { ...i };
|
|
2416
2633
|
}
|
|
2417
|
-
if (
|
|
2418
|
-
|
|
2419
|
-
const h =
|
|
2420
|
-
if (
|
|
2421
|
-
const
|
|
2422
|
-
if (
|
|
2423
|
-
return
|
|
2634
|
+
if (de("tab", a)) {
|
|
2635
|
+
a.preventDefault();
|
|
2636
|
+
const h = ve(u, p), _ = u.slice(h, p);
|
|
2637
|
+
if (_.length > 0) {
|
|
2638
|
+
const N = ye(_);
|
|
2639
|
+
if (N.length > 0)
|
|
2640
|
+
return xe(i, N[0]);
|
|
2424
2641
|
}
|
|
2425
|
-
const
|
|
2642
|
+
const V = " ".repeat(t), L = u.slice(0, p) + V + u.slice(p), w = p + t;
|
|
2426
2643
|
return {
|
|
2427
|
-
value:
|
|
2644
|
+
value: L,
|
|
2428
2645
|
selectionStart: w,
|
|
2429
2646
|
selectionEnd: w
|
|
2430
2647
|
};
|
|
2431
2648
|
}
|
|
2432
|
-
if (!(
|
|
2433
|
-
return
|
|
2434
|
-
|
|
2435
|
-
const h = b.value,
|
|
2436
|
-
if (
|
|
2649
|
+
if (!(a.key.length !== 1 || a.ctrlKey || a.metaKey || a.altKey))
|
|
2650
|
+
return te && clearTimeout(te), te = setTimeout(() => {
|
|
2651
|
+
te = null;
|
|
2652
|
+
const h = b.value, _ = b.selectionStart, V = ve(h, _), L = h.slice(V, _);
|
|
2653
|
+
if (L.length < o) {
|
|
2437
2654
|
Y();
|
|
2438
2655
|
return;
|
|
2439
2656
|
}
|
|
2440
|
-
let w = ye(
|
|
2657
|
+
let w = ye(L);
|
|
2441
2658
|
if (w = w.slice(0, l), w.length === 0) {
|
|
2442
2659
|
Y();
|
|
2443
2660
|
return;
|
|
2444
2661
|
}
|
|
2445
|
-
X = w,
|
|
2446
|
-
}, 0), { ...
|
|
2662
|
+
X = w, F = 0, W ? se() : Ma(b, w);
|
|
2663
|
+
}, 0), { ...i };
|
|
2447
2664
|
};
|
|
2448
2665
|
};
|
|
2449
2666
|
function ye(e) {
|
|
2450
2667
|
const n = e.toLowerCase();
|
|
2451
|
-
return ze.filter((
|
|
2452
|
-
const l =
|
|
2668
|
+
return ze.filter((o) => {
|
|
2669
|
+
const l = o.label.toLowerCase();
|
|
2453
2670
|
return l.startsWith(n) || l.includes(n) || l.split("_").map((t) => t[0]).join("").startsWith(n);
|
|
2454
|
-
}).sort((
|
|
2455
|
-
const t =
|
|
2671
|
+
}).sort((o, l) => {
|
|
2672
|
+
const t = o.label.toLowerCase(), r = l.label.toLowerCase(), c = t.startsWith(n), d = r.startsWith(n);
|
|
2456
2673
|
if (c && !d) return -1;
|
|
2457
2674
|
if (!c && d) return 1;
|
|
2458
|
-
const m = t.indexOf(n),
|
|
2459
|
-
return m !==
|
|
2675
|
+
const m = t.indexOf(n), i = r.indexOf(n);
|
|
2676
|
+
return m !== i ? m - i : t.length !== r.length ? t.length - r.length : t.localeCompare(r);
|
|
2460
2677
|
});
|
|
2461
2678
|
}
|
|
2462
|
-
function
|
|
2463
|
-
let
|
|
2464
|
-
for (;
|
|
2465
|
-
|
|
2466
|
-
return
|
|
2679
|
+
function ve(e, n) {
|
|
2680
|
+
let o = n;
|
|
2681
|
+
for (; o > 0 && /[a-zA-Z0-9_$]/.test(e[o - 1]); )
|
|
2682
|
+
o--;
|
|
2683
|
+
return o;
|
|
2467
2684
|
}
|
|
2468
|
-
function
|
|
2469
|
-
Y(), X = n,
|
|
2470
|
-
const
|
|
2471
|
-
W =
|
|
2472
|
-
|
|
2685
|
+
function Ma(e, n) {
|
|
2686
|
+
Y(), X = n, F = 0;
|
|
2687
|
+
const o = Ze(e);
|
|
2688
|
+
W = Ve(n, F, (l) => {
|
|
2689
|
+
F = l, se();
|
|
2473
2690
|
}), Object.assign(W.style, {
|
|
2474
2691
|
position: "fixed",
|
|
2475
|
-
left: `${
|
|
2476
|
-
top: `${
|
|
2692
|
+
left: `${o.left}px`,
|
|
2693
|
+
top: `${o.top + 24}px`,
|
|
2477
2694
|
zIndex: "10000"
|
|
2478
2695
|
}), document.body.appendChild(W);
|
|
2479
2696
|
}
|
|
2480
|
-
function
|
|
2481
|
-
if (!W || !
|
|
2482
|
-
const e =
|
|
2483
|
-
|
|
2697
|
+
function se() {
|
|
2698
|
+
if (!W || !ne) return;
|
|
2699
|
+
const e = Ve(X, F, (o) => {
|
|
2700
|
+
F = o, se();
|
|
2484
2701
|
}), n = W.getBoundingClientRect();
|
|
2485
2702
|
W.replaceWith(e), W = e, Object.assign(W.style, {
|
|
2486
2703
|
position: "fixed",
|
|
@@ -2489,92 +2706,92 @@ function ne() {
|
|
|
2489
2706
|
zIndex: "10000"
|
|
2490
2707
|
});
|
|
2491
2708
|
}
|
|
2492
|
-
function
|
|
2493
|
-
const { value:
|
|
2709
|
+
function xe(e, n) {
|
|
2710
|
+
const { value: o, selectionStart: l } = e, t = ve(o, l), r = n.insert || n.label, c = /\$\{([^}]*)\}/g;
|
|
2494
2711
|
let d = r;
|
|
2495
2712
|
const m = [];
|
|
2496
|
-
let
|
|
2497
|
-
for (; (
|
|
2498
|
-
const h =
|
|
2499
|
-
m.push({ index:
|
|
2713
|
+
let i;
|
|
2714
|
+
for (; (i = c.exec(r)) !== null; ) {
|
|
2715
|
+
const h = i[1], _ = i.index, V = i[0].length;
|
|
2716
|
+
m.push({ index: _, text: h, length: V });
|
|
2500
2717
|
}
|
|
2501
2718
|
d = r.replace(/\$\{([^}]*)\}/g, "$1");
|
|
2502
|
-
const
|
|
2503
|
-
let u = t + d.length,
|
|
2504
|
-
if (
|
|
2505
|
-
let h = 0,
|
|
2506
|
-
for (;
|
|
2507
|
-
const
|
|
2508
|
-
|
|
2719
|
+
const a = m[0];
|
|
2720
|
+
let u = t + d.length, p = t + d.length;
|
|
2721
|
+
if (a) {
|
|
2722
|
+
let h = 0, _ = 0, V = !1;
|
|
2723
|
+
for (; _ < r.length && !V; ) {
|
|
2724
|
+
const L = m.find((w) => w.index === _);
|
|
2725
|
+
L ? (h += L.text.length, _ += L.length, L === a && (u = t + h - L.text.length, p = t + h, V = !0)) : (h++, _++);
|
|
2509
2726
|
}
|
|
2510
2727
|
}
|
|
2511
2728
|
return {
|
|
2512
|
-
value:
|
|
2729
|
+
value: o.slice(0, t) + d + o.slice(l),
|
|
2513
2730
|
selectionStart: u,
|
|
2514
|
-
selectionEnd:
|
|
2731
|
+
selectionEnd: p
|
|
2515
2732
|
};
|
|
2516
2733
|
}
|
|
2517
2734
|
function Y() {
|
|
2518
|
-
|
|
2735
|
+
te && (clearTimeout(te), te = null), W && (W.remove(), W = null, X = [], F = 0, ne = null);
|
|
2519
2736
|
}
|
|
2520
2737
|
function Ze(e) {
|
|
2521
|
-
const n = e.getBoundingClientRect(), { value:
|
|
2738
|
+
const n = e.getBoundingClientRect(), { value: o, selectionStart: l } = e, r = o.substring(0, l).split(`
|
|
2522
2739
|
`), c = r.length, d = r[r.length - 1] || "", m = parseInt(getComputedStyle(e).lineHeight) || 20;
|
|
2523
2740
|
return {
|
|
2524
2741
|
left: n.left + 10 + d.length * 8,
|
|
2525
2742
|
top: n.top + (c - 1) * m
|
|
2526
2743
|
};
|
|
2527
2744
|
}
|
|
2528
|
-
function
|
|
2745
|
+
function Me(e) {
|
|
2529
2746
|
le && clearTimeout(le), le = setTimeout(() => {
|
|
2530
|
-
const n = e.selectionStart,
|
|
2531
|
-
if (n ===
|
|
2532
|
-
|
|
2747
|
+
const n = e.selectionStart, o = e.selectionEnd;
|
|
2748
|
+
if (n === o) {
|
|
2749
|
+
re();
|
|
2533
2750
|
return;
|
|
2534
2751
|
}
|
|
2535
|
-
const l = e.value.substring(n,
|
|
2752
|
+
const l = e.value.substring(n, o).trim();
|
|
2536
2753
|
if (!l) {
|
|
2537
|
-
|
|
2754
|
+
re();
|
|
2538
2755
|
return;
|
|
2539
2756
|
}
|
|
2540
2757
|
const t = ze.find((d) => d.label === l);
|
|
2541
2758
|
if (!t) {
|
|
2542
|
-
|
|
2759
|
+
re();
|
|
2543
2760
|
return;
|
|
2544
2761
|
}
|
|
2545
2762
|
const r = Ze(e), c = Je(t, r);
|
|
2546
2763
|
c.style.opacity = "0", G && G.remove(), G = c, document.body.appendChild(G), requestAnimationFrame(() => {
|
|
2547
2764
|
G && (G.style.opacity = "1");
|
|
2548
|
-
}), setTimeout(() =>
|
|
2765
|
+
}), setTimeout(() => re(), 3e3);
|
|
2549
2766
|
}, 300);
|
|
2550
2767
|
}
|
|
2551
|
-
function
|
|
2768
|
+
function re() {
|
|
2552
2769
|
le && (clearTimeout(le), le = null), G && (G.style.opacity = "0", setTimeout(() => {
|
|
2553
2770
|
G && (G.remove(), G = null);
|
|
2554
2771
|
}, 150));
|
|
2555
2772
|
}
|
|
2556
2773
|
typeof document < "u" && document.addEventListener("mousedown", (e) => {
|
|
2557
2774
|
const n = e.target;
|
|
2558
|
-
W && !W.contains(n) && Y(), G && !G.contains(n) &&
|
|
2775
|
+
W && !W.contains(n) && Y(), G && !G.contains(n) && re();
|
|
2559
2776
|
});
|
|
2560
|
-
const
|
|
2561
|
-
const n = e.filter((d) => d.type !== "var").map((d) => d.label), c = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...
|
|
2777
|
+
const _e = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Aa = ["else", "end", "call", "fade"], Da = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Pa = (e) => {
|
|
2778
|
+
const n = e.filter((d) => d.type !== "var").map((d) => d.label), c = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...Aa, ...n])).map(Da).join("|")})\\b)|(\\$[a-zA-Z_][a-zA-Z0-9_]*)|(\\b(?:btn_\\d+(?:_\\d+)?)\\b)|([;:(){}])`;
|
|
2562
2779
|
return new RegExp(c, "g");
|
|
2563
|
-
},
|
|
2564
|
-
const
|
|
2780
|
+
}, Ia = (e) => (n) => {
|
|
2781
|
+
const o = Pa(e);
|
|
2565
2782
|
let l = "", t = 0;
|
|
2566
|
-
for (const r of n.matchAll(
|
|
2567
|
-
const [c, d, m,
|
|
2783
|
+
for (const r of n.matchAll(o)) {
|
|
2784
|
+
const [c, d, m, i, a, u, p, b] = r;
|
|
2568
2785
|
let h = "";
|
|
2569
|
-
d ? h = "comment" : m ? h = "str" :
|
|
2786
|
+
d ? h = "comment" : m ? h = "str" : i ? h = "num" : a ? h = "word" : u ? h = "var" : p ? h = "event" : b && (h = "operator"), l += _e(n.slice(t, r.index)), l += `<span class="tok--${h}">${_e(c)}</span>`, t = r.index + c.length;
|
|
2570
2787
|
}
|
|
2571
|
-
return l +=
|
|
2788
|
+
return l += _e(n.slice(t)), l;
|
|
2572
2789
|
}, Xe = {
|
|
2573
2790
|
word: "text-blue-600 dark:text-blue-400",
|
|
2574
2791
|
func: "text-yellow-600 dark:text-yellow-400",
|
|
2575
2792
|
var: "text-cyan-600 dark:text-cyan-400",
|
|
2576
2793
|
event: "text-purple-600 dark:text-purple-400"
|
|
2577
|
-
},
|
|
2794
|
+
}, ja = (e, n, o) => {
|
|
2578
2795
|
const l = document.createElement("div");
|
|
2579
2796
|
return l.className = `
|
|
2580
2797
|
fixed z-[10000] min-w-[250px] max-w-[400px] max-h-[250px]
|
|
@@ -2595,28 +2812,28 @@ const $e = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
2595
2812
|
${t.detail ? `<span class="text-xs text-gray-500 dark:text-gray-400 ml-2">${t.detail}</span>` : ""}
|
|
2596
2813
|
</div>
|
|
2597
2814
|
${t.description ? `<span class="text-xs text-gray-400 dark:text-gray-500">${t.description}</span>` : ""}
|
|
2598
|
-
`, d.addEventListener("click", () =>
|
|
2815
|
+
`, d.addEventListener("click", () => o(r)), l.appendChild(d);
|
|
2599
2816
|
}), l;
|
|
2600
|
-
},
|
|
2601
|
-
const
|
|
2602
|
-
|
|
2817
|
+
}, Ha = (e, n) => {
|
|
2818
|
+
const o = document.createElement("div");
|
|
2819
|
+
o.className = `
|
|
2603
2820
|
fixed z-[10001] px-3 py-2 font-mono text-sm max-w-[300px]
|
|
2604
2821
|
min-w-[50px] min-h-[20px] rounded-lg shadow-lg border
|
|
2605
2822
|
pointer-events-none transition-opacity duration-150
|
|
2606
2823
|
bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700
|
|
2607
2824
|
text-gray-700 dark:text-gray-300 pointer-events-none
|
|
2608
|
-
`,
|
|
2825
|
+
`, o.style.cssText = `
|
|
2609
2826
|
left: ${n.left + 40}px; top: ${n.top - 10}px;
|
|
2610
2827
|
transform: translateX(-50%) translateY(-100%); opacity: 0;
|
|
2611
2828
|
`;
|
|
2612
2829
|
let t = `<div class="font-medium ${Xe[e.type] || "text-gray-700 dark:text-gray-300"}">${e.label}</div>`;
|
|
2613
|
-
e.detail && (t += `<div class="text-gray-500 dark:text-gray-400 mt-0.5 text-xs">${e.detail}</div>`), e.description && (t += `<div class="text-gray-400 dark:text-gray-500 text-xs mt-1 pt-1 border-t border-gray-200 dark:border-gray-700">${e.description}</div>`),
|
|
2830
|
+
e.detail && (t += `<div class="text-gray-500 dark:text-gray-400 mt-0.5 text-xs">${e.detail}</div>`), e.description && (t += `<div class="text-gray-400 dark:text-gray-500 text-xs mt-1 pt-1 border-t border-gray-200 dark:border-gray-700">${e.description}</div>`), o.innerHTML = t;
|
|
2614
2831
|
const r = document.createElement("div");
|
|
2615
2832
|
return r.className = `
|
|
2616
2833
|
absolute bottom-[-6px] left-1/2 w-2.5 h-2.5 -translate-x-1/2 rotate-45
|
|
2617
2834
|
bg-white dark:bg-gray-800 border-r border-b border-gray-200 dark:border-gray-700
|
|
2618
|
-
`,
|
|
2619
|
-
},
|
|
2835
|
+
`, o.appendChild(r), o;
|
|
2836
|
+
}, Na = [
|
|
2620
2837
|
{ label: "if", type: "word", insert: `if:\${$v0<10};
|
|
2621
2838
|
|
|
2622
2839
|
else;
|
|
@@ -2651,7 +2868,7 @@ end;`, detail: "event(name: string)" },
|
|
|
2651
2868
|
{ label: "$e", type: "var", insert: "$e${0}", detail: "var event" },
|
|
2652
2869
|
{ label: "$c", type: "var", insert: "$c${0}", detail: "var call" },
|
|
2653
2870
|
{ label: "$p", type: "var", insert: "$p${0}", detail: "gpio" }
|
|
2654
|
-
],
|
|
2871
|
+
], ni = /* @__PURE__ */ S({
|
|
2655
2872
|
__name: "ScriptEditor",
|
|
2656
2873
|
props: {
|
|
2657
2874
|
modelValue: {},
|
|
@@ -2659,23 +2876,23 @@ end;`, detail: "event(name: string)" },
|
|
|
2659
2876
|
},
|
|
2660
2877
|
emits: ["update:modelValue", "update"],
|
|
2661
2878
|
setup(e, { emit: n }) {
|
|
2662
|
-
const
|
|
2879
|
+
const o = n;
|
|
2663
2880
|
let l;
|
|
2664
|
-
const t = [...
|
|
2665
|
-
return
|
|
2881
|
+
const t = [...Na, ...e.suggestions];
|
|
2882
|
+
return oe(
|
|
2666
2883
|
() => e.modelValue,
|
|
2667
2884
|
(r) => {
|
|
2668
2885
|
l.update({ value: r });
|
|
2669
2886
|
}
|
|
2670
|
-
),
|
|
2671
|
-
l = new
|
|
2887
|
+
), ee(() => {
|
|
2888
|
+
l = new Sa("#editor", {
|
|
2672
2889
|
value: e.modelValue,
|
|
2673
2890
|
lineNumbers: !0,
|
|
2674
|
-
highlighters: [
|
|
2891
|
+
highlighters: [Ia(t)],
|
|
2675
2892
|
plugins: [
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2893
|
+
Ta(),
|
|
2894
|
+
La(),
|
|
2895
|
+
Ba({
|
|
2679
2896
|
customSuggestions: t,
|
|
2680
2897
|
minPrefixLength: 1,
|
|
2681
2898
|
maxSuggestions: 20,
|
|
@@ -2683,42 +2900,42 @@ end;`, detail: "event(name: string)" },
|
|
|
2683
2900
|
tooltip: {
|
|
2684
2901
|
enabled: !0
|
|
2685
2902
|
},
|
|
2686
|
-
renderMenu:
|
|
2687
|
-
renderTooltip:
|
|
2903
|
+
renderMenu: ja,
|
|
2904
|
+
renderTooltip: Ha
|
|
2688
2905
|
}),
|
|
2689
|
-
|
|
2906
|
+
Ea()
|
|
2690
2907
|
],
|
|
2691
2908
|
styles: { fontSize: "14px" }
|
|
2692
2909
|
}), l.onUpdate((r) => {
|
|
2693
|
-
|
|
2910
|
+
o("update:modelValue", r);
|
|
2694
2911
|
});
|
|
2695
|
-
}),
|
|
2912
|
+
}), ke(() => {
|
|
2696
2913
|
l.destroy();
|
|
2697
|
-
}), (r, c) => (
|
|
2698
|
-
|
|
2914
|
+
}), (r, c) => (f(), v("div", null, [...c[0] || (c[0] = [
|
|
2915
|
+
s("div", {
|
|
2699
2916
|
class: "",
|
|
2700
2917
|
id: "editor"
|
|
2701
2918
|
}, null, -1)
|
|
2702
2919
|
])]));
|
|
2703
2920
|
}
|
|
2704
|
-
}),
|
|
2921
|
+
}), Oa = { class: "max-w-4xl mx-auto" }, Fa = {
|
|
2705
2922
|
key: 0,
|
|
2706
2923
|
class: "text-sm"
|
|
2707
|
-
},
|
|
2924
|
+
}, Ka = {
|
|
2708
2925
|
key: 0,
|
|
2709
2926
|
class: "text-gray-500"
|
|
2710
|
-
},
|
|
2927
|
+
}, Ra = {
|
|
2711
2928
|
key: 1,
|
|
2712
2929
|
class: "text-red-600"
|
|
2713
|
-
},
|
|
2930
|
+
}, Ua = ["innerHTML"], Wa = "https://raw.githubusercontent.com/bondrogeen/vuesp/refs/heads/master/github/docs/scriptrunner/", qa = "https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js", si = /* @__PURE__ */ S({
|
|
2714
2931
|
__name: "ScriptViewDocs",
|
|
2715
2932
|
props: {
|
|
2716
2933
|
lang: { default: "en" }
|
|
2717
2934
|
},
|
|
2718
2935
|
setup(e) {
|
|
2719
|
-
const n =
|
|
2936
|
+
const n = M(""), o = M(""), l = M(null), t = M(!1), r = M(null);
|
|
2720
2937
|
let c = null;
|
|
2721
|
-
const d = () => new Promise((
|
|
2938
|
+
const d = () => new Promise((a, u) => {
|
|
2722
2939
|
if (typeof window > "u" || typeof document > "u") {
|
|
2723
2940
|
u(new Error("Markdown loading is available only in a browser"));
|
|
2724
2941
|
return;
|
|
@@ -2728,22 +2945,22 @@ end;`, detail: "event(name: string)" },
|
|
|
2728
2945
|
gfm: !0,
|
|
2729
2946
|
breaks: !0,
|
|
2730
2947
|
headerIds: !1
|
|
2731
|
-
}),
|
|
2948
|
+
}), a(window.marked);
|
|
2732
2949
|
return;
|
|
2733
2950
|
}
|
|
2734
|
-
const
|
|
2735
|
-
|
|
2951
|
+
const p = document.createElement("script");
|
|
2952
|
+
p.src = qa, p.async = !0, p.onload = () => {
|
|
2736
2953
|
window.marked ? (window.marked.setOptions({
|
|
2737
2954
|
gfm: !0,
|
|
2738
2955
|
breaks: !0,
|
|
2739
2956
|
headerIds: !1
|
|
2740
|
-
}),
|
|
2741
|
-
},
|
|
2957
|
+
}), a(window.marked)) : u(new Error("Marked library not found after loading"));
|
|
2958
|
+
}, p.onerror = () => {
|
|
2742
2959
|
u(new Error("Failed to load Marked library from CDN"));
|
|
2743
|
-
}, document.head.appendChild(
|
|
2744
|
-
}), m = (
|
|
2745
|
-
const u =
|
|
2746
|
-
`),
|
|
2960
|
+
}, document.head.appendChild(p);
|
|
2961
|
+
}), m = (a) => {
|
|
2962
|
+
const u = a.split(`
|
|
2963
|
+
`), p = {};
|
|
2747
2964
|
let b = !0;
|
|
2748
2965
|
for (const h of u) {
|
|
2749
2966
|
if (b && h.startsWith("#")) {
|
|
@@ -2751,227 +2968,102 @@ end;`, detail: "event(name: string)" },
|
|
|
2751
2968
|
continue;
|
|
2752
2969
|
}
|
|
2753
2970
|
if (b && h.includes(":")) {
|
|
2754
|
-
const [
|
|
2755
|
-
|
|
2971
|
+
const [_, V] = h.split(":").map((L) => L.trim());
|
|
2972
|
+
_ && V && (_.toLowerCase().includes("version") && (p.version = V), (_.toLowerCase().includes("обновлено") || _.toLowerCase().includes("updated")) && (p.updated = V));
|
|
2756
2973
|
}
|
|
2757
2974
|
}
|
|
2758
|
-
return
|
|
2759
|
-
},
|
|
2975
|
+
return p;
|
|
2976
|
+
}, i = async (a) => {
|
|
2760
2977
|
if (!c) {
|
|
2761
2978
|
r.value = "error";
|
|
2762
2979
|
return;
|
|
2763
2980
|
}
|
|
2764
|
-
t.value = !0, r.value = null,
|
|
2981
|
+
t.value = !0, r.value = null, o.value = "";
|
|
2765
2982
|
try {
|
|
2766
|
-
const u = `${
|
|
2767
|
-
if (!
|
|
2768
|
-
throw new Error(`HTTP ${
|
|
2769
|
-
const b = await
|
|
2770
|
-
n.value = b, l.value = m(b),
|
|
2983
|
+
const u = `${Wa}${a}.md`, p = await fetch(u);
|
|
2984
|
+
if (!p.ok)
|
|
2985
|
+
throw new Error(`HTTP ${p.status}: ${p.statusText}`);
|
|
2986
|
+
const b = await p.text();
|
|
2987
|
+
n.value = b, l.value = m(b), o.value = c.parse(b);
|
|
2771
2988
|
} catch (u) {
|
|
2772
|
-
const
|
|
2773
|
-
r.value =
|
|
2989
|
+
const p = u instanceof Error ? u.message : "";
|
|
2990
|
+
r.value = p, console.error("Error loading docs:", u);
|
|
2774
2991
|
} finally {
|
|
2775
2992
|
t.value = !1;
|
|
2776
2993
|
}
|
|
2777
2994
|
};
|
|
2778
|
-
return
|
|
2995
|
+
return ee(async () => {
|
|
2779
2996
|
try {
|
|
2780
2997
|
c = await d();
|
|
2781
|
-
const
|
|
2782
|
-
await
|
|
2783
|
-
} catch (
|
|
2784
|
-
const u =
|
|
2785
|
-
r.value = u, console.error("Initialization error:",
|
|
2998
|
+
const a = e.lang ? "ru" : "en";
|
|
2999
|
+
await i(a);
|
|
3000
|
+
} catch (a) {
|
|
3001
|
+
const u = a instanceof Error ? a.message : "";
|
|
3002
|
+
r.value = u, console.error("Initialization error:", a);
|
|
2786
3003
|
}
|
|
2787
|
-
}), (
|
|
2788
|
-
t.value || r.value ? (
|
|
2789
|
-
t.value ? (
|
|
2790
|
-
r.value ? (
|
|
2791
|
-
])) :
|
|
2792
|
-
|
|
3004
|
+
}), (a, u) => (f(), v("div", Oa, [
|
|
3005
|
+
t.value || r.value ? (f(), v("div", Fa, [
|
|
3006
|
+
t.value ? (f(), v("span", Ka, "⏳")) : T("", !0),
|
|
3007
|
+
r.value ? (f(), v("span", Ra, "❌ " + x(r.value), 1)) : T("", !0)
|
|
3008
|
+
])) : T("", !0),
|
|
3009
|
+
s("div", {
|
|
2793
3010
|
class: "docs-content",
|
|
2794
|
-
innerHTML:
|
|
2795
|
-
}, null, 8,
|
|
3011
|
+
innerHTML: o.value
|
|
3012
|
+
}, null, 8, Ua)
|
|
2796
3013
|
]));
|
|
2797
3014
|
}
|
|
2798
|
-
}),
|
|
3015
|
+
}), Ga = { class: "my-4" }, li = /* @__PURE__ */ S({
|
|
2799
3016
|
__name: "ScriptDialog",
|
|
2800
3017
|
props: {
|
|
2801
3018
|
idScript: {}
|
|
2802
3019
|
},
|
|
2803
3020
|
emits: ["add", "close"],
|
|
2804
3021
|
setup(e, { emit: n }) {
|
|
2805
|
-
const
|
|
3022
|
+
const o = n, { defineField: l, handleSubmit: t, isValid: r } = $t({
|
|
2806
3023
|
validationSchema: () => ({
|
|
2807
|
-
name: [
|
|
3024
|
+
name: [kt, wt(8)]
|
|
2808
3025
|
})
|
|
2809
3026
|
}), [c, d] = l("name"), m = () => {
|
|
2810
|
-
|
|
2811
|
-
},
|
|
2812
|
-
m(), c.value = "",
|
|
3027
|
+
o("add", c.value);
|
|
3028
|
+
}, i = t(() => {
|
|
3029
|
+
m(), c.value = "", o("close", new Event("close"));
|
|
2813
3030
|
});
|
|
2814
|
-
return
|
|
3031
|
+
return ee(() => {
|
|
2815
3032
|
e.idScript || (c.value = "boot");
|
|
2816
|
-
}), (
|
|
2817
|
-
const
|
|
2818
|
-
return
|
|
2819
|
-
g(
|
|
3033
|
+
}), (a, u) => {
|
|
3034
|
+
const p = J, b = A;
|
|
3035
|
+
return f(), v("div", Ga, [
|
|
3036
|
+
g(p, H({
|
|
2820
3037
|
modelValue: q(c),
|
|
2821
3038
|
"onUpdate:modelValue": u[0] || (u[0] = (h) => at(c) ? c.value = h : null)
|
|
2822
3039
|
}, q(d), {
|
|
2823
3040
|
disabled: !e.idScript,
|
|
2824
|
-
label:
|
|
3041
|
+
label: a.$t("name")
|
|
2825
3042
|
}), null, 16, ["modelValue", "disabled", "label"]),
|
|
2826
3043
|
g(b, {
|
|
2827
3044
|
class: "w-full",
|
|
2828
3045
|
color: "blue",
|
|
2829
3046
|
disabled: !q(r),
|
|
2830
|
-
onClick: q(
|
|
3047
|
+
onClick: q(i)
|
|
2831
3048
|
}, {
|
|
2832
|
-
default:
|
|
2833
|
-
|
|
3049
|
+
default: y(() => [
|
|
3050
|
+
D(x(a.$t("add")), 1)
|
|
2834
3051
|
]),
|
|
2835
3052
|
_: 1
|
|
2836
3053
|
}, 8, ["disabled", "onClick"])
|
|
2837
3054
|
]);
|
|
2838
3055
|
};
|
|
2839
3056
|
}
|
|
2840
|
-
}),
|
|
2841
|
-
__name: "VisionIcon",
|
|
2842
|
-
props: {
|
|
2843
|
-
name: {},
|
|
2844
|
-
size: { default: 20 }
|
|
2845
|
-
},
|
|
2846
|
-
setup(e) {
|
|
2847
|
-
const n = {
|
|
2848
|
-
home: ["M3 10.5 12 3l9 7.5", "M5 9.5V21h14V9.5"],
|
|
2849
|
-
chart: ["M4 19V5", "M4 19h16", "M8 16v-5", "M12 16V8", "M16 16v-3", "M20 16V6"],
|
|
2850
|
-
card: ["M3 6h18v12H3z", "M3 10h18"],
|
|
2851
|
-
user: ["M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8", "M4 21a8 8 0 0 1 16 0"],
|
|
2852
|
-
users: ["M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", "M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8", "M22 21v-2a4 4 0 0 0-3-3.9", "M16 3.1a4 4 0 0 1 0 7.8"],
|
|
2853
|
-
document: ["M6 3h8l4 4v14H6z", "M14 3v4h4", "M9 12h6", "M9 16h6"],
|
|
2854
|
-
rocket: ["M5 15c-1 3-1 4-1 5 1 0 2 0 5-1", "M9 15l-3-3c4-8 8-9 12-9 0 4-1 8-9 12z", "M14 10a1 1 0 1 0 2 0 1 1 0 0 0-2 0"],
|
|
2855
|
-
search: ["M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16", "M21 21l-4.3-4.3"],
|
|
2856
|
-
settings: ["M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7", "M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2 2-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6V21h-2.8v-.2a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1-2-2 .1-.1a1.7 1.7 0 0 0 .3-1.9 1.7 1.7 0 0 0-1.6-1H3v-2.8h.2a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9l-.1-.1 2-2 .1.1a1.7 1.7 0 0 0 1.9.3 1.7 1.7 0 0 0 1-1.6V3h2.8v.2a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1 2 2-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2V12h-.2a1.7 1.7 0 0 0-1.6 1z"],
|
|
2857
|
-
bell: ["M18 8a6 6 0 1 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9", "M13.7 21a2 2 0 0 1-3.4 0"],
|
|
2858
|
-
arrowRight: ["M5 12h14", "M13 6l6 6-6 6"],
|
|
2859
|
-
arrowUpRight: ["M7 17 17 7", "M8 7h9v9"],
|
|
2860
|
-
check: ["M20 6 9 17l-5-5"],
|
|
2861
|
-
plus: ["M12 5v14", "M5 12h14"],
|
|
2862
|
-
dots: ["M5 12h.01", "M12 12h.01", "M19 12h.01"],
|
|
2863
|
-
logout: ["M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", "M16 17l5-5-5-5", "M21 12H9"],
|
|
2864
|
-
sun: ["M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10", "M12 1v2", "M12 21v2", "M4.2 4.2l1.4 1.4", "M18.4 18.4l1.4 1.4", "M1 12h2", "M21 12h2", "M4.2 19.8l1.4-1.4", "M18.4 5.6l1.4-1.4"],
|
|
2865
|
-
moon: ["M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8"],
|
|
2866
|
-
help: ["M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20", "M9.1 9a3 3 0 1 1 5.8 1c0 2-3 2-3 4", "M12 17h.01"],
|
|
2867
|
-
wallet: ["M3 7h18v12H3z", "M3 7l2-3h14l2 3", "M16 13h2"],
|
|
2868
|
-
trendUp: ["M3 17l6-6 4 4 8-8", "M15 7h6v6"],
|
|
2869
|
-
trendDown: ["M3 7l6 6 4-4 8 8", "M15 17h6v-6"],
|
|
2870
|
-
menu: ["M4 6h16", "M4 12h16", "M4 18h16"],
|
|
2871
|
-
close: ["M6 6l12 12", "M18 6 6 18"],
|
|
2872
|
-
chevronDown: ["M6 9l6 6 6-6"],
|
|
2873
|
-
download: ["M12 3v12", "M7 10l5 5 5-5", "M5 21h14"],
|
|
2874
|
-
edit: ["M12 20h9", "M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"],
|
|
2875
|
-
trash: ["M3 6h18", "M8 6V4h8v2", "M19 6l-1 15H6L5 6", "M10 11v6", "M14 11v6"],
|
|
2876
|
-
calendar: ["M4 5h16v16H4z", "M16 3v4", "M8 3v4", "M4 10h16"],
|
|
2877
|
-
filter: ["M3 5h18", "M6 12h12", "M10 19h4"],
|
|
2878
|
-
star: ["M12 3l2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3 6.4 20.2l1.1-6.2L3 9.6l6.2-.9z"],
|
|
2879
|
-
bolt: ["M13 2 3 14h8l-1 8 11-13h-8z"],
|
|
2880
|
-
wifi: ["M5 12.5a10 10 0 0 1 14 0", "M8.5 16a5 5 0 0 1 7 0", "M12 20h.01"],
|
|
2881
|
-
click: ["M9 9l10 4-4 2-2 4z", "M4 4l3 3"],
|
|
2882
|
-
shopping: ["M6 6h15l-1.5 9h-12z", "M6 6 5 3H2", "M9 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2", "M18 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2"],
|
|
2883
|
-
box: ["M21 8l-9-5-9 5 9 5 9-5", "M3 8v8l9 5 9-5V8", "M12 13v8"],
|
|
2884
|
-
external: ["M14 3h7v7", "M10 14 21 3", "M21 14v7H3V3h7"],
|
|
2885
|
-
github: ["M15 22v-4a4.8 4.8 0 0 0-1-3.5c3.3-.4 6.8-1.6 6.8-7A5.4 5.4 0 0 0 19.5 4 5 5 0 0 0 19.4.5S18.2.1 15 1.8a13.4 13.4 0 0 0-7 0C4.8.1 3.6.5 3.6.5A5 5 0 0 0 3.5 4 5.4 5.4 0 0 0 2 7.5c0 5.4 3.5 6.6 6.8 7A4.8 4.8 0 0 0 8 18v4", "M8 19c-3 .9-3-1.5-4-2"]
|
|
2886
|
-
}, s = E(() => n[e.name] ?? n.help);
|
|
2887
|
-
return (l, t) => (p(), v("svg", {
|
|
2888
|
-
width: e.size,
|
|
2889
|
-
height: e.size,
|
|
2890
|
-
viewBox: "0 0 24 24",
|
|
2891
|
-
fill: "none",
|
|
2892
|
-
stroke: "currentColor",
|
|
2893
|
-
"stroke-width": "1.8",
|
|
2894
|
-
"stroke-linecap": "round",
|
|
2895
|
-
"stroke-linejoin": "round",
|
|
2896
|
-
"aria-hidden": "true"
|
|
2897
|
-
}, [
|
|
2898
|
-
(p(!0), v(B, null, N(s.value, (r, c) => (p(), v("path", {
|
|
2899
|
-
key: c,
|
|
2900
|
-
d: r
|
|
2901
|
-
}, null, 8, wa))), 128))
|
|
2902
|
-
], 8, ka));
|
|
2903
|
-
}
|
|
2904
|
-
}), jo = /* @__PURE__ */ M({
|
|
2905
|
-
__name: "VisionCard",
|
|
2906
|
-
props: {
|
|
2907
|
-
padded: { type: Boolean, default: !0 }
|
|
2908
|
-
},
|
|
2909
|
-
setup(e) {
|
|
2910
|
-
const n = E(() => e.padded ? "p-5 md:p-6" : "");
|
|
2911
|
-
return (s, l) => (p(), v("div", {
|
|
2912
|
-
class: T(["glass-panel", n.value])
|
|
2913
|
-
}, [
|
|
2914
|
-
k(s.$slots, "default")
|
|
2915
|
-
], 2));
|
|
2916
|
-
}
|
|
2917
|
-
}), Ca = { class: "block" }, Ma = {
|
|
2918
|
-
key: 0,
|
|
2919
|
-
class: "mb-2 block text-xs font-medium text-vision-muted"
|
|
2920
|
-
}, za = ["type", "name", "placeholder", "autocomplete"], Sa = {
|
|
2921
|
-
key: 1,
|
|
2922
|
-
class: "mt-1 block text-xs text-vision-danger"
|
|
2923
|
-
}, Po = /* @__PURE__ */ M({
|
|
2924
|
-
__name: "VisionInput",
|
|
2925
|
-
props: /* @__PURE__ */ rt({
|
|
2926
|
-
label: { default: "" },
|
|
2927
|
-
placeholder: { default: "" },
|
|
2928
|
-
type: { default: "text" },
|
|
2929
|
-
name: { default: "" },
|
|
2930
|
-
autocomplete: { default: "off" },
|
|
2931
|
-
icon: { default: "" },
|
|
2932
|
-
error: { default: "" }
|
|
2933
|
-
}, {
|
|
2934
|
-
modelValue: { default: "" },
|
|
2935
|
-
modelModifiers: {}
|
|
2936
|
-
}),
|
|
2937
|
-
emits: ["update:modelValue"],
|
|
2938
|
-
setup(e) {
|
|
2939
|
-
const n = ot(e, "modelValue");
|
|
2940
|
-
return (s, l) => (p(), v("label", Ca, [
|
|
2941
|
-
e.label ? (p(), v("span", Ma, _(e.label), 1)) : z("", !0),
|
|
2942
|
-
a("span", {
|
|
2943
|
-
class: T(["glass-inset flex items-center gap-3 rounded-md px-4 transition-colors focus-within:border-vision-primary/60", e.error ? "border-vision-danger/50" : "border-white/10 hover:border-white/20"])
|
|
2944
|
-
}, [
|
|
2945
|
-
e.icon ? (p(), I(de, {
|
|
2946
|
-
key: 0,
|
|
2947
|
-
name: e.icon,
|
|
2948
|
-
size: 18,
|
|
2949
|
-
class: "shrink-0 text-vision-muted"
|
|
2950
|
-
}, null, 8, ["name"])) : z("", !0),
|
|
2951
|
-
he(a("input", {
|
|
2952
|
-
"onUpdate:modelValue": l[0] || (l[0] = (t) => n.value = t),
|
|
2953
|
-
type: e.type,
|
|
2954
|
-
name: e.name,
|
|
2955
|
-
placeholder: e.placeholder,
|
|
2956
|
-
autocomplete: e.autocomplete,
|
|
2957
|
-
class: "h-11 min-w-0 flex-1 bg-transparent text-sm text-white placeholder:text-vision-muted/70 focus:outline-none"
|
|
2958
|
-
}, null, 8, za), [
|
|
2959
|
-
[it, n.value]
|
|
2960
|
-
])
|
|
2961
|
-
], 2),
|
|
2962
|
-
e.error ? (p(), v("span", Sa, _(e.error), 1)) : z("", !0)
|
|
2963
|
-
]));
|
|
2964
|
-
}
|
|
2965
|
-
}), Va = ["aria-label"], Ta = { class: "hidden lg:inline" }, La = ["aria-label"], Ea = { class: "flex items-center gap-3 border-b border-gray-200/70 px-4 dark:border-white/10" }, Ba = ["placeholder"], Aa = { class: "max-h-[55vh] overflow-y-auto p-2" }, Da = ["href"], Ia = { class: "min-w-0" }, Ha = { class: "flex flex-wrap items-baseline gap-2" }, ja = { class: "text-sm font-medium text-gray-900 dark:text-white" }, Pa = {
|
|
3057
|
+
}), Ja = ["aria-label"], Za = { class: "hidden lg:inline" }, Xa = ["aria-label"], Ya = { class: "flex items-center gap-3 border-b border-gray-200/70 px-4 dark:border-white/10" }, Qa = ["placeholder"], eo = { class: "max-h-[55vh] overflow-y-auto p-2" }, to = ["href"], no = { class: "min-w-0" }, so = { class: "flex flex-wrap items-baseline gap-2" }, lo = { class: "text-sm font-medium text-gray-900 dark:text-white" }, ao = {
|
|
2966
3058
|
key: 0,
|
|
2967
3059
|
class: "text-[10px] uppercase tracking-wider text-gray-400"
|
|
2968
|
-
},
|
|
3060
|
+
}, oo = {
|
|
2969
3061
|
key: 0,
|
|
2970
3062
|
class: "mt-0.5 block truncate text-xs text-gray-500 dark:text-gray-400"
|
|
2971
|
-
},
|
|
3063
|
+
}, io = {
|
|
2972
3064
|
key: 0,
|
|
2973
3065
|
class: "px-4 py-10 text-center text-sm text-gray-500 dark:text-gray-400"
|
|
2974
|
-
},
|
|
3066
|
+
}, ai = /* @__PURE__ */ S({
|
|
2975
3067
|
__name: "VisionSearch",
|
|
2976
3068
|
props: {
|
|
2977
3069
|
items: {},
|
|
@@ -2981,97 +3073,97 @@ end;`, detail: "event(name: string)" },
|
|
|
2981
3073
|
emptyText: { default: "Ничего не найдено. Попробуйте другой запрос." }
|
|
2982
3074
|
},
|
|
2983
3075
|
setup(e) {
|
|
2984
|
-
const n = e,
|
|
2985
|
-
const
|
|
2986
|
-
return (
|
|
3076
|
+
const n = e, o = M(!1), l = M(""), t = M(null), r = B(() => {
|
|
3077
|
+
const i = l.value.trim().toLowerCase();
|
|
3078
|
+
return (i ? n.items.filter((u) => `${u.title} ${u.description ?? ""} ${u.group ?? ""}`.toLowerCase().includes(i)) : n.items).slice(0, 14);
|
|
2987
3079
|
}), c = async () => {
|
|
2988
|
-
var
|
|
2989
|
-
|
|
3080
|
+
var i;
|
|
3081
|
+
o.value = !0, l.value = "", await je(), (i = t.value) == null || i.focus();
|
|
2990
3082
|
}, d = () => {
|
|
2991
|
-
|
|
2992
|
-
}, m = (
|
|
2993
|
-
if ((
|
|
2994
|
-
|
|
3083
|
+
o.value = !1, l.value = "";
|
|
3084
|
+
}, m = (i) => {
|
|
3085
|
+
if ((i.metaKey || i.ctrlKey) && i.key.toLowerCase() === "k") {
|
|
3086
|
+
i.preventDefault(), o.value ? d() : c();
|
|
2995
3087
|
return;
|
|
2996
3088
|
}
|
|
2997
|
-
|
|
3089
|
+
i.key === "Escape" && o.value && d();
|
|
2998
3090
|
};
|
|
2999
|
-
return
|
|
3000
|
-
typeof document < "u" && (document.body.style.overflow =
|
|
3001
|
-
}),
|
|
3091
|
+
return oe(o, (i) => {
|
|
3092
|
+
typeof document < "u" && (document.body.style.overflow = i ? "hidden" : "");
|
|
3093
|
+
}), ee(() => window.addEventListener("keydown", m)), ke(() => {
|
|
3002
3094
|
window.removeEventListener("keydown", m), typeof document < "u" && (document.body.style.overflow = "");
|
|
3003
|
-
}), (
|
|
3004
|
-
|
|
3095
|
+
}), (i, a) => (f(), v(E, null, [
|
|
3096
|
+
s("button", {
|
|
3005
3097
|
type: "button",
|
|
3006
3098
|
class: "inline-flex h-9 items-center gap-2 rounded-md px-2.5 text-xs text-gray-500 transition-colors hover:bg-white/50 hover:text-[var(--app-accent)] dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-white",
|
|
3007
3099
|
"aria-label": e.label,
|
|
3008
3100
|
onClick: c
|
|
3009
3101
|
}, [
|
|
3010
|
-
g(
|
|
3102
|
+
g(Q, {
|
|
3011
3103
|
name: "search",
|
|
3012
3104
|
size: 17
|
|
3013
3105
|
}),
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
], 8,
|
|
3017
|
-
(
|
|
3018
|
-
|
|
3106
|
+
s("span", Za, x(e.label), 1),
|
|
3107
|
+
a[1] || (a[1] = s("kbd", { class: "hidden rounded border border-gray-300/60 px-1.5 py-0.5 font-mono text-[10px] text-gray-400 dark:border-white/10 dark:text-gray-500 lg:inline" }, "⌘K", -1))
|
|
3108
|
+
], 8, Ja),
|
|
3109
|
+
(f(), I(ot, { to: "body" }, [
|
|
3110
|
+
o.value ? (f(), v("div", {
|
|
3019
3111
|
key: 0,
|
|
3020
3112
|
class: "fixed inset-0 z-[100] flex items-start justify-center overflow-y-auto bg-slate-900/40 px-4 pt-[12vh] backdrop-blur-sm dark:bg-black/60",
|
|
3021
|
-
onClick:
|
|
3113
|
+
onClick: U(d, ["self"])
|
|
3022
3114
|
}, [
|
|
3023
|
-
|
|
3115
|
+
s("div", {
|
|
3024
3116
|
class: "glass-panel w-full max-w-2xl overflow-hidden rounded-[12px] border border-gray-200/70 bg-white/95 dark:border-white/10 dark:bg-[#0b1235]/95",
|
|
3025
3117
|
role: "dialog",
|
|
3026
3118
|
"aria-modal": "true",
|
|
3027
3119
|
"aria-label": e.dialogLabel
|
|
3028
3120
|
}, [
|
|
3029
|
-
|
|
3030
|
-
g(
|
|
3121
|
+
s("div", Ya, [
|
|
3122
|
+
g(Q, {
|
|
3031
3123
|
name: "search",
|
|
3032
3124
|
size: 18,
|
|
3033
3125
|
class: "shrink-0 text-gray-400"
|
|
3034
3126
|
}),
|
|
3035
|
-
|
|
3127
|
+
we(s("input", {
|
|
3036
3128
|
ref_key: "input",
|
|
3037
3129
|
ref: t,
|
|
3038
|
-
"onUpdate:modelValue":
|
|
3130
|
+
"onUpdate:modelValue": a[0] || (a[0] = (u) => l.value = u),
|
|
3039
3131
|
type: "search",
|
|
3040
3132
|
placeholder: e.placeholder,
|
|
3041
3133
|
class: "h-14 min-w-0 flex-1 bg-transparent text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none dark:text-white dark:placeholder:text-gray-500"
|
|
3042
|
-
}, null, 8,
|
|
3043
|
-
[
|
|
3134
|
+
}, null, 8, Qa), [
|
|
3135
|
+
[Ie, l.value]
|
|
3044
3136
|
]),
|
|
3045
|
-
|
|
3137
|
+
a[2] || (a[2] = s("kbd", { class: "hidden rounded border border-gray-300/60 px-1.5 py-0.5 font-mono text-[10px] text-gray-400 dark:border-white/10 dark:text-gray-500 sm:inline" }, "Esc", -1))
|
|
3046
3138
|
]),
|
|
3047
|
-
|
|
3048
|
-
(
|
|
3139
|
+
s("div", eo, [
|
|
3140
|
+
(f(!0), v(E, null, j(r.value, (u) => (f(), v("a", {
|
|
3049
3141
|
key: `${u.group}-${u.to}-${u.title}`,
|
|
3050
3142
|
href: u.to,
|
|
3051
3143
|
class: "flex items-start gap-3 rounded-md px-3 py-2.5 transition-colors hover:bg-white/50 dark:hover:bg-white/5",
|
|
3052
3144
|
onClick: d
|
|
3053
3145
|
}, [
|
|
3054
|
-
g(
|
|
3146
|
+
g(Q, {
|
|
3055
3147
|
name: "arrowRight",
|
|
3056
3148
|
size: 16,
|
|
3057
3149
|
class: "mt-0.5 shrink-0 text-gray-400"
|
|
3058
3150
|
}),
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
u.group ? (
|
|
3151
|
+
s("span", no, [
|
|
3152
|
+
s("span", so, [
|
|
3153
|
+
s("span", lo, x(u.title), 1),
|
|
3154
|
+
u.group ? (f(), v("span", ao, x(u.group), 1)) : T("", !0)
|
|
3063
3155
|
]),
|
|
3064
|
-
u.description ? (
|
|
3156
|
+
u.description ? (f(), v("span", oo, x(u.description), 1)) : T("", !0)
|
|
3065
3157
|
])
|
|
3066
|
-
], 8,
|
|
3067
|
-
r.value.length ?
|
|
3158
|
+
], 8, to))), 128)),
|
|
3159
|
+
r.value.length ? T("", !0) : (f(), v("p", io, x(e.emptyText), 1))
|
|
3068
3160
|
])
|
|
3069
|
-
], 8,
|
|
3070
|
-
])) :
|
|
3161
|
+
], 8, Xa)
|
|
3162
|
+
])) : T("", !0)
|
|
3071
3163
|
]))
|
|
3072
3164
|
], 64));
|
|
3073
3165
|
}
|
|
3074
|
-
}),
|
|
3166
|
+
}), ro = ["aria-label", "title"], oi = /* @__PURE__ */ S({
|
|
3075
3167
|
__name: "VisionThemeToggle",
|
|
3076
3168
|
props: {
|
|
3077
3169
|
labelLight: { default: "Включить светлую тему" },
|
|
@@ -3080,25 +3172,25 @@ end;`, detail: "event(name: string)" },
|
|
|
3080
3172
|
titleDark: { default: "Тёмная тема" }
|
|
3081
3173
|
},
|
|
3082
3174
|
setup(e) {
|
|
3083
|
-
const n =
|
|
3084
|
-
n.value = l,
|
|
3175
|
+
const n = M(gt("theme") === "light" ? "light" : "dark"), o = (l) => {
|
|
3176
|
+
n.value = l, bt(l);
|
|
3085
3177
|
};
|
|
3086
|
-
return
|
|
3087
|
-
await je(), setTimeout(() =>
|
|
3088
|
-
}), (l, t) => (
|
|
3178
|
+
return ee(async () => {
|
|
3179
|
+
await je(), setTimeout(() => o(n.value), 0);
|
|
3180
|
+
}), (l, t) => (f(), v("button", {
|
|
3089
3181
|
type: "button",
|
|
3090
3182
|
class: "grid size-9 place-items-center rounded-md text-gray-600 transition-colors hover:bg-white/50 hover:text-[var(--app-accent)] dark:text-gray-300 dark:hover:bg-white/5 dark:hover:text-white",
|
|
3091
3183
|
"aria-label": n.value === "dark" ? e.labelLight : e.labelDark,
|
|
3092
3184
|
title: n.value === "dark" ? e.titleLight : e.titleDark,
|
|
3093
|
-
onClick: t[0] || (t[0] = (r) =>
|
|
3185
|
+
onClick: t[0] || (t[0] = (r) => o(n.value === "dark" ? "light" : "dark"))
|
|
3094
3186
|
}, [
|
|
3095
|
-
g(
|
|
3187
|
+
g(Q, {
|
|
3096
3188
|
name: n.value === "dark" ? "sun" : "moon",
|
|
3097
3189
|
size: 18
|
|
3098
3190
|
}, null, 8, ["name"])
|
|
3099
|
-
], 8,
|
|
3191
|
+
], 8, ro));
|
|
3100
3192
|
}
|
|
3101
|
-
}),
|
|
3193
|
+
}), ii = /* @__PURE__ */ S({
|
|
3102
3194
|
__name: "VAutocomplete",
|
|
3103
3195
|
props: {
|
|
3104
3196
|
modelValue: { default: "" },
|
|
@@ -3109,14 +3201,14 @@ end;`, detail: "event(name: string)" },
|
|
|
3109
3201
|
},
|
|
3110
3202
|
emits: ["update:modelValue", "select"],
|
|
3111
3203
|
setup(e, { emit: n }) {
|
|
3112
|
-
const
|
|
3113
|
-
r.click(new Event("click")),
|
|
3204
|
+
const o = n, l = (r) => o("update:modelValue", r), t = (r, c) => {
|
|
3205
|
+
r.click(new Event("click")), o("select", c);
|
|
3114
3206
|
};
|
|
3115
|
-
return (r, c) => (
|
|
3207
|
+
return (r, c) => (f(), I(Ne, H(r.$attrs, {
|
|
3116
3208
|
top: "50px",
|
|
3117
3209
|
"hide-on-click": ""
|
|
3118
3210
|
}), {
|
|
3119
|
-
activator:
|
|
3211
|
+
activator: y(({ on: d }) => [
|
|
3120
3212
|
g(J, {
|
|
3121
3213
|
"model-value": e.modelValue,
|
|
3122
3214
|
name: e.name,
|
|
@@ -3126,81 +3218,82 @@ end;`, detail: "event(name: string)" },
|
|
|
3126
3218
|
onClick: d.open
|
|
3127
3219
|
}, null, 8, ["model-value", "name", "message", "label", "onClick"])
|
|
3128
3220
|
]),
|
|
3129
|
-
default:
|
|
3221
|
+
default: y(({ on: d, isLgOrLarger: m }) => [
|
|
3130
3222
|
g(Ce, {
|
|
3131
3223
|
items: e.items,
|
|
3132
|
-
|
|
3224
|
+
plain: !m,
|
|
3225
|
+
onClick: (i) => t(d, i)
|
|
3133
3226
|
}, {
|
|
3134
|
-
default:
|
|
3135
|
-
k(r.$slots, "default", { item:
|
|
3136
|
-
|
|
3227
|
+
default: y(({ item: i }) => [
|
|
3228
|
+
k(r.$slots, "default", { item: i }, () => [
|
|
3229
|
+
D(x(i.name), 1)
|
|
3137
3230
|
])
|
|
3138
3231
|
]),
|
|
3139
3232
|
_: 3
|
|
3140
|
-
}, 8, ["items", "onClick"])
|
|
3233
|
+
}, 8, ["items", "plain", "onClick"])
|
|
3141
3234
|
]),
|
|
3142
3235
|
_: 3
|
|
3143
3236
|
}, 16));
|
|
3144
3237
|
}
|
|
3145
|
-
}),
|
|
3238
|
+
}), co = {
|
|
3146
3239
|
viewBox: "0 0 24 24",
|
|
3147
3240
|
width: "1.2em",
|
|
3148
3241
|
height: "1.2em"
|
|
3149
3242
|
};
|
|
3150
|
-
function
|
|
3151
|
-
return
|
|
3152
|
-
|
|
3243
|
+
function uo(e, n) {
|
|
3244
|
+
return f(), v("svg", co, [...n[0] || (n[0] = [
|
|
3245
|
+
s("path", {
|
|
3153
3246
|
fill: "currentColor",
|
|
3154
3247
|
d: "m12 15l-4.243-4.242l1.415-1.414L12 12.172l2.828-2.828l1.415 1.414z"
|
|
3155
3248
|
}, null, -1)
|
|
3156
3249
|
])]);
|
|
3157
3250
|
}
|
|
3158
|
-
const
|
|
3251
|
+
const mo = O({ name: "ri-arrow-drop-down-line", render: uo }), fo = { class: "v-expansion__content max-h-0 overflow-hidden transition-all duration-300" }, po = { class: "p-4" }, ri = /* @__PURE__ */ S({
|
|
3159
3252
|
__name: "VExpansion",
|
|
3160
3253
|
props: {
|
|
3161
3254
|
label: { default: "" },
|
|
3162
3255
|
value: { type: Boolean, default: !1 }
|
|
3163
3256
|
},
|
|
3164
3257
|
setup(e) {
|
|
3165
|
-
const n =
|
|
3258
|
+
const n = M(null), o = M(e.value), l = () => {
|
|
3166
3259
|
if (!n.value) return;
|
|
3167
3260
|
const r = n.value.querySelector(".v-expansion__content");
|
|
3168
|
-
r && (r.style.maxHeight =
|
|
3261
|
+
r && (r.style.maxHeight = o.value ? `${r.scrollHeight}px` : "0");
|
|
3169
3262
|
}, t = () => {
|
|
3170
|
-
|
|
3263
|
+
o.value = !o.value, l();
|
|
3171
3264
|
};
|
|
3172
|
-
return
|
|
3265
|
+
return ee(() => {
|
|
3173
3266
|
l();
|
|
3174
3267
|
}), (r, c) => {
|
|
3175
|
-
const d =
|
|
3176
|
-
return
|
|
3268
|
+
const d = mo;
|
|
3269
|
+
return f(), v("div", {
|
|
3177
3270
|
ref_key: "root",
|
|
3178
3271
|
ref: n,
|
|
3179
3272
|
class: "glass-inset mb-2 overflow-hidden rounded-md"
|
|
3180
3273
|
}, [
|
|
3181
|
-
|
|
3274
|
+
s("div", {
|
|
3182
3275
|
class: "cursor-pointer min-h-[60px] px-4 flex items-center justify-between",
|
|
3183
3276
|
onClick: t
|
|
3184
3277
|
}, [
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
class:
|
|
3278
|
+
s("h4", null, x(e.label), 1),
|
|
3279
|
+
s("div", {
|
|
3280
|
+
class: z(["transition text-gray-400", { "rotate-x-180": o.value }])
|
|
3188
3281
|
}, [
|
|
3189
3282
|
g(d, { class: "size-6" })
|
|
3190
3283
|
], 2)
|
|
3191
3284
|
]),
|
|
3192
|
-
|
|
3193
|
-
|
|
3285
|
+
s("div", fo, [
|
|
3286
|
+
s("div", po, [
|
|
3194
3287
|
k(r.$slots, "default")
|
|
3195
3288
|
])
|
|
3196
3289
|
])
|
|
3197
3290
|
], 512);
|
|
3198
3291
|
};
|
|
3199
3292
|
}
|
|
3200
|
-
}),
|
|
3293
|
+
}), vo = ["onDragstart", "onDragenter"], ho = {
|
|
3201
3294
|
key: 0,
|
|
3202
3295
|
class: "absolute inset-0 border border-dashed border-blue-600 rounded"
|
|
3203
|
-
},
|
|
3296
|
+
}, di = /* @__PURE__ */ S({
|
|
3204
3297
|
__name: "VDragDrop",
|
|
3205
3298
|
props: {
|
|
3206
3299
|
items: {},
|
|
@@ -3208,29 +3301,29 @@ const Fa = O({ name: "ri-arrow-drop-down-line", render: Ra }), Wa = { class: "v-
|
|
|
3208
3301
|
},
|
|
3209
3302
|
emits: ["update:items", "order-change"],
|
|
3210
3303
|
setup(e, { emit: n }) {
|
|
3211
|
-
const
|
|
3304
|
+
const o = n, l = M(null), t = M(0), r = M(-1), c = ({ id: u }) => ({
|
|
3212
3305
|
"opacity-30 scale-105 z-10": l.value === u,
|
|
3213
3306
|
"transition-transform duration-200": l.value !== u
|
|
3214
|
-
}), d = (u,
|
|
3215
|
-
l.value =
|
|
3307
|
+
}), d = (u, p, b) => {
|
|
3308
|
+
l.value = p, t.value = b, u.dataTransfer.effectAllowed = "move";
|
|
3216
3309
|
}, m = (u) => {
|
|
3217
3310
|
l.value !== null && (r.value = u);
|
|
3218
|
-
},
|
|
3311
|
+
}, i = () => {
|
|
3219
3312
|
l.value = null, r.value = -1;
|
|
3220
|
-
},
|
|
3313
|
+
}, a = (u) => {
|
|
3221
3314
|
if (u.preventDefault(), l.value && r.value !== -1) {
|
|
3222
|
-
const
|
|
3223
|
-
if (
|
|
3224
|
-
const h = [...e.items], [
|
|
3225
|
-
h.splice(b, 0,
|
|
3315
|
+
const p = e.items.findIndex((h) => h[e.itemKey] === l.value), b = r.value;
|
|
3316
|
+
if (p !== b && b !== -1) {
|
|
3317
|
+
const h = [...e.items], [_] = h.splice(p, 1);
|
|
3318
|
+
h.splice(b, 0, _), o("update:items", h), o("order-change", { fromIndex: p, toIndex: b, movedItem: _, newOrder: h });
|
|
3226
3319
|
}
|
|
3227
3320
|
}
|
|
3228
3321
|
r.value = -1;
|
|
3229
3322
|
};
|
|
3230
|
-
return (u,
|
|
3231
|
-
onDragover:
|
|
3323
|
+
return (u, p) => (f(), v("div", {
|
|
3324
|
+
onDragover: p[1] || (p[1] = U(() => {
|
|
3232
3325
|
}, ["prevent"])),
|
|
3233
|
-
onDrop:
|
|
3326
|
+
onDrop: a
|
|
3234
3327
|
}, [
|
|
3235
3328
|
g(De, {
|
|
3236
3329
|
"enter-active-class": "transition-all duration-300 ease",
|
|
@@ -3241,15 +3334,15 @@ const Fa = O({ name: "ri-arrow-drop-down-line", render: Ra }), Wa = { class: "v-
|
|
|
3241
3334
|
"leave-to-class": "opacity-0 translate-x-8",
|
|
3242
3335
|
"move-class": "transition-all duration-300 ease"
|
|
3243
3336
|
}, {
|
|
3244
|
-
default:
|
|
3245
|
-
(
|
|
3337
|
+
default: y(() => [
|
|
3338
|
+
(f(!0), v(E, null, j(e.items, (b, h) => (f(), v("div", {
|
|
3246
3339
|
key: `${b.id}_drug`,
|
|
3247
|
-
class:
|
|
3340
|
+
class: z(["relative group", c(b)]),
|
|
3248
3341
|
draggable: "true",
|
|
3249
|
-
onDragstart: (
|
|
3250
|
-
onDragenter: (
|
|
3251
|
-
onDragend:
|
|
3252
|
-
onDragover:
|
|
3342
|
+
onDragstart: (_) => d(_, b.id, h),
|
|
3343
|
+
onDragenter: (_) => m(h),
|
|
3344
|
+
onDragend: i,
|
|
3345
|
+
onDragover: p[0] || (p[0] = U(() => {
|
|
3253
3346
|
}, ["prevent"]))
|
|
3254
3347
|
}, [
|
|
3255
3348
|
k(u.$slots, "default", {
|
|
@@ -3258,17 +3351,17 @@ const Fa = O({ name: "ri-arrow-drop-down-line", render: Ra }), Wa = { class: "v-
|
|
|
3258
3351
|
index: h,
|
|
3259
3352
|
isDragging: l.value === b.id
|
|
3260
3353
|
}),
|
|
3261
|
-
r.value === h && l.value !== b.id ? (
|
|
3262
|
-
], 42,
|
|
3354
|
+
r.value === h && l.value !== b.id ? (f(), v("div", ho)) : T("", !0)
|
|
3355
|
+
], 42, vo))), 128))
|
|
3263
3356
|
]),
|
|
3264
3357
|
_: 3
|
|
3265
3358
|
})
|
|
3266
3359
|
], 32));
|
|
3267
3360
|
}
|
|
3268
|
-
}),
|
|
3361
|
+
}), go = { class: "glass-inset overflow-x-auto rounded-md" }, bo = { class: "min-w-full" }, yo = { class: "border-y border-gray-200/70 py-3 dark:border-white/10" }, xo = { class: "bg-gray-100/70 dark:bg-white/[0.04]" }, _o = { class: "flex items-center" }, $o = { class: "divide-y divide-gray-100 dark:divide-white/5" }, ko = ["onClick"], wo = { class: "flex items-center text-gray-700 dark:text-white/70" }, Co = { key: 1 }, So = {
|
|
3269
3362
|
class: "py-3 whitespace-nowrap",
|
|
3270
3363
|
colspan: "9"
|
|
3271
|
-
},
|
|
3364
|
+
}, zo = { class: "flex items-center justify-center px-2 text-sm text-gray-500 dark:text-white/50" }, ci = /* @__PURE__ */ S({
|
|
3272
3365
|
__name: "VTable",
|
|
3273
3366
|
props: {
|
|
3274
3367
|
headers: { default: () => [] },
|
|
@@ -3276,48 +3369,48 @@ const Fa = O({ name: "ri-arrow-drop-down-line", render: Ra }), Wa = { class: "v-
|
|
|
3276
3369
|
},
|
|
3277
3370
|
emits: ["click"],
|
|
3278
3371
|
setup(e, { emit: n }) {
|
|
3279
|
-
const
|
|
3280
|
-
return (c, d) => (
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
(
|
|
3285
|
-
key:
|
|
3286
|
-
class:
|
|
3372
|
+
const o = n, l = (c, d) => o("click", c, d), t = (c) => (c == null ? void 0 : c.className) || "", r = (c, { key: d }) => c == null ? void 0 : c[d];
|
|
3373
|
+
return (c, d) => (f(), v("div", go, [
|
|
3374
|
+
s("table", bo, [
|
|
3375
|
+
s("thead", yo, [
|
|
3376
|
+
s("tr", xo, [
|
|
3377
|
+
(f(!0), v(E, null, j(e.headers, (m, i) => (f(), v("th", {
|
|
3378
|
+
key: i,
|
|
3379
|
+
class: z(["px-4 py-2 whitespace-nowrap font-normal text-gray-500 dark:text-white/50", t(m)])
|
|
3287
3380
|
}, [
|
|
3288
3381
|
k(c.$slots, "header", {
|
|
3289
3382
|
item: m,
|
|
3290
|
-
i
|
|
3383
|
+
i
|
|
3291
3384
|
}, () => [
|
|
3292
|
-
|
|
3385
|
+
s("div", _o, x(m.name), 1)
|
|
3293
3386
|
])
|
|
3294
3387
|
], 2))), 128))
|
|
3295
3388
|
])
|
|
3296
3389
|
]),
|
|
3297
|
-
|
|
3298
|
-
e.items.length ? (
|
|
3299
|
-
key:
|
|
3390
|
+
s("tbody", $o, [
|
|
3391
|
+
e.items.length ? (f(!0), v(E, { key: 0 }, j(e.items, (m, i) => (f(), v("tr", {
|
|
3392
|
+
key: i,
|
|
3300
3393
|
class: "transition-colors hover:bg-primary/[0.04] dark:hover:bg-white/[0.04]",
|
|
3301
|
-
onClick: (
|
|
3394
|
+
onClick: (a) => l(m, a)
|
|
3302
3395
|
}, [
|
|
3303
|
-
(
|
|
3396
|
+
(f(!0), v(E, null, j(e.headers, (a, u) => (f(), v("td", {
|
|
3304
3397
|
key: u,
|
|
3305
3398
|
class: "py-2 px-4"
|
|
3306
3399
|
}, [
|
|
3307
|
-
|
|
3308
|
-
k(c.$slots,
|
|
3400
|
+
s("div", wo, [
|
|
3401
|
+
k(c.$slots, a.key, {
|
|
3309
3402
|
item: m,
|
|
3310
|
-
i
|
|
3403
|
+
i
|
|
3311
3404
|
}, () => [
|
|
3312
|
-
|
|
3405
|
+
D(x(r(m, a)), 1)
|
|
3313
3406
|
])
|
|
3314
3407
|
])
|
|
3315
3408
|
]))), 128))
|
|
3316
|
-
], 8,
|
|
3317
|
-
|
|
3318
|
-
|
|
3409
|
+
], 8, ko))), 128)) : (f(), v("tr", Co, [
|
|
3410
|
+
s("td", So, [
|
|
3411
|
+
s("div", zo, [
|
|
3319
3412
|
k(c.$slots, "empty", {}, () => [
|
|
3320
|
-
d[0] || (d[0] =
|
|
3413
|
+
d[0] || (d[0] = D("The list is empty", -1))
|
|
3321
3414
|
])
|
|
3322
3415
|
])
|
|
3323
3416
|
])
|
|
@@ -3326,31 +3419,31 @@ const Fa = O({ name: "ri-arrow-drop-down-line", render: Ra }), Wa = { class: "v-
|
|
|
3326
3419
|
])
|
|
3327
3420
|
]));
|
|
3328
3421
|
}
|
|
3329
|
-
}),
|
|
3422
|
+
}), ui = /* @__PURE__ */ S({
|
|
3330
3423
|
__name: "VTooltip",
|
|
3331
3424
|
props: {
|
|
3332
3425
|
timeout: {},
|
|
3333
3426
|
disabled: { type: Boolean }
|
|
3334
3427
|
},
|
|
3335
3428
|
setup(e) {
|
|
3336
|
-
const n =
|
|
3429
|
+
const n = M(!1), o = () => {
|
|
3337
3430
|
e.disabled || (n.value = !0);
|
|
3338
3431
|
}, l = () => {
|
|
3339
3432
|
n.value = !1;
|
|
3340
|
-
}, t =
|
|
3341
|
-
return
|
|
3433
|
+
}, t = Pe("tooltip");
|
|
3434
|
+
return xt(t, () => l()), (r, c) => (f(), v("div", {
|
|
3342
3435
|
ref: "tooltip",
|
|
3343
3436
|
class: "relative v-tooltip",
|
|
3344
|
-
onMouseenter:
|
|
3437
|
+
onMouseenter: o,
|
|
3345
3438
|
onMouseleave: l
|
|
3346
3439
|
}, [
|
|
3347
|
-
|
|
3440
|
+
s("button", {
|
|
3348
3441
|
type: "button",
|
|
3349
|
-
onClick:
|
|
3442
|
+
onClick: o
|
|
3350
3443
|
}, [
|
|
3351
3444
|
k(r.$slots, "activator")
|
|
3352
3445
|
]),
|
|
3353
|
-
g(
|
|
3446
|
+
g($e, {
|
|
3354
3447
|
"enter-active-class": "duration-300 ease-out",
|
|
3355
3448
|
"enter-from-class": "transform opacity-0 -translate-y-2",
|
|
3356
3449
|
"enter-to-class": "opacity-100 translate-y-0",
|
|
@@ -3358,7 +3451,7 @@ const Fa = O({ name: "ri-arrow-drop-down-line", render: Ra }), Wa = { class: "v-
|
|
|
3358
3451
|
"leave-from-class": "opacity-100 translate-y-0",
|
|
3359
3452
|
"leave-to-class": "transform opacity-0 -translate-y-2"
|
|
3360
3453
|
}, {
|
|
3361
|
-
default:
|
|
3454
|
+
default: y(() => [
|
|
3362
3455
|
k(r.$slots, "default", { show: n.value })
|
|
3363
3456
|
]),
|
|
3364
3457
|
_: 3
|
|
@@ -3367,58 +3460,57 @@ const Fa = O({ name: "ri-arrow-drop-down-line", render: Ra }), Wa = { class: "v-
|
|
|
3367
3460
|
}
|
|
3368
3461
|
});
|
|
3369
3462
|
export {
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3463
|
+
Po as AppAside,
|
|
3464
|
+
Io as AppHeader,
|
|
3465
|
+
No as AppNav,
|
|
3466
|
+
jo as AppNotification,
|
|
3467
|
+
Ho as AppOverlay,
|
|
3468
|
+
Oo as AppProgress,
|
|
3469
|
+
qo as BlockBreadcrumb,
|
|
3470
|
+
Fo as BlockInfo,
|
|
3471
|
+
Ko as BlockScan,
|
|
3472
|
+
Ro as BlockService,
|
|
3473
|
+
Uo as BlockStatus,
|
|
3474
|
+
Wo as BlockUpdate,
|
|
3475
|
+
ie as CardBase,
|
|
3476
|
+
Jo as CardButton,
|
|
3477
|
+
Zo as CardDate,
|
|
3478
|
+
Xo as CardDimmer,
|
|
3479
|
+
Yo as CardInfo,
|
|
3480
|
+
Qo as CardInput,
|
|
3481
|
+
ei as CardList,
|
|
3482
|
+
ut as CardMain,
|
|
3483
|
+
Yt as CardNotification,
|
|
3484
|
+
Na as DEFAULT_SUGGESTIONS,
|
|
3485
|
+
Go as EnergyFlowBlock,
|
|
3486
|
+
ti as ItemEdit,
|
|
3487
|
+
li as ScriptDialog,
|
|
3488
|
+
ni as ScriptEditor,
|
|
3489
|
+
si as ScriptViewDocs,
|
|
3490
|
+
ii as VAutocomplete,
|
|
3397
3491
|
A as VButton,
|
|
3398
|
-
|
|
3492
|
+
Yl as VCheckbox,
|
|
3399
3493
|
Oe as VDialog,
|
|
3400
|
-
|
|
3494
|
+
di as VDragDrop,
|
|
3401
3495
|
Ne as VDropdown,
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3496
|
+
ri as VExpansion,
|
|
3497
|
+
rs as VFile,
|
|
3498
|
+
be as VFunc,
|
|
3499
|
+
He as VIconLogo,
|
|
3500
|
+
it as VIconLogoMini,
|
|
3407
3501
|
Ce as VList,
|
|
3408
3502
|
We as VListObject,
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3503
|
+
ct as VLoader,
|
|
3504
|
+
pi as VPopup,
|
|
3505
|
+
ae as VSelect,
|
|
3506
|
+
ci as VTable,
|
|
3507
|
+
Ul as VTabs,
|
|
3414
3508
|
J as VTextField,
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
Oo as VisionThemeToggle,
|
|
3423
|
-
ua as fullHighlighter
|
|
3509
|
+
Ue as VTextWrapper,
|
|
3510
|
+
ui as VTooltip,
|
|
3511
|
+
dt as VWifiIcon,
|
|
3512
|
+
Q as VisionIcon,
|
|
3513
|
+
ai as VisionSearch,
|
|
3514
|
+
oi as VisionThemeToggle,
|
|
3515
|
+
Ia as fullHighlighter
|
|
3424
3516
|
};
|