@strands.gg/accui 2.17.60 → 2.17.61
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/{StrandsUIPlugin-B1Gl61ax.cjs.js → StrandsUIPlugin-5AOCDOcM.cjs.js} +18 -18
- package/dist/{StrandsUIPlugin-BNU_Ayly.es.js → StrandsUIPlugin-CCRrewS9.es.js} +749 -739
- package/dist/accui.css +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +1219 -1202
- package/dist/nuxt/runtime/composables/useStrandsAuth.cjs.js +1 -1
- package/dist/nuxt/runtime/composables/useStrandsAuth.es.js +1 -1
- package/dist/nuxt/runtime/middleware/auth.global.cjs.js +1 -1
- package/dist/nuxt/runtime/middleware/auth.global.es.js +14 -32
- package/dist/{useStrandsAuth-wzl2F9DE.es.js → useStrandsAuth-DSLFMDTj.es.js} +221 -206
- package/dist/useStrandsAuth-Db5ZGvxL.cjs.js +1 -0
- package/dist/vite.cjs.js +1 -1
- package/dist/vite.es.js +1 -1
- package/dist/vue/ui/UiInput/UiInput.Text.vue.d.ts +4 -0
- package/package.json +1 -1
- package/dist/useStrandsAuth-CetpoBNk.cjs.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ae, computed as L, openBlock as C, createElementBlock as T, createElementVNode as $, normalizeClass as
|
|
1
|
+
import { defineComponent as ae, computed as L, openBlock as C, createElementBlock as T, createElementVNode as $, normalizeClass as Z, toDisplayString as ee, createCommentVNode as W, renderSlot as E, createTextVNode as Ve, unref as R, normalizeStyle as Le, useSlots as xn, createVNode as z, Fragment as be, withCtx as N, getCurrentInstance as ta, createBlock as _, resolveDynamicComponent as In, ref as X, onUnmounted as wn, mergeProps as Dn, Teleport as hi, nextTick as $e, normalizeProps as jd, createSlots as Xe, useAttrs as qd, resolveComponent as Co, h as Kt, watch as ht, onMounted as er, withModifiers as cn, renderList as Je, toRefs as Ud, withDirectives as Mo, vModelSelect as To, watchEffect as Wd, onBeforeUnmount as Ds, shallowRef as Kd, markRaw as Jd, customRef as Gd, useCssVars as Yd, useId as Qd } from "vue";
|
|
2
2
|
const Oe = (n, e) => {
|
|
3
3
|
const t = n.__vccOpts || n;
|
|
4
4
|
for (const [r, i] of e)
|
|
@@ -35,7 +35,7 @@ const Oe = (n, e) => {
|
|
|
35
35
|
})[e.variant]);
|
|
36
36
|
return (o, l) => (C(), T("div", Xd, [
|
|
37
37
|
$("div", {
|
|
38
|
-
class:
|
|
38
|
+
class: Z(t.value),
|
|
39
39
|
role: "alert"
|
|
40
40
|
}, [
|
|
41
41
|
$("div", Zd, [
|
|
@@ -51,10 +51,10 @@ const Oe = (n, e) => {
|
|
|
51
51
|
$("div", nu, [
|
|
52
52
|
n.title ? (C(), T("h3", {
|
|
53
53
|
key: 0,
|
|
54
|
-
class:
|
|
54
|
+
class: Z(r.value)
|
|
55
55
|
}, ee(n.title), 3)) : W("", !0),
|
|
56
56
|
$("div", {
|
|
57
|
-
class:
|
|
57
|
+
class: Z(i.value)
|
|
58
58
|
}, [
|
|
59
59
|
E(o.$slots, "default", {}, () => [
|
|
60
60
|
Ve(ee(n.message), 1)
|
|
@@ -113,7 +113,7 @@ const Oe = (n, e) => {
|
|
|
113
113
|
xl: 80
|
|
114
114
|
}, s = L(() => typeof r.size == "number" ? r.size : i[r.size] || i.md);
|
|
115
115
|
return (o, l) => (C(), T("div", {
|
|
116
|
-
class:
|
|
116
|
+
class: Z(["loader-container", [
|
|
117
117
|
{ "loader-centered": n.centered },
|
|
118
118
|
`loader-color-${n.color}`
|
|
119
119
|
]])
|
|
@@ -235,7 +235,7 @@ const Oe = (n, e) => {
|
|
|
235
235
|
n.icon ? W("", !0) : (C(), T("span", mu, ee(n.loadingText || "Loading..."), 1))
|
|
236
236
|
])) : (C(), T("span", {
|
|
237
237
|
key: 1,
|
|
238
|
-
class:
|
|
238
|
+
class: Z(["button-content", o.value, `button-content-align-${n.textAlign}`])
|
|
239
239
|
}, [
|
|
240
240
|
n.icon ? E(l.$slots, "icon", { key: 0 }, void 0, !0) : (C(), T(be, { key: 1 }, [
|
|
241
241
|
t.value ? (C(), T("span", gu, [
|
|
@@ -288,7 +288,7 @@ const Oe = (n, e) => {
|
|
|
288
288
|
href: i.value,
|
|
289
289
|
target: n.external ? "_blank" : void 0,
|
|
290
290
|
rel: n.external ? "noopener noreferrer" : void 0,
|
|
291
|
-
class:
|
|
291
|
+
class: Z(n.buttonClasses),
|
|
292
292
|
style: Le(n.buttonStyles),
|
|
293
293
|
onClick: s
|
|
294
294
|
}, [
|
|
@@ -341,10 +341,10 @@ const Oe = (n, e) => {
|
|
|
341
341
|
}
|
|
342
342
|
l("click", c);
|
|
343
343
|
};
|
|
344
|
-
return (c, d) => (C(),
|
|
344
|
+
return (c, d) => (C(), _(In(i.value), {
|
|
345
345
|
to: s.value ? n.to : void 0,
|
|
346
346
|
href: s.value ? void 0 : typeof n.to == "string" ? n.to : "/",
|
|
347
|
-
class:
|
|
347
|
+
class: Z(n.buttonClasses),
|
|
348
348
|
style: Le(n.buttonStyles),
|
|
349
349
|
onClick: a
|
|
350
350
|
}, {
|
|
@@ -385,36 +385,36 @@ const Oe = (n, e) => {
|
|
|
385
385
|
maxWidth: { default: 250 }
|
|
386
386
|
},
|
|
387
387
|
setup(n) {
|
|
388
|
-
const e = n, t =
|
|
388
|
+
const e = n, t = X(), r = X(), i = X(!1), s = X(!1);
|
|
389
389
|
let o = null, l = null;
|
|
390
|
-
const a =
|
|
390
|
+
const a = X({}), c = async () => {
|
|
391
391
|
if (!t.value || !r.value || !s.value) return;
|
|
392
392
|
await $e();
|
|
393
393
|
const f = t.value.getBoundingClientRect();
|
|
394
394
|
r.value.style.visibility = "hidden", r.value.style.opacity = "1";
|
|
395
395
|
const h = r.value.getBoundingClientRect(), p = h.width, m = h.height;
|
|
396
396
|
r.value.style.visibility = "", r.value.style.opacity = "";
|
|
397
|
-
const g = window.innerWidth,
|
|
398
|
-
let
|
|
397
|
+
const g = window.innerWidth, b = window.innerHeight;
|
|
398
|
+
let x = 0, y = 0;
|
|
399
399
|
switch (e.position) {
|
|
400
400
|
case "top":
|
|
401
|
-
|
|
401
|
+
x = f.top - m - e.offset, y = f.left + f.width / 2 - p / 2;
|
|
402
402
|
break;
|
|
403
403
|
case "bottom":
|
|
404
|
-
|
|
404
|
+
x = f.bottom + e.offset, y = f.left + f.width / 2 - p / 2;
|
|
405
405
|
break;
|
|
406
406
|
case "left":
|
|
407
|
-
|
|
407
|
+
x = f.top + f.height / 2 - m / 2, y = f.left - p - e.offset;
|
|
408
408
|
break;
|
|
409
409
|
case "right":
|
|
410
|
-
|
|
410
|
+
x = f.top + f.height / 2 - m / 2, y = f.right + e.offset;
|
|
411
411
|
break;
|
|
412
412
|
}
|
|
413
|
-
const
|
|
414
|
-
|
|
413
|
+
const k = 8;
|
|
414
|
+
y < k ? y = k : y + p > g - k && (y = g - p - k), x < k ? x = k : x + m > b - k && (x = b - m - k), a.value = {
|
|
415
415
|
position: "fixed",
|
|
416
|
-
top: `${
|
|
417
|
-
left: `${
|
|
416
|
+
top: `${x}px`,
|
|
417
|
+
left: `${y}px`,
|
|
418
418
|
zIndex: "9999"
|
|
419
419
|
};
|
|
420
420
|
}, d = () => {
|
|
@@ -441,12 +441,12 @@ const Oe = (n, e) => {
|
|
|
441
441
|
onMouseleave: u
|
|
442
442
|
}), [
|
|
443
443
|
E(f.$slots, "default", {}, void 0, !0),
|
|
444
|
-
(C(),
|
|
444
|
+
(C(), _(hi, { to: "body" }, [
|
|
445
445
|
s.value ? (C(), T("div", {
|
|
446
446
|
key: 0,
|
|
447
447
|
ref_key: "tooltipRef",
|
|
448
448
|
ref: r,
|
|
449
|
-
class:
|
|
449
|
+
class: Z(["ui-tooltip", [
|
|
450
450
|
`ui-tooltip--${n.position}`,
|
|
451
451
|
{
|
|
452
452
|
"ui-tooltip--visible": i.value
|
|
@@ -461,7 +461,7 @@ const Oe = (n, e) => {
|
|
|
461
461
|
], !0)
|
|
462
462
|
]),
|
|
463
463
|
$("div", {
|
|
464
|
-
class:
|
|
464
|
+
class: Z(["ui-tooltip-arrow", `ui-tooltip-arrow--${n.position}`])
|
|
465
465
|
}, null, 2)
|
|
466
466
|
], 6)) : W("", !0)
|
|
467
467
|
]))
|
|
@@ -511,9 +511,9 @@ const Oe = (n, e) => {
|
|
|
511
511
|
].filter(Boolean)), s = L(() => i.value.join(" ")), o = L(() => ({
|
|
512
512
|
fontWeight: t.fontWeight
|
|
513
513
|
})), l = L(() => t.disabled || t.loading ? -1 : t.tabindex ?? void 0);
|
|
514
|
-
return (a, c) => n.title ? (C(),
|
|
514
|
+
return (a, c) => n.title ? (C(), _(Su, jd(Dn({ key: 0 }, r.value)), {
|
|
515
515
|
default: N(() => [
|
|
516
|
-
n.to ? n.to ? (C(),
|
|
516
|
+
n.to ? n.to ? (C(), _(Ao, {
|
|
517
517
|
key: 1,
|
|
518
518
|
to: n.to,
|
|
519
519
|
disabled: n.disabled,
|
|
@@ -548,7 +548,7 @@ const Oe = (n, e) => {
|
|
|
548
548
|
]),
|
|
549
549
|
key: "1"
|
|
550
550
|
} : void 0
|
|
551
|
-
]), 1032, ["to", "disabled", "loading", "loading-text", "icon", "button-classes", "button-styles", "tabindex", "text-align"])) : n.href ? (C(),
|
|
551
|
+
]), 1032, ["to", "disabled", "loading", "loading-text", "icon", "button-classes", "button-styles", "tabindex", "text-align"])) : n.href ? (C(), _(Eo, {
|
|
552
552
|
key: 2,
|
|
553
553
|
href: n.href,
|
|
554
554
|
external: n.external,
|
|
@@ -626,7 +626,7 @@ const Oe = (n, e) => {
|
|
|
626
626
|
]),
|
|
627
627
|
_: 3
|
|
628
628
|
}, 16)) : (C(), T(be, { key: 1 }, [
|
|
629
|
-
n.to ? n.to ? (C(),
|
|
629
|
+
n.to ? n.to ? (C(), _(Ao, {
|
|
630
630
|
key: 1,
|
|
631
631
|
to: n.to,
|
|
632
632
|
disabled: n.disabled,
|
|
@@ -661,7 +661,7 @@ const Oe = (n, e) => {
|
|
|
661
661
|
]),
|
|
662
662
|
key: "1"
|
|
663
663
|
} : void 0
|
|
664
|
-
]), 1032, ["to", "disabled", "loading", "loading-text", "icon", "button-classes", "button-styles", "tabindex", "text-align"])) : n.href ? (C(),
|
|
664
|
+
]), 1032, ["to", "disabled", "loading", "loading-text", "icon", "button-classes", "button-styles", "tabindex", "text-align"])) : n.href ? (C(), _(Eo, {
|
|
665
665
|
key: 2,
|
|
666
666
|
href: n.href,
|
|
667
667
|
external: n.external,
|
|
@@ -791,10 +791,10 @@ const Oe = (n, e) => {
|
|
|
791
791
|
`ui-card-color-${e.color}`,
|
|
792
792
|
t.class
|
|
793
793
|
]);
|
|
794
|
-
return (c, d) => (C(),
|
|
794
|
+
return (c, d) => (C(), _(In(s.value), {
|
|
795
795
|
to: o.value ? n.to : void 0,
|
|
796
796
|
href: l.value ? typeof n.to == "string" ? n.to : "" : void 0,
|
|
797
|
-
class:
|
|
797
|
+
class: Z(["ui-card", [a.value, { "ui-card-linkable": !!n.to }]])
|
|
798
798
|
}, {
|
|
799
799
|
default: N(() => [
|
|
800
800
|
c.$slots.header || n.title || n.subtitle || c.$slots["leading-icon"] || c.$slots["trailing-icon"] ? (C(), T("div", Eu, [
|
|
@@ -822,7 +822,7 @@ const Oe = (n, e) => {
|
|
|
822
822
|
_: 3
|
|
823
823
|
}, 8, ["to", "href", "class"]));
|
|
824
824
|
}
|
|
825
|
-
}), ra = /* @__PURE__ */ Oe($u, [["__scopeId", "data-v-
|
|
825
|
+
}), ra = /* @__PURE__ */ Oe($u, [["__scopeId", "data-v-5d575f4a"]]);
|
|
826
826
|
const Oo = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ru = (n) => n.replace(
|
|
827
827
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
828
828
|
(e, t, r) => r ? r.toUpperCase() : t.toLowerCase()
|
|
@@ -1083,42 +1083,46 @@ const Ls = oe("x", [
|
|
|
1083
1083
|
size: { default: "md" },
|
|
1084
1084
|
tabindex: {}
|
|
1085
1085
|
},
|
|
1086
|
-
emits: ["update:modelValue", "blur", "focus", "keydown"],
|
|
1086
|
+
emits: ["update:modelValue", "input", "change", "blur", "focus", "keydown"],
|
|
1087
1087
|
setup(n, { emit: e }) {
|
|
1088
|
-
const t = n, r = e, i =
|
|
1088
|
+
const t = n, r = e, i = X(t.modelValue ?? ""), s = L(() => i.value);
|
|
1089
|
+
ht(() => t.modelValue, (x) => {
|
|
1090
|
+
x !== void 0 && x !== i.value && (i.value = x);
|
|
1091
|
+
}, { immediate: !0 });
|
|
1092
|
+
const o = X(!1), l = L(() => t.type === "password" ? o.value ? "text" : "password" : t.type), a = L(() => t.hasTrailingIcon || t.type === "password" || t.type === "search" && s.value), c = L(() => {
|
|
1089
1093
|
if (t.tabindex !== void 0)
|
|
1090
1094
|
return t.tabindex + 1;
|
|
1091
|
-
}),
|
|
1092
|
-
const
|
|
1093
|
-
return t.error &&
|
|
1094
|
-
}),
|
|
1095
|
-
const
|
|
1096
|
-
return t.hasLeadingIcon ?
|
|
1097
|
-
}),
|
|
1098
|
-
let
|
|
1099
|
-
t.type === "number" &&
|
|
1100
|
-
},
|
|
1101
|
-
r("blur",
|
|
1102
|
-
},
|
|
1103
|
-
r("focus",
|
|
1104
|
-
},
|
|
1105
|
-
r("keydown",
|
|
1106
|
-
},
|
|
1107
|
-
|
|
1108
|
-
},
|
|
1109
|
-
r("update:modelValue", "");
|
|
1095
|
+
}), d = L(() => {
|
|
1096
|
+
const x = [];
|
|
1097
|
+
return t.error && x.push("input-error"), t.disabled && x.push("input-disabled"), t.readonly && x.push("input-readonly"), x.push(`input-size-${t.size}`), x;
|
|
1098
|
+
}), u = L(() => {
|
|
1099
|
+
const x = [];
|
|
1100
|
+
return t.hasLeadingIcon ? x.push("input-padding-left-icon") : x.push("input-padding-left"), a.value ? x.push("input-padding-right-icon") : x.push("input-padding-right"), x;
|
|
1101
|
+
}), f = (x) => {
|
|
1102
|
+
let k = x.target.value;
|
|
1103
|
+
t.type === "number" && k !== "" && (k = parseFloat(k) || 0), i.value = k, r("update:modelValue", k), r("input", k), r("change", k);
|
|
1104
|
+
}, h = (x) => {
|
|
1105
|
+
r("blur", x);
|
|
1106
|
+
}, p = (x) => {
|
|
1107
|
+
r("focus", x);
|
|
1108
|
+
}, m = (x) => {
|
|
1109
|
+
r("keydown", x);
|
|
1110
|
+
}, g = () => {
|
|
1111
|
+
o.value = !o.value;
|
|
1112
|
+
}, b = () => {
|
|
1113
|
+
i.value = "", r("update:modelValue", "");
|
|
1110
1114
|
};
|
|
1111
|
-
return (
|
|
1112
|
-
class:
|
|
1115
|
+
return (x, y) => (C(), T("div", {
|
|
1116
|
+
class: Z(["input-field-wrapper", d.value])
|
|
1113
1117
|
}, [
|
|
1114
|
-
E(
|
|
1118
|
+
E(x.$slots, "leading", {}, void 0, !0),
|
|
1115
1119
|
t.hasLeadingIcon ? (C(), T("div", ff, [
|
|
1116
|
-
E(
|
|
1120
|
+
E(x.$slots, "leading-icon", {}, void 0, !0)
|
|
1117
1121
|
])) : W("", !0),
|
|
1118
1122
|
$("input", {
|
|
1119
1123
|
id: n.inputId,
|
|
1120
|
-
type:
|
|
1121
|
-
value:
|
|
1124
|
+
type: l.value,
|
|
1125
|
+
value: s.value,
|
|
1122
1126
|
placeholder: n.placeholder,
|
|
1123
1127
|
disabled: n.disabled,
|
|
1124
1128
|
readonly: n.readonly,
|
|
@@ -1129,38 +1133,38 @@ const Ls = oe("x", [
|
|
|
1129
1133
|
autocomplete: n.autocomplete,
|
|
1130
1134
|
spellcheck: n.spellcheck,
|
|
1131
1135
|
tabindex: n.tabindex,
|
|
1132
|
-
class:
|
|
1133
|
-
onInput:
|
|
1134
|
-
onBlur:
|
|
1135
|
-
onFocus:
|
|
1136
|
-
onKeydown:
|
|
1136
|
+
class: Z(["input-base", u.value]),
|
|
1137
|
+
onInput: f,
|
|
1138
|
+
onBlur: h,
|
|
1139
|
+
onFocus: p,
|
|
1140
|
+
onKeydown: m
|
|
1137
1141
|
}, null, 42, hf),
|
|
1138
1142
|
n.type === "password" ? (C(), T("div", pf, [
|
|
1139
1143
|
z(re, {
|
|
1140
|
-
color:
|
|
1141
|
-
variant:
|
|
1144
|
+
color: o.value ? "primary" : "secondary",
|
|
1145
|
+
variant: o.value ? "primary" : "ghost",
|
|
1142
1146
|
size: "sm",
|
|
1143
1147
|
icon: "",
|
|
1144
1148
|
squircle: "",
|
|
1145
|
-
tabindex:
|
|
1146
|
-
"aria-label":
|
|
1147
|
-
onClick:
|
|
1149
|
+
tabindex: c.value,
|
|
1150
|
+
"aria-label": o.value ? "Hide password" : "Show password",
|
|
1151
|
+
onClick: g
|
|
1148
1152
|
}, {
|
|
1149
1153
|
icon: N(() => [
|
|
1150
|
-
|
|
1154
|
+
o.value ? (C(), _(R(Yu), { key: 0 })) : (C(), _(R(Qu), { key: 1 }))
|
|
1151
1155
|
]),
|
|
1152
1156
|
_: 1
|
|
1153
1157
|
}, 8, ["color", "variant", "tabindex", "aria-label"])
|
|
1154
|
-
])) : n.type === "search" &&
|
|
1158
|
+
])) : n.type === "search" && s.value && !n.disabled && !n.readonly ? (C(), T("div", mf, [
|
|
1155
1159
|
z(re, {
|
|
1156
1160
|
color: "danger",
|
|
1157
1161
|
variant: "ghost",
|
|
1158
1162
|
size: "sm",
|
|
1159
1163
|
icon: "",
|
|
1160
1164
|
squircle: "",
|
|
1161
|
-
tabindex:
|
|
1165
|
+
tabindex: c.value,
|
|
1162
1166
|
"aria-label": "Clear search",
|
|
1163
|
-
onClick:
|
|
1167
|
+
onClick: b
|
|
1164
1168
|
}, {
|
|
1165
1169
|
icon: N(() => [
|
|
1166
1170
|
z(R(Ls))
|
|
@@ -1168,12 +1172,12 @@ const Ls = oe("x", [
|
|
|
1168
1172
|
_: 1
|
|
1169
1173
|
}, 8, ["tabindex"])
|
|
1170
1174
|
])) : t.hasTrailingIcon ? (C(), T("div", gf, [
|
|
1171
|
-
E(
|
|
1175
|
+
E(x.$slots, "trailing-icon", {}, void 0, !0)
|
|
1172
1176
|
])) : W("", !0),
|
|
1173
|
-
E(
|
|
1177
|
+
E(x.$slots, "trailing", {}, void 0, !0)
|
|
1174
1178
|
], 2));
|
|
1175
1179
|
}
|
|
1176
|
-
}), bf = /* @__PURE__ */ Oe(yf, [["__scopeId", "data-v-
|
|
1180
|
+
}), bf = /* @__PURE__ */ Oe(yf, [["__scopeId", "data-v-118c0113"]]), kf = {
|
|
1177
1181
|
key: 0,
|
|
1178
1182
|
class: "input-leading-icon"
|
|
1179
1183
|
}, vf = ["id", "value", "placeholder", "disabled", "readonly", "required", "rows", "cols", "maxlength", "autocomplete", "spellcheck"], xf = {
|
|
@@ -1206,7 +1210,7 @@ const Ls = oe("x", [
|
|
|
1206
1210
|
},
|
|
1207
1211
|
emits: ["update:modelValue", "blur", "focus", "keydown"],
|
|
1208
1212
|
setup(n, { emit: e }) {
|
|
1209
|
-
const t = n, r = e, i = xn(), s = L(() => !!i.default), o =
|
|
1213
|
+
const t = n, r = e, i = xn(), s = L(() => !!i.default), o = X(null);
|
|
1210
1214
|
er(() => {
|
|
1211
1215
|
(t.modelValue === void 0 || t.modelValue === "") && s.value && setTimeout(() => {
|
|
1212
1216
|
if (o.value) {
|
|
@@ -1232,14 +1236,14 @@ const Ls = oe("x", [
|
|
|
1232
1236
|
r("keydown", h);
|
|
1233
1237
|
};
|
|
1234
1238
|
return (h, p) => (C(), T("div", {
|
|
1235
|
-
class:
|
|
1239
|
+
class: Z(["input-field-wrapper input-textarea", l.value])
|
|
1236
1240
|
}, [
|
|
1237
1241
|
E(h.$slots, "leading", {}, void 0, !0),
|
|
1238
1242
|
t.hasLeadingIcon ? (C(), T("div", kf, [
|
|
1239
1243
|
E(h.$slots, "leading-icon", {}, void 0, !0)
|
|
1240
1244
|
])) : W("", !0),
|
|
1241
1245
|
$("div", {
|
|
1242
|
-
class:
|
|
1246
|
+
class: Z(["textarea-wrapper", { "textarea-resizable": n.resizable }])
|
|
1243
1247
|
}, [
|
|
1244
1248
|
$("textarea", {
|
|
1245
1249
|
id: n.inputId,
|
|
@@ -1253,7 +1257,7 @@ const Ls = oe("x", [
|
|
|
1253
1257
|
maxlength: n.maxlength,
|
|
1254
1258
|
autocomplete: n.autocomplete,
|
|
1255
1259
|
spellcheck: n.spellcheck,
|
|
1256
|
-
class:
|
|
1260
|
+
class: Z(["input-base", [
|
|
1257
1261
|
{ "input-textarea-resize": n.resizable },
|
|
1258
1262
|
a.value
|
|
1259
1263
|
]]),
|
|
@@ -1290,7 +1294,7 @@ function Ps(n) {
|
|
|
1290
1294
|
sameWidth: l = !1,
|
|
1291
1295
|
autoUpdate: a = !1,
|
|
1292
1296
|
clickOutside: c
|
|
1293
|
-
} = n, d =
|
|
1297
|
+
} = n, d = X({
|
|
1294
1298
|
position: "fixed",
|
|
1295
1299
|
top: "0px",
|
|
1296
1300
|
left: "0px",
|
|
@@ -1298,66 +1302,66 @@ function Ps(n) {
|
|
|
1298
1302
|
}), u = async () => {
|
|
1299
1303
|
if (await $e(), !e.value || !t.value || typeof e.value.getBoundingClientRect != "function" || typeof t.value.getBoundingClientRect != "function")
|
|
1300
1304
|
return;
|
|
1301
|
-
const
|
|
1302
|
-
let
|
|
1303
|
-
switch (
|
|
1305
|
+
const y = e.value.getBoundingClientRect(), k = t.value.getBoundingClientRect(), [v, S = "start"] = r.split("-");
|
|
1306
|
+
let w = 0, M = 0;
|
|
1307
|
+
switch (v) {
|
|
1304
1308
|
case "bottom":
|
|
1305
|
-
|
|
1309
|
+
w = y.left, M = y.bottom + i;
|
|
1306
1310
|
break;
|
|
1307
1311
|
case "top":
|
|
1308
|
-
|
|
1312
|
+
w = y.left, M = y.top - k.height - i;
|
|
1309
1313
|
break;
|
|
1310
1314
|
case "right":
|
|
1311
|
-
|
|
1315
|
+
w = y.right + i, M = y.top;
|
|
1312
1316
|
break;
|
|
1313
1317
|
case "left":
|
|
1314
|
-
|
|
1318
|
+
w = y.left - k.width - i, M = y.top;
|
|
1315
1319
|
break;
|
|
1316
1320
|
}
|
|
1317
|
-
if (
|
|
1318
|
-
switch (
|
|
1321
|
+
if (v === "top" || v === "bottom")
|
|
1322
|
+
switch (S) {
|
|
1319
1323
|
case "center":
|
|
1320
|
-
|
|
1324
|
+
w = y.left + (y.width - k.width) / 2;
|
|
1321
1325
|
break;
|
|
1322
1326
|
case "end":
|
|
1323
|
-
|
|
1327
|
+
w = y.right - k.width;
|
|
1324
1328
|
break;
|
|
1325
1329
|
}
|
|
1326
|
-
else if (
|
|
1327
|
-
switch (
|
|
1330
|
+
else if (v === "left" || v === "right")
|
|
1331
|
+
switch (S) {
|
|
1328
1332
|
case "center":
|
|
1329
|
-
M =
|
|
1333
|
+
M = y.top + (y.height - k.height) / 2;
|
|
1330
1334
|
break;
|
|
1331
1335
|
case "end":
|
|
1332
|
-
M =
|
|
1336
|
+
M = y.bottom - k.height;
|
|
1333
1337
|
break;
|
|
1334
1338
|
}
|
|
1335
|
-
let D = l ?
|
|
1339
|
+
let D = l ? y.width : void 0;
|
|
1336
1340
|
const H = window.innerWidth, te = window.innerHeight, Q = 8;
|
|
1337
1341
|
let ie = !1, I = !1;
|
|
1338
1342
|
if (s) {
|
|
1339
|
-
if (
|
|
1340
|
-
const j =
|
|
1343
|
+
if (v === "bottom" && M + k.height > te - Q) {
|
|
1344
|
+
const j = y.top - k.height - i;
|
|
1341
1345
|
j >= Q && (M = j, ie = !0);
|
|
1342
|
-
} else if (
|
|
1343
|
-
const j =
|
|
1344
|
-
j +
|
|
1346
|
+
} else if (v === "top" && M < Q) {
|
|
1347
|
+
const j = y.bottom + i;
|
|
1348
|
+
j + k.height <= te - Q && (M = j, ie = !1);
|
|
1345
1349
|
}
|
|
1346
|
-
if (
|
|
1347
|
-
const j =
|
|
1348
|
-
j >= Q && (
|
|
1349
|
-
} else if (
|
|
1350
|
-
const j =
|
|
1351
|
-
j +
|
|
1350
|
+
if (v === "right" && w + k.width > H - Q) {
|
|
1351
|
+
const j = y.left - k.width - i;
|
|
1352
|
+
j >= Q && (w = j, I = !0);
|
|
1353
|
+
} else if (v === "left" && w < Q) {
|
|
1354
|
+
const j = y.right + i;
|
|
1355
|
+
j + k.width <= H - Q && (w = j, I = !1);
|
|
1352
1356
|
}
|
|
1353
1357
|
}
|
|
1354
|
-
o && (
|
|
1358
|
+
o && (w < Q ? w = Q : w + k.width > H - Q && (w = H - k.width - Q), M < Q ? M = Q : M + k.height > te - Q && (M = te - k.height - Q));
|
|
1355
1359
|
const V = {
|
|
1356
1360
|
position: "fixed",
|
|
1357
1361
|
zIndex: "9999",
|
|
1358
1362
|
...D ? { width: `${D}px` } : {}
|
|
1359
1363
|
};
|
|
1360
|
-
ie ? V.bottom = `${te - M -
|
|
1364
|
+
ie ? V.bottom = `${te - M - k.height}px` : V.top = `${M}px`, I ? V.right = `${H - w - k.width}px` : V.left = `${w}px`, d.value = V;
|
|
1361
1365
|
}, f = () => {
|
|
1362
1366
|
u();
|
|
1363
1367
|
};
|
|
@@ -1368,33 +1372,33 @@ function Ps(n) {
|
|
|
1368
1372
|
if (f(), c?.enabled && c.handler && e.value) {
|
|
1369
1373
|
if (typeof e.value.getBoundingClientRect != "function")
|
|
1370
1374
|
return;
|
|
1371
|
-
const
|
|
1372
|
-
(
|
|
1375
|
+
const y = e.value.getBoundingClientRect(), k = window.innerHeight, v = window.innerWidth;
|
|
1376
|
+
(y.bottom < 0 || y.top > k || y.right < 0 || y.left > v) && c.handler();
|
|
1373
1377
|
}
|
|
1374
|
-
}, g = (
|
|
1378
|
+
}, g = (y) => {
|
|
1375
1379
|
if (!c?.enabled || !c.handler) return;
|
|
1376
|
-
const
|
|
1377
|
-
if (!
|
|
1380
|
+
const k = y.target;
|
|
1381
|
+
if (!k || !e.value || !t.value || typeof e.value.contains != "function" || typeof t.value.contains != "function")
|
|
1378
1382
|
return;
|
|
1379
|
-
const
|
|
1380
|
-
!
|
|
1381
|
-
},
|
|
1383
|
+
const v = e.value.contains(k), S = t.value.contains(k);
|
|
1384
|
+
!v && !S && c.handler();
|
|
1385
|
+
}, b = () => {
|
|
1382
1386
|
a && (window.addEventListener("resize", p), window.addEventListener("scroll", m, !0), typeof ResizeObserver < "u" && (h = new ResizeObserver(() => {
|
|
1383
1387
|
f();
|
|
1384
1388
|
}), $e(() => {
|
|
1385
1389
|
e.value && h && typeof e.value.getBoundingClientRect == "function" && h.observe(e.value), t.value && h && typeof t.value.getBoundingClientRect == "function" && h.observe(t.value);
|
|
1386
1390
|
}))), c?.enabled && document.addEventListener("click", g, !0);
|
|
1387
|
-
},
|
|
1391
|
+
}, x = () => {
|
|
1388
1392
|
a && (window.removeEventListener("resize", p), window.removeEventListener("scroll", m, !0)), c?.enabled && document.removeEventListener("click", g, !0), h && (h.disconnect(), h = null);
|
|
1389
1393
|
};
|
|
1390
1394
|
return er(() => {
|
|
1391
|
-
|
|
1395
|
+
b();
|
|
1392
1396
|
}), wn(() => {
|
|
1393
|
-
|
|
1397
|
+
x();
|
|
1394
1398
|
}), {
|
|
1395
1399
|
floatingStyle: d,
|
|
1396
1400
|
updatePosition: f,
|
|
1397
|
-
cleanup:
|
|
1401
|
+
cleanup: x
|
|
1398
1402
|
};
|
|
1399
1403
|
}
|
|
1400
1404
|
const Cf = {
|
|
@@ -1449,14 +1453,14 @@ const Cf = {
|
|
|
1449
1453
|
},
|
|
1450
1454
|
emits: ["update:modelValue", "blur", "focus"],
|
|
1451
1455
|
setup(n, { emit: e }) {
|
|
1452
|
-
const t = n, r = e, i =
|
|
1456
|
+
const t = n, r = e, i = X(), s = X(), o = X(), l = L(() => `dropdown-${t.inputId || Math.random().toString(36).substr(2, 9)}`), a = L(() => {
|
|
1453
1457
|
if (i.value) {
|
|
1454
1458
|
const I = i.value.closest('[role="dialog"][aria-modal="true"]');
|
|
1455
1459
|
if (I)
|
|
1456
1460
|
return I;
|
|
1457
1461
|
}
|
|
1458
1462
|
return "body";
|
|
1459
|
-
}), c =
|
|
1463
|
+
}), c = X({
|
|
1460
1464
|
isOpen: !1,
|
|
1461
1465
|
searchQuery: "",
|
|
1462
1466
|
highlightedIndex: -1
|
|
@@ -1476,7 +1480,7 @@ const Cf = {
|
|
|
1476
1480
|
clickOutside: {
|
|
1477
1481
|
enabled: !0,
|
|
1478
1482
|
handler: () => {
|
|
1479
|
-
|
|
1483
|
+
S();
|
|
1480
1484
|
}
|
|
1481
1485
|
}
|
|
1482
1486
|
}), h = L(() => t.multiple ? Array.isArray(t.modelValue) ? t.modelValue : [] : t.modelValue !== void 0 ? [t.modelValue] : []), p = L(() => {
|
|
@@ -1504,16 +1508,16 @@ const Cf = {
|
|
|
1504
1508
|
]));
|
|
1505
1509
|
}
|
|
1506
1510
|
return I;
|
|
1507
|
-
}), g = L(() => t.searchPlaceholder && t.searchPlaceholder.trim() !== "" ? t.searchPlaceholder : t.allowInsert && t.multiple ? "Search or create..." : "Search..."),
|
|
1511
|
+
}), g = L(() => t.searchPlaceholder && t.searchPlaceholder.trim() !== "" ? t.searchPlaceholder : t.allowInsert && t.multiple ? "Search or create..." : "Search..."), b = L(() => t.disabled ? -1 : t.tabindex ?? 0), x = L(() => {
|
|
1508
1512
|
if (t.tabindex !== void 0)
|
|
1509
1513
|
return t.tabindex + 1;
|
|
1510
|
-
}),
|
|
1514
|
+
}), y = L(() => {
|
|
1511
1515
|
const I = [];
|
|
1512
1516
|
return t.error && I.push("input-error"), t.disabled && I.push("input-disabled"), I.push(`input-size-${t.size}`), I;
|
|
1513
|
-
}),
|
|
1517
|
+
}), k = L(() => {
|
|
1514
1518
|
const I = [];
|
|
1515
1519
|
return t.hasLeadingIcon ? I.push("input-padding-left-icon") : I.push("input-padding-left"), t.hasTrailingIcon ? I.push("input-padding-right-icon") : I.push("input-padding-right"), I;
|
|
1516
|
-
}),
|
|
1520
|
+
}), v = async () => {
|
|
1517
1521
|
if (!t.disabled) {
|
|
1518
1522
|
if (c.value.isOpen = !0, c.value.searchQuery = "", await $e(), u(), c.value.highlightedIndex === -1) {
|
|
1519
1523
|
const I = m.value.findIndex((V) => !V.disabled);
|
|
@@ -1525,10 +1529,10 @@ const Cf = {
|
|
|
1525
1529
|
}
|
|
1526
1530
|
document.addEventListener("keydown", Q), r("focus", new FocusEvent("focus"));
|
|
1527
1531
|
}
|
|
1528
|
-
},
|
|
1532
|
+
}, S = () => {
|
|
1529
1533
|
c.value.isOpen && (c.value.isOpen = !1, c.value.highlightedIndex = -1, c.value.searchQuery = "", document.removeEventListener("keydown", Q), r("blur", new FocusEvent("blur")));
|
|
1530
|
-
},
|
|
1531
|
-
c.value.isOpen ?
|
|
1534
|
+
}, w = () => {
|
|
1535
|
+
c.value.isOpen ? S() : v();
|
|
1532
1536
|
}, M = (I) => I.value && typeof I.value == "string" && I.value.startsWith("__insert__") ? !1 : h.value.includes(I.value), D = (I) => {
|
|
1533
1537
|
if (!I.disabled)
|
|
1534
1538
|
if (t.multiple) {
|
|
@@ -1542,20 +1546,20 @@ const Cf = {
|
|
|
1542
1546
|
}
|
|
1543
1547
|
r("update:modelValue", V);
|
|
1544
1548
|
} else
|
|
1545
|
-
r("update:modelValue", I.value),
|
|
1549
|
+
r("update:modelValue", I.value), S();
|
|
1546
1550
|
}, H = (I) => {
|
|
1547
1551
|
if (["Enter", " ", "ArrowDown", "ArrowUp", "Escape"].includes(I.key) && (I.preventDefault(), !(c.value.isOpen && (I.key === "ArrowDown" || I.key === "ArrowUp"))))
|
|
1548
1552
|
switch (I.key) {
|
|
1549
1553
|
case "Enter":
|
|
1550
1554
|
case " ":
|
|
1551
|
-
|
|
1555
|
+
w();
|
|
1552
1556
|
break;
|
|
1553
1557
|
case "ArrowDown":
|
|
1554
1558
|
case "ArrowUp":
|
|
1555
|
-
|
|
1559
|
+
v();
|
|
1556
1560
|
break;
|
|
1557
1561
|
case "Escape":
|
|
1558
|
-
|
|
1562
|
+
S();
|
|
1559
1563
|
break;
|
|
1560
1564
|
}
|
|
1561
1565
|
}, te = (I) => {
|
|
@@ -1573,14 +1577,14 @@ const Cf = {
|
|
|
1573
1577
|
}
|
|
1574
1578
|
break;
|
|
1575
1579
|
case "Escape":
|
|
1576
|
-
|
|
1580
|
+
S();
|
|
1577
1581
|
break;
|
|
1578
1582
|
}
|
|
1579
1583
|
}, Q = (I) => {
|
|
1580
1584
|
if (c.value.isOpen)
|
|
1581
1585
|
switch (I.key) {
|
|
1582
1586
|
case "Escape":
|
|
1583
|
-
|
|
1587
|
+
S();
|
|
1584
1588
|
break;
|
|
1585
1589
|
case "ArrowDown":
|
|
1586
1590
|
I.preventDefault(), ie(1);
|
|
@@ -1606,12 +1610,12 @@ const Cf = {
|
|
|
1606
1610
|
c.value.highlightedIndex = j;
|
|
1607
1611
|
};
|
|
1608
1612
|
return wn(() => {
|
|
1609
|
-
c.value.isOpen &&
|
|
1613
|
+
c.value.isOpen && S(), document.removeEventListener("keydown", Q), f();
|
|
1610
1614
|
}), (I, V) => (C(), T(be, null, [
|
|
1611
1615
|
$("div", {
|
|
1612
|
-
class:
|
|
1613
|
-
|
|
1614
|
-
|
|
1616
|
+
class: Z(["input-field-wrapper", [
|
|
1617
|
+
y.value,
|
|
1618
|
+
k.value
|
|
1615
1619
|
]])
|
|
1616
1620
|
}, [
|
|
1617
1621
|
E(I.$slots, "leading", {}, void 0, !0),
|
|
@@ -1621,10 +1625,10 @@ const Cf = {
|
|
|
1621
1625
|
$("div", {
|
|
1622
1626
|
ref_key: "selectTriggerRef",
|
|
1623
1627
|
ref: i,
|
|
1624
|
-
class:
|
|
1625
|
-
onClick:
|
|
1628
|
+
class: Z(["input-select-trigger", { "input-select-open": c.value.isOpen }]),
|
|
1629
|
+
onClick: w,
|
|
1626
1630
|
onKeydown: H,
|
|
1627
|
-
tabindex:
|
|
1631
|
+
tabindex: b.value,
|
|
1628
1632
|
role: "combobox",
|
|
1629
1633
|
"aria-expanded": c.value.isOpen,
|
|
1630
1634
|
"aria-haspopup": !0,
|
|
@@ -1635,7 +1639,7 @@ const Cf = {
|
|
|
1635
1639
|
p.value ? (C(), T("span", Ef, ee(p.value), 1)) : (C(), T("span", Af, ee(n.placeholder || "Select an option..."), 1))
|
|
1636
1640
|
]),
|
|
1637
1641
|
$("div", {
|
|
1638
|
-
class:
|
|
1642
|
+
class: Z(["input-select-arrow", { "input-select-arrow-open": c.value.isOpen }])
|
|
1639
1643
|
}, [
|
|
1640
1644
|
z(R(Rs))
|
|
1641
1645
|
], 2)
|
|
@@ -1645,13 +1649,13 @@ const Cf = {
|
|
|
1645
1649
|
])) : W("", !0),
|
|
1646
1650
|
E(I.$slots, "trailing", {}, void 0, !0)
|
|
1647
1651
|
], 2),
|
|
1648
|
-
(C(),
|
|
1652
|
+
(C(), _(hi, { to: a.value }, [
|
|
1649
1653
|
c.value.isOpen ? (C(), T("div", {
|
|
1650
1654
|
key: 0,
|
|
1651
1655
|
ref_key: "dropdownRef",
|
|
1652
1656
|
ref: s,
|
|
1653
1657
|
id: l.value,
|
|
1654
|
-
class:
|
|
1658
|
+
class: Z(["input-dropdown", { "input-dropdown--multiple": n.multiple }]),
|
|
1655
1659
|
style: Le(R(d)),
|
|
1656
1660
|
role: "listbox",
|
|
1657
1661
|
"aria-multiselectable": n.multiple,
|
|
@@ -1667,7 +1671,7 @@ const Cf = {
|
|
|
1667
1671
|
type: "search",
|
|
1668
1672
|
placeholder: g.value,
|
|
1669
1673
|
size: "sm",
|
|
1670
|
-
tabindex:
|
|
1674
|
+
tabindex: x.value,
|
|
1671
1675
|
onKeydown: te
|
|
1672
1676
|
}, {
|
|
1673
1677
|
"leading-icon": N(() => [
|
|
@@ -1687,7 +1691,7 @@ const Cf = {
|
|
|
1687
1691
|
])) : W("", !0),
|
|
1688
1692
|
(C(!0), T(be, null, Je(m.value, (j, De) => (C(), T("div", {
|
|
1689
1693
|
key: j.value,
|
|
1690
|
-
class:
|
|
1694
|
+
class: Z(["input-dropdown-option", {
|
|
1691
1695
|
"input-dropdown-option--selected": M(j),
|
|
1692
1696
|
"input-dropdown-option--highlighted": De === c.value.highlightedIndex,
|
|
1693
1697
|
"input-dropdown-option--disabled": j.disabled,
|
|
@@ -1756,7 +1760,7 @@ const Cf = {
|
|
|
1756
1760
|
},
|
|
1757
1761
|
emits: ["update:modelValue", "file-error", "clear-preview", "blur", "focus"],
|
|
1758
1762
|
setup(n, { emit: e }) {
|
|
1759
|
-
const t = n, r = e, i =
|
|
1763
|
+
const t = n, r = e, i = X(), s = X(!1), o = X(null), l = X([]), a = L(() => t.preview ? t.preview : o.value);
|
|
1760
1764
|
L(() => !!t.preview);
|
|
1761
1765
|
const c = L(() => t.preview ? t.preview : null), d = L(() => {
|
|
1762
1766
|
const M = [];
|
|
@@ -1802,23 +1806,23 @@ const Cf = {
|
|
|
1802
1806
|
if (M === 0) return "0 Bytes";
|
|
1803
1807
|
const D = 1024, H = ["Bytes", "KB", "MB", "GB"], te = Math.floor(Math.log(M) / Math.log(D));
|
|
1804
1808
|
return parseFloat((M / Math.pow(D, te)).toFixed(2)) + " " + H[te];
|
|
1805
|
-
},
|
|
1809
|
+
}, b = () => {
|
|
1806
1810
|
!t.disabled && i.value && i.value.click();
|
|
1807
|
-
},
|
|
1811
|
+
}, x = (M) => {
|
|
1808
1812
|
const D = M.target, H = Array.from(D.files || []);
|
|
1809
1813
|
H.length > 0 && h(H);
|
|
1810
|
-
},
|
|
1814
|
+
}, y = (M) => {
|
|
1811
1815
|
t.disabled || (s.value = !0);
|
|
1812
|
-
}, b = (M) => {
|
|
1813
|
-
s.value = !1;
|
|
1814
1816
|
}, k = (M) => {
|
|
1817
|
+
s.value = !1;
|
|
1818
|
+
}, v = (M) => {
|
|
1815
1819
|
if (t.disabled) return;
|
|
1816
1820
|
s.value = !1;
|
|
1817
1821
|
const D = Array.from(M.dataTransfer?.files || []);
|
|
1818
1822
|
D.length > 0 && h(D);
|
|
1819
|
-
},
|
|
1823
|
+
}, S = (M) => {
|
|
1820
1824
|
r("blur", M);
|
|
1821
|
-
},
|
|
1825
|
+
}, w = (M) => {
|
|
1822
1826
|
r("focus", M);
|
|
1823
1827
|
};
|
|
1824
1828
|
return ht(() => t.modelValue, (M) => {
|
|
@@ -1826,7 +1830,7 @@ const Cf = {
|
|
|
1826
1830
|
}, { immediate: !0 }), wn(() => {
|
|
1827
1831
|
o.value && URL.revokeObjectURL(o.value);
|
|
1828
1832
|
}), (M, D) => (C(), T("div", {
|
|
1829
|
-
class:
|
|
1833
|
+
class: Z(["input-field-wrapper", [
|
|
1830
1834
|
d.value,
|
|
1831
1835
|
u.value
|
|
1832
1836
|
]])
|
|
@@ -1838,17 +1842,17 @@ const Cf = {
|
|
|
1838
1842
|
src: a.value,
|
|
1839
1843
|
alt: "Preview",
|
|
1840
1844
|
class: "input-file-preview"
|
|
1841
|
-
}, null, 8, Hf)) : t.hasLeadingIcon ? E(M.$slots, "leading-icon", { key: 1 }, void 0, !0) : (C(),
|
|
1845
|
+
}, null, 8, Hf)) : t.hasLeadingIcon ? E(M.$slots, "leading-icon", { key: 1 }, void 0, !0) : (C(), _(R(Xu), { key: 2 }))
|
|
1842
1846
|
]),
|
|
1843
1847
|
$("div", {
|
|
1844
|
-
class:
|
|
1848
|
+
class: Z(["input-file-area", {
|
|
1845
1849
|
"input-file-dragover": s.value,
|
|
1846
1850
|
"input-file-disabled": n.disabled
|
|
1847
1851
|
}]),
|
|
1848
|
-
onClick:
|
|
1849
|
-
onDragover: cn(
|
|
1850
|
-
onDragleave: cn(
|
|
1851
|
-
onDrop: cn(
|
|
1852
|
+
onClick: b,
|
|
1853
|
+
onDragover: cn(y, ["prevent"]),
|
|
1854
|
+
onDragleave: cn(k, ["prevent"]),
|
|
1855
|
+
onDrop: cn(v, ["prevent"])
|
|
1852
1856
|
}, [
|
|
1853
1857
|
$("input", {
|
|
1854
1858
|
ref_key: "fileInputRef",
|
|
@@ -1860,9 +1864,9 @@ const Cf = {
|
|
|
1860
1864
|
disabled: n.disabled,
|
|
1861
1865
|
required: n.required,
|
|
1862
1866
|
class: "input-file-hidden",
|
|
1863
|
-
onChange:
|
|
1864
|
-
onBlur:
|
|
1865
|
-
onFocus:
|
|
1867
|
+
onChange: x,
|
|
1868
|
+
onBlur: S,
|
|
1869
|
+
onFocus: w
|
|
1866
1870
|
}, null, 40, jf),
|
|
1867
1871
|
$("div", qf, [
|
|
1868
1872
|
c.value && l.value.length === 0 ? (C(), T("div", Uf, [
|
|
@@ -1925,14 +1929,14 @@ const Cf = {
|
|
|
1925
1929
|
emits: ["update:modelValue"],
|
|
1926
1930
|
setup(n, { emit: e }) {
|
|
1927
1931
|
const t = n, r = e, i = xn(), s = L(() => !!i.content), o = L(
|
|
1928
|
-
() => t.tabs.find((
|
|
1929
|
-
), l =
|
|
1932
|
+
() => t.tabs.find((y) => y.value === t.modelValue)
|
|
1933
|
+
), l = X([]), a = X(!1), c = X({
|
|
1930
1934
|
width: "0px",
|
|
1931
1935
|
height: "0px",
|
|
1932
1936
|
left: "0px",
|
|
1933
1937
|
top: "0px",
|
|
1934
1938
|
opacity: "0"
|
|
1935
|
-
}), d =
|
|
1939
|
+
}), d = X({
|
|
1936
1940
|
width: "0px",
|
|
1937
1941
|
height: "0px",
|
|
1938
1942
|
left: "0px",
|
|
@@ -1940,15 +1944,15 @@ const Cf = {
|
|
|
1940
1944
|
opacity: "0"
|
|
1941
1945
|
});
|
|
1942
1946
|
let u = -1, f = !1;
|
|
1943
|
-
const h = (
|
|
1944
|
-
const
|
|
1947
|
+
const h = (y, k) => {
|
|
1948
|
+
const v = y.getBoundingClientRect(), S = k.getBoundingClientRect(), w = getComputedStyle(k), M = parseFloat(w.getPropertyValue("--underline-thickness") || "5");
|
|
1945
1949
|
let D = 5;
|
|
1946
1950
|
t.size === "sm" ? D = 4 : t.size === "lg" && (D = 6);
|
|
1947
|
-
const H =
|
|
1951
|
+
const H = S.height;
|
|
1948
1952
|
if (t.orientation === "vertical") {
|
|
1949
|
-
const te =
|
|
1953
|
+
const te = v.top - S.top;
|
|
1950
1954
|
return {
|
|
1951
|
-
height:
|
|
1955
|
+
height: v.height - D * 4,
|
|
1952
1956
|
// More padding for shorter underline
|
|
1953
1957
|
top: te + D * 2,
|
|
1954
1958
|
// Better centering with more offset
|
|
@@ -1958,7 +1962,7 @@ const Cf = {
|
|
|
1958
1962
|
// Position at container left edge
|
|
1959
1963
|
};
|
|
1960
1964
|
} else {
|
|
1961
|
-
const te =
|
|
1965
|
+
const te = v.left - S.left, Q = v.width;
|
|
1962
1966
|
if (t.underlineWidth === "full")
|
|
1963
1967
|
return {
|
|
1964
1968
|
width: Q - 30,
|
|
@@ -1988,33 +1992,33 @@ const Cf = {
|
|
|
1988
1992
|
// Position near bottom of container
|
|
1989
1993
|
};
|
|
1990
1994
|
}
|
|
1991
|
-
}, p = async (
|
|
1992
|
-
f || (r("update:modelValue",
|
|
1993
|
-
}, m = async (
|
|
1994
|
-
if (!l.value[
|
|
1995
|
+
}, p = async (y, k) => {
|
|
1996
|
+
f || (r("update:modelValue", y), await $e(), m(k));
|
|
1997
|
+
}, m = async (y) => {
|
|
1998
|
+
if (!l.value[y] || y === u) return;
|
|
1995
1999
|
f = !0;
|
|
1996
|
-
const
|
|
1997
|
-
if (!
|
|
1998
|
-
const
|
|
2000
|
+
const k = l.value[y], v = k.parentElement;
|
|
2001
|
+
if (!v) return;
|
|
2002
|
+
const S = h(k, v), w = k.getBoundingClientRect(), M = v.getBoundingClientRect();
|
|
1999
2003
|
let D, H;
|
|
2000
|
-
if (t.orientation === "vertical" ? (D =
|
|
2004
|
+
if (t.orientation === "vertical" ? (D = w.top - M.top, H = w.height) : (D = w.left - M.left, H = w.width), u === -1) {
|
|
2001
2005
|
t.orientation === "vertical" ? (c.value = {
|
|
2002
|
-
height: `${
|
|
2003
|
-
top: `${
|
|
2004
|
-
width: `${
|
|
2005
|
-
left: `${
|
|
2006
|
+
height: `${S.height}px`,
|
|
2007
|
+
top: `${S.top}px`,
|
|
2008
|
+
width: `${S.width}px`,
|
|
2009
|
+
left: `${S.left}px`,
|
|
2006
2010
|
opacity: "1"
|
|
2007
2011
|
}, d.value = {
|
|
2008
2012
|
height: `${H}px`,
|
|
2009
2013
|
top: `${D}px`,
|
|
2010
|
-
width: `${
|
|
2014
|
+
width: `${w.width}px`,
|
|
2011
2015
|
left: "0",
|
|
2012
2016
|
opacity: "1"
|
|
2013
2017
|
}) : (c.value = {
|
|
2014
|
-
width: `${
|
|
2015
|
-
left: `${
|
|
2016
|
-
height: `${
|
|
2017
|
-
top: `${
|
|
2018
|
+
width: `${S.width}px`,
|
|
2019
|
+
left: `${S.left}px`,
|
|
2020
|
+
height: `${S.height}px`,
|
|
2021
|
+
top: `${S.top}px`,
|
|
2018
2022
|
opacity: "1"
|
|
2019
2023
|
}, d.value = {
|
|
2020
2024
|
width: `${H}px`,
|
|
@@ -2022,16 +2026,16 @@ const Cf = {
|
|
|
2022
2026
|
height: "100%",
|
|
2023
2027
|
top: "0",
|
|
2024
2028
|
opacity: "1"
|
|
2025
|
-
}), u =
|
|
2029
|
+
}), u = y, f = !1;
|
|
2026
2030
|
return;
|
|
2027
2031
|
}
|
|
2028
2032
|
const te = l.value[u];
|
|
2029
|
-
if (h(te,
|
|
2033
|
+
if (h(te, v), te.getBoundingClientRect(), window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
2030
2034
|
c.value = {
|
|
2031
|
-
width: `${
|
|
2032
|
-
left: `${
|
|
2033
|
-
height: `${
|
|
2034
|
-
top: `${
|
|
2035
|
+
width: `${S.width || 0}px`,
|
|
2036
|
+
left: `${S.left || 0}px`,
|
|
2037
|
+
height: `${S.height || 7}px`,
|
|
2038
|
+
top: `${S.top}px`,
|
|
2035
2039
|
opacity: "1"
|
|
2036
2040
|
}, t.orientation === "vertical" ? d.value = {
|
|
2037
2041
|
height: `${H}px`,
|
|
@@ -2045,15 +2049,15 @@ const Cf = {
|
|
|
2045
2049
|
height: "100%",
|
|
2046
2050
|
top: "0",
|
|
2047
2051
|
opacity: "1"
|
|
2048
|
-
}, u =
|
|
2052
|
+
}, u = y, f = !1;
|
|
2049
2053
|
return;
|
|
2050
2054
|
}
|
|
2051
2055
|
requestAnimationFrame(() => {
|
|
2052
2056
|
t.orientation === "vertical" ? (c.value = {
|
|
2053
|
-
height: `${
|
|
2054
|
-
top: `${
|
|
2055
|
-
width: `${
|
|
2056
|
-
left: `${
|
|
2057
|
+
height: `${S.height}px`,
|
|
2058
|
+
top: `${S.top}px`,
|
|
2059
|
+
width: `${S.width || 7}px`,
|
|
2060
|
+
left: `${S.left}px`,
|
|
2057
2061
|
opacity: "1"
|
|
2058
2062
|
}, d.value = {
|
|
2059
2063
|
height: `${H}px`,
|
|
@@ -2062,10 +2066,10 @@ const Cf = {
|
|
|
2062
2066
|
left: "0",
|
|
2063
2067
|
opacity: "1"
|
|
2064
2068
|
}) : (c.value = {
|
|
2065
|
-
width: `${
|
|
2066
|
-
left: `${
|
|
2067
|
-
height: `${
|
|
2068
|
-
top: `${
|
|
2069
|
+
width: `${S.width}px`,
|
|
2070
|
+
left: `${S.left}px`,
|
|
2071
|
+
height: `${S.height || 7}px`,
|
|
2072
|
+
top: `${S.top}px`,
|
|
2069
2073
|
opacity: "1"
|
|
2070
2074
|
}, d.value = {
|
|
2071
2075
|
width: `${H}px`,
|
|
@@ -2073,26 +2077,26 @@ const Cf = {
|
|
|
2073
2077
|
height: "100%",
|
|
2074
2078
|
top: "0",
|
|
2075
2079
|
opacity: "1"
|
|
2076
|
-
}), u =
|
|
2080
|
+
}), u = y, setTimeout(() => {
|
|
2077
2081
|
f = !1;
|
|
2078
2082
|
}, 200);
|
|
2079
2083
|
});
|
|
2080
2084
|
};
|
|
2081
2085
|
let g = null;
|
|
2082
|
-
const
|
|
2083
|
-
const
|
|
2084
|
-
if (
|
|
2085
|
-
const
|
|
2086
|
+
const b = () => {
|
|
2087
|
+
const y = t.tabs.findIndex((k) => k.value === t.modelValue);
|
|
2088
|
+
if (y !== -1 && l.value && l.value[y]) {
|
|
2089
|
+
const k = a.value;
|
|
2086
2090
|
a.value = !1;
|
|
2087
|
-
const
|
|
2088
|
-
if (
|
|
2089
|
-
const
|
|
2091
|
+
const v = l.value[y], S = v.parentElement;
|
|
2092
|
+
if (S) {
|
|
2093
|
+
const w = h(v, S), M = v.getBoundingClientRect(), D = S.getBoundingClientRect();
|
|
2090
2094
|
let H, te;
|
|
2091
2095
|
t.orientation === "vertical" ? (H = M.top - D.top, te = M.height, c.value = {
|
|
2092
|
-
height: `${
|
|
2093
|
-
top: `${
|
|
2094
|
-
width: `${
|
|
2095
|
-
left: `${
|
|
2096
|
+
height: `${w.height}px`,
|
|
2097
|
+
top: `${w.top}px`,
|
|
2098
|
+
width: `${w.width}px`,
|
|
2099
|
+
left: `${w.left}px`,
|
|
2096
2100
|
opacity: "1"
|
|
2097
2101
|
}, d.value = {
|
|
2098
2102
|
height: `${te}px`,
|
|
@@ -2101,10 +2105,10 @@ const Cf = {
|
|
|
2101
2105
|
left: "0",
|
|
2102
2106
|
opacity: "1"
|
|
2103
2107
|
}) : (H = M.left - D.left, te = M.width, c.value = {
|
|
2104
|
-
width: `${
|
|
2105
|
-
left: `${
|
|
2106
|
-
height: `${
|
|
2107
|
-
top: `${
|
|
2108
|
+
width: `${w.width}px`,
|
|
2109
|
+
left: `${w.left}px`,
|
|
2110
|
+
height: `${w.height}px`,
|
|
2111
|
+
top: `${w.top}px`,
|
|
2108
2112
|
opacity: "1"
|
|
2109
2113
|
}, d.value = {
|
|
2110
2114
|
width: `${te}px`,
|
|
@@ -2114,8 +2118,8 @@ const Cf = {
|
|
|
2114
2118
|
opacity: "1"
|
|
2115
2119
|
});
|
|
2116
2120
|
}
|
|
2117
|
-
u =
|
|
2118
|
-
a.value =
|
|
2121
|
+
u = y, f = !1, setTimeout(() => {
|
|
2122
|
+
a.value = k;
|
|
2119
2123
|
}, 10);
|
|
2120
2124
|
}
|
|
2121
2125
|
g && clearTimeout(g), g = setTimeout(() => {
|
|
@@ -2124,20 +2128,20 @@ const Cf = {
|
|
|
2124
2128
|
};
|
|
2125
2129
|
er(async () => {
|
|
2126
2130
|
await $e();
|
|
2127
|
-
const
|
|
2128
|
-
|
|
2131
|
+
const y = t.tabs.findIndex((k) => k.value === t.modelValue);
|
|
2132
|
+
y !== -1 && (m(y), setTimeout(() => {
|
|
2129
2133
|
a.value = !0;
|
|
2130
|
-
}, 50)), window.addEventListener("resize",
|
|
2134
|
+
}, 50)), window.addEventListener("resize", b);
|
|
2131
2135
|
}), wn(() => {
|
|
2132
|
-
window.removeEventListener("resize",
|
|
2136
|
+
window.removeEventListener("resize", b), g && (clearTimeout(g), g = null);
|
|
2133
2137
|
});
|
|
2134
|
-
const { modelValue:
|
|
2135
|
-
return ht(
|
|
2138
|
+
const { modelValue: x } = Ud(t);
|
|
2139
|
+
return ht(x, async () => {
|
|
2136
2140
|
await $e();
|
|
2137
|
-
const
|
|
2138
|
-
|
|
2139
|
-
}), (
|
|
2140
|
-
class:
|
|
2141
|
+
const y = t.tabs.findIndex((k) => k.value === t.modelValue);
|
|
2142
|
+
y !== -1 && m(y);
|
|
2143
|
+
}), (y, k) => (C(), T("div", {
|
|
2144
|
+
class: Z(["tabs-container", [
|
|
2141
2145
|
`tabs-container--${n.orientation}`,
|
|
2142
2146
|
`tabs-container--${n.size}`,
|
|
2143
2147
|
`tabs-container--${n.variant}`,
|
|
@@ -2146,59 +2150,59 @@ const Cf = {
|
|
|
2146
2150
|
}, [
|
|
2147
2151
|
$("div", oh, [
|
|
2148
2152
|
$("div", {
|
|
2149
|
-
class:
|
|
2153
|
+
class: Z(["tabs-list", [
|
|
2150
2154
|
`tabs-list--${n.orientation}`,
|
|
2151
2155
|
`tabs-list--${n.size}`,
|
|
2152
2156
|
`tabs-list--${n.variant}`
|
|
2153
2157
|
]]),
|
|
2154
2158
|
style: Le(n.sticky ? { position: "sticky", [n.sticky.side]: `${n.sticky.offset}px`, zIndex: 10 } : {})
|
|
2155
2159
|
}, [
|
|
2156
|
-
|
|
2157
|
-
E(
|
|
2160
|
+
y.$slots.before ? (C(), T("div", lh, [
|
|
2161
|
+
E(y.$slots, "before", {}, void 0, !0)
|
|
2158
2162
|
])) : W("", !0),
|
|
2159
2163
|
$("div", {
|
|
2160
|
-
class:
|
|
2164
|
+
class: Z(["tabs-buttons-wrapper", `tabs-buttons-wrapper--${n.tabWidth}`]),
|
|
2161
2165
|
role: "tablist"
|
|
2162
2166
|
}, [
|
|
2163
|
-
(C(!0), T(be, null, Je(n.tabs, (
|
|
2164
|
-
key:
|
|
2167
|
+
(C(!0), T(be, null, Je(n.tabs, (v, S) => (C(), T("button", {
|
|
2168
|
+
key: v.value,
|
|
2165
2169
|
ref_for: !0,
|
|
2166
2170
|
ref_key: "tabButtons",
|
|
2167
2171
|
ref: l,
|
|
2168
|
-
class:
|
|
2172
|
+
class: Z(["tab-button", [
|
|
2169
2173
|
`tab-button--${n.size}`,
|
|
2170
2174
|
`tab-button--${n.variant}`,
|
|
2171
2175
|
`tab-button--${n.tabWidth}`,
|
|
2172
|
-
{ "tab-button-active": R(
|
|
2176
|
+
{ "tab-button-active": R(x) === v.value }
|
|
2173
2177
|
]]),
|
|
2174
|
-
"aria-selected": R(
|
|
2178
|
+
"aria-selected": R(x) === v.value,
|
|
2175
2179
|
"aria-controls": "tabpanel",
|
|
2176
|
-
id: `tab-${
|
|
2180
|
+
id: `tab-${v.value}`,
|
|
2177
2181
|
role: "tab",
|
|
2178
|
-
onClick: (
|
|
2179
|
-
}, ee(
|
|
2182
|
+
onClick: (w) => p(v.value, S)
|
|
2183
|
+
}, ee(v.label), 11, ah))), 128)),
|
|
2180
2184
|
$("div", {
|
|
2181
|
-
class:
|
|
2185
|
+
class: Z(["tab-background", { "no-transition": !a.value }]),
|
|
2182
2186
|
style: Le(d.value)
|
|
2183
2187
|
}, null, 6),
|
|
2184
2188
|
$("div", {
|
|
2185
|
-
class:
|
|
2189
|
+
class: Z(["tab-underline", { "no-transition": !a.value }]),
|
|
2186
2190
|
style: Le(c.value)
|
|
2187
2191
|
}, null, 6)
|
|
2188
2192
|
], 2),
|
|
2189
|
-
|
|
2190
|
-
E(
|
|
2193
|
+
y.$slots.after ? (C(), T("div", ch, [
|
|
2194
|
+
E(y.$slots, "after", {}, void 0, !0)
|
|
2191
2195
|
])) : W("", !0)
|
|
2192
2196
|
], 6)
|
|
2193
2197
|
]),
|
|
2194
2198
|
s.value ? (C(), T("div", {
|
|
2195
2199
|
key: 0,
|
|
2196
|
-
class:
|
|
2200
|
+
class: Z(["tabs-content", `tabs-content--${n.orientation}`]),
|
|
2197
2201
|
role: "tabpanel",
|
|
2198
|
-
"aria-labelledby": `tab-${R(
|
|
2202
|
+
"aria-labelledby": `tab-${R(x)}`,
|
|
2199
2203
|
id: "tabpanel"
|
|
2200
2204
|
}, [
|
|
2201
|
-
E(
|
|
2205
|
+
E(y.$slots, "content", { activeTab: o.value }, void 0, !0)
|
|
2202
2206
|
], 10, dh)) : W("", !0)
|
|
2203
2207
|
], 2));
|
|
2204
2208
|
}
|
|
@@ -2223,7 +2227,7 @@ const Cf = {
|
|
|
2223
2227
|
return e.orientation === "horizontal" ? (s.width = e.spacing === "auto" ? "100%" : typeof e.spacing == "number" ? `${e.spacing}px` : e.spacing, s.marginTop = typeof e.margin == "number" ? `${e.margin}px` : e.margin, s.marginBottom = typeof e.margin == "number" ? `${e.margin}px` : e.margin, r.value || (s.height = typeof e.thickness == "number" ? `${e.thickness}px` : e.thickness), s["--divider-color"] = e.color === "#e5e7eb" ? "var(--accui-divider-color)" : e.color, s["--divider-thickness"] = typeof e.thickness == "number" ? `${e.thickness}px` : e.thickness) : (s.height = e.spacing === "auto" ? "100%" : typeof e.spacing == "number" ? `${e.spacing}px` : e.spacing, s.marginLeft = typeof e.margin == "number" ? `${e.margin}px` : e.margin, s.marginRight = typeof e.margin == "number" ? `${e.margin}px` : e.margin, r.value || (s.width = typeof e.thickness == "number" ? `${e.thickness}px` : e.thickness), s["--divider-color"] = e.color === "#e5e7eb" ? "var(--accui-divider-color)" : e.color, s["--divider-thickness"] = typeof e.thickness == "number" ? `${e.thickness}px` : e.thickness), s;
|
|
2224
2228
|
});
|
|
2225
2229
|
return (s, o) => (C(), T("div", {
|
|
2226
|
-
class:
|
|
2230
|
+
class: Z([
|
|
2227
2231
|
"ui-divider",
|
|
2228
2232
|
`ui-divider--${n.orientation}`,
|
|
2229
2233
|
`ui-divider--${n.variant}`,
|
|
@@ -2278,7 +2282,7 @@ const Cf = {
|
|
|
2278
2282
|
},
|
|
2279
2283
|
emits: ["update:modelValue", "change"],
|
|
2280
2284
|
setup(n, { emit: e }) {
|
|
2281
|
-
const t = n, r = e, i =
|
|
2285
|
+
const t = n, r = e, i = X(), s = X(), o = X(!1), {
|
|
2282
2286
|
floatingStyle: l,
|
|
2283
2287
|
updatePosition: a,
|
|
2284
2288
|
cleanup: c
|
|
@@ -2302,7 +2306,7 @@ const Cf = {
|
|
|
2302
2306
|
o.value = !1;
|
|
2303
2307
|
}, f = () => {
|
|
2304
2308
|
o.value ? u() : d();
|
|
2305
|
-
}, h =
|
|
2309
|
+
}, h = X(t.type === "time" ? "time" : "date"), p = X((/* @__PURE__ */ new Date()).getMonth()), m = X((/* @__PURE__ */ new Date()).getFullYear()), g = X((/* @__PURE__ */ new Date()).getHours()), b = X((/* @__PURE__ */ new Date()).getMinutes()), x = X("AM"), y = [
|
|
2306
2310
|
"January",
|
|
2307
2311
|
"February",
|
|
2308
2312
|
"March",
|
|
@@ -2315,7 +2319,7 @@ const Cf = {
|
|
|
2315
2319
|
"October",
|
|
2316
2320
|
"November",
|
|
2317
2321
|
"December"
|
|
2318
|
-
],
|
|
2322
|
+
], k = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], v = L(() => t.min ? t.min instanceof Date ? t.min : new Date(t.min) : null), S = L(() => t.max ? t.max instanceof Date ? t.max : new Date(t.max) : null), w = L(() => {
|
|
2319
2323
|
if (!t.modelValue) return null;
|
|
2320
2324
|
if (t.modelValue instanceof Date)
|
|
2321
2325
|
return t.modelValue;
|
|
@@ -2328,8 +2332,8 @@ const Cf = {
|
|
|
2328
2332
|
}
|
|
2329
2333
|
return new Date(t.modelValue);
|
|
2330
2334
|
}), M = L(() => {
|
|
2331
|
-
if (!
|
|
2332
|
-
const q =
|
|
2335
|
+
if (!w.value || isNaN(w.value.getTime())) return "";
|
|
2336
|
+
const q = w.value;
|
|
2333
2337
|
if (t.type === "time") {
|
|
2334
2338
|
if (t.is24Hour)
|
|
2335
2339
|
return `${String(q.getHours()).padStart(2, "0")}:${String(q.getMinutes()).padStart(2, "0")}`;
|
|
@@ -2378,11 +2382,11 @@ const Cf = {
|
|
|
2378
2382
|
q.push(F);
|
|
2379
2383
|
return q;
|
|
2380
2384
|
}), V = L(() => {
|
|
2381
|
-
const q = (/* @__PURE__ */ new Date()).getFullYear(), F =
|
|
2385
|
+
const q = (/* @__PURE__ */ new Date()).getFullYear(), F = v.value?.getFullYear() || q - 100, B = S.value?.getFullYear() || q + 100, ne = [];
|
|
2382
2386
|
for (let Be = F; Be <= B; Be++)
|
|
2383
2387
|
ne.push(Be);
|
|
2384
2388
|
return ne;
|
|
2385
|
-
}), j = L(() =>
|
|
2389
|
+
}), j = L(() => v.value ? new Date(m.value, p.value, 1) <= v.value : !1), De = L(() => S.value ? new Date(m.value, p.value + 1, 0) >= S.value : !1), Oi = L(() => {
|
|
2386
2390
|
const q = [], F = m.value, B = p.value, ne = new Date(F, B, 1), Be = new Date(ne);
|
|
2387
2391
|
Be.setDate(Be.getDate() - ne.getDay());
|
|
2388
2392
|
const tn = /* @__PURE__ */ new Date();
|
|
@@ -2390,7 +2394,7 @@ const Cf = {
|
|
|
2390
2394
|
for (let $t = 0; $t < 42; $t++) {
|
|
2391
2395
|
const ve = new Date(Be);
|
|
2392
2396
|
ve.setDate(Be.getDate() + $t);
|
|
2393
|
-
const Bd = ve.getMonth() !== B, Vd = ve.getTime() === tn.getTime(), Fd =
|
|
2397
|
+
const Bd = ve.getMonth() !== B, Vd = ve.getTime() === tn.getTime(), Fd = w.value && ve.getFullYear() === w.value.getFullYear() && ve.getMonth() === w.value.getMonth() && ve.getDate() === w.value.getDate(), Hd = !!(v.value && ve < v.value || S.value && ve > S.value);
|
|
2394
2398
|
q.push({
|
|
2395
2399
|
key: `${ve.getFullYear()}-${ve.getMonth()}-${ve.getDate()}`,
|
|
2396
2400
|
date: ve.getDate(),
|
|
@@ -2418,7 +2422,7 @@ const Cf = {
|
|
|
2418
2422
|
p.value === 11 ? (p.value = 0, m.value++) : p.value++;
|
|
2419
2423
|
}, Pd = (q) => {
|
|
2420
2424
|
if (q.isDisabled || q.otherMonth) return;
|
|
2421
|
-
const F =
|
|
2425
|
+
const F = w.value || /* @__PURE__ */ new Date(), B = new Date(
|
|
2422
2426
|
q.year,
|
|
2423
2427
|
q.month,
|
|
2424
2428
|
q.date,
|
|
@@ -2427,25 +2431,25 @@ const Cf = {
|
|
|
2427
2431
|
);
|
|
2428
2432
|
r("update:modelValue", B), r("change", B), t.type === "datetime" ? h.value = "time" : t.type === "date" && u();
|
|
2429
2433
|
}, sr = (q, F) => {
|
|
2430
|
-
let B =
|
|
2431
|
-
if (!
|
|
2434
|
+
let B = w.value ? new Date(w.value) : /* @__PURE__ */ new Date();
|
|
2435
|
+
if (!w.value) {
|
|
2432
2436
|
const ne = /* @__PURE__ */ new Date();
|
|
2433
2437
|
B.setFullYear(ne.getFullYear(), ne.getMonth(), ne.getDate());
|
|
2434
2438
|
}
|
|
2435
2439
|
if (q === "hour") {
|
|
2436
2440
|
let ne = F;
|
|
2437
|
-
t.is24Hour || (
|
|
2441
|
+
t.is24Hour || (x.value === "PM" && ne !== 12 && (ne += 12), x.value === "AM" && ne === 12 && (ne = 0)), g.value = F, B.setHours(ne);
|
|
2438
2442
|
} else if (q === "minute")
|
|
2439
|
-
|
|
2443
|
+
b.value = F, B.setMinutes(F);
|
|
2440
2444
|
else if (q === "period") {
|
|
2441
|
-
|
|
2445
|
+
x.value = F;
|
|
2442
2446
|
let ne = g.value;
|
|
2443
2447
|
F === "PM" && ne !== 12 && (ne += 12), F === "AM" && ne === 12 && (ne = 0), B.setHours(ne);
|
|
2444
2448
|
}
|
|
2445
2449
|
r("update:modelValue", B), r("change", B);
|
|
2446
2450
|
}, zd = () => {
|
|
2447
2451
|
const q = /* @__PURE__ */ new Date();
|
|
2448
|
-
|
|
2452
|
+
v.value && q < v.value || S.value && q > S.value || (r("update:modelValue", q), r("change", q), u());
|
|
2449
2453
|
}, So = () => {
|
|
2450
2454
|
r("update:modelValue", null), r("change", null);
|
|
2451
2455
|
};
|
|
@@ -2457,9 +2461,9 @@ const Cf = {
|
|
|
2457
2461
|
g.value = F.getHours();
|
|
2458
2462
|
else {
|
|
2459
2463
|
const B = F.getHours();
|
|
2460
|
-
g.value = B % 12 || 12,
|
|
2464
|
+
g.value = B % 12 || 12, x.value = B >= 12 ? "PM" : "AM";
|
|
2461
2465
|
}
|
|
2462
|
-
|
|
2466
|
+
b.value = F.getMinutes();
|
|
2463
2467
|
}
|
|
2464
2468
|
}
|
|
2465
2469
|
}, { immediate: !0 }), wn(() => {
|
|
@@ -2468,14 +2472,14 @@ const Cf = {
|
|
|
2468
2472
|
$("div", {
|
|
2469
2473
|
ref_key: "triggerElement",
|
|
2470
2474
|
ref: i,
|
|
2471
|
-
class:
|
|
2475
|
+
class: Z(["datetime-picker-trigger", [
|
|
2472
2476
|
D.value,
|
|
2473
2477
|
{ "datetime-picker-open": o.value }
|
|
2474
2478
|
]]),
|
|
2475
2479
|
onClick: f
|
|
2476
2480
|
}, [
|
|
2477
2481
|
$("div", mh, [
|
|
2478
|
-
n.type === "date" ? (C(),
|
|
2482
|
+
n.type === "date" ? (C(), _(R(qu), { key: 0 })) : n.type === "time" ? (C(), _(R(Ju), { key: 1 })) : (C(), _(R(ju), { key: 2 }))
|
|
2479
2483
|
]),
|
|
2480
2484
|
$("div", gh, [
|
|
2481
2485
|
M.value ? (C(), T("span", yh, ee(M.value), 1)) : (C(), T("span", bh, ee(n.placeholder || $d()), 1))
|
|
@@ -2490,7 +2494,7 @@ const Cf = {
|
|
|
2490
2494
|
z(R(Rs))
|
|
2491
2495
|
]))
|
|
2492
2496
|
], 2),
|
|
2493
|
-
(C(),
|
|
2497
|
+
(C(), _(hi, { to: "body" }, [
|
|
2494
2498
|
o.value ? (C(), T("div", {
|
|
2495
2499
|
key: 0,
|
|
2496
2500
|
ref_key: "floatingElement",
|
|
@@ -2498,7 +2502,7 @@ const Cf = {
|
|
|
2498
2502
|
class: "datetime-picker-dropdown",
|
|
2499
2503
|
style: Le(R(l))
|
|
2500
2504
|
}, [
|
|
2501
|
-
n.type === "datetime" ? (C(),
|
|
2505
|
+
n.type === "datetime" ? (C(), _(zs, {
|
|
2502
2506
|
key: 0,
|
|
2503
2507
|
modelValue: h.value,
|
|
2504
2508
|
"onUpdate:modelValue": F[0] || (F[0] = (B) => h.value = B),
|
|
@@ -2527,7 +2531,7 @@ const Cf = {
|
|
|
2527
2531
|
"onUpdate:modelValue": F[1] || (F[1] = (B) => p.value = B),
|
|
2528
2532
|
class: "datetime-picker-select"
|
|
2529
2533
|
}, [
|
|
2530
|
-
(C(), T(be, null, Je(
|
|
2534
|
+
(C(), T(be, null, Je(y, (B, ne) => $("option", {
|
|
2531
2535
|
key: ne,
|
|
2532
2536
|
value: ne
|
|
2533
2537
|
}, ee(B), 9, Sh)), 64))
|
|
@@ -2561,18 +2565,18 @@ const Cf = {
|
|
|
2561
2565
|
}, 8, ["disabled"])
|
|
2562
2566
|
]),
|
|
2563
2567
|
$("div", Mh, [
|
|
2564
|
-
(C(), T(be, null, Je(
|
|
2568
|
+
(C(), T(be, null, Je(k, (B) => $("div", {
|
|
2565
2569
|
key: B,
|
|
2566
2570
|
class: "datetime-picker-weekday"
|
|
2567
2571
|
}, ee(B), 1)), 64))
|
|
2568
2572
|
]),
|
|
2569
2573
|
$("div", Th, [
|
|
2570
|
-
(C(!0), T(be, null, Je(Oi.value, (B) => (C(),
|
|
2574
|
+
(C(!0), T(be, null, Je(Oi.value, (B) => (C(), _(re, {
|
|
2571
2575
|
key: B.key,
|
|
2572
2576
|
color: B.isSelected || B.isToday ? "primary" : "secondary",
|
|
2573
2577
|
variant: B.isSelected ? "primary" : B.isToday ? "outline" : "primary",
|
|
2574
2578
|
disabled: B.isDisabled || B.otherMonth,
|
|
2575
|
-
class:
|
|
2579
|
+
class: Z([
|
|
2576
2580
|
"datetime-picker-day",
|
|
2577
2581
|
{
|
|
2578
2582
|
"datetime-picker-day-other": B.otherMonth,
|
|
@@ -2595,7 +2599,7 @@ const Cf = {
|
|
|
2595
2599
|
$("div", Oh, [
|
|
2596
2600
|
F[6] || (F[6] = $("label", { class: "time-label" }, "Hour", -1)),
|
|
2597
2601
|
$("div", Nh, [
|
|
2598
|
-
(C(!0), T(be, null, Je(ie.value, (B) => (C(),
|
|
2602
|
+
(C(!0), T(be, null, Je(ie.value, (B) => (C(), _(re, {
|
|
2599
2603
|
key: B,
|
|
2600
2604
|
color: g.value === B ? "primary" : "secondary",
|
|
2601
2605
|
variant: g.value === B ? "primary" : "ghost",
|
|
@@ -2613,10 +2617,10 @@ const Cf = {
|
|
|
2613
2617
|
$("div", Ih, [
|
|
2614
2618
|
F[7] || (F[7] = $("label", { class: "time-label" }, "Minute", -1)),
|
|
2615
2619
|
$("div", Dh, [
|
|
2616
|
-
(C(!0), T(be, null, Je(I.value, (B) => (C(),
|
|
2620
|
+
(C(!0), T(be, null, Je(I.value, (B) => (C(), _(re, {
|
|
2617
2621
|
key: B,
|
|
2618
|
-
color:
|
|
2619
|
-
variant:
|
|
2622
|
+
color: b.value === B ? "primary" : "secondary",
|
|
2623
|
+
variant: b.value === B ? "primary" : "ghost",
|
|
2620
2624
|
size: "sm",
|
|
2621
2625
|
squircle: "",
|
|
2622
2626
|
onClick: (ne) => sr("minute", B)
|
|
@@ -2632,8 +2636,8 @@ const Cf = {
|
|
|
2632
2636
|
F[10] || (F[10] = $("label", { class: "time-label" }, "Period", -1)),
|
|
2633
2637
|
$("div", Rh, [
|
|
2634
2638
|
z(re, {
|
|
2635
|
-
color:
|
|
2636
|
-
variant:
|
|
2639
|
+
color: x.value === "AM" ? "primary" : "secondary",
|
|
2640
|
+
variant: x.value === "AM" ? "primary" : "ghost",
|
|
2637
2641
|
size: "sm",
|
|
2638
2642
|
squircle: "",
|
|
2639
2643
|
class: "time-option",
|
|
@@ -2645,8 +2649,8 @@ const Cf = {
|
|
|
2645
2649
|
_: 1
|
|
2646
2650
|
}, 8, ["color", "variant"]),
|
|
2647
2651
|
z(re, {
|
|
2648
|
-
color:
|
|
2649
|
-
variant:
|
|
2652
|
+
color: x.value === "PM" ? "primary" : "secondary",
|
|
2653
|
+
variant: x.value === "PM" ? "primary" : "ghost",
|
|
2650
2654
|
size: "sm",
|
|
2651
2655
|
squircle: "",
|
|
2652
2656
|
class: "time-option",
|
|
@@ -2733,7 +2737,7 @@ const Cf = {
|
|
|
2733
2737
|
}, i = (s) => {
|
|
2734
2738
|
t("change", s);
|
|
2735
2739
|
};
|
|
2736
|
-
return (s, o) => (C(),
|
|
2740
|
+
return (s, o) => (C(), _(Bs, {
|
|
2737
2741
|
"model-value": n.modelValue,
|
|
2738
2742
|
type: "date",
|
|
2739
2743
|
placeholder: n.placeholder,
|
|
@@ -2775,7 +2779,7 @@ const Cf = {
|
|
|
2775
2779
|
}, i = (s) => {
|
|
2776
2780
|
t("change", s);
|
|
2777
2781
|
};
|
|
2778
|
-
return (s, o) => (C(),
|
|
2782
|
+
return (s, o) => (C(), _(Bs, {
|
|
2779
2783
|
"model-value": n.modelValue,
|
|
2780
2784
|
type: "time",
|
|
2781
2785
|
placeholder: n.placeholder,
|
|
@@ -2819,7 +2823,7 @@ const Cf = {
|
|
|
2819
2823
|
}, i = (s) => {
|
|
2820
2824
|
t("change", s);
|
|
2821
2825
|
};
|
|
2822
|
-
return (s, o) => (C(),
|
|
2826
|
+
return (s, o) => (C(), _(Bs, {
|
|
2823
2827
|
"model-value": n.modelValue,
|
|
2824
2828
|
type: "datetime",
|
|
2825
2829
|
placeholder: n.placeholder,
|
|
@@ -6670,8 +6674,8 @@ class Mp {
|
|
|
6670
6674
|
let p = c == l.childCount;
|
|
6671
6675
|
p || (h = -1), this.placed = An(this.placed, t, A.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
6672
6676
|
for (let m = 0, g = l; m < h; m++) {
|
|
6673
|
-
let
|
|
6674
|
-
this.frontier.push({ type:
|
|
6677
|
+
let b = g.lastChild;
|
|
6678
|
+
this.frontier.push({ type: b.type, match: b.contentMatchAt(b.childCount) }), g = b.content;
|
|
6675
6679
|
}
|
|
6676
6680
|
this.unplaced = p ? e == 0 ? P.empty : new P(En(o.content, e - 1, 1), e - 1, h < 0 ? o.openEnd : e - 1) : new P(En(o.content, e, c), o.openStart, o.openEnd);
|
|
6677
6681
|
}
|
|
@@ -6788,11 +6792,11 @@ function Ap(n, e, t, r) {
|
|
|
6788
6792
|
let h = (f + d + 1) % (r.openStart + 1), p = c[h];
|
|
6789
6793
|
if (p)
|
|
6790
6794
|
for (let m = 0; m < o.length; m++) {
|
|
6791
|
-
let g = o[(m + a) % o.length],
|
|
6792
|
-
g < 0 && (
|
|
6793
|
-
let
|
|
6794
|
-
if (
|
|
6795
|
-
return n.replace(i.before(g),
|
|
6795
|
+
let g = o[(m + a) % o.length], b = !0;
|
|
6796
|
+
g < 0 && (b = !1, g = -g);
|
|
6797
|
+
let x = i.node(g - 1), y = i.index(g - 1);
|
|
6798
|
+
if (x.canReplaceWith(y, y, p.type, p.marks))
|
|
6799
|
+
return n.replace(i.before(g), b ? s.after(g) : t, new P($a(r.content, 0, r.openStart, h), h, r.openEnd));
|
|
6796
6800
|
}
|
|
6797
6801
|
}
|
|
6798
6802
|
let u = n.steps.length;
|
|
@@ -8214,8 +8218,8 @@ function ja(n, e, t, r) {
|
|
|
8214
8218
|
if (c && (o = (l = i.contentMatchAt(i.childCount)).findWrapping(s.type)) && l.matchType(o[0] || s.type).validEnd) {
|
|
8215
8219
|
if (t) {
|
|
8216
8220
|
let h = e.pos + s.nodeSize, p = A.empty;
|
|
8217
|
-
for (let
|
|
8218
|
-
p = A.from(o[
|
|
8221
|
+
for (let b = o.length - 1; b >= 0; b--)
|
|
8222
|
+
p = A.from(o[b].create(null, p));
|
|
8219
8223
|
p = A.from(i.copy(p));
|
|
8220
8224
|
let m = n.tr.step(new Se(e.pos - 1, h, e.pos, h, new P(p, 1, 0), o.length, !0)), g = m.doc.resolve(h + 2 * o.length);
|
|
8221
8225
|
g.nodeAfter && g.nodeAfter.type == i.type && Dt(m.doc, g.pos) && m.join(g.pos), t(m.scrollIntoView());
|
|
@@ -8234,11 +8238,11 @@ function ja(n, e, t, r) {
|
|
|
8234
8238
|
g++;
|
|
8235
8239
|
if (h.canReplace(h.childCount, h.childCount, m.content)) {
|
|
8236
8240
|
if (t) {
|
|
8237
|
-
let
|
|
8238
|
-
for (let
|
|
8239
|
-
|
|
8240
|
-
let
|
|
8241
|
-
t(
|
|
8241
|
+
let b = A.empty;
|
|
8242
|
+
for (let y = p.length - 1; y >= 0; y--)
|
|
8243
|
+
b = A.from(p[y].copy(b));
|
|
8244
|
+
let x = n.tr.step(new Se(e.pos - p.length, e.pos + s.nodeSize, e.pos + g, e.pos + s.nodeSize - g, new P(b, p.length, 0), 0, !0));
|
|
8245
|
+
t(x.scrollIntoView());
|
|
8242
8246
|
}
|
|
8243
8247
|
return !0;
|
|
8244
8248
|
}
|
|
@@ -9093,8 +9097,8 @@ class rr {
|
|
|
9093
9097
|
g.nodeName == "BR" && (l = a = { node: g.parentNode, offset: Me(g) + 1 });
|
|
9094
9098
|
break;
|
|
9095
9099
|
}
|
|
9096
|
-
let
|
|
9097
|
-
if (
|
|
9100
|
+
let b = m.pmViewDesc;
|
|
9101
|
+
if (b && b.node && b.node.isBlock)
|
|
9098
9102
|
break;
|
|
9099
9103
|
}
|
|
9100
9104
|
} else {
|
|
@@ -9796,8 +9800,8 @@ function Pm(n, e, t, r) {
|
|
|
9796
9800
|
if (f.isText) {
|
|
9797
9801
|
let g = p;
|
|
9798
9802
|
o < i.length && i[o].from < g && (g = i[o].from);
|
|
9799
|
-
for (let
|
|
9800
|
-
l[
|
|
9803
|
+
for (let b = 0; b < l.length; b++)
|
|
9804
|
+
l[b].to < g && (g = l[b].to);
|
|
9801
9805
|
g < p && (a = f.cut(g - s), f = f.cut(0, g - s), p = g, h = -1);
|
|
9802
9806
|
} else
|
|
9803
9807
|
for (; o < i.length && i[o].to < p; )
|
|
@@ -10826,7 +10830,7 @@ function Sg(n, e, t) {
|
|
|
10826
10830
|
a.setSelection(new K(f));
|
|
10827
10831
|
else {
|
|
10828
10832
|
let h = a.mapping.map(l);
|
|
10829
|
-
a.mapping.maps[a.mapping.maps.length - 1].forEach((p, m, g,
|
|
10833
|
+
a.mapping.maps[a.mapping.maps.length - 1].forEach((p, m, g, b) => h = b), a.setSelection(Js(n, f, a.doc.resolve(h)));
|
|
10830
10834
|
}
|
|
10831
10835
|
n.focus(), n.dispatch(a.setMeta("uiEvent", "drop"));
|
|
10832
10836
|
}
|
|
@@ -11233,12 +11237,12 @@ function Cg(n, e, t, r, i, s, o) {
|
|
|
11233
11237
|
let u = 0;
|
|
11234
11238
|
t.maps[c].forEach((f, h, p, m) => {
|
|
11235
11239
|
let g = m - p - (h - f);
|
|
11236
|
-
for (let
|
|
11237
|
-
let
|
|
11238
|
-
if (
|
|
11240
|
+
for (let b = 0; b < l.length; b += 3) {
|
|
11241
|
+
let x = l[b + 1];
|
|
11242
|
+
if (x < 0 || f > x + d - u)
|
|
11239
11243
|
continue;
|
|
11240
|
-
let
|
|
11241
|
-
h >=
|
|
11244
|
+
let y = l[b] + d - u;
|
|
11245
|
+
h >= y ? l[b + 1] = f <= y ? -2 : -1 : f >= d && g && (l[b] += g, l[b + 1] += g);
|
|
11242
11246
|
}
|
|
11243
11247
|
u += g;
|
|
11244
11248
|
}), d = t.maps[c].map(d, -1);
|
|
@@ -11257,8 +11261,8 @@ function Cg(n, e, t, r, i, s, o) {
|
|
|
11257
11261
|
}
|
|
11258
11262
|
let f = t.map(n[c + 1] + s, -1), h = f - i, { index: p, offset: m } = r.content.findIndex(u), g = r.maybeChild(p);
|
|
11259
11263
|
if (g && m == u && m + g.nodeSize == h) {
|
|
11260
|
-
let
|
|
11261
|
-
|
|
11264
|
+
let b = l[c + 2].mapInner(t, g, d + 1, n[c] + s + 1, o);
|
|
11265
|
+
b != Ne ? (l[c] = u, l[c + 1] = h, l[c + 2] = b) : (l[c + 1] = -2, a = !0);
|
|
11262
11266
|
} else
|
|
11263
11267
|
a = !0;
|
|
11264
11268
|
}
|
|
@@ -11588,12 +11592,12 @@ function Rg(n, e, t) {
|
|
|
11588
11592
|
let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
|
|
11589
11593
|
if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], bi(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), we && n.input.lastKeyCode === 8)
|
|
11590
11594
|
for (let g = s; g > i; g--) {
|
|
11591
|
-
let
|
|
11592
|
-
if (
|
|
11595
|
+
let b = r.childNodes[g - 1], x = b.pmViewDesc;
|
|
11596
|
+
if (b.nodeName == "BR" && !x) {
|
|
11593
11597
|
s = g;
|
|
11594
11598
|
break;
|
|
11595
11599
|
}
|
|
11596
|
-
if (!
|
|
11600
|
+
if (!x || x.size)
|
|
11597
11601
|
break;
|
|
11598
11602
|
}
|
|
11599
11603
|
let u = n.state.doc, f = n.someProp("domParser") || Tt.fromSchema(n.state.schema), h = u.resolve(o), p = null, m = f.parse(r, {
|
|
@@ -11608,8 +11612,8 @@ function Rg(n, e, t) {
|
|
|
11608
11612
|
context: h
|
|
11609
11613
|
});
|
|
11610
11614
|
if (c && c[0].pos != null) {
|
|
11611
|
-
let g = c[0].pos,
|
|
11612
|
-
|
|
11615
|
+
let g = c[0].pos, b = c[1] && c[1].pos;
|
|
11616
|
+
b == null && (b = g), p = { anchor: g + o, head: b + o };
|
|
11613
11617
|
}
|
|
11614
11618
|
return { doc: m, sel: p, from: o, to: l };
|
|
11615
11619
|
}
|
|
@@ -11631,12 +11635,12 @@ const Pg = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
|
|
|
11631
11635
|
function zg(n, e, t, r, i) {
|
|
11632
11636
|
let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
|
|
11633
11637
|
if (n.input.compositionPendingChanges = 0, e < 0) {
|
|
11634
|
-
let
|
|
11638
|
+
let w = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, M = Ks(n, w);
|
|
11635
11639
|
if (M && !n.state.selection.eq(M)) {
|
|
11636
11640
|
if (we && ft && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (H) => H(n, Pt(13, "Enter"))))
|
|
11637
11641
|
return;
|
|
11638
11642
|
let D = n.state.tr.setSelection(M);
|
|
11639
|
-
|
|
11643
|
+
w == "pointer" ? D.setMeta("pointer", !0) : w == "key" && D.scrollIntoView(), s && D.setMeta("composition", s), n.dispatch(D);
|
|
11640
11644
|
}
|
|
11641
11645
|
return;
|
|
11642
11646
|
}
|
|
@@ -11645,7 +11649,7 @@ function zg(n, e, t, r, i) {
|
|
|
11645
11649
|
let a = n.state.selection, c = Rg(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
|
|
11646
11650
|
n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
|
|
11647
11651
|
let p = Fg(u.content, c.doc.content, c.from, f, h);
|
|
11648
|
-
if (p && n.input.domChangeCount++, (yn && n.input.lastIOSEnter > Date.now() - 225 || ft) && i.some((
|
|
11652
|
+
if (p && n.input.domChangeCount++, (yn && n.input.lastIOSEnter > Date.now() - 225 || ft) && i.some((w) => w.nodeType == 1 && !Pg.test(w.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (w) => w(n, Pt(13, "Enter")))) {
|
|
11649
11653
|
n.input.lastIOSEnter = 0;
|
|
11650
11654
|
return;
|
|
11651
11655
|
}
|
|
@@ -11654,55 +11658,55 @@ function zg(n, e, t, r, i) {
|
|
|
11654
11658
|
p = { start: a.from, endA: a.to, endB: a.to };
|
|
11655
11659
|
else {
|
|
11656
11660
|
if (c.sel) {
|
|
11657
|
-
let
|
|
11658
|
-
if (
|
|
11659
|
-
let M = n.state.tr.setSelection(
|
|
11661
|
+
let w = Sl(n, n.state.doc, c.sel);
|
|
11662
|
+
if (w && !w.eq(n.state.selection)) {
|
|
11663
|
+
let M = n.state.tr.setSelection(w);
|
|
11660
11664
|
s && M.setMeta("composition", s), n.dispatch(M);
|
|
11661
11665
|
}
|
|
11662
11666
|
}
|
|
11663
11667
|
return;
|
|
11664
11668
|
}
|
|
11665
11669
|
n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof J && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), He && Et <= 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--);
|
|
11666
|
-
let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from),
|
|
11667
|
-
if ((yn && n.input.lastIOSEnter > Date.now() - 225 && (!
|
|
11670
|
+
let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), b = d.resolve(p.start), x = m.sameParent(g) && m.parent.inlineContent && b.end() >= p.endA;
|
|
11671
|
+
if ((yn && n.input.lastIOSEnter > Date.now() - 225 && (!x || i.some((w) => w.nodeName == "DIV" || w.nodeName == "P")) || !x && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && m.pos < g.pos && !/\S/.test(c.doc.textBetween(m.pos, g.pos, "", ""))) && n.someProp("handleKeyDown", (w) => w(n, Pt(13, "Enter")))) {
|
|
11668
11672
|
n.input.lastIOSEnter = 0;
|
|
11669
11673
|
return;
|
|
11670
11674
|
}
|
|
11671
|
-
if (n.state.selection.anchor > p.start && Vg(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (
|
|
11675
|
+
if (n.state.selection.anchor > p.start && Vg(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (w) => w(n, Pt(8, "Backspace")))) {
|
|
11672
11676
|
ft && we && n.domObserver.suppressSelectionUpdates();
|
|
11673
11677
|
return;
|
|
11674
11678
|
}
|
|
11675
|
-
we && p.endB == p.start && (n.input.lastChromeDelete = Date.now()), ft && !
|
|
11676
|
-
n.someProp("handleKeyDown", function(
|
|
11677
|
-
return
|
|
11679
|
+
we && p.endB == p.start && (n.input.lastChromeDelete = Date.now()), ft && !x && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
|
|
11680
|
+
n.someProp("handleKeyDown", function(w) {
|
|
11681
|
+
return w(n, Pt(13, "Enter"));
|
|
11678
11682
|
});
|
|
11679
11683
|
}, 20));
|
|
11680
|
-
let
|
|
11681
|
-
let M =
|
|
11684
|
+
let y = p.start, k = p.endA, v = (w) => {
|
|
11685
|
+
let M = w || n.state.tr.replace(y, k, c.doc.slice(p.start - c.from, p.endB - c.from));
|
|
11682
11686
|
if (c.sel) {
|
|
11683
11687
|
let D = Sl(n, M.doc, c.sel);
|
|
11684
|
-
D && !(we && n.composing && D.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (D.head ==
|
|
11688
|
+
D && !(we && n.composing && D.empty && (p.start != p.endB || n.input.lastChromeDelete < Date.now() - 100) && (D.head == y || D.head == M.mapping.map(k) - 1) || He && D.empty && D.head == y) && M.setSelection(D);
|
|
11685
11689
|
}
|
|
11686
11690
|
return s && M.setMeta("composition", s), M.scrollIntoView();
|
|
11687
|
-
},
|
|
11688
|
-
if (
|
|
11691
|
+
}, S;
|
|
11692
|
+
if (x)
|
|
11689
11693
|
if (m.pos == g.pos) {
|
|
11690
11694
|
He && Et <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => pt(n), 20));
|
|
11691
|
-
let
|
|
11692
|
-
M &&
|
|
11695
|
+
let w = v(n.state.tr.delete(y, k)), M = d.resolve(p.start).marksAcross(d.resolve(p.endA));
|
|
11696
|
+
M && w.ensureMarks(M), n.dispatch(w);
|
|
11693
11697
|
} else if (
|
|
11694
11698
|
// Adding or removing a mark
|
|
11695
|
-
p.endA == p.endB && (
|
|
11699
|
+
p.endA == p.endB && (S = Bg(m.parent.content.cut(m.parentOffset, g.parentOffset), b.parent.content.cut(b.parentOffset, p.endA - b.start())))
|
|
11696
11700
|
) {
|
|
11697
|
-
let
|
|
11698
|
-
|
|
11701
|
+
let w = v(n.state.tr);
|
|
11702
|
+
S.type == "add" ? w.addMark(y, k, S.mark) : w.removeMark(y, k, S.mark), n.dispatch(w);
|
|
11699
11703
|
} else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
|
|
11700
|
-
let
|
|
11701
|
-
n.someProp("handleTextInput", (D) => D(n,
|
|
11704
|
+
let w = m.parent.textBetween(m.parentOffset, g.parentOffset), M = () => v(n.state.tr.insertText(w, y, k));
|
|
11705
|
+
n.someProp("handleTextInput", (D) => D(n, y, k, w, M)) || n.dispatch(M());
|
|
11702
11706
|
} else
|
|
11703
|
-
n.dispatch(
|
|
11707
|
+
n.dispatch(v());
|
|
11704
11708
|
else
|
|
11705
|
-
n.dispatch(
|
|
11709
|
+
n.dispatch(v());
|
|
11706
11710
|
}
|
|
11707
11711
|
function Sl(n, e, t) {
|
|
11708
11712
|
return Math.max(t.anchor, t.head) > e.content.size ? null : Js(n, e.resolve(t.anchor), e.resolve(t.head));
|
|
@@ -12757,15 +12761,15 @@ var yy = (n) => !("type" in n), by = (n, e, t) => ({ tr: r, dispatch: i, editor:
|
|
|
12757
12761
|
m = e.map((g) => g.text || "").join("");
|
|
12758
12762
|
else if (e instanceof A) {
|
|
12759
12763
|
let g = "";
|
|
12760
|
-
e.forEach((
|
|
12761
|
-
|
|
12764
|
+
e.forEach((b) => {
|
|
12765
|
+
b.text && (g += b.text);
|
|
12762
12766
|
}), m = g;
|
|
12763
12767
|
} else typeof e == "object" && e && e.text ? m = e.text : m = e;
|
|
12764
12768
|
r.insertText(m, d, u);
|
|
12765
12769
|
} else {
|
|
12766
12770
|
m = l;
|
|
12767
|
-
const g = r.doc.resolve(d),
|
|
12768
|
-
|
|
12771
|
+
const g = r.doc.resolve(d), b = g.node(), x = g.parentOffset === 0, y = b.isText || b.isTextblock, k = b.content.size > 0;
|
|
12772
|
+
x && y && k && (d = Math.max(0, d - 1)), r.replaceWith(d, u, m);
|
|
12769
12773
|
}
|
|
12770
12774
|
t.updateSelection && gy(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: d, text: m }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: d, text: m });
|
|
12771
12775
|
}
|
|
@@ -13114,16 +13118,16 @@ function Jy(n, e) {
|
|
|
13114
13118
|
var t;
|
|
13115
13119
|
const r = Lc(n), { nodeExtensions: i, markExtensions: s } = bn(n), o = (t = i.find((c) => U(c, "topNode"))) == null ? void 0 : t.name, l = Object.fromEntries(
|
|
13116
13120
|
i.map((c) => {
|
|
13117
|
-
const d = r.filter((
|
|
13121
|
+
const d = r.filter((b) => b.type === c.name), u = {
|
|
13118
13122
|
name: c.name,
|
|
13119
13123
|
options: c.options,
|
|
13120
13124
|
storage: c.storage,
|
|
13121
13125
|
editor: e
|
|
13122
|
-
}, f = n.reduce((
|
|
13123
|
-
const
|
|
13126
|
+
}, f = n.reduce((b, x) => {
|
|
13127
|
+
const y = U(x, "extendNodeSchema", u);
|
|
13124
13128
|
return {
|
|
13125
|
-
...
|
|
13126
|
-
...
|
|
13129
|
+
...b,
|
|
13130
|
+
...y ? y(c) : {}
|
|
13127
13131
|
};
|
|
13128
13132
|
}, {}), h = Rl({
|
|
13129
13133
|
...f,
|
|
@@ -13144,12 +13148,12 @@ function Jy(n, e) {
|
|
|
13144
13148
|
attrs: Object.fromEntries(d.map(Ll))
|
|
13145
13149
|
}), p = se(U(c, "parseHTML", u));
|
|
13146
13150
|
p && (h.parseDOM = p.map(
|
|
13147
|
-
(
|
|
13151
|
+
(b) => $l(b, d)
|
|
13148
13152
|
));
|
|
13149
13153
|
const m = U(c, "renderHTML", u);
|
|
13150
|
-
m && (h.toDOM = (
|
|
13151
|
-
node:
|
|
13152
|
-
HTMLAttributes: Xn(
|
|
13154
|
+
m && (h.toDOM = (b) => m({
|
|
13155
|
+
node: b,
|
|
13156
|
+
HTMLAttributes: Xn(b, d)
|
|
13153
13157
|
}));
|
|
13154
13158
|
const g = U(c, "renderText", u);
|
|
13155
13159
|
return g && (h.toText = g), [c.name, h];
|
|
@@ -13161,11 +13165,11 @@ function Jy(n, e) {
|
|
|
13161
13165
|
options: c.options,
|
|
13162
13166
|
storage: c.storage,
|
|
13163
13167
|
editor: e
|
|
13164
|
-
}, f = n.reduce((g,
|
|
13165
|
-
const
|
|
13168
|
+
}, f = n.reduce((g, b) => {
|
|
13169
|
+
const x = U(b, "extendMarkSchema", u);
|
|
13166
13170
|
return {
|
|
13167
13171
|
...g,
|
|
13168
|
-
...
|
|
13172
|
+
...x ? x(c) : {}
|
|
13169
13173
|
};
|
|
13170
13174
|
}, {}), h = Rl({
|
|
13171
13175
|
...f,
|
|
@@ -13358,12 +13362,12 @@ function ks(n, e, t = {}) {
|
|
|
13358
13362
|
n.doc.nodesBetween(h, p, (m, g) => {
|
|
13359
13363
|
if (!m.isText && !m.marks.length)
|
|
13360
13364
|
return;
|
|
13361
|
-
const
|
|
13362
|
-
o +=
|
|
13363
|
-
...m.marks.map((
|
|
13364
|
-
mark:
|
|
13365
|
-
from:
|
|
13366
|
-
to:
|
|
13365
|
+
const b = Math.max(h, g), x = Math.min(p, g + m.nodeSize), y = x - b;
|
|
13366
|
+
o += y, l.push(
|
|
13367
|
+
...m.marks.map((k) => ({
|
|
13368
|
+
mark: k,
|
|
13369
|
+
from: b,
|
|
13370
|
+
to: x
|
|
13367
13371
|
}))
|
|
13368
13372
|
);
|
|
13369
13373
|
});
|
|
@@ -13501,12 +13505,12 @@ var l0 = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
|
|
|
13501
13505
|
const d = c.$from.pos, u = c.$to.pos;
|
|
13502
13506
|
r.doc.nodesBetween(d, u, (f, h) => {
|
|
13503
13507
|
const p = Math.max(h, d), m = Math.min(h + f.nodeSize, u);
|
|
13504
|
-
f.marks.find((
|
|
13505
|
-
a ===
|
|
13508
|
+
f.marks.find((b) => b.type === a) ? f.marks.forEach((b) => {
|
|
13509
|
+
a === b.type && t.addMark(
|
|
13506
13510
|
p,
|
|
13507
13511
|
m,
|
|
13508
13512
|
a.create({
|
|
13509
|
-
...
|
|
13513
|
+
...b.attrs,
|
|
13510
13514
|
...e
|
|
13511
13515
|
})
|
|
13512
13516
|
);
|
|
@@ -13589,26 +13593,26 @@ var p0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
13589
13593
|
if (a.depth === 2 || a.node(-3).type !== l || a.index(-2) !== a.node(-2).childCount - 1)
|
|
13590
13594
|
return !1;
|
|
13591
13595
|
if (i) {
|
|
13592
|
-
let
|
|
13593
|
-
const
|
|
13594
|
-
for (let M = a.depth -
|
|
13595
|
-
|
|
13596
|
-
const
|
|
13596
|
+
let b = A.empty;
|
|
13597
|
+
const x = a.index(-1) ? 1 : a.index(-2) ? 2 : 3;
|
|
13598
|
+
for (let M = a.depth - x; M >= a.depth - 3; M -= 1)
|
|
13599
|
+
b = A.from(a.node(M).copy(b));
|
|
13600
|
+
const y = (
|
|
13597
13601
|
// eslint-disable-next-line no-nested-ternary
|
|
13598
13602
|
a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
|
|
13599
|
-
),
|
|
13603
|
+
), k = {
|
|
13600
13604
|
...vr(f, a.node().type.name, a.node().attrs),
|
|
13601
13605
|
...e
|
|
13602
|
-
},
|
|
13603
|
-
|
|
13604
|
-
const
|
|
13605
|
-
t.replace(
|
|
13606
|
-
let
|
|
13607
|
-
t.doc.nodesBetween(
|
|
13608
|
-
if (
|
|
13606
|
+
}, v = ((o = l.contentMatch.defaultType) == null ? void 0 : o.createAndFill(k)) || void 0;
|
|
13607
|
+
b = b.append(A.from(l.createAndFill(null, v) || void 0));
|
|
13608
|
+
const S = a.before(a.depth - (x - 1));
|
|
13609
|
+
t.replace(S, a.after(-y), new P(b, 4 - x, 0));
|
|
13610
|
+
let w = -1;
|
|
13611
|
+
t.doc.nodesBetween(S, t.doc.content.size, (M, D) => {
|
|
13612
|
+
if (w > -1)
|
|
13609
13613
|
return !1;
|
|
13610
|
-
M.isTextblock && M.content.size === 0 && (
|
|
13611
|
-
}),
|
|
13614
|
+
M.isTextblock && M.content.size === 0 && (w = D + 1);
|
|
13615
|
+
}), w > -1 && t.setSelection(J.near(t.doc.resolve(w))), t.scrollIntoView();
|
|
13612
13616
|
}
|
|
13613
13617
|
return !0;
|
|
13614
13618
|
}
|
|
@@ -13627,11 +13631,11 @@ var p0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
13627
13631
|
if (!un(t.doc, a.pos, 2))
|
|
13628
13632
|
return !1;
|
|
13629
13633
|
if (i) {
|
|
13630
|
-
const { selection:
|
|
13631
|
-
if (t.split(a.pos, 2, g).scrollIntoView(), !
|
|
13634
|
+
const { selection: b, storedMarks: x } = r, { splittableMarks: y } = s.extensionManager, k = x || b.$to.parentOffset && b.$from.marks();
|
|
13635
|
+
if (t.split(a.pos, 2, g).scrollIntoView(), !k || !i)
|
|
13632
13636
|
return !0;
|
|
13633
|
-
const
|
|
13634
|
-
t.ensureMarks(
|
|
13637
|
+
const v = k.filter((S) => y.includes(S.type.name));
|
|
13638
|
+
t.ensureMarks(v);
|
|
13635
13639
|
}
|
|
13636
13640
|
return !0;
|
|
13637
13641
|
}, Wi = (n, e) => {
|
|
@@ -13653,19 +13657,19 @@ var p0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
13653
13657
|
const i = n.doc.nodeAt(r);
|
|
13654
13658
|
return t.node.type === i?.type && Dt(n.doc, r) && n.join(r), !0;
|
|
13655
13659
|
}, g0 = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
|
|
13656
|
-
const { extensions: u, splittableMarks: f } = i.extensionManager, h = ge(n, o.schema), p = ge(e, o.schema), { selection: m, storedMarks: g } = o, { $from:
|
|
13657
|
-
if (!
|
|
13660
|
+
const { extensions: u, splittableMarks: f } = i.extensionManager, h = ge(n, o.schema), p = ge(e, o.schema), { selection: m, storedMarks: g } = o, { $from: b, $to: x } = m, y = b.blockRange(x), k = g || m.$to.parentOffset && m.$from.marks();
|
|
13661
|
+
if (!y)
|
|
13658
13662
|
return !1;
|
|
13659
|
-
const
|
|
13660
|
-
if (
|
|
13661
|
-
if (
|
|
13663
|
+
const v = Ci((S) => zl(S.type.name, u))(m);
|
|
13664
|
+
if (y.depth >= 1 && v && y.depth - v.depth <= 1) {
|
|
13665
|
+
if (v.node.type === h)
|
|
13662
13666
|
return c.liftListItem(p);
|
|
13663
|
-
if (zl(
|
|
13664
|
-
return a().command(() => (s.setNodeMarkup(
|
|
13667
|
+
if (zl(v.node.type.name, u) && h.validContent(v.node.content) && l)
|
|
13668
|
+
return a().command(() => (s.setNodeMarkup(v.pos, h), !0)).command(() => Wi(s, h)).command(() => Ki(s, h)).run();
|
|
13665
13669
|
}
|
|
13666
|
-
return !t || !
|
|
13667
|
-
const
|
|
13668
|
-
return s.ensureMarks(
|
|
13670
|
+
return !t || !k || !l ? a().command(() => d().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => Wi(s, h)).command(() => Ki(s, h)).run() : a().command(() => {
|
|
13671
|
+
const S = d().wrapInList(h, r), w = k.filter((M) => f.includes(M.type.name));
|
|
13672
|
+
return s.ensureMarks(w), S ? !0 : c.clearNodes();
|
|
13669
13673
|
}).wrapInList(h, r).command(() => Wi(s, h)).command(() => Ki(s, h)).run();
|
|
13670
13674
|
}, y0 = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
|
|
13671
13675
|
const { extendEmptyMarkRange: s = !1 } = t, o = mt(n, r.schema);
|
|
@@ -13738,20 +13742,20 @@ var p0 = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
13738
13742
|
return t.selection.ranges.forEach((c) => {
|
|
13739
13743
|
const d = c.$from.pos, u = c.$to.pos;
|
|
13740
13744
|
let f, h, p, m;
|
|
13741
|
-
t.selection.empty ? r.doc.nodesBetween(d, u, (g,
|
|
13742
|
-
s && s === g.type && (a = !0, p = Math.max(
|
|
13743
|
-
}) : r.doc.nodesBetween(d, u, (g,
|
|
13744
|
-
|
|
13745
|
+
t.selection.empty ? r.doc.nodesBetween(d, u, (g, b) => {
|
|
13746
|
+
s && s === g.type && (a = !0, p = Math.max(b, d), m = Math.min(b + g.nodeSize, u), f = b, h = g);
|
|
13747
|
+
}) : r.doc.nodesBetween(d, u, (g, b) => {
|
|
13748
|
+
b < d && s && s === g.type && (a = !0, p = Math.max(b, d), m = Math.min(b + g.nodeSize, u), f = b, h = g), b >= d && b <= u && (s && s === g.type && (a = !0, i && t.setNodeMarkup(b, void 0, {
|
|
13745
13749
|
...g.attrs,
|
|
13746
13750
|
...e
|
|
13747
|
-
})), o && g.marks.length && g.marks.forEach((
|
|
13748
|
-
if (o ===
|
|
13749
|
-
const
|
|
13751
|
+
})), o && g.marks.length && g.marks.forEach((x) => {
|
|
13752
|
+
if (o === x.type && (a = !0, i)) {
|
|
13753
|
+
const y = Math.max(b, d), k = Math.min(b + g.nodeSize, u);
|
|
13750
13754
|
t.addMark(
|
|
13751
|
-
|
|
13752
|
-
|
|
13755
|
+
y,
|
|
13756
|
+
k,
|
|
13753
13757
|
o.create({
|
|
13754
|
-
...
|
|
13758
|
+
...x.attrs,
|
|
13755
13759
|
...e
|
|
13756
13760
|
})
|
|
13757
13761
|
);
|
|
@@ -13840,7 +13844,7 @@ function ur(n) {
|
|
|
13840
13844
|
}), g = {
|
|
13841
13845
|
from: r - (h[0].length - s.length),
|
|
13842
13846
|
to: i
|
|
13843
|
-
}, { commands:
|
|
13847
|
+
}, { commands: b, chain: x, can: y } = new wi({
|
|
13844
13848
|
editor: t,
|
|
13845
13849
|
state: m
|
|
13846
13850
|
});
|
|
@@ -13848,9 +13852,9 @@ function ur(n) {
|
|
|
13848
13852
|
state: m,
|
|
13849
13853
|
range: g,
|
|
13850
13854
|
match: h,
|
|
13851
|
-
commands:
|
|
13852
|
-
chain:
|
|
13853
|
-
can:
|
|
13855
|
+
commands: b,
|
|
13856
|
+
chain: x,
|
|
13857
|
+
can: y
|
|
13854
13858
|
}) === null || !p.steps.length || (f.undoable && p.setMeta(l, {
|
|
13855
13859
|
transform: p,
|
|
13856
13860
|
from: r,
|
|
@@ -14035,17 +14039,17 @@ function R0(n) {
|
|
|
14035
14039
|
state: t
|
|
14036
14040
|
}), u = [];
|
|
14037
14041
|
return t.doc.nodesBetween(r, i, (h, p) => {
|
|
14038
|
-
var m, g,
|
|
14042
|
+
var m, g, b, x, y;
|
|
14039
14043
|
if ((g = (m = h.type) == null ? void 0 : m.spec) != null && g.code || !(h.isText || h.isTextblock || h.isInline))
|
|
14040
14044
|
return;
|
|
14041
|
-
const
|
|
14042
|
-
if (
|
|
14045
|
+
const k = (y = (x = (b = h.content) == null ? void 0 : b.size) != null ? x : h.nodeSize) != null ? y : 0, v = Math.max(r, p), S = Math.min(i, p + k);
|
|
14046
|
+
if (v >= S)
|
|
14043
14047
|
return;
|
|
14044
|
-
const
|
|
14045
|
-
$0(
|
|
14048
|
+
const w = h.isText ? h.text || "" : h.textBetween(v - p, S - p, void 0, "");
|
|
14049
|
+
$0(w, s.find, o).forEach((D) => {
|
|
14046
14050
|
if (D.index === void 0)
|
|
14047
14051
|
return;
|
|
14048
|
-
const H =
|
|
14052
|
+
const H = v + D.index + 1, te = H + D[0].length, Q = {
|
|
14049
14053
|
from: t.tr.mapping.map(H),
|
|
14050
14054
|
to: t.tr.mapping.map(te)
|
|
14051
14055
|
}, ie = s.handler({
|
|
@@ -14140,28 +14144,28 @@ function P0(n) {
|
|
|
14140
14144
|
}
|
|
14141
14145
|
},
|
|
14142
14146
|
appendTransaction: (u, f, h) => {
|
|
14143
|
-
const p = u[0], m = p.getMeta("uiEvent") === "paste" && !i, g = p.getMeta("uiEvent") === "drop" && !s,
|
|
14144
|
-
if (!m && !g && !
|
|
14147
|
+
const p = u[0], m = p.getMeta("uiEvent") === "paste" && !i, g = p.getMeta("uiEvent") === "drop" && !s, b = p.getMeta("applyPasteRules"), x = !!b;
|
|
14148
|
+
if (!m && !g && !x)
|
|
14145
14149
|
return;
|
|
14146
|
-
if (
|
|
14147
|
-
let { text:
|
|
14148
|
-
typeof
|
|
14149
|
-
const { from:
|
|
14150
|
+
if (x) {
|
|
14151
|
+
let { text: v } = b;
|
|
14152
|
+
typeof v == "string" ? v = v : v = io(A.from(v), h.schema);
|
|
14153
|
+
const { from: S } = b, w = S + v.length, M = L0(v);
|
|
14150
14154
|
return a({
|
|
14151
14155
|
rule: d,
|
|
14152
14156
|
state: h,
|
|
14153
|
-
from:
|
|
14154
|
-
to: { b:
|
|
14157
|
+
from: S,
|
|
14158
|
+
to: { b: w },
|
|
14155
14159
|
pasteEvt: M
|
|
14156
14160
|
});
|
|
14157
14161
|
}
|
|
14158
|
-
const
|
|
14159
|
-
if (!(!I0(
|
|
14162
|
+
const y = f.doc.content.findDiffStart(h.doc.content), k = f.doc.content.findDiffEnd(h.doc.content);
|
|
14163
|
+
if (!(!I0(y) || !k || y === k.b))
|
|
14160
14164
|
return a({
|
|
14161
14165
|
rule: d,
|
|
14162
14166
|
state: h,
|
|
14163
|
-
from:
|
|
14164
|
-
to:
|
|
14167
|
+
from: y,
|
|
14168
|
+
to: k,
|
|
14165
14169
|
pasteEvt: o
|
|
14166
14170
|
});
|
|
14167
14171
|
}
|
|
@@ -14455,7 +14459,7 @@ var pe = class Kc extends oo {
|
|
|
14455
14459
|
const d = $c(n.before, [n, ...e]);
|
|
14456
14460
|
Fc(d).forEach((h) => {
|
|
14457
14461
|
d.mapping.mapResult(h.oldRange.from).deletedAfter && d.mapping.mapResult(h.oldRange.to).deletedBefore && d.before.nodesBetween(h.oldRange.from, h.oldRange.to, (p, m) => {
|
|
14458
|
-
const g = m + p.nodeSize - 2,
|
|
14462
|
+
const g = m + p.nodeSize - 2, b = h.oldRange.from <= m && g <= h.oldRange.to;
|
|
14459
14463
|
this.editor.emit("delete", {
|
|
14460
14464
|
type: "node",
|
|
14461
14465
|
node: p,
|
|
@@ -14465,7 +14469,7 @@ var pe = class Kc extends oo {
|
|
|
14465
14469
|
newTo: d.mapping.map(g),
|
|
14466
14470
|
deletedRange: h.oldRange,
|
|
14467
14471
|
newRange: h.newRange,
|
|
14468
|
-
partial: !
|
|
14472
|
+
partial: !b,
|
|
14469
14473
|
editor: this.editor,
|
|
14470
14474
|
transaction: n,
|
|
14471
14475
|
combinedTransform: d
|
|
@@ -14476,21 +14480,21 @@ var pe = class Kc extends oo {
|
|
|
14476
14480
|
d.steps.forEach((h, p) => {
|
|
14477
14481
|
var m, g;
|
|
14478
14482
|
if (h instanceof _e) {
|
|
14479
|
-
const
|
|
14483
|
+
const b = f.slice(p).map(h.from, -1), x = f.slice(p).map(h.to), y = f.invert().map(b, -1), k = f.invert().map(x), v = (m = d.doc.nodeAt(b - 1)) == null ? void 0 : m.marks.some((w) => w.eq(h.mark)), S = (g = d.doc.nodeAt(x)) == null ? void 0 : g.marks.some((w) => w.eq(h.mark));
|
|
14480
14484
|
this.editor.emit("delete", {
|
|
14481
14485
|
type: "mark",
|
|
14482
14486
|
mark: h.mark,
|
|
14483
14487
|
from: h.from,
|
|
14484
14488
|
to: h.to,
|
|
14485
14489
|
deletedRange: {
|
|
14486
|
-
from:
|
|
14487
|
-
to:
|
|
14490
|
+
from: y,
|
|
14491
|
+
to: k
|
|
14488
14492
|
},
|
|
14489
14493
|
newRange: {
|
|
14490
|
-
from:
|
|
14491
|
-
to:
|
|
14494
|
+
from: b,
|
|
14495
|
+
to: x
|
|
14492
14496
|
},
|
|
14493
|
-
partial: !!(
|
|
14497
|
+
partial: !!(S || v),
|
|
14494
14498
|
editor: this.editor,
|
|
14495
14499
|
transaction: n,
|
|
14496
14500
|
combinedTransform: d
|
|
@@ -14562,8 +14566,8 @@ var pe = class Kc extends oo {
|
|
|
14562
14566
|
() => o.undoInputRule(),
|
|
14563
14567
|
// maybe convert first text block node to default node
|
|
14564
14568
|
() => o.command(({ tr: l }) => {
|
|
14565
|
-
const { selection: a, doc: c } = l, { empty: d, $anchor: u } = a, { pos: f, parent: h } = u, p = u.parent.isTextblock && f > 0 ? l.doc.resolve(f - 1) : u, m = p.parent.type.spec.isolating, g = u.pos - u.parentOffset,
|
|
14566
|
-
return !d || !h.type.isTextblock || h.textContent.length || !
|
|
14569
|
+
const { selection: a, doc: c } = l, { empty: d, $anchor: u } = a, { pos: f, parent: h } = u, p = u.parent.isTextblock && f > 0 ? l.doc.resolve(f - 1) : u, m = p.parent.type.spec.isolating, g = u.pos - u.parentOffset, b = m && p.parent.childCount === 1 ? g === u.pos : Y.atStart(c).from === f;
|
|
14570
|
+
return !d || !h.type.isTextblock || h.textContent.length || !b || b && u.parent.type.name === "paragraph" ? !1 : o.clearNodes();
|
|
14567
14571
|
}),
|
|
14568
14572
|
() => o.deleteSelection(),
|
|
14569
14573
|
() => o.joinBackward(),
|
|
@@ -15494,7 +15498,7 @@ function W0(n) {
|
|
|
15494
15498
|
if (!p)
|
|
15495
15499
|
return;
|
|
15496
15500
|
const m = p[1] || "", g = r(m);
|
|
15497
|
-
if (!o.find((
|
|
15501
|
+
if (!o.find((x) => !(x in g)))
|
|
15498
15502
|
return {
|
|
15499
15503
|
type: e,
|
|
15500
15504
|
raw: p[0],
|
|
@@ -15549,25 +15553,25 @@ function K0(n) {
|
|
|
15549
15553
|
const m = new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`), g = u.match(m);
|
|
15550
15554
|
if (!g)
|
|
15551
15555
|
return;
|
|
15552
|
-
const [
|
|
15553
|
-
let
|
|
15554
|
-
const
|
|
15555
|
-
let
|
|
15556
|
-
const
|
|
15557
|
-
for (
|
|
15558
|
-
const D =
|
|
15556
|
+
const [b, x = ""] = g, y = i(x);
|
|
15557
|
+
let k = 1;
|
|
15558
|
+
const v = b.length;
|
|
15559
|
+
let S = "";
|
|
15560
|
+
const w = /^:::([\w-]*)(\s.*)?/gm, M = u.slice(v);
|
|
15561
|
+
for (w.lastIndex = 0; ; ) {
|
|
15562
|
+
const D = w.exec(M);
|
|
15559
15563
|
if (D === null)
|
|
15560
15564
|
break;
|
|
15561
15565
|
const H = D.index, te = D[1];
|
|
15562
15566
|
if (!((p = D[2]) != null && p.endsWith(":::"))) {
|
|
15563
15567
|
if (te)
|
|
15564
|
-
|
|
15565
|
-
else if (
|
|
15568
|
+
k += 1;
|
|
15569
|
+
else if (k -= 1, k === 0) {
|
|
15566
15570
|
const Q = M.slice(0, H);
|
|
15567
|
-
|
|
15568
|
-
const ie = u.slice(0,
|
|
15571
|
+
S = Q.trim();
|
|
15572
|
+
const ie = u.slice(0, v + H + D[0].length);
|
|
15569
15573
|
let I = [];
|
|
15570
|
-
if (
|
|
15574
|
+
if (S)
|
|
15571
15575
|
if (l === "block")
|
|
15572
15576
|
for (I = h.blockTokens(Q), I.forEach((V) => {
|
|
15573
15577
|
V.text && (!V.tokens || V.tokens.length === 0) && (V.tokens = h.inlineTokens(V.text));
|
|
@@ -15579,12 +15583,12 @@ function K0(n) {
|
|
|
15579
15583
|
break;
|
|
15580
15584
|
}
|
|
15581
15585
|
else
|
|
15582
|
-
I = h.inlineTokens(
|
|
15586
|
+
I = h.inlineTokens(S);
|
|
15583
15587
|
return {
|
|
15584
15588
|
type: e,
|
|
15585
15589
|
raw: ie,
|
|
15586
|
-
attributes:
|
|
15587
|
-
content:
|
|
15590
|
+
attributes: y,
|
|
15591
|
+
content: S,
|
|
15588
15592
|
tokens: I
|
|
15589
15593
|
};
|
|
15590
15594
|
}
|
|
@@ -15635,10 +15639,10 @@ function Y0(n) {
|
|
|
15635
15639
|
return a.forEach((p) => {
|
|
15636
15640
|
const m = typeof p == "string" ? p : p.name, g = typeof p == "string" ? void 0 : p.skipIfDefault;
|
|
15637
15641
|
if (m in f) {
|
|
15638
|
-
const
|
|
15639
|
-
if (g !== void 0 &&
|
|
15642
|
+
const b = f[m];
|
|
15643
|
+
if (g !== void 0 && b === g)
|
|
15640
15644
|
return;
|
|
15641
|
-
h[m] =
|
|
15645
|
+
h[m] = b;
|
|
15642
15646
|
}
|
|
15643
15647
|
}), h;
|
|
15644
15648
|
}, u = c.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -15661,26 +15665,26 @@ function Y0(n) {
|
|
|
15661
15665
|
const m = l ? new RegExp(`^\\[${u}\\s*([^\\]]*)\\]`) : new RegExp(`^\\[${u}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${u}\\]`), g = f.match(m);
|
|
15662
15666
|
if (!g)
|
|
15663
15667
|
return;
|
|
15664
|
-
let
|
|
15668
|
+
let b = "", x = "";
|
|
15665
15669
|
if (l) {
|
|
15666
|
-
const [,
|
|
15667
|
-
|
|
15670
|
+
const [, k] = g;
|
|
15671
|
+
x = k;
|
|
15668
15672
|
} else {
|
|
15669
|
-
const [,
|
|
15670
|
-
|
|
15673
|
+
const [, k, v] = g;
|
|
15674
|
+
x = k, b = v || "";
|
|
15671
15675
|
}
|
|
15672
|
-
const
|
|
15676
|
+
const y = i(x.trim());
|
|
15673
15677
|
return {
|
|
15674
15678
|
type: e,
|
|
15675
15679
|
raw: g[0],
|
|
15676
|
-
content:
|
|
15677
|
-
attributes:
|
|
15680
|
+
content: b.trim(),
|
|
15681
|
+
attributes: y
|
|
15678
15682
|
};
|
|
15679
15683
|
}
|
|
15680
15684
|
},
|
|
15681
15685
|
renderMarkdown: (f) => {
|
|
15682
15686
|
let h = "";
|
|
15683
|
-
r ? h = r(f) : f.content && f.content.length > 0 && (h = f.content.filter((
|
|
15687
|
+
r ? h = r(f) : f.content && f.content.length > 0 && (h = f.content.filter((b) => b.type === "text").map((b) => b.text).join(""));
|
|
15684
15688
|
const p = d(f.attrs || {}), m = s(p), g = m ? ` ${m}` : "";
|
|
15685
15689
|
return l ? `[${c}${g}]` : `[${c}${g}]${h}[/${c}]`;
|
|
15686
15690
|
}
|
|
@@ -15707,35 +15711,35 @@ function xs(n, e, t) {
|
|
|
15707
15711
|
const p = e.extractItemData(h), { indentLevel: m, mainContent: g } = p;
|
|
15708
15712
|
c = `${c}${f}
|
|
15709
15713
|
`;
|
|
15710
|
-
const
|
|
15714
|
+
const b = [g];
|
|
15711
15715
|
for (d += 1; d < l.length; ) {
|
|
15712
|
-
const
|
|
15713
|
-
if (
|
|
15714
|
-
const
|
|
15715
|
-
if (
|
|
15716
|
+
const v = l[d];
|
|
15717
|
+
if (v.trim() === "") {
|
|
15718
|
+
const w = l.slice(d + 1).findIndex((H) => H.trim() !== "");
|
|
15719
|
+
if (w === -1)
|
|
15716
15720
|
break;
|
|
15717
|
-
if ((((i = (r = l[d + 1 +
|
|
15718
|
-
|
|
15721
|
+
if ((((i = (r = l[d + 1 + w].match(/^(\s*)/)) == null ? void 0 : r[1]) == null ? void 0 : i.length) || 0) > m) {
|
|
15722
|
+
b.push(v), c = `${c}${v}
|
|
15719
15723
|
`, d += 1;
|
|
15720
15724
|
continue;
|
|
15721
15725
|
} else
|
|
15722
15726
|
break;
|
|
15723
15727
|
}
|
|
15724
|
-
if ((((o = (s =
|
|
15725
|
-
|
|
15728
|
+
if ((((o = (s = v.match(/^(\s*)/)) == null ? void 0 : s[1]) == null ? void 0 : o.length) || 0) > m)
|
|
15729
|
+
b.push(v), c = `${c}${v}
|
|
15726
15730
|
`, d += 1;
|
|
15727
15731
|
else
|
|
15728
15732
|
break;
|
|
15729
15733
|
}
|
|
15730
|
-
let
|
|
15731
|
-
const
|
|
15732
|
-
if (
|
|
15733
|
-
const
|
|
15734
|
+
let x;
|
|
15735
|
+
const y = b.slice(1);
|
|
15736
|
+
if (y.length > 0) {
|
|
15737
|
+
const v = y.map((S) => S.slice(m + u)).join(`
|
|
15734
15738
|
`);
|
|
15735
|
-
|
|
15739
|
+
v.trim() && (e.customNestedParser ? x = e.customNestedParser(v) : x = t.blockTokens(v));
|
|
15736
15740
|
}
|
|
15737
|
-
const
|
|
15738
|
-
a.push(
|
|
15741
|
+
const k = e.createToken(p, x);
|
|
15742
|
+
a.push(k);
|
|
15739
15743
|
}
|
|
15740
15744
|
if (a.length !== 0)
|
|
15741
15745
|
return {
|
|
@@ -15868,7 +15872,7 @@ var X0 = class extends H0 {
|
|
|
15868
15872
|
}
|
|
15869
15873
|
},
|
|
15870
15874
|
setup(n) {
|
|
15871
|
-
const e =
|
|
15875
|
+
const e = X(), t = ta();
|
|
15872
15876
|
return Wd(() => {
|
|
15873
15877
|
const r = n.editor;
|
|
15874
15878
|
r && r.options.element && e.value && $e(() => {
|
|
@@ -16264,20 +16268,20 @@ ${t}
|
|
|
16264
16268
|
`);
|
|
16265
16269
|
let p = 0, m = 0;
|
|
16266
16270
|
const g = c - d;
|
|
16267
|
-
for (let
|
|
16268
|
-
if (m + h[
|
|
16269
|
-
p =
|
|
16271
|
+
for (let S = 0; S < h.length; S += 1) {
|
|
16272
|
+
if (m + h[S].length >= g) {
|
|
16273
|
+
p = S;
|
|
16270
16274
|
break;
|
|
16271
16275
|
}
|
|
16272
|
-
m += h[
|
|
16276
|
+
m += h[S].length + 1;
|
|
16273
16277
|
}
|
|
16274
|
-
const
|
|
16275
|
-
if (
|
|
16278
|
+
const x = ((a = h[p].match(/^ */)) == null ? void 0 : a[0]) || "", y = Math.min(x.length, t);
|
|
16279
|
+
if (y === 0)
|
|
16276
16280
|
return !0;
|
|
16277
|
-
let
|
|
16278
|
-
for (let
|
|
16279
|
-
|
|
16280
|
-
return l.delete(
|
|
16281
|
+
let k = d;
|
|
16282
|
+
for (let S = 0; S < p; S += 1)
|
|
16283
|
+
k += h[S].length + 1;
|
|
16284
|
+
return l.delete(k, k + y), c - k <= y && l.setSelection(J.create(l.doc, k)), !0;
|
|
16281
16285
|
}) : n.commands.command(({ tr: l }) => {
|
|
16282
16286
|
const { from: a, to: c } = i, f = r.doc.textBetween(a, c, `
|
|
16283
16287
|
`, `
|
|
@@ -16849,12 +16853,12 @@ function N1(n = []) {
|
|
|
16849
16853
|
ascii: !0
|
|
16850
16854
|
}, e), n = n.sort((m, g) => m[0] > g[0] ? 1 : -1);
|
|
16851
16855
|
for (let m = 0; m < n.length; m++) {
|
|
16852
|
-
const g = n[m][0],
|
|
16856
|
+
const g = n[m][0], x = n[m][1] ? {
|
|
16853
16857
|
[C1]: !0
|
|
16854
16858
|
} : {
|
|
16855
16859
|
[M1]: !0
|
|
16856
16860
|
};
|
|
16857
|
-
g.indexOf("-") >= 0 ?
|
|
16861
|
+
g.indexOf("-") >= 0 ? x[Ms] = !0 : at.test(g) ? ct.test(g) ? x[zn] = !0 : x[Ss] = !0 : x[ws] = !0, Fl(t, g, g, x);
|
|
16858
16862
|
}
|
|
16859
16863
|
return Fl(t, "localhost", Zn, {
|
|
16860
16864
|
ascii: !0
|
|
@@ -17173,16 +17177,16 @@ function $1({
|
|
|
17173
17177
|
O(p, We, p), G(p, n.domain, u), G(h, n.domain, u), O(h, nt, f), O(h, We, p);
|
|
17174
17178
|
const m = O(h, wt);
|
|
17175
17179
|
G(m, n.numeric, Ul);
|
|
17176
|
-
const g = O(o, We),
|
|
17177
|
-
O(g, We, g), G(g, n.domain, o), G(
|
|
17178
|
-
const
|
|
17179
|
-
G(
|
|
17180
|
-
const
|
|
17181
|
-
G(
|
|
17182
|
-
const
|
|
17183
|
-
G(
|
|
17184
|
-
const
|
|
17185
|
-
G(l, n.domain, o), O(l, nt,
|
|
17180
|
+
const g = O(o, We), b = O(o, nt);
|
|
17181
|
+
O(g, We, g), G(g, n.domain, o), G(b, r, s), G(b, n.domain, o);
|
|
17182
|
+
const x = Ue(gr);
|
|
17183
|
+
G(b, n.tld, x), G(b, n.utld, x), G(x, n.domain, o), G(x, r, s), O(x, nt, b), O(x, We, g), O(x, kt, c);
|
|
17184
|
+
const y = O(x, wt), k = Ue(gr);
|
|
17185
|
+
G(y, n.numeric, k);
|
|
17186
|
+
const v = Ue(gr), S = Ue();
|
|
17187
|
+
G(v, e, v), G(v, t, S), G(S, e, v), G(S, t, S), O(x, rt, v), O(k, rt, v);
|
|
17188
|
+
const w = O(l, wt), M = O(a, wt), D = O(M, rt), H = O(D, rt);
|
|
17189
|
+
G(l, n.domain, o), O(l, nt, b), O(l, We, g), G(a, n.domain, o), O(a, nt, b), O(a, We, g), G(w, n.domain, v), O(w, rt, v), O(w, Hn, v), G(H, n.domain, v), G(H, e, v), O(H, rt, v);
|
|
17186
17190
|
const te = [
|
|
17187
17191
|
[Bn, Vn],
|
|
17188
17192
|
// {}
|
|
@@ -17202,14 +17206,14 @@ function $1({
|
|
|
17202
17206
|
// <>
|
|
17203
17207
|
];
|
|
17204
17208
|
for (let Q = 0; Q < te.length; Q++) {
|
|
17205
|
-
const [ie, I] = te[Q], V = O(
|
|
17206
|
-
O(
|
|
17209
|
+
const [ie, I] = te[Q], V = O(v, ie);
|
|
17210
|
+
O(S, ie, V), O(V, I, v);
|
|
17207
17211
|
const j = Ue(gr);
|
|
17208
17212
|
G(V, e, j);
|
|
17209
17213
|
const De = Ue();
|
|
17210
|
-
G(V, t), G(j, e, j), G(j, t, De), G(De, e, j), G(De, t, De), O(j, I,
|
|
17214
|
+
G(V, t), G(j, e, j), G(j, t, De), G(De, e, j), G(De, t, De), O(j, I, v), O(De, I, v);
|
|
17211
17215
|
}
|
|
17212
|
-
return O(i, Zn,
|
|
17216
|
+
return O(i, Zn, x), O(i, fo, D1), {
|
|
17213
17217
|
start: i,
|
|
17214
17218
|
tokens: ud
|
|
17215
17219
|
};
|
|
@@ -17322,19 +17326,19 @@ function q1(n) {
|
|
|
17322
17326
|
const p = h[h.length - 1], m = u.pos + f.lastIndexOf(p);
|
|
17323
17327
|
if (!p)
|
|
17324
17328
|
return !1;
|
|
17325
|
-
const g = bo(p).map((
|
|
17329
|
+
const g = bo(p).map((b) => b.toObject(n.defaultProtocol));
|
|
17326
17330
|
if (!j1(g))
|
|
17327
17331
|
return !1;
|
|
17328
|
-
g.filter((
|
|
17329
|
-
...
|
|
17330
|
-
from: m +
|
|
17331
|
-
to: m +
|
|
17332
|
-
})).filter((
|
|
17333
|
-
so(
|
|
17334
|
-
|
|
17335
|
-
|
|
17332
|
+
g.filter((b) => b.isLink).map((b) => ({
|
|
17333
|
+
...b,
|
|
17334
|
+
from: m + b.start + 1,
|
|
17335
|
+
to: m + b.end + 1
|
|
17336
|
+
})).filter((b) => r.schema.marks.code ? !r.doc.rangeHasMark(b.from, b.to, r.schema.marks.code) : !0).filter((b) => n.validate(b.value)).filter((b) => n.shouldAutoLink(b.value)).forEach((b) => {
|
|
17337
|
+
so(b.from, b.to, r.doc).some((x) => x.mark.type === n.type) || o.addMark(
|
|
17338
|
+
b.from,
|
|
17339
|
+
b.to,
|
|
17336
17340
|
n.type.create({
|
|
17337
|
-
href:
|
|
17341
|
+
href: b.href
|
|
17338
17342
|
})
|
|
17339
17343
|
);
|
|
17340
17344
|
});
|
|
@@ -18163,8 +18167,8 @@ var tb = "listItem", Ql = "textStyle", Xl = /^(\d+)\.\s$/, Cd = qe.create({
|
|
|
18163
18167
|
const f = r.extensionManager.attributes, h = Xn(u, f), p = new Set(Object.keys(h)), m = this.options.HTMLAttributes;
|
|
18164
18168
|
return d.forEach((g) => {
|
|
18165
18169
|
p.has(g) || (g in m ? i.setAttribute(g, m[g]) : i.removeAttribute(g));
|
|
18166
|
-
}), Object.entries(h).forEach(([g,
|
|
18167
|
-
|
|
18170
|
+
}), Object.entries(h).forEach(([g, b]) => {
|
|
18171
|
+
b == null ? g in m ? i.setAttribute(g, m[g]) : i.removeAttribute(g) : i.setAttribute(g, b);
|
|
18168
18172
|
}), d = p, !0;
|
|
18169
18173
|
}
|
|
18170
18174
|
};
|
|
@@ -19429,20 +19433,20 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19429
19433
|
},
|
|
19430
19434
|
emits: ["update:modelValue", "blur", "focus"],
|
|
19431
19435
|
setup(n, { emit: e }) {
|
|
19432
|
-
Yd((
|
|
19433
|
-
v730eb23c:
|
|
19434
|
-
cf24df18:
|
|
19436
|
+
Yd((v) => ({
|
|
19437
|
+
v730eb23c: v.minHeight,
|
|
19438
|
+
cf24df18: v.maxHeight
|
|
19435
19439
|
}));
|
|
19436
|
-
const t = n, r = e, i = xn(), s = L(() => !!i.default), o =
|
|
19440
|
+
const t = n, r = e, i = xn(), s = L(() => !!i.default), o = X(null), l = X(typeof t.modelValue == "string" ? t.modelValue : "");
|
|
19437
19441
|
er(() => {
|
|
19438
19442
|
(t.modelValue === void 0 || t.modelValue === "") && s.value && setTimeout(() => {
|
|
19439
|
-
if (o.value &&
|
|
19440
|
-
const
|
|
19441
|
-
|
|
19443
|
+
if (o.value && k.value) {
|
|
19444
|
+
const v = o.value.innerHTML?.trim() || "";
|
|
19445
|
+
v && (k.value.commands.setContent(v), l.value = v, r("update:modelValue", v));
|
|
19442
19446
|
}
|
|
19443
19447
|
}, 0);
|
|
19444
19448
|
});
|
|
19445
|
-
const a =
|
|
19449
|
+
const a = X(null), c = X([]), d = X(), {
|
|
19446
19450
|
floatingStyle: u,
|
|
19447
19451
|
updatePosition: f,
|
|
19448
19452
|
cleanup: h
|
|
@@ -19460,19 +19464,19 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19460
19464
|
m();
|
|
19461
19465
|
}
|
|
19462
19466
|
}
|
|
19463
|
-
}), p = async (
|
|
19464
|
-
a.value =
|
|
19467
|
+
}), p = async (v) => {
|
|
19468
|
+
a.value = v, await $e(), f();
|
|
19465
19469
|
}, m = () => {
|
|
19466
19470
|
a.value = null;
|
|
19467
|
-
}, g = (
|
|
19468
|
-
a.value ===
|
|
19469
|
-
},
|
|
19470
|
-
|
|
19471
|
-
},
|
|
19472
|
-
|
|
19473
|
-
},
|
|
19474
|
-
|
|
19475
|
-
},
|
|
19471
|
+
}, g = (v) => {
|
|
19472
|
+
a.value === v ? m() : p(v);
|
|
19473
|
+
}, b = (v) => {
|
|
19474
|
+
v.action && k.value && v.action(k.value);
|
|
19475
|
+
}, x = (v) => {
|
|
19476
|
+
k.value && v.action(k.value), m();
|
|
19477
|
+
}, y = (v, S) => {
|
|
19478
|
+
v && (c.value[S] = v.$el || v);
|
|
19479
|
+
}, k = _0({
|
|
19476
19480
|
content: l.value,
|
|
19477
19481
|
editable: !t.disabled && !t.readonly,
|
|
19478
19482
|
extensions: [
|
|
@@ -19491,27 +19495,27 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19491
19495
|
placeholder: t.placeholder
|
|
19492
19496
|
})
|
|
19493
19497
|
],
|
|
19494
|
-
onUpdate: ({ editor:
|
|
19495
|
-
const
|
|
19496
|
-
l.value =
|
|
19498
|
+
onUpdate: ({ editor: v }) => {
|
|
19499
|
+
const S = v.getHTML();
|
|
19500
|
+
l.value = S, r("update:modelValue", S);
|
|
19497
19501
|
},
|
|
19498
|
-
onFocus: (
|
|
19499
|
-
r("focus",
|
|
19502
|
+
onFocus: (v) => {
|
|
19503
|
+
r("focus", v.event);
|
|
19500
19504
|
},
|
|
19501
|
-
onBlur: (
|
|
19502
|
-
r("blur",
|
|
19505
|
+
onBlur: (v) => {
|
|
19506
|
+
r("blur", v.event);
|
|
19503
19507
|
}
|
|
19504
19508
|
});
|
|
19505
|
-
return ht(() => t.modelValue, (
|
|
19506
|
-
typeof
|
|
19507
|
-
}), ht(() => t.disabled, (
|
|
19508
|
-
|
|
19509
|
-
}), ht(() => t.readonly, (
|
|
19510
|
-
|
|
19509
|
+
return ht(() => t.modelValue, (v) => {
|
|
19510
|
+
typeof v == "string" && k.value && k.value.getHTML() !== v && (k.value.commands.setContent(v), l.value = v);
|
|
19511
|
+
}), ht(() => t.disabled, (v) => {
|
|
19512
|
+
k.value && k.value.setEditable(!v && !t.readonly);
|
|
19513
|
+
}), ht(() => t.readonly, (v) => {
|
|
19514
|
+
k.value && k.value.setEditable(!t.disabled && !v);
|
|
19511
19515
|
}), Ds(() => {
|
|
19512
|
-
|
|
19513
|
-
}), (
|
|
19514
|
-
class:
|
|
19516
|
+
k.value && k.value.destroy(), h();
|
|
19517
|
+
}), (v, S) => (C(), T("div", {
|
|
19518
|
+
class: Z(["input-richtext-container", {
|
|
19515
19519
|
"input-error": n.error,
|
|
19516
19520
|
"input-disabled": n.disabled
|
|
19517
19521
|
}])
|
|
@@ -19519,11 +19523,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19519
19523
|
$("div", Vb, [
|
|
19520
19524
|
$("div", Fb, [
|
|
19521
19525
|
z(re, {
|
|
19522
|
-
color: R(
|
|
19526
|
+
color: R(k)?.isActive("bold") ? "primary" : "secondary",
|
|
19523
19527
|
size: "sm",
|
|
19524
19528
|
icon: "",
|
|
19525
19529
|
squircle: "",
|
|
19526
|
-
onClick:
|
|
19530
|
+
onClick: S[0] || (S[0] = (w) => R(k)?.chain().focus().toggleBold().run()),
|
|
19527
19531
|
disabled: n.disabled,
|
|
19528
19532
|
title: "Bold (Ctrl+B)"
|
|
19529
19533
|
}, {
|
|
@@ -19533,11 +19537,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19533
19537
|
_: 1
|
|
19534
19538
|
}, 8, ["color", "disabled"]),
|
|
19535
19539
|
z(re, {
|
|
19536
|
-
color: R(
|
|
19540
|
+
color: R(k)?.isActive("italic") ? "primary" : "secondary",
|
|
19537
19541
|
size: "sm",
|
|
19538
19542
|
icon: "",
|
|
19539
19543
|
squircle: "",
|
|
19540
|
-
onClick:
|
|
19544
|
+
onClick: S[1] || (S[1] = (w) => R(k)?.chain().focus().toggleItalic().run()),
|
|
19541
19545
|
disabled: n.disabled,
|
|
19542
19546
|
title: "Italic (Ctrl+I)"
|
|
19543
19547
|
}, {
|
|
@@ -19547,11 +19551,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19547
19551
|
_: 1
|
|
19548
19552
|
}, 8, ["color", "disabled"]),
|
|
19549
19553
|
z(re, {
|
|
19550
|
-
color: R(
|
|
19554
|
+
color: R(k)?.isActive("underline") ? "primary" : "secondary",
|
|
19551
19555
|
size: "sm",
|
|
19552
19556
|
icon: "",
|
|
19553
19557
|
squircle: "",
|
|
19554
|
-
onClick:
|
|
19558
|
+
onClick: S[2] || (S[2] = (w) => R(k)?.chain().focus().toggleUnderline().run()),
|
|
19555
19559
|
disabled: n.disabled,
|
|
19556
19560
|
title: "Underline (Ctrl+U)"
|
|
19557
19561
|
}, {
|
|
@@ -19561,11 +19565,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19561
19565
|
_: 1
|
|
19562
19566
|
}, 8, ["color", "disabled"]),
|
|
19563
19567
|
z(re, {
|
|
19564
|
-
color: R(
|
|
19568
|
+
color: R(k)?.isActive("strike") ? "primary" : "secondary",
|
|
19565
19569
|
size: "sm",
|
|
19566
19570
|
icon: "",
|
|
19567
19571
|
squircle: "",
|
|
19568
|
-
onClick:
|
|
19572
|
+
onClick: S[3] || (S[3] = (w) => R(k)?.chain().focus().toggleStrike().run()),
|
|
19569
19573
|
disabled: n.disabled,
|
|
19570
19574
|
title: "Strikethrough"
|
|
19571
19575
|
}, {
|
|
@@ -19582,11 +19586,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19582
19586
|
}),
|
|
19583
19587
|
$("div", Hb, [
|
|
19584
19588
|
z(re, {
|
|
19585
|
-
color: R(
|
|
19589
|
+
color: R(k)?.isActive("heading", { level: 1 }) ? "primary" : "secondary",
|
|
19586
19590
|
size: "sm",
|
|
19587
19591
|
icon: "",
|
|
19588
19592
|
squircle: "",
|
|
19589
|
-
onClick:
|
|
19593
|
+
onClick: S[4] || (S[4] = (w) => R(k)?.chain().focus().toggleHeading({ level: 1 }).run()),
|
|
19590
19594
|
disabled: n.disabled,
|
|
19591
19595
|
title: "Heading 1"
|
|
19592
19596
|
}, {
|
|
@@ -19596,11 +19600,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19596
19600
|
_: 1
|
|
19597
19601
|
}, 8, ["color", "disabled"]),
|
|
19598
19602
|
z(re, {
|
|
19599
|
-
color: R(
|
|
19603
|
+
color: R(k)?.isActive("heading", { level: 2 }) ? "primary" : "secondary",
|
|
19600
19604
|
size: "sm",
|
|
19601
19605
|
icon: "",
|
|
19602
19606
|
squircle: "",
|
|
19603
|
-
onClick:
|
|
19607
|
+
onClick: S[5] || (S[5] = (w) => R(k)?.chain().focus().toggleHeading({ level: 2 }).run()),
|
|
19604
19608
|
disabled: n.disabled,
|
|
19605
19609
|
title: "Heading 2"
|
|
19606
19610
|
}, {
|
|
@@ -19610,11 +19614,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19610
19614
|
_: 1
|
|
19611
19615
|
}, 8, ["color", "disabled"]),
|
|
19612
19616
|
z(re, {
|
|
19613
|
-
color: R(
|
|
19617
|
+
color: R(k)?.isActive("heading", { level: 3 }) ? "primary" : "secondary",
|
|
19614
19618
|
size: "sm",
|
|
19615
19619
|
icon: "",
|
|
19616
19620
|
squircle: "",
|
|
19617
|
-
onClick:
|
|
19621
|
+
onClick: S[6] || (S[6] = (w) => R(k)?.chain().focus().toggleHeading({ level: 3 }).run()),
|
|
19618
19622
|
disabled: n.disabled,
|
|
19619
19623
|
title: "Heading 3"
|
|
19620
19624
|
}, {
|
|
@@ -19631,11 +19635,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19631
19635
|
}),
|
|
19632
19636
|
$("div", jb, [
|
|
19633
19637
|
z(re, {
|
|
19634
|
-
color: R(
|
|
19638
|
+
color: R(k)?.isActive({ textAlign: "left" }) ? "primary" : "secondary",
|
|
19635
19639
|
size: "sm",
|
|
19636
19640
|
icon: "",
|
|
19637
19641
|
squircle: "",
|
|
19638
|
-
onClick:
|
|
19642
|
+
onClick: S[7] || (S[7] = (w) => R(k)?.chain().focus().setTextAlign("left").run()),
|
|
19639
19643
|
disabled: n.disabled,
|
|
19640
19644
|
title: "Align Left"
|
|
19641
19645
|
}, {
|
|
@@ -19645,11 +19649,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19645
19649
|
_: 1
|
|
19646
19650
|
}, 8, ["color", "disabled"]),
|
|
19647
19651
|
z(re, {
|
|
19648
|
-
color: R(
|
|
19652
|
+
color: R(k)?.isActive({ textAlign: "center" }) ? "primary" : "secondary",
|
|
19649
19653
|
size: "sm",
|
|
19650
19654
|
icon: "",
|
|
19651
19655
|
squircle: "",
|
|
19652
|
-
onClick:
|
|
19656
|
+
onClick: S[8] || (S[8] = (w) => R(k)?.chain().focus().setTextAlign("center").run()),
|
|
19653
19657
|
disabled: n.disabled,
|
|
19654
19658
|
title: "Align Center"
|
|
19655
19659
|
}, {
|
|
@@ -19659,11 +19663,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19659
19663
|
_: 1
|
|
19660
19664
|
}, 8, ["color", "disabled"]),
|
|
19661
19665
|
z(re, {
|
|
19662
|
-
color: R(
|
|
19666
|
+
color: R(k)?.isActive({ textAlign: "right" }) ? "primary" : "secondary",
|
|
19663
19667
|
size: "sm",
|
|
19664
19668
|
icon: "",
|
|
19665
19669
|
squircle: "",
|
|
19666
|
-
onClick:
|
|
19670
|
+
onClick: S[9] || (S[9] = (w) => R(k)?.chain().focus().setTextAlign("right").run()),
|
|
19667
19671
|
disabled: n.disabled,
|
|
19668
19672
|
title: "Align Right"
|
|
19669
19673
|
}, {
|
|
@@ -19680,11 +19684,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19680
19684
|
}),
|
|
19681
19685
|
$("div", qb, [
|
|
19682
19686
|
z(re, {
|
|
19683
|
-
color: R(
|
|
19687
|
+
color: R(k)?.isActive("bulletList") ? "primary" : "secondary",
|
|
19684
19688
|
size: "sm",
|
|
19685
19689
|
icon: "",
|
|
19686
19690
|
squircle: "",
|
|
19687
|
-
onClick:
|
|
19691
|
+
onClick: S[10] || (S[10] = (w) => R(k)?.chain().focus().toggleBulletList().run()),
|
|
19688
19692
|
disabled: n.disabled,
|
|
19689
19693
|
title: "Bullet List"
|
|
19690
19694
|
}, {
|
|
@@ -19694,11 +19698,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19694
19698
|
_: 1
|
|
19695
19699
|
}, 8, ["color", "disabled"]),
|
|
19696
19700
|
z(re, {
|
|
19697
|
-
color: R(
|
|
19701
|
+
color: R(k)?.isActive("orderedList") ? "primary" : "secondary",
|
|
19698
19702
|
size: "sm",
|
|
19699
19703
|
icon: "",
|
|
19700
19704
|
squircle: "",
|
|
19701
|
-
onClick:
|
|
19705
|
+
onClick: S[11] || (S[11] = (w) => R(k)?.chain().focus().toggleOrderedList().run()),
|
|
19702
19706
|
disabled: n.disabled,
|
|
19703
19707
|
title: "Numbered List"
|
|
19704
19708
|
}, {
|
|
@@ -19708,11 +19712,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19708
19712
|
_: 1
|
|
19709
19713
|
}, 8, ["color", "disabled"]),
|
|
19710
19714
|
z(re, {
|
|
19711
|
-
color: R(
|
|
19715
|
+
color: R(k)?.isActive("blockquote") ? "primary" : "secondary",
|
|
19712
19716
|
size: "sm",
|
|
19713
19717
|
icon: "",
|
|
19714
19718
|
squircle: "",
|
|
19715
|
-
onClick:
|
|
19719
|
+
onClick: S[12] || (S[12] = (w) => R(k)?.chain().focus().toggleBlockquote().run()),
|
|
19716
19720
|
disabled: n.disabled,
|
|
19717
19721
|
title: "Quote"
|
|
19718
19722
|
}, {
|
|
@@ -19722,11 +19726,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19722
19726
|
_: 1
|
|
19723
19727
|
}, 8, ["color", "disabled"]),
|
|
19724
19728
|
z(re, {
|
|
19725
|
-
color: R(
|
|
19729
|
+
color: R(k)?.isActive("codeBlock") ? "primary" : "secondary",
|
|
19726
19730
|
size: "sm",
|
|
19727
19731
|
icon: "",
|
|
19728
19732
|
squircle: "",
|
|
19729
|
-
onClick:
|
|
19733
|
+
onClick: S[13] || (S[13] = (w) => R(k)?.chain().focus().toggleCodeBlock().run()),
|
|
19730
19734
|
disabled: n.disabled,
|
|
19731
19735
|
title: "Code Block"
|
|
19732
19736
|
}, {
|
|
@@ -19747,7 +19751,7 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19747
19751
|
size: "sm",
|
|
19748
19752
|
icon: "",
|
|
19749
19753
|
squircle: "",
|
|
19750
|
-
onClick:
|
|
19754
|
+
onClick: S[14] || (S[14] = (w) => R(k)?.chain().focus().setHorizontalRule().run()),
|
|
19751
19755
|
disabled: n.disabled,
|
|
19752
19756
|
title: "Horizontal Rule"
|
|
19753
19757
|
}, {
|
|
@@ -19761,8 +19765,8 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19761
19765
|
size: "sm",
|
|
19762
19766
|
icon: "",
|
|
19763
19767
|
squircle: "",
|
|
19764
|
-
disabled: !R(
|
|
19765
|
-
onClick:
|
|
19768
|
+
disabled: !R(k)?.can().undo() || n.disabled,
|
|
19769
|
+
onClick: S[15] || (S[15] = (w) => R(k)?.chain().focus().undo().run()),
|
|
19766
19770
|
title: "Undo (Ctrl+Z)"
|
|
19767
19771
|
}, {
|
|
19768
19772
|
icon: N(() => [
|
|
@@ -19775,8 +19779,8 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19775
19779
|
size: "sm",
|
|
19776
19780
|
icon: "",
|
|
19777
19781
|
squircle: "",
|
|
19778
|
-
disabled: !R(
|
|
19779
|
-
onClick:
|
|
19782
|
+
disabled: !R(k)?.can().redo() || n.disabled,
|
|
19783
|
+
onClick: S[16] || (S[16] = (w) => R(k)?.chain().focus().redo().run()),
|
|
19780
19784
|
title: "Redo (Ctrl+Y)"
|
|
19781
19785
|
}, {
|
|
19782
19786
|
icon: N(() => [
|
|
@@ -19792,42 +19796,42 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19792
19796
|
margin: "4px"
|
|
19793
19797
|
}),
|
|
19794
19798
|
$("div", Wb, [
|
|
19795
|
-
(C(!0), T(be, null, Je(n.customControls, (
|
|
19796
|
-
|
|
19799
|
+
(C(!0), T(be, null, Je(n.customControls, (w, M) => (C(), T(be, { key: M }, [
|
|
19800
|
+
w.action ? (C(), _(re, {
|
|
19797
19801
|
key: 0,
|
|
19798
19802
|
color: "secondary",
|
|
19799
19803
|
size: "sm",
|
|
19800
|
-
icon: !
|
|
19804
|
+
icon: !w.label,
|
|
19801
19805
|
squircle: "",
|
|
19802
|
-
onClick: (D) =>
|
|
19806
|
+
onClick: (D) => b(w),
|
|
19803
19807
|
disabled: n.disabled,
|
|
19804
|
-
title:
|
|
19808
|
+
title: w.tooltip || w.label
|
|
19805
19809
|
}, Xe({
|
|
19806
19810
|
default: N(() => [
|
|
19807
|
-
|
|
19808
|
-
Ve(ee(
|
|
19811
|
+
w.label && w.icon ? (C(), T("span", Kb, ee(w.label), 1)) : w.label ? (C(), T(be, { key: 1 }, [
|
|
19812
|
+
Ve(ee(w.label), 1)
|
|
19809
19813
|
], 64)) : W("", !0)
|
|
19810
19814
|
]),
|
|
19811
19815
|
_: 2
|
|
19812
19816
|
}, [
|
|
19813
|
-
|
|
19817
|
+
w.icon ? {
|
|
19814
19818
|
name: "icon",
|
|
19815
19819
|
fn: N(() => [
|
|
19816
|
-
(C(),
|
|
19820
|
+
(C(), _(In(w.icon), { size: 16 }))
|
|
19817
19821
|
]),
|
|
19818
19822
|
key: "0"
|
|
19819
19823
|
} : void 0
|
|
19820
|
-
]), 1032, ["icon", "onClick", "disabled", "title"])) :
|
|
19824
|
+
]), 1032, ["icon", "onClick", "disabled", "title"])) : w.list ? (C(), T("div", Jb, [
|
|
19821
19825
|
z(re, {
|
|
19822
19826
|
ref_for: !0,
|
|
19823
|
-
ref: (D) =>
|
|
19827
|
+
ref: (D) => y(D, M),
|
|
19824
19828
|
color: "secondary",
|
|
19825
19829
|
size: "sm",
|
|
19826
19830
|
squircle: "",
|
|
19827
19831
|
onClick: (D) => g(M),
|
|
19828
19832
|
disabled: n.disabled,
|
|
19829
|
-
title:
|
|
19830
|
-
class:
|
|
19833
|
+
title: w.tooltip || w.label,
|
|
19834
|
+
class: Z({ "input-richtext-dropdown-open": a.value === M })
|
|
19831
19835
|
}, Xe({
|
|
19832
19836
|
"trailing-icon": N(() => [
|
|
19833
19837
|
z(R(Rs), {
|
|
@@ -19836,14 +19840,14 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19836
19840
|
})
|
|
19837
19841
|
]),
|
|
19838
19842
|
default: N(() => [
|
|
19839
|
-
|
|
19843
|
+
w.label ? (C(), T("span", Gb, ee(w.label), 1)) : W("", !0)
|
|
19840
19844
|
]),
|
|
19841
19845
|
_: 2
|
|
19842
19846
|
}, [
|
|
19843
|
-
|
|
19847
|
+
w.icon ? {
|
|
19844
19848
|
name: "leading-icon",
|
|
19845
19849
|
fn: N(() => [
|
|
19846
|
-
(C(),
|
|
19850
|
+
(C(), _(In(w.icon), { size: 16 }))
|
|
19847
19851
|
]),
|
|
19848
19852
|
key: "0"
|
|
19849
19853
|
} : void 0
|
|
@@ -19853,7 +19857,7 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19853
19857
|
])
|
|
19854
19858
|
], 64)) : W("", !0)
|
|
19855
19859
|
]),
|
|
19856
|
-
(C(),
|
|
19860
|
+
(C(), _(hi, { to: "body" }, [
|
|
19857
19861
|
a.value !== null && n.customControls?.[a.value]?.list ? (C(), T("div", {
|
|
19858
19862
|
key: 0,
|
|
19859
19863
|
ref_key: "dropdownRef",
|
|
@@ -19861,24 +19865,24 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19861
19865
|
class: "input-richtext-dropdown",
|
|
19862
19866
|
style: Le(R(u))
|
|
19863
19867
|
}, [
|
|
19864
|
-
(C(!0), T(be, null, Je(n.customControls[a.value].list, (
|
|
19868
|
+
(C(!0), T(be, null, Je(n.customControls[a.value].list, (w, M) => (C(), T("button", {
|
|
19865
19869
|
key: M,
|
|
19866
19870
|
class: "input-richtext-dropdown-item",
|
|
19867
|
-
onClick: (D) =>
|
|
19871
|
+
onClick: (D) => x(w),
|
|
19868
19872
|
type: "button"
|
|
19869
19873
|
}, [
|
|
19870
|
-
|
|
19874
|
+
w.icon ? (C(), _(In(w.icon), {
|
|
19871
19875
|
key: 0,
|
|
19872
19876
|
size: 16,
|
|
19873
19877
|
class: "input-richtext-dropdown-item-icon"
|
|
19874
19878
|
})) : W("", !0),
|
|
19875
|
-
$("span", Qb, ee(
|
|
19879
|
+
$("span", Qb, ee(w.label), 1)
|
|
19876
19880
|
], 8, Yb))), 128))
|
|
19877
19881
|
], 4)) : W("", !0)
|
|
19878
19882
|
])),
|
|
19879
19883
|
$("div", Xb, [
|
|
19880
19884
|
z(R(Z0), {
|
|
19881
|
-
editor: R(
|
|
19885
|
+
editor: R(k),
|
|
19882
19886
|
class: "input-richtext-editor",
|
|
19883
19887
|
id: n.inputId
|
|
19884
19888
|
}, null, 8, ["editor", "id"])
|
|
@@ -19890,7 +19894,7 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19890
19894
|
class: "sr-only",
|
|
19891
19895
|
"aria-hidden": "true"
|
|
19892
19896
|
}, [
|
|
19893
|
-
E(
|
|
19897
|
+
E(v.$slots, "default", {}, void 0, !0)
|
|
19894
19898
|
], 512)) : W("", !0)
|
|
19895
19899
|
], 2));
|
|
19896
19900
|
}
|
|
@@ -19927,11 +19931,11 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19927
19931
|
},
|
|
19928
19932
|
emits: ["update:modelValue", "blur", "focus", "complete"],
|
|
19929
19933
|
setup(n, { emit: e }) {
|
|
19930
|
-
const t = n, r = e, i =
|
|
19931
|
-
const
|
|
19932
|
-
for (;
|
|
19933
|
-
|
|
19934
|
-
return
|
|
19934
|
+
const t = n, r = e, i = X([]), s = X(-1), o = L(() => {
|
|
19935
|
+
const y = (t.modelValue || "").split("");
|
|
19936
|
+
for (; y.length < t.maxLength; )
|
|
19937
|
+
y.push("");
|
|
19938
|
+
return y.slice(0, t.maxLength);
|
|
19935
19939
|
}), l = L(() => t.divider ? typeof t.divider == "number" ? t.divider : t.divider.count : 0), a = L(() => t.divider ? typeof t.divider == "number" ? "-" : typeof t.divider == "object" && "character" in t.divider && t.divider.character || "-" : ""), c = L(() => typeof t.divider == "object" && "component" in t.divider && t.divider.component === "divider"), d = L(() => c.value ? {
|
|
19936
19940
|
orientation: "vertical",
|
|
19937
19941
|
variant: "solid",
|
|
@@ -19939,7 +19943,7 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19939
19943
|
margin: "0",
|
|
19940
19944
|
spacing: "1.5rem",
|
|
19941
19945
|
...t.divider.props
|
|
19942
|
-
} : {}), u = (
|
|
19946
|
+
} : {}), u = (x) => !l.value || x === t.maxLength ? !1 : x % l.value === 0, f = () => {
|
|
19943
19947
|
switch (t.variant) {
|
|
19944
19948
|
case "numeric":
|
|
19945
19949
|
return /^[0-9]$/;
|
|
@@ -19950,103 +19954,103 @@ const Vb = { class: "input-richtext-toolbar" }, Fb = { class: "input-richtext-gr
|
|
|
19950
19954
|
default:
|
|
19951
19955
|
return /^[0-9]$/;
|
|
19952
19956
|
}
|
|
19953
|
-
}, h = (
|
|
19954
|
-
const
|
|
19955
|
-
if (!f().test(
|
|
19956
|
-
|
|
19957
|
+
}, h = (x, y) => {
|
|
19958
|
+
const k = x.target, S = k.value.slice(-1);
|
|
19959
|
+
if (!f().test(S) && S !== "") {
|
|
19960
|
+
k.value = o.value[y];
|
|
19957
19961
|
return;
|
|
19958
19962
|
}
|
|
19959
19963
|
const M = [...o.value];
|
|
19960
|
-
M[
|
|
19964
|
+
M[y] = S;
|
|
19961
19965
|
const D = M.join("");
|
|
19962
|
-
r("update:modelValue", D),
|
|
19963
|
-
const H = i.value[
|
|
19966
|
+
r("update:modelValue", D), S && y < t.maxLength - 1 && $e(() => {
|
|
19967
|
+
const H = i.value[y + 1];
|
|
19964
19968
|
H && (H.focus(), H.select());
|
|
19965
19969
|
}), D.length === t.maxLength && r("complete", D);
|
|
19966
|
-
}, p = (
|
|
19967
|
-
const
|
|
19968
|
-
if (
|
|
19969
|
-
|
|
19970
|
-
const
|
|
19971
|
-
o.value[
|
|
19972
|
-
const
|
|
19973
|
-
|
|
19970
|
+
}, p = (x, y) => {
|
|
19971
|
+
const k = x.key;
|
|
19972
|
+
if (k === "Backspace") {
|
|
19973
|
+
x.preventDefault();
|
|
19974
|
+
const v = [...o.value];
|
|
19975
|
+
o.value[y] ? (v[y] = "", r("update:modelValue", v.join(""))) : y > 0 && (v[y - 1] = "", r("update:modelValue", v.join("")), $e(() => {
|
|
19976
|
+
const S = i.value[y - 1];
|
|
19977
|
+
S && S.focus();
|
|
19974
19978
|
}));
|
|
19975
|
-
} else if (
|
|
19976
|
-
|
|
19977
|
-
const
|
|
19978
|
-
|
|
19979
|
-
} else if (
|
|
19980
|
-
|
|
19981
|
-
const
|
|
19982
|
-
|
|
19983
|
-
} else if (
|
|
19984
|
-
|
|
19985
|
-
const
|
|
19986
|
-
|
|
19979
|
+
} else if (k === "ArrowLeft" && y > 0) {
|
|
19980
|
+
x.preventDefault();
|
|
19981
|
+
const v = i.value[y - 1];
|
|
19982
|
+
v && v.focus();
|
|
19983
|
+
} else if (k === "ArrowRight" && y < t.maxLength - 1) {
|
|
19984
|
+
x.preventDefault();
|
|
19985
|
+
const v = i.value[y + 1];
|
|
19986
|
+
v && v.focus();
|
|
19987
|
+
} else if (k === "Delete") {
|
|
19988
|
+
x.preventDefault();
|
|
19989
|
+
const v = [...o.value];
|
|
19990
|
+
v[y] = "", r("update:modelValue", v.join(""));
|
|
19987
19991
|
}
|
|
19988
|
-
}, m = (
|
|
19989
|
-
|
|
19990
|
-
const
|
|
19991
|
-
if (
|
|
19992
|
-
r("update:modelValue",
|
|
19993
|
-
const
|
|
19992
|
+
}, m = (x) => {
|
|
19993
|
+
x.preventDefault();
|
|
19994
|
+
const y = x.clipboardData?.getData("text") || "", k = f(), v = y.split("").filter((S) => k.test(S)).slice(0, t.maxLength).join("");
|
|
19995
|
+
if (v) {
|
|
19996
|
+
r("update:modelValue", v);
|
|
19997
|
+
const S = v.length < t.maxLength ? v.length : t.maxLength - 1;
|
|
19994
19998
|
$e(() => {
|
|
19995
|
-
const
|
|
19996
|
-
|
|
19997
|
-
}),
|
|
19999
|
+
const w = i.value[S];
|
|
20000
|
+
w && w.focus();
|
|
20001
|
+
}), v.length === t.maxLength && r("complete", v);
|
|
19998
20002
|
}
|
|
19999
|
-
}, g = (
|
|
20000
|
-
s.value =
|
|
20001
|
-
const
|
|
20002
|
-
|
|
20003
|
-
},
|
|
20004
|
-
s.value = -1, r("blur",
|
|
20003
|
+
}, g = (x) => {
|
|
20004
|
+
s.value = x;
|
|
20005
|
+
const y = i.value[x];
|
|
20006
|
+
y && y.select();
|
|
20007
|
+
}, b = (x) => {
|
|
20008
|
+
s.value = -1, r("blur", x);
|
|
20005
20009
|
};
|
|
20006
|
-
return ht(() => t.modelValue, (
|
|
20007
|
-
|
|
20008
|
-
const
|
|
20009
|
-
|
|
20010
|
+
return ht(() => t.modelValue, (x) => {
|
|
20011
|
+
x || $e(() => {
|
|
20012
|
+
const y = i.value[0];
|
|
20013
|
+
y && !t.disabled && !t.readonly && y.focus();
|
|
20010
20014
|
});
|
|
20011
|
-
}), (
|
|
20012
|
-
class:
|
|
20015
|
+
}), (x, y) => (C(), T("div", {
|
|
20016
|
+
class: Z(["pincode-wrapper", [`pincode-size-${n.size}`, { "pincode-error": n.error }]])
|
|
20013
20017
|
}, [
|
|
20014
20018
|
$("div", ek, [
|
|
20015
|
-
E(
|
|
20019
|
+
E(x.$slots, "leading", {}, void 0, !0),
|
|
20016
20020
|
t.hasLeadingIcon ? (C(), T("div", tk, [
|
|
20017
|
-
E(
|
|
20021
|
+
E(x.$slots, "leading-icon", {}, void 0, !0)
|
|
20018
20022
|
])) : W("", !0),
|
|
20019
|
-
(C(!0), T(be, null, Je(n.maxLength, (
|
|
20023
|
+
(C(!0), T(be, null, Je(n.maxLength, (k) => (C(), T(be, { key: k }, [
|
|
20020
20024
|
$("input", {
|
|
20021
20025
|
ref_for: !0,
|
|
20022
20026
|
ref_key: "pincodeRefs",
|
|
20023
20027
|
ref: i,
|
|
20024
20028
|
type: "text",
|
|
20025
|
-
class:
|
|
20026
|
-
"pincode-input-filled": o.value[
|
|
20027
|
-
"pincode-input-focused": s.value ===
|
|
20029
|
+
class: Z(["pincode-input", {
|
|
20030
|
+
"pincode-input-filled": o.value[k - 1],
|
|
20031
|
+
"pincode-input-focused": s.value === k - 1
|
|
20028
20032
|
}]),
|
|
20029
|
-
value: o.value[
|
|
20033
|
+
value: o.value[k - 1],
|
|
20030
20034
|
disabled: n.disabled,
|
|
20031
20035
|
readonly: n.readonly,
|
|
20032
20036
|
tabindex: n.disabled ? -1 : void 0,
|
|
20033
|
-
"data-index":
|
|
20037
|
+
"data-index": k - 1,
|
|
20034
20038
|
maxlength: "1",
|
|
20035
|
-
onInput: (
|
|
20036
|
-
onKeydown: (
|
|
20037
|
-
onFocus: (
|
|
20038
|
-
onBlur:
|
|
20039
|
+
onInput: (v) => h(v, k - 1),
|
|
20040
|
+
onKeydown: (v) => p(v, k - 1),
|
|
20041
|
+
onFocus: (v) => g(k - 1),
|
|
20042
|
+
onBlur: b,
|
|
20039
20043
|
onPaste: m
|
|
20040
20044
|
}, null, 42, nk),
|
|
20041
|
-
u(
|
|
20045
|
+
u(k) && c.value ? (C(), _(Lt, Dn({
|
|
20042
20046
|
key: 0,
|
|
20043
20047
|
ref_for: !0
|
|
20044
|
-
}, d.value, { class: "pincode-custom-divider" }), null, 16)) : u(
|
|
20048
|
+
}, d.value, { class: "pincode-custom-divider" }), null, 16)) : u(k) ? (C(), T("span", rk, ee(a.value), 1)) : W("", !0)
|
|
20045
20049
|
], 64))), 128)),
|
|
20046
20050
|
t.hasTrailingIcon ? (C(), T("div", ik, [
|
|
20047
|
-
E(
|
|
20051
|
+
E(x.$slots, "trailing-icon", {}, void 0, !0)
|
|
20048
20052
|
])) : W("", !0),
|
|
20049
|
-
E(
|
|
20053
|
+
E(x.$slots, "trailing", {}, void 0, !0)
|
|
20050
20054
|
])
|
|
20051
20055
|
], 2));
|
|
20052
20056
|
}
|
|
@@ -20121,32 +20125,36 @@ const ak = {
|
|
|
20121
20125
|
},
|
|
20122
20126
|
emits: ["update:modelValue", "input", "change", "blur", "focus", "keydown", "file-error", "clear-preview", "complete"],
|
|
20123
20127
|
setup(n, { emit: e }) {
|
|
20124
|
-
const t = n, r = e, i = xn(), s =
|
|
20125
|
-
|
|
20126
|
-
|
|
20127
|
-
|
|
20128
|
-
y !== void 0 && (s.value = y);
|
|
20128
|
+
const t = n, r = e, i = xn(), s = X(
|
|
20129
|
+
t.value !== void 0 ? t.value : t.modelValue !== void 0 ? t.modelValue : ""
|
|
20130
|
+
), o = L(() => s.value);
|
|
20131
|
+
ht(() => t.modelValue, (y) => {
|
|
20132
|
+
y !== void 0 && y !== s.value && (s.value = y);
|
|
20129
20133
|
}, { immediate: !0 });
|
|
20130
20134
|
const l = `input-${Qd()}`, a = (y) => lk(i, y), c = L(() => {
|
|
20131
|
-
const y = ["text", "email", "password", "number", "tel", "url", "search"],
|
|
20132
|
-
return y.includes(
|
|
20135
|
+
const y = ["text", "email", "password", "number", "tel", "url", "search"], k = t.type || "text";
|
|
20136
|
+
return y.includes(k);
|
|
20133
20137
|
}), d = (y) => {
|
|
20134
20138
|
s.value = y, r("update:modelValue", y), r("input", y), r("change", y);
|
|
20135
20139
|
}, u = (y) => {
|
|
20136
|
-
r("
|
|
20140
|
+
s.value = y, r("input", y);
|
|
20137
20141
|
}, f = (y) => {
|
|
20138
|
-
r("
|
|
20142
|
+
r("change", y);
|
|
20139
20143
|
}, h = (y) => {
|
|
20140
|
-
r("
|
|
20144
|
+
r("blur", y);
|
|
20141
20145
|
}, p = (y) => {
|
|
20146
|
+
r("focus", y);
|
|
20147
|
+
}, m = (y) => {
|
|
20148
|
+
r("keydown", y);
|
|
20149
|
+
}, g = (y) => {
|
|
20142
20150
|
r("file-error", y);
|
|
20143
|
-
},
|
|
20151
|
+
}, b = () => {
|
|
20144
20152
|
r("clear-preview");
|
|
20145
|
-
},
|
|
20153
|
+
}, x = (y) => {
|
|
20146
20154
|
r("complete", y);
|
|
20147
20155
|
};
|
|
20148
|
-
return (y,
|
|
20149
|
-
class:
|
|
20156
|
+
return (y, k) => (C(), T("div", {
|
|
20157
|
+
class: Z(["input-container", {
|
|
20150
20158
|
"input-container--full-width": t.fullWidth,
|
|
20151
20159
|
[`input-container--${t.size || "md"}`]: !0
|
|
20152
20160
|
}])
|
|
@@ -20161,7 +20169,7 @@ const ak = {
|
|
|
20161
20169
|
t.required ? (C(), T("span", ak, "*")) : W("", !0)
|
|
20162
20170
|
])) : W("", !0),
|
|
20163
20171
|
$("div", null, [
|
|
20164
|
-
c.value ? (C(),
|
|
20172
|
+
c.value ? (C(), _(bf, {
|
|
20165
20173
|
key: 0,
|
|
20166
20174
|
"model-value": o.value,
|
|
20167
20175
|
type: n.type,
|
|
@@ -20181,9 +20189,11 @@ const ak = {
|
|
|
20181
20189
|
"has-leading-icon": a("leading-icon"),
|
|
20182
20190
|
"has-trailing-icon": a("trailing-icon"),
|
|
20183
20191
|
"onUpdate:modelValue": d,
|
|
20184
|
-
|
|
20185
|
-
|
|
20186
|
-
|
|
20192
|
+
onInput: u,
|
|
20193
|
+
onChange: f,
|
|
20194
|
+
onBlur: h,
|
|
20195
|
+
onFocus: p,
|
|
20196
|
+
onKeydown: m
|
|
20187
20197
|
}, {
|
|
20188
20198
|
leading: N(() => [
|
|
20189
20199
|
E(y.$slots, "leading", {}, void 0, !0)
|
|
@@ -20198,7 +20208,7 @@ const ak = {
|
|
|
20198
20208
|
E(y.$slots, "trailing", {}, void 0, !0)
|
|
20199
20209
|
]),
|
|
20200
20210
|
_: 3
|
|
20201
|
-
}, 8, ["model-value", "type", "placeholder", "disabled", "readonly", "required", "min", "max", "step", "autocomplete", "spellcheck", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : n.type === "textarea" ? (C(),
|
|
20211
|
+
}, 8, ["model-value", "type", "placeholder", "disabled", "readonly", "required", "min", "max", "step", "autocomplete", "spellcheck", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : n.type === "textarea" ? (C(), _(Sf, {
|
|
20202
20212
|
key: 1,
|
|
20203
20213
|
"model-value": o.value,
|
|
20204
20214
|
placeholder: n.placeholder,
|
|
@@ -20218,9 +20228,9 @@ const ak = {
|
|
|
20218
20228
|
"has-leading-icon": a("leading-icon"),
|
|
20219
20229
|
"has-trailing-icon": a("trailing-icon"),
|
|
20220
20230
|
"onUpdate:modelValue": d,
|
|
20221
|
-
onBlur:
|
|
20222
|
-
onFocus:
|
|
20223
|
-
onKeydown:
|
|
20231
|
+
onBlur: h,
|
|
20232
|
+
onFocus: p,
|
|
20233
|
+
onKeydown: m
|
|
20224
20234
|
}, Xe({
|
|
20225
20235
|
leading: N(() => [
|
|
20226
20236
|
E(y.$slots, "leading", {}, void 0, !0)
|
|
@@ -20243,7 +20253,7 @@ const ak = {
|
|
|
20243
20253
|
]),
|
|
20244
20254
|
key: "0"
|
|
20245
20255
|
} : void 0
|
|
20246
|
-
]), 1032, ["model-value", "placeholder", "disabled", "readonly", "required", "rows", "cols", "maxlength", "autocomplete", "spellcheck", "resizable", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : n.type === "select" ? (C(),
|
|
20256
|
+
]), 1032, ["model-value", "placeholder", "disabled", "readonly", "required", "rows", "cols", "maxlength", "autocomplete", "spellcheck", "resizable", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : n.type === "select" ? (C(), _(Vf, {
|
|
20247
20257
|
key: 2,
|
|
20248
20258
|
"model-value": o.value,
|
|
20249
20259
|
options: t.options,
|
|
@@ -20262,8 +20272,8 @@ const ak = {
|
|
|
20262
20272
|
"has-leading-icon": a("leading-icon"),
|
|
20263
20273
|
"has-trailing-icon": a("trailing-icon"),
|
|
20264
20274
|
"onUpdate:modelValue": d,
|
|
20265
|
-
onBlur:
|
|
20266
|
-
onFocus:
|
|
20275
|
+
onBlur: h,
|
|
20276
|
+
onFocus: p
|
|
20267
20277
|
}, {
|
|
20268
20278
|
leading: N(() => [
|
|
20269
20279
|
E(y.$slots, "leading", {}, void 0, !0)
|
|
@@ -20278,7 +20288,7 @@ const ak = {
|
|
|
20278
20288
|
E(y.$slots, "trailing", {}, void 0, !0)
|
|
20279
20289
|
]),
|
|
20280
20290
|
_: 3
|
|
20281
|
-
}, 8, ["model-value", "options", "placeholder", "disabled", "multiple", "searchable", "allow-insert", "max-dropdown-height", "no-options-text", "search-placeholder", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : n.type === "file" ? (C(),
|
|
20291
|
+
}, 8, ["model-value", "options", "placeholder", "disabled", "multiple", "searchable", "allow-insert", "max-dropdown-height", "no-options-text", "search-placeholder", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : n.type === "file" ? (C(), _(sh, {
|
|
20282
20292
|
key: 3,
|
|
20283
20293
|
"model-value": o.value,
|
|
20284
20294
|
accept: t.accept,
|
|
@@ -20296,10 +20306,10 @@ const ak = {
|
|
|
20296
20306
|
"has-leading-icon": a("leading-icon"),
|
|
20297
20307
|
"has-trailing-icon": a("trailing-icon"),
|
|
20298
20308
|
"onUpdate:modelValue": d,
|
|
20299
|
-
onFileError:
|
|
20300
|
-
onClearPreview:
|
|
20301
|
-
onBlur:
|
|
20302
|
-
onFocus:
|
|
20309
|
+
onFileError: g,
|
|
20310
|
+
onClearPreview: b,
|
|
20311
|
+
onBlur: h,
|
|
20312
|
+
onFocus: p
|
|
20303
20313
|
}, {
|
|
20304
20314
|
leading: N(() => [
|
|
20305
20315
|
E(y.$slots, "leading", {}, void 0, !0)
|
|
@@ -20314,7 +20324,7 @@ const ak = {
|
|
|
20314
20324
|
E(y.$slots, "trailing", {}, void 0, !0)
|
|
20315
20325
|
]),
|
|
20316
20326
|
_: 3
|
|
20317
|
-
}, 8, ["model-value", "accept", "multiple", "max-file-size", "drag-drop-text", "selected-text", "preview", "disabled", "required", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : n.type === "date" ? (C(),
|
|
20327
|
+
}, 8, ["model-value", "accept", "multiple", "max-file-size", "drag-drop-text", "selected-text", "preview", "disabled", "required", "error", "size", "tabindex", "has-leading-icon", "has-trailing-icon"])) : n.type === "date" ? (C(), _(zh, {
|
|
20318
20328
|
key: 4,
|
|
20319
20329
|
"model-value": o.value,
|
|
20320
20330
|
placeholder: n.placeholder,
|
|
@@ -20328,9 +20338,9 @@ const ak = {
|
|
|
20328
20338
|
size: t.size,
|
|
20329
20339
|
tabindex: n.tabindex,
|
|
20330
20340
|
"onUpdate:modelValue": d,
|
|
20331
|
-
onBlur:
|
|
20332
|
-
onFocus:
|
|
20333
|
-
}, null, 8, ["model-value", "placeholder", "disabled", "readonly", "required", "min", "max", "error", "size", "tabindex"])) : n.type === "time" ? (C(),
|
|
20341
|
+
onBlur: h,
|
|
20342
|
+
onFocus: p
|
|
20343
|
+
}, null, 8, ["model-value", "placeholder", "disabled", "readonly", "required", "min", "max", "error", "size", "tabindex"])) : n.type === "time" ? (C(), _(Bh, {
|
|
20334
20344
|
key: 5,
|
|
20335
20345
|
"model-value": o.value,
|
|
20336
20346
|
placeholder: n.placeholder,
|
|
@@ -20342,9 +20352,9 @@ const ak = {
|
|
|
20342
20352
|
size: t.size,
|
|
20343
20353
|
tabindex: n.tabindex,
|
|
20344
20354
|
"onUpdate:modelValue": d,
|
|
20345
|
-
onBlur:
|
|
20346
|
-
onFocus:
|
|
20347
|
-
}, null, 8, ["model-value", "placeholder", "disabled", "readonly", "required", "error", "size", "tabindex"])) : n.type === "datetime" ? (C(),
|
|
20355
|
+
onBlur: h,
|
|
20356
|
+
onFocus: p
|
|
20357
|
+
}, null, 8, ["model-value", "placeholder", "disabled", "readonly", "required", "error", "size", "tabindex"])) : n.type === "datetime" ? (C(), _(Vh, {
|
|
20348
20358
|
key: 6,
|
|
20349
20359
|
"model-value": o.value,
|
|
20350
20360
|
placeholder: n.placeholder,
|
|
@@ -20358,9 +20368,9 @@ const ak = {
|
|
|
20358
20368
|
size: t.size,
|
|
20359
20369
|
tabindex: n.tabindex,
|
|
20360
20370
|
"onUpdate:modelValue": d,
|
|
20361
|
-
onBlur:
|
|
20362
|
-
onFocus:
|
|
20363
|
-
}, null, 8, ["model-value", "placeholder", "disabled", "readonly", "required", "min", "max", "error", "size", "tabindex"])) : n.type === "richtext" ? (C(),
|
|
20371
|
+
onBlur: h,
|
|
20372
|
+
onFocus: p
|
|
20373
|
+
}, null, 8, ["model-value", "placeholder", "disabled", "readonly", "required", "min", "max", "error", "size", "tabindex"])) : n.type === "richtext" ? (C(), _(_b, {
|
|
20364
20374
|
key: 7,
|
|
20365
20375
|
"model-value": o.value,
|
|
20366
20376
|
placeholder: n.placeholder,
|
|
@@ -20373,8 +20383,8 @@ const ak = {
|
|
|
20373
20383
|
"custom-controls": t.customControls,
|
|
20374
20384
|
tabindex: n.tabindex,
|
|
20375
20385
|
"onUpdate:modelValue": d,
|
|
20376
|
-
onBlur:
|
|
20377
|
-
onFocus:
|
|
20386
|
+
onBlur: h,
|
|
20387
|
+
onFocus: p
|
|
20378
20388
|
}, Xe({ _: 2 }, [
|
|
20379
20389
|
a("default") ? {
|
|
20380
20390
|
name: "default",
|
|
@@ -20383,7 +20393,7 @@ const ak = {
|
|
|
20383
20393
|
]),
|
|
20384
20394
|
key: "0"
|
|
20385
20395
|
} : void 0
|
|
20386
|
-
]), 1032, ["model-value", "placeholder", "disabled", "readonly", "error", "min-height", "max-height", "custom-controls", "tabindex"])) : n.type === "pincode" ? (C(),
|
|
20396
|
+
]), 1032, ["model-value", "placeholder", "disabled", "readonly", "error", "min-height", "max-height", "custom-controls", "tabindex"])) : n.type === "pincode" ? (C(), _(ok, {
|
|
20387
20397
|
key: 8,
|
|
20388
20398
|
"model-value": o.value,
|
|
20389
20399
|
"max-length": t.maxLength || 6,
|
|
@@ -20396,9 +20406,9 @@ const ak = {
|
|
|
20396
20406
|
size: t.size,
|
|
20397
20407
|
tabindex: n.tabindex,
|
|
20398
20408
|
"onUpdate:modelValue": d,
|
|
20399
|
-
onBlur:
|
|
20400
|
-
onFocus:
|
|
20401
|
-
onComplete:
|
|
20409
|
+
onBlur: h,
|
|
20410
|
+
onFocus: p,
|
|
20411
|
+
onComplete: x
|
|
20402
20412
|
}, Xe({ _: 2 }, [
|
|
20403
20413
|
a("leading") ? {
|
|
20404
20414
|
name: "leading",
|
|
@@ -20436,7 +20446,7 @@ const ak = {
|
|
|
20436
20446
|
t.error && t.error !== !0 ? (C(), T("p", dk, ee(typeof t.error == "string" ? t.error : t.error?.message || String(t.error)), 1)) : t.helpText ? (C(), T("p", uk, ee(t.helpText), 1)) : W("", !0)
|
|
20437
20447
|
], 2));
|
|
20438
20448
|
}
|
|
20439
|
-
}), wo = /* @__PURE__ */ Oe(fk, [["__scopeId", "data-v-
|
|
20449
|
+
}), wo = /* @__PURE__ */ Oe(fk, [["__scopeId", "data-v-2eecc135"]]), hk = ["disabled", "aria-disabled"], pk = ["href", "target", "rel", "aria-disabled"], mk = /* @__PURE__ */ ae({
|
|
20440
20450
|
__name: "UiLink",
|
|
20441
20451
|
props: {
|
|
20442
20452
|
href: {},
|
|
@@ -20497,7 +20507,7 @@ const ak = {
|
|
|
20497
20507
|
return (d, u) => !n.to && !n.href ? (C(), T("button", {
|
|
20498
20508
|
key: 0,
|
|
20499
20509
|
type: "button",
|
|
20500
|
-
class:
|
|
20510
|
+
class: Z(["ui-link", [
|
|
20501
20511
|
`ui-link-${n.variant}`,
|
|
20502
20512
|
`ui-link-${n.size}`,
|
|
20503
20513
|
{ "ui-link-disabled": n.disabled },
|
|
@@ -20511,7 +20521,7 @@ const ak = {
|
|
|
20511
20521
|
E(d.$slots, "default", {}, void 0, !0)
|
|
20512
20522
|
], 14, hk)) : (C(), T("a", {
|
|
20513
20523
|
key: 1,
|
|
20514
|
-
class:
|
|
20524
|
+
class: Z(["ui-link", [
|
|
20515
20525
|
`ui-link-${n.variant}`,
|
|
20516
20526
|
`ui-link-${n.size}`,
|
|
20517
20527
|
{ "ui-link-disabled": n.disabled },
|