@opengis/bi 1.2.11 → 1.2.13
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/bi.js +1 -1
- package/dist/bi.umd.cjs +110 -97
- package/dist/{import-file--MEHKIZN.js → import-file-ChR4pfHv.js} +10827 -10572
- package/dist/index-B4DvDTGq.js +9137 -0
- package/dist/index-BCGOfuzo.js +2004 -0
- package/dist/index-W-qQIppj-CIdBATkI.js +2383 -0
- package/dist/style.css +2 -2
- package/dist/{vs-funnel-bar-Bm0uo7I2.js → vs-funnel-bar-BT8dU3vP.js} +1 -1
- package/dist/{vs-list-CIfRGFUp.js → vs-list-DOODrXT8.js} +1 -1
- package/dist/{vs-map-t-8HLh36.js → vs-map-4a3Rl_vt.js} +2 -2
- package/dist/{vs-map-cluster-BtqOA70T.js → vs-map-cluster-B09g7_0L.js} +2 -2
- package/dist/{vs-number-B5Hk7Eoq.js → vs-number-Cp65GC9n.js} +1 -1
- package/dist/{vs-table-C6kBCHF1.js → vs-table-RlP9LKj4.js} +1 -1
- package/dist/{vs-text-CsbBsS8r.js → vs-text-Q1VMLsfH.js} +1 -1
- package/package.json +4 -6
|
@@ -0,0 +1,2004 @@
|
|
|
1
|
+
import { createApp as W, h as j, defineComponent as T, createElementBlock as u, openBlock as i, createElementVNode as a, createBlock as H, resolveDynamicComponent as te, toDisplayString as w, computed as L, normalizeClass as V, renderSlot as I, ref as _, createCommentVNode as B, createVNode as S, Fragment as D, renderList as U, watch as O, onMounted as N, onBeforeUnmount as G, Teleport as P, Transition as K, withCtx as q, withDirectives as Z, normalizeStyle as X, vShow as ie, useSlots as he, reactive as be, withKeys as J, withModifiers as R, resolveDirective as xe, vModelText as ye, onUnmounted as de, createTextVNode as Q, nextTick as we, vModelCheckbox as ke, createStaticVNode as Ce, useAttrs as _e, unref as Be } from "vue";
|
|
2
|
+
const Ve = ["type", "disabled"], ze = /* @__PURE__ */ T({
|
|
3
|
+
__name: "button",
|
|
4
|
+
props: {
|
|
5
|
+
type: {},
|
|
6
|
+
variant: {},
|
|
7
|
+
disabled: { type: Boolean }
|
|
8
|
+
},
|
|
9
|
+
emits: ["click"],
|
|
10
|
+
setup(e, { emit: t }) {
|
|
11
|
+
const l = e, o = t, n = (s) => {
|
|
12
|
+
l.disabled || o("click", s);
|
|
13
|
+
}, r = L(() => {
|
|
14
|
+
switch (l.variant) {
|
|
15
|
+
case "secondary":
|
|
16
|
+
return "bg-gray-200 text-black hover:bg-gray-300";
|
|
17
|
+
case "danger":
|
|
18
|
+
return "bg-red-500 text-white hover:bg-red-600";
|
|
19
|
+
default:
|
|
20
|
+
return "bg-blue-600 text-white hover:bg-blue-700";
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return (s, f) => (i(), u("button", {
|
|
24
|
+
type: s.type,
|
|
25
|
+
class: V([
|
|
26
|
+
"px-4 py-2 rounded font-semibold",
|
|
27
|
+
r.value,
|
|
28
|
+
s.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
29
|
+
]),
|
|
30
|
+
disabled: s.disabled,
|
|
31
|
+
onClick: n
|
|
32
|
+
}, [
|
|
33
|
+
I(s.$slots, "default")
|
|
34
|
+
], 10, Ve));
|
|
35
|
+
}
|
|
36
|
+
}), Me = (e, t = 0.1) => {
|
|
37
|
+
function l(r) {
|
|
38
|
+
return {
|
|
39
|
+
black: "0, 0, 0",
|
|
40
|
+
white: "255, 255, 255",
|
|
41
|
+
red: "255, 0, 0",
|
|
42
|
+
green: "0, 128, 0",
|
|
43
|
+
blue: "0, 0, 255",
|
|
44
|
+
gray: "128, 128, 128",
|
|
45
|
+
yellow: "255, 255, 0",
|
|
46
|
+
cyan: "0, 255, 255",
|
|
47
|
+
magenta: "255, 0, 255",
|
|
48
|
+
orange: "255, 165, 0",
|
|
49
|
+
purple: "128, 0, 128",
|
|
50
|
+
brown: "165, 42, 42",
|
|
51
|
+
pink: "255, 192, 203",
|
|
52
|
+
lime: "0, 255, 0",
|
|
53
|
+
navy: "0, 0, 128",
|
|
54
|
+
teal: "0, 128, 128",
|
|
55
|
+
olive: "128, 128, 0",
|
|
56
|
+
maroon: "128, 0, 0",
|
|
57
|
+
silver: "192, 192, 192",
|
|
58
|
+
gold: "255, 215, 0"
|
|
59
|
+
}[r] || null;
|
|
60
|
+
}
|
|
61
|
+
function o(r) {
|
|
62
|
+
let s = r.replace(/^#/, "");
|
|
63
|
+
s.length === 3 && (s = s.split("").map((v) => v + v).join(""));
|
|
64
|
+
const f = parseInt(s, 16), d = f >> 16 & 255, p = f >> 8 & 255, c = f & 255;
|
|
65
|
+
return `${d}, ${p}, ${c}`;
|
|
66
|
+
}
|
|
67
|
+
let n;
|
|
68
|
+
if (typeof e == "string" && e.startsWith("#"))
|
|
69
|
+
n = o(e);
|
|
70
|
+
else if (typeof e == "string")
|
|
71
|
+
n = l(e);
|
|
72
|
+
else
|
|
73
|
+
throw new Error("Invalid color format");
|
|
74
|
+
if (n)
|
|
75
|
+
return `rgba(${n}, ${t})`;
|
|
76
|
+
throw new Error("Color not found");
|
|
77
|
+
}, Se = {
|
|
78
|
+
props: {
|
|
79
|
+
text: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: () => "",
|
|
82
|
+
required: !0
|
|
83
|
+
},
|
|
84
|
+
color: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: () => "",
|
|
87
|
+
required: !1
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
computed: {
|
|
91
|
+
createStyle() {
|
|
92
|
+
return this.color ? { backgroundColor: Me(this.color, 0.2) } : { backgroundColor: "rgb(245 245 244)" };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}, z = (e, t) => {
|
|
96
|
+
const l = e.__vccOpts || e;
|
|
97
|
+
for (const [o, n] of t)
|
|
98
|
+
l[o] = n;
|
|
99
|
+
return l;
|
|
100
|
+
};
|
|
101
|
+
function je(e, t, l, o, n, r) {
|
|
102
|
+
return l.text ? (i(), u("div", {
|
|
103
|
+
key: 0,
|
|
104
|
+
class: V(["py-1.5 px-2 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-full", l.color ? `text-[${l.color}]` : "text-gray-700"]),
|
|
105
|
+
style: X(r.createStyle)
|
|
106
|
+
}, w(l.text), 7)) : B("", !0);
|
|
107
|
+
}
|
|
108
|
+
const zl = /* @__PURE__ */ z(Se, [["render", je]]), Te = {
|
|
109
|
+
props: {
|
|
110
|
+
value: { type: String, default: () => "" }
|
|
111
|
+
},
|
|
112
|
+
computed: {
|
|
113
|
+
dateValue() {
|
|
114
|
+
try {
|
|
115
|
+
return new Date(this.value).toLocaleDateString("uk-UA", {
|
|
116
|
+
day: "2-digit",
|
|
117
|
+
month: "long",
|
|
118
|
+
year: "numeric"
|
|
119
|
+
});
|
|
120
|
+
} catch {
|
|
121
|
+
return this.value;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, Le = { class: "whitespace-nowrap" };
|
|
126
|
+
function Ee(e, t, l, o, n, r) {
|
|
127
|
+
return i(), u("div", Le, w(r.dateValue), 1);
|
|
128
|
+
}
|
|
129
|
+
const $e = /* @__PURE__ */ z(Te, [["render", Ee]]), Ie = {}, He = {
|
|
130
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
131
|
+
width: "24",
|
|
132
|
+
height: "24",
|
|
133
|
+
viewBox: "0 0 24 24",
|
|
134
|
+
fill: "none",
|
|
135
|
+
stroke: "currentColor",
|
|
136
|
+
"stroke-width": "2",
|
|
137
|
+
"stroke-linecap": "round",
|
|
138
|
+
"stroke-linejoin": "round",
|
|
139
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
140
|
+
};
|
|
141
|
+
function Oe(e, t) {
|
|
142
|
+
return i(), u("svg", He, t[0] || (t[0] = [
|
|
143
|
+
a("path", {
|
|
144
|
+
stroke: "none",
|
|
145
|
+
d: "M0 0h24v24H0z",
|
|
146
|
+
fill: "none"
|
|
147
|
+
}, null, -1),
|
|
148
|
+
a("path", { d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2" }, null, -1),
|
|
149
|
+
a("path", { d: "M7 11l5 5l5 -5" }, null, -1),
|
|
150
|
+
a("path", { d: "M12 4l0 12" }, null, -1)
|
|
151
|
+
]));
|
|
152
|
+
}
|
|
153
|
+
const Ne = /* @__PURE__ */ z(Ie, [["render", Oe]]), De = {}, Pe = {
|
|
154
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
155
|
+
width: "24",
|
|
156
|
+
height: "24",
|
|
157
|
+
viewBox: "0 0 24 24",
|
|
158
|
+
fill: "none",
|
|
159
|
+
stroke: "currentColor",
|
|
160
|
+
"stroke-width": "2",
|
|
161
|
+
"stroke-linecap": "round",
|
|
162
|
+
"stroke-linejoin": "round",
|
|
163
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
|
|
164
|
+
};
|
|
165
|
+
function Ae(e, t) {
|
|
166
|
+
return i(), u("svg", Pe, t[0] || (t[0] = [
|
|
167
|
+
Ce('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
|
|
168
|
+
]));
|
|
169
|
+
}
|
|
170
|
+
const Re = /* @__PURE__ */ z(De, [["render", Ae]]), Ue = {}, Ke = {
|
|
171
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
172
|
+
viewBox: "0 0 24 24",
|
|
173
|
+
fill: "none",
|
|
174
|
+
stroke: "currentColor",
|
|
175
|
+
"stroke-width": "2",
|
|
176
|
+
"stroke-linecap": "round",
|
|
177
|
+
"stroke-linejoin": "round",
|
|
178
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
|
|
179
|
+
};
|
|
180
|
+
function qe(e, t) {
|
|
181
|
+
return i(), u("svg", Ke, t[0] || (t[0] = [
|
|
182
|
+
a("path", {
|
|
183
|
+
stroke: "none",
|
|
184
|
+
d: "M0 0h24v24H0z",
|
|
185
|
+
fill: "none"
|
|
186
|
+
}, null, -1),
|
|
187
|
+
a("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
188
|
+
]));
|
|
189
|
+
}
|
|
190
|
+
const ne = /* @__PURE__ */ z(Ue, [["render", qe]]), Fe = {}, We = {
|
|
191
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
192
|
+
width: "24",
|
|
193
|
+
height: "24",
|
|
194
|
+
viewBox: "0 0 24 24",
|
|
195
|
+
fill: "none",
|
|
196
|
+
stroke: "currentColor",
|
|
197
|
+
"stroke-width": "2",
|
|
198
|
+
"stroke-linecap": "round",
|
|
199
|
+
"stroke-linejoin": "round",
|
|
200
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
|
|
201
|
+
};
|
|
202
|
+
function Ge(e, t) {
|
|
203
|
+
return i(), u("svg", We, t[0] || (t[0] = [
|
|
204
|
+
a("path", {
|
|
205
|
+
stroke: "none",
|
|
206
|
+
d: "M0 0h24v24H0z",
|
|
207
|
+
fill: "none"
|
|
208
|
+
}, null, -1),
|
|
209
|
+
a("path", { d: "M18 6l-12 12" }, null, -1),
|
|
210
|
+
a("path", { d: "M6 6l12 12" }, null, -1)
|
|
211
|
+
]));
|
|
212
|
+
}
|
|
213
|
+
const Ze = /* @__PURE__ */ z(Fe, [["render", Ge]]), Xe = {
|
|
214
|
+
key: 0,
|
|
215
|
+
class: "fixed inset-0 z-[2000] flex items-center justify-center bg-gray-600 bg-opacity-75"
|
|
216
|
+
}, Ye = {
|
|
217
|
+
key: 0,
|
|
218
|
+
class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",
|
|
219
|
+
role: "dialog",
|
|
220
|
+
"aria-modal": "true",
|
|
221
|
+
"aria-labelledby": "dialog-title"
|
|
222
|
+
}, Je = { class: "bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Qe = { class: "mt-3 text-center sm:mt-5" }, et = {
|
|
223
|
+
id: "dialog-title",
|
|
224
|
+
class: "text-base font-semibold text-gray-900"
|
|
225
|
+
}, tt = { class: "mt-2" }, ot = { class: "text-sm text-gray-500" }, lt = { class: "bg-gray-50 px-4 py-3 sm:px-6 flex justify-center" }, nt = {
|
|
226
|
+
key: 1,
|
|
227
|
+
class: "relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",
|
|
228
|
+
role: "dialog",
|
|
229
|
+
"aria-modal": "true",
|
|
230
|
+
"aria-labelledby": "dialog-title"
|
|
231
|
+
}, at = { class: "bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, rt = { class: "sm:flex sm:items-start" }, st = { class: "mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left" }, it = {
|
|
232
|
+
id: "dialog-title",
|
|
233
|
+
class: "text-base font-semibold text-gray-900"
|
|
234
|
+
}, dt = { class: "mt-2" }, ut = { class: "text-sm text-gray-500" }, ct = {
|
|
235
|
+
key: 0,
|
|
236
|
+
class: "mt-2"
|
|
237
|
+
}, pt = ["placeholder"], ft = /* @__PURE__ */ T({
|
|
238
|
+
__name: "message-box",
|
|
239
|
+
props: {
|
|
240
|
+
type: { default: "error" },
|
|
241
|
+
mode: { default: "confirm" },
|
|
242
|
+
title: { default: "" },
|
|
243
|
+
message: { default: "" },
|
|
244
|
+
confirmButtonText: { default: "OK" },
|
|
245
|
+
cancelButtonText: { default: "Cancel" },
|
|
246
|
+
modelValue: { type: Boolean, default: !1 },
|
|
247
|
+
promptPlaceholder: { default: "" },
|
|
248
|
+
align: { type: Boolean, default: !0 }
|
|
249
|
+
},
|
|
250
|
+
emits: ["confirm", "cancel", "update:modelValue"],
|
|
251
|
+
setup(e, { emit: t }) {
|
|
252
|
+
const l = _(null);
|
|
253
|
+
N(() => {
|
|
254
|
+
var x;
|
|
255
|
+
(x = l.value) == null || x.focus();
|
|
256
|
+
});
|
|
257
|
+
const o = {
|
|
258
|
+
success: () => j("svg", {
|
|
259
|
+
viewBox: "0 0 24 24",
|
|
260
|
+
fill: "none",
|
|
261
|
+
stroke: "currentColor",
|
|
262
|
+
"stroke-width": "1.5",
|
|
263
|
+
"aria-hidden": "true",
|
|
264
|
+
class: "size-6 text-green-600"
|
|
265
|
+
}, [
|
|
266
|
+
j("path", { d: "m4.5 12.75 6 6 9-13.5", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
267
|
+
]),
|
|
268
|
+
error: () => j("svg", {
|
|
269
|
+
viewBox: "0 0 24 24",
|
|
270
|
+
fill: "none",
|
|
271
|
+
stroke: "currentColor",
|
|
272
|
+
"stroke-width": "1.5",
|
|
273
|
+
"aria-hidden": "true",
|
|
274
|
+
class: "size-6 text-red-600"
|
|
275
|
+
}, [
|
|
276
|
+
j("path", { d: "M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z", "stroke-linecap": "round", "stroke-linejoin": "round" })
|
|
277
|
+
]),
|
|
278
|
+
info: () => j("svg", {
|
|
279
|
+
viewBox: "0 0 24 24",
|
|
280
|
+
fill: "none",
|
|
281
|
+
stroke: "currentColor",
|
|
282
|
+
"stroke-width": "1.5",
|
|
283
|
+
class: "size-6 text-blue-600"
|
|
284
|
+
}, [
|
|
285
|
+
j("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M13 16h-1v-4h-1m1-4h.01M12 20a8 8 0 100-16 8 8 0 000 16z" })
|
|
286
|
+
]),
|
|
287
|
+
warning: () => j("svg", {
|
|
288
|
+
viewBox: "0 0 24 24",
|
|
289
|
+
fill: "none",
|
|
290
|
+
stroke: "currentColor",
|
|
291
|
+
"stroke-width": "1.5",
|
|
292
|
+
class: "size-6 text-yellow-600"
|
|
293
|
+
}, [
|
|
294
|
+
j("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M12 9v2m0 4h.01M10.29 3.86L1.82 17a1 1 0 0 0 .87 1.5h18.62a1 1 0 0 0 .87-1.5L13.71 3.86a1 1 0 0 0-1.42 0z" })
|
|
295
|
+
])
|
|
296
|
+
}, n = e, r = t, s = _(n.modelValue), f = _("");
|
|
297
|
+
O(
|
|
298
|
+
() => n.modelValue,
|
|
299
|
+
(x) => {
|
|
300
|
+
s.value = x, x === !0 && n.mode === "prompt" && (f.value = "");
|
|
301
|
+
}
|
|
302
|
+
);
|
|
303
|
+
function d(x) {
|
|
304
|
+
s.value = !1, r("update:modelValue", !1), x === "confirm" && n.mode === "prompt" ? r("confirm", f.value) : r(x);
|
|
305
|
+
}
|
|
306
|
+
function p() {
|
|
307
|
+
d("confirm");
|
|
308
|
+
}
|
|
309
|
+
const c = L(() => {
|
|
310
|
+
switch (n.type) {
|
|
311
|
+
case "success":
|
|
312
|
+
return "bg-green-100";
|
|
313
|
+
case "error":
|
|
314
|
+
return "bg-red-100";
|
|
315
|
+
case "info":
|
|
316
|
+
return "bg-blue-100";
|
|
317
|
+
case "warning":
|
|
318
|
+
return "bg-yellow-100";
|
|
319
|
+
default:
|
|
320
|
+
return "bg-gray-100";
|
|
321
|
+
}
|
|
322
|
+
}), v = L(() => n.type === "warning" ? "bg-orange-600 hover:bg-orange-500" : n.type === "success" ? "bg-green-600 hover:bg-green-500" : n.type === "error" ? "bg-red-600 hover:bg-red-500" : "bg-blue-600 hover:bg-blue-500"), m = L(() => o[n.type || "error"] || o.error), g = L(() => n.title && n.title.trim() !== "" ? n.title : n.type ? n.type.charAt(0).toUpperCase() + n.type.slice(1) : "Notification");
|
|
323
|
+
return (x, h) => {
|
|
324
|
+
const C = xe("focus");
|
|
325
|
+
return i(), H(P, { to: "body" }, [
|
|
326
|
+
s.value ? (i(), u("div", Xe, [
|
|
327
|
+
x.mode === "alert" ? (i(), u("div", Ye, [
|
|
328
|
+
a("div", Je, [
|
|
329
|
+
a("div", null, [
|
|
330
|
+
h[4] || (h[4] = a("div", { class: "mx-auto flex size-12 shrink-0 items-center justify-center rounded-full bg-green-100" }, [
|
|
331
|
+
a("svg", {
|
|
332
|
+
viewBox: "0 0 24 24",
|
|
333
|
+
fill: "none",
|
|
334
|
+
stroke: "currentColor",
|
|
335
|
+
"stroke-width": "1.5",
|
|
336
|
+
"aria-hidden": "true",
|
|
337
|
+
class: "size-6 text-green-600"
|
|
338
|
+
}, [
|
|
339
|
+
a("path", {
|
|
340
|
+
d: "m4.5 12.75 6 6 9-13.5",
|
|
341
|
+
"stroke-linecap": "round",
|
|
342
|
+
"stroke-linejoin": "round"
|
|
343
|
+
})
|
|
344
|
+
])
|
|
345
|
+
], -1)),
|
|
346
|
+
a("div", Qe, [
|
|
347
|
+
a("h3", et, w(g.value), 1),
|
|
348
|
+
a("div", tt, [
|
|
349
|
+
a("p", ot, w(x.message), 1)
|
|
350
|
+
])
|
|
351
|
+
])
|
|
352
|
+
])
|
|
353
|
+
]),
|
|
354
|
+
a("div", lt, [
|
|
355
|
+
a("button", {
|
|
356
|
+
type: "button",
|
|
357
|
+
onClick: h[0] || (h[0] = (y) => d("confirm")),
|
|
358
|
+
class: "inline-flex min-w-[70px] w-full justify-center rounded-md bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-indigo-500 sm:w-auto"
|
|
359
|
+
}, w(x.confirmButtonText), 1)
|
|
360
|
+
])
|
|
361
|
+
])) : (i(), u("div", nt, [
|
|
362
|
+
a("div", at, [
|
|
363
|
+
a("div", rt, [
|
|
364
|
+
a("div", {
|
|
365
|
+
class: V(["mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0 sm:size-10", c.value])
|
|
366
|
+
}, [
|
|
367
|
+
(i(), H(te(m.value)))
|
|
368
|
+
], 2),
|
|
369
|
+
a("div", st, [
|
|
370
|
+
a("h3", it, w(g.value), 1),
|
|
371
|
+
a("div", dt, [
|
|
372
|
+
a("p", ut, w(x.message), 1)
|
|
373
|
+
]),
|
|
374
|
+
x.mode === "prompt" ? (i(), u("div", ct, [
|
|
375
|
+
Z(a("input", {
|
|
376
|
+
"onUpdate:modelValue": h[1] || (h[1] = (y) => f.value = y),
|
|
377
|
+
placeholder: x.promptPlaceholder,
|
|
378
|
+
class: "w-full rounded-md py-1.5 pl-2 text-gray-900 shadow-sm placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6",
|
|
379
|
+
onKeyup: J(p, ["enter"]),
|
|
380
|
+
type: "text"
|
|
381
|
+
}, null, 40, pt), [
|
|
382
|
+
[ye, f.value],
|
|
383
|
+
[C]
|
|
384
|
+
])
|
|
385
|
+
])) : B("", !0)
|
|
386
|
+
])
|
|
387
|
+
])
|
|
388
|
+
]),
|
|
389
|
+
a("div", {
|
|
390
|
+
class: V(["bg-gray-50 px-4 py-3", x.align ? "sm:flex sm:flex-row-reverse sm:px-6 gap-x-2.5" : "sm:flex sm:flex-row sm:px-6 gap-x-2.5"])
|
|
391
|
+
}, [
|
|
392
|
+
a("button", {
|
|
393
|
+
type: "button",
|
|
394
|
+
onClick: h[2] || (h[2] = (y) => d("confirm")),
|
|
395
|
+
class: V(["inline-flex w-full justify-center rounded-md px-3 py-2 text-sm font-semibold text-white shadow-xs sm:w-auto", v.value])
|
|
396
|
+
}, w(x.confirmButtonText), 3),
|
|
397
|
+
a("button", {
|
|
398
|
+
type: "button",
|
|
399
|
+
onClick: h[3] || (h[3] = (y) => d("cancel")),
|
|
400
|
+
class: "mt-3 inline-flex w-full justify-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-xs ring-1 ring-inset ring-gray-300 hover:bg-gray-50 sm:mt-0 sm:w-auto"
|
|
401
|
+
}, w(x.cancelButtonText), 1)
|
|
402
|
+
], 2)
|
|
403
|
+
]))
|
|
404
|
+
])) : B("", !0)
|
|
405
|
+
]);
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
}), oe = /* @__PURE__ */ z(ft, [["__scopeId", "data-v-46ded130"]]), vt = ["aria-label"], mt = { class: "absolute top-[15px] right-[15px] z-20 flex flex-row gap-2 items-center" }, gt = ["href"], ht = { class: "text-center text-white text-sm absolute bottom-[10px] left-[50%] -translate-x-1/2" }, bt = { class: "relative w-full max-w-[80vw] h-[90vh]" }, xt = { class: "flex items-center justify-center w-full h-full" }, yt = ["src", "alt"], wt = ["src"], kt = ["src"], Ct = {
|
|
409
|
+
key: 3,
|
|
410
|
+
class: "flex flex-col items-center justify-center w-full h-full text-white text-center"
|
|
411
|
+
}, _t = { class: "text-sm text-gray-300 mb-4" }, Bt = ["href"], Vt = /* @__PURE__ */ T({
|
|
412
|
+
__name: "vs-lightbox",
|
|
413
|
+
props: {
|
|
414
|
+
modelValue: { type: Boolean },
|
|
415
|
+
ignoreFormat: { type: Boolean },
|
|
416
|
+
images: {},
|
|
417
|
+
startIndex: {},
|
|
418
|
+
download: { type: Boolean },
|
|
419
|
+
delete: { type: Boolean }
|
|
420
|
+
},
|
|
421
|
+
emits: ["update:modelValue", "update:index", "delete"],
|
|
422
|
+
setup(e, { emit: t }) {
|
|
423
|
+
const l = e, o = t, n = _(!!l.modelValue), r = _(l.startIndex ?? 0), s = _(!1), f = _("");
|
|
424
|
+
O(
|
|
425
|
+
() => l.modelValue,
|
|
426
|
+
(k) => {
|
|
427
|
+
n.value = !!k;
|
|
428
|
+
}
|
|
429
|
+
), O(n, (k) => {
|
|
430
|
+
o("update:modelValue", k);
|
|
431
|
+
}), O(
|
|
432
|
+
() => l.startIndex,
|
|
433
|
+
(k) => {
|
|
434
|
+
typeof k == "number" && (r.value = k);
|
|
435
|
+
}
|
|
436
|
+
);
|
|
437
|
+
const d = L(() => l.images || []), p = L(() => d.value[r.value] ?? "");
|
|
438
|
+
function c() {
|
|
439
|
+
n.value = !1;
|
|
440
|
+
}
|
|
441
|
+
function v() {
|
|
442
|
+
d.value.length <= 1 || (r.value = (r.value - 1 + d.value.length) % d.value.length, o("update:index", r.value));
|
|
443
|
+
}
|
|
444
|
+
function m() {
|
|
445
|
+
d.value.length <= 1 || (r.value = (r.value + 1) % d.value.length, o("update:index", r.value));
|
|
446
|
+
}
|
|
447
|
+
function g(k) {
|
|
448
|
+
n.value && (k.key === "Escape" && c(), k.key === "ArrowLeft" && v(), k.key === "ArrowRight" && m());
|
|
449
|
+
}
|
|
450
|
+
function x(k) {
|
|
451
|
+
return [".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg", ".bmp", ".ico"].some((M) => k.toLowerCase().includes(M));
|
|
452
|
+
}
|
|
453
|
+
function h(k) {
|
|
454
|
+
return [".mp4", ".webm", ".ogg", ".mov", ".avi", ".mkv", ".flv", ".wmv"].some((M) => k.toLowerCase().includes(M));
|
|
455
|
+
}
|
|
456
|
+
function C(k) {
|
|
457
|
+
return k.toLowerCase().includes(".pdf");
|
|
458
|
+
}
|
|
459
|
+
function y(k) {
|
|
460
|
+
return [".txt", ".md", ".html", ".htm", ".css", ".js", ".ts", ".json", ".xml", ".csv", ".log"].some((M) => k.toLowerCase().includes(M));
|
|
461
|
+
}
|
|
462
|
+
function E(k) {
|
|
463
|
+
const M = k.lastIndexOf(".");
|
|
464
|
+
return M === -1 ? "Unknown file type" : k.substring(M + 1).toUpperCase();
|
|
465
|
+
}
|
|
466
|
+
function b(k) {
|
|
467
|
+
f.value = k, s.value = !0;
|
|
468
|
+
}
|
|
469
|
+
function $() {
|
|
470
|
+
o("delete", f.value), r.value = 0, s.value = !1, n.value = !1;
|
|
471
|
+
}
|
|
472
|
+
return N(() => {
|
|
473
|
+
window.addEventListener("keydown", g);
|
|
474
|
+
}), G(() => {
|
|
475
|
+
window.removeEventListener("keydown", g);
|
|
476
|
+
}), (k, M) => (i(), u(D, null, [
|
|
477
|
+
S(K, { name: "lightbox-fade" }, {
|
|
478
|
+
default: q(() => [
|
|
479
|
+
n.value ? (i(), u("div", {
|
|
480
|
+
key: 0,
|
|
481
|
+
class: "fixed inset-0 z-[2000] bg-black/70 flex items-center justify-center",
|
|
482
|
+
onClick: R(c, ["self"]),
|
|
483
|
+
role: "dialog",
|
|
484
|
+
"aria-modal": "true",
|
|
485
|
+
"aria-label": `Image ${r.value + 1} of ${d.value.length}`
|
|
486
|
+
}, [
|
|
487
|
+
a("div", mt, [
|
|
488
|
+
l.delete ? (i(), u("button", {
|
|
489
|
+
key: 0,
|
|
490
|
+
onClick: M[0] || (M[0] = (le) => b(p.value)),
|
|
491
|
+
class: "bg-black/50 text-white rounded px-4 py-3 hover:scale-110 transition-all duration-300"
|
|
492
|
+
}, [
|
|
493
|
+
S(Re, { class: "w-4 h-4" })
|
|
494
|
+
])) : B("", !0),
|
|
495
|
+
l.download ? (i(), u("a", {
|
|
496
|
+
key: 1,
|
|
497
|
+
href: p.value,
|
|
498
|
+
download: "",
|
|
499
|
+
class: "bg-black/50 text-white rounded px-4 py-3 hover:scale-110 transition-all duration-300"
|
|
500
|
+
}, [
|
|
501
|
+
S(Ne, { class: "w-4 h-4" })
|
|
502
|
+
], 8, gt)) : B("", !0),
|
|
503
|
+
a("button", {
|
|
504
|
+
class: "bg-black/50 text-white rounded px-4 py-3 hover:scale-110 transition-all duration-300",
|
|
505
|
+
onClick: c,
|
|
506
|
+
"aria-label": "Close"
|
|
507
|
+
}, [
|
|
508
|
+
S(Ze, { class: "w-4 h-4" })
|
|
509
|
+
])
|
|
510
|
+
]),
|
|
511
|
+
d.value.length > 1 ? (i(), u("button", {
|
|
512
|
+
key: 0,
|
|
513
|
+
class: "absolute left-[15px] top-1/2 -translate-y-1/2 z-20 bg-black/50 text-white rounded px-4 py-3 hover:scale-110 transition-all duration-300",
|
|
514
|
+
onClick: R(v, ["stop"]),
|
|
515
|
+
"aria-label": "Previous"
|
|
516
|
+
}, [
|
|
517
|
+
S(ne, { class: "w-4 h-4 rotate-90" })
|
|
518
|
+
])) : B("", !0),
|
|
519
|
+
d.value.length > 1 ? (i(), u("button", {
|
|
520
|
+
key: 1,
|
|
521
|
+
class: "absolute right-[15px] top-1/2 -translate-y-1/2 z-20 bg-black/50 text-white rounded px-4 py-3 hover:scale-110 transition-all duration-300",
|
|
522
|
+
onClick: R(m, ["stop"]),
|
|
523
|
+
"aria-label": "Next"
|
|
524
|
+
}, [
|
|
525
|
+
S(ne, { class: "w-4 h-4 -rotate-90" })
|
|
526
|
+
])) : B("", !0),
|
|
527
|
+
a("div", ht, w(r.value + 1) + " / " + w(d.value.length), 1),
|
|
528
|
+
a("div", bt, [
|
|
529
|
+
a("div", xt, [
|
|
530
|
+
x(p.value) || l.ignoreFormat ? (i(), u("img", {
|
|
531
|
+
key: 0,
|
|
532
|
+
src: p.value,
|
|
533
|
+
alt: `Image ${r.value + 1}`,
|
|
534
|
+
class: "max-w-full max-h-full object-contain"
|
|
535
|
+
}, null, 8, yt)) : h(p.value) ? (i(), u("video", {
|
|
536
|
+
key: 1,
|
|
537
|
+
src: p.value,
|
|
538
|
+
class: "max-w-full max-h-full object-contain",
|
|
539
|
+
controls: "",
|
|
540
|
+
autoplay: "",
|
|
541
|
+
muted: ""
|
|
542
|
+
}, " Your browser does not support the video tag. ", 8, wt)) : C(p.value) || y(p.value) ? (i(), u("iframe", {
|
|
543
|
+
key: 2,
|
|
544
|
+
src: p.value,
|
|
545
|
+
class: "w-full h-full bg-white"
|
|
546
|
+
}, null, 8, kt)) : (i(), u("div", Ct, [
|
|
547
|
+
M[2] || (M[2] = a("div", { class: "mb-4" }, [
|
|
548
|
+
a("svg", {
|
|
549
|
+
class: "w-16 h-16 mx-auto text-gray-400",
|
|
550
|
+
fill: "none",
|
|
551
|
+
stroke: "currentColor",
|
|
552
|
+
viewBox: "0 0 24 24"
|
|
553
|
+
}, [
|
|
554
|
+
a("path", {
|
|
555
|
+
"stroke-linecap": "round",
|
|
556
|
+
"stroke-linejoin": "round",
|
|
557
|
+
"stroke-width": "2",
|
|
558
|
+
d: "M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
|
|
559
|
+
})
|
|
560
|
+
])
|
|
561
|
+
], -1)),
|
|
562
|
+
M[3] || (M[3] = a("p", { class: "text-lg mb-2" }, "Файл не підтримується для перегляду", -1)),
|
|
563
|
+
a("p", _t, w(E(p.value)), 1),
|
|
564
|
+
a("a", {
|
|
565
|
+
href: p.value,
|
|
566
|
+
target: "_blank",
|
|
567
|
+
download: "",
|
|
568
|
+
class: "bg-blue-500 hover:bg-blue-600 text-white px-6 py-3 rounded-lg transition-colors"
|
|
569
|
+
}, " Завантажити файл ", 8, Bt)
|
|
570
|
+
]))
|
|
571
|
+
])
|
|
572
|
+
])
|
|
573
|
+
], 8, vt)) : B("", !0)
|
|
574
|
+
]),
|
|
575
|
+
_: 1
|
|
576
|
+
}),
|
|
577
|
+
S(oe, {
|
|
578
|
+
modelValue: s.value,
|
|
579
|
+
"onUpdate:modelValue": M[1] || (M[1] = (le) => s.value = le),
|
|
580
|
+
onConfirm: $,
|
|
581
|
+
title: "Ви впевнені?",
|
|
582
|
+
message: "Ви впевнені, що хочете видалити цей файл?",
|
|
583
|
+
confirmButtonText: "Так, я впевнена/ий",
|
|
584
|
+
cancelButtonText: "Скасувати"
|
|
585
|
+
}, null, 8, ["modelValue"])
|
|
586
|
+
], 64));
|
|
587
|
+
}
|
|
588
|
+
}), ue = /* @__PURE__ */ z(Vt, [["__scopeId", "data-v-815d1d2d"]]), zt = {
|
|
589
|
+
key: 0,
|
|
590
|
+
class: "image-wrapper h-full max-h-[400px]",
|
|
591
|
+
id: "lightbox-gallery"
|
|
592
|
+
}, Mt = ["onClick"], St = ["src"], jt = {
|
|
593
|
+
key: 0,
|
|
594
|
+
class: "thumb-cover"
|
|
595
|
+
}, Tt = /* @__PURE__ */ T({
|
|
596
|
+
__name: "vs-grid-gallery",
|
|
597
|
+
props: {
|
|
598
|
+
images: {},
|
|
599
|
+
width: {},
|
|
600
|
+
height: {}
|
|
601
|
+
},
|
|
602
|
+
setup(e) {
|
|
603
|
+
const t = _(!1), l = _(0);
|
|
604
|
+
function o(r) {
|
|
605
|
+
return r.map((s) => s.src || s);
|
|
606
|
+
}
|
|
607
|
+
const n = _(o(e.images || []));
|
|
608
|
+
return (r, s) => {
|
|
609
|
+
var f;
|
|
610
|
+
return ((f = n.value) == null ? void 0 : f.length) >= 1 ? (i(), u("div", zt, [
|
|
611
|
+
(i(!0), u(D, null, U(n.value, (d, p) => {
|
|
612
|
+
var c, v;
|
|
613
|
+
return i(), u("div", {
|
|
614
|
+
class: V("h-full w-full image" + p),
|
|
615
|
+
key: p
|
|
616
|
+
}, [
|
|
617
|
+
p < 5 ? (i(), u("a", {
|
|
618
|
+
key: 0,
|
|
619
|
+
onClick: (m) => {
|
|
620
|
+
l.value = p, t.value = !0;
|
|
621
|
+
},
|
|
622
|
+
rel: "noreferrer",
|
|
623
|
+
class: "relative block h-full w-full"
|
|
624
|
+
}, [
|
|
625
|
+
a("img", {
|
|
626
|
+
src: d,
|
|
627
|
+
alt: "alt",
|
|
628
|
+
height: "auto",
|
|
629
|
+
width: "100%",
|
|
630
|
+
class: V([
|
|
631
|
+
"object-cover h-full w-full",
|
|
632
|
+
p === 0 ? "max-h-[411px]" : "max-h-[calc((411px-3px)/2)]"
|
|
633
|
+
])
|
|
634
|
+
}, null, 10, St),
|
|
635
|
+
p === 4 && ((c = n.value) == null ? void 0 : c.length) > 5 ? (i(), u("div", jt, " +" + w(((v = n.value) == null ? void 0 : v.length) - 5), 1)) : B("", !0)
|
|
636
|
+
], 8, Mt)) : B("", !0)
|
|
637
|
+
], 2);
|
|
638
|
+
}), 128)),
|
|
639
|
+
S(ue, {
|
|
640
|
+
modelValue: t.value,
|
|
641
|
+
"onUpdate:modelValue": s[0] || (s[0] = (d) => t.value = d),
|
|
642
|
+
images: n.value.map((d) => d),
|
|
643
|
+
ignoreFormat: !0,
|
|
644
|
+
startIndex: l.value,
|
|
645
|
+
"onUpdate:index": s[1] || (s[1] = (d) => l.value = d)
|
|
646
|
+
}, null, 8, ["modelValue", "images", "startIndex"])
|
|
647
|
+
])) : B("", !0);
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
}), Lt = {}, Et = {
|
|
651
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
652
|
+
fill: "none",
|
|
653
|
+
viewBox: "0 0 24 24",
|
|
654
|
+
"stroke-width": "1.5",
|
|
655
|
+
stroke: "currentColor",
|
|
656
|
+
class: "size-6 text-green-600"
|
|
657
|
+
};
|
|
658
|
+
function $t(e, t) {
|
|
659
|
+
return i(), u("svg", Et, t[0] || (t[0] = [
|
|
660
|
+
a("path", {
|
|
661
|
+
"stroke-linecap": "round",
|
|
662
|
+
"stroke-linejoin": "round",
|
|
663
|
+
d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
664
|
+
}, null, -1)
|
|
665
|
+
]));
|
|
666
|
+
}
|
|
667
|
+
const It = /* @__PURE__ */ z(Lt, [["render", $t]]), Ht = {}, Ot = {
|
|
668
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
669
|
+
fill: "none",
|
|
670
|
+
viewBox: "0 0 24 24",
|
|
671
|
+
"stroke-width": "1.5",
|
|
672
|
+
stroke: "orange",
|
|
673
|
+
class: "size-6 text-orange-600"
|
|
674
|
+
};
|
|
675
|
+
function Nt(e, t) {
|
|
676
|
+
return i(), u("svg", Ot, t[0] || (t[0] = [
|
|
677
|
+
a("path", {
|
|
678
|
+
"stroke-linecap": "round",
|
|
679
|
+
"stroke-linejoin": "round",
|
|
680
|
+
d: "M12 9v3m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
681
|
+
}, null, -1)
|
|
682
|
+
]));
|
|
683
|
+
}
|
|
684
|
+
const Dt = /* @__PURE__ */ z(Ht, [["render", Nt]]), Pt = {}, At = {
|
|
685
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
686
|
+
fill: "none",
|
|
687
|
+
viewBox: "0 0 24 24",
|
|
688
|
+
"stroke-width": "1.5",
|
|
689
|
+
stroke: "currentColor",
|
|
690
|
+
class: "size-6 text-blue-600"
|
|
691
|
+
};
|
|
692
|
+
function Rt(e, t) {
|
|
693
|
+
return i(), u("svg", At, t[0] || (t[0] = [
|
|
694
|
+
a("path", {
|
|
695
|
+
"stroke-linecap": "round",
|
|
696
|
+
"stroke-linejoin": "round",
|
|
697
|
+
d: "m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"
|
|
698
|
+
}, null, -1)
|
|
699
|
+
]));
|
|
700
|
+
}
|
|
701
|
+
const Ut = /* @__PURE__ */ z(Pt, [["render", Rt]]), Kt = {}, qt = {
|
|
702
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
703
|
+
fill: "none",
|
|
704
|
+
viewBox: "0 0 24 24",
|
|
705
|
+
"stroke-width": "1.5",
|
|
706
|
+
stroke: "red",
|
|
707
|
+
class: "size-6 text-red-600"
|
|
708
|
+
};
|
|
709
|
+
function Ft(e, t) {
|
|
710
|
+
return i(), u("svg", qt, t[0] || (t[0] = [
|
|
711
|
+
a("path", {
|
|
712
|
+
"stroke-linecap": "round",
|
|
713
|
+
"stroke-linejoin": "round",
|
|
714
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
715
|
+
}, null, -1)
|
|
716
|
+
]));
|
|
717
|
+
}
|
|
718
|
+
const Wt = /* @__PURE__ */ z(Kt, [["render", Ft]]), Gt = { class: "rounded-md border border-gray-300 bg-white p-4 shadow-sm" }, Zt = { class: "flex items-start gap-4 opacity-100 scale-5 transition-all duration-300" }, Xt = { class: "flex-1" }, Yt = { class: "font-medium text-gray-900" }, Jt = { class: "mt-0.5 text-sm text-gray-700" }, ce = /* @__PURE__ */ T({
|
|
719
|
+
__name: "vs-notify",
|
|
720
|
+
props: {
|
|
721
|
+
type: {},
|
|
722
|
+
title: {},
|
|
723
|
+
message: {}
|
|
724
|
+
},
|
|
725
|
+
setup(e) {
|
|
726
|
+
const t = {
|
|
727
|
+
success: It,
|
|
728
|
+
warning: Dt,
|
|
729
|
+
error: Wt,
|
|
730
|
+
info: Ut
|
|
731
|
+
};
|
|
732
|
+
return (l, o) => (i(), u("div", Gt, [
|
|
733
|
+
a("div", Zt, [
|
|
734
|
+
(i(), H(te(t[l.type]))),
|
|
735
|
+
a("div", Xt, [
|
|
736
|
+
a("strong", Yt, w(l.title), 1),
|
|
737
|
+
a("p", Jt, w(l.message), 1)
|
|
738
|
+
]),
|
|
739
|
+
o[0] || (o[0] = a("button", {
|
|
740
|
+
class: "m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",
|
|
741
|
+
type: "button",
|
|
742
|
+
"aria-label": "Dismiss notify"
|
|
743
|
+
}, [
|
|
744
|
+
a("span", { class: "sr-only" }, "Dismiss popup"),
|
|
745
|
+
a("svg", {
|
|
746
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
747
|
+
fill: "none",
|
|
748
|
+
viewBox: "0 0 24 24",
|
|
749
|
+
"stroke-width": "1.5",
|
|
750
|
+
stroke: "currentColor",
|
|
751
|
+
class: "size-5"
|
|
752
|
+
}, [
|
|
753
|
+
a("path", {
|
|
754
|
+
"stroke-linecap": "round",
|
|
755
|
+
"stroke-linejoin": "round",
|
|
756
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
757
|
+
})
|
|
758
|
+
])
|
|
759
|
+
], -1))
|
|
760
|
+
])
|
|
761
|
+
]));
|
|
762
|
+
}
|
|
763
|
+
}), F = {
|
|
764
|
+
top: "top-4 left-1/2 transform -translate-x-1/2",
|
|
765
|
+
"left-bottom": "bottom-4 left-4 transform",
|
|
766
|
+
"right-bottom": "bottom-4 right-4 transform",
|
|
767
|
+
bottom: "bottom-4 left-1/2 transform -translate-x-1/2"
|
|
768
|
+
}, pe = (e) => {
|
|
769
|
+
var d;
|
|
770
|
+
const {
|
|
771
|
+
type: t = "info",
|
|
772
|
+
title: l,
|
|
773
|
+
message: o,
|
|
774
|
+
position: n = "right-bottom"
|
|
775
|
+
} = e || {};
|
|
776
|
+
let r = document.querySelector("#notify-root");
|
|
777
|
+
r || (r = document.createElement("div"), r.id = "notify-root", r.className = `fixed z-[2000] flex flex-col gap-3 ${F[n]} p-6 max-w-md mx-auto font-sans antialiased`, document.body.appendChild(r)), r.className.includes(F[n]) || (Object.values(F).forEach((p) => {
|
|
778
|
+
r.classList.remove(...p.split(" "));
|
|
779
|
+
}), r.classList.add(...F[n].split(" ")));
|
|
780
|
+
const s = document.createElement("div");
|
|
781
|
+
r.appendChild(s);
|
|
782
|
+
const f = W({
|
|
783
|
+
render() {
|
|
784
|
+
return j(ce, {
|
|
785
|
+
type: t,
|
|
786
|
+
title: l,
|
|
787
|
+
message: o,
|
|
788
|
+
onClose: () => {
|
|
789
|
+
f.unmount(), s.remove();
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
f.mount(s), (d = s.querySelector("button")) == null || d.addEventListener("click", () => {
|
|
795
|
+
s.classList.add("opacity-0", "scale-95", "transition-all", "duration-300"), setTimeout(() => {
|
|
796
|
+
f.unmount(), s.remove();
|
|
797
|
+
}, 350);
|
|
798
|
+
}), setTimeout(() => {
|
|
799
|
+
s.classList.add("opacity-0", "scale-95", "transition-all", "duration-300"), setTimeout(() => {
|
|
800
|
+
f.unmount(), s.remove();
|
|
801
|
+
}, 350);
|
|
802
|
+
}, 3500);
|
|
803
|
+
}, Qt = T({
|
|
804
|
+
name: "Copy",
|
|
805
|
+
props: {
|
|
806
|
+
text: { type: String, default: "" },
|
|
807
|
+
width: { type: [String, Number], default: null },
|
|
808
|
+
notify: { type: Boolean, default: !0 },
|
|
809
|
+
notifyOptions: {
|
|
810
|
+
type: Object,
|
|
811
|
+
default: () => ({})
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
emits: ["copied", "copy-error"],
|
|
815
|
+
data() {
|
|
816
|
+
return {
|
|
817
|
+
slotText: ""
|
|
818
|
+
};
|
|
819
|
+
},
|
|
820
|
+
computed: {
|
|
821
|
+
rootClasses() {
|
|
822
|
+
return [
|
|
823
|
+
"vs-copy inline-flex items-center gap-2 cursor-pointer select-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500"
|
|
824
|
+
];
|
|
825
|
+
},
|
|
826
|
+
containerStyle() {
|
|
827
|
+
return !this.width && this.width !== 0 ? {} : {
|
|
828
|
+
width: typeof this.width == "number" ? `${this.width}px` : this.width.trim()
|
|
829
|
+
};
|
|
830
|
+
},
|
|
831
|
+
displayText() {
|
|
832
|
+
return this.text || this.slotText;
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
mounted() {
|
|
836
|
+
this.updateSlotText();
|
|
837
|
+
},
|
|
838
|
+
updated() {
|
|
839
|
+
this.updateSlotText();
|
|
840
|
+
},
|
|
841
|
+
methods: {
|
|
842
|
+
updateSlotText() {
|
|
843
|
+
var t, l;
|
|
844
|
+
const e = ((l = (t = this.$refs.text) == null ? void 0 : t.textContent) == null ? void 0 : l.trim()) || "";
|
|
845
|
+
e !== this.slotText && (this.slotText = e);
|
|
846
|
+
},
|
|
847
|
+
async handleCopy() {
|
|
848
|
+
const e = this.displayText;
|
|
849
|
+
if (e)
|
|
850
|
+
try {
|
|
851
|
+
await this.copyToClipboard(e), this.$emit("copied", e), this.showNotify(e);
|
|
852
|
+
} catch (t) {
|
|
853
|
+
this.$emit("copy-error", t);
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
async copyToClipboard(e) {
|
|
857
|
+
var l;
|
|
858
|
+
if ((l = navigator.clipboard) != null && l.writeText) {
|
|
859
|
+
await navigator.clipboard.writeText(e);
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
const t = document.createElement("textarea");
|
|
863
|
+
t.value = e, t.setAttribute("readonly", ""), t.style.position = "absolute", t.style.left = "-9999px", document.body.appendChild(t), t.select();
|
|
864
|
+
try {
|
|
865
|
+
if (!document.execCommand("copy"))
|
|
866
|
+
throw new Error("Copy command was unsuccessful");
|
|
867
|
+
} finally {
|
|
868
|
+
document.body.removeChild(t);
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
showNotify(e) {
|
|
872
|
+
var l, o, n, r;
|
|
873
|
+
if (!this.notify)
|
|
874
|
+
return;
|
|
875
|
+
const t = {
|
|
876
|
+
type: ((l = this.notifyOptions) == null ? void 0 : l.type) ?? "success",
|
|
877
|
+
title: ((o = this.notifyOptions) == null ? void 0 : o.title) ?? "Copied",
|
|
878
|
+
message: ((n = this.notifyOptions) == null ? void 0 : n.message) ?? e,
|
|
879
|
+
position: (r = this.notifyOptions) == null ? void 0 : r.position
|
|
880
|
+
};
|
|
881
|
+
pe(t);
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}), eo = ["title"];
|
|
885
|
+
function to(e, t, l, o, n, r) {
|
|
886
|
+
return i(), u("span", {
|
|
887
|
+
ref: "root",
|
|
888
|
+
class: V(e.rootClasses),
|
|
889
|
+
role: "button",
|
|
890
|
+
tabindex: "0",
|
|
891
|
+
style: X(e.containerStyle),
|
|
892
|
+
onClick: t[0] || (t[0] = (...s) => e.handleCopy && e.handleCopy(...s)),
|
|
893
|
+
onKeydown: [
|
|
894
|
+
t[1] || (t[1] = J(R((...s) => e.handleCopy && e.handleCopy(...s), ["prevent"]), ["enter"])),
|
|
895
|
+
t[2] || (t[2] = J(R((...s) => e.handleCopy && e.handleCopy(...s), ["prevent"]), ["space"]))
|
|
896
|
+
]
|
|
897
|
+
}, [
|
|
898
|
+
a("span", {
|
|
899
|
+
ref: "text",
|
|
900
|
+
class: "vs-copy__text truncate min-w-0 flex-1",
|
|
901
|
+
title: e.displayText
|
|
902
|
+
}, [
|
|
903
|
+
I(e.$slots, "default")
|
|
904
|
+
], 8, eo),
|
|
905
|
+
t[3] || (t[3] = a("span", {
|
|
906
|
+
class: "vs-copy__icon flex-none inline-flex text-current",
|
|
907
|
+
"aria-hidden": "true"
|
|
908
|
+
}, [
|
|
909
|
+
a("svg", {
|
|
910
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
911
|
+
width: "16",
|
|
912
|
+
height: "16",
|
|
913
|
+
viewBox: "0 0 24 24",
|
|
914
|
+
fill: "none",
|
|
915
|
+
stroke: "currentColor",
|
|
916
|
+
"stroke-width": "2",
|
|
917
|
+
"stroke-linecap": "round",
|
|
918
|
+
"stroke-linejoin": "round"
|
|
919
|
+
}, [
|
|
920
|
+
a("rect", {
|
|
921
|
+
x: "9",
|
|
922
|
+
y: "9",
|
|
923
|
+
width: "13",
|
|
924
|
+
height: "13",
|
|
925
|
+
rx: "2",
|
|
926
|
+
ry: "2"
|
|
927
|
+
}),
|
|
928
|
+
a("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
929
|
+
])
|
|
930
|
+
], -1))
|
|
931
|
+
], 38);
|
|
932
|
+
}
|
|
933
|
+
const ae = /* @__PURE__ */ z(Qt, [["render", to]]), oo = T({
|
|
934
|
+
props: {
|
|
935
|
+
modelValue: { type: Boolean, default: () => !1 },
|
|
936
|
+
title: { type: String, default: () => "" },
|
|
937
|
+
disabled: { type: Boolean, default: () => !1 }
|
|
938
|
+
},
|
|
939
|
+
data() {
|
|
940
|
+
return {};
|
|
941
|
+
},
|
|
942
|
+
mounted() {
|
|
943
|
+
this.modelValue || this.$emit("update:modelValue", !1);
|
|
944
|
+
},
|
|
945
|
+
computed: {
|
|
946
|
+
modelState: {
|
|
947
|
+
get() {
|
|
948
|
+
return this.modelValue;
|
|
949
|
+
},
|
|
950
|
+
set(e) {
|
|
951
|
+
this.$emit("update:modelValue", e);
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
labelCursorClasses() {
|
|
955
|
+
return [
|
|
956
|
+
{ "cursor-not-allowed": this.disabled },
|
|
957
|
+
{ "cursor-pointer": !this.disabled }
|
|
958
|
+
];
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
methods: {
|
|
962
|
+
handleEnterDown(e) {
|
|
963
|
+
const { keyCode: t } = e;
|
|
964
|
+
t === 13 && (this.modelState = !this.modelState);
|
|
965
|
+
},
|
|
966
|
+
addKeyHandler() {
|
|
967
|
+
window.addEventListener("keydown", this.handleEnterDown);
|
|
968
|
+
},
|
|
969
|
+
removeKeyHandler() {
|
|
970
|
+
window.removeEventListener("keydown", this.handleEnterDown);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
}), lo = ["disabled"], no = { class: "ml-2 text-sm" };
|
|
974
|
+
function ao(e, t, l, o, n, r) {
|
|
975
|
+
return i(), u("label", {
|
|
976
|
+
class: V(["relative inline-flex items-center cursor-pointer min-h-[40px] relative", e.labelCursorClasses])
|
|
977
|
+
}, [
|
|
978
|
+
Z(a("input", {
|
|
979
|
+
"onUpdate:modelValue": t[0] || (t[0] = (s) => e.modelState = s),
|
|
980
|
+
type: "checkbox",
|
|
981
|
+
value: "",
|
|
982
|
+
class: "sr-only peer",
|
|
983
|
+
disabled: e.disabled,
|
|
984
|
+
tabindex: "-1"
|
|
985
|
+
}, null, 8, lo), [
|
|
986
|
+
[ke, e.modelState]
|
|
987
|
+
]),
|
|
988
|
+
a("div", {
|
|
989
|
+
class: "w-11 h-6 t-[12px] bg-gray-200 transition-all rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[10px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600 outline-none focus:border dark:bg-transparent dark:border-gray-600 focus:border-blue-500",
|
|
990
|
+
tabindex: "0",
|
|
991
|
+
onFocus: t[1] || (t[1] = (...s) => e.addKeyHandler && e.addKeyHandler(...s)),
|
|
992
|
+
onBlur: t[2] || (t[2] = (...s) => e.removeKeyHandler && e.removeKeyHandler(...s))
|
|
993
|
+
}, null, 32),
|
|
994
|
+
a("span", no, [
|
|
995
|
+
I(e.$slots, "default", {}, () => [
|
|
996
|
+
Q(w(e.title), 1)
|
|
997
|
+
])
|
|
998
|
+
])
|
|
999
|
+
], 2);
|
|
1000
|
+
}
|
|
1001
|
+
const ro = /* @__PURE__ */ z(oo, [["render", ao]]), A = async (e, t, l, o = 10) => {
|
|
1002
|
+
var h, C, y, E;
|
|
1003
|
+
if (!t || !l) return;
|
|
1004
|
+
await we();
|
|
1005
|
+
const n = await (l == null ? void 0 : l.getBoundingClientRect()), r = await (t == null ? void 0 : t.getBoundingClientRect());
|
|
1006
|
+
if (!r || !n) return;
|
|
1007
|
+
const s = await parseInt((h = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : h.height), f = await parseInt((C = t == null ? void 0 : t.getBoundingClientRect()) == null ? void 0 : C.width), d = await parseInt((y = l == null ? void 0 : l.getBoundingClientRect()) == null ? void 0 : y.height), p = await parseInt((E = l == null ? void 0 : l.getBoundingClientRect()) == null ? void 0 : E.width), c = await window.innerHeight, v = await window.innerWidth;
|
|
1008
|
+
let m = 0, g = 0;
|
|
1009
|
+
const x = r.bottom + o + d;
|
|
1010
|
+
switch (e) {
|
|
1011
|
+
case "top":
|
|
1012
|
+
r.top - n.height - o < 0 ? m = r.top - n.height + o + d + s : m = r.top - n.height - o, v > p + r.right + 30 ? g = r.left - n.width / 2 + r.width / 2 : g = v - 30 - p;
|
|
1013
|
+
break;
|
|
1014
|
+
case "bottom":
|
|
1015
|
+
c > x ? m = r.bottom + o : m = r.bottom - o - d - s, g = r.left - n.width / 2 + r.width / 2;
|
|
1016
|
+
break;
|
|
1017
|
+
case "left":
|
|
1018
|
+
m = r.top - n.height / 2 + r.height / 2, r.left - n.width - o > 0 ? g = r.left - n.width - o : g = 10;
|
|
1019
|
+
break;
|
|
1020
|
+
case "right":
|
|
1021
|
+
m = r.top - n.height / 2 + r.height / 2, v - f > p ? g = r.right + o : g = v - 30 - p;
|
|
1022
|
+
break;
|
|
1023
|
+
case "top-right":
|
|
1024
|
+
r.top - n.height - o < 0 ? m = r.top - n.height + o + d + s : m = r.top - n.height - o, v - f > p ? g = r.right + o : g = v - 30 - p;
|
|
1025
|
+
break;
|
|
1026
|
+
case "top-left":
|
|
1027
|
+
r.top - n.height - o < 0 ? m = r.top - n.height + o + d + s : m = r.top - n.height - o, r.left - n.width - o > 0 ? g = r.left - n.width - o : g = 10;
|
|
1028
|
+
break;
|
|
1029
|
+
case "top-start":
|
|
1030
|
+
r.top - n.height - o < 0 ? m = r.top - n.height + o + d + s : m = r.top - n.height - o, r.left > 0 ? g = r.left : g = 10;
|
|
1031
|
+
break;
|
|
1032
|
+
case "bottom-right":
|
|
1033
|
+
c > x ? m = r.bottom + o : m = r.bottom - o - d - s, v - f > p ? g = r.left : g = v - 30 - p;
|
|
1034
|
+
break;
|
|
1035
|
+
case "bottom-left":
|
|
1036
|
+
c > x ? m = r.bottom + o : m = r.bottom - o - d - s, r.left > 0 ? g = r.right - p : g = 10;
|
|
1037
|
+
break;
|
|
1038
|
+
case "bottom-start":
|
|
1039
|
+
c > x ? m = r.bottom + o : m = r.bottom - o - d - s, r.left > 0 ? g = r.left : g = 10;
|
|
1040
|
+
break;
|
|
1041
|
+
}
|
|
1042
|
+
m + d > c ? m = c - d - o : m < 0 && (m = o), g + p > v ? g = v - p - o : g < 0 && (g = o), l instanceof HTMLElement && (l.style.top = `${m}px`, l.style.left = `${g}px`, l.style.position = "fixed");
|
|
1043
|
+
}, so = { class: "text-center" }, io = { class: "py-2 px-4 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, uo = /* @__PURE__ */ T({
|
|
1044
|
+
__name: "vs-popover",
|
|
1045
|
+
props: {
|
|
1046
|
+
isOpen: { type: Boolean, default: !1 },
|
|
1047
|
+
placement: { default: "top" },
|
|
1048
|
+
gap: { default: 8 },
|
|
1049
|
+
width: { default: "" },
|
|
1050
|
+
disabled: { type: Boolean, default: !1 },
|
|
1051
|
+
trigger: { default: "click" },
|
|
1052
|
+
teleport: { default: "body" }
|
|
1053
|
+
},
|
|
1054
|
+
emits: ["isvisible"],
|
|
1055
|
+
setup(e, { expose: t, emit: l }) {
|
|
1056
|
+
const o = e, n = l, r = _(!1), s = _([]), f = _(null), d = _(null), p = _(null), c = (b) => {
|
|
1057
|
+
var $, k;
|
|
1058
|
+
if (!b) {
|
|
1059
|
+
r.value = !1;
|
|
1060
|
+
return;
|
|
1061
|
+
}
|
|
1062
|
+
($ = d.value) != null && $.contains(b.target) || (k = p.value) != null && k.contains(b.target) || (r.value = !1);
|
|
1063
|
+
}, v = (b) => {
|
|
1064
|
+
r.value && p.value && !p.value.contains(b.target) && (r.value = !1);
|
|
1065
|
+
}, m = () => {
|
|
1066
|
+
r.value = !1;
|
|
1067
|
+
}, g = () => {
|
|
1068
|
+
r.value && (r.value = !1);
|
|
1069
|
+
}, x = () => {
|
|
1070
|
+
let b = f.value;
|
|
1071
|
+
for (; b && b !== document.body; )
|
|
1072
|
+
(b.scrollHeight > b.clientHeight || b.scrollWidth > b.clientWidth) && (b.addEventListener("scroll", m), s.value.push(b)), b = b.parentElement;
|
|
1073
|
+
document.body && (document.body.addEventListener("scroll", m), s.value.push(document.body));
|
|
1074
|
+
}, h = () => {
|
|
1075
|
+
s.value.forEach((b) => {
|
|
1076
|
+
b.removeEventListener("scroll", m);
|
|
1077
|
+
}), s.value = [];
|
|
1078
|
+
};
|
|
1079
|
+
O(r, (b) => {
|
|
1080
|
+
b ? (x(), window.addEventListener("resize", () => A(o.placement, d.value, p.value)), A(o.placement, d.value, p.value)) : window.removeEventListener("resize", () => A(o.placement, d.value, p.value)), n("isvisible", b);
|
|
1081
|
+
}), N(() => {
|
|
1082
|
+
window.addEventListener("click", c), window.addEventListener("popstate", g), window.addEventListener("scroll", v, !0), x();
|
|
1083
|
+
}), G(() => {
|
|
1084
|
+
window.removeEventListener("click", c), window.removeEventListener("popstate", g), h();
|
|
1085
|
+
});
|
|
1086
|
+
const C = () => {
|
|
1087
|
+
r.value = !0, A(o.placement, d.value, p.value);
|
|
1088
|
+
}, y = () => {
|
|
1089
|
+
r.value = !1;
|
|
1090
|
+
}, E = async () => {
|
|
1091
|
+
await A(o.placement, d.value, p.value), r.value = !r.value;
|
|
1092
|
+
};
|
|
1093
|
+
return t({
|
|
1094
|
+
togglePopover: E
|
|
1095
|
+
}), (b, $) => (i(), u("div", {
|
|
1096
|
+
ref_key: "popover",
|
|
1097
|
+
ref: f,
|
|
1098
|
+
class: "vs-popover inline-block"
|
|
1099
|
+
}, [
|
|
1100
|
+
a("div", so, [
|
|
1101
|
+
b.trigger === "click" ? (i(), u("div", {
|
|
1102
|
+
key: 0,
|
|
1103
|
+
ref_key: "popoverRef",
|
|
1104
|
+
ref: d,
|
|
1105
|
+
onClick: E,
|
|
1106
|
+
class: V({ "pointer-events-none": b.disabled })
|
|
1107
|
+
}, [
|
|
1108
|
+
I(b.$slots, "reference", {}, () => [
|
|
1109
|
+
$[0] || ($[0] = a("button", null, "Click me!", -1))
|
|
1110
|
+
])
|
|
1111
|
+
], 2)) : B("", !0),
|
|
1112
|
+
b.trigger === "hover" ? (i(), u("div", {
|
|
1113
|
+
key: 1,
|
|
1114
|
+
ref_key: "popoverRef",
|
|
1115
|
+
ref: d,
|
|
1116
|
+
onMouseover: C,
|
|
1117
|
+
onMouseleave: y,
|
|
1118
|
+
class: V({ "pointer-events-none": b.disabled })
|
|
1119
|
+
}, [
|
|
1120
|
+
I(b.$slots, "reference", {}, () => [
|
|
1121
|
+
$[1] || ($[1] = a("button", null, "Click me!", -1))
|
|
1122
|
+
])
|
|
1123
|
+
], 34)) : B("", !0),
|
|
1124
|
+
(i(), H(P, { to: b.teleport }, [
|
|
1125
|
+
S(K, { name: "fade" }, {
|
|
1126
|
+
default: q(() => [
|
|
1127
|
+
Z(a("div", {
|
|
1128
|
+
class: V(["vsTailwind vs-popover__content", b.placement]),
|
|
1129
|
+
ref_key: "contentPop",
|
|
1130
|
+
ref: p,
|
|
1131
|
+
style: X({
|
|
1132
|
+
width: b.width ? b.width + "px" : "fit-content",
|
|
1133
|
+
zIndex: 10002
|
|
1134
|
+
})
|
|
1135
|
+
}, [
|
|
1136
|
+
a("div", io, [
|
|
1137
|
+
I(b.$slots, "default", {}, () => [
|
|
1138
|
+
$[2] || ($[2] = a("span", null, "Popover content", -1))
|
|
1139
|
+
])
|
|
1140
|
+
])
|
|
1141
|
+
], 6), [
|
|
1142
|
+
[ie, r.value]
|
|
1143
|
+
])
|
|
1144
|
+
]),
|
|
1145
|
+
_: 3
|
|
1146
|
+
})
|
|
1147
|
+
], 8, ["to"]))
|
|
1148
|
+
])
|
|
1149
|
+
], 512));
|
|
1150
|
+
}
|
|
1151
|
+
}), co = {
|
|
1152
|
+
key: 0,
|
|
1153
|
+
class: "vsTailwind ui-dialog__wrapper text-gray-800"
|
|
1154
|
+
}, po = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, fo = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, vo = { class: "ui-dialog__content p-4" }, mo = {
|
|
1155
|
+
key: 0,
|
|
1156
|
+
class: "flex justify-end gap-x-2"
|
|
1157
|
+
}, go = {
|
|
1158
|
+
key: 1,
|
|
1159
|
+
class: "flex justify-end items-center gap-x-2 py-3 px-4 border-t border-gray-200 dark:border-neutral-700"
|
|
1160
|
+
}, ho = /* @__PURE__ */ T({
|
|
1161
|
+
__name: "vs-modal",
|
|
1162
|
+
props: {
|
|
1163
|
+
title: { default: "" },
|
|
1164
|
+
template: {},
|
|
1165
|
+
visible: { type: Boolean, default: !1 },
|
|
1166
|
+
size: { default: "small" },
|
|
1167
|
+
closeClickBack: { type: Boolean, default: !1 },
|
|
1168
|
+
content: {},
|
|
1169
|
+
buttonText: {},
|
|
1170
|
+
contentProps: {},
|
|
1171
|
+
teleport: { default: "body" }
|
|
1172
|
+
},
|
|
1173
|
+
emits: ["update:visible", "close", "done"],
|
|
1174
|
+
setup(e, { emit: t }) {
|
|
1175
|
+
const l = e, o = t, n = L(() => l.size === "small" ? "md:w-5/12 w-9/12" : l.size === "medium" ? "md:w-6/12 w-9/12" : "lg:w-7/12 w-11/12"), r = _e();
|
|
1176
|
+
function s() {
|
|
1177
|
+
o("done");
|
|
1178
|
+
}
|
|
1179
|
+
function f() {
|
|
1180
|
+
o("update:visible", !1), o("close");
|
|
1181
|
+
}
|
|
1182
|
+
function d(c) {
|
|
1183
|
+
c.key === "Escape" && f();
|
|
1184
|
+
}
|
|
1185
|
+
function p(c, v) {
|
|
1186
|
+
v && c.target.classList.contains("vs-dialog-overlay") && f();
|
|
1187
|
+
}
|
|
1188
|
+
return N(() => {
|
|
1189
|
+
window.addEventListener("keydown", d);
|
|
1190
|
+
}), de(() => {
|
|
1191
|
+
window.removeEventListener("keydown", d);
|
|
1192
|
+
}), (c, v) => (i(), H(P, { to: c.teleport }, [
|
|
1193
|
+
c.visible ? (i(), u("div", co, [
|
|
1194
|
+
a("div", {
|
|
1195
|
+
onMousedown: v[0] || (v[0] = (m) => p(m, c.closeClickBack)),
|
|
1196
|
+
class: V(["vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 bg-black bg-opacity-50", [Be(r).class]])
|
|
1197
|
+
}, [
|
|
1198
|
+
S(K, {
|
|
1199
|
+
name: "content",
|
|
1200
|
+
appear: ""
|
|
1201
|
+
}, {
|
|
1202
|
+
default: q(() => [
|
|
1203
|
+
a("div", {
|
|
1204
|
+
class: V(["ui-dialog__modal opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl", n.value])
|
|
1205
|
+
}, [
|
|
1206
|
+
a("div", po, [
|
|
1207
|
+
a("h3", fo, w(c.title), 1),
|
|
1208
|
+
a("button", {
|
|
1209
|
+
type: "button",
|
|
1210
|
+
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",
|
|
1211
|
+
onClick: f
|
|
1212
|
+
}, v[1] || (v[1] = [
|
|
1213
|
+
a("span", { class: "sr-only" }, "Close", -1),
|
|
1214
|
+
a("svg", {
|
|
1215
|
+
class: "flex-shrink-0 w-4 h-4",
|
|
1216
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1217
|
+
width: "24",
|
|
1218
|
+
height: "24",
|
|
1219
|
+
viewBox: "0 0 24 24",
|
|
1220
|
+
fill: "none",
|
|
1221
|
+
stroke: "currentColor",
|
|
1222
|
+
"stroke-width": "2",
|
|
1223
|
+
"stroke-linecap": "round",
|
|
1224
|
+
"stroke-linejoin": "round"
|
|
1225
|
+
}, [
|
|
1226
|
+
a("path", { d: "M18 6 6 18" }),
|
|
1227
|
+
a("path", { d: "m6 6 12 12" })
|
|
1228
|
+
], -1)
|
|
1229
|
+
]))
|
|
1230
|
+
]),
|
|
1231
|
+
a("div", vo, [
|
|
1232
|
+
I(c.$slots, "default", {}, void 0, !0)
|
|
1233
|
+
]),
|
|
1234
|
+
c.$slots.footer ? (i(), u("div", mo, [
|
|
1235
|
+
I(c.$slots, "footer", { handleClose: f }, void 0, !0)
|
|
1236
|
+
])) : B("", !0),
|
|
1237
|
+
c.buttonText ? (i(), u("div", go, [
|
|
1238
|
+
a("button", {
|
|
1239
|
+
type: "button",
|
|
1240
|
+
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-2xs hover:bg-gray-50 focus:outline-hidden focus:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
1241
|
+
onClick: f
|
|
1242
|
+
}, " Close "),
|
|
1243
|
+
a("button", {
|
|
1244
|
+
type: "button",
|
|
1245
|
+
onClick: s,
|
|
1246
|
+
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-hidden focus:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none"
|
|
1247
|
+
}, w(c.buttonText), 1)
|
|
1248
|
+
])) : B("", !0)
|
|
1249
|
+
], 2)
|
|
1250
|
+
]),
|
|
1251
|
+
_: 3
|
|
1252
|
+
})
|
|
1253
|
+
], 34)
|
|
1254
|
+
])) : B("", !0)
|
|
1255
|
+
], 8, ["to"]));
|
|
1256
|
+
}
|
|
1257
|
+
}), ee = /* @__PURE__ */ z(ho, [["__scopeId", "data-v-670eae4f"]]), bo = {
|
|
1258
|
+
key: 0,
|
|
1259
|
+
class: "vsTailwind ui-drawer__wrapper"
|
|
1260
|
+
}, xo = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, yo = { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, wo = { class: "flex gap-2" }, ko = { class: "sr-only" }, Co = {
|
|
1261
|
+
key: 0,
|
|
1262
|
+
class: "flex-shrink-0 w-4 h-4",
|
|
1263
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1264
|
+
width: "24",
|
|
1265
|
+
height: "24",
|
|
1266
|
+
viewBox: "0 0 24 24",
|
|
1267
|
+
fill: "none",
|
|
1268
|
+
stroke: "currentColor",
|
|
1269
|
+
"stroke-width": "2",
|
|
1270
|
+
"stroke-linecap": "round",
|
|
1271
|
+
"stroke-linejoin": "round"
|
|
1272
|
+
}, _o = {
|
|
1273
|
+
key: 1,
|
|
1274
|
+
class: "flex-shrink-0 w-4 h-4",
|
|
1275
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1276
|
+
width: "24",
|
|
1277
|
+
height: "24",
|
|
1278
|
+
viewBox: "0 0 24 24",
|
|
1279
|
+
fill: "none",
|
|
1280
|
+
stroke: "currentColor",
|
|
1281
|
+
"stroke-width": "2",
|
|
1282
|
+
"stroke-linecap": "round",
|
|
1283
|
+
"stroke-linejoin": "round"
|
|
1284
|
+
}, Bo = { class: "ui-drawer__content p-4 flex-1 overflow-auto" }, Vo = {
|
|
1285
|
+
key: 0,
|
|
1286
|
+
class: "flex justify-end gap-x-2 p-4 border-0 border-t border-solid border-gray-200 dark:border-t-[#454545]"
|
|
1287
|
+
}, zo = /* @__PURE__ */ T({
|
|
1288
|
+
__name: "vs-drawer",
|
|
1289
|
+
props: {
|
|
1290
|
+
title: { default: "" },
|
|
1291
|
+
visible: { type: Boolean, default: !1 },
|
|
1292
|
+
position: { default: "right" },
|
|
1293
|
+
size: { default: "500px" },
|
|
1294
|
+
closeClickBack: { type: Boolean, default: !1 }
|
|
1295
|
+
},
|
|
1296
|
+
emits: ["update:visible", "close"],
|
|
1297
|
+
setup(e, { emit: t }) {
|
|
1298
|
+
const l = e, o = t, n = _(!1), r = L(() => n.value ? "fixed top-0 left-0 w-full h-full" : l.position === "left" ? "fixed top-0 left-0 h-full" : l.position === "right" ? "fixed top-0 right-0 h-full" : l.position === "top" ? "fixed top-0 left-0 w-full" : "fixed bottom-0 left-0 w-full");
|
|
1299
|
+
function s() {
|
|
1300
|
+
o("update:visible", !1), o("close");
|
|
1301
|
+
}
|
|
1302
|
+
function f() {
|
|
1303
|
+
n.value = !n.value;
|
|
1304
|
+
}
|
|
1305
|
+
function d(c) {
|
|
1306
|
+
c.key === "Escape" && s();
|
|
1307
|
+
}
|
|
1308
|
+
function p(c, v) {
|
|
1309
|
+
v && c.target.classList.contains("vs-drawer-overlay") && s();
|
|
1310
|
+
}
|
|
1311
|
+
return N(() => {
|
|
1312
|
+
window.addEventListener("keydown", d);
|
|
1313
|
+
}), de(() => {
|
|
1314
|
+
window.removeEventListener("keydown", d);
|
|
1315
|
+
}), (c, v) => (i(), H(P, { to: "#modal" }, [
|
|
1316
|
+
c.visible ? (i(), u("div", bo, [
|
|
1317
|
+
a("div", {
|
|
1318
|
+
onMousedown: v[0] || (v[0] = (m) => p(m, c.closeClickBack)),
|
|
1319
|
+
class: "vs-drawer-overlay vs-drawer w-full h-full fixed top-0 start-0 bg-black bg-opacity-50"
|
|
1320
|
+
}, [
|
|
1321
|
+
S(K, {
|
|
1322
|
+
name: "drawer",
|
|
1323
|
+
appear: ""
|
|
1324
|
+
}, {
|
|
1325
|
+
default: q(() => [
|
|
1326
|
+
a("div", {
|
|
1327
|
+
class: V(["ui-drawer__drawer opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)]", [r.value, n.value ? "w-full" : `w-[${l.size}]`, `drawer-${l.position}`]])
|
|
1328
|
+
}, [
|
|
1329
|
+
a("div", xo, [
|
|
1330
|
+
a("h3", yo, w(c.title), 1),
|
|
1331
|
+
a("div", wo, [
|
|
1332
|
+
a("button", {
|
|
1333
|
+
type: "button",
|
|
1334
|
+
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",
|
|
1335
|
+
onClick: f
|
|
1336
|
+
}, [
|
|
1337
|
+
a("span", ko, w(n.value ? "Exit fullscreen" : "Enter fullscreen"), 1),
|
|
1338
|
+
n.value ? (i(), u("svg", _o, v[2] || (v[2] = [
|
|
1339
|
+
a("path", { d: "M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" }, null, -1)
|
|
1340
|
+
]))) : (i(), u("svg", Co, v[1] || (v[1] = [
|
|
1341
|
+
a("path", { d: "M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" }, null, -1)
|
|
1342
|
+
])))
|
|
1343
|
+
]),
|
|
1344
|
+
a("button", {
|
|
1345
|
+
type: "button",
|
|
1346
|
+
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",
|
|
1347
|
+
onClick: s
|
|
1348
|
+
}, v[3] || (v[3] = [
|
|
1349
|
+
a("span", { class: "sr-only" }, "Close", -1),
|
|
1350
|
+
a("svg", {
|
|
1351
|
+
class: "flex-shrink-0 w-4 h-4",
|
|
1352
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1353
|
+
width: "24",
|
|
1354
|
+
height: "24",
|
|
1355
|
+
viewBox: "0 0 24 24",
|
|
1356
|
+
fill: "none",
|
|
1357
|
+
stroke: "currentColor",
|
|
1358
|
+
"stroke-width": "2",
|
|
1359
|
+
"stroke-linecap": "round",
|
|
1360
|
+
"stroke-linejoin": "round"
|
|
1361
|
+
}, [
|
|
1362
|
+
a("path", { d: "M18 6 6 18" }),
|
|
1363
|
+
a("path", { d: "m6 6 12 12" })
|
|
1364
|
+
], -1)
|
|
1365
|
+
]))
|
|
1366
|
+
])
|
|
1367
|
+
]),
|
|
1368
|
+
a("div", Bo, [
|
|
1369
|
+
I(c.$slots, "default", {}, void 0, !0)
|
|
1370
|
+
]),
|
|
1371
|
+
c.$slots.footer ? (i(), u("div", Vo, [
|
|
1372
|
+
I(c.$slots, "footer", { handleClose: s }, void 0, !0)
|
|
1373
|
+
])) : B("", !0)
|
|
1374
|
+
], 2)
|
|
1375
|
+
]),
|
|
1376
|
+
_: 3
|
|
1377
|
+
})
|
|
1378
|
+
], 32)
|
|
1379
|
+
])) : B("", !0)
|
|
1380
|
+
]));
|
|
1381
|
+
}
|
|
1382
|
+
}), Mo = /* @__PURE__ */ z(zo, [["__scopeId", "data-v-7a0e7f2b"]]), So = {
|
|
1383
|
+
key: 0,
|
|
1384
|
+
class: "vsTailwind ui-dialog__wrapper"
|
|
1385
|
+
}, jo = { class: "vs-dialog-overlay vs-dialog w-full h-full fixed top-0 start-0 z-[2000] bg-black bg-opacity-50" }, To = { class: "ui-dialog__modal opacity-1 w-[448px] transition-all flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl" }, Lo = { class: "py-2.5 px-4 flex justify-between items-center border-gray-200 dark:border-b-[#454545]" }, Eo = { class: "text-lg font-medium text-gray-800 dark:text-neutral-200" }, $o = { class: "ui-dialog__content p-4 py-0" }, Io = { class: "mt-1 text-sm text-gray-600 dark:text-neutral-400" }, Ho = {
|
|
1386
|
+
key: 0,
|
|
1387
|
+
class: "p-[16px] flex justify-end gap-x-3"
|
|
1388
|
+
}, Oo = {
|
|
1389
|
+
key: 1,
|
|
1390
|
+
class: "flex p-[16px] justify-end gap-x-3"
|
|
1391
|
+
}, No = /* @__PURE__ */ T({
|
|
1392
|
+
__name: "vs-confirm-modal",
|
|
1393
|
+
props: {
|
|
1394
|
+
title: { default: "Ви впевнені?" },
|
|
1395
|
+
message: { default: "Ви дійсно хочете?" },
|
|
1396
|
+
confirmButtonText: { default: "Так" },
|
|
1397
|
+
cancelButtonText: { default: "НІ" },
|
|
1398
|
+
confirmButtonStyle: { default: " bg-red-500 hover:bg-red-700" },
|
|
1399
|
+
cancelButtonStyle: { default: " border border-gray-200 bg-white hover:bg-gray-100" },
|
|
1400
|
+
cascade: { type: Boolean, default: !1 },
|
|
1401
|
+
modelValue: { type: Boolean }
|
|
1402
|
+
},
|
|
1403
|
+
emits: ["confirm", "cancel", "update:modelValue"],
|
|
1404
|
+
setup(e) {
|
|
1405
|
+
const t = e, l = _(t.modelValue);
|
|
1406
|
+
return O(() => t.modelValue, (o) => {
|
|
1407
|
+
l.value = o;
|
|
1408
|
+
}), (o, n) => (i(), H(P, { to: "body" }, [
|
|
1409
|
+
l.value ? (i(), u("div", So, [
|
|
1410
|
+
a("div", jo, [
|
|
1411
|
+
a("div", To, [
|
|
1412
|
+
a("div", Lo, [
|
|
1413
|
+
a("h3", Eo, w(o.title), 1),
|
|
1414
|
+
a("button", {
|
|
1415
|
+
type: "button",
|
|
1416
|
+
class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",
|
|
1417
|
+
onClick: n[0] || (n[0] = (r) => o.$emit("cancel"))
|
|
1418
|
+
}, n[5] || (n[5] = [
|
|
1419
|
+
a("span", { class: "sr-only" }, "Close", -1),
|
|
1420
|
+
a("svg", {
|
|
1421
|
+
class: "flex-shrink-0 w-4 h-4",
|
|
1422
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1423
|
+
width: "24",
|
|
1424
|
+
height: "24",
|
|
1425
|
+
viewBox: "0 0 24 24",
|
|
1426
|
+
fill: "none",
|
|
1427
|
+
stroke: "currentColor",
|
|
1428
|
+
"stroke-width": "2",
|
|
1429
|
+
"stroke-linecap": "round",
|
|
1430
|
+
"stroke-linejoin": "round"
|
|
1431
|
+
}, [
|
|
1432
|
+
a("path", { d: "M18 6 6 18" }),
|
|
1433
|
+
a("path", { d: "m6 6 12 12" })
|
|
1434
|
+
], -1)
|
|
1435
|
+
]))
|
|
1436
|
+
]),
|
|
1437
|
+
a("div", $o, [
|
|
1438
|
+
a("p", Io, w(o.message), 1)
|
|
1439
|
+
]),
|
|
1440
|
+
o.cascade ? (i(), u("div", Ho, [
|
|
1441
|
+
a("button", {
|
|
1442
|
+
type: "button",
|
|
1443
|
+
class: V([[o.cancelButtonStyle], "py-2 px-3 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg duration-300 disabled:opacity-50 disabled:pointer-events-none"]),
|
|
1444
|
+
onClick: n[1] || (n[1] = (r) => o.$emit("cancel"))
|
|
1445
|
+
}, w(o.cancelButtonText), 3),
|
|
1446
|
+
a("button", {
|
|
1447
|
+
type: "button",
|
|
1448
|
+
onClick: n[2] || (n[2] = (r) => o.$emit("confirm")),
|
|
1449
|
+
class: V([[o.confirmButtonStyle], "py-2 px-3 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg duration-300 text-white shadow-sm disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50"])
|
|
1450
|
+
}, w(o.confirmButtonText), 3)
|
|
1451
|
+
])) : (i(), u("div", Oo, [
|
|
1452
|
+
a("button", {
|
|
1453
|
+
type: "button",
|
|
1454
|
+
onClick: n[3] || (n[3] = (r) => {
|
|
1455
|
+
l.value = !1, o.$emit("update:modelValue", !1), o.$emit("confirm");
|
|
1456
|
+
}),
|
|
1457
|
+
class: V([[o.confirmButtonStyle], "py-2 px-3 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg duration-300 text-white shadow-sm disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50"])
|
|
1458
|
+
}, w(o.confirmButtonText), 3),
|
|
1459
|
+
a("button", {
|
|
1460
|
+
type: "button",
|
|
1461
|
+
class: V([[o.cancelButtonStyle], "py-2 px-3 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg duration-300 disabled:opacity-50 disabled:pointer-events-none"]),
|
|
1462
|
+
onClick: n[4] || (n[4] = (r) => {
|
|
1463
|
+
l.value = !1, o.$emit("update:modelValue", !1), o.$emit("cancel");
|
|
1464
|
+
})
|
|
1465
|
+
}, w(o.cancelButtonText), 3)
|
|
1466
|
+
]))
|
|
1467
|
+
])
|
|
1468
|
+
])
|
|
1469
|
+
])) : B("", !0)
|
|
1470
|
+
]));
|
|
1471
|
+
}
|
|
1472
|
+
}), Do = /* @__PURE__ */ z(No, [["__scopeId", "data-v-fa9b5c2d"]]), Po = {
|
|
1473
|
+
key: 0,
|
|
1474
|
+
class: "loading-overlay"
|
|
1475
|
+
}, Ao = /* @__PURE__ */ T({
|
|
1476
|
+
__name: "vs-loading",
|
|
1477
|
+
props: {
|
|
1478
|
+
visible: { type: Boolean }
|
|
1479
|
+
},
|
|
1480
|
+
setup(e) {
|
|
1481
|
+
const t = e, l = _(t.visible);
|
|
1482
|
+
return O(() => t.visible, (o) => {
|
|
1483
|
+
l.value = o;
|
|
1484
|
+
}), (o, n) => (i(), H(P, { to: "body" }, [
|
|
1485
|
+
S(K, { name: "fade" }, {
|
|
1486
|
+
default: q(() => [
|
|
1487
|
+
l.value ? (i(), u("div", Po, n[0] || (n[0] = [
|
|
1488
|
+
a("div", { class: "loading-spinner" }, null, -1)
|
|
1489
|
+
]))) : B("", !0)
|
|
1490
|
+
]),
|
|
1491
|
+
_: 1
|
|
1492
|
+
})
|
|
1493
|
+
]));
|
|
1494
|
+
}
|
|
1495
|
+
}), fe = /* @__PURE__ */ z(Ao, [["__scopeId", "data-v-2afca876"]]), Ro = {}, Uo = {
|
|
1496
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1497
|
+
class: "size-4",
|
|
1498
|
+
viewBox: "0 0 20 20",
|
|
1499
|
+
fill: "currentColor"
|
|
1500
|
+
};
|
|
1501
|
+
function Ko(e, t) {
|
|
1502
|
+
return i(), u("svg", Uo, t[0] || (t[0] = [
|
|
1503
|
+
a("path", {
|
|
1504
|
+
"fill-rule": "evenodd",
|
|
1505
|
+
d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",
|
|
1506
|
+
"clip-rule": "evenodd"
|
|
1507
|
+
}, null, -1)
|
|
1508
|
+
]));
|
|
1509
|
+
}
|
|
1510
|
+
const ve = /* @__PURE__ */ z(Ro, [["render", Ko]]), qo = {}, Fo = {
|
|
1511
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1512
|
+
class: "size-4",
|
|
1513
|
+
viewBox: "0 0 20 20",
|
|
1514
|
+
fill: "currentColor"
|
|
1515
|
+
};
|
|
1516
|
+
function Wo(e, t) {
|
|
1517
|
+
return i(), u("svg", Fo, t[0] || (t[0] = [
|
|
1518
|
+
a("path", {
|
|
1519
|
+
"fill-rule": "evenodd",
|
|
1520
|
+
d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
|
|
1521
|
+
"clip-rule": "evenodd"
|
|
1522
|
+
}, null, -1)
|
|
1523
|
+
]));
|
|
1524
|
+
}
|
|
1525
|
+
const me = /* @__PURE__ */ z(qo, [["render", Wo]]), Go = {}, Zo = {
|
|
1526
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1527
|
+
viewBox: "0 0 24 24",
|
|
1528
|
+
fill: "none",
|
|
1529
|
+
stroke: "currentColor",
|
|
1530
|
+
"stroke-width": "2",
|
|
1531
|
+
"stroke-linecap": "round",
|
|
1532
|
+
"stroke-linejoin": "round",
|
|
1533
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down",
|
|
1534
|
+
height: "16",
|
|
1535
|
+
width: "16"
|
|
1536
|
+
};
|
|
1537
|
+
function Xo(e, t) {
|
|
1538
|
+
return i(), u("svg", Zo, t[0] || (t[0] = [
|
|
1539
|
+
a("path", {
|
|
1540
|
+
stroke: "none",
|
|
1541
|
+
d: "M0 0h24v24H0z",
|
|
1542
|
+
fill: "none"
|
|
1543
|
+
}, null, -1),
|
|
1544
|
+
a("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
1545
|
+
]));
|
|
1546
|
+
}
|
|
1547
|
+
const Yo = /* @__PURE__ */ z(Go, [["render", Xo]]), Jo = {}, Qo = {
|
|
1548
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1549
|
+
viewBox: "0 0 24 24",
|
|
1550
|
+
fill: "none",
|
|
1551
|
+
stroke: "currentColor",
|
|
1552
|
+
"stroke-width": "4",
|
|
1553
|
+
"stroke-linecap": "round",
|
|
1554
|
+
"stroke-linejoin": "round",
|
|
1555
|
+
class: "icon icon-tabler icons-tabler-outline icon-tabler-check text-blue-600",
|
|
1556
|
+
width: "14",
|
|
1557
|
+
height: "14"
|
|
1558
|
+
};
|
|
1559
|
+
function el(e, t) {
|
|
1560
|
+
return i(), u("svg", Qo, t[0] || (t[0] = [
|
|
1561
|
+
a("path", {
|
|
1562
|
+
stroke: "none",
|
|
1563
|
+
d: "M0 0h24v24H0z",
|
|
1564
|
+
fill: "none"
|
|
1565
|
+
}, null, -1),
|
|
1566
|
+
a("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
1567
|
+
]));
|
|
1568
|
+
}
|
|
1569
|
+
const tl = /* @__PURE__ */ z(Jo, [["render", el]]), ol = { class: "flex items-center justify-between w-full" }, ll = { class: "m-0 flex list-none justify-center gap-1 p-0 text-gray-900" }, nl = ["onClick"], al = { key: 1 }, rl = { for: "Page" }, sl = ["value", "max"], il = {
|
|
1570
|
+
key: 2,
|
|
1571
|
+
class: "text-sm/8 font-medium tracking-widest"
|
|
1572
|
+
}, dl = {
|
|
1573
|
+
key: 0,
|
|
1574
|
+
class: "flex justify-center items-center gap-x-5 ml-3"
|
|
1575
|
+
}, ul = {
|
|
1576
|
+
class: "hs-dropdown-menu z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 right-0 dark:divide-neutral-700 absolute bottom-[100%]",
|
|
1577
|
+
role: "menu",
|
|
1578
|
+
"aria-orientation": "vertical",
|
|
1579
|
+
"aria-labelledby": "dropdown-button"
|
|
1580
|
+
}, cl = ["onClick"], pl = /* @__PURE__ */ T({
|
|
1581
|
+
__name: "vs-pagination",
|
|
1582
|
+
props: {
|
|
1583
|
+
pageSize: {},
|
|
1584
|
+
page: {},
|
|
1585
|
+
total: {},
|
|
1586
|
+
view: { default: "button" },
|
|
1587
|
+
pageSizes: { default: () => [10, 20, 30] },
|
|
1588
|
+
showPageSizes: { type: Boolean, default: !0 },
|
|
1589
|
+
pageRange: { default: 7 },
|
|
1590
|
+
size: { default: 7 },
|
|
1591
|
+
color: { default: "teal" }
|
|
1592
|
+
},
|
|
1593
|
+
emits: ["update:page", "pageChange", "pageSizeChange"],
|
|
1594
|
+
setup(e, { emit: t }) {
|
|
1595
|
+
const l = e, o = t, n = _(l.page), r = L(() => Math.ceil(l.total / l.pageSize)), s = L(() => {
|
|
1596
|
+
const h = Math.floor(l.pageRange / 2);
|
|
1597
|
+
let C = n.value - h, y = n.value + h;
|
|
1598
|
+
C < 1 && (y += 1 - C, C = 1), y > r.value && (C -= y - r.value, y = r.value), C = Math.max(1, C);
|
|
1599
|
+
const E = [];
|
|
1600
|
+
for (let b = C; b <= y; b += 1)
|
|
1601
|
+
E.push(b);
|
|
1602
|
+
return E;
|
|
1603
|
+
}), f = (h) => {
|
|
1604
|
+
n.value = h, o("update:page", h), o("pageChange", h);
|
|
1605
|
+
}, d = () => {
|
|
1606
|
+
n.value > 1 && f(n.value - 1);
|
|
1607
|
+
}, p = () => {
|
|
1608
|
+
n.value < r.value && f(n.value + 1);
|
|
1609
|
+
};
|
|
1610
|
+
O(() => l.page, (h) => {
|
|
1611
|
+
n.value = h;
|
|
1612
|
+
});
|
|
1613
|
+
const c = _(l.pageSize), v = _(!1), m = _(null);
|
|
1614
|
+
O(() => l.pageSize, (h) => {
|
|
1615
|
+
c.value = h;
|
|
1616
|
+
});
|
|
1617
|
+
const g = (h = c.value) => {
|
|
1618
|
+
c.value = h, v.value = !1, n.value = 1, o("update:page", n.value), o("pageSizeChange", c.value);
|
|
1619
|
+
}, x = (h) => {
|
|
1620
|
+
if (!v.value) return;
|
|
1621
|
+
const C = h.target;
|
|
1622
|
+
m.value && C && !m.value.contains(C) && (v.value = !1);
|
|
1623
|
+
};
|
|
1624
|
+
return N(() => {
|
|
1625
|
+
document.addEventListener("click", x);
|
|
1626
|
+
}), G(() => {
|
|
1627
|
+
document.removeEventListener("click", x);
|
|
1628
|
+
}), (h, C) => (i(), u("div", ol, [
|
|
1629
|
+
a("ul", ll, [
|
|
1630
|
+
a("li", null, [
|
|
1631
|
+
a("button", {
|
|
1632
|
+
class: V(["grid size-7 cursor-pointer place-content-center rounded border border-gray-200 transition-colors hover:bg-gray-50 rtl:rotate-180", { "opacity-50 pointer-events-none": n.value === 1 }]),
|
|
1633
|
+
"aria-label": "Previous page",
|
|
1634
|
+
onClick: d
|
|
1635
|
+
}, [
|
|
1636
|
+
S(ve)
|
|
1637
|
+
], 2)
|
|
1638
|
+
]),
|
|
1639
|
+
h.view === "button" ? (i(!0), u(D, { key: 0 }, U(s.value, (y) => (i(), u("li", {
|
|
1640
|
+
key: y,
|
|
1641
|
+
class: V([[
|
|
1642
|
+
`size-${l.size} text-sm/${l.size} px-1.5`,
|
|
1643
|
+
y === n.value && h.color ? `bg-[${h.color}]` : "",
|
|
1644
|
+
y === n.value ? `block rounded border border-${h.color}-600 text-center font-medium text-white` : "block rounded border border-gray-200 text-center font-medium transition-colors hover:bg-gray-50"
|
|
1645
|
+
], "cursor-pointer"]),
|
|
1646
|
+
onClick: (E) => f(y)
|
|
1647
|
+
}, w(y), 11, nl))), 128)) : h.view === "input" ? (i(), u("li", al, [
|
|
1648
|
+
a("label", rl, [
|
|
1649
|
+
C[2] || (C[2] = a("span", { class: "sr-only" }, " Page ", -1)),
|
|
1650
|
+
a("input", {
|
|
1651
|
+
type: "number",
|
|
1652
|
+
id: "Page",
|
|
1653
|
+
value: n.value,
|
|
1654
|
+
min: "1",
|
|
1655
|
+
max: r.value,
|
|
1656
|
+
onInput: C[0] || (C[0] = (y) => f(Number(y))),
|
|
1657
|
+
class: "pagination-input block h-8 w-16 rounded border border-gray-300 px-3 py-2 text-base leading-6 shadow-sm focus:border-indigo-500 focus:ring-indigo-500"
|
|
1658
|
+
}, null, 40, sl)
|
|
1659
|
+
])
|
|
1660
|
+
])) : h.view === "xy" ? (i(), u("li", il, w(n.value) + "/" + w(r.value), 1)) : B("", !0),
|
|
1661
|
+
a("li", null, [
|
|
1662
|
+
a("button", {
|
|
1663
|
+
onClick: p,
|
|
1664
|
+
class: V(["grid size-7 cursor-pointer place-content-center rounded border border-gray-200 transition-colors hover:bg-gray-50 rtl:rotate-180", { "opacity-50 pointer-events-none": n.value === r.value }]),
|
|
1665
|
+
"aria-label": "Next page"
|
|
1666
|
+
}, [
|
|
1667
|
+
S(me)
|
|
1668
|
+
], 2)
|
|
1669
|
+
])
|
|
1670
|
+
]),
|
|
1671
|
+
h.showPageSizes ? (i(), u("div", dl, [
|
|
1672
|
+
a("div", {
|
|
1673
|
+
class: "relative",
|
|
1674
|
+
ref_key: "dropdownRef",
|
|
1675
|
+
ref: m
|
|
1676
|
+
}, [
|
|
1677
|
+
Z(a("div", ul, [
|
|
1678
|
+
(i(!0), u(D, null, U(h.pageSizes, (y) => (i(), u("button", {
|
|
1679
|
+
type: "button",
|
|
1680
|
+
key: y,
|
|
1681
|
+
onClick: (E) => g(y),
|
|
1682
|
+
class: "flex w-full items-center gap-x-3.5 rounded-lg px-3 py-2 text-sm text-gray-800 hover:bg-gray-100 focus:bg-gray-100 focus:outline-none dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-neutral-300 dark:focus:bg-neutral-700"
|
|
1683
|
+
}, [
|
|
1684
|
+
Q(w(y) + " ", 1),
|
|
1685
|
+
c.value === y ? (i(), H(tl, { key: 0 })) : B("", !0)
|
|
1686
|
+
], 8, cl))), 128))
|
|
1687
|
+
], 512), [
|
|
1688
|
+
[ie, v.value]
|
|
1689
|
+
]),
|
|
1690
|
+
a("button", {
|
|
1691
|
+
type: "button",
|
|
1692
|
+
class: "inline-flex min-w-[32px] text-sm/7 items-center gap-x-1 rounded-md border border-gray-200 px-1.5 h-[1.75rem] text-base text-gray-800 shadow-sm hover:bg-gray-50 focus:bg-gray-100 focus:outline-none disabled:pointer-events-none disabled:opacity-50 dark:border-neutral-700 dark:text-white dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
1693
|
+
"aria-haspopup": "menu",
|
|
1694
|
+
"aria-expanded": "false",
|
|
1695
|
+
"aria-label": "Dropdown",
|
|
1696
|
+
onClick: C[1] || (C[1] = (y) => v.value = !v.value)
|
|
1697
|
+
}, [
|
|
1698
|
+
Q(w(c.value) + " ", 1),
|
|
1699
|
+
S(Yo)
|
|
1700
|
+
])
|
|
1701
|
+
], 512)
|
|
1702
|
+
])) : B("", !0)
|
|
1703
|
+
]));
|
|
1704
|
+
}
|
|
1705
|
+
}), fl = /* @__PURE__ */ z(pl, [["__scopeId", "data-v-fd550e03"]]), vl = { class: "relative w-full overflow-hidden" }, ml = { class: "absolute bottom-3 left-1/2 -translate-x-1/2 flex space-x-2" }, gl = ["onClick"], hl = /* @__PURE__ */ T({
|
|
1706
|
+
__name: "vs-slider",
|
|
1707
|
+
props: {
|
|
1708
|
+
interval: { default: 3e3 },
|
|
1709
|
+
autoplay: { type: Boolean, default: !1 }
|
|
1710
|
+
},
|
|
1711
|
+
setup(e) {
|
|
1712
|
+
const t = e, l = he(), o = _(0);
|
|
1713
|
+
let n = null;
|
|
1714
|
+
const r = L(() => (l.default ? l.default() : []).map((c) => j("div", { class: "w-full flex-shrink-0" }, [c]))), s = L(() => r.value.length), f = () => {
|
|
1715
|
+
s.value > 0 && (o.value = (o.value + 1) % s.value);
|
|
1716
|
+
}, d = () => {
|
|
1717
|
+
s.value > 0 && (o.value = (o.value - 1 + s.value) % s.value);
|
|
1718
|
+
}, p = (c) => {
|
|
1719
|
+
o.value = c;
|
|
1720
|
+
};
|
|
1721
|
+
return N(() => {
|
|
1722
|
+
t.autoplay && t.interval && t.interval > 0 && (n = window.setInterval(f, t.interval));
|
|
1723
|
+
}), G(() => {
|
|
1724
|
+
n && clearInterval(n);
|
|
1725
|
+
}), (c, v) => (i(), u("div", vl, [
|
|
1726
|
+
a("div", {
|
|
1727
|
+
class: "flex transition-transform duration-500 ease-in-out",
|
|
1728
|
+
style: X({ transform: `translateX(-${o.value * 100}%)` })
|
|
1729
|
+
}, [
|
|
1730
|
+
(i(!0), u(D, null, U(r.value, (m, g) => (i(), H(te(m), { key: g }))), 128))
|
|
1731
|
+
], 4),
|
|
1732
|
+
a("button", {
|
|
1733
|
+
onClick: d,
|
|
1734
|
+
class: "absolute top-1/2 left-3 -translate-y-1/2 bg-black/50 text-white p-2 rounded-full hover:bg-black/70"
|
|
1735
|
+
}, [
|
|
1736
|
+
S(ve)
|
|
1737
|
+
]),
|
|
1738
|
+
a("button", {
|
|
1739
|
+
onClick: f,
|
|
1740
|
+
class: "absolute top-1/2 right-3 -translate-y-1/2 bg-black/50 text-white p-2 rounded-full hover:bg-black/70"
|
|
1741
|
+
}, [
|
|
1742
|
+
S(me)
|
|
1743
|
+
]),
|
|
1744
|
+
a("div", ml, [
|
|
1745
|
+
(i(!0), u(D, null, U(s.value, (m, g) => (i(), u("button", {
|
|
1746
|
+
key: g,
|
|
1747
|
+
onClick: (x) => p(g),
|
|
1748
|
+
class: V([
|
|
1749
|
+
"w-3 h-3 rounded-full transition",
|
|
1750
|
+
o.value === g ? "bg-white" : "bg-white/50"
|
|
1751
|
+
])
|
|
1752
|
+
}, null, 10, gl))), 128))
|
|
1753
|
+
])
|
|
1754
|
+
]));
|
|
1755
|
+
}
|
|
1756
|
+
}), bl = {
|
|
1757
|
+
mounted(e, t) {
|
|
1758
|
+
if (typeof document > "u") return;
|
|
1759
|
+
let l = null;
|
|
1760
|
+
const o = () => {
|
|
1761
|
+
l = document.createElement("div"), l.textContent = t.value, Object.assign(l.style, {
|
|
1762
|
+
position: "absolute",
|
|
1763
|
+
background: "#333",
|
|
1764
|
+
color: "#fff",
|
|
1765
|
+
padding: "4px 8px",
|
|
1766
|
+
borderRadius: "4px",
|
|
1767
|
+
fontSize: "12px",
|
|
1768
|
+
whiteSpace: "nowrap",
|
|
1769
|
+
pointerEvents: "none",
|
|
1770
|
+
zIndex: "9999"
|
|
1771
|
+
}), document.body.appendChild(l);
|
|
1772
|
+
const r = e.getBoundingClientRect();
|
|
1773
|
+
l.style.left = `${r.left + window.scrollX}px`, l.style.top = `${r.top + window.scrollY - l.offsetHeight - 5}px`;
|
|
1774
|
+
}, n = () => {
|
|
1775
|
+
l && l.parentNode && (l.parentNode.removeChild(l), l = null);
|
|
1776
|
+
};
|
|
1777
|
+
e.addEventListener("mouseenter", o), e.addEventListener("mouseleave", n), Object.assign(e, { tooltipHandlers: { showTooltip: o, hideTooltip: n } });
|
|
1778
|
+
},
|
|
1779
|
+
unmounted(e) {
|
|
1780
|
+
if (typeof document > "u") return;
|
|
1781
|
+
const t = e.tooltipHandlers;
|
|
1782
|
+
t && (e.removeEventListener("mouseenter", t.showTooltip), e.removeEventListener("mouseleave", t.hideTooltip), typeof t.hideTooltip == "function" && t.hideTooltip(), delete e.tooltipHandlers);
|
|
1783
|
+
}
|
|
1784
|
+
}, xl = {
|
|
1785
|
+
mounted(e, t) {
|
|
1786
|
+
const l = document.createElement("div");
|
|
1787
|
+
l.className = `
|
|
1788
|
+
absolute inset-0
|
|
1789
|
+
bg-white bg-opacity-70
|
|
1790
|
+
flex justify-center items-center
|
|
1791
|
+
pointer-events-none
|
|
1792
|
+
z-[9999]
|
|
1793
|
+
`;
|
|
1794
|
+
const o = document.createElement("div");
|
|
1795
|
+
o.className = `
|
|
1796
|
+
w-10 h-10
|
|
1797
|
+
border-4 border-gray-400 border-t-transparent rounded-full
|
|
1798
|
+
animate-spin
|
|
1799
|
+
`, l.appendChild(o), e._loadingOverlay = l;
|
|
1800
|
+
const n = getComputedStyle(e).position;
|
|
1801
|
+
(n === "static" || !n) && (e.style.position = "relative"), t.value && e.appendChild(l);
|
|
1802
|
+
},
|
|
1803
|
+
updated(e, t) {
|
|
1804
|
+
t.value && e._loadingOverlay && !e.contains(e._loadingOverlay) ? e.appendChild(e._loadingOverlay) : !t.value && e._loadingOverlay && e.contains(e._loadingOverlay) && e.removeChild(e._loadingOverlay);
|
|
1805
|
+
},
|
|
1806
|
+
unmounted(e) {
|
|
1807
|
+
e._loadingOverlay && e.contains(e._loadingOverlay) && e.removeChild(e._loadingOverlay), delete e._loadingOverlay;
|
|
1808
|
+
}
|
|
1809
|
+
}, yl = {
|
|
1810
|
+
mounted(e) {
|
|
1811
|
+
var t, l;
|
|
1812
|
+
typeof window > "u" || (l = (t = e.querySelector("input, textarea, [tabindex]") ?? e).focus) == null || l.call(t);
|
|
1813
|
+
},
|
|
1814
|
+
updated(e, t) {
|
|
1815
|
+
var l, o;
|
|
1816
|
+
t.value === !0 && ((o = (l = e.querySelector("input, textarea, [tabindex]") ?? e).focus) == null || o.call(l));
|
|
1817
|
+
}
|
|
1818
|
+
}, Y = (e) => {
|
|
1819
|
+
const {
|
|
1820
|
+
message: t,
|
|
1821
|
+
title: l,
|
|
1822
|
+
mode: o = "confirm",
|
|
1823
|
+
type: n = "info",
|
|
1824
|
+
confirmButtonText: r,
|
|
1825
|
+
cancelButtonText: s,
|
|
1826
|
+
onConfirm: f,
|
|
1827
|
+
onCancel: d,
|
|
1828
|
+
cascade: p,
|
|
1829
|
+
confirmButtonStyle: c,
|
|
1830
|
+
cancelButtonStyle: v
|
|
1831
|
+
} = e || {}, m = document.querySelector("body");
|
|
1832
|
+
if (!m) {
|
|
1833
|
+
console.error('Modal root element with id "#modal" not found!');
|
|
1834
|
+
return;
|
|
1835
|
+
}
|
|
1836
|
+
const g = document.createElement("div");
|
|
1837
|
+
m.appendChild(g);
|
|
1838
|
+
const x = () => {
|
|
1839
|
+
g.remove();
|
|
1840
|
+
};
|
|
1841
|
+
W({
|
|
1842
|
+
render() {
|
|
1843
|
+
return j(oe, {
|
|
1844
|
+
title: l,
|
|
1845
|
+
message: t,
|
|
1846
|
+
mode: o,
|
|
1847
|
+
type: n,
|
|
1848
|
+
cascade: p,
|
|
1849
|
+
confirmButtonText: r,
|
|
1850
|
+
cancelButtonText: s,
|
|
1851
|
+
cancelButtonStyle: v,
|
|
1852
|
+
confirmButtonStyle: c,
|
|
1853
|
+
modelValue: !0,
|
|
1854
|
+
onConfirm: () => {
|
|
1855
|
+
f == null || f(), x();
|
|
1856
|
+
},
|
|
1857
|
+
onCancel: () => {
|
|
1858
|
+
d == null || d(), x();
|
|
1859
|
+
}
|
|
1860
|
+
});
|
|
1861
|
+
}
|
|
1862
|
+
}).mount(g);
|
|
1863
|
+
};
|
|
1864
|
+
function wl(e = {}) {
|
|
1865
|
+
return Object.assign(e, { mode: "alert" }), Y(e);
|
|
1866
|
+
}
|
|
1867
|
+
function Ml(e = {}) {
|
|
1868
|
+
return Object.assign(e, { mode: "prompt" }), Y(e);
|
|
1869
|
+
}
|
|
1870
|
+
let re = !1;
|
|
1871
|
+
const se = be({ visible: !0 }), ge = (e, t) => {
|
|
1872
|
+
if (t && setTimeout(() => ge(!1), t), !re) {
|
|
1873
|
+
const l = document.querySelector("body");
|
|
1874
|
+
if (!l) {
|
|
1875
|
+
console.error('Modal root element with id "#modal" not found!');
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
const o = document.createElement("div");
|
|
1879
|
+
l.appendChild(o), W({
|
|
1880
|
+
render() {
|
|
1881
|
+
return j(fe, se);
|
|
1882
|
+
}
|
|
1883
|
+
}).mount(o), re = !0;
|
|
1884
|
+
}
|
|
1885
|
+
se.visible = e;
|
|
1886
|
+
}, kl = (e) => {
|
|
1887
|
+
const {
|
|
1888
|
+
template: t = "",
|
|
1889
|
+
title: l = "",
|
|
1890
|
+
content: o,
|
|
1891
|
+
contentProps: n = {},
|
|
1892
|
+
size: r = "medium"
|
|
1893
|
+
} = e || {}, s = document.querySelector("body");
|
|
1894
|
+
if (!s)
|
|
1895
|
+
return console.error('Modal root element with id "#modal" not found!'), { close: () => {
|
|
1896
|
+
} };
|
|
1897
|
+
const f = document.createElement("div");
|
|
1898
|
+
s.appendChild(f);
|
|
1899
|
+
const d = {
|
|
1900
|
+
title: l,
|
|
1901
|
+
template: t,
|
|
1902
|
+
visible: !0,
|
|
1903
|
+
size: r,
|
|
1904
|
+
closeClickBack: !0,
|
|
1905
|
+
// eslint-disable-next-line no-use-before-define
|
|
1906
|
+
onClose: c
|
|
1907
|
+
}, p = W({
|
|
1908
|
+
render() {
|
|
1909
|
+
return j(ee, d, {
|
|
1910
|
+
default: () => [
|
|
1911
|
+
o ? j(o, n) : j("p", t)
|
|
1912
|
+
]
|
|
1913
|
+
});
|
|
1914
|
+
}
|
|
1915
|
+
});
|
|
1916
|
+
function c() {
|
|
1917
|
+
p.unmount(), f.remove();
|
|
1918
|
+
}
|
|
1919
|
+
return p.mount(f), { close: c };
|
|
1920
|
+
};
|
|
1921
|
+
function Cl(e) {
|
|
1922
|
+
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, l) {
|
|
1923
|
+
var o = e.get(t);
|
|
1924
|
+
o ? o.push(l) : e.set(t, [l]);
|
|
1925
|
+
}, off: function(t, l) {
|
|
1926
|
+
var o = e.get(t);
|
|
1927
|
+
o && (l ? o.splice(o.indexOf(l) >>> 0, 1) : e.set(t, []));
|
|
1928
|
+
}, emit: function(t, l) {
|
|
1929
|
+
var o = e.get(t);
|
|
1930
|
+
o && o.slice().map(function(n) {
|
|
1931
|
+
n(l);
|
|
1932
|
+
}), (o = e.get("*")) && o.slice().map(function(n) {
|
|
1933
|
+
n(t, l);
|
|
1934
|
+
});
|
|
1935
|
+
} };
|
|
1936
|
+
}
|
|
1937
|
+
const _l = Cl(), Bl = async (e) => {
|
|
1938
|
+
const {
|
|
1939
|
+
api: t,
|
|
1940
|
+
method: l,
|
|
1941
|
+
confirm: {
|
|
1942
|
+
title: o,
|
|
1943
|
+
text: n,
|
|
1944
|
+
cancel: r,
|
|
1945
|
+
confirm: s
|
|
1946
|
+
}
|
|
1947
|
+
} = e;
|
|
1948
|
+
Y({
|
|
1949
|
+
cascade: !1,
|
|
1950
|
+
confirmButtonStyle: "",
|
|
1951
|
+
cancelButtonStyle: "",
|
|
1952
|
+
message: n,
|
|
1953
|
+
title: o,
|
|
1954
|
+
mode: "confirm",
|
|
1955
|
+
type: "error",
|
|
1956
|
+
confirmButtonText: s,
|
|
1957
|
+
cancelButtonText: r,
|
|
1958
|
+
onConfirm: async () => {
|
|
1959
|
+
await fetch(t, {
|
|
1960
|
+
method: l,
|
|
1961
|
+
headers: { "Content-Type": "application/json" }
|
|
1962
|
+
}), _l.emit("methodApi", l);
|
|
1963
|
+
}
|
|
1964
|
+
});
|
|
1965
|
+
}, Sl = {
|
|
1966
|
+
install: (e) => {
|
|
1967
|
+
e.component("VsButton", ze), e.component("VsGridGallery", Tt), e.component("Lightbox", ue), e.component("VsDataValue", $e), e.component("VsSwitch", ro), e.component("VsCopy", ae), e.component("Copy", ae), e.component("VsPopover", uo), e.component("VsConfirm", Do), e.component("MessageBox", oe), e.component("VsModal", ee), e.component("VsDialog", ee), e.component("VsDrawer", Mo), e.component("VsNotify", ce), e.component("VsLoading", fe), e.component("VsPagination", fl), e.component("VsSlider", hl), e._context.directives.tooltip || e.directive("tooltip", bl), e._context.directives.loading || e.directive("loading", xl), e.directive("focus", yl), Object.assign(e.config.globalProperties, {
|
|
1968
|
+
$loading: ge,
|
|
1969
|
+
$modal: kl,
|
|
1970
|
+
$notify: pe,
|
|
1971
|
+
$confirm: Y,
|
|
1972
|
+
$alert: wl,
|
|
1973
|
+
$api: Bl
|
|
1974
|
+
});
|
|
1975
|
+
}
|
|
1976
|
+
};
|
|
1977
|
+
export {
|
|
1978
|
+
ae as Copy,
|
|
1979
|
+
ue as Lightbox,
|
|
1980
|
+
xl as LoadingDirective,
|
|
1981
|
+
oe as MessageBox,
|
|
1982
|
+
bl as TooltipDirective,
|
|
1983
|
+
zl as VsBadgeValue,
|
|
1984
|
+
ze as VsButton,
|
|
1985
|
+
Do as VsConfirm,
|
|
1986
|
+
$e as VsDataValue,
|
|
1987
|
+
Mo as VsDrawer,
|
|
1988
|
+
Tt as VsGridGallery,
|
|
1989
|
+
fe as VsLoading,
|
|
1990
|
+
ee as VsModal,
|
|
1991
|
+
ce as VsNotify,
|
|
1992
|
+
fl as VsPagination,
|
|
1993
|
+
uo as VsPopover,
|
|
1994
|
+
hl as VsSlider,
|
|
1995
|
+
ro as VsSwitch,
|
|
1996
|
+
wl as alert,
|
|
1997
|
+
Y as confirm,
|
|
1998
|
+
Sl as default,
|
|
1999
|
+
_l as emitter,
|
|
2000
|
+
ge as loading,
|
|
2001
|
+
kl as modal,
|
|
2002
|
+
pe as notify,
|
|
2003
|
+
Ml as prompt
|
|
2004
|
+
};
|