nicklabs-ui 1.0.86 → 1.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -1
- package/dist/index.mjs +241 -237
- package/dist/nicklabs-ui.css +1 -1
- package/dist/src/components/NVirtualTable.vue.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3524,25 +3524,29 @@ var Oi = { class: "hero-section-container" }, ki = { class: "hero-section" }, Ai
|
|
|
3524
3524
|
} : void 0,
|
|
3525
3525
|
e.updatable || e.deletable || t.$slots.actions ? {
|
|
3526
3526
|
name: "actions",
|
|
3527
|
-
fn: I(({ item: r, index: i }) => [
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3527
|
+
fn: I(({ item: r, index: i }) => [c("div", Oa, [
|
|
3528
|
+
D(t.$slots, "actions", {
|
|
3529
|
+
item: r,
|
|
3530
|
+
index: i
|
|
3531
|
+
}, void 0, !0),
|
|
3532
|
+
e.updatable ? (C(), a(B, {
|
|
3533
|
+
key: 0,
|
|
3534
|
+
variant: "outline",
|
|
3535
|
+
onClick: L(() => n("update", r), ["stop"])
|
|
3536
|
+
}, {
|
|
3537
|
+
default: I(() => [d(A(e.updateLabel), 1)]),
|
|
3538
|
+
_: 1
|
|
3539
|
+
}, 8, ["onClick"])) : o("", !0),
|
|
3540
|
+
e.deletable ? (C(), a(B, {
|
|
3541
|
+
key: 1,
|
|
3542
|
+
variant: "solid",
|
|
3543
|
+
intent: "error",
|
|
3544
|
+
onClick: L(() => n("delete", r), ["stop"])
|
|
3545
|
+
}, {
|
|
3546
|
+
default: I(() => [d(A(e.deleteLabel), 1)]),
|
|
3547
|
+
_: 1
|
|
3548
|
+
}, 8, ["onClick"])) : o("", !0)
|
|
3549
|
+
])]),
|
|
3546
3550
|
key: "2"
|
|
3547
3551
|
} : void 0,
|
|
3548
3552
|
t.$slots["actions-header"] ? {
|
|
@@ -3573,7 +3577,7 @@ var Oi = { class: "hero-section-container" }, ki = { class: "hero-section" }, Ai
|
|
|
3573
3577
|
_: 3
|
|
3574
3578
|
})]));
|
|
3575
3579
|
}
|
|
3576
|
-
}), [["__scopeId", "data-v-
|
|
3580
|
+
}), [["__scopeId", "data-v-ce3c262d"]]), Aa = 0, ja = w([]);
|
|
3577
3581
|
function Ma() {
|
|
3578
3582
|
let e = function(e, n = {}) {
|
|
3579
3583
|
let r = ++Aa, i = n.duration ?? 4e3;
|
|
@@ -5020,10 +5024,10 @@ var Na = { class: "icon-wrap" }, Pa = ["innerHTML"], Fa = {
|
|
|
5020
5024
|
}, A(e.confirmText), 11, xs)])
|
|
5021
5025
|
], 6))), 128))])], 2)]));
|
|
5022
5026
|
}
|
|
5023
|
-
}), [["__scopeId", "data-v-20105bbb"]]), Cs = ["onClick"],
|
|
5027
|
+
}), [["__scopeId", "data-v-20105bbb"]]), Cs = { class: "vtable-hscroll" }, ws = { class: "vtable-htable" }, Ts = ["onClick"], Es = { class: "th-content" }, Ds = {
|
|
5024
5028
|
key: 0,
|
|
5025
5029
|
class: "sort-icon"
|
|
5026
|
-
},
|
|
5030
|
+
}, Os = {
|
|
5027
5031
|
key: 0,
|
|
5028
5032
|
viewBox: "0 0 24 24",
|
|
5029
5033
|
fill: "none",
|
|
@@ -5031,7 +5035,7 @@ var Na = { class: "icon-wrap" }, Pa = ["innerHTML"], Fa = {
|
|
|
5031
5035
|
"stroke-width": "2",
|
|
5032
5036
|
"stroke-linecap": "round",
|
|
5033
5037
|
"stroke-linejoin": "round"
|
|
5034
|
-
},
|
|
5038
|
+
}, ks = {
|
|
5035
5039
|
key: 1,
|
|
5036
5040
|
viewBox: "0 0 24 24",
|
|
5037
5041
|
fill: "none",
|
|
@@ -5039,7 +5043,7 @@ var Na = { class: "icon-wrap" }, Pa = ["innerHTML"], Fa = {
|
|
|
5039
5043
|
"stroke-width": "2",
|
|
5040
5044
|
"stroke-linecap": "round",
|
|
5041
5045
|
"stroke-linejoin": "round"
|
|
5042
|
-
},
|
|
5046
|
+
}, As = {
|
|
5043
5047
|
key: 2,
|
|
5044
5048
|
viewBox: "0 0 24 24",
|
|
5045
5049
|
fill: "none",
|
|
@@ -5047,13 +5051,13 @@ var Na = { class: "icon-wrap" }, Pa = ["innerHTML"], Fa = {
|
|
|
5047
5051
|
"stroke-width": "2",
|
|
5048
5052
|
"stroke-linecap": "round",
|
|
5049
5053
|
"stroke-linejoin": "round"
|
|
5050
|
-
},
|
|
5054
|
+
}, js = {
|
|
5051
5055
|
key: 0,
|
|
5052
5056
|
class: "vtable-th actions"
|
|
5053
|
-
},
|
|
5057
|
+
}, Ms = ["onClick"], Ns = {
|
|
5054
5058
|
key: 0,
|
|
5055
5059
|
class: "vtable-td actions"
|
|
5056
|
-
},
|
|
5060
|
+
}, Ps = "120px", Fs = /* @__PURE__ */ z(/* @__PURE__ */ p({
|
|
5057
5061
|
__name: "NVirtualTable",
|
|
5058
5062
|
props: {
|
|
5059
5063
|
columns: { default: () => [] },
|
|
@@ -5075,76 +5079,76 @@ var Na = { class: "icon-wrap" }, Pa = ["innerHTML"], Fa = {
|
|
|
5075
5079
|
itemKey: { default: "id" },
|
|
5076
5080
|
rowHeight: { default: 56 },
|
|
5077
5081
|
height: { default: "480px" },
|
|
5078
|
-
overscan: { default: 8 }
|
|
5082
|
+
overscan: { default: 8 },
|
|
5083
|
+
actionsWidth: { default: "120px" }
|
|
5079
5084
|
},
|
|
5080
5085
|
emits: ["sort", "click"],
|
|
5081
5086
|
setup(t, { emit: n }) {
|
|
5082
5087
|
let r = n, a = P(), l = T(null), u = T({
|
|
5083
5088
|
key: "",
|
|
5084
5089
|
order: null
|
|
5085
|
-
}), p = i(() => !!a.actions), m =
|
|
5086
|
-
let
|
|
5087
|
-
return
|
|
5088
|
-
}
|
|
5090
|
+
}), p = i(() => !!a.actions), m = (e) => {
|
|
5091
|
+
let t = e ?? "1fr";
|
|
5092
|
+
return t.endsWith("fr") ? `minmax(${Ps}, ${t})` : `minmax(${t}, ${t})`;
|
|
5093
|
+
}, h = i(() => {
|
|
5094
|
+
let e = t.columns.map((e) => m(e.width));
|
|
5095
|
+
return p.value && e.push(`minmax(${t.actionsWidth}, ${t.actionsWidth})`), e.join(" ");
|
|
5096
|
+
}), g = zn(i(() => ({
|
|
5089
5097
|
count: t.items.length,
|
|
5090
5098
|
getScrollElement: () => l.value,
|
|
5091
5099
|
estimateSize: () => t.rowHeight,
|
|
5092
5100
|
overscan: t.overscan
|
|
5093
|
-
}))),
|
|
5101
|
+
}))), y = i(() => g.value.getVirtualItems()), b = i(() => g.value.getTotalSize()), x = (e) => {
|
|
5094
5102
|
e.sortable && (u.value.key === e.key ? u.value.order = u.value.order === "asc" ? "desc" : "asc" : (u.value.key = e.key, u.value.order = "asc"), r("sort", { ...u.value }));
|
|
5095
5103
|
};
|
|
5096
|
-
return (n, i) => (C(), s("div", { class: _(["vtable", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
title: t.emptyTitle,
|
|
5140
|
-
description: t.emptyDescription
|
|
5141
|
-
}, null, 8, ["title", "description"])], !0) : o("", !0)
|
|
5142
|
-
], 2));
|
|
5104
|
+
return (n, i) => (C(), s("div", { class: _(["vtable", [{ bordered: t.bordered }, { hoverable: t.hoverable }]]) }, [c("div", Cs, [c("div", ws, [c("div", {
|
|
5105
|
+
class: "vtable-header",
|
|
5106
|
+
style: v({ gridTemplateColumns: h.value })
|
|
5107
|
+
}, [(C(!0), s(e, null, E(t.columns, (e) => (C(), s("div", {
|
|
5108
|
+
key: e.key,
|
|
5109
|
+
class: _(["vtable-th", { sortable: e.sortable }]),
|
|
5110
|
+
onClick: (t) => x(e)
|
|
5111
|
+
}, [c("span", Es, [d(A(e.label) + " ", 1), e.sortable ? (C(), s("span", Ds, [u.value.key !== e.key || u.value.order === null ? (C(), s("svg", Os, [...i[0] ||= [c("path", { d: "M8 9l4-4 4 4" }, null, -1), c("path", { d: "M16 15l-4 4-4-4" }, null, -1)]])) : u.value.order === "asc" ? (C(), s("svg", ks, [...i[1] ||= [c("path", { d: "M8 15l4-6 4 6" }, null, -1)]])) : (C(), s("svg", As, [...i[2] ||= [c("path", { d: "M8 9l4 6 4-6" }, null, -1)]]))])) : o("", !0)])], 10, Ts))), 128)), p.value ? (C(), s("div", js, [D(n.$slots, "actions-header", {}, () => [i[3] ||= d("操作", -1)], !0)])) : o("", !0)], 4), f(fa, {
|
|
5112
|
+
loading: t.loading,
|
|
5113
|
+
overlay: ""
|
|
5114
|
+
}, {
|
|
5115
|
+
default: I(() => [t.loading || t.items.length > 0 ? (C(), s("div", {
|
|
5116
|
+
key: 0,
|
|
5117
|
+
ref_key: "scrollRef",
|
|
5118
|
+
ref: l,
|
|
5119
|
+
class: "vtable-body",
|
|
5120
|
+
style: v({ height: t.height })
|
|
5121
|
+
}, [!t.loading && t.items.length > 0 ? (C(), s("div", {
|
|
5122
|
+
key: 0,
|
|
5123
|
+
class: "vtable-viewport",
|
|
5124
|
+
style: v({ height: `${b.value}px` })
|
|
5125
|
+
}, [(C(!0), s(e, null, E(y.value, (e) => (C(), s("div", {
|
|
5126
|
+
key: t.items[e.index]?.[t.itemKey] ?? e.index,
|
|
5127
|
+
class: "vtable-row",
|
|
5128
|
+
style: v({
|
|
5129
|
+
gridTemplateColumns: h.value,
|
|
5130
|
+
height: `${e.size}px`,
|
|
5131
|
+
transform: `translateY(${e.start}px)`
|
|
5132
|
+
}),
|
|
5133
|
+
onClick: (n) => r("click", t.items[e.index])
|
|
5134
|
+
}, [D(n.$slots, "cell", {
|
|
5135
|
+
index: e.index,
|
|
5136
|
+
item: t.items[e.index],
|
|
5137
|
+
columns: t.columns
|
|
5138
|
+
}, void 0, !0), p.value ? (C(), s("div", Ns, [D(n.$slots, "actions", {
|
|
5139
|
+
index: e.index,
|
|
5140
|
+
item: t.items[e.index]
|
|
5141
|
+
}, void 0, !0)])) : o("", !0)], 12, Ms))), 128))], 4)) : o("", !0)], 4)) : o("", !0)]),
|
|
5142
|
+
_: 3
|
|
5143
|
+
}, 8, ["loading"])])]), !t.loading && t.items.length === 0 ? D(n.$slots, "empty", { key: 0 }, () => [f(ta, {
|
|
5144
|
+
title: t.emptyTitle,
|
|
5145
|
+
description: t.emptyDescription
|
|
5146
|
+
}, null, 8, ["title", "description"])], !0) : o("", !0)], 2));
|
|
5143
5147
|
}
|
|
5144
|
-
}), [["__scopeId", "data-v-
|
|
5148
|
+
}), [["__scopeId", "data-v-5381b37b"]]);
|
|
5145
5149
|
//#endregion
|
|
5146
5150
|
//#region src/composables/useDisclosure.ts
|
|
5147
|
-
function
|
|
5151
|
+
function Is() {
|
|
5148
5152
|
let e = T(!1);
|
|
5149
5153
|
function t() {
|
|
5150
5154
|
e.value = !0;
|
|
@@ -5160,11 +5164,11 @@ function Ns() {
|
|
|
5160
5164
|
}
|
|
5161
5165
|
//#endregion
|
|
5162
5166
|
//#region src/composables/useMediaSelect.ts
|
|
5163
|
-
var
|
|
5167
|
+
var Ls = (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", Rs = (e, t = "floor") => {
|
|
5164
5168
|
if (e == null || isNaN(e)) return "0:00";
|
|
5165
5169
|
let n = t === "round" ? Math.round(e) : Math.floor(e), r = Math.floor(n / 60), i = n % 60;
|
|
5166
5170
|
return r + ":" + (i < 10 ? "0" : "") + i;
|
|
5167
|
-
},
|
|
5171
|
+
}, zs = (e) => e.width && e.height ? e.width + "×" + e.height : "—", Bs = (e, t) => {
|
|
5168
5172
|
if (e.name) return e.name;
|
|
5169
5173
|
try {
|
|
5170
5174
|
let n = new URL(e.url, window.location.href).pathname;
|
|
@@ -5172,17 +5176,17 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5172
5176
|
} catch {
|
|
5173
5177
|
return t;
|
|
5174
5178
|
}
|
|
5175
|
-
},
|
|
5179
|
+
}, Vs = (e) => {
|
|
5176
5180
|
e?.startsWith("blob:") && URL.revokeObjectURL(e);
|
|
5177
|
-
},
|
|
5181
|
+
}, Hs = (e) => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : e + Math.random().toString(36).slice(2, 9), Us = (e, t, n) => {
|
|
5178
5182
|
let r = t.split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
5179
5183
|
if (r.length === 0) return e.type.startsWith(n);
|
|
5180
5184
|
let i = e.type.toLowerCase(), a = e.name.toLowerCase();
|
|
5181
5185
|
return r.some((e) => e.startsWith(".") ? a.endsWith(e) : e.endsWith("/*") ? i.startsWith(e.slice(0, -1)) : i === e);
|
|
5182
|
-
},
|
|
5186
|
+
}, Ws = (e, t) => {
|
|
5183
5187
|
let n = [], r = !1;
|
|
5184
5188
|
return Array.prototype.forEach.call(e, (e) => {
|
|
5185
|
-
if (!
|
|
5189
|
+
if (!Us(e, t.accept, t.fallbackTypePrefix)) {
|
|
5186
5190
|
t.onError({
|
|
5187
5191
|
type: "type",
|
|
5188
5192
|
file: e
|
|
@@ -5205,7 +5209,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5205
5209
|
}
|
|
5206
5210
|
n.push(e);
|
|
5207
5211
|
}), n;
|
|
5208
|
-
},
|
|
5212
|
+
}, Gs = (e) => {
|
|
5209
5213
|
let t = T(!1), n = async () => {
|
|
5210
5214
|
if (!e.isBlocked()) if (e.multiple()) {
|
|
5211
5215
|
let t = await ai.input.custom(e.accept(), !0);
|
|
@@ -5236,7 +5240,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5236
5240
|
},
|
|
5237
5241
|
openFileDialog: n
|
|
5238
5242
|
};
|
|
5239
|
-
},
|
|
5243
|
+
}, Ks = (e, t) => {
|
|
5240
5244
|
let n = "", r = (e) => {
|
|
5241
5245
|
e.key === "Escape" && t();
|
|
5242
5246
|
};
|
|
@@ -5245,26 +5249,26 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5245
5249
|
}), y(() => {
|
|
5246
5250
|
e.value && (document.body.style.overflow = n), document.removeEventListener("keydown", r);
|
|
5247
5251
|
});
|
|
5248
|
-
},
|
|
5252
|
+
}, qs = {
|
|
5249
5253
|
key: 0,
|
|
5250
5254
|
class: "head"
|
|
5251
|
-
},
|
|
5255
|
+
}, Js = ["textContent"], Ys = {
|
|
5252
5256
|
key: 1,
|
|
5253
5257
|
class: "count-chip"
|
|
5254
|
-
},
|
|
5258
|
+
}, Xs = { class: "grid" }, Zs = {
|
|
5255
5259
|
key: 0,
|
|
5256
5260
|
class: "icon",
|
|
5257
5261
|
"aria-hidden": "true"
|
|
5258
|
-
},
|
|
5262
|
+
}, Qs = ["textContent"], $s = ["textContent"], ec = ["onClick"], tc = ["src"], nc = {
|
|
5259
5263
|
key: 1,
|
|
5260
5264
|
class: "placeholder-label"
|
|
5261
|
-
},
|
|
5265
|
+
}, rc = { class: "duration" }, ic = { class: "card-body" }, ac = ["title"], oc = { class: "file-meta" }, sc = { key: 0 }, cc = {
|
|
5262
5266
|
key: 1,
|
|
5263
5267
|
class: "dot-separator"
|
|
5264
|
-
},
|
|
5268
|
+
}, lc = { key: 2 }, uc = { class: "card-actions" }, dc = ["onClick"], fc = ["disabled", "onClick"], pc = { class: "vi-modal-card" }, mc = { class: "vi-modal-media" }, hc = ["src"], gc = {
|
|
5265
5269
|
key: 1,
|
|
5266
5270
|
class: "vi-modal-placeholder"
|
|
5267
|
-
},
|
|
5271
|
+
}, _c = { class: "vi-modal-bar" }, vc = { class: "vi-modal-info" }, yc = { class: "modal-name" }, bc = { class: "modal-meta" }, xc = /* @__PURE__ */ z(/* @__PURE__ */ p({
|
|
5268
5272
|
__name: "NVideoSelect",
|
|
5269
5273
|
props: {
|
|
5270
5274
|
modelValue: { default: () => [] },
|
|
@@ -5302,7 +5306,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5302
5306
|
"error"
|
|
5303
5307
|
],
|
|
5304
5308
|
setup(r, { emit: l }) {
|
|
5305
|
-
let u = l, p = T(null), [m, g, v] =
|
|
5309
|
+
let u = l, p = T(null), [m, g, v] = Is(), { confirm: b } = ci(), x = !1, S = i(() => r.modelValue.length), w = (e) => Rs(e, "round"), D = (e) => Bs(e, "影片"), O = (e) => {
|
|
5306
5310
|
if (!e.url) return;
|
|
5307
5311
|
let t = document.createElement("video");
|
|
5308
5312
|
t.preload = "metadata";
|
|
@@ -5327,13 +5331,13 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5327
5331
|
!e.url || k.has(e.id) || (k.add(e.id), (e.duration == null || e.width == null) && O(e));
|
|
5328
5332
|
});
|
|
5329
5333
|
}, { immediate: !0 });
|
|
5330
|
-
let { isDragging: j, dropZoneHandlers: M } =
|
|
5334
|
+
let { isDragging: j, dropZoneHandlers: M } = Gs({
|
|
5331
5335
|
isBlocked: () => r.disabled || r.readonly,
|
|
5332
5336
|
accept: () => r.accept,
|
|
5333
5337
|
multiple: () => r.multiple,
|
|
5334
5338
|
onFiles: (e) => {
|
|
5335
5339
|
if (r.disabled || r.readonly) return;
|
|
5336
|
-
let t =
|
|
5340
|
+
let t = Ws(e, {
|
|
5337
5341
|
accept: r.accept,
|
|
5338
5342
|
fallbackTypePrefix: "video/",
|
|
5339
5343
|
maxSize: r.maxSize,
|
|
@@ -5342,7 +5346,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5342
5346
|
});
|
|
5343
5347
|
if (t.length === 0) return;
|
|
5344
5348
|
let n = t.map((e) => ({
|
|
5345
|
-
id:
|
|
5349
|
+
id: Hs("v"),
|
|
5346
5350
|
file: e,
|
|
5347
5351
|
name: e.name,
|
|
5348
5352
|
size: e.size,
|
|
@@ -5364,7 +5368,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5364
5368
|
confirmText: "移除",
|
|
5365
5369
|
cancelText: "取消"
|
|
5366
5370
|
})) return;
|
|
5367
|
-
|
|
5371
|
+
Vs(t.url), k.delete(e);
|
|
5368
5372
|
let n = r.modelValue.filter((t) => t.id !== e);
|
|
5369
5373
|
u("update:modelValue", n), u("change", n), u("remove", t);
|
|
5370
5374
|
}, P = (e) => {
|
|
@@ -5374,30 +5378,30 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5374
5378
|
}, ne = i(() => {
|
|
5375
5379
|
let e = p.value;
|
|
5376
5380
|
return e ? [
|
|
5377
|
-
e.size == null ? null :
|
|
5378
|
-
e.width && e.height ?
|
|
5381
|
+
e.size == null ? null : Ls(e.size),
|
|
5382
|
+
e.width && e.height ? zs(e) : null,
|
|
5379
5383
|
w(e.duration)
|
|
5380
5384
|
].filter(Boolean).join(" · ") : "";
|
|
5381
5385
|
});
|
|
5382
|
-
return
|
|
5383
|
-
x = !0, r.autoRevoke && r.modelValue.forEach((e) =>
|
|
5386
|
+
return Ks(m, te), y(() => {
|
|
5387
|
+
x = !0, r.autoRevoke && r.modelValue.forEach((e) => Vs(e.url));
|
|
5384
5388
|
}), (i, l) => (C(), s("div", { class: _(["video-input", {
|
|
5385
5389
|
"is-disabled": r.disabled,
|
|
5386
5390
|
"is-readonly": r.readonly
|
|
5387
5391
|
}]) }, [
|
|
5388
|
-
r.title || r.showCount ? (C(), s("div",
|
|
5392
|
+
r.title || r.showCount ? (C(), s("div", qs, [r.title ? (C(), s("span", {
|
|
5389
5393
|
key: 0,
|
|
5390
5394
|
class: "title",
|
|
5391
5395
|
textContent: A(r.title)
|
|
5392
|
-
}, null, 8,
|
|
5393
|
-
c("div",
|
|
5396
|
+
}, null, 8, Js)) : o("", !0), r.showCount ? (C(), s("span", Ys, A(S.value) + " 支", 1)) : o("", !0)])) : o("", !0),
|
|
5397
|
+
c("div", Xs, [S.value === 0 ? (C(), s("div", h({
|
|
5394
5398
|
key: 0,
|
|
5395
5399
|
class: ["empty", {
|
|
5396
5400
|
"is-drag": N(j),
|
|
5397
5401
|
"is-static": r.readonly
|
|
5398
5402
|
}]
|
|
5399
5403
|
}, r.readonly ? {} : N(M)), [
|
|
5400
|
-
r.readonly ? o("", !0) : (C(), s("span",
|
|
5404
|
+
r.readonly ? o("", !0) : (C(), s("span", Zs, [...l[0] ||= [c("svg", {
|
|
5401
5405
|
viewBox: "0 0 24 24",
|
|
5402
5406
|
fill: "none",
|
|
5403
5407
|
stroke: "currentColor",
|
|
@@ -5409,11 +5413,11 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5409
5413
|
c("path", { d: "M7 9l5-5 5 5" }),
|
|
5410
5414
|
c("path", { d: "M12 4v12" })
|
|
5411
5415
|
], -1)]])),
|
|
5412
|
-
c("h3", { textContent: A(r.readonly ? "目前沒有影片" : r.emptyTitle) }, null, 8,
|
|
5416
|
+
c("h3", { textContent: A(r.readonly ? "目前沒有影片" : r.emptyTitle) }, null, 8, Qs),
|
|
5413
5417
|
r.readonly ? o("", !0) : (C(), s("p", {
|
|
5414
5418
|
key: 1,
|
|
5415
5419
|
textContent: A(r.emptyHint)
|
|
5416
|
-
}, null, 8,
|
|
5420
|
+
}, null, 8, $s))
|
|
5417
5421
|
], 16)) : (C(), s(e, { key: 1 }, [(C(!0), s(e, null, E(r.modelValue, (e) => (C(), s("div", {
|
|
5418
5422
|
key: e.id,
|
|
5419
5423
|
class: "card"
|
|
@@ -5426,7 +5430,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5426
5430
|
src: e.url + "#t=0.5",
|
|
5427
5431
|
muted: "",
|
|
5428
5432
|
preload: "metadata"
|
|
5429
|
-
}, null, 8,
|
|
5433
|
+
}, null, 8, tc)) : (C(), s("div", nc, "縮圖預覽")),
|
|
5430
5434
|
l[1] ||= c("div", {
|
|
5431
5435
|
class: "play",
|
|
5432
5436
|
"aria-hidden": "true"
|
|
@@ -5434,18 +5438,18 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5434
5438
|
viewBox: "0 0 24 24",
|
|
5435
5439
|
fill: "currentColor"
|
|
5436
5440
|
}, [c("path", { d: "M8 5v14l11-7z" })])], -1),
|
|
5437
|
-
c("div",
|
|
5438
|
-
], 10,
|
|
5441
|
+
c("div", rc, A(w(e.duration)), 1)
|
|
5442
|
+
], 10, ec), c("div", ic, [
|
|
5439
5443
|
c("div", {
|
|
5440
5444
|
class: "file-name",
|
|
5441
5445
|
title: D(e)
|
|
5442
|
-
}, A(D(e)), 9,
|
|
5443
|
-
c("div",
|
|
5444
|
-
e.size == null ? o("", !0) : (C(), s("span",
|
|
5445
|
-
e.size != null && e.width && e.height ? (C(), s("span",
|
|
5446
|
-
e.width && e.height ? (C(), s("span",
|
|
5446
|
+
}, A(D(e)), 9, ac),
|
|
5447
|
+
c("div", oc, [
|
|
5448
|
+
e.size == null ? o("", !0) : (C(), s("span", sc, A(N(Ls)(e.size)), 1)),
|
|
5449
|
+
e.size != null && e.width && e.height ? (C(), s("span", cc)) : o("", !0),
|
|
5450
|
+
e.width && e.height ? (C(), s("span", lc, A(N(zs)(e)), 1)) : o("", !0)
|
|
5447
5451
|
]),
|
|
5448
|
-
c("div",
|
|
5452
|
+
c("div", uc, [c("button", {
|
|
5449
5453
|
class: "action preview",
|
|
5450
5454
|
onClick: (t) => P(e)
|
|
5451
5455
|
}, [...l[2] ||= [c("svg", {
|
|
@@ -5459,7 +5463,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5459
5463
|
cx: "12",
|
|
5460
5464
|
cy: "12",
|
|
5461
5465
|
r: "3"
|
|
5462
|
-
})], -1), d(" 預覽 ", -1)]], 8,
|
|
5466
|
+
})], -1), d(" 預覽 ", -1)]], 8, dc), r.readonly ? o("", !0) : (C(), s("button", {
|
|
5463
5467
|
key: 0,
|
|
5464
5468
|
class: "action delete",
|
|
5465
5469
|
"aria-label": "刪除",
|
|
@@ -5472,7 +5476,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5472
5476
|
"stroke-width": "2",
|
|
5473
5477
|
"stroke-linecap": "round",
|
|
5474
5478
|
"stroke-linejoin": "round"
|
|
5475
|
-
}, [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,
|
|
5479
|
+
}, [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, fc))])
|
|
5476
5480
|
])]))), 128)), r.multiple && !r.readonly ? (C(), s("div", h({
|
|
5477
5481
|
key: 0,
|
|
5478
5482
|
class: ["add-card", { "is-drag": N(j) }]
|
|
@@ -5496,7 +5500,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5496
5500
|
key: 0,
|
|
5497
5501
|
class: "vi-modal",
|
|
5498
5502
|
onClick: L(te, ["self"])
|
|
5499
|
-
}, [c("div",
|
|
5503
|
+
}, [c("div", pc, [c("div", mc, [p.value?.url ? (C(), s("video", {
|
|
5500
5504
|
key: 0,
|
|
5501
5505
|
src: p.value.url,
|
|
5502
5506
|
controls: "",
|
|
@@ -5504,7 +5508,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5504
5508
|
playsinline: "",
|
|
5505
5509
|
controlslist: "nofullscreen nodownload noremoteplayback noplaybackrate",
|
|
5506
5510
|
disablepictureinpicture: ""
|
|
5507
|
-
}, null, 8,
|
|
5511
|
+
}, null, 8, hc)) : (C(), s("div", gc, " 示範影片 · 上傳真實檔案即可在此播放 "))]), c("div", _c, [c("div", vc, [c("div", yc, A(p.value ? D(p.value) : ""), 1), c("div", bc, A(ne.value), 1)]), c("button", {
|
|
5508
5512
|
class: "vi-modal-close",
|
|
5509
5513
|
"aria-label": "關閉",
|
|
5510
5514
|
onClick: te
|
|
@@ -5520,26 +5524,26 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5520
5524
|
})]))
|
|
5521
5525
|
], 2));
|
|
5522
5526
|
}
|
|
5523
|
-
}), [["__scopeId", "data-v-479d302a"]]),
|
|
5527
|
+
}), [["__scopeId", "data-v-479d302a"]]), Sc = {
|
|
5524
5528
|
key: 0,
|
|
5525
5529
|
class: "head"
|
|
5526
|
-
},
|
|
5530
|
+
}, Cc = ["textContent"], wc = {
|
|
5527
5531
|
key: 1,
|
|
5528
5532
|
class: "count-chip"
|
|
5529
|
-
},
|
|
5533
|
+
}, Tc = { class: "grid" }, Ec = {
|
|
5530
5534
|
key: 0,
|
|
5531
5535
|
class: "icon",
|
|
5532
5536
|
"aria-hidden": "true"
|
|
5533
|
-
},
|
|
5537
|
+
}, Dc = ["textContent"], Oc = ["textContent"], kc = ["onClick"], Ac = ["src", "alt"], jc = {
|
|
5534
5538
|
key: 1,
|
|
5535
5539
|
class: "placeholder-label"
|
|
5536
|
-
},
|
|
5540
|
+
}, Mc = { class: "card-body" }, Nc = ["title"], Pc = { class: "file-meta" }, Fc = { key: 0 }, Ic = {
|
|
5537
5541
|
key: 1,
|
|
5538
5542
|
class: "dot-separator"
|
|
5539
|
-
},
|
|
5543
|
+
}, Lc = { key: 2 }, Rc = { class: "card-actions" }, zc = ["onClick"], Bc = ["disabled", "onClick"], Vc = { class: "ii-modal-card" }, Hc = { class: "ii-modal-media" }, Uc = ["src", "alt"], Wc = {
|
|
5540
5544
|
key: 1,
|
|
5541
5545
|
class: "ii-modal-ph"
|
|
5542
|
-
},
|
|
5546
|
+
}, Gc = { class: "ii-modal-bar" }, Kc = { class: "ii-modal-info" }, qc = { class: "modal-name" }, Jc = { class: "modal-meta" }, Yc = /* @__PURE__ */ z(/* @__PURE__ */ p({
|
|
5543
5547
|
__name: "NImageSelect",
|
|
5544
5548
|
props: {
|
|
5545
5549
|
modelValue: { default: () => [] },
|
|
@@ -5577,7 +5581,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5577
5581
|
"error"
|
|
5578
5582
|
],
|
|
5579
5583
|
setup(r, { emit: l }) {
|
|
5580
|
-
let u = l, p = T(null), [m, g, v] =
|
|
5584
|
+
let u = l, p = T(null), [m, g, v] = Is(), { confirm: b } = ci(), x = !1, S = i(() => r.modelValue.length), w = (e) => Bs(e, "圖片"), D = (e) => {
|
|
5581
5585
|
if (!e.url) return;
|
|
5582
5586
|
let t = new Image(), n = () => {
|
|
5583
5587
|
t.removeEventListener("load", i), t.removeEventListener("error", n), t.removeAttribute("src");
|
|
@@ -5599,13 +5603,13 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5599
5603
|
!e.url || O.has(e.id) || (O.add(e.id), (e.width == null || e.height == null) && D(e));
|
|
5600
5604
|
});
|
|
5601
5605
|
}, { immediate: !0 });
|
|
5602
|
-
let { isDragging: k, dropZoneHandlers: j } =
|
|
5606
|
+
let { isDragging: k, dropZoneHandlers: j } = Gs({
|
|
5603
5607
|
isBlocked: () => r.disabled || r.readonly,
|
|
5604
5608
|
accept: () => r.accept,
|
|
5605
5609
|
multiple: () => r.multiple,
|
|
5606
5610
|
onFiles: (e) => {
|
|
5607
5611
|
if (r.disabled || r.readonly) return;
|
|
5608
|
-
let t =
|
|
5612
|
+
let t = Ws(e, {
|
|
5609
5613
|
accept: r.accept,
|
|
5610
5614
|
fallbackTypePrefix: "image/",
|
|
5611
5615
|
maxSize: r.maxSize,
|
|
@@ -5614,7 +5618,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5614
5618
|
});
|
|
5615
5619
|
if (t.length === 0) return;
|
|
5616
5620
|
let n = t.map((e) => ({
|
|
5617
|
-
id:
|
|
5621
|
+
id: Hs("i"),
|
|
5618
5622
|
file: e,
|
|
5619
5623
|
name: e.name,
|
|
5620
5624
|
size: e.size,
|
|
@@ -5635,7 +5639,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5635
5639
|
confirmText: "移除",
|
|
5636
5640
|
cancelText: "取消"
|
|
5637
5641
|
})) return;
|
|
5638
|
-
|
|
5642
|
+
Vs(t.url), O.delete(e);
|
|
5639
5643
|
let n = r.modelValue.filter((t) => t.id !== e);
|
|
5640
5644
|
u("update:modelValue", n), u("change", n), u("remove", t);
|
|
5641
5645
|
}, ee = (e) => {
|
|
@@ -5644,27 +5648,27 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5644
5648
|
v();
|
|
5645
5649
|
}, te = i(() => {
|
|
5646
5650
|
let e = p.value;
|
|
5647
|
-
return e ? [e.size == null ? null :
|
|
5651
|
+
return e ? [e.size == null ? null : Ls(e.size), e.width && e.height ? zs(e) : null].filter(Boolean).join(" · ") : "";
|
|
5648
5652
|
});
|
|
5649
|
-
return
|
|
5650
|
-
x = !0, r.autoRevoke && r.modelValue.forEach((e) =>
|
|
5653
|
+
return Ks(m, P), y(() => {
|
|
5654
|
+
x = !0, r.autoRevoke && r.modelValue.forEach((e) => Vs(e.url));
|
|
5651
5655
|
}), (i, l) => (C(), s("div", { class: _(["image-input", {
|
|
5652
5656
|
"is-disabled": r.disabled,
|
|
5653
5657
|
"is-readonly": r.readonly
|
|
5654
5658
|
}]) }, [
|
|
5655
|
-
r.title || r.showCount ? (C(), s("div",
|
|
5659
|
+
r.title || r.showCount ? (C(), s("div", Sc, [r.title ? (C(), s("span", {
|
|
5656
5660
|
key: 0,
|
|
5657
5661
|
class: "title",
|
|
5658
5662
|
textContent: A(r.title)
|
|
5659
|
-
}, null, 8,
|
|
5660
|
-
c("div",
|
|
5663
|
+
}, null, 8, Cc)) : o("", !0), r.showCount ? (C(), s("span", wc, A(S.value) + " 張", 1)) : o("", !0)])) : o("", !0),
|
|
5664
|
+
c("div", Tc, [S.value === 0 ? (C(), s("div", h({
|
|
5661
5665
|
key: 0,
|
|
5662
5666
|
class: ["empty", {
|
|
5663
5667
|
"is-drag": N(k),
|
|
5664
5668
|
"is-static": r.readonly
|
|
5665
5669
|
}]
|
|
5666
5670
|
}, r.readonly ? {} : N(j)), [
|
|
5667
|
-
r.readonly ? o("", !0) : (C(), s("span",
|
|
5671
|
+
r.readonly ? o("", !0) : (C(), s("span", Ec, [...l[0] ||= [c("svg", {
|
|
5668
5672
|
viewBox: "0 0 24 24",
|
|
5669
5673
|
fill: "none",
|
|
5670
5674
|
stroke: "currentColor",
|
|
@@ -5686,11 +5690,11 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5686
5690
|
}),
|
|
5687
5691
|
c("path", { d: "M21 15l-5-5L5 21" })
|
|
5688
5692
|
], -1)]])),
|
|
5689
|
-
c("h3", { textContent: A(r.readonly ? "目前沒有圖片" : r.emptyTitle) }, null, 8,
|
|
5693
|
+
c("h3", { textContent: A(r.readonly ? "目前沒有圖片" : r.emptyTitle) }, null, 8, Dc),
|
|
5690
5694
|
r.readonly ? o("", !0) : (C(), s("p", {
|
|
5691
5695
|
key: 1,
|
|
5692
5696
|
textContent: A(r.emptyHint)
|
|
5693
|
-
}, null, 8,
|
|
5697
|
+
}, null, 8, Oc))
|
|
5694
5698
|
], 16)) : (C(), s(e, { key: 1 }, [(C(!0), s(e, null, E(r.modelValue, (e) => (C(), s("div", {
|
|
5695
5699
|
key: e.id,
|
|
5696
5700
|
class: "card"
|
|
@@ -5702,7 +5706,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5702
5706
|
src: e.url,
|
|
5703
5707
|
alt: w(e),
|
|
5704
5708
|
loading: "lazy"
|
|
5705
|
-
}, null, 8,
|
|
5709
|
+
}, null, 8, Ac)) : (C(), s("div", jc, "縮圖預覽")), l[1] ||= c("div", {
|
|
5706
5710
|
class: "zoom",
|
|
5707
5711
|
"aria-hidden": "true"
|
|
5708
5712
|
}, [c("svg", {
|
|
@@ -5716,17 +5720,17 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5716
5720
|
cx: "11",
|
|
5717
5721
|
cy: "11",
|
|
5718
5722
|
r: "7"
|
|
5719
|
-
}), c("path", { d: "m21 21-4.3-4.3M11 8v6M8 11h6" })])], -1)], 10,
|
|
5723
|
+
}), c("path", { d: "m21 21-4.3-4.3M11 8v6M8 11h6" })])], -1)], 10, kc), c("div", Mc, [
|
|
5720
5724
|
c("div", {
|
|
5721
5725
|
class: "file-name",
|
|
5722
5726
|
title: w(e)
|
|
5723
|
-
}, A(w(e)), 9,
|
|
5724
|
-
c("div",
|
|
5725
|
-
e.size == null ? o("", !0) : (C(), s("span",
|
|
5726
|
-
e.size != null && e.width && e.height ? (C(), s("span",
|
|
5727
|
-
e.width && e.height ? (C(), s("span",
|
|
5727
|
+
}, A(w(e)), 9, Nc),
|
|
5728
|
+
c("div", Pc, [
|
|
5729
|
+
e.size == null ? o("", !0) : (C(), s("span", Fc, A(N(Ls)(e.size)), 1)),
|
|
5730
|
+
e.size != null && e.width && e.height ? (C(), s("span", Ic)) : o("", !0),
|
|
5731
|
+
e.width && e.height ? (C(), s("span", Lc, A(N(zs)(e)), 1)) : o("", !0)
|
|
5728
5732
|
]),
|
|
5729
|
-
c("div",
|
|
5733
|
+
c("div", Rc, [c("button", {
|
|
5730
5734
|
class: "action preview",
|
|
5731
5735
|
onClick: (t) => ee(e)
|
|
5732
5736
|
}, [...l[2] ||= [c("svg", {
|
|
@@ -5740,7 +5744,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5740
5744
|
cx: "12",
|
|
5741
5745
|
cy: "12",
|
|
5742
5746
|
r: "3"
|
|
5743
|
-
})], -1), d(" 預覽 ", -1)]], 8,
|
|
5747
|
+
})], -1), d(" 預覽 ", -1)]], 8, zc), r.readonly ? o("", !0) : (C(), s("button", {
|
|
5744
5748
|
key: 0,
|
|
5745
5749
|
class: "action delete",
|
|
5746
5750
|
"aria-label": "刪除",
|
|
@@ -5753,7 +5757,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5753
5757
|
"stroke-width": "2",
|
|
5754
5758
|
"stroke-linecap": "round",
|
|
5755
5759
|
"stroke-linejoin": "round"
|
|
5756
|
-
}, [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,
|
|
5760
|
+
}, [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, Bc))])
|
|
5757
5761
|
])]))), 128)), r.multiple && !r.readonly ? (C(), s("div", h({
|
|
5758
5762
|
key: 0,
|
|
5759
5763
|
class: ["add-card", { "is-drag": N(k) }]
|
|
@@ -5777,11 +5781,11 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5777
5781
|
key: 0,
|
|
5778
5782
|
class: "ii-modal",
|
|
5779
5783
|
onClick: L(P, ["self"])
|
|
5780
|
-
}, [c("div",
|
|
5784
|
+
}, [c("div", Vc, [c("div", Hc, [p.value?.url ? (C(), s("img", {
|
|
5781
5785
|
key: 0,
|
|
5782
5786
|
src: p.value.url,
|
|
5783
5787
|
alt: p.value ? w(p.value) : ""
|
|
5784
|
-
}, null, 8,
|
|
5788
|
+
}, null, 8, Uc)) : (C(), s("div", Wc, " 示範圖片 · 上傳真實檔案即可在此檢視 "))]), c("div", Gc, [c("div", Kc, [c("div", qc, A(p.value ? w(p.value) : ""), 1), c("div", Jc, A(te.value), 1)]), c("button", {
|
|
5785
5789
|
class: "ii-modal-close",
|
|
5786
5790
|
"aria-label": "關閉",
|
|
5787
5791
|
onClick: P
|
|
@@ -5797,40 +5801,40 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5797
5801
|
})]))
|
|
5798
5802
|
], 2));
|
|
5799
5803
|
}
|
|
5800
|
-
}), [["__scopeId", "data-v-aa2d3585"]]),
|
|
5804
|
+
}), [["__scopeId", "data-v-aa2d3585"]]), Xc = {
|
|
5801
5805
|
key: 0,
|
|
5802
5806
|
class: "head"
|
|
5803
|
-
},
|
|
5807
|
+
}, Zc = ["textContent"], Qc = {
|
|
5804
5808
|
key: 1,
|
|
5805
5809
|
class: "count-chip"
|
|
5806
|
-
},
|
|
5810
|
+
}, $c = {
|
|
5807
5811
|
key: 0,
|
|
5808
5812
|
class: "icon",
|
|
5809
5813
|
"aria-hidden": "true"
|
|
5810
|
-
},
|
|
5814
|
+
}, el = ["textContent"], tl = ["textContent"], nl = {
|
|
5811
5815
|
key: 2,
|
|
5812
5816
|
class: "list"
|
|
5813
|
-
},
|
|
5817
|
+
}, rl = [
|
|
5814
5818
|
"src",
|
|
5815
5819
|
"onLoadedmetadata",
|
|
5816
5820
|
"onTimeupdate",
|
|
5817
5821
|
"onEnded"
|
|
5818
|
-
],
|
|
5822
|
+
], il = [
|
|
5819
5823
|
"aria-label",
|
|
5820
5824
|
"disabled",
|
|
5821
5825
|
"onClick"
|
|
5822
|
-
],
|
|
5826
|
+
], al = {
|
|
5823
5827
|
key: 0,
|
|
5824
5828
|
viewBox: "0 0 24 24",
|
|
5825
5829
|
fill: "currentColor"
|
|
5826
|
-
},
|
|
5830
|
+
}, ol = {
|
|
5827
5831
|
key: 1,
|
|
5828
5832
|
viewBox: "0 0 24 24",
|
|
5829
5833
|
fill: "currentColor"
|
|
5830
|
-
},
|
|
5834
|
+
}, sl = { class: "meta" }, cl = ["title"], ll = { class: "sub" }, ul = ["onMousedown", "onTouchstart"], dl = {
|
|
5831
5835
|
key: 1,
|
|
5832
5836
|
class: "track"
|
|
5833
|
-
},
|
|
5837
|
+
}, fl = { class: "time" }, pl = ["disabled", "onClick"], ml = { class: "meta" }, hl = { class: "name" }, gl = 30, _l = 256, vl = 5, yl = /* @__PURE__ */ z(/* @__PURE__ */ p({
|
|
5834
5838
|
__name: "NAudioSelect",
|
|
5835
5839
|
props: {
|
|
5836
5840
|
modelValue: { default: () => [] },
|
|
@@ -5881,8 +5885,8 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5881
5885
|
let e = 0;
|
|
5882
5886
|
if (r.forEach((t) => {
|
|
5883
5887
|
t.refCount <= 0 && (e += 1);
|
|
5884
|
-
}), !(e <=
|
|
5885
|
-
for (let [t, n] of r) if (!(n.refCount > 0) && (r.delete(t), --e, e <=
|
|
5888
|
+
}), !(e <= gl)) {
|
|
5889
|
+
for (let [t, n] of r) if (!(n.refCount > 0) && (r.delete(t), --e, e <= gl)) break;
|
|
5886
5890
|
}
|
|
5887
5891
|
}, f = (e, t) => {
|
|
5888
5892
|
if (!e) return;
|
|
@@ -5896,9 +5900,9 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5896
5900
|
n <= 0 || (n === 1 ? j.delete(e) : j.set(e, n - 1), f(e, t));
|
|
5897
5901
|
}, P = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map(), I = (e, t) => {
|
|
5898
5902
|
t ? P.set(e, t) : P.delete(e);
|
|
5899
|
-
}, ne = i(() => t.modelValue.length), re = () =>
|
|
5900
|
-
let t = await ae().decodeAudioData(e.slice(0)), n = t.getChannelData(0), r = Math.floor(n.length /
|
|
5901
|
-
for (let e = 0; e <
|
|
5903
|
+
}, ne = i(() => t.modelValue.length), re = () => Hs("a"), ie = (e) => Bs(e, "音訊"), R = null, ae = () => (R ||= new (window.AudioContext || window.webkitAudioContext)(), R), oe = async (e) => {
|
|
5904
|
+
let t = await ae().decodeAudioData(e.slice(0)), n = t.getChannelData(0), r = Math.floor(n.length / _l) || 1, i = Array(_l), a = 0;
|
|
5905
|
+
for (let e = 0; e < _l; e++) {
|
|
5902
5906
|
let t = 0, o = e * r, s = Math.min(n.length, o + r);
|
|
5903
5907
|
for (let e = o; e < s; e++) {
|
|
5904
5908
|
let r = Math.abs(n[e]);
|
|
@@ -5907,7 +5911,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5907
5911
|
i[e] = t, t > a && (a = t);
|
|
5908
5912
|
}
|
|
5909
5913
|
let o = a > 0 ? 1 / a : 1;
|
|
5910
|
-
for (let e = 0; e <
|
|
5914
|
+
for (let e = 0; e < _l; e++) i[e] = Math.max(.06, i[e] * o);
|
|
5911
5915
|
return {
|
|
5912
5916
|
peaks: i,
|
|
5913
5917
|
duration: t.duration
|
|
@@ -5920,7 +5924,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5920
5924
|
B || requestAnimationFrame(() => z(e));
|
|
5921
5925
|
return;
|
|
5922
5926
|
}
|
|
5923
|
-
let i = Math.max(8, Math.min(n.length, Math.floor((r + 2) /
|
|
5927
|
+
let i = Math.max(8, Math.min(n.length, Math.floor((r + 2) / vl)));
|
|
5924
5928
|
if (D[e] && D[e].length === i) return;
|
|
5925
5929
|
let a = Array(i);
|
|
5926
5930
|
for (let e = 0; e < i; e++) {
|
|
@@ -5940,13 +5944,13 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5940
5944
|
let n = t;
|
|
5941
5945
|
n.dataset.waveId = e, te.set(e, n), B ? B.observe(n) : z(e);
|
|
5942
5946
|
} else te.delete(e);
|
|
5943
|
-
}, { isDragging: H, dropZoneHandlers: U } =
|
|
5947
|
+
}, { isDragging: H, dropZoneHandlers: U } = Gs({
|
|
5944
5948
|
isBlocked: () => t.disabled || t.readonly,
|
|
5945
5949
|
accept: () => t.accept,
|
|
5946
5950
|
multiple: () => t.multiple,
|
|
5947
5951
|
onFiles: (e) => {
|
|
5948
5952
|
if (t.disabled || t.readonly) return;
|
|
5949
|
-
let n =
|
|
5953
|
+
let n = Ws(e, {
|
|
5950
5954
|
accept: t.accept,
|
|
5951
5955
|
fallbackTypePrefix: "audio/",
|
|
5952
5956
|
maxSize: t.maxSize,
|
|
@@ -5990,7 +5994,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
5990
5994
|
confirmText: "移除",
|
|
5991
5995
|
cancelText: "取消"
|
|
5992
5996
|
})) return;
|
|
5993
|
-
x.value === e && ce(),
|
|
5997
|
+
x.value === e && ce(), Vs(n.url), ee(n.url, !0), delete S[e], delete D[e], delete O[e], k.delete(e);
|
|
5994
5998
|
let r = t.modelValue.filter((t) => t.id !== e);
|
|
5995
5999
|
p("update:modelValue", r), p("change", r), p("remove", n);
|
|
5996
6000
|
}, ce = () => {
|
|
@@ -6061,24 +6065,24 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6061
6065
|
!e.url || k.has(e.id) || (k.add(e.id), S[e.id] || ve(e));
|
|
6062
6066
|
});
|
|
6063
6067
|
}, { immediate: !0 }), y(() => {
|
|
6064
|
-
b = !0, fe?.(), t.autoRevoke && t.modelValue.forEach((e) =>
|
|
6068
|
+
b = !0, fe?.(), t.autoRevoke && t.modelValue.forEach((e) => Vs(e.url)), j.forEach((e, t) => {
|
|
6065
6069
|
for (let n = 0; n < e; n++) f(t, !1);
|
|
6066
6070
|
}), j.clear(), B?.disconnect(), R &&= (R.close(), null);
|
|
6067
6071
|
}), (n, r) => (C(), s("div", { class: _(["audio-input", {
|
|
6068
6072
|
"is-disabled": t.disabled,
|
|
6069
6073
|
"is-readonly": t.readonly
|
|
6070
|
-
}]) }, [t.title || t.showCount ? (C(), s("div",
|
|
6074
|
+
}]) }, [t.title || t.showCount ? (C(), s("div", Xc, [t.title ? (C(), s("span", {
|
|
6071
6075
|
key: 0,
|
|
6072
6076
|
class: "title",
|
|
6073
6077
|
textContent: A(t.title)
|
|
6074
|
-
}, null, 8,
|
|
6078
|
+
}, null, 8, Zc)) : o("", !0), t.showCount ? (C(), s("span", Qc, A(ne.value) + " 首", 1)) : o("", !0)])) : o("", !0), ne.value === 0 && g.value.length === 0 ? (C(), s("div", h({
|
|
6075
6079
|
key: 1,
|
|
6076
6080
|
class: ["empty", {
|
|
6077
6081
|
"is-drag": N(H),
|
|
6078
6082
|
"is-static": t.readonly
|
|
6079
6083
|
}]
|
|
6080
6084
|
}, t.readonly ? {} : N(U)), [
|
|
6081
|
-
t.readonly ? o("", !0) : (C(), s("span",
|
|
6085
|
+
t.readonly ? o("", !0) : (C(), s("span", $c, [...r[0] ||= [c("svg", {
|
|
6082
6086
|
viewBox: "0 0 24 24",
|
|
6083
6087
|
fill: "none",
|
|
6084
6088
|
stroke: "currentColor",
|
|
@@ -6098,12 +6102,12 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6098
6102
|
r: "3"
|
|
6099
6103
|
})
|
|
6100
6104
|
], -1)]])),
|
|
6101
|
-
c("h3", { textContent: A(t.readonly ? "目前沒有音訊" : t.emptyTitle) }, null, 8,
|
|
6105
|
+
c("h3", { textContent: A(t.readonly ? "目前沒有音訊" : t.emptyTitle) }, null, 8, el),
|
|
6102
6106
|
t.readonly ? o("", !0) : (C(), s("p", {
|
|
6103
6107
|
key: 1,
|
|
6104
6108
|
textContent: A(t.emptyHint)
|
|
6105
|
-
}, null, 8,
|
|
6106
|
-
], 16)) : (C(), s("div",
|
|
6109
|
+
}, null, 8, tl))
|
|
6110
|
+
], 16)) : (C(), s("div", nl, [
|
|
6107
6111
|
(C(!0), s(e, null, E(t.modelValue, (n) => (C(), s("div", {
|
|
6108
6112
|
key: n.id,
|
|
6109
6113
|
class: _(["row", { "is-playing": x.value === n.id }])
|
|
@@ -6116,13 +6120,13 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6116
6120
|
onLoadedmetadata: (e) => ye(n.id, e),
|
|
6117
6121
|
onTimeupdate: (e) => ue(n.id, e),
|
|
6118
6122
|
onEnded: (e) => de(n.id)
|
|
6119
|
-
}, null, 40,
|
|
6123
|
+
}, null, 40, rl),
|
|
6120
6124
|
c("button", {
|
|
6121
6125
|
class: "play-btn",
|
|
6122
6126
|
"aria-label": x.value === n.id ? "暫停" : "播放",
|
|
6123
6127
|
disabled: !n.url,
|
|
6124
6128
|
onClick: (e) => le(n.id)
|
|
6125
|
-
}, [x.value === n.id ? (C(), s("svg",
|
|
6129
|
+
}, [x.value === n.id ? (C(), s("svg", al, [...r[1] ||= [c("rect", {
|
|
6126
6130
|
x: "6",
|
|
6127
6131
|
y: "5",
|
|
6128
6132
|
width: "4",
|
|
@@ -6134,11 +6138,11 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6134
6138
|
width: "4",
|
|
6135
6139
|
height: "14",
|
|
6136
6140
|
rx: "1"
|
|
6137
|
-
}, null, -1)]])) : (C(), s("svg",
|
|
6138
|
-
c("div",
|
|
6141
|
+
}, null, -1)]])) : (C(), s("svg", ol, [...r[2] ||= [c("path", { d: "M8 5v14l11-7z" }, null, -1)]]))], 8, il),
|
|
6142
|
+
c("div", sl, [c("div", {
|
|
6139
6143
|
class: "name",
|
|
6140
6144
|
title: ie(n)
|
|
6141
|
-
}, A(ie(n)), 9,
|
|
6145
|
+
}, A(ie(n)), 9, cl), c("div", ll, [n.size == null ? o("", !0) : (C(), s(e, { key: 0 }, [d(A(N(Ls)(n.size)) + " · ", 1)], 64)), d(" " + A(N(Rs)(n.duration)), 1)])]),
|
|
6142
6146
|
c("div", {
|
|
6143
6147
|
class: _(["wave", { "is-track": !D[n.id]?.length }]),
|
|
6144
6148
|
ref_for: !0,
|
|
@@ -6149,11 +6153,11 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6149
6153
|
key: t,
|
|
6150
6154
|
class: _(["bar", { "is-played": me(n, t) }]),
|
|
6151
6155
|
style: v({ height: Math.max(2, Math.round(e * 34)) + "px" })
|
|
6152
|
-
}, null, 6))), 128)) : (C(), s("div",
|
|
6156
|
+
}, null, 6))), 128)) : (C(), s("div", dl, [c("div", {
|
|
6153
6157
|
class: "track-fill",
|
|
6154
6158
|
style: v({ width: he(n) * 100 + "%" })
|
|
6155
|
-
}, null, 4)]))], 42,
|
|
6156
|
-
c("div",
|
|
6159
|
+
}, null, 4)]))], 42, ul),
|
|
6160
|
+
c("div", fl, A(N(Rs)(O[n.id] || 0)) + " / " + A(N(Rs)(n.duration)), 1),
|
|
6157
6161
|
t.readonly ? o("", !0) : (C(), s("button", {
|
|
6158
6162
|
key: 0,
|
|
6159
6163
|
class: "del-btn",
|
|
@@ -6167,7 +6171,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6167
6171
|
"stroke-width": "1.8",
|
|
6168
6172
|
"stroke-linecap": "round",
|
|
6169
6173
|
"stroke-linejoin": "round"
|
|
6170
|
-
}, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8,
|
|
6174
|
+
}, [c("path", { d: "M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14" })], -1)]], 8, pl))
|
|
6171
6175
|
], 2))), 128)),
|
|
6172
6176
|
(C(!0), s(e, null, E(g.value, (e) => (C(), s("div", {
|
|
6173
6177
|
key: e.tag,
|
|
@@ -6181,20 +6185,20 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6181
6185
|
stroke: "currentColor",
|
|
6182
6186
|
"stroke-width": "2",
|
|
6183
6187
|
"stroke-linecap": "round"
|
|
6184
|
-
}, [c("path", { d: "M12 3a9 9 0 1 0 9 9" })])], -1), c("div",
|
|
6188
|
+
}, [c("path", { d: "M12 3a9 9 0 1 0 9 9" })])], -1), c("div", ml, [c("div", hl, A(e.name), 1), r[4] ||= c("div", { class: "sub" }, "解析波形中…", -1)])]))), 128)),
|
|
6185
6189
|
t.multiple && !t.readonly ? (C(), s("div", h({
|
|
6186
6190
|
key: 0,
|
|
6187
6191
|
class: ["add", { "is-drag": N(H) }]
|
|
6188
6192
|
}, N(U)), [...r[6] ||= [u("<span class=\"plus\" aria-hidden=\"true\" data-v-3def95e6><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" data-v-3def95e6><path d=\"M12 5v14M5 12h14\" data-v-3def95e6></path></svg></span><div class=\"add-text\" data-v-3def95e6><div class=\"t\" data-v-3def95e6>新增音訊</div><div class=\"d\" data-v-3def95e6>點擊或拖放檔案 · MP3 / WAV / OGG / M4A</div></div>", 2)]], 16)) : o("", !0)
|
|
6189
6193
|
]))], 2));
|
|
6190
6194
|
}
|
|
6191
|
-
}), [["__scopeId", "data-v-3def95e6"]]),
|
|
6195
|
+
}), [["__scopeId", "data-v-3def95e6"]]), bl = { class: "header" }, xl = { class: "brand-logo" }, Sl = { class: "logo-text" }, Cl = { class: "logo-icon" }, wl = { class: "nav" }, Tl = ["onClick"], El = ["innerHTML"], Dl = { class: "nav-list" }, Ol = ["href", "onClick"], kl = ["innerHTML"], Al = { class: "nav-text" }, jl = ["href", "onClick"], Ml = { class: "title no-children" }, Nl = ["innerHTML"], Pl = { class: "user-capsule" }, Fl = { class: "user-avatar" }, Il = ["src"], Ll = {
|
|
6192
6196
|
key: 1,
|
|
6193
6197
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6194
6198
|
width: "36",
|
|
6195
6199
|
height: "36",
|
|
6196
6200
|
viewBox: "0 0 36 36"
|
|
6197
|
-
},
|
|
6201
|
+
}, Rl = { class: "user-info" }, zl = { class: "user-name-row" }, Bl = { class: "user-name" }, Vl = /* @__PURE__ */ z(/* @__PURE__ */ p({
|
|
6198
6202
|
__name: "NSidebar",
|
|
6199
6203
|
props: {
|
|
6200
6204
|
title: { default: "" },
|
|
@@ -6247,8 +6251,8 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6247
6251
|
class: "content",
|
|
6248
6252
|
onMouseenter: v[2] ||= (e) => p.value = !0
|
|
6249
6253
|
}, [
|
|
6250
|
-
D(r.$slots, "header", {}, () => [c("div",
|
|
6251
|
-
c("div",
|
|
6254
|
+
D(r.$slots, "header", {}, () => [c("div", bl, [c("div", xl, [c("span", Sl, A(n.title), 1), c("span", Cl, A(n.title.substring(0, 1).toUpperCase()), 1)])])], !0),
|
|
6255
|
+
c("div", wl, [(C(!0), s(e, null, E(n.menus, (t) => (C(), s(e, null, [t.children?.length ? (C(), s("div", {
|
|
6252
6256
|
key: 0,
|
|
6253
6257
|
class: _(["menu", {
|
|
6254
6258
|
open: N(i)(t.title),
|
|
@@ -6257,7 +6261,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6257
6261
|
}, [c("div", {
|
|
6258
6262
|
class: "title",
|
|
6259
6263
|
onClick: (e) => N(o)(t.title)
|
|
6260
|
-
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8,
|
|
6264
|
+
}, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, El), c("span", null, A(t.title), 1)]), v[6] ||= c("svg", {
|
|
6261
6265
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6262
6266
|
width: "14",
|
|
6263
6267
|
height: "14",
|
|
@@ -6268,23 +6272,23 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6268
6272
|
"stroke-linecap": "round",
|
|
6269
6273
|
"stroke-linejoin": "round",
|
|
6270
6274
|
class: "icon"
|
|
6271
|
-
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8,
|
|
6275
|
+
}, [c("path", { d: "m9 18 6-6-6-6" })], -1)], 8, Tl), c("div", Dl, [c("div", null, [(C(!0), s(e, null, E(t.children, (e) => (C(), s("a", {
|
|
6272
6276
|
href: e.route,
|
|
6273
6277
|
onClick: L((t) => h(e), ["prevent"])
|
|
6274
|
-
}, [c("div", { class: _(["nav-item", { active: N(d)(e, n.currentPath) }]) }, [c("div", { innerHTML: e.icon }, null, 8,
|
|
6278
|
+
}, [c("div", { class: _(["nav-item", { active: N(d)(e, n.currentPath) }]) }, [c("div", { innerHTML: e.icon }, null, 8, kl), c("span", Al, A(e.title), 1)], 2)], 8, Ol))), 256))])])], 2)) : (C(), s("div", {
|
|
6275
6279
|
key: 1,
|
|
6276
6280
|
class: _(["menu", { active: t.route === n.currentPath }])
|
|
6277
6281
|
}, [c("a", {
|
|
6278
6282
|
href: t.route,
|
|
6279
6283
|
onClick: L((e) => g(t), ["prevent"])
|
|
6280
|
-
}, [c("div",
|
|
6281
|
-
c("div",
|
|
6282
|
-
c("div",
|
|
6284
|
+
}, [c("div", Ml, [c("div", null, [c("div", { innerHTML: t.icon }, null, 8, Nl), c("span", null, A(t.title), 1)])])], 8, jl)], 2))], 64))), 256))]),
|
|
6285
|
+
c("div", Pl, [D(r.$slots, "user", {}, () => [
|
|
6286
|
+
c("div", Fl, [n.userAvatarUrl ? (C(), s("img", {
|
|
6283
6287
|
key: 0,
|
|
6284
6288
|
src: n.userAvatarUrl,
|
|
6285
6289
|
alt: "User Avatar"
|
|
6286
|
-
}, null, 8,
|
|
6287
|
-
c("div",
|
|
6290
|
+
}, null, 8, Il)) : (C(), s("svg", Ll, [...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)]]))]),
|
|
6291
|
+
c("div", Rl, [c("div", zl, [c("span", Bl, A(n.userName), 1)])]),
|
|
6288
6292
|
f(B, {
|
|
6289
6293
|
class: "logout-btn",
|
|
6290
6294
|
intent: "error",
|
|
@@ -6323,7 +6327,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6323
6327
|
}, null, 2)]))
|
|
6324
6328
|
], 34));
|
|
6325
6329
|
}
|
|
6326
|
-
}), [["__scopeId", "data-v-2c73c218"]]),
|
|
6330
|
+
}), [["__scopeId", "data-v-2c73c218"]]), Hl = { class: "layout" }, Ul = { class: "main-content" }, Wl = { class: "copyright" }, Gl = /* @__PURE__ */ z(/* @__PURE__ */ p({
|
|
6327
6331
|
__name: "NLayout",
|
|
6328
6332
|
props: {
|
|
6329
6333
|
title: { default: "NICKLABS" },
|
|
@@ -6339,7 +6343,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6339
6343
|
emits: ["logout", "navigate"],
|
|
6340
6344
|
setup(e, { emit: t }) {
|
|
6341
6345
|
let n = Di(), r = t;
|
|
6342
|
-
return (t, i) => (C(), s("div",
|
|
6346
|
+
return (t, i) => (C(), s("div", Hl, [e.isShowSidebar ? (C(), a(Vl, {
|
|
6343
6347
|
key: 0,
|
|
6344
6348
|
title: e.title,
|
|
6345
6349
|
userName: e.userName,
|
|
@@ -6355,18 +6359,18 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6355
6359
|
"isOpen",
|
|
6356
6360
|
"menus",
|
|
6357
6361
|
"currentPath"
|
|
6358
|
-
])) : o("", !0), c("main",
|
|
6362
|
+
])) : o("", !0), c("main", Ul, [D(t.$slots, "default", {}, void 0, !0), c("div", Wl, A(e.copyright), 1)])]));
|
|
6359
6363
|
}
|
|
6360
|
-
}), [["__scopeId", "data-v-41b1eb44"]]),
|
|
6364
|
+
}), [["__scopeId", "data-v-41b1eb44"]]), Kl = { class: "topbar" }, ql = { class: "topbar-left" }, Jl = { class: "topbar-right" }, Yl = {
|
|
6361
6365
|
key: 0,
|
|
6362
6366
|
class: "pill"
|
|
6363
|
-
},
|
|
6367
|
+
}, Xl = {
|
|
6364
6368
|
key: 0,
|
|
6365
6369
|
class: "name"
|
|
6366
|
-
},
|
|
6370
|
+
}, Zl = {
|
|
6367
6371
|
key: 1,
|
|
6368
6372
|
class: "separator"
|
|
6369
|
-
},
|
|
6373
|
+
}, Ql = /* @__PURE__ */ z(/* @__PURE__ */ p({
|
|
6370
6374
|
__name: "NNavigation",
|
|
6371
6375
|
props: {
|
|
6372
6376
|
isShowSidebar: {
|
|
@@ -6391,7 +6395,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6391
6395
|
let n = t, r = () => {
|
|
6392
6396
|
document.fullscreenElement ? document.exitFullscreen?.() : document.documentElement.requestFullscreen();
|
|
6393
6397
|
};
|
|
6394
|
-
return (t, i) => (C(), s("header",
|
|
6398
|
+
return (t, i) => (C(), s("header", Kl, [c("div", ql, [e.isShowSidebar ? (C(), a(B, {
|
|
6395
6399
|
key: 0,
|
|
6396
6400
|
onClick: i[0] ||= (e) => n("toggleSidebar"),
|
|
6397
6401
|
padding: "8px"
|
|
@@ -6434,9 +6438,9 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6434
6438
|
c("path", { d: "M16 21h3a2 2 0 0 0 2-2v-3" })
|
|
6435
6439
|
], -1)]]),
|
|
6436
6440
|
_: 1
|
|
6437
|
-
})) : o("", !0)]), c("div",
|
|
6438
|
-
e.isShowUser ? (C(), s("span",
|
|
6439
|
-
e.isShowUser && e.isShowLogoutButton ? (C(), s("div",
|
|
6441
|
+
})) : o("", !0)]), c("div", Jl, [e.isShowUser || e.isShowLogoutButton ? (C(), s("div", Yl, [
|
|
6442
|
+
e.isShowUser ? (C(), s("span", Xl, "Nick")) : o("", !0),
|
|
6443
|
+
e.isShowUser && e.isShowLogoutButton ? (C(), s("div", Zl)) : o("", !0),
|
|
6440
6444
|
e.isShowLogoutButton ? (C(), a(B, {
|
|
6441
6445
|
key: 2,
|
|
6442
6446
|
variant: "mute",
|
|
@@ -6462,10 +6466,10 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6462
6466
|
})) : o("", !0)
|
|
6463
6467
|
])) : o("", !0)])]));
|
|
6464
6468
|
}
|
|
6465
|
-
}), [["__scopeId", "data-v-f38a4beb"]]),
|
|
6469
|
+
}), [["__scopeId", "data-v-f38a4beb"]]), $l = { class: "brand" }, eu = ["src", "alt"], tu = {
|
|
6466
6470
|
key: 1,
|
|
6467
6471
|
class: "icon"
|
|
6468
|
-
},
|
|
6472
|
+
}, nu = { key: 2 }, ru = { key: 3 }, iu = /* @__PURE__ */ z(/* @__PURE__ */ p({
|
|
6469
6473
|
__name: "NLoginLayout",
|
|
6470
6474
|
props: {
|
|
6471
6475
|
backgroundImage: { default: "" },
|
|
@@ -6483,15 +6487,15 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6483
6487
|
radius: "xl",
|
|
6484
6488
|
class: "card"
|
|
6485
6489
|
}, {
|
|
6486
|
-
default: I(() => [c("div",
|
|
6490
|
+
default: I(() => [c("div", $l, [
|
|
6487
6491
|
t.value ? (C(), s("img", {
|
|
6488
6492
|
key: 0,
|
|
6489
6493
|
class: "logo-img",
|
|
6490
6494
|
src: e.logo,
|
|
6491
6495
|
alt: e.title
|
|
6492
|
-
}, null, 8,
|
|
6493
|
-
e.title ? (C(), s("h1",
|
|
6494
|
-
e.description ? (C(), s("p",
|
|
6496
|
+
}, null, 8, eu)) : (C(), s("div", tu, A(e.logo), 1)),
|
|
6497
|
+
e.title ? (C(), s("h1", nu, A(e.title), 1)) : o("", !0),
|
|
6498
|
+
e.description ? (C(), s("p", ru, A(e.description), 1)) : o("", !0)
|
|
6495
6499
|
]), D(n.$slots, "default", {}, void 0, !0)]),
|
|
6496
6500
|
_: 3
|
|
6497
6501
|
})], 4));
|
|
@@ -6499,7 +6503,7 @@ var Ps = (e) => e == null ? "—" : e < 1024 ? e + " B" : e < 1048576 ? (e / 102
|
|
|
6499
6503
|
}), [["__scopeId", "data-v-f0866bc5"]]);
|
|
6500
6504
|
//#endregion
|
|
6501
6505
|
//#region src/composables/useRouteModal.ts
|
|
6502
|
-
function
|
|
6506
|
+
function au(e) {
|
|
6503
6507
|
let t = i(() => {
|
|
6504
6508
|
let t = R();
|
|
6505
6509
|
return t ? t.currentRoute.value.matched.some((t) => t.name === e.routeName) : !1;
|
|
@@ -6523,7 +6527,7 @@ function nu(e) {
|
|
|
6523
6527
|
}
|
|
6524
6528
|
//#endregion
|
|
6525
6529
|
//#region src/index.ts
|
|
6526
|
-
var
|
|
6530
|
+
var ou = {
|
|
6527
6531
|
NButton: B,
|
|
6528
6532
|
NBreadcrumb: ue,
|
|
6529
6533
|
NInput: _e,
|
|
@@ -6545,19 +6549,19 @@ var ru = {
|
|
|
6545
6549
|
NDrawer: ps,
|
|
6546
6550
|
NAlert: Ss,
|
|
6547
6551
|
NTable: Ta,
|
|
6548
|
-
NVirtualTable:
|
|
6549
|
-
NVideoSelect:
|
|
6550
|
-
NImageSelect:
|
|
6551
|
-
NAudioSelect:
|
|
6552
|
-
NLayout:
|
|
6553
|
-
NNavigation:
|
|
6554
|
-
NSidebar:
|
|
6552
|
+
NVirtualTable: Fs,
|
|
6553
|
+
NVideoSelect: xc,
|
|
6554
|
+
NImageSelect: Yc,
|
|
6555
|
+
NAudioSelect: yl,
|
|
6556
|
+
NLayout: Gl,
|
|
6557
|
+
NNavigation: Ql,
|
|
6558
|
+
NSidebar: Vl,
|
|
6555
6559
|
NCard: Gi,
|
|
6556
|
-
NLoginLayout:
|
|
6557
|
-
},
|
|
6558
|
-
Object.entries(
|
|
6560
|
+
NLoginLayout: iu
|
|
6561
|
+
}, su = { install(e, t = {}) {
|
|
6562
|
+
Object.entries(ou).forEach(([t, n]) => {
|
|
6559
6563
|
e.component(t, n);
|
|
6560
6564
|
}), t.router && ie(t.router);
|
|
6561
6565
|
} };
|
|
6562
6566
|
//#endregion
|
|
6563
|
-
export { Ss as NAlert,
|
|
6567
|
+
export { Ss as NAlert, yl as NAudioSelect, B as NButton, Gi as NCard, K as NCheckbox, qa as NCode, ns as NDatePicker, ps as NDrawer, ta as NEmpty, Ci as NFileSelect, Wi as NForm, Yc as NImageSelect, _e as NInput, Gl as NLayout, ka as NList, fa as NLoading, iu as NLoginLayout, cs as NModal, Ql as NNavigation, Zn as NSelect, Vl as NSidebar, Ya as NSwitch, Ta as NTable, Xa as NTag, Se as NTextarea, Ra as NToast, rs as NTooltip, xc as NVideoSelect, Fs as NVirtualTable, su as NickLabsUI, ci as useAlert, U as useBreadcrumb, Is as useDisclosure, au as useRouteModal, Di as useSidebarManager, Ma as useToast };
|