nicklabs-ui 1.0.79 → 1.0.81
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/index.mjs +1130 -796
- package/dist/nicklabs-ui.css +1 -1
- package/dist/src/components/NAudioSelect.vue.d.ts +1 -0
- package/dist/src/components/NFileSelect.vue.d.ts +20 -11
- package/dist/src/components/NImageSelect.vue.d.ts +1 -0
- package/dist/src/components/NVideoSelect.vue.d.ts +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/types/components/audioselect.d.ts +4 -4
- package/dist/src/types/components/fileselect.d.ts +12 -0
- package/dist/src/types/components/imageselect.d.ts +5 -5
- package/dist/src/types/components/videoselect.d.ts +6 -6
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, Transition as n, TransitionGroup as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createStaticVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, onUnmounted as b, openBlock as x, reactive as S, ref as C, renderList as w, renderSlot as T, toDisplayString as E, unref as D, useCssVars as O, vModelText as k, watch as A, withCtx as j, withDirectives as M, withModifiers as N } from "vue";
|
|
2
2
|
//#region src/composables/sharedRouter.ts
|
|
3
3
|
var P = null;
|
|
4
|
-
function
|
|
4
|
+
function F(e) {
|
|
5
5
|
P = e;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function I() {
|
|
8
8
|
return P;
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/components/NButton.vue?vue&type=script&setup=true&lang.ts
|
|
12
|
-
var
|
|
12
|
+
var ee = ["type", "disabled"], te = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "spinner",
|
|
15
15
|
viewBox: "0 0 24 24",
|
|
16
16
|
fill: "none",
|
|
17
17
|
xmlns: "http://www.w3.org/2000/svg"
|
|
18
|
-
},
|
|
18
|
+
}, L = /* @__PURE__ */ p({
|
|
19
19
|
__name: "NButton",
|
|
20
20
|
props: {
|
|
21
21
|
variant: { default: "none" },
|
|
@@ -63,7 +63,7 @@ var I = ["type", "disabled"], L = {
|
|
|
63
63
|
]),
|
|
64
64
|
type: e.type,
|
|
65
65
|
disabled: e.disabled || e.loading
|
|
66
|
-
}, [e.loading ? (x(), s("svg",
|
|
66
|
+
}, [e.loading ? (x(), s("svg", te, [...n[0] ||= [c("circle", {
|
|
67
67
|
cx: "12",
|
|
68
68
|
cy: "12",
|
|
69
69
|
r: "10",
|
|
@@ -72,13 +72,13 @@ var I = ["type", "disabled"], L = {
|
|
|
72
72
|
"stroke-linecap": "round",
|
|
73
73
|
"stroke-dasharray": "32",
|
|
74
74
|
"stroke-dashoffset": "12"
|
|
75
|
-
}, null, -1)]])) : o("", !0), T(t.$slots, "default", {}, void 0, !0)], 10,
|
|
75
|
+
}, null, -1)]])) : o("", !0), T(t.$slots, "default", {}, void 0, !0)], 10, ee));
|
|
76
76
|
}
|
|
77
77
|
}), R = (e, t) => {
|
|
78
78
|
let n = e.__vccOpts || e;
|
|
79
79
|
for (let [e, r] of t) n[e] = r;
|
|
80
80
|
return n;
|
|
81
|
-
}, z = /* @__PURE__ */ R(
|
|
81
|
+
}, z = /* @__PURE__ */ R(L, [["__scopeId", "data-v-285afe14"]]), B = (e) => e.meta?.breadcrumb ?? "", V = C((e) => e);
|
|
82
82
|
function H() {
|
|
83
83
|
function e(e) {
|
|
84
84
|
B = e;
|
|
@@ -87,7 +87,7 @@ function H() {
|
|
|
87
87
|
V.value = e;
|
|
88
88
|
}
|
|
89
89
|
let n = i(() => {
|
|
90
|
-
let e =
|
|
90
|
+
let e = I();
|
|
91
91
|
if (!e) return [];
|
|
92
92
|
let t = e.currentRoute.value.matched, n = [];
|
|
93
93
|
return t.forEach((e, r) => {
|
|
@@ -101,7 +101,7 @@ function H() {
|
|
|
101
101
|
}), n;
|
|
102
102
|
});
|
|
103
103
|
function r(e) {
|
|
104
|
-
|
|
104
|
+
I()?.push(e);
|
|
105
105
|
}
|
|
106
106
|
function a() {
|
|
107
107
|
V.value = (e) => e;
|
|
@@ -132,7 +132,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
132
132
|
}), [["__scopeId", "data-v-46f3b63f"]]), G = {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "label"
|
|
135
|
-
},
|
|
135
|
+
}, K = ["disabled"], ie = [
|
|
136
136
|
"type",
|
|
137
137
|
"placeholder",
|
|
138
138
|
"disabled",
|
|
@@ -140,10 +140,10 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
140
140
|
"value",
|
|
141
141
|
"maxlength",
|
|
142
142
|
"autocomplete"
|
|
143
|
-
],
|
|
143
|
+
], q = ["disabled"], ae = {
|
|
144
144
|
key: 2,
|
|
145
145
|
class: "actions"
|
|
146
|
-
},
|
|
146
|
+
}, oe = {
|
|
147
147
|
key: 0,
|
|
148
148
|
xmlns: "http://www.w3.org/2000/svg",
|
|
149
149
|
width: "16",
|
|
@@ -154,7 +154,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
154
154
|
"stroke-width": "2",
|
|
155
155
|
"stroke-linecap": "round",
|
|
156
156
|
"stroke-linejoin": "round"
|
|
157
|
-
},
|
|
157
|
+
}, se = {
|
|
158
158
|
key: 1,
|
|
159
159
|
xmlns: "http://www.w3.org/2000/svg",
|
|
160
160
|
width: "16",
|
|
@@ -165,7 +165,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
165
165
|
"stroke-width": "2",
|
|
166
166
|
"stroke-linecap": "round",
|
|
167
167
|
"stroke-linejoin": "round"
|
|
168
|
-
},
|
|
168
|
+
}, ce = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
169
169
|
__name: "NInput",
|
|
170
170
|
props: {
|
|
171
171
|
modelValue: { default: "" },
|
|
@@ -292,7 +292,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
292
292
|
"stroke-width": "2",
|
|
293
293
|
"stroke-linecap": "round",
|
|
294
294
|
"stroke-linejoin": "round"
|
|
295
|
-
}, [c("path", { d: "M5 12h14" })], -1)]], 8,
|
|
295
|
+
}, [c("path", { d: "M5 12h14" })], -1)]], 8, K)) : o("", !0),
|
|
296
296
|
c("input", {
|
|
297
297
|
type: u.value,
|
|
298
298
|
placeholder: e.placeholder,
|
|
@@ -307,7 +307,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
307
307
|
onChange: i[1] ||= (e) => n("change", e),
|
|
308
308
|
onKeydown: h,
|
|
309
309
|
onCompositionend: _
|
|
310
|
-
}, null, 40,
|
|
310
|
+
}, null, 40, ie),
|
|
311
311
|
a.value ? (x(), s("button", {
|
|
312
312
|
key: 1,
|
|
313
313
|
class: "tool-button",
|
|
@@ -324,18 +324,18 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
324
324
|
"stroke-width": "2",
|
|
325
325
|
"stroke-linecap": "round",
|
|
326
326
|
"stroke-linejoin": "round"
|
|
327
|
-
}, [c("path", { d: "M5 12h14" }), c("path", { d: "M12 5v14" })], -1)]], 8,
|
|
328
|
-
a.value ? o("", !0) : (x(), s("div",
|
|
327
|
+
}, [c("path", { d: "M5 12h14" }), c("path", { d: "M12 5v14" })], -1)]], 8, q)) : o("", !0),
|
|
328
|
+
a.value ? o("", !0) : (x(), s("div", ae, [r.value && !e.disabled ? (x(), s("button", {
|
|
329
329
|
key: 0,
|
|
330
330
|
type: "button",
|
|
331
331
|
onClick: T,
|
|
332
332
|
"aria-label": "Toggle password visibility"
|
|
333
|
-
}, [l.value ? (x(), s("svg",
|
|
333
|
+
}, [l.value ? (x(), s("svg", se, [...i[5] ||= [
|
|
334
334
|
c("path", { d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }, null, -1),
|
|
335
335
|
c("path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }, null, -1),
|
|
336
336
|
c("path", { d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }, null, -1),
|
|
337
337
|
c("path", { d: "m2 2 20 20" }, null, -1)
|
|
338
|
-
]])) : (x(), s("svg",
|
|
338
|
+
]])) : (x(), s("svg", oe, [...i[4] ||= [c("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }, null, -1), c("circle", {
|
|
339
339
|
cx: "12",
|
|
340
340
|
cy: "12",
|
|
341
341
|
r: "3"
|
|
@@ -357,7 +357,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
357
357
|
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]])) : o("", !0)]))
|
|
358
358
|
], 2)], 2));
|
|
359
359
|
}
|
|
360
|
-
}), [["__scopeId", "data-v-91e7a17e"]]),
|
|
360
|
+
}), [["__scopeId", "data-v-91e7a17e"]]), le = { class: "textarea" }, ue = ["textContent"], de = [
|
|
361
361
|
"rows",
|
|
362
362
|
"placeholder",
|
|
363
363
|
"disabled",
|
|
@@ -366,10 +366,10 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
366
366
|
"maxlength",
|
|
367
367
|
"autocomplete",
|
|
368
368
|
"wrap"
|
|
369
|
-
],
|
|
369
|
+
], fe = {
|
|
370
370
|
key: 1,
|
|
371
371
|
class: "char-count"
|
|
372
|
-
},
|
|
372
|
+
}, pe = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
373
373
|
__name: "NTextarea",
|
|
374
374
|
props: {
|
|
375
375
|
modelValue: { default: "" },
|
|
@@ -419,12 +419,12 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
419
419
|
};
|
|
420
420
|
return y(() => {
|
|
421
421
|
e.autofocus && r.value?.focus();
|
|
422
|
-
}), (t, i) => (x(), s("div",
|
|
422
|
+
}), (t, i) => (x(), s("div", le, [
|
|
423
423
|
e.title ? (x(), s("label", {
|
|
424
424
|
key: 0,
|
|
425
425
|
class: "label",
|
|
426
426
|
textContent: E(e.title)
|
|
427
|
-
}, null, 8,
|
|
427
|
+
}, null, 8, ue)) : o("", !0),
|
|
428
428
|
c("textarea", {
|
|
429
429
|
ref_key: "textareaRef",
|
|
430
430
|
ref: r,
|
|
@@ -443,17 +443,17 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
443
443
|
onChange: i[2] ||= (e) => n("change", e),
|
|
444
444
|
onKeydown: i[3] ||= (e) => n("keydown", e),
|
|
445
445
|
onPaste: i[4] ||= (e) => n("paste", e)
|
|
446
|
-
}, null, 40,
|
|
447
|
-
e.showCount ? (x(), s("div",
|
|
446
|
+
}, null, 40, de),
|
|
447
|
+
e.showCount ? (x(), s("div", fe, E(u.value), 1)) : o("", !0)
|
|
448
448
|
]));
|
|
449
449
|
}
|
|
450
|
-
}), [["__scopeId", "data-v-03ad19c3"]]),
|
|
450
|
+
}), [["__scopeId", "data-v-03ad19c3"]]), me = {
|
|
451
451
|
key: 0,
|
|
452
452
|
class: "label"
|
|
453
|
-
},
|
|
453
|
+
}, he = ["onClick"], ge = ["checked", "disabled"], _e = { class: "text" }, ve = ["checked", "disabled"], J = {
|
|
454
454
|
key: 0,
|
|
455
455
|
class: "text"
|
|
456
|
-
},
|
|
456
|
+
}, ye = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
457
457
|
__name: "NCheckbox",
|
|
458
458
|
props: {
|
|
459
459
|
modelValue: { default: !1 },
|
|
@@ -517,7 +517,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
517
517
|
};
|
|
518
518
|
return y(() => {
|
|
519
519
|
t.autofocus || a.value?.focus();
|
|
520
|
-
}), (n, r) => (x(), s("div", { class: g(["checkbox", { inline: t.inline }]) }, [t.title ? (x(), s("h3",
|
|
520
|
+
}), (n, r) => (x(), s("div", { class: g(["checkbox", { inline: t.inline }]) }, [t.title ? (x(), s("h3", me, E(t.title), 1)) : o("", !0), c("div", { class: g(["group", [t.direction]]) }, [l.value ? (x(), s("label", {
|
|
521
521
|
key: 1,
|
|
522
522
|
class: "item",
|
|
523
523
|
onClick: r[0] ||= N((e) => h(), ["prevent"])
|
|
@@ -526,7 +526,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
526
526
|
type: "checkbox",
|
|
527
527
|
checked: !!t.modelValue,
|
|
528
528
|
disabled: t.disabled
|
|
529
|
-
}, null, 8,
|
|
529
|
+
}, null, 8, ve),
|
|
530
530
|
r[2] ||= c("span", { class: "icon" }, [c("svg", {
|
|
531
531
|
xmlns: "http://www.w3.org/2000/svg",
|
|
532
532
|
width: "24",
|
|
@@ -538,7 +538,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
538
538
|
"stroke-linecap": "round",
|
|
539
539
|
"stroke-linejoin": "round"
|
|
540
540
|
}, [c("path", { d: "M20 6 9 17l-5-5" })])], -1),
|
|
541
|
-
n.$slots.default || t.label ? (x(), s("span",
|
|
541
|
+
n.$slots.default || t.label ? (x(), s("span", J, [T(n.$slots, "default", {}, () => [d(E(t.label), 1)], !0)])) : o("", !0)
|
|
542
542
|
])) : (x(!0), s(e, { key: 0 }, w(t.options, (e, n) => (x(), s("label", {
|
|
543
543
|
key: `${t.formatLabel(e)}${n}`,
|
|
544
544
|
class: "item",
|
|
@@ -548,7 +548,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
548
548
|
type: "checkbox",
|
|
549
549
|
checked: m(t.formatValue(e)),
|
|
550
550
|
disabled: t.disabled
|
|
551
|
-
}, null, 8,
|
|
551
|
+
}, null, 8, ge),
|
|
552
552
|
c("span", { class: g(["icon", { radio: !t.multiple }]) }, [...r[1] ||= [c("svg", {
|
|
553
553
|
xmlns: "http://www.w3.org/2000/svg",
|
|
554
554
|
width: "24",
|
|
@@ -560,13 +560,13 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
560
560
|
"stroke-linecap": "round",
|
|
561
561
|
"stroke-linejoin": "round"
|
|
562
562
|
}, [c("path", { d: "M20 6 9 17l-5-5" })], -1)]], 2),
|
|
563
|
-
c("span",
|
|
564
|
-
], 8,
|
|
563
|
+
c("span", _e, E(t.formatLabel(e)), 1)
|
|
564
|
+
], 8, he))), 128))], 2)], 2));
|
|
565
565
|
}
|
|
566
|
-
}), [["__scopeId", "data-v-1f6a325a"]]),
|
|
566
|
+
}), [["__scopeId", "data-v-1f6a325a"]]), be = { class: "select" }, Y = {
|
|
567
567
|
key: 0,
|
|
568
568
|
class: "label"
|
|
569
|
-
},
|
|
569
|
+
}, X = { class: "select-chips-container" }, xe = ["textContent"], Se = ["onClick"], Z = {
|
|
570
570
|
key: 0,
|
|
571
571
|
class: "search-box"
|
|
572
572
|
}, Ce = { class: "options" }, we = ["onClick"], Te = {
|
|
@@ -664,7 +664,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
664
664
|
let e = Object.keys(p.value), n = e.length;
|
|
665
665
|
return n === 0 ? "" : t.multiple ? `已選 ${n} 項` : t.formatLabel(p.value[e[0]]) ?? "";
|
|
666
666
|
});
|
|
667
|
-
return (n, r) => (x(), s("div",
|
|
667
|
+
return (n, r) => (x(), s("div", be, [t.title ? (x(), s("label", Y, E(t.title), 1)) : o("", !0), c("div", {
|
|
668
668
|
ref_key: "selectGroupRef",
|
|
669
669
|
ref: d,
|
|
670
670
|
class: g(["group", {
|
|
@@ -675,11 +675,11 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
675
675
|
class: g(["trigger", { disabled: t.disabled }]),
|
|
676
676
|
onClick: _
|
|
677
677
|
}, [
|
|
678
|
-
c("div",
|
|
678
|
+
c("div", X, [!m.value || !t.multiple || t.multiple && t.multipleDisplay === "count" ? (x(), s("span", {
|
|
679
679
|
key: 0,
|
|
680
680
|
class: g(["trigger-text", { placeholder: !m.value }]),
|
|
681
681
|
textContent: E(m.value ? j.value : t.placeholder)
|
|
682
|
-
}, null, 10,
|
|
682
|
+
}, null, 10, xe)) : o("", !0), t.multiple && t.multipleDisplay === "tags" ? (x(!0), s(e, { key: 1 }, w(p.value, (e, n) => (x(), s("div", {
|
|
683
683
|
key: `${t.formatLabel(e)}${n}`,
|
|
684
684
|
class: "select-chip"
|
|
685
685
|
}, [c("span", null, E(t.formatLabel(e)), 1), c("span", {
|
|
@@ -695,7 +695,7 @@ var U = { class: "breadcrumbs" }, W = ["onClick"], ne = {
|
|
|
695
695
|
"stroke-width": "2",
|
|
696
696
|
"stroke-linecap": "round",
|
|
697
697
|
"stroke-linejoin": "round"
|
|
698
|
-
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]], 8,
|
|
698
|
+
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]], 8, Se)]))), 128)) : o("", !0)]),
|
|
699
699
|
t.clearable && m.value && !t.disabled ? (x(), s("button", {
|
|
700
700
|
key: 0,
|
|
701
701
|
class: "clear-btn",
|
|
@@ -1017,52 +1017,189 @@ var bt = {
|
|
|
1017
1017
|
e > 0 && window.clearTimeout(e), e = window.setTimeout(t, n);
|
|
1018
1018
|
};
|
|
1019
1019
|
})() }
|
|
1020
|
-
}, It =
|
|
1020
|
+
}, It = 0, Lt = S([]);
|
|
1021
|
+
function Rt() {
|
|
1022
|
+
let e = function(e, t = {}) {
|
|
1023
|
+
let n = ++It;
|
|
1024
|
+
return new Promise((r) => {
|
|
1025
|
+
Lt.push({
|
|
1026
|
+
id: n,
|
|
1027
|
+
type: "alert",
|
|
1028
|
+
message: e,
|
|
1029
|
+
resolve: () => r(),
|
|
1030
|
+
status: t.status ?? "info",
|
|
1031
|
+
title: t.title ?? "",
|
|
1032
|
+
confirmText: t.confirmText ?? "確定"
|
|
1033
|
+
});
|
|
1034
|
+
});
|
|
1035
|
+
};
|
|
1036
|
+
e.success = (t, n = {}) => e(t, {
|
|
1037
|
+
...n,
|
|
1038
|
+
status: "success"
|
|
1039
|
+
}), e.warning = (t, n = {}) => e(t, {
|
|
1040
|
+
...n,
|
|
1041
|
+
status: "warning"
|
|
1042
|
+
}), e.danger = (t, n = {}) => e(t, {
|
|
1043
|
+
...n,
|
|
1044
|
+
status: "danger"
|
|
1045
|
+
}), e.info = (t, n = {}) => e(t, {
|
|
1046
|
+
...n,
|
|
1047
|
+
status: "info"
|
|
1048
|
+
});
|
|
1049
|
+
function t(e, t = {}) {
|
|
1050
|
+
return new Promise((n) => {
|
|
1051
|
+
let r = ++It;
|
|
1052
|
+
Lt.push({
|
|
1053
|
+
id: r,
|
|
1054
|
+
type: "confirm",
|
|
1055
|
+
message: e,
|
|
1056
|
+
resolve: n,
|
|
1057
|
+
status: t.status ?? "question",
|
|
1058
|
+
title: t.title ?? "",
|
|
1059
|
+
confirmText: t.confirmText ?? "確定",
|
|
1060
|
+
cancelText: t.cancelText ?? "取消"
|
|
1061
|
+
});
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
function n() {
|
|
1065
|
+
for (; Lt.length > 0;) Lt.shift().resolve(!1);
|
|
1066
|
+
}
|
|
1067
|
+
return {
|
|
1068
|
+
alerts: Lt,
|
|
1069
|
+
alert: e,
|
|
1070
|
+
confirm: t,
|
|
1071
|
+
clearAlerts: n
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
//#endregion
|
|
1075
|
+
//#region src/components/NFileSelect.vue?vue&type=script&setup=true&lang.ts
|
|
1076
|
+
var zt = {
|
|
1077
|
+
key: 0,
|
|
1078
|
+
class: "head"
|
|
1079
|
+
}, Bt = ["textContent"], Vt = {
|
|
1080
|
+
key: 1,
|
|
1081
|
+
class: "count-chip"
|
|
1082
|
+
}, Ht = ["aria-disabled"], Ut = { class: "text" }, Wt = ["textContent"], Gt = ["textContent"], Kt = {
|
|
1083
|
+
key: 2,
|
|
1084
|
+
class: "list"
|
|
1085
|
+
}, qt = { class: "meta" }, Jt = ["title"], Yt = { class: "sub" }, Xt = ["disabled", "onClick"], Zt = { class: "add-text" }, Qt = ["textContent"], $t = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1021
1086
|
__name: "NFileSelect",
|
|
1022
1087
|
props: {
|
|
1088
|
+
modelValue: { default: () => [] },
|
|
1089
|
+
accept: { default: "" },
|
|
1023
1090
|
multiple: {
|
|
1024
1091
|
type: Boolean,
|
|
1025
1092
|
default: !1
|
|
1026
1093
|
},
|
|
1094
|
+
maxSize: { default: 0 },
|
|
1027
1095
|
disabled: {
|
|
1028
1096
|
type: Boolean,
|
|
1029
1097
|
default: !1
|
|
1030
1098
|
},
|
|
1099
|
+
title: { default: "" },
|
|
1100
|
+
showCount: {
|
|
1101
|
+
type: Boolean,
|
|
1102
|
+
default: !1
|
|
1103
|
+
},
|
|
1031
1104
|
label: { default: "拖曳檔案至此處或點擊選擇檔案" },
|
|
1032
|
-
hint: { default: "支援所有檔案格式" }
|
|
1033
|
-
accept: { default: "" },
|
|
1034
|
-
title: { default: "" }
|
|
1105
|
+
hint: { default: "支援所有檔案格式" }
|
|
1035
1106
|
},
|
|
1036
|
-
emits: [
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1107
|
+
emits: [
|
|
1108
|
+
"update:modelValue",
|
|
1109
|
+
"change",
|
|
1110
|
+
"add",
|
|
1111
|
+
"remove",
|
|
1112
|
+
"error"
|
|
1113
|
+
],
|
|
1114
|
+
setup(t, { emit: n }) {
|
|
1115
|
+
let r = n, { confirm: a } = Rt(), l = C(!1), u = i(() => t.modelValue.length), d = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 1024).toFixed(0) + " KB" : e < 1073741824 ? (e / 1048576).toFixed(1) + " MB" : (e / 1073741824).toFixed(2) + " GB", f = (e) => {
|
|
1116
|
+
if (e.type) return e.type;
|
|
1117
|
+
let t = e.name.lastIndexOf(".");
|
|
1118
|
+
return t > 0 ? e.name.slice(t + 1).toUpperCase() : "—";
|
|
1119
|
+
}, p = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "f" + Math.random().toString(36).slice(2, 9), h = (e) => {
|
|
1120
|
+
let n = t.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
1121
|
+
if (n.length === 0) return !0;
|
|
1122
|
+
let r = e.type.toLowerCase(), i = e.name.toLowerCase();
|
|
1123
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r === e);
|
|
1124
|
+
}, _ = (e) => {
|
|
1125
|
+
if (t.disabled) return;
|
|
1126
|
+
let n = [], i = !1;
|
|
1127
|
+
if (Array.prototype.forEach.call(e, (e) => {
|
|
1128
|
+
if (!h(e)) {
|
|
1129
|
+
r("error", {
|
|
1130
|
+
type: "type",
|
|
1131
|
+
file: e
|
|
1132
|
+
});
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
if (t.maxSize > 0 && e.size > t.maxSize * 1024 * 1024) {
|
|
1136
|
+
r("error", {
|
|
1137
|
+
type: "size",
|
|
1138
|
+
file: e
|
|
1139
|
+
});
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
if (!t.multiple && t.modelValue.length + n.length >= 1) {
|
|
1143
|
+
i ||= (r("error", {
|
|
1144
|
+
type: "count",
|
|
1145
|
+
file: e
|
|
1146
|
+
}), !0);
|
|
1147
|
+
return;
|
|
1048
1148
|
}
|
|
1049
|
-
|
|
1050
|
-
|
|
1149
|
+
n.push({
|
|
1150
|
+
id: p(),
|
|
1151
|
+
file: e,
|
|
1152
|
+
name: e.name,
|
|
1153
|
+
size: e.size,
|
|
1154
|
+
type: e.type
|
|
1155
|
+
});
|
|
1156
|
+
}), n.length === 0) return;
|
|
1157
|
+
let a = [...t.modelValue, ...n];
|
|
1158
|
+
r("update:modelValue", a), r("change", a), r("add", n);
|
|
1159
|
+
}, v = async () => {
|
|
1160
|
+
if (!t.disabled) if (t.multiple) {
|
|
1161
|
+
let e = await $.input.custom(t.accept, !0);
|
|
1162
|
+
if (e.length === 0) return;
|
|
1163
|
+
_(e.map((e) => e.file));
|
|
1164
|
+
} else {
|
|
1165
|
+
let e = await $.input.custom(t.accept, !1);
|
|
1166
|
+
if (!e) return;
|
|
1167
|
+
_([e.file]);
|
|
1168
|
+
}
|
|
1169
|
+
}, y = async (e) => {
|
|
1170
|
+
if (t.disabled) return;
|
|
1171
|
+
let n = t.modelValue.find((t) => t.id === e);
|
|
1172
|
+
if (!n || !await a(`確定要移除「${n.name}」嗎?`, {
|
|
1173
|
+
title: "移除檔案",
|
|
1174
|
+
status: "danger",
|
|
1175
|
+
confirmText: "移除",
|
|
1176
|
+
cancelText: "取消"
|
|
1177
|
+
})) return;
|
|
1178
|
+
let i = t.modelValue.filter((t) => t.id !== e);
|
|
1179
|
+
r("update:modelValue", i), r("change", i), r("remove", n);
|
|
1180
|
+
}, b = {
|
|
1181
|
+
onClick: v,
|
|
1182
|
+
onDragenter: (e) => {
|
|
1183
|
+
t.disabled || (e.preventDefault(), l.value = !0);
|
|
1184
|
+
},
|
|
1185
|
+
onDragover: (e) => e.preventDefault(),
|
|
1186
|
+
onDragleave: (e) => {
|
|
1187
|
+
e.preventDefault(), l.value = !1;
|
|
1188
|
+
},
|
|
1189
|
+
onDrop: (e) => {
|
|
1190
|
+
t.disabled || (e.preventDefault(), l.value = !1, e.dataTransfer?.files?.length && _(e.dataTransfer.files));
|
|
1051
1191
|
}
|
|
1052
1192
|
};
|
|
1053
|
-
return (
|
|
1193
|
+
return (n, r) => (x(), s("div", { class: g(["file-select", { "is-disabled": t.disabled }]) }, [t.title || t.showCount ? (x(), s("div", zt, [t.title ? (x(), s("span", {
|
|
1054
1194
|
key: 0,
|
|
1055
|
-
class: "
|
|
1056
|
-
textContent: E(
|
|
1057
|
-
}, null, 8,
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
disabled: e.disabled
|
|
1061
|
-
}]),
|
|
1195
|
+
class: "title",
|
|
1196
|
+
textContent: E(t.title)
|
|
1197
|
+
}, null, 8, Bt)) : o("", !0), t.showCount ? (x(), s("span", Vt, E(u.value) + " 個", 1)) : o("", !0)])) : o("", !0), u.value === 0 ? (x(), s("div", m({
|
|
1198
|
+
key: 1,
|
|
1199
|
+
class: ["empty", { "is-drag": l.value }],
|
|
1062
1200
|
tabindex: "0",
|
|
1063
|
-
"aria-disabled":
|
|
1064
|
-
|
|
1065
|
-
}, [c("div", zt, [n[0] ||= c("span", {
|
|
1201
|
+
"aria-disabled": t.disabled ? "true" : void 0
|
|
1202
|
+
}, b), [r[0] ||= c("span", {
|
|
1066
1203
|
class: "icon",
|
|
1067
1204
|
"aria-hidden": "true"
|
|
1068
1205
|
}, [c("svg", {
|
|
@@ -1075,47 +1212,94 @@ var bt = {
|
|
|
1075
1212
|
"stroke-linejoin": "round",
|
|
1076
1213
|
"stroke-width": "2",
|
|
1077
1214
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"
|
|
1078
|
-
})])], -1), c("div",
|
|
1215
|
+
})])], -1), c("div", Ut, [c("p", {
|
|
1079
1216
|
class: "label",
|
|
1080
|
-
textContent: E(
|
|
1081
|
-
}, null, 8,
|
|
1217
|
+
textContent: E(t.label)
|
|
1218
|
+
}, null, 8, Wt), c("p", {
|
|
1082
1219
|
class: "hint",
|
|
1083
|
-
textContent: E(
|
|
1084
|
-
}, null, 8,
|
|
1220
|
+
textContent: E(t.hint)
|
|
1221
|
+
}, null, 8, Gt)])], 16, Ht)) : (x(), s("div", Kt, [(x(!0), s(e, null, w(t.modelValue, (e) => (x(), s("div", {
|
|
1222
|
+
key: e.id,
|
|
1223
|
+
class: "row"
|
|
1224
|
+
}, [
|
|
1225
|
+
r[2] ||= c("span", {
|
|
1226
|
+
class: "file-icon",
|
|
1227
|
+
"aria-hidden": "true"
|
|
1228
|
+
}, [c("svg", {
|
|
1229
|
+
viewBox: "0 0 24 24",
|
|
1230
|
+
fill: "none",
|
|
1231
|
+
stroke: "currentColor",
|
|
1232
|
+
"stroke-width": "1.8",
|
|
1233
|
+
"stroke-linecap": "round",
|
|
1234
|
+
"stroke-linejoin": "round"
|
|
1235
|
+
}, [c("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }), c("path", { d: "M14 2v6h6" })])], -1),
|
|
1236
|
+
c("div", qt, [c("div", {
|
|
1237
|
+
class: "name",
|
|
1238
|
+
title: e.name
|
|
1239
|
+
}, E(e.name), 9, Jt), c("div", Yt, E(d(e.size)) + " · " + E(f(e)), 1)]),
|
|
1240
|
+
c("button", {
|
|
1241
|
+
class: "del-btn",
|
|
1242
|
+
"aria-label": "刪除",
|
|
1243
|
+
disabled: t.disabled,
|
|
1244
|
+
onClick: N((t) => y(e.id), ["stop"])
|
|
1245
|
+
}, [...r[1] ||= [c("svg", {
|
|
1246
|
+
viewBox: "0 0 24 24",
|
|
1247
|
+
fill: "none",
|
|
1248
|
+
stroke: "currentColor",
|
|
1249
|
+
"stroke-width": "1.8",
|
|
1250
|
+
"stroke-linecap": "round",
|
|
1251
|
+
"stroke-linejoin": "round"
|
|
1252
|
+
}, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8, Xt)
|
|
1253
|
+
]))), 128)), t.multiple ? (x(), s("div", m({
|
|
1254
|
+
key: 0,
|
|
1255
|
+
class: ["add", { "is-drag": l.value }]
|
|
1256
|
+
}, b), [r[4] ||= c("span", {
|
|
1257
|
+
class: "plus",
|
|
1258
|
+
"aria-hidden": "true"
|
|
1259
|
+
}, [c("svg", {
|
|
1260
|
+
viewBox: "0 0 24 24",
|
|
1261
|
+
fill: "none",
|
|
1262
|
+
stroke: "currentColor",
|
|
1263
|
+
"stroke-width": "1.8",
|
|
1264
|
+
"stroke-linecap": "round"
|
|
1265
|
+
}, [c("path", { d: "M12 5v14M5 12h14" })])], -1), c("div", Zt, [r[3] ||= c("div", { class: "t" }, "新增檔案", -1), c("div", {
|
|
1266
|
+
class: "d",
|
|
1267
|
+
textContent: E(t.hint)
|
|
1268
|
+
}, null, 8, Qt)])], 16)) : o("", !0)]))], 2));
|
|
1085
1269
|
}
|
|
1086
|
-
}), [["__scopeId", "data-v-
|
|
1087
|
-
function
|
|
1270
|
+
}), [["__scopeId", "data-v-81f0f496"]]), en = C(!1), tn = (e, t) => e.children?.some((e) => e.route === t) ?? !1, nn = (e, t) => e.route === t;
|
|
1271
|
+
function rn(e = "default") {
|
|
1088
1272
|
let t = `NSidebar:${e}:expanded`, n = S($.store.get(t, {}));
|
|
1089
|
-
|
|
1273
|
+
en.value = $.store.get("NSidebar:expanded", !1);
|
|
1090
1274
|
let r = (e) => !!n[e];
|
|
1091
1275
|
return {
|
|
1092
1276
|
isMenuExpanded: r,
|
|
1093
1277
|
toggleMenu: (e) => {
|
|
1094
1278
|
n[e] = !r(e), $.store.set(t, n);
|
|
1095
1279
|
},
|
|
1096
|
-
isSidebarExpanded: () =>
|
|
1280
|
+
isSidebarExpanded: () => en.value,
|
|
1097
1281
|
toggleSidebar: () => {
|
|
1098
|
-
|
|
1282
|
+
en.value = !en.value, $.store.set("NSidebar:expanded", en.value);
|
|
1099
1283
|
},
|
|
1100
1284
|
setMenuActiveResolver: (e) => {
|
|
1101
|
-
|
|
1285
|
+
tn = e;
|
|
1102
1286
|
},
|
|
1103
1287
|
setItemActiveResolver: (e) => {
|
|
1104
|
-
|
|
1288
|
+
nn = e;
|
|
1105
1289
|
},
|
|
1106
|
-
resolveMenuActive:
|
|
1107
|
-
resolveItemActive:
|
|
1290
|
+
resolveMenuActive: tn,
|
|
1291
|
+
resolveItemActive: nn
|
|
1108
1292
|
};
|
|
1109
1293
|
}
|
|
1110
1294
|
//#endregion
|
|
1111
1295
|
//#region src/layouts/NHeroSection.vue?vue&type=script&setup=true&lang.ts
|
|
1112
|
-
var
|
|
1296
|
+
var an = { class: "hero-section-container" }, on = { class: "hero-section" }, sn = { class: "header" }, cn = ["innerHTML"], ln = { class: "body" }, un = { class: "title-section" }, dn = { class: "title" }, fn = { key: 0 }, pn = {
|
|
1113
1297
|
key: 1,
|
|
1114
1298
|
class: "description"
|
|
1115
|
-
},
|
|
1299
|
+
}, mn = {
|
|
1116
1300
|
key: 0,
|
|
1117
1301
|
class: "toolbar"
|
|
1118
|
-
},
|
|
1302
|
+
}, hn = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1119
1303
|
__name: "NHeroSection",
|
|
1120
1304
|
props: {
|
|
1121
1305
|
icon: { default: "" },
|
|
@@ -1123,11 +1307,11 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1123
1307
|
description: { default: "" }
|
|
1124
1308
|
},
|
|
1125
1309
|
setup(e) {
|
|
1126
|
-
let t =
|
|
1127
|
-
return (n, r) => (x(), s("div",
|
|
1310
|
+
let t = rn();
|
|
1311
|
+
return (n, r) => (x(), s("div", an, [c("div", on, [
|
|
1128
1312
|
r[2] ||= c("div", { class: "effect-background-left" }, null, -1),
|
|
1129
1313
|
r[3] ||= c("div", { class: "effect-background-right" }, null, -1),
|
|
1130
|
-
c("div",
|
|
1314
|
+
c("div", sn, [f(z, {
|
|
1131
1315
|
class: "sidebar-toggle-button",
|
|
1132
1316
|
padding: "8px",
|
|
1133
1317
|
intent: "none",
|
|
@@ -1155,14 +1339,14 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1155
1339
|
key: 0,
|
|
1156
1340
|
class: "icon-bg",
|
|
1157
1341
|
innerHTML: e.icon
|
|
1158
|
-
}, null, 8,
|
|
1159
|
-
c("div",
|
|
1342
|
+
}, null, 8, cn)) : o("", !0),
|
|
1343
|
+
c("div", ln, [c("div", un, [c("div", dn, [e.title ? (x(), s("h1", fn, E(e.title), 1)) : o("", !0), n.$slots.description || e.description ? (x(), s("div", pn, [T(n.$slots, "description", {}, () => [d(E(e.description), 1)], !0)])) : o("", !0)])]), n.$slots.toolbar ? (x(), s("div", mn, [T(n.$slots, "toolbar", {}, void 0, !0)])) : o("", !0)])
|
|
1160
1344
|
])]));
|
|
1161
1345
|
}
|
|
1162
|
-
}), [["__scopeId", "data-v-6fef1cae"]]),
|
|
1346
|
+
}), [["__scopeId", "data-v-6fef1cae"]]), gn = { class: "content-container" }, _n = {
|
|
1163
1347
|
key: 0,
|
|
1164
1348
|
class: "nav-tabs"
|
|
1165
|
-
},
|
|
1349
|
+
}, vn = ["textContent", "onClick"], yn = { class: "tab-content" }, bn = { class: "footer" }, xn = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1166
1350
|
__name: "NForm",
|
|
1167
1351
|
props: {
|
|
1168
1352
|
model: { default: () => ({}) },
|
|
@@ -1187,7 +1371,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1187
1371
|
}, m = () => {
|
|
1188
1372
|
t.disabled || r("reset");
|
|
1189
1373
|
};
|
|
1190
|
-
return (n, i) => (x(), s("div",
|
|
1374
|
+
return (n, i) => (x(), s("div", gn, [T(n.$slots, "heroSection", {}, () => [f(hn, {
|
|
1191
1375
|
icon: t.icon,
|
|
1192
1376
|
title: t.title,
|
|
1193
1377
|
description: t.description
|
|
@@ -1206,19 +1390,19 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1206
1390
|
onSubmit: N(p, ["prevent"]),
|
|
1207
1391
|
onReset: N(m, ["prevent"])
|
|
1208
1392
|
}, [
|
|
1209
|
-
t.tabs.length > 0 ? (x(), s("div",
|
|
1393
|
+
t.tabs.length > 0 ? (x(), s("div", _n, [(x(!0), s(e, null, w(t.tabs, (e, t) => (x(), s("button", {
|
|
1210
1394
|
key: `${e}${t}`,
|
|
1211
1395
|
class: g(["nav-link", { active: d.value === t }]),
|
|
1212
1396
|
textContent: E(e),
|
|
1213
1397
|
onClick: () => {
|
|
1214
1398
|
u.value = t, D($).store.set(a, t), r("update:modelValue", t);
|
|
1215
1399
|
}
|
|
1216
|
-
}, null, 10,
|
|
1217
|
-
c("div",
|
|
1218
|
-
c("div",
|
|
1400
|
+
}, null, 10, vn))), 128))])) : o("", !0),
|
|
1401
|
+
c("div", yn, [t.tabs.length > 0 ? (x(!0), s(e, { key: 0 }, w(t.tabs, (t, r) => (x(), s(e, null, [d.value === r ? T(n.$slots, `tab${r}`, { key: 0 }, void 0, !0) : o("", !0)], 64))), 256)) : o("", !0), t.tabs.length == 0 && n.$slots.tab0 ? T(n.$slots, "tab0", { key: 1 }, void 0, !0) : o("", !0)]),
|
|
1402
|
+
c("div", bn, [T(n.$slots, "footer", {}, void 0, !0)])
|
|
1219
1403
|
], 32)]));
|
|
1220
1404
|
}
|
|
1221
|
-
}), [["__scopeId", "data-v-fc11e625"]]),
|
|
1405
|
+
}), [["__scopeId", "data-v-fc11e625"]]), Sn = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1222
1406
|
__name: "NCard",
|
|
1223
1407
|
props: {
|
|
1224
1408
|
size: { default: "md" },
|
|
@@ -1230,13 +1414,13 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1230
1414
|
[`radius-${e.radius}`]: !0
|
|
1231
1415
|
}]) }, [T(t.$slots, "default", {}, void 0, !0)], 2));
|
|
1232
1416
|
}
|
|
1233
|
-
}), [["__scopeId", "data-v-56a18223"]]),
|
|
1417
|
+
}), [["__scopeId", "data-v-56a18223"]]), Cn = {
|
|
1234
1418
|
key: 0,
|
|
1235
1419
|
class: "paginate"
|
|
1236
|
-
},
|
|
1420
|
+
}, wn = { class: "summary" }, Tn = { class: "pages" }, En = {
|
|
1237
1421
|
key: 1,
|
|
1238
1422
|
class: "separator"
|
|
1239
|
-
},
|
|
1423
|
+
}, Dn = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1240
1424
|
__name: "NPaginate",
|
|
1241
1425
|
props: {
|
|
1242
1426
|
totalItems: {},
|
|
@@ -1272,7 +1456,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1272
1456
|
let t = Math.min(Math.max(1, e), u.value);
|
|
1273
1457
|
l.value !== t && (l.value = t, r("onPageChange", l.value));
|
|
1274
1458
|
}
|
|
1275
|
-
return (n, r) => t.totalItems > 0 ? (x(), s("div",
|
|
1459
|
+
return (n, r) => t.totalItems > 0 ? (x(), s("div", Cn, [c("span", wn, "第 " + E(l.value) + " / " + E(u.value) + " 頁,共 " + E(t.totalItems) + " 筆", 1), c("div", Tn, [
|
|
1276
1460
|
f(z, {
|
|
1277
1461
|
variant: "outline",
|
|
1278
1462
|
padding: "",
|
|
@@ -1309,7 +1493,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1309
1493
|
"variant",
|
|
1310
1494
|
"intent",
|
|
1311
1495
|
"onClick"
|
|
1312
|
-
])) : (x(), s("span",
|
|
1496
|
+
])) : (x(), s("span", En, "…"))], 64))), 128)),
|
|
1313
1497
|
f(z, {
|
|
1314
1498
|
variant: "outline",
|
|
1315
1499
|
padding: "",
|
|
@@ -1333,13 +1517,13 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1333
1517
|
}, 8, ["disabled"])
|
|
1334
1518
|
])])) : o("", !0);
|
|
1335
1519
|
}
|
|
1336
|
-
}), [["__scopeId", "data-v-a191a116"]]),
|
|
1520
|
+
}), [["__scopeId", "data-v-a191a116"]]), On = ["innerHTML"], kn = { class: "title" }, An = {
|
|
1337
1521
|
key: 1,
|
|
1338
1522
|
class: "description"
|
|
1339
|
-
},
|
|
1523
|
+
}, jn = {
|
|
1340
1524
|
key: 2,
|
|
1341
1525
|
class: "action"
|
|
1342
|
-
},
|
|
1526
|
+
}, Mn = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1343
1527
|
__name: "NEmpty",
|
|
1344
1528
|
props: {
|
|
1345
1529
|
title: { default: "目前沒有資料" },
|
|
@@ -1353,37 +1537,37 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1353
1537
|
key: 0,
|
|
1354
1538
|
class: "icon",
|
|
1355
1539
|
innerHTML: e.icon
|
|
1356
|
-
}, null, 8,
|
|
1357
|
-
c("p",
|
|
1358
|
-
e.description ? (x(), s("p",
|
|
1359
|
-
t.$slots.default ? (x(), s("div",
|
|
1540
|
+
}, null, 8, On)) : o("", !0),
|
|
1541
|
+
c("p", kn, E(e.title), 1),
|
|
1542
|
+
e.description ? (x(), s("p", An, E(e.description), 1)) : o("", !0),
|
|
1543
|
+
t.$slots.default ? (x(), s("div", jn, [T(t.$slots, "default", {}, void 0, !0)])) : o("", !0)
|
|
1360
1544
|
], 2));
|
|
1361
1545
|
}
|
|
1362
|
-
}), [["__scopeId", "data-v-b9482c23"]]),
|
|
1546
|
+
}), [["__scopeId", "data-v-b9482c23"]]), Nn = {
|
|
1363
1547
|
key: 0,
|
|
1364
1548
|
class: "loading-fullscreen"
|
|
1365
|
-
},
|
|
1549
|
+
}, Pn = { class: "content" }, Fn = {
|
|
1366
1550
|
key: 0,
|
|
1367
1551
|
class: "title"
|
|
1368
|
-
},
|
|
1552
|
+
}, In = {
|
|
1369
1553
|
key: 1,
|
|
1370
1554
|
class: "loading-wrapper"
|
|
1371
|
-
},
|
|
1555
|
+
}, Ln = {
|
|
1372
1556
|
key: 0,
|
|
1373
1557
|
class: "overlay"
|
|
1374
|
-
},
|
|
1558
|
+
}, Rn = { class: "content" }, zn = {
|
|
1375
1559
|
key: 0,
|
|
1376
1560
|
class: "title"
|
|
1377
|
-
},
|
|
1561
|
+
}, Bn = {
|
|
1378
1562
|
key: 0,
|
|
1379
1563
|
class: "loading-inline"
|
|
1380
|
-
},
|
|
1564
|
+
}, Vn = {
|
|
1381
1565
|
key: 0,
|
|
1382
1566
|
class: "title"
|
|
1383
|
-
},
|
|
1567
|
+
}, Hn = {
|
|
1384
1568
|
key: 0,
|
|
1385
1569
|
class: "title"
|
|
1386
|
-
},
|
|
1570
|
+
}, Un = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1387
1571
|
__name: "NLoading",
|
|
1388
1572
|
props: {
|
|
1389
1573
|
loading: {
|
|
@@ -1406,42 +1590,42 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1406
1590
|
key: 0,
|
|
1407
1591
|
to: "body"
|
|
1408
1592
|
}, [f(n, { name: "fade" }, {
|
|
1409
|
-
default: j(() => [r.loading ? (x(), s("div",
|
|
1593
|
+
default: j(() => [r.loading ? (x(), s("div", Nn, [c("div", Pn, [l[0] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1410
1594
|
cx: "25",
|
|
1411
1595
|
cy: "25",
|
|
1412
1596
|
r: "20",
|
|
1413
1597
|
fill: "none",
|
|
1414
1598
|
"stroke-width": "4"
|
|
1415
|
-
})])], -1), r.title ? (x(), s("p",
|
|
1599
|
+
})])], -1), r.title ? (x(), s("p", Fn, E(r.title), 1)) : o("", !0)])])) : o("", !0)]),
|
|
1416
1600
|
_: 1
|
|
1417
|
-
})])) : r.overlay ? (x(), s("div",
|
|
1418
|
-
default: j(() => [r.loading ? (x(), s("div",
|
|
1601
|
+
})])) : r.overlay ? (x(), s("div", In, [T(i.$slots, "default", {}, void 0, !0), f(n, { name: "fade" }, {
|
|
1602
|
+
default: j(() => [r.loading ? (x(), s("div", Ln, [c("div", Rn, [l[1] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1419
1603
|
cx: "25",
|
|
1420
1604
|
cy: "25",
|
|
1421
1605
|
r: "20",
|
|
1422
1606
|
fill: "none",
|
|
1423
1607
|
"stroke-width": "4"
|
|
1424
|
-
})])], -1), r.title ? (x(), s("p",
|
|
1608
|
+
})])], -1), r.title ? (x(), s("p", zn, E(r.title), 1)) : o("", !0)])])) : o("", !0)]),
|
|
1425
1609
|
_: 1
|
|
1426
|
-
})])) : (x(), s(e, { key: 2 }, [r.loading ? (x(), s("div",
|
|
1610
|
+
})])) : (x(), s(e, { key: 2 }, [r.loading ? (x(), s("div", Bn, [r.variant === "spinner" ? (x(), s(e, { key: 0 }, [l[2] ||= c("div", { class: "spinner" }, [c("svg", { viewBox: "0 0 50 50" }, [c("circle", {
|
|
1427
1611
|
cx: "25",
|
|
1428
1612
|
cy: "25",
|
|
1429
1613
|
r: "20",
|
|
1430
1614
|
fill: "none",
|
|
1431
1615
|
"stroke-width": "4"
|
|
1432
|
-
})])], -1), r.title ? (x(), s("p",
|
|
1616
|
+
})])], -1), r.title ? (x(), s("p", Vn, E(r.title), 1)) : o("", !0)], 64)) : o("", !0), r.variant === "dots" ? (x(), s(e, { key: 1 }, [l[3] ||= c("div", { class: "dots" }, [
|
|
1433
1617
|
c("span"),
|
|
1434
1618
|
c("span"),
|
|
1435
1619
|
c("span")
|
|
1436
|
-
], -1), r.title ? (x(), s("p",
|
|
1620
|
+
], -1), r.title ? (x(), s("p", Hn, E(r.title), 1)) : o("", !0)], 64)) : o("", !0)])) : T(i.$slots, "default", { key: 1 }, void 0, !0)], 64));
|
|
1437
1621
|
}
|
|
1438
|
-
}), [["__scopeId", "data-v-f3aa02fe"]]),
|
|
1622
|
+
}), [["__scopeId", "data-v-f3aa02fe"]]), Wn = { class: "table-scroll" }, Gn = {
|
|
1439
1623
|
key: 0,
|
|
1440
1624
|
class: "batch"
|
|
1441
|
-
},
|
|
1625
|
+
}, Kn = ["onClick"], qn = { class: "th-content" }, Jn = {
|
|
1442
1626
|
key: 0,
|
|
1443
1627
|
class: "sort-icon"
|
|
1444
|
-
},
|
|
1628
|
+
}, Yn = {
|
|
1445
1629
|
key: 0,
|
|
1446
1630
|
viewBox: "0 0 24 24",
|
|
1447
1631
|
fill: "none",
|
|
@@ -1449,7 +1633,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1449
1633
|
"stroke-width": "2",
|
|
1450
1634
|
"stroke-linecap": "round",
|
|
1451
1635
|
"stroke-linejoin": "round"
|
|
1452
|
-
},
|
|
1636
|
+
}, Xn = {
|
|
1453
1637
|
key: 1,
|
|
1454
1638
|
viewBox: "0 0 24 24",
|
|
1455
1639
|
fill: "none",
|
|
@@ -1457,7 +1641,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1457
1641
|
"stroke-width": "2",
|
|
1458
1642
|
"stroke-linecap": "round",
|
|
1459
1643
|
"stroke-linejoin": "round"
|
|
1460
|
-
},
|
|
1644
|
+
}, Zn = {
|
|
1461
1645
|
key: 2,
|
|
1462
1646
|
viewBox: "0 0 24 24",
|
|
1463
1647
|
fill: "none",
|
|
@@ -1465,13 +1649,13 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1465
1649
|
"stroke-width": "2",
|
|
1466
1650
|
"stroke-linecap": "round",
|
|
1467
1651
|
"stroke-linejoin": "round"
|
|
1468
|
-
},
|
|
1652
|
+
}, Qn = {
|
|
1469
1653
|
key: 1,
|
|
1470
1654
|
class: "actions"
|
|
1471
|
-
},
|
|
1655
|
+
}, $n = { key: 0 }, er = ["onClick"], tr = {
|
|
1472
1656
|
key: 0,
|
|
1473
1657
|
class: "actions"
|
|
1474
|
-
},
|
|
1658
|
+
}, nr = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1475
1659
|
__name: "NTable",
|
|
1476
1660
|
props: {
|
|
1477
1661
|
columns: { default: () => [] },
|
|
@@ -1500,37 +1684,37 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1500
1684
|
}), a = (e) => {
|
|
1501
1685
|
e.sortable && (i.value.key === e.key ? i.value.order = i.value.order === "asc" ? "desc" : "asc" : (i.value.key = e.key, i.value.order = "asc"), r("sort", { ...i.value }));
|
|
1502
1686
|
};
|
|
1503
|
-
return (n, l) => (x(), s("div", { class: g(["table", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [f(
|
|
1687
|
+
return (n, l) => (x(), s("div", { class: g(["table", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [f(Un, {
|
|
1504
1688
|
loading: t.loading,
|
|
1505
1689
|
overlay: ""
|
|
1506
1690
|
}, {
|
|
1507
|
-
default: j(() => [c("div",
|
|
1508
|
-
n.$slots.batch ? (x(), s("th",
|
|
1691
|
+
default: j(() => [c("div", Wn, [c("table", null, [c("thead", null, [c("tr", null, [
|
|
1692
|
+
n.$slots.batch ? (x(), s("th", Gn, [T(n.$slots, "batch", {}, void 0, !0)])) : o("", !0),
|
|
1509
1693
|
(x(!0), s(e, null, w(t.columns, (e) => (x(), s("th", {
|
|
1510
1694
|
key: e.key,
|
|
1511
1695
|
class: g({ sortable: e.sortable }),
|
|
1512
1696
|
onClick: (t) => a(e)
|
|
1513
|
-
}, [c("span",
|
|
1514
|
-
n.$slots.actions ? (x(), s("th",
|
|
1515
|
-
])]), !t.loading && t.items.length > 0 ? (x(), s("tbody",
|
|
1697
|
+
}, [c("span", qn, [d(E(e.label) + " ", 1), e.sortable ? (x(), s("span", Jn, [i.value.key !== e.key || i.value.order === null ? (x(), s("svg", Yn, [...l[0] ||= [c("path", { d: "M8 9l4-4 4 4" }, null, -1), c("path", { d: "M16 15l-4 4-4-4" }, null, -1)]])) : i.value.order === "asc" ? (x(), s("svg", Xn, [...l[1] ||= [c("path", { d: "M8 15l4-6 4 6" }, null, -1)]])) : (x(), s("svg", Zn, [...l[2] ||= [c("path", { d: "M8 9l4 6 4-6" }, null, -1)]]))])) : o("", !0)])], 10, Kn))), 128)),
|
|
1698
|
+
n.$slots.actions ? (x(), s("th", Qn, [T(n.$slots, "actions-header", {}, () => [l[3] ||= d("操作", -1)], !0)])) : o("", !0)
|
|
1699
|
+
])]), !t.loading && t.items.length > 0 ? (x(), s("tbody", $n, [(x(!0), s(e, null, w(t.items, (e, i) => (x(), s("tr", {
|
|
1516
1700
|
key: e[t.itemKey] ?? i,
|
|
1517
1701
|
onClick: (t) => r("click", e)
|
|
1518
1702
|
}, [T(n.$slots, "item", {
|
|
1519
1703
|
index: i,
|
|
1520
1704
|
item: e,
|
|
1521
1705
|
column: t.columns[i]
|
|
1522
|
-
}, void 0, !0), n.$slots.actions ? (x(), s("td",
|
|
1706
|
+
}, void 0, !0), n.$slots.actions ? (x(), s("td", tr, [T(n.$slots, "actions", {
|
|
1523
1707
|
index: i,
|
|
1524
1708
|
item: e,
|
|
1525
1709
|
column: t.columns[i]
|
|
1526
|
-
}, void 0, !0)])) : o("", !0)], 8,
|
|
1710
|
+
}, void 0, !0)])) : o("", !0)], 8, er))), 128))])) : o("", !0)])])]),
|
|
1527
1711
|
_: 3
|
|
1528
|
-
}, 8, ["loading"]), t.items.length === 0 ? T(n.$slots, "empty", { key: 0 }, () => [f(
|
|
1712
|
+
}, 8, ["loading"]), t.items.length === 0 ? T(n.$slots, "empty", { key: 0 }, () => [f(Mn, {
|
|
1529
1713
|
title: t.emptyTitle,
|
|
1530
1714
|
description: t.emptyDescription
|
|
1531
1715
|
}, null, 8, ["title", "description"])], !0) : o("", !0)], 2));
|
|
1532
1716
|
}
|
|
1533
|
-
}), [["__scopeId", "data-v-77619033"]]),
|
|
1717
|
+
}), [["__scopeId", "data-v-77619033"]]), rr = { class: "content-container" }, ir = { key: 0 }, ar = { class: "actions" }, or = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1534
1718
|
__name: "NList",
|
|
1535
1719
|
props: {
|
|
1536
1720
|
title: { default: "" },
|
|
@@ -1600,7 +1784,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1600
1784
|
function _() {
|
|
1601
1785
|
r.value.clear();
|
|
1602
1786
|
}
|
|
1603
|
-
return (t, r) => (x(), s("div",
|
|
1787
|
+
return (t, r) => (x(), s("div", rr, [T(t.$slots, "heroSection", {}, () => [f(hn, {
|
|
1604
1788
|
icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\">\n <path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"></path>\n <circle cx=\"12\" cy=\"7\" r=\"4\"></circle>\n </svg>",
|
|
1605
1789
|
title: e.title,
|
|
1606
1790
|
description: e.description
|
|
@@ -1696,11 +1880,11 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1696
1880
|
})) : o("", !0)
|
|
1697
1881
|
]),
|
|
1698
1882
|
key: "0"
|
|
1699
|
-
} : void 0]), 1032, ["title", "description"])], !0), f(
|
|
1883
|
+
} : void 0]), 1032, ["title", "description"])], !0), f(Sn, {
|
|
1700
1884
|
size: "none",
|
|
1701
1885
|
radius: "xl"
|
|
1702
1886
|
}, {
|
|
1703
|
-
default: j(() => [f(
|
|
1887
|
+
default: j(() => [f(nr, {
|
|
1704
1888
|
columns: e.columns,
|
|
1705
1889
|
items: e.items,
|
|
1706
1890
|
hoverable: "",
|
|
@@ -1715,7 +1899,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1715
1899
|
}, l({ _: 2 }, [
|
|
1716
1900
|
e.batchDeletable ? {
|
|
1717
1901
|
name: "batch",
|
|
1718
|
-
fn: j(() => [f(
|
|
1902
|
+
fn: j(() => [f(ye, {
|
|
1719
1903
|
"model-value": m.value,
|
|
1720
1904
|
"onUpdate:modelValue": r[4] ||= () => g()
|
|
1721
1905
|
}, null, 8, ["model-value"])]),
|
|
@@ -1723,7 +1907,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1723
1907
|
} : void 0,
|
|
1724
1908
|
t.$slots.item ? {
|
|
1725
1909
|
name: "item",
|
|
1726
|
-
fn: j(({ item: n, column: r, index: i }) => [e.batchDeletable ? (x(), s("td",
|
|
1910
|
+
fn: j(({ item: n, column: r, index: i }) => [e.batchDeletable ? (x(), s("td", ir, [f(ye, {
|
|
1727
1911
|
onClick: N((e) => h(n), ["stop"]),
|
|
1728
1912
|
"model-value": p(n.id)
|
|
1729
1913
|
}, null, 8, ["onClick", "model-value"])])) : o("", !0), T(t.$slots, "item", {
|
|
@@ -1738,7 +1922,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1738
1922
|
fn: j(({ item: r, index: i }) => [T(t.$slots, "actions", {
|
|
1739
1923
|
item: r,
|
|
1740
1924
|
index: i
|
|
1741
|
-
}, () => [c("div",
|
|
1925
|
+
}, () => [c("div", ar, [e.updatable ? (x(), a(z, {
|
|
1742
1926
|
key: 0,
|
|
1743
1927
|
variant: "outline",
|
|
1744
1928
|
onClick: N(() => n("update", r), ["stop"])
|
|
@@ -1768,7 +1952,7 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1768
1952
|
"empty-icon",
|
|
1769
1953
|
"empty-title",
|
|
1770
1954
|
"empty-description"
|
|
1771
|
-
]), e.items.length > 0 ? (x(), a(
|
|
1955
|
+
]), e.items.length > 0 ? (x(), a(Dn, {
|
|
1772
1956
|
key: 0,
|
|
1773
1957
|
"total-items": e.totalItems,
|
|
1774
1958
|
"current-page": e.currentPage,
|
|
@@ -1784,11 +1968,11 @@ var Jt = { class: "hero-section-container" }, Yt = { class: "hero-section" }, Xt
|
|
|
1784
1968
|
_: 3
|
|
1785
1969
|
})]));
|
|
1786
1970
|
}
|
|
1787
|
-
}), [["__scopeId", "data-v-66c8acf7"]]),
|
|
1788
|
-
function
|
|
1971
|
+
}), [["__scopeId", "data-v-66c8acf7"]]), sr = 0, cr = S([]);
|
|
1972
|
+
function lr() {
|
|
1789
1973
|
let e = function(e, n = {}) {
|
|
1790
|
-
let r = ++
|
|
1791
|
-
|
|
1974
|
+
let r = ++sr, i = n.duration ?? 4e3;
|
|
1975
|
+
cr.push({
|
|
1792
1976
|
id: r,
|
|
1793
1977
|
description: e,
|
|
1794
1978
|
status: n.status ?? "info",
|
|
@@ -1810,31 +1994,31 @@ function $n() {
|
|
|
1810
1994
|
status: "info"
|
|
1811
1995
|
});
|
|
1812
1996
|
function t(e) {
|
|
1813
|
-
let t =
|
|
1814
|
-
t !== -1 &&
|
|
1997
|
+
let t = cr.findIndex((t) => t.id === e);
|
|
1998
|
+
t !== -1 && cr.splice(t, 1);
|
|
1815
1999
|
}
|
|
1816
2000
|
return {
|
|
1817
|
-
toasts:
|
|
2001
|
+
toasts: cr,
|
|
1818
2002
|
toast: e,
|
|
1819
2003
|
removeToast: t
|
|
1820
2004
|
};
|
|
1821
2005
|
}
|
|
1822
2006
|
//#endregion
|
|
1823
2007
|
//#region src/components/NToast.vue?vue&type=script&setup=true&lang.ts
|
|
1824
|
-
var
|
|
2008
|
+
var ur = { class: "icon-wrap" }, dr = ["innerHTML"], fr = {
|
|
1825
2009
|
key: 0,
|
|
1826
2010
|
class: "arc-timer",
|
|
1827
2011
|
viewBox: "0 0 36 36",
|
|
1828
2012
|
width: "36",
|
|
1829
2013
|
height: "36",
|
|
1830
2014
|
"shape-rendering": "geometricPrecision"
|
|
1831
|
-
},
|
|
2015
|
+
}, pr = { class: "body" }, mr = {
|
|
1832
2016
|
key: 0,
|
|
1833
2017
|
class: "title"
|
|
1834
|
-
},
|
|
2018
|
+
}, hr = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1835
2019
|
__name: "NToast",
|
|
1836
2020
|
setup(n) {
|
|
1837
|
-
let { toasts: i } =
|
|
2021
|
+
let { toasts: i } = lr(), l = {
|
|
1838
2022
|
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\"/>\n </svg>",
|
|
1839
2023
|
danger: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"/>\n <path d=\"m15 9-6 6\"/>\n <path d=\"m9 9 6 6\"/>\n </svg>",
|
|
1840
2024
|
warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/>\n <path d=\"M12 9v4\"/>\n <path d=\"M12 17h.01\"/>\n </svg>",
|
|
@@ -1848,10 +2032,10 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
1848
2032
|
default: j(() => [(x(!0), s(e, null, w(D(i), (e) => (x(), s("div", {
|
|
1849
2033
|
key: e.id,
|
|
1850
2034
|
class: g(["toast", [`${e.status}`]])
|
|
1851
|
-
}, [c("div",
|
|
2035
|
+
}, [c("div", ur, [c("div", {
|
|
1852
2036
|
class: "icon",
|
|
1853
2037
|
innerHTML: l[e.status]
|
|
1854
|
-
}, null, 8,
|
|
2038
|
+
}, null, 8, dr), e.duration > 0 ? (x(), s("svg", fr, [u[0] ||= c("circle", {
|
|
1855
2039
|
class: "arc-track",
|
|
1856
2040
|
cx: "18",
|
|
1857
2041
|
cy: "18",
|
|
@@ -1863,17 +2047,17 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
1863
2047
|
r: "16",
|
|
1864
2048
|
transform: "rotate(-90 18 18)",
|
|
1865
2049
|
style: _({ animationDuration: `${e.duration}ms` })
|
|
1866
|
-
}, null, 4)])) : o("", !0)]), c("div",
|
|
2050
|
+
}, null, 4)])) : o("", !0)]), c("div", pr, [e.title ? (x(), s("p", mr, E(e.title), 1)) : o("", !0), e.description ? (x(), s("p", {
|
|
1867
2051
|
key: 1,
|
|
1868
2052
|
class: g(e.title ? "description" : "title")
|
|
1869
2053
|
}, E(e.description), 3)) : o("", !0)])], 2))), 128))]),
|
|
1870
2054
|
_: 1
|
|
1871
2055
|
})]));
|
|
1872
2056
|
}
|
|
1873
|
-
}), [["__scopeId", "data-v-53892c5f"]]),
|
|
2057
|
+
}), [["__scopeId", "data-v-53892c5f"]]), gr = { class: "code" }, _r = {
|
|
1874
2058
|
key: 0,
|
|
1875
2059
|
class: "header"
|
|
1876
|
-
},
|
|
2060
|
+
}, vr = { class: "language-label" }, yr = {
|
|
1877
2061
|
key: 0,
|
|
1878
2062
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1879
2063
|
width: "14",
|
|
@@ -1884,7 +2068,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
1884
2068
|
"stroke-width": "2",
|
|
1885
2069
|
"stroke-linecap": "round",
|
|
1886
2070
|
"stroke-linejoin": "round"
|
|
1887
|
-
},
|
|
2071
|
+
}, br = {
|
|
1888
2072
|
key: 1,
|
|
1889
2073
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1890
2074
|
width: "14",
|
|
@@ -1895,10 +2079,10 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
1895
2079
|
"stroke-width": "2",
|
|
1896
2080
|
"stroke-linecap": "round",
|
|
1897
2081
|
"stroke-linejoin": "round"
|
|
1898
|
-
},
|
|
2082
|
+
}, xr = { class: "code-body" }, Sr = {
|
|
1899
2083
|
key: 0,
|
|
1900
2084
|
class: "gutter"
|
|
1901
|
-
},
|
|
2085
|
+
}, Cr = ["textContent"], wr = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1902
2086
|
__name: "NCode",
|
|
1903
2087
|
props: {
|
|
1904
2088
|
code: {},
|
|
@@ -1917,28 +2101,28 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
1917
2101
|
}, 2e3);
|
|
1918
2102
|
} catch {}
|
|
1919
2103
|
}
|
|
1920
|
-
return (i, l) => (x(), s("div",
|
|
2104
|
+
return (i, l) => (x(), s("div", gr, [(t.language, x(), s("div", _r, [c("span", vr, E(t.language || "code"), 1), c("button", {
|
|
1921
2105
|
class: g(["copy-btn", { copied: n.value }]),
|
|
1922
2106
|
onClick: a
|
|
1923
|
-
}, [n.value ? (x(), s("svg",
|
|
2107
|
+
}, [n.value ? (x(), s("svg", br, [...l[1] ||= [c("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (x(), s("svg", yr, [...l[0] ||= [c("rect", {
|
|
1924
2108
|
x: "9",
|
|
1925
2109
|
y: "9",
|
|
1926
2110
|
width: "13",
|
|
1927
2111
|
height: "13",
|
|
1928
2112
|
rx: "2",
|
|
1929
2113
|
ry: "2"
|
|
1930
|
-
}, null, -1), c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]])), c("span", null, E(n.value ? "Copied!" : "Copy"), 1)], 2)])), c("div",
|
|
2114
|
+
}, null, -1), c("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]])), c("span", null, E(n.value ? "Copied!" : "Copy"), 1)], 2)])), c("div", xr, [t.showLineNumbers ? (x(), s("div", Sr, [(x(!0), s(e, null, w(r.value, (e, t) => (x(), s("span", {
|
|
1931
2115
|
key: t,
|
|
1932
2116
|
class: "line-number"
|
|
1933
2117
|
}, E(t + 1), 1))), 128))])) : o("", !0), c("pre", {
|
|
1934
2118
|
class: "code-content",
|
|
1935
2119
|
textContent: E(t.code.trim())
|
|
1936
|
-
}, null, 8,
|
|
2120
|
+
}, null, 8, Cr)])]));
|
|
1937
2121
|
}
|
|
1938
|
-
}), [["__scopeId", "data-v-6fed5425"]]),
|
|
2122
|
+
}), [["__scopeId", "data-v-6fed5425"]]), Tr = {
|
|
1939
2123
|
key: 0,
|
|
1940
2124
|
class: "label"
|
|
1941
|
-
},
|
|
2125
|
+
}, Er = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1942
2126
|
__name: "NSwitch",
|
|
1943
2127
|
props: {
|
|
1944
2128
|
modelValue: {
|
|
@@ -1963,7 +2147,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
1963
2147
|
let e = !n.modelValue;
|
|
1964
2148
|
r("update:modelValue", e), r("change", e);
|
|
1965
2149
|
};
|
|
1966
|
-
return (t, n) => (x(), s("div", { class: g(["switch-wrapper", { inline: e.inline }]) }, [e.title ? (x(), s("label",
|
|
2150
|
+
return (t, n) => (x(), s("div", { class: g(["switch-wrapper", { inline: e.inline }]) }, [e.title ? (x(), s("label", Tr, E(e.title), 1)) : o("", !0), c("div", {
|
|
1967
2151
|
class: g(["switch", [
|
|
1968
2152
|
`size-${e.size}`,
|
|
1969
2153
|
{ checked: a.value },
|
|
@@ -1972,7 +2156,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
1972
2156
|
onClick: l
|
|
1973
2157
|
}, [...n[0] ||= [c("div", { class: "inner" }, [c("div", { class: "handle" })], -1)]], 2)], 2));
|
|
1974
2158
|
}
|
|
1975
|
-
}), [["__scopeId", "data-v-efa08615"]]),
|
|
2159
|
+
}), [["__scopeId", "data-v-efa08615"]]), Dr = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
1976
2160
|
__name: "NTag",
|
|
1977
2161
|
props: {
|
|
1978
2162
|
intent: { default: "none" },
|
|
@@ -2021,49 +2205,49 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2021
2205
|
y2: "18"
|
|
2022
2206
|
})], -1)]])) : o("", !0)], 2));
|
|
2023
2207
|
}
|
|
2024
|
-
}), [["__scopeId", "data-v-55e5be0f"]]),
|
|
2208
|
+
}), [["__scopeId", "data-v-55e5be0f"]]), Or = {
|
|
2025
2209
|
key: 0,
|
|
2026
2210
|
class: "label"
|
|
2027
|
-
},
|
|
2211
|
+
}, kr = {
|
|
2028
2212
|
key: 0,
|
|
2029
2213
|
class: "picker-dropdown"
|
|
2030
|
-
},
|
|
2214
|
+
}, Ar = { class: "picker-header" }, jr = { class: "header-nav" }, Mr = { class: "header-nav" }, Nr = { class: "picker-body" }, Pr = { class: "weekday-grid" }, Fr = { class: "day-grid" }, Ir = {
|
|
2031
2215
|
key: 1,
|
|
2032
2216
|
class: "year-grid"
|
|
2033
|
-
},
|
|
2217
|
+
}, Lr = {
|
|
2034
2218
|
key: 0,
|
|
2035
2219
|
class: "time-section"
|
|
2036
|
-
},
|
|
2220
|
+
}, Rr = { class: "time-sliders" }, zr = {
|
|
2037
2221
|
key: 0,
|
|
2038
2222
|
class: "time-row"
|
|
2039
|
-
},
|
|
2223
|
+
}, Br = ["value"], Vr = { class: "time-val" }, Hr = {
|
|
2040
2224
|
key: 1,
|
|
2041
2225
|
class: "time-row"
|
|
2042
|
-
},
|
|
2226
|
+
}, Ur = ["value"], Wr = { class: "time-val" }, Gr = { class: "mobile-sheet" }, Kr = { class: "picker-header" }, qr = { class: "header-nav" }, Jr = { class: "header-nav" }, Yr = { class: "picker-body" }, Xr = { class: "weekday-grid" }, Zr = { class: "day-grid" }, Qr = {
|
|
2043
2227
|
key: 1,
|
|
2044
2228
|
class: "year-grid"
|
|
2045
|
-
},
|
|
2229
|
+
}, $r = {
|
|
2046
2230
|
key: 0,
|
|
2047
2231
|
class: "time-section"
|
|
2048
|
-
},
|
|
2232
|
+
}, ei = { class: "time-sliders" }, ti = {
|
|
2049
2233
|
key: 0,
|
|
2050
2234
|
class: "time-row"
|
|
2051
|
-
},
|
|
2235
|
+
}, ni = ["value"], ri = { class: "time-val" }, ii = {
|
|
2052
2236
|
key: 1,
|
|
2053
2237
|
class: "time-row"
|
|
2054
|
-
},
|
|
2238
|
+
}, ai = ["value"], oi = { class: "time-val" }, si = { class: "range-modal" }, ci = { class: "range-body" }, li = {
|
|
2055
2239
|
key: 0,
|
|
2056
2240
|
class: "range-sep"
|
|
2057
|
-
},
|
|
2241
|
+
}, ui = { class: "range-cal" }, di = { class: "picker-header" }, fi = { class: "header-nav" }, pi = {
|
|
2058
2242
|
key: 1,
|
|
2059
2243
|
class: "header-nav-placeholder"
|
|
2060
|
-
},
|
|
2244
|
+
}, mi = { class: "header-title no-click" }, hi = { class: "header-nav" }, gi = {
|
|
2061
2245
|
key: 1,
|
|
2062
2246
|
class: "header-nav-placeholder"
|
|
2063
|
-
},
|
|
2247
|
+
}, _i = { class: "weekday-grid" }, vi = { class: "day-grid range-day-grid" }, yi = ["onClick", "onMouseenter"], bi = { class: "range-footer" }, xi = { class: "range-display" }, Si = { class: "mobile-sheet" }, Ci = {
|
|
2064
2248
|
class: "picker-header",
|
|
2065
2249
|
style: { "margin-top": "8px" }
|
|
2066
|
-
},
|
|
2250
|
+
}, wi = { class: "header-nav" }, Ti = { class: "header-title no-click" }, Ei = { class: "header-nav" }, Di = { class: "weekday-grid" }, Oi = { class: "day-grid range-day-grid" }, ki = ["onClick"], Ai = { class: "range-footer" }, ji = { class: "range-display" }, Mi = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
2067
2251
|
__name: "NDatePicker",
|
|
2068
2252
|
props: {
|
|
2069
2253
|
modelValue: { default: "" },
|
|
@@ -2140,8 +2324,8 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2140
2324
|
"四",
|
|
2141
2325
|
"五",
|
|
2142
2326
|
"六"
|
|
2143
|
-
], P = /* @__PURE__ */ new Date(),
|
|
2144
|
-
function
|
|
2327
|
+
], P = /* @__PURE__ */ new Date(), F = P.getFullYear(), I = P.getMonth(), ee = P.getDate();
|
|
2328
|
+
function te(e, t) {
|
|
2145
2329
|
let n = new Date(e, t, 1).getDay(), r = new Date(e, t + 1, 0).getDate(), i = new Date(e, t, 0).getDate(), a = [];
|
|
2146
2330
|
for (let r = n - 1; r >= 0; r--) {
|
|
2147
2331
|
let n = t === 0 ? 11 : t - 1, o = t === 0 ? e - 1 : e;
|
|
@@ -2167,30 +2351,30 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2167
2351
|
});
|
|
2168
2352
|
return a;
|
|
2169
2353
|
}
|
|
2170
|
-
function
|
|
2354
|
+
function L(e, t) {
|
|
2171
2355
|
return e.year === t.year ? e.month === t.month ? e.day - t.day : e.month - t.month : e.year - t.year;
|
|
2172
2356
|
}
|
|
2173
2357
|
function R(e) {
|
|
2174
2358
|
return String(e).padStart(2, "0");
|
|
2175
2359
|
}
|
|
2176
|
-
let B = C("date"), V = C(/* @__PURE__ */ new Date()), H = C(null), U = C(0), W = C(0), ne = null, re = null, G = i(() => V.value.getFullYear()),
|
|
2360
|
+
let B = C("date"), V = C(/* @__PURE__ */ new Date()), H = C(null), U = C(0), W = C(0), ne = null, re = null, G = i(() => V.value.getFullYear()), K = i(() => V.value.getMonth()), ie = C(Math.floor((/* @__PURE__ */ new Date()).getFullYear() / 12) * 12), q = i(() => {
|
|
2177
2361
|
let e = [];
|
|
2178
|
-
for (let t = 0; t < 12; t++) e.push(
|
|
2362
|
+
for (let t = 0; t < 12; t++) e.push(ie.value + t);
|
|
2179
2363
|
return e;
|
|
2180
2364
|
});
|
|
2181
2365
|
A(G, (e) => {
|
|
2182
|
-
|
|
2366
|
+
ie.value = Math.floor(e / 12) * 12;
|
|
2183
2367
|
}, { immediate: !0 }), A(() => t.modelValue, (e) => {
|
|
2184
2368
|
if (!e) return;
|
|
2185
2369
|
let t = p(String(e));
|
|
2186
2370
|
t && (V.value = new Date(t.year, t.month, 1));
|
|
2187
2371
|
}, { immediate: !0 });
|
|
2188
|
-
let
|
|
2372
|
+
let ae = i(() => te(G.value, K.value)), oe = i(() => {
|
|
2189
2373
|
if (!t.modelValue) return "";
|
|
2190
2374
|
let e = p(String(t.modelValue));
|
|
2191
2375
|
return e ? u(e.year, e.month, e.day, e.hour, e.min) : "";
|
|
2192
|
-
}),
|
|
2193
|
-
function
|
|
2376
|
+
}), se = i(() => t.range ? t.start && t.end ? `${t.start} → ${t.end}` : t.start ? `${t.start} → ...` : "" : oe.value);
|
|
2377
|
+
function ce() {
|
|
2194
2378
|
let e = p(String(t.modelValue));
|
|
2195
2379
|
e ? (V.value = new Date(e.year, e.month, 1), U.value = e.hour, W.value = e.min, H.value = _.value ? {
|
|
2196
2380
|
year: e.year,
|
|
@@ -2199,55 +2383,55 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2199
2383
|
isCurrentMonth: !0
|
|
2200
2384
|
} : null) : (U.value = 0, W.value = 0, H.value = null), B.value = "date";
|
|
2201
2385
|
}
|
|
2202
|
-
function
|
|
2386
|
+
function le(e) {
|
|
2203
2387
|
if (!t.modelValue) return !1;
|
|
2204
2388
|
let n = p(String(t.modelValue));
|
|
2205
2389
|
return n ? n.year === e.year && n.month === e.month && n.day === e.day : !1;
|
|
2206
2390
|
}
|
|
2207
|
-
function
|
|
2208
|
-
return
|
|
2391
|
+
function ue(e) {
|
|
2392
|
+
return F === e.year && I === e.month && ee === e.day;
|
|
2209
2393
|
}
|
|
2210
|
-
function
|
|
2211
|
-
return _.value ? H.value !== null && H.value.year === e.year && H.value.month === e.month && H.value.day === e.day :
|
|
2394
|
+
function de(e) {
|
|
2395
|
+
return _.value ? H.value !== null && H.value.year === e.year && H.value.month === e.month && H.value.day === e.day : le(e);
|
|
2212
2396
|
}
|
|
2213
|
-
function
|
|
2397
|
+
function fe(e) {
|
|
2214
2398
|
let t = u(e.year, e.month, e.day, U.value, W.value);
|
|
2215
2399
|
l("update:modelValue", t), l("change", t);
|
|
2216
2400
|
}
|
|
2217
|
-
function
|
|
2218
|
-
if (_.value) H.value = { ...e }, V.value = new Date(e.year, e.month, 1),
|
|
2401
|
+
function pe(e) {
|
|
2402
|
+
if (_.value) H.value = { ...e }, V.value = new Date(e.year, e.month, 1), fe(e);
|
|
2219
2403
|
else {
|
|
2220
2404
|
let t = u(e.year, e.month, e.day, 0, 0);
|
|
2221
2405
|
l("update:modelValue", t), l("change", t), Be();
|
|
2222
2406
|
}
|
|
2223
2407
|
}
|
|
2224
|
-
function
|
|
2225
|
-
V.value = new Date(e,
|
|
2408
|
+
function me(e) {
|
|
2409
|
+
V.value = new Date(e, K.value, 1), B.value = "date";
|
|
2226
2410
|
}
|
|
2227
|
-
function
|
|
2228
|
-
V.value = new Date(G.value,
|
|
2411
|
+
function he(e) {
|
|
2412
|
+
V.value = new Date(G.value, K.value + e, 1);
|
|
2229
2413
|
}
|
|
2230
|
-
function
|
|
2231
|
-
B.value === "year" ?
|
|
2414
|
+
function ge(e) {
|
|
2415
|
+
B.value === "year" ? ie.value += e * 12 : V.value = new Date(G.value + e, K.value, 1);
|
|
2232
2416
|
}
|
|
2233
|
-
function
|
|
2234
|
-
e === "H" ? U.value = Math.max(0, Math.min(23, U.value + t)) : W.value = Math.max(0, Math.min(59, W.value + t)), H.value &&
|
|
2417
|
+
function _e(e, t) {
|
|
2418
|
+
e === "H" ? U.value = Math.max(0, Math.min(23, U.value + t)) : W.value = Math.max(0, Math.min(59, W.value + t)), H.value && fe(H.value);
|
|
2235
2419
|
}
|
|
2236
|
-
function
|
|
2237
|
-
|
|
2238
|
-
re = setInterval(() =>
|
|
2420
|
+
function ve(e, t) {
|
|
2421
|
+
_e(e, t), ne = setTimeout(() => {
|
|
2422
|
+
re = setInterval(() => _e(e, t), 100);
|
|
2239
2423
|
}, 300);
|
|
2240
2424
|
}
|
|
2241
|
-
function
|
|
2425
|
+
function J() {
|
|
2242
2426
|
ne &&= (clearTimeout(ne), null), re &&= (clearInterval(re), null);
|
|
2243
2427
|
}
|
|
2244
|
-
function
|
|
2428
|
+
function ye(e, t) {
|
|
2245
2429
|
let n = parseInt(e.target.value);
|
|
2246
|
-
t === "H" ? U.value = n : W.value = n, H.value &&
|
|
2430
|
+
t === "H" ? U.value = n : W.value = n, H.value && fe(H.value);
|
|
2247
2431
|
}
|
|
2248
|
-
let
|
|
2249
|
-
year:
|
|
2250
|
-
month:
|
|
2432
|
+
let be = C(F), Y = C(I), X = C(null), xe = C(null), Se = C(null), Z = C(null), Ce = i(() => !!xe.value && !!Se.value), we = i(() => Y.value === 11 ? be.value + 1 : be.value), Te = i(() => Y.value === 11 ? 0 : Y.value + 1), Ee = i(() => te(be.value, Y.value)), De = i(() => te(we.value, Te.value)), Oe = i(() => [{
|
|
2433
|
+
year: be.value,
|
|
2434
|
+
month: Y.value,
|
|
2251
2435
|
days: Ee.value,
|
|
2252
2436
|
isLeft: !0
|
|
2253
2437
|
}, {
|
|
@@ -2265,49 +2449,49 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2265
2449
|
isCurrentMonth: !0
|
|
2266
2450
|
} : null;
|
|
2267
2451
|
}
|
|
2268
|
-
let Ae = i(() =>
|
|
2269
|
-
if (
|
|
2270
|
-
let e =
|
|
2452
|
+
let Ae = i(() => X.value && Z.value ? L(X.value, Z.value) <= 0 ? X.value : Z.value : xe.value ?? ke(t.start)), je = i(() => X.value && Z.value ? L(X.value, Z.value) <= 0 ? Z.value : X.value : Se.value ?? ke(t.end)), Me = i(() => {
|
|
2453
|
+
if (X.value) {
|
|
2454
|
+
let e = X.value;
|
|
2271
2455
|
return `${e.year}-${R(e.month + 1)}-${R(e.day)}`;
|
|
2272
2456
|
}
|
|
2273
|
-
if (
|
|
2274
|
-
let e =
|
|
2457
|
+
if (xe.value) {
|
|
2458
|
+
let e = xe.value;
|
|
2275
2459
|
return `${e.year}-${R(e.month + 1)}-${R(e.day)}`;
|
|
2276
2460
|
}
|
|
2277
2461
|
return t.start;
|
|
2278
2462
|
}), Ne = i(() => {
|
|
2279
|
-
if (
|
|
2280
|
-
if (
|
|
2281
|
-
let e =
|
|
2463
|
+
if (X.value) return "";
|
|
2464
|
+
if (Se.value) {
|
|
2465
|
+
let e = Se.value;
|
|
2282
2466
|
return `${e.year}-${R(e.month + 1)}-${R(e.day)}`;
|
|
2283
2467
|
}
|
|
2284
2468
|
return t.end;
|
|
2285
2469
|
});
|
|
2286
2470
|
function Pe() {
|
|
2287
2471
|
let e = p(t.start) ?? {
|
|
2288
|
-
year:
|
|
2289
|
-
month:
|
|
2472
|
+
year: F,
|
|
2473
|
+
month: I,
|
|
2290
2474
|
day: 1,
|
|
2291
2475
|
hour: 0,
|
|
2292
2476
|
min: 0
|
|
2293
2477
|
};
|
|
2294
|
-
|
|
2478
|
+
be.value = e.year, Y.value = e.month, xe.value = ke(t.start), Se.value = ke(t.end), X.value = null, Z.value = null;
|
|
2295
2479
|
}
|
|
2296
2480
|
function Q() {
|
|
2297
|
-
|
|
2481
|
+
Y.value === 0 ? (be.value--, Y.value = 11) : Y.value--;
|
|
2298
2482
|
}
|
|
2299
2483
|
function Fe() {
|
|
2300
|
-
|
|
2484
|
+
Y.value === 11 ? (be.value++, Y.value = 0) : Y.value++;
|
|
2301
2485
|
}
|
|
2302
2486
|
function Ie(e) {
|
|
2303
|
-
if (!
|
|
2487
|
+
if (!X.value) X.value = { ...e }, xe.value = null, Se.value = null;
|
|
2304
2488
|
else {
|
|
2305
|
-
let t =
|
|
2306
|
-
|
|
2489
|
+
let t = X.value, [n, r] = L(t, e) <= 0 ? [t, e] : [e, t];
|
|
2490
|
+
xe.value = n, Se.value = r, X.value = null, Z.value = null;
|
|
2307
2491
|
}
|
|
2308
2492
|
}
|
|
2309
2493
|
function Le(e) {
|
|
2310
|
-
let t = e.year ===
|
|
2494
|
+
let t = e.year === F && e.month === I && e.day === ee, n = X.value && e.year === X.value.year && e.month === X.value.month && e.day === X.value.day, r = Ae.value, i = je.value, a = r && e.year === r.year && e.month === r.month && e.day === r.day, o = i && e.year === i.year && e.month === i.month && e.day === i.day, s = r && i && L(e, r) > 0 && L(e, i) < 0;
|
|
2311
2495
|
return {
|
|
2312
2496
|
"is-other-month": !e.isCurrentMonth,
|
|
2313
2497
|
"is-today": t && !a && !o,
|
|
@@ -2318,15 +2502,15 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2318
2502
|
};
|
|
2319
2503
|
}
|
|
2320
2504
|
function Re() {
|
|
2321
|
-
if (!
|
|
2322
|
-
let e =
|
|
2505
|
+
if (!xe.value || !Se.value) return;
|
|
2506
|
+
let e = xe.value, t = Se.value, n = `${e.year}-${R(e.month + 1)}-${R(e.day)}`, r = `${t.year}-${R(t.month + 1)}-${R(t.day)}`;
|
|
2323
2507
|
l("update:start", n), l("update:end", r), l("change", n, r), Be();
|
|
2324
2508
|
}
|
|
2325
2509
|
function ze() {
|
|
2326
|
-
t.disabled || (b.value || (t.range ? Pe() :
|
|
2510
|
+
t.disabled || (b.value || (t.range ? Pe() : ce()), b.value = !b.value);
|
|
2327
2511
|
}
|
|
2328
2512
|
function Be() {
|
|
2329
|
-
b.value = !1,
|
|
2513
|
+
b.value = !1, X.value = null, Z.value = null;
|
|
2330
2514
|
}
|
|
2331
2515
|
function Ve() {
|
|
2332
2516
|
B.value = B.value === "date" ? "year" : "date";
|
|
@@ -2338,11 +2522,11 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2338
2522
|
y(() => {
|
|
2339
2523
|
document.addEventListener("mousedown", He), window.addEventListener("resize", O);
|
|
2340
2524
|
}), v(() => {
|
|
2341
|
-
document.removeEventListener("mousedown", He), window.removeEventListener("resize", O), D && clearTimeout(D),
|
|
2525
|
+
document.removeEventListener("mousedown", He), window.removeEventListener("resize", O), D && clearTimeout(D), J();
|
|
2342
2526
|
});
|
|
2343
2527
|
let Ue = (e) => {
|
|
2344
2528
|
if (e.stopPropagation(), t.range) {
|
|
2345
|
-
|
|
2529
|
+
xe.value = null, Se.value = null, X.value = null, Z.value = null, l("update:start", ""), l("update:end", ""), l("change", "", ""), l("clear");
|
|
2346
2530
|
return;
|
|
2347
2531
|
}
|
|
2348
2532
|
l("update:modelValue", ""), l("change", ""), l("clear");
|
|
@@ -2352,14 +2536,14 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2352
2536
|
ref: S,
|
|
2353
2537
|
class: "datepicker"
|
|
2354
2538
|
}, [
|
|
2355
|
-
t.title ? (x(), s("label",
|
|
2539
|
+
t.title ? (x(), s("label", Or, E(t.title), 1)) : o("", !0),
|
|
2356
2540
|
c("div", { class: g(["date-picker", {
|
|
2357
2541
|
open: b.value && !t.range && !T.value,
|
|
2358
2542
|
disabled: t.disabled
|
|
2359
2543
|
}]) }, [c("div", {
|
|
2360
2544
|
class: "picker-trigger",
|
|
2361
2545
|
onClick: ze
|
|
2362
|
-
}, [c("span", { class: g(["text", { placeholder: !
|
|
2546
|
+
}, [c("span", { class: g(["text", { placeholder: !se.value }]) }, E(se.value || t.placeholder), 3), t.clearable && se.value ? (x(), a(z, {
|
|
2363
2547
|
key: 0,
|
|
2364
2548
|
variant: "none",
|
|
2365
2549
|
square: "",
|
|
@@ -2380,12 +2564,12 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2380
2564
|
}, [c("path", { d: "M18 6 6 18" }), c("path", { d: "m6 6 12 12" })], -1)]]),
|
|
2381
2565
|
_: 1
|
|
2382
2566
|
})) : o("", !0)]), f(n, { name: "fade" }, {
|
|
2383
|
-
default: j(() => [b.value && !t.range && !T.value ? (x(), s("div",
|
|
2384
|
-
c("div",
|
|
2385
|
-
c("div",
|
|
2567
|
+
default: j(() => [b.value && !t.range && !T.value ? (x(), s("div", kr, [
|
|
2568
|
+
c("div", Ar, [
|
|
2569
|
+
c("div", jr, [f(z, {
|
|
2386
2570
|
variant: "ghost",
|
|
2387
2571
|
square: "",
|
|
2388
|
-
onClick: i[0] ||= (e) =>
|
|
2572
|
+
onClick: i[0] ||= (e) => ge(-1)
|
|
2389
2573
|
}, {
|
|
2390
2574
|
default: j(() => [...i[21] ||= [c("svg", {
|
|
2391
2575
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2403,7 +2587,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2403
2587
|
key: 0,
|
|
2404
2588
|
variant: "ghost",
|
|
2405
2589
|
square: "",
|
|
2406
|
-
onClick: i[1] ||= (e) =>
|
|
2590
|
+
onClick: i[1] ||= (e) => he(-1)
|
|
2407
2591
|
}, {
|
|
2408
2592
|
default: j(() => [...i[22] ||= [c("svg", {
|
|
2409
2593
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2421,12 +2605,12 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2421
2605
|
c("div", {
|
|
2422
2606
|
class: "header-title",
|
|
2423
2607
|
onClick: Ve
|
|
2424
|
-
}, [B.value === "date" ? (x(), s(e, { key: 0 }, [d(E(k[
|
|
2425
|
-
c("div",
|
|
2608
|
+
}, [B.value === "date" ? (x(), s(e, { key: 0 }, [d(E(k[K.value]) + " " + E(G.value), 1)], 64)) : (x(), s(e, { key: 1 }, [d(E(q.value[0]) + " - " + E(q.value[q.value.length - 1]), 1)], 64))]),
|
|
2609
|
+
c("div", Mr, [B.value === "date" ? (x(), a(z, {
|
|
2426
2610
|
key: 0,
|
|
2427
2611
|
variant: "ghost",
|
|
2428
2612
|
square: "",
|
|
2429
|
-
onClick: i[2] ||= (e) =>
|
|
2613
|
+
onClick: i[2] ||= (e) => he(1)
|
|
2430
2614
|
}, {
|
|
2431
2615
|
default: j(() => [...i[23] ||= [c("svg", {
|
|
2432
2616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2443,7 +2627,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2443
2627
|
})) : o("", !0), f(z, {
|
|
2444
2628
|
variant: "ghost",
|
|
2445
2629
|
square: "",
|
|
2446
|
-
onClick: i[3] ||= (e) =>
|
|
2630
|
+
onClick: i[3] ||= (e) => ge(1)
|
|
2447
2631
|
}, {
|
|
2448
2632
|
default: j(() => [...i[24] ||= [c("svg", {
|
|
2449
2633
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2459,16 +2643,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2459
2643
|
_: 1
|
|
2460
2644
|
})])
|
|
2461
2645
|
]),
|
|
2462
|
-
c("div",
|
|
2646
|
+
c("div", Nr, [B.value === "date" ? (x(), s(e, { key: 0 }, [c("div", Pr, [(x(), s(e, null, w(M, (e) => c("span", {
|
|
2463
2647
|
key: e,
|
|
2464
2648
|
class: "weekday"
|
|
2465
|
-
}, E(e), 1)), 64))]), c("div",
|
|
2649
|
+
}, E(e), 1)), 64))]), c("div", Fr, [(x(!0), s(e, null, w(ae.value, (e, t) => (x(), a(z, {
|
|
2466
2650
|
key: t,
|
|
2467
|
-
variant:
|
|
2468
|
-
intent:
|
|
2651
|
+
variant: de(e) ? "solid" : ue(e) ? "mute" : "ghost",
|
|
2652
|
+
intent: de(e) || ue(e) ? "primary" : "none",
|
|
2469
2653
|
class: g(["day-cell", { "is-not-current": !e.isCurrentMonth }]),
|
|
2470
2654
|
padding: "0",
|
|
2471
|
-
onClick: (t) =>
|
|
2655
|
+
onClick: (t) => pe(e)
|
|
2472
2656
|
}, {
|
|
2473
2657
|
default: j(() => [d(E(e.day), 1)]),
|
|
2474
2658
|
_: 2
|
|
@@ -2477,12 +2661,12 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2477
2661
|
"intent",
|
|
2478
2662
|
"class",
|
|
2479
2663
|
"onClick"
|
|
2480
|
-
]))), 128))])], 64)) : (x(), s("div",
|
|
2664
|
+
]))), 128))])], 64)) : (x(), s("div", Ir, [(x(!0), s(e, null, w(q.value, (e) => (x(), a(z, {
|
|
2481
2665
|
key: e,
|
|
2482
2666
|
variant: e === G.value ? "solid" : "ghost",
|
|
2483
2667
|
intent: e === G.value ? "primary" : "none",
|
|
2484
2668
|
class: "year-cell",
|
|
2485
|
-
onClick: (t) =>
|
|
2669
|
+
onClick: (t) => me(e)
|
|
2486
2670
|
}, {
|
|
2487
2671
|
default: j(() => [d(E(e), 1)]),
|
|
2488
2672
|
_: 2
|
|
@@ -2491,16 +2675,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2491
2675
|
"intent",
|
|
2492
2676
|
"onClick"
|
|
2493
2677
|
]))), 128))]))]),
|
|
2494
|
-
_.value && B.value === "date" ? (x(), s("div",
|
|
2678
|
+
_.value && B.value === "date" ? (x(), s("div", Lr, [c("div", Rr, [m.value ? (x(), s("div", zr, [
|
|
2495
2679
|
i[27] ||= c("span", { class: "time-label" }, "時", -1),
|
|
2496
2680
|
f(z, {
|
|
2497
2681
|
variant: "ghost",
|
|
2498
2682
|
square: "",
|
|
2499
2683
|
size: "sm",
|
|
2500
2684
|
class: "time-step",
|
|
2501
|
-
onMousedown: i[4] ||= N((e) =>
|
|
2502
|
-
onMouseup:
|
|
2503
|
-
onMouseleave:
|
|
2685
|
+
onMousedown: i[4] ||= N((e) => ve("H", -1), ["prevent"]),
|
|
2686
|
+
onMouseup: J,
|
|
2687
|
+
onMouseleave: J
|
|
2504
2688
|
}, {
|
|
2505
2689
|
default: j(() => [...i[25] ||= [c("svg", {
|
|
2506
2690
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2521,16 +2705,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2521
2705
|
min: "0",
|
|
2522
2706
|
max: "23",
|
|
2523
2707
|
value: U.value,
|
|
2524
|
-
onInput: i[5] ||= (e) =>
|
|
2525
|
-
}, null, 40,
|
|
2708
|
+
onInput: i[5] ||= (e) => ye(e, "H")
|
|
2709
|
+
}, null, 40, Br),
|
|
2526
2710
|
f(z, {
|
|
2527
2711
|
variant: "ghost",
|
|
2528
2712
|
square: "",
|
|
2529
2713
|
size: "sm",
|
|
2530
2714
|
class: "time-step",
|
|
2531
|
-
onMousedown: i[6] ||= N((e) =>
|
|
2532
|
-
onMouseup:
|
|
2533
|
-
onMouseleave:
|
|
2715
|
+
onMousedown: i[6] ||= N((e) => ve("H", 1), ["prevent"]),
|
|
2716
|
+
onMouseup: J,
|
|
2717
|
+
onMouseleave: J
|
|
2534
2718
|
}, {
|
|
2535
2719
|
default: j(() => [...i[26] ||= [c("svg", {
|
|
2536
2720
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2545,17 +2729,17 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2545
2729
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2546
2730
|
_: 1
|
|
2547
2731
|
}),
|
|
2548
|
-
c("span",
|
|
2549
|
-
])) : o("", !0), h.value ? (x(), s("div",
|
|
2732
|
+
c("span", Vr, E(R(U.value)), 1)
|
|
2733
|
+
])) : o("", !0), h.value ? (x(), s("div", Hr, [
|
|
2550
2734
|
i[30] ||= c("span", { class: "time-label" }, "分", -1),
|
|
2551
2735
|
f(z, {
|
|
2552
2736
|
variant: "ghost",
|
|
2553
2737
|
square: "",
|
|
2554
2738
|
size: "sm",
|
|
2555
2739
|
class: "time-step",
|
|
2556
|
-
onMousedown: i[7] ||= N((e) =>
|
|
2557
|
-
onMouseup:
|
|
2558
|
-
onMouseleave:
|
|
2740
|
+
onMousedown: i[7] ||= N((e) => ve("m", -1), ["prevent"]),
|
|
2741
|
+
onMouseup: J,
|
|
2742
|
+
onMouseleave: J
|
|
2559
2743
|
}, {
|
|
2560
2744
|
default: j(() => [...i[28] ||= [c("svg", {
|
|
2561
2745
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2576,16 +2760,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2576
2760
|
min: "0",
|
|
2577
2761
|
max: "59",
|
|
2578
2762
|
value: W.value,
|
|
2579
|
-
onInput: i[8] ||= (e) =>
|
|
2580
|
-
}, null, 40,
|
|
2763
|
+
onInput: i[8] ||= (e) => ye(e, "m")
|
|
2764
|
+
}, null, 40, Ur),
|
|
2581
2765
|
f(z, {
|
|
2582
2766
|
variant: "ghost",
|
|
2583
2767
|
square: "",
|
|
2584
2768
|
size: "sm",
|
|
2585
2769
|
class: "time-step",
|
|
2586
|
-
onMousedown: i[9] ||= N((e) =>
|
|
2587
|
-
onMouseup:
|
|
2588
|
-
onMouseleave:
|
|
2770
|
+
onMousedown: i[9] ||= N((e) => ve("m", 1), ["prevent"]),
|
|
2771
|
+
onMouseup: J,
|
|
2772
|
+
onMouseleave: J
|
|
2589
2773
|
}, {
|
|
2590
2774
|
default: j(() => [...i[29] ||= [c("svg", {
|
|
2591
2775
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2600,7 +2784,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2600
2784
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2601
2785
|
_: 1
|
|
2602
2786
|
}),
|
|
2603
|
-
c("span",
|
|
2787
|
+
c("span", Wr, E(R(W.value)), 1)
|
|
2604
2788
|
])) : o("", !0)])])) : o("", !0)
|
|
2605
2789
|
])) : o("", !0)]),
|
|
2606
2790
|
_: 1
|
|
@@ -2610,13 +2794,13 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2610
2794
|
key: 0,
|
|
2611
2795
|
class: "mobile-overlay",
|
|
2612
2796
|
onClick: N(Be, ["self"])
|
|
2613
|
-
}, [c("div",
|
|
2797
|
+
}, [c("div", Gr, [
|
|
2614
2798
|
i[41] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
2615
|
-
c("div",
|
|
2616
|
-
c("div",
|
|
2799
|
+
c("div", Kr, [
|
|
2800
|
+
c("div", qr, [f(z, {
|
|
2617
2801
|
variant: "ghost",
|
|
2618
2802
|
square: "",
|
|
2619
|
-
onClick: i[10] ||= (e) =>
|
|
2803
|
+
onClick: i[10] ||= (e) => ge(-1)
|
|
2620
2804
|
}, {
|
|
2621
2805
|
default: j(() => [...i[31] ||= [c("svg", {
|
|
2622
2806
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2634,7 +2818,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2634
2818
|
key: 0,
|
|
2635
2819
|
variant: "ghost",
|
|
2636
2820
|
square: "",
|
|
2637
|
-
onClick: i[11] ||= (e) =>
|
|
2821
|
+
onClick: i[11] ||= (e) => he(-1)
|
|
2638
2822
|
}, {
|
|
2639
2823
|
default: j(() => [...i[32] ||= [c("svg", {
|
|
2640
2824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2652,12 +2836,12 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2652
2836
|
c("div", {
|
|
2653
2837
|
class: "header-title",
|
|
2654
2838
|
onClick: Ve
|
|
2655
|
-
}, [B.value === "date" ? (x(), s(e, { key: 0 }, [d(E(k[
|
|
2656
|
-
c("div",
|
|
2839
|
+
}, [B.value === "date" ? (x(), s(e, { key: 0 }, [d(E(k[K.value]) + " " + E(G.value), 1)], 64)) : (x(), s(e, { key: 1 }, [d(E(q.value[0]) + " - " + E(q.value[q.value.length - 1]), 1)], 64))]),
|
|
2840
|
+
c("div", Jr, [B.value === "date" ? (x(), a(z, {
|
|
2657
2841
|
key: 0,
|
|
2658
2842
|
variant: "ghost",
|
|
2659
2843
|
square: "",
|
|
2660
|
-
onClick: i[12] ||= (e) =>
|
|
2844
|
+
onClick: i[12] ||= (e) => he(1)
|
|
2661
2845
|
}, {
|
|
2662
2846
|
default: j(() => [...i[33] ||= [c("svg", {
|
|
2663
2847
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2674,7 +2858,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2674
2858
|
})) : o("", !0), f(z, {
|
|
2675
2859
|
variant: "ghost",
|
|
2676
2860
|
square: "",
|
|
2677
|
-
onClick: i[13] ||= (e) =>
|
|
2861
|
+
onClick: i[13] ||= (e) => ge(1)
|
|
2678
2862
|
}, {
|
|
2679
2863
|
default: j(() => [...i[34] ||= [c("svg", {
|
|
2680
2864
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2690,16 +2874,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2690
2874
|
_: 1
|
|
2691
2875
|
})])
|
|
2692
2876
|
]),
|
|
2693
|
-
c("div",
|
|
2877
|
+
c("div", Yr, [B.value === "date" ? (x(), s(e, { key: 0 }, [c("div", Xr, [(x(), s(e, null, w(M, (e) => c("span", {
|
|
2694
2878
|
key: e,
|
|
2695
2879
|
class: "weekday"
|
|
2696
|
-
}, E(e), 1)), 64))]), c("div",
|
|
2880
|
+
}, E(e), 1)), 64))]), c("div", Zr, [(x(!0), s(e, null, w(ae.value, (e, t) => (x(), a(z, {
|
|
2697
2881
|
key: t,
|
|
2698
|
-
variant:
|
|
2699
|
-
intent:
|
|
2882
|
+
variant: de(e) ? "solid" : ue(e) ? "mute" : "ghost",
|
|
2883
|
+
intent: de(e) || ue(e) ? "primary" : "none",
|
|
2700
2884
|
class: g(["day-cell", { "is-not-current": !e.isCurrentMonth }]),
|
|
2701
2885
|
padding: "0",
|
|
2702
|
-
onClick: (t) =>
|
|
2886
|
+
onClick: (t) => pe(e)
|
|
2703
2887
|
}, {
|
|
2704
2888
|
default: j(() => [d(E(e.day), 1)]),
|
|
2705
2889
|
_: 2
|
|
@@ -2708,12 +2892,12 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2708
2892
|
"intent",
|
|
2709
2893
|
"class",
|
|
2710
2894
|
"onClick"
|
|
2711
|
-
]))), 128))])], 64)) : (x(), s("div",
|
|
2895
|
+
]))), 128))])], 64)) : (x(), s("div", Qr, [(x(!0), s(e, null, w(q.value, (e) => (x(), a(z, {
|
|
2712
2896
|
key: e,
|
|
2713
2897
|
variant: e === G.value ? "solid" : "ghost",
|
|
2714
2898
|
intent: e === G.value ? "primary" : "none",
|
|
2715
2899
|
class: "year-cell",
|
|
2716
|
-
onClick: (t) =>
|
|
2900
|
+
onClick: (t) => me(e)
|
|
2717
2901
|
}, {
|
|
2718
2902
|
default: j(() => [d(E(e), 1)]),
|
|
2719
2903
|
_: 2
|
|
@@ -2722,16 +2906,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2722
2906
|
"intent",
|
|
2723
2907
|
"onClick"
|
|
2724
2908
|
]))), 128))]))]),
|
|
2725
|
-
_.value && B.value === "date" ? (x(), s("div",
|
|
2909
|
+
_.value && B.value === "date" ? (x(), s("div", $r, [c("div", ei, [m.value ? (x(), s("div", ti, [
|
|
2726
2910
|
i[37] ||= c("span", { class: "time-label" }, "時", -1),
|
|
2727
2911
|
f(z, {
|
|
2728
2912
|
variant: "ghost",
|
|
2729
2913
|
square: "",
|
|
2730
2914
|
size: "sm",
|
|
2731
2915
|
class: "time-step",
|
|
2732
|
-
onMousedown: i[14] ||= N((e) =>
|
|
2733
|
-
onMouseup:
|
|
2734
|
-
onMouseleave:
|
|
2916
|
+
onMousedown: i[14] ||= N((e) => ve("H", -1), ["prevent"]),
|
|
2917
|
+
onMouseup: J,
|
|
2918
|
+
onMouseleave: J
|
|
2735
2919
|
}, {
|
|
2736
2920
|
default: j(() => [...i[35] ||= [c("svg", {
|
|
2737
2921
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2752,16 +2936,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2752
2936
|
min: "0",
|
|
2753
2937
|
max: "23",
|
|
2754
2938
|
value: U.value,
|
|
2755
|
-
onInput: i[15] ||= (e) =>
|
|
2756
|
-
}, null, 40,
|
|
2939
|
+
onInput: i[15] ||= (e) => ye(e, "H")
|
|
2940
|
+
}, null, 40, ni),
|
|
2757
2941
|
f(z, {
|
|
2758
2942
|
variant: "ghost",
|
|
2759
2943
|
square: "",
|
|
2760
2944
|
size: "sm",
|
|
2761
2945
|
class: "time-step",
|
|
2762
|
-
onMousedown: i[16] ||= N((e) =>
|
|
2763
|
-
onMouseup:
|
|
2764
|
-
onMouseleave:
|
|
2946
|
+
onMousedown: i[16] ||= N((e) => ve("H", 1), ["prevent"]),
|
|
2947
|
+
onMouseup: J,
|
|
2948
|
+
onMouseleave: J
|
|
2765
2949
|
}, {
|
|
2766
2950
|
default: j(() => [...i[36] ||= [c("svg", {
|
|
2767
2951
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2776,17 +2960,17 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2776
2960
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2777
2961
|
_: 1
|
|
2778
2962
|
}),
|
|
2779
|
-
c("span",
|
|
2780
|
-
])) : o("", !0), h.value ? (x(), s("div",
|
|
2963
|
+
c("span", ri, E(R(U.value)), 1)
|
|
2964
|
+
])) : o("", !0), h.value ? (x(), s("div", ii, [
|
|
2781
2965
|
i[40] ||= c("span", { class: "time-label" }, "分", -1),
|
|
2782
2966
|
f(z, {
|
|
2783
2967
|
variant: "ghost",
|
|
2784
2968
|
square: "",
|
|
2785
2969
|
size: "sm",
|
|
2786
2970
|
class: "time-step",
|
|
2787
|
-
onMousedown: i[17] ||= N((e) =>
|
|
2788
|
-
onMouseup:
|
|
2789
|
-
onMouseleave:
|
|
2971
|
+
onMousedown: i[17] ||= N((e) => ve("m", -1), ["prevent"]),
|
|
2972
|
+
onMouseup: J,
|
|
2973
|
+
onMouseleave: J
|
|
2790
2974
|
}, {
|
|
2791
2975
|
default: j(() => [...i[38] ||= [c("svg", {
|
|
2792
2976
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2807,16 +2991,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2807
2991
|
min: "0",
|
|
2808
2992
|
max: "59",
|
|
2809
2993
|
value: W.value,
|
|
2810
|
-
onInput: i[18] ||= (e) =>
|
|
2811
|
-
}, null, 40,
|
|
2994
|
+
onInput: i[18] ||= (e) => ye(e, "m")
|
|
2995
|
+
}, null, 40, ai),
|
|
2812
2996
|
f(z, {
|
|
2813
2997
|
variant: "ghost",
|
|
2814
2998
|
square: "",
|
|
2815
2999
|
size: "sm",
|
|
2816
3000
|
class: "time-step",
|
|
2817
|
-
onMousedown: i[19] ||= N((e) =>
|
|
2818
|
-
onMouseup:
|
|
2819
|
-
onMouseleave:
|
|
3001
|
+
onMousedown: i[19] ||= N((e) => ve("m", 1), ["prevent"]),
|
|
3002
|
+
onMouseup: J,
|
|
3003
|
+
onMouseleave: J
|
|
2820
3004
|
}, {
|
|
2821
3005
|
default: j(() => [...i[39] ||= [c("svg", {
|
|
2822
3006
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2831,7 +3015,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2831
3015
|
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)]]),
|
|
2832
3016
|
_: 1
|
|
2833
3017
|
}),
|
|
2834
|
-
c("span",
|
|
3018
|
+
c("span", oi, E(R(W.value)), 1)
|
|
2835
3019
|
])) : o("", !0)])])) : o("", !0)
|
|
2836
3020
|
])])) : o("", !0)]),
|
|
2837
3021
|
_: 1
|
|
@@ -2841,11 +3025,11 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2841
3025
|
key: 0,
|
|
2842
3026
|
class: "range-overlay",
|
|
2843
3027
|
onClick: N(Be, ["self"])
|
|
2844
|
-
}, [c("div",
|
|
3028
|
+
}, [c("div", si, [
|
|
2845
3029
|
i[46] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
2846
|
-
c("div",
|
|
2847
|
-
c("div",
|
|
2848
|
-
c("div",
|
|
3030
|
+
c("div", ci, [(x(!0), s(e, null, w(Oe.value, (t) => (x(), s(e, { key: t.isLeft ? "left" : "right" }, [t.isLeft ? o("", !0) : (x(), s("div", li)), c("div", ui, [
|
|
3031
|
+
c("div", di, [
|
|
3032
|
+
c("div", fi, [t.isLeft ? (x(), a(z, {
|
|
2849
3033
|
key: 0,
|
|
2850
3034
|
variant: "ghost",
|
|
2851
3035
|
square: "",
|
|
@@ -2863,9 +3047,9 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2863
3047
|
"stroke-linejoin": "round"
|
|
2864
3048
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
2865
3049
|
_: 1
|
|
2866
|
-
})) : (x(), s("div",
|
|
2867
|
-
c("div",
|
|
2868
|
-
c("div",
|
|
3050
|
+
})) : (x(), s("div", pi))]),
|
|
3051
|
+
c("div", mi, E(k[t.month]) + " " + E(t.year), 1),
|
|
3052
|
+
c("div", hi, [t.isLeft ? (x(), s("div", gi)) : (x(), a(z, {
|
|
2869
3053
|
key: 0,
|
|
2870
3054
|
variant: "ghost",
|
|
2871
3055
|
square: "",
|
|
@@ -2885,18 +3069,18 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2885
3069
|
_: 1
|
|
2886
3070
|
}))])
|
|
2887
3071
|
]),
|
|
2888
|
-
c("div",
|
|
3072
|
+
c("div", _i, [(x(), s(e, null, w(M, (e) => c("span", {
|
|
2889
3073
|
key: e,
|
|
2890
3074
|
class: "weekday"
|
|
2891
3075
|
}, E(e), 1)), 64))]),
|
|
2892
|
-
c("div",
|
|
3076
|
+
c("div", vi, [(x(!0), s(e, null, w(t.days, (e, t) => (x(), s("div", {
|
|
2893
3077
|
key: t,
|
|
2894
3078
|
class: g(["range-day", Le(e)]),
|
|
2895
3079
|
onClick: (t) => Ie(e),
|
|
2896
3080
|
onMouseenter: (t) => Z.value = e
|
|
2897
|
-
}, E(e.day), 43,
|
|
3081
|
+
}, E(e.day), 43, yi))), 128))])
|
|
2898
3082
|
])], 64))), 128))]),
|
|
2899
|
-
c("div",
|
|
3083
|
+
c("div", bi, [c("div", xi, [
|
|
2900
3084
|
c("span", { class: g(["range-val", { "is-empty": !Me.value }]) }, E(Me.value || "開始日期"), 3),
|
|
2901
3085
|
i[44] ||= c("span", { class: "range-arrow" }, "→", -1),
|
|
2902
3086
|
c("span", { class: g(["range-val", { "is-empty": !Ne.value }]) }, E(Ne.value || "結束日期"), 3)
|
|
@@ -2918,11 +3102,11 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2918
3102
|
key: 0,
|
|
2919
3103
|
class: "mobile-overlay",
|
|
2920
3104
|
onClick: N(Be, ["self"])
|
|
2921
|
-
}, [c("div",
|
|
3105
|
+
}, [c("div", Si, [
|
|
2922
3106
|
i[51] ||= c("div", { class: "sheet-handle" }, null, -1),
|
|
2923
3107
|
i[52] ||= c("p", { class: "range-modal-title" }, "選擇日期範圍", -1),
|
|
2924
|
-
c("div",
|
|
2925
|
-
c("div",
|
|
3108
|
+
c("div", Ci, [
|
|
3109
|
+
c("div", wi, [f(z, {
|
|
2926
3110
|
variant: "ghost",
|
|
2927
3111
|
square: "",
|
|
2928
3112
|
onClick: Q
|
|
@@ -2940,8 +3124,8 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2940
3124
|
}, [c("path", { d: "m15 18-6-6 6-6" })], -1)]]),
|
|
2941
3125
|
_: 1
|
|
2942
3126
|
})]),
|
|
2943
|
-
c("div",
|
|
2944
|
-
c("div",
|
|
3127
|
+
c("div", Ti, E(k[Y.value]) + " " + E(be.value), 1),
|
|
3128
|
+
c("div", Ei, [f(z, {
|
|
2945
3129
|
variant: "ghost",
|
|
2946
3130
|
square: "",
|
|
2947
3131
|
onClick: Fe
|
|
@@ -2960,16 +3144,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2960
3144
|
_: 1
|
|
2961
3145
|
})])
|
|
2962
3146
|
]),
|
|
2963
|
-
c("div",
|
|
3147
|
+
c("div", Di, [(x(), s(e, null, w(M, (e) => c("span", {
|
|
2964
3148
|
key: e,
|
|
2965
3149
|
class: "weekday"
|
|
2966
3150
|
}, E(e), 1)), 64))]),
|
|
2967
|
-
c("div",
|
|
3151
|
+
c("div", Oi, [(x(!0), s(e, null, w(Ee.value, (e, t) => (x(), s("div", {
|
|
2968
3152
|
key: t,
|
|
2969
3153
|
class: g(["range-day", Le(e)]),
|
|
2970
3154
|
onClick: (t) => Ie(e)
|
|
2971
|
-
}, E(e.day), 11,
|
|
2972
|
-
c("div",
|
|
3155
|
+
}, E(e.day), 11, ki))), 128))]),
|
|
3156
|
+
c("div", Ai, [c("div", ji, [
|
|
2973
3157
|
c("span", { class: g(["range-val", { "is-empty": !Me.value }]) }, E(Me.value || "開始日期"), 3),
|
|
2974
3158
|
i[49] ||= c("span", { class: "range-arrow" }, "→", -1),
|
|
2975
3159
|
c("span", { class: g(["range-val", { "is-empty": !Ne.value }]) }, E(Ne.value || "結束日期"), 3)
|
|
@@ -2988,7 +3172,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
2988
3172
|
})
|
|
2989
3173
|
], 512));
|
|
2990
3174
|
}
|
|
2991
|
-
}), [["__scopeId", "data-v-a16fe255"]]),
|
|
3175
|
+
}), [["__scopeId", "data-v-a16fe255"]]), Ni = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
2992
3176
|
__name: "NTooltip",
|
|
2993
3177
|
props: {
|
|
2994
3178
|
content: { default: "" },
|
|
@@ -3023,10 +3207,10 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
3023
3207
|
_: 3
|
|
3024
3208
|
})], 32));
|
|
3025
3209
|
}
|
|
3026
|
-
}), [["__scopeId", "data-v-7a53ca0a"]]),
|
|
3210
|
+
}), [["__scopeId", "data-v-7a53ca0a"]]), Pi = { class: "modal-header" }, Fi = { class: "modal-title" }, Ii = { class: "modal-content" }, Li = {
|
|
3027
3211
|
key: 0,
|
|
3028
3212
|
class: "modal-footer"
|
|
3029
|
-
},
|
|
3213
|
+
}, Ri = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
3030
3214
|
__name: "NModal",
|
|
3031
3215
|
props: {
|
|
3032
3216
|
show: {
|
|
@@ -3070,7 +3254,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
3070
3254
|
class: "modal-container",
|
|
3071
3255
|
style: _({ width: e.width })
|
|
3072
3256
|
}, [
|
|
3073
|
-
c("header",
|
|
3257
|
+
c("header", Pi, [c("h3", Fi, E(e.title), 1), e.showClose ? (x(), s("button", {
|
|
3074
3258
|
key: 0,
|
|
3075
3259
|
class: "close-btn",
|
|
3076
3260
|
onClick: l
|
|
@@ -3082,16 +3266,16 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
3082
3266
|
fill: "currentColor",
|
|
3083
3267
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
|
|
3084
3268
|
})], -1)]])) : o("", !0)]),
|
|
3085
|
-
c("main",
|
|
3086
|
-
r.$slots.footer ? (x(), s("footer",
|
|
3269
|
+
c("main", Ii, [T(r.$slots, "default", {}, void 0, !0)]),
|
|
3270
|
+
r.$slots.footer ? (x(), s("footer", Li, [T(r.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
3087
3271
|
], 4)], 4)) : o("", !0)]),
|
|
3088
3272
|
_: 3
|
|
3089
3273
|
})]));
|
|
3090
3274
|
}
|
|
3091
|
-
}), [["__scopeId", "data-v-ee2fac3c"]]),
|
|
3275
|
+
}), [["__scopeId", "data-v-ee2fac3c"]]), zi = { class: "drawer-header" }, Bi = { class: "drawer-title" }, Vi = { class: "drawer-body" }, Hi = {
|
|
3092
3276
|
key: 0,
|
|
3093
3277
|
class: "drawer-footer"
|
|
3094
|
-
},
|
|
3278
|
+
}, Ui = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
3095
3279
|
__name: "NDrawer",
|
|
3096
3280
|
props: {
|
|
3097
3281
|
show: {
|
|
@@ -3136,7 +3320,7 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
3136
3320
|
class: g(["drawer-container", [`placement-${e.placement}`]]),
|
|
3137
3321
|
style: _({ width: e.width })
|
|
3138
3322
|
}, [
|
|
3139
|
-
c("header",
|
|
3323
|
+
c("header", zi, [c("h3", Bi, [T(r.$slots, "title", {}, () => [d(E(e.title), 1)], !0)]), e.showClose ? (x(), s("button", {
|
|
3140
3324
|
key: 0,
|
|
3141
3325
|
class: "close-btn",
|
|
3142
3326
|
onClick: l
|
|
@@ -3148,75 +3332,19 @@ var er = { class: "icon-wrap" }, tr = ["innerHTML"], nr = {
|
|
|
3148
3332
|
fill: "currentColor",
|
|
3149
3333
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z"
|
|
3150
3334
|
})], -1)]])) : o("", !0)]),
|
|
3151
|
-
c("main",
|
|
3152
|
-
r.$slots.footer ? (x(), s("footer",
|
|
3335
|
+
c("main", Vi, [T(r.$slots, "default", {}, void 0, !0)]),
|
|
3336
|
+
r.$slots.footer ? (x(), s("footer", Hi, [T(r.$slots, "footer", {}, void 0, !0)])) : o("", !0)
|
|
3153
3337
|
], 6)], 4)) : o("", !0)]),
|
|
3154
3338
|
_: 3
|
|
3155
3339
|
})]));
|
|
3156
3340
|
}
|
|
3157
|
-
}), [["__scopeId", "data-v-f8c0a0bb"]]),
|
|
3158
|
-
function Ii() {
|
|
3159
|
-
let e = function(e, t = {}) {
|
|
3160
|
-
let n = ++Pi;
|
|
3161
|
-
return new Promise((r) => {
|
|
3162
|
-
Fi.push({
|
|
3163
|
-
id: n,
|
|
3164
|
-
type: "alert",
|
|
3165
|
-
message: e,
|
|
3166
|
-
resolve: () => r(),
|
|
3167
|
-
status: t.status ?? "info",
|
|
3168
|
-
title: t.title ?? "",
|
|
3169
|
-
confirmText: t.confirmText ?? "確定"
|
|
3170
|
-
});
|
|
3171
|
-
});
|
|
3172
|
-
};
|
|
3173
|
-
e.success = (t, n = {}) => e(t, {
|
|
3174
|
-
...n,
|
|
3175
|
-
status: "success"
|
|
3176
|
-
}), e.warning = (t, n = {}) => e(t, {
|
|
3177
|
-
...n,
|
|
3178
|
-
status: "warning"
|
|
3179
|
-
}), e.danger = (t, n = {}) => e(t, {
|
|
3180
|
-
...n,
|
|
3181
|
-
status: "danger"
|
|
3182
|
-
}), e.info = (t, n = {}) => e(t, {
|
|
3183
|
-
...n,
|
|
3184
|
-
status: "info"
|
|
3185
|
-
});
|
|
3186
|
-
function t(e, t = {}) {
|
|
3187
|
-
return new Promise((n) => {
|
|
3188
|
-
let r = ++Pi;
|
|
3189
|
-
Fi.push({
|
|
3190
|
-
id: r,
|
|
3191
|
-
type: "confirm",
|
|
3192
|
-
message: e,
|
|
3193
|
-
resolve: n,
|
|
3194
|
-
status: t.status ?? "question",
|
|
3195
|
-
title: t.title ?? "",
|
|
3196
|
-
confirmText: t.confirmText ?? "確定",
|
|
3197
|
-
cancelText: t.cancelText ?? "取消"
|
|
3198
|
-
});
|
|
3199
|
-
});
|
|
3200
|
-
}
|
|
3201
|
-
function n() {
|
|
3202
|
-
for (; Fi.length > 0;) Fi.shift().resolve(!1);
|
|
3203
|
-
}
|
|
3204
|
-
return {
|
|
3205
|
-
alerts: Fi,
|
|
3206
|
-
alert: e,
|
|
3207
|
-
confirm: t,
|
|
3208
|
-
clearAlerts: n
|
|
3209
|
-
};
|
|
3210
|
-
}
|
|
3211
|
-
//#endregion
|
|
3212
|
-
//#region src/components/NAlert.vue?vue&type=script&setup=true&lang.ts
|
|
3213
|
-
var Li = { class: "cards-wrapper" }, Ri = ["innerHTML"], zi = { class: "card-body" }, Bi = {
|
|
3341
|
+
}), [["__scopeId", "data-v-f8c0a0bb"]]), Wi = { class: "cards-wrapper" }, Gi = ["innerHTML"], Ki = { class: "card-body" }, qi = {
|
|
3214
3342
|
key: 0,
|
|
3215
3343
|
class: "card-title"
|
|
3216
|
-
},
|
|
3344
|
+
}, Ji = { class: "card-message" }, Yi = { class: "card-footer" }, Xi = ["onClick"], Zi = ["onClick"], Qi = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
3217
3345
|
__name: "NAlert",
|
|
3218
3346
|
setup(n) {
|
|
3219
|
-
let { alerts: r, clearAlerts: i } =
|
|
3347
|
+
let { alerts: r, clearAlerts: i } = Rt(), l = {
|
|
3220
3348
|
success: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"M8 12l3 3 5-6\"/></svg>",
|
|
3221
3349
|
warning: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg>",
|
|
3222
3350
|
danger: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"72\" height=\"72\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m15 9-6 6\"/><path d=\"m9 9 6 6\"/></svg>",
|
|
@@ -3253,7 +3381,7 @@ var Li = { class: "cards-wrapper" }, Ri = ["innerHTML"], zi = { class: "card-bod
|
|
|
3253
3381
|
}
|
|
3254
3382
|
return y(() => document.addEventListener("keydown", m)), b(() => {
|
|
3255
3383
|
document.removeEventListener("keydown", m), i();
|
|
3256
|
-
}), (n, i) => (x(), a(t, { to: "body" }, [c("div", { class: g(["backdrop", { open: D(r).length > 0 }]) }, null, 2), c("div", { class: g(["alert-stack", { open: D(r).length > 0 }]) }, [c("div",
|
|
3384
|
+
}), (n, i) => (x(), a(t, { to: "body" }, [c("div", { class: g(["backdrop", { open: D(r).length > 0 }]) }, null, 2), c("div", { class: g(["alert-stack", { open: D(r).length > 0 }]) }, [c("div", Wi, [(x(!0), s(e, null, w(D(r), (e, t) => (x(), s("div", {
|
|
3257
3385
|
key: e.id,
|
|
3258
3386
|
class: g(["alert-card", `status-${e.status}`]),
|
|
3259
3387
|
style: _(d(t))
|
|
@@ -3261,22 +3389,22 @@ var Li = { class: "cards-wrapper" }, Ri = ["innerHTML"], zi = { class: "card-bod
|
|
|
3261
3389
|
c("div", {
|
|
3262
3390
|
class: "card-icon",
|
|
3263
3391
|
innerHTML: u(e)
|
|
3264
|
-
}, null, 8,
|
|
3265
|
-
c("div",
|
|
3266
|
-
c("div",
|
|
3392
|
+
}, null, 8, Gi),
|
|
3393
|
+
c("div", Ki, [e.title ? (x(), s("p", qi, E(e.title), 1)) : o("", !0), c("p", Ji, E(e.message), 1)]),
|
|
3394
|
+
c("div", Yi, [e.type === "confirm" ? (x(), s("button", {
|
|
3267
3395
|
key: 0,
|
|
3268
3396
|
class: "btn btn-cancel",
|
|
3269
3397
|
onClick: (t) => p(e)
|
|
3270
|
-
}, E(e.cancelText), 9,
|
|
3398
|
+
}, E(e.cancelText), 9, Xi)) : o("", !0), c("button", {
|
|
3271
3399
|
class: g(["btn btn-confirm", `btn-${e.status}`]),
|
|
3272
3400
|
onClick: (t) => f(e)
|
|
3273
|
-
}, E(e.confirmText), 11,
|
|
3401
|
+
}, E(e.confirmText), 11, Zi)])
|
|
3274
3402
|
], 6))), 128))])], 2)]));
|
|
3275
3403
|
}
|
|
3276
3404
|
}), [["__scopeId", "data-v-20105bbb"]]);
|
|
3277
3405
|
//#endregion
|
|
3278
3406
|
//#region src/composables/useDisclosure.ts
|
|
3279
|
-
function
|
|
3407
|
+
function $i() {
|
|
3280
3408
|
let e = C(!1);
|
|
3281
3409
|
function t() {
|
|
3282
3410
|
e.value = !0;
|
|
@@ -3292,19 +3420,26 @@ function Ki() {
|
|
|
3292
3420
|
}
|
|
3293
3421
|
//#endregion
|
|
3294
3422
|
//#region src/components/NVideoSelect.vue?vue&type=script&setup=true&lang.ts
|
|
3295
|
-
var
|
|
3423
|
+
var ea = {
|
|
3296
3424
|
key: 0,
|
|
3297
3425
|
class: "head"
|
|
3298
|
-
},
|
|
3426
|
+
}, ta = ["textContent"], na = {
|
|
3299
3427
|
key: 1,
|
|
3300
3428
|
class: "count-chip"
|
|
3301
|
-
},
|
|
3429
|
+
}, ra = { class: "grid" }, ia = {
|
|
3430
|
+
key: 0,
|
|
3431
|
+
class: "icon",
|
|
3432
|
+
"aria-hidden": "true"
|
|
3433
|
+
}, aa = ["textContent"], oa = ["textContent"], sa = ["onClick"], ca = ["src"], la = {
|
|
3302
3434
|
key: 1,
|
|
3303
3435
|
class: "placeholder-label"
|
|
3304
|
-
},
|
|
3436
|
+
}, ua = { class: "duration" }, da = { class: "card-body" }, fa = ["title"], pa = { class: "file-meta" }, ma = { key: 0 }, ha = {
|
|
3437
|
+
key: 1,
|
|
3438
|
+
class: "dot-separator"
|
|
3439
|
+
}, ga = { key: 2 }, _a = { class: "card-actions" }, va = ["onClick"], ya = ["disabled", "onClick"], ba = { class: "vi-modal-card" }, xa = { class: "vi-modal-media" }, Sa = ["src"], Ca = {
|
|
3305
3440
|
key: 1,
|
|
3306
3441
|
class: "vi-modal-placeholder"
|
|
3307
|
-
},
|
|
3442
|
+
}, wa = { class: "vi-modal-bar" }, Ta = { class: "vi-modal-info" }, Ea = { class: "modal-name" }, Da = { class: "modal-meta" }, Oa = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
3308
3443
|
__name: "NVideoSelect",
|
|
3309
3444
|
props: {
|
|
3310
3445
|
modelValue: { default: () => [] },
|
|
@@ -3318,6 +3453,10 @@ var qi = {
|
|
|
3318
3453
|
type: Boolean,
|
|
3319
3454
|
default: !1
|
|
3320
3455
|
},
|
|
3456
|
+
readonly: {
|
|
3457
|
+
type: Boolean,
|
|
3458
|
+
default: !1
|
|
3459
|
+
},
|
|
3321
3460
|
title: { default: "" },
|
|
3322
3461
|
showCount: {
|
|
3323
3462
|
type: Boolean,
|
|
@@ -3338,20 +3477,32 @@ var qi = {
|
|
|
3338
3477
|
"error"
|
|
3339
3478
|
],
|
|
3340
3479
|
setup(r, { emit: l }) {
|
|
3341
|
-
let
|
|
3480
|
+
let u = l, p = C(!1), h = C(null), [_, y, b] = $i(), { confirm: S } = Rt(), T = i(() => r.modelValue.length), O = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 1024).toFixed(0) + " KB" : e < 1073741824 ? (e / 1048576).toFixed(1) + " MB" : (e / 1073741824).toFixed(2) + " GB", k = (e) => {
|
|
3342
3481
|
if (e == null || isNaN(e)) return "0:00";
|
|
3343
3482
|
let t = Math.round(e), n = Math.floor(t / 60), r = t % 60;
|
|
3344
3483
|
return n + ":" + (r < 10 ? "0" : "") + r;
|
|
3345
|
-
},
|
|
3484
|
+
}, M = (e) => e.width && e.height ? e.width + "×" + e.height : "—", P = (e) => {
|
|
3485
|
+
if (e.name) return e.name;
|
|
3486
|
+
try {
|
|
3487
|
+
let t = new URL(e.url, window.location.href).pathname;
|
|
3488
|
+
return decodeURIComponent(t.split("/").filter(Boolean).pop() ?? "影片");
|
|
3489
|
+
} catch {
|
|
3490
|
+
return "影片";
|
|
3491
|
+
}
|
|
3492
|
+
}, F = (e) => {
|
|
3493
|
+
e?.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
3494
|
+
}, I = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "v" + Math.random().toString(36).slice(2, 9), ee = (e) => {
|
|
3346
3495
|
let t = r.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
3347
3496
|
if (t.length === 0) return e.type.startsWith("video/");
|
|
3348
3497
|
let n = e.type.toLowerCase(), i = e.name.toLowerCase();
|
|
3349
3498
|
return t.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
|
|
3350
|
-
},
|
|
3499
|
+
}, te = (e) => {
|
|
3351
3500
|
if (!e.url) return;
|
|
3352
3501
|
let t = document.createElement("video");
|
|
3353
3502
|
t.preload = "metadata";
|
|
3354
3503
|
let n = () => {
|
|
3504
|
+
t.removeEventListener("loadedmetadata", i), t.removeEventListener("error", n), t.removeAttribute("src"), t.load();
|
|
3505
|
+
}, i = () => {
|
|
3355
3506
|
if (r.modelValue.some((t) => t.id === e.id)) {
|
|
3356
3507
|
let n = r.modelValue.map((n) => n.id === e.id ? {
|
|
3357
3508
|
...n,
|
|
@@ -3359,38 +3510,44 @@ var qi = {
|
|
|
3359
3510
|
width: t.videoWidth,
|
|
3360
3511
|
height: t.videoHeight
|
|
3361
3512
|
} : n);
|
|
3362
|
-
|
|
3513
|
+
u("update:modelValue", n), u("change", n);
|
|
3363
3514
|
}
|
|
3364
|
-
|
|
3515
|
+
n();
|
|
3365
3516
|
};
|
|
3366
|
-
t.addEventListener("loadedmetadata", n), t.src = e.url;
|
|
3367
|
-
}, L = (
|
|
3368
|
-
|
|
3517
|
+
t.addEventListener("loadedmetadata", i), t.addEventListener("error", n), t.src = e.url;
|
|
3518
|
+
}, L = /* @__PURE__ */ new Set();
|
|
3519
|
+
A(() => r.modelValue, (e) => {
|
|
3520
|
+
e.forEach((e) => {
|
|
3521
|
+
!e.url || L.has(e.id) || (L.add(e.id), (e.duration == null || e.width == null) && te(e));
|
|
3522
|
+
});
|
|
3523
|
+
}, { immediate: !0 });
|
|
3524
|
+
let R = (e) => {
|
|
3525
|
+
if (r.disabled || r.readonly) return;
|
|
3369
3526
|
let t = [], n = !1;
|
|
3370
3527
|
if (Array.prototype.forEach.call(e, (e) => {
|
|
3371
|
-
if (!
|
|
3372
|
-
|
|
3528
|
+
if (!ee(e)) {
|
|
3529
|
+
u("error", {
|
|
3373
3530
|
type: "type",
|
|
3374
3531
|
file: e
|
|
3375
3532
|
});
|
|
3376
3533
|
return;
|
|
3377
3534
|
}
|
|
3378
3535
|
if (r.maxSize > 0 && e.size > r.maxSize * 1024 * 1024) {
|
|
3379
|
-
|
|
3536
|
+
u("error", {
|
|
3380
3537
|
type: "size",
|
|
3381
3538
|
file: e
|
|
3382
3539
|
});
|
|
3383
3540
|
return;
|
|
3384
3541
|
}
|
|
3385
3542
|
if (!r.multiple && r.modelValue.length + t.length >= 1) {
|
|
3386
|
-
n ||= (
|
|
3543
|
+
n ||= (u("error", {
|
|
3387
3544
|
type: "count",
|
|
3388
3545
|
file: e
|
|
3389
3546
|
}), !0);
|
|
3390
3547
|
return;
|
|
3391
3548
|
}
|
|
3392
3549
|
t.push({
|
|
3393
|
-
id:
|
|
3550
|
+
id: I(),
|
|
3394
3551
|
file: e,
|
|
3395
3552
|
name: e.name,
|
|
3396
3553
|
size: e.size,
|
|
@@ -3401,89 +3558,109 @@ var qi = {
|
|
|
3401
3558
|
});
|
|
3402
3559
|
}), t.length === 0) return;
|
|
3403
3560
|
let i = [...r.modelValue, ...t];
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3561
|
+
u("update:modelValue", i), u("change", i), u("add", t), t.forEach((e) => {
|
|
3562
|
+
L.add(e.id), te(e);
|
|
3563
|
+
});
|
|
3564
|
+
}, z = async () => {
|
|
3565
|
+
if (!(r.disabled || r.readonly)) if (r.multiple) {
|
|
3407
3566
|
let e = await $.input.custom(r.accept, !0);
|
|
3408
3567
|
if (e.length === 0) return;
|
|
3409
|
-
|
|
3568
|
+
R(e.map((e) => e.file));
|
|
3410
3569
|
} else {
|
|
3411
3570
|
let e = await $.input.custom(r.accept, !1);
|
|
3412
3571
|
if (!e) return;
|
|
3413
|
-
|
|
3572
|
+
R([e.file]);
|
|
3414
3573
|
}
|
|
3415
|
-
},
|
|
3416
|
-
if (r.disabled) return;
|
|
3574
|
+
}, B = async (e) => {
|
|
3575
|
+
if (r.disabled || r.readonly) return;
|
|
3417
3576
|
let t = r.modelValue.find((t) => t.id === e);
|
|
3418
|
-
if (!t || !await
|
|
3577
|
+
if (!t || !await S(`確定要移除「${P(t)}」嗎?`, {
|
|
3419
3578
|
title: "移除影片",
|
|
3420
3579
|
status: "danger",
|
|
3421
3580
|
confirmText: "移除",
|
|
3422
3581
|
cancelText: "取消"
|
|
3423
3582
|
})) return;
|
|
3424
|
-
|
|
3583
|
+
F(t.url);
|
|
3425
3584
|
let n = r.modelValue.filter((t) => t.id !== e);
|
|
3426
|
-
|
|
3427
|
-
},
|
|
3428
|
-
|
|
3429
|
-
},
|
|
3430
|
-
|
|
3431
|
-
},
|
|
3432
|
-
let e =
|
|
3585
|
+
u("update:modelValue", n), u("change", n), u("remove", t);
|
|
3586
|
+
}, V = (e) => {
|
|
3587
|
+
h.value = e, y();
|
|
3588
|
+
}, H = () => {
|
|
3589
|
+
b();
|
|
3590
|
+
}, U = i(() => {
|
|
3591
|
+
let e = h.value;
|
|
3433
3592
|
return e ? [
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
].join(" · ") : "";
|
|
3438
|
-
}),
|
|
3439
|
-
e.key === "Escape" &&
|
|
3440
|
-
},
|
|
3441
|
-
A(
|
|
3442
|
-
e ? (
|
|
3593
|
+
e.size == null ? null : O(e.size),
|
|
3594
|
+
e.width && e.height ? M(e) : null,
|
|
3595
|
+
k(e.duration)
|
|
3596
|
+
].filter(Boolean).join(" · ") : "";
|
|
3597
|
+
}), W = (e) => {
|
|
3598
|
+
e.key === "Escape" && H();
|
|
3599
|
+
}, ne = "";
|
|
3600
|
+
A(_, (e) => {
|
|
3601
|
+
e ? (ne = document.body.style.overflow, document.body.style.overflow = "hidden", document.addEventListener("keydown", W)) : (document.body.style.overflow = ne, document.removeEventListener("keydown", W));
|
|
3443
3602
|
}), v(() => {
|
|
3444
|
-
document.body.style.overflow =
|
|
3445
|
-
e.url && URL.revokeObjectURL(e.url);
|
|
3446
|
-
});
|
|
3603
|
+
document.body.style.overflow = ne, document.removeEventListener("keydown", W), r.autoRevoke && r.modelValue.forEach((e) => F(e.url));
|
|
3447
3604
|
});
|
|
3448
|
-
let
|
|
3449
|
-
onClick:
|
|
3605
|
+
let re = {
|
|
3606
|
+
onClick: z,
|
|
3450
3607
|
onDragenter: (e) => {
|
|
3451
|
-
r.disabled || (e.preventDefault(),
|
|
3608
|
+
r.disabled || r.readonly || (e.preventDefault(), p.value = !0);
|
|
3452
3609
|
},
|
|
3453
3610
|
onDragover: (e) => e.preventDefault(),
|
|
3454
3611
|
onDragleave: (e) => {
|
|
3455
|
-
e.preventDefault(),
|
|
3612
|
+
e.preventDefault(), p.value = !1;
|
|
3456
3613
|
},
|
|
3457
3614
|
onDrop: (e) => {
|
|
3458
|
-
r.disabled || (e.preventDefault(),
|
|
3615
|
+
r.disabled || r.readonly || (e.preventDefault(), p.value = !1, e.dataTransfer?.files?.length && R(e.dataTransfer.files));
|
|
3459
3616
|
}
|
|
3460
3617
|
};
|
|
3461
|
-
return (i, l) => (x(), s("div", { class: g(["video-input", {
|
|
3462
|
-
|
|
3618
|
+
return (i, l) => (x(), s("div", { class: g(["video-input", {
|
|
3619
|
+
"is-disabled": r.disabled,
|
|
3620
|
+
"is-readonly": r.readonly
|
|
3621
|
+
}]) }, [
|
|
3622
|
+
r.title || r.showCount ? (x(), s("div", ea, [r.title ? (x(), s("span", {
|
|
3463
3623
|
key: 0,
|
|
3464
3624
|
class: "title",
|
|
3465
3625
|
textContent: E(r.title)
|
|
3466
|
-
}, null, 8,
|
|
3467
|
-
c("div",
|
|
3626
|
+
}, null, 8, ta)) : o("", !0), r.showCount ? (x(), s("span", na, E(T.value) + " 支", 1)) : o("", !0)])) : o("", !0),
|
|
3627
|
+
c("div", ra, [T.value === 0 ? (x(), s("div", m({
|
|
3468
3628
|
key: 0,
|
|
3469
|
-
class: ["empty", {
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3629
|
+
class: ["empty", {
|
|
3630
|
+
"is-drag": p.value,
|
|
3631
|
+
"is-static": r.readonly
|
|
3632
|
+
}]
|
|
3633
|
+
}, r.readonly ? {} : re), [
|
|
3634
|
+
r.readonly ? o("", !0) : (x(), s("span", ia, [...l[0] ||= [c("svg", {
|
|
3635
|
+
viewBox: "0 0 24 24",
|
|
3636
|
+
fill: "none",
|
|
3637
|
+
stroke: "currentColor",
|
|
3638
|
+
"stroke-width": "1.7",
|
|
3639
|
+
"stroke-linecap": "round",
|
|
3640
|
+
"stroke-linejoin": "round"
|
|
3641
|
+
}, [
|
|
3642
|
+
c("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
3643
|
+
c("path", { d: "M7 9l5-5 5 5" }),
|
|
3644
|
+
c("path", { d: "M12 4v12" })
|
|
3645
|
+
], -1)]])),
|
|
3646
|
+
c("h3", { textContent: E(r.readonly ? "目前沒有影片" : r.emptyTitle) }, null, 8, aa),
|
|
3647
|
+
r.readonly ? o("", !0) : (x(), s("p", {
|
|
3648
|
+
key: 1,
|
|
3649
|
+
textContent: E(r.emptyHint)
|
|
3650
|
+
}, null, 8, oa))
|
|
3474
3651
|
], 16)) : (x(), s(e, { key: 1 }, [(x(!0), s(e, null, w(r.modelValue, (e) => (x(), s("div", {
|
|
3475
3652
|
key: e.id,
|
|
3476
3653
|
class: "card"
|
|
3477
3654
|
}, [c("div", {
|
|
3478
3655
|
class: g(["thumb", { placeholder: !e.url }]),
|
|
3479
|
-
onClick: (t) =>
|
|
3656
|
+
onClick: (t) => V(e)
|
|
3480
3657
|
}, [
|
|
3481
3658
|
e.url ? (x(), s("video", {
|
|
3482
3659
|
key: 0,
|
|
3483
3660
|
src: e.url + "#t=0.5",
|
|
3484
3661
|
muted: "",
|
|
3485
3662
|
preload: "metadata"
|
|
3486
|
-
}, null, 8,
|
|
3663
|
+
}, null, 8, ca)) : (x(), s("div", la, "縮圖預覽")),
|
|
3487
3664
|
l[1] ||= c("div", {
|
|
3488
3665
|
class: "play",
|
|
3489
3666
|
"aria-hidden": "true"
|
|
@@ -3491,21 +3668,21 @@ var qi = {
|
|
|
3491
3668
|
viewBox: "0 0 24 24",
|
|
3492
3669
|
fill: "currentColor"
|
|
3493
3670
|
}, [c("path", { d: "M8 5v14l11-7z" })])], -1),
|
|
3494
|
-
c("div",
|
|
3495
|
-
], 10,
|
|
3671
|
+
c("div", ua, E(k(e.duration)), 1)
|
|
3672
|
+
], 10, sa), c("div", da, [
|
|
3496
3673
|
c("div", {
|
|
3497
3674
|
class: "file-name",
|
|
3498
|
-
title: e
|
|
3499
|
-
}, E(e
|
|
3500
|
-
c("div",
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3675
|
+
title: P(e)
|
|
3676
|
+
}, E(P(e)), 9, fa),
|
|
3677
|
+
c("div", pa, [
|
|
3678
|
+
e.size == null ? o("", !0) : (x(), s("span", ma, E(O(e.size)), 1)),
|
|
3679
|
+
e.size != null && e.width && e.height ? (x(), s("span", ha)) : o("", !0),
|
|
3680
|
+
e.width && e.height ? (x(), s("span", ga, E(M(e)), 1)) : o("", !0)
|
|
3504
3681
|
]),
|
|
3505
|
-
c("div",
|
|
3682
|
+
c("div", _a, [c("button", {
|
|
3506
3683
|
class: "action preview",
|
|
3507
|
-
onClick: (t) =>
|
|
3508
|
-
}, [...l[
|
|
3684
|
+
onClick: (t) => V(e)
|
|
3685
|
+
}, [...l[2] ||= [c("svg", {
|
|
3509
3686
|
viewBox: "0 0 24 24",
|
|
3510
3687
|
fill: "none",
|
|
3511
3688
|
stroke: "currentColor",
|
|
@@ -3516,23 +3693,24 @@ var qi = {
|
|
|
3516
3693
|
cx: "12",
|
|
3517
3694
|
cy: "12",
|
|
3518
3695
|
r: "3"
|
|
3519
|
-
})], -1), d(" 預覽 ", -1)]], 8,
|
|
3696
|
+
})], -1), d(" 預覽 ", -1)]], 8, va), r.readonly ? o("", !0) : (x(), s("button", {
|
|
3697
|
+
key: 0,
|
|
3520
3698
|
class: "action delete",
|
|
3521
3699
|
"aria-label": "刪除",
|
|
3522
3700
|
disabled: r.disabled,
|
|
3523
|
-
onClick: N((t) =>
|
|
3524
|
-
}, [...l[
|
|
3701
|
+
onClick: N((t) => B(e.id), ["stop"])
|
|
3702
|
+
}, [...l[3] ||= [c("svg", {
|
|
3525
3703
|
viewBox: "0 0 24 24",
|
|
3526
3704
|
fill: "none",
|
|
3527
3705
|
stroke: "currentColor",
|
|
3528
3706
|
"stroke-width": "2",
|
|
3529
3707
|
"stroke-linecap": "round",
|
|
3530
3708
|
"stroke-linejoin": "round"
|
|
3531
|
-
}, [c("path", { d: "M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), c("path", { d: "M10 11v6M14 11v6" })], -1)]], 8,
|
|
3532
|
-
])]))), 128)), r.multiple ? (x(), s("div", m({
|
|
3709
|
+
}, [c("path", { d: "M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), c("path", { d: "M10 11v6M14 11v6" })], -1)]], 8, ya))])
|
|
3710
|
+
])]))), 128)), r.multiple && !r.readonly ? (x(), s("div", m({
|
|
3533
3711
|
key: 0,
|
|
3534
|
-
class: ["add-card", { "is-drag":
|
|
3535
|
-
},
|
|
3712
|
+
class: ["add-card", { "is-drag": p.value }]
|
|
3713
|
+
}, re), [...l[4] ||= [
|
|
3536
3714
|
c("span", {
|
|
3537
3715
|
class: "plus",
|
|
3538
3716
|
"aria-hidden": "true"
|
|
@@ -3548,23 +3726,23 @@ var qi = {
|
|
|
3548
3726
|
c("span", { class: "hint" }, "點擊或拖放檔案 · MP4 / MOV / WebM", -1)
|
|
3549
3727
|
]], 16)) : o("", !0)], 64))]),
|
|
3550
3728
|
(x(), a(t, { to: "body" }, [f(n, { name: "vi-modal" }, {
|
|
3551
|
-
default: j(() => [D(
|
|
3729
|
+
default: j(() => [D(_) ? (x(), s("div", {
|
|
3552
3730
|
key: 0,
|
|
3553
3731
|
class: "vi-modal",
|
|
3554
|
-
onClick: N(
|
|
3555
|
-
}, [c("div",
|
|
3732
|
+
onClick: N(H, ["self"])
|
|
3733
|
+
}, [c("div", ba, [c("div", xa, [h.value?.url ? (x(), s("video", {
|
|
3556
3734
|
key: 0,
|
|
3557
|
-
src:
|
|
3735
|
+
src: h.value.url,
|
|
3558
3736
|
controls: "",
|
|
3559
3737
|
autoplay: "",
|
|
3560
3738
|
playsinline: "",
|
|
3561
3739
|
controlslist: "nofullscreen nodownload noremoteplayback noplaybackrate",
|
|
3562
3740
|
disablepictureinpicture: ""
|
|
3563
|
-
}, null, 8,
|
|
3741
|
+
}, null, 8, Sa)) : (x(), s("div", Ca, " 示範影片 · 上傳真實檔案即可在此播放 "))]), c("div", wa, [c("div", Ta, [c("div", Ea, E(h.value ? P(h.value) : ""), 1), c("div", Da, E(U.value), 1)]), c("button", {
|
|
3564
3742
|
class: "vi-modal-close",
|
|
3565
3743
|
"aria-label": "關閉",
|
|
3566
|
-
onClick:
|
|
3567
|
-
}, [...l[
|
|
3744
|
+
onClick: H
|
|
3745
|
+
}, [...l[5] ||= [c("svg", {
|
|
3568
3746
|
viewBox: "0 0 24 24",
|
|
3569
3747
|
fill: "none",
|
|
3570
3748
|
stroke: "currentColor",
|
|
@@ -3576,19 +3754,26 @@ var qi = {
|
|
|
3576
3754
|
})]))
|
|
3577
3755
|
], 2));
|
|
3578
3756
|
}
|
|
3579
|
-
}), [["__scopeId", "data-v-
|
|
3757
|
+
}), [["__scopeId", "data-v-414cc3f4"]]), ka = {
|
|
3580
3758
|
key: 0,
|
|
3581
3759
|
class: "head"
|
|
3582
|
-
},
|
|
3760
|
+
}, Aa = ["textContent"], ja = {
|
|
3583
3761
|
key: 1,
|
|
3584
3762
|
class: "count-chip"
|
|
3585
|
-
},
|
|
3763
|
+
}, Ma = { class: "grid" }, Na = {
|
|
3764
|
+
key: 0,
|
|
3765
|
+
class: "icon",
|
|
3766
|
+
"aria-hidden": "true"
|
|
3767
|
+
}, Pa = ["textContent"], Fa = ["textContent"], Ia = ["onClick"], La = ["src", "alt"], Ra = {
|
|
3586
3768
|
key: 1,
|
|
3587
3769
|
class: "placeholder-label"
|
|
3588
|
-
},
|
|
3770
|
+
}, za = { class: "card-body" }, Ba = ["title"], Va = { class: "file-meta" }, Ha = { key: 0 }, Ua = {
|
|
3771
|
+
key: 1,
|
|
3772
|
+
class: "dot-separator"
|
|
3773
|
+
}, Wa = { key: 2 }, Ga = { class: "card-actions" }, Ka = ["onClick"], qa = ["disabled", "onClick"], Ja = { class: "ii-modal-card" }, Ya = { class: "ii-modal-media" }, Xa = ["src", "alt"], Za = {
|
|
3589
3774
|
key: 1,
|
|
3590
3775
|
class: "ii-modal-ph"
|
|
3591
|
-
},
|
|
3776
|
+
}, Qa = { class: "ii-modal-bar" }, $a = { class: "ii-modal-info" }, eo = { class: "modal-name" }, to = { class: "modal-meta" }, no = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
3592
3777
|
__name: "NImageSelect",
|
|
3593
3778
|
props: {
|
|
3594
3779
|
modelValue: { default: () => [] },
|
|
@@ -3602,6 +3787,10 @@ var qi = {
|
|
|
3602
3787
|
type: Boolean,
|
|
3603
3788
|
default: !1
|
|
3604
3789
|
},
|
|
3790
|
+
readonly: {
|
|
3791
|
+
type: Boolean,
|
|
3792
|
+
default: !1
|
|
3793
|
+
},
|
|
3605
3794
|
title: { default: "" },
|
|
3606
3795
|
showCount: {
|
|
3607
3796
|
type: Boolean,
|
|
@@ -3622,52 +3811,70 @@ var qi = {
|
|
|
3622
3811
|
"error"
|
|
3623
3812
|
],
|
|
3624
3813
|
setup(r, { emit: l }) {
|
|
3625
|
-
let
|
|
3814
|
+
let u = l, p = C(!1), h = C(null), [_, y, b] = $i(), { confirm: S } = Rt(), T = i(() => r.modelValue.length), O = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 1024).toFixed(0) + " KB" : e < 1073741824 ? (e / 1048576).toFixed(1) + " MB" : (e / 1073741824).toFixed(2) + " GB", k = (e) => e.width && e.height ? e.width + "×" + e.height : "—", M = (e) => {
|
|
3815
|
+
if (e.name) return e.name;
|
|
3816
|
+
try {
|
|
3817
|
+
let t = new URL(e.url, window.location.href).pathname;
|
|
3818
|
+
return decodeURIComponent(t.split("/").filter(Boolean).pop() ?? "圖片");
|
|
3819
|
+
} catch {
|
|
3820
|
+
return "圖片";
|
|
3821
|
+
}
|
|
3822
|
+
}, P = (e) => {
|
|
3823
|
+
e?.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
3824
|
+
}, F = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "i" + Math.random().toString(36).slice(2, 9), I = (e) => {
|
|
3626
3825
|
let t = r.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
3627
3826
|
if (t.length === 0) return e.type.startsWith("image/");
|
|
3628
3827
|
let n = e.type.toLowerCase(), i = e.name.toLowerCase();
|
|
3629
3828
|
return t.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? n.startsWith(e.slice(0, -1)) : n === e);
|
|
3630
|
-
},
|
|
3829
|
+
}, ee = (e) => {
|
|
3631
3830
|
if (!e.url) return;
|
|
3632
3831
|
let t = new Image(), n = () => {
|
|
3832
|
+
t.removeEventListener("load", i), t.removeEventListener("error", n), t.removeAttribute("src");
|
|
3833
|
+
}, i = () => {
|
|
3633
3834
|
if (r.modelValue.some((t) => t.id === e.id)) {
|
|
3634
3835
|
let n = r.modelValue.map((n) => n.id === e.id ? {
|
|
3635
3836
|
...n,
|
|
3636
3837
|
width: t.naturalWidth,
|
|
3637
3838
|
height: t.naturalHeight
|
|
3638
3839
|
} : n);
|
|
3639
|
-
|
|
3840
|
+
u("update:modelValue", n), u("change", n);
|
|
3640
3841
|
}
|
|
3641
|
-
|
|
3842
|
+
n();
|
|
3642
3843
|
};
|
|
3643
|
-
t.addEventListener("load", n), t.src = e.url;
|
|
3644
|
-
},
|
|
3645
|
-
|
|
3844
|
+
t.addEventListener("load", i), t.addEventListener("error", n), t.src = e.url;
|
|
3845
|
+
}, te = /* @__PURE__ */ new Set();
|
|
3846
|
+
A(() => r.modelValue, (e) => {
|
|
3847
|
+
e.forEach((e) => {
|
|
3848
|
+
!e.url || te.has(e.id) || (te.add(e.id), (e.width == null || e.height == null) && ee(e));
|
|
3849
|
+
});
|
|
3850
|
+
}, { immediate: !0 });
|
|
3851
|
+
let L = (e) => {
|
|
3852
|
+
if (r.disabled || r.readonly) return;
|
|
3646
3853
|
let t = [], n = !1;
|
|
3647
3854
|
if (Array.prototype.forEach.call(e, (e) => {
|
|
3648
|
-
if (!
|
|
3649
|
-
|
|
3855
|
+
if (!I(e)) {
|
|
3856
|
+
u("error", {
|
|
3650
3857
|
type: "type",
|
|
3651
3858
|
file: e
|
|
3652
3859
|
});
|
|
3653
3860
|
return;
|
|
3654
3861
|
}
|
|
3655
3862
|
if (r.maxSize > 0 && e.size > r.maxSize * 1024 * 1024) {
|
|
3656
|
-
|
|
3863
|
+
u("error", {
|
|
3657
3864
|
type: "size",
|
|
3658
3865
|
file: e
|
|
3659
3866
|
});
|
|
3660
3867
|
return;
|
|
3661
3868
|
}
|
|
3662
3869
|
if (!r.multiple && r.modelValue.length + t.length >= 1) {
|
|
3663
|
-
n ||= (
|
|
3870
|
+
n ||= (u("error", {
|
|
3664
3871
|
type: "count",
|
|
3665
3872
|
file: e
|
|
3666
3873
|
}), !0);
|
|
3667
3874
|
return;
|
|
3668
3875
|
}
|
|
3669
3876
|
t.push({
|
|
3670
|
-
id:
|
|
3877
|
+
id: F(),
|
|
3671
3878
|
file: e,
|
|
3672
3879
|
name: e.name,
|
|
3673
3880
|
size: e.size,
|
|
@@ -3677,84 +3884,114 @@ var qi = {
|
|
|
3677
3884
|
});
|
|
3678
3885
|
}), t.length === 0) return;
|
|
3679
3886
|
let i = [...r.modelValue, ...t];
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3887
|
+
u("update:modelValue", i), u("change", i), u("add", t), t.forEach((e) => {
|
|
3888
|
+
te.add(e.id), ee(e);
|
|
3889
|
+
});
|
|
3890
|
+
}, R = async () => {
|
|
3891
|
+
if (!(r.disabled || r.readonly)) if (r.multiple) {
|
|
3683
3892
|
let e = await $.input.custom(r.accept, !0);
|
|
3684
3893
|
if (e.length === 0) return;
|
|
3685
|
-
|
|
3894
|
+
L(e.map((e) => e.file));
|
|
3686
3895
|
} else {
|
|
3687
3896
|
let e = await $.input.custom(r.accept, !1);
|
|
3688
3897
|
if (!e) return;
|
|
3689
|
-
|
|
3898
|
+
L([e.file]);
|
|
3690
3899
|
}
|
|
3691
|
-
},
|
|
3692
|
-
if (r.disabled) return;
|
|
3900
|
+
}, z = async (e) => {
|
|
3901
|
+
if (r.disabled || r.readonly) return;
|
|
3693
3902
|
let t = r.modelValue.find((t) => t.id === e);
|
|
3694
|
-
if (!t || !await
|
|
3903
|
+
if (!t || !await S(`確定要移除「${M(t)}」嗎?`, {
|
|
3695
3904
|
title: "移除圖片",
|
|
3696
3905
|
status: "danger",
|
|
3697
3906
|
confirmText: "移除",
|
|
3698
3907
|
cancelText: "取消"
|
|
3699
3908
|
})) return;
|
|
3700
|
-
|
|
3909
|
+
P(t.url);
|
|
3701
3910
|
let n = r.modelValue.filter((t) => t.id !== e);
|
|
3702
|
-
|
|
3703
|
-
},
|
|
3704
|
-
|
|
3705
|
-
},
|
|
3706
|
-
|
|
3707
|
-
},
|
|
3708
|
-
let e =
|
|
3709
|
-
return e ? [
|
|
3710
|
-
}),
|
|
3711
|
-
e.key === "Escape" &&
|
|
3712
|
-
},
|
|
3713
|
-
A(
|
|
3714
|
-
e ? (
|
|
3911
|
+
u("update:modelValue", n), u("change", n), u("remove", t);
|
|
3912
|
+
}, B = (e) => {
|
|
3913
|
+
h.value = e, y();
|
|
3914
|
+
}, V = () => {
|
|
3915
|
+
b();
|
|
3916
|
+
}, H = i(() => {
|
|
3917
|
+
let e = h.value;
|
|
3918
|
+
return e ? [e.size == null ? null : O(e.size), e.width && e.height ? k(e) : null].filter(Boolean).join(" · ") : "";
|
|
3919
|
+
}), U = (e) => {
|
|
3920
|
+
e.key === "Escape" && V();
|
|
3921
|
+
}, W = "";
|
|
3922
|
+
A(_, (e) => {
|
|
3923
|
+
e ? (W = document.body.style.overflow, document.body.style.overflow = "hidden", document.addEventListener("keydown", U)) : (document.body.style.overflow = W, document.removeEventListener("keydown", U));
|
|
3715
3924
|
}), v(() => {
|
|
3716
|
-
document.body.style.overflow =
|
|
3717
|
-
e.url && URL.revokeObjectURL(e.url);
|
|
3718
|
-
});
|
|
3925
|
+
document.body.style.overflow = W, document.removeEventListener("keydown", U), r.autoRevoke && r.modelValue.forEach((e) => P(e.url));
|
|
3719
3926
|
});
|
|
3720
|
-
let
|
|
3721
|
-
onClick:
|
|
3927
|
+
let ne = {
|
|
3928
|
+
onClick: R,
|
|
3722
3929
|
onDragenter: (e) => {
|
|
3723
|
-
r.disabled || (e.preventDefault(),
|
|
3930
|
+
r.disabled || r.readonly || (e.preventDefault(), p.value = !0);
|
|
3724
3931
|
},
|
|
3725
3932
|
onDragover: (e) => e.preventDefault(),
|
|
3726
3933
|
onDragleave: (e) => {
|
|
3727
|
-
e.preventDefault(),
|
|
3934
|
+
e.preventDefault(), p.value = !1;
|
|
3728
3935
|
},
|
|
3729
3936
|
onDrop: (e) => {
|
|
3730
|
-
r.disabled || (e.preventDefault(),
|
|
3937
|
+
r.disabled || r.readonly || (e.preventDefault(), p.value = !1, e.dataTransfer?.files?.length && L(e.dataTransfer.files));
|
|
3731
3938
|
}
|
|
3732
3939
|
};
|
|
3733
|
-
return (i, l) => (x(), s("div", { class: g(["image-input", {
|
|
3734
|
-
|
|
3940
|
+
return (i, l) => (x(), s("div", { class: g(["image-input", {
|
|
3941
|
+
"is-disabled": r.disabled,
|
|
3942
|
+
"is-readonly": r.readonly
|
|
3943
|
+
}]) }, [
|
|
3944
|
+
r.title || r.showCount ? (x(), s("div", ka, [r.title ? (x(), s("span", {
|
|
3735
3945
|
key: 0,
|
|
3736
3946
|
class: "title",
|
|
3737
3947
|
textContent: E(r.title)
|
|
3738
|
-
}, null, 8,
|
|
3739
|
-
c("div",
|
|
3948
|
+
}, null, 8, Aa)) : o("", !0), r.showCount ? (x(), s("span", ja, E(T.value) + " 張", 1)) : o("", !0)])) : o("", !0),
|
|
3949
|
+
c("div", Ma, [T.value === 0 ? (x(), s("div", m({
|
|
3740
3950
|
key: 0,
|
|
3741
|
-
class: ["empty", {
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3951
|
+
class: ["empty", {
|
|
3952
|
+
"is-drag": p.value,
|
|
3953
|
+
"is-static": r.readonly
|
|
3954
|
+
}]
|
|
3955
|
+
}, r.readonly ? {} : ne), [
|
|
3956
|
+
r.readonly ? o("", !0) : (x(), s("span", Na, [...l[0] ||= [c("svg", {
|
|
3957
|
+
viewBox: "0 0 24 24",
|
|
3958
|
+
fill: "none",
|
|
3959
|
+
stroke: "currentColor",
|
|
3960
|
+
"stroke-width": "2",
|
|
3961
|
+
"stroke-linecap": "round",
|
|
3962
|
+
"stroke-linejoin": "round"
|
|
3963
|
+
}, [
|
|
3964
|
+
c("rect", {
|
|
3965
|
+
x: "3",
|
|
3966
|
+
y: "3",
|
|
3967
|
+
width: "18",
|
|
3968
|
+
height: "18",
|
|
3969
|
+
rx: "2"
|
|
3970
|
+
}),
|
|
3971
|
+
c("circle", {
|
|
3972
|
+
cx: "8.5",
|
|
3973
|
+
cy: "8.5",
|
|
3974
|
+
r: "1.5"
|
|
3975
|
+
}),
|
|
3976
|
+
c("path", { d: "M21 15l-5-5L5 21" })
|
|
3977
|
+
], -1)]])),
|
|
3978
|
+
c("h3", { textContent: E(r.readonly ? "目前沒有圖片" : r.emptyTitle) }, null, 8, Pa),
|
|
3979
|
+
r.readonly ? o("", !0) : (x(), s("p", {
|
|
3980
|
+
key: 1,
|
|
3981
|
+
textContent: E(r.emptyHint)
|
|
3982
|
+
}, null, 8, Fa))
|
|
3746
3983
|
], 16)) : (x(), s(e, { key: 1 }, [(x(!0), s(e, null, w(r.modelValue, (e) => (x(), s("div", {
|
|
3747
3984
|
key: e.id,
|
|
3748
3985
|
class: "card"
|
|
3749
3986
|
}, [c("div", {
|
|
3750
3987
|
class: g(["thumb", { placeholder: !e.url }]),
|
|
3751
|
-
onClick: (t) =>
|
|
3988
|
+
onClick: (t) => B(e)
|
|
3752
3989
|
}, [e.url ? (x(), s("img", {
|
|
3753
3990
|
key: 0,
|
|
3754
3991
|
src: e.url,
|
|
3755
|
-
alt: e
|
|
3992
|
+
alt: M(e),
|
|
3756
3993
|
loading: "lazy"
|
|
3757
|
-
}, null, 8,
|
|
3994
|
+
}, null, 8, La)) : (x(), s("div", Ra, "縮圖預覽")), l[1] ||= c("div", {
|
|
3758
3995
|
class: "zoom",
|
|
3759
3996
|
"aria-hidden": "true"
|
|
3760
3997
|
}, [c("svg", {
|
|
@@ -3768,20 +4005,20 @@ var qi = {
|
|
|
3768
4005
|
cx: "11",
|
|
3769
4006
|
cy: "11",
|
|
3770
4007
|
r: "7"
|
|
3771
|
-
}), c("path", { d: "m21 21-4.3-4.3M11 8v6M8 11h6" })])], -1)], 10,
|
|
4008
|
+
}), c("path", { d: "m21 21-4.3-4.3M11 8v6M8 11h6" })])], -1)], 10, Ia), c("div", za, [
|
|
3772
4009
|
c("div", {
|
|
3773
4010
|
class: "file-name",
|
|
3774
|
-
title: e
|
|
3775
|
-
}, E(e
|
|
3776
|
-
c("div",
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
4011
|
+
title: M(e)
|
|
4012
|
+
}, E(M(e)), 9, Ba),
|
|
4013
|
+
c("div", Va, [
|
|
4014
|
+
e.size == null ? o("", !0) : (x(), s("span", Ha, E(O(e.size)), 1)),
|
|
4015
|
+
e.size != null && e.width && e.height ? (x(), s("span", Ua)) : o("", !0),
|
|
4016
|
+
e.width && e.height ? (x(), s("span", Wa, E(k(e)), 1)) : o("", !0)
|
|
3780
4017
|
]),
|
|
3781
|
-
c("div",
|
|
4018
|
+
c("div", Ga, [c("button", {
|
|
3782
4019
|
class: "action preview",
|
|
3783
|
-
onClick: (t) =>
|
|
3784
|
-
}, [...l[
|
|
4020
|
+
onClick: (t) => B(e)
|
|
4021
|
+
}, [...l[2] ||= [c("svg", {
|
|
3785
4022
|
viewBox: "0 0 24 24",
|
|
3786
4023
|
fill: "none",
|
|
3787
4024
|
stroke: "currentColor",
|
|
@@ -3792,23 +4029,24 @@ var qi = {
|
|
|
3792
4029
|
cx: "12",
|
|
3793
4030
|
cy: "12",
|
|
3794
4031
|
r: "3"
|
|
3795
|
-
})], -1), d(" 預覽 ", -1)]], 8,
|
|
4032
|
+
})], -1), d(" 預覽 ", -1)]], 8, Ka), r.readonly ? o("", !0) : (x(), s("button", {
|
|
4033
|
+
key: 0,
|
|
3796
4034
|
class: "action delete",
|
|
3797
4035
|
"aria-label": "刪除",
|
|
3798
4036
|
disabled: r.disabled,
|
|
3799
|
-
onClick: N((t) =>
|
|
3800
|
-
}, [...l[
|
|
4037
|
+
onClick: N((t) => z(e.id), ["stop"])
|
|
4038
|
+
}, [...l[3] ||= [c("svg", {
|
|
3801
4039
|
viewBox: "0 0 24 24",
|
|
3802
4040
|
fill: "none",
|
|
3803
4041
|
stroke: "currentColor",
|
|
3804
4042
|
"stroke-width": "2",
|
|
3805
4043
|
"stroke-linecap": "round",
|
|
3806
4044
|
"stroke-linejoin": "round"
|
|
3807
|
-
}, [c("path", { d: "M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), c("path", { d: "M10 11v6M14 11v6" })], -1)]], 8,
|
|
3808
|
-
])]))), 128)), r.multiple ? (x(), s("div", m({
|
|
4045
|
+
}, [c("path", { d: "M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m2 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }), c("path", { d: "M10 11v6M14 11v6" })], -1)]], 8, qa))])
|
|
4046
|
+
])]))), 128)), r.multiple && !r.readonly ? (x(), s("div", m({
|
|
3809
4047
|
key: 0,
|
|
3810
|
-
class: ["add-card", { "is-drag":
|
|
3811
|
-
},
|
|
4048
|
+
class: ["add-card", { "is-drag": p.value }]
|
|
4049
|
+
}, ne), [...l[4] ||= [
|
|
3812
4050
|
c("span", {
|
|
3813
4051
|
class: "plus",
|
|
3814
4052
|
"aria-hidden": "true"
|
|
@@ -3824,19 +4062,19 @@ var qi = {
|
|
|
3824
4062
|
c("span", { class: "hint" }, "點擊或拖放檔案 · JPG / PNG / WebP / GIF", -1)
|
|
3825
4063
|
]], 16)) : o("", !0)], 64))]),
|
|
3826
4064
|
(x(), a(t, { to: "body" }, [f(n, { name: "ii-modal" }, {
|
|
3827
|
-
default: j(() => [D(
|
|
4065
|
+
default: j(() => [D(_) ? (x(), s("div", {
|
|
3828
4066
|
key: 0,
|
|
3829
4067
|
class: "ii-modal",
|
|
3830
|
-
onClick: N(
|
|
3831
|
-
}, [c("div",
|
|
4068
|
+
onClick: N(V, ["self"])
|
|
4069
|
+
}, [c("div", Ja, [c("div", Ya, [h.value?.url ? (x(), s("img", {
|
|
3832
4070
|
key: 0,
|
|
3833
|
-
src:
|
|
3834
|
-
alt:
|
|
3835
|
-
}, null, 8,
|
|
4071
|
+
src: h.value.url,
|
|
4072
|
+
alt: h.value ? M(h.value) : ""
|
|
4073
|
+
}, null, 8, Xa)) : (x(), s("div", Za, " 示範圖片 · 上傳真實檔案即可在此檢視 "))]), c("div", Qa, [c("div", $a, [c("div", eo, E(h.value ? M(h.value) : ""), 1), c("div", to, E(H.value), 1)]), c("button", {
|
|
3836
4074
|
class: "ii-modal-close",
|
|
3837
4075
|
"aria-label": "關閉",
|
|
3838
|
-
onClick:
|
|
3839
|
-
}, [...l[
|
|
4076
|
+
onClick: V
|
|
4077
|
+
}, [...l[5] ||= [c("svg", {
|
|
3840
4078
|
viewBox: "0 0 24 24",
|
|
3841
4079
|
fill: "none",
|
|
3842
4080
|
stroke: "currentColor",
|
|
@@ -3848,32 +4086,37 @@ var qi = {
|
|
|
3848
4086
|
})]))
|
|
3849
4087
|
], 2));
|
|
3850
4088
|
}
|
|
3851
|
-
}), [["__scopeId", "data-v-
|
|
4089
|
+
}), [["__scopeId", "data-v-0531aeda"]]), ro = {
|
|
3852
4090
|
key: 0,
|
|
3853
4091
|
class: "head"
|
|
3854
|
-
},
|
|
4092
|
+
}, io = ["textContent"], ao = {
|
|
3855
4093
|
key: 1,
|
|
3856
4094
|
class: "count-chip"
|
|
3857
|
-
},
|
|
4095
|
+
}, oo = {
|
|
4096
|
+
key: 0,
|
|
4097
|
+
class: "icon",
|
|
4098
|
+
"aria-hidden": "true"
|
|
4099
|
+
}, so = ["textContent"], co = ["textContent"], lo = {
|
|
3858
4100
|
key: 2,
|
|
3859
4101
|
class: "list"
|
|
3860
|
-
},
|
|
4102
|
+
}, uo = [
|
|
3861
4103
|
"src",
|
|
4104
|
+
"onLoadedmetadata",
|
|
3862
4105
|
"onTimeupdate",
|
|
3863
4106
|
"onEnded"
|
|
3864
|
-
],
|
|
4107
|
+
], fo = [
|
|
3865
4108
|
"aria-label",
|
|
3866
4109
|
"disabled",
|
|
3867
4110
|
"onClick"
|
|
3868
|
-
],
|
|
4111
|
+
], po = {
|
|
3869
4112
|
key: 0,
|
|
3870
4113
|
viewBox: "0 0 24 24",
|
|
3871
4114
|
fill: "currentColor"
|
|
3872
|
-
},
|
|
4115
|
+
}, mo = {
|
|
3873
4116
|
key: 1,
|
|
3874
4117
|
viewBox: "0 0 24 24",
|
|
3875
4118
|
fill: "currentColor"
|
|
3876
|
-
},
|
|
4119
|
+
}, ho = { class: "meta" }, go = ["title"], _o = { class: "sub" }, vo = ["onMousedown", "onTouchstart"], yo = { class: "time" }, bo = ["disabled", "onClick"], xo = { class: "meta" }, So = { class: "name" }, Co = 256, wo = 5, To = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
3877
4120
|
__name: "NAudioSelect",
|
|
3878
4121
|
props: {
|
|
3879
4122
|
modelValue: { default: () => [] },
|
|
@@ -3887,6 +4130,10 @@ var qi = {
|
|
|
3887
4130
|
type: Boolean,
|
|
3888
4131
|
default: !1
|
|
3889
4132
|
},
|
|
4133
|
+
readonly: {
|
|
4134
|
+
type: Boolean,
|
|
4135
|
+
default: !1
|
|
4136
|
+
},
|
|
3890
4137
|
title: { default: "" },
|
|
3891
4138
|
showCount: {
|
|
3892
4139
|
type: Boolean,
|
|
@@ -3907,81 +4154,110 @@ var qi = {
|
|
|
3907
4154
|
"error"
|
|
3908
4155
|
],
|
|
3909
4156
|
setup(t, { emit: n }) {
|
|
3910
|
-
let r =
|
|
3911
|
-
|
|
3912
|
-
|
|
4157
|
+
let r = /* @__PURE__ */ new Map(), a = (e, t, n) => {
|
|
4158
|
+
let i = r.get(e);
|
|
4159
|
+
if (i) return i.refCount += 1, i;
|
|
4160
|
+
let a = {
|
|
4161
|
+
peaks: t,
|
|
4162
|
+
duration: n,
|
|
4163
|
+
refCount: 1
|
|
4164
|
+
};
|
|
4165
|
+
return r.set(e, a), a;
|
|
4166
|
+
}, l = (e, t) => {
|
|
4167
|
+
if (!e) return;
|
|
4168
|
+
let n = r.get(e);
|
|
4169
|
+
n && (--n.refCount, t && n.refCount <= 0 && r.delete(e));
|
|
4170
|
+
}, f = n, { confirm: p } = Rt(), h = C(!1), y = C([]), b = C(null), T = S({}), D = S({}), O = S({}), k = /* @__PURE__ */ new Set(), j = /* @__PURE__ */ new Map(), M = (e, t, n) => {
|
|
4171
|
+
a(e, t, n), j.set(e, (j.get(e) ?? 0) + 1);
|
|
4172
|
+
}, P = (e, t) => {
|
|
4173
|
+
if (!e) return;
|
|
4174
|
+
let n = j.get(e) ?? 0;
|
|
4175
|
+
n <= 0 || (n === 1 ? j.delete(e) : j.set(e, n - 1), l(e, t));
|
|
4176
|
+
}, F = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), ee = (e, t) => {
|
|
4177
|
+
t ? F.set(e, t) : F.delete(e);
|
|
4178
|
+
}, te = i(() => t.modelValue.length), L = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 1024).toFixed(0) + " KB" : e < 1073741824 ? (e / 1048576).toFixed(1) + " MB" : (e / 1073741824).toFixed(2) + " GB", R = (e) => {
|
|
3913
4179
|
if (e == null || isNaN(e)) return "0:00";
|
|
3914
4180
|
let t = Math.floor(e), n = Math.floor(t / 60), r = t % 60;
|
|
3915
4181
|
return n + ":" + (r < 10 ? "0" : "") + r;
|
|
3916
|
-
},
|
|
4182
|
+
}, z = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : "a" + Math.random().toString(36).slice(2, 9), B = (e) => {
|
|
4183
|
+
if (e.name) return e.name;
|
|
4184
|
+
try {
|
|
4185
|
+
let t = new URL(e.url, window.location.href).pathname;
|
|
4186
|
+
return decodeURIComponent(t.split("/").filter(Boolean).pop() ?? "音訊");
|
|
4187
|
+
} catch {
|
|
4188
|
+
return "音訊";
|
|
4189
|
+
}
|
|
4190
|
+
}, V = (e) => {
|
|
4191
|
+
e?.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
4192
|
+
}, H = (e) => {
|
|
3917
4193
|
let n = t.accept.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
3918
4194
|
if (n.length === 0) return e.type.startsWith("audio/");
|
|
3919
4195
|
let r = e.type.toLowerCase(), i = e.name.toLowerCase();
|
|
3920
4196
|
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r === e);
|
|
3921
|
-
},
|
|
3922
|
-
let t = await
|
|
3923
|
-
for (let e = 0; e <
|
|
3924
|
-
let t = 0,
|
|
3925
|
-
for (let e =
|
|
3926
|
-
let
|
|
3927
|
-
|
|
4197
|
+
}, U = null, W = () => (U ||= new (window.AudioContext || window.webkitAudioContext)(), U), ne = async (e) => {
|
|
4198
|
+
let t = await W().decodeAudioData(e.slice(0)), n = t.getChannelData(0), r = Math.floor(n.length / Co) || 1, i = Array(Co), a = 0;
|
|
4199
|
+
for (let e = 0; e < Co; e++) {
|
|
4200
|
+
let t = 0, o = e * r, s = Math.min(n.length, o + r);
|
|
4201
|
+
for (let e = o; e < s; e++) {
|
|
4202
|
+
let r = Math.abs(n[e]);
|
|
4203
|
+
r > t && (t = r);
|
|
3928
4204
|
}
|
|
3929
|
-
|
|
4205
|
+
i[e] = t, t > a && (a = t);
|
|
3930
4206
|
}
|
|
3931
|
-
let
|
|
3932
|
-
for (let e = 0; e <
|
|
4207
|
+
let o = a > 0 ? 1 / a : 1;
|
|
4208
|
+
for (let e = 0; e < Co; e++) i[e] = Math.max(.06, i[e] * o);
|
|
3933
4209
|
return {
|
|
3934
|
-
peaks:
|
|
3935
|
-
duration:
|
|
4210
|
+
peaks: i,
|
|
4211
|
+
duration: t.duration
|
|
3936
4212
|
};
|
|
3937
|
-
},
|
|
3938
|
-
let t =
|
|
4213
|
+
}, re = (e) => e.arrayBuffer().then((e) => ne(e)), G = (e) => {
|
|
4214
|
+
let t = I.get(e), n = T[e];
|
|
3939
4215
|
if (!t || !n) return;
|
|
3940
4216
|
let r = t.clientWidth;
|
|
3941
4217
|
if (r <= 0) {
|
|
3942
|
-
requestAnimationFrame(() =>
|
|
4218
|
+
requestAnimationFrame(() => G(e));
|
|
3943
4219
|
return;
|
|
3944
4220
|
}
|
|
3945
|
-
let i = Math.max(8, Math.min(n.length, Math.floor((r + 2) /
|
|
3946
|
-
if (
|
|
4221
|
+
let i = Math.max(8, Math.min(n.length, Math.floor((r + 2) / wo)));
|
|
4222
|
+
if (D[e] && D[e].length === i) return;
|
|
3947
4223
|
let a = Array(i);
|
|
3948
4224
|
for (let e = 0; e < i; e++) {
|
|
3949
4225
|
let t = Math.floor(e * n.length / i), r = Math.max(t + 1, Math.floor((e + 1) * n.length / i)), o = 0;
|
|
3950
4226
|
for (let e = t; e < r; e++) n[e] > o && (o = n[e]);
|
|
3951
4227
|
a[e] = o;
|
|
3952
4228
|
}
|
|
3953
|
-
|
|
3954
|
-
},
|
|
4229
|
+
D[e] = a;
|
|
4230
|
+
}, K = typeof ResizeObserver < "u" ? new ResizeObserver((e) => {
|
|
3955
4231
|
e.forEach((e) => {
|
|
3956
4232
|
let t = e.target.dataset.waveId;
|
|
3957
|
-
t &&
|
|
4233
|
+
t && G(t);
|
|
3958
4234
|
});
|
|
3959
|
-
}) : null,
|
|
3960
|
-
let n =
|
|
3961
|
-
if (n &&
|
|
4235
|
+
}) : null, ie = (e, t) => {
|
|
4236
|
+
let n = I.get(e);
|
|
4237
|
+
if (n && K && K.unobserve(n), t) {
|
|
3962
4238
|
let n = t;
|
|
3963
|
-
n.dataset.waveId = e,
|
|
3964
|
-
} else
|
|
3965
|
-
},
|
|
3966
|
-
if (t.disabled) return;
|
|
3967
|
-
let n = [],
|
|
4239
|
+
n.dataset.waveId = e, I.set(e, n), K ? K.observe(n) : G(e);
|
|
4240
|
+
} else I.delete(e);
|
|
4241
|
+
}, q = (e) => {
|
|
4242
|
+
if (t.disabled || t.readonly) return;
|
|
4243
|
+
let n = [], r = !1;
|
|
3968
4244
|
Array.prototype.forEach.call(e, (e) => {
|
|
3969
|
-
if (!
|
|
3970
|
-
|
|
4245
|
+
if (!H(e)) {
|
|
4246
|
+
f("error", {
|
|
3971
4247
|
type: "type",
|
|
3972
4248
|
file: e
|
|
3973
4249
|
});
|
|
3974
4250
|
return;
|
|
3975
4251
|
}
|
|
3976
4252
|
if (t.maxSize > 0 && e.size > t.maxSize * 1024 * 1024) {
|
|
3977
|
-
|
|
4253
|
+
f("error", {
|
|
3978
4254
|
type: "size",
|
|
3979
4255
|
file: e
|
|
3980
4256
|
});
|
|
3981
4257
|
return;
|
|
3982
4258
|
}
|
|
3983
|
-
if (!t.multiple && t.modelValue.length + n.length +
|
|
3984
|
-
|
|
4259
|
+
if (!t.multiple && t.modelValue.length + n.length + y.value.length >= 1) {
|
|
4260
|
+
r ||= (f("error", {
|
|
3985
4261
|
type: "count",
|
|
3986
4262
|
file: e
|
|
3987
4263
|
}), !0);
|
|
@@ -3989,139 +4265,196 @@ var qi = {
|
|
|
3989
4265
|
}
|
|
3990
4266
|
n.push(e);
|
|
3991
4267
|
}), n.length !== 0 && n.forEach((e) => {
|
|
3992
|
-
let n = "p" +
|
|
3993
|
-
|
|
4268
|
+
let n = "p" + z();
|
|
4269
|
+
y.value.push({
|
|
3994
4270
|
tag: n,
|
|
3995
4271
|
name: e.name
|
|
3996
|
-
}),
|
|
3997
|
-
let
|
|
3998
|
-
id:
|
|
4272
|
+
}), re(e).then(({ peaks: n, duration: r }) => {
|
|
4273
|
+
let i = {
|
|
4274
|
+
id: z(),
|
|
3999
4275
|
file: e,
|
|
4000
4276
|
name: e.name,
|
|
4001
4277
|
size: e.size,
|
|
4002
|
-
duration:
|
|
4278
|
+
duration: r,
|
|
4003
4279
|
url: URL.createObjectURL(e)
|
|
4004
4280
|
};
|
|
4005
|
-
|
|
4006
|
-
let
|
|
4007
|
-
|
|
4281
|
+
T[i.id] = n, O[i.id] = 0, k.add(i.id), M(i.url, n, r);
|
|
4282
|
+
let a = [...t.modelValue, i];
|
|
4283
|
+
f("update:modelValue", a), f("change", a), f("add", [i]);
|
|
4008
4284
|
}).catch(() => {
|
|
4009
|
-
|
|
4285
|
+
f("error", {
|
|
4010
4286
|
type: "type",
|
|
4011
4287
|
file: e
|
|
4012
4288
|
});
|
|
4013
4289
|
}).finally(() => {
|
|
4014
|
-
|
|
4290
|
+
y.value = y.value.filter((e) => e.tag !== n);
|
|
4015
4291
|
});
|
|
4016
4292
|
});
|
|
4017
|
-
},
|
|
4018
|
-
if (!t.disabled) if (t.multiple) {
|
|
4293
|
+
}, ae = async () => {
|
|
4294
|
+
if (!(t.disabled || t.readonly)) if (t.multiple) {
|
|
4019
4295
|
let e = await $.input.custom(t.accept, !0);
|
|
4020
4296
|
if (e.length === 0) return;
|
|
4021
|
-
|
|
4297
|
+
q(e.map((e) => e.file));
|
|
4022
4298
|
} else {
|
|
4023
4299
|
let e = await $.input.custom(t.accept, !1);
|
|
4024
4300
|
if (!e) return;
|
|
4025
|
-
|
|
4301
|
+
q([e.file]);
|
|
4026
4302
|
}
|
|
4027
|
-
},
|
|
4028
|
-
if (t.disabled) return;
|
|
4303
|
+
}, oe = async (e) => {
|
|
4304
|
+
if (t.disabled || t.readonly) return;
|
|
4029
4305
|
let n = t.modelValue.find((t) => t.id === e);
|
|
4030
|
-
if (!n || !await
|
|
4306
|
+
if (!n || !await p(`確定要移除「${B(n)}」嗎?`, {
|
|
4031
4307
|
title: "移除音訊",
|
|
4032
4308
|
status: "danger",
|
|
4033
4309
|
confirmText: "移除",
|
|
4034
4310
|
cancelText: "取消"
|
|
4035
4311
|
})) return;
|
|
4036
|
-
|
|
4037
|
-
let
|
|
4038
|
-
|
|
4039
|
-
},
|
|
4040
|
-
let e =
|
|
4041
|
-
e &&
|
|
4042
|
-
},
|
|
4043
|
-
let n =
|
|
4312
|
+
b.value === e && se(), V(n.url), P(n.url, !0), delete T[e], delete D[e], delete O[e], k.delete(e);
|
|
4313
|
+
let r = t.modelValue.filter((t) => t.id !== e);
|
|
4314
|
+
f("update:modelValue", r), f("change", r), f("remove", n);
|
|
4315
|
+
}, se = () => {
|
|
4316
|
+
let e = b.value;
|
|
4317
|
+
e && F.get(e)?.pause(), b.value = null;
|
|
4318
|
+
}, ce = (e) => {
|
|
4319
|
+
let n = F.get(e);
|
|
4044
4320
|
if (!n) return;
|
|
4045
|
-
if (
|
|
4046
|
-
n.pause(),
|
|
4321
|
+
if (b.value === e) {
|
|
4322
|
+
n.pause(), b.value = null;
|
|
4047
4323
|
return;
|
|
4048
4324
|
}
|
|
4049
|
-
|
|
4325
|
+
b.value && F.get(b.value)?.pause();
|
|
4050
4326
|
let r = t.modelValue.find((t) => t.id === e);
|
|
4051
|
-
(n.ended || r?.duration && n.currentTime >= r.duration) && (n.currentTime = 0),
|
|
4052
|
-
},
|
|
4053
|
-
|
|
4054
|
-
},
|
|
4055
|
-
|
|
4056
|
-
},
|
|
4057
|
-
let n =
|
|
4327
|
+
(n.ended || r?.duration && n.currentTime >= r.duration) && (n.currentTime = 0), b.value = e, n.play();
|
|
4328
|
+
}, le = (e, t) => {
|
|
4329
|
+
O[e] = t.target.currentTime;
|
|
4330
|
+
}, ue = (e) => {
|
|
4331
|
+
b.value === e && (b.value = null), O[e] = 0;
|
|
4332
|
+
}, de = (e, t) => {
|
|
4333
|
+
let n = F.get(e), r = I.get(e);
|
|
4058
4334
|
if (!n || !r || !n.duration || isNaN(n.duration)) return;
|
|
4059
4335
|
let i = r.getBoundingClientRect();
|
|
4060
|
-
n.currentTime = Math.min(Math.max((t - i.left) / i.width, 0), 1) * n.duration,
|
|
4061
|
-
},
|
|
4336
|
+
n.currentTime = Math.min(Math.max((t - i.left) / i.width, 0), 1) * n.duration, O[e] = n.currentTime;
|
|
4337
|
+
}, fe = (e, n) => {
|
|
4062
4338
|
if (t.disabled) return;
|
|
4063
|
-
n.preventDefault(),
|
|
4339
|
+
n.preventDefault(), de(e, ("touches" in n ? n.touches[0] : n).clientX);
|
|
4064
4340
|
let r = (t) => {
|
|
4065
|
-
|
|
4341
|
+
de(e, ("touches" in t ? t.touches[0] : t).clientX);
|
|
4066
4342
|
}, i = () => {
|
|
4067
4343
|
window.removeEventListener("mousemove", r), window.removeEventListener("mouseup", i), window.removeEventListener("touchmove", r), window.removeEventListener("touchend", i);
|
|
4068
4344
|
};
|
|
4069
4345
|
window.addEventListener("mousemove", r), window.addEventListener("mouseup", i), window.addEventListener("touchmove", r, { passive: !1 }), window.addEventListener("touchend", i);
|
|
4070
|
-
},
|
|
4346
|
+
}, pe = (e, t) => {
|
|
4071
4347
|
if (!e.duration || isNaN(e.duration)) return !1;
|
|
4072
|
-
let n =
|
|
4348
|
+
let n = D[e.id]?.length || 0;
|
|
4073
4349
|
if (n === 0) return !1;
|
|
4074
|
-
let r = (
|
|
4350
|
+
let r = (O[e.id] || 0) / e.duration;
|
|
4075
4351
|
return (t + .5) / n <= r;
|
|
4352
|
+
}, me = (e, n) => {
|
|
4353
|
+
let r = t.modelValue.find((t) => t.id === e);
|
|
4354
|
+
if (!r || r.duration != null) return;
|
|
4355
|
+
let i = t.modelValue.map((t) => t.id === e ? {
|
|
4356
|
+
...t,
|
|
4357
|
+
duration: n
|
|
4358
|
+
} : t);
|
|
4359
|
+
f("update:modelValue", i), f("change", i);
|
|
4360
|
+
}, he = (e, n, r) => {
|
|
4361
|
+
t.modelValue.some((t) => t.id === e) && (T[e] = n, G(e), me(e, r));
|
|
4362
|
+
}, ge = async (e) => {
|
|
4363
|
+
O[e.id] ?? (O[e.id] = 0);
|
|
4364
|
+
let t = r.get(e.url);
|
|
4365
|
+
if (t) {
|
|
4366
|
+
M(e.url, t.peaks, t.duration), he(e.id, t.peaks, t.duration);
|
|
4367
|
+
return;
|
|
4368
|
+
}
|
|
4369
|
+
try {
|
|
4370
|
+
let { peaks: t, duration: n } = await ne(await (await fetch(e.url)).arrayBuffer());
|
|
4371
|
+
M(e.url, t, n), he(e.id, t, n);
|
|
4372
|
+
} catch {}
|
|
4373
|
+
}, _e = (e, t) => {
|
|
4374
|
+
let n = t.target.duration;
|
|
4375
|
+
!isNaN(n) && isFinite(n) && me(e, n);
|
|
4076
4376
|
};
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
e.url
|
|
4080
|
-
})
|
|
4377
|
+
A(() => t.modelValue, (e) => {
|
|
4378
|
+
e.forEach((e) => {
|
|
4379
|
+
!e.url || k.has(e.id) || (k.add(e.id), T[e.id] || ge(e));
|
|
4380
|
+
});
|
|
4381
|
+
}, { immediate: !0 }), v(() => {
|
|
4382
|
+
t.autoRevoke && t.modelValue.forEach((e) => V(e.url)), j.forEach((e, t) => {
|
|
4383
|
+
for (let n = 0; n < e; n++) l(t, !1);
|
|
4384
|
+
}), j.clear(), K?.disconnect(), U &&= (U.close(), null);
|
|
4081
4385
|
});
|
|
4082
|
-
let
|
|
4083
|
-
onClick:
|
|
4386
|
+
let ve = {
|
|
4387
|
+
onClick: ae,
|
|
4084
4388
|
onDragenter: (e) => {
|
|
4085
|
-
t.disabled || (e.preventDefault(),
|
|
4389
|
+
t.disabled || t.readonly || (e.preventDefault(), h.value = !0);
|
|
4086
4390
|
},
|
|
4087
4391
|
onDragover: (e) => e.preventDefault(),
|
|
4088
4392
|
onDragleave: (e) => {
|
|
4089
|
-
e.preventDefault(),
|
|
4393
|
+
e.preventDefault(), h.value = !1;
|
|
4090
4394
|
},
|
|
4091
4395
|
onDrop: (e) => {
|
|
4092
|
-
t.disabled || (e.preventDefault(),
|
|
4396
|
+
t.disabled || t.readonly || (e.preventDefault(), h.value = !1, e.dataTransfer?.files?.length && q(e.dataTransfer.files));
|
|
4093
4397
|
}
|
|
4094
4398
|
};
|
|
4095
|
-
return (n, r) => (x(), s("div", { class: g(["audio-input", {
|
|
4399
|
+
return (n, r) => (x(), s("div", { class: g(["audio-input", {
|
|
4400
|
+
"is-disabled": t.disabled,
|
|
4401
|
+
"is-readonly": t.readonly
|
|
4402
|
+
}]) }, [t.title || t.showCount ? (x(), s("div", ro, [t.title ? (x(), s("span", {
|
|
4096
4403
|
key: 0,
|
|
4097
4404
|
class: "title",
|
|
4098
4405
|
textContent: E(t.title)
|
|
4099
|
-
}, null, 8,
|
|
4406
|
+
}, null, 8, io)) : o("", !0), t.showCount ? (x(), s("span", ao, E(te.value) + " 首", 1)) : o("", !0)])) : o("", !0), te.value === 0 && y.value.length === 0 ? (x(), s("div", m({
|
|
4100
4407
|
key: 1,
|
|
4101
|
-
class: ["empty", {
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4408
|
+
class: ["empty", {
|
|
4409
|
+
"is-drag": h.value,
|
|
4410
|
+
"is-static": t.readonly
|
|
4411
|
+
}]
|
|
4412
|
+
}, t.readonly ? {} : ve), [
|
|
4413
|
+
t.readonly ? o("", !0) : (x(), s("span", oo, [...r[0] ||= [c("svg", {
|
|
4414
|
+
viewBox: "0 0 24 24",
|
|
4415
|
+
fill: "none",
|
|
4416
|
+
stroke: "currentColor",
|
|
4417
|
+
"stroke-width": "1.7",
|
|
4418
|
+
"stroke-linecap": "round",
|
|
4419
|
+
"stroke-linejoin": "round"
|
|
4420
|
+
}, [
|
|
4421
|
+
c("path", { d: "M9 18V5l12-2v13" }),
|
|
4422
|
+
c("circle", {
|
|
4423
|
+
cx: "6",
|
|
4424
|
+
cy: "18",
|
|
4425
|
+
r: "3"
|
|
4426
|
+
}),
|
|
4427
|
+
c("circle", {
|
|
4428
|
+
cx: "18",
|
|
4429
|
+
cy: "16",
|
|
4430
|
+
r: "3"
|
|
4431
|
+
})
|
|
4432
|
+
], -1)]])),
|
|
4433
|
+
c("h3", { textContent: E(t.readonly ? "目前沒有音訊" : t.emptyTitle) }, null, 8, so),
|
|
4434
|
+
t.readonly ? o("", !0) : (x(), s("p", {
|
|
4435
|
+
key: 1,
|
|
4436
|
+
textContent: E(t.emptyHint)
|
|
4437
|
+
}, null, 8, co))
|
|
4438
|
+
], 16)) : (x(), s("div", lo, [
|
|
4107
4439
|
(x(!0), s(e, null, w(t.modelValue, (n) => (x(), s("div", {
|
|
4108
4440
|
key: n.id,
|
|
4109
|
-
class: g(["row", { "is-playing":
|
|
4441
|
+
class: g(["row", { "is-playing": b.value === n.id }])
|
|
4110
4442
|
}, [
|
|
4111
4443
|
c("audio", {
|
|
4112
4444
|
ref_for: !0,
|
|
4113
|
-
ref: (e) =>
|
|
4445
|
+
ref: (e) => ee(n.id, e),
|
|
4114
4446
|
src: n.url,
|
|
4115
4447
|
preload: "metadata",
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4448
|
+
onLoadedmetadata: (e) => _e(n.id, e),
|
|
4449
|
+
onTimeupdate: (e) => le(n.id, e),
|
|
4450
|
+
onEnded: (e) => ue(n.id)
|
|
4451
|
+
}, null, 40, uo),
|
|
4119
4452
|
c("button", {
|
|
4120
4453
|
class: "play-btn",
|
|
4121
|
-
"aria-label":
|
|
4454
|
+
"aria-label": b.value === n.id ? "暫停" : "播放",
|
|
4122
4455
|
disabled: !n.url,
|
|
4123
|
-
onClick: (e) =>
|
|
4124
|
-
}, [
|
|
4456
|
+
onClick: (e) => ce(n.id)
|
|
4457
|
+
}, [b.value === n.id ? (x(), s("svg", po, [...r[1] ||= [c("rect", {
|
|
4125
4458
|
x: "6",
|
|
4126
4459
|
y: "5",
|
|
4127
4460
|
width: "4",
|
|
@@ -4133,28 +4466,29 @@ var qi = {
|
|
|
4133
4466
|
width: "4",
|
|
4134
4467
|
height: "14",
|
|
4135
4468
|
rx: "1"
|
|
4136
|
-
}, null, -1)]])) : (x(), s("svg",
|
|
4137
|
-
c("div",
|
|
4469
|
+
}, null, -1)]])) : (x(), s("svg", mo, [...r[2] ||= [c("path", { d: "M8 5v14l11-7z" }, null, -1)]]))], 8, fo),
|
|
4470
|
+
c("div", ho, [c("div", {
|
|
4138
4471
|
class: "name",
|
|
4139
|
-
title: n
|
|
4140
|
-
}, E(n
|
|
4472
|
+
title: B(n)
|
|
4473
|
+
}, E(B(n)), 9, go), c("div", _o, [n.size == null ? o("", !0) : (x(), s(e, { key: 0 }, [d(E(L(n.size)) + " · ", 1)], 64)), d(" " + E(R(n.duration)), 1)])]),
|
|
4141
4474
|
c("div", {
|
|
4142
4475
|
class: "wave",
|
|
4143
4476
|
ref_for: !0,
|
|
4144
|
-
ref: (e) =>
|
|
4145
|
-
onMousedown: (e) =>
|
|
4146
|
-
onTouchstart: (e) =>
|
|
4147
|
-
}, [(x(!0), s(e, null, w(
|
|
4477
|
+
ref: (e) => ie(n.id, e),
|
|
4478
|
+
onMousedown: (e) => fe(n.id, e),
|
|
4479
|
+
onTouchstart: (e) => fe(n.id, e)
|
|
4480
|
+
}, [(x(!0), s(e, null, w(D[n.id] || [], (e, t) => (x(), s("span", {
|
|
4148
4481
|
key: t,
|
|
4149
|
-
class: g(["bar", { "is-played":
|
|
4482
|
+
class: g(["bar", { "is-played": pe(n, t) }]),
|
|
4150
4483
|
style: _({ height: Math.max(2, Math.round(e * 34)) + "px" })
|
|
4151
|
-
}, null, 6))), 128))], 40,
|
|
4152
|
-
c("div",
|
|
4153
|
-
|
|
4484
|
+
}, null, 6))), 128))], 40, vo),
|
|
4485
|
+
c("div", yo, E(R(O[n.id] || 0)) + " / " + E(R(n.duration)), 1),
|
|
4486
|
+
t.readonly ? o("", !0) : (x(), s("button", {
|
|
4487
|
+
key: 0,
|
|
4154
4488
|
class: "del-btn",
|
|
4155
4489
|
"aria-label": "刪除",
|
|
4156
4490
|
disabled: t.disabled,
|
|
4157
|
-
onClick: N((e) =>
|
|
4491
|
+
onClick: N((e) => oe(n.id), ["stop"])
|
|
4158
4492
|
}, [...r[3] ||= [c("svg", {
|
|
4159
4493
|
viewBox: "0 0 24 24",
|
|
4160
4494
|
fill: "none",
|
|
@@ -4162,9 +4496,9 @@ var qi = {
|
|
|
4162
4496
|
"stroke-width": "1.8",
|
|
4163
4497
|
"stroke-linecap": "round",
|
|
4164
4498
|
"stroke-linejoin": "round"
|
|
4165
|
-
}, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8,
|
|
4499
|
+
}, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8, bo))
|
|
4166
4500
|
], 2))), 128)),
|
|
4167
|
-
(x(!0), s(e, null, w(
|
|
4501
|
+
(x(!0), s(e, null, w(y.value, (e) => (x(), s("div", {
|
|
4168
4502
|
key: e.tag,
|
|
4169
4503
|
class: "row is-pending"
|
|
4170
4504
|
}, [r[5] ||= c("span", {
|
|
@@ -4176,20 +4510,20 @@ var qi = {
|
|
|
4176
4510
|
stroke: "currentColor",
|
|
4177
4511
|
"stroke-width": "2",
|
|
4178
4512
|
"stroke-linecap": "round"
|
|
4179
|
-
}, [c("path", { d: "M12 3a9 9 0 1 0 9 9" })])], -1), c("div",
|
|
4180
|
-
t.multiple ? (x(), s("div", m({
|
|
4513
|
+
}, [c("path", { d: "M12 3a9 9 0 1 0 9 9" })])], -1), c("div", xo, [c("div", So, E(e.name), 1), r[4] ||= c("div", { class: "sub" }, "解析波形中…", -1)])]))), 128)),
|
|
4514
|
+
t.multiple && !t.readonly ? (x(), s("div", m({
|
|
4181
4515
|
key: 0,
|
|
4182
|
-
class: ["add", { "is-drag":
|
|
4183
|
-
},
|
|
4516
|
+
class: ["add", { "is-drag": h.value }]
|
|
4517
|
+
}, ve), [...r[6] ||= [u("<span class=\"plus\" aria-hidden=\"true\" data-v-1e35f393><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" data-v-1e35f393><path d=\"M12 5v14M5 12h14\" data-v-1e35f393></path></svg></span><div class=\"add-text\" data-v-1e35f393><div class=\"t\" data-v-1e35f393>新增音訊</div><div class=\"d\" data-v-1e35f393>點擊或拖放檔案 · MP3 / WAV / OGG / M4A</div></div>", 2)]], 16)) : o("", !0)
|
|
4184
4518
|
]))], 2));
|
|
4185
4519
|
}
|
|
4186
|
-
}), [["__scopeId", "data-v-
|
|
4520
|
+
}), [["__scopeId", "data-v-1e35f393"]]), Eo = { class: "header" }, Do = { class: "brand-logo" }, Oo = { class: "logo-text" }, ko = { class: "logo-icon" }, Ao = { class: "nav" }, jo = ["onClick"], Mo = ["innerHTML"], No = { class: "nav-list" }, Po = ["href", "onClick"], Fo = ["innerHTML"], Io = { class: "nav-text" }, Lo = ["href", "onClick"], Ro = { class: "title no-children" }, zo = ["innerHTML"], Bo = { class: "user-capsule" }, Vo = { class: "user-avatar" }, Ho = ["src"], Uo = {
|
|
4187
4521
|
key: 1,
|
|
4188
4522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4189
4523
|
width: "36",
|
|
4190
4524
|
height: "36",
|
|
4191
4525
|
viewBox: "0 0 36 36"
|
|
4192
|
-
},
|
|
4526
|
+
}, Wo = { class: "user-info" }, Go = { class: "user-name-row" }, Ko = { class: "user-name" }, qo = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
4193
4527
|
__name: "NSidebar",
|
|
4194
4528
|
props: {
|
|
4195
4529
|
title: { default: "" },
|
|
@@ -4208,7 +4542,7 @@ var qi = {
|
|
|
4208
4542
|
"navigate"
|
|
4209
4543
|
],
|
|
4210
4544
|
setup(n, { emit: r }) {
|
|
4211
|
-
let { isMenuExpanded: i, toggleMenu: o, resolveMenuActive: l, resolveItemActive: d } =
|
|
4545
|
+
let { isMenuExpanded: i, toggleMenu: o, resolveMenuActive: l, resolveItemActive: d } = rn(), p = C(!1), m = r, h = (e) => {
|
|
4212
4546
|
n.currentPath !== e.route && m("navigate", e);
|
|
4213
4547
|
}, _ = (e) => {
|
|
4214
4548
|
!e.route || n.currentPath === e.route || m("navigate", {
|
|
@@ -4242,8 +4576,8 @@ var qi = {
|
|
|
4242
4576
|
class: "content",
|
|
4243
4577
|
onMouseenter: v[2] ||= (e) => p.value = !0
|
|
4244
4578
|
}, [
|
|
4245
|
-
T(r.$slots, "header", {}, () => [c("div",
|
|
4246
|
-
c("div",
|
|
4579
|
+
T(r.$slots, "header", {}, () => [c("div", Eo, [c("div", Do, [c("span", Oo, E(n.title), 1), c("span", ko, E(n.title.substring(0, 1).toUpperCase()), 1)])])], !0),
|
|
4580
|
+
c("div", Ao, [(x(!0), s(e, null, w(n.menus, (t) => (x(), s(e, null, [t.children?.length ? (x(), s("div", {
|
|
4247
4581
|
key: 0,
|
|
4248
4582
|
class: g(["menu", {
|
|
4249
4583
|
open: D(i)(t.title),
|
|
@@ -4252,7 +4586,7 @@ var qi = {
|
|
|
4252
4586
|
}, [c("div", {
|
|
4253
4587
|
class: "title",
|
|
4254
4588
|
onClick: (e) => D(o)(t.title)
|
|
4255
|
-
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8,
|
|
4589
|
+
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Mo), c("span", null, E(t.title), 1)]), v[6] ||= c("svg", {
|
|
4256
4590
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4257
4591
|
width: "14",
|
|
4258
4592
|
height: "14",
|
|
@@ -4263,23 +4597,23 @@ var qi = {
|
|
|
4263
4597
|
"stroke-linecap": "round",
|
|
4264
4598
|
"stroke-linejoin": "round",
|
|
4265
4599
|
class: "icon"
|
|
4266
|
-
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8,
|
|
4600
|
+
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8, jo), c("div", No, [c("div", null, [(x(!0), s(e, null, w(t.children, (e) => (x(), s("a", {
|
|
4267
4601
|
href: e.route,
|
|
4268
4602
|
onClick: N((t) => h(e), ["prevent"])
|
|
4269
|
-
}, [c("div", { class: g(["nav-item", { active: D(d)(e, n.currentPath) }]) }, [c("div", { innerHTML: e.icon }, null, 8,
|
|
4603
|
+
}, [c("div", { class: g(["nav-item", { active: D(d)(e, n.currentPath) }]) }, [c("div", { innerHTML: e.icon }, null, 8, Fo), c("span", Io, E(e.title), 1)], 2)], 8, Po))), 256))])])], 2)) : (x(), s("div", {
|
|
4270
4604
|
key: 1,
|
|
4271
4605
|
class: g(["menu", { active: t.route === n.currentPath }])
|
|
4272
4606
|
}, [c("a", {
|
|
4273
4607
|
href: t.route,
|
|
4274
4608
|
onClick: N((e) => _(t), ["prevent"])
|
|
4275
|
-
}, [c("div",
|
|
4276
|
-
c("div",
|
|
4277
|
-
c("div",
|
|
4609
|
+
}, [c("div", Ro, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, zo), c("span", null, E(t.title), 1)])])], 8, Lo)], 2))], 64))), 256))]),
|
|
4610
|
+
c("div", Bo, [T(r.$slots, "user", {}, () => [
|
|
4611
|
+
c("div", Vo, [n.userAvatarUrl ? (x(), s("img", {
|
|
4278
4612
|
key: 0,
|
|
4279
4613
|
src: n.userAvatarUrl,
|
|
4280
4614
|
alt: "User Avatar"
|
|
4281
|
-
}, null, 8,
|
|
4282
|
-
c("div",
|
|
4615
|
+
}, null, 8, Ho)) : (x(), s("svg", Uo, [...v[7] ||= [u("<defs data-v-2c73c218><clipPath id=\"avatarClip\" data-v-2c73c218><circle cx=\"18\" cy=\"18\" r=\"18\" data-v-2c73c218></circle></clipPath></defs><circle cx=\"18\" cy=\"18\" r=\"18\" fill=\"#dbeafe\" data-v-2c73c218></circle><g clip-path=\"url(#avatarClip)\" data-v-2c73c218><circle cx=\"18\" cy=\"14\" r=\"6\" fill=\"#2563eb\" data-v-2c73c218></circle><path d=\"M6,34 Q6,24 18,24 Q30,24 30,34\" fill=\"#2563eb\" data-v-2c73c218></path></g>", 3)]]))]),
|
|
4616
|
+
c("div", Wo, [c("div", Go, [c("span", Ko, E(n.userName), 1)])]),
|
|
4283
4617
|
f(z, {
|
|
4284
4618
|
class: "logout-btn",
|
|
4285
4619
|
intent: "error",
|
|
@@ -4318,7 +4652,7 @@ var qi = {
|
|
|
4318
4652
|
}, null, 2)]))
|
|
4319
4653
|
], 34));
|
|
4320
4654
|
}
|
|
4321
|
-
}), [["__scopeId", "data-v-2c73c218"]]),
|
|
4655
|
+
}), [["__scopeId", "data-v-2c73c218"]]), Jo = { class: "layout" }, Yo = { class: "main-content" }, Xo = { class: "copyright" }, Zo = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
4322
4656
|
__name: "NLayout",
|
|
4323
4657
|
props: {
|
|
4324
4658
|
title: { default: "NICKLABS" },
|
|
@@ -4333,8 +4667,8 @@ var qi = {
|
|
|
4333
4667
|
},
|
|
4334
4668
|
emits: ["logout", "navigate"],
|
|
4335
4669
|
setup(e, { emit: t }) {
|
|
4336
|
-
let n =
|
|
4337
|
-
return (t, i) => (x(), s("div",
|
|
4670
|
+
let n = rn(), r = t;
|
|
4671
|
+
return (t, i) => (x(), s("div", Jo, [e.isShowSidebar ? (x(), a(qo, {
|
|
4338
4672
|
key: 0,
|
|
4339
4673
|
title: e.title,
|
|
4340
4674
|
userName: e.userName,
|
|
@@ -4350,18 +4684,18 @@ var qi = {
|
|
|
4350
4684
|
"isOpen",
|
|
4351
4685
|
"menus",
|
|
4352
4686
|
"currentPath"
|
|
4353
|
-
])) : o("", !0), c("main",
|
|
4687
|
+
])) : o("", !0), c("main", Yo, [T(t.$slots, "default", {}, void 0, !0), c("div", Xo, E(e.copyright), 1)])]));
|
|
4354
4688
|
}
|
|
4355
|
-
}), [["__scopeId", "data-v-41b1eb44"]]),
|
|
4689
|
+
}), [["__scopeId", "data-v-41b1eb44"]]), Qo = { class: "topbar" }, $o = { class: "topbar-left" }, es = { class: "topbar-right" }, ts = {
|
|
4356
4690
|
key: 0,
|
|
4357
4691
|
class: "pill"
|
|
4358
|
-
},
|
|
4692
|
+
}, ns = {
|
|
4359
4693
|
key: 0,
|
|
4360
4694
|
class: "name"
|
|
4361
|
-
},
|
|
4695
|
+
}, rs = {
|
|
4362
4696
|
key: 1,
|
|
4363
4697
|
class: "separator"
|
|
4364
|
-
},
|
|
4698
|
+
}, is = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
4365
4699
|
__name: "NNavigation",
|
|
4366
4700
|
props: {
|
|
4367
4701
|
isShowSidebar: {
|
|
@@ -4386,7 +4720,7 @@ var qi = {
|
|
|
4386
4720
|
let n = t, r = () => {
|
|
4387
4721
|
document.fullscreenElement ? document.exitFullscreen?.() : document.documentElement.requestFullscreen();
|
|
4388
4722
|
};
|
|
4389
|
-
return (t, i) => (x(), s("header",
|
|
4723
|
+
return (t, i) => (x(), s("header", Qo, [c("div", $o, [e.isShowSidebar ? (x(), a(z, {
|
|
4390
4724
|
key: 0,
|
|
4391
4725
|
onClick: i[0] ||= (e) => n("toggleSidebar"),
|
|
4392
4726
|
padding: "8px"
|
|
@@ -4429,9 +4763,9 @@ var qi = {
|
|
|
4429
4763
|
c("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
|
|
4430
4764
|
], -1)]]),
|
|
4431
4765
|
_: 1
|
|
4432
|
-
})) : o("", !0)]), c("div",
|
|
4433
|
-
e.isShowUser ? (x(), s("span",
|
|
4434
|
-
e.isShowUser && e.isShowLogoutButton ? (x(), s("div",
|
|
4766
|
+
})) : o("", !0)]), c("div", es, [e.isShowUser || e.isShowLogoutButton ? (x(), s("div", ts, [
|
|
4767
|
+
e.isShowUser ? (x(), s("span", ns, "Nick")) : o("", !0),
|
|
4768
|
+
e.isShowUser && e.isShowLogoutButton ? (x(), s("div", rs)) : o("", !0),
|
|
4435
4769
|
e.isShowLogoutButton ? (x(), a(z, {
|
|
4436
4770
|
key: 2,
|
|
4437
4771
|
variant: "mute",
|
|
@@ -4457,10 +4791,10 @@ var qi = {
|
|
|
4457
4791
|
})) : o("", !0)
|
|
4458
4792
|
])) : o("", !0)])]));
|
|
4459
4793
|
}
|
|
4460
|
-
}), [["__scopeId", "data-v-f38a4beb"]]),
|
|
4794
|
+
}), [["__scopeId", "data-v-f38a4beb"]]), as = { class: "brand" }, os = ["src", "alt"], ss = {
|
|
4461
4795
|
key: 1,
|
|
4462
4796
|
class: "icon"
|
|
4463
|
-
},
|
|
4797
|
+
}, cs = { key: 2 }, ls = { key: 3 }, us = /* @__PURE__ */ R(/* @__PURE__ */ p({
|
|
4464
4798
|
__name: "NLoginLayout",
|
|
4465
4799
|
props: {
|
|
4466
4800
|
backgroundImage: { default: "" },
|
|
@@ -4473,20 +4807,20 @@ var qi = {
|
|
|
4473
4807
|
return (n, r) => (x(), s("div", {
|
|
4474
4808
|
class: "login-wrapper",
|
|
4475
4809
|
style: _({ "--login-bg": e.backgroundImage ? `url('${e.backgroundImage}')` : "var(--bg-gradient)" })
|
|
4476
|
-
}, [f(
|
|
4810
|
+
}, [f(Sn, {
|
|
4477
4811
|
size: "lg",
|
|
4478
4812
|
radius: "xl",
|
|
4479
4813
|
class: "card"
|
|
4480
4814
|
}, {
|
|
4481
|
-
default: j(() => [c("div",
|
|
4815
|
+
default: j(() => [c("div", as, [
|
|
4482
4816
|
t.value ? (x(), s("img", {
|
|
4483
4817
|
key: 0,
|
|
4484
4818
|
class: "logo-img",
|
|
4485
4819
|
src: e.logo,
|
|
4486
4820
|
alt: e.title
|
|
4487
|
-
}, null, 8,
|
|
4488
|
-
e.title ? (x(), s("h1",
|
|
4489
|
-
e.description ? (x(), s("p",
|
|
4821
|
+
}, null, 8, os)) : (x(), s("div", ss, E(e.logo), 1)),
|
|
4822
|
+
e.title ? (x(), s("h1", cs, E(e.title), 1)) : o("", !0),
|
|
4823
|
+
e.description ? (x(), s("p", ls, E(e.description), 1)) : o("", !0)
|
|
4490
4824
|
]), T(n.$slots, "default", {}, void 0, !0)]),
|
|
4491
4825
|
_: 3
|
|
4492
4826
|
})], 4));
|
|
@@ -4494,19 +4828,19 @@ var qi = {
|
|
|
4494
4828
|
}), [["__scopeId", "data-v-f0866bc5"]]);
|
|
4495
4829
|
//#endregion
|
|
4496
4830
|
//#region src/composables/useRouteModal.ts
|
|
4497
|
-
function
|
|
4831
|
+
function ds(e) {
|
|
4498
4832
|
let t = i(() => {
|
|
4499
|
-
let t =
|
|
4833
|
+
let t = I();
|
|
4500
4834
|
return t ? t.currentRoute.value.matched.some((t) => t.name === e.routeName) : !1;
|
|
4501
|
-
}), n = i(() =>
|
|
4835
|
+
}), n = i(() => I()?.currentRoute.value.params ?? {});
|
|
4502
4836
|
function r(t = {}) {
|
|
4503
|
-
|
|
4837
|
+
I()?.push({
|
|
4504
4838
|
name: e.routeName,
|
|
4505
4839
|
params: t
|
|
4506
4840
|
});
|
|
4507
4841
|
}
|
|
4508
4842
|
function a() {
|
|
4509
|
-
let t =
|
|
4843
|
+
let t = I();
|
|
4510
4844
|
t && (window.history.state?.back ? t.back() : e.parentRouteName ? t.push({ name: e.parentRouteName }) : t.back());
|
|
4511
4845
|
}
|
|
4512
4846
|
return {
|
|
@@ -4518,40 +4852,40 @@ function Yo(e) {
|
|
|
4518
4852
|
}
|
|
4519
4853
|
//#endregion
|
|
4520
4854
|
//#region src/index.ts
|
|
4521
|
-
var
|
|
4855
|
+
var fs = {
|
|
4522
4856
|
NButton: z,
|
|
4523
4857
|
NBreadcrumb: re,
|
|
4524
|
-
NInput:
|
|
4525
|
-
NTextarea:
|
|
4526
|
-
NCheckbox:
|
|
4858
|
+
NInput: ce,
|
|
4859
|
+
NTextarea: pe,
|
|
4860
|
+
NCheckbox: ye,
|
|
4527
4861
|
NSelect: Oe,
|
|
4528
|
-
NFileSelect:
|
|
4529
|
-
NForm:
|
|
4530
|
-
NList:
|
|
4531
|
-
NEmpty:
|
|
4532
|
-
NToast:
|
|
4533
|
-
NLoading:
|
|
4534
|
-
NCode:
|
|
4535
|
-
NSwitch:
|
|
4536
|
-
NTag:
|
|
4537
|
-
NDatePicker:
|
|
4538
|
-
NTooltip:
|
|
4539
|
-
NModal:
|
|
4540
|
-
NDrawer:
|
|
4541
|
-
NAlert:
|
|
4542
|
-
NTable:
|
|
4543
|
-
NVideoSelect:
|
|
4544
|
-
NImageSelect:
|
|
4545
|
-
NAudioSelect:
|
|
4546
|
-
NLayout:
|
|
4547
|
-
NNavigation:
|
|
4548
|
-
NSidebar:
|
|
4549
|
-
NCard:
|
|
4550
|
-
NLoginLayout:
|
|
4551
|
-
},
|
|
4552
|
-
Object.entries(
|
|
4862
|
+
NFileSelect: $t,
|
|
4863
|
+
NForm: xn,
|
|
4864
|
+
NList: or,
|
|
4865
|
+
NEmpty: Mn,
|
|
4866
|
+
NToast: hr,
|
|
4867
|
+
NLoading: Un,
|
|
4868
|
+
NCode: wr,
|
|
4869
|
+
NSwitch: Er,
|
|
4870
|
+
NTag: Dr,
|
|
4871
|
+
NDatePicker: Mi,
|
|
4872
|
+
NTooltip: Ni,
|
|
4873
|
+
NModal: Ri,
|
|
4874
|
+
NDrawer: Ui,
|
|
4875
|
+
NAlert: Qi,
|
|
4876
|
+
NTable: nr,
|
|
4877
|
+
NVideoSelect: Oa,
|
|
4878
|
+
NImageSelect: no,
|
|
4879
|
+
NAudioSelect: To,
|
|
4880
|
+
NLayout: Zo,
|
|
4881
|
+
NNavigation: is,
|
|
4882
|
+
NSidebar: qo,
|
|
4883
|
+
NCard: Sn,
|
|
4884
|
+
NLoginLayout: us
|
|
4885
|
+
}, ps = { install(e, t = {}) {
|
|
4886
|
+
Object.entries(fs).forEach(([t, n]) => {
|
|
4553
4887
|
e.component(t, n);
|
|
4554
|
-
}), t.router &&
|
|
4888
|
+
}), t.router && F(t.router);
|
|
4555
4889
|
} };
|
|
4556
4890
|
//#endregion
|
|
4557
|
-
export {
|
|
4891
|
+
export { Qi as NAlert, To as NAudioSelect, z as NButton, Sn as NCard, ye as NCheckbox, wr as NCode, Mi as NDatePicker, Ui as NDrawer, Mn as NEmpty, $t as NFileSelect, xn as NForm, no as NImageSelect, ce as NInput, Zo as NLayout, or as NList, Un as NLoading, us as NLoginLayout, Ri as NModal, is as NNavigation, Oe as NSelect, qo as NSidebar, Er as NSwitch, nr as NTable, Dr as NTag, pe as NTextarea, hr as NToast, Ni as NTooltip, Oa as NVideoSelect, ps as NickLabsUI, Rt as useAlert, H as useBreadcrumb, $i as useDisclosure, ds as useRouteModal, rn as useSidebarManager, lr as useToast };
|