@aitronos/freddy-plugins 0.2.6 → 0.2.7
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/CHANGELOG.md +4 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +13 -21
- package/dist/index.js +126 -130
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -901,36 +901,28 @@ export declare function readableDateFormat(date: Date | string): string;
|
|
|
901
901
|
*/
|
|
902
902
|
export declare const scrollToElement: (targetElement: string) => void;
|
|
903
903
|
|
|
904
|
-
export declare const SearchInput: DefineComponent<
|
|
905
|
-
placeholder: {
|
|
906
|
-
type: StringConstructor;
|
|
907
|
-
default: () => string;
|
|
908
|
-
};
|
|
909
|
-
showLoaderForSearch: {
|
|
910
|
-
type: BooleanConstructor;
|
|
911
|
-
default: () => boolean;
|
|
912
|
-
};
|
|
913
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
904
|
+
export declare const SearchInput: DefineComponent<SearchInputProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
914
905
|
"update:searchInput": (inputValue: string | null) => any;
|
|
915
|
-
}, string, PublicProps, Readonly<
|
|
916
|
-
placeholder: {
|
|
917
|
-
type: StringConstructor;
|
|
918
|
-
default: () => string;
|
|
919
|
-
};
|
|
920
|
-
showLoaderForSearch: {
|
|
921
|
-
type: BooleanConstructor;
|
|
922
|
-
default: () => boolean;
|
|
923
|
-
};
|
|
924
|
-
}>> & Readonly<{
|
|
906
|
+
}, string, PublicProps, Readonly<SearchInputProps> & Readonly<{
|
|
925
907
|
"onUpdate:searchInput"?: ((inputValue: string | null) => any) | undefined;
|
|
926
908
|
}>, {
|
|
927
909
|
placeholder: string;
|
|
928
910
|
showLoaderForSearch: boolean;
|
|
929
|
-
|
|
911
|
+
maxCharLimit: number;
|
|
912
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
930
913
|
dropdownRef: HTMLDivElement;
|
|
931
914
|
searchInput: HTMLInputElement;
|
|
932
915
|
}, any>;
|
|
933
916
|
|
|
917
|
+
declare interface SearchInputProps {
|
|
918
|
+
/** Placeholder text for the search input */
|
|
919
|
+
placeholder?: string;
|
|
920
|
+
/** Whether to show a loading spinner */
|
|
921
|
+
showLoaderForSearch?: boolean;
|
|
922
|
+
/** Maximum number of characters allowed in the input */
|
|
923
|
+
maxCharLimit?: number;
|
|
924
|
+
}
|
|
925
|
+
|
|
934
926
|
export declare const SendButton: DefineComponent<__VLS_Props_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_4> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
935
927
|
|
|
936
928
|
export declare const SkeletonLoader: DefineComponent<__VLS_Props_5, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_5> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
package/dist/index.js
CHANGED
|
@@ -192,7 +192,7 @@ const z0 = {
|
|
|
192
192
|
}
|
|
193
193
|
}), M = (a) => {
|
|
194
194
|
!e.disabled && !e.loading && l("click", a);
|
|
195
|
-
},
|
|
195
|
+
}, C = (a) => {
|
|
196
196
|
a.stopPropagation(), !e.disabled && !e.loading && l("hoverIconClick", a);
|
|
197
197
|
}, v = () => {
|
|
198
198
|
c.value = !0;
|
|
@@ -224,7 +224,7 @@ const z0 = {
|
|
|
224
224
|
size: a.leftIcon || a.hoverIcon ? void 0 : A.value,
|
|
225
225
|
color: a.leftIcon || a.hoverIcon ? void 0 : g.value,
|
|
226
226
|
class: "button-icon button-icon-center",
|
|
227
|
-
onClick: B[0] || (B[0] = (U) => c.value && a.hoverIcon ?
|
|
227
|
+
onClick: B[0] || (B[0] = (U) => c.value && a.hoverIcon ? C(U) : void 0)
|
|
228
228
|
}, null, 8, ["size", "color"])) : a.loading ? (s(), i(l1, { key: 2 }, [
|
|
229
229
|
B[2] || (B[2] = n("span", {
|
|
230
230
|
class: "button-spinner",
|
|
@@ -240,7 +240,7 @@ const z0 = {
|
|
|
240
240
|
key: 0,
|
|
241
241
|
class: "button-icon button-icon-left button-hover-icon",
|
|
242
242
|
"aria-hidden": "true",
|
|
243
|
-
onClick:
|
|
243
|
+
onClick: C
|
|
244
244
|
})) : a.leftIcon ? (s(), D(e1(a.leftIcon), {
|
|
245
245
|
key: 1,
|
|
246
246
|
class: "button-icon button-icon-left",
|
|
@@ -274,7 +274,7 @@ const z0 = {
|
|
|
274
274
|
size: a.leftIcon || a.hoverIcon ? void 0 : A.value,
|
|
275
275
|
color: a.leftIcon || a.hoverIcon ? void 0 : g.value,
|
|
276
276
|
class: "button-icon button-icon-center",
|
|
277
|
-
onClick: B[1] || (B[1] = (U) => c.value && a.hoverIcon ?
|
|
277
|
+
onClick: B[1] || (B[1] = (U) => c.value && a.hoverIcon ? C(U) : void 0)
|
|
278
278
|
}, null, 8, ["size", "color"])) : a.loading ? (s(), i(l1, { key: 2 }, [
|
|
279
279
|
B[3] || (B[3] = n("span", {
|
|
280
280
|
class: "button-spinner",
|
|
@@ -290,7 +290,7 @@ const z0 = {
|
|
|
290
290
|
key: 0,
|
|
291
291
|
class: "button-icon button-icon-left button-hover-icon",
|
|
292
292
|
"aria-hidden": "true",
|
|
293
|
-
onClick:
|
|
293
|
+
onClick: C
|
|
294
294
|
})) : a.leftIcon ? (s(), D(e1(a.leftIcon), {
|
|
295
295
|
key: 1,
|
|
296
296
|
class: "button-icon button-icon-left",
|
|
@@ -1161,7 +1161,7 @@ const tn = /* @__PURE__ */ p(Ot, [["render", Ht]]), Vt = "data:image/png;base64,
|
|
|
1161
1161
|
return Object.fromEntries(
|
|
1162
1162
|
Array.from({ length: e }, (c, d) => {
|
|
1163
1163
|
var M;
|
|
1164
|
-
const A = d + 1, g = ((M = t.find((
|
|
1164
|
+
const A = d + 1, g = ((M = t.find((C) => C[A])) == null ? void 0 : M[A]) || 0;
|
|
1165
1165
|
return [A, g];
|
|
1166
1166
|
})
|
|
1167
1167
|
);
|
|
@@ -1243,9 +1243,9 @@ const jt = "Feb", J2 = 2023, cn = Pt(
|
|
|
1243
1243
|
(/* @__PURE__ */ new Date(`${jt} 1, ${J2}`)).getMonth() + 1,
|
|
1244
1244
|
J2
|
|
1245
1245
|
), pn = (o, t, e) => {
|
|
1246
|
-
const l = (M) => M.match(/\w\w/g).map((
|
|
1247
|
-
return Array.from({ length: e }, (M,
|
|
1248
|
-
const v =
|
|
1246
|
+
const l = (M) => M.match(/\w\w/g).map((C) => parseInt(C, 16)), c = (M) => `#${M.map((C) => C.toString(16).padStart(2, "0")).join("")}`, d = l(o), A = l(t);
|
|
1247
|
+
return Array.from({ length: e }, (M, C) => {
|
|
1248
|
+
const v = C / (e - 1), m = d.map(
|
|
1249
1249
|
(a, B) => Math.round(a + v * (A[B] - a))
|
|
1250
1250
|
);
|
|
1251
1251
|
return c(m);
|
|
@@ -1421,40 +1421,40 @@ function n5() {
|
|
|
1421
1421
|
function t(l) {
|
|
1422
1422
|
if (l = l || {}, l.circles) return e(l);
|
|
1423
1423
|
const c = /* @__PURE__ */ new Map();
|
|
1424
|
-
if (c.set(Date, (
|
|
1425
|
-
for (const
|
|
1426
|
-
c.set(
|
|
1424
|
+
if (c.set(Date, (C) => new Date(C)), c.set(Map, (C, v) => new Map(A(Array.from(C), v))), c.set(Set, (C, v) => new Set(A(Array.from(C), v))), l.constructorHandlers)
|
|
1425
|
+
for (const C of l.constructorHandlers)
|
|
1426
|
+
c.set(C[0], C[1]);
|
|
1427
1427
|
let d = null;
|
|
1428
1428
|
return l.proto ? M : g;
|
|
1429
|
-
function A(
|
|
1430
|
-
const m = Object.keys(
|
|
1429
|
+
function A(C, v) {
|
|
1430
|
+
const m = Object.keys(C), a = new Array(m.length);
|
|
1431
1431
|
for (let B = 0; B < m.length; B++) {
|
|
1432
|
-
const k = m[B], U =
|
|
1432
|
+
const k = m[B], U = C[k];
|
|
1433
1433
|
typeof U != "object" || U === null ? a[k] = U : U.constructor !== Object && (d = c.get(U.constructor)) ? a[k] = d(U, v) : ArrayBuffer.isView(U) ? a[k] = o(U) : a[k] = v(U);
|
|
1434
1434
|
}
|
|
1435
1435
|
return a;
|
|
1436
1436
|
}
|
|
1437
|
-
function g(
|
|
1438
|
-
if (typeof
|
|
1439
|
-
if (Array.isArray(
|
|
1440
|
-
if (
|
|
1441
|
-
return d(
|
|
1437
|
+
function g(C) {
|
|
1438
|
+
if (typeof C != "object" || C === null) return C;
|
|
1439
|
+
if (Array.isArray(C)) return A(C, g);
|
|
1440
|
+
if (C.constructor !== Object && (d = c.get(C.constructor)))
|
|
1441
|
+
return d(C, g);
|
|
1442
1442
|
const v = {};
|
|
1443
|
-
for (const m in
|
|
1444
|
-
if (Object.hasOwnProperty.call(
|
|
1445
|
-
const a =
|
|
1443
|
+
for (const m in C) {
|
|
1444
|
+
if (Object.hasOwnProperty.call(C, m) === !1) continue;
|
|
1445
|
+
const a = C[m];
|
|
1446
1446
|
typeof a != "object" || a === null ? v[m] = a : a.constructor !== Object && (d = c.get(a.constructor)) ? v[m] = d(a, g) : ArrayBuffer.isView(a) ? v[m] = o(a) : v[m] = g(a);
|
|
1447
1447
|
}
|
|
1448
1448
|
return v;
|
|
1449
1449
|
}
|
|
1450
|
-
function M(
|
|
1451
|
-
if (typeof
|
|
1452
|
-
if (Array.isArray(
|
|
1453
|
-
if (
|
|
1454
|
-
return d(
|
|
1450
|
+
function M(C) {
|
|
1451
|
+
if (typeof C != "object" || C === null) return C;
|
|
1452
|
+
if (Array.isArray(C)) return A(C, M);
|
|
1453
|
+
if (C.constructor !== Object && (d = c.get(C.constructor)))
|
|
1454
|
+
return d(C, M);
|
|
1455
1455
|
const v = {};
|
|
1456
|
-
for (const m in
|
|
1457
|
-
const a =
|
|
1456
|
+
for (const m in C) {
|
|
1457
|
+
const a = C[m];
|
|
1458
1458
|
typeof a != "object" || a === null ? v[m] = a : a.constructor !== Object && (d = c.get(a.constructor)) ? v[m] = d(a, M) : ArrayBuffer.isView(a) ? v[m] = o(a) : v[m] = M(a);
|
|
1459
1459
|
}
|
|
1460
1460
|
return v;
|
|
@@ -1466,7 +1466,7 @@ function n5() {
|
|
|
1466
1466
|
for (const m of l.constructorHandlers)
|
|
1467
1467
|
A.set(m[0], m[1]);
|
|
1468
1468
|
let g = null;
|
|
1469
|
-
return l.proto ? v :
|
|
1469
|
+
return l.proto ? v : C;
|
|
1470
1470
|
function M(m, a) {
|
|
1471
1471
|
const B = Object.keys(m), k = new Array(B.length);
|
|
1472
1472
|
for (let U = 0; U < B.length; U++) {
|
|
@@ -1484,11 +1484,11 @@ function n5() {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
return k;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function C(m) {
|
|
1488
1488
|
if (typeof m != "object" || m === null) return m;
|
|
1489
|
-
if (Array.isArray(m)) return M(m,
|
|
1489
|
+
if (Array.isArray(m)) return M(m, C);
|
|
1490
1490
|
if (m.constructor !== Object && (g = A.get(m.constructor)))
|
|
1491
|
-
return g(m,
|
|
1491
|
+
return g(m, C);
|
|
1492
1492
|
const a = {};
|
|
1493
1493
|
c.push(m), d.push(a);
|
|
1494
1494
|
for (const B in m) {
|
|
@@ -1497,12 +1497,12 @@ function n5() {
|
|
|
1497
1497
|
if (typeof k != "object" || k === null)
|
|
1498
1498
|
a[B] = k;
|
|
1499
1499
|
else if (k.constructor !== Object && (g = A.get(k.constructor)))
|
|
1500
|
-
a[B] = g(k,
|
|
1500
|
+
a[B] = g(k, C);
|
|
1501
1501
|
else if (ArrayBuffer.isView(k))
|
|
1502
1502
|
a[B] = o(k);
|
|
1503
1503
|
else {
|
|
1504
1504
|
const U = c.indexOf(k);
|
|
1505
|
-
U !== -1 ? a[B] = d[U] : a[B] =
|
|
1505
|
+
U !== -1 ? a[B] = d[U] : a[B] = C(k);
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
1508
|
return c.pop(), d.pop(), a;
|
|
@@ -3269,7 +3269,7 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3269
3269
|
G1(g, () => {
|
|
3270
3270
|
M();
|
|
3271
3271
|
}, { immediate: !0 });
|
|
3272
|
-
const
|
|
3272
|
+
const C = z(() => e.label !== "Select" ? e.label : A.value ? A.value.label : "Select"), v = z(() => e.showIcon ? e.customIcon ? e.customIcon : e.openUp ? h6 : h2 : null), m = () => {
|
|
3273
3273
|
c.value = !c.value, c.value || (d.value = "");
|
|
3274
3274
|
}, a = () => {
|
|
3275
3275
|
c.value = !1, d.value = "";
|
|
@@ -3296,7 +3296,7 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3296
3296
|
}, [
|
|
3297
3297
|
o1(c3, {
|
|
3298
3298
|
class: "dropdown-trigger",
|
|
3299
|
-
label:
|
|
3299
|
+
label: C.value,
|
|
3300
3300
|
iconOnly: S.iconOnly,
|
|
3301
3301
|
rightIcon: S.chevronRight && S.showIcon ? v.value : void 0,
|
|
3302
3302
|
leftIcon: !S.chevronRight && S.showIcon ? v.value : void 0,
|
|
@@ -3309,7 +3309,7 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3309
3309
|
}, {
|
|
3310
3310
|
default: x1(() => [
|
|
3311
3311
|
X(S.$slots, "button", {}, () => [
|
|
3312
|
-
M1(O(
|
|
3312
|
+
M1(O(C.value), 1)
|
|
3313
3313
|
])
|
|
3314
3314
|
]),
|
|
3315
3315
|
_: 3
|
|
@@ -3416,7 +3416,7 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3416
3416
|
"input-field--disabled": e.state === "disabled",
|
|
3417
3417
|
"input-field--with-leading": e.iconLeading || e.type === "leading-dropdown" || e.type === "leading-text",
|
|
3418
3418
|
"input-field--with-trailing": e.type === "trailing-dropdown" || e.type === "trailing-button" || e.type === "clear" || e.helpIcon
|
|
3419
|
-
})),
|
|
3419
|
+
})), C = () => {
|
|
3420
3420
|
var y;
|
|
3421
3421
|
e.state !== "disabled" && ((y = c.value) == null || y.focus());
|
|
3422
3422
|
}, v = (y) => {
|
|
@@ -3457,7 +3457,7 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3457
3457
|
], 10, X7)) : L("", !0),
|
|
3458
3458
|
n("div", {
|
|
3459
3459
|
class: _(["input-field-container", g.value]),
|
|
3460
|
-
onClick:
|
|
3460
|
+
onClick: C
|
|
3461
3461
|
}, [
|
|
3462
3462
|
y.type === "leading-dropdown" ? (s(), i("div", {
|
|
3463
3463
|
key: 0,
|
|
@@ -3690,15 +3690,15 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3690
3690
|
emits: ["update:currentPage"],
|
|
3691
3691
|
setup(o, { emit: t }) {
|
|
3692
3692
|
const e = o, l = t, c = z(() => !e.totalItems || isNaN(e.totalItems) ? 0 : Math.ceil(e.totalItems / e.itemsPerPage)), d = z(() => {
|
|
3693
|
-
const g = [], M = c.value,
|
|
3693
|
+
const g = [], M = c.value, C = e.currentPage;
|
|
3694
3694
|
if (M <= 7)
|
|
3695
3695
|
for (let v = 1; v <= M; v++)
|
|
3696
3696
|
g.push(v);
|
|
3697
3697
|
else {
|
|
3698
|
-
g.push(1),
|
|
3699
|
-
for (let v = Math.max(4,
|
|
3698
|
+
g.push(1), C > 4 ? g.push("...") : g.push(2, 3);
|
|
3699
|
+
for (let v = Math.max(4, C - 1); v <= Math.min(M - 3, C + 1); v++)
|
|
3700
3700
|
g.push(v);
|
|
3701
|
-
|
|
3701
|
+
C < M - 4 && g.push("..."), g.push(M - 2, M - 1, M);
|
|
3702
3702
|
}
|
|
3703
3703
|
return g;
|
|
3704
3704
|
});
|
|
@@ -3708,21 +3708,21 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3708
3708
|
return (g, M) => c.value > 0 ? (s(), i("nav", f9, [
|
|
3709
3709
|
n("button", {
|
|
3710
3710
|
class: _(["freddy-pagination-end-button", { "freddy-pagination-hover-enabled": o.currentPage !== 1 }]),
|
|
3711
|
-
onClick: M[0] || (M[0] = (
|
|
3711
|
+
onClick: M[0] || (M[0] = (C) => A(o.currentPage - 1)),
|
|
3712
3712
|
disabled: o.currentPage === 1
|
|
3713
3713
|
}, " Previous ", 10, u9),
|
|
3714
3714
|
n("div", A9, [
|
|
3715
|
-
(s(!0), i(l1, null, v1(d.value, (
|
|
3716
|
-
key: String(
|
|
3717
|
-
class: _(["freddy-pagination-number-button", { active:
|
|
3718
|
-
onClick: (v) => A(
|
|
3719
|
-
disabled:
|
|
3720
|
-
}, O(
|
|
3715
|
+
(s(!0), i(l1, null, v1(d.value, (C) => (s(), i("button", {
|
|
3716
|
+
key: String(C),
|
|
3717
|
+
class: _(["freddy-pagination-number-button", { active: C === o.currentPage }]),
|
|
3718
|
+
onClick: (v) => A(C),
|
|
3719
|
+
disabled: C === "..." || C === o.currentPage
|
|
3720
|
+
}, O(C), 11, C9))), 128)),
|
|
3721
3721
|
n("button", {
|
|
3722
3722
|
class: _(["freddy-pagination-end-button", {
|
|
3723
3723
|
"freddy-pagination-hover-enabled": o.currentPage !== c.value
|
|
3724
3724
|
}]),
|
|
3725
|
-
onClick: M[1] || (M[1] = (
|
|
3725
|
+
onClick: M[1] || (M[1] = (C) => A(o.currentPage + 1)),
|
|
3726
3726
|
disabled: o.currentPage === c.value || c.value === 0
|
|
3727
3727
|
}, " Next ", 10, h9)
|
|
3728
3728
|
])
|
|
@@ -3738,28 +3738,23 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3738
3738
|
class: _(["freddy-plugin-spinner", t.customClass])
|
|
3739
3739
|
}, null, 2));
|
|
3740
3740
|
}
|
|
3741
|
-
}), m9 = ["placeholder"], js = /* @__PURE__ */ Z({
|
|
3741
|
+
}), m9 = ["placeholder", "maxlength"], js = /* @__PURE__ */ Z({
|
|
3742
3742
|
inheritAttrs: !1,
|
|
3743
3743
|
__name: "SearchInput",
|
|
3744
3744
|
props: {
|
|
3745
|
-
placeholder: {
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
},
|
|
3749
|
-
showLoaderForSearch: {
|
|
3750
|
-
type: Boolean,
|
|
3751
|
-
default: () => !1
|
|
3752
|
-
}
|
|
3745
|
+
placeholder: { default: "Search here..." },
|
|
3746
|
+
showLoaderForSearch: { type: Boolean, default: !1 },
|
|
3747
|
+
maxCharLimit: { default: void 0 }
|
|
3753
3748
|
},
|
|
3754
3749
|
emits: ["update:searchInput"],
|
|
3755
3750
|
setup(o, { emit: t }) {
|
|
3756
3751
|
const e = j0(), l = Q(null), c = Q(null), d = Q(null), A = t, g = () => {
|
|
3757
|
-
var
|
|
3758
|
-
(
|
|
3752
|
+
var C;
|
|
3753
|
+
(C = c.value) == null || C.focus();
|
|
3759
3754
|
}, M = () => {
|
|
3760
3755
|
A("update:searchInput", l.value);
|
|
3761
3756
|
};
|
|
3762
|
-
return (
|
|
3757
|
+
return (C, v) => (s(), i("div", {
|
|
3763
3758
|
ref_key: "dropdownRef",
|
|
3764
3759
|
ref: d,
|
|
3765
3760
|
class: _(["freddy-search-wrapper", H(e).class]),
|
|
@@ -3774,11 +3769,12 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3774
3769
|
ref: c,
|
|
3775
3770
|
"onUpdate:modelValue": v[0] || (v[0] = (m) => l.value = m),
|
|
3776
3771
|
onInput: M,
|
|
3777
|
-
placeholder:
|
|
3772
|
+
placeholder: C.placeholder,
|
|
3773
|
+
maxlength: C.maxCharLimit
|
|
3778
3774
|
}, null, 40, m9), [
|
|
3779
3775
|
[A0, l.value]
|
|
3780
3776
|
]),
|
|
3781
|
-
|
|
3777
|
+
C.showLoaderForSearch ? (s(), D(g9, {
|
|
3782
3778
|
key: 0,
|
|
3783
3779
|
class: "freddy-search-spinner"
|
|
3784
3780
|
})) : L("", !0)
|
|
@@ -3919,7 +3915,7 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3919
3915
|
]),
|
|
3920
3916
|
n("button", {
|
|
3921
3917
|
class: "freddy-plugin-snackbar-close-btn",
|
|
3922
|
-
onClick: (
|
|
3918
|
+
onClick: (C) => c(M)
|
|
3923
3919
|
}, [
|
|
3924
3920
|
o1(m0, { class: "freddy-plugin-snackbar-close-icon" })
|
|
3925
3921
|
], 8, F9)
|
|
@@ -3939,9 +3935,9 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3939
3935
|
c.value !== A.id && (c.value = A.id, l("tabSwitch", A.id));
|
|
3940
3936
|
};
|
|
3941
3937
|
return (A, g) => (s(), i("div", T9, [
|
|
3942
|
-
(s(!0), i(l1, null, v1(A.tabList, (M,
|
|
3938
|
+
(s(!0), i(l1, null, v1(A.tabList, (M, C) => (s(), i("button", {
|
|
3943
3939
|
class: "freddy-plugin-menu-button",
|
|
3944
|
-
key:
|
|
3940
|
+
key: C,
|
|
3945
3941
|
onClick: (v) => d(M)
|
|
3946
3942
|
}, [
|
|
3947
3943
|
M1(O(M.title) + " ", 1),
|
|
@@ -3973,8 +3969,8 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3973
3969
|
t.value.splice(A, 1);
|
|
3974
3970
|
};
|
|
3975
3971
|
return (A, g) => (s(), i("div", V9, [
|
|
3976
|
-
(s(!0), i(l1, null, v1(H(t), (M,
|
|
3977
|
-
key:
|
|
3972
|
+
(s(!0), i(l1, null, v1(H(t), (M, C) => (s(), i("div", {
|
|
3973
|
+
key: C,
|
|
3978
3974
|
class: _(["toast-item", l(M.toastType)])
|
|
3979
3975
|
}, [
|
|
3980
3976
|
n("div", R9, [
|
|
@@ -3983,7 +3979,7 @@ const Fs = /* @__PURE__ */ p(v7, [["render", B7]]), S7 = { class: "fixed z-[9998
|
|
|
3983
3979
|
n("span", N9, O(M.message), 1),
|
|
3984
3980
|
n("button", {
|
|
3985
3981
|
class: "toast-close-button",
|
|
3986
|
-
onClick: (v) => d(
|
|
3982
|
+
onClick: (v) => d(C)
|
|
3987
3983
|
}, [
|
|
3988
3984
|
o1(H(z1), { class: "toast-close-icon" })
|
|
3989
3985
|
], 8, P9)
|
|
@@ -4150,7 +4146,7 @@ function v0() {
|
|
|
4150
4146
|
HTMLTemplateElement: A,
|
|
4151
4147
|
Node: g,
|
|
4152
4148
|
Element: M,
|
|
4153
|
-
NodeFilter:
|
|
4149
|
+
NodeFilter: C,
|
|
4154
4150
|
NamedNodeMap: v = o.NamedNodeMap || o.MozNamedAttrMap,
|
|
4155
4151
|
HTMLFormElement: m,
|
|
4156
4152
|
DOMParser: a,
|
|
@@ -4238,13 +4234,13 @@ function v0() {
|
|
|
4238
4234
|
q && q(r), m1 = r;
|
|
4239
4235
|
}
|
|
4240
4236
|
}, Z2 = I({}, [...d2, ...f2, ...t8]), F2 = I({}, [...u2, ...e8]), T0 = function(r) {
|
|
4241
|
-
let
|
|
4242
|
-
(!
|
|
4237
|
+
let h = R(r);
|
|
4238
|
+
(!h || !h.tagName) && (h = {
|
|
4243
4239
|
namespaceURI: g1,
|
|
4244
4240
|
tagName: "template"
|
|
4245
4241
|
});
|
|
4246
|
-
const w = P1(r.tagName), G = P1(
|
|
4247
|
-
return s2[r.namespaceURI] ? r.namespaceURI === T1 ?
|
|
4242
|
+
const w = P1(r.tagName), G = P1(h.tagName);
|
|
4243
|
+
return s2[r.namespaceURI] ? r.namespaceURI === T1 ? h.namespaceURI === a1 ? w === "svg" : h.namespaceURI === O1 ? w === "svg" && (G === "annotation-xml" || H1[G]) : !!Z2[w] : r.namespaceURI === O1 ? h.namespaceURI === a1 ? w === "math" : h.namespaceURI === T1 ? w === "math" && V1[G] : !!F2[w] : r.namespaceURI === a1 ? h.namespaceURI === T1 && !V1[G] || h.namespaceURI === O1 && !H1[G] ? !1 : !F2[w] && (D0[w] || !Z2[w]) : !!(S1 === "application/xhtml+xml" && s2[r.namespaceURI]) : !1;
|
|
4248
4244
|
}, i1 = function(r) {
|
|
4249
4245
|
_1(t.removed, {
|
|
4250
4246
|
element: r
|
|
@@ -4254,31 +4250,31 @@ function v0() {
|
|
|
4254
4250
|
} catch {
|
|
4255
4251
|
y(r);
|
|
4256
4252
|
}
|
|
4257
|
-
}, y1 = function(r,
|
|
4253
|
+
}, y1 = function(r, h) {
|
|
4258
4254
|
try {
|
|
4259
4255
|
_1(t.removed, {
|
|
4260
|
-
attribute:
|
|
4261
|
-
from:
|
|
4256
|
+
attribute: h.getAttributeNode(r),
|
|
4257
|
+
from: h
|
|
4262
4258
|
});
|
|
4263
4259
|
} catch {
|
|
4264
4260
|
_1(t.removed, {
|
|
4265
4261
|
attribute: null,
|
|
4266
|
-
from:
|
|
4262
|
+
from: h
|
|
4267
4263
|
});
|
|
4268
4264
|
}
|
|
4269
|
-
if (
|
|
4265
|
+
if (h.removeAttribute(r), r === "is")
|
|
4270
4266
|
if (A1 || Z1)
|
|
4271
4267
|
try {
|
|
4272
|
-
i1(
|
|
4268
|
+
i1(h);
|
|
4273
4269
|
} catch {
|
|
4274
4270
|
}
|
|
4275
4271
|
else
|
|
4276
4272
|
try {
|
|
4277
|
-
|
|
4273
|
+
h.setAttribute(r, "");
|
|
4278
4274
|
} catch {
|
|
4279
4275
|
}
|
|
4280
4276
|
}, O2 = function(r) {
|
|
4281
|
-
let
|
|
4277
|
+
let h = null, w = null;
|
|
4282
4278
|
if (t2)
|
|
4283
4279
|
r = "<remove></remove>" + r;
|
|
4284
4280
|
else {
|
|
@@ -4289,24 +4285,24 @@ function v0() {
|
|
|
4289
4285
|
const G = E ? E.createHTML(r) : r;
|
|
4290
4286
|
if (g1 === a1)
|
|
4291
4287
|
try {
|
|
4292
|
-
|
|
4288
|
+
h = new a().parseFromString(G, S1);
|
|
4293
4289
|
} catch {
|
|
4294
4290
|
}
|
|
4295
|
-
if (!
|
|
4296
|
-
|
|
4291
|
+
if (!h || !h.documentElement) {
|
|
4292
|
+
h = J1.createDocument(g1, "template", null);
|
|
4297
4293
|
try {
|
|
4298
|
-
|
|
4294
|
+
h.documentElement.innerHTML = n2 ? r1 : G;
|
|
4299
4295
|
} catch {
|
|
4300
4296
|
}
|
|
4301
4297
|
}
|
|
4302
|
-
const Y =
|
|
4303
|
-
return r && w && Y.insertBefore(e.createTextNode(w), Y.childNodes[0] || null), g1 === a1 ? S0.call(
|
|
4298
|
+
const Y = h.body || h.documentElement;
|
|
4299
|
+
return r && w && Y.insertBefore(e.createTextNode(w), Y.childNodes[0] || null), g1 === a1 ? S0.call(h, f1 ? "html" : "body")[0] : f1 ? h.documentElement : Y;
|
|
4304
4300
|
}, T2 = function(r) {
|
|
4305
4301
|
return k0.call(
|
|
4306
4302
|
r.ownerDocument || r,
|
|
4307
4303
|
r,
|
|
4308
4304
|
// eslint-disable-next-line no-bitwise
|
|
4309
|
-
|
|
4305
|
+
C.SHOW_ELEMENT | C.SHOW_COMMENT | C.SHOW_TEXT | C.SHOW_PROCESSING_INSTRUCTION | C.SHOW_CDATA_SECTION,
|
|
4310
4306
|
null
|
|
4311
4307
|
);
|
|
4312
4308
|
}, i2 = function(r) {
|
|
@@ -4314,13 +4310,13 @@ function v0() {
|
|
|
4314
4310
|
}, H2 = function(r) {
|
|
4315
4311
|
return typeof g == "function" && r instanceof g;
|
|
4316
4312
|
};
|
|
4317
|
-
function c1(x, r,
|
|
4313
|
+
function c1(x, r, h) {
|
|
4318
4314
|
R1(x, (w) => {
|
|
4319
|
-
w.call(t, r,
|
|
4315
|
+
w.call(t, r, h, m1);
|
|
4320
4316
|
});
|
|
4321
4317
|
}
|
|
4322
4318
|
const V2 = function(r) {
|
|
4323
|
-
let
|
|
4319
|
+
let h = null;
|
|
4324
4320
|
if (c1(W.beforeSanitizeElements, r, null), i2(r))
|
|
4325
4321
|
return i1(r), !0;
|
|
4326
4322
|
const w = P(r.nodeName);
|
|
@@ -4344,28 +4340,28 @@ function v0() {
|
|
|
4344
4340
|
}
|
|
4345
4341
|
return i1(r), !0;
|
|
4346
4342
|
}
|
|
4347
|
-
return r instanceof M && !T0(r) || (w === "noscript" || w === "noembed" || w === "noframes") && K(/<\/no(script|embed|frames)/i, r.innerHTML) ? (i1(r), !0) : (u1 && r.nodeType === b1.text && (
|
|
4348
|
-
|
|
4349
|
-
}), r.textContent !==
|
|
4343
|
+
return r instanceof M && !T0(r) || (w === "noscript" || w === "noembed" || w === "noframes") && K(/<\/no(script|embed|frames)/i, r.innerHTML) ? (i1(r), !0) : (u1 && r.nodeType === b1.text && (h = r.textContent, R1([Q1, W1, K1], (G) => {
|
|
4344
|
+
h = E1(h, G, " ");
|
|
4345
|
+
}), r.textContent !== h && (_1(t.removed, {
|
|
4350
4346
|
element: r.cloneNode()
|
|
4351
|
-
}), r.textContent =
|
|
4352
|
-
}, R2 = function(r,
|
|
4353
|
-
if (_2 && (
|
|
4347
|
+
}), r.textContent = h)), c1(W.afterSanitizeElements, r, null), !1);
|
|
4348
|
+
}, R2 = function(r, h, w) {
|
|
4349
|
+
if (_2 && (h === "id" || h === "name") && (w in e || w in O0))
|
|
4354
4350
|
return !1;
|
|
4355
|
-
if (!(q1 && !X1[
|
|
4356
|
-
if (!(B2 && K(E0,
|
|
4357
|
-
if (!j[
|
|
4351
|
+
if (!(q1 && !X1[h] && K(_0, h))) {
|
|
4352
|
+
if (!(B2 && K(E0, h))) {
|
|
4353
|
+
if (!j[h] || X1[h]) {
|
|
4358
4354
|
if (
|
|
4359
4355
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
4360
4356
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
4361
4357
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
4362
|
-
!(N2(r) && (T.tagNameCheck instanceof RegExp && K(T.tagNameCheck, r) || T.tagNameCheck instanceof Function && T.tagNameCheck(r)) && (T.attributeNameCheck instanceof RegExp && K(T.attributeNameCheck,
|
|
4358
|
+
!(N2(r) && (T.tagNameCheck instanceof RegExp && K(T.tagNameCheck, r) || T.tagNameCheck instanceof Function && T.tagNameCheck(r)) && (T.attributeNameCheck instanceof RegExp && K(T.attributeNameCheck, h) || T.attributeNameCheck instanceof Function && T.attributeNameCheck(h)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
4363
4359
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
4364
|
-
|
|
4360
|
+
h === "is" && T.allowCustomizedBuiltInElements && (T.tagNameCheck instanceof RegExp && K(T.tagNameCheck, w) || T.tagNameCheck instanceof Function && T.tagNameCheck(w)))
|
|
4365
4361
|
) return !1;
|
|
4366
|
-
} else if (!o2[
|
|
4362
|
+
} else if (!o2[h]) {
|
|
4367
4363
|
if (!K(x2, E1(w, M2, ""))) {
|
|
4368
|
-
if (!((
|
|
4364
|
+
if (!((h === "src" || h === "xlink:href" || h === "href") && r !== "script" && K9(w, "data:") === 0 && U2[r])) {
|
|
4369
4365
|
if (!(S2 && !K(L0, E1(w, M2, "")))) {
|
|
4370
4366
|
if (w)
|
|
4371
4367
|
return !1;
|
|
@@ -4381,9 +4377,9 @@ function v0() {
|
|
|
4381
4377
|
}, P2 = function(r) {
|
|
4382
4378
|
c1(W.beforeSanitizeAttributes, r, null);
|
|
4383
4379
|
const {
|
|
4384
|
-
attributes:
|
|
4380
|
+
attributes: h
|
|
4385
4381
|
} = r;
|
|
4386
|
-
if (!
|
|
4382
|
+
if (!h || i2(r))
|
|
4387
4383
|
return;
|
|
4388
4384
|
const w = {
|
|
4389
4385
|
attrName: "",
|
|
@@ -4392,9 +4388,9 @@ function v0() {
|
|
|
4392
4388
|
allowedAttributes: j,
|
|
4393
4389
|
forceKeepAttr: void 0
|
|
4394
4390
|
};
|
|
4395
|
-
let G =
|
|
4391
|
+
let G = h.length;
|
|
4396
4392
|
for (; G--; ) {
|
|
4397
|
-
const Y =
|
|
4393
|
+
const Y = h[G], {
|
|
4398
4394
|
name: V,
|
|
4399
4395
|
namespaceURI: t1,
|
|
4400
4396
|
value: p1
|
|
@@ -4442,14 +4438,14 @@ function v0() {
|
|
|
4442
4438
|
}
|
|
4443
4439
|
c1(W.afterSanitizeAttributes, r, null);
|
|
4444
4440
|
}, H0 = function x(r) {
|
|
4445
|
-
let
|
|
4441
|
+
let h = null;
|
|
4446
4442
|
const w = T2(r);
|
|
4447
|
-
for (c1(W.beforeSanitizeShadowDOM, r, null);
|
|
4448
|
-
c1(W.uponSanitizeShadowNode,
|
|
4443
|
+
for (c1(W.beforeSanitizeShadowDOM, r, null); h = w.nextNode(); )
|
|
4444
|
+
c1(W.uponSanitizeShadowNode, h, null), V2(h), P2(h), h.content instanceof d && x(h.content);
|
|
4449
4445
|
c1(W.afterSanitizeShadowDOM, r, null);
|
|
4450
4446
|
};
|
|
4451
4447
|
return t.sanitize = function(x) {
|
|
4452
|
-
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
4448
|
+
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, w = null, G = null, Y = null;
|
|
4453
4449
|
if (n2 = !x, n2 && (x = "<!-->"), typeof x != "string" && !H2(x))
|
|
4454
4450
|
if (typeof x.toString == "function") {
|
|
4455
4451
|
if (x = x.toString(), typeof x != "string")
|
|
@@ -4465,30 +4461,30 @@ function v0() {
|
|
|
4465
4461
|
throw L1("root node is forbidden and cannot be sanitized in-place");
|
|
4466
4462
|
}
|
|
4467
4463
|
} else if (x instanceof g)
|
|
4468
|
-
|
|
4464
|
+
h = O2("<!---->"), w = h.ownerDocument.importNode(x, !0), w.nodeType === b1.element && w.nodeName === "BODY" || w.nodeName === "HTML" ? h = w : h.appendChild(w);
|
|
4469
4465
|
else {
|
|
4470
4466
|
if (!A1 && !u1 && !f1 && // eslint-disable-next-line unicorn/prefer-includes
|
|
4471
4467
|
x.indexOf("<") === -1)
|
|
4472
4468
|
return E && F1 ? E.createHTML(x) : x;
|
|
4473
|
-
if (
|
|
4469
|
+
if (h = O2(x), !h)
|
|
4474
4470
|
return A1 ? null : F1 ? r1 : "";
|
|
4475
4471
|
}
|
|
4476
|
-
|
|
4477
|
-
const V = T2(B1 ? x :
|
|
4472
|
+
h && t2 && i1(h.firstChild);
|
|
4473
|
+
const V = T2(B1 ? x : h);
|
|
4478
4474
|
for (; G = V.nextNode(); )
|
|
4479
4475
|
V2(G), P2(G), G.content instanceof d && H0(G.content);
|
|
4480
4476
|
if (B1)
|
|
4481
4477
|
return x;
|
|
4482
4478
|
if (A1) {
|
|
4483
4479
|
if (Z1)
|
|
4484
|
-
for (Y = B0.call(
|
|
4485
|
-
Y.appendChild(
|
|
4480
|
+
for (Y = B0.call(h.ownerDocument); h.firstChild; )
|
|
4481
|
+
Y.appendChild(h.firstChild);
|
|
4486
4482
|
else
|
|
4487
|
-
Y =
|
|
4483
|
+
Y = h;
|
|
4488
4484
|
return (j.shadowroot || j.shadowrootmode) && (Y = I0.call(l, Y, !0)), Y;
|
|
4489
4485
|
}
|
|
4490
|
-
let t1 = f1 ?
|
|
4491
|
-
return f1 && N["!doctype"] &&
|
|
4486
|
+
let t1 = f1 ? h.outerHTML : h.innerHTML;
|
|
4487
|
+
return f1 && N["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && K(x0, h.ownerDocument.doctype.name) && (t1 = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
|
|
4492
4488
|
` + t1), u1 && R1([Q1, W1, K1], (p1) => {
|
|
4493
4489
|
t1 = E1(t1, p1, " ");
|
|
4494
4490
|
}), E && F1 ? E.createHTML(t1) : t1;
|
|
@@ -4497,16 +4493,16 @@ function v0() {
|
|
|
4497
4493
|
r2(x), $1 = !0;
|
|
4498
4494
|
}, t.clearConfig = function() {
|
|
4499
4495
|
m1 = null, $1 = !1;
|
|
4500
|
-
}, t.isValidAttribute = function(x, r,
|
|
4496
|
+
}, t.isValidAttribute = function(x, r, h) {
|
|
4501
4497
|
m1 || r2({});
|
|
4502
4498
|
const w = P(x), G = P(r);
|
|
4503
|
-
return R2(w, G,
|
|
4499
|
+
return R2(w, G, h);
|
|
4504
4500
|
}, t.addHook = function(x, r) {
|
|
4505
4501
|
typeof r == "function" && _1(W[x], r);
|
|
4506
4502
|
}, t.removeHook = function(x, r) {
|
|
4507
4503
|
if (r !== void 0) {
|
|
4508
|
-
const
|
|
4509
|
-
return
|
|
4504
|
+
const h = Q9(W[x], r);
|
|
4505
|
+
return h === -1 ? void 0 : W9(W[x], h, 1)[0];
|
|
4510
4506
|
}
|
|
4511
4507
|
return e0(W[x]);
|
|
4512
4508
|
}, t.removeHooks = function(x) {
|