@romainbx/wpic-components 0.0.81 → 0.0.83
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/style.css +1 -1
- package/dist/wpic-components.js +435 -425
- package/dist/wpic-components.umd.cjs +10 -10
- package/package.json +1 -1
package/dist/wpic-components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Rn, inject as Si, computed as
|
|
1
|
+
import { defineComponent as Rn, inject as Si, computed as de, toValue as Oe, toRef as Jn, resolveDynamicComponent as Gr, h as Et, getCurrentInstance as mn, ref as ne, reactive as Ln, unref as P, onMounted as en, isRef as Co, watch as Pe, provide as Ci, readonly as Kp, onBeforeUnmount as hr, watchEffect as Cd, nextTick as nt, shallowRef as Od, warn as Yp, onUnmounted as Zo, createElementBlock as S, openBlock as b, createElementVNode as A, createVNode as le, normalizeClass as G, createCommentVNode as Q, createBlock as ge, withCtx as xe, renderSlot as Me, createTextVNode as Ie, toDisplayString as be, Fragment as $e, renderList as We, withModifiers as Pr, Teleport as Md, normalizeStyle as un, withDirectives as Vr, vModelText as sa, vShow as aa, resolveComponent as la, createStaticVNode as Xo, pushScopeId as Jp, popScopeId as Gp, useSlots as Td, markRaw as Zp, customRef as Xp } from "vue";
|
|
2
2
|
function Qp() {
|
|
3
3
|
return $d().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
4
4
|
}
|
|
@@ -661,10 +661,10 @@ function Bm(t, e) {
|
|
|
661
661
|
type: e.type,
|
|
662
662
|
validate: e.validate,
|
|
663
663
|
schema: e.schema
|
|
664
|
-
}), s =
|
|
664
|
+
}), s = de(() => o.errors);
|
|
665
665
|
function a(l) {
|
|
666
666
|
var c, u, d;
|
|
667
|
-
"value" in l && (n.value = l.value), "errors" in l && ((c = e.form) === null || c === void 0 || c.setFieldError(
|
|
667
|
+
"value" in l && (n.value = l.value), "errors" in l && ((c = e.form) === null || c === void 0 || c.setFieldError(P(t), l.errors)), "touched" in l && ((u = e.form) === null || u === void 0 || u.setFieldTouched(P(t), (d = l.touched) !== null && d !== void 0 ? d : !1)), "initialValue" in l && i(l.initialValue);
|
|
668
668
|
}
|
|
669
669
|
return {
|
|
670
670
|
id: Array.isArray(o.id) ? o.id[o.id.length - 1] : o.id,
|
|
@@ -678,18 +678,18 @@ function Bm(t, e) {
|
|
|
678
678
|
};
|
|
679
679
|
}
|
|
680
680
|
function Pm(t, e, n) {
|
|
681
|
-
const r = ne(
|
|
681
|
+
const r = ne(P(e));
|
|
682
682
|
function i() {
|
|
683
|
-
return n ? ft(n.initialValues.value,
|
|
683
|
+
return n ? ft(n.initialValues.value, P(t), P(r)) : P(r);
|
|
684
684
|
}
|
|
685
685
|
function o(c) {
|
|
686
686
|
if (!n) {
|
|
687
687
|
r.value = c;
|
|
688
688
|
return;
|
|
689
689
|
}
|
|
690
|
-
n.setFieldInitialValue(
|
|
690
|
+
n.setFieldInitialValue(P(t), c, !0);
|
|
691
691
|
}
|
|
692
|
-
const s =
|
|
692
|
+
const s = de(i);
|
|
693
693
|
if (!n)
|
|
694
694
|
return {
|
|
695
695
|
value: ne(i()),
|
|
@@ -697,13 +697,13 @@ function Pm(t, e, n) {
|
|
|
697
697
|
setInitialValue: o
|
|
698
698
|
};
|
|
699
699
|
const a = Vm(e, n, s, t);
|
|
700
|
-
return n.stageInitialValue(
|
|
701
|
-
value:
|
|
700
|
+
return n.stageInitialValue(P(t), a, !0), {
|
|
701
|
+
value: de({
|
|
702
702
|
get() {
|
|
703
|
-
return ft(n.values,
|
|
703
|
+
return ft(n.values, P(t));
|
|
704
704
|
},
|
|
705
705
|
set(c) {
|
|
706
|
-
n.setFieldValue(
|
|
706
|
+
n.setFieldValue(P(t), c, !1);
|
|
707
707
|
}
|
|
708
708
|
}),
|
|
709
709
|
initialValue: s,
|
|
@@ -711,10 +711,10 @@ function Pm(t, e, n) {
|
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
713
|
function Vm(t, e, n, r) {
|
|
714
|
-
return Co(t) ?
|
|
714
|
+
return Co(t) ? P(t) : t !== void 0 ? t : ft(e.values, P(r), P(n));
|
|
715
715
|
}
|
|
716
716
|
function Rm(t, e, n, r) {
|
|
717
|
-
const i =
|
|
717
|
+
const i = de(() => {
|
|
718
718
|
var s, a, l;
|
|
719
719
|
return (l = (a = (s = Oe(r)) === null || s === void 0 ? void 0 : s.describe) === null || a === void 0 ? void 0 : a.call(s).required) !== null && l !== void 0 ? l : !1;
|
|
720
720
|
}), o = Ln({
|
|
@@ -722,9 +722,9 @@ function Rm(t, e, n, r) {
|
|
|
722
722
|
pending: !1,
|
|
723
723
|
valid: !0,
|
|
724
724
|
required: i,
|
|
725
|
-
validated: !!
|
|
726
|
-
initialValue:
|
|
727
|
-
dirty:
|
|
725
|
+
validated: !!P(n).length,
|
|
726
|
+
initialValue: de(() => P(e)),
|
|
727
|
+
dirty: de(() => !st(P(t), P(e)))
|
|
728
728
|
});
|
|
729
729
|
return Pe(n, (s) => {
|
|
730
730
|
o.valid = !s.length;
|
|
@@ -874,7 +874,7 @@ function Fm(t) {
|
|
|
874
874
|
function Hm(t) {
|
|
875
875
|
const { textColor: e, bgColor: n } = zd(t.meta.value.valid), r = {};
|
|
876
876
|
Object.values(t.getAllPathStates()).forEach((s) => {
|
|
877
|
-
sn(r,
|
|
877
|
+
sn(r, P(s.path), Wm(s, t));
|
|
878
878
|
});
|
|
879
879
|
function i(s, a = []) {
|
|
880
880
|
const l = [...a].pop();
|
|
@@ -910,14 +910,14 @@ function Hm(t) {
|
|
|
910
910
|
function Wm(t, e) {
|
|
911
911
|
return {
|
|
912
912
|
id: Qa(e, t),
|
|
913
|
-
label:
|
|
913
|
+
label: P(t.path),
|
|
914
914
|
tags: jd(t.multiple, t.fieldsCount, t.type, t.valid, e)
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
917
|
function Um(t, e) {
|
|
918
918
|
return {
|
|
919
919
|
id: Qa(e, t),
|
|
920
|
-
label:
|
|
920
|
+
label: P(t.name),
|
|
921
921
|
tags: jd(!1, 1, t.type, t.meta.valid, e)
|
|
922
922
|
};
|
|
923
923
|
}
|
|
@@ -952,7 +952,7 @@ function jd(t, e, n, r, i) {
|
|
|
952
952
|
].filter(Boolean);
|
|
953
953
|
}
|
|
954
954
|
function Qa(t, e) {
|
|
955
|
-
const n = e ? "path" in e ? "pathState" : "field" : "form", r = e ? "path" in e ? e == null ? void 0 : e.path :
|
|
955
|
+
const n = e ? "path" in e ? "pathState" : "field" : "form", r = e ? "path" in e ? e == null ? void 0 : e.path : P(e == null ? void 0 : e.name) : "", i = { f: t == null ? void 0 : t.formId, ff: r, type: n };
|
|
956
956
|
return btoa(encodeURIComponent(JSON.stringify(i)));
|
|
957
957
|
}
|
|
958
958
|
function qm(t) {
|
|
@@ -1061,12 +1061,12 @@ function Ym(t, e, n) {
|
|
|
1061
1061
|
return Hi(n == null ? void 0 : n.type) ? Gm(t, e, n) : Fd(t, e, n);
|
|
1062
1062
|
}
|
|
1063
1063
|
function Fd(t, e, n) {
|
|
1064
|
-
const { initialValue: r, validateOnMount: i, bails: o, type: s, checkedValue: a, label: l, validateOnValueUpdate: c, uncheckedValue: u, controlled: d, keepValueOnUnmount: f, syncVModel: h, form: p } = Jm(n), g = d ? Za(Fi) : void 0, m = p || g, y =
|
|
1064
|
+
const { initialValue: r, validateOnMount: i, bails: o, type: s, checkedValue: a, label: l, validateOnValueUpdate: c, uncheckedValue: u, controlled: d, keepValueOnUnmount: f, syncVModel: h, form: p } = Jm(n), g = d ? Za(Fi) : void 0, m = p || g, y = de(() => di(Oe(t))), k = de(() => {
|
|
1065
1065
|
if (Oe(m == null ? void 0 : m.schema))
|
|
1066
1066
|
return;
|
|
1067
|
-
const se =
|
|
1067
|
+
const se = P(e);
|
|
1068
1068
|
return Mo(se) || Rt(se) || qe(se) || Array.isArray(se) ? se : Bd(se);
|
|
1069
|
-
}), E = !qe(k.value) && Rt(Oe(e)), { id: v, value: $, initialValue: w, meta: I, setState: z, errors:
|
|
1069
|
+
}), E = !qe(k.value) && Rt(Oe(e)), { id: v, value: $, initialValue: w, meta: I, setState: z, errors: R, flags: L } = Bm(y, {
|
|
1070
1070
|
modelValue: r,
|
|
1071
1071
|
form: m,
|
|
1072
1072
|
bails: o,
|
|
@@ -1074,7 +1074,7 @@ function Fd(t, e, n) {
|
|
|
1074
1074
|
type: s,
|
|
1075
1075
|
validate: k.value ? C : void 0,
|
|
1076
1076
|
schema: E ? e : void 0
|
|
1077
|
-
}), D =
|
|
1077
|
+
}), D = de(() => R.value[0]);
|
|
1078
1078
|
h && Zm({
|
|
1079
1079
|
value: $,
|
|
1080
1080
|
prop: h,
|
|
@@ -1127,10 +1127,10 @@ function Fd(t, e, n) {
|
|
|
1127
1127
|
function N(F, se = !0) {
|
|
1128
1128
|
$.value = re && h ? bm(F, re.props.modelModifiers) : F, (se ? _ : O)();
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function V(F) {
|
|
1131
1131
|
z({ errors: Array.isArray(F) ? F : [F] });
|
|
1132
1132
|
}
|
|
1133
|
-
const W =
|
|
1133
|
+
const W = de({
|
|
1134
1134
|
get() {
|
|
1135
1135
|
return $.value;
|
|
1136
1136
|
},
|
|
@@ -1143,7 +1143,7 @@ function Fd(t, e, n) {
|
|
|
1143
1143
|
label: l,
|
|
1144
1144
|
value: W,
|
|
1145
1145
|
meta: I,
|
|
1146
|
-
errors:
|
|
1146
|
+
errors: R,
|
|
1147
1147
|
errorMessage: D,
|
|
1148
1148
|
type: s,
|
|
1149
1149
|
checkedValue: a,
|
|
@@ -1157,18 +1157,18 @@ function Fd(t, e, n) {
|
|
|
1157
1157
|
handleBlur: J,
|
|
1158
1158
|
setState: z,
|
|
1159
1159
|
setTouched: j,
|
|
1160
|
-
setErrors:
|
|
1160
|
+
setErrors: V,
|
|
1161
1161
|
setValue: N
|
|
1162
1162
|
};
|
|
1163
|
-
if (Ci(Dd, ie), Co(e) && typeof
|
|
1163
|
+
if (Ci(Dd, ie), Co(e) && typeof P(e) != "function" && Pe(e, (F, se) => {
|
|
1164
1164
|
st(F, se) || (I.validated ? _() : O());
|
|
1165
1165
|
}, {
|
|
1166
1166
|
deep: !0
|
|
1167
|
-
}), process.env.NODE_ENV !== "production" && (ie._vm = mn(), Pe(() => Object.assign(Object.assign({ errors:
|
|
1167
|
+
}), process.env.NODE_ENV !== "production" && (ie._vm = mn(), Pe(() => Object.assign(Object.assign({ errors: R.value }, I), { value: $.value }), Rr, {
|
|
1168
1168
|
deep: !0
|
|
1169
1169
|
}), m || zm(ie)), !m)
|
|
1170
1170
|
return ie;
|
|
1171
|
-
const Y =
|
|
1171
|
+
const Y = de(() => {
|
|
1172
1172
|
const F = k.value;
|
|
1173
1173
|
return !F || qe(F) || Mo(F) || Rt(F) || Array.isArray(F) ? {} : Object.keys(F).reduce((se, Ce) => {
|
|
1174
1174
|
const me = Om(F[Ce]).map((Te) => Te.__locatorRef).reduce((Te, De) => {
|
|
@@ -1229,7 +1229,7 @@ function Jm(t) {
|
|
|
1229
1229
|
function Gm(t, e, n) {
|
|
1230
1230
|
const r = n != null && n.standalone ? void 0 : Za(Fi), i = n == null ? void 0 : n.checkedValue, o = n == null ? void 0 : n.uncheckedValue;
|
|
1231
1231
|
function s(a) {
|
|
1232
|
-
const l = a.handleChange, c =
|
|
1232
|
+
const l = a.handleChange, c = de(() => {
|
|
1233
1233
|
const d = Oe(a.value), f = Oe(i);
|
|
1234
1234
|
return Array.isArray(d) ? d.findIndex((h) => st(h, f)) >= 0 : st(f, d);
|
|
1235
1235
|
});
|
|
@@ -1355,10 +1355,10 @@ const Xm = /* @__PURE__ */ Rn({
|
|
|
1355
1355
|
validateOnValueUpdate: t.validateOnModelUpdate,
|
|
1356
1356
|
keepValueOnUnmount: s,
|
|
1357
1357
|
syncVModel: !0
|
|
1358
|
-
}), E = function(
|
|
1359
|
-
d(
|
|
1360
|
-
}, v =
|
|
1361
|
-
const { validateOnInput: z, validateOnChange:
|
|
1358
|
+
}), E = function(R, L = !0) {
|
|
1359
|
+
d(R, L);
|
|
1360
|
+
}, v = de(() => {
|
|
1361
|
+
const { validateOnInput: z, validateOnChange: R, validateOnBlur: L, validateOnModelUpdate: D } = Qm(t);
|
|
1362
1362
|
function J(C) {
|
|
1363
1363
|
f(C, L), qe(e.attrs.onBlur) && e.attrs.onBlur(C);
|
|
1364
1364
|
}
|
|
@@ -1366,7 +1366,7 @@ const Xm = /* @__PURE__ */ Rn({
|
|
|
1366
1366
|
E(C, z), qe(e.attrs.onInput) && e.attrs.onInput(C);
|
|
1367
1367
|
}
|
|
1368
1368
|
function _(C) {
|
|
1369
|
-
E(C,
|
|
1369
|
+
E(C, R), qe(e.attrs.onChange) && e.attrs.onChange(C);
|
|
1370
1370
|
}
|
|
1371
1371
|
const O = {
|
|
1372
1372
|
name: t.name,
|
|
@@ -1375,12 +1375,12 @@ const Xm = /* @__PURE__ */ Rn({
|
|
|
1375
1375
|
onChange: _
|
|
1376
1376
|
};
|
|
1377
1377
|
return O["onUpdate:modelValue"] = (C) => E(C, D), O;
|
|
1378
|
-
}), $ =
|
|
1378
|
+
}), $ = de(() => {
|
|
1379
1379
|
const z = Object.assign({}, v.value);
|
|
1380
1380
|
Hi(e.attrs.type) && y && (z.checked = y.value);
|
|
1381
|
-
const
|
|
1382
|
-
return ym(
|
|
1383
|
-
}), w =
|
|
1381
|
+
const R = nc(t, e);
|
|
1382
|
+
return ym(R, e.attrs) && (z.value = l.value), z;
|
|
1383
|
+
}), w = de(() => Object.assign(Object.assign({}, v.value), { modelValue: l.value }));
|
|
1384
1384
|
function I() {
|
|
1385
1385
|
return {
|
|
1386
1386
|
field: $.value,
|
|
@@ -1410,8 +1410,8 @@ const Xm = /* @__PURE__ */ Rn({
|
|
|
1410
1410
|
validate: u,
|
|
1411
1411
|
handleChange: d
|
|
1412
1412
|
}), () => {
|
|
1413
|
-
const z = Gr(nc(t, e)),
|
|
1414
|
-
return z ? Et(z, Object.assign(Object.assign({}, e.attrs), $.value),
|
|
1413
|
+
const z = Gr(nc(t, e)), R = Xa(z, e, I);
|
|
1414
|
+
return z ? Et(z, Object.assign(Object.assign({}, e.attrs), $.value), R) : R;
|
|
1415
1415
|
};
|
|
1416
1416
|
}
|
|
1417
1417
|
});
|
|
@@ -1436,7 +1436,7 @@ const qn = Xm;
|
|
|
1436
1436
|
let tg = 0;
|
|
1437
1437
|
const oo = ["bails", "fieldsCount", "id", "multiple", "type", "validate"];
|
|
1438
1438
|
function Hd(t) {
|
|
1439
|
-
const e = (t == null ? void 0 : t.initialValues) || {}, n = Object.assign({}, Oe(e)), r =
|
|
1439
|
+
const e = (t == null ? void 0 : t.initialValues) || {}, n = Object.assign({}, Oe(e)), r = P(t == null ? void 0 : t.validationSchema);
|
|
1440
1440
|
return r && Rt(r) && qe(r.cast) ? Ee(r.cast(n) || {}) : Ee(n);
|
|
1441
1441
|
}
|
|
1442
1442
|
function ng(t) {
|
|
@@ -1464,30 +1464,30 @@ function ng(t) {
|
|
|
1464
1464
|
});
|
|
1465
1465
|
}
|
|
1466
1466
|
t != null && t.initialErrors && p(t.initialErrors);
|
|
1467
|
-
const g =
|
|
1467
|
+
const g = de(() => {
|
|
1468
1468
|
const T = c.value.reduce((M, H) => (H.errors.length && (M[H.path] = H.errors), M), {});
|
|
1469
1469
|
return Object.assign(Object.assign({}, u.value), T);
|
|
1470
|
-
}), m =
|
|
1470
|
+
}), m = de(() => ut(g.value).reduce((T, M) => {
|
|
1471
1471
|
const H = g.value[M];
|
|
1472
1472
|
return H != null && H.length && (T[M] = H[0]), T;
|
|
1473
|
-
}, {})), y =
|
|
1473
|
+
}, {})), y = de(() => c.value.reduce((T, M) => (T[M.path] = { name: M.path || "", label: M.label || "" }, T), {})), k = de(() => c.value.reduce((T, M) => {
|
|
1474
1474
|
var H;
|
|
1475
1475
|
return T[M.path] = (H = M.bails) !== null && H !== void 0 ? H : !0, T;
|
|
1476
|
-
}, {})), E = Object.assign({}, (t == null ? void 0 : t.initialErrors) || {}), v = (e = t == null ? void 0 : t.keepValuesOnUnmount) !== null && e !== void 0 ? e : !1, { initialValues: $, originalInitialValues: w, setInitialValues: I } = ig(c, l, t), z = rg(c, l, w, m),
|
|
1476
|
+
}, {})), E = Object.assign({}, (t == null ? void 0 : t.initialErrors) || {}), v = (e = t == null ? void 0 : t.keepValuesOnUnmount) !== null && e !== void 0 ? e : !1, { initialValues: $, originalInitialValues: w, setInitialValues: I } = ig(c, l, t), z = rg(c, l, w, m), R = de(() => c.value.reduce((T, M) => {
|
|
1477
1477
|
const H = ft(l, M.path);
|
|
1478
1478
|
return sn(T, M.path, H), T;
|
|
1479
1479
|
}, {})), L = t == null ? void 0 : t.validationSchema;
|
|
1480
1480
|
function D(T, M) {
|
|
1481
1481
|
var H, X;
|
|
1482
|
-
const he =
|
|
1482
|
+
const he = de(() => ft($.value, Oe(T))), x = d.value[Oe(T)], K = (M == null ? void 0 : M.type) === "checkbox" || (M == null ? void 0 : M.type) === "radio";
|
|
1483
1483
|
if (x && K) {
|
|
1484
1484
|
x.multiple = !0;
|
|
1485
1485
|
const ot = r++;
|
|
1486
1486
|
return Array.isArray(x.id) ? x.id.push(ot) : x.id = [x.id, ot], x.fieldsCount++, x.__flags.pendingUnmount[ot] = !1, x;
|
|
1487
1487
|
}
|
|
1488
|
-
const te =
|
|
1488
|
+
const te = de(() => ft(l, Oe(T))), fe = Oe(T), pe = j.findIndex((ot) => ot === fe);
|
|
1489
1489
|
pe !== -1 && j.splice(pe, 1);
|
|
1490
|
-
const we =
|
|
1490
|
+
const we = de(() => {
|
|
1491
1491
|
var ot, yt, Un, xn;
|
|
1492
1492
|
const Wt = Oe(L);
|
|
1493
1493
|
if (Rt(Wt))
|
|
@@ -1500,7 +1500,7 @@ function ng(t) {
|
|
|
1500
1500
|
touched: !1,
|
|
1501
1501
|
pending: !1,
|
|
1502
1502
|
valid: !0,
|
|
1503
|
-
validated: !!(!((H = E[
|
|
1503
|
+
validated: !!(!((H = E[fe]) === null || H === void 0) && H.length),
|
|
1504
1504
|
required: we,
|
|
1505
1505
|
initialValue: he,
|
|
1506
1506
|
errors: Od([]),
|
|
@@ -1515,10 +1515,10 @@ function ng(t) {
|
|
|
1515
1515
|
},
|
|
1516
1516
|
fieldsCount: 1,
|
|
1517
1517
|
validate: M == null ? void 0 : M.validate,
|
|
1518
|
-
dirty:
|
|
1518
|
+
dirty: de(() => !st(P(te), P(he)))
|
|
1519
1519
|
});
|
|
1520
|
-
return c.value.push(Re), d.value[
|
|
1521
|
-
Mt(
|
|
1520
|
+
return c.value.push(Re), d.value[fe] = Re, f(), m.value[fe] && !E[fe] && nt(() => {
|
|
1521
|
+
Mt(fe, { mode: "silent" });
|
|
1522
1522
|
}), Co(T) && Pe(T, (ot) => {
|
|
1523
1523
|
f();
|
|
1524
1524
|
const yt = Ee(te.value);
|
|
@@ -1532,7 +1532,7 @@ function ng(t) {
|
|
|
1532
1532
|
.../* @__PURE__ */ new Set([...ut(T.results), ...c.value.map((x) => x.path), ...H])
|
|
1533
1533
|
].sort().reduce((x, K) => {
|
|
1534
1534
|
var te;
|
|
1535
|
-
const
|
|
1535
|
+
const fe = K, pe = C(fe) || B(fe), we = ((te = T.results[fe]) === null || te === void 0 ? void 0 : te.errors) || [], Ae = Oe(pe == null ? void 0 : pe.path) || fe, Re = og({ errors: we, valid: !we.length }, x.results[Ae]);
|
|
1536
1536
|
return x.results[Ae] = Re, Re.valid || (x.errors[Ae] = Re.errors[0]), pe && u.value[Ae] && delete u.value[Ae], pe ? (pe.valid = Re.valid, M === "silent" || M === "validated-only" && !pe.validated || h(pe, Re.errors), x) : (h(Ae, we), x);
|
|
1537
1537
|
}, { valid: T.valid, results: {}, errors: {} });
|
|
1538
1538
|
return T.values && (he.values = T.values), ut(he.results).forEach((x) => {
|
|
@@ -1565,11 +1565,11 @@ function ng(t) {
|
|
|
1565
1565
|
return x instanceof Event && (x.preventDefault(), x.stopPropagation()), O((K) => K.touched = !0), i.value = !0, s.value++, Pt().then((K) => {
|
|
1566
1566
|
const te = Ee(l);
|
|
1567
1567
|
if (K.valid && typeof H == "function") {
|
|
1568
|
-
const
|
|
1569
|
-
let pe = T ?
|
|
1568
|
+
const fe = Ee(R.value);
|
|
1569
|
+
let pe = T ? fe : te;
|
|
1570
1570
|
return K.values && (pe = K.values), H(pe, {
|
|
1571
1571
|
evt: x,
|
|
1572
|
-
controlledValues:
|
|
1572
|
+
controlledValues: fe,
|
|
1573
1573
|
setErrors: p,
|
|
1574
1574
|
setFieldError: h,
|
|
1575
1575
|
setTouched: yn,
|
|
@@ -1616,7 +1616,7 @@ function ng(t) {
|
|
|
1616
1616
|
const F = {
|
|
1617
1617
|
formId: n,
|
|
1618
1618
|
values: l,
|
|
1619
|
-
controlledValues:
|
|
1619
|
+
controlledValues: R,
|
|
1620
1620
|
errorBag: g,
|
|
1621
1621
|
errors: m,
|
|
1622
1622
|
schema: L,
|
|
@@ -1626,7 +1626,7 @@ function ng(t) {
|
|
|
1626
1626
|
isValidating: o,
|
|
1627
1627
|
fieldArrays: a,
|
|
1628
1628
|
keepValuesOnUnmount: v,
|
|
1629
|
-
validateSchema:
|
|
1629
|
+
validateSchema: P(L) ? _ : void 0,
|
|
1630
1630
|
validate: Pt,
|
|
1631
1631
|
setFieldError: h,
|
|
1632
1632
|
validateField: Mt,
|
|
@@ -1672,7 +1672,7 @@ function ng(t) {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
function Te(T, M) {
|
|
1674
1674
|
const H = C(Oe(T)) || D(T);
|
|
1675
|
-
return
|
|
1675
|
+
return de({
|
|
1676
1676
|
get() {
|
|
1677
1677
|
return H.value;
|
|
1678
1678
|
},
|
|
@@ -1774,7 +1774,7 @@ function ng(t) {
|
|
|
1774
1774
|
sn($.value, T, Ee(M)), H && sn(w.value, T, Ee(M));
|
|
1775
1775
|
}
|
|
1776
1776
|
async function Ht() {
|
|
1777
|
-
const T =
|
|
1777
|
+
const T = P(L);
|
|
1778
1778
|
if (!T)
|
|
1779
1779
|
return { valid: !0, results: {}, errors: {} };
|
|
1780
1780
|
o.value = !0;
|
|
@@ -1817,7 +1817,7 @@ function ng(t) {
|
|
|
1817
1817
|
Mt(X.path);
|
|
1818
1818
|
});
|
|
1819
1819
|
}
|
|
1820
|
-
const
|
|
1820
|
+
const fe = de(() => {
|
|
1821
1821
|
const we = {
|
|
1822
1822
|
onChange: te,
|
|
1823
1823
|
onInput: K,
|
|
@@ -1828,7 +1828,7 @@ function ng(t) {
|
|
|
1828
1828
|
return [Te(T, () => {
|
|
1829
1829
|
var we, Ae, Re;
|
|
1830
1830
|
return (Re = (we = he().validateOnModelUpdate) !== null && we !== void 0 ? we : (Ae = Xn()) === null || Ae === void 0 ? void 0 : Ae.validateOnModelUpdate) !== null && Re !== void 0 ? Re : !0;
|
|
1831
|
-
}),
|
|
1831
|
+
}), fe];
|
|
1832
1832
|
}
|
|
1833
1833
|
function vr(T) {
|
|
1834
1834
|
return Array.isArray(T) ? T.map((M) => Te(M, !0)) : Te(T);
|
|
@@ -1839,14 +1839,14 @@ function ng(t) {
|
|
|
1839
1839
|
X.value.onBlur();
|
|
1840
1840
|
}
|
|
1841
1841
|
function x(te) {
|
|
1842
|
-
const
|
|
1843
|
-
se(Oe(T),
|
|
1842
|
+
const fe = To(te);
|
|
1843
|
+
se(Oe(T), fe, !1), X.value.onInput();
|
|
1844
1844
|
}
|
|
1845
1845
|
function K(te) {
|
|
1846
|
-
const
|
|
1847
|
-
se(Oe(T),
|
|
1846
|
+
const fe = To(te);
|
|
1847
|
+
se(Oe(T), fe, !1), X.value.onChange();
|
|
1848
1848
|
}
|
|
1849
|
-
return
|
|
1849
|
+
return de(() => Object.assign(Object.assign({}, X.value), {
|
|
1850
1850
|
onBlur: he,
|
|
1851
1851
|
onInput: x,
|
|
1852
1852
|
onChange: K,
|
|
@@ -1858,7 +1858,7 @@ function ng(t) {
|
|
|
1858
1858
|
function x(K) {
|
|
1859
1859
|
H.value = K;
|
|
1860
1860
|
}
|
|
1861
|
-
return
|
|
1861
|
+
return de(() => {
|
|
1862
1862
|
const K = qe(M) ? M(io(he, oo)) : M || {};
|
|
1863
1863
|
return Object.assign({ [K.model || "modelValue"]: H.value, [`onUpdate:${K.model || "modelValue"}`]: x }, X.value);
|
|
1864
1864
|
});
|
|
@@ -1870,7 +1870,7 @@ function rg(t, e, n, r) {
|
|
|
1870
1870
|
touched: "some",
|
|
1871
1871
|
pending: "some",
|
|
1872
1872
|
valid: "every"
|
|
1873
|
-
}, o =
|
|
1873
|
+
}, o = de(() => !st(e, P(n)));
|
|
1874
1874
|
function s() {
|
|
1875
1875
|
const l = t.value;
|
|
1876
1876
|
return ut(i).reduce((c, u) => {
|
|
@@ -1882,7 +1882,7 @@ function rg(t, e, n, r) {
|
|
|
1882
1882
|
return Cd(() => {
|
|
1883
1883
|
const l = s();
|
|
1884
1884
|
a.touched = l.touched, a.valid = l.valid, a.pending = l.pending;
|
|
1885
|
-
}),
|
|
1885
|
+
}), de(() => Object.assign(Object.assign({ initialValues: P(n) }, a), { valid: a.valid && !ut(r.value).length, dirty: o.value }));
|
|
1886
1886
|
}
|
|
1887
1887
|
function ig(t, e, n) {
|
|
1888
1888
|
const r = Hd(n), i = ne(r), o = ne(Ee(r));
|
|
@@ -1957,7 +1957,7 @@ const sg = /* @__PURE__ */ Rn({
|
|
|
1957
1957
|
keepValuesOnUnmount: r
|
|
1958
1958
|
}), z = m((C, { evt: B }) => {
|
|
1959
1959
|
Ld(B) && B.target.submit();
|
|
1960
|
-
}, t.onInvalidSubmit),
|
|
1960
|
+
}, t.onInvalidSubmit), R = t.onSubmit ? m(t.onSubmit, t.onInvalidSubmit) : z;
|
|
1961
1961
|
function L(C) {
|
|
1962
1962
|
Ja(C) && C.preventDefault(), p(), typeof e.attrs.onReset == "function" && e.attrs.onReset();
|
|
1963
1963
|
}
|
|
@@ -2023,7 +2023,7 @@ const sg = /* @__PURE__ */ Rn({
|
|
|
2023
2023
|
return B ? Et(B, Object.assign(Object.assign(Object.assign({}, B === "form" ? {
|
|
2024
2024
|
// Disables native validation as vee-validate will handle it.
|
|
2025
2025
|
novalidate: !0
|
|
2026
|
-
} : {}), e.attrs), { onSubmit:
|
|
2026
|
+
} : {}), e.attrs), { onSubmit: R, onReset: L }), j) : j;
|
|
2027
2027
|
};
|
|
2028
2028
|
}
|
|
2029
2029
|
}), ag = sg, lg = /* @__PURE__ */ Rn({
|
|
@@ -2039,7 +2039,7 @@ const sg = /* @__PURE__ */ Rn({
|
|
|
2039
2039
|
}
|
|
2040
2040
|
},
|
|
2041
2041
|
setup(t, e) {
|
|
2042
|
-
const n = Si(Fi, void 0), r =
|
|
2042
|
+
const n = Si(Fi, void 0), r = de(() => n == null ? void 0 : n.errors.value[t.name]);
|
|
2043
2043
|
function i() {
|
|
2044
2044
|
return {
|
|
2045
2045
|
message: r.value
|
|
@@ -2055,7 +2055,7 @@ const sg = /* @__PURE__ */ Rn({
|
|
|
2055
2055
|
}), cg = lg;
|
|
2056
2056
|
function ug(t) {
|
|
2057
2057
|
const e = Za(Fi), n = t ? void 0 : Si(Dd);
|
|
2058
|
-
return
|
|
2058
|
+
return de(() => t ? e == null ? void 0 : e.errors.value[Oe(t)] : n == null ? void 0 : n.errorMessage.value);
|
|
2059
2059
|
}
|
|
2060
2060
|
zt("required", (t) => typeof t == "number" && t != null || typeof t == "object" && t != null || typeof t == "boolean" && t === !0 ? !0 : !t || !t.length ? "This field is required" : !0);
|
|
2061
2061
|
zt("email", (t) => {
|
|
@@ -2117,7 +2117,7 @@ const kg = /* @__PURE__ */ ve(yg, [["render", wg]]), Sg = { class: "relative" },
|
|
|
2117
2117
|
]));
|
|
2118
2118
|
}
|
|
2119
2119
|
});
|
|
2120
|
-
let
|
|
2120
|
+
let ce = {
|
|
2121
2121
|
theme: "wpic-tools",
|
|
2122
2122
|
popoverTarget: "body"
|
|
2123
2123
|
};
|
|
@@ -2154,7 +2154,7 @@ const Og = ["is", "type", "disabled"], Mg = {
|
|
|
2154
2154
|
actions: {}
|
|
2155
2155
|
},
|
|
2156
2156
|
setup(t) {
|
|
2157
|
-
const e = t, n = ne(null), r = ne(null), i = ne(!1), o =
|
|
2157
|
+
const e = t, n = ne(null), r = ne(null), i = ne(!1), o = de(() => e.to ? "router-link" : "div"), s = (y) => {
|
|
2158
2158
|
r.value && !r.value.contains(y.target) && n.value && !n.value.contains(y.target) && (i.value = !1);
|
|
2159
2159
|
};
|
|
2160
2160
|
en(() => {
|
|
@@ -2213,16 +2213,16 @@ const Og = ["is", "type", "disabled"], Mg = {
|
|
|
2213
2213
|
"active:outline active:outline-2 active:outline-offset-4": !t.disabled && !t.loading && t.outlining,
|
|
2214
2214
|
"cursor-not-allowed": t.disabled,
|
|
2215
2215
|
border: t.outline && !t.plain,
|
|
2216
|
-
[`${a[
|
|
2217
|
-
[`${u[
|
|
2218
|
-
[`${d[
|
|
2219
|
-
[`${h[
|
|
2220
|
-
[`${p[
|
|
2221
|
-
[`${m[
|
|
2222
|
-
[`${l[
|
|
2223
|
-
[`${f[
|
|
2224
|
-
[`${g[
|
|
2225
|
-
[`${c[
|
|
2216
|
+
[`${a[P(ce).theme]}`]: !0,
|
|
2217
|
+
[`${u[P(ce).theme]}`]: t.primary && !t.plain && !t.inverse,
|
|
2218
|
+
[`${d[P(ce).theme]}`]: t.secondary,
|
|
2219
|
+
[`${h[P(ce).theme]}`]: !t.primary && !t.secondary && !t.plain && !t.colorless && !t.destructive,
|
|
2220
|
+
[`${p[P(ce).theme]}`]: t.primary && t.plain,
|
|
2221
|
+
[`${m[P(ce).theme]}`]: !t.primary && !t.destructive && t.plain,
|
|
2222
|
+
[`${l[P(ce).theme]}`]: t.colorless,
|
|
2223
|
+
[`${f[P(ce).theme]}`]: t.destructive && !t.plain && !t.colorless,
|
|
2224
|
+
[`${g[P(ce).theme]}`]: t.destructive && t.plain,
|
|
2225
|
+
[`${c[P(ce).theme]}`]: t.destructive && t.colorless,
|
|
2226
2226
|
"bg-zinc-50 border-violet-800 text-violet-800": t.primary && t.inverse,
|
|
2227
2227
|
"hover:bg-white": t.primary && t.inverse && !t.disabled && !t.loading,
|
|
2228
2228
|
"w-full": t.full,
|
|
@@ -2279,7 +2279,7 @@ const Og = ["is", "type", "disabled"], Mg = {
|
|
|
2279
2279
|
"wpic-tools": "border-gray-300"
|
|
2280
2280
|
};
|
|
2281
2281
|
return (n, r) => (b(), S("div", {
|
|
2282
|
-
class: G(["wpic-button-group flex flex-wrap h-10", [e[
|
|
2282
|
+
class: G(["wpic-button-group flex flex-wrap h-10", [e[P(ce).theme]]])
|
|
2283
2283
|
}, [
|
|
2284
2284
|
Me(n.$slots, "default")
|
|
2285
2285
|
], 2));
|
|
@@ -2314,7 +2314,7 @@ const Bg = /* @__PURE__ */ ve(Ng, [["render", Ig]]), Pg = {
|
|
|
2314
2314
|
resetForm: i,
|
|
2315
2315
|
getForm: o,
|
|
2316
2316
|
errors: s
|
|
2317
|
-
}), (a, l) => (b(), ge(
|
|
2317
|
+
}), (a, l) => (b(), ge(P(ag), {
|
|
2318
2318
|
ref_key: "myForm",
|
|
2319
2319
|
ref: n
|
|
2320
2320
|
}, {
|
|
@@ -2607,7 +2607,7 @@ const qg = (t) => ({
|
|
|
2607
2607
|
}, h = tl(i), p = el(h), g = await s.getDimensions(c), m = h === "y", y = m ? "top" : "left", k = m ? "bottom" : "right", E = m ? "clientHeight" : "clientWidth", v = o.reference[p] + o.reference[h] - f[h] - o.floating[p], $ = f[h] - o.reference[h], w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
|
|
2608
2608
|
let I = w ? w[E] : 0;
|
|
2609
2609
|
(!I || !await (s.isElement == null ? void 0 : s.isElement(w))) && (I = a.floating[E] || o.floating[p]);
|
|
2610
|
-
const z = v / 2 - $ / 2,
|
|
2610
|
+
const z = v / 2 - $ / 2, R = I / 2 - g[p] / 2 - 1, L = Ti(d[y], R), D = Ti(d[k], R), J = L, oe = I - g[p] - D, _ = I / 2 - g[p] / 2 + z, O = pa(J, _, oe), C = !l.arrow && Ui(i) != null && _ !== O && o.reference[p] / 2 - (_ < J ? L : D) - g[p] / 2 < 0, B = C ? _ < J ? _ - J : _ - oe : 0;
|
|
2611
2611
|
return {
|
|
2612
2612
|
[h]: f[h] + B,
|
|
2613
2613
|
data: {
|
|
@@ -2656,8 +2656,8 @@ const qg = (t) => ({
|
|
|
2656
2656
|
placement: i,
|
|
2657
2657
|
overflows: I
|
|
2658
2658
|
}], !I.every((J) => J <= 0)) {
|
|
2659
|
-
var
|
|
2660
|
-
const J = (((
|
|
2659
|
+
var R, L;
|
|
2660
|
+
const J = (((R = o.flip) == null ? void 0 : R.index) || 0) + 1, oe = $[J];
|
|
2661
2661
|
if (oe)
|
|
2662
2662
|
return {
|
|
2663
2663
|
data: {
|
|
@@ -3182,7 +3182,7 @@ function y0(t) {
|
|
|
3182
3182
|
name: "arrow",
|
|
3183
3183
|
options: t,
|
|
3184
3184
|
fn(e) {
|
|
3185
|
-
const n = g0(
|
|
3185
|
+
const n = g0(P(t.element));
|
|
3186
3186
|
return n == null ? {} : p0({
|
|
3187
3187
|
element: n,
|
|
3188
3188
|
padding: t.padding
|
|
@@ -3328,7 +3328,7 @@ const $0 = {
|
|
|
3328
3328
|
return e({ hide: f }), (y, k) => (b(), S($e, null, [
|
|
3329
3329
|
(b(), S("div", {
|
|
3330
3330
|
class: "flex-1",
|
|
3331
|
-
key: `reference_${
|
|
3331
|
+
key: `reference_${P(r)}`,
|
|
3332
3332
|
ref_key: "reference",
|
|
3333
3333
|
ref: a,
|
|
3334
3334
|
onMouseenter: g,
|
|
@@ -3338,17 +3338,17 @@ const $0 = {
|
|
|
3338
3338
|
Me(y.$slots, "default", { isHidden: c.value })
|
|
3339
3339
|
], 32)),
|
|
3340
3340
|
(b(), ge(Md, {
|
|
3341
|
-
to:
|
|
3341
|
+
to: P(ce).popoverTarget
|
|
3342
3342
|
}, [
|
|
3343
3343
|
(b(), S("div", {
|
|
3344
|
-
key: `floating_${
|
|
3344
|
+
key: `floating_${P(r)}`,
|
|
3345
3345
|
ref_key: "floating",
|
|
3346
3346
|
ref: l,
|
|
3347
3347
|
style: un({ maxWidth: t.maxWidth }),
|
|
3348
3348
|
class: G(["z-30 rounded-md overflow-hidden", {
|
|
3349
3349
|
[`${t.customWidth}`]: !0,
|
|
3350
3350
|
hidden: c.value,
|
|
3351
|
-
[`${s[
|
|
3351
|
+
[`${s[P(ce).theme]}`]: !c.value,
|
|
3352
3352
|
"rounded-md": !t.custom,
|
|
3353
3353
|
"px-3 py-2": !t.custom && !t.expand
|
|
3354
3354
|
}])
|
|
@@ -3458,11 +3458,11 @@ const al = /* @__PURE__ */ ve(I0, [["render", R0]]), _0 = {
|
|
|
3458
3458
|
"border-b": t.material,
|
|
3459
3459
|
"pl-4": !s.$slots.prepend,
|
|
3460
3460
|
"pl-8": s.$slots.prepend,
|
|
3461
|
-
[`${n[
|
|
3461
|
+
[`${n[P(ce).theme]}`]: !0,
|
|
3462
3462
|
"h-8 text-sm": t.small,
|
|
3463
3463
|
"h-10": !t.large && !t.small,
|
|
3464
3464
|
"h-12": t.large,
|
|
3465
|
-
[`${r[
|
|
3465
|
+
[`${r[P(ce).theme]}`]: t.disabled,
|
|
3466
3466
|
"cursor-pointer": !t.disabled,
|
|
3467
3467
|
"border-red-600! focus-within:outline-red-600": t.invalid
|
|
3468
3468
|
}])
|
|
@@ -3564,8 +3564,8 @@ function Fy(t, e, n) {
|
|
|
3564
3564
|
return c = w, a = setTimeout(y, e), u ? h(w) : s;
|
|
3565
3565
|
}
|
|
3566
3566
|
function g(w) {
|
|
3567
|
-
var I = w - l, z = w - c,
|
|
3568
|
-
return d ? zy(
|
|
3567
|
+
var I = w - l, z = w - c, R = e - I;
|
|
3568
|
+
return d ? zy(R, o - z) : R;
|
|
3569
3569
|
}
|
|
3570
3570
|
function m(w) {
|
|
3571
3571
|
var I = w - l, z = w - c;
|
|
@@ -4239,19 +4239,19 @@ const tk = /* @__PURE__ */ ve(Gw, [["render", ek]]), nk = {
|
|
|
4239
4239
|
}
|
|
4240
4240
|
const h = lf(function(v) {
|
|
4241
4241
|
s("change", v);
|
|
4242
|
-
}, r.debounce), p =
|
|
4242
|
+
}, r.debounce), p = de(() => {
|
|
4243
4243
|
var v, $, w, I;
|
|
4244
4244
|
if (r.multiple)
|
|
4245
4245
|
if (r.maxDisplay) {
|
|
4246
4246
|
let z = ($ = o.value) == null ? void 0 : $.filter((L) => {
|
|
4247
4247
|
var D;
|
|
4248
4248
|
return ((D = r.modelValue) == null ? void 0 : D.indexOf(L.value)) >= 0;
|
|
4249
|
-
}).map((L) => L.label),
|
|
4250
|
-
return (z == null ? void 0 : z.length) - (
|
|
4249
|
+
}).map((L) => L.label), R = z == null ? void 0 : z.slice(0, r.maxDisplay);
|
|
4250
|
+
return (z == null ? void 0 : z.length) - (R == null ? void 0 : R.length) > 0 ? (R == null ? void 0 : R.join(", ")) + ` (+${(z == null ? void 0 : z.length) - R.length})` : R == null ? void 0 : R.join(", ");
|
|
4251
4251
|
} else
|
|
4252
4252
|
return (v = o.value) == null ? void 0 : v.filter((z) => {
|
|
4253
|
-
var
|
|
4254
|
-
return ((
|
|
4253
|
+
var R;
|
|
4254
|
+
return ((R = r.modelValue) == null ? void 0 : R.indexOf(z.value)) >= 0;
|
|
4255
4255
|
}).map((z) => z.label).join(", ");
|
|
4256
4256
|
else
|
|
4257
4257
|
return ((I = (w = o.value) == null ? void 0 : w.find((z) => z.value === r.modelValue)) == null ? void 0 : I.label) || r.modelValue;
|
|
@@ -4267,10 +4267,10 @@ const tk = /* @__PURE__ */ ve(Gw, [["render", ek]]), nk = {
|
|
|
4267
4267
|
const m = {
|
|
4268
4268
|
pmi: "group-[.is-selected]:bg-violet-50 hover:group-[.is-selected]:bg-violet-100",
|
|
4269
4269
|
"wpic-tools": "hover:bg-gray-50 group-[.is-selected]:text-gray-800 group-[.is-selected]:font-semibold text-gray-600 dark:hover:bg-white/5 dark:text-gray-400 dark:group-[.is-selected]:text-white"
|
|
4270
|
-
}, y =
|
|
4270
|
+
}, y = de(() => {
|
|
4271
4271
|
var v, $;
|
|
4272
4272
|
return ((v = r.modelValue) == null ? void 0 : v.length) === (($ = r.options) == null ? void 0 : $.length);
|
|
4273
|
-
}), k =
|
|
4273
|
+
}), k = de(() => {
|
|
4274
4274
|
var v;
|
|
4275
4275
|
if (r.filterable && !r.remoteMethod && ((v = a.value) != null && v.trim().length)) {
|
|
4276
4276
|
const $ = a.value.trim().toLowerCase();
|
|
@@ -4306,14 +4306,14 @@ const tk = /* @__PURE__ */ ve(Gw, [["render", ek]]), nk = {
|
|
|
4306
4306
|
loading: t.loading
|
|
4307
4307
|
}, {
|
|
4308
4308
|
default: xe(() => {
|
|
4309
|
-
var I, z,
|
|
4309
|
+
var I, z, R, L, D, J;
|
|
4310
4310
|
return [
|
|
4311
4311
|
A("span", {
|
|
4312
4312
|
class: G(["select-none w-full text-left flex-1", { "whitespace-pre": !t.multiple }])
|
|
4313
4313
|
}, [
|
|
4314
4314
|
t.modelValue && (!t.multiple || t.multiple && ((I = t.modelValue) == null ? void 0 : I.length) > 0) && !t.hideSelect ? (b(), S("span", nk, [
|
|
4315
4315
|
y.value && ((z = t.allSelectedText) != null && z.length) ? (b(), S($e, { key: 0 }, [
|
|
4316
|
-
Ie(be(t.allSelectedText) + " (" + be((
|
|
4316
|
+
Ie(be(t.allSelectedText) + " (" + be((R = t.options) == null ? void 0 : R.length) + ")", 1)
|
|
4317
4317
|
], 64)) : (b(), S($e, { key: 1 }, [
|
|
4318
4318
|
Ie(be(p.value), 1)
|
|
4319
4319
|
], 64))
|
|
@@ -4360,7 +4360,7 @@ const tk = /* @__PURE__ */ ve(Gw, [["render", ek]]), nk = {
|
|
|
4360
4360
|
class: "cursor-pointer opacity-50 hover:opacity-100",
|
|
4361
4361
|
onClick: $[1] || ($[1] = (I) => {
|
|
4362
4362
|
var z;
|
|
4363
|
-
return u((z = k.value) == null ? void 0 : z.filter((
|
|
4363
|
+
return u((z = k.value) == null ? void 0 : z.filter((R) => R.value).map((R) => R.value));
|
|
4364
4364
|
})
|
|
4365
4365
|
}, "Select all"),
|
|
4366
4366
|
A("span", {
|
|
@@ -4374,7 +4374,7 @@ const tk = /* @__PURE__ */ ve(Gw, [["render", ek]]), nk = {
|
|
|
4374
4374
|
A("div", {
|
|
4375
4375
|
class: G(["flex items-center py-2 px-4 min-w-64 text-base", {
|
|
4376
4376
|
"cursor-pointer": !t.multiple || I.value,
|
|
4377
|
-
[`${m[
|
|
4377
|
+
[`${m[P(ce).theme]}`]: !0
|
|
4378
4378
|
}]),
|
|
4379
4379
|
onClick: (z) => I.disabled ? null : c(I.value)
|
|
4380
4380
|
}, [
|
|
@@ -4743,16 +4743,16 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4743
4743
|
}, i = {
|
|
4744
4744
|
pmi: "rounded-xs group-[.is-active]:border-zinc-400 group-[.is-selected]:bg-violet-800 group-[.is-selected]:border-violet-800 group-[.is-selected]:text-white group-[.is-disabled]:bg-opacity-50 group-[.is-disabled]:border-opacity-50 group-[.is-disabled]:text-opacity-75",
|
|
4745
4745
|
"wpic-tools": "rounded-sm group-[.is-active]:border-gray-300 dark:group-[.is-active]:bg-gray-950 dark:group-[.is-active]:border-gray-800 group-[.is-selected]:bg-lime-600 group-[.is-selected]:border-lime-600 group-[.is-selected]:text-white dark:group-[.is-disabled]:border-gray-800/50 group-[.is-disabled]:!text-gray-300 group-[.is-disabled]:!border-gray-100 group-[.is-disabled]:!bg-gray-100 dark:group-[.is-disabled]:!border-gray-900 dark:group-[.is-disabled]:!text-gray-700 dark:group-[.is-disabled]:!bg-gray-900"
|
|
4746
|
-
}, o = t, s =
|
|
4746
|
+
}, o = t, s = de(() => o.name ? o.name : sl()), a = ug(s.value), l = de(() => {
|
|
4747
4747
|
if (o.label)
|
|
4748
4748
|
return o.label;
|
|
4749
4749
|
if (o.name && o.labelName)
|
|
4750
4750
|
return `${o.name}#${o.labelName}`;
|
|
4751
|
-
}), c = ne(!0), u =
|
|
4751
|
+
}), c = ne(!0), u = de(() => (o.type == "password" || o.password) && c.value ? "password" : o.type);
|
|
4752
4752
|
function d() {
|
|
4753
4753
|
c.value = !c.value;
|
|
4754
4754
|
}
|
|
4755
|
-
const f =
|
|
4755
|
+
const f = de(() => {
|
|
4756
4756
|
var L;
|
|
4757
4757
|
if (o.rules && typeof o.rules == "string") {
|
|
4758
4758
|
let D = (L = o.rules) == null ? void 0 : L.split("|");
|
|
@@ -4788,12 +4788,12 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4788
4788
|
function w() {
|
|
4789
4789
|
return E.value.meta.valid;
|
|
4790
4790
|
}
|
|
4791
|
-
const I = ne(), z =
|
|
4791
|
+
const I = ne(), z = de(() => I.value.allSelected), R = de(() => I.value.isAllSelected);
|
|
4792
4792
|
return e({
|
|
4793
4793
|
focus: $,
|
|
4794
4794
|
isValid: w,
|
|
4795
4795
|
allSelected: z,
|
|
4796
|
-
isAllSelected:
|
|
4796
|
+
isAllSelected: R
|
|
4797
4797
|
}), (L, D) => (b(), S("div", {
|
|
4798
4798
|
class: G(["wpic-form-field", {
|
|
4799
4799
|
"mb-6": !t.slim
|
|
@@ -4828,7 +4828,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4828
4828
|
Me(L.$slots, "more")
|
|
4829
4829
|
])
|
|
4830
4830
|
], 2)) : Q("", !0),
|
|
4831
|
-
t.checkbox ? (b(), ge(
|
|
4831
|
+
t.checkbox ? (b(), ge(P(qn), {
|
|
4832
4832
|
key: 1,
|
|
4833
4833
|
ref_key: "myInput",
|
|
4834
4834
|
ref: E,
|
|
@@ -4849,7 +4849,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4849
4849
|
}, [
|
|
4850
4850
|
A("div", {
|
|
4851
4851
|
class: G(["w-4 h-4 border dark:border-gray-800 cursor-pointer", {
|
|
4852
|
-
[`${i[
|
|
4852
|
+
[`${i[P(ce).theme]}`]: !0
|
|
4853
4853
|
}])
|
|
4854
4854
|
}, [
|
|
4855
4855
|
t.modelValue === !0 ? (b(), ge(of, { key: 0 })) : Q("", !0)
|
|
@@ -4864,7 +4864,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4864
4864
|
], 2)
|
|
4865
4865
|
]),
|
|
4866
4866
|
_: 3
|
|
4867
|
-
}, 8, ["name", "rules", "value", "unchecked-value", "modelValue"])) : t.radio ? (b(), ge(
|
|
4867
|
+
}, 8, ["name", "rules", "value", "unchecked-value", "modelValue"])) : t.radio ? (b(), ge(P(qn), {
|
|
4868
4868
|
key: 2,
|
|
4869
4869
|
ref_key: "myInput",
|
|
4870
4870
|
ref: E,
|
|
@@ -4902,7 +4902,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4902
4902
|
], 2)
|
|
4903
4903
|
]),
|
|
4904
4904
|
_: 1
|
|
4905
|
-
}, 8, ["name", "value", "modelValue"])) : t.select ? (b(), ge(
|
|
4905
|
+
}, 8, ["name", "value", "modelValue"])) : t.select ? (b(), ge(P(qn), {
|
|
4906
4906
|
key: 3,
|
|
4907
4907
|
ref_key: "myInput",
|
|
4908
4908
|
ref: E,
|
|
@@ -4929,7 +4929,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4929
4929
|
maxDisplay: t.maxDisplay,
|
|
4930
4930
|
batchSelect: t.batchSelect,
|
|
4931
4931
|
allSelectedText: t.allSelectedText,
|
|
4932
|
-
isInvalid: !!(t.error &&
|
|
4932
|
+
isInvalid: !!(t.error && P(a)),
|
|
4933
4933
|
required: t.required || ((oe = f.value) == null ? void 0 : oe.indexOf("required")) >= 0,
|
|
4934
4934
|
label: l.value,
|
|
4935
4935
|
placeholder: t.placeholder,
|
|
@@ -4940,7 +4940,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4940
4940
|
];
|
|
4941
4941
|
}),
|
|
4942
4942
|
_: 1
|
|
4943
|
-
}, 8, ["modelValue", "rules", "name"])) : t.color ? (b(), ge(
|
|
4943
|
+
}, 8, ["modelValue", "rules", "name"])) : t.color ? (b(), ge(P(qn), {
|
|
4944
4944
|
key: 4,
|
|
4945
4945
|
ref_key: "myInput",
|
|
4946
4946
|
ref: E,
|
|
@@ -4956,7 +4956,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4956
4956
|
}, null, 8, ["placeholder", "modelValue"])
|
|
4957
4957
|
]),
|
|
4958
4958
|
_: 1
|
|
4959
|
-
}, 8, ["modelValue", "rules", "name"])) : t.toggleSwitch ? (b(), ge(
|
|
4959
|
+
}, 8, ["modelValue", "rules", "name"])) : t.toggleSwitch ? (b(), ge(P(qn), {
|
|
4960
4960
|
key: 5,
|
|
4961
4961
|
ref_key: "myInput",
|
|
4962
4962
|
ref: E,
|
|
@@ -4979,12 +4979,12 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4979
4979
|
"rounded-sm border": !t.naked,
|
|
4980
4980
|
"border-b": t.material,
|
|
4981
4981
|
"!bg-transparent": t.naked,
|
|
4982
|
-
[`${r[
|
|
4982
|
+
[`${r[P(ce).theme]}`]: !0,
|
|
4983
4983
|
"bg-transparent!": t.transparent,
|
|
4984
4984
|
"h-10": !t.textarea && !t.large,
|
|
4985
4985
|
"h-12": !t.textarea && t.large,
|
|
4986
4986
|
"border-gray-200! bg-gray-50! dark:bg-gray-940! dark:border-gray-900! text-gray-400 dark:text-gray-800": t.disabled,
|
|
4987
|
-
"border-red-600! focus-within:outline-red-600 dark:border-red-400/70!":
|
|
4987
|
+
"border-red-600! focus-within:outline-red-600 dark:border-red-400/70!": P(a)
|
|
4988
4988
|
}])
|
|
4989
4989
|
}, [
|
|
4990
4990
|
L.$slots.prepend ? (b(), S("div", {
|
|
@@ -4995,7 +4995,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
4995
4995
|
Me(L.$slots, "prepend")
|
|
4996
4996
|
])
|
|
4997
4997
|
], 2)) : Q("", !0),
|
|
4998
|
-
t.textarea ? (b(), ge(
|
|
4998
|
+
t.textarea ? (b(), ge(P(qn), {
|
|
4999
4999
|
key: 1,
|
|
5000
5000
|
ref_key: "myInput",
|
|
5001
5001
|
ref: E,
|
|
@@ -5018,13 +5018,13 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5018
5018
|
placeholder: t.placeholder,
|
|
5019
5019
|
minHeight: t.minHeight,
|
|
5020
5020
|
maxHeight: t.maxHeight,
|
|
5021
|
-
isInvalid: !!(t.error &&
|
|
5021
|
+
isInvalid: !!(t.error && P(a)),
|
|
5022
5022
|
required: t.required || ((J = f.value) == null ? void 0 : J.indexOf("required")) >= 0
|
|
5023
5023
|
}, null, 8, ["modelValue", "rows", "disabled", "noResize", "autoResize", "placeholder", "minHeight", "maxHeight", "isInvalid", "required"])
|
|
5024
5024
|
];
|
|
5025
5025
|
}),
|
|
5026
5026
|
_: 1
|
|
5027
|
-
}, 8, ["modelValue", "rules", "name"])) : (b(), ge(
|
|
5027
|
+
}, 8, ["modelValue", "rules", "name"])) : (b(), ge(P(qn), {
|
|
5028
5028
|
key: 2,
|
|
5029
5029
|
ref_key: "myInput",
|
|
5030
5030
|
ref: E,
|
|
@@ -5048,7 +5048,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5048
5048
|
onInput: h,
|
|
5049
5049
|
"no-data-text": t.noDataText,
|
|
5050
5050
|
placeholder: t.placeholder,
|
|
5051
|
-
validateOnInput: !!
|
|
5051
|
+
validateOnInput: !!P(a),
|
|
5052
5052
|
rules: f.value
|
|
5053
5053
|
}, null, 8, ["class", "type", "min", "max", "rows", "name", "disabled", "modelValue", "no-data-text", "placeholder", "validateOnInput", "rules"])),
|
|
5054
5054
|
t.loading ? (b(), S("div", {
|
|
@@ -5084,8 +5084,8 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5084
5084
|
])
|
|
5085
5085
|
])) : Q("", !0)
|
|
5086
5086
|
], 2)),
|
|
5087
|
-
t.error &&
|
|
5088
|
-
le(
|
|
5087
|
+
t.error && P(a) ? (b(), S("div", Kk, [
|
|
5088
|
+
le(P(cg), { name: s.value }, {
|
|
5089
5089
|
default: xe((J) => [
|
|
5090
5090
|
Ie(be(J.message), 1)
|
|
5091
5091
|
]),
|
|
@@ -5208,7 +5208,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5208
5208
|
return (r, i) => {
|
|
5209
5209
|
const o = la("wpic-loading-panel");
|
|
5210
5210
|
return b(), S("div", {
|
|
5211
|
-
class: G(["rounded-lg wpic-card relative", { [e[
|
|
5211
|
+
class: G(["rounded-lg wpic-card relative", { [e[P(ce).theme]]: !0, "wpic-card-inline": t.inline, "has-header": t.title || r.$slots.actions || r.$slots.title }])
|
|
5212
5212
|
}, [
|
|
5213
5213
|
t.loading ? (b(), ge(o, {
|
|
5214
5214
|
key: 0,
|
|
@@ -5218,7 +5218,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5218
5218
|
t.title || r.$slots.title || r.$slots.actions ? (b(), S("div", Zk, [
|
|
5219
5219
|
t.title || r.$slots.title || r.$slots.actions ? (b(), S("div", {
|
|
5220
5220
|
key: 0,
|
|
5221
|
-
class: G(["text-lg 2xl:text-xl flex items-center", [n[
|
|
5221
|
+
class: G(["text-lg 2xl:text-xl flex items-center", [n[P(ce).theme]]])
|
|
5222
5222
|
}, [
|
|
5223
5223
|
Me(r.$slots, "title", {}, () => [
|
|
5224
5224
|
Ie(be(t.title), 1)
|
|
@@ -5253,7 +5253,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5253
5253
|
};
|
|
5254
5254
|
return (n, r) => (b(), S("div", {
|
|
5255
5255
|
class: G(["border-b relative dark:border-gray-900 dark:text-gray-300 last:border-0 pb-6", {
|
|
5256
|
-
[`${e[
|
|
5256
|
+
[`${e[P(ce).theme]}`]: !0,
|
|
5257
5257
|
"pt-3": !(t.title && n.$slots.actions && n.$slots.title),
|
|
5258
5258
|
"pt-6": !t.title && !n.$slots.actions && !n.$slots.title,
|
|
5259
5259
|
"bg-gray-50 dark:bg-gray-930 last:rounded-b-lg": t.sub,
|
|
@@ -5289,7 +5289,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5289
5289
|
text: String
|
|
5290
5290
|
},
|
|
5291
5291
|
setup(t) {
|
|
5292
|
-
const e = t, n =
|
|
5292
|
+
const e = t, n = de(() => e.percent ? e.percent : 100 / e.max * e.value), r = {
|
|
5293
5293
|
pmi: "h-2 ring-1 rounded-full ring-zinc-400",
|
|
5294
5294
|
"wpic-tools": "bg-gray-100 rounded-xs h-4 dark:bg-gray-900"
|
|
5295
5295
|
}, i = {
|
|
@@ -5300,7 +5300,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5300
5300
|
class: G(["relative flex", { "mb-4": t.indicators }])
|
|
5301
5301
|
}, [
|
|
5302
5302
|
A("div", {
|
|
5303
|
-
class: G(["flex w-full relative", r[
|
|
5303
|
+
class: G(["flex w-full relative", r[P(ce).theme]]),
|
|
5304
5304
|
style: { "z-index": "1" }
|
|
5305
5305
|
}, [
|
|
5306
5306
|
n.value > 0 ? (b(), S("div", {
|
|
@@ -5308,7 +5308,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5308
5308
|
style: un({ width: `${n.value}%` }),
|
|
5309
5309
|
class: G(["flex h-full", {
|
|
5310
5310
|
[`${t.background}`]: !0,
|
|
5311
|
-
[`${i[
|
|
5311
|
+
[`${i[P(ce).theme]}`]: !0
|
|
5312
5312
|
}])
|
|
5313
5313
|
}, [
|
|
5314
5314
|
le(Of, {
|
|
@@ -5344,7 +5344,7 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5344
5344
|
r("clear");
|
|
5345
5345
|
}
|
|
5346
5346
|
return (o, s) => (b(), S("div", {
|
|
5347
|
-
class: G(["wpic-tag select-none border inline-flex rounded-sm h-8 items-center justify-center pl-3 py-1", { "pr-3": !t.clearable, "pr-1": t.clearable, [n[
|
|
5347
|
+
class: G(["wpic-tag select-none border inline-flex rounded-sm h-8 items-center justify-center pl-3 py-1", { "pr-3": !t.clearable, "pr-1": t.clearable, [n[P(ce).theme]]: !0 }])
|
|
5348
5348
|
}, [
|
|
5349
5349
|
A("span", u5, [
|
|
5350
5350
|
Me(o.$slots, "default")
|
|
@@ -5424,9 +5424,9 @@ const Vk = /* @__PURE__ */ ve(Nk, [["render", Pk]]), Rk = { class: "flex items-c
|
|
|
5424
5424
|
};
|
|
5425
5425
|
return (i, o) => (b(), S("div", {
|
|
5426
5426
|
class: G(["border rounded-sm flex items-center justify-center w-10 h-10 cursor-pointer", {
|
|
5427
|
-
[e[
|
|
5428
|
-
[n[
|
|
5429
|
-
[r[
|
|
5427
|
+
[e[P(ce).theme]]: !t.active && !t.disabled,
|
|
5428
|
+
[n[P(ce).theme]]: t.active && !t.disabled,
|
|
5429
|
+
[r[P(ce).theme]]: t.disabled
|
|
5430
5430
|
}])
|
|
5431
5431
|
}, [
|
|
5432
5432
|
A("span", k5, [
|
|
@@ -5521,7 +5521,7 @@ const Af = /* @__PURE__ */ ve(_5, [["render", H5]]), W5 = { class: "wpic-paginat
|
|
|
5521
5521
|
},
|
|
5522
5522
|
emits: ["update:perPage", "update:currentPage"],
|
|
5523
5523
|
setup(t, { expose: e, emit: n }) {
|
|
5524
|
-
const r = t, i = n, o =
|
|
5524
|
+
const r = t, i = n, o = de(() => Math.ceil(r.total / r.perPage)), s = de(() => {
|
|
5525
5525
|
const u = o.value;
|
|
5526
5526
|
if (!u || u === 1) return [1];
|
|
5527
5527
|
const d = r.currentPage, f = 1;
|
|
@@ -5638,9 +5638,8 @@ const tS = /* @__PURE__ */ ve(G5, [["render", eS]]), nS = { class: "font-semibol
|
|
|
5638
5638
|
};
|
|
5639
5639
|
return (n, r) => (b(), S("tr", nS, [
|
|
5640
5640
|
t.checkable ? (b(), ge(Io, {
|
|
5641
|
-
key: 0,
|
|
5642
5641
|
class: G(["py-3 first:pl-6 pr-6 border-t", {
|
|
5643
|
-
[`${e[
|
|
5642
|
+
[`${e[P(ce).theme]}`]: !0,
|
|
5644
5643
|
"sticky left-0": !0,
|
|
5645
5644
|
"border-b": t.position === "header",
|
|
5646
5645
|
"border-t": t.position === "footer",
|
|
@@ -5648,11 +5647,13 @@ const tS = /* @__PURE__ */ ve(G5, [["render", eS]]), nS = { class: "font-semibol
|
|
|
5648
5647
|
"last:rounded-br-lg": t.position === "footer",
|
|
5649
5648
|
"first:rounded-bl-lg": t.position === "footer"
|
|
5650
5649
|
}]),
|
|
5651
|
-
|
|
5650
|
+
id: "total_0",
|
|
5651
|
+
column: {},
|
|
5652
|
+
key: "tr_total_0"
|
|
5652
5653
|
}, null, 8, ["class"])) : Q("", !0),
|
|
5653
5654
|
(b(!0), S($e, null, We(t.columns, (i, o) => (b(), ge(Io, {
|
|
5654
5655
|
class: G(["py-3 first:pl-6 pr-6 border-t", {
|
|
5655
|
-
[`${e[
|
|
5656
|
+
[`${e[P(ce).theme]}`]: !0,
|
|
5656
5657
|
"sticky left-0": o === 0,
|
|
5657
5658
|
"border-b": t.position === "header",
|
|
5658
5659
|
"border-t": t.position === "footer",
|
|
@@ -5702,15 +5703,15 @@ const lS = /* @__PURE__ */ ve(rS, [["render", aS]]), cS = {}, uS = {
|
|
|
5702
5703
|
function hS(t, e) {
|
|
5703
5704
|
return b(), S("svg", uS, fS);
|
|
5704
5705
|
}
|
|
5705
|
-
const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
5706
|
+
const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = { class: "wpic-table" }, gS = {
|
|
5706
5707
|
key: 0,
|
|
5707
5708
|
class: "px-2 py-1 flex justify-end border-b dark:border-gray-900"
|
|
5708
|
-
},
|
|
5709
|
+
}, yS = { class: "overflow-auto-" }, vS = { class: "w-full rounded-lg" }, bS = {
|
|
5709
5710
|
key: 0,
|
|
5710
5711
|
class: "w-16"
|
|
5711
|
-
},
|
|
5712
|
-
|
|
5713
|
-
],
|
|
5712
|
+
}, xS = ["width"], wS = ["width"], kS = { class: "flex justify-center items-center h-full" }, SS = ["onClick"], CS = { class: "rounded-b-lg relative" }, OS = { key: 0 }, MS = /* @__PURE__ */ A("td", { class: "text-center py-3" }, " ", -1), TS = [
|
|
5713
|
+
MS
|
|
5714
|
+
], $S = { class: "flex justify-center items-center h-full" }, AS = { key: 1 }, ES = {
|
|
5714
5715
|
key: 0,
|
|
5715
5716
|
class: "text-center text-gray-400 py-3"
|
|
5716
5717
|
}, DS = {
|
|
@@ -5773,7 +5774,7 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5773
5774
|
});
|
|
5774
5775
|
const f = mn();
|
|
5775
5776
|
Ci("wtable", f == null ? void 0 : f.proxy);
|
|
5776
|
-
const h = Td(), p = ne([]), g = ne([]), m =
|
|
5777
|
+
const h = Td(), p = ne([]), g = ne([]), m = de(() => r.columnToggleable ? p.value.filter((D) => g.value.includes(D.field) || !D.selectable) : p.value.filter((D) => D.visible || !D.selectable));
|
|
5777
5778
|
function y() {
|
|
5778
5779
|
const D = (_, O) => {
|
|
5779
5780
|
let C = {};
|
|
@@ -5802,13 +5803,13 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5802
5803
|
((j = B.type) == null ? void 0 : j.name) === "WpicTableColumn" && J.push(B);
|
|
5803
5804
|
});
|
|
5804
5805
|
}), p.value = J.map((_) => {
|
|
5805
|
-
let O = _.children, C = _.props || {}, { field: B, label: j, help: ee, width: re, minWidth: N, maxWidth:
|
|
5806
|
+
let O = _.children, C = _.props || {}, { field: B, label: j, help: ee, width: re, minWidth: N, maxWidth: V, sortable: W, selectable: ie, render: Y, type: F, align: se, visible: Ce, noPadding: me } = D(_.type.props, C);
|
|
5806
5807
|
return B || (B = L(j)), ie && Ce && g.value.push(B), {
|
|
5807
5808
|
label: j,
|
|
5808
5809
|
help: ee,
|
|
5809
5810
|
width: re,
|
|
5810
5811
|
minWidth: N,
|
|
5811
|
-
maxWidth:
|
|
5812
|
+
maxWidth: V,
|
|
5812
5813
|
type: F,
|
|
5813
5814
|
align: se,
|
|
5814
5815
|
sortable: W,
|
|
@@ -5837,14 +5838,14 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5837
5838
|
}
|
|
5838
5839
|
const $ = ne([]);
|
|
5839
5840
|
function w(D) {
|
|
5840
|
-
const J =
|
|
5841
|
+
const J = R(D, r.itemId);
|
|
5841
5842
|
$.value.includes(J) ? ($.value.splice($.value.indexOf(J), 1), I.value = !1) : $.value.push(J);
|
|
5842
5843
|
}
|
|
5843
5844
|
const I = ne(!1);
|
|
5844
5845
|
function z() {
|
|
5845
5846
|
if (I.value = !I.value, $.value = [], I.value)
|
|
5846
5847
|
for (let D of r.data) {
|
|
5847
|
-
let J =
|
|
5848
|
+
let J = R(D, r.itemId);
|
|
5848
5849
|
$.value.push(J);
|
|
5849
5850
|
}
|
|
5850
5851
|
}
|
|
@@ -5853,7 +5854,7 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5853
5854
|
selectedRows: $,
|
|
5854
5855
|
selectedColumns: g
|
|
5855
5856
|
});
|
|
5856
|
-
function
|
|
5857
|
+
function R(D, J) {
|
|
5857
5858
|
return J.split(".").reduce((oe, _) => oe ? oe[_] : void 0, D);
|
|
5858
5859
|
}
|
|
5859
5860
|
function L(D) {
|
|
@@ -5861,8 +5862,8 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5861
5862
|
}
|
|
5862
5863
|
return (D, J) => {
|
|
5863
5864
|
const oe = la("wpic-choice-list"), _ = la("wpic-form-field");
|
|
5864
|
-
return b(), S("div",
|
|
5865
|
-
t.columnToggleable ? (b(), S("div",
|
|
5865
|
+
return b(), S("div", mS, [
|
|
5866
|
+
t.columnToggleable ? (b(), S("div", gS, [
|
|
5866
5867
|
A("div", null, [
|
|
5867
5868
|
le(oe, {
|
|
5868
5869
|
multiple: "",
|
|
@@ -5891,27 +5892,27 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5891
5892
|
])
|
|
5892
5893
|
])) : Q("", !0),
|
|
5893
5894
|
A("div", {
|
|
5894
|
-
class: G(["wpic-table relative w-full rounded-lg overflow-hidden-", {
|
|
5895
|
+
class: G(["wpic-table-content relative w-full rounded-lg overflow-hidden-", {
|
|
5895
5896
|
"no-radius rounded-none": t.noRadius || t.columnToggleable,
|
|
5896
5897
|
border: t.border,
|
|
5897
|
-
[`${i[
|
|
5898
|
+
[`${i[P(ce).theme]}`]: !0
|
|
5898
5899
|
}])
|
|
5899
5900
|
}, [
|
|
5900
|
-
A("div",
|
|
5901
|
-
A("table",
|
|
5901
|
+
A("div", yS, [
|
|
5902
|
+
A("table", vS, [
|
|
5902
5903
|
A("colgroup", null, [
|
|
5903
|
-
t.checkable ? (b(), S("col",
|
|
5904
|
+
t.checkable ? (b(), S("col", bS)) : Q("", !0),
|
|
5904
5905
|
m.value.find((O) => O.type == "expand") ? (b(), S("col", {
|
|
5905
5906
|
key: 1,
|
|
5906
5907
|
style: un({ minWidth: `${m.value.find((O) => O.type == "expand").minWidth}px` }),
|
|
5907
5908
|
width: m.value.find((O) => O.type == "expand").width,
|
|
5908
5909
|
class: "w-16"
|
|
5909
|
-
}, null, 12,
|
|
5910
|
+
}, null, 12, xS)) : Q("", !0),
|
|
5910
5911
|
(b(!0), S($e, null, We(m.value.filter((O) => O.type != "expand"), (O, C) => (b(), S("col", {
|
|
5911
5912
|
style: un({ minWidth: `${O.minWidth}px`, maxWidth: `${O.maxWidth}px` }),
|
|
5912
5913
|
width: O.width,
|
|
5913
5914
|
key: C
|
|
5914
|
-
}, null, 12,
|
|
5915
|
+
}, null, 12, wS))), 128))
|
|
5915
5916
|
]),
|
|
5916
5917
|
t.hideHeaders ? Q("", !0) : (b(), S("thead", {
|
|
5917
5918
|
key: 0,
|
|
@@ -5920,9 +5921,9 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5920
5921
|
A("tr", null, [
|
|
5921
5922
|
t.checkable ? (b(), S("th", {
|
|
5922
5923
|
key: 0,
|
|
5923
|
-
class: G(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6", [`${o[
|
|
5924
|
+
class: G(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6", [`${o[P(ce).theme]}`]])
|
|
5924
5925
|
}, [
|
|
5925
|
-
A("div",
|
|
5926
|
+
A("div", kS, [
|
|
5926
5927
|
le(_, {
|
|
5927
5928
|
slim: "",
|
|
5928
5929
|
"hide-error": "",
|
|
@@ -5934,13 +5935,13 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5934
5935
|
], 2)) : Q("", !0),
|
|
5935
5936
|
m.value.find((O) => O.type == "expand") ? (b(), S("th", {
|
|
5936
5937
|
key: 1,
|
|
5937
|
-
class: G(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6", [`${o[
|
|
5938
|
+
class: G(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6", [`${o[P(ce).theme]}`]])
|
|
5938
5939
|
}, null, 2)) : Q("", !0),
|
|
5939
5940
|
(b(!0), S($e, null, We(m.value.filter((O) => O.type != "expand"), (O, C) => {
|
|
5940
5941
|
var B, j;
|
|
5941
5942
|
return b(), S("th", {
|
|
5942
5943
|
class: G(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6", {
|
|
5943
|
-
[`${o[
|
|
5944
|
+
[`${o[P(ce).theme]}`]: !0,
|
|
5944
5945
|
"sticky top-0 left-0": C === 0
|
|
5945
5946
|
}]),
|
|
5946
5947
|
style: un({ maxWidth: `${O.maxWidth}px` })
|
|
@@ -5968,19 +5969,19 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5968
5969
|
class: G(["w-4 h-4", { "rotate-180": ((j = t.sortOptions) == null ? void 0 : j.sortDirection) === "asc" }])
|
|
5969
5970
|
}, null, 8, ["class"])
|
|
5970
5971
|
], 2)) : Q("", !0)
|
|
5971
|
-
], 10,
|
|
5972
|
+
], 10, SS)
|
|
5972
5973
|
], 6);
|
|
5973
5974
|
}), 256))
|
|
5974
5975
|
])
|
|
5975
5976
|
], 2)),
|
|
5976
|
-
A("tbody",
|
|
5977
|
+
A("tbody", CS, [
|
|
5977
5978
|
t.loading ? (b(), S($e, { key: 0 }, [
|
|
5978
5979
|
A("div", {
|
|
5979
|
-
class: G(["inset-0 z-10 absolute flex items-center justify-center", [u[
|
|
5980
|
+
class: G(["inset-0 z-10 absolute flex items-center justify-center", [u[P(ce).theme]]])
|
|
5980
5981
|
}, [
|
|
5981
5982
|
le(Zr, { class: "w-6 h-6" })
|
|
5982
5983
|
], 2),
|
|
5983
|
-
t.data.length ? Q("", !0) : (b(), S("tr",
|
|
5984
|
+
t.data.length ? Q("", !0) : (b(), S("tr", OS, TS))
|
|
5984
5985
|
], 64)) : Q("", !0),
|
|
5985
5986
|
t.totalItem && t.totalOnTop ? (b(), ge(Rc, {
|
|
5986
5987
|
key: 1,
|
|
@@ -5999,36 +6000,45 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
5999
6000
|
class: G(["tr group border-b last:border-b-0 overflow-hidden", {
|
|
6000
6001
|
"is-odd": C % 2 == 0,
|
|
6001
6002
|
"is-even": C % 2 != 0,
|
|
6002
|
-
[s[
|
|
6003
|
-
// [trStripeColors[config.theme]]: stripe
|
|
6003
|
+
[s[P(ce).theme]]: !0
|
|
6004
6004
|
}])
|
|
6005
6005
|
}, [
|
|
6006
|
-
t.checkable ? (b(), S("td",
|
|
6006
|
+
t.checkable ? (b(), S("td", {
|
|
6007
|
+
key: 0,
|
|
6008
|
+
class: G([
|
|
6009
|
+
{
|
|
6010
|
+
[`${l[P(ce).theme]}`]: !0,
|
|
6011
|
+
[`${c[P(ce).theme]}`]: t.stripe
|
|
6012
|
+
}
|
|
6013
|
+
])
|
|
6014
|
+
}, [
|
|
6007
6015
|
A("div", $S, [
|
|
6008
6016
|
le(_, {
|
|
6009
6017
|
slim: "",
|
|
6010
6018
|
"hide-error": "",
|
|
6011
6019
|
checkbox: "",
|
|
6012
|
-
modelValue: $.value.includes(
|
|
6013
|
-
checkboxValue:
|
|
6014
|
-
"onUpdate:modelValue": (
|
|
6020
|
+
modelValue: $.value.includes(R(O, t.itemId)),
|
|
6021
|
+
checkboxValue: R(O, t.itemId),
|
|
6022
|
+
"onUpdate:modelValue": (V) => w(O)
|
|
6015
6023
|
}, null, 8, ["modelValue", "checkboxValue", "onUpdate:modelValue"])
|
|
6016
6024
|
])
|
|
6017
|
-
])) : Q("", !0),
|
|
6018
|
-
m.value.find((
|
|
6025
|
+
], 2)) : Q("", !0),
|
|
6026
|
+
m.value.find((V) => V.type == "expand") ? (b(), S("td", {
|
|
6019
6027
|
key: 1,
|
|
6020
6028
|
class: G([[
|
|
6021
6029
|
{
|
|
6022
6030
|
"first:pl-6 pr-6 last:pr-6": !t.noXPadding,
|
|
6023
6031
|
"first:pl-0 pr-6 last:pr-0": t.noXPadding,
|
|
6024
|
-
"align-top py-5": t.valign == "top"
|
|
6032
|
+
"align-top py-5": t.valign == "top",
|
|
6033
|
+
[`${l[P(ce).theme]}`]: !0,
|
|
6034
|
+
[`${c[P(ce).theme]}`]: t.stripe
|
|
6025
6035
|
}
|
|
6026
6036
|
], "border-t border-gray-200 leading-tight h-16 py-2 dark:border-gray-920"])
|
|
6027
6037
|
}, [
|
|
6028
6038
|
le(Mi, {
|
|
6029
6039
|
small: "",
|
|
6030
6040
|
square: "",
|
|
6031
|
-
onClick: (
|
|
6041
|
+
onClick: (V) => v({ item: O, index: C })
|
|
6032
6042
|
}, {
|
|
6033
6043
|
default: xe(() => [
|
|
6034
6044
|
E[C] ? (b(), ge(Vk, {
|
|
@@ -6042,50 +6052,50 @@ const pS = /* @__PURE__ */ ve(cS, [["render", hS]]), mS = {
|
|
|
6042
6052
|
_: 2
|
|
6043
6053
|
}, 1032, ["onClick"])
|
|
6044
6054
|
], 2)) : Q("", !0),
|
|
6045
|
-
(b(!0), S($e, null, We(m.value.filter((
|
|
6055
|
+
(b(!0), S($e, null, We(m.value.filter((V) => V.type != "expand"), (V, W) => {
|
|
6046
6056
|
var ie, Y;
|
|
6047
6057
|
return b(), ge(Io, {
|
|
6048
6058
|
class: G(["lg:text-base h-full table-cell", {
|
|
6049
6059
|
"text-sm lg:text-sm py-1!": t.small,
|
|
6050
6060
|
"sticky left-0 shadow-sm": W === 0,
|
|
6051
|
-
[`${l[
|
|
6052
|
-
[`${c[
|
|
6053
|
-
"py-3 first:pl-6 pr-6": !
|
|
6061
|
+
[`${l[P(ce).theme]}`]: !0,
|
|
6062
|
+
[`${c[P(ce).theme]}`]: t.stripe,
|
|
6063
|
+
"py-3 first:pl-6 pr-6": !V.noPadding,
|
|
6054
6064
|
"first:pl-0 last:pr-0": t.noXPadding,
|
|
6055
6065
|
"last:rounded-br-lg": C === ((ie = t.data) == null ? void 0 : ie.length) - 1 && !t.totalItem && !m.value.find((F) => F.type == "expand") && !t.noRadius,
|
|
6056
6066
|
"first:rounded-bl-lg": C === ((Y = t.data) == null ? void 0 : Y.length) - 1 && !t.totalItem && !m.value.find((F) => F.type == "expand") && !t.noRadius,
|
|
6057
|
-
"text-center justify-center":
|
|
6058
|
-
"text-right justify-end":
|
|
6067
|
+
"text-center justify-center": V.align == "center",
|
|
6068
|
+
"text-right justify-end": V.align == "right",
|
|
6059
6069
|
"align-top py-5": t.valign == "top"
|
|
6060
6070
|
}]),
|
|
6061
|
-
style: un({ maxWidth: `${
|
|
6071
|
+
style: un({ maxWidth: `${V.maxWidth}px` }),
|
|
6062
6072
|
id: `${C}_${W}`,
|
|
6063
|
-
column:
|
|
6073
|
+
column: V,
|
|
6064
6074
|
item: O,
|
|
6065
6075
|
rowIndex: C,
|
|
6066
6076
|
key: W
|
|
6067
6077
|
}, null, 8, ["class", "style", "id", "column", "item", "rowIndex"]);
|
|
6068
6078
|
}), 128))
|
|
6069
6079
|
], 2),
|
|
6070
|
-
m.value.find((
|
|
6080
|
+
m.value.find((V) => V.type == "expand") ? Vr((b(), S("tr", {
|
|
6071
6081
|
key: 0,
|
|
6072
6082
|
class: G([{
|
|
6073
|
-
[s[
|
|
6074
|
-
[a[
|
|
6083
|
+
[s[P(ce).theme]]: !t.stripe,
|
|
6084
|
+
[a[P(ce).theme]]: t.stripe
|
|
6075
6085
|
}, "tr border-b last:border-b-0 overflow-hidden"])
|
|
6076
6086
|
}, [
|
|
6077
6087
|
le(Io, {
|
|
6078
6088
|
class: G(["lg:text-base bg-gray-50! dark:bg-gray-940!", {
|
|
6079
|
-
[`${l[
|
|
6080
|
-
"py-3 first:pl-6 pr-6": !((B = m.value.find((
|
|
6081
|
-
"p-0": (j = m.value.find((
|
|
6089
|
+
[`${l[P(ce).theme]}`]: !0,
|
|
6090
|
+
"py-3 first:pl-6 pr-6": !((B = m.value.find((V) => V.type == "expand")) != null && B.noPadding),
|
|
6091
|
+
"p-0": (j = m.value.find((V) => V.type == "expand")) == null ? void 0 : j.noPadding,
|
|
6082
6092
|
"first:pl-0 last:pr-0": t.noXPadding,
|
|
6083
6093
|
"last:rounded-br-lg": C === ((ee = t.data) == null ? void 0 : ee.length) - 1 && !t.totalItem,
|
|
6084
6094
|
"first:rounded-bl-lg": C === ((re = t.data) == null ? void 0 : re.length) - 1 && !t.totalItem,
|
|
6085
|
-
"text-center": m.value.find((
|
|
6086
|
-
"text-right": m.value.find((
|
|
6095
|
+
"text-center": m.value.find((V) => V.type == "expand").align == "center",
|
|
6096
|
+
"text-right": m.value.find((V) => V.type == "expand").align == "right"
|
|
6087
6097
|
}]),
|
|
6088
|
-
column: m.value.find((
|
|
6098
|
+
column: m.value.find((V) => V.type == "expand"),
|
|
6089
6099
|
rowIndex: C,
|
|
6090
6100
|
colspan: (N = m.value) == null ? void 0 : N.length,
|
|
6091
6101
|
item: O
|
|
@@ -10738,7 +10748,7 @@ class ds {
|
|
|
10738
10748
|
return ye.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
10739
10749
|
}
|
|
10740
10750
|
}
|
|
10741
|
-
class
|
|
10751
|
+
class ue extends ke {
|
|
10742
10752
|
/**
|
|
10743
10753
|
Create a node selection. Does not verify the validity of its
|
|
10744
10754
|
argument.
|
|
@@ -10749,13 +10759,13 @@ class ce extends ke {
|
|
|
10749
10759
|
}
|
|
10750
10760
|
map(e, n) {
|
|
10751
10761
|
let { deleted: r, pos: i } = n.mapResult(this.anchor), o = e.resolve(i);
|
|
10752
|
-
return r ? ke.near(o) : new
|
|
10762
|
+
return r ? ke.near(o) : new ue(o);
|
|
10753
10763
|
}
|
|
10754
10764
|
content() {
|
|
10755
10765
|
return new Z(q.from(this.node), 0, 0);
|
|
10756
10766
|
}
|
|
10757
10767
|
eq(e) {
|
|
10758
|
-
return e instanceof
|
|
10768
|
+
return e instanceof ue && e.anchor == this.anchor;
|
|
10759
10769
|
}
|
|
10760
10770
|
toJSON() {
|
|
10761
10771
|
return { type: "node", anchor: this.anchor };
|
|
@@ -10769,13 +10779,13 @@ class ce extends ke {
|
|
|
10769
10779
|
static fromJSON(e, n) {
|
|
10770
10780
|
if (typeof n.anchor != "number")
|
|
10771
10781
|
throw new RangeError("Invalid input for NodeSelection.fromJSON");
|
|
10772
|
-
return new
|
|
10782
|
+
return new ue(e.resolve(n.anchor));
|
|
10773
10783
|
}
|
|
10774
10784
|
/**
|
|
10775
10785
|
Create a node selection from non-resolved positions.
|
|
10776
10786
|
*/
|
|
10777
10787
|
static create(e, n) {
|
|
10778
|
-
return new
|
|
10788
|
+
return new ue(e.resolve(n));
|
|
10779
10789
|
}
|
|
10780
10790
|
/**
|
|
10781
10791
|
Determines whether the given node may be selected as a node
|
|
@@ -10785,8 +10795,8 @@ class ce extends ke {
|
|
|
10785
10795
|
return !e.isText && e.type.spec.selectable !== !1;
|
|
10786
10796
|
}
|
|
10787
10797
|
}
|
|
10788
|
-
|
|
10789
|
-
ke.jsonID("node",
|
|
10798
|
+
ue.prototype.visible = !1;
|
|
10799
|
+
ke.jsonID("node", ue);
|
|
10790
10800
|
class pl {
|
|
10791
10801
|
constructor(e) {
|
|
10792
10802
|
this.anchor = e;
|
|
@@ -10797,7 +10807,7 @@ class pl {
|
|
|
10797
10807
|
}
|
|
10798
10808
|
resolve(e) {
|
|
10799
10809
|
let n = e.resolve(this.anchor), r = n.nodeAfter;
|
|
10800
|
-
return r &&
|
|
10810
|
+
return r && ue.isSelectable(r) ? new ue(n) : ke.near(n);
|
|
10801
10811
|
}
|
|
10802
10812
|
}
|
|
10803
10813
|
class kt extends ke {
|
|
@@ -10849,8 +10859,8 @@ function Or(t, e, n, r, i, o = !1) {
|
|
|
10849
10859
|
for (let s = r - (i > 0 ? 0 : 1); i > 0 ? s < e.childCount : s >= 0; s += i) {
|
|
10850
10860
|
let a = e.child(s);
|
|
10851
10861
|
if (a.isAtom) {
|
|
10852
|
-
if (!o &&
|
|
10853
|
-
return
|
|
10862
|
+
if (!o && ue.isSelectable(a))
|
|
10863
|
+
return ue.create(t, n - (i < 0 ? a.nodeSize : 0));
|
|
10854
10864
|
} else {
|
|
10855
10865
|
let l = Or(t, a, n + i, i < 0 ? a.childCount : 0, i, o);
|
|
10856
10866
|
if (l)
|
|
@@ -12752,9 +12762,9 @@ function gl(t, e = null) {
|
|
|
12752
12762
|
for (l = s; i && !i.node; )
|
|
12753
12763
|
i = i.parent;
|
|
12754
12764
|
let d = i.node;
|
|
12755
|
-
if (i && d.isAtom &&
|
|
12765
|
+
if (i && d.isAtom && ue.isSelectable(d) && i.parent && !(d.isInline && IC(n.focusNode, n.focusOffset, i.dom))) {
|
|
12756
12766
|
let f = i.posBefore;
|
|
12757
|
-
c = new
|
|
12767
|
+
c = new ue(s == f ? a : r.resolve(f));
|
|
12758
12768
|
}
|
|
12759
12769
|
} else {
|
|
12760
12770
|
if (n instanceof t.dom.ownerDocument.defaultView.Selection && n.rangeCount > 1) {
|
|
@@ -12836,7 +12846,7 @@ function uO(t) {
|
|
|
12836
12846
|
i ? n.setStart(r.parentNode, Xe(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !i && !t.state.selection.visible && ht && En <= 11 && (r.disabled = !0, r.disabled = !1);
|
|
12837
12847
|
}
|
|
12838
12848
|
function Ch(t, e) {
|
|
12839
|
-
if (e instanceof
|
|
12849
|
+
if (e instanceof ue) {
|
|
12840
12850
|
let n = t.docView.descAt(e.from);
|
|
12841
12851
|
n != t.lastSelectedViewDesc && (vu(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
|
|
12842
12852
|
} else
|
|
@@ -12884,17 +12894,17 @@ function xu(t, e, n) {
|
|
|
12884
12894
|
} else if (r.empty) {
|
|
12885
12895
|
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
12886
12896
|
let i = Ia(t.state, e);
|
|
12887
|
-
return i && i instanceof
|
|
12897
|
+
return i && i instanceof ue ? kn(t, i) : !1;
|
|
12888
12898
|
} else if (!($t && n.indexOf("m") > -1)) {
|
|
12889
12899
|
let i = r.$head, o = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, s;
|
|
12890
12900
|
if (!o || o.isText)
|
|
12891
12901
|
return !1;
|
|
12892
12902
|
let a = e < 0 ? i.pos - o.nodeSize : i.pos;
|
|
12893
|
-
return o.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ?
|
|
12903
|
+
return o.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? ue.isSelectable(o) ? kn(t, new ue(e < 0 ? t.state.doc.resolve(i.pos - o.nodeSize) : i)) : Qi ? kn(t, new ye(t.state.doc.resolve(e < 0 ? a : a + o.nodeSize))) : !1 : !1;
|
|
12894
12904
|
}
|
|
12895
12905
|
} else return !1;
|
|
12896
12906
|
else {
|
|
12897
|
-
if (r instanceof
|
|
12907
|
+
if (r instanceof ue && r.node.isInline)
|
|
12898
12908
|
return kn(t, new ye(e > 0 ? r.$to : r.$from));
|
|
12899
12909
|
{
|
|
12900
12910
|
let i = Ia(t.state, e);
|
|
@@ -13050,7 +13060,7 @@ function ku(t, e, n) {
|
|
|
13050
13060
|
let { $from: i, $to: o } = r;
|
|
13051
13061
|
if (!i.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
13052
13062
|
let s = Ia(t.state, e);
|
|
13053
|
-
if (s && s instanceof
|
|
13063
|
+
if (s && s instanceof ue)
|
|
13054
13064
|
return kn(t, s);
|
|
13055
13065
|
}
|
|
13056
13066
|
if (!i.parent.inlineContent) {
|
|
@@ -13407,22 +13417,22 @@ function NO(t, e) {
|
|
|
13407
13417
|
if (e == -1)
|
|
13408
13418
|
return !1;
|
|
13409
13419
|
let n = t.state.doc.resolve(e), r = n.nodeAfter;
|
|
13410
|
-
return r && r.isAtom &&
|
|
13420
|
+
return r && r.isAtom && ue.isSelectable(r) ? (Br(t, new ue(n)), !0) : !1;
|
|
13411
13421
|
}
|
|
13412
13422
|
function LO(t, e) {
|
|
13413
13423
|
if (e == -1)
|
|
13414
13424
|
return !1;
|
|
13415
13425
|
let n = t.state.selection, r, i;
|
|
13416
|
-
n instanceof
|
|
13426
|
+
n instanceof ue && (r = n.node);
|
|
13417
13427
|
let o = t.state.doc.resolve(e);
|
|
13418
13428
|
for (let s = o.depth + 1; s > 0; s--) {
|
|
13419
13429
|
let a = s > o.depth ? o.nodeAfter : o.node(s);
|
|
13420
|
-
if (
|
|
13430
|
+
if (ue.isSelectable(a)) {
|
|
13421
13431
|
r && n.$from.depth > 0 && s >= n.$from.depth && o.before(n.$from.depth + 1) == n.$from.pos ? i = o.before(n.$from.depth) : i = o.before(s);
|
|
13422
13432
|
break;
|
|
13423
13433
|
}
|
|
13424
13434
|
}
|
|
13425
|
-
return i != null ? (Br(t,
|
|
13435
|
+
return i != null ? (Br(t, ue.create(t.state.doc, i)), !0) : !1;
|
|
13426
13436
|
}
|
|
13427
13437
|
function IO(t, e, n, r, i) {
|
|
13428
13438
|
return xl(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (o) => o(t, e, r)) || (i ? LO(t, n) : NO(t, n));
|
|
@@ -13444,8 +13454,8 @@ function VO(t, e, n) {
|
|
|
13444
13454
|
let s = o > i.depth ? i.nodeAfter : i.node(o), a = i.before(o);
|
|
13445
13455
|
if (s.inlineContent)
|
|
13446
13456
|
Br(t, ye.create(r, a + 1, a + 1 + s.content.size));
|
|
13447
|
-
else if (
|
|
13448
|
-
Br(t,
|
|
13457
|
+
else if (ue.isSelectable(s))
|
|
13458
|
+
Br(t, ue.create(r, a));
|
|
13449
13459
|
else
|
|
13450
13460
|
continue;
|
|
13451
13461
|
return !0;
|
|
@@ -13476,7 +13486,7 @@ class RO {
|
|
|
13476
13486
|
const a = i ? null : r.target, l = a ? e.docView.nearestDesc(a, !0) : null;
|
|
13477
13487
|
this.target = l && l.dom.nodeType == 1 ? l.dom : null;
|
|
13478
13488
|
let { selection: c } = e.state;
|
|
13479
|
-
(r.button == 0 && o.type.spec.draggable && o.type.spec.selectable !== !1 || c instanceof
|
|
13489
|
+
(r.button == 0 && o.type.spec.draggable && o.type.spec.selectable !== !1 || c instanceof ue && c.from <= s && c.to > s) && (this.mightDrag = {
|
|
13480
13490
|
node: o,
|
|
13481
13491
|
pos: s,
|
|
13482
13492
|
addAttr: !!(this.target && !this.target.draggable),
|
|
@@ -13651,12 +13661,12 @@ lt.dragstart = (t, e) => {
|
|
|
13651
13661
|
if (r && r.done(), !n.dataTransfer)
|
|
13652
13662
|
return;
|
|
13653
13663
|
let i = t.state.selection, o = i.empty ? null : t.posAtCoords(ps(n)), s;
|
|
13654
|
-
if (!(o && o.pos >= i.from && o.pos <= (i instanceof
|
|
13664
|
+
if (!(o && o.pos >= i.from && o.pos <= (i instanceof ue ? i.to - 1 : i.to))) {
|
|
13655
13665
|
if (r && r.mightDrag)
|
|
13656
|
-
s =
|
|
13666
|
+
s = ue.create(t.state.doc, r.mightDrag.pos);
|
|
13657
13667
|
else if (n.target && n.target.nodeType == 1) {
|
|
13658
13668
|
let d = t.docView.nearestDesc(n.target, !0);
|
|
13659
|
-
d && d.node.type.spec.draggable && d != t.docView && (s =
|
|
13669
|
+
d && d.node.type.spec.draggable && d != t.docView && (s = ue.create(t.state.doc, d.posBefore));
|
|
13660
13670
|
}
|
|
13661
13671
|
}
|
|
13662
13672
|
let a = (s || t.state.selection).content(), { dom: l, text: c, slice: u } = vl(t, a);
|
|
@@ -13699,8 +13709,8 @@ ct.drop = (t, e) => {
|
|
|
13699
13709
|
if (d ? c.replaceRangeWith(u, u, s.content.firstChild) : c.replaceRange(u, u, s), c.doc.eq(f))
|
|
13700
13710
|
return;
|
|
13701
13711
|
let h = c.doc.resolve(u);
|
|
13702
|
-
if (d &&
|
|
13703
|
-
c.setSelection(new
|
|
13712
|
+
if (d && ue.isSelectable(s.content.firstChild) && h.nodeAfter && h.nodeAfter.sameMarkup(s.content.firstChild))
|
|
13713
|
+
c.setSelection(new ue(h));
|
|
13704
13714
|
else {
|
|
13705
13715
|
let p = c.mapping.map(l);
|
|
13706
13716
|
c.mapping.maps[c.mapping.maps.length - 1].forEach((g, m, y, k) => p = k), c.setSelection(yl(t, h, c.doc.resolve(p)));
|
|
@@ -14481,12 +14491,12 @@ const n3 = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
|
|
|
14481
14491
|
function r3(t, e, n, r, i) {
|
|
14482
14492
|
let o = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
|
|
14483
14493
|
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
14484
|
-
let
|
|
14494
|
+
let R = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, L = gl(t, R);
|
|
14485
14495
|
if (L && !t.state.selection.eq(L)) {
|
|
14486
14496
|
if (rt && dn && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (J) => J(t, Gn(13, "Enter"))))
|
|
14487
14497
|
return;
|
|
14488
14498
|
let D = t.state.tr.setSelection(L);
|
|
14489
|
-
|
|
14499
|
+
R == "pointer" ? D.setMeta("pointer", !0) : R == "key" && D.scrollIntoView(), o && D.setMeta("composition", o), t.dispatch(D);
|
|
14490
14500
|
}
|
|
14491
14501
|
return;
|
|
14492
14502
|
}
|
|
@@ -14495,7 +14505,7 @@ function r3(t, e, n, r, i) {
|
|
|
14495
14505
|
let l = t.state.selection, c = e3(t, e, n), u = t.state.doc, d = u.slice(c.from, c.to), f, h;
|
|
14496
14506
|
t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, h = "end") : (f = t.state.selection.from, h = "start"), t.input.lastKeyCode = null;
|
|
14497
14507
|
let p = s3(d.content, c.doc.content, c.from, f, h);
|
|
14498
|
-
if (p && t.input.domChangeCount++, (Fr && t.input.lastIOSEnter > Date.now() - 225 || dn) && i.some((
|
|
14508
|
+
if (p && t.input.domChangeCount++, (Fr && t.input.lastIOSEnter > Date.now() - 225 || dn) && i.some((R) => R.nodeType == 1 && !n3.test(R.nodeName)) && (!p || p.endA >= p.endB) && t.someProp("handleKeyDown", (R) => R(t, Gn(13, "Enter")))) {
|
|
14499
14509
|
t.input.lastIOSEnter = 0;
|
|
14500
14510
|
return;
|
|
14501
14511
|
}
|
|
@@ -14504,9 +14514,9 @@ function r3(t, e, n, r, i) {
|
|
|
14504
14514
|
p = { start: l.from, endA: l.to, endB: l.to };
|
|
14505
14515
|
else {
|
|
14506
14516
|
if (c.sel) {
|
|
14507
|
-
let
|
|
14508
|
-
if (
|
|
14509
|
-
let L = t.state.tr.setSelection(
|
|
14517
|
+
let R = Du(t, t.state.doc, c.sel);
|
|
14518
|
+
if (R && !R.eq(t.state.selection)) {
|
|
14519
|
+
let L = t.state.tr.setSelection(R);
|
|
14510
14520
|
o && L.setMeta("composition", o), t.dispatch(L);
|
|
14511
14521
|
}
|
|
14512
14522
|
}
|
|
@@ -14514,17 +14524,17 @@ function r3(t, e, n, r, i) {
|
|
|
14514
14524
|
}
|
|
14515
14525
|
t.state.selection.from < t.state.selection.to && p.start == p.endB && t.state.selection instanceof ye && (p.start > t.state.selection.from && p.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? p.start = t.state.selection.from : p.endA < t.state.selection.to && p.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (p.endB += t.state.selection.to - p.endA, p.endA = t.state.selection.to)), ht && En <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == " " && (p.start--, p.endA--, p.endB--);
|
|
14516
14526
|
let g = c.doc.resolveNoCache(p.start - c.from), m = c.doc.resolveNoCache(p.endB - c.from), y = u.resolve(p.start), k = g.sameParent(m) && g.parent.inlineContent && y.end() >= p.endA, E;
|
|
14517
|
-
if ((Fr && t.input.lastIOSEnter > Date.now() - 225 && (!k || i.some((
|
|
14527
|
+
if ((Fr && t.input.lastIOSEnter > Date.now() - 225 && (!k || i.some((R) => R.nodeName == "DIV" || R.nodeName == "P")) || !k && g.pos < c.doc.content.size && !g.sameParent(m) && (E = ke.findFrom(c.doc.resolve(g.pos + 1), 1, !0)) && E.head == m.pos) && t.someProp("handleKeyDown", (R) => R(t, Gn(13, "Enter")))) {
|
|
14518
14528
|
t.input.lastIOSEnter = 0;
|
|
14519
14529
|
return;
|
|
14520
14530
|
}
|
|
14521
|
-
if (t.state.selection.anchor > p.start && o3(u, p.start, p.endA, g, m) && t.someProp("handleKeyDown", (
|
|
14531
|
+
if (t.state.selection.anchor > p.start && o3(u, p.start, p.endA, g, m) && t.someProp("handleKeyDown", (R) => R(t, Gn(8, "Backspace")))) {
|
|
14522
14532
|
dn && rt && t.domObserver.suppressSelectionUpdates();
|
|
14523
14533
|
return;
|
|
14524
14534
|
}
|
|
14525
14535
|
rt && p.endB == p.start && (t.input.lastChromeDelete = Date.now()), dn && !k && g.start() != m.start() && m.parentOffset == 0 && g.depth == m.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, m = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
|
|
14526
|
-
t.someProp("handleKeyDown", function(
|
|
14527
|
-
return
|
|
14536
|
+
t.someProp("handleKeyDown", function(R) {
|
|
14537
|
+
return R(t, Gn(13, "Enter"));
|
|
14528
14538
|
});
|
|
14529
14539
|
}, 20));
|
|
14530
14540
|
let v = p.start, $ = p.endA, w, I, z;
|
|
@@ -14537,15 +14547,15 @@ function r3(t, e, n, r, i) {
|
|
|
14537
14547
|
)
|
|
14538
14548
|
w = t.state.tr, z.type == "add" ? w.addMark(v, $, z.mark) : w.removeMark(v, $, z.mark);
|
|
14539
14549
|
else if (g.parent.child(g.index()).isText && g.index() == m.index() - (m.textOffset ? 0 : 1)) {
|
|
14540
|
-
let
|
|
14541
|
-
if (t.someProp("handleTextInput", (L) => L(t, v, $,
|
|
14550
|
+
let R = g.parent.textBetween(g.parentOffset, m.parentOffset);
|
|
14551
|
+
if (t.someProp("handleTextInput", (L) => L(t, v, $, R)))
|
|
14542
14552
|
return;
|
|
14543
|
-
w = t.state.tr.insertText(
|
|
14553
|
+
w = t.state.tr.insertText(R, v, $);
|
|
14544
14554
|
}
|
|
14545
14555
|
}
|
|
14546
14556
|
if (w || (w = t.state.tr.replace(v, $, c.doc.slice(p.start - c.from, p.endB - c.from))), c.sel) {
|
|
14547
|
-
let
|
|
14548
|
-
|
|
14557
|
+
let R = Du(t, w.doc, c.sel);
|
|
14558
|
+
R && !(rt && t.composing && R.empty && (p.start != p.endB || t.input.lastChromeDelete < Date.now() - 100) && (R.head == v || R.head == w.mapping.map($) - 1) || ht && R.empty && R.head == v) && w.setSelection(R);
|
|
14549
14559
|
}
|
|
14550
14560
|
I && w.ensureMarks(I), o && w.setMeta("composition", o), t.dispatch(w.scrollIntoView());
|
|
14551
14561
|
}
|
|
@@ -14714,7 +14724,7 @@ class a3 {
|
|
|
14714
14724
|
scrollToSelection() {
|
|
14715
14725
|
let e = this.domSelectionRange().focusNode;
|
|
14716
14726
|
if (!(!e || !this.dom.contains(e.nodeType == 1 ? e : e.parentNode))) {
|
|
14717
|
-
if (!this.someProp("handleScrollToSelection", (n) => n(this))) if (this.state.selection instanceof
|
|
14727
|
+
if (!this.someProp("handleScrollToSelection", (n) => n(this))) if (this.state.selection instanceof ue) {
|
|
14718
14728
|
let n = this.docView.domAfterPos(this.state.selection.from);
|
|
14719
14729
|
n.nodeType == 1 && au(this, n.getBoundingClientRect(), e);
|
|
14720
14730
|
} else
|
|
@@ -14751,7 +14761,7 @@ class a3 {
|
|
|
14751
14761
|
let o = r.from + (this.state.doc.content.size - n.doc.content.size);
|
|
14752
14762
|
(o > 0 && this.state.doc.nodeAt(o)) == r.node && (i = o);
|
|
14753
14763
|
}
|
|
14754
|
-
this.dragging = new Rh(e.slice, e.move, i < 0 ? void 0 :
|
|
14764
|
+
this.dragging = new Rh(e.slice, e.move, i < 0 ? void 0 : ue.create(this.state.doc, i));
|
|
14755
14765
|
}
|
|
14756
14766
|
someProp(e, n) {
|
|
14757
14767
|
let r = this._props && this._props[e], i;
|
|
@@ -15172,13 +15182,13 @@ const Uh = (t, e, n) => {
|
|
|
15172
15182
|
let o = i.nodeBefore;
|
|
15173
15183
|
if (ep(t, i, e, -1))
|
|
15174
15184
|
return !0;
|
|
15175
|
-
if (r.parent.content.size == 0 && (Hr(o, "end") ||
|
|
15185
|
+
if (r.parent.content.size == 0 && (Hr(o, "end") || ue.isSelectable(o)))
|
|
15176
15186
|
for (let s = r.depth; ; s--) {
|
|
15177
15187
|
let a = us(t.doc, r.before(s), r.after(s), Z.empty);
|
|
15178
15188
|
if (a && a.slice.size < a.to - a.from) {
|
|
15179
15189
|
if (e) {
|
|
15180
15190
|
let l = t.tr.step(a);
|
|
15181
|
-
l.setSelection(Hr(o, "end") ? ke.findFrom(l.doc.resolve(l.mapping.map(i.pos, -1)), -1) :
|
|
15191
|
+
l.setSelection(Hr(o, "end") ? ke.findFrom(l.doc.resolve(l.mapping.map(i.pos, -1)), -1) : ue.create(l.doc, i.pos - o.nodeSize)), e(l.scrollIntoView());
|
|
15182
15192
|
}
|
|
15183
15193
|
return !0;
|
|
15184
15194
|
}
|
|
@@ -15246,7 +15256,7 @@ const Kh = (t, e, n) => {
|
|
|
15246
15256
|
o = Ol(r);
|
|
15247
15257
|
}
|
|
15248
15258
|
let s = o && o.nodeBefore;
|
|
15249
|
-
return !s || !
|
|
15259
|
+
return !s || !ue.isSelectable(s) ? !1 : (e && e(t.tr.setSelection(ue.create(t.doc, o.pos - s.nodeSize)).scrollIntoView()), !0);
|
|
15250
15260
|
};
|
|
15251
15261
|
function Ol(t) {
|
|
15252
15262
|
if (!t.parent.type.spec.isolating)
|
|
@@ -15272,12 +15282,12 @@ const Jh = (t, e, n) => {
|
|
|
15272
15282
|
let o = i.nodeAfter;
|
|
15273
15283
|
if (ep(t, i, e, 1))
|
|
15274
15284
|
return !0;
|
|
15275
|
-
if (r.parent.content.size == 0 && (Hr(o, "start") ||
|
|
15285
|
+
if (r.parent.content.size == 0 && (Hr(o, "start") || ue.isSelectable(o))) {
|
|
15276
15286
|
let s = us(t.doc, r.before(), r.after(), Z.empty);
|
|
15277
15287
|
if (s && s.slice.size < s.to - s.from) {
|
|
15278
15288
|
if (e) {
|
|
15279
15289
|
let a = t.tr.step(s);
|
|
15280
|
-
a.setSelection(Hr(o, "start") ? ke.findFrom(a.doc.resolve(a.mapping.map(i.pos)), 1) :
|
|
15290
|
+
a.setSelection(Hr(o, "start") ? ke.findFrom(a.doc.resolve(a.mapping.map(i.pos)), 1) : ue.create(a.doc, a.mapping.map(i.pos))), e(a.scrollIntoView());
|
|
15281
15291
|
}
|
|
15282
15292
|
return !0;
|
|
15283
15293
|
}
|
|
@@ -15293,7 +15303,7 @@ const Jh = (t, e, n) => {
|
|
|
15293
15303
|
o = Ml(r);
|
|
15294
15304
|
}
|
|
15295
15305
|
let s = o && o.nodeAfter;
|
|
15296
|
-
return !s || !
|
|
15306
|
+
return !s || !ue.isSelectable(s) ? !1 : (e && e(t.tr.setSelection(ue.create(t.doc, o.pos)).scrollIntoView()), !0);
|
|
15297
15307
|
};
|
|
15298
15308
|
function Ml(t) {
|
|
15299
15309
|
if (!t.parent.type.spec.isolating)
|
|
@@ -15307,7 +15317,7 @@ function Ml(t) {
|
|
|
15307
15317
|
return null;
|
|
15308
15318
|
}
|
|
15309
15319
|
const b3 = (t, e) => {
|
|
15310
|
-
let n = t.selection, r = n instanceof
|
|
15320
|
+
let n = t.selection, r = n instanceof ue, i;
|
|
15311
15321
|
if (r) {
|
|
15312
15322
|
if (n.node.isTextblock || !jn(t.doc, n.from))
|
|
15313
15323
|
return !1;
|
|
@@ -15316,12 +15326,12 @@ const b3 = (t, e) => {
|
|
|
15316
15326
|
return !1;
|
|
15317
15327
|
if (e) {
|
|
15318
15328
|
let o = t.tr.join(i);
|
|
15319
|
-
r && o.setSelection(
|
|
15329
|
+
r && o.setSelection(ue.create(o.doc, i - t.doc.resolve(i).nodeBefore.nodeSize)), e(o.scrollIntoView());
|
|
15320
15330
|
}
|
|
15321
15331
|
return !0;
|
|
15322
15332
|
}, x3 = (t, e) => {
|
|
15323
15333
|
let n = t.selection, r;
|
|
15324
|
-
if (n instanceof
|
|
15334
|
+
if (n instanceof ue) {
|
|
15325
15335
|
if (n.node.isTextblock || !jn(t.doc, n.to))
|
|
15326
15336
|
return !1;
|
|
15327
15337
|
r = n.to;
|
|
@@ -15383,7 +15393,7 @@ const k3 = (t, e) => {
|
|
|
15383
15393
|
function S3(t) {
|
|
15384
15394
|
return (e, n) => {
|
|
15385
15395
|
let { $from: r, $to: i } = e.selection;
|
|
15386
|
-
if (e.selection instanceof
|
|
15396
|
+
if (e.selection instanceof ue && e.selection.node.isBlock)
|
|
15387
15397
|
return !r.parentOffset || !hn(e.doc, r.pos) ? !1 : (n && n(e.tr.split(r.pos).scrollIntoView()), !0);
|
|
15388
15398
|
if (!r.depth)
|
|
15389
15399
|
return !1;
|
|
@@ -15409,7 +15419,7 @@ function S3(t) {
|
|
|
15409
15419
|
}
|
|
15410
15420
|
const C3 = S3(), O3 = (t, e) => {
|
|
15411
15421
|
let { $from: n, to: r } = t.selection, i, o = n.sharedDepth(r);
|
|
15412
|
-
return o == 0 ? !1 : (i = n.before(o), e && e(t.tr.setSelection(
|
|
15422
|
+
return o == 0 ? !1 : (i = n.before(o), e && e(t.tr.setSelection(ue.create(t.doc, i))), !0);
|
|
15413
15423
|
};
|
|
15414
15424
|
function M3(t, e, n) {
|
|
15415
15425
|
let r = e.nodeBefore, i = e.nodeAfter, o = e.index();
|
|
@@ -17074,7 +17084,7 @@ function Bl(t, { checkChildren: e = !0, ignoreWhitespace: n = !1 } = {}) {
|
|
|
17074
17084
|
return !1;
|
|
17075
17085
|
}
|
|
17076
17086
|
function JM(t) {
|
|
17077
|
-
return t instanceof
|
|
17087
|
+
return t instanceof ue;
|
|
17078
17088
|
}
|
|
17079
17089
|
function dp(t, e, n) {
|
|
17080
17090
|
const i = t.state.doc.content.size, o = fn(e, 0, i), s = fn(n, 0, i), a = t.coordsAtPos(o), l = t.coordsAtPos(s, -1), c = Math.min(a.top, l.top), u = Math.max(a.bottom, l.bottom), d = Math.min(a.left, l.left), f = Math.max(a.right, l.right), h = f - d, p = u - c, y = {
|
|
@@ -17143,7 +17153,7 @@ const ZM = (t, e = {}) => ({ tr: n, state: r, dispatch: i }) => {
|
|
|
17143
17153
|
return n.selection.$anchor.sameParent(n.selection.$head) && (s = n.selection.$anchor.parent.attrs), o.isTextblock ? i().command(({ commands: a }) => Ru(o, { ...s, ...e })(n) ? !0 : a.clearNodes()).command(({ state: a }) => Ru(o, { ...s, ...e })(a, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
17144
17154
|
}, eT = (t) => ({ tr: e, dispatch: n }) => {
|
|
17145
17155
|
if (n) {
|
|
17146
|
-
const { doc: r } = e, i = fn(t, 0, r.content.size), o =
|
|
17156
|
+
const { doc: r } = e, i = fn(t, 0, r.content.size), o = ue.create(r, i);
|
|
17147
17157
|
e.setSelection(o);
|
|
17148
17158
|
}
|
|
17149
17159
|
return !0;
|
|
@@ -17166,7 +17176,7 @@ function Uu(t, e) {
|
|
|
17166
17176
|
}
|
|
17167
17177
|
const rT = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor: i }) => {
|
|
17168
17178
|
const { selection: o, doc: s } = e, { $from: a, $to: l } = o, c = i.extensionManager.attributes, u = wo(c, a.node().type.name, a.node().attrs);
|
|
17169
|
-
if (o instanceof
|
|
17179
|
+
if (o instanceof ue && o.node.isBlock)
|
|
17170
17180
|
return !a.parentOffset || !hn(s, a.pos) ? !1 : (r && (t && Uu(n, i.extensionManager.splittableMarks), e.split(a.pos).scrollIntoView()), !0);
|
|
17171
17181
|
if (!a.parent.isBlock)
|
|
17172
17182
|
return !1;
|
|
@@ -17215,10 +17225,10 @@ const rT = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
|
|
|
17215
17225
|
const w = l.before(l.depth - (k - 1));
|
|
17216
17226
|
n.replace(w, l.after(-E), new Z(y, 4 - k, 0));
|
|
17217
17227
|
let I = -1;
|
|
17218
|
-
n.doc.nodesBetween(w, n.doc.content.size, (z,
|
|
17228
|
+
n.doc.nodesBetween(w, n.doc.content.size, (z, R) => {
|
|
17219
17229
|
if (I > -1)
|
|
17220
17230
|
return !1;
|
|
17221
|
-
z.isTextblock && z.content.size === 0 && (I =
|
|
17231
|
+
z.isTextblock && z.content.size === 0 && (I = R + 1);
|
|
17222
17232
|
}), I > -1 && n.setSelection(ye.near(n.doc.resolve(I))), n.scrollIntoView();
|
|
17223
17233
|
}
|
|
17224
17234
|
return !0;
|
|
@@ -18530,11 +18540,11 @@ function Yu(t) {
|
|
|
18530
18540
|
var w = no(n), I = "clientHeight", z = "clientWidth";
|
|
18531
18541
|
if (w === St(n) && (w = Hn(n), gn(w).position !== "static" && a === "absolute" && (I = "scrollHeight", z = "scrollWidth")), w = w, i === pt || (i === mt || i === Bt) && o === Ri) {
|
|
18532
18542
|
v = It;
|
|
18533
|
-
var
|
|
18543
|
+
var R = d && w === $ && $.visualViewport ? $.visualViewport.height : (
|
|
18534
18544
|
// $FlowFixMe[prop-missing]
|
|
18535
18545
|
w[I]
|
|
18536
18546
|
);
|
|
18537
|
-
g -=
|
|
18547
|
+
g -= R - r.height, g *= l ? 1 : -1;
|
|
18538
18548
|
}
|
|
18539
18549
|
if (i === mt || (i === pt || i === It) && o === Ri) {
|
|
18540
18550
|
E = Bt;
|
|
@@ -18762,11 +18772,11 @@ function _i(t, e) {
|
|
|
18762
18772
|
reference: w,
|
|
18763
18773
|
element: E,
|
|
18764
18774
|
placement: i
|
|
18765
|
-
}), z = Wa(Object.assign({}, E, I)),
|
|
18766
|
-
top: $.top -
|
|
18767
|
-
bottom:
|
|
18768
|
-
left: $.left -
|
|
18769
|
-
right:
|
|
18775
|
+
}), z = Wa(Object.assign({}, E, I)), R = f === ui ? z : w, L = {
|
|
18776
|
+
top: $.top - R.top + y.top,
|
|
18777
|
+
bottom: R.bottom - $.bottom + y.bottom,
|
|
18778
|
+
left: $.left - R.left + y.left,
|
|
18779
|
+
right: R.right - $.right + y.right
|
|
18770
18780
|
}, D = t.modifiersData.offset;
|
|
18771
18781
|
if (f === ui && D) {
|
|
18772
18782
|
var J = D[i];
|
|
@@ -18815,7 +18825,7 @@ function l$(t) {
|
|
|
18815
18825
|
flipVariations: p,
|
|
18816
18826
|
allowedAutoPlacements: g
|
|
18817
18827
|
}) : Y);
|
|
18818
|
-
}, []), $ = e.rects.reference, w = e.rects.popper, I = /* @__PURE__ */ new Map(), z = !0,
|
|
18828
|
+
}, []), $ = e.rects.reference, w = e.rects.popper, I = /* @__PURE__ */ new Map(), z = !0, R = v[0], L = 0; L < v.length; L++) {
|
|
18819
18829
|
var D = v[L], J = Yt(D), oe = Jr(D) === qr, _ = [pt, It].indexOf(J) >= 0, O = _ ? "width" : "height", C = _i(e, {
|
|
18820
18830
|
placement: D,
|
|
18821
18831
|
boundary: u,
|
|
@@ -18828,7 +18838,7 @@ function l$(t) {
|
|
|
18828
18838
|
if (o && ee.push(C[J] <= 0), a && ee.push(C[B] <= 0, C[j] <= 0), ee.every(function(ie) {
|
|
18829
18839
|
return ie;
|
|
18830
18840
|
})) {
|
|
18831
|
-
|
|
18841
|
+
R = D, z = !1;
|
|
18832
18842
|
break;
|
|
18833
18843
|
}
|
|
18834
18844
|
I.set(D, ee);
|
|
@@ -18843,12 +18853,12 @@ function l$(t) {
|
|
|
18843
18853
|
});
|
|
18844
18854
|
});
|
|
18845
18855
|
if (F)
|
|
18846
|
-
return
|
|
18847
|
-
},
|
|
18848
|
-
var W = N(
|
|
18856
|
+
return R = F, "break";
|
|
18857
|
+
}, V = re; V > 0; V--) {
|
|
18858
|
+
var W = N(V);
|
|
18849
18859
|
if (W === "break") break;
|
|
18850
18860
|
}
|
|
18851
|
-
e.placement !==
|
|
18861
|
+
e.placement !== R && (e.modifiersData[r]._skip = !0, e.placement = R, e.reset = !0);
|
|
18852
18862
|
}
|
|
18853
18863
|
}
|
|
18854
18864
|
const c$ = {
|
|
@@ -18949,24 +18959,24 @@ function v$(t) {
|
|
|
18949
18959
|
rootBoundary: c,
|
|
18950
18960
|
padding: d,
|
|
18951
18961
|
altBoundary: u
|
|
18952
|
-
}), y = Yt(e.placement), k = Jr(e.placement), E = !k, v = _l(y), $ = y$(v), w = e.modifiersData.popperOffsets, I = e.rects.reference, z = e.rects.popper,
|
|
18962
|
+
}), y = Yt(e.placement), k = Jr(e.placement), E = !k, v = _l(y), $ = y$(v), w = e.modifiersData.popperOffsets, I = e.rects.reference, z = e.rects.popper, R = typeof g == "function" ? g(Object.assign({}, e.rects, {
|
|
18953
18963
|
placement: e.placement
|
|
18954
|
-
})) : g, L = typeof
|
|
18955
|
-
mainAxis:
|
|
18956
|
-
altAxis:
|
|
18964
|
+
})) : g, L = typeof R == "number" ? {
|
|
18965
|
+
mainAxis: R,
|
|
18966
|
+
altAxis: R
|
|
18957
18967
|
} : Object.assign({
|
|
18958
18968
|
mainAxis: 0,
|
|
18959
18969
|
altAxis: 0
|
|
18960
|
-
},
|
|
18970
|
+
}, R), D = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, J = {
|
|
18961
18971
|
x: 0,
|
|
18962
18972
|
y: 0
|
|
18963
18973
|
};
|
|
18964
18974
|
if (w) {
|
|
18965
18975
|
if (o) {
|
|
18966
|
-
var oe, _ = v === "y" ? pt : mt, O = v === "y" ? It : Bt, C = v === "y" ? "height" : "width", B = w[v], j = B + m[_], ee = B - m[O], re = h ? -z[C] / 2 : 0, N = k === qr ? I[C] : z[C],
|
|
18976
|
+
var oe, _ = v === "y" ? pt : mt, O = v === "y" ? It : Bt, C = v === "y" ? "height" : "width", B = w[v], j = B + m[_], ee = B - m[O], re = h ? -z[C] / 2 : 0, N = k === qr ? I[C] : z[C], V = k === qr ? -z[C] : -I[C], W = e.elements.arrow, ie = h && W ? Rl(W) : {
|
|
18967
18977
|
width: 0,
|
|
18968
18978
|
height: 0
|
|
18969
|
-
}, Y = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : vp(), F = Y[_], se = Y[O], Ce = xi(0, I[C], ie[C]), me = E ? I[C] / 2 - re - Ce - F - L.mainAxis : N - Ce - F - L.mainAxis, Te = E ? -I[C] / 2 + re + Ce + se + L.mainAxis :
|
|
18979
|
+
}, Y = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : vp(), F = Y[_], se = Y[O], Ce = xi(0, I[C], ie[C]), me = E ? I[C] / 2 - re - Ce - F - L.mainAxis : N - Ce - F - L.mainAxis, Te = E ? -I[C] / 2 + re + Ce + se + L.mainAxis : V + Ce + se + L.mainAxis, De = e.elements.arrow && no(e.elements.arrow), _e = De ? v === "y" ? De.clientTop || 0 : De.clientLeft || 0 : 0, Ot = (oe = D == null ? void 0 : D[v]) != null ? oe : 0, yr = B + me - Ot - _e, yn = B + Te - Ot, vn = xi(h ? Yo(j, yr) : j, B, h ? sr(ee, yn) : ee);
|
|
18970
18980
|
w[v] = vn, J[v] = vn - B;
|
|
18971
18981
|
}
|
|
18972
18982
|
if (a) {
|
|
@@ -19123,11 +19133,11 @@ function $$(t) {
|
|
|
19123
19133
|
u.reset = !1, v = -1;
|
|
19124
19134
|
continue;
|
|
19125
19135
|
}
|
|
19126
|
-
var $ = u.orderedModifiers[v], w = $.fn, I = $.options, z = I === void 0 ? {} : I,
|
|
19136
|
+
var $ = u.orderedModifiers[v], w = $.fn, I = $.options, z = I === void 0 ? {} : I, R = $.name;
|
|
19127
19137
|
typeof w == "function" && (u = w({
|
|
19128
19138
|
state: u,
|
|
19129
19139
|
options: z,
|
|
19130
|
-
name:
|
|
19140
|
+
name: R,
|
|
19131
19141
|
instance: h
|
|
19132
19142
|
}) || u);
|
|
19133
19143
|
}
|
|
@@ -19576,7 +19586,7 @@ function i7(t, e) {
|
|
|
19576
19586
|
w.setAttribute("data-tippy-root", ""), w.id = "tippy-" + v.id, v.popper = w, t._tippy = v, w._tippy = v;
|
|
19577
19587
|
var z = k.map(function(x) {
|
|
19578
19588
|
return x.fn(v);
|
|
19579
|
-
}),
|
|
19589
|
+
}), R = t.hasAttribute("aria-expanded");
|
|
19580
19590
|
return De(), re(), B(), j("onCreate", [v]), n.showOnCreate && rn(), w.addEventListener("mouseenter", function() {
|
|
19581
19591
|
v.props.interactive && v.state.isVisible && v.clearDelayTimeouts();
|
|
19582
19592
|
}), w.addEventListener("mouseleave", function() {
|
|
@@ -19613,15 +19623,15 @@ function i7(t, e) {
|
|
|
19613
19623
|
if (te === void 0 && (te = !0), z.forEach(function(pe) {
|
|
19614
19624
|
pe[x] && pe[x].apply(pe, K);
|
|
19615
19625
|
}), te) {
|
|
19616
|
-
var
|
|
19617
|
-
(
|
|
19626
|
+
var fe;
|
|
19627
|
+
(fe = v.props)[x].apply(fe, K);
|
|
19618
19628
|
}
|
|
19619
19629
|
}
|
|
19620
19630
|
function ee() {
|
|
19621
19631
|
var x = v.props.aria;
|
|
19622
19632
|
if (x.content) {
|
|
19623
|
-
var K = "aria-" + x.content, te = w.id,
|
|
19624
|
-
|
|
19633
|
+
var K = "aria-" + x.content, te = w.id, fe = Tr(v.props.triggerTarget || t);
|
|
19634
|
+
fe.forEach(function(pe) {
|
|
19625
19635
|
var we = pe.getAttribute(K);
|
|
19626
19636
|
if (v.state.isVisible)
|
|
19627
19637
|
pe.setAttribute(K, we ? we + " " + te : te);
|
|
@@ -19633,7 +19643,7 @@ function i7(t, e) {
|
|
|
19633
19643
|
}
|
|
19634
19644
|
}
|
|
19635
19645
|
function re() {
|
|
19636
|
-
if (!(
|
|
19646
|
+
if (!(R || !v.props.aria.expanded)) {
|
|
19637
19647
|
var x = Tr(v.props.triggerTarget || t);
|
|
19638
19648
|
x.forEach(function(K) {
|
|
19639
19649
|
v.props.interactive ? K.setAttribute("aria-expanded", v.state.isVisible && K === oe() ? "true" : "false") : K.removeAttribute("aria-expanded");
|
|
@@ -19645,7 +19655,7 @@ function i7(t, e) {
|
|
|
19645
19655
|
return x !== p;
|
|
19646
19656
|
});
|
|
19647
19657
|
}
|
|
19648
|
-
function
|
|
19658
|
+
function V(x) {
|
|
19649
19659
|
if (!(qt.isTouch && (l || x.type === "mousedown"))) {
|
|
19650
19660
|
var K = x.composedPath && x.composedPath()[0] || x.target;
|
|
19651
19661
|
if (!(v.props.interactive && od(w, K))) {
|
|
@@ -19670,11 +19680,11 @@ function i7(t, e) {
|
|
|
19670
19680
|
}
|
|
19671
19681
|
function Y() {
|
|
19672
19682
|
var x = _();
|
|
19673
|
-
x.addEventListener("mousedown",
|
|
19683
|
+
x.addEventListener("mousedown", V, !0), x.addEventListener("touchend", V, Yn), x.addEventListener("touchstart", ie, Yn), x.addEventListener("touchmove", W, Yn);
|
|
19674
19684
|
}
|
|
19675
19685
|
function F() {
|
|
19676
19686
|
var x = _();
|
|
19677
|
-
x.removeEventListener("mousedown",
|
|
19687
|
+
x.removeEventListener("mousedown", V, !0), x.removeEventListener("touchend", V, Yn), x.removeEventListener("touchstart", ie, Yn), x.removeEventListener("touchmove", W, Yn);
|
|
19678
19688
|
}
|
|
19679
19689
|
function se(x, K) {
|
|
19680
19690
|
me(x, function() {
|
|
@@ -19686,17 +19696,17 @@ function i7(t, e) {
|
|
|
19686
19696
|
}
|
|
19687
19697
|
function me(x, K) {
|
|
19688
19698
|
var te = O().box;
|
|
19689
|
-
function
|
|
19690
|
-
pe.target === te && (Zs(te, "remove",
|
|
19699
|
+
function fe(pe) {
|
|
19700
|
+
pe.target === te && (Zs(te, "remove", fe), K());
|
|
19691
19701
|
}
|
|
19692
19702
|
if (x === 0)
|
|
19693
19703
|
return K();
|
|
19694
|
-
Zs(te, "remove", d), Zs(te, "add",
|
|
19704
|
+
Zs(te, "remove", d), Zs(te, "add", fe), d = fe;
|
|
19695
19705
|
}
|
|
19696
19706
|
function Te(x, K, te) {
|
|
19697
19707
|
te === void 0 && (te = !1);
|
|
19698
|
-
var
|
|
19699
|
-
|
|
19708
|
+
var fe = Tr(v.props.triggerTarget || t);
|
|
19709
|
+
fe.forEach(function(pe) {
|
|
19700
19710
|
pe.addEventListener(x, K, te), h.push({
|
|
19701
19711
|
node: pe,
|
|
19702
19712
|
eventType: x,
|
|
@@ -19727,23 +19737,23 @@ function i7(t, e) {
|
|
|
19727
19737
|
}
|
|
19728
19738
|
function _e() {
|
|
19729
19739
|
h.forEach(function(x) {
|
|
19730
|
-
var K = x.node, te = x.eventType,
|
|
19731
|
-
K.removeEventListener(te,
|
|
19740
|
+
var K = x.node, te = x.eventType, fe = x.handler, pe = x.options;
|
|
19741
|
+
K.removeEventListener(te, fe, pe);
|
|
19732
19742
|
}), h = [];
|
|
19733
19743
|
}
|
|
19734
19744
|
function Ot(x) {
|
|
19735
19745
|
var K, te = !1;
|
|
19736
19746
|
if (!(!v.state.isEnabled || nn(x) || a)) {
|
|
19737
|
-
var
|
|
19747
|
+
var fe = ((K = u) == null ? void 0 : K.type) === "focus";
|
|
19738
19748
|
u = x, g = x.currentTarget, re(), !v.state.isVisible && _$(x) && go.forEach(function(pe) {
|
|
19739
19749
|
return pe(x);
|
|
19740
|
-
}), x.type === "click" && (v.props.trigger.indexOf("mouseenter") < 0 || s) && v.props.hideOnClick !== !1 && v.state.isVisible ? te = !0 : rn(x), x.type === "click" && (s = !te), te && !
|
|
19750
|
+
}), x.type === "click" && (v.props.trigger.indexOf("mouseenter") < 0 || s) && v.props.hideOnClick !== !1 && v.state.isVisible ? te = !0 : rn(x), x.type === "click" && (s = !te), te && !fe && Ht(x);
|
|
19741
19751
|
}
|
|
19742
19752
|
}
|
|
19743
19753
|
function yr(x) {
|
|
19744
19754
|
var K = x.target, te = oe().contains(K) || w.contains(K);
|
|
19745
19755
|
if (!(x.type === "mousemove" && te)) {
|
|
19746
|
-
var
|
|
19756
|
+
var fe = Ft().concat(w).map(function(pe) {
|
|
19747
19757
|
var we, Ae = pe._tippy, Re = (we = Ae.popperInstance) == null ? void 0 : we.state;
|
|
19748
19758
|
return Re ? {
|
|
19749
19759
|
popperRect: pe.getBoundingClientRect(),
|
|
@@ -19751,7 +19761,7 @@ function i7(t, e) {
|
|
|
19751
19761
|
props: n
|
|
19752
19762
|
} : null;
|
|
19753
19763
|
}).filter(Boolean);
|
|
19754
|
-
H$(
|
|
19764
|
+
H$(fe, x) && (N(), Ht(x));
|
|
19755
19765
|
}
|
|
19756
19766
|
}
|
|
19757
19767
|
function yn(x) {
|
|
@@ -19772,7 +19782,7 @@ function i7(t, e) {
|
|
|
19772
19782
|
}
|
|
19773
19783
|
function Pt() {
|
|
19774
19784
|
Mt();
|
|
19775
|
-
var x = v.props, K = x.popperOptions, te = x.placement,
|
|
19785
|
+
var x = v.props, K = x.popperOptions, te = x.placement, fe = x.offset, pe = x.getReferenceClientRect, we = x.moveTransition, Ae = J() ? Ka(w).arrow : null, Re = pe ? {
|
|
19776
19786
|
getBoundingClientRect: pe,
|
|
19777
19787
|
contextElement: pe.contextElement || oe()
|
|
19778
19788
|
} : t, ot = {
|
|
@@ -19792,7 +19802,7 @@ function i7(t, e) {
|
|
|
19792
19802
|
}, yt = [{
|
|
19793
19803
|
name: "offset",
|
|
19794
19804
|
options: {
|
|
19795
|
-
offset:
|
|
19805
|
+
offset: fe
|
|
19796
19806
|
}
|
|
19797
19807
|
}, {
|
|
19798
19808
|
name: "preventOverflow",
|
|
@@ -19845,8 +19855,8 @@ function i7(t, e) {
|
|
|
19845
19855
|
}
|
|
19846
19856
|
function rn(x) {
|
|
19847
19857
|
v.clearDelayTimeouts(), x && j("onTrigger", [v, x]), Y();
|
|
19848
|
-
var K = C(!0), te = L(),
|
|
19849
|
-
qt.isTouch &&
|
|
19858
|
+
var K = C(!0), te = L(), fe = te[0], pe = te[1];
|
|
19859
|
+
qt.isTouch && fe === "hold" && pe && (K = pe), K ? r = setTimeout(function() {
|
|
19850
19860
|
v.show();
|
|
19851
19861
|
}, K) : v.show();
|
|
19852
19862
|
}
|
|
@@ -19879,10 +19889,10 @@ function i7(t, e) {
|
|
|
19879
19889
|
var K = v.props, te = ld(t, Object.assign({}, K, rd(x), {
|
|
19880
19890
|
ignoreAttributes: !0
|
|
19881
19891
|
}));
|
|
19882
|
-
v.props = te, De(), K.interactiveDebounce !== te.interactiveDebounce && (N(), p = td(yr, te.interactiveDebounce)), K.triggerTarget && !te.triggerTarget ? Tr(K.triggerTarget).forEach(function(
|
|
19883
|
-
|
|
19884
|
-
}) : te.triggerTarget && t.removeAttribute("aria-expanded"), re(), B(), I && I(K, te), v.popperInstance && (Pt(), Ft().forEach(function(
|
|
19885
|
-
requestAnimationFrame(
|
|
19892
|
+
v.props = te, De(), K.interactiveDebounce !== te.interactiveDebounce && (N(), p = td(yr, te.interactiveDebounce)), K.triggerTarget && !te.triggerTarget ? Tr(K.triggerTarget).forEach(function(fe) {
|
|
19893
|
+
fe.removeAttribute("aria-expanded");
|
|
19894
|
+
}) : te.triggerTarget && t.removeAttribute("aria-expanded"), re(), B(), I && I(K, te), v.popperInstance && (Pt(), Ft().forEach(function(fe) {
|
|
19895
|
+
requestAnimationFrame(fe._tippy.popperInstance.forceUpdate);
|
|
19886
19896
|
})), j("onAfterUpdate", [v, x]);
|
|
19887
19897
|
}
|
|
19888
19898
|
}
|
|
@@ -19893,8 +19903,8 @@ function i7(t, e) {
|
|
|
19893
19903
|
}
|
|
19894
19904
|
function T() {
|
|
19895
19905
|
process.env.NODE_ENV !== "production" && ln(v.state.isDestroyed, Cr("show"));
|
|
19896
|
-
var x = v.state.isVisible, K = v.state.isDestroyed, te = !v.state.isEnabled,
|
|
19897
|
-
if (!(x || K || te ||
|
|
19906
|
+
var x = v.state.isVisible, K = v.state.isDestroyed, te = !v.state.isEnabled, fe = qt.isTouch && !v.props.touch, pe = Js(v.props.duration, 0, bt.duration);
|
|
19907
|
+
if (!(x || K || te || fe) && !oe().hasAttribute("disabled") && (j("onShow", [v], !1), v.props.onShow(v) !== !1)) {
|
|
19898
19908
|
if (v.state.isVisible = !0, J() && (w.style.visibility = "visible"), B(), Y(), v.state.isMounted || (w.style.transition = "none"), J()) {
|
|
19899
19909
|
var we = O(), Ae = we.box, Re = we.content;
|
|
19900
19910
|
Gs([Ae, Re], 0);
|
|
@@ -19915,13 +19925,13 @@ function i7(t, e) {
|
|
|
19915
19925
|
}
|
|
19916
19926
|
function M() {
|
|
19917
19927
|
process.env.NODE_ENV !== "production" && ln(v.state.isDestroyed, Cr("hide"));
|
|
19918
|
-
var x = !v.state.isVisible, K = v.state.isDestroyed, te = !v.state.isEnabled,
|
|
19928
|
+
var x = !v.state.isVisible, K = v.state.isDestroyed, te = !v.state.isEnabled, fe = Js(v.props.duration, 1, bt.duration);
|
|
19919
19929
|
if (!(x || K || te) && (j("onHide", [v], !1), v.props.onHide(v) !== !1)) {
|
|
19920
19930
|
if (v.state.isVisible = !1, v.state.isShown = !1, c = !1, s = !1, J() && (w.style.visibility = "hidden"), N(), F(), B(!0), J()) {
|
|
19921
19931
|
var pe = O(), we = pe.box, Ae = pe.content;
|
|
19922
|
-
v.props.animation && (Gs([we, Ae],
|
|
19932
|
+
v.props.animation && (Gs([we, Ae], fe), id([we, Ae], "hidden"));
|
|
19923
19933
|
}
|
|
19924
|
-
ee(), re(), v.props.animation ? J() && se(
|
|
19934
|
+
ee(), re(), v.props.animation ? J() && se(fe, v.unmount) : v.unmount();
|
|
19925
19935
|
}
|
|
19926
19936
|
}
|
|
19927
19937
|
function H(x) {
|
|
@@ -20291,7 +20301,7 @@ const l7 = Rn({
|
|
|
20291
20301
|
r && r.options.element && e.value && nt(() => {
|
|
20292
20302
|
if (!e.value || !r.options.element.firstChild)
|
|
20293
20303
|
return;
|
|
20294
|
-
const i =
|
|
20304
|
+
const i = P(e.value);
|
|
20295
20305
|
e.value.append(...r.options.element.childNodes), r.contentComponent = n.ctx._, r.setOptions({
|
|
20296
20306
|
element: i
|
|
20297
20307
|
}), r.createNodeViews();
|
|
@@ -20959,7 +20969,7 @@ class Be extends ke {
|
|
|
20959
20969
|
for (; ; ) {
|
|
20960
20970
|
let s = n > 0 ? o.firstChild : o.lastChild;
|
|
20961
20971
|
if (!s) {
|
|
20962
|
-
if (o.isAtom && !o.isText && !
|
|
20972
|
+
if (o.isAtom && !o.isText && !ue.isSelectable(o)) {
|
|
20963
20973
|
e = e.doc.resolve(i + o.nodeSize * n), r = !1;
|
|
20964
20974
|
continue e;
|
|
20965
20975
|
}
|
|
@@ -21062,7 +21072,7 @@ function L7(t, e, n) {
|
|
|
21062
21072
|
if (!Be.valid(r))
|
|
21063
21073
|
return !1;
|
|
21064
21074
|
let i = t.posAtCoords({ left: n.clientX, top: n.clientY });
|
|
21065
|
-
return i && i.inside > -1 &&
|
|
21075
|
+
return i && i.inside > -1 && ue.isSelectable(t.state.doc.nodeAt(i.inside)) ? !1 : (t.dispatch(t.state.tr.setSelection(new Be(r))), !0);
|
|
21066
21076
|
}
|
|
21067
21077
|
function I7(t, e) {
|
|
21068
21078
|
if (e.inputType != "insertCompositionText" || !(t.state.selection instanceof Be))
|
|
@@ -21587,7 +21597,7 @@ const Rp = Vp(!1, !0), _p = Vp(!0, !0), Y7 = He.create({
|
|
|
21587
21597
|
if (o) {
|
|
21588
21598
|
const { $to: a } = i.selection, l = a.end();
|
|
21589
21599
|
if (a.nodeAfter)
|
|
21590
|
-
a.nodeAfter.isTextblock ? i.setSelection(ye.create(i.doc, a.pos + 1)) : a.nodeAfter.isBlock ? i.setSelection(
|
|
21600
|
+
a.nodeAfter.isTextblock ? i.setSelection(ye.create(i.doc, a.pos + 1)) : a.nodeAfter.isBlock ? i.setSelection(ue.create(i.doc, a.pos)) : i.setSelection(ye.create(i.doc, a.pos));
|
|
21591
21601
|
else {
|
|
21592
21602
|
const c = (s = a.parent.type.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.create();
|
|
21593
21603
|
c && (i.insert(l, c), i.setSelection(ye.create(i.doc, l + 1)));
|
|
@@ -22487,9 +22497,9 @@ const f4 = /* @__PURE__ */ ve(o4, [["render", d4]]), h4 = { class: "py-1 px-1 bo
|
|
|
22487
22497
|
};
|
|
22488
22498
|
return (p, g) => {
|
|
22489
22499
|
var m;
|
|
22490
|
-
return
|
|
22500
|
+
return P(c) ? (b(), S("div", {
|
|
22491
22501
|
key: 0,
|
|
22492
|
-
class: G(["pt-px relative flex flex-col rounded-sm border", s[
|
|
22502
|
+
class: G(["pt-px relative flex flex-col rounded-sm border", s[P(ce).theme]])
|
|
22493
22503
|
}, [
|
|
22494
22504
|
A("div", h4, [
|
|
22495
22505
|
A("div", p4, [
|
|
@@ -22519,14 +22529,14 @@ const f4 = /* @__PURE__ */ ve(o4, [["render", d4]]), h4 = { class: "py-1 px-1 bo
|
|
|
22519
22529
|
key: y.method,
|
|
22520
22530
|
class: G(["w-8 h-8 flex items-center justify-center text-xs rounded-sm text-gray-800 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-white/10", {
|
|
22521
22531
|
"cursor-pointer": !d(y.method, y.type, y.params, y.disableCheck),
|
|
22522
|
-
"is-active text-gray-800 bg-gray-200 dark:text-white dark:bg-white/10": y.label.startsWith("h") ?
|
|
22532
|
+
"is-active text-gray-800 bg-gray-200 dark:text-white dark:bg-white/10": y.label.startsWith("h") ? P(c).isActive("heading", { level: y.params.level }) : y.method === "setTextAlign" ? P(c).isActive({ textAlign: y.params }) : P(c).isActive(y.label)
|
|
22523
22533
|
}]),
|
|
22524
22534
|
onClick: (k) => u(y.method, y.type, y.params)
|
|
22525
22535
|
}, [
|
|
22526
22536
|
y.icon ? (b(), ge(Gr(y.icon), {
|
|
22527
22537
|
key: 0,
|
|
22528
22538
|
class: G(["", { "w-3 h-3": y.smallIcon, "w-4 h-4": !y.smallIcon && !y.largeIcon, "w-5 h-5": y.largeIcon }])
|
|
22529
|
-
}, null, 8, ["class"])) : (b(), S("span", g4, be(
|
|
22539
|
+
}, null, 8, ["class"])) : (b(), S("span", g4, be(P(T0).capitalize(y.label)), 1))
|
|
22530
22540
|
], 10, m4))), 128))
|
|
22531
22541
|
])
|
|
22532
22542
|
]),
|
|
@@ -22536,7 +22546,7 @@ const f4 = /* @__PURE__ */ ve(o4, [["render", d4]]), h4 = { class: "py-1 px-1 bo
|
|
|
22536
22546
|
backgroundColor: (m = t.customStyles) == null ? void 0 : m.backgroundColor
|
|
22537
22547
|
})
|
|
22538
22548
|
}, [
|
|
22539
|
-
le(
|
|
22549
|
+
le(P(l7), { editor: P(c) }, null, 8, ["editor"])
|
|
22540
22550
|
], 4)
|
|
22541
22551
|
], 2)) : Q("", !0);
|
|
22542
22552
|
};
|
|
@@ -22702,17 +22712,17 @@ const R4 = /* @__PURE__ */ ve(D4, [["render", V4]]), _4 = {
|
|
|
22702
22712
|
}, [
|
|
22703
22713
|
A("div", {
|
|
22704
22714
|
class: G(["h-8 w-full flex justify-center items-center", {
|
|
22705
|
-
[`${r[
|
|
22706
|
-
[`${i[
|
|
22707
|
-
[`${o[
|
|
22708
|
-
[`${s[
|
|
22715
|
+
[`${r[P(ce).theme]}`]: t.between,
|
|
22716
|
+
[`${i[P(ce).theme]}`]: t.firstDay,
|
|
22717
|
+
[`${o[P(ce).theme]}`]: t.lastDay,
|
|
22718
|
+
[`${s[P(ce).theme]}`]: t.highlight
|
|
22709
22719
|
}]),
|
|
22710
22720
|
style: un({ marginLeft: t.firstDay ? "50%" : void 0, marginRight: t.lastDay ? "50%" : void 0 })
|
|
22711
22721
|
}, [
|
|
22712
22722
|
A("span", {
|
|
22713
22723
|
class: G(["absolute w-8 h-8 flex items-center justify-center dark:text-gray-400", {
|
|
22714
|
-
[`${e[
|
|
22715
|
-
[`${n[
|
|
22724
|
+
[`${e[P(ce).theme]}`]: !0,
|
|
22725
|
+
[`${n[P(ce).theme]}`]: t.highlight && (t.firstDay || t.lastDay)
|
|
22716
22726
|
}]),
|
|
22717
22727
|
style: { left: "50%", transform: "translateX(-50%)" }
|
|
22718
22728
|
}, [
|
|
@@ -22752,7 +22762,7 @@ var jp = { exports: {} };
|
|
|
22752
22762
|
w[$] = k;
|
|
22753
22763
|
var I = "$isDayjsObject", z = function(_) {
|
|
22754
22764
|
return _ instanceof J || !(!_ || !_[I]);
|
|
22755
|
-
},
|
|
22765
|
+
}, R = function _(O, C, B) {
|
|
22756
22766
|
var j;
|
|
22757
22767
|
if (!O) return $;
|
|
22758
22768
|
if (typeof O == "string") {
|
|
@@ -22770,12 +22780,12 @@ var jp = { exports: {} };
|
|
|
22770
22780
|
var C = typeof O == "object" ? O : {};
|
|
22771
22781
|
return C.date = _, C.args = arguments, new J(C);
|
|
22772
22782
|
}, D = v;
|
|
22773
|
-
D.l =
|
|
22783
|
+
D.l = R, D.i = z, D.w = function(_, O) {
|
|
22774
22784
|
return L(_, { locale: O.$L, utc: O.$u, x: O.$x, $offset: O.$offset });
|
|
22775
22785
|
};
|
|
22776
22786
|
var J = function() {
|
|
22777
22787
|
function _(C) {
|
|
22778
|
-
this.$L =
|
|
22788
|
+
this.$L = R(C.locale, null, !0), this.parse(C), this.$x = this.$x || C.x || {}, this[I] = !0;
|
|
22779
22789
|
}
|
|
22780
22790
|
var O = _.prototype;
|
|
22781
22791
|
return O.parse = function(C) {
|
|
@@ -22787,8 +22797,8 @@ var jp = { exports: {} };
|
|
|
22787
22797
|
if (typeof j == "string" && !/Z$/i.test(j)) {
|
|
22788
22798
|
var re = j.match(m);
|
|
22789
22799
|
if (re) {
|
|
22790
|
-
var N = re[2] - 1 || 0,
|
|
22791
|
-
return ee ? new Date(Date.UTC(re[1], N, re[3] || 1, re[4] || 0, re[5] || 0, re[6] || 0,
|
|
22800
|
+
var N = re[2] - 1 || 0, V = (re[7] || "0").substring(0, 3);
|
|
22801
|
+
return ee ? new Date(Date.UTC(re[1], N, re[3] || 1, re[4] || 0, re[5] || 0, re[6] || 0, V)) : new Date(re[1], N, re[3] || 1, re[4] || 0, re[5] || 0, re[6] || 0, V);
|
|
22792
22802
|
}
|
|
22793
22803
|
}
|
|
22794
22804
|
return new Date(j);
|
|
@@ -22817,7 +22827,7 @@ var jp = { exports: {} };
|
|
|
22817
22827
|
var j = this, ee = !!D.u(B) || B, re = D.p(C), N = function(me, Te) {
|
|
22818
22828
|
var De = D.w(j.$u ? Date.UTC(j.$y, Te, me) : new Date(j.$y, Te, me), j);
|
|
22819
22829
|
return ee ? De : De.endOf(c);
|
|
22820
|
-
},
|
|
22830
|
+
}, V = function(me, Te) {
|
|
22821
22831
|
return D.w(j.toDate()[me].apply(j.toDate("s"), (ee ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Te)), j);
|
|
22822
22832
|
}, W = this.$W, ie = this.$M, Y = this.$D, F = "set" + (this.$u ? "UTC" : "");
|
|
22823
22833
|
switch (re) {
|
|
@@ -22830,24 +22840,24 @@ var jp = { exports: {} };
|
|
|
22830
22840
|
return N(ee ? Y - Ce : Y + (6 - Ce), ie);
|
|
22831
22841
|
case c:
|
|
22832
22842
|
case p:
|
|
22833
|
-
return
|
|
22843
|
+
return V(F + "Hours", 0);
|
|
22834
22844
|
case l:
|
|
22835
|
-
return
|
|
22845
|
+
return V(F + "Minutes", 1);
|
|
22836
22846
|
case a:
|
|
22837
|
-
return
|
|
22847
|
+
return V(F + "Seconds", 2);
|
|
22838
22848
|
case s:
|
|
22839
|
-
return
|
|
22849
|
+
return V(F + "Milliseconds", 3);
|
|
22840
22850
|
default:
|
|
22841
22851
|
return this.clone();
|
|
22842
22852
|
}
|
|
22843
22853
|
}, O.endOf = function(C) {
|
|
22844
22854
|
return this.startOf(C, !1);
|
|
22845
22855
|
}, O.$set = function(C, B) {
|
|
22846
|
-
var j, ee = D.p(C), re = "set" + (this.$u ? "UTC" : ""), N = (j = {}, j[c] = re + "Date", j[p] = re + "Date", j[d] = re + "Month", j[h] = re + "FullYear", j[l] = re + "Hours", j[a] = re + "Minutes", j[s] = re + "Seconds", j[o] = re + "Milliseconds", j)[ee],
|
|
22856
|
+
var j, ee = D.p(C), re = "set" + (this.$u ? "UTC" : ""), N = (j = {}, j[c] = re + "Date", j[p] = re + "Date", j[d] = re + "Month", j[h] = re + "FullYear", j[l] = re + "Hours", j[a] = re + "Minutes", j[s] = re + "Seconds", j[o] = re + "Milliseconds", j)[ee], V = ee === c ? this.$D + (B - this.$W) : B;
|
|
22847
22857
|
if (ee === d || ee === h) {
|
|
22848
22858
|
var W = this.clone().set(p, 1);
|
|
22849
|
-
W.$d[N](
|
|
22850
|
-
} else N && this.$d[N](
|
|
22859
|
+
W.$d[N](V), W.init(), this.$d = W.set(p, Math.min(this.$D, W.daysInMonth())).$d;
|
|
22860
|
+
} else N && this.$d[N](V);
|
|
22851
22861
|
return this.init(), this;
|
|
22852
22862
|
}, O.set = function(C, B) {
|
|
22853
22863
|
return this.clone().$set(C, B);
|
|
@@ -22864,14 +22874,14 @@ var jp = { exports: {} };
|
|
|
22864
22874
|
if (re === h) return this.set(h, this.$y + C);
|
|
22865
22875
|
if (re === c) return N(1);
|
|
22866
22876
|
if (re === u) return N(7);
|
|
22867
|
-
var
|
|
22877
|
+
var V = (j = {}, j[a] = r, j[l] = i, j[s] = n, j)[re] || 1, W = this.$d.getTime() + C * V;
|
|
22868
22878
|
return D.w(W, this);
|
|
22869
22879
|
}, O.subtract = function(C, B) {
|
|
22870
22880
|
return this.add(-1 * C, B);
|
|
22871
22881
|
}, O.format = function(C) {
|
|
22872
22882
|
var B = this, j = this.$locale();
|
|
22873
22883
|
if (!this.isValid()) return j.invalidDate || g;
|
|
22874
|
-
var ee = C || "YYYY-MM-DDTHH:mm:ssZ", re = D.z(this), N = this.$H,
|
|
22884
|
+
var ee = C || "YYYY-MM-DDTHH:mm:ssZ", re = D.z(this), N = this.$H, V = this.$m, W = this.$M, ie = j.weekdays, Y = j.months, F = j.meridiem, se = function(Te, De, _e, Ot) {
|
|
22875
22885
|
return Te && (Te[De] || Te(B, ee)) || _e[De].slice(0, Ot);
|
|
22876
22886
|
}, Ce = function(Te) {
|
|
22877
22887
|
return D.s(N % 12 || 12, Te, "0");
|
|
@@ -22915,13 +22925,13 @@ var jp = { exports: {} };
|
|
|
22915
22925
|
case "hh":
|
|
22916
22926
|
return Ce(2);
|
|
22917
22927
|
case "a":
|
|
22918
|
-
return me(N,
|
|
22928
|
+
return me(N, V, !0);
|
|
22919
22929
|
case "A":
|
|
22920
|
-
return me(N,
|
|
22930
|
+
return me(N, V, !1);
|
|
22921
22931
|
case "m":
|
|
22922
|
-
return String(
|
|
22932
|
+
return String(V);
|
|
22923
22933
|
case "mm":
|
|
22924
|
-
return D.s(
|
|
22934
|
+
return D.s(V, 2, "0");
|
|
22925
22935
|
case "s":
|
|
22926
22936
|
return String(B.$s);
|
|
22927
22937
|
case "ss":
|
|
@@ -22937,8 +22947,8 @@ var jp = { exports: {} };
|
|
|
22937
22947
|
}, O.utcOffset = function() {
|
|
22938
22948
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
22939
22949
|
}, O.diff = function(C, B, j) {
|
|
22940
|
-
var ee, re = this, N = D.p(B),
|
|
22941
|
-
return D.m(re,
|
|
22950
|
+
var ee, re = this, N = D.p(B), V = L(C), W = (V.utcOffset() - this.utcOffset()) * r, ie = this - V, Y = function() {
|
|
22951
|
+
return D.m(re, V);
|
|
22942
22952
|
};
|
|
22943
22953
|
switch (N) {
|
|
22944
22954
|
case h:
|
|
@@ -22975,7 +22985,7 @@ var jp = { exports: {} };
|
|
|
22975
22985
|
return w[this.$L];
|
|
22976
22986
|
}, O.locale = function(C, B) {
|
|
22977
22987
|
if (!C) return this.$L;
|
|
22978
|
-
var j = this.clone(), ee =
|
|
22988
|
+
var j = this.clone(), ee = R(C, B, !0);
|
|
22979
22989
|
return ee && (j.$L = ee), j;
|
|
22980
22990
|
}, O.clone = function() {
|
|
22981
22991
|
return D.w(this.$d, this);
|
|
@@ -22995,7 +23005,7 @@ var jp = { exports: {} };
|
|
|
22995
23005
|
};
|
|
22996
23006
|
}), L.extend = function(_, O) {
|
|
22997
23007
|
return _.$i || (_(O, J, L), _.$i = !0), L;
|
|
22998
|
-
}, L.locale =
|
|
23008
|
+
}, L.locale = R, L.isDayjs = z, L.unix = function(_) {
|
|
22999
23009
|
return L(1e3 * _);
|
|
23000
23010
|
}, L.en = w[$], L.Ls = w, L.p = {}, L;
|
|
23001
23011
|
});
|
|
@@ -23076,36 +23086,36 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23076
23086
|
else if (!n.range && !n.initDates)
|
|
23077
23087
|
r.value[0] = U(/* @__PURE__ */ new Date());
|
|
23078
23088
|
else if (n.range && ((N = n.initDates) == null ? void 0 : N.length) === 2) {
|
|
23079
|
-
let
|
|
23080
|
-
W.isBefore(
|
|
23089
|
+
let V = U(n.initDates[0]), W = U(n.initDates[1]);
|
|
23090
|
+
W.isBefore(V, "month") && (W = V.add(1, "month")), V.isSame(W, "month") && (W = V.add(1, "month")), r.value = [V, W];
|
|
23081
23091
|
}
|
|
23082
23092
|
}, { immediate: !0, once: !0 }), Pe(
|
|
23083
23093
|
() => [n.displayYearStart, n.displayMonthStart],
|
|
23084
|
-
([N,
|
|
23085
|
-
N &&
|
|
23094
|
+
([N, V]) => {
|
|
23095
|
+
N && V && (r.value[0] = U().year(Number(N)).month(Number(V)).startOf("month"), r.value[1] = U().year(Number(N)).month(Number(V)).startOf("month").add(1, "month"));
|
|
23086
23096
|
},
|
|
23087
23097
|
{ immediate: !0 }
|
|
23088
23098
|
), Pe(
|
|
23089
23099
|
() => [n.displayYearEnd, n.displayMonthEnd],
|
|
23090
|
-
([N,
|
|
23091
|
-
if (N &&
|
|
23092
|
-
const W = r.value[0], ie = U().year(Number(N)).month(Number(
|
|
23100
|
+
([N, V]) => {
|
|
23101
|
+
if (N && V) {
|
|
23102
|
+
const W = r.value[0], ie = U().year(Number(N)).month(Number(V)).startOf("month");
|
|
23093
23103
|
ie.isAfter(W, "month") && (r.value[1] = ie);
|
|
23094
23104
|
}
|
|
23095
23105
|
},
|
|
23096
23106
|
{ immediate: !0 }
|
|
23097
23107
|
);
|
|
23098
|
-
const i = e, o =
|
|
23108
|
+
const i = e, o = de(() => n.doubleMonths || n.range ? [0, 1] : [0]);
|
|
23099
23109
|
function s(N) {
|
|
23100
23110
|
if (n.week)
|
|
23101
23111
|
i("update:modelValue", [U(N).startOf("week"), U(N).endOf("week")]);
|
|
23102
23112
|
else if (n.range) {
|
|
23103
|
-
const
|
|
23104
|
-
if (
|
|
23113
|
+
const V = n.modelValue.filter((W) => W).length;
|
|
23114
|
+
if (V == 0)
|
|
23105
23115
|
i("update:modelValue", [N]);
|
|
23106
|
-
else if (
|
|
23116
|
+
else if (V == 2)
|
|
23107
23117
|
i("update:modelValue", [N]);
|
|
23108
|
-
else if (
|
|
23118
|
+
else if (V == 1) {
|
|
23109
23119
|
let W = [U(n.modelValue[0]), U(N)];
|
|
23110
23120
|
W = W.sort((ie, Y) => ie - Y), i("update:modelValue", W);
|
|
23111
23121
|
}
|
|
@@ -23113,8 +23123,8 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23113
23123
|
i("update:modelValue", U(N));
|
|
23114
23124
|
}
|
|
23115
23125
|
function a(N) {
|
|
23116
|
-
const
|
|
23117
|
-
for (let Y = 1; Y <=
|
|
23126
|
+
const V = U(N).daysInMonth(), W = [], ie = U(N).startOf("month");
|
|
23127
|
+
for (let Y = 1; Y <= V; Y++) {
|
|
23118
23128
|
let F = ie.clone().date(Y);
|
|
23119
23129
|
W.push(F);
|
|
23120
23130
|
}
|
|
@@ -23123,26 +23133,26 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23123
23133
|
function l(N) {
|
|
23124
23134
|
return U(N).startOf("month").day();
|
|
23125
23135
|
}
|
|
23126
|
-
function c(N,
|
|
23127
|
-
const W = U(`${N}-${
|
|
23136
|
+
function c(N, V) {
|
|
23137
|
+
const W = U(`${N}-${V}-01`, "YYYY-MM-DD"), Y = W.day(), F = [];
|
|
23128
23138
|
for (let se = 0; se < Y; se++)
|
|
23129
23139
|
F.push(W.clone().subtract(Y - se, "days"));
|
|
23130
23140
|
return F;
|
|
23131
23141
|
}
|
|
23132
|
-
function u(N,
|
|
23133
|
-
const W = U(`${N}-${
|
|
23142
|
+
function u(N, V) {
|
|
23143
|
+
const W = U(`${N}-${V}`, "YYYY-MM").endOf("month"), Y = 6 - W.day(), F = [];
|
|
23134
23144
|
for (let se = 1; se <= Y; se++)
|
|
23135
23145
|
F.push(W.clone().add(se, "days"));
|
|
23136
23146
|
return F;
|
|
23137
23147
|
}
|
|
23138
23148
|
function d(N) {
|
|
23139
|
-
const
|
|
23140
|
-
return U(N).isSame(
|
|
23149
|
+
const V = U();
|
|
23150
|
+
return U(N).isSame(V, "day");
|
|
23141
23151
|
}
|
|
23142
23152
|
function f(N) {
|
|
23143
|
-
var
|
|
23153
|
+
var V, W;
|
|
23144
23154
|
if (n.range) {
|
|
23145
|
-
if (((
|
|
23155
|
+
if (((V = n.modelValue) == null ? void 0 : V.length) == 1)
|
|
23146
23156
|
return U(N).isSame(U(n.modelValue[0]), "day");
|
|
23147
23157
|
if (((W = n.modelValue) == null ? void 0 : W.length) == 2)
|
|
23148
23158
|
return U(N).isSame(U(n.modelValue[0]), "day") || U(N).isSame(U(n.modelValue[1]), "day");
|
|
@@ -23150,32 +23160,32 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23150
23160
|
return U(N).isSame(U(n.modelValue), "day");
|
|
23151
23161
|
}
|
|
23152
23162
|
function h(N) {
|
|
23153
|
-
var
|
|
23154
|
-
if (n.range && ((
|
|
23163
|
+
var V;
|
|
23164
|
+
if (n.range && ((V = n.modelValue) == null ? void 0 : V.length) == 2)
|
|
23155
23165
|
return U(N).isBetween(U(n.modelValue[0]), U(n.modelValue[1]));
|
|
23156
23166
|
}
|
|
23157
23167
|
function p(N) {
|
|
23158
|
-
var
|
|
23159
|
-
if (n.range && ((
|
|
23168
|
+
var V;
|
|
23169
|
+
if (n.range && ((V = n.modelValue) == null ? void 0 : V.length) == 2)
|
|
23160
23170
|
return U(N).isSame(U(n.modelValue[0]), "day");
|
|
23161
23171
|
}
|
|
23162
23172
|
function g(N) {
|
|
23163
|
-
var
|
|
23164
|
-
if (n.range && ((
|
|
23173
|
+
var V;
|
|
23174
|
+
if (n.range && ((V = n.modelValue) == null ? void 0 : V.length) == 2)
|
|
23165
23175
|
return U(N).isSame(U(n.modelValue[1]), "day");
|
|
23166
23176
|
}
|
|
23167
23177
|
function m(N) {
|
|
23168
23178
|
try {
|
|
23169
23179
|
return n.minDate ? U(N).isBefore(U(n.minDate)) : !1;
|
|
23170
|
-
} catch (
|
|
23171
|
-
return console.log(
|
|
23180
|
+
} catch (V) {
|
|
23181
|
+
return console.log(V), !1;
|
|
23172
23182
|
}
|
|
23173
23183
|
}
|
|
23174
23184
|
function y(N) {
|
|
23175
23185
|
try {
|
|
23176
23186
|
return n.maxDate ? U(N).isAfter(U(n.maxDate)) : !1;
|
|
23177
|
-
} catch (
|
|
23178
|
-
return console.log(
|
|
23187
|
+
} catch (V) {
|
|
23188
|
+
return console.log(V), !1;
|
|
23179
23189
|
}
|
|
23180
23190
|
}
|
|
23181
23191
|
function k(N) {
|
|
@@ -23190,16 +23200,16 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23190
23200
|
function $(N) {
|
|
23191
23201
|
L(N, r.value[N].add(1, "year"));
|
|
23192
23202
|
}
|
|
23193
|
-
const w = (N) => N === 0 ? !0 : r.value[N].subtract(1, "month").isAfter(r.value[0], "month"), I = (N) => N === 1 ? !0 : r.value[N].add(1, "month").isBefore(r.value[1], "month"), z = (N) => N === 0 ? !0 : r.value[N].subtract(1, "year").isAfter(r.value[0], "year"),
|
|
23194
|
-
function L(N,
|
|
23203
|
+
const w = (N) => N === 0 ? !0 : r.value[N].subtract(1, "month").isAfter(r.value[0], "month"), I = (N) => N === 1 ? !0 : r.value[N].add(1, "month").isBefore(r.value[1], "month"), z = (N) => N === 0 ? !0 : r.value[N].subtract(1, "year").isAfter(r.value[0], "year"), R = (N) => N === 1 ? !0 : r.value[N].add(1, "year").isBefore(r.value[1], "year");
|
|
23204
|
+
function L(N, V) {
|
|
23195
23205
|
if (N === 0) {
|
|
23196
|
-
if (!
|
|
23206
|
+
if (!V.isBefore(r.value[1], "month"))
|
|
23197
23207
|
return;
|
|
23198
|
-
r.value = [
|
|
23208
|
+
r.value = [V, r.value[1]];
|
|
23199
23209
|
} else {
|
|
23200
|
-
if (!
|
|
23210
|
+
if (!V.isAfter(r.value[0], "month"))
|
|
23201
23211
|
return;
|
|
23202
|
-
(
|
|
23212
|
+
(V.isBefore(r.value[0], "month") || V.isSame(r.value[0], "month")) && (V = r.value[0].add(1, "month")), r.value = [r.value[0], V];
|
|
23203
23213
|
}
|
|
23204
23214
|
}
|
|
23205
23215
|
const D = ne();
|
|
@@ -23218,17 +23228,17 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23218
23228
|
function C() {
|
|
23219
23229
|
D.value = null;
|
|
23220
23230
|
}
|
|
23221
|
-
function B(N,
|
|
23222
|
-
const W = r.value[N].year(Number(
|
|
23231
|
+
function B(N, V) {
|
|
23232
|
+
const W = r.value[N].year(Number(V));
|
|
23223
23233
|
L(N, W);
|
|
23224
23234
|
}
|
|
23225
|
-
function j(N,
|
|
23226
|
-
const W = r.value[N].month(Number(
|
|
23235
|
+
function j(N, V) {
|
|
23236
|
+
const W = r.value[N].month(Number(V));
|
|
23227
23237
|
L(N, W);
|
|
23228
23238
|
}
|
|
23229
|
-
const ee =
|
|
23230
|
-
const N = n.defaultMinYear,
|
|
23231
|
-
for (let ie = N; ie <=
|
|
23239
|
+
const ee = de(() => {
|
|
23240
|
+
const N = n.defaultMinYear, V = n.defaultMaxYear, W = [];
|
|
23241
|
+
for (let ie = N; ie <= V; ie++)
|
|
23232
23242
|
W.push(ie);
|
|
23233
23243
|
return W;
|
|
23234
23244
|
}), re = [
|
|
@@ -23245,7 +23255,7 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23245
23255
|
"November",
|
|
23246
23256
|
"December"
|
|
23247
23257
|
];
|
|
23248
|
-
return (N,
|
|
23258
|
+
return (N, V) => (b(), S("div", {
|
|
23249
23259
|
class: G(["shrink-0 flex gap-6", { "min-w-96": o.value.length === 1, "min-w-192": o.value.length === 2 }])
|
|
23250
23260
|
}, [
|
|
23251
23261
|
(b(!0), S($e, null, We(o.value, (W) => {
|
|
@@ -23290,8 +23300,8 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23290
23300
|
onClick: (Y) => I(W) ? E(W) : null
|
|
23291
23301
|
}, null, 8, ["class", "onClick"]),
|
|
23292
23302
|
le($f, {
|
|
23293
|
-
class: G(["w-5 h-5 cursor-pointer select-none", { "opacity-25 cursor-not-allowed": !
|
|
23294
|
-
onClick: (Y) =>
|
|
23303
|
+
class: G(["w-5 h-5 cursor-pointer select-none", { "opacity-25 cursor-not-allowed": !R(W), "hover:opacity-100": R(W) }]),
|
|
23304
|
+
onClick: (Y) => R(W) ? $(W) : null
|
|
23295
23305
|
}, null, 8, ["class", "onClick"])
|
|
23296
23306
|
])
|
|
23297
23307
|
]),
|
|
@@ -23305,12 +23315,12 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23305
23315
|
class: "grid grid-cols-7",
|
|
23306
23316
|
onMouseout: C
|
|
23307
23317
|
}, [
|
|
23308
|
-
l(r.value[W]) > 0 ? (b(!0), S($e, { key: 0 }, We(c(
|
|
23318
|
+
l(r.value[W]) > 0 ? (b(!0), S($e, { key: 0 }, We(c(P(U)(r.value[W]).year(), P(U)(r.value[W]).month() + 1), (Y) => (b(), ge(ta, {
|
|
23309
23319
|
onClick: (F) => !y(Y) && !m(Y) ? s(Y) : null,
|
|
23310
23320
|
off: ""
|
|
23311
23321
|
}, {
|
|
23312
23322
|
default: xe(() => [
|
|
23313
|
-
Ie(be(
|
|
23323
|
+
Ie(be(P(U)(Y).format("D")), 1)
|
|
23314
23324
|
]),
|
|
23315
23325
|
_: 2
|
|
23316
23326
|
}, 1032, ["onClick"]))), 256)) : Q("", !0),
|
|
@@ -23327,16 +23337,16 @@ const U4 = /* @__PURE__ */ Ji(W4), q4 = { class: "w-full dark:text-gray-400" },
|
|
|
23327
23337
|
highlight: oe(Y)
|
|
23328
23338
|
}, {
|
|
23329
23339
|
default: xe(() => [
|
|
23330
|
-
Ie(be(
|
|
23340
|
+
Ie(be(P(U)(Y).format("D")), 1)
|
|
23331
23341
|
]),
|
|
23332
23342
|
_: 2
|
|
23333
23343
|
}, 1032, ["onMouseover", "onClick", "today", "selected", "firstDay", "lastDay", "between", "disabled", "off", "highlight"]))), 256)),
|
|
23334
|
-
((ie = u(
|
|
23344
|
+
((ie = u(P(U)(r.value[W]).year(), P(U)(r.value[W]).month() + 1)) == null ? void 0 : ie.length) > 0 ? (b(!0), S($e, { key: 1 }, We(u(P(U)(r.value[W]).year(), P(U)(r.value[W]).month() + 1), (Y) => (b(), ge(ta, {
|
|
23335
23345
|
onClick: (F) => !y(Y) && !m(Y) ? s(Y) : null,
|
|
23336
23346
|
off: ""
|
|
23337
23347
|
}, {
|
|
23338
23348
|
default: xe(() => [
|
|
23339
|
-
Ie(be(
|
|
23349
|
+
Ie(be(P(U)(Y).format("D")), 1)
|
|
23340
23350
|
]),
|
|
23341
23351
|
_: 2
|
|
23342
23352
|
}, 1032, ["onClick"]))), 256)) : Q("", !0)
|
|
@@ -23411,7 +23421,7 @@ const Wp = /* @__PURE__ */ ve(cD, [["render", hD]]), pD = { class: "flex gap-3"
|
|
|
23411
23421
|
function i(a) {
|
|
23412
23422
|
r("update:modelValue", a);
|
|
23413
23423
|
}
|
|
23414
|
-
const o =
|
|
23424
|
+
const o = de(() => {
|
|
23415
23425
|
var a;
|
|
23416
23426
|
if (n.range)
|
|
23417
23427
|
return (a = n.modelValue) == null ? void 0 : a.map((l) => U(l).format("YYYY-MM-DD")).join(" to ");
|
|
@@ -23503,7 +23513,7 @@ const Wp = /* @__PURE__ */ ve(cD, [["render", hD]]), pD = { class: "flex gap-3"
|
|
|
23503
23513
|
},
|
|
23504
23514
|
emits: ["update:modelValue", "blur"],
|
|
23505
23515
|
setup(t, { emit: e }) {
|
|
23506
|
-
const n = t, r = e, i = ne(null), o =
|
|
23516
|
+
const n = t, r = e, i = ne(null), o = de(() => n.segment === "year" ? 4 : 2);
|
|
23507
23517
|
function s(l) {
|
|
23508
23518
|
const c = l.target.value.replace(/\D/g, "");
|
|
23509
23519
|
r("update:modelValue", c.slice(0, o.value)), c.length >= o.value && n.nextRef && nt(() => {
|
|
@@ -23847,7 +23857,7 @@ const Wp = /* @__PURE__ */ ve(cD, [["render", hD]]), pD = { class: "flex gap-3"
|
|
|
23847
23857
|
"translate-x-full": !t.visible,
|
|
23848
23858
|
[t.backgroundColor]: !0,
|
|
23849
23859
|
[t.options.width]: !0,
|
|
23850
|
-
[r[
|
|
23860
|
+
[r[P(ce).theme]]: !0
|
|
23851
23861
|
}])
|
|
23852
23862
|
}, [
|
|
23853
23863
|
A("div", {
|
|
@@ -23955,7 +23965,7 @@ const Wp = /* @__PURE__ */ ve(cD, [["render", hD]]), pD = { class: "flex gap-3"
|
|
|
23955
23965
|
r("update:modelValue", l);
|
|
23956
23966
|
}, s = (l) => {
|
|
23957
23967
|
i.value.push(l);
|
|
23958
|
-
}, a =
|
|
23968
|
+
}, a = de(() => n.modelValue);
|
|
23959
23969
|
return Ci("addTab", s), Ci("modelValue", a), (l, c) => (b(), S($e, null, [
|
|
23960
23970
|
A("div", {
|
|
23961
23971
|
class: G(["wpic-tabs flex dark:border-gray-930 overflow-x-auto overflow-y-hidden", { "border-b-[1px]": !t.pills }])
|
|
@@ -24185,21 +24195,21 @@ const b6 = {
|
|
|
24185
24195
|
}, O6 = /* @__PURE__ */ Object.assign(C6, {
|
|
24186
24196
|
setup(t) {
|
|
24187
24197
|
const { visible: e, title: n, text: r, positive: i, negative: o, onConfirm: s, onCancel: a } = Up();
|
|
24188
|
-
return (l, c) =>
|
|
24198
|
+
return (l, c) => P(e) ? (b(), S("div", b6, [
|
|
24189
24199
|
A("div", x6, [
|
|
24190
|
-
A("div", w6, be(
|
|
24191
|
-
A("div", k6, be(
|
|
24200
|
+
A("div", w6, be(P(n)), 1),
|
|
24201
|
+
A("div", k6, be(P(r)), 1),
|
|
24192
24202
|
A("div", S6, [
|
|
24193
|
-
le(Mi, { onClick:
|
|
24203
|
+
le(Mi, { onClick: P(a) }, {
|
|
24194
24204
|
default: xe(() => [
|
|
24195
24205
|
Ie("Cancel")
|
|
24196
24206
|
]),
|
|
24197
24207
|
_: 1
|
|
24198
24208
|
}, 8, ["onClick"]),
|
|
24199
24209
|
le(Mi, {
|
|
24200
|
-
primary:
|
|
24201
|
-
destructive:
|
|
24202
|
-
onClick:
|
|
24210
|
+
primary: P(i),
|
|
24211
|
+
destructive: P(o),
|
|
24212
|
+
onClick: P(s)
|
|
24203
24213
|
}, {
|
|
24204
24214
|
default: xe(() => [
|
|
24205
24215
|
Ie("Confirm")
|
|
@@ -24219,7 +24229,7 @@ const T6 = {
|
|
|
24219
24229
|
useConfirm: Up
|
|
24220
24230
|
};
|
|
24221
24231
|
function $6(t, e) {
|
|
24222
|
-
qp(
|
|
24232
|
+
qp(ce, e);
|
|
24223
24233
|
for (const n in oa)
|
|
24224
24234
|
if (oa.hasOwnProperty(n)) {
|
|
24225
24235
|
const r = oa[n];
|
|
@@ -24229,7 +24239,7 @@ function $6(t, e) {
|
|
|
24229
24239
|
const D6 = {
|
|
24230
24240
|
install: $6,
|
|
24231
24241
|
composables: T6,
|
|
24232
|
-
options:
|
|
24242
|
+
options: ce
|
|
24233
24243
|
};
|
|
24234
24244
|
export {
|
|
24235
24245
|
D6 as default,
|