@anzusystems/common-admin 1.47.0-beta.21 → 1.47.0-beta.210
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/common-admin.css +13 -0
- package/dist/common-admin.d.ts +17999 -0
- package/dist/common-admin.js +21682 -0
- package/dist/common-admin.js.map +1 -0
- package/dist/enum-ClUKfrD4.mjs +4367 -0
- package/dist/enum-ClUKfrD4.mjs.map +1 -0
- package/dist/index-8FWEjit1.mjs +17927 -0
- package/dist/index-8FWEjit1.mjs.map +1 -0
- package/dist/labs.d.ts +556 -0
- package/dist/labs.js +2497 -0
- package/dist/labs.js.map +1 -0
- package/dist/webfontloader-HLCK-BU_.mjs +452 -0
- package/dist/webfontloader-HLCK-BU_.mjs.map +1 -0
- package/package.json +69 -59
- package/dist/common-admin.es.d.ts +0 -11199
- package/dist/common-admin.es.js +0 -325
- package/dist/common-admin.es.js.map +0 -1
- package/dist/lib-CO4EISxz.js +0 -24185
- package/dist/lib-CO4EISxz.js.map +0 -1
- package/dist/style.css +0 -13
- package/dist/webfontloader-BDw-nW6M.js +0 -452
- package/dist/webfontloader-BDw-nW6M.js.map +0 -1
|
@@ -0,0 +1,4367 @@
|
|
|
1
|
+
var tr = Object.defineProperty;
|
|
2
|
+
var nr = (e, t, n) => t in e ? tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var pt = (e, t, n) => nr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as Te, createBlock as te, openBlock as z, withCtx as j, createVNode as U, createElementBlock as Ie, createCommentVNode as he, renderSlot as ye, normalizeClass as qe, toDisplayString as we, createElementVNode as ue, isProxy as or, toRaw as Bn, isRef as Ln, unref as ee, computed as J, Fragment as At, normalizeStyle as rr, createTextVNode as Le, shallowRef as Wn, watch as Ce, ref as H, reactive as on, inject as Gt, createSlots as rn, withDirectives as On, onMounted as So, withModifiers as $e, TransitionGroup as ar, mergeProps as Xt, isVNode as ir, useModel as sr, vModelText as Gn, nextTick as ct, withKeys as lr, toValue as Xn, toRef as ur, onBeforeUnmount as cr, resolveComponent as Zn, renderList as dr } from "vue";
|
|
5
|
+
import { VRow as fr, VCol as pr, VSpacer as wo } from "vuetify/components/VGrid";
|
|
6
|
+
import { useI18n as ft, createI18n as mr } from "vue-i18n";
|
|
7
|
+
import { VIcon as De } from "vuetify/components/VIcon";
|
|
8
|
+
import { VTextField as Eo } from "vuetify/components/VTextField";
|
|
9
|
+
import { Tooltip as hr } from "vuetify/directives";
|
|
10
|
+
import an from "axios";
|
|
11
|
+
import { VBtn as rt } from "vuetify/components/VBtn";
|
|
12
|
+
import { VTooltip as St } from "vuetify/components/VTooltip";
|
|
13
|
+
import gr from "@vuelidate/core";
|
|
14
|
+
import { createI18nMessage as Ae, between as vr, email as br, maxLength as yr, maxValue as Dr, minLength as Sr, minValue as wr, numeric as Er, required as _r, requiredIf as Cr, helpers as _o, url as Tr } from "@vuelidate/validators";
|
|
15
|
+
import { VCard as Co, VCardActions as Ar } from "vuetify/components/VCard";
|
|
16
|
+
import { VDatePicker as Mr } from "vuetify/components/VDatePicker";
|
|
17
|
+
import { VMenu as To } from "vuetify/components/VMenu";
|
|
18
|
+
import { VAvatar as kr } from "vuetify/components/VAvatar";
|
|
19
|
+
import { VProgressCircular as Or } from "vuetify/components/VProgressCircular";
|
|
20
|
+
import { useEventBus as xe, tryOnBeforeUnmount as $r, defaultDocument as Ir, tryOnMounted as xr, tryOnScopeDispose as Fr, unrefElement as Yr } from "@vueuse/core";
|
|
21
|
+
import { VSwitch as Rr } from "vuetify/components/VSwitch";
|
|
22
|
+
import { VToolbar as Br, VToolbarTitle as Lr } from "vuetify/components/VToolbar";
|
|
23
|
+
import { VChip as Nr } from "vuetify/components/VChip";
|
|
24
|
+
import { VDialog as Vr } from "vuetify/components/VDialog";
|
|
25
|
+
import { VList as Pr, VListItem as Hr } from "vuetify/components/VList";
|
|
26
|
+
const Ur = { class: "text-high-emphasis" }, gl = /* @__PURE__ */ Te({
|
|
27
|
+
__name: "ARow",
|
|
28
|
+
props: {
|
|
29
|
+
title: { default: "" },
|
|
30
|
+
value: { default: "" },
|
|
31
|
+
dataCy: { default: void 0 },
|
|
32
|
+
titleClass: { default: "font-weight-bold text-subtitle-2" }
|
|
33
|
+
},
|
|
34
|
+
setup(e) {
|
|
35
|
+
return (t, n) => (z(), te(fr, { "data-cy": t.dataCy }, {
|
|
36
|
+
default: j(() => [
|
|
37
|
+
U(pr, null, {
|
|
38
|
+
default: j(() => [
|
|
39
|
+
t.title.length ? (z(), Ie("h4", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: qe(t.titleClass)
|
|
42
|
+
}, we(t.title), 3)) : he("", !0),
|
|
43
|
+
ye(t.$slots, "default", {}, () => [
|
|
44
|
+
ue("span", Ur, we(t.value), 1)
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
_: 3
|
|
48
|
+
})
|
|
49
|
+
]),
|
|
50
|
+
_: 3
|
|
51
|
+
}, 8, ["data-cy"]));
|
|
52
|
+
}
|
|
53
|
+
}), Ao = (e, t) => {
|
|
54
|
+
const n = e.__vccOpts || e;
|
|
55
|
+
for (const [o, r] of t)
|
|
56
|
+
n[o] = r;
|
|
57
|
+
return n;
|
|
58
|
+
}, q = (e) => typeof e > "u", pe = (e) => !q(e), K = (e) => e === null, Mo = (e) => typeof e == "number", Nt = (e) => typeof e == "string", sn = (e) => Array.isArray(e), vl = (e) => typeof e == "function", Kn = (e) => typeof e == "boolean", bl = (e) => Nt(e) && /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(e), yl = (e) => {
|
|
59
|
+
const t = parseFloat(e);
|
|
60
|
+
return !isNaN(e) && (t | 0) === t;
|
|
61
|
+
}, ln = (e) => typeof e == "object" && !sn(e) && !K(e), ko = (e) => ln(e) ? Object.keys(e).length === 0 : !1, qr = (e) => sn(e) && e.length === 0, Dl = (e) => K(e) || q(e) || e === "" || e === 0 || qr(e) || ko(e), Re = (e) => {
|
|
62
|
+
if (typeof structuredClone == "function")
|
|
63
|
+
try {
|
|
64
|
+
return or(e) ? structuredClone(Bn(e)) : Ln(e) ? structuredClone(ee(e)) : structuredClone(e);
|
|
65
|
+
} catch {
|
|
66
|
+
return JSON.parse(JSON.stringify(e));
|
|
67
|
+
}
|
|
68
|
+
return JSON.parse(JSON.stringify(e));
|
|
69
|
+
}, zr = (e, t = 0) => {
|
|
70
|
+
let n = t;
|
|
71
|
+
try {
|
|
72
|
+
n = Number.parseInt(e, 10);
|
|
73
|
+
} catch {
|
|
74
|
+
return t;
|
|
75
|
+
}
|
|
76
|
+
return Number.isNaN(n) ? t : n;
|
|
77
|
+
}, Sl = (e, t = 0) => {
|
|
78
|
+
let n = t;
|
|
79
|
+
try {
|
|
80
|
+
n = Number.parseFloat(e);
|
|
81
|
+
} catch {
|
|
82
|
+
return t;
|
|
83
|
+
}
|
|
84
|
+
return Number.isNaN(n) ? t : n;
|
|
85
|
+
}, Oo = (e, t = "") => {
|
|
86
|
+
const n = e.indexOf(t);
|
|
87
|
+
return {
|
|
88
|
+
start: e.slice(0, n),
|
|
89
|
+
end: e.slice(n + t.length)
|
|
90
|
+
};
|
|
91
|
+
}, wl = (e) => e.toString().toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, "-").replace(/&/g, "-").replace(/[^\w-]+/g, "").replace(/--+/g, "-").replace(/^-+/, "").replace(/-+$/, ""), El = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), _l = (e, t = 80) => e.length > t ? e.substring(1, t) + "..." : e, jr = (e, t) => {
|
|
92
|
+
if (e.indexOf(":") === -1) return e;
|
|
93
|
+
const n = [], [o, r] = e.split("?");
|
|
94
|
+
return o.split("/").forEach((i, s) => {
|
|
95
|
+
if (n[s] = i, !i.startsWith(":")) return;
|
|
96
|
+
const l = i.substring(1);
|
|
97
|
+
q(t[l]) || (n[s] = t[i.substring(1)] + "");
|
|
98
|
+
}), n.join("/") + (r ? `?${r}` : "");
|
|
99
|
+
}, Cl = (e, t) => {
|
|
100
|
+
if (e.indexOf(":") === -1) return e;
|
|
101
|
+
const n = [];
|
|
102
|
+
return e.split("/").forEach((r, a) => {
|
|
103
|
+
if (n[a] = r, !r.startsWith(":")) return;
|
|
104
|
+
n[a] = r.substring(1);
|
|
105
|
+
const i = /^:([a-zA-Z0-9_-]+).*/, s = r.match(i);
|
|
106
|
+
K(s) || !s[1] || q(t[s[1]]) || (n[a] = t[s[1]] + "");
|
|
107
|
+
}), n.join("/");
|
|
108
|
+
}, Tl = (e) => e.replace(".", "-"), Al = (e) => /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$/.test(e), $o = Symbol.for("anzu:SystemScope"), Io = Symbol.for("anzu:SubjectScope"), Ml = Symbol.for("anzu:AvailableLanguages"), kl = Symbol.for("anzu:DefaultLanguage"), Wr = /* @__PURE__ */ Te({
|
|
109
|
+
__name: "AAnzuUserAvatar",
|
|
110
|
+
props: {
|
|
111
|
+
user: { default: void 0 },
|
|
112
|
+
size: { default: 36 },
|
|
113
|
+
containerClass: { default: "" },
|
|
114
|
+
tooltip: { default: void 0 }
|
|
115
|
+
},
|
|
116
|
+
setup(e) {
|
|
117
|
+
const t = e, n = J(() => {
|
|
118
|
+
var a;
|
|
119
|
+
return (a = t.user) != null && a.avatar.color && t.user.avatar.color.length === 7 ? t.user.avatar.color : "#3f6ad8";
|
|
120
|
+
}), o = J(() => t.size * 0.5 + "px"), r = J(() => {
|
|
121
|
+
if (!t.user) return "";
|
|
122
|
+
if (t.user.avatar.text.length > 0) return t.user.avatar.text;
|
|
123
|
+
const a = t.user.person.firstName.charAt(0) + t.user.person.lastName.charAt(0);
|
|
124
|
+
return a.length > 0 ? a : t.user.email.slice(0, 2);
|
|
125
|
+
});
|
|
126
|
+
return (a, i) => (z(), Ie(At, null, [
|
|
127
|
+
U(kr, {
|
|
128
|
+
color: n.value,
|
|
129
|
+
class: qe(["text-uppercase", a.containerClass]),
|
|
130
|
+
size: a.size
|
|
131
|
+
}, {
|
|
132
|
+
default: j(() => [
|
|
133
|
+
ue("div", {
|
|
134
|
+
class: "d-inline-flex text-white font-weight-light",
|
|
135
|
+
style: rr({ fontSize: o.value })
|
|
136
|
+
}, we(r.value), 5),
|
|
137
|
+
a.tooltip ? (z(), te(St, {
|
|
138
|
+
key: 0,
|
|
139
|
+
activator: "parent"
|
|
140
|
+
}, {
|
|
141
|
+
default: j(() => [
|
|
142
|
+
Le(we(a.tooltip), 1)
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
})) : he("", !0)
|
|
146
|
+
]),
|
|
147
|
+
_: 1
|
|
148
|
+
}, 8, ["color", "class", "size"]),
|
|
149
|
+
i[0] || (i[0] = ue("div", null, null, -1))
|
|
150
|
+
], 64));
|
|
151
|
+
}
|
|
152
|
+
}), Gr = { class: "d-inline-flex" }, Xr = { key: 0 }, Nn = /* @__PURE__ */ Te({
|
|
153
|
+
__name: "ACollabLockedByUser",
|
|
154
|
+
props: {
|
|
155
|
+
id: {},
|
|
156
|
+
users: {}
|
|
157
|
+
},
|
|
158
|
+
setup(e) {
|
|
159
|
+
const t = e, n = Wn(void 0), o = Wn(!1), r = ee(t.users), a = J(() => {
|
|
160
|
+
if (Mo(t.id) && t.id > 0)
|
|
161
|
+
return r.get(t.id);
|
|
162
|
+
}), i = J(() => {
|
|
163
|
+
if (a.value)
|
|
164
|
+
return a.value.person.fullName.length ? a.value.person.fullName : a.value.email.split("@")[0];
|
|
165
|
+
});
|
|
166
|
+
return Ce(
|
|
167
|
+
a,
|
|
168
|
+
async (s) => {
|
|
169
|
+
o.value || q(s) || !s._loaded || (n.value = s, o.value = !0);
|
|
170
|
+
},
|
|
171
|
+
{ immediate: !0 }
|
|
172
|
+
), (s, l) => (z(), Ie("div", Gr, [
|
|
173
|
+
ee(K)(s.id) || ee(q)(s.id) ? (z(), Ie("span", Xr)) : o.value ? (z(), te(Wr, {
|
|
174
|
+
key: 1,
|
|
175
|
+
user: n.value ?? void 0,
|
|
176
|
+
"container-class": "",
|
|
177
|
+
size: 20,
|
|
178
|
+
tooltip: i.value
|
|
179
|
+
}, null, 8, ["user", "tooltip"])) : (z(), te(Or, {
|
|
180
|
+
key: 2,
|
|
181
|
+
size: 12,
|
|
182
|
+
width: 2,
|
|
183
|
+
indeterminate: "",
|
|
184
|
+
class: "ml-1"
|
|
185
|
+
}))
|
|
186
|
+
]));
|
|
187
|
+
}
|
|
188
|
+
}), Zr = Symbol("anzu:collabRoomDataChanged"), Kr = Symbol("anzu:collabReconnect"), Jr = Symbol("anzu:collabStarting"), Qr = Symbol(
|
|
189
|
+
"anzu:collabGatheringBufferData"
|
|
190
|
+
), ea = Symbol(
|
|
191
|
+
"anzu:collabApprovedJoinRequest"
|
|
192
|
+
), ta = Symbol(
|
|
193
|
+
"anzu:collabRejectedJoinRequest"
|
|
194
|
+
), na = Symbol("anzu:collabJoinRequest"), oa = Symbol("anzu:collabApprovedRequestToTakeModeration"), ra = Symbol("anzu:collabRejectedRequestToTakeModeration"), aa = Symbol(
|
|
195
|
+
"anzu:collabRequestToTakeModeration"
|
|
196
|
+
), ia = Symbol("anzu:collabKickedFromRoom");
|
|
197
|
+
function sa() {
|
|
198
|
+
return xe(Zr);
|
|
199
|
+
}
|
|
200
|
+
function Ol() {
|
|
201
|
+
return xe(Kr);
|
|
202
|
+
}
|
|
203
|
+
function $l() {
|
|
204
|
+
return xe(
|
|
205
|
+
Jr
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
function xo() {
|
|
209
|
+
return xe(Qr);
|
|
210
|
+
}
|
|
211
|
+
function Il() {
|
|
212
|
+
return xe(ea);
|
|
213
|
+
}
|
|
214
|
+
function xl() {
|
|
215
|
+
return xe(ta);
|
|
216
|
+
}
|
|
217
|
+
function Fl() {
|
|
218
|
+
return xe(na);
|
|
219
|
+
}
|
|
220
|
+
function Yl() {
|
|
221
|
+
return xe(oa);
|
|
222
|
+
}
|
|
223
|
+
function Rl() {
|
|
224
|
+
return xe(ra);
|
|
225
|
+
}
|
|
226
|
+
function Bl() {
|
|
227
|
+
return xe(aa);
|
|
228
|
+
}
|
|
229
|
+
function Ll() {
|
|
230
|
+
return xe(ia);
|
|
231
|
+
}
|
|
232
|
+
const gt = {
|
|
233
|
+
Acquire: "acquire",
|
|
234
|
+
Release: "release"
|
|
235
|
+
}, vt = {
|
|
236
|
+
Success: "success",
|
|
237
|
+
Failure: "failure"
|
|
238
|
+
}, xt = (e, t) => ({
|
|
239
|
+
type: e,
|
|
240
|
+
status: t
|
|
241
|
+
}), la = Symbol("anzu:collabFieldLockStatus");
|
|
242
|
+
function ua() {
|
|
243
|
+
return xe(la);
|
|
244
|
+
}
|
|
245
|
+
const gn = {
|
|
246
|
+
Inactive: "inactive",
|
|
247
|
+
Active: "active"
|
|
248
|
+
}, ca = {
|
|
249
|
+
Ok: "ok",
|
|
250
|
+
Occupied: "occupied",
|
|
251
|
+
Failed: "failed"
|
|
252
|
+
};
|
|
253
|
+
function Nl(e) {
|
|
254
|
+
return e.status === ca.Ok;
|
|
255
|
+
}
|
|
256
|
+
const Fo = {
|
|
257
|
+
Ok: "ok",
|
|
258
|
+
Failed: "failed"
|
|
259
|
+
};
|
|
260
|
+
function Jn(e) {
|
|
261
|
+
return e.status === Fo.Ok;
|
|
262
|
+
}
|
|
263
|
+
function Qn(e) {
|
|
264
|
+
return e.status === Fo.Failed;
|
|
265
|
+
}
|
|
266
|
+
const Vl = {
|
|
267
|
+
Free: "free",
|
|
268
|
+
Moderated: "moderated"
|
|
269
|
+
}, Pl = {
|
|
270
|
+
Ok: "ok",
|
|
271
|
+
AlreadyRequested: "alreadyRequested",
|
|
272
|
+
Failed: "failed"
|
|
273
|
+
}, Hl = {
|
|
274
|
+
Ok: "ok",
|
|
275
|
+
AlreadyRequested: "alreadyRequested",
|
|
276
|
+
Failed: "failed"
|
|
277
|
+
}, $n = H({
|
|
278
|
+
enabled: !1,
|
|
279
|
+
socketUrl: "",
|
|
280
|
+
beforeReconnect: () => new Promise((e) => e())
|
|
281
|
+
});
|
|
282
|
+
function Ul(e) {
|
|
283
|
+
q(e) || ($n.value = e);
|
|
284
|
+
}
|
|
285
|
+
function Mt() {
|
|
286
|
+
if (q($n.value))
|
|
287
|
+
throw new Error("Composable can't be used without properly configured common admin.");
|
|
288
|
+
return {
|
|
289
|
+
collabOptions: $n
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
const eo = H(!0), da = H(), fa = on(/* @__PURE__ */ new Map()), pa = on(/* @__PURE__ */ new Map()), vn = on(/* @__PURE__ */ new Map());
|
|
293
|
+
function ma() {
|
|
294
|
+
const { collabOptions: e } = Mt();
|
|
295
|
+
return {
|
|
296
|
+
collabReconnecting: J(() => e.value.enabled && !eo.value),
|
|
297
|
+
collabConnected: eo,
|
|
298
|
+
collabSocket: da,
|
|
299
|
+
collabRoomInfoState: fa,
|
|
300
|
+
collabFieldLocksState: pa,
|
|
301
|
+
collabFieldDataBufferState: vn,
|
|
302
|
+
gatherBufferData: (o) => {
|
|
303
|
+
xo().emit({ room: o });
|
|
304
|
+
let a = {};
|
|
305
|
+
const i = vn.get(o);
|
|
306
|
+
return i && (a = Bn(Object.fromEntries(i.entries())), vn.delete(o)), a;
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
const to = H(null);
|
|
311
|
+
function ha() {
|
|
312
|
+
function e(t) {
|
|
313
|
+
to.value = t;
|
|
314
|
+
}
|
|
315
|
+
return {
|
|
316
|
+
setCollabUserCurrentId: e,
|
|
317
|
+
currentUserId: to
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
function Vn(e, t, n = !1) {
|
|
321
|
+
const { collabOptions: o } = Mt(), { currentUserId: r } = ha(), { collabSocket: a, collabFieldLocksState: i, collabFieldDataBufferState: s, collabRoomInfoState: l } = ma(), d = sa(), u = H(), f = H(), A = ua(), C = H(), E = H(), g = xo(), p = H(), h = H(), S = ($, v) => {
|
|
322
|
+
$.room !== e || $.field !== t || q(v) || q(f.value) || f.value(v);
|
|
323
|
+
}, k = ($, v) => {
|
|
324
|
+
$.room !== e || $.field !== t || q(v) || q(E.value) || E.value(v);
|
|
325
|
+
}, L = ($) => {
|
|
326
|
+
$.room === e && pe(h.value) && h.value();
|
|
327
|
+
}, M = ($) => {
|
|
328
|
+
f.value = $, u.value = d.on(S);
|
|
329
|
+
}, F = ($) => {
|
|
330
|
+
E.value = $, C.value = A.on(k);
|
|
331
|
+
}, I = ($) => {
|
|
332
|
+
h.value = $, p.value = g.on(
|
|
333
|
+
L
|
|
334
|
+
);
|
|
335
|
+
};
|
|
336
|
+
$r(() => {
|
|
337
|
+
n || (pe(u.value) && u.value(), pe(C.value) && C.value(), pe(p.value) && p.value());
|
|
338
|
+
});
|
|
339
|
+
const R = J(() => {
|
|
340
|
+
const $ = i.get(e);
|
|
341
|
+
if ($) {
|
|
342
|
+
const v = $.get(t);
|
|
343
|
+
if (v && r.value !== v)
|
|
344
|
+
return v;
|
|
345
|
+
}
|
|
346
|
+
return null;
|
|
347
|
+
});
|
|
348
|
+
return {
|
|
349
|
+
addCollabFieldDataChangeListener: M,
|
|
350
|
+
addCollabFieldLockStatusListener: F,
|
|
351
|
+
addCollabGatheringBufferDataListener: I,
|
|
352
|
+
acquireCollabFieldLock: ($ = {}) => {
|
|
353
|
+
var y;
|
|
354
|
+
if (!o.value.enabled || q(a.value)) return;
|
|
355
|
+
const v = l.get(e);
|
|
356
|
+
v && v.status === gn.Inactive || (y = a.value) == null || y.timeout(1e3).emit("acquireFieldLock", e, t, $, (m, c) => {
|
|
357
|
+
var w;
|
|
358
|
+
const _ = { field: t, room: e };
|
|
359
|
+
if (m || Qn(c))
|
|
360
|
+
return void A.emit(
|
|
361
|
+
_,
|
|
362
|
+
xt(gt.Acquire, vt.Failure)
|
|
363
|
+
);
|
|
364
|
+
if (Jn(c)) {
|
|
365
|
+
i.has(e) || i.set(e, /* @__PURE__ */ new Map());
|
|
366
|
+
const Y = new Map(Object.entries(c.locks));
|
|
367
|
+
for (const [x, B] of Y.entries())
|
|
368
|
+
(w = i.get(e)) == null || w.set(x, B);
|
|
369
|
+
return void A.emit(
|
|
370
|
+
_,
|
|
371
|
+
xt(gt.Acquire, vt.Success)
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
},
|
|
376
|
+
releaseCollabFieldLock: ($, v = {}) => {
|
|
377
|
+
var m, c;
|
|
378
|
+
if (!o.value.enabled || q(a.value)) return;
|
|
379
|
+
const y = l.get(e);
|
|
380
|
+
if (y && y.status === gn.Inactive) {
|
|
381
|
+
s.has(e) || s.set(e, /* @__PURE__ */ new Map()), (m = s.get(e)) == null || m.set(t, $);
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
(c = a.value) == null || c.timeout(1e3).emit("releaseFieldLock", e, t, $, v, (_, w) => {
|
|
385
|
+
var x;
|
|
386
|
+
const Y = { field: t, room: e };
|
|
387
|
+
if (_ || Qn(w))
|
|
388
|
+
return void A.emit(
|
|
389
|
+
Y,
|
|
390
|
+
xt(gt.Release, vt.Failure)
|
|
391
|
+
);
|
|
392
|
+
if (Jn(w)) {
|
|
393
|
+
i.has(e) || i.set(e, /* @__PURE__ */ new Map());
|
|
394
|
+
for (const B of Object.keys(w.locks))
|
|
395
|
+
(x = i.get(e)) == null || x.delete(B);
|
|
396
|
+
return void A.emit(
|
|
397
|
+
Y,
|
|
398
|
+
xt(gt.Release, vt.Success)
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
},
|
|
403
|
+
changeCollabFieldData: ($) => {
|
|
404
|
+
if (!o.value.enabled || q(a.value)) return;
|
|
405
|
+
const v = l.get(e);
|
|
406
|
+
v && v.status === gn.Inactive || a.value.emit("changeFieldData", e, t, $, () => {
|
|
407
|
+
});
|
|
408
|
+
},
|
|
409
|
+
lockedByUser: R,
|
|
410
|
+
collabFieldDataBufferState: s,
|
|
411
|
+
unsubscribeCollabFieldDataChangeListener: u,
|
|
412
|
+
unsubscribeCollabFieldLockStatusListener: C,
|
|
413
|
+
unsubscribeCollabGatheringBufferData: p
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
const ga = {
|
|
417
|
+
key: 0,
|
|
418
|
+
class: "required"
|
|
419
|
+
}, ql = /* @__PURE__ */ Te({
|
|
420
|
+
__name: "AFormTextField",
|
|
421
|
+
props: {
|
|
422
|
+
modelValue: {},
|
|
423
|
+
label: { default: void 0 },
|
|
424
|
+
errorMessage: { default: void 0 },
|
|
425
|
+
required: { type: Boolean, default: void 0 },
|
|
426
|
+
v: { default: null },
|
|
427
|
+
prependIcon: { default: void 0 },
|
|
428
|
+
appendIcon: { default: void 0 },
|
|
429
|
+
dataCy: { default: void 0 },
|
|
430
|
+
hideLabel: { type: Boolean, default: !1 },
|
|
431
|
+
type: { default: "text" },
|
|
432
|
+
step: { default: void 0 },
|
|
433
|
+
maxlength: { default: void 0 },
|
|
434
|
+
collab: { default: void 0 },
|
|
435
|
+
disabled: { type: Boolean, default: void 0 },
|
|
436
|
+
placeholder: { default: void 0 },
|
|
437
|
+
persistentPlaceholder: { type: Boolean, default: !1 },
|
|
438
|
+
help: { default: void 0 }
|
|
439
|
+
},
|
|
440
|
+
emits: ["update:modelValue", "click:append", "blur", "focus"],
|
|
441
|
+
setup(e, { expose: t, emit: n }) {
|
|
442
|
+
const o = e, r = n, a = H(null), { collabOptions: i } = Mt(), s = H((M, F) => {
|
|
443
|
+
}), l = H((M) => {
|
|
444
|
+
}), d = H(null);
|
|
445
|
+
if (i.value.enabled && pe(o.collab)) {
|
|
446
|
+
const {
|
|
447
|
+
releaseCollabFieldLock: M,
|
|
448
|
+
acquireCollabFieldLock: F,
|
|
449
|
+
addCollabFieldLockStatusListener: I,
|
|
450
|
+
addCollabGatheringBufferDataListener: R,
|
|
451
|
+
lockedByUser: D
|
|
452
|
+
} = Vn(o.collab.room, o.collab.field);
|
|
453
|
+
s.value = M, l.value = F, Ce(
|
|
454
|
+
D,
|
|
455
|
+
(T) => {
|
|
456
|
+
d.value = T;
|
|
457
|
+
},
|
|
458
|
+
{ immediate: !0 }
|
|
459
|
+
), I((T) => {
|
|
460
|
+
var b;
|
|
461
|
+
T.status === vt.Failure && T.type === gt.Acquire && ((b = a.value) == null || b.blur());
|
|
462
|
+
}), R(() => {
|
|
463
|
+
var T;
|
|
464
|
+
(T = a.value) == null || T.blur();
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
const { t: u } = ft(), f = Gt($o, void 0), A = Gt(Io, void 0), C = (M) => {
|
|
468
|
+
r("update:modelValue", M);
|
|
469
|
+
}, E = () => {
|
|
470
|
+
var M;
|
|
471
|
+
r("blur", o.modelValue), (M = o.v) == null || M.$touch(), s.value(o.modelValue);
|
|
472
|
+
}, g = () => {
|
|
473
|
+
r("focus", o.modelValue), l.value();
|
|
474
|
+
}, p = J(() => {
|
|
475
|
+
var M, F;
|
|
476
|
+
return pe(o.errorMessage) ? [o.errorMessage] : (F = (M = o.v) == null ? void 0 : M.$errors) != null && F.length ? [o.v.$errors.map((I) => I.$message).join(" ")] : [];
|
|
477
|
+
}), h = J(() => {
|
|
478
|
+
var F, I;
|
|
479
|
+
if (pe(o.label)) return o.label;
|
|
480
|
+
if (q(f) || q(A) || q((F = o.v) == null ? void 0 : F.$path)) return "";
|
|
481
|
+
const { end: M } = Oo((I = o.v) == null ? void 0 : I.$path, ".");
|
|
482
|
+
return u(f + "." + A + ".model." + M);
|
|
483
|
+
}), S = J(() => {
|
|
484
|
+
var M, F;
|
|
485
|
+
return pe(o.required) ? o.required : !!((M = o.v) != null && M.required && ((F = o.v) == null ? void 0 : F.required.$params.type) === "required");
|
|
486
|
+
}), k = J(() => pe(o.disabled) ? o.disabled : !!d.value);
|
|
487
|
+
return t({
|
|
488
|
+
focus: () => {
|
|
489
|
+
var M;
|
|
490
|
+
(M = a.value) == null || M.focus();
|
|
491
|
+
}
|
|
492
|
+
}), (M, F) => (z(), te(Eo, {
|
|
493
|
+
ref_key: "textFieldRef",
|
|
494
|
+
ref: a,
|
|
495
|
+
"prepend-icon": M.prependIcon,
|
|
496
|
+
"data-cy": M.dataCy,
|
|
497
|
+
"error-messages": p.value,
|
|
498
|
+
"model-value": M.modelValue,
|
|
499
|
+
required: S.value,
|
|
500
|
+
type: M.type,
|
|
501
|
+
step: M.step,
|
|
502
|
+
"append-icon": M.appendIcon,
|
|
503
|
+
maxlength: M.maxlength,
|
|
504
|
+
disabled: k.value,
|
|
505
|
+
placeholder: M.placeholder,
|
|
506
|
+
"persistent-placeholder": M.persistentPlaceholder,
|
|
507
|
+
trim: "",
|
|
508
|
+
"onClick:append": F[0] || (F[0] = (I) => r("click:append", I)),
|
|
509
|
+
onBlur: E,
|
|
510
|
+
onFocus: g,
|
|
511
|
+
"onUpdate:modelValue": F[1] || (F[1] = (I) => C(I))
|
|
512
|
+
}, rn({ _: 2 }, [
|
|
513
|
+
M.hideLabel ? void 0 : {
|
|
514
|
+
name: "label",
|
|
515
|
+
fn: j(() => [
|
|
516
|
+
Le(we(h.value), 1),
|
|
517
|
+
S.value ? (z(), Ie("span", ga)) : he("", !0)
|
|
518
|
+
]),
|
|
519
|
+
key: "0"
|
|
520
|
+
},
|
|
521
|
+
d.value ? {
|
|
522
|
+
name: "append-inner",
|
|
523
|
+
fn: j(() => [
|
|
524
|
+
ye(M.$slots, "locked", { userId: d.value }, () => [
|
|
525
|
+
M.collab ? (z(), te(Nn, {
|
|
526
|
+
key: 0,
|
|
527
|
+
id: d.value,
|
|
528
|
+
users: M.collab.cachedUsers
|
|
529
|
+
}, null, 8, ["id", "users"])) : he("", !0)
|
|
530
|
+
])
|
|
531
|
+
]),
|
|
532
|
+
key: "1"
|
|
533
|
+
} : void 0,
|
|
534
|
+
M.$slots.prepend ? {
|
|
535
|
+
name: "prepend",
|
|
536
|
+
fn: j(() => [
|
|
537
|
+
ye(M.$slots, "prepend")
|
|
538
|
+
]),
|
|
539
|
+
key: "2"
|
|
540
|
+
} : void 0,
|
|
541
|
+
M.help ? {
|
|
542
|
+
name: "append",
|
|
543
|
+
fn: j(() => [
|
|
544
|
+
On(U(De, { icon: "mdi-help-circle-outline" }, null, 512), [
|
|
545
|
+
[hr, M.help]
|
|
546
|
+
])
|
|
547
|
+
]),
|
|
548
|
+
key: "3"
|
|
549
|
+
} : void 0
|
|
550
|
+
]), 1032, ["prepend-icon", "data-cy", "error-messages", "model-value", "required", "type", "step", "append-icon", "maxlength", "disabled", "placeholder", "persistent-placeholder"]));
|
|
551
|
+
}
|
|
552
|
+
}), no = ["en", "sk"], ne = mr({
|
|
553
|
+
globalInjection: !1,
|
|
554
|
+
locale: no[0],
|
|
555
|
+
fallbackLocale: !1,
|
|
556
|
+
missing: (e, t) => {
|
|
557
|
+
no.includes(e) && console.warn(`Missing ${e} translation: ${t}`);
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
function va(e = "id") {
|
|
561
|
+
return on({
|
|
562
|
+
sortBy: e,
|
|
563
|
+
descending: !0,
|
|
564
|
+
page: 1,
|
|
565
|
+
rowsPerPage: 25,
|
|
566
|
+
rowsNumber: 0,
|
|
567
|
+
hasNextPage: null,
|
|
568
|
+
currentViewCount: 0,
|
|
569
|
+
totalCount: 0
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
function zl(e) {
|
|
573
|
+
return {
|
|
574
|
+
showPagination: J(() => !(e.page === 1 && e.currentViewCount < e.rowsPerPage))
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
const ba = ["createdAt", "modifiedAt"], jl = "_score", In = {
|
|
578
|
+
Asc: "asc",
|
|
579
|
+
Desc: "desc"
|
|
580
|
+
}, ya = {
|
|
581
|
+
key: "",
|
|
582
|
+
title: void 0,
|
|
583
|
+
sortable: !1,
|
|
584
|
+
fixed: !1
|
|
585
|
+
};
|
|
586
|
+
function Wl(e, t, n = void 0, o = void 0, r = !1, a = void 0, i = void 0, s = void 0, l = void 0) {
|
|
587
|
+
const d = i ?? ne, { t: u } = d.global || d, f = va();
|
|
588
|
+
if (a)
|
|
589
|
+
for (const h of Object.keys(f))
|
|
590
|
+
h in a && (f[h] = a[h]);
|
|
591
|
+
const A = e.map((h) => {
|
|
592
|
+
const S = { ...ya, ...h };
|
|
593
|
+
return q(S.title) && (q(S.title) && ba.includes(S.key) ? S.title = u("common.model.tracking." + S.key) : q(S.title) && n && o ? S.title = u(n + "." + o + ".model." + S.key) : S.title = ""), S;
|
|
594
|
+
}), C = J(() => {
|
|
595
|
+
const h = [];
|
|
596
|
+
return s && h.push({ key: "data-table-expand", sortable: !1 }), A.forEach((S) => {
|
|
597
|
+
t.value.includes(S.key) || h.push(S);
|
|
598
|
+
}), r || h.push({ key: "actions", sortable: !1, fixed: !0 }), h;
|
|
599
|
+
}), E = (h) => {
|
|
600
|
+
if (!h) {
|
|
601
|
+
f.sortBy = null;
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
f.sortBy = h.key, f.descending = h.order === In.Desc;
|
|
605
|
+
}, g = () => {
|
|
606
|
+
if (!l || !localStorage) return;
|
|
607
|
+
const h = localStorage.getItem(l);
|
|
608
|
+
if (!h) return;
|
|
609
|
+
const S = JSON.parse(h);
|
|
610
|
+
ln(S) && sn(S.hidden) && (t.value = S.hidden);
|
|
611
|
+
}, p = (h) => {
|
|
612
|
+
!l || !localStorage || localStorage.setItem(l, JSON.stringify({ hidden: h }));
|
|
613
|
+
};
|
|
614
|
+
return So(() => {
|
|
615
|
+
g();
|
|
616
|
+
}), Ce(t, (h) => {
|
|
617
|
+
p(h);
|
|
618
|
+
}), {
|
|
619
|
+
columnsAll: A,
|
|
620
|
+
columnsVisible: C,
|
|
621
|
+
columnsHidden: t,
|
|
622
|
+
updateSortBy: E,
|
|
623
|
+
pagination: f
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
const Da = /* @__PURE__ */ Te({
|
|
627
|
+
__name: "ADialogToolbar",
|
|
628
|
+
emits: ["onCancel"],
|
|
629
|
+
setup(e, { emit: t }) {
|
|
630
|
+
const n = t, o = () => {
|
|
631
|
+
n("onCancel");
|
|
632
|
+
};
|
|
633
|
+
return (r, a) => (z(), te(Br, {
|
|
634
|
+
density: "compact",
|
|
635
|
+
color: "transparent"
|
|
636
|
+
}, {
|
|
637
|
+
default: j(() => [
|
|
638
|
+
U(Lr, { class: "flex-fill" }, {
|
|
639
|
+
default: j(() => [
|
|
640
|
+
ye(r.$slots, "default")
|
|
641
|
+
]),
|
|
642
|
+
_: 3
|
|
643
|
+
}),
|
|
644
|
+
U(wo),
|
|
645
|
+
U(rt, {
|
|
646
|
+
class: "ml-2",
|
|
647
|
+
icon: "mdi-close",
|
|
648
|
+
size: "small",
|
|
649
|
+
variant: "text",
|
|
650
|
+
"data-cy": "button-close",
|
|
651
|
+
onClick: $e(o, ["stop"])
|
|
652
|
+
})
|
|
653
|
+
]),
|
|
654
|
+
_: 3
|
|
655
|
+
}));
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
(function() {
|
|
659
|
+
var e;
|
|
660
|
+
try {
|
|
661
|
+
if (typeof document < "u") {
|
|
662
|
+
var t = document.createElement("style");
|
|
663
|
+
t.nonce = (e = document.head.querySelector("meta[property=csp-nonce]")) == null ? void 0 : e.content, t.appendChild(document.createTextNode(".vue-notification-group{display:block;position:fixed;z-index:5000}.vue-notification-wrapper{display:block;overflow:hidden;width:100%;margin:0;padding:0}.notification-title{font-weight:600}.vue-notification-template{display:block;box-sizing:border-box;background:#fff;text-align:left}.vue-notification{display:block;box-sizing:border-box;text-align:left;font-size:12px;padding:10px;margin:0 5px 5px;color:#fff;background:#44a4fc;border-left:5px solid #187FE7}.vue-notification.warn{background:#ffb648;border-left-color:#f48a06}.vue-notification.error{background:#e54d42;border-left-color:#b82e24}.vue-notification.success{background:#68cd86;border-left-color:#42a85f}.vn-fade-enter-active,.vn-fade-leave-active,.vn-fade-move{transition:all .5s}.vn-fade-enter-from,.vn-fade-leave-to{opacity:0}")), document.head.appendChild(t);
|
|
664
|
+
}
|
|
665
|
+
} catch (n) {
|
|
666
|
+
console.error("vite-plugin-css-injected-by-js", n);
|
|
667
|
+
}
|
|
668
|
+
})();
|
|
669
|
+
const Yo = /* @__PURE__ */ new Map();
|
|
670
|
+
function Sa(e) {
|
|
671
|
+
return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) {
|
|
672
|
+
var o = e.get(t);
|
|
673
|
+
o ? o.push(n) : e.set(t, [n]);
|
|
674
|
+
}, off: function(t, n) {
|
|
675
|
+
var o = e.get(t);
|
|
676
|
+
o && (n ? o.splice(o.indexOf(n) >>> 0, 1) : e.set(t, []));
|
|
677
|
+
}, emit: function(t, n) {
|
|
678
|
+
var o = e.get(t);
|
|
679
|
+
o && o.slice().map(function(r) {
|
|
680
|
+
r(n);
|
|
681
|
+
}), (o = e.get("*")) && o.slice().map(function(r) {
|
|
682
|
+
r(t, n);
|
|
683
|
+
});
|
|
684
|
+
} };
|
|
685
|
+
}
|
|
686
|
+
const Zt = Sa(), bn = "[-+]?[0-9]*.?[0-9]+", oo = [
|
|
687
|
+
{
|
|
688
|
+
name: "px",
|
|
689
|
+
regexp: new RegExp(`^${bn}px$`)
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: "%",
|
|
693
|
+
regexp: new RegExp(`^${bn}%$`)
|
|
694
|
+
},
|
|
695
|
+
/**
|
|
696
|
+
* Fallback option
|
|
697
|
+
* If no suffix specified, assigning "px"
|
|
698
|
+
*/
|
|
699
|
+
{
|
|
700
|
+
name: "px",
|
|
701
|
+
regexp: new RegExp(`^${bn}$`)
|
|
702
|
+
}
|
|
703
|
+
], wa = (e) => {
|
|
704
|
+
if (e === "auto")
|
|
705
|
+
return {
|
|
706
|
+
type: e,
|
|
707
|
+
value: 0
|
|
708
|
+
};
|
|
709
|
+
for (let t = 0; t < oo.length; t++) {
|
|
710
|
+
const n = oo[t];
|
|
711
|
+
if (n.regexp.test(e))
|
|
712
|
+
return {
|
|
713
|
+
type: n.name,
|
|
714
|
+
value: parseFloat(e)
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
return {
|
|
718
|
+
type: "",
|
|
719
|
+
value: e
|
|
720
|
+
};
|
|
721
|
+
}, Ea = (e) => {
|
|
722
|
+
switch (typeof e) {
|
|
723
|
+
case "number":
|
|
724
|
+
return { type: "px", value: e };
|
|
725
|
+
case "string":
|
|
726
|
+
return wa(e);
|
|
727
|
+
default:
|
|
728
|
+
return { type: "", value: e };
|
|
729
|
+
}
|
|
730
|
+
}, ro = {
|
|
731
|
+
x: /* @__PURE__ */ new Set(["left", "center", "right"]),
|
|
732
|
+
y: /* @__PURE__ */ new Set(["top", "bottom"])
|
|
733
|
+
}, _a = /* @__PURE__ */ ((e) => () => e++)(0), Ca = (e) => typeof e != "string" ? [] : e.split(/\s+/gi).filter(Boolean), Ta = (e) => {
|
|
734
|
+
typeof e == "string" && (e = Ca(e));
|
|
735
|
+
let t = null, n = null;
|
|
736
|
+
return e.forEach((o) => {
|
|
737
|
+
ro.y.has(o) && (n = o), ro.x.has(o) && (t = o);
|
|
738
|
+
}), { x: t, y: n };
|
|
739
|
+
}, yn = {
|
|
740
|
+
position: ["top", "right"],
|
|
741
|
+
cssAnimation: "vn-fade",
|
|
742
|
+
velocityAnimation: {
|
|
743
|
+
enter: (e) => ({
|
|
744
|
+
height: [e.clientHeight, 0],
|
|
745
|
+
opacity: [1, 0]
|
|
746
|
+
}),
|
|
747
|
+
leave: {
|
|
748
|
+
height: 0,
|
|
749
|
+
opacity: [0, 1]
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}, Aa = (e, t) => {
|
|
753
|
+
let n, o, r = t;
|
|
754
|
+
const a = () => {
|
|
755
|
+
o = Date.now(), n = setTimeout(e, r);
|
|
756
|
+
}, i = () => {
|
|
757
|
+
clearTimeout(n), r -= Date.now() - o;
|
|
758
|
+
};
|
|
759
|
+
return a(), {
|
|
760
|
+
start: a,
|
|
761
|
+
stop: i
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
function Ma(e) {
|
|
765
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !ir(e);
|
|
766
|
+
}
|
|
767
|
+
const Ft = {
|
|
768
|
+
IDLE: 0,
|
|
769
|
+
DESTROYED: 2
|
|
770
|
+
}, ka = /* @__PURE__ */ Te({
|
|
771
|
+
// eslint-disable-next-line vue/multi-word-component-names
|
|
772
|
+
name: "notifications",
|
|
773
|
+
props: {
|
|
774
|
+
group: {
|
|
775
|
+
type: String,
|
|
776
|
+
default: ""
|
|
777
|
+
},
|
|
778
|
+
/**
|
|
779
|
+
* Width of notification holder, can be `%`, `px` string or number.
|
|
780
|
+
* @example '100%', '200px', 200
|
|
781
|
+
* */
|
|
782
|
+
width: {
|
|
783
|
+
type: [Number, String],
|
|
784
|
+
default: 300
|
|
785
|
+
},
|
|
786
|
+
reverse: {
|
|
787
|
+
type: Boolean,
|
|
788
|
+
default: !1
|
|
789
|
+
},
|
|
790
|
+
position: {
|
|
791
|
+
type: [String, Array],
|
|
792
|
+
default: () => yn.position
|
|
793
|
+
},
|
|
794
|
+
classes: {
|
|
795
|
+
type: [String, Array],
|
|
796
|
+
default: "vue-notification"
|
|
797
|
+
},
|
|
798
|
+
animationType: {
|
|
799
|
+
type: String,
|
|
800
|
+
default: "css",
|
|
801
|
+
validator(e) {
|
|
802
|
+
return e === "css" || e === "velocity";
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
animation: {
|
|
806
|
+
type: Object,
|
|
807
|
+
default() {
|
|
808
|
+
return yn.velocityAnimation;
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
animationName: {
|
|
812
|
+
type: String,
|
|
813
|
+
default: yn.cssAnimation
|
|
814
|
+
},
|
|
815
|
+
speed: {
|
|
816
|
+
type: Number,
|
|
817
|
+
default: 300
|
|
818
|
+
},
|
|
819
|
+
/** Time (in ms) to keep the notification on screen (if **negative** - notification will stay **forever** or until clicked) */
|
|
820
|
+
duration: {
|
|
821
|
+
type: Number,
|
|
822
|
+
default: 3e3
|
|
823
|
+
},
|
|
824
|
+
delay: {
|
|
825
|
+
type: Number,
|
|
826
|
+
default: 0
|
|
827
|
+
},
|
|
828
|
+
max: {
|
|
829
|
+
type: Number,
|
|
830
|
+
default: 1 / 0
|
|
831
|
+
},
|
|
832
|
+
ignoreDuplicates: {
|
|
833
|
+
type: Boolean,
|
|
834
|
+
default: !1
|
|
835
|
+
},
|
|
836
|
+
closeOnClick: {
|
|
837
|
+
type: Boolean,
|
|
838
|
+
default: !0
|
|
839
|
+
},
|
|
840
|
+
pauseOnHover: {
|
|
841
|
+
type: Boolean,
|
|
842
|
+
default: !1
|
|
843
|
+
},
|
|
844
|
+
/** Use [v-html](https://vuejs.org/api/built-in-directives.html#v-html) to set `title` and `text` */
|
|
845
|
+
dangerouslySetInnerHtml: {
|
|
846
|
+
type: Boolean,
|
|
847
|
+
default: !1
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
emits: {
|
|
851
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
852
|
+
click: (e) => !0,
|
|
853
|
+
destroy: (e) => !0,
|
|
854
|
+
start: (e) => !0
|
|
855
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
856
|
+
},
|
|
857
|
+
slots: Object,
|
|
858
|
+
setup: (e, {
|
|
859
|
+
emit: t,
|
|
860
|
+
slots: n,
|
|
861
|
+
expose: o
|
|
862
|
+
}) => {
|
|
863
|
+
const r = H([]), a = Yo.get("velocity"), i = J(() => e.animationType === "velocity"), s = J(() => r.value.filter((D) => D.state !== Ft.DESTROYED)), l = J(() => Ea(e.width)), d = J(() => {
|
|
864
|
+
const {
|
|
865
|
+
x: D,
|
|
866
|
+
y: T
|
|
867
|
+
} = Ta(e.position), b = l.value.value, $ = l.value.type, v = {
|
|
868
|
+
width: b + $
|
|
869
|
+
};
|
|
870
|
+
return T && (v[T] = "0px"), D && (D === "center" ? v.left = `calc(50% - ${+b / 2}${$})` : v[D] = "0px"), v;
|
|
871
|
+
}), u = J(() => i.value ? {
|
|
872
|
+
onEnter: F,
|
|
873
|
+
onLeave: I,
|
|
874
|
+
onAfterLeave: R
|
|
875
|
+
} : {}), f = (D) => {
|
|
876
|
+
t("click", D), e.closeOnClick && S(D);
|
|
877
|
+
}, A = (D) => {
|
|
878
|
+
var T;
|
|
879
|
+
e.pauseOnHover && ((T = D.timer) == null || T.stop());
|
|
880
|
+
}, C = (D) => {
|
|
881
|
+
var T;
|
|
882
|
+
e.pauseOnHover && ((T = D.timer) == null || T.start());
|
|
883
|
+
}, E = (D = {}) => {
|
|
884
|
+
if (D.group || (D.group = ""), D.data || (D.data = {}), e.group !== D.group)
|
|
885
|
+
return;
|
|
886
|
+
if (D.clean || D.clear) {
|
|
887
|
+
L();
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
const T = typeof D.duration == "number" ? D.duration : e.duration, b = typeof D.speed == "number" ? D.speed : e.speed, $ = typeof D.ignoreDuplicates == "boolean" ? D.ignoreDuplicates : e.ignoreDuplicates, {
|
|
891
|
+
title: v,
|
|
892
|
+
text: y,
|
|
893
|
+
type: m,
|
|
894
|
+
data: c,
|
|
895
|
+
id: _
|
|
896
|
+
} = D, w = {
|
|
897
|
+
id: _ || _a(),
|
|
898
|
+
title: v,
|
|
899
|
+
text: y,
|
|
900
|
+
type: m,
|
|
901
|
+
state: Ft.IDLE,
|
|
902
|
+
speed: b,
|
|
903
|
+
length: T + 2 * b,
|
|
904
|
+
data: c,
|
|
905
|
+
duplicates: 0
|
|
906
|
+
};
|
|
907
|
+
T >= 0 && (w.timer = Aa(() => S(w), w.length));
|
|
908
|
+
const Y = "bottom" in d.value, x = e.reverse ? !Y : Y;
|
|
909
|
+
let B = -1;
|
|
910
|
+
const X = s.value.find((Q) => Q.title === D.title && Q.text === D.text);
|
|
911
|
+
if ($ && X) {
|
|
912
|
+
X.duplicates++;
|
|
913
|
+
return;
|
|
914
|
+
}
|
|
915
|
+
x ? (r.value.push(w), t("start", w), s.value.length > e.max && (B = 0)) : (r.value.unshift(w), t("start", w), s.value.length > e.max && (B = s.value.length - 1)), B !== -1 && S(s.value[B]);
|
|
916
|
+
}, g = (D) => {
|
|
917
|
+
k(D);
|
|
918
|
+
}, p = (D) => ["vue-notification-template", e.classes, D.type || ""], h = (D) => i.value ? void 0 : {
|
|
919
|
+
transition: `all ${D.speed}ms`
|
|
920
|
+
}, S = (D) => {
|
|
921
|
+
var T;
|
|
922
|
+
(T = D.timer) == null || T.stop(), D.state = Ft.DESTROYED, R(), t("destroy", D);
|
|
923
|
+
}, k = (D) => {
|
|
924
|
+
const T = r.value.find((b) => b.id === D);
|
|
925
|
+
T && S(T);
|
|
926
|
+
}, L = () => {
|
|
927
|
+
s.value.forEach(S);
|
|
928
|
+
}, M = (D, T) => {
|
|
929
|
+
var b;
|
|
930
|
+
const $ = (b = e.animation) == null ? void 0 : b[D];
|
|
931
|
+
return typeof $ == "function" ? $(T) : $;
|
|
932
|
+
}, F = (D, T) => {
|
|
933
|
+
const b = M("enter", D);
|
|
934
|
+
a(D, b, {
|
|
935
|
+
duration: e.speed,
|
|
936
|
+
complete: T
|
|
937
|
+
});
|
|
938
|
+
}, I = (D, T) => {
|
|
939
|
+
const b = M("leave", D);
|
|
940
|
+
a(D, b, {
|
|
941
|
+
duration: e.speed,
|
|
942
|
+
complete: T
|
|
943
|
+
});
|
|
944
|
+
};
|
|
945
|
+
function R() {
|
|
946
|
+
r.value = r.value.filter((D) => D.state !== Ft.DESTROYED);
|
|
947
|
+
}
|
|
948
|
+
return So(() => {
|
|
949
|
+
Zt.on("add", E), Zt.on("close", g);
|
|
950
|
+
}), () => {
|
|
951
|
+
let D;
|
|
952
|
+
return U("div", {
|
|
953
|
+
class: "vue-notification-group",
|
|
954
|
+
style: d.value
|
|
955
|
+
}, [U(ar, Xt(u.value, {
|
|
956
|
+
tag: "div",
|
|
957
|
+
css: !i.value,
|
|
958
|
+
name: e.animationName
|
|
959
|
+
}), Ma(D = s.value.map((T) => U("div", {
|
|
960
|
+
key: T.id,
|
|
961
|
+
class: "vue-notification-wrapper",
|
|
962
|
+
style: h(T),
|
|
963
|
+
"data-id": T.id,
|
|
964
|
+
onMouseenter: () => A(T),
|
|
965
|
+
onMouseleave: () => C(T)
|
|
966
|
+
}, [n.body ? n.body({
|
|
967
|
+
item: T,
|
|
968
|
+
class: [e.classes, T.type],
|
|
969
|
+
close: () => S(T)
|
|
970
|
+
}) : U("div", {
|
|
971
|
+
class: p(T),
|
|
972
|
+
onClick: () => f(T)
|
|
973
|
+
}, [e.dangerouslySetInnerHtml ? U(At, null, [T.title ? U("div", {
|
|
974
|
+
class: "notification-title",
|
|
975
|
+
innerHTML: T.title
|
|
976
|
+
}, null) : null, U("div", {
|
|
977
|
+
class: "notification-content",
|
|
978
|
+
innerHTML: T.text
|
|
979
|
+
}, null)]) : U(At, null, [T.title ? U("div", {
|
|
980
|
+
class: "notification-title"
|
|
981
|
+
}, [T.title]) : null, U("div", {
|
|
982
|
+
class: "notification-content"
|
|
983
|
+
}, [T.text])])])]))) ? D : {
|
|
984
|
+
default: () => [D]
|
|
985
|
+
})]);
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
}), ke = (e) => {
|
|
989
|
+
typeof e == "string" && (e = { title: "", text: e }), typeof e == "object" && Zt.emit("add", e);
|
|
990
|
+
};
|
|
991
|
+
ke.close = (e) => {
|
|
992
|
+
Zt.emit("close", e);
|
|
993
|
+
};
|
|
994
|
+
const Oa = "Notifications";
|
|
995
|
+
function $a(e, t = {}) {
|
|
996
|
+
Object.entries(t).forEach((o) => Yo.set(...o));
|
|
997
|
+
const n = t.name || "notify";
|
|
998
|
+
e.config.globalProperties["$" + n] = ke, e.component(t.componentName || Oa, ka);
|
|
999
|
+
}
|
|
1000
|
+
const Gl = {
|
|
1001
|
+
install: $a
|
|
1002
|
+
}, Ia = (e) => e instanceof xa;
|
|
1003
|
+
class xa extends Error {
|
|
1004
|
+
constructor(t, n = "") {
|
|
1005
|
+
super(n), this.name = "AnzuFatalError", this.cause = t, this.message = n;
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
const Fa = 200, Ya = 201, Ra = 202, Ba = 204, Xl = 400, Zl = 401, La = 403, Kl = 404, Pn = 422, Na = [Fa, Ya, Ra, Ba], Jl = (e) => {
|
|
1009
|
+
var t;
|
|
1010
|
+
return an.isAxiosError(e) && ((t = e.response) == null ? void 0 : t.status) === La;
|
|
1011
|
+
}, Va = (e) => e instanceof Pa;
|
|
1012
|
+
class Pa extends Error {
|
|
1013
|
+
constructor(t, n = "") {
|
|
1014
|
+
super(n), this.name = "AnzuApiForbiddenError", this.cause = t, this.message = n;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
const Ha = "validation_failed", Ql = (e) => {
|
|
1018
|
+
var t, n, o;
|
|
1019
|
+
return an.isAxiosError(e) && ((t = e.response) == null ? void 0 : t.status) === Pn && ((n = e.response.data) == null ? void 0 : n.error) === Ha && ((o = e.response.data) == null ? void 0 : o.fields);
|
|
1020
|
+
}, Ua = (e) => e instanceof za;
|
|
1021
|
+
function qa(e, t, n) {
|
|
1022
|
+
var a;
|
|
1023
|
+
const o = (a = e.response) == null ? void 0 : a.data, r = [];
|
|
1024
|
+
for (const [i, s] of Object.entries(o.fields))
|
|
1025
|
+
r.push({
|
|
1026
|
+
field: t + "." + n + ".model." + i,
|
|
1027
|
+
errors: s
|
|
1028
|
+
});
|
|
1029
|
+
return r;
|
|
1030
|
+
}
|
|
1031
|
+
class za extends Error {
|
|
1032
|
+
constructor(n, o, r, a, i = "") {
|
|
1033
|
+
super(i);
|
|
1034
|
+
pt(this, "fields");
|
|
1035
|
+
this.name = "AnzuApiValidationError", this.cause = a, this.message = i, this.fields = qa(n, o, r);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
const ja = (e) => e instanceof Wa;
|
|
1039
|
+
class Wa extends Error {
|
|
1040
|
+
constructor(n, o, r) {
|
|
1041
|
+
super(r);
|
|
1042
|
+
pt(this, "code");
|
|
1043
|
+
this.name = "AnzuApiResponseCodeError", this.cause = o, this.code = n;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
const Ga = "forbidden_operation_error", eu = (e) => {
|
|
1047
|
+
var t, n, o;
|
|
1048
|
+
return an.isAxiosError(e) && ((t = e.response) == null ? void 0 : t.status) === Pn && ((n = e.response.data) == null ? void 0 : n.error) === Ga && ((o = e.response.data) == null ? void 0 : o.detail);
|
|
1049
|
+
}, Xa = (e) => e instanceof Ka;
|
|
1050
|
+
function Za(e) {
|
|
1051
|
+
var n;
|
|
1052
|
+
return ((n = e.response) == null ? void 0 : n.data).detail;
|
|
1053
|
+
}
|
|
1054
|
+
class Ka extends Error {
|
|
1055
|
+
constructor(n, o, r = "") {
|
|
1056
|
+
super(r);
|
|
1057
|
+
pt(this, "detail");
|
|
1058
|
+
this.name = "AnzuApiForbiddenOperationError", this.cause = o, this.message = r, this.detail = Za(n);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
const Ja = "dependency_exists_error", tu = (e) => {
|
|
1062
|
+
var t, n, o;
|
|
1063
|
+
return an.isAxiosError(e) && ((t = e.response) == null ? void 0 : t.status) === Pn && ((n = e.response.data) == null ? void 0 : n.error) === Ja && ((o = e.response.data) == null ? void 0 : o.dependencies);
|
|
1064
|
+
}, Qa = (e) => e instanceof ti;
|
|
1065
|
+
function ei(e) {
|
|
1066
|
+
var n;
|
|
1067
|
+
return ((n = e.response) == null ? void 0 : n.data).dependencies;
|
|
1068
|
+
}
|
|
1069
|
+
class ti extends Error {
|
|
1070
|
+
constructor(n, o, r, a, i = "") {
|
|
1071
|
+
super(i);
|
|
1072
|
+
pt(this, "dependencies");
|
|
1073
|
+
this.name = "AnzuApiDependencyExistsError", this.cause = a, this.message = i, this.dependencies = ei(n);
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
const Fe = 3, ni = `
|
|
1077
|
+
`;
|
|
1078
|
+
function nu() {
|
|
1079
|
+
const e = (p, h = Fe) => {
|
|
1080
|
+
ke({
|
|
1081
|
+
group: "alerts",
|
|
1082
|
+
text: p,
|
|
1083
|
+
duration: h * 1e3,
|
|
1084
|
+
type: "success"
|
|
1085
|
+
});
|
|
1086
|
+
}, t = (p, h = Fe) => {
|
|
1087
|
+
const { t: S } = ne.global;
|
|
1088
|
+
e(S(p), h);
|
|
1089
|
+
}, n = (p, h = Fe) => {
|
|
1090
|
+
ke({
|
|
1091
|
+
group: "alerts",
|
|
1092
|
+
text: p,
|
|
1093
|
+
duration: h * 1e3,
|
|
1094
|
+
type: "error"
|
|
1095
|
+
});
|
|
1096
|
+
}, o = (p, h = Fe) => {
|
|
1097
|
+
const { t: S } = ne.global;
|
|
1098
|
+
n(S(p), h);
|
|
1099
|
+
}, r = (p, h = Fe) => {
|
|
1100
|
+
ke({
|
|
1101
|
+
group: "alerts",
|
|
1102
|
+
text: p,
|
|
1103
|
+
duration: h * 1e3,
|
|
1104
|
+
type: "info"
|
|
1105
|
+
});
|
|
1106
|
+
}, a = (p, h = Fe) => {
|
|
1107
|
+
const { t: S } = ne.global;
|
|
1108
|
+
r(S(p), h);
|
|
1109
|
+
}, i = (p, h = Fe) => {
|
|
1110
|
+
ke({
|
|
1111
|
+
group: "alerts",
|
|
1112
|
+
text: p,
|
|
1113
|
+
duration: h * 1e3,
|
|
1114
|
+
type: "warning"
|
|
1115
|
+
});
|
|
1116
|
+
}, s = (p, h = Fe) => {
|
|
1117
|
+
const { t: S } = ne.global;
|
|
1118
|
+
i(S(p), h);
|
|
1119
|
+
}, l = (p = Fe) => {
|
|
1120
|
+
const { t: h } = ne.global;
|
|
1121
|
+
ke({
|
|
1122
|
+
group: "alerts",
|
|
1123
|
+
text: h("common.alert.fixValidationErrors"),
|
|
1124
|
+
duration: p * 1e3,
|
|
1125
|
+
type: "error"
|
|
1126
|
+
});
|
|
1127
|
+
}, d = (p, h = Fe) => {
|
|
1128
|
+
const { t: S } = ne.global;
|
|
1129
|
+
ke({
|
|
1130
|
+
group: "alerts",
|
|
1131
|
+
text: S("common.alert.recordWas." + p),
|
|
1132
|
+
duration: h * 1e3,
|
|
1133
|
+
type: "success"
|
|
1134
|
+
});
|
|
1135
|
+
}, u = (p, h = -1, S = !1) => {
|
|
1136
|
+
const { t: k, te: L } = ne.global, M = [k("common.alert.fixApiValidationErrors")];
|
|
1137
|
+
for (let F = 0; F < p.length; F++) {
|
|
1138
|
+
let I = "";
|
|
1139
|
+
S ? I += p[F].field : L(p[F].field) ? I += k(p[F].field) : p[F].field.includes("[") && (I += g(p[F].field));
|
|
1140
|
+
const R = /* @__PURE__ */ new Set();
|
|
1141
|
+
for (let D = 0; D < p[F].errors.length; D++) {
|
|
1142
|
+
if (L("error.apiValidation." + p[F].errors[D])) {
|
|
1143
|
+
R.add(k("error.apiValidation." + p[F].errors[D]));
|
|
1144
|
+
continue;
|
|
1145
|
+
}
|
|
1146
|
+
R.add(k("error.apiValidation.noTranslation"));
|
|
1147
|
+
}
|
|
1148
|
+
I.length > 0 && M.push(I + ": " + Array.from(R).join(", "));
|
|
1149
|
+
}
|
|
1150
|
+
ke({
|
|
1151
|
+
group: "alerts",
|
|
1152
|
+
text: M.join(ni),
|
|
1153
|
+
duration: h * 1e3,
|
|
1154
|
+
type: "error"
|
|
1155
|
+
});
|
|
1156
|
+
}, f = (p, h = -1) => {
|
|
1157
|
+
const { t: S, te: k } = ne.global;
|
|
1158
|
+
let L = S("error.apiForbiddenOperation.noTranslation");
|
|
1159
|
+
k("error.apiForbiddenOperation." + p) && (L = S("error.apiForbiddenOperation." + p)), ke({
|
|
1160
|
+
group: "alerts",
|
|
1161
|
+
text: L,
|
|
1162
|
+
duration: h * 1e3,
|
|
1163
|
+
type: "error"
|
|
1164
|
+
});
|
|
1165
|
+
}, A = (p = -1) => {
|
|
1166
|
+
const { t: h } = ne.global;
|
|
1167
|
+
ke({
|
|
1168
|
+
group: "alerts",
|
|
1169
|
+
text: h("common.alert.unknownError"),
|
|
1170
|
+
duration: p * 1e3,
|
|
1171
|
+
type: "error"
|
|
1172
|
+
});
|
|
1173
|
+
}, C = (p = Fe) => {
|
|
1174
|
+
const { t: h } = ne.global;
|
|
1175
|
+
ke({
|
|
1176
|
+
group: "alerts",
|
|
1177
|
+
text: h("common.alert.forbiddenError"),
|
|
1178
|
+
duration: p * 1e3,
|
|
1179
|
+
type: "error"
|
|
1180
|
+
});
|
|
1181
|
+
}, E = (p, h = -1) => Va(p) ? (C(h), !0) : Ua(p) ? (u(p.fields, h), !0) : Qa(p) ? (o("error.apiDependencyExists.message", h), !0) : Xa(p) ? (f(p.detail, h), !0) : Ia(p) || ja(p) ? (A(h), !0) : !1, g = (p) => {
|
|
1182
|
+
const { t: h } = ne.global, S = p.split("["), k = S[0].trim(), L = S[1].split("]"), M = L[0], F = L[1] ?? "";
|
|
1183
|
+
return h(k) + "[" + M + "]: " + h(k.slice(0, -1) + F);
|
|
1184
|
+
};
|
|
1185
|
+
return {
|
|
1186
|
+
showSuccess: e,
|
|
1187
|
+
showSuccessT: t,
|
|
1188
|
+
showError: n,
|
|
1189
|
+
showErrorT: o,
|
|
1190
|
+
showInfo: r,
|
|
1191
|
+
showInfoT: a,
|
|
1192
|
+
showWarning: i,
|
|
1193
|
+
showWarningT: s,
|
|
1194
|
+
showValidationError: l,
|
|
1195
|
+
showRecordWas: d,
|
|
1196
|
+
showApiValidationError: u,
|
|
1197
|
+
showApiForbiddenOperationError: f,
|
|
1198
|
+
showUnknownError: A,
|
|
1199
|
+
showForbiddenError: C,
|
|
1200
|
+
showErrorsDefault: E
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
function Hn(e) {
|
|
1204
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1205
|
+
}
|
|
1206
|
+
var Vt = { exports: {} }, oi = Vt.exports, ao;
|
|
1207
|
+
function ri() {
|
|
1208
|
+
return ao || (ao = 1, function(e, t) {
|
|
1209
|
+
(function(n, o) {
|
|
1210
|
+
e.exports = o();
|
|
1211
|
+
})(oi, function() {
|
|
1212
|
+
var n = 1e3, o = 6e4, r = 36e5, a = "millisecond", i = "second", s = "minute", l = "hour", d = "day", u = "week", f = "month", A = "quarter", C = "year", E = "date", g = "Invalid Date", p = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, S = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(y) {
|
|
1213
|
+
var m = ["th", "st", "nd", "rd"], c = y % 100;
|
|
1214
|
+
return "[" + y + (m[(c - 20) % 10] || m[c] || m[0]) + "]";
|
|
1215
|
+
} }, k = function(y, m, c) {
|
|
1216
|
+
var _ = String(y);
|
|
1217
|
+
return !_ || _.length >= m ? y : "" + Array(m + 1 - _.length).join(c) + y;
|
|
1218
|
+
}, L = { s: k, z: function(y) {
|
|
1219
|
+
var m = -y.utcOffset(), c = Math.abs(m), _ = Math.floor(c / 60), w = c % 60;
|
|
1220
|
+
return (m <= 0 ? "+" : "-") + k(_, 2, "0") + ":" + k(w, 2, "0");
|
|
1221
|
+
}, m: function y(m, c) {
|
|
1222
|
+
if (m.date() < c.date()) return -y(c, m);
|
|
1223
|
+
var _ = 12 * (c.year() - m.year()) + (c.month() - m.month()), w = m.clone().add(_, f), Y = c - w < 0, x = m.clone().add(_ + (Y ? -1 : 1), f);
|
|
1224
|
+
return +(-(_ + (c - w) / (Y ? w - x : x - w)) || 0);
|
|
1225
|
+
}, a: function(y) {
|
|
1226
|
+
return y < 0 ? Math.ceil(y) || 0 : Math.floor(y);
|
|
1227
|
+
}, p: function(y) {
|
|
1228
|
+
return { M: f, y: C, w: u, d, D: E, h: l, m: s, s: i, ms: a, Q: A }[y] || String(y || "").toLowerCase().replace(/s$/, "");
|
|
1229
|
+
}, u: function(y) {
|
|
1230
|
+
return y === void 0;
|
|
1231
|
+
} }, M = "en", F = {};
|
|
1232
|
+
F[M] = S;
|
|
1233
|
+
var I = "$isDayjsObject", R = function(y) {
|
|
1234
|
+
return y instanceof $ || !(!y || !y[I]);
|
|
1235
|
+
}, D = function y(m, c, _) {
|
|
1236
|
+
var w;
|
|
1237
|
+
if (!m) return M;
|
|
1238
|
+
if (typeof m == "string") {
|
|
1239
|
+
var Y = m.toLowerCase();
|
|
1240
|
+
F[Y] && (w = Y), c && (F[Y] = c, w = Y);
|
|
1241
|
+
var x = m.split("-");
|
|
1242
|
+
if (!w && x.length > 1) return y(x[0]);
|
|
1243
|
+
} else {
|
|
1244
|
+
var B = m.name;
|
|
1245
|
+
F[B] = m, w = B;
|
|
1246
|
+
}
|
|
1247
|
+
return !_ && w && (M = w), w || !_ && M;
|
|
1248
|
+
}, T = function(y, m) {
|
|
1249
|
+
if (R(y)) return y.clone();
|
|
1250
|
+
var c = typeof m == "object" ? m : {};
|
|
1251
|
+
return c.date = y, c.args = arguments, new $(c);
|
|
1252
|
+
}, b = L;
|
|
1253
|
+
b.l = D, b.i = R, b.w = function(y, m) {
|
|
1254
|
+
return T(y, { locale: m.$L, utc: m.$u, x: m.$x, $offset: m.$offset });
|
|
1255
|
+
};
|
|
1256
|
+
var $ = function() {
|
|
1257
|
+
function y(c) {
|
|
1258
|
+
this.$L = D(c.locale, null, !0), this.parse(c), this.$x = this.$x || c.x || {}, this[I] = !0;
|
|
1259
|
+
}
|
|
1260
|
+
var m = y.prototype;
|
|
1261
|
+
return m.parse = function(c) {
|
|
1262
|
+
this.$d = function(_) {
|
|
1263
|
+
var w = _.date, Y = _.utc;
|
|
1264
|
+
if (w === null) return /* @__PURE__ */ new Date(NaN);
|
|
1265
|
+
if (b.u(w)) return /* @__PURE__ */ new Date();
|
|
1266
|
+
if (w instanceof Date) return new Date(w);
|
|
1267
|
+
if (typeof w == "string" && !/Z$/i.test(w)) {
|
|
1268
|
+
var x = w.match(p);
|
|
1269
|
+
if (x) {
|
|
1270
|
+
var B = x[2] - 1 || 0, X = (x[7] || "0").substring(0, 3);
|
|
1271
|
+
return Y ? new Date(Date.UTC(x[1], B, x[3] || 1, x[4] || 0, x[5] || 0, x[6] || 0, X)) : new Date(x[1], B, x[3] || 1, x[4] || 0, x[5] || 0, x[6] || 0, X);
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
return new Date(w);
|
|
1275
|
+
}(c), this.init();
|
|
1276
|
+
}, m.init = function() {
|
|
1277
|
+
var c = this.$d;
|
|
1278
|
+
this.$y = c.getFullYear(), this.$M = c.getMonth(), this.$D = c.getDate(), this.$W = c.getDay(), this.$H = c.getHours(), this.$m = c.getMinutes(), this.$s = c.getSeconds(), this.$ms = c.getMilliseconds();
|
|
1279
|
+
}, m.$utils = function() {
|
|
1280
|
+
return b;
|
|
1281
|
+
}, m.isValid = function() {
|
|
1282
|
+
return this.$d.toString() !== g;
|
|
1283
|
+
}, m.isSame = function(c, _) {
|
|
1284
|
+
var w = T(c);
|
|
1285
|
+
return this.startOf(_) <= w && w <= this.endOf(_);
|
|
1286
|
+
}, m.isAfter = function(c, _) {
|
|
1287
|
+
return T(c) < this.startOf(_);
|
|
1288
|
+
}, m.isBefore = function(c, _) {
|
|
1289
|
+
return this.endOf(_) < T(c);
|
|
1290
|
+
}, m.$g = function(c, _, w) {
|
|
1291
|
+
return b.u(c) ? this[_] : this.set(w, c);
|
|
1292
|
+
}, m.unix = function() {
|
|
1293
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
1294
|
+
}, m.valueOf = function() {
|
|
1295
|
+
return this.$d.getTime();
|
|
1296
|
+
}, m.startOf = function(c, _) {
|
|
1297
|
+
var w = this, Y = !!b.u(_) || _, x = b.p(c), B = function(Ne, ce) {
|
|
1298
|
+
var Me = b.w(w.$u ? Date.UTC(w.$y, ce, Ne) : new Date(w.$y, ce, Ne), w);
|
|
1299
|
+
return Y ? Me : Me.endOf(d);
|
|
1300
|
+
}, X = function(Ne, ce) {
|
|
1301
|
+
return b.w(w.toDate()[Ne].apply(w.toDate("s"), (Y ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ce)), w);
|
|
1302
|
+
}, Q = this.$W, le = this.$M, ve = this.$D, Ge = "set" + (this.$u ? "UTC" : "");
|
|
1303
|
+
switch (x) {
|
|
1304
|
+
case C:
|
|
1305
|
+
return Y ? B(1, 0) : B(31, 11);
|
|
1306
|
+
case f:
|
|
1307
|
+
return Y ? B(1, le) : B(0, le + 1);
|
|
1308
|
+
case u:
|
|
1309
|
+
var He = this.$locale().weekStart || 0, et = (Q < He ? Q + 7 : Q) - He;
|
|
1310
|
+
return B(Y ? ve - et : ve + (6 - et), le);
|
|
1311
|
+
case d:
|
|
1312
|
+
case E:
|
|
1313
|
+
return X(Ge + "Hours", 0);
|
|
1314
|
+
case l:
|
|
1315
|
+
return X(Ge + "Minutes", 1);
|
|
1316
|
+
case s:
|
|
1317
|
+
return X(Ge + "Seconds", 2);
|
|
1318
|
+
case i:
|
|
1319
|
+
return X(Ge + "Milliseconds", 3);
|
|
1320
|
+
default:
|
|
1321
|
+
return this.clone();
|
|
1322
|
+
}
|
|
1323
|
+
}, m.endOf = function(c) {
|
|
1324
|
+
return this.startOf(c, !1);
|
|
1325
|
+
}, m.$set = function(c, _) {
|
|
1326
|
+
var w, Y = b.p(c), x = "set" + (this.$u ? "UTC" : ""), B = (w = {}, w[d] = x + "Date", w[E] = x + "Date", w[f] = x + "Month", w[C] = x + "FullYear", w[l] = x + "Hours", w[s] = x + "Minutes", w[i] = x + "Seconds", w[a] = x + "Milliseconds", w)[Y], X = Y === d ? this.$D + (_ - this.$W) : _;
|
|
1327
|
+
if (Y === f || Y === C) {
|
|
1328
|
+
var Q = this.clone().set(E, 1);
|
|
1329
|
+
Q.$d[B](X), Q.init(), this.$d = Q.set(E, Math.min(this.$D, Q.daysInMonth())).$d;
|
|
1330
|
+
} else B && this.$d[B](X);
|
|
1331
|
+
return this.init(), this;
|
|
1332
|
+
}, m.set = function(c, _) {
|
|
1333
|
+
return this.clone().$set(c, _);
|
|
1334
|
+
}, m.get = function(c) {
|
|
1335
|
+
return this[b.p(c)]();
|
|
1336
|
+
}, m.add = function(c, _) {
|
|
1337
|
+
var w, Y = this;
|
|
1338
|
+
c = Number(c);
|
|
1339
|
+
var x = b.p(_), B = function(le) {
|
|
1340
|
+
var ve = T(Y);
|
|
1341
|
+
return b.w(ve.date(ve.date() + Math.round(le * c)), Y);
|
|
1342
|
+
};
|
|
1343
|
+
if (x === f) return this.set(f, this.$M + c);
|
|
1344
|
+
if (x === C) return this.set(C, this.$y + c);
|
|
1345
|
+
if (x === d) return B(1);
|
|
1346
|
+
if (x === u) return B(7);
|
|
1347
|
+
var X = (w = {}, w[s] = o, w[l] = r, w[i] = n, w)[x] || 1, Q = this.$d.getTime() + c * X;
|
|
1348
|
+
return b.w(Q, this);
|
|
1349
|
+
}, m.subtract = function(c, _) {
|
|
1350
|
+
return this.add(-1 * c, _);
|
|
1351
|
+
}, m.format = function(c) {
|
|
1352
|
+
var _ = this, w = this.$locale();
|
|
1353
|
+
if (!this.isValid()) return w.invalidDate || g;
|
|
1354
|
+
var Y = c || "YYYY-MM-DDTHH:mm:ssZ", x = b.z(this), B = this.$H, X = this.$m, Q = this.$M, le = w.weekdays, ve = w.months, Ge = w.meridiem, He = function(ce, Me, Ue, Xe) {
|
|
1355
|
+
return ce && (ce[Me] || ce(_, Y)) || Ue[Me].slice(0, Xe);
|
|
1356
|
+
}, et = function(ce) {
|
|
1357
|
+
return b.s(B % 12 || 12, ce, "0");
|
|
1358
|
+
}, Ne = Ge || function(ce, Me, Ue) {
|
|
1359
|
+
var Xe = ce < 12 ? "AM" : "PM";
|
|
1360
|
+
return Ue ? Xe.toLowerCase() : Xe;
|
|
1361
|
+
};
|
|
1362
|
+
return Y.replace(h, function(ce, Me) {
|
|
1363
|
+
return Me || function(Ue) {
|
|
1364
|
+
switch (Ue) {
|
|
1365
|
+
case "YY":
|
|
1366
|
+
return String(_.$y).slice(-2);
|
|
1367
|
+
case "YYYY":
|
|
1368
|
+
return b.s(_.$y, 4, "0");
|
|
1369
|
+
case "M":
|
|
1370
|
+
return Q + 1;
|
|
1371
|
+
case "MM":
|
|
1372
|
+
return b.s(Q + 1, 2, "0");
|
|
1373
|
+
case "MMM":
|
|
1374
|
+
return He(w.monthsShort, Q, ve, 3);
|
|
1375
|
+
case "MMMM":
|
|
1376
|
+
return He(ve, Q);
|
|
1377
|
+
case "D":
|
|
1378
|
+
return _.$D;
|
|
1379
|
+
case "DD":
|
|
1380
|
+
return b.s(_.$D, 2, "0");
|
|
1381
|
+
case "d":
|
|
1382
|
+
return String(_.$W);
|
|
1383
|
+
case "dd":
|
|
1384
|
+
return He(w.weekdaysMin, _.$W, le, 2);
|
|
1385
|
+
case "ddd":
|
|
1386
|
+
return He(w.weekdaysShort, _.$W, le, 3);
|
|
1387
|
+
case "dddd":
|
|
1388
|
+
return le[_.$W];
|
|
1389
|
+
case "H":
|
|
1390
|
+
return String(B);
|
|
1391
|
+
case "HH":
|
|
1392
|
+
return b.s(B, 2, "0");
|
|
1393
|
+
case "h":
|
|
1394
|
+
return et(1);
|
|
1395
|
+
case "hh":
|
|
1396
|
+
return et(2);
|
|
1397
|
+
case "a":
|
|
1398
|
+
return Ne(B, X, !0);
|
|
1399
|
+
case "A":
|
|
1400
|
+
return Ne(B, X, !1);
|
|
1401
|
+
case "m":
|
|
1402
|
+
return String(X);
|
|
1403
|
+
case "mm":
|
|
1404
|
+
return b.s(X, 2, "0");
|
|
1405
|
+
case "s":
|
|
1406
|
+
return String(_.$s);
|
|
1407
|
+
case "ss":
|
|
1408
|
+
return b.s(_.$s, 2, "0");
|
|
1409
|
+
case "SSS":
|
|
1410
|
+
return b.s(_.$ms, 3, "0");
|
|
1411
|
+
case "Z":
|
|
1412
|
+
return x;
|
|
1413
|
+
}
|
|
1414
|
+
return null;
|
|
1415
|
+
}(ce) || x.replace(":", "");
|
|
1416
|
+
});
|
|
1417
|
+
}, m.utcOffset = function() {
|
|
1418
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1419
|
+
}, m.diff = function(c, _, w) {
|
|
1420
|
+
var Y, x = this, B = b.p(_), X = T(c), Q = (X.utcOffset() - this.utcOffset()) * o, le = this - X, ve = function() {
|
|
1421
|
+
return b.m(x, X);
|
|
1422
|
+
};
|
|
1423
|
+
switch (B) {
|
|
1424
|
+
case C:
|
|
1425
|
+
Y = ve() / 12;
|
|
1426
|
+
break;
|
|
1427
|
+
case f:
|
|
1428
|
+
Y = ve();
|
|
1429
|
+
break;
|
|
1430
|
+
case A:
|
|
1431
|
+
Y = ve() / 3;
|
|
1432
|
+
break;
|
|
1433
|
+
case u:
|
|
1434
|
+
Y = (le - Q) / 6048e5;
|
|
1435
|
+
break;
|
|
1436
|
+
case d:
|
|
1437
|
+
Y = (le - Q) / 864e5;
|
|
1438
|
+
break;
|
|
1439
|
+
case l:
|
|
1440
|
+
Y = le / r;
|
|
1441
|
+
break;
|
|
1442
|
+
case s:
|
|
1443
|
+
Y = le / o;
|
|
1444
|
+
break;
|
|
1445
|
+
case i:
|
|
1446
|
+
Y = le / n;
|
|
1447
|
+
break;
|
|
1448
|
+
default:
|
|
1449
|
+
Y = le;
|
|
1450
|
+
}
|
|
1451
|
+
return w ? Y : b.a(Y);
|
|
1452
|
+
}, m.daysInMonth = function() {
|
|
1453
|
+
return this.endOf(f).$D;
|
|
1454
|
+
}, m.$locale = function() {
|
|
1455
|
+
return F[this.$L];
|
|
1456
|
+
}, m.locale = function(c, _) {
|
|
1457
|
+
if (!c) return this.$L;
|
|
1458
|
+
var w = this.clone(), Y = D(c, _, !0);
|
|
1459
|
+
return Y && (w.$L = Y), w;
|
|
1460
|
+
}, m.clone = function() {
|
|
1461
|
+
return b.w(this.$d, this);
|
|
1462
|
+
}, m.toDate = function() {
|
|
1463
|
+
return new Date(this.valueOf());
|
|
1464
|
+
}, m.toJSON = function() {
|
|
1465
|
+
return this.isValid() ? this.toISOString() : null;
|
|
1466
|
+
}, m.toISOString = function() {
|
|
1467
|
+
return this.$d.toISOString();
|
|
1468
|
+
}, m.toString = function() {
|
|
1469
|
+
return this.$d.toUTCString();
|
|
1470
|
+
}, y;
|
|
1471
|
+
}(), v = $.prototype;
|
|
1472
|
+
return T.prototype = v, [["$ms", a], ["$s", i], ["$m", s], ["$H", l], ["$W", d], ["$M", f], ["$y", C], ["$D", E]].forEach(function(y) {
|
|
1473
|
+
v[y[1]] = function(m) {
|
|
1474
|
+
return this.$g(m, y[0], y[1]);
|
|
1475
|
+
};
|
|
1476
|
+
}), T.extend = function(y, m) {
|
|
1477
|
+
return y.$i || (y(m, $, T), y.$i = !0), T;
|
|
1478
|
+
}, T.locale = D, T.isDayjs = R, T.unix = function(y) {
|
|
1479
|
+
return T(1e3 * y);
|
|
1480
|
+
}, T.en = F[M], T.Ls = F, T.p = {}, T;
|
|
1481
|
+
});
|
|
1482
|
+
}(Vt)), Vt.exports;
|
|
1483
|
+
}
|
|
1484
|
+
var ai = ri();
|
|
1485
|
+
const G = /* @__PURE__ */ Hn(ai);
|
|
1486
|
+
var Pt = { exports: {} }, ii = Pt.exports, io;
|
|
1487
|
+
function si() {
|
|
1488
|
+
return io || (io = 1, function(e, t) {
|
|
1489
|
+
(function(n, o) {
|
|
1490
|
+
e.exports = o();
|
|
1491
|
+
})(ii, function() {
|
|
1492
|
+
var n = "minute", o = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
|
|
1493
|
+
return function(a, i, s) {
|
|
1494
|
+
var l = i.prototype;
|
|
1495
|
+
s.utc = function(g) {
|
|
1496
|
+
var p = { date: g, utc: !0, args: arguments };
|
|
1497
|
+
return new i(p);
|
|
1498
|
+
}, l.utc = function(g) {
|
|
1499
|
+
var p = s(this.toDate(), { locale: this.$L, utc: !0 });
|
|
1500
|
+
return g ? p.add(this.utcOffset(), n) : p;
|
|
1501
|
+
}, l.local = function() {
|
|
1502
|
+
return s(this.toDate(), { locale: this.$L, utc: !1 });
|
|
1503
|
+
};
|
|
1504
|
+
var d = l.parse;
|
|
1505
|
+
l.parse = function(g) {
|
|
1506
|
+
g.utc && (this.$u = !0), this.$utils().u(g.$offset) || (this.$offset = g.$offset), d.call(this, g);
|
|
1507
|
+
};
|
|
1508
|
+
var u = l.init;
|
|
1509
|
+
l.init = function() {
|
|
1510
|
+
if (this.$u) {
|
|
1511
|
+
var g = this.$d;
|
|
1512
|
+
this.$y = g.getUTCFullYear(), this.$M = g.getUTCMonth(), this.$D = g.getUTCDate(), this.$W = g.getUTCDay(), this.$H = g.getUTCHours(), this.$m = g.getUTCMinutes(), this.$s = g.getUTCSeconds(), this.$ms = g.getUTCMilliseconds();
|
|
1513
|
+
} else u.call(this);
|
|
1514
|
+
};
|
|
1515
|
+
var f = l.utcOffset;
|
|
1516
|
+
l.utcOffset = function(g, p) {
|
|
1517
|
+
var h = this.$utils().u;
|
|
1518
|
+
if (h(g)) return this.$u ? 0 : h(this.$offset) ? f.call(this) : this.$offset;
|
|
1519
|
+
if (typeof g == "string" && (g = function(M) {
|
|
1520
|
+
M === void 0 && (M = "");
|
|
1521
|
+
var F = M.match(o);
|
|
1522
|
+
if (!F) return null;
|
|
1523
|
+
var I = ("" + F[0]).match(r) || ["-", 0, 0], R = I[0], D = 60 * +I[1] + +I[2];
|
|
1524
|
+
return D === 0 ? 0 : R === "+" ? D : -D;
|
|
1525
|
+
}(g), g === null)) return this;
|
|
1526
|
+
var S = Math.abs(g) <= 16 ? 60 * g : g, k = this;
|
|
1527
|
+
if (p) return k.$offset = S, k.$u = g === 0, k;
|
|
1528
|
+
if (g !== 0) {
|
|
1529
|
+
var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
1530
|
+
(k = this.local().add(S + L, n)).$offset = S, k.$x.$localOffset = L;
|
|
1531
|
+
} else k = this.utc();
|
|
1532
|
+
return k;
|
|
1533
|
+
};
|
|
1534
|
+
var A = l.format;
|
|
1535
|
+
l.format = function(g) {
|
|
1536
|
+
var p = g || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
1537
|
+
return A.call(this, p);
|
|
1538
|
+
}, l.valueOf = function() {
|
|
1539
|
+
var g = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
1540
|
+
return this.$d.valueOf() - 6e4 * g;
|
|
1541
|
+
}, l.isUTC = function() {
|
|
1542
|
+
return !!this.$u;
|
|
1543
|
+
}, l.toISOString = function() {
|
|
1544
|
+
return this.toDate().toISOString();
|
|
1545
|
+
}, l.toString = function() {
|
|
1546
|
+
return this.toDate().toUTCString();
|
|
1547
|
+
};
|
|
1548
|
+
var C = l.toDate;
|
|
1549
|
+
l.toDate = function(g) {
|
|
1550
|
+
return g === "s" && this.$offset ? s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : C.call(this);
|
|
1551
|
+
};
|
|
1552
|
+
var E = l.diff;
|
|
1553
|
+
l.diff = function(g, p, h) {
|
|
1554
|
+
if (g && this.$u === g.$u) return E.call(this, g, p, h);
|
|
1555
|
+
var S = this.local(), k = s(g).local();
|
|
1556
|
+
return E.call(S, k, p, h);
|
|
1557
|
+
};
|
|
1558
|
+
};
|
|
1559
|
+
});
|
|
1560
|
+
}(Pt)), Pt.exports;
|
|
1561
|
+
}
|
|
1562
|
+
var li = si();
|
|
1563
|
+
const Ro = /* @__PURE__ */ Hn(li);
|
|
1564
|
+
var Ht = { exports: {} }, ui = Ht.exports, so;
|
|
1565
|
+
function ci() {
|
|
1566
|
+
return so || (so = 1, function(e, t) {
|
|
1567
|
+
(function(n, o) {
|
|
1568
|
+
e.exports = o();
|
|
1569
|
+
})(ui, function() {
|
|
1570
|
+
var n = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, o = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, r = /\d/, a = /\d\d/, i = /\d\d?/, s = /\d*[^-_:/,()\s\d]+/, l = {}, d = function(p) {
|
|
1571
|
+
return (p = +p) + (p > 68 ? 1900 : 2e3);
|
|
1572
|
+
}, u = function(p) {
|
|
1573
|
+
return function(h) {
|
|
1574
|
+
this[p] = +h;
|
|
1575
|
+
};
|
|
1576
|
+
}, f = [/[+-]\d\d:?(\d\d)?|Z/, function(p) {
|
|
1577
|
+
(this.zone || (this.zone = {})).offset = function(h) {
|
|
1578
|
+
if (!h || h === "Z") return 0;
|
|
1579
|
+
var S = h.match(/([+-]|\d\d)/g), k = 60 * S[1] + (+S[2] || 0);
|
|
1580
|
+
return k === 0 ? 0 : S[0] === "+" ? -k : k;
|
|
1581
|
+
}(p);
|
|
1582
|
+
}], A = function(p) {
|
|
1583
|
+
var h = l[p];
|
|
1584
|
+
return h && (h.indexOf ? h : h.s.concat(h.f));
|
|
1585
|
+
}, C = function(p, h) {
|
|
1586
|
+
var S, k = l.meridiem;
|
|
1587
|
+
if (k) {
|
|
1588
|
+
for (var L = 1; L <= 24; L += 1) if (p.indexOf(k(L, 0, h)) > -1) {
|
|
1589
|
+
S = L > 12;
|
|
1590
|
+
break;
|
|
1591
|
+
}
|
|
1592
|
+
} else S = p === (h ? "pm" : "PM");
|
|
1593
|
+
return S;
|
|
1594
|
+
}, E = { A: [s, function(p) {
|
|
1595
|
+
this.afternoon = C(p, !1);
|
|
1596
|
+
}], a: [s, function(p) {
|
|
1597
|
+
this.afternoon = C(p, !0);
|
|
1598
|
+
}], Q: [r, function(p) {
|
|
1599
|
+
this.month = 3 * (p - 1) + 1;
|
|
1600
|
+
}], S: [r, function(p) {
|
|
1601
|
+
this.milliseconds = 100 * +p;
|
|
1602
|
+
}], SS: [a, function(p) {
|
|
1603
|
+
this.milliseconds = 10 * +p;
|
|
1604
|
+
}], SSS: [/\d{3}/, function(p) {
|
|
1605
|
+
this.milliseconds = +p;
|
|
1606
|
+
}], s: [i, u("seconds")], ss: [i, u("seconds")], m: [i, u("minutes")], mm: [i, u("minutes")], H: [i, u("hours")], h: [i, u("hours")], HH: [i, u("hours")], hh: [i, u("hours")], D: [i, u("day")], DD: [a, u("day")], Do: [s, function(p) {
|
|
1607
|
+
var h = l.ordinal, S = p.match(/\d+/);
|
|
1608
|
+
if (this.day = S[0], h) for (var k = 1; k <= 31; k += 1) h(k).replace(/\[|\]/g, "") === p && (this.day = k);
|
|
1609
|
+
}], w: [i, u("week")], ww: [a, u("week")], M: [i, u("month")], MM: [a, u("month")], MMM: [s, function(p) {
|
|
1610
|
+
var h = A("months"), S = (A("monthsShort") || h.map(function(k) {
|
|
1611
|
+
return k.slice(0, 3);
|
|
1612
|
+
})).indexOf(p) + 1;
|
|
1613
|
+
if (S < 1) throw new Error();
|
|
1614
|
+
this.month = S % 12 || S;
|
|
1615
|
+
}], MMMM: [s, function(p) {
|
|
1616
|
+
var h = A("months").indexOf(p) + 1;
|
|
1617
|
+
if (h < 1) throw new Error();
|
|
1618
|
+
this.month = h % 12 || h;
|
|
1619
|
+
}], Y: [/[+-]?\d+/, u("year")], YY: [a, function(p) {
|
|
1620
|
+
this.year = d(p);
|
|
1621
|
+
}], YYYY: [/\d{4}/, u("year")], Z: f, ZZ: f };
|
|
1622
|
+
function g(p) {
|
|
1623
|
+
var h, S;
|
|
1624
|
+
h = p, S = l && l.formats;
|
|
1625
|
+
for (var k = (p = h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(T, b, $) {
|
|
1626
|
+
var v = $ && $.toUpperCase();
|
|
1627
|
+
return b || S[$] || n[$] || S[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(y, m, c) {
|
|
1628
|
+
return m || c.slice(1);
|
|
1629
|
+
});
|
|
1630
|
+
})).match(o), L = k.length, M = 0; M < L; M += 1) {
|
|
1631
|
+
var F = k[M], I = E[F], R = I && I[0], D = I && I[1];
|
|
1632
|
+
k[M] = D ? { regex: R, parser: D } : F.replace(/^\[|\]$/g, "");
|
|
1633
|
+
}
|
|
1634
|
+
return function(T) {
|
|
1635
|
+
for (var b = {}, $ = 0, v = 0; $ < L; $ += 1) {
|
|
1636
|
+
var y = k[$];
|
|
1637
|
+
if (typeof y == "string") v += y.length;
|
|
1638
|
+
else {
|
|
1639
|
+
var m = y.regex, c = y.parser, _ = T.slice(v), w = m.exec(_)[0];
|
|
1640
|
+
c.call(b, w), T = T.replace(w, "");
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
return function(Y) {
|
|
1644
|
+
var x = Y.afternoon;
|
|
1645
|
+
if (x !== void 0) {
|
|
1646
|
+
var B = Y.hours;
|
|
1647
|
+
x ? B < 12 && (Y.hours += 12) : B === 12 && (Y.hours = 0), delete Y.afternoon;
|
|
1648
|
+
}
|
|
1649
|
+
}(b), b;
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1652
|
+
return function(p, h, S) {
|
|
1653
|
+
S.p.customParseFormat = !0, p && p.parseTwoDigitYear && (d = p.parseTwoDigitYear);
|
|
1654
|
+
var k = h.prototype, L = k.parse;
|
|
1655
|
+
k.parse = function(M) {
|
|
1656
|
+
var F = M.date, I = M.utc, R = M.args;
|
|
1657
|
+
this.$u = I;
|
|
1658
|
+
var D = R[1];
|
|
1659
|
+
if (typeof D == "string") {
|
|
1660
|
+
var T = R[2] === !0, b = R[3] === !0, $ = T || b, v = R[2];
|
|
1661
|
+
b && (v = R[2]), l = this.$locale(), !T && v && (l = S.Ls[v]), this.$d = function(_, w, Y, x) {
|
|
1662
|
+
try {
|
|
1663
|
+
if (["x", "X"].indexOf(w) > -1) return new Date((w === "X" ? 1e3 : 1) * _);
|
|
1664
|
+
var B = g(w)(_), X = B.year, Q = B.month, le = B.day, ve = B.hours, Ge = B.minutes, He = B.seconds, et = B.milliseconds, Ne = B.zone, ce = B.week, Me = /* @__PURE__ */ new Date(), Ue = le || (X || Q ? 1 : Me.getDate()), Xe = X || Me.getFullYear(), $t = 0;
|
|
1665
|
+
X && !Q || ($t = Q > 0 ? Q - 1 : Me.getMonth());
|
|
1666
|
+
var It, fn = ve || 0, pn = Ge || 0, mn = He || 0, hn = et || 0;
|
|
1667
|
+
return Ne ? new Date(Date.UTC(Xe, $t, Ue, fn, pn, mn, hn + 60 * Ne.offset * 1e3)) : Y ? new Date(Date.UTC(Xe, $t, Ue, fn, pn, mn, hn)) : (It = new Date(Xe, $t, Ue, fn, pn, mn, hn), ce && (It = x(It).week(ce).toDate()), It);
|
|
1668
|
+
} catch {
|
|
1669
|
+
return /* @__PURE__ */ new Date("");
|
|
1670
|
+
}
|
|
1671
|
+
}(F, D, I, S), this.init(), v && v !== !0 && (this.$L = this.locale(v).$L), $ && F != this.format(D) && (this.$d = /* @__PURE__ */ new Date("")), l = {};
|
|
1672
|
+
} else if (D instanceof Array) for (var y = D.length, m = 1; m <= y; m += 1) {
|
|
1673
|
+
R[1] = D[m - 1];
|
|
1674
|
+
var c = S.apply(this, R);
|
|
1675
|
+
if (c.isValid()) {
|
|
1676
|
+
this.$d = c.$d, this.$L = c.$L, this.init();
|
|
1677
|
+
break;
|
|
1678
|
+
}
|
|
1679
|
+
m === y && (this.$d = /* @__PURE__ */ new Date(""));
|
|
1680
|
+
}
|
|
1681
|
+
else L.call(this, M);
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
});
|
|
1685
|
+
}(Ht)), Ht.exports;
|
|
1686
|
+
}
|
|
1687
|
+
var di = ci();
|
|
1688
|
+
const Bo = /* @__PURE__ */ Hn(di);
|
|
1689
|
+
G.extend(Ro);
|
|
1690
|
+
G.extend(Bo);
|
|
1691
|
+
const Qe = ".000000Z", Kt = "YYYY-MM-DDTHH:mm:ss", un = "1970-01-01T00:00:00.000000Z", cn = "2100-01-01T00:00:00.000000Z", ou = () => G().utc().toDate(), ru = (e) => G(e).toDate(), au = () => zr(G().utc().unix()), iu = (e = !0, t = !1) => e && !t ? G().utc().format("YYYY-MM-DDTHH:mm:ss") + Qe : e && t ? G().utc().format("YYYY-MM-DDTHH:mm:00") + Qe : !e && t ? G().utc().format("YYYY-MM-DDTHH:mm:00.SSSSSS") + "Z" : G().utc().format("YYYY-MM-DDTHH:mm:ss.SSSSSS") + "Z", su = (e = 0) => e === 0 ? G().startOf("day").utc().format(Kt) + Qe : G().add(e, "days").startOf("day").utc().format(Kt) + Qe, lu = (e = 0) => e === 0 ? G().endOf("day").utc().format(Kt) + Qe : G().add(e, "days").endOf("day").utc().format(Kt) + Qe, uu = (e = 0, t = null) => (t === null && (t = /* @__PURE__ */ new Date()), e === 0 ? t : e > 0 ? G(t).add(e, "minutes").toDate() : e < 0 ? G(t).subtract(Math.abs(e), "minutes").toDate() : t), lo = (e) => G(e).utc().format("YYYY-MM-DDTHH:mm:ss") + Qe, cu = () => G().utc().format("YYYY"), du = (e, t = "", n = !1) => e === cn || e === un || e === "" || K(e) || q(e) ? t : G(e).format(n ? "DD.MM.YYYY HH:mm:ss" : "DD.MM.YYYY HH:mm"), fu = (e, t = "", n = !1) => {
|
|
1692
|
+
if (e === cn || e === un || e === "" || K(e) || q(e))
|
|
1693
|
+
return t;
|
|
1694
|
+
let o = !0, r = !0;
|
|
1695
|
+
const a = G(e), i = G();
|
|
1696
|
+
return i.format("YYYY") === a.format("YYYY") && (o = !1), i.format("YYYY-MM-DD") === a.format("YYYY-MM-DD") && (r = !1), !o && !r ? G(a).format(n ? "H:mm:ss" : "H:mm") : o ? G(a).format(n ? "D.M.YYYY H:mm:ss" : "D.M.YYYY H:mm") : G(a).format(n ? "D.M. H:mm:ss" : "D.M. H:mm");
|
|
1697
|
+
}, pu = (e, t = "") => e === cn || e === un || e === "" || K(e) || q(e) ? t : G(e).format("DD.MM.YYYY"), mu = (e, t = "") => e === cn || e === un || e === "" || K(e) || q(e) ? t : G(e).format("HH:mm"), hu = (e, t, n = "ms") => {
|
|
1698
|
+
const o = G(e), r = G(t);
|
|
1699
|
+
return o.diff(r, n);
|
|
1700
|
+
}, gu = (e) => typeof e == "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3,6})?Z$/.test(e), fi = (e, t, n = 0, o = !1) => {
|
|
1701
|
+
const r = new Date(e);
|
|
1702
|
+
r.setMonth(r.getMonth() + n), r.setDate(1), r.setHours(0, 0, 0, 0);
|
|
1703
|
+
const a = new Date(e);
|
|
1704
|
+
return o ? a.setMonth(a.getMonth() + 1, 0) : a.setMonth(a.getMonth() + n + 1, 0), a.setHours(23, 59, 59, 999), t === "utc" ? {
|
|
1705
|
+
from: lo(r),
|
|
1706
|
+
until: lo(a)
|
|
1707
|
+
} : { from: r, until: a };
|
|
1708
|
+
}, vu = fi, Lo = (e) => {
|
|
1709
|
+
(e == null ? void 0 : e.currentTarget) instanceof HTMLElement && e.currentTarget.blur();
|
|
1710
|
+
}, bu = /* @__PURE__ */ Te({
|
|
1711
|
+
__name: "AFilterSubmitButton",
|
|
1712
|
+
props: {
|
|
1713
|
+
buttonT: { default: "common.button.submitFilter" },
|
|
1714
|
+
buttonClass: { default: "" },
|
|
1715
|
+
dataCy: { default: "filter-submit" },
|
|
1716
|
+
touched: { type: Boolean, default: !0 }
|
|
1717
|
+
},
|
|
1718
|
+
emits: ["submit"],
|
|
1719
|
+
setup(e, { emit: t }) {
|
|
1720
|
+
const n = t, { t: o } = ft(), r = (a) => {
|
|
1721
|
+
Lo(a), n("submit");
|
|
1722
|
+
};
|
|
1723
|
+
return (a, i) => (z(), te(rt, {
|
|
1724
|
+
class: qe(a.buttonClass),
|
|
1725
|
+
"data-cy": a.dataCy,
|
|
1726
|
+
color: "primary",
|
|
1727
|
+
type: "submit",
|
|
1728
|
+
variant: a.touched ? "flat" : "text",
|
|
1729
|
+
onClick: r
|
|
1730
|
+
}, {
|
|
1731
|
+
default: j(() => [
|
|
1732
|
+
Le(we(ee(o)(a.buttonT)), 1)
|
|
1733
|
+
]),
|
|
1734
|
+
_: 1
|
|
1735
|
+
}, 8, ["class", "data-cy", "variant"]));
|
|
1736
|
+
}
|
|
1737
|
+
}), yu = /* @__PURE__ */ Te({
|
|
1738
|
+
__name: "AFilterResetButton",
|
|
1739
|
+
props: {
|
|
1740
|
+
tooltipT: { default: "common.button.resetFilter" },
|
|
1741
|
+
buttonClass: { default: "ml-2" },
|
|
1742
|
+
dataCy: { default: "filter-reset" }
|
|
1743
|
+
},
|
|
1744
|
+
emits: ["reset"],
|
|
1745
|
+
setup(e, { emit: t }) {
|
|
1746
|
+
const n = t, o = (a) => {
|
|
1747
|
+
Lo(a), n("reset");
|
|
1748
|
+
}, { t: r } = ft();
|
|
1749
|
+
return (a, i) => (z(), te(rt, {
|
|
1750
|
+
class: qe([a.buttonClass, "px-2"]),
|
|
1751
|
+
"data-cy": a.dataCy,
|
|
1752
|
+
color: "light",
|
|
1753
|
+
"min-width": "36px",
|
|
1754
|
+
variant: "flat",
|
|
1755
|
+
onClick: $e(o, ["stop"])
|
|
1756
|
+
}, {
|
|
1757
|
+
default: j(() => [
|
|
1758
|
+
U(De, {
|
|
1759
|
+
color: "grey darken-1",
|
|
1760
|
+
icon: "mdi-filter-remove-outline"
|
|
1761
|
+
}),
|
|
1762
|
+
U(St, {
|
|
1763
|
+
activator: "parent",
|
|
1764
|
+
location: "bottom"
|
|
1765
|
+
}, {
|
|
1766
|
+
default: j(() => [
|
|
1767
|
+
Le(we(ee(r)(a.tooltipT)), 1)
|
|
1768
|
+
]),
|
|
1769
|
+
_: 1
|
|
1770
|
+
})
|
|
1771
|
+
]),
|
|
1772
|
+
_: 1
|
|
1773
|
+
}, 8, ["class", "data-cy"]));
|
|
1774
|
+
}
|
|
1775
|
+
}), pi = (e) => {
|
|
1776
|
+
const t = Object.getOwnPropertyNames(e);
|
|
1777
|
+
for (const n of t) {
|
|
1778
|
+
const o = e[n];
|
|
1779
|
+
o && typeof o == "object" && pi(o);
|
|
1780
|
+
}
|
|
1781
|
+
return Object.freeze(e);
|
|
1782
|
+
}, Du = (e) => Object.keys(e).map((t) => e[t]), Su = (e, t, n = ".") => {
|
|
1783
|
+
const o = t.split(n);
|
|
1784
|
+
let r = e;
|
|
1785
|
+
for (; o.length; ) {
|
|
1786
|
+
const a = o.shift();
|
|
1787
|
+
if (q(a) || !(a in r)) return;
|
|
1788
|
+
r = r[a];
|
|
1789
|
+
}
|
|
1790
|
+
return r;
|
|
1791
|
+
}, mi = (e, t, n, o = ".") => {
|
|
1792
|
+
const r = t.split(o);
|
|
1793
|
+
let a = e;
|
|
1794
|
+
for (; r.length - 1; ) {
|
|
1795
|
+
const i = r.shift();
|
|
1796
|
+
if (q(i)) return;
|
|
1797
|
+
i in a || (a[i] = {}), a = a[i];
|
|
1798
|
+
}
|
|
1799
|
+
a[r[0]] = n;
|
|
1800
|
+
};
|
|
1801
|
+
function wu(e, t, n = ".") {
|
|
1802
|
+
const o = t.split(n), r = o.length - 1;
|
|
1803
|
+
function a(i, s = 0) {
|
|
1804
|
+
const l = o[s];
|
|
1805
|
+
if (s === r) {
|
|
1806
|
+
delete i[l];
|
|
1807
|
+
return;
|
|
1808
|
+
}
|
|
1809
|
+
a(i[l], s + 1);
|
|
1810
|
+
}
|
|
1811
|
+
return a(e), e;
|
|
1812
|
+
}
|
|
1813
|
+
const Eu = (e, t, n = "") => ko(t) ? e : jr(n === "" ? e : n, t), _u = (e) => Na.includes(e), { t: hi } = ne.global;
|
|
1814
|
+
function gi() {
|
|
1815
|
+
return Ae({ t: hi })(vr, {
|
|
1816
|
+
withArguments: !0,
|
|
1817
|
+
messagePath: () => "error.jsValidation.between"
|
|
1818
|
+
});
|
|
1819
|
+
}
|
|
1820
|
+
const { t: vi } = ne.global;
|
|
1821
|
+
function bi() {
|
|
1822
|
+
return Ae({ t: vi })(br, {
|
|
1823
|
+
messagePath: () => "error.jsValidation.email"
|
|
1824
|
+
});
|
|
1825
|
+
}
|
|
1826
|
+
const { t: yi } = ne.global;
|
|
1827
|
+
function Di() {
|
|
1828
|
+
return Ae({ t: yi })(yr, {
|
|
1829
|
+
withArguments: !0,
|
|
1830
|
+
messagePath: () => "error.jsValidation.maxLength"
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
const { t: Si } = ne.global;
|
|
1834
|
+
function wi() {
|
|
1835
|
+
return Ae({ t: Si })(Dr, {
|
|
1836
|
+
withArguments: !0,
|
|
1837
|
+
messagePath: () => "error.jsValidation.maxValue"
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1840
|
+
const { t: Ei } = ne.global;
|
|
1841
|
+
function _i() {
|
|
1842
|
+
return Ae({ t: Ei })(Sr, {
|
|
1843
|
+
withArguments: !0,
|
|
1844
|
+
messagePath: () => "error.jsValidation.minLength"
|
|
1845
|
+
});
|
|
1846
|
+
}
|
|
1847
|
+
const { t: Ci } = ne.global;
|
|
1848
|
+
function Ti() {
|
|
1849
|
+
return Ae({ t: Ci })(wr, {
|
|
1850
|
+
withArguments: !0,
|
|
1851
|
+
messagePath: () => "error.jsValidation.minValue"
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
const { t: Ai } = ne.global;
|
|
1855
|
+
function Mi() {
|
|
1856
|
+
return Ae({ t: Ai })(Er, {
|
|
1857
|
+
messagePath: () => "error.jsValidation.numeric"
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
const { t: ki } = ne.global;
|
|
1861
|
+
function Oi() {
|
|
1862
|
+
return Ae({ t: ki })(_r, {
|
|
1863
|
+
messagePath: () => "error.jsValidation.required"
|
|
1864
|
+
});
|
|
1865
|
+
}
|
|
1866
|
+
const { t: $i } = ne.global;
|
|
1867
|
+
function Ii() {
|
|
1868
|
+
return Ae({ t: $i })(Cr, {
|
|
1869
|
+
withArguments: !0,
|
|
1870
|
+
messagePath: () => "error.jsValidation.required"
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1873
|
+
const { t: xi } = ne.global;
|
|
1874
|
+
function Fi() {
|
|
1875
|
+
return Ae({ t: xi })(_o.regex(/^[a-z\-0-9]+$/), {
|
|
1876
|
+
messagePath: () => "error.jsValidation.slug"
|
|
1877
|
+
});
|
|
1878
|
+
}
|
|
1879
|
+
const { t: Yi } = ne.global;
|
|
1880
|
+
function Ri() {
|
|
1881
|
+
const e = Ae({ t: Yi }), t = (o, r) => (a) => !_o.req(a) || a.every((i) => i.length >= ee(o) && i.length <= ee(r));
|
|
1882
|
+
return e((o, r) => ({
|
|
1883
|
+
$validator: t(o, r),
|
|
1884
|
+
// $message not required when using i18n
|
|
1885
|
+
// $message: (input: { $params: Record<string, any> }) => {
|
|
1886
|
+
// const { $params } = input
|
|
1887
|
+
// return `Item length in list must have between ${$params.min} and ${$params.max} characters.`
|
|
1888
|
+
// },
|
|
1889
|
+
$params: {
|
|
1890
|
+
min: o,
|
|
1891
|
+
max: r,
|
|
1892
|
+
type: "stringArrayItemLength"
|
|
1893
|
+
}
|
|
1894
|
+
}), {
|
|
1895
|
+
withArguments: !0,
|
|
1896
|
+
messagePath: () => "error.jsValidation.stringArrayItemLength"
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
const { t: Bi } = ne.global;
|
|
1900
|
+
function Li() {
|
|
1901
|
+
return Ae({ t: Bi })(Tr, {
|
|
1902
|
+
messagePath: () => "error.jsValidation.url"
|
|
1903
|
+
});
|
|
1904
|
+
}
|
|
1905
|
+
const { t: Ni } = ne.global;
|
|
1906
|
+
function Vi() {
|
|
1907
|
+
const e = Ae({ t: Ni }), t = (o, r, a) => (i) => {
|
|
1908
|
+
const s = ee(o);
|
|
1909
|
+
if (i === null && s === null || i === null || s === null)
|
|
1910
|
+
return !0;
|
|
1911
|
+
const l = new Date(i), d = new Date(s);
|
|
1912
|
+
switch (a) {
|
|
1913
|
+
case "laterThan":
|
|
1914
|
+
return l > d;
|
|
1915
|
+
case "onOrAfter":
|
|
1916
|
+
return l >= d;
|
|
1917
|
+
case "earlierThan":
|
|
1918
|
+
return l < d;
|
|
1919
|
+
case "onOrBefore":
|
|
1920
|
+
return l <= d;
|
|
1921
|
+
default:
|
|
1922
|
+
return !1;
|
|
1923
|
+
}
|
|
1924
|
+
};
|
|
1925
|
+
return e((o, r, a) => ({
|
|
1926
|
+
$validator: t(o, r, a),
|
|
1927
|
+
$params: {
|
|
1928
|
+
otherDateName: ee(r),
|
|
1929
|
+
variant: a,
|
|
1930
|
+
type: "validateDate"
|
|
1931
|
+
}
|
|
1932
|
+
}), {
|
|
1933
|
+
withArguments: !0,
|
|
1934
|
+
messagePath: (o) => `error.jsValidation.datesCompare.${o.$params.variant}`
|
|
1935
|
+
});
|
|
1936
|
+
}
|
|
1937
|
+
function Pi() {
|
|
1938
|
+
return {
|
|
1939
|
+
required: Oi(),
|
|
1940
|
+
requiredIf: Ii(),
|
|
1941
|
+
minLength: _i(),
|
|
1942
|
+
maxLength: Di(),
|
|
1943
|
+
minValue: Ti(),
|
|
1944
|
+
maxValue: wi(),
|
|
1945
|
+
between: gi(),
|
|
1946
|
+
email: bi(),
|
|
1947
|
+
numeric: Mi(),
|
|
1948
|
+
slug: Fi(),
|
|
1949
|
+
url: Li(),
|
|
1950
|
+
stringArrayItemLength: Ri(),
|
|
1951
|
+
datesCompare: Vi()
|
|
1952
|
+
};
|
|
1953
|
+
}
|
|
1954
|
+
const Hi = { class: "a-datetime-picker-time" }, Ui = { class: "a-datetime-picker-time__item a-datetime-picker-time__item" }, qi = { class: "a-datetime-picker-time__arrows" }, zi = { class: "a-datetime-picker-time__item" }, ji = { class: "a-datetime-picker-time__arrows" }, Wi = /* @__PURE__ */ Te({
|
|
1955
|
+
__name: "TimePicker",
|
|
1956
|
+
props: {
|
|
1957
|
+
modelValue: {
|
|
1958
|
+
required: !0
|
|
1959
|
+
},
|
|
1960
|
+
modelModifiers: {}
|
|
1961
|
+
},
|
|
1962
|
+
emits: ["update:modelValue"],
|
|
1963
|
+
setup(e, { expose: t }) {
|
|
1964
|
+
const n = sr(e, "modelValue"), o = H(
|
|
1965
|
+
// eslint-disable-next-line vue/no-ref-object-reactivity-loss
|
|
1966
|
+
n.value ? String(n.value.hours).padStart(2, "0") : "12"
|
|
1967
|
+
), r = H(
|
|
1968
|
+
// eslint-disable-next-line vue/no-ref-object-reactivity-loss
|
|
1969
|
+
n.value ? String(n.value.minutes).padStart(2, "0") : "00"
|
|
1970
|
+
), a = H(null), i = async (E) => {
|
|
1971
|
+
const g = E.target;
|
|
1972
|
+
await ct(), g == null || g.select();
|
|
1973
|
+
}, s = () => {
|
|
1974
|
+
const E = parseInt(o.value || "0");
|
|
1975
|
+
o.value = E >= 0 && E <= 23 ? String(E).padStart(2, "0") : "00";
|
|
1976
|
+
}, l = () => {
|
|
1977
|
+
const E = parseInt(r.value || "0");
|
|
1978
|
+
r.value = E >= 0 && E <= 59 ? String(E).padStart(2, "0") : "00";
|
|
1979
|
+
}, d = () => {
|
|
1980
|
+
const E = parseInt(o.value || "0"), g = isNaN(E) ? 1 : (E + 1) % 24;
|
|
1981
|
+
o.value = String(g).padStart(2, "0");
|
|
1982
|
+
}, u = () => {
|
|
1983
|
+
const E = parseInt(o.value || "0"), g = isNaN(E) ? 23 : (E - 1 + 24) % 24;
|
|
1984
|
+
o.value = String(g).padStart(2, "0");
|
|
1985
|
+
}, f = () => {
|
|
1986
|
+
const E = parseInt(r.value || "0"), g = isNaN(E) ? 1 : (E + 1) % 60;
|
|
1987
|
+
r.value = String(g).padStart(2, "0");
|
|
1988
|
+
}, A = () => {
|
|
1989
|
+
const E = parseInt(r.value || "0"), g = isNaN(E) ? 59 : (E - 1 + 60) % 60;
|
|
1990
|
+
r.value = String(g).padStart(2, "0");
|
|
1991
|
+
}, C = () => {
|
|
1992
|
+
var E;
|
|
1993
|
+
(E = a.value) == null || E.focus();
|
|
1994
|
+
};
|
|
1995
|
+
return Ce([o, r], ([E, g], [p, h]) => {
|
|
1996
|
+
if (E === p && g === h) return;
|
|
1997
|
+
const S = parseInt(E ?? (n.value ? n.value.hours.toString() : "12")), k = parseInt(g ?? (n.value ? n.value.minutes.toString() : "0"));
|
|
1998
|
+
S >= 0 && S <= 23 && k >= 0 && k <= 59 && (n.value = { hours: S, minutes: k });
|
|
1999
|
+
}), t({
|
|
2000
|
+
focus: C
|
|
2001
|
+
}), (E, g) => (z(), Ie("div", Hi, [
|
|
2002
|
+
ue("div", Ui, [
|
|
2003
|
+
On(ue("input", {
|
|
2004
|
+
ref_key: "hoursRef",
|
|
2005
|
+
ref: a,
|
|
2006
|
+
"onUpdate:modelValue": g[0] || (g[0] = (p) => o.value = p),
|
|
2007
|
+
class: "a-datetime-picker-time__input a-datetime-picker-time__input--hours",
|
|
2008
|
+
type: "number",
|
|
2009
|
+
"aria-label": "Hour",
|
|
2010
|
+
tabindex: "-1",
|
|
2011
|
+
step: "1",
|
|
2012
|
+
min: "0",
|
|
2013
|
+
max: "23",
|
|
2014
|
+
maxlength: "2",
|
|
2015
|
+
onFocus: i,
|
|
2016
|
+
onBlur: s
|
|
2017
|
+
}, null, 544), [
|
|
2018
|
+
[Gn, o.value]
|
|
2019
|
+
]),
|
|
2020
|
+
ue("div", qi, [
|
|
2021
|
+
U(De, {
|
|
2022
|
+
icon: "mdi-chevron-up",
|
|
2023
|
+
class: "a-datetime-picker-time__arrow-up",
|
|
2024
|
+
onClick: d
|
|
2025
|
+
}),
|
|
2026
|
+
U(De, {
|
|
2027
|
+
icon: "mdi-chevron-down",
|
|
2028
|
+
class: "a-datetime-picker-time__arrow-down",
|
|
2029
|
+
onClick: u
|
|
2030
|
+
})
|
|
2031
|
+
])
|
|
2032
|
+
]),
|
|
2033
|
+
g[2] || (g[2] = ue("span", { class: "a-datetime-picker-time__separator" }, ":", -1)),
|
|
2034
|
+
ue("div", zi, [
|
|
2035
|
+
On(ue("input", {
|
|
2036
|
+
"onUpdate:modelValue": g[1] || (g[1] = (p) => r.value = p),
|
|
2037
|
+
class: "a-datetime-picker-time__input a-datetime-picker-time__input--minutes",
|
|
2038
|
+
type: "number",
|
|
2039
|
+
"aria-label": "Minute",
|
|
2040
|
+
tabindex: "-1",
|
|
2041
|
+
step: "1",
|
|
2042
|
+
min: "0",
|
|
2043
|
+
max: "59",
|
|
2044
|
+
maxlength: "2",
|
|
2045
|
+
onFocus: i,
|
|
2046
|
+
onBlur: l
|
|
2047
|
+
}, null, 544), [
|
|
2048
|
+
[Gn, r.value]
|
|
2049
|
+
]),
|
|
2050
|
+
ue("div", ji, [
|
|
2051
|
+
U(De, {
|
|
2052
|
+
icon: "mdi-chevron-up",
|
|
2053
|
+
class: "a-datetime-picker-time__arrow-up",
|
|
2054
|
+
onClick: f
|
|
2055
|
+
}),
|
|
2056
|
+
U(De, {
|
|
2057
|
+
icon: "mdi-chevron-down",
|
|
2058
|
+
class: "a-datetime-picker-time__arrow-down",
|
|
2059
|
+
onClick: A
|
|
2060
|
+
})
|
|
2061
|
+
])
|
|
2062
|
+
])
|
|
2063
|
+
]));
|
|
2064
|
+
}
|
|
2065
|
+
}), Gi = /* @__PURE__ */ Ao(Wi, [["__scopeId", "data-v-c3a50ef0"]]), Xi = { class: "ml-1" }, Zi = {
|
|
2066
|
+
key: 0,
|
|
2067
|
+
class: "required"
|
|
2068
|
+
}, Ki = /* @__PURE__ */ Te({
|
|
2069
|
+
__name: "ADatetimePicker",
|
|
2070
|
+
props: {
|
|
2071
|
+
modelValue: {},
|
|
2072
|
+
type: { default: "datetime" },
|
|
2073
|
+
label: { default: "" },
|
|
2074
|
+
hideLabel: { type: Boolean, default: !1 },
|
|
2075
|
+
clearable: { type: Boolean, default: !1 },
|
|
2076
|
+
disabled: { type: Boolean, default: !1 },
|
|
2077
|
+
hideDetails: { type: Boolean, default: !1 },
|
|
2078
|
+
required: { type: Boolean, default: !1 },
|
|
2079
|
+
hideSetToNow: { type: Boolean, default: !1 },
|
|
2080
|
+
placeholder: { default: "" },
|
|
2081
|
+
dataCy: { default: "" },
|
|
2082
|
+
defaultValue: { default: null },
|
|
2083
|
+
errorMessages: { default: void 0 }
|
|
2084
|
+
},
|
|
2085
|
+
emits: ["blur", "focus", "update:modelValue", "onOpen", "onClose", "afterClear"],
|
|
2086
|
+
setup(e, { emit: t }) {
|
|
2087
|
+
const n = e, o = t;
|
|
2088
|
+
G.extend(Ro), G.extend(Bo);
|
|
2089
|
+
const r = H(!1), a = H(0), i = H(0), s = H(null), l = H(""), d = H(null), u = H(null), f = H(null), { t: A } = ft(), C = J(() => n.type === "datetime" ? "dd.mm.yyyy hh:mm" : "dd.mm.yyyy"), { requiredIf: E } = Pi(), g = J(() => ({
|
|
2090
|
+
textFieldValue: {
|
|
2091
|
+
required: E(n.required)
|
|
2092
|
+
}
|
|
2093
|
+
})), p = gr(g, { textFieldValue: l }), h = J(() => n.type === "datetime" ? "DD.MM.YYYY HH:mm" : "DD.MM.YYYY"), S = (b) => {
|
|
2094
|
+
b !== n.modelValue && o("update:modelValue", b);
|
|
2095
|
+
}, k = (b) => {
|
|
2096
|
+
K(b) || ((K(u.value) || b.hour() !== u.value.hours || b.minute() !== u.value.minutes) && (u.value = { hours: b.hour(), minutes: b.minute() }), (K(d.value) || b.year() !== d.value.getFullYear() || b.month() !== d.value.getMonth() || b.date() !== d.value.getDate()) && (d.value = b.toDate()));
|
|
2097
|
+
};
|
|
2098
|
+
Ce(
|
|
2099
|
+
() => n.modelValue,
|
|
2100
|
+
(b, $) => {
|
|
2101
|
+
if (b !== $) {
|
|
2102
|
+
if (K(b) || q(b)) {
|
|
2103
|
+
f.value = null;
|
|
2104
|
+
return;
|
|
2105
|
+
}
|
|
2106
|
+
f.value = G(b, "YYYY-MM-DDTHH:mm:ss.SSSSSSZ").millisecond(0);
|
|
2107
|
+
}
|
|
2108
|
+
},
|
|
2109
|
+
{ immediate: !0 }
|
|
2110
|
+
);
|
|
2111
|
+
const L = (b, $) => K(b) ? $ : $.set("date", b.getDate()).set("month", b.getMonth()).set("year", b.getFullYear()), M = (b, $) => K(b) ? $ : $.set("hour", b.hours).set("minute", b.minutes);
|
|
2112
|
+
Ce([u, d], ([b, $]) => {
|
|
2113
|
+
let v = null;
|
|
2114
|
+
K(f.value) ? K(n.modelValue) ? v = G().hour(0).minute(0).second(0).millisecond(0) : v = G(n.modelValue, "YYYY-MM-DDTHH:mm:ss.SSSSSSZ") : v = f.value, v = M(b, v), v = L($, v), !v.isSame(Bn(f.value)) && (f.value = v);
|
|
2115
|
+
}), Ce(
|
|
2116
|
+
f,
|
|
2117
|
+
(b) => {
|
|
2118
|
+
if (K(b)) {
|
|
2119
|
+
l.value = "", S(null);
|
|
2120
|
+
return;
|
|
2121
|
+
}
|
|
2122
|
+
const $ = b.utc().format("YYYY-MM-DDTHH:mm:ss") + Qe;
|
|
2123
|
+
l.value = b.format(h.value), k(b), S($);
|
|
2124
|
+
},
|
|
2125
|
+
{ immediate: !0 }
|
|
2126
|
+
), Ce(r, (b) => {
|
|
2127
|
+
if (b) {
|
|
2128
|
+
I(), ct(() => {
|
|
2129
|
+
a.value++;
|
|
2130
|
+
}), o("onOpen");
|
|
2131
|
+
return;
|
|
2132
|
+
}
|
|
2133
|
+
o("onClose");
|
|
2134
|
+
});
|
|
2135
|
+
const F = J(() => pe(n.errorMessages) ? n.errorMessages : p.value.textFieldValue.$errors.length ? [p.value.textFieldValue.$errors.map((b) => b.$message).join(" ")] : []), I = () => {
|
|
2136
|
+
const b = l.value.replace(/[^\s\d.:]/g, "").trim();
|
|
2137
|
+
if (b.length === 0 && !n.required) {
|
|
2138
|
+
f.value = null, o("blur");
|
|
2139
|
+
return;
|
|
2140
|
+
}
|
|
2141
|
+
const $ = G(b, ["DD.MM.YYYY HH:mm", "DD.MM.YYYY"]);
|
|
2142
|
+
if ($.isValid()) {
|
|
2143
|
+
let v = 0;
|
|
2144
|
+
if (!K(n.modelValue)) {
|
|
2145
|
+
const y = G(n.modelValue, "YYYY-MM-DDTHH:mm:ss.SSSSSSZ");
|
|
2146
|
+
y.isValid() && (v = y.second());
|
|
2147
|
+
}
|
|
2148
|
+
f.value = $.second(v), p.value.textFieldValue.$touch(), o("blur");
|
|
2149
|
+
return;
|
|
2150
|
+
}
|
|
2151
|
+
K(f.value) || (l.value = f.value.format(h.value)), p.value.textFieldValue.$touch(), o("blur");
|
|
2152
|
+
}, R = () => {
|
|
2153
|
+
if (K(n.defaultValue) || q(n.defaultValue)) {
|
|
2154
|
+
f.value = null, d.value = null, u.value = null, o("afterClear");
|
|
2155
|
+
return;
|
|
2156
|
+
}
|
|
2157
|
+
f.value = G(n.defaultValue, "YYYY-MM-DDTHH:mm:ss.SSSSSSZ"), o("afterClear");
|
|
2158
|
+
}, D = () => {
|
|
2159
|
+
o("focus");
|
|
2160
|
+
}, T = () => {
|
|
2161
|
+
f.value = G().second(0).millisecond(0), ct(() => {
|
|
2162
|
+
a.value++, i.value++;
|
|
2163
|
+
});
|
|
2164
|
+
};
|
|
2165
|
+
return (b, $) => (z(), te(Eo, {
|
|
2166
|
+
ref_key: "textFieldRef",
|
|
2167
|
+
ref: s,
|
|
2168
|
+
modelValue: l.value,
|
|
2169
|
+
"onUpdate:modelValue": $[3] || ($[3] = (v) => l.value = v),
|
|
2170
|
+
"error-messages": F.value,
|
|
2171
|
+
"persistent-placeholder": !0,
|
|
2172
|
+
placeholder: C.value,
|
|
2173
|
+
class: "a-datetime-picker",
|
|
2174
|
+
"hide-details": "auto",
|
|
2175
|
+
disabled: b.disabled,
|
|
2176
|
+
onBlur: I,
|
|
2177
|
+
onFocus: D,
|
|
2178
|
+
onKeyup: lr(I, ["enter"])
|
|
2179
|
+
}, rn({
|
|
2180
|
+
"append-inner": j(() => [
|
|
2181
|
+
b.clearable && b.defaultValue !== b.modelValue ? (z(), te(De, {
|
|
2182
|
+
key: 0,
|
|
2183
|
+
class: "a-datetime-picker__clearable-icon",
|
|
2184
|
+
icon: "mdi-close-circle",
|
|
2185
|
+
onClick: $e(R, ["stop"])
|
|
2186
|
+
})) : he("", !0),
|
|
2187
|
+
b.disabled ? he("", !0) : (z(), te(To, {
|
|
2188
|
+
key: 1,
|
|
2189
|
+
location: "bottom end",
|
|
2190
|
+
origin: "top end",
|
|
2191
|
+
"close-on-content-click": !1,
|
|
2192
|
+
"onUpdate:modelValue": $[2] || ($[2] = (v) => r.value = v)
|
|
2193
|
+
}, {
|
|
2194
|
+
activator: j(({ props: v }) => [
|
|
2195
|
+
U(De, Xt({
|
|
2196
|
+
class: "a-datetime-picker__calendar-icon",
|
|
2197
|
+
icon: "mdi-calendar",
|
|
2198
|
+
size: "small"
|
|
2199
|
+
}, v), null, 16)
|
|
2200
|
+
]),
|
|
2201
|
+
default: j(() => [
|
|
2202
|
+
r.value ? (z(), te(Co, { key: 0 }, {
|
|
2203
|
+
default: j(() => [
|
|
2204
|
+
(z(), te(Mr, Xt({
|
|
2205
|
+
key: a.value,
|
|
2206
|
+
modelValue: d.value,
|
|
2207
|
+
"onUpdate:modelValue": $[0] || ($[0] = (v) => d.value = v),
|
|
2208
|
+
class: "a-datetime-picker-calendar",
|
|
2209
|
+
color: "primary",
|
|
2210
|
+
"show-adjacent-months": ""
|
|
2211
|
+
}, b.$attrs), null, 16, ["modelValue"])),
|
|
2212
|
+
(z(), te(Gi, {
|
|
2213
|
+
key: i.value,
|
|
2214
|
+
modelValue: u.value,
|
|
2215
|
+
"onUpdate:modelValue": $[1] || ($[1] = (v) => u.value = v)
|
|
2216
|
+
}, null, 8, ["modelValue"])),
|
|
2217
|
+
ue("button", {
|
|
2218
|
+
type: "button",
|
|
2219
|
+
class: "a-datetime-picker__now-button",
|
|
2220
|
+
tabindex: "-1",
|
|
2221
|
+
onClick: T
|
|
2222
|
+
}, we(ee(A)("common.time.now")), 1)
|
|
2223
|
+
]),
|
|
2224
|
+
_: 1
|
|
2225
|
+
})) : he("", !0)
|
|
2226
|
+
]),
|
|
2227
|
+
_: 1
|
|
2228
|
+
})),
|
|
2229
|
+
ue("div", Xi, [
|
|
2230
|
+
ye(b.$slots, "append-inner", {}, void 0, !0)
|
|
2231
|
+
])
|
|
2232
|
+
]),
|
|
2233
|
+
_: 2
|
|
2234
|
+
}, [
|
|
2235
|
+
b.hideLabel ? void 0 : {
|
|
2236
|
+
name: "label",
|
|
2237
|
+
fn: j(() => [
|
|
2238
|
+
Le(we(b.label), 1),
|
|
2239
|
+
b.required ? (z(), Ie("span", Zi)) : he("", !0)
|
|
2240
|
+
]),
|
|
2241
|
+
key: "0"
|
|
2242
|
+
}
|
|
2243
|
+
]), 1032, ["modelValue", "error-messages", "placeholder", "disabled"]));
|
|
2244
|
+
}
|
|
2245
|
+
}), Ji = /* @__PURE__ */ Ao(Ki, [["__scopeId", "data-v-1ccd69ae"]]), Cu = /* @__PURE__ */ Te({
|
|
2246
|
+
__name: "AFormDatetimePicker",
|
|
2247
|
+
props: {
|
|
2248
|
+
modelValue: {},
|
|
2249
|
+
label: { default: void 0 },
|
|
2250
|
+
errorMessage: { default: void 0 },
|
|
2251
|
+
required: { type: Boolean, default: void 0 },
|
|
2252
|
+
v: { default: null },
|
|
2253
|
+
dataCy: { default: void 0 },
|
|
2254
|
+
clearable: { type: Boolean, default: !1 },
|
|
2255
|
+
collab: { default: void 0 },
|
|
2256
|
+
disabled: { type: Boolean, default: void 0 }
|
|
2257
|
+
},
|
|
2258
|
+
emits: ["update:modelValue", "click:append", "blur", "focus"],
|
|
2259
|
+
setup(e, { emit: t }) {
|
|
2260
|
+
const n = e, o = t, r = J({
|
|
2261
|
+
get() {
|
|
2262
|
+
return n.modelValue;
|
|
2263
|
+
},
|
|
2264
|
+
set(I) {
|
|
2265
|
+
o("update:modelValue", I);
|
|
2266
|
+
}
|
|
2267
|
+
}), { collabOptions: a } = Mt(), i = H((I) => {
|
|
2268
|
+
}), s = H((I) => {
|
|
2269
|
+
}), l = H(() => {
|
|
2270
|
+
}), d = H(null);
|
|
2271
|
+
if (a.value.enabled && pe(n.collab)) {
|
|
2272
|
+
const { releaseCollabFieldLock: I, changeCollabFieldData: R, acquireCollabFieldLock: D, lockedByUser: T } = Vn(
|
|
2273
|
+
n.collab.room,
|
|
2274
|
+
n.collab.field
|
|
2275
|
+
);
|
|
2276
|
+
i.value = I, s.value = R, l.value = D, Ce(
|
|
2277
|
+
T,
|
|
2278
|
+
(b) => {
|
|
2279
|
+
d.value = b;
|
|
2280
|
+
},
|
|
2281
|
+
{ immediate: !0 }
|
|
2282
|
+
);
|
|
2283
|
+
}
|
|
2284
|
+
const u = H(!1), f = H(!1), A = () => {
|
|
2285
|
+
u.value = !0, l.value();
|
|
2286
|
+
}, C = () => {
|
|
2287
|
+
i.value(n.modelValue), u.value = !0;
|
|
2288
|
+
}, { t: E } = ft(), g = Gt($o, void 0), p = Gt(Io, void 0), h = () => {
|
|
2289
|
+
var I;
|
|
2290
|
+
f.value = !1, o("blur", q(n.modelValue) ? null : n.modelValue), (I = n.v) == null || I.$touch(), u.value === !1 && i.value(n.modelValue);
|
|
2291
|
+
}, S = () => {
|
|
2292
|
+
f.value = !0, o("focus", n.modelValue), l.value();
|
|
2293
|
+
}, k = J(() => {
|
|
2294
|
+
var I, R;
|
|
2295
|
+
return pe(n.errorMessage) ? [n.errorMessage] : (R = (I = n.v) == null ? void 0 : I.$errors) != null && R.length ? [n.v.$errors.map((D) => D.$message).join(" ")] : [];
|
|
2296
|
+
}), L = J(() => {
|
|
2297
|
+
var R, D;
|
|
2298
|
+
if (pe(n.label)) return n.label;
|
|
2299
|
+
if (q(g) || q(p) || q((R = n.v) == null ? void 0 : R.$path)) return "";
|
|
2300
|
+
const { end: I } = Oo((D = n.v) == null ? void 0 : D.$path, ".");
|
|
2301
|
+
return E(g + "." + p + ".model." + I);
|
|
2302
|
+
}), M = J(() => {
|
|
2303
|
+
var I, R;
|
|
2304
|
+
return pe(n.required) ? n.required : !!((I = n.v) != null && I.required && ((R = n.v) == null ? void 0 : R.required.$params.type) === "required");
|
|
2305
|
+
}), F = J(() => pe(n.disabled) ? n.disabled : !!d.value);
|
|
2306
|
+
return Ce(r, (I, R) => {
|
|
2307
|
+
I !== R && a.value.enabled && (f.value || u.value) && s.value(I);
|
|
2308
|
+
}), (I, R) => (z(), te(Ji, Xt({
|
|
2309
|
+
modelValue: r.value,
|
|
2310
|
+
"onUpdate:modelValue": R[0] || (R[0] = (D) => r.value = D),
|
|
2311
|
+
"data-cy": I.dataCy,
|
|
2312
|
+
"error-messages": k.value,
|
|
2313
|
+
required: M.value,
|
|
2314
|
+
disabled: F.value,
|
|
2315
|
+
label: L.value,
|
|
2316
|
+
clearable: I.clearable
|
|
2317
|
+
}, I.$attrs, {
|
|
2318
|
+
onBlur: h,
|
|
2319
|
+
onFocus: S,
|
|
2320
|
+
onOnOpen: A,
|
|
2321
|
+
onOnClose: C
|
|
2322
|
+
}), {
|
|
2323
|
+
"append-inner": j(() => [
|
|
2324
|
+
ye(I.$slots, "locked", { userId: d.value }, () => [
|
|
2325
|
+
I.collab ? (z(), te(Nn, {
|
|
2326
|
+
key: 0,
|
|
2327
|
+
id: d.value,
|
|
2328
|
+
users: I.collab.cachedUsers
|
|
2329
|
+
}, null, 8, ["id", "users"])) : he("", !0)
|
|
2330
|
+
])
|
|
2331
|
+
]),
|
|
2332
|
+
_: 3
|
|
2333
|
+
}, 16, ["modelValue", "data-cy", "error-messages", "required", "disabled", "label", "clearable"]));
|
|
2334
|
+
}
|
|
2335
|
+
}), Tu = /* @__PURE__ */ Te({
|
|
2336
|
+
__name: "AFormSwitch",
|
|
2337
|
+
props: {
|
|
2338
|
+
modelValue: { type: Boolean },
|
|
2339
|
+
label: { default: void 0 },
|
|
2340
|
+
dataCy: { default: void 0 },
|
|
2341
|
+
hideLabel: { type: Boolean, default: !1 },
|
|
2342
|
+
collab: { default: void 0 },
|
|
2343
|
+
disabled: { type: Boolean, default: void 0 }
|
|
2344
|
+
},
|
|
2345
|
+
emits: ["update:modelValue", "blur", "focus"],
|
|
2346
|
+
setup(e, { emit: t }) {
|
|
2347
|
+
const n = e, o = t, { collabOptions: r } = Mt(), a = H((C) => {
|
|
2348
|
+
}), i = H(() => {
|
|
2349
|
+
}), s = H(null);
|
|
2350
|
+
if (r.value.enabled && pe(n.collab)) {
|
|
2351
|
+
const { releaseCollabFieldLock: C, acquireCollabFieldLock: E, lockedByUser: g } = Vn(
|
|
2352
|
+
n.collab.room,
|
|
2353
|
+
n.collab.field
|
|
2354
|
+
);
|
|
2355
|
+
a.value = C, i.value = E, Ce(
|
|
2356
|
+
g,
|
|
2357
|
+
(p) => {
|
|
2358
|
+
s.value = p;
|
|
2359
|
+
},
|
|
2360
|
+
{ immediate: !0 }
|
|
2361
|
+
);
|
|
2362
|
+
}
|
|
2363
|
+
const l = () => {
|
|
2364
|
+
i.value(), setTimeout(() => {
|
|
2365
|
+
a.value(n.modelValue);
|
|
2366
|
+
}, 500);
|
|
2367
|
+
}, d = (C) => {
|
|
2368
|
+
o("update:modelValue", C);
|
|
2369
|
+
}, u = () => {
|
|
2370
|
+
o("blur", n.modelValue), a.value(n.modelValue);
|
|
2371
|
+
}, f = () => {
|
|
2372
|
+
o("focus", n.modelValue), i.value();
|
|
2373
|
+
}, A = J(() => pe(n.disabled) ? n.disabled : !!s.value);
|
|
2374
|
+
return (C, E) => (z(), te(Rr, {
|
|
2375
|
+
"data-cy": C.dataCy,
|
|
2376
|
+
"model-value": C.modelValue,
|
|
2377
|
+
disabled: A.value,
|
|
2378
|
+
onBlur: u,
|
|
2379
|
+
onFocus: f,
|
|
2380
|
+
"onUpdate:modelValue": E[0] || (E[0] = (g) => d(g)),
|
|
2381
|
+
onClick: $e(l, ["stop"])
|
|
2382
|
+
}, rn({ _: 2 }, [
|
|
2383
|
+
C.hideLabel ? void 0 : {
|
|
2384
|
+
name: "label",
|
|
2385
|
+
fn: j(() => [
|
|
2386
|
+
Le(we(C.label), 1)
|
|
2387
|
+
]),
|
|
2388
|
+
key: "0"
|
|
2389
|
+
},
|
|
2390
|
+
s.value ? {
|
|
2391
|
+
name: "append",
|
|
2392
|
+
fn: j(() => [
|
|
2393
|
+
ye(C.$slots, "locked", { userId: s.value }, () => [
|
|
2394
|
+
C.collab ? (z(), te(Nn, {
|
|
2395
|
+
key: 0,
|
|
2396
|
+
id: s.value,
|
|
2397
|
+
users: C.collab.cachedUsers
|
|
2398
|
+
}, null, 8, ["id", "users"])) : he("", !0)
|
|
2399
|
+
])
|
|
2400
|
+
]),
|
|
2401
|
+
key: "1"
|
|
2402
|
+
} : void 0
|
|
2403
|
+
]), 1032, ["data-cy", "model-value", "disabled"]));
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
function Au() {
|
|
2407
|
+
const e = H([]), t = (u) => {
|
|
2408
|
+
s("limit", u);
|
|
2409
|
+
}, n = (u, f) => {
|
|
2410
|
+
s("offset", u * f - f);
|
|
2411
|
+
}, o = (u, f) => {
|
|
2412
|
+
!K(u) && u.length > 0 && s("order[" + u + "]", f ? In.Desc : In.Asc);
|
|
2413
|
+
}, r = (u) => Kn(u) ? u ? "1" : "0" : u, a = (u, f, A) => {
|
|
2414
|
+
Nt(A) && A.length === 0 || e.value.push("filter_" + u + "[" + f + "]=" + r(A));
|
|
2415
|
+
}, i = (u) => {
|
|
2416
|
+
const f = u.model;
|
|
2417
|
+
return K(f) ? u.mandatory ? (u.model = u.default, u.default) : null : Nt(f) ? f.length === 0 ? u.mandatory ? (u.model = u.default, u.default) : null : encodeURIComponent(f) : sn(f) ? f.length === 0 ? u.mandatory ? (u.model = u.default, u.default) : null : f.map((A) => Nt(A) ? encodeURIComponent(A) : A).join(",") : Mo(f) || Kn(f) ? f : null;
|
|
2418
|
+
}, s = (u, f) => {
|
|
2419
|
+
e.value.push(u + "=" + f);
|
|
2420
|
+
};
|
|
2421
|
+
return {
|
|
2422
|
+
querySetLimit: t,
|
|
2423
|
+
querySetOffset: n,
|
|
2424
|
+
querySetOrder: o,
|
|
2425
|
+
queryAddFilter: a,
|
|
2426
|
+
querySetFilters: (u) => {
|
|
2427
|
+
const f = !q(u._elastic);
|
|
2428
|
+
for (const A in u) {
|
|
2429
|
+
const C = u[A], E = C.field || A;
|
|
2430
|
+
if (C.exclude)
|
|
2431
|
+
continue;
|
|
2432
|
+
const g = i(C);
|
|
2433
|
+
if (!K(g)) {
|
|
2434
|
+
if (f) {
|
|
2435
|
+
s(E, g);
|
|
2436
|
+
continue;
|
|
2437
|
+
}
|
|
2438
|
+
a(C.variant, E, g);
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
},
|
|
2442
|
+
queryAdd: s,
|
|
2443
|
+
queryBuild: () => "?" + e.value.join("&")
|
|
2444
|
+
};
|
|
2445
|
+
}
|
|
2446
|
+
const Mu = (e) => ln(e) && Object.hasOwn(e, "totalCount"), ku = (e) => ln(e) && Object.hasOwn(e, "hasNextPage");
|
|
2447
|
+
/**!
|
|
2448
|
+
* Sortable 1.15.6
|
|
2449
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
2450
|
+
* @author owenm <owen23355@gmail.com>
|
|
2451
|
+
* @license MIT
|
|
2452
|
+
*/
|
|
2453
|
+
function uo(e, t) {
|
|
2454
|
+
var n = Object.keys(e);
|
|
2455
|
+
if (Object.getOwnPropertySymbols) {
|
|
2456
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
2457
|
+
t && (o = o.filter(function(r) {
|
|
2458
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
2459
|
+
})), n.push.apply(n, o);
|
|
2460
|
+
}
|
|
2461
|
+
return n;
|
|
2462
|
+
}
|
|
2463
|
+
function Pe(e) {
|
|
2464
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
2465
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
2466
|
+
t % 2 ? uo(Object(n), !0).forEach(function(o) {
|
|
2467
|
+
Qi(e, o, n[o]);
|
|
2468
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : uo(Object(n)).forEach(function(o) {
|
|
2469
|
+
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
return e;
|
|
2473
|
+
}
|
|
2474
|
+
function Ut(e) {
|
|
2475
|
+
"@babel/helpers - typeof";
|
|
2476
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ut = function(t) {
|
|
2477
|
+
return typeof t;
|
|
2478
|
+
} : Ut = function(t) {
|
|
2479
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2480
|
+
}, Ut(e);
|
|
2481
|
+
}
|
|
2482
|
+
function Qi(e, t, n) {
|
|
2483
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
2484
|
+
value: n,
|
|
2485
|
+
enumerable: !0,
|
|
2486
|
+
configurable: !0,
|
|
2487
|
+
writable: !0
|
|
2488
|
+
}) : e[t] = n, e;
|
|
2489
|
+
}
|
|
2490
|
+
function je() {
|
|
2491
|
+
return je = Object.assign || function(e) {
|
|
2492
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
2493
|
+
var n = arguments[t];
|
|
2494
|
+
for (var o in n)
|
|
2495
|
+
Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
2496
|
+
}
|
|
2497
|
+
return e;
|
|
2498
|
+
}, je.apply(this, arguments);
|
|
2499
|
+
}
|
|
2500
|
+
function es(e, t) {
|
|
2501
|
+
if (e == null) return {};
|
|
2502
|
+
var n = {}, o = Object.keys(e), r, a;
|
|
2503
|
+
for (a = 0; a < o.length; a++)
|
|
2504
|
+
r = o[a], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
|
|
2505
|
+
return n;
|
|
2506
|
+
}
|
|
2507
|
+
function ts(e, t) {
|
|
2508
|
+
if (e == null) return {};
|
|
2509
|
+
var n = es(e, t), o, r;
|
|
2510
|
+
if (Object.getOwnPropertySymbols) {
|
|
2511
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
2512
|
+
for (r = 0; r < a.length; r++)
|
|
2513
|
+
o = a[r], !(t.indexOf(o) >= 0) && Object.prototype.propertyIsEnumerable.call(e, o) && (n[o] = e[o]);
|
|
2514
|
+
}
|
|
2515
|
+
return n;
|
|
2516
|
+
}
|
|
2517
|
+
var ns = "1.15.6";
|
|
2518
|
+
function ze(e) {
|
|
2519
|
+
if (typeof window < "u" && window.navigator)
|
|
2520
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2521
|
+
}
|
|
2522
|
+
var We = ze(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), kt = ze(/Edge/i), co = ze(/firefox/i), wt = ze(/safari/i) && !ze(/chrome/i) && !ze(/android/i), Un = ze(/iP(ad|od|hone)/i), No = ze(/chrome/i) && ze(/android/i), Vo = {
|
|
2523
|
+
capture: !1,
|
|
2524
|
+
passive: !1
|
|
2525
|
+
};
|
|
2526
|
+
function Z(e, t, n) {
|
|
2527
|
+
e.addEventListener(t, n, !We && Vo);
|
|
2528
|
+
}
|
|
2529
|
+
function W(e, t, n) {
|
|
2530
|
+
e.removeEventListener(t, n, !We && Vo);
|
|
2531
|
+
}
|
|
2532
|
+
function Jt(e, t) {
|
|
2533
|
+
if (t) {
|
|
2534
|
+
if (t[0] === ">" && (t = t.substring(1)), e)
|
|
2535
|
+
try {
|
|
2536
|
+
if (e.matches)
|
|
2537
|
+
return e.matches(t);
|
|
2538
|
+
if (e.msMatchesSelector)
|
|
2539
|
+
return e.msMatchesSelector(t);
|
|
2540
|
+
if (e.webkitMatchesSelector)
|
|
2541
|
+
return e.webkitMatchesSelector(t);
|
|
2542
|
+
} catch {
|
|
2543
|
+
return !1;
|
|
2544
|
+
}
|
|
2545
|
+
return !1;
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
function Po(e) {
|
|
2549
|
+
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2550
|
+
}
|
|
2551
|
+
function Be(e, t, n, o) {
|
|
2552
|
+
if (e) {
|
|
2553
|
+
n = n || document;
|
|
2554
|
+
do {
|
|
2555
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && Jt(e, t) : Jt(e, t)) || o && e === n)
|
|
2556
|
+
return e;
|
|
2557
|
+
if (e === n) break;
|
|
2558
|
+
} while (e = Po(e));
|
|
2559
|
+
}
|
|
2560
|
+
return null;
|
|
2561
|
+
}
|
|
2562
|
+
var fo = /\s+/g;
|
|
2563
|
+
function Ee(e, t, n) {
|
|
2564
|
+
if (e && t)
|
|
2565
|
+
if (e.classList)
|
|
2566
|
+
e.classList[n ? "add" : "remove"](t);
|
|
2567
|
+
else {
|
|
2568
|
+
var o = (" " + e.className + " ").replace(fo, " ").replace(" " + t + " ", " ");
|
|
2569
|
+
e.className = (o + (n ? " " + t : "")).replace(fo, " ");
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2572
|
+
function N(e, t, n) {
|
|
2573
|
+
var o = e && e.style;
|
|
2574
|
+
if (o) {
|
|
2575
|
+
if (n === void 0)
|
|
2576
|
+
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
2577
|
+
!(t in o) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), o[t] = n + (typeof n == "string" ? "" : "px");
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
function ut(e, t) {
|
|
2581
|
+
var n = "";
|
|
2582
|
+
if (typeof e == "string")
|
|
2583
|
+
n = e;
|
|
2584
|
+
else
|
|
2585
|
+
do {
|
|
2586
|
+
var o = N(e, "transform");
|
|
2587
|
+
o && o !== "none" && (n = o + " " + n);
|
|
2588
|
+
} while (!t && (e = e.parentNode));
|
|
2589
|
+
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2590
|
+
return r && new r(n);
|
|
2591
|
+
}
|
|
2592
|
+
function Ho(e, t, n) {
|
|
2593
|
+
if (e) {
|
|
2594
|
+
var o = e.getElementsByTagName(t), r = 0, a = o.length;
|
|
2595
|
+
if (n)
|
|
2596
|
+
for (; r < a; r++)
|
|
2597
|
+
n(o[r], r);
|
|
2598
|
+
return o;
|
|
2599
|
+
}
|
|
2600
|
+
return [];
|
|
2601
|
+
}
|
|
2602
|
+
function Ve() {
|
|
2603
|
+
var e = document.scrollingElement;
|
|
2604
|
+
return e || document.documentElement;
|
|
2605
|
+
}
|
|
2606
|
+
function se(e, t, n, o, r) {
|
|
2607
|
+
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2608
|
+
var a, i, s, l, d, u, f;
|
|
2609
|
+
if (e !== window && e.parentNode && e !== Ve() ? (a = e.getBoundingClientRect(), i = a.top, s = a.left, l = a.bottom, d = a.right, u = a.height, f = a.width) : (i = 0, s = 0, l = window.innerHeight, d = window.innerWidth, u = window.innerHeight, f = window.innerWidth), (t || n) && e !== window && (r = r || e.parentNode, !We))
|
|
2610
|
+
do
|
|
2611
|
+
if (r && r.getBoundingClientRect && (N(r, "transform") !== "none" || n && N(r, "position") !== "static")) {
|
|
2612
|
+
var A = r.getBoundingClientRect();
|
|
2613
|
+
i -= A.top + parseInt(N(r, "border-top-width")), s -= A.left + parseInt(N(r, "border-left-width")), l = i + a.height, d = s + a.width;
|
|
2614
|
+
break;
|
|
2615
|
+
}
|
|
2616
|
+
while (r = r.parentNode);
|
|
2617
|
+
if (o && e !== window) {
|
|
2618
|
+
var C = ut(r || e), E = C && C.a, g = C && C.d;
|
|
2619
|
+
C && (i /= g, s /= E, f /= E, u /= g, l = i + u, d = s + f);
|
|
2620
|
+
}
|
|
2621
|
+
return {
|
|
2622
|
+
top: i,
|
|
2623
|
+
left: s,
|
|
2624
|
+
bottom: l,
|
|
2625
|
+
right: d,
|
|
2626
|
+
width: f,
|
|
2627
|
+
height: u
|
|
2628
|
+
};
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
function po(e, t, n) {
|
|
2632
|
+
for (var o = Je(e, !0), r = se(e)[t]; o; ) {
|
|
2633
|
+
var a = se(o)[n], i = void 0;
|
|
2634
|
+
if (i = r >= a, !i) return o;
|
|
2635
|
+
if (o === Ve()) break;
|
|
2636
|
+
o = Je(o, !1);
|
|
2637
|
+
}
|
|
2638
|
+
return !1;
|
|
2639
|
+
}
|
|
2640
|
+
function dt(e, t, n, o) {
|
|
2641
|
+
for (var r = 0, a = 0, i = e.children; a < i.length; ) {
|
|
2642
|
+
if (i[a].style.display !== "none" && i[a] !== V.ghost && (o || i[a] !== V.dragged) && Be(i[a], n.draggable, e, !1)) {
|
|
2643
|
+
if (r === t)
|
|
2644
|
+
return i[a];
|
|
2645
|
+
r++;
|
|
2646
|
+
}
|
|
2647
|
+
a++;
|
|
2648
|
+
}
|
|
2649
|
+
return null;
|
|
2650
|
+
}
|
|
2651
|
+
function qn(e, t) {
|
|
2652
|
+
for (var n = e.lastElementChild; n && (n === V.ghost || N(n, "display") === "none" || t && !Jt(n, t)); )
|
|
2653
|
+
n = n.previousElementSibling;
|
|
2654
|
+
return n || null;
|
|
2655
|
+
}
|
|
2656
|
+
function Oe(e, t) {
|
|
2657
|
+
var n = 0;
|
|
2658
|
+
if (!e || !e.parentNode)
|
|
2659
|
+
return -1;
|
|
2660
|
+
for (; e = e.previousElementSibling; )
|
|
2661
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== V.clone && (!t || Jt(e, t)) && n++;
|
|
2662
|
+
return n;
|
|
2663
|
+
}
|
|
2664
|
+
function mo(e) {
|
|
2665
|
+
var t = 0, n = 0, o = Ve();
|
|
2666
|
+
if (e)
|
|
2667
|
+
do {
|
|
2668
|
+
var r = ut(e), a = r.a, i = r.d;
|
|
2669
|
+
t += e.scrollLeft * a, n += e.scrollTop * i;
|
|
2670
|
+
} while (e !== o && (e = e.parentNode));
|
|
2671
|
+
return [t, n];
|
|
2672
|
+
}
|
|
2673
|
+
function os(e, t) {
|
|
2674
|
+
for (var n in e)
|
|
2675
|
+
if (e.hasOwnProperty(n)) {
|
|
2676
|
+
for (var o in t)
|
|
2677
|
+
if (t.hasOwnProperty(o) && t[o] === e[n][o]) return Number(n);
|
|
2678
|
+
}
|
|
2679
|
+
return -1;
|
|
2680
|
+
}
|
|
2681
|
+
function Je(e, t) {
|
|
2682
|
+
if (!e || !e.getBoundingClientRect) return Ve();
|
|
2683
|
+
var n = e, o = !1;
|
|
2684
|
+
do
|
|
2685
|
+
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2686
|
+
var r = N(n);
|
|
2687
|
+
if (n.clientWidth < n.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
2688
|
+
if (!n.getBoundingClientRect || n === document.body) return Ve();
|
|
2689
|
+
if (o || t) return n;
|
|
2690
|
+
o = !0;
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
while (n = n.parentNode);
|
|
2694
|
+
return Ve();
|
|
2695
|
+
}
|
|
2696
|
+
function rs(e, t) {
|
|
2697
|
+
if (e && t)
|
|
2698
|
+
for (var n in t)
|
|
2699
|
+
t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2700
|
+
return e;
|
|
2701
|
+
}
|
|
2702
|
+
function Dn(e, t) {
|
|
2703
|
+
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
2704
|
+
}
|
|
2705
|
+
var Et;
|
|
2706
|
+
function Uo(e, t) {
|
|
2707
|
+
return function() {
|
|
2708
|
+
if (!Et) {
|
|
2709
|
+
var n = arguments, o = this;
|
|
2710
|
+
n.length === 1 ? e.call(o, n[0]) : e.apply(o, n), Et = setTimeout(function() {
|
|
2711
|
+
Et = void 0;
|
|
2712
|
+
}, t);
|
|
2713
|
+
}
|
|
2714
|
+
};
|
|
2715
|
+
}
|
|
2716
|
+
function as() {
|
|
2717
|
+
clearTimeout(Et), Et = void 0;
|
|
2718
|
+
}
|
|
2719
|
+
function qo(e, t, n) {
|
|
2720
|
+
e.scrollLeft += t, e.scrollTop += n;
|
|
2721
|
+
}
|
|
2722
|
+
function zo(e) {
|
|
2723
|
+
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2724
|
+
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2725
|
+
}
|
|
2726
|
+
function jo(e, t, n) {
|
|
2727
|
+
var o = {};
|
|
2728
|
+
return Array.from(e.children).forEach(function(r) {
|
|
2729
|
+
var a, i, s, l;
|
|
2730
|
+
if (!(!Be(r, t.draggable, e, !1) || r.animated || r === n)) {
|
|
2731
|
+
var d = se(r);
|
|
2732
|
+
o.left = Math.min((a = o.left) !== null && a !== void 0 ? a : 1 / 0, d.left), o.top = Math.min((i = o.top) !== null && i !== void 0 ? i : 1 / 0, d.top), o.right = Math.max((s = o.right) !== null && s !== void 0 ? s : -1 / 0, d.right), o.bottom = Math.max((l = o.bottom) !== null && l !== void 0 ? l : -1 / 0, d.bottom);
|
|
2733
|
+
}
|
|
2734
|
+
}), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
2735
|
+
}
|
|
2736
|
+
var Se = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2737
|
+
function is() {
|
|
2738
|
+
var e = [], t;
|
|
2739
|
+
return {
|
|
2740
|
+
captureAnimationState: function() {
|
|
2741
|
+
if (e = [], !!this.options.animation) {
|
|
2742
|
+
var o = [].slice.call(this.el.children);
|
|
2743
|
+
o.forEach(function(r) {
|
|
2744
|
+
if (!(N(r, "display") === "none" || r === V.ghost)) {
|
|
2745
|
+
e.push({
|
|
2746
|
+
target: r,
|
|
2747
|
+
rect: se(r)
|
|
2748
|
+
});
|
|
2749
|
+
var a = Pe({}, e[e.length - 1].rect);
|
|
2750
|
+
if (r.thisAnimationDuration) {
|
|
2751
|
+
var i = ut(r, !0);
|
|
2752
|
+
i && (a.top -= i.f, a.left -= i.e);
|
|
2753
|
+
}
|
|
2754
|
+
r.fromRect = a;
|
|
2755
|
+
}
|
|
2756
|
+
});
|
|
2757
|
+
}
|
|
2758
|
+
},
|
|
2759
|
+
addAnimationState: function(o) {
|
|
2760
|
+
e.push(o);
|
|
2761
|
+
},
|
|
2762
|
+
removeAnimationState: function(o) {
|
|
2763
|
+
e.splice(os(e, {
|
|
2764
|
+
target: o
|
|
2765
|
+
}), 1);
|
|
2766
|
+
},
|
|
2767
|
+
animateAll: function(o) {
|
|
2768
|
+
var r = this;
|
|
2769
|
+
if (!this.options.animation) {
|
|
2770
|
+
clearTimeout(t), typeof o == "function" && o();
|
|
2771
|
+
return;
|
|
2772
|
+
}
|
|
2773
|
+
var a = !1, i = 0;
|
|
2774
|
+
e.forEach(function(s) {
|
|
2775
|
+
var l = 0, d = s.target, u = d.fromRect, f = se(d), A = d.prevFromRect, C = d.prevToRect, E = s.rect, g = ut(d, !0);
|
|
2776
|
+
g && (f.top -= g.f, f.left -= g.e), d.toRect = f, d.thisAnimationDuration && Dn(A, f) && !Dn(u, f) && // Make sure animatingRect is on line between toRect & fromRect
|
|
2777
|
+
(E.top - f.top) / (E.left - f.left) === (u.top - f.top) / (u.left - f.left) && (l = ls(E, A, C, r.options)), Dn(f, u) || (d.prevFromRect = u, d.prevToRect = f, l || (l = r.options.animation), r.animate(d, E, f, l)), l && (a = !0, i = Math.max(i, l), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
|
|
2778
|
+
d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
|
|
2779
|
+
}, l), d.thisAnimationDuration = l);
|
|
2780
|
+
}), clearTimeout(t), a ? t = setTimeout(function() {
|
|
2781
|
+
typeof o == "function" && o();
|
|
2782
|
+
}, i) : typeof o == "function" && o(), e = [];
|
|
2783
|
+
},
|
|
2784
|
+
animate: function(o, r, a, i) {
|
|
2785
|
+
if (i) {
|
|
2786
|
+
N(o, "transition", ""), N(o, "transform", "");
|
|
2787
|
+
var s = ut(this.el), l = s && s.a, d = s && s.d, u = (r.left - a.left) / (l || 1), f = (r.top - a.top) / (d || 1);
|
|
2788
|
+
o.animatingX = !!u, o.animatingY = !!f, N(o, "transform", "translate3d(" + u + "px," + f + "px,0)"), this.forRepaintDummy = ss(o), N(o, "transition", "transform " + i + "ms" + (this.options.easing ? " " + this.options.easing : "")), N(o, "transform", "translate3d(0,0,0)"), typeof o.animated == "number" && clearTimeout(o.animated), o.animated = setTimeout(function() {
|
|
2789
|
+
N(o, "transition", ""), N(o, "transform", ""), o.animated = !1, o.animatingX = !1, o.animatingY = !1;
|
|
2790
|
+
}, i);
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
};
|
|
2794
|
+
}
|
|
2795
|
+
function ss(e) {
|
|
2796
|
+
return e.offsetWidth;
|
|
2797
|
+
}
|
|
2798
|
+
function ls(e, t, n, o) {
|
|
2799
|
+
return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - n.top, 2) + Math.pow(t.left - n.left, 2)) * o.animation;
|
|
2800
|
+
}
|
|
2801
|
+
var at = [], Sn = {
|
|
2802
|
+
initializeByDefault: !0
|
|
2803
|
+
}, Ot = {
|
|
2804
|
+
mount: function(t) {
|
|
2805
|
+
for (var n in Sn)
|
|
2806
|
+
Sn.hasOwnProperty(n) && !(n in t) && (t[n] = Sn[n]);
|
|
2807
|
+
at.forEach(function(o) {
|
|
2808
|
+
if (o.pluginName === t.pluginName)
|
|
2809
|
+
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
2810
|
+
}), at.push(t);
|
|
2811
|
+
},
|
|
2812
|
+
pluginEvent: function(t, n, o) {
|
|
2813
|
+
var r = this;
|
|
2814
|
+
this.eventCanceled = !1, o.cancel = function() {
|
|
2815
|
+
r.eventCanceled = !0;
|
|
2816
|
+
};
|
|
2817
|
+
var a = t + "Global";
|
|
2818
|
+
at.forEach(function(i) {
|
|
2819
|
+
n[i.pluginName] && (n[i.pluginName][a] && n[i.pluginName][a](Pe({
|
|
2820
|
+
sortable: n
|
|
2821
|
+
}, o)), n.options[i.pluginName] && n[i.pluginName][t] && n[i.pluginName][t](Pe({
|
|
2822
|
+
sortable: n
|
|
2823
|
+
}, o)));
|
|
2824
|
+
});
|
|
2825
|
+
},
|
|
2826
|
+
initializePlugins: function(t, n, o, r) {
|
|
2827
|
+
at.forEach(function(s) {
|
|
2828
|
+
var l = s.pluginName;
|
|
2829
|
+
if (!(!t.options[l] && !s.initializeByDefault)) {
|
|
2830
|
+
var d = new s(t, n, t.options);
|
|
2831
|
+
d.sortable = t, d.options = t.options, t[l] = d, je(o, d.defaults);
|
|
2832
|
+
}
|
|
2833
|
+
});
|
|
2834
|
+
for (var a in t.options)
|
|
2835
|
+
if (t.options.hasOwnProperty(a)) {
|
|
2836
|
+
var i = this.modifyOption(t, a, t.options[a]);
|
|
2837
|
+
typeof i < "u" && (t.options[a] = i);
|
|
2838
|
+
}
|
|
2839
|
+
},
|
|
2840
|
+
getEventProperties: function(t, n) {
|
|
2841
|
+
var o = {};
|
|
2842
|
+
return at.forEach(function(r) {
|
|
2843
|
+
typeof r.eventProperties == "function" && je(o, r.eventProperties.call(n[r.pluginName], t));
|
|
2844
|
+
}), o;
|
|
2845
|
+
},
|
|
2846
|
+
modifyOption: function(t, n, o) {
|
|
2847
|
+
var r;
|
|
2848
|
+
return at.forEach(function(a) {
|
|
2849
|
+
t[a.pluginName] && a.optionListeners && typeof a.optionListeners[n] == "function" && (r = a.optionListeners[n].call(t[a.pluginName], o));
|
|
2850
|
+
}), r;
|
|
2851
|
+
}
|
|
2852
|
+
};
|
|
2853
|
+
function us(e) {
|
|
2854
|
+
var t = e.sortable, n = e.rootEl, o = e.name, r = e.targetEl, a = e.cloneEl, i = e.toEl, s = e.fromEl, l = e.oldIndex, d = e.newIndex, u = e.oldDraggableIndex, f = e.newDraggableIndex, A = e.originalEvent, C = e.putSortable, E = e.extraEventProperties;
|
|
2855
|
+
if (t = t || n && n[Se], !!t) {
|
|
2856
|
+
var g, p = t.options, h = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
2857
|
+
window.CustomEvent && !We && !kt ? g = new CustomEvent(o, {
|
|
2858
|
+
bubbles: !0,
|
|
2859
|
+
cancelable: !0
|
|
2860
|
+
}) : (g = document.createEvent("Event"), g.initEvent(o, !0, !0)), g.to = i || n, g.from = s || n, g.item = r || n, g.clone = a, g.oldIndex = l, g.newIndex = d, g.oldDraggableIndex = u, g.newDraggableIndex = f, g.originalEvent = A, g.pullMode = C ? C.lastPutMode : void 0;
|
|
2861
|
+
var S = Pe(Pe({}, E), Ot.getEventProperties(o, t));
|
|
2862
|
+
for (var k in S)
|
|
2863
|
+
g[k] = S[k];
|
|
2864
|
+
n && n.dispatchEvent(g), p[h] && p[h].call(t, g);
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2867
|
+
var cs = ["evt"], be = function(t, n) {
|
|
2868
|
+
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = o.evt, a = ts(o, cs);
|
|
2869
|
+
Ot.pluginEvent.bind(V)(t, n, Pe({
|
|
2870
|
+
dragEl: O,
|
|
2871
|
+
parentEl: ae,
|
|
2872
|
+
ghostEl: P,
|
|
2873
|
+
rootEl: oe,
|
|
2874
|
+
nextEl: ot,
|
|
2875
|
+
lastDownEl: qt,
|
|
2876
|
+
cloneEl: re,
|
|
2877
|
+
cloneHidden: Ke,
|
|
2878
|
+
dragStarted: bt,
|
|
2879
|
+
putSortable: fe,
|
|
2880
|
+
activeSortable: V.active,
|
|
2881
|
+
originalEvent: r,
|
|
2882
|
+
oldIndex: lt,
|
|
2883
|
+
oldDraggableIndex: _t,
|
|
2884
|
+
newIndex: _e,
|
|
2885
|
+
newDraggableIndex: Ze,
|
|
2886
|
+
hideGhostForTarget: Zo,
|
|
2887
|
+
unhideGhostForTarget: Ko,
|
|
2888
|
+
cloneNowHidden: function() {
|
|
2889
|
+
Ke = !0;
|
|
2890
|
+
},
|
|
2891
|
+
cloneNowShown: function() {
|
|
2892
|
+
Ke = !1;
|
|
2893
|
+
},
|
|
2894
|
+
dispatchSortableEvent: function(s) {
|
|
2895
|
+
ge({
|
|
2896
|
+
sortable: n,
|
|
2897
|
+
name: s,
|
|
2898
|
+
originalEvent: r
|
|
2899
|
+
});
|
|
2900
|
+
}
|
|
2901
|
+
}, a));
|
|
2902
|
+
};
|
|
2903
|
+
function ge(e) {
|
|
2904
|
+
us(Pe({
|
|
2905
|
+
putSortable: fe,
|
|
2906
|
+
cloneEl: re,
|
|
2907
|
+
targetEl: O,
|
|
2908
|
+
rootEl: oe,
|
|
2909
|
+
oldIndex: lt,
|
|
2910
|
+
oldDraggableIndex: _t,
|
|
2911
|
+
newIndex: _e,
|
|
2912
|
+
newDraggableIndex: Ze
|
|
2913
|
+
}, e));
|
|
2914
|
+
}
|
|
2915
|
+
var O, ae, P, oe, ot, qt, re, Ke, lt, _e, _t, Ze, Yt, fe, st = !1, Qt = !1, en = [], tt, Ye, wn, En, ho, go, bt, it, Ct, Tt = !1, Rt = !1, zt, me, _n = [], xn = !1, tn = [], dn = typeof document < "u", Bt = Un, vo = kt || We ? "cssFloat" : "float", ds = dn && !No && !Un && "draggable" in document.createElement("div"), Wo = function() {
|
|
2916
|
+
if (dn) {
|
|
2917
|
+
if (We)
|
|
2918
|
+
return !1;
|
|
2919
|
+
var e = document.createElement("x");
|
|
2920
|
+
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2921
|
+
}
|
|
2922
|
+
}(), Go = function(t, n) {
|
|
2923
|
+
var o = N(t), r = parseInt(o.width) - parseInt(o.paddingLeft) - parseInt(o.paddingRight) - parseInt(o.borderLeftWidth) - parseInt(o.borderRightWidth), a = dt(t, 0, n), i = dt(t, 1, n), s = a && N(a), l = i && N(i), d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + se(a).width, u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + se(i).width;
|
|
2924
|
+
if (o.display === "flex")
|
|
2925
|
+
return o.flexDirection === "column" || o.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2926
|
+
if (o.display === "grid")
|
|
2927
|
+
return o.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2928
|
+
if (a && s.float && s.float !== "none") {
|
|
2929
|
+
var f = s.float === "left" ? "left" : "right";
|
|
2930
|
+
return i && (l.clear === "both" || l.clear === f) ? "vertical" : "horizontal";
|
|
2931
|
+
}
|
|
2932
|
+
return a && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || d >= r && o[vo] === "none" || i && o[vo] === "none" && d + u > r) ? "vertical" : "horizontal";
|
|
2933
|
+
}, fs = function(t, n, o) {
|
|
2934
|
+
var r = o ? t.left : t.top, a = o ? t.right : t.bottom, i = o ? t.width : t.height, s = o ? n.left : n.top, l = o ? n.right : n.bottom, d = o ? n.width : n.height;
|
|
2935
|
+
return r === s || a === l || r + i / 2 === s + d / 2;
|
|
2936
|
+
}, ps = function(t, n) {
|
|
2937
|
+
var o;
|
|
2938
|
+
return en.some(function(r) {
|
|
2939
|
+
var a = r[Se].options.emptyInsertThreshold;
|
|
2940
|
+
if (!(!a || qn(r))) {
|
|
2941
|
+
var i = se(r), s = t >= i.left - a && t <= i.right + a, l = n >= i.top - a && n <= i.bottom + a;
|
|
2942
|
+
if (s && l)
|
|
2943
|
+
return o = r;
|
|
2944
|
+
}
|
|
2945
|
+
}), o;
|
|
2946
|
+
}, Xo = function(t) {
|
|
2947
|
+
function n(a, i) {
|
|
2948
|
+
return function(s, l, d, u) {
|
|
2949
|
+
var f = s.options.group.name && l.options.group.name && s.options.group.name === l.options.group.name;
|
|
2950
|
+
if (a == null && (i || f))
|
|
2951
|
+
return !0;
|
|
2952
|
+
if (a == null || a === !1)
|
|
2953
|
+
return !1;
|
|
2954
|
+
if (i && a === "clone")
|
|
2955
|
+
return a;
|
|
2956
|
+
if (typeof a == "function")
|
|
2957
|
+
return n(a(s, l, d, u), i)(s, l, d, u);
|
|
2958
|
+
var A = (i ? s : l).options.group.name;
|
|
2959
|
+
return a === !0 || typeof a == "string" && a === A || a.join && a.indexOf(A) > -1;
|
|
2960
|
+
};
|
|
2961
|
+
}
|
|
2962
|
+
var o = {}, r = t.group;
|
|
2963
|
+
(!r || Ut(r) != "object") && (r = {
|
|
2964
|
+
name: r
|
|
2965
|
+
}), o.name = r.name, o.checkPull = n(r.pull, !0), o.checkPut = n(r.put), o.revertClone = r.revertClone, t.group = o;
|
|
2966
|
+
}, Zo = function() {
|
|
2967
|
+
!Wo && P && N(P, "display", "none");
|
|
2968
|
+
}, Ko = function() {
|
|
2969
|
+
!Wo && P && N(P, "display", "");
|
|
2970
|
+
};
|
|
2971
|
+
dn && !No && document.addEventListener("click", function(e) {
|
|
2972
|
+
if (Qt)
|
|
2973
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Qt = !1, !1;
|
|
2974
|
+
}, !0);
|
|
2975
|
+
var nt = function(t) {
|
|
2976
|
+
if (O) {
|
|
2977
|
+
t = t.touches ? t.touches[0] : t;
|
|
2978
|
+
var n = ps(t.clientX, t.clientY);
|
|
2979
|
+
if (n) {
|
|
2980
|
+
var o = {};
|
|
2981
|
+
for (var r in t)
|
|
2982
|
+
t.hasOwnProperty(r) && (o[r] = t[r]);
|
|
2983
|
+
o.target = o.rootEl = n, o.preventDefault = void 0, o.stopPropagation = void 0, n[Se]._onDragOver(o);
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
}, ms = function(t) {
|
|
2987
|
+
O && O.parentNode[Se]._isOutsideThisEl(t.target);
|
|
2988
|
+
};
|
|
2989
|
+
function V(e, t) {
|
|
2990
|
+
if (!(e && e.nodeType && e.nodeType === 1))
|
|
2991
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
2992
|
+
this.el = e, this.options = t = je({}, t), e[Se] = this;
|
|
2993
|
+
var n = {
|
|
2994
|
+
group: null,
|
|
2995
|
+
sort: !0,
|
|
2996
|
+
disabled: !1,
|
|
2997
|
+
store: null,
|
|
2998
|
+
handle: null,
|
|
2999
|
+
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
3000
|
+
swapThreshold: 1,
|
|
3001
|
+
// percentage; 0 <= x <= 1
|
|
3002
|
+
invertSwap: !1,
|
|
3003
|
+
// invert always
|
|
3004
|
+
invertedSwapThreshold: null,
|
|
3005
|
+
// will be set to same as swapThreshold if default
|
|
3006
|
+
removeCloneOnHide: !0,
|
|
3007
|
+
direction: function() {
|
|
3008
|
+
return Go(e, this.options);
|
|
3009
|
+
},
|
|
3010
|
+
ghostClass: "sortable-ghost",
|
|
3011
|
+
chosenClass: "sortable-chosen",
|
|
3012
|
+
dragClass: "sortable-drag",
|
|
3013
|
+
ignore: "a, img",
|
|
3014
|
+
filter: null,
|
|
3015
|
+
preventOnFilter: !0,
|
|
3016
|
+
animation: 0,
|
|
3017
|
+
easing: null,
|
|
3018
|
+
setData: function(i, s) {
|
|
3019
|
+
i.setData("Text", s.textContent);
|
|
3020
|
+
},
|
|
3021
|
+
dropBubble: !1,
|
|
3022
|
+
dragoverBubble: !1,
|
|
3023
|
+
dataIdAttr: "data-id",
|
|
3024
|
+
delay: 0,
|
|
3025
|
+
delayOnTouchOnly: !1,
|
|
3026
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
3027
|
+
forceFallback: !1,
|
|
3028
|
+
fallbackClass: "sortable-fallback",
|
|
3029
|
+
fallbackOnBody: !1,
|
|
3030
|
+
fallbackTolerance: 0,
|
|
3031
|
+
fallbackOffset: {
|
|
3032
|
+
x: 0,
|
|
3033
|
+
y: 0
|
|
3034
|
+
},
|
|
3035
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
3036
|
+
supportPointer: V.supportPointer !== !1 && "PointerEvent" in window && (!wt || Un),
|
|
3037
|
+
emptyInsertThreshold: 5
|
|
3038
|
+
};
|
|
3039
|
+
Ot.initializePlugins(this, e, n);
|
|
3040
|
+
for (var o in n)
|
|
3041
|
+
!(o in t) && (t[o] = n[o]);
|
|
3042
|
+
Xo(t);
|
|
3043
|
+
for (var r in this)
|
|
3044
|
+
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
3045
|
+
this.nativeDraggable = t.forceFallback ? !1 : ds, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? Z(e, "pointerdown", this._onTapStart) : (Z(e, "mousedown", this._onTapStart), Z(e, "touchstart", this._onTapStart)), this.nativeDraggable && (Z(e, "dragover", this), Z(e, "dragenter", this)), en.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), je(this, is());
|
|
3046
|
+
}
|
|
3047
|
+
V.prototype = /** @lends Sortable.prototype */
|
|
3048
|
+
{
|
|
3049
|
+
constructor: V,
|
|
3050
|
+
_isOutsideThisEl: function(t) {
|
|
3051
|
+
!this.el.contains(t) && t !== this.el && (it = null);
|
|
3052
|
+
},
|
|
3053
|
+
_getDirection: function(t, n) {
|
|
3054
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, n, O) : this.options.direction;
|
|
3055
|
+
},
|
|
3056
|
+
_onTapStart: function(t) {
|
|
3057
|
+
if (t.cancelable) {
|
|
3058
|
+
var n = this, o = this.el, r = this.options, a = r.preventOnFilter, i = t.type, s = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (s || t).target, d = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, u = r.filter;
|
|
3059
|
+
if (ws(o), !O && !(/mousedown|pointerdown/.test(i) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && wt && l && l.tagName.toUpperCase() === "SELECT") && (l = Be(l, r.draggable, o, !1), !(l && l.animated) && qt !== l)) {
|
|
3060
|
+
if (lt = Oe(l), _t = Oe(l, r.draggable), typeof u == "function") {
|
|
3061
|
+
if (u.call(this, t, l, this)) {
|
|
3062
|
+
ge({
|
|
3063
|
+
sortable: n,
|
|
3064
|
+
rootEl: d,
|
|
3065
|
+
name: "filter",
|
|
3066
|
+
targetEl: l,
|
|
3067
|
+
toEl: o,
|
|
3068
|
+
fromEl: o
|
|
3069
|
+
}), be("filter", n, {
|
|
3070
|
+
evt: t
|
|
3071
|
+
}), a && t.preventDefault();
|
|
3072
|
+
return;
|
|
3073
|
+
}
|
|
3074
|
+
} else if (u && (u = u.split(",").some(function(f) {
|
|
3075
|
+
if (f = Be(d, f.trim(), o, !1), f)
|
|
3076
|
+
return ge({
|
|
3077
|
+
sortable: n,
|
|
3078
|
+
rootEl: f,
|
|
3079
|
+
name: "filter",
|
|
3080
|
+
targetEl: l,
|
|
3081
|
+
fromEl: o,
|
|
3082
|
+
toEl: o
|
|
3083
|
+
}), be("filter", n, {
|
|
3084
|
+
evt: t
|
|
3085
|
+
}), !0;
|
|
3086
|
+
}), u)) {
|
|
3087
|
+
a && t.preventDefault();
|
|
3088
|
+
return;
|
|
3089
|
+
}
|
|
3090
|
+
r.handle && !Be(d, r.handle, o, !1) || this._prepareDragStart(t, s, l);
|
|
3091
|
+
}
|
|
3092
|
+
}
|
|
3093
|
+
},
|
|
3094
|
+
_prepareDragStart: function(t, n, o) {
|
|
3095
|
+
var r = this, a = r.el, i = r.options, s = a.ownerDocument, l;
|
|
3096
|
+
if (o && !O && o.parentNode === a) {
|
|
3097
|
+
var d = se(o);
|
|
3098
|
+
if (oe = a, O = o, ae = O.parentNode, ot = O.nextSibling, qt = o, Yt = i.group, V.dragged = O, tt = {
|
|
3099
|
+
target: O,
|
|
3100
|
+
clientX: (n || t).clientX,
|
|
3101
|
+
clientY: (n || t).clientY
|
|
3102
|
+
}, ho = tt.clientX - d.left, go = tt.clientY - d.top, this._lastX = (n || t).clientX, this._lastY = (n || t).clientY, O.style["will-change"] = "all", l = function() {
|
|
3103
|
+
if (be("delayEnded", r, {
|
|
3104
|
+
evt: t
|
|
3105
|
+
}), V.eventCanceled) {
|
|
3106
|
+
r._onDrop();
|
|
3107
|
+
return;
|
|
3108
|
+
}
|
|
3109
|
+
r._disableDelayedDragEvents(), !co && r.nativeDraggable && (O.draggable = !0), r._triggerDragStart(t, n), ge({
|
|
3110
|
+
sortable: r,
|
|
3111
|
+
name: "choose",
|
|
3112
|
+
originalEvent: t
|
|
3113
|
+
}), Ee(O, i.chosenClass, !0);
|
|
3114
|
+
}, i.ignore.split(",").forEach(function(u) {
|
|
3115
|
+
Ho(O, u.trim(), Cn);
|
|
3116
|
+
}), Z(s, "dragover", nt), Z(s, "mousemove", nt), Z(s, "touchmove", nt), i.supportPointer ? (Z(s, "pointerup", r._onDrop), !this.nativeDraggable && Z(s, "pointercancel", r._onDrop)) : (Z(s, "mouseup", r._onDrop), Z(s, "touchend", r._onDrop), Z(s, "touchcancel", r._onDrop)), co && this.nativeDraggable && (this.options.touchStartThreshold = 4, O.draggable = !0), be("delayStart", this, {
|
|
3117
|
+
evt: t
|
|
3118
|
+
}), i.delay && (!i.delayOnTouchOnly || n) && (!this.nativeDraggable || !(kt || We))) {
|
|
3119
|
+
if (V.eventCanceled) {
|
|
3120
|
+
this._onDrop();
|
|
3121
|
+
return;
|
|
3122
|
+
}
|
|
3123
|
+
i.supportPointer ? (Z(s, "pointerup", r._disableDelayedDrag), Z(s, "pointercancel", r._disableDelayedDrag)) : (Z(s, "mouseup", r._disableDelayedDrag), Z(s, "touchend", r._disableDelayedDrag), Z(s, "touchcancel", r._disableDelayedDrag)), Z(s, "mousemove", r._delayedDragTouchMoveHandler), Z(s, "touchmove", r._delayedDragTouchMoveHandler), i.supportPointer && Z(s, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, i.delay);
|
|
3124
|
+
} else
|
|
3125
|
+
l();
|
|
3126
|
+
}
|
|
3127
|
+
},
|
|
3128
|
+
_delayedDragTouchMoveHandler: function(t) {
|
|
3129
|
+
var n = t.touches ? t.touches[0] : t;
|
|
3130
|
+
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
3131
|
+
},
|
|
3132
|
+
_disableDelayedDrag: function() {
|
|
3133
|
+
O && Cn(O), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3134
|
+
},
|
|
3135
|
+
_disableDelayedDragEvents: function() {
|
|
3136
|
+
var t = this.el.ownerDocument;
|
|
3137
|
+
W(t, "mouseup", this._disableDelayedDrag), W(t, "touchend", this._disableDelayedDrag), W(t, "touchcancel", this._disableDelayedDrag), W(t, "pointerup", this._disableDelayedDrag), W(t, "pointercancel", this._disableDelayedDrag), W(t, "mousemove", this._delayedDragTouchMoveHandler), W(t, "touchmove", this._delayedDragTouchMoveHandler), W(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3138
|
+
},
|
|
3139
|
+
_triggerDragStart: function(t, n) {
|
|
3140
|
+
n = n || t.pointerType == "touch" && t, !this.nativeDraggable || n ? this.options.supportPointer ? Z(document, "pointermove", this._onTouchMove) : n ? Z(document, "touchmove", this._onTouchMove) : Z(document, "mousemove", this._onTouchMove) : (Z(O, "dragend", this), Z(oe, "dragstart", this._onDragStart));
|
|
3141
|
+
try {
|
|
3142
|
+
document.selection ? jt(function() {
|
|
3143
|
+
document.selection.empty();
|
|
3144
|
+
}) : window.getSelection().removeAllRanges();
|
|
3145
|
+
} catch {
|
|
3146
|
+
}
|
|
3147
|
+
},
|
|
3148
|
+
_dragStarted: function(t, n) {
|
|
3149
|
+
if (st = !1, oe && O) {
|
|
3150
|
+
be("dragStarted", this, {
|
|
3151
|
+
evt: n
|
|
3152
|
+
}), this.nativeDraggable && Z(document, "dragover", ms);
|
|
3153
|
+
var o = this.options;
|
|
3154
|
+
!t && Ee(O, o.dragClass, !1), Ee(O, o.ghostClass, !0), V.active = this, t && this._appendGhost(), ge({
|
|
3155
|
+
sortable: this,
|
|
3156
|
+
name: "start",
|
|
3157
|
+
originalEvent: n
|
|
3158
|
+
});
|
|
3159
|
+
} else
|
|
3160
|
+
this._nulling();
|
|
3161
|
+
},
|
|
3162
|
+
_emulateDragOver: function() {
|
|
3163
|
+
if (Ye) {
|
|
3164
|
+
this._lastX = Ye.clientX, this._lastY = Ye.clientY, Zo();
|
|
3165
|
+
for (var t = document.elementFromPoint(Ye.clientX, Ye.clientY), n = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(Ye.clientX, Ye.clientY), t !== n); )
|
|
3166
|
+
n = t;
|
|
3167
|
+
if (O.parentNode[Se]._isOutsideThisEl(t), n)
|
|
3168
|
+
do {
|
|
3169
|
+
if (n[Se]) {
|
|
3170
|
+
var o = void 0;
|
|
3171
|
+
if (o = n[Se]._onDragOver({
|
|
3172
|
+
clientX: Ye.clientX,
|
|
3173
|
+
clientY: Ye.clientY,
|
|
3174
|
+
target: t,
|
|
3175
|
+
rootEl: n
|
|
3176
|
+
}), o && !this.options.dragoverBubble)
|
|
3177
|
+
break;
|
|
3178
|
+
}
|
|
3179
|
+
t = n;
|
|
3180
|
+
} while (n = Po(n));
|
|
3181
|
+
Ko();
|
|
3182
|
+
}
|
|
3183
|
+
},
|
|
3184
|
+
_onTouchMove: function(t) {
|
|
3185
|
+
if (tt) {
|
|
3186
|
+
var n = this.options, o = n.fallbackTolerance, r = n.fallbackOffset, a = t.touches ? t.touches[0] : t, i = P && ut(P, !0), s = P && i && i.a, l = P && i && i.d, d = Bt && me && mo(me), u = (a.clientX - tt.clientX + r.x) / (s || 1) + (d ? d[0] - _n[0] : 0) / (s || 1), f = (a.clientY - tt.clientY + r.y) / (l || 1) + (d ? d[1] - _n[1] : 0) / (l || 1);
|
|
3187
|
+
if (!V.active && !st) {
|
|
3188
|
+
if (o && Math.max(Math.abs(a.clientX - this._lastX), Math.abs(a.clientY - this._lastY)) < o)
|
|
3189
|
+
return;
|
|
3190
|
+
this._onDragStart(t, !0);
|
|
3191
|
+
}
|
|
3192
|
+
if (P) {
|
|
3193
|
+
i ? (i.e += u - (wn || 0), i.f += f - (En || 0)) : i = {
|
|
3194
|
+
a: 1,
|
|
3195
|
+
b: 0,
|
|
3196
|
+
c: 0,
|
|
3197
|
+
d: 1,
|
|
3198
|
+
e: u,
|
|
3199
|
+
f
|
|
3200
|
+
};
|
|
3201
|
+
var A = "matrix(".concat(i.a, ",").concat(i.b, ",").concat(i.c, ",").concat(i.d, ",").concat(i.e, ",").concat(i.f, ")");
|
|
3202
|
+
N(P, "webkitTransform", A), N(P, "mozTransform", A), N(P, "msTransform", A), N(P, "transform", A), wn = u, En = f, Ye = a;
|
|
3203
|
+
}
|
|
3204
|
+
t.cancelable && t.preventDefault();
|
|
3205
|
+
}
|
|
3206
|
+
},
|
|
3207
|
+
_appendGhost: function() {
|
|
3208
|
+
if (!P) {
|
|
3209
|
+
var t = this.options.fallbackOnBody ? document.body : oe, n = se(O, !0, Bt, !0, t), o = this.options;
|
|
3210
|
+
if (Bt) {
|
|
3211
|
+
for (me = t; N(me, "position") === "static" && N(me, "transform") === "none" && me !== document; )
|
|
3212
|
+
me = me.parentNode;
|
|
3213
|
+
me !== document.body && me !== document.documentElement ? (me === document && (me = Ve()), n.top += me.scrollTop, n.left += me.scrollLeft) : me = Ve(), _n = mo(me);
|
|
3214
|
+
}
|
|
3215
|
+
P = O.cloneNode(!0), Ee(P, o.ghostClass, !1), Ee(P, o.fallbackClass, !0), Ee(P, o.dragClass, !0), N(P, "transition", ""), N(P, "transform", ""), N(P, "box-sizing", "border-box"), N(P, "margin", 0), N(P, "top", n.top), N(P, "left", n.left), N(P, "width", n.width), N(P, "height", n.height), N(P, "opacity", "0.8"), N(P, "position", Bt ? "absolute" : "fixed"), N(P, "zIndex", "100000"), N(P, "pointerEvents", "none"), V.ghost = P, t.appendChild(P), N(P, "transform-origin", ho / parseInt(P.style.width) * 100 + "% " + go / parseInt(P.style.height) * 100 + "%");
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
_onDragStart: function(t, n) {
|
|
3219
|
+
var o = this, r = t.dataTransfer, a = o.options;
|
|
3220
|
+
if (be("dragStart", this, {
|
|
3221
|
+
evt: t
|
|
3222
|
+
}), V.eventCanceled) {
|
|
3223
|
+
this._onDrop();
|
|
3224
|
+
return;
|
|
3225
|
+
}
|
|
3226
|
+
be("setupClone", this), V.eventCanceled || (re = zo(O), re.removeAttribute("id"), re.draggable = !1, re.style["will-change"] = "", this._hideClone(), Ee(re, this.options.chosenClass, !1), V.clone = re), o.cloneId = jt(function() {
|
|
3227
|
+
be("clone", o), !V.eventCanceled && (o.options.removeCloneOnHide || oe.insertBefore(re, O), o._hideClone(), ge({
|
|
3228
|
+
sortable: o,
|
|
3229
|
+
name: "clone"
|
|
3230
|
+
}));
|
|
3231
|
+
}), !n && Ee(O, a.dragClass, !0), n ? (Qt = !0, o._loopId = setInterval(o._emulateDragOver, 50)) : (W(document, "mouseup", o._onDrop), W(document, "touchend", o._onDrop), W(document, "touchcancel", o._onDrop), r && (r.effectAllowed = "move", a.setData && a.setData.call(o, r, O)), Z(document, "drop", o), N(O, "transform", "translateZ(0)")), st = !0, o._dragStartId = jt(o._dragStarted.bind(o, n, t)), Z(document, "selectstart", o), bt = !0, window.getSelection().removeAllRanges(), wt && N(document.body, "user-select", "none");
|
|
3232
|
+
},
|
|
3233
|
+
// Returns true - if no further action is needed (either inserted or another condition)
|
|
3234
|
+
_onDragOver: function(t) {
|
|
3235
|
+
var n = this.el, o = t.target, r, a, i, s = this.options, l = s.group, d = V.active, u = Yt === l, f = s.sort, A = fe || d, C, E = this, g = !1;
|
|
3236
|
+
if (xn) return;
|
|
3237
|
+
function p(w, Y) {
|
|
3238
|
+
be(w, E, Pe({
|
|
3239
|
+
evt: t,
|
|
3240
|
+
isOwner: u,
|
|
3241
|
+
axis: C ? "vertical" : "horizontal",
|
|
3242
|
+
revert: i,
|
|
3243
|
+
dragRect: r,
|
|
3244
|
+
targetRect: a,
|
|
3245
|
+
canSort: f,
|
|
3246
|
+
fromSortable: A,
|
|
3247
|
+
target: o,
|
|
3248
|
+
completed: S,
|
|
3249
|
+
onMove: function(B, X) {
|
|
3250
|
+
return Lt(oe, n, O, r, B, se(B), t, X);
|
|
3251
|
+
},
|
|
3252
|
+
changed: k
|
|
3253
|
+
}, Y));
|
|
3254
|
+
}
|
|
3255
|
+
function h() {
|
|
3256
|
+
p("dragOverAnimationCapture"), E.captureAnimationState(), E !== A && A.captureAnimationState();
|
|
3257
|
+
}
|
|
3258
|
+
function S(w) {
|
|
3259
|
+
return p("dragOverCompleted", {
|
|
3260
|
+
insertion: w
|
|
3261
|
+
}), w && (u ? d._hideClone() : d._showClone(E), E !== A && (Ee(O, fe ? fe.options.ghostClass : d.options.ghostClass, !1), Ee(O, s.ghostClass, !0)), fe !== E && E !== V.active ? fe = E : E === V.active && fe && (fe = null), A === E && (E._ignoreWhileAnimating = o), E.animateAll(function() {
|
|
3262
|
+
p("dragOverAnimationComplete"), E._ignoreWhileAnimating = null;
|
|
3263
|
+
}), E !== A && (A.animateAll(), A._ignoreWhileAnimating = null)), (o === O && !O.animated || o === n && !o.animated) && (it = null), !s.dragoverBubble && !t.rootEl && o !== document && (O.parentNode[Se]._isOutsideThisEl(t.target), !w && nt(t)), !s.dragoverBubble && t.stopPropagation && t.stopPropagation(), g = !0;
|
|
3264
|
+
}
|
|
3265
|
+
function k() {
|
|
3266
|
+
_e = Oe(O), Ze = Oe(O, s.draggable), ge({
|
|
3267
|
+
sortable: E,
|
|
3268
|
+
name: "change",
|
|
3269
|
+
toEl: n,
|
|
3270
|
+
newIndex: _e,
|
|
3271
|
+
newDraggableIndex: Ze,
|
|
3272
|
+
originalEvent: t
|
|
3273
|
+
});
|
|
3274
|
+
}
|
|
3275
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), o = Be(o, s.draggable, n, !0), p("dragOver"), V.eventCanceled) return g;
|
|
3276
|
+
if (O.contains(t.target) || o.animated && o.animatingX && o.animatingY || E._ignoreWhileAnimating === o)
|
|
3277
|
+
return S(!1);
|
|
3278
|
+
if (Qt = !1, d && !s.disabled && (u ? f || (i = ae !== oe) : fe === this || (this.lastPutMode = Yt.checkPull(this, d, O, t)) && l.checkPut(this, d, O, t))) {
|
|
3279
|
+
if (C = this._getDirection(t, o) === "vertical", r = se(O), p("dragOverValid"), V.eventCanceled) return g;
|
|
3280
|
+
if (i)
|
|
3281
|
+
return ae = oe, h(), this._hideClone(), p("revert"), V.eventCanceled || (ot ? oe.insertBefore(O, ot) : oe.appendChild(O)), S(!0);
|
|
3282
|
+
var L = qn(n, s.draggable);
|
|
3283
|
+
if (!L || bs(t, C, this) && !L.animated) {
|
|
3284
|
+
if (L === O)
|
|
3285
|
+
return S(!1);
|
|
3286
|
+
if (L && n === t.target && (o = L), o && (a = se(o)), Lt(oe, n, O, r, o, a, t, !!o) !== !1)
|
|
3287
|
+
return h(), L && L.nextSibling ? n.insertBefore(O, L.nextSibling) : n.appendChild(O), ae = n, k(), S(!0);
|
|
3288
|
+
} else if (L && vs(t, C, this)) {
|
|
3289
|
+
var M = dt(n, 0, s, !0);
|
|
3290
|
+
if (M === O)
|
|
3291
|
+
return S(!1);
|
|
3292
|
+
if (o = M, a = se(o), Lt(oe, n, O, r, o, a, t, !1) !== !1)
|
|
3293
|
+
return h(), n.insertBefore(O, M), ae = n, k(), S(!0);
|
|
3294
|
+
} else if (o.parentNode === n) {
|
|
3295
|
+
a = se(o);
|
|
3296
|
+
var F = 0, I, R = O.parentNode !== n, D = !fs(O.animated && O.toRect || r, o.animated && o.toRect || a, C), T = C ? "top" : "left", b = po(o, "top", "top") || po(O, "top", "top"), $ = b ? b.scrollTop : void 0;
|
|
3297
|
+
it !== o && (I = a[T], Tt = !1, Rt = !D && s.invertSwap || R), F = ys(t, o, a, C, D ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, Rt, it === o);
|
|
3298
|
+
var v;
|
|
3299
|
+
if (F !== 0) {
|
|
3300
|
+
var y = Oe(O);
|
|
3301
|
+
do
|
|
3302
|
+
y -= F, v = ae.children[y];
|
|
3303
|
+
while (v && (N(v, "display") === "none" || v === P));
|
|
3304
|
+
}
|
|
3305
|
+
if (F === 0 || v === o)
|
|
3306
|
+
return S(!1);
|
|
3307
|
+
it = o, Ct = F;
|
|
3308
|
+
var m = o.nextElementSibling, c = !1;
|
|
3309
|
+
c = F === 1;
|
|
3310
|
+
var _ = Lt(oe, n, O, r, o, a, t, c);
|
|
3311
|
+
if (_ !== !1)
|
|
3312
|
+
return (_ === 1 || _ === -1) && (c = _ === 1), xn = !0, setTimeout(gs, 30), h(), c && !m ? n.appendChild(O) : o.parentNode.insertBefore(O, c ? m : o), b && qo(b, 0, $ - b.scrollTop), ae = O.parentNode, I !== void 0 && !Rt && (zt = Math.abs(I - se(o)[T])), k(), S(!0);
|
|
3313
|
+
}
|
|
3314
|
+
if (n.contains(O))
|
|
3315
|
+
return S(!1);
|
|
3316
|
+
}
|
|
3317
|
+
return !1;
|
|
3318
|
+
},
|
|
3319
|
+
_ignoreWhileAnimating: null,
|
|
3320
|
+
_offMoveEvents: function() {
|
|
3321
|
+
W(document, "mousemove", this._onTouchMove), W(document, "touchmove", this._onTouchMove), W(document, "pointermove", this._onTouchMove), W(document, "dragover", nt), W(document, "mousemove", nt), W(document, "touchmove", nt);
|
|
3322
|
+
},
|
|
3323
|
+
_offUpEvents: function() {
|
|
3324
|
+
var t = this.el.ownerDocument;
|
|
3325
|
+
W(t, "mouseup", this._onDrop), W(t, "touchend", this._onDrop), W(t, "pointerup", this._onDrop), W(t, "pointercancel", this._onDrop), W(t, "touchcancel", this._onDrop), W(document, "selectstart", this);
|
|
3326
|
+
},
|
|
3327
|
+
_onDrop: function(t) {
|
|
3328
|
+
var n = this.el, o = this.options;
|
|
3329
|
+
if (_e = Oe(O), Ze = Oe(O, o.draggable), be("drop", this, {
|
|
3330
|
+
evt: t
|
|
3331
|
+
}), ae = O && O.parentNode, _e = Oe(O), Ze = Oe(O, o.draggable), V.eventCanceled) {
|
|
3332
|
+
this._nulling();
|
|
3333
|
+
return;
|
|
3334
|
+
}
|
|
3335
|
+
st = !1, Rt = !1, Tt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Fn(this.cloneId), Fn(this._dragStartId), this.nativeDraggable && (W(document, "drop", this), W(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), wt && N(document.body, "user-select", ""), N(O, "transform", ""), t && (bt && (t.cancelable && t.preventDefault(), !o.dropBubble && t.stopPropagation()), P && P.parentNode && P.parentNode.removeChild(P), (oe === ae || fe && fe.lastPutMode !== "clone") && re && re.parentNode && re.parentNode.removeChild(re), O && (this.nativeDraggable && W(O, "dragend", this), Cn(O), O.style["will-change"] = "", bt && !st && Ee(O, fe ? fe.options.ghostClass : this.options.ghostClass, !1), Ee(O, this.options.chosenClass, !1), ge({
|
|
3336
|
+
sortable: this,
|
|
3337
|
+
name: "unchoose",
|
|
3338
|
+
toEl: ae,
|
|
3339
|
+
newIndex: null,
|
|
3340
|
+
newDraggableIndex: null,
|
|
3341
|
+
originalEvent: t
|
|
3342
|
+
}), oe !== ae ? (_e >= 0 && (ge({
|
|
3343
|
+
rootEl: ae,
|
|
3344
|
+
name: "add",
|
|
3345
|
+
toEl: ae,
|
|
3346
|
+
fromEl: oe,
|
|
3347
|
+
originalEvent: t
|
|
3348
|
+
}), ge({
|
|
3349
|
+
sortable: this,
|
|
3350
|
+
name: "remove",
|
|
3351
|
+
toEl: ae,
|
|
3352
|
+
originalEvent: t
|
|
3353
|
+
}), ge({
|
|
3354
|
+
rootEl: ae,
|
|
3355
|
+
name: "sort",
|
|
3356
|
+
toEl: ae,
|
|
3357
|
+
fromEl: oe,
|
|
3358
|
+
originalEvent: t
|
|
3359
|
+
}), ge({
|
|
3360
|
+
sortable: this,
|
|
3361
|
+
name: "sort",
|
|
3362
|
+
toEl: ae,
|
|
3363
|
+
originalEvent: t
|
|
3364
|
+
})), fe && fe.save()) : _e !== lt && _e >= 0 && (ge({
|
|
3365
|
+
sortable: this,
|
|
3366
|
+
name: "update",
|
|
3367
|
+
toEl: ae,
|
|
3368
|
+
originalEvent: t
|
|
3369
|
+
}), ge({
|
|
3370
|
+
sortable: this,
|
|
3371
|
+
name: "sort",
|
|
3372
|
+
toEl: ae,
|
|
3373
|
+
originalEvent: t
|
|
3374
|
+
})), V.active && ((_e == null || _e === -1) && (_e = lt, Ze = _t), ge({
|
|
3375
|
+
sortable: this,
|
|
3376
|
+
name: "end",
|
|
3377
|
+
toEl: ae,
|
|
3378
|
+
originalEvent: t
|
|
3379
|
+
}), this.save()))), this._nulling();
|
|
3380
|
+
},
|
|
3381
|
+
_nulling: function() {
|
|
3382
|
+
be("nulling", this), oe = O = ae = P = ot = re = qt = Ke = tt = Ye = bt = _e = Ze = lt = _t = it = Ct = fe = Yt = V.dragged = V.ghost = V.clone = V.active = null, tn.forEach(function(t) {
|
|
3383
|
+
t.checked = !0;
|
|
3384
|
+
}), tn.length = wn = En = 0;
|
|
3385
|
+
},
|
|
3386
|
+
handleEvent: function(t) {
|
|
3387
|
+
switch (t.type) {
|
|
3388
|
+
case "drop":
|
|
3389
|
+
case "dragend":
|
|
3390
|
+
this._onDrop(t);
|
|
3391
|
+
break;
|
|
3392
|
+
case "dragenter":
|
|
3393
|
+
case "dragover":
|
|
3394
|
+
O && (this._onDragOver(t), hs(t));
|
|
3395
|
+
break;
|
|
3396
|
+
case "selectstart":
|
|
3397
|
+
t.preventDefault();
|
|
3398
|
+
break;
|
|
3399
|
+
}
|
|
3400
|
+
},
|
|
3401
|
+
/**
|
|
3402
|
+
* Serializes the item into an array of string.
|
|
3403
|
+
* @returns {String[]}
|
|
3404
|
+
*/
|
|
3405
|
+
toArray: function() {
|
|
3406
|
+
for (var t = [], n, o = this.el.children, r = 0, a = o.length, i = this.options; r < a; r++)
|
|
3407
|
+
n = o[r], Be(n, i.draggable, this.el, !1) && t.push(n.getAttribute(i.dataIdAttr) || Ss(n));
|
|
3408
|
+
return t;
|
|
3409
|
+
},
|
|
3410
|
+
/**
|
|
3411
|
+
* Sorts the elements according to the array.
|
|
3412
|
+
* @param {String[]} order order of the items
|
|
3413
|
+
*/
|
|
3414
|
+
sort: function(t, n) {
|
|
3415
|
+
var o = {}, r = this.el;
|
|
3416
|
+
this.toArray().forEach(function(a, i) {
|
|
3417
|
+
var s = r.children[i];
|
|
3418
|
+
Be(s, this.options.draggable, r, !1) && (o[a] = s);
|
|
3419
|
+
}, this), n && this.captureAnimationState(), t.forEach(function(a) {
|
|
3420
|
+
o[a] && (r.removeChild(o[a]), r.appendChild(o[a]));
|
|
3421
|
+
}), n && this.animateAll();
|
|
3422
|
+
},
|
|
3423
|
+
/**
|
|
3424
|
+
* Save the current sorting
|
|
3425
|
+
*/
|
|
3426
|
+
save: function() {
|
|
3427
|
+
var t = this.options.store;
|
|
3428
|
+
t && t.set && t.set(this);
|
|
3429
|
+
},
|
|
3430
|
+
/**
|
|
3431
|
+
* For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
|
|
3432
|
+
* @param {HTMLElement} el
|
|
3433
|
+
* @param {String} [selector] default: `options.draggable`
|
|
3434
|
+
* @returns {HTMLElement|null}
|
|
3435
|
+
*/
|
|
3436
|
+
closest: function(t, n) {
|
|
3437
|
+
return Be(t, n || this.options.draggable, this.el, !1);
|
|
3438
|
+
},
|
|
3439
|
+
/**
|
|
3440
|
+
* Set/get option
|
|
3441
|
+
* @param {string} name
|
|
3442
|
+
* @param {*} [value]
|
|
3443
|
+
* @returns {*}
|
|
3444
|
+
*/
|
|
3445
|
+
option: function(t, n) {
|
|
3446
|
+
var o = this.options;
|
|
3447
|
+
if (n === void 0)
|
|
3448
|
+
return o[t];
|
|
3449
|
+
var r = Ot.modifyOption(this, t, n);
|
|
3450
|
+
typeof r < "u" ? o[t] = r : o[t] = n, t === "group" && Xo(o);
|
|
3451
|
+
},
|
|
3452
|
+
/**
|
|
3453
|
+
* Destroy
|
|
3454
|
+
*/
|
|
3455
|
+
destroy: function() {
|
|
3456
|
+
be("destroy", this);
|
|
3457
|
+
var t = this.el;
|
|
3458
|
+
t[Se] = null, W(t, "mousedown", this._onTapStart), W(t, "touchstart", this._onTapStart), W(t, "pointerdown", this._onTapStart), this.nativeDraggable && (W(t, "dragover", this), W(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(n) {
|
|
3459
|
+
n.removeAttribute("draggable");
|
|
3460
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), en.splice(en.indexOf(this.el), 1), this.el = t = null;
|
|
3461
|
+
},
|
|
3462
|
+
_hideClone: function() {
|
|
3463
|
+
if (!Ke) {
|
|
3464
|
+
if (be("hideClone", this), V.eventCanceled) return;
|
|
3465
|
+
N(re, "display", "none"), this.options.removeCloneOnHide && re.parentNode && re.parentNode.removeChild(re), Ke = !0;
|
|
3466
|
+
}
|
|
3467
|
+
},
|
|
3468
|
+
_showClone: function(t) {
|
|
3469
|
+
if (t.lastPutMode !== "clone") {
|
|
3470
|
+
this._hideClone();
|
|
3471
|
+
return;
|
|
3472
|
+
}
|
|
3473
|
+
if (Ke) {
|
|
3474
|
+
if (be("showClone", this), V.eventCanceled) return;
|
|
3475
|
+
O.parentNode == oe && !this.options.group.revertClone ? oe.insertBefore(re, O) : ot ? oe.insertBefore(re, ot) : oe.appendChild(re), this.options.group.revertClone && this.animate(O, re), N(re, "display", ""), Ke = !1;
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
};
|
|
3479
|
+
function hs(e) {
|
|
3480
|
+
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3481
|
+
}
|
|
3482
|
+
function Lt(e, t, n, o, r, a, i, s) {
|
|
3483
|
+
var l, d = e[Se], u = d.options.onMove, f;
|
|
3484
|
+
return window.CustomEvent && !We && !kt ? l = new CustomEvent("move", {
|
|
3485
|
+
bubbles: !0,
|
|
3486
|
+
cancelable: !0
|
|
3487
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = e, l.dragged = n, l.draggedRect = o, l.related = r || t, l.relatedRect = a || se(t), l.willInsertAfter = s, l.originalEvent = i, e.dispatchEvent(l), u && (f = u.call(d, l, i)), f;
|
|
3488
|
+
}
|
|
3489
|
+
function Cn(e) {
|
|
3490
|
+
e.draggable = !1;
|
|
3491
|
+
}
|
|
3492
|
+
function gs() {
|
|
3493
|
+
xn = !1;
|
|
3494
|
+
}
|
|
3495
|
+
function vs(e, t, n) {
|
|
3496
|
+
var o = se(dt(n.el, 0, n.options, !0)), r = jo(n.el, n.options, P), a = 10;
|
|
3497
|
+
return t ? e.clientX < r.left - a || e.clientY < o.top && e.clientX < o.right : e.clientY < r.top - a || e.clientY < o.bottom && e.clientX < o.left;
|
|
3498
|
+
}
|
|
3499
|
+
function bs(e, t, n) {
|
|
3500
|
+
var o = se(qn(n.el, n.options.draggable)), r = jo(n.el, n.options, P), a = 10;
|
|
3501
|
+
return t ? e.clientX > r.right + a || e.clientY > o.bottom && e.clientX > o.left : e.clientY > r.bottom + a || e.clientX > o.right && e.clientY > o.top;
|
|
3502
|
+
}
|
|
3503
|
+
function ys(e, t, n, o, r, a, i, s) {
|
|
3504
|
+
var l = o ? e.clientY : e.clientX, d = o ? n.height : n.width, u = o ? n.top : n.left, f = o ? n.bottom : n.right, A = !1;
|
|
3505
|
+
if (!i) {
|
|
3506
|
+
if (s && zt < d * r) {
|
|
3507
|
+
if (!Tt && (Ct === 1 ? l > u + d * a / 2 : l < f - d * a / 2) && (Tt = !0), Tt)
|
|
3508
|
+
A = !0;
|
|
3509
|
+
else if (Ct === 1 ? l < u + zt : l > f - zt)
|
|
3510
|
+
return -Ct;
|
|
3511
|
+
} else if (l > u + d * (1 - r) / 2 && l < f - d * (1 - r) / 2)
|
|
3512
|
+
return Ds(t);
|
|
3513
|
+
}
|
|
3514
|
+
return A = A || i, A && (l < u + d * a / 2 || l > f - d * a / 2) ? l > u + d / 2 ? 1 : -1 : 0;
|
|
3515
|
+
}
|
|
3516
|
+
function Ds(e) {
|
|
3517
|
+
return Oe(O) < Oe(e) ? 1 : -1;
|
|
3518
|
+
}
|
|
3519
|
+
function Ss(e) {
|
|
3520
|
+
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, o = 0; n--; )
|
|
3521
|
+
o += t.charCodeAt(n);
|
|
3522
|
+
return o.toString(36);
|
|
3523
|
+
}
|
|
3524
|
+
function ws(e) {
|
|
3525
|
+
tn.length = 0;
|
|
3526
|
+
for (var t = e.getElementsByTagName("input"), n = t.length; n--; ) {
|
|
3527
|
+
var o = t[n];
|
|
3528
|
+
o.checked && tn.push(o);
|
|
3529
|
+
}
|
|
3530
|
+
}
|
|
3531
|
+
function jt(e) {
|
|
3532
|
+
return setTimeout(e, 0);
|
|
3533
|
+
}
|
|
3534
|
+
function Fn(e) {
|
|
3535
|
+
return clearTimeout(e);
|
|
3536
|
+
}
|
|
3537
|
+
dn && Z(document, "touchmove", function(e) {
|
|
3538
|
+
(V.active || st) && e.cancelable && e.preventDefault();
|
|
3539
|
+
});
|
|
3540
|
+
V.utils = {
|
|
3541
|
+
on: Z,
|
|
3542
|
+
off: W,
|
|
3543
|
+
css: N,
|
|
3544
|
+
find: Ho,
|
|
3545
|
+
is: function(t, n) {
|
|
3546
|
+
return !!Be(t, n, t, !1);
|
|
3547
|
+
},
|
|
3548
|
+
extend: rs,
|
|
3549
|
+
throttle: Uo,
|
|
3550
|
+
closest: Be,
|
|
3551
|
+
toggleClass: Ee,
|
|
3552
|
+
clone: zo,
|
|
3553
|
+
index: Oe,
|
|
3554
|
+
nextTick: jt,
|
|
3555
|
+
cancelNextTick: Fn,
|
|
3556
|
+
detectDirection: Go,
|
|
3557
|
+
getChild: dt,
|
|
3558
|
+
expando: Se
|
|
3559
|
+
};
|
|
3560
|
+
V.get = function(e) {
|
|
3561
|
+
return e[Se];
|
|
3562
|
+
};
|
|
3563
|
+
V.mount = function() {
|
|
3564
|
+
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
3565
|
+
t[n] = arguments[n];
|
|
3566
|
+
t[0].constructor === Array && (t = t[0]), t.forEach(function(o) {
|
|
3567
|
+
if (!o.prototype || !o.prototype.constructor)
|
|
3568
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
3569
|
+
o.utils && (V.utils = Pe(Pe({}, V.utils), o.utils)), Ot.mount(o);
|
|
3570
|
+
});
|
|
3571
|
+
};
|
|
3572
|
+
V.create = function(e, t) {
|
|
3573
|
+
return new V(e, t);
|
|
3574
|
+
};
|
|
3575
|
+
V.version = ns;
|
|
3576
|
+
var ie = [], yt, Yn, Rn = !1, Tn, An, nn, Dt;
|
|
3577
|
+
function Es() {
|
|
3578
|
+
function e() {
|
|
3579
|
+
this.defaults = {
|
|
3580
|
+
scroll: !0,
|
|
3581
|
+
forceAutoScrollFallback: !1,
|
|
3582
|
+
scrollSensitivity: 30,
|
|
3583
|
+
scrollSpeed: 10,
|
|
3584
|
+
bubbleScroll: !0
|
|
3585
|
+
};
|
|
3586
|
+
for (var t in this)
|
|
3587
|
+
t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
|
|
3588
|
+
}
|
|
3589
|
+
return e.prototype = {
|
|
3590
|
+
dragStarted: function(n) {
|
|
3591
|
+
var o = n.originalEvent;
|
|
3592
|
+
this.sortable.nativeDraggable ? Z(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? Z(document, "pointermove", this._handleFallbackAutoScroll) : o.touches ? Z(document, "touchmove", this._handleFallbackAutoScroll) : Z(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3593
|
+
},
|
|
3594
|
+
dragOverCompleted: function(n) {
|
|
3595
|
+
var o = n.originalEvent;
|
|
3596
|
+
!this.options.dragOverBubble && !o.rootEl && this._handleAutoScroll(o);
|
|
3597
|
+
},
|
|
3598
|
+
drop: function() {
|
|
3599
|
+
this.sortable.nativeDraggable ? W(document, "dragover", this._handleAutoScroll) : (W(document, "pointermove", this._handleFallbackAutoScroll), W(document, "touchmove", this._handleFallbackAutoScroll), W(document, "mousemove", this._handleFallbackAutoScroll)), bo(), Wt(), as();
|
|
3600
|
+
},
|
|
3601
|
+
nulling: function() {
|
|
3602
|
+
nn = Yn = yt = Rn = Dt = Tn = An = null, ie.length = 0;
|
|
3603
|
+
},
|
|
3604
|
+
_handleFallbackAutoScroll: function(n) {
|
|
3605
|
+
this._handleAutoScroll(n, !0);
|
|
3606
|
+
},
|
|
3607
|
+
_handleAutoScroll: function(n, o) {
|
|
3608
|
+
var r = this, a = (n.touches ? n.touches[0] : n).clientX, i = (n.touches ? n.touches[0] : n).clientY, s = document.elementFromPoint(a, i);
|
|
3609
|
+
if (nn = n, o || this.options.forceAutoScrollFallback || kt || We || wt) {
|
|
3610
|
+
Mn(n, this.options, s, o);
|
|
3611
|
+
var l = Je(s, !0);
|
|
3612
|
+
Rn && (!Dt || a !== Tn || i !== An) && (Dt && bo(), Dt = setInterval(function() {
|
|
3613
|
+
var d = Je(document.elementFromPoint(a, i), !0);
|
|
3614
|
+
d !== l && (l = d, Wt()), Mn(n, r.options, d, o);
|
|
3615
|
+
}, 10), Tn = a, An = i);
|
|
3616
|
+
} else {
|
|
3617
|
+
if (!this.options.bubbleScroll || Je(s, !0) === Ve()) {
|
|
3618
|
+
Wt();
|
|
3619
|
+
return;
|
|
3620
|
+
}
|
|
3621
|
+
Mn(n, this.options, Je(s, !1), !1);
|
|
3622
|
+
}
|
|
3623
|
+
}
|
|
3624
|
+
}, je(e, {
|
|
3625
|
+
pluginName: "scroll",
|
|
3626
|
+
initializeByDefault: !0
|
|
3627
|
+
});
|
|
3628
|
+
}
|
|
3629
|
+
function Wt() {
|
|
3630
|
+
ie.forEach(function(e) {
|
|
3631
|
+
clearInterval(e.pid);
|
|
3632
|
+
}), ie = [];
|
|
3633
|
+
}
|
|
3634
|
+
function bo() {
|
|
3635
|
+
clearInterval(Dt);
|
|
3636
|
+
}
|
|
3637
|
+
var Mn = Uo(function(e, t, n, o) {
|
|
3638
|
+
if (t.scroll) {
|
|
3639
|
+
var r = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, i = t.scrollSensitivity, s = t.scrollSpeed, l = Ve(), d = !1, u;
|
|
3640
|
+
Yn !== n && (Yn = n, Wt(), yt = t.scroll, u = t.scrollFn, yt === !0 && (yt = Je(n, !0)));
|
|
3641
|
+
var f = 0, A = yt;
|
|
3642
|
+
do {
|
|
3643
|
+
var C = A, E = se(C), g = E.top, p = E.bottom, h = E.left, S = E.right, k = E.width, L = E.height, M = void 0, F = void 0, I = C.scrollWidth, R = C.scrollHeight, D = N(C), T = C.scrollLeft, b = C.scrollTop;
|
|
3644
|
+
C === l ? (M = k < I && (D.overflowX === "auto" || D.overflowX === "scroll" || D.overflowX === "visible"), F = L < R && (D.overflowY === "auto" || D.overflowY === "scroll" || D.overflowY === "visible")) : (M = k < I && (D.overflowX === "auto" || D.overflowX === "scroll"), F = L < R && (D.overflowY === "auto" || D.overflowY === "scroll"));
|
|
3645
|
+
var $ = M && (Math.abs(S - r) <= i && T + k < I) - (Math.abs(h - r) <= i && !!T), v = F && (Math.abs(p - a) <= i && b + L < R) - (Math.abs(g - a) <= i && !!b);
|
|
3646
|
+
if (!ie[f])
|
|
3647
|
+
for (var y = 0; y <= f; y++)
|
|
3648
|
+
ie[y] || (ie[y] = {});
|
|
3649
|
+
(ie[f].vx != $ || ie[f].vy != v || ie[f].el !== C) && (ie[f].el = C, ie[f].vx = $, ie[f].vy = v, clearInterval(ie[f].pid), ($ != 0 || v != 0) && (d = !0, ie[f].pid = setInterval((function() {
|
|
3650
|
+
o && this.layer === 0 && V.active._onTouchMove(nn);
|
|
3651
|
+
var m = ie[this.layer].vy ? ie[this.layer].vy * s : 0, c = ie[this.layer].vx ? ie[this.layer].vx * s : 0;
|
|
3652
|
+
typeof u == "function" && u.call(V.dragged.parentNode[Se], c, m, e, nn, ie[this.layer].el) !== "continue" || qo(ie[this.layer].el, c, m);
|
|
3653
|
+
}).bind({
|
|
3654
|
+
layer: f
|
|
3655
|
+
}), 24))), f++;
|
|
3656
|
+
} while (t.bubbleScroll && A !== l && (A = Je(A, !1)));
|
|
3657
|
+
Rn = d;
|
|
3658
|
+
}
|
|
3659
|
+
}, 30), Jo = function(t) {
|
|
3660
|
+
var n = t.originalEvent, o = t.putSortable, r = t.dragEl, a = t.activeSortable, i = t.dispatchSortableEvent, s = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
3661
|
+
if (n) {
|
|
3662
|
+
var d = o || a;
|
|
3663
|
+
s();
|
|
3664
|
+
var u = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, f = document.elementFromPoint(u.clientX, u.clientY);
|
|
3665
|
+
l(), d && !d.el.contains(f) && (i("spill"), this.onSpill({
|
|
3666
|
+
dragEl: r,
|
|
3667
|
+
putSortable: o
|
|
3668
|
+
}));
|
|
3669
|
+
}
|
|
3670
|
+
};
|
|
3671
|
+
function zn() {
|
|
3672
|
+
}
|
|
3673
|
+
zn.prototype = {
|
|
3674
|
+
startIndex: null,
|
|
3675
|
+
dragStart: function(t) {
|
|
3676
|
+
var n = t.oldDraggableIndex;
|
|
3677
|
+
this.startIndex = n;
|
|
3678
|
+
},
|
|
3679
|
+
onSpill: function(t) {
|
|
3680
|
+
var n = t.dragEl, o = t.putSortable;
|
|
3681
|
+
this.sortable.captureAnimationState(), o && o.captureAnimationState();
|
|
3682
|
+
var r = dt(this.sortable.el, this.startIndex, this.options);
|
|
3683
|
+
r ? this.sortable.el.insertBefore(n, r) : this.sortable.el.appendChild(n), this.sortable.animateAll(), o && o.animateAll();
|
|
3684
|
+
},
|
|
3685
|
+
drop: Jo
|
|
3686
|
+
};
|
|
3687
|
+
je(zn, {
|
|
3688
|
+
pluginName: "revertOnSpill"
|
|
3689
|
+
});
|
|
3690
|
+
function jn() {
|
|
3691
|
+
}
|
|
3692
|
+
jn.prototype = {
|
|
3693
|
+
onSpill: function(t) {
|
|
3694
|
+
var n = t.dragEl, o = t.putSortable, r = o || this.sortable;
|
|
3695
|
+
r.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), r.animateAll();
|
|
3696
|
+
},
|
|
3697
|
+
drop: Jo
|
|
3698
|
+
};
|
|
3699
|
+
je(jn, {
|
|
3700
|
+
pluginName: "removeOnSpill"
|
|
3701
|
+
});
|
|
3702
|
+
V.mount(new Es());
|
|
3703
|
+
V.mount(jn, zn);
|
|
3704
|
+
function _s(e, t, n = {}) {
|
|
3705
|
+
let o;
|
|
3706
|
+
const { document: r = Ir, ...a } = n, i = {
|
|
3707
|
+
onUpdate: (u) => {
|
|
3708
|
+
As(t, u.oldIndex, u.newIndex, u);
|
|
3709
|
+
}
|
|
3710
|
+
}, s = () => {
|
|
3711
|
+
const u = typeof e == "string" ? r == null ? void 0 : r.querySelector(e) : Yr(e);
|
|
3712
|
+
!u || o !== void 0 || (o = new V(u, { ...i, ...a }));
|
|
3713
|
+
}, l = () => {
|
|
3714
|
+
o == null || o.destroy(), o = void 0;
|
|
3715
|
+
}, d = (u, f) => {
|
|
3716
|
+
if (f !== void 0)
|
|
3717
|
+
o == null || o.option(u, f);
|
|
3718
|
+
else
|
|
3719
|
+
return o == null ? void 0 : o.option(u);
|
|
3720
|
+
};
|
|
3721
|
+
return xr(s), Fr(l), {
|
|
3722
|
+
stop: l,
|
|
3723
|
+
start: s,
|
|
3724
|
+
option: d
|
|
3725
|
+
};
|
|
3726
|
+
}
|
|
3727
|
+
function Cs(e, t, n) {
|
|
3728
|
+
const o = e.children[n];
|
|
3729
|
+
e.insertBefore(t, o);
|
|
3730
|
+
}
|
|
3731
|
+
function Ts(e) {
|
|
3732
|
+
e.parentNode && e.parentNode.removeChild(e);
|
|
3733
|
+
}
|
|
3734
|
+
function As(e, t, n, o = null) {
|
|
3735
|
+
o != null && (Ts(o.item), Cs(o.from, o.item, t));
|
|
3736
|
+
const r = Ln(e), a = r ? [...Xn(e)] : Xn(e);
|
|
3737
|
+
if (n >= 0 && n < a.length) {
|
|
3738
|
+
const i = a.splice(t, 1)[0];
|
|
3739
|
+
ct(() => {
|
|
3740
|
+
a.splice(n, 0, i), r && (e.value = a);
|
|
3741
|
+
});
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
const de = [];
|
|
3745
|
+
for (let e = 0; e < 256; ++e)
|
|
3746
|
+
de.push((e + 256).toString(16).slice(1));
|
|
3747
|
+
function Qo(e, t = 0) {
|
|
3748
|
+
return (de[e[t + 0]] + de[e[t + 1]] + de[e[t + 2]] + de[e[t + 3]] + "-" + de[e[t + 4]] + de[e[t + 5]] + "-" + de[e[t + 6]] + de[e[t + 7]] + "-" + de[e[t + 8]] + de[e[t + 9]] + "-" + de[e[t + 10]] + de[e[t + 11]] + de[e[t + 12]] + de[e[t + 13]] + de[e[t + 14]] + de[e[t + 15]]).toLowerCase();
|
|
3749
|
+
}
|
|
3750
|
+
let kn;
|
|
3751
|
+
const Ms = new Uint8Array(16);
|
|
3752
|
+
function er() {
|
|
3753
|
+
if (!kn) {
|
|
3754
|
+
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
3755
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
3756
|
+
kn = crypto.getRandomValues.bind(crypto);
|
|
3757
|
+
}
|
|
3758
|
+
return kn(Ms);
|
|
3759
|
+
}
|
|
3760
|
+
const mt = {};
|
|
3761
|
+
function ks(e, t, n) {
|
|
3762
|
+
let o;
|
|
3763
|
+
{
|
|
3764
|
+
const r = Date.now(), a = er();
|
|
3765
|
+
Os(mt, r, a), o = $s(a, mt.msecs, mt.nsecs, mt.clockseq, mt.node, t, n);
|
|
3766
|
+
}
|
|
3767
|
+
return t ?? Qo(o);
|
|
3768
|
+
}
|
|
3769
|
+
function Os(e, t, n) {
|
|
3770
|
+
return e.msecs ?? (e.msecs = -1 / 0), e.nsecs ?? (e.nsecs = 0), t === e.msecs ? (e.nsecs++, e.nsecs >= 1e4 && (e.node = void 0, e.nsecs = 0)) : t > e.msecs ? e.nsecs = 0 : t < e.msecs && (e.node = void 0), e.node || (e.node = n.slice(10, 16), e.node[0] |= 1, e.clockseq = (n[8] << 8 | n[9]) & 16383), e.msecs = t, e;
|
|
3771
|
+
}
|
|
3772
|
+
function $s(e, t, n, o, r, a, i = 0) {
|
|
3773
|
+
if (e.length < 16)
|
|
3774
|
+
throw new Error("Random bytes length must be >= 16");
|
|
3775
|
+
if (!a)
|
|
3776
|
+
a = new Uint8Array(16), i = 0;
|
|
3777
|
+
else if (i < 0 || i + 16 > a.length)
|
|
3778
|
+
throw new RangeError(`UUID byte range ${i}:${i + 15} is out of buffer bounds`);
|
|
3779
|
+
t ?? (t = Date.now()), n ?? (n = 0), o ?? (o = (e[8] << 8 | e[9]) & 16383), r ?? (r = e.slice(10, 16)), t += 122192928e5;
|
|
3780
|
+
const s = ((t & 268435455) * 1e4 + n) % 4294967296;
|
|
3781
|
+
a[i++] = s >>> 24 & 255, a[i++] = s >>> 16 & 255, a[i++] = s >>> 8 & 255, a[i++] = s & 255;
|
|
3782
|
+
const l = t / 4294967296 * 1e4 & 268435455;
|
|
3783
|
+
a[i++] = l >>> 8 & 255, a[i++] = l & 255, a[i++] = l >>> 24 & 15 | 16, a[i++] = l >>> 16 & 255, a[i++] = o >>> 8 | 128, a[i++] = o & 255;
|
|
3784
|
+
for (let d = 0; d < 6; ++d)
|
|
3785
|
+
a[i++] = r[d];
|
|
3786
|
+
return a;
|
|
3787
|
+
}
|
|
3788
|
+
const Is = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yo = { randomUUID: Is };
|
|
3789
|
+
function xs(e, t, n) {
|
|
3790
|
+
var r;
|
|
3791
|
+
if (yo.randomUUID && !e)
|
|
3792
|
+
return yo.randomUUID();
|
|
3793
|
+
e = e || {};
|
|
3794
|
+
const o = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? er();
|
|
3795
|
+
if (o.length < 16)
|
|
3796
|
+
throw new Error("Random bytes length must be >= 16");
|
|
3797
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Qo(o);
|
|
3798
|
+
}
|
|
3799
|
+
const Fs = () => ks(), Ou = () => xs(), ht = "a-sortable-widget__handle", Ys = "a-sortable-widget__ghost", Rs = "a-sortable-widget__drag", Bs = "a-sortable-widget__chosen", Do = "a-sortable-widget__group";
|
|
3800
|
+
function Ls(e, t, n, o) {
|
|
3801
|
+
const r = H(!1), a = H(null), i = H(null), s = H(Fs()), l = H(null), d = H(0), u = H(n.dirty);
|
|
3802
|
+
function f(v, y) {
|
|
3803
|
+
return {
|
|
3804
|
+
key: v[n.keyField],
|
|
3805
|
+
index: y,
|
|
3806
|
+
raw: v
|
|
3807
|
+
};
|
|
3808
|
+
}
|
|
3809
|
+
const A = J(() => e.value.map((v, y) => f(v, y))), C = (v = void 0) => {
|
|
3810
|
+
d.value++, q(v) || o("update:modelValue", v), ct(() => {
|
|
3811
|
+
t();
|
|
3812
|
+
});
|
|
3813
|
+
}, E = (v) => {
|
|
3814
|
+
u.value.add(v);
|
|
3815
|
+
}, g = (v) => {
|
|
3816
|
+
u.value.delete(v);
|
|
3817
|
+
}, p = (v, y, m, c = []) => {
|
|
3818
|
+
const _ = y > m ? m : y;
|
|
3819
|
+
let w = n.positionMultiplier * _ + n.positionMultiplier * 1;
|
|
3820
|
+
for (let Y = _; Y < v.length; Y++)
|
|
3821
|
+
mi(v[Y], n.positionField, w), E(v[Y][n.keyField]), w = w + n.positionMultiplier * 1, c.push({
|
|
3822
|
+
id: v[Y].id,
|
|
3823
|
+
position: v[Y].position
|
|
3824
|
+
});
|
|
3825
|
+
return c;
|
|
3826
|
+
}, h = (v, y) => {
|
|
3827
|
+
const m = Re(e.value);
|
|
3828
|
+
if (y >= 0 && y < m.length) {
|
|
3829
|
+
let c = [];
|
|
3830
|
+
const _ = m.splice(v, 1)[0];
|
|
3831
|
+
return m.splice(y, 0, _), q(n.updatePosition) || (c = p(m, v, y)), C(), o("update:modelValue", m), c;
|
|
3832
|
+
}
|
|
3833
|
+
return [];
|
|
3834
|
+
}, S = (v, y) => {
|
|
3835
|
+
const m = y.findIndex((c) => c[n.keyField] === v);
|
|
3836
|
+
return m === -1 ? null : m;
|
|
3837
|
+
}, k = (v, y, m, c = null) => {
|
|
3838
|
+
v.data = Re(y), K(m) || (v.data.position = m), K(c) || E(y.id);
|
|
3839
|
+
}, L = (v, y, m = null, c = null) => {
|
|
3840
|
+
const _ = Re(e.value), w = S(v, _);
|
|
3841
|
+
!K(w) && _[w] && (k(_[w], y, m, c), C(_));
|
|
3842
|
+
}, M = (v, y, m, c = null) => {
|
|
3843
|
+
const _ = Re(e.value);
|
|
3844
|
+
_[v] && (k(_[v], y, m, c), C(_));
|
|
3845
|
+
}, F = (v, y) => {
|
|
3846
|
+
const m = Re(e.value);
|
|
3847
|
+
if (K(v) || v < 0)
|
|
3848
|
+
return m.push(Re(y)), C(m), [];
|
|
3849
|
+
const c = [];
|
|
3850
|
+
return m[v] ? (m.splice(v + 1, 0, y), p(m, v + 1, v + 1, c), C(m), c) : [];
|
|
3851
|
+
}, I = (v, y) => {
|
|
3852
|
+
const m = Re(e.value);
|
|
3853
|
+
if (K(v))
|
|
3854
|
+
return m.push(Re(y)), C(m), [];
|
|
3855
|
+
const c = S(v, m), _ = [];
|
|
3856
|
+
return !K(c) && m[c] ? (m.splice(c + 1, 0, y), p(m, c + 1, c + 1, _), C(m), _) : [];
|
|
3857
|
+
}, R = (v) => {
|
|
3858
|
+
const y = Re(e.value), m = S(v, y), c = [];
|
|
3859
|
+
return !K(m) && y[m] ? (y.splice(m, 1), p(y, m, m, c), g(v), C(y), c) : [];
|
|
3860
|
+
}, D = (v) => {
|
|
3861
|
+
const y = Re(e.value), m = [];
|
|
3862
|
+
if (y[v]) {
|
|
3863
|
+
const c = y[v][n.keyField];
|
|
3864
|
+
return y.splice(v, 1), p(y, v, v, m), g(c), C(y), m;
|
|
3865
|
+
}
|
|
3866
|
+
return [];
|
|
3867
|
+
}, T = () => {
|
|
3868
|
+
i.value && l.value && (l.value.stop(), l.value = null);
|
|
3869
|
+
};
|
|
3870
|
+
return {
|
|
3871
|
+
items: A,
|
|
3872
|
+
forceRerender: d,
|
|
3873
|
+
dirtyLocal: u,
|
|
3874
|
+
widgetEl: i,
|
|
3875
|
+
randomUuid: s,
|
|
3876
|
+
removeDialog: r,
|
|
3877
|
+
itemToRemove: a,
|
|
3878
|
+
sortableInstance: l,
|
|
3879
|
+
refresh: () => {
|
|
3880
|
+
T(), t();
|
|
3881
|
+
},
|
|
3882
|
+
onRemoveDialogConfirm: () => {
|
|
3883
|
+
K(a.value) || (o("onDelete", a.value), r.value = !1);
|
|
3884
|
+
},
|
|
3885
|
+
destroy: T,
|
|
3886
|
+
moveArrayElement: h,
|
|
3887
|
+
addAfterId: I,
|
|
3888
|
+
addAfterIndex: F,
|
|
3889
|
+
removeById: R,
|
|
3890
|
+
removeByIndex: D,
|
|
3891
|
+
updateData: L,
|
|
3892
|
+
updateDataAtIndex: M
|
|
3893
|
+
};
|
|
3894
|
+
}
|
|
3895
|
+
const Ns = "a-sortable-", Vs = ["id"], Ps = { key: 1 }, Hs = { class: "a-sortable-widget__before" }, Us = { class: "a-sortable-widget__content" }, qs = { class: "a-sortable-widget__buttons" }, zs = { class: "a-sortable-widget__after" }, $u = /* @__PURE__ */ Te({
|
|
3896
|
+
__name: "ASortable",
|
|
3897
|
+
props: {
|
|
3898
|
+
modelValue: {},
|
|
3899
|
+
dirty: { default: () => /* @__PURE__ */ new Set() },
|
|
3900
|
+
keyField: { default: "position" },
|
|
3901
|
+
disableDraggable: { type: Boolean, default: !1 },
|
|
3902
|
+
rootClassName: { default: "a-sortable-widget" },
|
|
3903
|
+
widgetIdentifierId: { default: void 0 },
|
|
3904
|
+
disableDefaultSort: { type: Boolean, default: !1 },
|
|
3905
|
+
updatePosition: { type: Boolean, default: !1 },
|
|
3906
|
+
positionField: { default: "position" },
|
|
3907
|
+
positionMultiplier: { default: 1 },
|
|
3908
|
+
showAddAfterButton: { type: Boolean, default: !1 },
|
|
3909
|
+
showAddLastButton: { type: Boolean, default: !1 },
|
|
3910
|
+
showDeleteButton: { type: Boolean, default: !1 },
|
|
3911
|
+
showEditButton: { type: Boolean, default: !1 },
|
|
3912
|
+
addLastButtonT: { default: "common.sortable.addNewAtEnd" },
|
|
3913
|
+
chips: { type: Boolean, default: !1 },
|
|
3914
|
+
chipSize: { default: "small" },
|
|
3915
|
+
disableDeleteDialog: { type: Boolean, default: !1 }
|
|
3916
|
+
},
|
|
3917
|
+
emits: ["update:modelValue", "update:dirty", "onStart", "onEnd", "onAddAfter", "onAddLast", "onEdit", "onDelete"],
|
|
3918
|
+
setup(e, { expose: t, emit: n }) {
|
|
3919
|
+
const o = e, r = n, a = ur(() => o.modelValue), { t: i } = ft(), s = (c) => {
|
|
3920
|
+
r("onAddAfter", c);
|
|
3921
|
+
}, l = (c) => {
|
|
3922
|
+
if (S.value = c, o.disableDeleteDialog) {
|
|
3923
|
+
F();
|
|
3924
|
+
return;
|
|
3925
|
+
}
|
|
3926
|
+
k.value = !0;
|
|
3927
|
+
}, d = (c) => {
|
|
3928
|
+
r("onEdit", c);
|
|
3929
|
+
}, u = () => {
|
|
3930
|
+
if (o.modelValue.length > 0) {
|
|
3931
|
+
r("onAddLast", Re(o.modelValue[o.modelValue.length - 1]));
|
|
3932
|
+
return;
|
|
3933
|
+
}
|
|
3934
|
+
r("onAddLast", null);
|
|
3935
|
+
}, f = J(() => q(o.widgetIdentifierId) ? Ns + D.value : o.widgetIdentifierId), A = J(() => o.rootClassName + " " + (o.chips ? o.rootClassName + "--chips" : "")), C = () => {
|
|
3936
|
+
if (o.disableDraggable || !R.value) return;
|
|
3937
|
+
const c = R.value.querySelector("." + Do);
|
|
3938
|
+
c && (I.value = _s(c, [], {
|
|
3939
|
+
handle: "." + ht,
|
|
3940
|
+
ghostClass: Ys,
|
|
3941
|
+
dragClass: Rs,
|
|
3942
|
+
chosenClass: Bs,
|
|
3943
|
+
onEnd: async (_) => {
|
|
3944
|
+
if (o.disableDefaultSort || q(_.oldIndex) || q(_.newIndex)) return;
|
|
3945
|
+
const w = h(_.oldIndex, _.newIndex);
|
|
3946
|
+
r("onEnd", w);
|
|
3947
|
+
},
|
|
3948
|
+
onStart() {
|
|
3949
|
+
r("onStart");
|
|
3950
|
+
}
|
|
3951
|
+
}));
|
|
3952
|
+
}, {
|
|
3953
|
+
items: E,
|
|
3954
|
+
forceRerender: g,
|
|
3955
|
+
dirtyLocal: p,
|
|
3956
|
+
moveArrayElement: h,
|
|
3957
|
+
itemToRemove: S,
|
|
3958
|
+
removeDialog: k,
|
|
3959
|
+
destroy: L,
|
|
3960
|
+
refresh: M,
|
|
3961
|
+
onRemoveDialogConfirm: F,
|
|
3962
|
+
sortableInstance: I,
|
|
3963
|
+
widgetEl: R,
|
|
3964
|
+
randomUuid: D,
|
|
3965
|
+
addAfterId: T,
|
|
3966
|
+
removeById: b,
|
|
3967
|
+
updateData: $,
|
|
3968
|
+
addAfterIndex: v,
|
|
3969
|
+
removeByIndex: y,
|
|
3970
|
+
updateDataAtIndex: m
|
|
3971
|
+
} = Ls(a, C, o, r);
|
|
3972
|
+
return cr(() => {
|
|
3973
|
+
L();
|
|
3974
|
+
}), ct(() => {
|
|
3975
|
+
R.value = document.querySelector("#" + f.value), C();
|
|
3976
|
+
}), Ce(
|
|
3977
|
+
() => o.disableDraggable,
|
|
3978
|
+
async (c) => {
|
|
3979
|
+
L(), c === !1 && C();
|
|
3980
|
+
}
|
|
3981
|
+
), Ce(
|
|
3982
|
+
() => o.dirty,
|
|
3983
|
+
(c) => {
|
|
3984
|
+
p.value = c;
|
|
3985
|
+
}
|
|
3986
|
+
), t({
|
|
3987
|
+
refresh: M,
|
|
3988
|
+
addAfterId: T,
|
|
3989
|
+
addAfterIndex: v,
|
|
3990
|
+
removeById: b,
|
|
3991
|
+
removeByIndex: y,
|
|
3992
|
+
updateData: $,
|
|
3993
|
+
updateDataAtIndex: m
|
|
3994
|
+
}), (c, _) => {
|
|
3995
|
+
const w = Zn("ABtnTertiary"), Y = Zn("ABtnPrimary");
|
|
3996
|
+
return z(), Ie("div", null, [
|
|
3997
|
+
ue("div", {
|
|
3998
|
+
id: f.value,
|
|
3999
|
+
class: qe(A.value)
|
|
4000
|
+
}, [
|
|
4001
|
+
(z(), Ie("div", {
|
|
4002
|
+
key: ee(g),
|
|
4003
|
+
class: qe(ee(Do))
|
|
4004
|
+
}, [
|
|
4005
|
+
(z(!0), Ie(At, null, dr(ee(E), (x, B) => (z(), Ie(At, {
|
|
4006
|
+
key: x.key
|
|
4007
|
+
}, [
|
|
4008
|
+
c.chips ? (z(), te(Nr, {
|
|
4009
|
+
key: 0,
|
|
4010
|
+
size: c.chipSize,
|
|
4011
|
+
class: "mr-1",
|
|
4012
|
+
"prepend-icon": c.disableDraggable ? void 0 : "mdi-drag",
|
|
4013
|
+
"append-icon": c.showDeleteButton ? "mdi-drag" : void 0,
|
|
4014
|
+
"onClick:close": (X) => l(x)
|
|
4015
|
+
}, rn({
|
|
4016
|
+
default: j(() => [
|
|
4017
|
+
ye(c.$slots, "item", { item: x })
|
|
4018
|
+
]),
|
|
4019
|
+
_: 2
|
|
4020
|
+
}, [
|
|
4021
|
+
c.disableDraggable ? void 0 : {
|
|
4022
|
+
name: "prepend",
|
|
4023
|
+
fn: j(() => [
|
|
4024
|
+
U(De, {
|
|
4025
|
+
class: qe({
|
|
4026
|
+
[ee(ht)]: !0,
|
|
4027
|
+
[ee(ht) + "--disabled"]: c.disableDraggable
|
|
4028
|
+
}),
|
|
4029
|
+
icon: "mdi-drag"
|
|
4030
|
+
}, null, 8, ["class"])
|
|
4031
|
+
]),
|
|
4032
|
+
key: "0"
|
|
4033
|
+
},
|
|
4034
|
+
c.showDeleteButton ? {
|
|
4035
|
+
name: "append",
|
|
4036
|
+
fn: j(() => [
|
|
4037
|
+
U(De, {
|
|
4038
|
+
class: "ml-2",
|
|
4039
|
+
icon: "mdi-close-circle",
|
|
4040
|
+
size: "large",
|
|
4041
|
+
onClick: $e((X) => l(x), ["stop"])
|
|
4042
|
+
}, null, 8, ["onClick"])
|
|
4043
|
+
]),
|
|
4044
|
+
key: "1"
|
|
4045
|
+
} : void 0
|
|
4046
|
+
]), 1032, ["size", "prepend-icon", "append-icon", "onClick:close"])) : (z(), Ie("div", Ps, [
|
|
4047
|
+
ue("div", Hs, [
|
|
4048
|
+
ye(c.$slots, "itemBefore", { item: x })
|
|
4049
|
+
]),
|
|
4050
|
+
ue("div", {
|
|
4051
|
+
class: qe(["a-sortable-widget__item", {
|
|
4052
|
+
"a-sortable-widget__item--last": B + 1 === ee(E).length,
|
|
4053
|
+
"a-sortable-widget__item--first": B === 0
|
|
4054
|
+
}])
|
|
4055
|
+
}, [
|
|
4056
|
+
U(De, {
|
|
4057
|
+
class: qe({
|
|
4058
|
+
[ee(ht)]: !0,
|
|
4059
|
+
[ee(ht) + "--disabled"]: c.disableDraggable
|
|
4060
|
+
}),
|
|
4061
|
+
icon: "mdi-drag"
|
|
4062
|
+
}, null, 8, ["class"]),
|
|
4063
|
+
ue("div", Us, [
|
|
4064
|
+
ye(c.$slots, "item", { item: x })
|
|
4065
|
+
]),
|
|
4066
|
+
ue("div", qs, [
|
|
4067
|
+
ye(c.$slots, "item-buttons", { item: x }, () => [
|
|
4068
|
+
c.showEditButton ? (z(), te(rt, {
|
|
4069
|
+
key: 0,
|
|
4070
|
+
icon: "",
|
|
4071
|
+
size: "x-small",
|
|
4072
|
+
variant: "text",
|
|
4073
|
+
class: "mx-1",
|
|
4074
|
+
onClick: $e((X) => d(x), ["stop"])
|
|
4075
|
+
}, {
|
|
4076
|
+
default: j(() => [
|
|
4077
|
+
U(De, { icon: "mdi-pencil" }),
|
|
4078
|
+
U(St, {
|
|
4079
|
+
anchor: "bottom",
|
|
4080
|
+
activator: "parent",
|
|
4081
|
+
text: "Edit"
|
|
4082
|
+
})
|
|
4083
|
+
]),
|
|
4084
|
+
_: 2
|
|
4085
|
+
}, 1032, ["onClick"])) : he("", !0),
|
|
4086
|
+
c.showDeleteButton ? (z(), te(rt, {
|
|
4087
|
+
key: 1,
|
|
4088
|
+
icon: "",
|
|
4089
|
+
size: "x-small",
|
|
4090
|
+
variant: "text",
|
|
4091
|
+
class: "mx-1",
|
|
4092
|
+
onClick: $e((X) => l(x), ["stop"])
|
|
4093
|
+
}, {
|
|
4094
|
+
default: j(() => [
|
|
4095
|
+
U(De, { icon: "mdi-trash-can-outline" }),
|
|
4096
|
+
U(St, {
|
|
4097
|
+
anchor: "bottom",
|
|
4098
|
+
activator: "parent",
|
|
4099
|
+
text: "Remove"
|
|
4100
|
+
})
|
|
4101
|
+
]),
|
|
4102
|
+
_: 2
|
|
4103
|
+
}, 1032, ["onClick"])) : he("", !0),
|
|
4104
|
+
ye(c.$slots, "buttons", { item: x }),
|
|
4105
|
+
c.showAddAfterButton ? (z(), te(rt, {
|
|
4106
|
+
key: 2,
|
|
4107
|
+
icon: "",
|
|
4108
|
+
size: "x-small",
|
|
4109
|
+
variant: "text",
|
|
4110
|
+
class: "mx-1"
|
|
4111
|
+
}, {
|
|
4112
|
+
default: j(() => [
|
|
4113
|
+
U(De, { icon: "mdi-dots-vertical" }),
|
|
4114
|
+
U(St, {
|
|
4115
|
+
anchor: "bottom",
|
|
4116
|
+
activator: "parent",
|
|
4117
|
+
text: "More options"
|
|
4118
|
+
}),
|
|
4119
|
+
U(To, { activator: "parent" }, {
|
|
4120
|
+
default: j(() => [
|
|
4121
|
+
U(Pr, { density: "compact" }, {
|
|
4122
|
+
default: j(() => [
|
|
4123
|
+
c.showAddAfterButton ? (z(), te(Hr, {
|
|
4124
|
+
key: 0,
|
|
4125
|
+
onClick: $e((X) => s(x), ["stop"])
|
|
4126
|
+
}, {
|
|
4127
|
+
default: j(() => _[3] || (_[3] = [
|
|
4128
|
+
Le(" Add new item after ")
|
|
4129
|
+
])),
|
|
4130
|
+
_: 2,
|
|
4131
|
+
__: [3]
|
|
4132
|
+
}, 1032, ["onClick"])) : he("", !0)
|
|
4133
|
+
]),
|
|
4134
|
+
_: 2
|
|
4135
|
+
}, 1024)
|
|
4136
|
+
]),
|
|
4137
|
+
_: 2
|
|
4138
|
+
}, 1024)
|
|
4139
|
+
]),
|
|
4140
|
+
_: 2
|
|
4141
|
+
}, 1024)) : he("", !0)
|
|
4142
|
+
])
|
|
4143
|
+
])
|
|
4144
|
+
], 2),
|
|
4145
|
+
ue("div", zs, [
|
|
4146
|
+
ye(c.$slots, "itemAfter", { item: x })
|
|
4147
|
+
])
|
|
4148
|
+
]))
|
|
4149
|
+
], 64))), 128))
|
|
4150
|
+
], 2))
|
|
4151
|
+
], 10, Vs),
|
|
4152
|
+
ye(c.$slots, "add-last-activator", {
|
|
4153
|
+
props: { onClick: $e(() => u(), ["stop"]) }
|
|
4154
|
+
}, () => [
|
|
4155
|
+
c.showAddLastButton ? (z(), te(rt, {
|
|
4156
|
+
key: 0,
|
|
4157
|
+
size: "small",
|
|
4158
|
+
"prepend-icon": "mdi-plus",
|
|
4159
|
+
class: "ma-1",
|
|
4160
|
+
onClick: $e(u, ["stop"])
|
|
4161
|
+
}, {
|
|
4162
|
+
default: j(() => [
|
|
4163
|
+
Le(we(ee(i)(c.addLastButtonT)), 1)
|
|
4164
|
+
]),
|
|
4165
|
+
_: 1
|
|
4166
|
+
})) : he("", !0)
|
|
4167
|
+
]),
|
|
4168
|
+
U(Vr, {
|
|
4169
|
+
modelValue: ee(k),
|
|
4170
|
+
"onUpdate:modelValue": _[2] || (_[2] = (x) => Ln(k) ? k.value = x : null),
|
|
4171
|
+
width: 500
|
|
4172
|
+
}, {
|
|
4173
|
+
default: j(() => [
|
|
4174
|
+
ee(k) ? (z(), te(Co, { key: 0 }, {
|
|
4175
|
+
default: j(() => [
|
|
4176
|
+
U(Da, {
|
|
4177
|
+
onOnCancel: _[0] || (_[0] = (x) => k.value = !1)
|
|
4178
|
+
}, {
|
|
4179
|
+
default: j(() => [
|
|
4180
|
+
Le(we(ee(i)("common.system.modal.confirmDelete")), 1)
|
|
4181
|
+
]),
|
|
4182
|
+
_: 1
|
|
4183
|
+
}),
|
|
4184
|
+
U(Ar, null, {
|
|
4185
|
+
default: j(() => [
|
|
4186
|
+
U(wo),
|
|
4187
|
+
U(w, {
|
|
4188
|
+
onClick: _[1] || (_[1] = $e((x) => k.value = !1, ["stop"]))
|
|
4189
|
+
}, {
|
|
4190
|
+
default: j(() => [
|
|
4191
|
+
Le(we(ee(i)("common.button.cancel")), 1)
|
|
4192
|
+
]),
|
|
4193
|
+
_: 1
|
|
4194
|
+
}),
|
|
4195
|
+
U(Y, {
|
|
4196
|
+
onClick: $e(ee(F), ["stop"])
|
|
4197
|
+
}, {
|
|
4198
|
+
default: j(() => [
|
|
4199
|
+
Le(we(ee(i)("common.button.delete")), 1)
|
|
4200
|
+
]),
|
|
4201
|
+
_: 1
|
|
4202
|
+
}, 8, ["onClick"])
|
|
4203
|
+
]),
|
|
4204
|
+
_: 1
|
|
4205
|
+
})
|
|
4206
|
+
]),
|
|
4207
|
+
_: 1
|
|
4208
|
+
})) : he("", !0)
|
|
4209
|
+
]),
|
|
4210
|
+
_: 1
|
|
4211
|
+
}, 8, ["modelValue"])
|
|
4212
|
+
]);
|
|
4213
|
+
};
|
|
4214
|
+
}
|
|
4215
|
+
}), Iu = (e, t = "item") => t + "." + e;
|
|
4216
|
+
function xu(e, t) {
|
|
4217
|
+
return t.includes(e);
|
|
4218
|
+
}
|
|
4219
|
+
export {
|
|
4220
|
+
Fl as $,
|
|
4221
|
+
Lo as A,
|
|
4222
|
+
bu as B,
|
|
4223
|
+
vt as C,
|
|
4224
|
+
yu as D,
|
|
4225
|
+
Eu as E,
|
|
4226
|
+
_u as F,
|
|
4227
|
+
Wa as G,
|
|
4228
|
+
Ba as H,
|
|
4229
|
+
xa as I,
|
|
4230
|
+
Jl as J,
|
|
4231
|
+
Pa as K,
|
|
4232
|
+
Ql as L,
|
|
4233
|
+
za as M,
|
|
4234
|
+
tu as N,
|
|
4235
|
+
ti as O,
|
|
4236
|
+
eu as P,
|
|
4237
|
+
Ka as Q,
|
|
4238
|
+
Su as R,
|
|
4239
|
+
$o as S,
|
|
4240
|
+
Ji as T,
|
|
4241
|
+
iu as U,
|
|
4242
|
+
vl as V,
|
|
4243
|
+
va as W,
|
|
4244
|
+
pi as X,
|
|
4245
|
+
ma as Y,
|
|
4246
|
+
Ol as Z,
|
|
4247
|
+
Ao as _,
|
|
4248
|
+
Vn as a,
|
|
4249
|
+
un as a$,
|
|
4250
|
+
Il as a0,
|
|
4251
|
+
xl as a1,
|
|
4252
|
+
Bl as a2,
|
|
4253
|
+
Yl as a3,
|
|
4254
|
+
Rl as a4,
|
|
4255
|
+
Ll as a5,
|
|
4256
|
+
$l as a6,
|
|
4257
|
+
gn as a7,
|
|
4258
|
+
Pl as a8,
|
|
4259
|
+
Hl as a9,
|
|
4260
|
+
Ys as aA,
|
|
4261
|
+
Iu as aB,
|
|
4262
|
+
Wl as aC,
|
|
4263
|
+
ja as aD,
|
|
4264
|
+
Ua as aE,
|
|
4265
|
+
Va as aF,
|
|
4266
|
+
Ia as aG,
|
|
4267
|
+
El as aH,
|
|
4268
|
+
Gl as aI,
|
|
4269
|
+
Ul as aJ,
|
|
4270
|
+
sa as aK,
|
|
4271
|
+
ua as aL,
|
|
4272
|
+
Qn as aM,
|
|
4273
|
+
xt as aN,
|
|
4274
|
+
Jn as aO,
|
|
4275
|
+
mi as aP,
|
|
4276
|
+
Tu as aQ,
|
|
4277
|
+
$u as aR,
|
|
4278
|
+
zl as aS,
|
|
4279
|
+
Du as aT,
|
|
4280
|
+
wu as aU,
|
|
4281
|
+
wl as aV,
|
|
4282
|
+
_l as aW,
|
|
4283
|
+
Tl as aX,
|
|
4284
|
+
Al as aY,
|
|
4285
|
+
jr as aZ,
|
|
4286
|
+
Cl as a_,
|
|
4287
|
+
Nl as aa,
|
|
4288
|
+
ca as ab,
|
|
4289
|
+
ha as ac,
|
|
4290
|
+
ne as ad,
|
|
4291
|
+
Ml as ae,
|
|
4292
|
+
kl as af,
|
|
4293
|
+
Wr as ag,
|
|
4294
|
+
Cu as ah,
|
|
4295
|
+
ku as ai,
|
|
4296
|
+
Mu as aj,
|
|
4297
|
+
Au as ak,
|
|
4298
|
+
Fa as al,
|
|
4299
|
+
Pi as am,
|
|
4300
|
+
Ya as an,
|
|
4301
|
+
Hn as ao,
|
|
4302
|
+
ni as ap,
|
|
4303
|
+
ql as aq,
|
|
4304
|
+
Fs as ar,
|
|
4305
|
+
Ns as as,
|
|
4306
|
+
_s as at,
|
|
4307
|
+
Sl as au,
|
|
4308
|
+
Kn as av,
|
|
4309
|
+
ht as aw,
|
|
4310
|
+
Do as ax,
|
|
4311
|
+
Bs as ay,
|
|
4312
|
+
Rs as az,
|
|
4313
|
+
gt as b,
|
|
4314
|
+
cn as b0,
|
|
4315
|
+
au as b1,
|
|
4316
|
+
lu as b2,
|
|
4317
|
+
su as b3,
|
|
4318
|
+
fu as b4,
|
|
4319
|
+
uu as b5,
|
|
4320
|
+
lo as b6,
|
|
4321
|
+
ou as b7,
|
|
4322
|
+
ru as b8,
|
|
4323
|
+
cu as b9,
|
|
4324
|
+
pu as ba,
|
|
4325
|
+
mu as bb,
|
|
4326
|
+
hu as bc,
|
|
4327
|
+
Ou as bd,
|
|
4328
|
+
xu as be,
|
|
4329
|
+
Xl as bf,
|
|
4330
|
+
Zl as bg,
|
|
4331
|
+
La as bh,
|
|
4332
|
+
Kl as bi,
|
|
4333
|
+
Pn as bj,
|
|
4334
|
+
xo as bk,
|
|
4335
|
+
Fo as bl,
|
|
4336
|
+
Vl as bm,
|
|
4337
|
+
Xa as bn,
|
|
4338
|
+
Qa as bo,
|
|
4339
|
+
gu as bp,
|
|
4340
|
+
vu as bq,
|
|
4341
|
+
ba as br,
|
|
4342
|
+
Io as c,
|
|
4343
|
+
q as d,
|
|
4344
|
+
Nn as e,
|
|
4345
|
+
Mo as f,
|
|
4346
|
+
Re as g,
|
|
4347
|
+
K as h,
|
|
4348
|
+
pe as i,
|
|
4349
|
+
In as j,
|
|
4350
|
+
jl as k,
|
|
4351
|
+
Da as l,
|
|
4352
|
+
nu as m,
|
|
4353
|
+
du as n,
|
|
4354
|
+
gl as o,
|
|
4355
|
+
sn as p,
|
|
4356
|
+
ln as q,
|
|
4357
|
+
ko as r,
|
|
4358
|
+
Oo as s,
|
|
4359
|
+
qr as t,
|
|
4360
|
+
Mt as u,
|
|
4361
|
+
yl as v,
|
|
4362
|
+
bl as w,
|
|
4363
|
+
Nt as x,
|
|
4364
|
+
Dl as y,
|
|
4365
|
+
zr as z
|
|
4366
|
+
};
|
|
4367
|
+
//# sourceMappingURL=enum-ClUKfrD4.mjs.map
|