@llmnative/react 1.11.1 → 1.13.0
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/index.css +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +906 -877
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/Theme.d.ts +15 -0
- package/dist/types/src/components/ui/Gallery.d.ts +15 -1
- package/dist/types/src/components/widgets/grid-core/GridGalleryView.d.ts +1 -1
- package/dist/types/src/components/widgets/grid-core/types.d.ts +11 -1
- package/package.json +1 -1
- package/themes/cyber.ts +5 -0
- package/themes/default.ts +5 -0
- package/themes/flat.ts +5 -0
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { ArrowDown as E, ArrowUp as D, ArrowUpDown as O, GripVertical as k } fro
|
|
|
8
8
|
import * as A from "@phosphor-icons/react";
|
|
9
9
|
import { createPortal as j, flushSync as M } from "react-dom";
|
|
10
10
|
import { deleteApp as N, getApp as P, getApps as F, initializeApp as I } from "firebase/app";
|
|
11
|
-
import { GoogleAuthProvider as L, OAuthProvider as R, getAdditionalUserInfo as z, getAuth as B, inMemoryPersistence as V, onAuthStateChanged as H, onIdTokenChanged as U, setPersistence as W, signInAnonymously as ee, signInWithCredential as G, signInWithCustomToken as
|
|
11
|
+
import { GoogleAuthProvider as L, OAuthProvider as R, getAdditionalUserInfo as z, getAuth as B, inMemoryPersistence as V, onAuthStateChanged as H, onIdTokenChanged as U, setPersistence as W, signInAnonymously as ee, signInWithCredential as G, signInWithCustomToken as te, signInWithEmailAndPassword as ne, signInWithPopup as re, signOut as K } from "firebase/auth";
|
|
12
12
|
import { addDoc as ie, collection as ae, deleteDoc as oe, doc as se, getCountFromServer as ce, getDoc as le, getDocs as ue, getFirestore as de, onSnapshot as fe, orderBy as q, query as pe, setDoc as me, terminate as he, updateDoc as ge, where as _e, writeBatch as ve } from "firebase/firestore";
|
|
13
13
|
import { createClient as ye } from "@supabase/supabase-js";
|
|
14
14
|
import { deleteObject as be, getDownloadURL as xe, getMetadata as Se, getStorage as Ce, listAll as we, ref as Te, uploadBytesResumable as Ee, uploadString as De } from "firebase/storage";
|
|
@@ -1047,6 +1047,11 @@ var Kt = {
|
|
|
1047
1047
|
Prompt: {
|
|
1048
1048
|
wrapperClassName: "",
|
|
1049
1049
|
className: ""
|
|
1050
|
+
},
|
|
1051
|
+
Repeat: {
|
|
1052
|
+
itemClassName: "",
|
|
1053
|
+
inlineItemClassName: "",
|
|
1054
|
+
addButtonClassName: ""
|
|
1050
1055
|
}
|
|
1051
1056
|
}, Yt = {
|
|
1052
1057
|
preset: Kt,
|
|
@@ -1589,6 +1594,11 @@ var Kt = {
|
|
|
1589
1594
|
Prompt: {
|
|
1590
1595
|
wrapperClassName: "",
|
|
1591
1596
|
className: ""
|
|
1597
|
+
},
|
|
1598
|
+
Repeat: {
|
|
1599
|
+
itemClassName: "",
|
|
1600
|
+
inlineItemClassName: "",
|
|
1601
|
+
addButtonClassName: ""
|
|
1592
1602
|
}
|
|
1593
1603
|
}
|
|
1594
1604
|
}, Zt = {
|
|
@@ -2128,6 +2138,11 @@ var Kt = {
|
|
|
2128
2138
|
Prompt: {
|
|
2129
2139
|
wrapperClassName: "",
|
|
2130
2140
|
className: ""
|
|
2141
|
+
},
|
|
2142
|
+
Repeat: {
|
|
2143
|
+
itemClassName: "",
|
|
2144
|
+
inlineItemClassName: "",
|
|
2145
|
+
addButtonClassName: ""
|
|
2131
2146
|
}
|
|
2132
2147
|
}
|
|
2133
2148
|
}, Qt = {
|
|
@@ -3633,16 +3648,16 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3633
3648
|
P.current = window.setTimeout(() => {
|
|
3634
3649
|
a?.();
|
|
3635
3650
|
}, e);
|
|
3636
|
-
},
|
|
3651
|
+
}, te = or(A, W, W), ne = T ? { right: T } : {}, re = {
|
|
3637
3652
|
...or(A, O.Modal.motion?.backdrop ?? "fade", O.Modal.motion?.backdrop ?? "fade"),
|
|
3638
3653
|
cursor: S && a ? "pointer" : "default",
|
|
3639
3654
|
...C === void 0 ? {} : { zIndex: C - 10 },
|
|
3640
|
-
...
|
|
3641
|
-
},
|
|
3655
|
+
...ne
|
|
3656
|
+
}, K = {
|
|
3642
3657
|
cursor: S && a ? "pointer" : "default",
|
|
3643
3658
|
...C === void 0 ? {} : { zIndex: C },
|
|
3644
3659
|
...w ? { pointerEvents: "none" } : {},
|
|
3645
|
-
...
|
|
3660
|
+
...ne
|
|
3646
3661
|
}, ie = w ? {
|
|
3647
3662
|
transform: l === "left" ? "scale(0.94) translateX(-14px)" : l === "right" ? "scale(0.94) translateX(14px)" : l === "bottom" ? "scale(0.94) translateY(14px)" : l === "top" ? "scale(0.94) translateY(-14px)" : "scale(0.94)",
|
|
3648
3663
|
transformOrigin: l === "left" ? "left center" : l === "right" ? "right center" : l === "bottom" ? "bottom center" : l === "top" ? "top center" : "center",
|
|
@@ -3651,17 +3666,17 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3651
3666
|
} : {}, ae = i !== !1 && (i || o || s || d && a), oe = "inline-flex h-9 w-9 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
3652
3667
|
return j(/* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
3653
3668
|
className: U,
|
|
3654
|
-
style:
|
|
3669
|
+
style: K,
|
|
3655
3670
|
onClick: () => {
|
|
3656
3671
|
S && a && G();
|
|
3657
3672
|
}
|
|
3658
3673
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
3659
3674
|
className: H.dialogClass,
|
|
3660
3675
|
style: {
|
|
3661
|
-
...
|
|
3676
|
+
...te,
|
|
3662
3677
|
...ie,
|
|
3663
3678
|
...C === void 0 ? {} : { zIndex: C },
|
|
3664
|
-
...V === "right" ?
|
|
3679
|
+
...V === "right" ? ne : {}
|
|
3665
3680
|
},
|
|
3666
3681
|
onClick: (e) => e.stopPropagation()
|
|
3667
3682
|
}, f, /* @__PURE__ */ t.createElement("div", { className: H.contentClass }, (r || n || u || a || E) && /* @__PURE__ */ t.createElement("div", { className: H.headerClassName }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0" }, n && /* @__PURE__ */ t.createElement("h3", { className: H.titleClassName }, n), n && r && /* @__PURE__ */ t.createElement("div", { className: H.subtitleClassName }, r), !n && r && (typeof r == "string" ? /* @__PURE__ */ t.createElement("h3", { className: H.titleClassName }, r) : r)), (u || a || E) && /* @__PURE__ */ t.createElement("div", { className: "ml-auto flex shrink-0 items-center gap-1" }, u && /* @__PURE__ */ t.createElement("button", {
|
|
@@ -3706,7 +3721,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3706
3721
|
"data-rf-modal-backdrop": "",
|
|
3707
3722
|
"aria-hidden": "true",
|
|
3708
3723
|
className: "fixed inset-0 z-40 bg-black/60 backdrop-blur-sm",
|
|
3709
|
-
style:
|
|
3724
|
+
style: re,
|
|
3710
3725
|
onClick: () => {
|
|
3711
3726
|
S && a && G();
|
|
3712
3727
|
}
|
|
@@ -3744,7 +3759,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3744
3759
|
}))
|
|
3745
3760
|
}, e);
|
|
3746
3761
|
}, Ii = ({ menuKey: e, as: n = "ul", badges: r = {}, before: i = void 0, after: a = void 0, wrapperClassName: o = void 0, className: s = void 0, headerClassName: c = void 0, itemClassName: u = void 0, linkClassName: d = void 0, iconClassName: f = void 0, textClassName: p = void 0, badgeClassName: m = void 0, arrowClassName: g = void 0, submenuClassName: _ = void 0 }) => {
|
|
3747
|
-
let y =
|
|
3762
|
+
let y = Hh(e), b = Y("menu"), x = ({ item: e, index: i }) => {
|
|
3748
3763
|
let [a, o] = h(e.active);
|
|
3749
3764
|
l(() => {
|
|
3750
3765
|
o(e.active);
|
|
@@ -3838,7 +3853,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3838
3853
|
}, H(n) ? /* @__PURE__ */ t.createElement(t.Fragment, null, n.icon && /* @__PURE__ */ t.createElement(Q, {
|
|
3839
3854
|
name: n.icon,
|
|
3840
3855
|
className: n.text ? "mr-2" : void 0
|
|
3841
|
-
}), n.text) : n) : null, W = m ?? w.Dropdown.wrapperClassName ?? (g || _ ? "flex items-center gap-2" : void 0), ee = N === "top" ? "bottom-full mb-1" : "top-full mt-1", G = d === "end" ? "right-0" : "left-0",
|
|
3856
|
+
}), n.text) : n) : null, W = m ?? w.Dropdown.wrapperClassName ?? (g || _ ? "flex items-center gap-2" : void 0), ee = N === "top" ? "bottom-full mb-1" : "top-full mt-1", G = d === "end" ? "right-0" : "left-0", te = /* @__PURE__ */ t.createElement(Li.Provider, { value: {
|
|
3842
3857
|
closeOnSelect: l,
|
|
3843
3858
|
close: () => V(!1)
|
|
3844
3859
|
} }, /* @__PURE__ */ t.createElement("div", {
|
|
@@ -3859,11 +3874,11 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3859
3874
|
onClick: (e) => {
|
|
3860
3875
|
e.stopPropagation();
|
|
3861
3876
|
}
|
|
3862
|
-
}, i && /* @__PURE__ */ t.createElement("div", { className: X("px-2 py-1.5 text-sm font-semibold", x || w.Dropdown.headerClassName) }, i, /* @__PURE__ */ t.createElement(Ui, null)), e, a && /* @__PURE__ */ t.createElement("div", { className: S || w.Dropdown.footerClassName }, /* @__PURE__ */ t.createElement(Ui, null), a))),
|
|
3877
|
+
}, i && /* @__PURE__ */ t.createElement("div", { className: X("px-2 py-1.5 text-sm font-semibold", x || w.Dropdown.headerClassName) }, i, /* @__PURE__ */ t.createElement(Ui, null)), e, a && /* @__PURE__ */ t.createElement("div", { className: S || w.Dropdown.footerClassName }, /* @__PURE__ */ t.createElement(Ui, null), a))), ne = !u && p === "fixed" && typeof document < "u";
|
|
3863
3878
|
return /* @__PURE__ */ t.createElement(Z, { className: W }, g, /* @__PURE__ */ t.createElement("div", {
|
|
3864
3879
|
ref: D,
|
|
3865
3880
|
className: X(u ? "inline-block text-left" : "relative inline-block text-left", h || w.Dropdown.className)
|
|
3866
|
-
}, U,
|
|
3881
|
+
}, U, ne ? j(te, document.body) : te), _);
|
|
3867
3882
|
};
|
|
3868
3883
|
function zi({ loadItems: e, getItemId: n, renderItem: r, onSelect: i, selectedId: a = void 0, searchPlaceholder: o = void 0, emptyState: s = void 0, loadingState: c = void 0, errorState: l = void 0, debounceMs: u = 200, closeOnSelect: d = !0, inputClassName: f = void 0, selectedClassName: p = void 0, header: m = void 0, open: h = void 0, defaultOpen: g = !1, onOpenChange: _ = void 0, footer: v = void 0, headerClassName: y = void 0, staticOpen: b = !1, ...x }) {
|
|
3869
3884
|
let S = Fn("common"), [C, w] = t.useState(g), [T, E] = t.useState(""), [D, O] = t.useState([]), [k, A] = t.useState(!1), [j, M] = t.useState(null), N = t.useRef(0), P = b || (h ?? C), F = t.useCallback((e) => {
|
|
@@ -4656,7 +4671,7 @@ var Oa = (e) => Da?.[e], ka = "scrape", Aa = "[DEFAULT]", ja = /* @__PURE__ */ n
|
|
|
4656
4671
|
let t = Fa();
|
|
4657
4672
|
if (!t) return !1;
|
|
4658
4673
|
try {
|
|
4659
|
-
return await W(t, V), await
|
|
4674
|
+
return await W(t, V), await te(t, e), !0;
|
|
4660
4675
|
} catch (e) {
|
|
4661
4676
|
let n = t.app.options?.apiKey;
|
|
4662
4677
|
return console.error("Firebase custom token sign-in error: ", e, `— app "${t.app.name}" options.apiKey: ${n ? `${n.slice(0, 6)}… (len ${n.length})` : String(n)}`), !1;
|
|
@@ -6688,11 +6703,11 @@ var Ws = (e, t, n) => {
|
|
|
6688
6703
|
} });
|
|
6689
6704
|
}, 0), r;
|
|
6690
6705
|
});
|
|
6691
|
-
},
|
|
6706
|
+
}, te = u(), ne = `${te}-options`;
|
|
6692
6707
|
return /* @__PURE__ */ t.createElement(Z, { className: A || M.Autocomplete.wrapperClassName }, d && /* @__PURE__ */ t.createElement(Ns, {
|
|
6693
6708
|
label: d,
|
|
6694
6709
|
required: o,
|
|
6695
|
-
htmlFor:
|
|
6710
|
+
htmlFor: te
|
|
6696
6711
|
}), /* @__PURE__ */ t.createElement(Z, { className: g || _ ? X(os, "flex-nowrap") : "" }, g && /* @__PURE__ */ t.createElement(Ks, { side: "before" }, g), /* @__PURE__ */ t.createElement("div", { className: X(is, "h-auto min-h-9 flex-wrap items-center gap-1 py-1.5 px-2", g && "rounded-l-none", _ && "rounded-r-none") }, P.map((e) => /* @__PURE__ */ t.createElement("span", {
|
|
6697
6712
|
className: "inline-flex items-center gap-1 rounded-full border border-primary/20 bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",
|
|
6698
6713
|
key: e
|
|
@@ -6701,19 +6716,19 @@ var Ws = (e, t, n) => {
|
|
|
6701
6716
|
className: "ml-0.5 opacity-60 transition-opacity hover:opacity-100",
|
|
6702
6717
|
onClick: () => G(e)
|
|
6703
6718
|
}, "×"))), (!i || P.length < i) && /* @__PURE__ */ t.createElement("input", {
|
|
6704
|
-
id:
|
|
6719
|
+
id: te,
|
|
6705
6720
|
type: "text",
|
|
6706
6721
|
className: X("min-w-[120px] flex-1 border-none bg-transparent text-sm outline-none placeholder:text-muted-foreground", w || M.Autocomplete.className),
|
|
6707
6722
|
required: o && P.length < (r || 0),
|
|
6708
6723
|
disabled: c || s && !St(O),
|
|
6709
6724
|
placeholder: E ? m ?? "Type or press Enter to create..." : m,
|
|
6710
6725
|
title: f,
|
|
6711
|
-
list:
|
|
6726
|
+
list: ne,
|
|
6712
6727
|
onChange: W,
|
|
6713
6728
|
onKeyDown: ee
|
|
6714
|
-
})), /* @__PURE__ */ t.createElement("datalist", { id:
|
|
6729
|
+
})), /* @__PURE__ */ t.createElement("datalist", { id: ne }, H.map((e, n) => /* @__PURE__ */ t.createElement("option", {
|
|
6715
6730
|
value: e.value,
|
|
6716
|
-
key: `${
|
|
6731
|
+
key: `${te}-${n}`
|
|
6717
6732
|
}, e.label))), _ && /* @__PURE__ */ t.createElement(Ks, { side: "after" }, _)), j ? /* @__PURE__ */ t.createElement(hs, { message: j }) : v && /* @__PURE__ */ t.createElement("div", { className: "mt-1 text-xs text-muted-foreground" }, v));
|
|
6718
6733
|
}, Ys = ({ name: e, defaultValue: n = void 0, onChange: r = void 0, required: i = !1, readOnlyAfterSet: a = !1, disabled: o = !1, label: s = void 0, title: c = void 0, before: d = void 0, after: f = void 0, feedback: m = void 0, options: g = [], optionsSource: _ = void 0, order: v = void 0, inheritWrapperClassName: y = !0, wrapperClassName: b = void 0, className: x = void 0, validator: S = void 0, itemClassName: C = void 0 }) => {
|
|
6719
6734
|
let { value: w, handleChange: T, formWrapClass: E } = Dd({
|
|
@@ -8031,13 +8046,13 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8031
8046
|
return C((e) => o ? [...e, t] : [t]), H(""), W(void 0), B(!1), !0;
|
|
8032
8047
|
}, G = () => {
|
|
8033
8048
|
B(!1), H(""), W(void 0);
|
|
8034
|
-
},
|
|
8049
|
+
}, te = (e, t) => {
|
|
8035
8050
|
let n = e.currentTarget, r = n.naturalWidth > 0 && n.naturalHeight > 0 && (n.naturalWidth < d || n.naturalHeight < u);
|
|
8036
8051
|
R((e) => {
|
|
8037
8052
|
let n = new Set(e);
|
|
8038
8053
|
return r ? n.add(t) : n.delete(t), n;
|
|
8039
8054
|
});
|
|
8040
|
-
},
|
|
8055
|
+
}, ne = ({ scales: e }) => {
|
|
8041
8056
|
if (!e) return;
|
|
8042
8057
|
let n = Object.keys(e);
|
|
8043
8058
|
return n.length === 0 ? null : n.map((n) => /* @__PURE__ */ t.createElement(Qn, { key: n }, /* @__PURE__ */ t.createElement("a", {
|
|
@@ -8079,7 +8094,7 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8079
8094
|
src: Nc(e),
|
|
8080
8095
|
alt: `preview-${n}`,
|
|
8081
8096
|
className: `absolute inset-0 w-full h-full ${L.has(e.key) ? "object-contain p-1" : "object-cover"}`,
|
|
8082
|
-
onLoad: (t) =>
|
|
8097
|
+
onLoad: (t) => te(t, e.key)
|
|
8083
8098
|
}), /* @__PURE__ */ t.createElement("div", {
|
|
8084
8099
|
className: "absolute inset-0 bg-black/55 backdrop-blur-[1px] flex flex-col items-center justify-end pb-2 gap-1 transition-opacity",
|
|
8085
8100
|
style: { display: F === n ? "flex" : "none" }
|
|
@@ -8107,7 +8122,7 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8107
8122
|
}, /* @__PURE__ */ t.createElement(Q, {
|
|
8108
8123
|
name: "x",
|
|
8109
8124
|
className: "w-4 h-4"
|
|
8110
|
-
}))), a && e.variants && Object.keys(e.variants).length > 0 && /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap gap-1 px-1" }, /* @__PURE__ */ t.createElement(
|
|
8125
|
+
}))), a && e.variants && Object.keys(e.variants).length > 0 && /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap gap-1 px-1" }, /* @__PURE__ */ t.createElement(ne, { scales: e.variants })))) : /* @__PURE__ */ t.createElement($o, {
|
|
8111
8126
|
max: 100,
|
|
8112
8127
|
min: 0,
|
|
8113
8128
|
value: e.progress,
|
|
@@ -8853,7 +8868,7 @@ function Wl(e) {
|
|
|
8853
8868
|
return e ? (e.includes("/") ? e.split("/").pop() : e) || e : null;
|
|
8854
8869
|
}
|
|
8855
8870
|
function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, onStop: o, disabled: c = !1, onSubmit: d, attachments: f = !1, commands: p, commandsTrigger: g, models: _ = [], selectedModel: v, onModelChange: y, modelPlaceholder: b, showSettings: x = !1, defaultRole: S = "", defaultVoice: C = "", defaultStyle: w = "", defaultLanguage: T = "", defaultTemperature: E, actions: D, minHeight: O = 96, maxHeight: k = 220, wrapperClassName: A, className: j }) {
|
|
8856
|
-
let M = Y("prompt"), N = Fn("prompt"), P = m(null), F = m(null), I = u(), [L, R] = h([]), [z, B] = h(!1), V = m(0), [H, U] = h(!1), [W, ee] = h(S), [G,
|
|
8871
|
+
let M = Y("prompt"), N = Fn("prompt"), P = m(null), F = m(null), I = u(), [L, R] = h([]), [z, B] = h(!1), V = m(0), [H, U] = h(!1), [W, ee] = h(S), [G, te] = h(C), [ne, re] = h(w), [K, ie] = h(T), [ae, oe] = h(E);
|
|
8857
8872
|
l(() => {
|
|
8858
8873
|
a || U(!1);
|
|
8859
8874
|
}, [a]), l(() => () => {
|
|
@@ -8913,8 +8928,8 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
8913
8928
|
...x ? {
|
|
8914
8929
|
role: W,
|
|
8915
8930
|
voice: G,
|
|
8916
|
-
style:
|
|
8917
|
-
language:
|
|
8931
|
+
style: ne,
|
|
8932
|
+
language: K,
|
|
8918
8933
|
temperature: ae
|
|
8919
8934
|
} : {}
|
|
8920
8935
|
}), L.forEach(({ objectUrl: e }) => URL.revokeObjectURL(e)), R([]));
|
|
@@ -9049,9 +9064,9 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9049
9064
|
placement: "top",
|
|
9050
9065
|
position: "start",
|
|
9051
9066
|
triggerClassName: Vl
|
|
9052
|
-
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () =>
|
|
9067
|
+
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => te("") }, N.defaultOption), Jc.getVoices().map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9053
9068
|
key: e,
|
|
9054
|
-
onClick: () =>
|
|
9069
|
+
onClick: () => te(e)
|
|
9055
9070
|
}, e))), /* @__PURE__ */ t.createElement(Ri, {
|
|
9056
9071
|
trigger: {
|
|
9057
9072
|
icon: "feather",
|
|
@@ -9060,9 +9075,9 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9060
9075
|
placement: "top",
|
|
9061
9076
|
position: "start",
|
|
9062
9077
|
triggerClassName: Vl
|
|
9063
|
-
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () =>
|
|
9078
|
+
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => re("") }, N.defaultOption), Jc.getStyles().map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9064
9079
|
key: e,
|
|
9065
|
-
onClick: () =>
|
|
9080
|
+
onClick: () => re(e)
|
|
9066
9081
|
}, e))), /* @__PURE__ */ t.createElement(Ri, {
|
|
9067
9082
|
trigger: {
|
|
9068
9083
|
icon: "thermometer",
|
|
@@ -9232,12 +9247,12 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9232
9247
|
let { handleChange: C, record: w } = Dd({
|
|
9233
9248
|
name: e,
|
|
9234
9249
|
subscribeToFullRecord: !0
|
|
9235
|
-
}), T = Y("prompt"), E = Fn("prompt"), D = n || e, [O, k] = h(!1), [A, j] = h(o?.value ?? ""), [M, N] = h(!1), [P, F] = h(null), I = $c(), L = el(), { modelOptions: R } = eu(), z = typeof localStorage < "u" ? localStorage.getItem("prompt.model") : null, B = z && R.some((e) => e.value === z) ? z : "", V = t.useMemo(() => lu(r?.prompt, o), [o, r?.prompt]), H = V.model || B, U = u(), W = tu(H, !!m), ee = !W.configured || !m && !H, [G,
|
|
9250
|
+
}), T = Y("prompt"), E = Fn("prompt"), D = n || e, [O, k] = h(!1), [A, j] = h(o?.value ?? ""), [M, N] = h(!1), [P, F] = h(null), I = $c(), L = el(), { modelOptions: R } = eu(), z = typeof localStorage < "u" ? localStorage.getItem("prompt.model") : null, B = z && R.some((e) => e.value === z) ? z : "", V = t.useMemo(() => lu(r?.prompt, o), [o, r?.prompt]), H = V.model || B, U = u(), W = tu(H, !!m), ee = !W.configured || !m && !H, [G, te] = h(null), ne = !G && !W.configured ? g?.({
|
|
9236
9251
|
mode: "run",
|
|
9237
9252
|
providerId: W.providerId,
|
|
9238
9253
|
reason: W.reason,
|
|
9239
9254
|
configured: W.configured
|
|
9240
|
-
}) : null,
|
|
9255
|
+
}) : null, re = t.useMemo(() => {
|
|
9241
9256
|
if (!A) return "";
|
|
9242
9257
|
let e = {
|
|
9243
9258
|
...w,
|
|
@@ -9248,7 +9263,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9248
9263
|
A,
|
|
9249
9264
|
w,
|
|
9250
9265
|
_
|
|
9251
|
-
]),
|
|
9266
|
+
]), K = re !== A, ie = (e, t) => C?.({ target: {
|
|
9252
9267
|
name: e,
|
|
9253
9268
|
value: t
|
|
9254
9269
|
} }), ae = x?.map((e) => e.key === "tokenUsage" && !e.content ? {
|
|
@@ -9272,7 +9287,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9272
9287
|
noProvider: E.noProvider,
|
|
9273
9288
|
noResponse: E.noResponse
|
|
9274
9289
|
}), c = Date.now() - a;
|
|
9275
|
-
if (
|
|
9290
|
+
if (te(null), C?.({ target: {
|
|
9276
9291
|
name: e + ".value",
|
|
9277
9292
|
value: s
|
|
9278
9293
|
} }), t.role !== void 0 && ie(e + ".prompt.role", t.role), t.voice !== void 0 && ie(e + ".prompt.voice", t.voice), t.style !== void 0 && ie(e + ".prompt.style", t.style), t.language !== void 0 && ie(e + ".prompt.language", t.language), S && S.length > 0) {
|
|
@@ -9287,7 +9302,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9287
9302
|
});
|
|
9288
9303
|
}
|
|
9289
9304
|
} catch (e) {
|
|
9290
|
-
|
|
9305
|
+
te(Ql(e, E.runFailed));
|
|
9291
9306
|
}
|
|
9292
9307
|
};
|
|
9293
9308
|
return /* @__PURE__ */ t.createElement(Z, { className: f || T.Prompt.wrapperClassName }, /* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-2" }, l && /* @__PURE__ */ t.createElement("div", { className: "shrink-0" }, l), /* @__PURE__ */ t.createElement("div", { className: `${ql} min-w-0 flex-1` }, D && /* @__PURE__ */ t.createElement($l, {
|
|
@@ -9315,7 +9330,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9315
9330
|
className: `${p || T.Prompt.className} ${su}`,
|
|
9316
9331
|
minHeight: s,
|
|
9317
9332
|
maxHeight: c
|
|
9318
|
-
}),
|
|
9333
|
+
}), K && M && /* @__PURE__ */ t.createElement("div", { className: "border-t border-input px-4 py-3 bg-muted/20" }, /* @__PURE__ */ t.createElement("p", { className: "whitespace-pre-wrap text-sm text-foreground/70" }, re)), K && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-end border-t border-input px-2 py-1" }, /* @__PURE__ */ t.createElement("button", {
|
|
9319
9334
|
type: "button",
|
|
9320
9335
|
title: M ? E.hidePreview : E.showPreview,
|
|
9321
9336
|
className: `${cu} flex items-center justify-center ${M ? "bg-muted text-foreground" : ""}`,
|
|
@@ -9362,7 +9377,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9362
9377
|
maxHeight: c,
|
|
9363
9378
|
className: p || T.Prompt.className,
|
|
9364
9379
|
wrapperClassName: ""
|
|
9365
|
-
}), (G || !W.configured) && (
|
|
9380
|
+
}), (G || !W.configured) && (ne ? /* @__PURE__ */ t.createElement("div", { className: "mt-1" }, ne) : /* @__PURE__ */ t.createElement("span", { className: "mt-1 flex min-w-0 items-center gap-1 text-xs text-warning" }, /* @__PURE__ */ t.createElement(Q, {
|
|
9366
9381
|
name: "triangle-alert",
|
|
9367
9382
|
size: 13,
|
|
9368
9383
|
className: "shrink-0"
|
|
@@ -9618,16 +9633,16 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9618
9633
|
editorContext: null
|
|
9619
9634
|
}), H = m(j ?? ""), U = m(B);
|
|
9620
9635
|
U.current = B;
|
|
9621
|
-
let W = S?.length ? C ?? "/" : void 0, ee = (S?.length ?? 0) >= 10, G = t.useMemo(() => new Map((S ?? []).map((e) => [e.name, e])), [S]),
|
|
9636
|
+
let W = S?.length ? C ?? "/" : void 0, ee = (S?.length ?? 0) >= 10, G = t.useMemo(() => new Map((S ?? []).map((e) => [e.name, e])), [S]), te = t.useMemo(() => (S ?? []).map((e) => ({
|
|
9622
9637
|
key: e.name,
|
|
9623
9638
|
label: `${W ?? "/"}${e.name}`,
|
|
9624
9639
|
value: e.name,
|
|
9625
9640
|
icon: e.icon,
|
|
9626
9641
|
description: e.description,
|
|
9627
9642
|
group: e.group
|
|
9628
|
-
})), [S, W]),
|
|
9643
|
+
})), [S, W]), ne = t.useMemo(() => {
|
|
9629
9644
|
let e = [], n;
|
|
9630
|
-
return
|
|
9645
|
+
return te.forEach((r) => {
|
|
9631
9646
|
r.group !== n && (n = r.group, r.group && e.push(/* @__PURE__ */ t.createElement(Bl.Heading, { key: `group:${r.group}` }, r.group))), e.push(/* @__PURE__ */ t.createElement(Bl.Item, {
|
|
9632
9647
|
key: r.key,
|
|
9633
9648
|
label: r.label,
|
|
@@ -9636,17 +9651,17 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9636
9651
|
description: r.description
|
|
9637
9652
|
}));
|
|
9638
9653
|
}), e;
|
|
9639
|
-
}, [
|
|
9654
|
+
}, [te]);
|
|
9640
9655
|
l(() => {
|
|
9641
9656
|
I.current || (H.current = j ?? "");
|
|
9642
9657
|
}, [j]);
|
|
9643
|
-
let
|
|
9658
|
+
let re = s((t) => {
|
|
9644
9659
|
H.current = t, M({ target: {
|
|
9645
9660
|
name: e,
|
|
9646
9661
|
value: t
|
|
9647
9662
|
} });
|
|
9648
|
-
}, [M, e]),
|
|
9649
|
-
|
|
9663
|
+
}, [M, e]), K = m(re);
|
|
9664
|
+
K.current = re;
|
|
9650
9665
|
let ie = s(() => {
|
|
9651
9666
|
V({
|
|
9652
9667
|
open: !1,
|
|
@@ -9714,7 +9729,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9714
9729
|
n.language,
|
|
9715
9730
|
r,
|
|
9716
9731
|
n.EditorView.updateListener.of((e) => {
|
|
9717
|
-
e.docChanged &&
|
|
9732
|
+
e.docChanged && K.current(e.state.doc.toString());
|
|
9718
9733
|
}),
|
|
9719
9734
|
...x ?? []
|
|
9720
9735
|
];
|
|
@@ -9822,7 +9837,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9822
9837
|
required: p,
|
|
9823
9838
|
htmlFor: O,
|
|
9824
9839
|
className: v
|
|
9825
|
-
}), /* @__PURE__ */ t.createElement("div", { className: X(E || D ? os : "", A.fill && "flex-1 min-h-0 flex flex-col") }, E && /* @__PURE__ */ t.createElement("span", { className: X("inline-flex shrink-0 items-center border border-input bg-muted px-3 py-1 text-sm text-muted-foreground", "rounded-l-md rounded-r-none border-r-0") }, E), W &&
|
|
9840
|
+
}), /* @__PURE__ */ t.createElement("div", { className: X(E || D ? os : "", A.fill && "flex-1 min-h-0 flex flex-col") }, E && /* @__PURE__ */ t.createElement("span", { className: X("inline-flex shrink-0 items-center border border-input bg-muted px-3 py-1 text-sm text-muted-foreground", "rounded-l-md rounded-r-none border-r-0") }, E), W && te.length > 0 ? /* @__PURE__ */ t.createElement(Bl, {
|
|
9826
9841
|
ref: L,
|
|
9827
9842
|
className: X(A.fill && "flex-1 min-h-0 flex flex-col"),
|
|
9828
9843
|
trigger: W,
|
|
@@ -9837,7 +9852,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9837
9852
|
onSelect: (e, t) => {
|
|
9838
9853
|
ae(e, t);
|
|
9839
9854
|
}
|
|
9840
|
-
},
|
|
9855
|
+
}, ne, se) : se, D && /* @__PURE__ */ t.createElement("span", { className: X("inline-flex shrink-0 items-center border border-input bg-muted px-3 py-1 text-sm text-muted-foreground", "rounded-l-none rounded-r-md border-l-0") }, D)), P && /* @__PURE__ */ t.createElement(hs, { message: P }), _ && /* @__PURE__ */ t.createElement("p", { className: "mt-1 text-xs text-muted-foreground" }, _));
|
|
9841
9856
|
}, Nu = () => Promise.all([
|
|
9842
9857
|
import("@tiptap/react"),
|
|
9843
9858
|
import("@tiptap/react/menus"),
|
|
@@ -10464,19 +10479,19 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10464
10479
|
a
|
|
10465
10480
|
] : a;
|
|
10466
10481
|
}
|
|
10467
|
-
}), { Table: A, TableRow: j, TableHeader: M, TableCell: N } = e[6], P = e[7].default, F = e[8].default, [I, L] = h(!1), [R, z] = h(""), [B, V] = h([]), [H, U] = h(null), [, W] = t.useReducer((e) => e + 1, 0), ee = m(null), G = m(null), [
|
|
10482
|
+
}), { Table: A, TableRow: j, TableHeader: M, TableCell: N } = e[6], P = e[7].default, F = e[8].default, [I, L] = h(!1), [R, z] = h(""), [B, V] = h([]), [H, U] = h(null), [, W] = t.useReducer((e) => e + 1, 0), ee = m(null), G = m(null), [te, ne] = h({
|
|
10468
10483
|
open: !1,
|
|
10469
10484
|
query: "",
|
|
10470
10485
|
anchorPosition: null,
|
|
10471
10486
|
editorContext: null
|
|
10472
|
-
}),
|
|
10473
|
-
|
|
10474
|
-
let
|
|
10487
|
+
}), re = m(te);
|
|
10488
|
+
re.current = te;
|
|
10489
|
+
let K = x?.length ? S ?? "/" : void 0, ie = (x?.length ?? 0) >= 10, ae = t.useMemo(() => new Map((x ?? []).map((e) => [e.name, e])), [x]), oe = t.useMemo(() => (x ?? []).map((e) => ({
|
|
10475
10490
|
key: e.name,
|
|
10476
|
-
label: `${
|
|
10491
|
+
label: `${K ?? "/"}${e.name}`,
|
|
10477
10492
|
value: e.name,
|
|
10478
10493
|
icon: e.icon
|
|
10479
|
-
})), [x,
|
|
10494
|
+
})), [x, K]), se = g?.srcsetWidths === void 0 ? [400, 800] : g.srcsetWidths, ce = lc(), le = Dc({
|
|
10480
10495
|
uploadPath: g?.path,
|
|
10481
10496
|
srcsetWidths: se,
|
|
10482
10497
|
onFileReady: (e) => {
|
|
@@ -10492,7 +10507,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10492
10507
|
maxHeight: p,
|
|
10493
10508
|
paddingOffset: 16
|
|
10494
10509
|
}), de = s(() => {
|
|
10495
|
-
|
|
10510
|
+
ne({
|
|
10496
10511
|
open: !1,
|
|
10497
10512
|
query: "",
|
|
10498
10513
|
anchorPosition: null,
|
|
@@ -10571,7 +10586,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10571
10586
|
return !1;
|
|
10572
10587
|
},
|
|
10573
10588
|
handleKeyDown(e, t) {
|
|
10574
|
-
if (!
|
|
10589
|
+
if (!re.current.open) return !1;
|
|
10575
10590
|
switch (t.key) {
|
|
10576
10591
|
case "ArrowDown": return t.preventDefault(), G.current?.moveNext(), !0;
|
|
10577
10592
|
case "ArrowUp": return t.preventDefault(), G.current?.movePrev(), !0;
|
|
@@ -10597,32 +10612,32 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10597
10612
|
q.off("selectionUpdate", W);
|
|
10598
10613
|
};
|
|
10599
10614
|
}, [q, ue.adjustedMinHeight]), l(() => {
|
|
10600
|
-
if (!q || !
|
|
10601
|
-
|
|
10615
|
+
if (!q || !K || I) {
|
|
10616
|
+
re.current.open && de();
|
|
10602
10617
|
return;
|
|
10603
10618
|
}
|
|
10604
10619
|
let e = () => {
|
|
10605
10620
|
if (!q.isFocused) {
|
|
10606
|
-
|
|
10621
|
+
re.current.open && de();
|
|
10607
10622
|
return;
|
|
10608
10623
|
}
|
|
10609
10624
|
let e = q.state.selection;
|
|
10610
10625
|
if (!e.empty) {
|
|
10611
|
-
|
|
10626
|
+
re.current.open && de();
|
|
10612
10627
|
return;
|
|
10613
10628
|
}
|
|
10614
10629
|
let { $from: t } = e, n = t.parent;
|
|
10615
10630
|
if (!n.isTextblock) {
|
|
10616
|
-
|
|
10631
|
+
re.current.open && de();
|
|
10617
10632
|
return;
|
|
10618
10633
|
}
|
|
10619
|
-
let r = n.textContent ?? "", i = t.parentOffset, a = Qu(r, i,
|
|
10634
|
+
let r = n.textContent ?? "", i = t.parentOffset, a = Qu(r, i, K);
|
|
10620
10635
|
if (!a) {
|
|
10621
|
-
|
|
10636
|
+
re.current.open && de();
|
|
10622
10637
|
return;
|
|
10623
10638
|
}
|
|
10624
|
-
let o = q.view.coordsAtPos(e.from), s = fe(q,
|
|
10625
|
-
!o || !s ||
|
|
10639
|
+
let o = q.view.coordsAtPos(e.from), s = fe(q, K);
|
|
10640
|
+
!o || !s || ne({
|
|
10626
10641
|
open: !0,
|
|
10627
10642
|
query: a.query,
|
|
10628
10643
|
anchorPosition: {
|
|
@@ -10639,7 +10654,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10639
10654
|
de,
|
|
10640
10655
|
q,
|
|
10641
10656
|
fe,
|
|
10642
|
-
|
|
10657
|
+
K,
|
|
10643
10658
|
I
|
|
10644
10659
|
]);
|
|
10645
10660
|
let me = s(async (e, t) => {
|
|
@@ -10860,15 +10875,15 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10860
10875
|
style: ue.wrapperStyle,
|
|
10861
10876
|
className: X("w-full px-3 py-2 text-sm", "[&_.ProseMirror]:outline-none", "[&_.ProseMirror_p]:my-1", "[&_.ProseMirror_h1]:my-2 [&_.ProseMirror_h1]:text-2xl [&_.ProseMirror_h1]:font-bold", "[&_.ProseMirror_h2]:my-2 [&_.ProseMirror_h2]:text-xl [&_.ProseMirror_h2]:font-semibold", "[&_.ProseMirror_h3]:my-1 [&_.ProseMirror_h3]:text-lg [&_.ProseMirror_h3]:font-semibold", "[&_.ProseMirror_ul]:list-disc [&_.ProseMirror_ul]:pl-6", "[&_.ProseMirror_ol]:list-decimal [&_.ProseMirror_ol]:pl-6", "[&_.ProseMirror_blockquote]:my-2 [&_.ProseMirror_blockquote]:border-l-4 [&_.ProseMirror_blockquote]:border-border [&_.ProseMirror_blockquote]:pl-4 [&_.ProseMirror_blockquote]:text-muted-foreground", "[&_.ProseMirror_code]:rounded [&_.ProseMirror_code]:bg-muted [&_.ProseMirror_code]:px-1 [&_.ProseMirror_code]:font-mono [&_.ProseMirror_code]:text-xs", "[&_.ProseMirror_pre]:my-2 [&_.ProseMirror_pre]:overflow-x-auto [&_.ProseMirror_pre]:rounded [&_.ProseMirror_pre]:bg-muted [&_.ProseMirror_pre]:p-3", "[&_.ProseMirror_table]:w-full [&_.ProseMirror_table]:border-collapse", "[&_.ProseMirror_td]:border [&_.ProseMirror_td]:border-border [&_.ProseMirror_td]:px-2 [&_.ProseMirror_td]:py-1", "[&_.ProseMirror_th]:border [&_.ProseMirror_th]:border-border [&_.ProseMirror_th]:bg-muted [&_.ProseMirror_th]:px-2 [&_.ProseMirror_th]:py-1 [&_.ProseMirror_th]:font-semibold", "[&_.ProseMirror_a]:text-primary [&_.ProseMirror_a]:underline [&_.ProseMirror_a]:pointer-events-none", "[&_.ProseMirror_a_img]:pointer-events-auto", "[&_.ProseMirror_.is-editor-empty:first-child::before]:pointer-events-none [&_.ProseMirror_.is-editor-empty:first-child::before]:float-left [&_.ProseMirror_.is-editor-empty:first-child::before]:h-0 [&_.ProseMirror_.is-editor-empty:first-child::before]:text-muted-foreground [&_.ProseMirror_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]")
|
|
10862
10877
|
}, /* @__PURE__ */ t.createElement(w, { editor: q }));
|
|
10863
|
-
return
|
|
10878
|
+
return K && oe.length > 0 ? /* @__PURE__ */ t.createElement(Bl, {
|
|
10864
10879
|
ref: G,
|
|
10865
|
-
trigger:
|
|
10880
|
+
trigger: K,
|
|
10866
10881
|
searchable: ie,
|
|
10867
|
-
controlled:
|
|
10868
|
-
open:
|
|
10869
|
-
anchorPosition:
|
|
10870
|
-
query:
|
|
10871
|
-
editorContext:
|
|
10882
|
+
controlled: te.editorContext ? {
|
|
10883
|
+
open: te.open,
|
|
10884
|
+
anchorPosition: te.anchorPosition,
|
|
10885
|
+
query: te.query,
|
|
10886
|
+
editorContext: te.editorContext,
|
|
10872
10887
|
onClose: de
|
|
10873
10888
|
} : void 0,
|
|
10874
10889
|
onSelect: (e, t) => {
|
|
@@ -12057,7 +12072,7 @@ function Fd(e) {
|
|
|
12057
12072
|
var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0, header: i = void 0, footer: a = void 0, path: o = void 0, defaultValues: c = void 0, keyGenerator: u = void 0, onLoad: d = void 0, onRecordChange: f = void 0, onSave: _ = void 0, onDelete: v = void 0, onComplete: y = void 0, log: b = !1, showNotice: S = !0, draftBucket: C = void 0, noticeAnchorRef: w = void 0, showBack: T = !1, wrapperClassName: E = void 0, headerClassName: D = void 0, className: O = void 0, footerClassName: k = void 0, formClassName: A = void 0 }) => {
|
|
12058
12073
|
let j = x(), N = Y("form"), P = Fn("form"), F = Ti(), I = _d(r), L = md(I), R = m(void 0);
|
|
12059
12074
|
R.current ||= Fd(c);
|
|
12060
|
-
let z = R.current, B = g(z.subscribe, z.getRecord), V = z.setRecord, [H, U] = h(!1), [W, ee] = h(!1), G = !c?.[za],
|
|
12075
|
+
let z = R.current, B = g(z.subscribe, z.getRecord), V = z.setRecord, [H, U] = h(!1), [W, ee] = h(!1), G = !c?.[za], te = m(wt(c ?? {})), [ne, re] = h(() => Nd(c)), [K, ie] = h(null), ae = m({ isDirty: !1 }), oe = p(() => {
|
|
12061
12076
|
if (!C) return;
|
|
12062
12077
|
let e = ct(C), t = ct(o || `${j.pathname}${j.hash || ""}`);
|
|
12063
12078
|
return e && t ? `llmnative.form-draft.${e}.${t}` : void 0;
|
|
@@ -12066,12 +12081,12 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12066
12081
|
j.pathname,
|
|
12067
12082
|
j.hash,
|
|
12068
12083
|
o
|
|
12069
|
-
]), se = !!(_ || o || !G), ce = !!(v || !G), le = p(() => !Ft(B,
|
|
12084
|
+
]), se = !!(_ || o || !G), ce = !!(v || !G), le = p(() => !Ft(B, te.current), [B, te.current]), ue = P.noChangesToSave ?? "No changes to save", de = P.draftRestoreTitle ?? "Unsaved changes found", fe = P.draftRestoreMessage ?? "A local draft is available for this form. Restore it or discard it.", q = P.draftRestoreAction ?? "Restore", pe = P.draftDiscardAction ?? "Discard", me = P.draftRestoredTitle ?? "Draft restored", he = P.draftRestoredMessage ?? "The local draft has been restored. You can still discard it for a few seconds.", ge = s(() => {
|
|
12070
12085
|
!oe || typeof localStorage > "u" || localStorage.removeItem(oe);
|
|
12071
12086
|
}, [oe]), _e = s(() => {
|
|
12072
12087
|
if (!(!oe || typeof localStorage > "u")) return Pd(localStorage.getItem(oe));
|
|
12073
12088
|
}, [oe]), ve = s(() => {
|
|
12074
|
-
V(wt(
|
|
12089
|
+
V(wt(te.current));
|
|
12075
12090
|
}, []), [ye, be] = h(void 0), xe = s(({ message: e, type: t = "danger" }) => {
|
|
12076
12091
|
S && be({
|
|
12077
12092
|
type: t,
|
|
@@ -12176,7 +12191,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12176
12191
|
action: t,
|
|
12177
12192
|
storagePath: je.current
|
|
12178
12193
|
})) ?? ze(Ee.current ?? {});
|
|
12179
|
-
return e && await F.set(e, Nt(Ee.current)),
|
|
12194
|
+
return e && await F.set(e, Nt(Ee.current)), te.current = wt(Ee.current ?? {}), re(Nd(Ee.current)), ge(), ie(null), await Be(t);
|
|
12180
12195
|
} finally {
|
|
12181
12196
|
U(!1);
|
|
12182
12197
|
}
|
|
@@ -12208,7 +12223,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12208
12223
|
]);
|
|
12209
12224
|
l(() => {
|
|
12210
12225
|
let e = wt(c ?? {});
|
|
12211
|
-
if (c && (V(e), d?.(wt(e))),
|
|
12226
|
+
if (c && (V(e), d?.(wt(e))), te.current = e, re(Nd(e)), !C) {
|
|
12212
12227
|
ie(null);
|
|
12213
12228
|
return;
|
|
12214
12229
|
}
|
|
@@ -12238,7 +12253,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12238
12253
|
if (!oe || typeof localStorage > "u" || B === void 0) return;
|
|
12239
12254
|
if (!le) {
|
|
12240
12255
|
let e = _e();
|
|
12241
|
-
if (e && Nd(e) !==
|
|
12256
|
+
if (e && Nd(e) !== ne) return;
|
|
12242
12257
|
localStorage.removeItem(oe);
|
|
12243
12258
|
return;
|
|
12244
12259
|
}
|
|
@@ -12247,7 +12262,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12247
12262
|
}, 150);
|
|
12248
12263
|
return () => window.clearTimeout(e);
|
|
12249
12264
|
}, [
|
|
12250
|
-
|
|
12265
|
+
ne,
|
|
12251
12266
|
oe,
|
|
12252
12267
|
le,
|
|
12253
12268
|
_e,
|
|
@@ -12291,8 +12306,8 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12291
12306
|
isDeleting: W,
|
|
12292
12307
|
saveDisabled: !se || !le || H,
|
|
12293
12308
|
deleteDisabled: !ce || W,
|
|
12294
|
-
hasDraft:
|
|
12295
|
-
draftStatus:
|
|
12309
|
+
hasDraft: K !== null,
|
|
12310
|
+
draftStatus: K,
|
|
12296
12311
|
errors: Se,
|
|
12297
12312
|
hasErrors: Object.keys(Se).length > 0
|
|
12298
12313
|
});
|
|
@@ -12300,7 +12315,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12300
12315
|
ce,
|
|
12301
12316
|
se,
|
|
12302
12317
|
L,
|
|
12303
|
-
|
|
12318
|
+
K,
|
|
12304
12319
|
Se,
|
|
12305
12320
|
W,
|
|
12306
12321
|
le,
|
|
@@ -12337,13 +12352,13 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12337
12352
|
timeout: ye.type === "success" ? 3e3 : void 0,
|
|
12338
12353
|
onClose: ye.type === "success" ? () => be(void 0) : void 0
|
|
12339
12354
|
}, ye.message) : null, [ye, w]), Je = p(() => {
|
|
12340
|
-
if (!
|
|
12341
|
-
let e =
|
|
12355
|
+
if (!K) return null;
|
|
12356
|
+
let e = K === "restore" ? de : me, n = K === "restore" ? fe : he;
|
|
12342
12357
|
return /* @__PURE__ */ t.createElement(Io, {
|
|
12343
|
-
variant:
|
|
12344
|
-
timeout:
|
|
12345
|
-
onClose:
|
|
12346
|
-
}, /* @__PURE__ */ t.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ t.createElement("div", { className: "font-medium" }, e), /* @__PURE__ */ t.createElement("div", { className: "text-sm opacity-90" }, n)), /* @__PURE__ */ t.createElement("div", { className: "flex shrink-0 items-center gap-2" },
|
|
12358
|
+
variant: K === "restore" ? "warning" : "info",
|
|
12359
|
+
timeout: K === "restored" ? 6e3 : void 0,
|
|
12360
|
+
onClose: K === "restored" ? () => ie(null) : void 0
|
|
12361
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ t.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ t.createElement("div", { className: "font-medium" }, e), /* @__PURE__ */ t.createElement("div", { className: "text-sm opacity-90" }, n)), /* @__PURE__ */ t.createElement("div", { className: "flex shrink-0 items-center gap-2" }, K === "restore" ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Hr, {
|
|
12347
12362
|
label: q,
|
|
12348
12363
|
variant: "warning",
|
|
12349
12364
|
onClick: () => Pe()
|
|
@@ -12359,7 +12374,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12359
12374
|
}, [
|
|
12360
12375
|
Ne,
|
|
12361
12376
|
pe,
|
|
12362
|
-
|
|
12377
|
+
K,
|
|
12363
12378
|
q,
|
|
12364
12379
|
fe,
|
|
12365
12380
|
de,
|
|
@@ -12434,68 +12449,69 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12434
12449
|
onKeyDownCapture: Ue,
|
|
12435
12450
|
onKeyDown: Ue
|
|
12436
12451
|
}, Ye));
|
|
12437
|
-
}, Rd = "
|
|
12452
|
+
}, Rd = "flex items-center justify-between gap-3 border-b border-border/50 px-3 py-2", zd = "text-xs font-medium uppercase tracking-[0.14em] text-muted-foreground", Bd = "px-3 py-3", Vd = "h-7 w-7 rounded-md bg-transparent p-0 text-muted-foreground hover:bg-destructive/10 hover:text-destructive", Hd = ({ name: e, children: n, onChange: r, onAdd: i, onRemove: a, className: o, layout: s = "horizontal", minItems: c = void 0, maxItems: l = void 0, label: u = void 0, labelPosition: d = "top", hideRemoveButton: f = !1, readOnly: m = !1 }) => {
|
|
12438
12453
|
let { value: h, handleChange: g } = Dd({
|
|
12439
12454
|
name: e,
|
|
12440
12455
|
onChange: r
|
|
12441
|
-
}), _ = Array.isArray(h) ? h : [], v = (t, r) => Ad({
|
|
12456
|
+
}), _ = Array.isArray(h) ? h : [], v = Y("repeat"), y = X("rounded-xl border border-border/60 bg-card/80 shadow-sm", v.Repeat.itemClassName), b = (t, r) => Ad({
|
|
12442
12457
|
children: typeof n == "function" ? n({
|
|
12443
12458
|
record: _[t],
|
|
12444
12459
|
records: _,
|
|
12445
12460
|
index: t,
|
|
12446
|
-
remove: () =>
|
|
12461
|
+
remove: () => w(t)
|
|
12447
12462
|
}) : n,
|
|
12448
12463
|
parentName: `${e}.${t}`,
|
|
12449
12464
|
wrapperClassName: r
|
|
12450
|
-
}),
|
|
12465
|
+
}), x = (e, n) => {
|
|
12451
12466
|
switch (s) {
|
|
12452
|
-
case "horizontal": return /* @__PURE__ */ t.createElement("div", { className:
|
|
12453
|
-
className:
|
|
12467
|
+
case "horizontal": return /* @__PURE__ */ t.createElement("div", { className: y }, /* @__PURE__ */ t.createElement("div", { className: Rd }, /* @__PURE__ */ t.createElement("span", { className: zd }, "#", e + 1), n && !f ? /* @__PURE__ */ t.createElement(Hr, {
|
|
12468
|
+
className: Vd,
|
|
12454
12469
|
icon: "x",
|
|
12455
|
-
onClick: () =>
|
|
12470
|
+
onClick: () => w(e)
|
|
12456
12471
|
}) : /* @__PURE__ */ t.createElement("span", {
|
|
12457
12472
|
className: "h-7 w-7",
|
|
12458
12473
|
"aria-hidden": "true"
|
|
12459
|
-
})), /* @__PURE__ */ t.createElement("div", { className:
|
|
12474
|
+
})), /* @__PURE__ */ t.createElement("div", { className: Bd }, b(e)));
|
|
12460
12475
|
case "vertical": return /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
12461
|
-
case "inline": return /* @__PURE__ */ t.createElement("div", { className: X(
|
|
12462
|
-
className: X(
|
|
12476
|
+
case "inline": return /* @__PURE__ */ t.createElement("div", { className: X(y, "px-3 py-2", v.Repeat.inlineItemClassName) }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-2" }, /* @__PURE__ */ t.createElement("div", { className: "flex-1 min-w-0" }, b(e, "!mb-0")), n && !f && /* @__PURE__ */ t.createElement(Hr, {
|
|
12477
|
+
className: X(Vd, "mt-1 shrink-0"),
|
|
12463
12478
|
icon: "x",
|
|
12464
|
-
onClick: () =>
|
|
12479
|
+
onClick: () => w(e)
|
|
12465
12480
|
})));
|
|
12466
12481
|
}
|
|
12467
|
-
},
|
|
12482
|
+
}, S = (_.length > 0 ? _ : Array.from({ length: c || 0 }, () => ({})))?.map((n, r) => {
|
|
12468
12483
|
let i = !m && r >= (c || 0);
|
|
12469
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, { key: `${e}-${r}` },
|
|
12470
|
-
}),
|
|
12471
|
-
let t = _.length > 0 ? [..._, {}] : Array.from({ length:
|
|
12484
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, { key: `${e}-${r}` }, x(r, i));
|
|
12485
|
+
}), C = () => {
|
|
12486
|
+
let t = _.length > 0 ? [..._, {}] : Array.from({ length: S.length + 1 }, () => ({}));
|
|
12472
12487
|
i?.(t), g({ target: {
|
|
12473
12488
|
name: `${e}.${t.length - 1}`,
|
|
12474
12489
|
value: {}
|
|
12475
12490
|
} });
|
|
12476
|
-
},
|
|
12491
|
+
}, w = (t) => {
|
|
12477
12492
|
a?.(t), g({ target: { name: `${e}.${t}` } });
|
|
12478
|
-
},
|
|
12493
|
+
}, T = p(() => m ? null : !l || S.length < l ? u && d === "bottom" ? /* @__PURE__ */ t.createElement(Hr, {
|
|
12479
12494
|
icon: "plus",
|
|
12480
12495
|
label: u,
|
|
12481
12496
|
variant: "link",
|
|
12482
|
-
className: "w-full justify-start gap-1 rounded-lg border border-dashed border-border/60 px-3 py-2 text-sm text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground",
|
|
12483
|
-
onClick:
|
|
12497
|
+
className: X("w-full justify-start gap-1 rounded-lg border border-dashed border-border/60 px-3 py-2 text-sm text-muted-foreground hover:border-border hover:bg-muted/40 hover:text-foreground", v.Repeat.addButtonClassName),
|
|
12498
|
+
onClick: C
|
|
12484
12499
|
}) : /* @__PURE__ */ t.createElement(Hr, {
|
|
12485
12500
|
icon: "plus",
|
|
12486
12501
|
label: u ? void 0 : "Add",
|
|
12487
12502
|
variant: u ? "link" : "secondary",
|
|
12488
|
-
className: u ? "h-8 w-8 rounded-lg p-0 text-muted-foreground hover:bg-muted/50 hover:text-foreground" : void 0,
|
|
12489
|
-
onClick:
|
|
12503
|
+
className: u ? X("h-8 w-8 rounded-lg p-0 text-muted-foreground hover:bg-muted/50 hover:text-foreground", v.Repeat.addButtonClassName) : void 0,
|
|
12504
|
+
onClick: C
|
|
12490
12505
|
}) : null, [
|
|
12491
12506
|
m,
|
|
12492
12507
|
l,
|
|
12493
|
-
|
|
12508
|
+
S.length,
|
|
12494
12509
|
u,
|
|
12495
|
-
d
|
|
12510
|
+
d,
|
|
12511
|
+
v.Repeat.addButtonClassName
|
|
12496
12512
|
]);
|
|
12497
|
-
return /* @__PURE__ */ t.createElement("div", { className: X("space-y-3", o) }, u && d === "top" && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-between gap-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, u),
|
|
12498
|
-
},
|
|
12513
|
+
return /* @__PURE__ */ t.createElement("div", { className: X("space-y-3", o) }, u && d === "top" && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-between gap-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, u), T), S, !u && T, u && d === "bottom" && T);
|
|
12514
|
+
}, Ud = {
|
|
12499
12515
|
default: {
|
|
12500
12516
|
shellClassName: "space-y-4",
|
|
12501
12517
|
menuClassName: "flex flex-wrap items-end gap-2 border-b border-border/70",
|
|
@@ -12542,19 +12558,19 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12542
12558
|
inactiveTriggerClassName: "text-muted-foreground hover:bg-background/80 hover:text-foreground"
|
|
12543
12559
|
}
|
|
12544
12560
|
};
|
|
12545
|
-
function
|
|
12546
|
-
return
|
|
12561
|
+
function Wd(e) {
|
|
12562
|
+
return Ud[e];
|
|
12547
12563
|
}
|
|
12548
|
-
function
|
|
12549
|
-
let r =
|
|
12564
|
+
function Gd(e, t, n) {
|
|
12565
|
+
let r = Wd(e), i = Y("tab");
|
|
12550
12566
|
return X("cursor-pointer", r.triggerClassName, i.Tab.triggerClassName, t ? r.activeTriggerClassName : r.inactiveTriggerClassName, t ? i.Tab.activeTriggerClassName : i.Tab.inactiveTriggerClassName, n);
|
|
12551
12567
|
}
|
|
12552
|
-
function
|
|
12568
|
+
function Kd(e) {
|
|
12553
12569
|
return X("min-h-0 min-w-0 h-full overflow-x-hidden overflow-y-auto", Y("tab").Tab.contentClassName, e);
|
|
12554
12570
|
}
|
|
12555
|
-
var
|
|
12571
|
+
var qd = {
|
|
12556
12572
|
default: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12557
|
-
let a =
|
|
12573
|
+
let a = Wd("default"), o = Y("tab");
|
|
12558
12574
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
12559
12575
|
role: "tablist",
|
|
12560
12576
|
"aria-orientation": "horizontal",
|
|
@@ -12562,7 +12578,7 @@ var Jd = {
|
|
|
12562
12578
|
}, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
|
|
12563
12579
|
},
|
|
12564
12580
|
top: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12565
|
-
let a =
|
|
12581
|
+
let a = Wd("top"), o = Y("tab");
|
|
12566
12582
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
12567
12583
|
role: "tablist",
|
|
12568
12584
|
"aria-orientation": "horizontal",
|
|
@@ -12570,7 +12586,7 @@ var Jd = {
|
|
|
12570
12586
|
}, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
|
|
12571
12587
|
},
|
|
12572
12588
|
left: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12573
|
-
let a =
|
|
12589
|
+
let a = Wd("left"), o = Y("tab");
|
|
12574
12590
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
12575
12591
|
role: "tablist",
|
|
12576
12592
|
"aria-orientation": "vertical",
|
|
@@ -12578,7 +12594,7 @@ var Jd = {
|
|
|
12578
12594
|
}, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
|
|
12579
12595
|
},
|
|
12580
12596
|
right: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12581
|
-
let a =
|
|
12597
|
+
let a = Wd("right"), o = Y("tab");
|
|
12582
12598
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
12583
12599
|
role: "tablist",
|
|
12584
12600
|
"aria-orientation": "vertical",
|
|
@@ -12586,23 +12602,23 @@ var Jd = {
|
|
|
12586
12602
|
}, e), /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n));
|
|
12587
12603
|
},
|
|
12588
12604
|
bottom: ({ menu: e, content: n, menuClassName: r, contentClassName: i }) => {
|
|
12589
|
-
let a =
|
|
12605
|
+
let a = Wd("bottom"), o = Y("tab");
|
|
12590
12606
|
return /* @__PURE__ */ t.createElement("div", { className: a.shellClassName }, /* @__PURE__ */ t.createElement("div", { className: X(a.contentClassName, o.Tab.contentClassName, i) }, n), /* @__PURE__ */ t.createElement("div", {
|
|
12591
12607
|
role: "tablist",
|
|
12592
12608
|
"aria-orientation": "horizontal",
|
|
12593
12609
|
className: X(a.menuClassName, o.Tab.menuClassName, r)
|
|
12594
12610
|
}, e));
|
|
12595
12611
|
}
|
|
12596
|
-
},
|
|
12612
|
+
}, Jd = () => null, Yd = ({ children: e, motion: n }) => {
|
|
12597
12613
|
let r = Y("tab"), i = cr(void 0, n ?? r.Tab.motion?.enter ?? "fadeUp", r.Tab.motion?.enter ?? "fadeUp");
|
|
12598
12614
|
return /* @__PURE__ */ t.createElement("div", {
|
|
12599
12615
|
style: i,
|
|
12600
|
-
className:
|
|
12616
|
+
className: Kd()
|
|
12601
12617
|
}, e);
|
|
12602
|
-
},
|
|
12618
|
+
}, Xd = ({ children: e, defaultIndex: r = 0, onChange: i, layout: a = "default", menuClassName: o = void 0, contentClassName: s = void 0, before: c = void 0, after: l = void 0, wrapperClassName: u = void 0, className: d = void 0, motion: f = void 0 }) => {
|
|
12603
12619
|
let [m, g] = h(r), _ = (e) => {
|
|
12604
12620
|
g(e), i?.(e);
|
|
12605
|
-
}, v = n.toArray(e).filter((e) => t.isValidElement(e) && e.type ===
|
|
12621
|
+
}, v = n.toArray(e).filter((e) => t.isValidElement(e) && e.type === Jd), y = p(() => Wd(a), [a]), b = qd[a], x = Y("tab");
|
|
12606
12622
|
return /* @__PURE__ */ t.createElement(Z, { className: X(x.Tab.wrapperClassName, u) }, c, /* @__PURE__ */ t.createElement("div", { className: X("min-w-0", x.Tab.className, d) }, /* @__PURE__ */ t.createElement(b, {
|
|
12607
12623
|
menuClassName: o,
|
|
12608
12624
|
contentClassName: s,
|
|
@@ -12614,9 +12630,9 @@ var Jd = {
|
|
|
12614
12630
|
role: "tab",
|
|
12615
12631
|
"aria-selected": n === m,
|
|
12616
12632
|
onClick: () => _(n),
|
|
12617
|
-
className:
|
|
12633
|
+
className: Gd(a, n === m)
|
|
12618
12634
|
}, e.props.label))),
|
|
12619
|
-
content: /* @__PURE__ */ t.createElement(
|
|
12635
|
+
content: /* @__PURE__ */ t.createElement(Yd, {
|
|
12620
12636
|
key: m,
|
|
12621
12637
|
motion: f
|
|
12622
12638
|
}, v[m]?.props?.children)
|
|
@@ -12624,7 +12640,7 @@ var Jd = {
|
|
|
12624
12640
|
};
|
|
12625
12641
|
//#endregion
|
|
12626
12642
|
//#region src/components/ui/useRecordSelection.ts
|
|
12627
|
-
function
|
|
12643
|
+
function Zd({ records: e, selectedKeys: t, onSelectionChange: n, getRecordKey: r }) {
|
|
12628
12644
|
let i = t, a = i !== void 0 && !!n, [o, c] = h(i ?? []);
|
|
12629
12645
|
l(() => {
|
|
12630
12646
|
i !== void 0 && !a && c(i);
|
|
@@ -12666,7 +12682,7 @@ function Qd({ records: e, selectedKeys: t, onSelectionChange: n, getRecordKey: r
|
|
|
12666
12682
|
}
|
|
12667
12683
|
//#endregion
|
|
12668
12684
|
//#region src/components/ui/useStableRecordKey.ts
|
|
12669
|
-
function
|
|
12685
|
+
function Qd(e, t) {
|
|
12670
12686
|
let n = m(/* @__PURE__ */ new WeakMap()), r = m(0);
|
|
12671
12687
|
return s((i, a) => {
|
|
12672
12688
|
if (t != null) {
|
|
@@ -12682,10 +12698,10 @@ function $d(e, t) {
|
|
|
12682
12698
|
}
|
|
12683
12699
|
//#endregion
|
|
12684
12700
|
//#region src/components/ui/Table.tsx
|
|
12685
|
-
function
|
|
12701
|
+
function $d({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRowClick: i = void 0, onReorder: a = void 0, onSelectionChange: o = void 0, selection: c = "multiple", sortable: d = !1, pagination: f = void 0, activeKey: g = void 0, selectedKeys: _ = void 0, groupBy: v = void 0, recordId: y = void 0, before: b = void 0, after: x = void 0, wrapperClassName: S = void 0, className: C = void 0, headerClassName: w = void 0, bodyClassName: T = void 0, footerClassName: A = void 0, heightClassName: j = void 0, scrollClassName: M = void 0, selectedClassName: N = void 0, renderCell: P = void 0 }) {
|
|
12686
12702
|
let F = Y("table"), I = Fn("table"), L = N || F.Table.selectedClassName, [R, z] = h(n || []), B = p(() => {
|
|
12687
12703
|
if (!(!d || typeof d == "boolean")) return d;
|
|
12688
|
-
}, [typeof d == "object" ? d?.dir : void 0, typeof d == "object" ? d?.field : void 0]), V = d !== !1, [H, U] = h(B), [W, ee] = h(null), [G,
|
|
12704
|
+
}, [typeof d == "object" ? d?.dir : void 0, typeof d == "object" ? d?.field : void 0]), V = d !== !1, [H, U] = h(B), [W, ee] = h(null), [G, te] = h(null), [ne, re] = h(null), [K, ie] = h(null), [ae, oe] = h(null), se = m(!1), ce = s((e) => {
|
|
12689
12705
|
e && ee(e);
|
|
12690
12706
|
}, []), le = u(), ue = !!a, de = V || !!zs.normalize(B), fe = ue && de, q = !fe && V, pe = fe ? void 0 : B;
|
|
12691
12707
|
l(() => {
|
|
@@ -12695,7 +12711,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12695
12711
|
}, [pe?.field, pe?.dir]), l(() => {
|
|
12696
12712
|
!fe || se.current || (console.warn("Table: `onReorder` cannot be combined with sortable sorting on the same view. Manual reorder takes precedence and sorting is ignored."), se.current = !0);
|
|
12697
12713
|
}, [fe]);
|
|
12698
|
-
let me =
|
|
12714
|
+
let me = Qd("row", y), he = s((e, t) => me(e, t), [me]), { activeSelectedKeys: ge, selectionState: _e, showSelection: ve, updateSelection: ye } = Zd({
|
|
12699
12715
|
records: R,
|
|
12700
12716
|
selectedKeys: _,
|
|
12701
12717
|
onSelectionChange: o,
|
|
@@ -12754,8 +12770,8 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12754
12770
|
]), Te = s((e, t) => {
|
|
12755
12771
|
if (!G) return;
|
|
12756
12772
|
let n = be.findIndex((e, t) => he(e, t) === G), r = be.findIndex((n, r) => he(n, r) === he(e, t));
|
|
12757
|
-
|
|
12758
|
-
let i =
|
|
12773
|
+
re(null), te(null);
|
|
12774
|
+
let i = K?.position || "after";
|
|
12759
12775
|
if (ie(null), n < 0 || r < 0 || n === r) return;
|
|
12760
12776
|
let o = [...be], [s] = o.splice(n, 1), c = n < r ? r + (i === "after" ? 0 : -1) : r + +(i === "after");
|
|
12761
12777
|
o.splice(c, 0, s), U(void 0), z(o), a?.(o, {
|
|
@@ -12765,7 +12781,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12765
12781
|
});
|
|
12766
12782
|
}, [
|
|
12767
12783
|
G,
|
|
12768
|
-
|
|
12784
|
+
K?.position,
|
|
12769
12785
|
he,
|
|
12770
12786
|
a,
|
|
12771
12787
|
be
|
|
@@ -12780,10 +12796,10 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12780
12796
|
F.Table.scrollClassName,
|
|
12781
12797
|
j ? `${j} overflow-auto` : "",
|
|
12782
12798
|
M || ""
|
|
12783
|
-
].filter(Boolean).join(" "), Oe = !!j, ke = Ee.length + +!!ve + +!!ue, Ae = Oe ? "sticky top-0 z-10 bg-card" : "", je = (e, n, r, i) => !
|
|
12799
|
+
].filter(Boolean).join(" "), Oe = !!j, ke = Ee.length + +!!ve + +!!ue, Ae = Oe ? "sticky top-0 z-10 bg-card" : "", je = (e, n, r, i) => !K || K.key !== e || K.position !== n ? null : /* @__PURE__ */ t.createElement("tr", {
|
|
12784
12800
|
"aria-hidden": "true",
|
|
12785
12801
|
onDragOver: (t) => {
|
|
12786
|
-
ue && (t.preventDefault(),
|
|
12802
|
+
ue && (t.preventDefault(), ne !== e && re(e), ie({
|
|
12787
12803
|
key: e,
|
|
12788
12804
|
position: n
|
|
12789
12805
|
}));
|
|
@@ -12847,7 +12863,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12847
12863
|
width: "1%",
|
|
12848
12864
|
whiteSpace: "nowrap"
|
|
12849
12865
|
}
|
|
12850
|
-
}))), Ne = /* @__PURE__ */ t.createElement(
|
|
12866
|
+
}))), Ne = /* @__PURE__ */ t.createElement(Gp, {
|
|
12851
12867
|
records: be,
|
|
12852
12868
|
appendTo: W,
|
|
12853
12869
|
wrapperClassName: "px-3 pt-4 pb-2",
|
|
@@ -12857,7 +12873,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12857
12873
|
return e.map((e, o) => {
|
|
12858
12874
|
let s = n + o, l = he(e, s), u = r ? r.map((t) => String(e[t] ?? "")).join(" · ") : void 0, d = u !== void 0 && u !== a;
|
|
12859
12875
|
a = u;
|
|
12860
|
-
let f = ge.includes(l), p =
|
|
12876
|
+
let f = ge.includes(l), p = ne === l, m = G === l, h = L && (g === void 0 ? ae : g) === l;
|
|
12861
12877
|
return /* @__PURE__ */ t.createElement(t.Fragment, { key: l }, d && /* @__PURE__ */ t.createElement("tr", { "aria-hidden": "true" }, /* @__PURE__ */ t.createElement("td", {
|
|
12862
12878
|
colSpan: ke,
|
|
12863
12879
|
className: "bg-muted/40 px-3 py-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground"
|
|
@@ -12876,22 +12892,22 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12876
12892
|
i && xe(t, e, s);
|
|
12877
12893
|
},
|
|
12878
12894
|
onDragStart: () => {
|
|
12879
|
-
|
|
12895
|
+
te(l);
|
|
12880
12896
|
},
|
|
12881
12897
|
onDragOver: (e) => {
|
|
12882
12898
|
if (!ue) return;
|
|
12883
12899
|
e.preventDefault();
|
|
12884
12900
|
let t = e.currentTarget.getBoundingClientRect(), n = e.clientY < t.top + t.height / 2 ? "before" : "after";
|
|
12885
|
-
|
|
12901
|
+
ne !== l && re(l), G !== l && ie((e) => e?.key === l && e.position === n ? e : {
|
|
12886
12902
|
key: l,
|
|
12887
12903
|
position: n
|
|
12888
12904
|
});
|
|
12889
12905
|
},
|
|
12890
12906
|
onDragLeave: () => {
|
|
12891
|
-
|
|
12907
|
+
ne === l && re(null);
|
|
12892
12908
|
},
|
|
12893
12909
|
onDragEnd: () => {
|
|
12894
|
-
|
|
12910
|
+
te(null), re(null), ie(null);
|
|
12895
12911
|
},
|
|
12896
12912
|
onDrop: (t) => {
|
|
12897
12913
|
ue && (t.preventDefault(), Te(e, s));
|
|
@@ -12930,10 +12946,10 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12930
12946
|
"aria-label": Dn(I.reorderRow, { key: l }),
|
|
12931
12947
|
onClick: (e) => e.preventDefault(),
|
|
12932
12948
|
onDragStart: (e) => {
|
|
12933
|
-
e.stopPropagation(),
|
|
12949
|
+
e.stopPropagation(), te(l);
|
|
12934
12950
|
},
|
|
12935
12951
|
onDragEnd: (e) => {
|
|
12936
|
-
e.stopPropagation(),
|
|
12952
|
+
e.stopPropagation(), te(null), re(null), ie(null);
|
|
12937
12953
|
}
|
|
12938
12954
|
}, /* @__PURE__ */ t.createElement(k, { size: 14 }))), Ee.map((n) => /* @__PURE__ */ t.createElement("td", {
|
|
12939
12955
|
key: n.key,
|
|
@@ -12948,36 +12964,36 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12948
12964
|
}
|
|
12949
12965
|
//#endregion
|
|
12950
12966
|
//#region src/components/ui/LayoutBuilder.tsx
|
|
12951
|
-
var
|
|
12967
|
+
var ef = 12, tf = 12, nf = (e, t, n) => Math.max(t, Math.min(n, e)), rf = (e) => {
|
|
12952
12968
|
if (!e) return "";
|
|
12953
12969
|
let t = e.trim().replace(/^\{/, "").replace(/\}$/, "").trim(), n = t.split(".");
|
|
12954
12970
|
return (n[n.length - 1] || t).trim();
|
|
12955
|
-
},
|
|
12956
|
-
let n = e - t.left, r = t.width /
|
|
12957
|
-
return
|
|
12958
|
-
},
|
|
12971
|
+
}, af = (e, t) => {
|
|
12972
|
+
let n = e - t.left, r = t.width / ef;
|
|
12973
|
+
return nf(Math.floor(n / r), 0, ef - 1);
|
|
12974
|
+
}, of = () => `${Date.now()}_${Math.random().toString(16).slice(2)}`, sf = (e, t, n) => {
|
|
12959
12975
|
let r = (e) => {
|
|
12960
12976
|
let r = e + t;
|
|
12961
|
-
return r >
|
|
12977
|
+
return r > ef ? !1 : !n.some((t) => {
|
|
12962
12978
|
let n = e, i = r, a = t.colStart;
|
|
12963
12979
|
return n < t.colStart + t.colSpan && a < i;
|
|
12964
12980
|
});
|
|
12965
12981
|
};
|
|
12966
|
-
for (let n = e; n <=
|
|
12967
|
-
for (let e = 0; e <=
|
|
12982
|
+
for (let n = e; n <= ef - t; n++) if (r(n)) return n;
|
|
12983
|
+
for (let e = 0; e <= ef - t; e++) if (r(e)) return e;
|
|
12968
12984
|
return null;
|
|
12969
|
-
},
|
|
12985
|
+
}, cf = (e, t, n) => {
|
|
12970
12986
|
let r = e.find((e) => e.id === t);
|
|
12971
12987
|
if (!r) return e;
|
|
12972
|
-
let i = e.filter((e) => e.id !== t), a =
|
|
12988
|
+
let i = e.filter((e) => e.id !== t), a = sf(nf(n, 0, ef - r.colSpan), r.colSpan, i);
|
|
12973
12989
|
return a === null ? e : e.map((e) => e.id === t ? {
|
|
12974
12990
|
...e,
|
|
12975
12991
|
colStart: a
|
|
12976
12992
|
} : e);
|
|
12977
|
-
},
|
|
12993
|
+
}, lf = (e, t, n) => {
|
|
12978
12994
|
let r = e.find((e) => e.id === t);
|
|
12979
12995
|
if (!r) return e;
|
|
12980
|
-
let i = e.filter((e) => e.id !== t), a =
|
|
12996
|
+
let i = e.filter((e) => e.id !== t), a = nf(n, 1, ef - r.colStart), o = (e) => {
|
|
12981
12997
|
let t = r.colStart, n = r.colStart + e;
|
|
12982
12998
|
return i.some((e) => {
|
|
12983
12999
|
let r = e.colStart, i = e.colStart + e.colSpan;
|
|
@@ -12989,7 +13005,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
12989
13005
|
...e,
|
|
12990
13006
|
colSpan: a
|
|
12991
13007
|
} : e);
|
|
12992
|
-
},
|
|
13008
|
+
}, uf = (e, t, n) => {
|
|
12993
13009
|
if (n <= 0) return null;
|
|
12994
13010
|
let r = e.map((e) => {
|
|
12995
13011
|
let n = e.colStart + e.colSpan / 2;
|
|
@@ -13001,7 +13017,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13001
13017
|
for (let t of r) {
|
|
13002
13018
|
if (t.colSpan - 1 < n) continue;
|
|
13003
13019
|
let r = t.colSpan - n, i = t.colStart + r;
|
|
13004
|
-
if (!(i < 0 || i + n >
|
|
13020
|
+
if (!(i < 0 || i + n > ef)) return {
|
|
13005
13021
|
nextItems: e.map((e) => e.id === t.id ? {
|
|
13006
13022
|
...e,
|
|
13007
13023
|
colSpan: r
|
|
@@ -13010,7 +13026,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13010
13026
|
};
|
|
13011
13027
|
}
|
|
13012
13028
|
return null;
|
|
13013
|
-
},
|
|
13029
|
+
}, df = o(({ name: e, defaultSpan: n = 1, heightPx: r = 100 }, i) => {
|
|
13014
13030
|
let a = m(null), o = Fn("layout"), { value: s, handleChange: c } = Dd({
|
|
13015
13031
|
name: e,
|
|
13016
13032
|
defaultValue: []
|
|
@@ -13030,39 +13046,39 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13030
13046
|
setValue: (e) => f(e),
|
|
13031
13047
|
clear: () => f([])
|
|
13032
13048
|
}));
|
|
13033
|
-
let w = p(() => Array.from({ length:
|
|
13049
|
+
let w = p(() => Array.from({ length: ef }, (e, t) => t), []), T = (e) => {
|
|
13034
13050
|
e.preventDefault();
|
|
13035
13051
|
}, E = (e) => {
|
|
13036
13052
|
if (e.preventDefault(), e.dataTransfer.getData("application/x-layoutbuilder-internal")) {
|
|
13037
13053
|
_(null);
|
|
13038
13054
|
return;
|
|
13039
13055
|
}
|
|
13040
|
-
if (u.length >=
|
|
13056
|
+
if (u.length >= tf) {
|
|
13041
13057
|
C(o.maxElements);
|
|
13042
13058
|
return;
|
|
13043
13059
|
}
|
|
13044
13060
|
let t = a.current;
|
|
13045
13061
|
if (!t) return;
|
|
13046
|
-
let r = t.getBoundingClientRect(), i =
|
|
13062
|
+
let r = t.getBoundingClientRect(), i = af(e.clientX, r), s = rf(e.dataTransfer.getData("text/plain") || e.dataTransfer.getData("label") || "") || "unknown", c = nf(n, 1, ef), l = sf(nf(i, 0, ef - c), c, u);
|
|
13047
13063
|
if (l !== null) {
|
|
13048
13064
|
f((e) => [...e, {
|
|
13049
|
-
id:
|
|
13065
|
+
id: of(),
|
|
13050
13066
|
fieldName: s,
|
|
13051
13067
|
colStart: l,
|
|
13052
13068
|
colSpan: c
|
|
13053
13069
|
}]);
|
|
13054
13070
|
return;
|
|
13055
13071
|
}
|
|
13056
|
-
if (!
|
|
13072
|
+
if (!uf(u, i, c)) {
|
|
13057
13073
|
C(o.noSpace);
|
|
13058
13074
|
return;
|
|
13059
13075
|
}
|
|
13060
13076
|
f((e) => {
|
|
13061
|
-
if (e.length >=
|
|
13062
|
-
let t =
|
|
13077
|
+
if (e.length >= tf) return C(o.maxElements), e;
|
|
13078
|
+
let t = uf(e, i, c);
|
|
13063
13079
|
if (!t) return C(o.noSpace), e;
|
|
13064
13080
|
let n = {
|
|
13065
|
-
id:
|
|
13081
|
+
id: of(),
|
|
13066
13082
|
fieldName: s,
|
|
13067
13083
|
colStart: t.insertCol,
|
|
13068
13084
|
colSpan: c
|
|
@@ -13075,8 +13091,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13075
13091
|
if (e.preventDefault(), !g) return;
|
|
13076
13092
|
let t = a.current;
|
|
13077
13093
|
if (!t) return;
|
|
13078
|
-
let n = t.getBoundingClientRect(), r =
|
|
13079
|
-
f((e) =>
|
|
13094
|
+
let n = t.getBoundingClientRect(), r = af(e.clientX, n);
|
|
13095
|
+
f((e) => cf(e, g, r));
|
|
13080
13096
|
}, k = () => _(null), A = (e) => (t) => {
|
|
13081
13097
|
t.stopPropagation(), t.preventDefault();
|
|
13082
13098
|
let n = u.find((t) => t.id === e);
|
|
@@ -13089,8 +13105,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13089
13105
|
if (!v) return;
|
|
13090
13106
|
let t = a.current;
|
|
13091
13107
|
if (!t) return;
|
|
13092
|
-
let n = t.getBoundingClientRect().width /
|
|
13093
|
-
f((e) =>
|
|
13108
|
+
let n = t.getBoundingClientRect().width / ef, r = e.clientX - v.startClientX, i = Math.round(r / n), o = v.startSpan + i;
|
|
13109
|
+
f((e) => lf(e, v.id, o));
|
|
13094
13110
|
}, M = () => {
|
|
13095
13111
|
v && y(null);
|
|
13096
13112
|
}, N = (e) => f((t) => t.filter((t) => t.id !== e));
|
|
@@ -13127,7 +13143,7 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13127
13143
|
position: "absolute",
|
|
13128
13144
|
top: 0,
|
|
13129
13145
|
bottom: 0,
|
|
13130
|
-
left: `${e /
|
|
13146
|
+
left: `${e / ef * 100}%`,
|
|
13131
13147
|
width: 1,
|
|
13132
13148
|
background: "rgba(255, 255, 255, 0.06)",
|
|
13133
13149
|
pointerEvents: "none"
|
|
@@ -13140,8 +13156,8 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13140
13156
|
position: "absolute",
|
|
13141
13157
|
top: 12,
|
|
13142
13158
|
bottom: 12,
|
|
13143
|
-
left: `${e.colStart /
|
|
13144
|
-
width: `${e.colSpan /
|
|
13159
|
+
left: `${e.colStart / ef * 100}%`,
|
|
13160
|
+
width: `${e.colSpan / ef * 100}%`,
|
|
13145
13161
|
padding: 10,
|
|
13146
13162
|
borderRadius: 12,
|
|
13147
13163
|
border: "1px solid rgba(255, 255, 255, 0.18)",
|
|
@@ -13193,25 +13209,25 @@ var tf = 12, nf = 12, rf = (e, t, n) => Math.max(t, Math.min(n, e)), af = (e) =>
|
|
|
13193
13209
|
justifyContent: "center",
|
|
13194
13210
|
pointerEvents: "none"
|
|
13195
13211
|
} }, o.dragHere)));
|
|
13196
|
-
}),
|
|
13197
|
-
function
|
|
13198
|
-
return /* @__PURE__ */ t.createElement(
|
|
13212
|
+
}), ff = a(void 0);
|
|
13213
|
+
function pf({ config: e, children: n }) {
|
|
13214
|
+
return /* @__PURE__ */ t.createElement(ff.Provider, { value: e }, n);
|
|
13199
13215
|
}
|
|
13200
|
-
function
|
|
13201
|
-
return c(
|
|
13216
|
+
function mf() {
|
|
13217
|
+
return c(ff);
|
|
13202
13218
|
}
|
|
13203
13219
|
//#endregion
|
|
13204
13220
|
//#region src/providers/googleMaps/loadGoogleMaps.ts
|
|
13205
|
-
var
|
|
13206
|
-
function
|
|
13221
|
+
var hf, gf;
|
|
13222
|
+
function _f(e) {
|
|
13207
13223
|
if (typeof window > "u") return Promise.reject(/* @__PURE__ */ Error("loadGoogleMaps can only run in the browser"));
|
|
13208
13224
|
if (!e.apiKey) return Promise.reject(/* @__PURE__ */ Error("GoogleMapsConfig.apiKey is required"));
|
|
13209
|
-
if (
|
|
13225
|
+
if (gf !== void 0 && gf !== e.apiKey) return Promise.reject(/* @__PURE__ */ Error("loadGoogleMaps was already initialized with a different apiKey"));
|
|
13210
13226
|
if (window.google?.maps?.places) return Promise.resolve(window.google);
|
|
13211
|
-
if (
|
|
13212
|
-
|
|
13227
|
+
if (hf) return hf;
|
|
13228
|
+
gf = e.apiKey;
|
|
13213
13229
|
let t = `__googleMapsLoader_${Math.random().toString(36).slice(2)}`;
|
|
13214
|
-
return
|
|
13230
|
+
return hf = new Promise((n, r) => {
|
|
13215
13231
|
window[t] = () => {
|
|
13216
13232
|
delete window[t], window.google?.maps?.places ? n(window.google) : r(/* @__PURE__ */ Error("Google Maps script loaded but the places library is unavailable"));
|
|
13217
13233
|
};
|
|
@@ -13224,54 +13240,54 @@ function vf(e) {
|
|
|
13224
13240
|
...e.language ? { language: e.language } : {},
|
|
13225
13241
|
...e.region ? { region: e.region } : {}
|
|
13226
13242
|
}).toString()}`, i.async = !0, i.onerror = () => r(/* @__PURE__ */ Error("Failed to load the Google Maps script")), document.head.appendChild(i);
|
|
13227
|
-
}),
|
|
13243
|
+
}), hf;
|
|
13228
13244
|
}
|
|
13229
13245
|
//#endregion
|
|
13230
13246
|
//#region src/components/ui/fields/AddressAutocomplete.tsx
|
|
13231
|
-
var
|
|
13247
|
+
var vf = {
|
|
13232
13248
|
lat: 41.8719,
|
|
13233
13249
|
lng: 12.5674
|
|
13234
|
-
},
|
|
13235
|
-
function
|
|
13250
|
+
}, yf = 5;
|
|
13251
|
+
function bf(e) {
|
|
13236
13252
|
return (e ?? []).map((e) => ({
|
|
13237
13253
|
longText: e.longText ?? "",
|
|
13238
13254
|
shortText: e.shortText ?? e.longText ?? "",
|
|
13239
13255
|
types: e.types
|
|
13240
13256
|
}));
|
|
13241
13257
|
}
|
|
13242
|
-
function
|
|
13258
|
+
function xf(e) {
|
|
13243
13259
|
return e.map((e) => ({
|
|
13244
13260
|
longText: e.long_name,
|
|
13245
13261
|
shortText: e.short_name,
|
|
13246
13262
|
types: e.types
|
|
13247
13263
|
}));
|
|
13248
13264
|
}
|
|
13249
|
-
function
|
|
13265
|
+
function Sf(e, t, n = !0) {
|
|
13250
13266
|
let r = e.find((e) => e.types.includes(t));
|
|
13251
13267
|
if (r) return (n ? r.longText : r.shortText) || void 0;
|
|
13252
13268
|
}
|
|
13253
|
-
function
|
|
13254
|
-
let i =
|
|
13269
|
+
function Cf(e, t, n, r) {
|
|
13270
|
+
let i = Sf(e, "street_number"), a = Sf(e, "route");
|
|
13255
13271
|
return {
|
|
13256
13272
|
street: [a, i].filter(Boolean).join(", ") || a || void 0,
|
|
13257
|
-
city:
|
|
13258
|
-
state:
|
|
13259
|
-
zip:
|
|
13260
|
-
country:
|
|
13261
|
-
countryCode:
|
|
13273
|
+
city: Sf(e, "locality") ?? Sf(e, "postal_town") ?? Sf(e, "sublocality"),
|
|
13274
|
+
state: Sf(e, "administrative_area_level_2", !1) ?? Sf(e, "administrative_area_level_1", !1),
|
|
13275
|
+
zip: Sf(e, "postal_code"),
|
|
13276
|
+
country: Sf(e, "country"),
|
|
13277
|
+
countryCode: Sf(e, "country", !1),
|
|
13262
13278
|
lat: t,
|
|
13263
13279
|
lng: n,
|
|
13264
13280
|
formatted: r
|
|
13265
13281
|
};
|
|
13266
13282
|
}
|
|
13267
|
-
function
|
|
13268
|
-
return
|
|
13283
|
+
function wf(e) {
|
|
13284
|
+
return Cf(bf(e.addressComponents), e.location?.lat(), e.location?.lng(), e.formattedAddress ?? void 0);
|
|
13269
13285
|
}
|
|
13270
|
-
function
|
|
13271
|
-
return
|
|
13286
|
+
function Tf(e) {
|
|
13287
|
+
return Cf(xf(e.address_components), e.geometry.location.lat(), e.geometry.location.lng(), e.formatted_address);
|
|
13272
13288
|
}
|
|
13273
|
-
var
|
|
13274
|
-
let E = Fn("addressAutocomplete"), D = Y("addressAutocomplete"), O =
|
|
13289
|
+
var Ef = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void 0, disabled: a = !1, feedback: o = void 0, countries: s = void 0, language: c = void 0, region: d = void 0, validator: f = void 0, onSelect: p = void 0, fieldNames: g = void 0, map: _ = !1, id: v = void 0, labelClassName: y = void 0, inheritWrapperClassName: b = !0, wrapperClassName: x = void 0, className: S = void 0, menuClassName: C = void 0, itemClassName: w = void 0, mapClassName: T = void 0 }) => {
|
|
13290
|
+
let E = Fn("addressAutocomplete"), D = Y("addressAutocomplete"), O = mf(), k = {
|
|
13275
13291
|
street: g?.street ?? `${e}.street`,
|
|
13276
13292
|
city: g?.city ?? `${e}.city`,
|
|
13277
13293
|
state: g?.state ?? `${e}.state`,
|
|
@@ -13290,9 +13306,9 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13290
13306
|
required: r,
|
|
13291
13307
|
label: n,
|
|
13292
13308
|
validator: f
|
|
13293
|
-
}), V = u(), H = v ?? V, U = typeof _ == "object" ? _ : {}, W = !!_, ee = U.position ?? "below", G = U.defaultZoom ?? 15,
|
|
13309
|
+
}), V = u(), H = v ?? V, U = typeof _ == "object" ? _ : {}, W = !!_, ee = U.position ?? "below", G = U.defaultZoom ?? 15, te = U.height ?? 240, [ne, re] = h(typeof A.value == "string" ? A.value : ""), [K, ie] = h([]), [ae, oe] = h(!1), [se, ce] = h(!1), [le, ue] = h(null), de = m(void 0), fe = m(0), q = m(null), pe = m(null), me = m(void 0), he = m(void 0), ge = m(void 0), _e = m(void 0), ve = m(!1);
|
|
13294
13310
|
l(() => {
|
|
13295
|
-
typeof A.value == "string" && A.value !==
|
|
13311
|
+
typeof A.value == "string" && A.value !== ne && re(A.value);
|
|
13296
13312
|
}, [A.value]), l(() => {
|
|
13297
13313
|
if (!ae) return;
|
|
13298
13314
|
let e = (e) => {
|
|
@@ -13301,7 +13317,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13301
13317
|
return window.document.addEventListener("pointerdown", e), () => window.document.removeEventListener("pointerdown", e);
|
|
13302
13318
|
}, [ae]), l(() => {
|
|
13303
13319
|
if (!O) return;
|
|
13304
|
-
let e = ++fe.current, t =
|
|
13320
|
+
let e = ++fe.current, t = ne.trim();
|
|
13305
13321
|
if (t.length < 3) {
|
|
13306
13322
|
ie([]), ce(!1);
|
|
13307
13323
|
return;
|
|
@@ -13310,7 +13326,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13310
13326
|
let n = window.setTimeout(() => {
|
|
13311
13327
|
(async () => {
|
|
13312
13328
|
try {
|
|
13313
|
-
let n = await
|
|
13329
|
+
let n = await _f({
|
|
13314
13330
|
apiKey: O.apiKey,
|
|
13315
13331
|
language: c ?? O.language,
|
|
13316
13332
|
region: d ?? O.region
|
|
@@ -13339,11 +13355,11 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13339
13355
|
})();
|
|
13340
13356
|
}, 250);
|
|
13341
13357
|
return () => window.clearTimeout(n);
|
|
13342
|
-
}, [
|
|
13358
|
+
}, [ne, O]);
|
|
13343
13359
|
let ye = (e, t) => {
|
|
13344
13360
|
ve.current = !0;
|
|
13345
|
-
let n = e.formatted ??
|
|
13346
|
-
|
|
13361
|
+
let n = e.formatted ?? ne;
|
|
13362
|
+
re(n), A.handleChange({ target: {
|
|
13347
13363
|
name: k.formatted,
|
|
13348
13364
|
value: n
|
|
13349
13365
|
} }), e.street !== void 0 && j.handleChange({ target: {
|
|
@@ -13390,7 +13406,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13390
13406
|
if (!_e.current) return;
|
|
13391
13407
|
let t = (await _e.current.geocode({ location: e })).results[0];
|
|
13392
13408
|
if (!t) return;
|
|
13393
|
-
ye(
|
|
13409
|
+
ye(Tf(t)), ue(null);
|
|
13394
13410
|
} catch (e) {
|
|
13395
13411
|
ue(e instanceof Error ? e.message : E.loadError);
|
|
13396
13412
|
}
|
|
@@ -13412,7 +13428,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13412
13428
|
let t = e.join(", "), n = window.setTimeout(() => {
|
|
13413
13429
|
(async () => {
|
|
13414
13430
|
try {
|
|
13415
|
-
let e = await
|
|
13431
|
+
let e = await _f({
|
|
13416
13432
|
apiKey: O.apiKey,
|
|
13417
13433
|
language: c ?? O.language,
|
|
13418
13434
|
region: d ?? O.region
|
|
@@ -13423,8 +13439,8 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13423
13439
|
region: d ?? O.region
|
|
13424
13440
|
})).results[0];
|
|
13425
13441
|
if (!n) return;
|
|
13426
|
-
let r =
|
|
13427
|
-
if (
|
|
13442
|
+
let r = Tf(n), i = r.formatted ?? t;
|
|
13443
|
+
if (re(i), A.handleChange({ target: {
|
|
13428
13444
|
name: k.formatted,
|
|
13429
13445
|
value: i
|
|
13430
13446
|
} }), r.lat !== void 0 && L.handleChange({ target: {
|
|
@@ -13454,7 +13470,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13454
13470
|
]), l(() => {
|
|
13455
13471
|
if (!W || !O || !pe.current || he.current) return;
|
|
13456
13472
|
let e = !1;
|
|
13457
|
-
return
|
|
13473
|
+
return _f({
|
|
13458
13474
|
apiKey: O.apiKey,
|
|
13459
13475
|
language: c ?? O.language,
|
|
13460
13476
|
region: d ?? O.region
|
|
@@ -13464,7 +13480,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13464
13480
|
let n = typeof L.value == "number" && typeof R.value == "number", r = n ? {
|
|
13465
13481
|
lat: L.value,
|
|
13466
13482
|
lng: R.value
|
|
13467
|
-
} :
|
|
13483
|
+
} : vf, i = typeof z.value == "number" ? z.value : n ? G : yf, a = new t.maps.Map(pe.current, {
|
|
13468
13484
|
center: r,
|
|
13469
13485
|
zoom: i,
|
|
13470
13486
|
streetViewControl: !1,
|
|
@@ -13499,7 +13515,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13499
13515
|
"location",
|
|
13500
13516
|
"formattedAddress"
|
|
13501
13517
|
] });
|
|
13502
|
-
let n =
|
|
13518
|
+
let n = wf(t);
|
|
13503
13519
|
ye(n, W ? G : void 0);
|
|
13504
13520
|
let r = me.current;
|
|
13505
13521
|
if (W && r && he.current && n.lat !== void 0 && n.lng !== void 0) {
|
|
@@ -13526,7 +13542,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13526
13542
|
let we = W ? /* @__PURE__ */ t.createElement("div", {
|
|
13527
13543
|
ref: pe,
|
|
13528
13544
|
className: X("mt-2 w-full overflow-hidden rounded-md border", T),
|
|
13529
|
-
style: { height:
|
|
13545
|
+
style: { height: te }
|
|
13530
13546
|
}) : null;
|
|
13531
13547
|
return /* @__PURE__ */ t.createElement(Z, { className: A.formWrapClass || D.AddressAutocomplete.wrapperClassName }, n && /* @__PURE__ */ t.createElement(Ns, {
|
|
13532
13548
|
label: n,
|
|
@@ -13547,16 +13563,16 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13547
13563
|
placeholder: i ?? E.placeholder,
|
|
13548
13564
|
required: r,
|
|
13549
13565
|
disabled: a,
|
|
13550
|
-
value:
|
|
13566
|
+
value: ne,
|
|
13551
13567
|
onChange: (e) => {
|
|
13552
|
-
|
|
13568
|
+
re(e.target.value), oe(!0);
|
|
13553
13569
|
},
|
|
13554
13570
|
onFocus: () => oe(!0)
|
|
13555
13571
|
}), /* @__PURE__ */ t.createElement("span", { className: "pointer-events-none absolute inset-y-0 right-2 flex items-center text-muted-foreground" }, /* @__PURE__ */ t.createElement(Q, {
|
|
13556
13572
|
name: se ? "loader-circle" : "map-pin",
|
|
13557
13573
|
size: 15,
|
|
13558
13574
|
className: se ? "animate-spin" : void 0
|
|
13559
|
-
})), ae &&
|
|
13575
|
+
})), ae && ne.trim().length >= 3 && /* @__PURE__ */ t.createElement("div", { className: X("absolute z-50 mt-1 max-h-64 w-full overflow-y-auto rounded-md border p-1 text-sm shadow-lg", C || D.AddressAutocomplete.menuClassName) }, le ? /* @__PURE__ */ t.createElement("div", { className: "px-2 py-3 text-center text-destructive" }, le) : se && K.length === 0 ? /* @__PURE__ */ t.createElement("div", { className: "px-2 py-3 text-center text-muted-foreground" }, E.searching) : K.length === 0 ? /* @__PURE__ */ t.createElement("div", { className: "px-2 py-3 text-center text-muted-foreground" }, E.noResults) : K.map((e) => /* @__PURE__ */ t.createElement("button", {
|
|
13560
13576
|
key: e.id,
|
|
13561
13577
|
type: "button",
|
|
13562
13578
|
className: X("flex w-full items-start gap-2 rounded-sm px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground", w || D.AddressAutocomplete.itemClassName),
|
|
@@ -13568,7 +13584,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13568
13584
|
size: 14,
|
|
13569
13585
|
className: "mt-0.5 shrink-0 text-muted-foreground"
|
|
13570
13586
|
}), /* @__PURE__ */ t.createElement("span", { className: "min-w-0 truncate" }, e.text))))), ee === "below" && we, B ? /* @__PURE__ */ t.createElement(hs, { message: B }) : o && /* @__PURE__ */ t.createElement("div", { className: "mt-1 text-xs text-muted-foreground" }, o));
|
|
13571
|
-
},
|
|
13587
|
+
}, Df = ({ name: e, onDataLoaded: n, onClear: r = void 0, onParseField: i = void 0, label: a = void 0, icon: o = "upload", delimiter: s = void 0, normalizeKeys: c = !1, removeEmptyFields: l = !1, required: u = !1, before: d = void 0, after: f = void 0, wrapperClassName: p = void 0, className: g = void 0 }) => {
|
|
13572
13588
|
let _ = Fn("upload"), [v, y] = h(null), [b, x] = h(!1), [S, C] = h(null), w = m(null), T = ([e, t]) => {
|
|
13573
13589
|
if (![
|
|
13574
13590
|
"",
|
|
@@ -13653,14 +13669,14 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13653
13669
|
};
|
|
13654
13670
|
//#endregion
|
|
13655
13671
|
//#region src/components/blocks/ListCard.tsx
|
|
13656
|
-
function
|
|
13672
|
+
function Of(e) {
|
|
13657
13673
|
return e ? typeof e == "string" ? /* @__PURE__ */ t.createElement(Q, {
|
|
13658
13674
|
name: e,
|
|
13659
13675
|
size: 16
|
|
13660
13676
|
}) : e : null;
|
|
13661
13677
|
}
|
|
13662
|
-
function
|
|
13663
|
-
let N = Y("listCard"), P = !!l || !!g, F = sr(f || !P, j, M ?? N.ListCard.motion?.press ?? "press"), I =
|
|
13678
|
+
function kf({ title: e = void 0, description: n = void 0, meta: r = void 0, badge: i = void 0, icon: a = void 0, trailing: o = void 0, footer: s = void 0, children: c = void 0, href: l = void 0, external: u = !1, active: d = !1, disabled: f = !1, dashed: p = !1, compact: m = !1, align: h = "start", onClick: g = void 0, before: _ = void 0, after: y = void 0, wrapperClassName: b = void 0, className: x = void 0, titleClassName: S = void 0, descriptionClassName: C = void 0, metaClassName: w = void 0, badgeClassName: T = void 0, leadingClassName: E = void 0, bodyClassName: D = void 0, headerClassName: O = void 0, trailingClassName: k = void 0, footerClassName: A = void 0, style: j = void 0, motion: M = void 0 }) {
|
|
13679
|
+
let N = Y("listCard"), P = !!l || !!g, F = sr(f || !P, j, M ?? N.ListCard.motion?.press ?? "press"), I = Of(a), L = s ?? c, R = X("flex w-full gap-3 rounded-xl border border-border/60 bg-background p-4 text-left transition-[background-color,border-color,box-shadow,color] duration-150", h === "center" ? "items-center" : "items-start", P && !f && "cursor-pointer", N.ListCard.className, d ? N.ListCard.activeClassName : N.ListCard.inactiveClassName, f && N.ListCard.disabledClassName, p && N.ListCard.dashedClassName, m && N.ListCard.compactClassName, x), z = /* @__PURE__ */ t.createElement(t.Fragment, null, I ? /* @__PURE__ */ t.createElement("div", { className: X("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", h === "center" && "mt-0", N.ListCard.leadingClassName, E) }, I) : null, /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1", N.ListCard.bodyClassName, D) }, e || i ? /* @__PURE__ */ t.createElement("div", { className: X("flex items-center gap-2", N.ListCard.headerClassName, O) }, e ? /* @__PURE__ */ t.createElement("div", { className: X("min-w-0 flex-1 truncate text-sm font-semibold text-foreground", N.ListCard.titleClassName, S) }, e) : /* @__PURE__ */ t.createElement("div", { className: "flex-1" }), i ? /* @__PURE__ */ t.createElement("div", { className: X("shrink-0", N.ListCard.badgeClassName, T) }, i) : null) : null, n ? /* @__PURE__ */ t.createElement("div", { className: X("mt-1 text-sm text-muted-foreground", N.ListCard.descriptionClassName, C) }, n) : null, r ? /* @__PURE__ */ t.createElement("div", { className: X("mt-1 text-xs text-muted-foreground", N.ListCard.metaClassName, w) }, r) : null, L ? /* @__PURE__ */ t.createElement("div", { className: X("mt-3", N.ListCard.footerClassName, A) }, L) : null), o ? /* @__PURE__ */ t.createElement("div", { className: X("shrink-0 self-center", N.ListCard.trailingClassName, k) }, o) : null), B = (e) => {
|
|
13664
13680
|
if (f) {
|
|
13665
13681
|
e.preventDefault(), e.stopPropagation();
|
|
13666
13682
|
return;
|
|
@@ -13696,8 +13712,8 @@ function Af({ title: e = void 0, description: n = void 0, meta: r = void 0, badg
|
|
|
13696
13712
|
}
|
|
13697
13713
|
//#endregion
|
|
13698
13714
|
//#region src/components/blocks/SideNav.tsx
|
|
13699
|
-
var
|
|
13700
|
-
function
|
|
13715
|
+
var Af = 208, jf = 52;
|
|
13716
|
+
function Mf(e) {
|
|
13701
13717
|
return e.map((e) => ({
|
|
13702
13718
|
path: e.path,
|
|
13703
13719
|
title: e.title,
|
|
@@ -13705,13 +13721,13 @@ function Nf(e) {
|
|
|
13705
13721
|
group: e.group,
|
|
13706
13722
|
end: e.end,
|
|
13707
13723
|
badge: e.badge,
|
|
13708
|
-
children: e.children ?
|
|
13724
|
+
children: e.children ? Mf(e.children) : void 0
|
|
13709
13725
|
}));
|
|
13710
13726
|
}
|
|
13711
|
-
function
|
|
13727
|
+
function Nf(e, t, n) {
|
|
13712
13728
|
return n ? e === t : e === t || t !== "/" && e.startsWith(t + "/");
|
|
13713
13729
|
}
|
|
13714
|
-
function
|
|
13730
|
+
function Pf(e) {
|
|
13715
13731
|
let t = /* @__PURE__ */ new Map();
|
|
13716
13732
|
for (let n of e) {
|
|
13717
13733
|
let e = n.group ?? "General";
|
|
@@ -13722,27 +13738,27 @@ function Ff(e) {
|
|
|
13722
13738
|
items: t
|
|
13723
13739
|
}));
|
|
13724
13740
|
}
|
|
13725
|
-
function
|
|
13741
|
+
function Ff({ value: e }) {
|
|
13726
13742
|
let n = Y("sideNav");
|
|
13727
13743
|
return /* @__PURE__ */ t.createElement("span", { className: X("ml-auto shrink-0 text-[10px] font-semibold leading-none px-1.5 py-[3px] rounded-full bg-primary/15 text-primary", n.SideNav.itemBadgeClassName) }, e);
|
|
13728
13744
|
}
|
|
13729
|
-
function
|
|
13745
|
+
function If({ children: e, open: n }) {
|
|
13730
13746
|
let { pathname: r } = x(), i = Y("sideNav");
|
|
13731
13747
|
return /* @__PURE__ */ t.createElement("div", { style: {
|
|
13732
13748
|
maxHeight: n ? `${e.length * 34 + 8}px` : "0px",
|
|
13733
13749
|
overflow: "hidden",
|
|
13734
13750
|
transition: "max-height 200ms ease"
|
|
13735
13751
|
} }, /* @__PURE__ */ t.createElement("div", { className: "py-0.5 space-y-0.5" }, e.map((e) => {
|
|
13736
|
-
let n =
|
|
13752
|
+
let n = Nf(r, e.path, e.end);
|
|
13737
13753
|
return /* @__PURE__ */ t.createElement(v, {
|
|
13738
13754
|
key: e.path,
|
|
13739
13755
|
to: e.path,
|
|
13740
13756
|
className: X("flex items-center rounded-md pl-9 pr-3 py-[6px] text-sm transition-colors", i.SideNav.subItemClassName, n ? i.SideNav.subItemActiveClassName : i.SideNav.subItemInactiveClassName)
|
|
13741
|
-
}, /* @__PURE__ */ t.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ t.createElement(
|
|
13757
|
+
}, /* @__PURE__ */ t.createElement("span", { className: "flex-1 truncate" }, e.title), e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge }));
|
|
13742
13758
|
})));
|
|
13743
13759
|
}
|
|
13744
|
-
function
|
|
13745
|
-
let { pathname: o } = x(), s = Y("sideNav"), c = (e.children?.length ?? 0) > 0, l =
|
|
13760
|
+
function Lf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
|
|
13761
|
+
let { pathname: o } = x(), s = Y("sideNav"), c = (e.children?.length ?? 0) > 0, l = Nf(o, e.path, e.end), u = c && e.children.some((e) => Nf(o, e.path, e.end)), d = l ? s.SideNav.itemActiveClassName : u ? s.SideNav.itemChildActiveClassName : s.SideNav.itemInactiveClassName, f = i ? /* @__PURE__ */ t.createElement("span", { className: X("relative shrink-0 flex items-center justify-center w-[18px] h-[18px]", s.SideNav.itemIconClassName) }, e.icon ? /* @__PURE__ */ t.createElement(Q, {
|
|
13746
13762
|
name: e.icon,
|
|
13747
13763
|
size: 17
|
|
13748
13764
|
}) : /* @__PURE__ */ t.createElement("span", { className: "w-1.5 h-1.5 rounded-full bg-current opacity-30" }), !n && e.badge !== void 0 && /* @__PURE__ */ t.createElement("span", { className: X("absolute -top-0.5 -right-1 w-[7px] h-[7px] rounded-full bg-primary ring-1 ring-background", s.SideNav.itemCollapsedBadgeClassName) })) : null, p = {
|
|
@@ -13759,7 +13775,7 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
|
|
|
13759
13775
|
}, f, /* @__PURE__ */ t.createElement("span", {
|
|
13760
13776
|
style: p,
|
|
13761
13777
|
className: s.SideNav.itemTextClassName
|
|
13762
|
-
}, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(
|
|
13778
|
+
}, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge })), n && /* @__PURE__ */ t.createElement("button", {
|
|
13763
13779
|
onClick: () => a(e.path),
|
|
13764
13780
|
className: X("shrink-0 flex items-center justify-center w-6 h-6 rounded transition-colors text-muted-foreground/50 hover:text-foreground hover:bg-accent", s.SideNav.itemToggleClassName),
|
|
13765
13781
|
title: r ? "Collapse" : "Expand"
|
|
@@ -13769,7 +13785,7 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
|
|
|
13769
13785
|
} }, /* @__PURE__ */ t.createElement(Q, {
|
|
13770
13786
|
name: "chevron-down",
|
|
13771
13787
|
size: 13
|
|
13772
|
-
})))), n && /* @__PURE__ */ t.createElement(
|
|
13788
|
+
})))), n && /* @__PURE__ */ t.createElement(If, {
|
|
13773
13789
|
children: e.children,
|
|
13774
13790
|
open: r
|
|
13775
13791
|
})) : /* @__PURE__ */ t.createElement(v, {
|
|
@@ -13779,14 +13795,14 @@ function Rf({ item: e, expanded: n, open: r, showIcons: i, onToggle: a }) {
|
|
|
13779
13795
|
}, f, /* @__PURE__ */ t.createElement("span", {
|
|
13780
13796
|
style: p,
|
|
13781
13797
|
className: s.SideNav.itemTextClassName
|
|
13782
|
-
}, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(
|
|
13798
|
+
}, e.title), n && e.badge !== void 0 && /* @__PURE__ */ t.createElement(Ff, { value: e.badge }));
|
|
13783
13799
|
}
|
|
13784
|
-
function
|
|
13800
|
+
function Rf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a }) {
|
|
13785
13801
|
let o = e.key === "General", s = Y("sideNav");
|
|
13786
13802
|
return /* @__PURE__ */ t.createElement("div", { className: "mb-1" }, !o && /* @__PURE__ */ t.createElement("div", {
|
|
13787
13803
|
style: { height: n ? void 0 : "1px" },
|
|
13788
13804
|
className: n ? "px-2 pb-0.5 pt-3 first:pt-1" : X("mx-2 my-2 bg-border/40", s.SideNav.groupDividerClassName)
|
|
13789
|
-
}, n && /* @__PURE__ */ t.createElement("span", { className: X("text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/50 select-none", s.SideNav.groupLabelClassName) }, e.key)), /* @__PURE__ */ t.createElement("div", { className: "space-y-0.5" }, e.items.map((e) => /* @__PURE__ */ t.createElement(
|
|
13805
|
+
}, n && /* @__PURE__ */ t.createElement("span", { className: X("text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/50 select-none", s.SideNav.groupLabelClassName) }, e.key)), /* @__PURE__ */ t.createElement("div", { className: "space-y-0.5" }, e.items.map((e) => /* @__PURE__ */ t.createElement(Lf, {
|
|
13790
13806
|
key: e.path,
|
|
13791
13807
|
item: e,
|
|
13792
13808
|
expanded: n,
|
|
@@ -13795,8 +13811,8 @@ function zf({ group: e, expanded: n, openItems: r, showIcons: i, onToggle: a })
|
|
|
13795
13811
|
onToggle: a
|
|
13796
13812
|
}))));
|
|
13797
13813
|
}
|
|
13798
|
-
function
|
|
13799
|
-
let { pathname: p } = x(), g = Y("sideNav"), _ =
|
|
13814
|
+
function zf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: c = !0, footer: u, header: d, embedded: f = !1 }) {
|
|
13815
|
+
let { pathname: p } = x(), g = Y("sideNav"), _ = Hh(e ?? ""), v = n ?? (e ? Mf(_) : []), y = i !== void 0, [b, S] = h(r), C = i === void 0 ? b : i, w = s((e) => {
|
|
13800
13816
|
let t = typeof e == "function" ? e(C) : e;
|
|
13801
13817
|
y ? a?.(t) : S(t);
|
|
13802
13818
|
}, [
|
|
@@ -13808,7 +13824,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13808
13824
|
O((e) => {
|
|
13809
13825
|
let t = new Set(e);
|
|
13810
13826
|
return v.forEach((e) => {
|
|
13811
|
-
e.children?.some((e) =>
|
|
13827
|
+
e.children?.some((e) => Nf(p, e.path, e.end)) && t.add(e.path);
|
|
13812
13828
|
}), t;
|
|
13813
13829
|
});
|
|
13814
13830
|
}, [p]);
|
|
@@ -13823,8 +13839,8 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13823
13839
|
C && (k.current = setTimeout(() => E(!1), 80));
|
|
13824
13840
|
};
|
|
13825
13841
|
if (v.length === 0) return null;
|
|
13826
|
-
let P =
|
|
13827
|
-
return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(
|
|
13842
|
+
let P = Pf(v);
|
|
13843
|
+
return f ? /* @__PURE__ */ t.createElement("nav", { className: X("px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(Rf, {
|
|
13828
13844
|
key: e.key,
|
|
13829
13845
|
group: e,
|
|
13830
13846
|
expanded: !0,
|
|
@@ -13834,7 +13850,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13834
13850
|
}))) : /* @__PURE__ */ t.createElement("div", {
|
|
13835
13851
|
className: X("min-h-0", g.SideNav.wrapperClassName),
|
|
13836
13852
|
style: {
|
|
13837
|
-
width: C ?
|
|
13853
|
+
width: C ? jf : Af,
|
|
13838
13854
|
height: "100%",
|
|
13839
13855
|
transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
|
|
13840
13856
|
flexShrink: 0,
|
|
@@ -13842,7 +13858,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13842
13858
|
}
|
|
13843
13859
|
}, /* @__PURE__ */ t.createElement("aside", {
|
|
13844
13860
|
style: {
|
|
13845
|
-
width: A ?
|
|
13861
|
+
width: A ? Af : jf,
|
|
13846
13862
|
transition: "width 220ms cubic-bezier(0.4,0,0.2,1)",
|
|
13847
13863
|
position: C ? "absolute" : "sticky",
|
|
13848
13864
|
top: 0,
|
|
@@ -13863,7 +13879,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13863
13879
|
overflow: "hidden",
|
|
13864
13880
|
transition: "opacity 150ms ease, max-width 200ms ease"
|
|
13865
13881
|
}
|
|
13866
|
-
}, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, d)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(
|
|
13882
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "min-w-0 flex-1" }, d)), /* @__PURE__ */ t.createElement("nav", { className: X("min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-1.5 py-2", g.SideNav.navClassName) }, P.map((e) => /* @__PURE__ */ t.createElement(Rf, {
|
|
13867
13883
|
key: e.key,
|
|
13868
13884
|
group: e,
|
|
13869
13885
|
expanded: A,
|
|
@@ -13890,7 +13906,7 @@ function Bf({ menuKey: e, items: n, defaultCollapsed: r = !1, collapsed: i, onCo
|
|
|
13890
13906
|
}
|
|
13891
13907
|
//#endregion
|
|
13892
13908
|
//#region src/components/widgets/grid-core/useGridDBRecords.ts
|
|
13893
|
-
function
|
|
13909
|
+
function Bf({ path: e, where: t, order: n, fieldMap: r }) {
|
|
13894
13910
|
let i = Ti(), [a, o] = h([]), s = p(() => {
|
|
13895
13911
|
if (!(!t && !n && !r)) return {
|
|
13896
13912
|
where: t,
|
|
@@ -13910,13 +13926,13 @@ function Vf({ path: e, where: t, order: n, fieldMap: r }) {
|
|
|
13910
13926
|
}
|
|
13911
13927
|
//#endregion
|
|
13912
13928
|
//#region src/components/widgets/grid-core/resolveGridPathFromUrl.ts
|
|
13913
|
-
function
|
|
13929
|
+
function Vf(e) {
|
|
13914
13930
|
if (e) return e;
|
|
13915
13931
|
}
|
|
13916
13932
|
//#endregion
|
|
13917
13933
|
//#region src/components/widgets/grid-core/GridDB.tsx
|
|
13918
|
-
function
|
|
13919
|
-
let c = x(), l = n ?
|
|
13934
|
+
function Hf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o = za, ...s }) {
|
|
13935
|
+
let c = x(), l = n ? Vf(c.pathname) : e, u = Bf({
|
|
13920
13936
|
path: l,
|
|
13921
13937
|
where: r,
|
|
13922
13938
|
order: i,
|
|
@@ -13931,7 +13947,7 @@ function Uf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o
|
|
|
13931
13947
|
dir: n
|
|
13932
13948
|
};
|
|
13933
13949
|
}, [i]), f = s.sortable === void 0 || s.sortable === !0 ? d ?? s.sortable : s.sortable;
|
|
13934
|
-
return /* @__PURE__ */ t.createElement(
|
|
13950
|
+
return /* @__PURE__ */ t.createElement(am, {
|
|
13935
13951
|
...s,
|
|
13936
13952
|
records: u,
|
|
13937
13953
|
recordId: o,
|
|
@@ -13941,22 +13957,22 @@ function Uf({ path: e, fromUrl: n, where: r, order: i, fieldMap: a, recordId: o
|
|
|
13941
13957
|
}
|
|
13942
13958
|
//#endregion
|
|
13943
13959
|
//#region src/components/widgets/grid-core/utils.ts
|
|
13944
|
-
var
|
|
13960
|
+
var Uf = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, ""), Wf = (e) => (t) => {
|
|
13945
13961
|
if (typeof e == "function") return String(e(t));
|
|
13946
13962
|
let n = t[e];
|
|
13947
13963
|
return n == null || n === "" ? "" : String(n);
|
|
13948
|
-
},
|
|
13964
|
+
}, Gf = (e, t) => {
|
|
13949
13965
|
if (e == null || e === "text") return t;
|
|
13950
13966
|
if (e === "boolean") return t ? "Yes" : "No";
|
|
13951
13967
|
if (e === "json") return t == null ? "" : JSON.stringify(t, null, 2);
|
|
13952
13968
|
if (e === "badge" || e === "image" || e === "email") return t;
|
|
13953
13969
|
let n = et[e === "datetime" ? "dateTime" : e];
|
|
13954
13970
|
return n ? n(t) : t;
|
|
13955
|
-
},
|
|
13971
|
+
}, Kf = (e, t) => typeof e.render == "function" ? e.render(t) : Gf(e.render, t.value), qf = (e) => ({
|
|
13956
13972
|
key: e,
|
|
13957
13973
|
label: et.toCamel(e, " "),
|
|
13958
13974
|
sortable: !0
|
|
13959
|
-
}),
|
|
13975
|
+
}), Jf = (e, n) => {
|
|
13960
13976
|
let r = [], i = (e) => {
|
|
13961
13977
|
t.Children.forEach(e, (e) => {
|
|
13962
13978
|
if (!t.isValidElement(e)) return;
|
|
@@ -13965,25 +13981,25 @@ var Wf = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "-").replace(/-+/g, "-").replace(/^
|
|
|
13965
13981
|
});
|
|
13966
13982
|
};
|
|
13967
13983
|
return i(Array.isArray(e) ? e : [e]), r;
|
|
13968
|
-
},
|
|
13984
|
+
}, Yf = (e, n, r) => {
|
|
13969
13985
|
if (e?.length) return e;
|
|
13970
13986
|
if (t.isValidElement(r)) {
|
|
13971
|
-
let e =
|
|
13987
|
+
let e = Jf(r, (e) => qf(e.name));
|
|
13972
13988
|
if (e.length > 0) return e;
|
|
13973
13989
|
}
|
|
13974
13990
|
let i = n[0];
|
|
13975
|
-
return i ? Object.entries(i).reduce((e, [n, r]) => (n.startsWith("_") || (t.isValidElement(r) || typeof r != "object" || Array.isArray(r)) && e.push(
|
|
13976
|
-
},
|
|
13991
|
+
return i ? Object.entries(i).reduce((e, [n, r]) => (n.startsWith("_") || (t.isValidElement(r) || typeof r != "object" || Array.isArray(r)) && e.push(qf(n)), e), []) : [];
|
|
13992
|
+
}, Xf = (e, t) => Array.isArray(e) ? e.reduce((e, t) => (t === "delete" ? e[t] = { kind: "delete" } : e[t] = { kind: "modal" }, e), {}) : e ? Object.entries(e).reduce((e, [t, n]) => (n && (e[t] = n), e), {}) : t ? {
|
|
13977
13993
|
add: { kind: "modal" },
|
|
13978
13994
|
edit: { kind: "modal" },
|
|
13979
13995
|
delete: { kind: "delete" }
|
|
13980
|
-
} : {},
|
|
13996
|
+
} : {}, Zf = (e, t) => e?.visible ? typeof e.visible == "function" ? e.visible(t) : e.visible : !0, Qf = (e, t) => e?.disabled ? typeof e.disabled == "function" ? e.disabled(t) : e.disabled : !1, $f = (e, t, n) => t?.label ? t.label : e === "add" ? n?.add ?? "Add" : e === "edit" ? n?.edit ?? "Edit" : e === "delete" ? n?.delete ?? "Delete" : et.toCamel(e, " "), ep = (e) => {
|
|
13981
13997
|
if (!(!e || typeof e == "boolean")) return e;
|
|
13982
13998
|
};
|
|
13983
13999
|
//#endregion
|
|
13984
14000
|
//#region src/components/widgets/grid-core/GridTableView.tsx
|
|
13985
|
-
function
|
|
13986
|
-
let E = p(() =>
|
|
14001
|
+
function tp({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pagination: o, selection: c = !1, selectedKeys: u, onSelectionChange: d, onRowClick: f, reorderable: h = !1, onReorder: g, activeKey: _, groupBy: v, wrapperClassName: y, className: b, heightClassName: x, scrollClassName: S, headerClassName: C, before: w, after: T }) {
|
|
14002
|
+
let E = p(() => Wf(n), [n]), D = m(/* @__PURE__ */ new Map()), O = p(() => e.reduce((e, t) => (e.set(E(t), t), e), /* @__PURE__ */ new Map()), [E, e]), k = p(() => r.reduce((e, t) => (e.set(String(t.key), t), e), /* @__PURE__ */ new Map()), [r]);
|
|
13987
14003
|
l(() => {
|
|
13988
14004
|
let t = new Set(e.map((e) => E(e)));
|
|
13989
14005
|
for (let e of D.current.keys()) t.has(e) || D.current.delete(e);
|
|
@@ -13993,7 +14009,7 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
|
|
|
13993
14009
|
if (!o) return Mt(r, t);
|
|
13994
14010
|
let s = Mt(r, t), c = D.current.get(a) ?? /* @__PURE__ */ new Map(), l = c.get(t), u = typeof o.render == "function";
|
|
13995
14011
|
if (l && l.recordRef === r && l.valueRef === s && l.renderRef === o.render && (!u || l.rowIndex === n)) return l.output;
|
|
13996
|
-
let d =
|
|
14012
|
+
let d = Kf(o, {
|
|
13997
14013
|
record: r,
|
|
13998
14014
|
value: s,
|
|
13999
14015
|
key: t,
|
|
@@ -14012,7 +14028,7 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
|
|
|
14012
14028
|
E,
|
|
14013
14029
|
i
|
|
14014
14030
|
]);
|
|
14015
|
-
return /* @__PURE__ */ t.createElement(
|
|
14031
|
+
return /* @__PURE__ */ t.createElement($d, {
|
|
14016
14032
|
columns: r.map((e) => ({
|
|
14017
14033
|
key: String(e.key),
|
|
14018
14034
|
label: e.label,
|
|
@@ -14070,20 +14086,20 @@ function np({ records: e, recordId: n, columns: r, runAction: i, sortable: a, pa
|
|
|
14070
14086
|
}
|
|
14071
14087
|
//#endregion
|
|
14072
14088
|
//#region src/Head.tsx
|
|
14073
|
-
var
|
|
14089
|
+
var np = a(null), rp = 0, ip = "LLM Native", ap = {
|
|
14074
14090
|
charset: "UTF-8",
|
|
14075
14091
|
viewport: "width=device-width, initial-scale=1.0"
|
|
14076
|
-
},
|
|
14077
|
-
function
|
|
14092
|
+
}, op = { lang: "en" };
|
|
14093
|
+
function sp(e, t) {
|
|
14078
14094
|
return t.includes(":") ? t : `${e}:${t}`;
|
|
14079
14095
|
}
|
|
14080
|
-
function
|
|
14096
|
+
function cp(e) {
|
|
14081
14097
|
return Array.isArray(e) ? e.join(", ") : e;
|
|
14082
14098
|
}
|
|
14083
|
-
function
|
|
14084
|
-
return e === "siteName" ? "og:site_name" :
|
|
14099
|
+
function lp(e) {
|
|
14100
|
+
return e === "siteName" ? "og:site_name" : sp("og", e);
|
|
14085
14101
|
}
|
|
14086
|
-
function
|
|
14102
|
+
function up(e) {
|
|
14087
14103
|
return [
|
|
14088
14104
|
...e.canonical ? [{
|
|
14089
14105
|
rel: "canonical",
|
|
@@ -14101,7 +14117,7 @@ function dp(e) {
|
|
|
14101
14117
|
...e.links ?? []
|
|
14102
14118
|
];
|
|
14103
14119
|
}
|
|
14104
|
-
function
|
|
14120
|
+
function dp(e) {
|
|
14105
14121
|
return [...e.prev ? [{
|
|
14106
14122
|
rel: "prev",
|
|
14107
14123
|
href: e.prev
|
|
@@ -14110,7 +14126,7 @@ function fp(e) {
|
|
|
14110
14126
|
href: e.next
|
|
14111
14127
|
}] : []];
|
|
14112
14128
|
}
|
|
14113
|
-
function
|
|
14129
|
+
function fp(e) {
|
|
14114
14130
|
return (e.alternates ?? []).map((e) => ({
|
|
14115
14131
|
rel: "alternate",
|
|
14116
14132
|
href: e.href,
|
|
@@ -14120,28 +14136,28 @@ function pp(e) {
|
|
|
14120
14136
|
title: e.title
|
|
14121
14137
|
}));
|
|
14122
14138
|
}
|
|
14123
|
-
function
|
|
14139
|
+
function pp(e, t, n) {
|
|
14124
14140
|
return {
|
|
14125
14141
|
name: {
|
|
14126
14142
|
description: e.description,
|
|
14127
14143
|
...e.meta ?? {},
|
|
14128
14144
|
robots: n.robots ?? e.meta?.robots,
|
|
14129
14145
|
googlebot: n.googlebot,
|
|
14130
|
-
keywords:
|
|
14146
|
+
keywords: cp(n.keywords),
|
|
14131
14147
|
author: n.author,
|
|
14132
14148
|
publisher: n.publisher,
|
|
14133
14149
|
referrer: n.referrer,
|
|
14134
14150
|
...n.meta ?? {},
|
|
14135
|
-
...Object.fromEntries(Object.entries(t.twitter ?? {}).map(([e, t]) => [
|
|
14151
|
+
...Object.fromEntries(Object.entries(t.twitter ?? {}).map(([e, t]) => [sp("twitter", e), t]))
|
|
14136
14152
|
},
|
|
14137
|
-
property: Object.fromEntries(Object.entries(t.openGraph ?? {}).map(([e, t]) => [
|
|
14153
|
+
property: Object.fromEntries(Object.entries(t.openGraph ?? {}).map(([e, t]) => [lp(e), t]))
|
|
14138
14154
|
};
|
|
14139
14155
|
}
|
|
14140
|
-
function
|
|
14156
|
+
function mp(e, t, n, r) {
|
|
14141
14157
|
return [
|
|
14142
|
-
...
|
|
14143
|
-
...
|
|
14144
|
-
...
|
|
14158
|
+
...up(t),
|
|
14159
|
+
...dp(r),
|
|
14160
|
+
...fp(n),
|
|
14145
14161
|
...e.canonical && !t.canonical ? [{
|
|
14146
14162
|
rel: "canonical",
|
|
14147
14163
|
href: e.canonical
|
|
@@ -14149,7 +14165,7 @@ function hp(e, t, n, r) {
|
|
|
14149
14165
|
...e.links ?? []
|
|
14150
14166
|
];
|
|
14151
14167
|
}
|
|
14152
|
-
function
|
|
14168
|
+
function hp(e) {
|
|
14153
14169
|
return [...(e.fonts ?? []).flatMap((e) => [
|
|
14154
14170
|
...(e.dnsPrefetch ?? []).map((e) => ({
|
|
14155
14171
|
rel: "dns-prefetch",
|
|
@@ -14176,7 +14192,7 @@ function gp(e) {
|
|
|
14176
14192
|
}
|
|
14177
14193
|
])];
|
|
14178
14194
|
}
|
|
14179
|
-
function
|
|
14195
|
+
function gp(e) {
|
|
14180
14196
|
return [
|
|
14181
14197
|
...e.manifest ? [{
|
|
14182
14198
|
rel: "manifest",
|
|
@@ -14193,7 +14209,7 @@ function _p(e) {
|
|
|
14193
14209
|
...e.icons ?? []
|
|
14194
14210
|
];
|
|
14195
14211
|
}
|
|
14196
|
-
function
|
|
14212
|
+
function _p(e) {
|
|
14197
14213
|
return {
|
|
14198
14214
|
"theme-color": e.themeColor,
|
|
14199
14215
|
"msapplication-TileColor": e.backgroundColor,
|
|
@@ -14205,27 +14221,27 @@ function vp(e) {
|
|
|
14205
14221
|
"apple-mobile-web-app-status-bar-style": e.appleMobileWebAppStatusBarStyle
|
|
14206
14222
|
};
|
|
14207
14223
|
}
|
|
14208
|
-
function
|
|
14224
|
+
function vp(e) {
|
|
14209
14225
|
return Array.isArray(e.jsonLd) ? e.jsonLd : e.jsonLd ? [e.jsonLd] : [];
|
|
14210
14226
|
}
|
|
14211
|
-
function
|
|
14227
|
+
function yp(e) {
|
|
14212
14228
|
return Object.fromEntries(Object.entries(e).filter(([, e]) => !!e));
|
|
14213
14229
|
}
|
|
14214
|
-
function
|
|
14230
|
+
function bp(e) {
|
|
14215
14231
|
let { inline: t, ...n } = e;
|
|
14216
14232
|
return Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0 && e !== !1));
|
|
14217
14233
|
}
|
|
14218
|
-
function
|
|
14234
|
+
function xp(e) {
|
|
14219
14235
|
let { inline: t, ...n } = e;
|
|
14220
14236
|
return Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0 && e !== !1));
|
|
14221
14237
|
}
|
|
14222
|
-
function
|
|
14238
|
+
function Sp({ appName: e, metadata: n, social: r, links: i, pagination: a, language: o, document: s, assets: c, pwa: l, schemaOrg: u }) {
|
|
14223
14239
|
if (globalThis.document === void 0) return null;
|
|
14224
|
-
let d =
|
|
14225
|
-
...
|
|
14226
|
-
...
|
|
14227
|
-
...
|
|
14228
|
-
], m =
|
|
14240
|
+
let d = pp(n, r, s), f = _p(l), p = [
|
|
14241
|
+
...mp(i, s, o, a),
|
|
14242
|
+
...hp(c),
|
|
14243
|
+
...gp(l)
|
|
14244
|
+
], m = vp(u);
|
|
14229
14245
|
return j(/* @__PURE__ */ t.createElement(t.Fragment, null, s.charset ? /* @__PURE__ */ t.createElement("meta", {
|
|
14230
14246
|
charSet: s.charset,
|
|
14231
14247
|
"data-rfs-head": "document"
|
|
@@ -14259,12 +14275,12 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
|
|
|
14259
14275
|
"data-rfs-head": "pwa"
|
|
14260
14276
|
}) : null), p.map((e, n) => /* @__PURE__ */ t.createElement("link", {
|
|
14261
14277
|
key: `${e.rel}:${e.href ?? n}`,
|
|
14262
|
-
...
|
|
14278
|
+
...yp(e),
|
|
14263
14279
|
"data-rfs-head": "link"
|
|
14264
14280
|
})), (c.styles ?? []).map((e, n) => /* @__PURE__ */ t.createElement(t.Fragment, { key: `style:${e.href ?? n}` }, e.href ? /* @__PURE__ */ t.createElement("link", {
|
|
14265
14281
|
rel: "stylesheet",
|
|
14266
14282
|
href: e.href,
|
|
14267
|
-
...
|
|
14283
|
+
...xp(e),
|
|
14268
14284
|
"data-rfs-head": "asset-style"
|
|
14269
14285
|
}) : null, e.inline ? /* @__PURE__ */ t.createElement("style", {
|
|
14270
14286
|
id: e.id,
|
|
@@ -14273,7 +14289,7 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
|
|
|
14273
14289
|
title: e.title,
|
|
14274
14290
|
"data-rfs-head": "asset-style"
|
|
14275
14291
|
}, e.inline) : null)), (c.scripts ?? []).map((e, n) => /* @__PURE__ */ t.createElement(t.Fragment, { key: `script:${e.src ?? n}` }, e.src ? /* @__PURE__ */ t.createElement("script", {
|
|
14276
|
-
...
|
|
14292
|
+
...bp(e),
|
|
14277
14293
|
"data-rfs-head": "asset-script"
|
|
14278
14294
|
}) : null, e.inline ? /* @__PURE__ */ t.createElement("script", {
|
|
14279
14295
|
type: e.type,
|
|
@@ -14286,15 +14302,15 @@ function Cp({ appName: e, metadata: n, social: r, links: i, pagination: a, langu
|
|
|
14286
14302
|
"data-rfs-head": "schema-org"
|
|
14287
14303
|
}, JSON.stringify(e)))), globalThis.document.head);
|
|
14288
14304
|
}
|
|
14289
|
-
function
|
|
14290
|
-
let r = e || "LLM Native", i = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.lang), a = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.dir), [o, c] = h({}), [u, d] = h([]), [f, m] = h({}), [g, _] = h({}), [v, y] = h({}), [b, x] = h(
|
|
14305
|
+
function Cp({ appName: e = ip, children: n }) {
|
|
14306
|
+
let r = e || "LLM Native", i = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.lang), a = t.useRef(globalThis.document === void 0 ? "" : globalThis.document.documentElement.dir), [o, c] = h({}), [u, d] = h([]), [f, m] = h({}), [g, _] = h({}), [v, y] = h({}), [b, x] = h(op), [S, C] = h(ap), [w, T] = h({}), [E, D] = h({}), [O, k] = h({}), A = s(() => c({}), []), j = s((e, t) => {
|
|
14291
14307
|
d((n) => [...n.filter((t) => t.id !== e), {
|
|
14292
14308
|
id: e,
|
|
14293
14309
|
metadata: t
|
|
14294
14310
|
}]);
|
|
14295
14311
|
}, []), M = s((e) => {
|
|
14296
14312
|
d((t) => t.filter((t) => t.id !== e));
|
|
14297
|
-
}, []), N = s(() => m({}), []), P = s(() => _({}), []), F = s(() => y({}), []), I = s(() => x(
|
|
14313
|
+
}, []), N = s(() => m({}), []), P = s(() => _({}), []), F = s(() => y({}), []), I = s(() => x(op), []), L = s(() => C(ap), []), R = s(() => T({}), []), z = s(() => D({}), []), B = s(() => k({}), []);
|
|
14298
14314
|
l(() => {
|
|
14299
14315
|
globalThis.document !== void 0 && (globalThis.document.documentElement.lang = b.lang ?? i.current, globalThis.document.documentElement.dir = b.dir ?? a.current);
|
|
14300
14316
|
}, [b.lang, b.dir]);
|
|
@@ -14354,7 +14370,7 @@ function wp({ appName: e = ap, children: n }) {
|
|
|
14354
14370
|
z,
|
|
14355
14371
|
B
|
|
14356
14372
|
]);
|
|
14357
|
-
return /* @__PURE__ */ t.createElement(
|
|
14373
|
+
return /* @__PURE__ */ t.createElement(np.Provider, { value: H }, n, /* @__PURE__ */ t.createElement(Sp, {
|
|
14358
14374
|
appName: r,
|
|
14359
14375
|
metadata: V,
|
|
14360
14376
|
social: f,
|
|
@@ -14367,16 +14383,16 @@ function wp({ appName: e = ap, children: n }) {
|
|
|
14367
14383
|
schemaOrg: O
|
|
14368
14384
|
}));
|
|
14369
14385
|
}
|
|
14370
|
-
function
|
|
14371
|
-
return c(
|
|
14386
|
+
function wp() {
|
|
14387
|
+
return c(np);
|
|
14372
14388
|
}
|
|
14373
|
-
function
|
|
14389
|
+
function Tp(e) {
|
|
14374
14390
|
return JSON.stringify(e ?? {});
|
|
14375
14391
|
}
|
|
14376
|
-
function
|
|
14377
|
-
let n =
|
|
14378
|
-
r.current ||= (
|
|
14379
|
-
let i =
|
|
14392
|
+
function Ep(e) {
|
|
14393
|
+
let n = wp(), r = t.useRef(null);
|
|
14394
|
+
r.current ||= (rp += 1, `metadata-${rp}`);
|
|
14395
|
+
let i = Tp(e);
|
|
14380
14396
|
return l(() => {
|
|
14381
14397
|
if (!n || !e) return;
|
|
14382
14398
|
let t = r.current;
|
|
@@ -14387,40 +14403,40 @@ function Dp(e) {
|
|
|
14387
14403
|
i
|
|
14388
14404
|
]), n;
|
|
14389
14405
|
}
|
|
14390
|
-
function
|
|
14391
|
-
let t =
|
|
14406
|
+
function Dp(e) {
|
|
14407
|
+
let t = wp(), n = Tp(e);
|
|
14392
14408
|
return l(() => {
|
|
14393
14409
|
if (!t || !e) return;
|
|
14394
14410
|
let n = t.social;
|
|
14395
14411
|
return t.setSocialHead(e), () => t.setSocialHead(n);
|
|
14396
14412
|
}, [t?.setSocialHead, n]), t;
|
|
14397
14413
|
}
|
|
14398
|
-
function
|
|
14399
|
-
let t =
|
|
14414
|
+
function Op(e) {
|
|
14415
|
+
let t = wp(), n = Tp(e);
|
|
14400
14416
|
return l(() => {
|
|
14401
14417
|
if (!t || !e) return;
|
|
14402
14418
|
let n = t.links;
|
|
14403
14419
|
return t.setHeadLinks(e), () => t.setHeadLinks(n);
|
|
14404
14420
|
}, [t?.setHeadLinks, n]), t;
|
|
14405
14421
|
}
|
|
14406
|
-
function
|
|
14407
|
-
let t =
|
|
14422
|
+
function kp(e) {
|
|
14423
|
+
let t = wp(), n = Tp(e);
|
|
14408
14424
|
return l(() => {
|
|
14409
14425
|
if (!t || !e) return;
|
|
14410
14426
|
let n = t.pagination;
|
|
14411
14427
|
return t.setPaginationHead(e), () => t.setPaginationHead(n);
|
|
14412
14428
|
}, [t?.setPaginationHead, n]), t;
|
|
14413
14429
|
}
|
|
14414
|
-
function
|
|
14415
|
-
let t =
|
|
14430
|
+
function Ap(e) {
|
|
14431
|
+
let t = wp(), n = Tp(e);
|
|
14416
14432
|
return l(() => {
|
|
14417
14433
|
if (!t || !e) return;
|
|
14418
14434
|
let n = t.language;
|
|
14419
14435
|
return t.setLanguageHead(e), () => t.setLanguageHead(n);
|
|
14420
14436
|
}, [t?.setLanguageHead, n]), t;
|
|
14421
14437
|
}
|
|
14422
|
-
function
|
|
14423
|
-
let t =
|
|
14438
|
+
function jp(e) {
|
|
14439
|
+
let t = wp(), n = Tp(e);
|
|
14424
14440
|
return l(() => {
|
|
14425
14441
|
if (!t || !e) return;
|
|
14426
14442
|
let n = t.document;
|
|
@@ -14430,39 +14446,39 @@ function Mp(e) {
|
|
|
14430
14446
|
}), () => t.setDocumentHead(n);
|
|
14431
14447
|
}, [t?.setDocumentHead, n]), t;
|
|
14432
14448
|
}
|
|
14433
|
-
function
|
|
14434
|
-
let t =
|
|
14449
|
+
function Mp(e) {
|
|
14450
|
+
let t = wp(), n = Tp(e);
|
|
14435
14451
|
return l(() => {
|
|
14436
14452
|
if (!t || !e) return;
|
|
14437
14453
|
let n = t.assets;
|
|
14438
14454
|
return t.setAssetsHead(e), () => t.setAssetsHead(n);
|
|
14439
14455
|
}, [t?.setAssetsHead, n]), t;
|
|
14440
14456
|
}
|
|
14441
|
-
function
|
|
14442
|
-
let t =
|
|
14457
|
+
function Np(e) {
|
|
14458
|
+
let t = wp(), n = Tp(e);
|
|
14443
14459
|
return l(() => {
|
|
14444
14460
|
if (!t || !e) return;
|
|
14445
14461
|
let n = t.pwa;
|
|
14446
14462
|
return t.setPwaHead(e), () => t.setPwaHead(n);
|
|
14447
14463
|
}, [t?.setPwaHead, n]), t;
|
|
14448
14464
|
}
|
|
14449
|
-
function
|
|
14450
|
-
let t =
|
|
14465
|
+
function Pp(e) {
|
|
14466
|
+
let t = wp(), n = Tp(e);
|
|
14451
14467
|
return l(() => {
|
|
14452
14468
|
if (!t || !e) return;
|
|
14453
14469
|
let n = t.schemaOrg;
|
|
14454
14470
|
return t.setSchemaOrg(e), () => t.setSchemaOrg(n);
|
|
14455
14471
|
}, [t?.setSchemaOrg, n]), t;
|
|
14456
14472
|
}
|
|
14457
|
-
function
|
|
14458
|
-
return
|
|
14473
|
+
function Fp(e) {
|
|
14474
|
+
return Ep(e), null;
|
|
14459
14475
|
}
|
|
14460
14476
|
//#endregion
|
|
14461
14477
|
//#region src/components/widgets/MarkdownReader.tsx
|
|
14462
|
-
var
|
|
14478
|
+
var Ip = (e) => /^(https?:)?\/\//.test(e) || e.startsWith("mailto:") || e.startsWith("tel:"), Lp = (e) => !!e && !Ip(e) && !e.startsWith("#"), Rp = (e) => e.startsWith("#"), zp = (e) => typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(zp).join("") : t.isValidElement(e) ? zp(e.props.children) : "", Bp = (e) => {
|
|
14463
14479
|
if (t.isValidElement(e)) return /language-([\w-]+)/.exec(e.props.className || "")?.[1];
|
|
14464
14480
|
};
|
|
14465
|
-
function
|
|
14481
|
+
function Vp({ code: e, language: n }) {
|
|
14466
14482
|
let [r, i] = t.useState(!1), a = Fn("code");
|
|
14467
14483
|
return /* @__PURE__ */ t.createElement("div", { className: "relative my-4 overflow-hidden rounded-md border bg-muted/50" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-9 items-center justify-between border-b px-3" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs font-medium text-muted-foreground" }, n || a.codeLanguageDefault), /* @__PURE__ */ t.createElement("button", {
|
|
14468
14484
|
type: "button",
|
|
@@ -14472,7 +14488,7 @@ function Hp({ code: e, language: n }) {
|
|
|
14472
14488
|
}
|
|
14473
14489
|
}, r ? a.copied : a.copy)), /* @__PURE__ */ t.createElement("pre", { className: "m-0 overflow-x-auto p-4 text-xs leading-relaxed" }, /* @__PURE__ */ t.createElement("code", { className: n ? `language-${n}` : void 0 }, e)));
|
|
14474
14490
|
}
|
|
14475
|
-
var
|
|
14491
|
+
var Hp = (e) => ({
|
|
14476
14492
|
h1: ({ className: e, ...n }) => /* @__PURE__ */ t.createElement("h1", {
|
|
14477
14493
|
className: X("mt-8 scroll-m-20 text-3xl font-bold tracking-normal first:mt-0 [&>a]:no-underline [&>a:hover]:opacity-80", e),
|
|
14478
14494
|
...n
|
|
@@ -14526,18 +14542,18 @@ var Up = (e) => ({
|
|
|
14526
14542
|
...n
|
|
14527
14543
|
}),
|
|
14528
14544
|
a: ({ className: n, href: r = "", onClick: i, ...a }) => /* @__PURE__ */ t.createElement("a", {
|
|
14529
|
-
className: X(
|
|
14545
|
+
className: X(Rp(r) ? "text-primary no-underline transition-opacity hover:opacity-80" : "font-medium text-primary no-underline transition-opacity hover:opacity-80", n),
|
|
14530
14546
|
href: r,
|
|
14531
|
-
target:
|
|
14532
|
-
rel:
|
|
14547
|
+
target: Ip(r) ? "_blank" : void 0,
|
|
14548
|
+
rel: Ip(r) ? "noreferrer" : void 0,
|
|
14533
14549
|
onClick: (t) => {
|
|
14534
|
-
i?.(t), !t.defaultPrevented && e &&
|
|
14550
|
+
i?.(t), !t.defaultPrevented && e && Lp(r) && (t.preventDefault(), e(r, t));
|
|
14535
14551
|
},
|
|
14536
14552
|
...a
|
|
14537
14553
|
}),
|
|
14538
|
-
pre: ({ children: e }) => /* @__PURE__ */ t.createElement(
|
|
14539
|
-
code:
|
|
14540
|
-
language:
|
|
14554
|
+
pre: ({ children: e }) => /* @__PURE__ */ t.createElement(Vp, {
|
|
14555
|
+
code: zp(e).replace(/\n$/, ""),
|
|
14556
|
+
language: Bp(e)
|
|
14541
14557
|
}),
|
|
14542
14558
|
code: ({ className: e, children: n, ...r }) => typeof e == "string" && e.startsWith("language-") ? /* @__PURE__ */ t.createElement("code", {
|
|
14543
14559
|
className: e,
|
|
@@ -14552,13 +14568,13 @@ var Up = (e) => ({
|
|
|
14552
14568
|
...n
|
|
14553
14569
|
})
|
|
14554
14570
|
});
|
|
14555
|
-
function
|
|
14571
|
+
function Up({ content: e, components: n, className: r, wrapperClassName: i, metadata: a, onInternalLinkClick: o }) {
|
|
14556
14572
|
let s = t.useMemo(() => e.match(/^#[ \t]+(.+)/m)?.[1]?.trim(), [e]);
|
|
14557
|
-
|
|
14573
|
+
Ep(a || s ? {
|
|
14558
14574
|
...a ?? {},
|
|
14559
14575
|
title: a?.title ?? s
|
|
14560
14576
|
} : void 0);
|
|
14561
|
-
let c = t.useMemo(() =>
|
|
14577
|
+
let c = t.useMemo(() => Hp(o), [o]);
|
|
14562
14578
|
return /* @__PURE__ */ t.createElement("div", { className: X("rf-markdown-reader max-w-none text-sm text-foreground", i, r) }, /* @__PURE__ */ t.createElement(ke, {
|
|
14563
14579
|
remarkPlugins: [Ae],
|
|
14564
14580
|
rehypePlugins: [
|
|
@@ -14574,7 +14590,7 @@ function Wp({ content: e, components: n, className: r, wrapperClassName: i, meta
|
|
|
14574
14590
|
}
|
|
14575
14591
|
//#endregion
|
|
14576
14592
|
//#region src/components/widgets/TabDynamic.tsx
|
|
14577
|
-
var
|
|
14593
|
+
var Wp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRemove: a = void 0, label: o = "Tab", min: s = 1, max: c = void 0, activeIndex: l = 0, title: u = void 0, readOnly: d = !1, tabPosition: f = "default" }) => {
|
|
14578
14594
|
let { value: m, handleChange: g } = Dd({
|
|
14579
14595
|
name: n,
|
|
14580
14596
|
onChange: r
|
|
@@ -14605,7 +14621,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14605
14621
|
}, E = (e) => {
|
|
14606
14622
|
let t = S.length - 1;
|
|
14607
14623
|
a?.(e), g({ target: { name: `${n}.${e}` } }), v >= t && y((e) => e - 1), x((e) => e + 1);
|
|
14608
|
-
}, D =
|
|
14624
|
+
}, D = qd[f], O = Wd(f);
|
|
14609
14625
|
return /* @__PURE__ */ t.createElement("div", null, u && /* @__PURE__ */ t.createElement("h3", null, u), /* @__PURE__ */ t.createElement(D, {
|
|
14610
14626
|
menu: /* @__PURE__ */ t.createElement(t.Fragment, null, S?.map((e, r) => /* @__PURE__ */ t.createElement("div", {
|
|
14611
14627
|
key: `${n}-${r}`,
|
|
@@ -14615,7 +14631,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14615
14631
|
role: "tab",
|
|
14616
14632
|
"aria-selected": r === v,
|
|
14617
14633
|
onClick: () => y(r),
|
|
14618
|
-
className:
|
|
14634
|
+
className: Gd(f, r === v, !d && S.length - 1 >= s && r === v ? "pr-9" : void 0)
|
|
14619
14635
|
}, e), !d && S.length - 1 >= s && r === v && /* @__PURE__ */ t.createElement(Hr, {
|
|
14620
14636
|
className: "absolute right-2 top-1/2 -translate-y-1/2 p-1 text-current opacity-70 hover:opacity-100",
|
|
14621
14637
|
icon: "x",
|
|
@@ -14624,14 +14640,14 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14624
14640
|
key: S.length + 1,
|
|
14625
14641
|
className: O.itemClassName
|
|
14626
14642
|
}, /* @__PURE__ */ t.createElement(Hr, {
|
|
14627
|
-
className:
|
|
14643
|
+
className: Gd(f, !1, "border border-dashed border-border/70 justify-center"),
|
|
14628
14644
|
icon: "plus",
|
|
14629
14645
|
title: "Add tab",
|
|
14630
14646
|
onClick: T
|
|
14631
14647
|
}))),
|
|
14632
|
-
content: /* @__PURE__ */ t.createElement("div", { className:
|
|
14648
|
+
content: /* @__PURE__ */ t.createElement("div", { className: Kd() }, w)
|
|
14633
14649
|
}));
|
|
14634
|
-
},
|
|
14650
|
+
}, Gp = ({ records: e, children: n, limit: r = void 0, page: i = void 0, maxPageButtons: a = void 0, appendTo: o = void 0, before: s = void 0, after: c = void 0, className: u = void 0, wrapperClassName: d = void 0, scrollToTopOnChange: f = void 0, scrollBehavior: m = void 0, align: g = void 0, sticky: _ = void 0 }) => {
|
|
14635
14651
|
let v = Y("pagination"), y = Fn("common"), [b, x] = h(i || 1), S = r || e.length, C = Math.ceil(e.length / S), w = (b - 1) * S, T = w + S, E = p(() => e.slice(w, T), [
|
|
14636
14652
|
e,
|
|
14637
14653
|
w,
|
|
@@ -14695,19 +14711,19 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14695
14711
|
className: X("inline-flex h-9 min-w-[2.25rem] items-center justify-center rounded-md border bg-background px-3 text-sm transition-colors", A === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
|
|
14696
14712
|
}, /* @__PURE__ */ t.createElement("span", null, "»"))))), c);
|
|
14697
14713
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, n(E, w), o ? j(P, o) : o === void 0 && P);
|
|
14698
|
-
},
|
|
14699
|
-
let
|
|
14700
|
-
e &&
|
|
14701
|
-
}, []),
|
|
14714
|
+
}, Kp = ({ records: e = void 0, header: n = void 0, footer: r = void 0, overlays: i = void 0, renderItem: a = void 0, onRowClick: o = void 0, onSelectionChange: c = void 0, sortable: u = !1, pagination: d = void 0, gap: f = void 0, columns: g = void 0, groupBy: _ = void 0, selectedKeys: v = void 0, before: y = void 0, after: b = void 0, wrapperClassName: x = void 0, className: S = void 0, headerClassName: C = void 0, scrollClassName: w = void 0, bodyClassName: T = void 0, footerClassName: E = void 0, selectedClassName: D = void 0 }) => {
|
|
14715
|
+
let O = Y("gallery"), k = Fn("gallery"), A = Fn("common"), j = D || O.Gallery.selectedClassName, [M, N] = h(null), P = s((e) => {
|
|
14716
|
+
e && N(e);
|
|
14717
|
+
}, []), F = f ?? O.Gallery.gap, I = g ?? O.Gallery.rowCols, L = {
|
|
14702
14718
|
0: "0",
|
|
14703
14719
|
1: "0.25rem",
|
|
14704
14720
|
2: "0.5rem",
|
|
14705
14721
|
3: "1rem",
|
|
14706
14722
|
4: "1.5rem",
|
|
14707
14723
|
5: "3rem"
|
|
14708
|
-
},
|
|
14709
|
-
if (!
|
|
14710
|
-
if (typeof
|
|
14724
|
+
}, R = L[F] ?? L[2], z = "0.75rem", B = "calc(50% - 1rem)", V = F === 0 ? `${(100 / I).toFixed(4)}%` : `calc((100% - (${R} * ${I - 1})) / ${I})`, H = e || [], U = p(() => {
|
|
14725
|
+
if (!u) return;
|
|
14726
|
+
if (typeof u == "object") return u;
|
|
14711
14727
|
let t = e?.[0];
|
|
14712
14728
|
if (!t) return;
|
|
14713
14729
|
let n = Object.keys(t).find((e) => !e.startsWith("_"));
|
|
@@ -14717,22 +14733,22 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14717
14733
|
};
|
|
14718
14734
|
}, [
|
|
14719
14735
|
e,
|
|
14720
|
-
typeof
|
|
14721
|
-
typeof
|
|
14722
|
-
|
|
14723
|
-
]),
|
|
14724
|
-
records:
|
|
14725
|
-
selectedKeys:
|
|
14726
|
-
onSelectionChange:
|
|
14727
|
-
getRecordKey:
|
|
14728
|
-
}),
|
|
14736
|
+
typeof u == "object" ? u?.dir : void 0,
|
|
14737
|
+
typeof u == "object" ? u?.field : void 0,
|
|
14738
|
+
u
|
|
14739
|
+
]), W = Qd("item"), ee = s((e, t) => W(e, t), [W]), { activeSelectedKeys: G, showSelection: te, updateSelection: ne } = Zd({
|
|
14740
|
+
records: H,
|
|
14741
|
+
selectedKeys: v,
|
|
14742
|
+
onSelectionChange: c,
|
|
14743
|
+
getRecordKey: ee
|
|
14744
|
+
}), re = m(/* @__PURE__ */ new Map());
|
|
14729
14745
|
l(() => {
|
|
14730
|
-
let e = new Set(
|
|
14731
|
-
for (let t of
|
|
14732
|
-
}, [
|
|
14733
|
-
let
|
|
14734
|
-
if (
|
|
14735
|
-
let t =
|
|
14746
|
+
let e = new Set(H.map((e, t) => ee(e, t)));
|
|
14747
|
+
for (let t of re.current.keys()) e.has(t) || re.current.delete(t);
|
|
14748
|
+
}, [H, ee]);
|
|
14749
|
+
let K = (e, t) => {
|
|
14750
|
+
if (j) {
|
|
14751
|
+
let t = j.split(/\s+/).filter(Boolean), n = e.target;
|
|
14736
14752
|
for (; n && !n.classList.contains("item");) {
|
|
14737
14753
|
if ([
|
|
14738
14754
|
"A",
|
|
@@ -14746,25 +14762,25 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14746
14762
|
e.classList.remove(...t);
|
|
14747
14763
|
}), n.classList.add(...t));
|
|
14748
14764
|
}
|
|
14749
|
-
|
|
14750
|
-
},
|
|
14751
|
-
let n =
|
|
14752
|
-
|
|
14765
|
+
o?.(t);
|
|
14766
|
+
}, ie = s((e, t) => {
|
|
14767
|
+
let n = ee(e, t), r = G.includes(n) ? G.filter((e) => e !== n) : [...G, n];
|
|
14768
|
+
ne(r);
|
|
14753
14769
|
}, [
|
|
14770
|
+
G,
|
|
14754
14771
|
ee,
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
]), ie = (e, n) => {
|
|
14772
|
+
ne
|
|
14773
|
+
]), ae = (e, n) => {
|
|
14758
14774
|
let r = e.img;
|
|
14759
14775
|
return r && t.isValidElement(r) ? t.cloneElement(r, {
|
|
14760
14776
|
className: X("block h-auto w-full max-w-full rounded-lg object-cover", r.props.className),
|
|
14761
14777
|
style: {
|
|
14762
14778
|
...r.props.style || {},
|
|
14763
14779
|
aspectRatio: r.props.style?.aspectRatio || "16 / 11",
|
|
14764
|
-
cursor:
|
|
14780
|
+
cursor: o ? "pointer" : "default"
|
|
14765
14781
|
},
|
|
14766
|
-
onClick:
|
|
14767
|
-
|
|
14782
|
+
onClick: o ? ((t) => {
|
|
14783
|
+
K(t, e), r.props.onClick?.(t);
|
|
14768
14784
|
}) : r.props.onClick
|
|
14769
14785
|
}) : /* @__PURE__ */ t.createElement("img", {
|
|
14770
14786
|
className: "block h-auto w-full max-w-full rounded-lg object-cover",
|
|
@@ -14774,105 +14790,111 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14774
14790
|
height: e.height,
|
|
14775
14791
|
style: {
|
|
14776
14792
|
aspectRatio: "16 / 11",
|
|
14777
|
-
cursor:
|
|
14793
|
+
cursor: o ? "pointer" : "default"
|
|
14778
14794
|
},
|
|
14779
|
-
onClick:
|
|
14795
|
+
onClick: o ? ((t) => K(t, e)) : void 0
|
|
14780
14796
|
});
|
|
14781
|
-
},
|
|
14797
|
+
}, oe = (e) => t.isValidElement(e) ? e : /* @__PURE__ */ t.createElement("span", { className: "inline-block max-w-full overflow-hidden text-ellipsis align-top" }, /* @__PURE__ */ t.createElement(Zn, {
|
|
14782
14798
|
badge: e,
|
|
14783
14799
|
className: "badge-overlay"
|
|
14784
|
-
})),
|
|
14800
|
+
})), se = (e, n, r = "left", i) => /* @__PURE__ */ t.createElement("div", {
|
|
14785
14801
|
className: X("absolute z-10 overflow-hidden text-ellipsis whitespace-nowrap leading-none", r === "right" ? "text-right" : "text-left", i),
|
|
14786
14802
|
style: {
|
|
14787
|
-
width:
|
|
14788
|
-
maxWidth:
|
|
14803
|
+
width: B,
|
|
14804
|
+
maxWidth: B,
|
|
14789
14805
|
pointerEvents: "none",
|
|
14790
14806
|
...n
|
|
14791
14807
|
}
|
|
14792
|
-
},
|
|
14808
|
+
}, oe(e)), ce = {
|
|
14793
14809
|
topLeft: { style: {
|
|
14794
|
-
left:
|
|
14795
|
-
top:
|
|
14810
|
+
left: z,
|
|
14811
|
+
top: z
|
|
14796
14812
|
} },
|
|
14797
14813
|
topRight: {
|
|
14798
14814
|
style: {
|
|
14799
|
-
right:
|
|
14800
|
-
top:
|
|
14815
|
+
right: z,
|
|
14816
|
+
top: z
|
|
14801
14817
|
},
|
|
14802
14818
|
align: "right"
|
|
14803
14819
|
},
|
|
14804
14820
|
bottomLeft: { style: {
|
|
14805
|
-
bottom:
|
|
14806
|
-
left:
|
|
14821
|
+
bottom: z,
|
|
14822
|
+
left: z
|
|
14807
14823
|
} },
|
|
14808
14824
|
bottomRight: {
|
|
14809
14825
|
style: {
|
|
14810
|
-
bottom:
|
|
14811
|
-
right:
|
|
14826
|
+
bottom: z,
|
|
14827
|
+
right: z
|
|
14812
14828
|
},
|
|
14813
14829
|
align: "right"
|
|
14814
14830
|
},
|
|
14815
14831
|
middleLeft: { style: {
|
|
14816
|
-
left:
|
|
14832
|
+
left: z,
|
|
14817
14833
|
top: "50%",
|
|
14818
14834
|
transform: "translateY(-50%)"
|
|
14819
14835
|
} },
|
|
14820
14836
|
middleRight: {
|
|
14821
14837
|
style: {
|
|
14822
|
-
right:
|
|
14838
|
+
right: z,
|
|
14823
14839
|
top: "50%",
|
|
14824
14840
|
transform: "translateY(-50%)"
|
|
14825
14841
|
},
|
|
14826
14842
|
align: "right"
|
|
14827
14843
|
}
|
|
14828
|
-
},
|
|
14829
|
-
if (!r.position || !
|
|
14830
|
-
let a =
|
|
14844
|
+
}, le = (e, t, n) => e.when ? typeof e.when == "function" ? e.when(t, n) : Object.entries(e.when).every(([e, n]) => t[e] === n) : !0, ue = (e, t, n) => e.render ? e.render(t, n) : typeof e.badge == "function" ? e.badge(t, n) : e.badge, de = (e, n) => i?.length ? i.map((r, i) => {
|
|
14845
|
+
if (!r.position || !le(r, e, n)) return null;
|
|
14846
|
+
let a = ue(r, e, n);
|
|
14831
14847
|
if (a == null || a === !1) return null;
|
|
14832
|
-
let o =
|
|
14833
|
-
return o ? /* @__PURE__ */ t.createElement(t.Fragment, { key: `${r.position}-${i}` },
|
|
14848
|
+
let o = ce[r.position];
|
|
14849
|
+
return o ? /* @__PURE__ */ t.createElement(t.Fragment, { key: `${r.position}-${i}` }, se(a, {
|
|
14834
14850
|
...o.style,
|
|
14835
14851
|
...r.style
|
|
14836
14852
|
}, o.align, r.className)) : null;
|
|
14837
|
-
}) : null,
|
|
14838
|
-
let n =
|
|
14839
|
-
if (r && r.recordRef === e && r.overlaysRef === i && r.onClickRef ===
|
|
14853
|
+
}) : null, fe = s((e, t) => {
|
|
14854
|
+
let n = ee(e, t), r = re.current.get(n);
|
|
14855
|
+
if (r && r.recordRef === e && r.overlaysRef === i && r.onClickRef === o && r.rowIndex === t) return {
|
|
14840
14856
|
image: r.image,
|
|
14841
14857
|
overlays: r.overlays
|
|
14842
14858
|
};
|
|
14843
|
-
let
|
|
14844
|
-
image:
|
|
14845
|
-
overlays:
|
|
14859
|
+
let a = {
|
|
14860
|
+
image: ae(e, t),
|
|
14861
|
+
overlays: de(e, t)
|
|
14846
14862
|
};
|
|
14847
|
-
return
|
|
14863
|
+
return re.current.set(n, {
|
|
14848
14864
|
recordRef: e,
|
|
14849
14865
|
overlaysRef: i,
|
|
14850
|
-
onClickRef:
|
|
14866
|
+
onClickRef: o,
|
|
14851
14867
|
rowIndex: t,
|
|
14852
|
-
image:
|
|
14853
|
-
overlays:
|
|
14854
|
-
}),
|
|
14868
|
+
image: a.image,
|
|
14869
|
+
overlays: a.overlays
|
|
14870
|
+
}), a;
|
|
14855
14871
|
}, [
|
|
14856
|
-
|
|
14857
|
-
|
|
14872
|
+
ee,
|
|
14873
|
+
o,
|
|
14858
14874
|
i
|
|
14859
|
-
]),
|
|
14860
|
-
let r =
|
|
14875
|
+
]), q = (e, n) => {
|
|
14876
|
+
let r = ee(n, e), i = G.includes(r), s = j?.split(/\s+/).filter(Boolean) || [], c = a ? null : fe(n, e), l = a ? a(n, e, {
|
|
14877
|
+
isSelected: i,
|
|
14878
|
+
toggleSelection: () => ie(n, e)
|
|
14879
|
+
}) : null;
|
|
14861
14880
|
return /* @__PURE__ */ t.createElement("div", {
|
|
14862
14881
|
key: r,
|
|
14863
|
-
className: X("item min-w-0", i &&
|
|
14882
|
+
className: X("item min-w-0", i && s),
|
|
14864
14883
|
style: {
|
|
14865
|
-
flex: `0 0 ${
|
|
14866
|
-
maxWidth:
|
|
14884
|
+
flex: `0 0 ${V}`,
|
|
14885
|
+
maxWidth: V
|
|
14867
14886
|
}
|
|
14868
|
-
}, /* @__PURE__ */ t.createElement("div", {
|
|
14887
|
+
}, /* @__PURE__ */ t.createElement("div", {
|
|
14888
|
+
className: X("relative", !a && "overflow-hidden rounded-lg", a && o && "cursor-pointer"),
|
|
14889
|
+
onClick: a && o ? (e) => K(e, n) : void 0
|
|
14890
|
+
}, te && /* @__PURE__ */ t.createElement("label", { className: "absolute left-3 top-3 z-20 inline-flex items-center rounded bg-background/90 px-2 py-1 shadow-sm" }, /* @__PURE__ */ t.createElement("input", {
|
|
14869
14891
|
type: "checkbox",
|
|
14870
|
-
"aria-label": Dn(
|
|
14892
|
+
"aria-label": Dn(k.selectItem, { key: r }),
|
|
14871
14893
|
checked: i,
|
|
14872
|
-
onChange: () =>
|
|
14894
|
+
onChange: () => ie(n, e),
|
|
14873
14895
|
onClick: (e) => e.stopPropagation()
|
|
14874
|
-
})),
|
|
14875
|
-
},
|
|
14896
|
+
})), a ? l : /* @__PURE__ */ t.createElement(t.Fragment, null, c.image, c.overlays)));
|
|
14897
|
+
}, pe = (e, t) => {
|
|
14876
14898
|
let n = Array.isArray(t) ? t : [t], r = /* @__PURE__ */ new Map();
|
|
14877
14899
|
return e.forEach((e, t) => {
|
|
14878
14900
|
let i = n.map((t) => String(e[t] ?? "")).join(" · ") || "-";
|
|
@@ -14885,48 +14907,49 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14885
14907
|
groupName: e,
|
|
14886
14908
|
items: t
|
|
14887
14909
|
}));
|
|
14888
|
-
},
|
|
14910
|
+
}, me = p(() => {
|
|
14889
14911
|
if (!Array.isArray(e)) return;
|
|
14890
|
-
let t = zs.records(e,
|
|
14891
|
-
return
|
|
14912
|
+
let t = zs.records(e, U) || [];
|
|
14913
|
+
return _ ? pe(t, _) : t.map((e, t) => ({
|
|
14892
14914
|
kind: "item",
|
|
14893
14915
|
item: e,
|
|
14894
14916
|
index: t
|
|
14895
14917
|
}));
|
|
14896
14918
|
}, [
|
|
14897
14919
|
e,
|
|
14898
|
-
|
|
14899
|
-
|
|
14920
|
+
_,
|
|
14921
|
+
U
|
|
14900
14922
|
]);
|
|
14901
|
-
return
|
|
14902
|
-
records:
|
|
14903
|
-
appendTo:
|
|
14923
|
+
return me === void 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, /* @__PURE__ */ t.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : me.length === 0 ? /* @__PURE__ */ t.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ t.createElement("div", { className: X("flex items-stretch gap-3", x || O.Gallery.wrapperClassName) }, y && /* @__PURE__ */ t.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, y), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", S || O.Gallery.className) }, n && /* @__PURE__ */ t.createElement("div", { className: C || O.Gallery.headerClassName }, n), /* @__PURE__ */ t.createElement(Z, { className: X("min-w-0 flex-1", w || O.Gallery.scrollClassName) }, /* @__PURE__ */ t.createElement(Gp, {
|
|
14924
|
+
records: me,
|
|
14925
|
+
appendTo: M,
|
|
14904
14926
|
wrapperClassName: "px-3 pt-4 pb-2",
|
|
14905
|
-
...
|
|
14927
|
+
...d || {}
|
|
14906
14928
|
}, (e) => /* @__PURE__ */ t.createElement("div", { className: "p-3" }, /* @__PURE__ */ t.createElement("div", {
|
|
14907
|
-
className: "flex flex-wrap text-center items-center " + (
|
|
14908
|
-
style: { gap:
|
|
14929
|
+
className: "flex flex-wrap text-center items-center " + (T || O.Gallery.bodyClassName),
|
|
14930
|
+
style: { gap: R }
|
|
14909
14931
|
}, e.map((e) => e.kind === "group" ? /* @__PURE__ */ t.createElement("section", {
|
|
14910
14932
|
key: e.groupName,
|
|
14911
14933
|
className: "gallery-group rounded-lg border bg-card p-3 text-left"
|
|
14912
14934
|
}, /* @__PURE__ */ t.createElement("h3", { className: "mb-3 text-sm font-semibold uppercase tracking-wide text-muted-foreground" }, e.groupName), /* @__PURE__ */ t.createElement("div", {
|
|
14913
14935
|
className: X("flex flex-wrap items-center"),
|
|
14914
|
-
style: { gap:
|
|
14915
|
-
}, e.items.map(({ item: e, index: t }) =>
|
|
14916
|
-
ref:
|
|
14936
|
+
style: { gap: R }
|
|
14937
|
+
}, e.items.map(({ item: e, index: t }) => q(t, e)))) : q(e.index, e.item)))))), /* @__PURE__ */ t.createElement("div", {
|
|
14938
|
+
ref: P,
|
|
14917
14939
|
className: "mt-auto"
|
|
14918
|
-
}), r && /* @__PURE__ */ t.createElement("div", { className:
|
|
14940
|
+
}), r && /* @__PURE__ */ t.createElement("div", { className: E || O.Gallery.footerClassName }, r)), b && /* @__PURE__ */ t.createElement("div", { className: "gallery-after flex shrink-0 items-center self-stretch" }, b));
|
|
14919
14941
|
};
|
|
14920
14942
|
//#endregion
|
|
14921
14943
|
//#region src/components/widgets/grid-core/GridGalleryView.tsx
|
|
14922
|
-
function
|
|
14923
|
-
let
|
|
14944
|
+
function qp({ records: e, recordId: n, sortable: r, pagination: i, selection: a = !1, selectedKeys: o, onSelectionChange: s, onRowClick: c, groupBy: l, wrapperClassName: u, before: d, after: f, columns: m, overlays: h, renderItem: g }) {
|
|
14945
|
+
let _ = p(() => Wf(n), [n]), v = p(() => e.reduce((e, t) => (e.set(_(t), t), e), /* @__PURE__ */ new Map()), [_, e]), y = p(() => e.map((e) => ({
|
|
14924
14946
|
...e,
|
|
14925
|
-
[za]:
|
|
14926
|
-
})), [e,
|
|
14927
|
-
return /* @__PURE__ */ t.createElement(
|
|
14928
|
-
records:
|
|
14947
|
+
[za]: _(e)
|
|
14948
|
+
})), [e, _]);
|
|
14949
|
+
return /* @__PURE__ */ t.createElement(Kp, {
|
|
14950
|
+
records: y,
|
|
14929
14951
|
overlays: h,
|
|
14952
|
+
renderItem: g ? (e, t, n) => g(e, t, n) : void 0,
|
|
14930
14953
|
sortable: r,
|
|
14931
14954
|
pagination: i,
|
|
14932
14955
|
selectedKeys: a ? o : void 0,
|
|
@@ -14934,7 +14957,7 @@ function Jp({ records: e, recordId: n, sortable: r, pagination: i, selection: a
|
|
|
14934
14957
|
let t = e.keys, n = e.records;
|
|
14935
14958
|
if (a === "single" && e.keys.length > 1) {
|
|
14936
14959
|
let r = e.keys[e.keys.length - 1];
|
|
14937
|
-
t = r ? [r] : [], n = r &&
|
|
14960
|
+
t = r ? [r] : [], n = r && v.get(r) ? [v.get(r)] : [];
|
|
14938
14961
|
}
|
|
14939
14962
|
let r = {
|
|
14940
14963
|
keys: t,
|
|
@@ -14959,8 +14982,8 @@ function Jp({ records: e, recordId: n, sortable: r, pagination: i, selection: a
|
|
|
14959
14982
|
}
|
|
14960
14983
|
//#endregion
|
|
14961
14984
|
//#region src/components/widgets/grid-core/useGridActions.tsx
|
|
14962
|
-
function
|
|
14963
|
-
let _ = x(), v = S(), y = u(), b = _d(), C = p(() =>
|
|
14985
|
+
function Jp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId: a, sourcePath: o, db: c, onSave: d, onDelete: f, onComplete: m, audit: g = !1 }) {
|
|
14986
|
+
let _ = x(), v = S(), y = u(), b = _d(), C = p(() => Wf(a), [a]), w = p(() => Xf(e, !!n), [e, n]), [T, E] = h(null), D = p(() => `${Uf(o || "grid-records")}-${Uf(y)}`, [y, o]), O = s(() => {
|
|
14964
14987
|
E(null), r && _.hash.startsWith(`#${D}:`) && v({
|
|
14965
14988
|
pathname: _.pathname,
|
|
14966
14989
|
search: _.search,
|
|
@@ -14991,7 +15014,7 @@ function Yp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId
|
|
|
14991
15014
|
o
|
|
14992
15015
|
]), A = s(async () => b.save(), [b]), j = s(async (e, t) => {
|
|
14993
15016
|
let n = w[e];
|
|
14994
|
-
if (!n || !
|
|
15017
|
+
if (!n || !Zf(n, t) || Qf(n, t)) return;
|
|
14995
15018
|
let i = {
|
|
14996
15019
|
actionKey: e,
|
|
14997
15020
|
record: t,
|
|
@@ -15153,8 +15176,8 @@ function Yp({ actions: e, form: n, editDeepLink: r, preparedRecords: i, recordId
|
|
|
15153
15176
|
}
|
|
15154
15177
|
//#endregion
|
|
15155
15178
|
//#region src/components/widgets/grid-core/useGridColumns.ts
|
|
15156
|
-
function
|
|
15157
|
-
return p(() =>
|
|
15179
|
+
function Yp({ columns: e, records: t, form: n }) {
|
|
15180
|
+
return p(() => Yf(e, t, n), [
|
|
15158
15181
|
e,
|
|
15159
15182
|
n,
|
|
15160
15183
|
t
|
|
@@ -15162,7 +15185,7 @@ function Xp({ columns: e, records: t, form: n }) {
|
|
|
15162
15185
|
}
|
|
15163
15186
|
//#endregion
|
|
15164
15187
|
//#region src/components/widgets/grid-core/useGridPreparedRecords.ts
|
|
15165
|
-
function
|
|
15188
|
+
function Xp({ records: e, onLoad: t }) {
|
|
15166
15189
|
let [n, r] = h(e), [i, a] = h(!1);
|
|
15167
15190
|
return l(() => {
|
|
15168
15191
|
if (!t) {
|
|
@@ -15185,7 +15208,7 @@ function Zp({ records: e, onLoad: t }) {
|
|
|
15185
15208
|
}
|
|
15186
15209
|
//#endregion
|
|
15187
15210
|
//#region src/components/widgets/grid-core/useGridSelection.ts
|
|
15188
|
-
function
|
|
15211
|
+
function Zp({ selection: e }) {
|
|
15189
15212
|
let t = e !== null && e !== !1 && typeof e == "object", n = e ? typeof e == "string" ? e : e.mode : !1, r = t ? e.defaultKeys : void 0, i = t ? e.onChange : void 0, [a, o] = h(r ?? []), [c, u] = h([]);
|
|
15190
15213
|
l(() => {
|
|
15191
15214
|
o(r ?? []), u([]);
|
|
@@ -15218,7 +15241,7 @@ function Qp({ selection: e }) {
|
|
|
15218
15241
|
}
|
|
15219
15242
|
//#endregion
|
|
15220
15243
|
//#region src/components/widgets/grid-core/GridCore.tsx
|
|
15221
|
-
var
|
|
15244
|
+
var Qp = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function" ? t.title(n) : t.title || r : t?.kind === "modal" ? typeof t.title == "function" ? t.title(n) : t.title || $f(e, t, i) : $f(e, t, i), $p = (e) => {
|
|
15222
15245
|
switch (e.kind) {
|
|
15223
15246
|
case "select": return "";
|
|
15224
15247
|
case "multiselect": return [];
|
|
@@ -15232,7 +15255,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
15232
15255
|
};
|
|
15233
15256
|
default: return e.defaultValue ?? !1;
|
|
15234
15257
|
}
|
|
15235
|
-
},
|
|
15258
|
+
}, em = (e, t) => {
|
|
15236
15259
|
switch (e.kind) {
|
|
15237
15260
|
case "select": return typeof t == "string" && t !== "";
|
|
15238
15261
|
case "multiselect": return Array.isArray(t) && t.length > 0;
|
|
@@ -15246,7 +15269,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
15246
15269
|
}
|
|
15247
15270
|
default: return !!t != !!(e.defaultValue ?? !1);
|
|
15248
15271
|
}
|
|
15249
|
-
},
|
|
15272
|
+
}, tm = (e, t, n) => {
|
|
15250
15273
|
switch (e.kind) {
|
|
15251
15274
|
case "select": return e.predicate(t, n);
|
|
15252
15275
|
case "multiselect": return e.predicate(t, n);
|
|
@@ -15254,7 +15277,7 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
15254
15277
|
case "numberRange": return e.predicate(t, n);
|
|
15255
15278
|
default: return e.predicate(t, n);
|
|
15256
15279
|
}
|
|
15257
|
-
},
|
|
15280
|
+
}, nm = (e, t, n) => {
|
|
15258
15281
|
switch (e.kind) {
|
|
15259
15282
|
case "select": {
|
|
15260
15283
|
let n = e.options.find((e) => e.value === t);
|
|
@@ -15278,10 +15301,10 @@ var $p = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
15278
15301
|
}
|
|
15279
15302
|
default: return e.label;
|
|
15280
15303
|
}
|
|
15281
|
-
},
|
|
15282
|
-
function
|
|
15304
|
+
}, rm = "w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring";
|
|
15305
|
+
function im({ filter: e, value: n, onChange: r, dict: i }) {
|
|
15283
15306
|
if (e.kind === "select") return /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("select", {
|
|
15284
|
-
className:
|
|
15307
|
+
className: rm,
|
|
15285
15308
|
value: n,
|
|
15286
15309
|
onChange: (e) => r(e.target.value)
|
|
15287
15310
|
}, /* @__PURE__ */ t.createElement("option", { value: "" }, i.filtersSelectPlaceholder), e.options.map((e) => /* @__PURE__ */ t.createElement("option", {
|
|
@@ -15303,7 +15326,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15303
15326
|
let a = n;
|
|
15304
15327
|
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeFrom), /* @__PURE__ */ t.createElement("input", {
|
|
15305
15328
|
type: "date",
|
|
15306
|
-
className:
|
|
15329
|
+
className: rm,
|
|
15307
15330
|
value: a.from,
|
|
15308
15331
|
onChange: (e) => r({
|
|
15309
15332
|
...a,
|
|
@@ -15311,7 +15334,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15311
15334
|
})
|
|
15312
15335
|
})), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeTo), /* @__PURE__ */ t.createElement("input", {
|
|
15313
15336
|
type: "date",
|
|
15314
|
-
className:
|
|
15337
|
+
className: rm,
|
|
15315
15338
|
value: a.to,
|
|
15316
15339
|
onChange: (e) => r({
|
|
15317
15340
|
...a,
|
|
@@ -15323,7 +15346,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15323
15346
|
let a = n;
|
|
15324
15347
|
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ t.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMin), /* @__PURE__ */ t.createElement("input", {
|
|
15325
15348
|
type: "number",
|
|
15326
|
-
className:
|
|
15349
|
+
className: rm,
|
|
15327
15350
|
value: a.min ?? "",
|
|
15328
15351
|
onChange: (e) => r({
|
|
15329
15352
|
...a,
|
|
@@ -15331,7 +15354,7 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15331
15354
|
})
|
|
15332
15355
|
})), /* @__PURE__ */ t.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ t.createElement("span", { className: "text-xs text-muted-foreground" }, i.filtersRangeMax), /* @__PURE__ */ t.createElement("input", {
|
|
15333
15356
|
type: "number",
|
|
15334
|
-
className:
|
|
15357
|
+
className: rm,
|
|
15335
15358
|
value: a.max ?? "",
|
|
15336
15359
|
onChange: (e) => r({
|
|
15337
15360
|
...a,
|
|
@@ -15350,25 +15373,25 @@ function am({ filter: e, value: n, onChange: r, dict: i }) {
|
|
|
15350
15373
|
className: X("pointer-events-none absolute inset-0 rounded-full transition-colors duration-200 ease-out peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2", a ? "bg-primary" : "bg-muted-foreground/35")
|
|
15351
15374
|
}, /* @__PURE__ */ t.createElement("span", { className: X("pointer-events-none absolute top-0.5 left-0.5 h-4 w-4 rounded-full bg-background shadow-sm transition-transform duration-200 ease-out", a && "translate-x-4") }))), /* @__PURE__ */ t.createElement("span", { className: "text-sm text-foreground" }, e.label));
|
|
15352
15375
|
}
|
|
15353
|
-
function
|
|
15354
|
-
let R = Y("grid"), z = Fn("grid"), B = Fn("common"), V = p(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Ti(), { preparedRecords: U, loading: W } =
|
|
15376
|
+
function am({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, form: o, editDeepLink: c, header: u, footer: d, view: f = "table", views: m, sticky: g, wrapperClassName: _, cardClassName: v, bodyClassName: y, loading: b = !1, title: x, before: S, after: C, sortable: w = !0, pagination: T, selection: E, onRowClick: D, reorderable: O = !1, onReorder: k, groupBy: A, searchable: j, filters: M, onSave: N, onDelete: P, onComplete: F, audit: I = !1, onLoad: L }) {
|
|
15377
|
+
let R = Y("grid"), z = Fn("grid"), B = Fn("common"), V = p(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Ti(), { preparedRecords: U, loading: W } = Xp({
|
|
15355
15378
|
records: e,
|
|
15356
15379
|
onLoad: L
|
|
15357
|
-
}), ee =
|
|
15380
|
+
}), ee = Yp({
|
|
15358
15381
|
columns: i,
|
|
15359
15382
|
records: U,
|
|
15360
15383
|
form: o
|
|
15361
|
-
}), [G,
|
|
15362
|
-
|
|
15384
|
+
}), [G, te] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, $p(e)]))), [ne, re] = h(!1), K = s((e, t) => {
|
|
15385
|
+
te((n) => ({
|
|
15363
15386
|
...n,
|
|
15364
15387
|
[e]: t
|
|
15365
15388
|
}));
|
|
15366
15389
|
}, []), ie = s((e) => {
|
|
15367
|
-
|
|
15390
|
+
te((t) => ({
|
|
15368
15391
|
...t,
|
|
15369
|
-
[e.key]:
|
|
15392
|
+
[e.key]: $p(e)
|
|
15370
15393
|
}));
|
|
15371
|
-
}, []), ae = (M ?? []).filter((e) =>
|
|
15394
|
+
}, []), ae = (M ?? []).filter((e) => em(e, G[e.key] ?? $p(e))), oe = p(() => !M || M.length === 0 ? U : U.filter((e) => M.every((t) => tm(t, e, G[t.key] ?? $p(t)))), [
|
|
15372
15395
|
U,
|
|
15373
15396
|
M,
|
|
15374
15397
|
G
|
|
@@ -15378,33 +15401,33 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15378
15401
|
title: z.filtersButton,
|
|
15379
15402
|
variant: "link",
|
|
15380
15403
|
badge: ae.length > 0 ? ae.length : void 0,
|
|
15381
|
-
onClick: () =>
|
|
15404
|
+
onClick: () => re(!0)
|
|
15382
15405
|
}) : null, ce = (M ?? []).length > 0 && ae.length > 0 ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-1.5" }, ae.map((e) => /* @__PURE__ */ t.createElement(Qn, {
|
|
15383
15406
|
key: e.key,
|
|
15384
15407
|
variant: "info",
|
|
15385
15408
|
className: "inline-flex items-center gap-1"
|
|
15386
|
-
},
|
|
15409
|
+
}, nm(e, G[e.key] ?? $p(e), z), /* @__PURE__ */ t.createElement(Hr, {
|
|
15387
15410
|
icon: "x",
|
|
15388
15411
|
variant: "link",
|
|
15389
15412
|
ariaLabel: `${z.filtersClearAll} ${e.label}`,
|
|
15390
15413
|
title: `${z.filtersClearAll} ${e.label}`,
|
|
15391
15414
|
onClick: () => ie(e)
|
|
15392
|
-
})))) : null, le = !j && se ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, se, ce) : null, ue =
|
|
15415
|
+
})))) : null, le = !j && se ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, se, ce) : null, ue = ne && M && M.length > 0 ? /* @__PURE__ */ t.createElement(Mi, {
|
|
15393
15416
|
title: z.filtersPanelTitle,
|
|
15394
15417
|
size: "md",
|
|
15395
15418
|
position: "right",
|
|
15396
|
-
onClose: () =>
|
|
15419
|
+
onClose: () => re(!1),
|
|
15397
15420
|
footer: /* @__PURE__ */ t.createElement(Hr, {
|
|
15398
15421
|
label: z.filtersClearAll,
|
|
15399
15422
|
variant: "link",
|
|
15400
15423
|
disabled: ae.length === 0,
|
|
15401
|
-
onClick: () =>
|
|
15424
|
+
onClick: () => te(Object.fromEntries(M.map((e) => [e.key, $p(e)])))
|
|
15402
15425
|
})
|
|
15403
|
-
}, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(
|
|
15426
|
+
}, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(im, {
|
|
15404
15427
|
key: e.key,
|
|
15405
15428
|
filter: e,
|
|
15406
|
-
value: G[e.key] ??
|
|
15407
|
-
onChange: (t) =>
|
|
15429
|
+
value: G[e.key] ?? $p(e),
|
|
15430
|
+
onChange: (t) => K(e.key, t),
|
|
15408
15431
|
dict: z
|
|
15409
15432
|
})))) : null, de = j === !0 ? {} : j || void 0, [fe, q] = h(""), pe = p(() => {
|
|
15410
15433
|
if (!de || !fe.trim()) return oe;
|
|
@@ -15438,6 +15461,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15438
15461
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
15439
15462
|
});
|
|
15440
15463
|
}, []), Oe = p(() => we.filter((e) => !Te.has(String(e.key))), [we, Te]), ke = p(() => {
|
|
15464
|
+
if (_e.renderItem) return;
|
|
15441
15465
|
let e = [];
|
|
15442
15466
|
if (Oe.length) {
|
|
15443
15467
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -15457,7 +15481,11 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15457
15481
|
}
|
|
15458
15482
|
let n = [..._e.overlays ?? [], ...e];
|
|
15459
15483
|
return n.length ? n : void 0;
|
|
15460
|
-
}, [
|
|
15484
|
+
}, [
|
|
15485
|
+
_e.overlays,
|
|
15486
|
+
_e.renderItem,
|
|
15487
|
+
Oe
|
|
15488
|
+
]), { mode: Ae, activeSelectionKeys: je, selectionState: Me, handleSelectionChange: Ne } = Zp({ selection: E }), { normalizedActions: Pe, activeAction: Fe, activeActionConfig: J, activeActionBody: Ie, activeKey: Le, runAction: Re, close: ze, getActionContext: Be, getModalActionContext: Ve, getRecordKey: He, formController: Ue } = Jp({
|
|
15461
15489
|
actions: a,
|
|
15462
15490
|
form: o,
|
|
15463
15491
|
editDeepLink: c,
|
|
@@ -15487,18 +15515,18 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15487
15515
|
Re
|
|
15488
15516
|
]), qe = D || Ge ? Ke : void 0, Je = s((e, n, r) => {
|
|
15489
15517
|
let i = Pe[e];
|
|
15490
|
-
return !i || !
|
|
15518
|
+
return !i || !Zf(i, n) ? null : /* @__PURE__ */ t.createElement(Hr, {
|
|
15491
15519
|
className: r || (e === "add" ? "btn-primary" : void 0),
|
|
15492
15520
|
icon: i.icon,
|
|
15493
|
-
label:
|
|
15494
|
-
disabled:
|
|
15521
|
+
label: $f(e, i, V),
|
|
15522
|
+
disabled: Qf(i, n),
|
|
15495
15523
|
onClick: () => Re(e, n)
|
|
15496
15524
|
});
|
|
15497
15525
|
}, [
|
|
15498
15526
|
Pe,
|
|
15499
15527
|
Re,
|
|
15500
15528
|
V
|
|
15501
|
-
]), Ye = p(() => Object.entries(Pe).filter(([e, t]) => e !== "edit" && e !== "delete" &&
|
|
15529
|
+
]), Ye = p(() => Object.entries(Pe).filter(([e, t]) => e !== "edit" && e !== "delete" && Zf(t, void 0)).map(([e]) => e), [Pe]), Xe = p(() => ({
|
|
15502
15530
|
title: x,
|
|
15503
15531
|
records: U,
|
|
15504
15532
|
selection: Me,
|
|
@@ -15591,7 +15619,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15591
15619
|
if (J.footer === !1) return !1;
|
|
15592
15620
|
if (!(J.footer === void 0 || !rt)) return typeof J.footer == "function" ? J.footer(rt) : J.footer;
|
|
15593
15621
|
}
|
|
15594
|
-
}, [J, rt]), ot =
|
|
15622
|
+
}, [J, rt]), ot = ep(w);
|
|
15595
15623
|
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(ji, {
|
|
15596
15624
|
wrapperClassName: _,
|
|
15597
15625
|
header: tt,
|
|
@@ -15601,7 +15629,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15601
15629
|
bodyClassName: X(R.Grid.Card.bodyClassName, y),
|
|
15602
15630
|
footerClassName: R.Grid.Card.footerClassName,
|
|
15603
15631
|
loading: b || W
|
|
15604
|
-
}, ve === "gallery" ? /* @__PURE__ */ t.createElement(
|
|
15632
|
+
}, ve === "gallery" ? /* @__PURE__ */ t.createElement(qp, {
|
|
15605
15633
|
records: pe,
|
|
15606
15634
|
recordId: n,
|
|
15607
15635
|
sortable: ot || w,
|
|
@@ -15615,8 +15643,9 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15615
15643
|
before: S,
|
|
15616
15644
|
after: C,
|
|
15617
15645
|
columns: _e.columns,
|
|
15618
|
-
overlays: ke
|
|
15619
|
-
|
|
15646
|
+
overlays: ke,
|
|
15647
|
+
renderItem: _e.renderItem
|
|
15648
|
+
}) : /* @__PURE__ */ t.createElement(tp, {
|
|
15620
15649
|
records: pe,
|
|
15621
15650
|
recordId: n,
|
|
15622
15651
|
columns: Ce,
|
|
@@ -15642,7 +15671,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15642
15671
|
size: (J.kind === "modal" || J.kind === "delete") && J.size || R.Grid.Modal.size,
|
|
15643
15672
|
position: (J.kind === "modal" || J.kind === "delete") && J.position || R.Grid.Modal.position,
|
|
15644
15673
|
header: it,
|
|
15645
|
-
title:
|
|
15674
|
+
title: Qp(Fe.actionKey, J, J.kind === "modal" || J.kind === "delete" ? Ve(Fe.actionKey, Fe.record) : Be(Fe.actionKey, Fe.record), z.deleteConfirm, V),
|
|
15646
15675
|
onClose: ze,
|
|
15647
15676
|
onSave: J.kind === "modal" && J.footer === void 0 && (Fe.actionKey === "add" || Fe.actionKey === "edit") ? (e) => Ue.save(e) : void 0,
|
|
15648
15677
|
onDelete: J.kind === "delete" ? async () => {
|
|
@@ -15670,18 +15699,18 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15670
15699
|
}
|
|
15671
15700
|
//#endregion
|
|
15672
15701
|
//#region src/components/widgets/grid-core/GridArray.tsx
|
|
15673
|
-
function
|
|
15674
|
-
return /* @__PURE__ */ t.createElement(
|
|
15702
|
+
function om(e) {
|
|
15703
|
+
return /* @__PURE__ */ t.createElement(am, e);
|
|
15675
15704
|
}
|
|
15676
15705
|
//#endregion
|
|
15677
15706
|
//#region src/components/widgets/Grid.tsx
|
|
15678
|
-
function
|
|
15679
|
-
return "records" in e ? /* @__PURE__ */ t.createElement(
|
|
15707
|
+
function sm(e) {
|
|
15708
|
+
return "records" in e ? /* @__PURE__ */ t.createElement(om, e) : /* @__PURE__ */ t.createElement(Hf, e);
|
|
15680
15709
|
}
|
|
15681
15710
|
//#endregion
|
|
15682
15711
|
//#region src/pages/Users.tsx
|
|
15683
|
-
function
|
|
15684
|
-
return /* @__PURE__ */ t.createElement(
|
|
15712
|
+
function cm() {
|
|
15713
|
+
return /* @__PURE__ */ t.createElement(sm, {
|
|
15685
15714
|
path: "/users",
|
|
15686
15715
|
recordId: (e) => `${e.email ?? ""}`.replace("@", "-"),
|
|
15687
15716
|
form: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(vs, {
|
|
@@ -15708,10 +15737,10 @@ function lm() {
|
|
|
15708
15737
|
}
|
|
15709
15738
|
//#endregion
|
|
15710
15739
|
//#region src/pages/NotFound.tsx
|
|
15711
|
-
var
|
|
15740
|
+
var lm = () => {
|
|
15712
15741
|
let e = Fn("common");
|
|
15713
15742
|
return /* @__PURE__ */ t.createElement("div", { className: "flex flex-col justify-center items-center vh-100" }, /* @__PURE__ */ t.createElement("h1", null, "404"), /* @__PURE__ */ t.createElement("p", null, e.notFoundMessage), /* @__PURE__ */ t.createElement(v, { to: "/" }, /* @__PURE__ */ t.createElement(Q, { name: "house-door" }), " ", e.goHome));
|
|
15714
|
-
},
|
|
15743
|
+
}, um = ({ size: e = 28 }) => /* @__PURE__ */ t.createElement("svg", {
|
|
15715
15744
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15716
15745
|
width: e,
|
|
15717
15746
|
height: e,
|
|
@@ -15731,7 +15760,7 @@ var um = () => {
|
|
|
15731
15760
|
x2: "12.01",
|
|
15732
15761
|
y1: "17",
|
|
15733
15762
|
y2: "17"
|
|
15734
|
-
})),
|
|
15763
|
+
})), dm = ({ open: e }) => /* @__PURE__ */ t.createElement("svg", {
|
|
15735
15764
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15736
15765
|
width: "13",
|
|
15737
15766
|
height: "13",
|
|
@@ -15746,7 +15775,7 @@ var um = () => {
|
|
|
15746
15775
|
transform: e ? "rotate(180deg)" : "none",
|
|
15747
15776
|
flexShrink: 0
|
|
15748
15777
|
}
|
|
15749
|
-
}, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })),
|
|
15778
|
+
}, /* @__PURE__ */ t.createElement("polyline", { points: "6 9 12 15 18 9" })), fm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15750
15779
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15751
15780
|
width: "13",
|
|
15752
15781
|
height: "13",
|
|
@@ -15763,7 +15792,7 @@ var um = () => {
|
|
|
15763
15792
|
y: "8",
|
|
15764
15793
|
rx: "2",
|
|
15765
15794
|
ry: "2"
|
|
15766
|
-
}), /* @__PURE__ */ t.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })),
|
|
15795
|
+
}), /* @__PURE__ */ t.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })), pm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15767
15796
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15768
15797
|
width: "13",
|
|
15769
15798
|
height: "13",
|
|
@@ -15773,7 +15802,7 @@ var um = () => {
|
|
|
15773
15802
|
strokeWidth: "2",
|
|
15774
15803
|
strokeLinecap: "round",
|
|
15775
15804
|
strokeLinejoin: "round"
|
|
15776
|
-
}, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })),
|
|
15805
|
+
}, /* @__PURE__ */ t.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ t.createElement("path", { d: "M22 2 11 13" })), mm = () => /* @__PURE__ */ t.createElement("svg", {
|
|
15777
15806
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15778
15807
|
width: "14",
|
|
15779
15808
|
height: "14",
|
|
@@ -15783,7 +15812,7 @@ var um = () => {
|
|
|
15783
15812
|
strokeWidth: "2",
|
|
15784
15813
|
strokeLinecap: "round",
|
|
15785
15814
|
strokeLinejoin: "round"
|
|
15786
|
-
}, /* @__PURE__ */ t.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ t.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ t.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ t.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ t.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ t.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ t.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ t.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })),
|
|
15815
|
+
}, /* @__PURE__ */ t.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ t.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6z" }), /* @__PURE__ */ t.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ t.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ t.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ t.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ t.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ t.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ t.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })), hm = (e, t) => ({
|
|
15787
15816
|
error: {
|
|
15788
15817
|
message: e.message,
|
|
15789
15818
|
stack: e.stack ?? ""
|
|
@@ -15794,8 +15823,8 @@ var um = () => {
|
|
|
15794
15823
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
15795
15824
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
15796
15825
|
}
|
|
15797
|
-
}),
|
|
15798
|
-
let n =
|
|
15826
|
+
}), gm = (e, t) => {
|
|
15827
|
+
let n = hm(e, t);
|
|
15799
15828
|
return [
|
|
15800
15829
|
`Error: ${n.error.message}`,
|
|
15801
15830
|
"",
|
|
@@ -15810,7 +15839,7 @@ var um = () => {
|
|
|
15810
15839
|
`Timestamp: ${n.context.timestamp}`,
|
|
15811
15840
|
`Agent: ${n.context.userAgent}`
|
|
15812
15841
|
].join("\n");
|
|
15813
|
-
},
|
|
15842
|
+
}, _m = class extends t.Component {
|
|
15814
15843
|
constructor(e) {
|
|
15815
15844
|
super(e), this.state = {
|
|
15816
15845
|
error: null,
|
|
@@ -15832,7 +15861,7 @@ var um = () => {
|
|
|
15832
15861
|
};
|
|
15833
15862
|
copy = () => {
|
|
15834
15863
|
let { error: e, errorInfo: t } = this.state;
|
|
15835
|
-
e && navigator.clipboard?.writeText(
|
|
15864
|
+
e && navigator.clipboard?.writeText(gm(e, t)).then(() => {
|
|
15836
15865
|
this.setState({ copied: !0 }), setTimeout(() => this.setState({ copied: !1 }), 2e3);
|
|
15837
15866
|
});
|
|
15838
15867
|
};
|
|
@@ -15841,7 +15870,7 @@ var um = () => {
|
|
|
15841
15870
|
!e || !n || (this.setState({ reportState: "sending" }), fetch(n, {
|
|
15842
15871
|
method: "POST",
|
|
15843
15872
|
headers: { "Content-Type": "application/json" },
|
|
15844
|
-
body: JSON.stringify(
|
|
15873
|
+
body: JSON.stringify(hm(e, t))
|
|
15845
15874
|
}).then((e) => this.setState({ reportState: e.ok ? "sent" : "failed" })).catch(() => this.setState({ reportState: "failed" })));
|
|
15846
15875
|
};
|
|
15847
15876
|
render() {
|
|
@@ -15851,16 +15880,16 @@ var um = () => {
|
|
|
15851
15880
|
if (typeof s == "function") return s(e, this.reset);
|
|
15852
15881
|
if (s != null) return s;
|
|
15853
15882
|
let d = (e.stack ?? e.message).split("\n").map((e) => e.trim()).filter(Boolean), f = (n?.componentStack ?? "").split("\n").map((e) => e.trim()).filter(Boolean), p = l ? "flex min-h-screen flex-col items-center justify-center bg-background p-8" : "flex min-h-[calc(100vh-4rem)] flex-col items-center justify-center p-8";
|
|
15854
|
-
return /* @__PURE__ */ t.createElement("div", { className: p }, /* @__PURE__ */ t.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ t.createElement(
|
|
15883
|
+
return /* @__PURE__ */ t.createElement("div", { className: p }, /* @__PURE__ */ t.createElement("div", { className: "flex w-full max-w-xl flex-col gap-4 rounded-xl border border-destructive/25 bg-destructive/5 p-6" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ t.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ t.createElement(um, { size: 22 })), /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("p", { className: "text-sm font-semibold text-foreground" }, "This page ran into a problem"), /* @__PURE__ */ t.createElement("p", { className: "mt-0.5 text-xs text-muted-foreground" }, "An unexpected error occurred while rendering this content."))), /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border bg-background/60" }, /* @__PURE__ */ t.createElement("button", {
|
|
15855
15884
|
onClick: () => this.setState((e) => ({ detailsOpen: !e.detailsOpen })),
|
|
15856
15885
|
className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-muted-foreground transition-colors hover:text-foreground"
|
|
15857
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15886
|
+
}, /* @__PURE__ */ t.createElement(dm, { open: r }), "Technical details", /* @__PURE__ */ t.createElement("span", { className: "ml-auto truncate max-w-[280px] font-mono text-[11px] text-muted-foreground/70" }, e.message)), r && /* @__PURE__ */ t.createElement("div", { className: "border-t" }, /* @__PURE__ */ t.createElement("pre", { className: "max-h-48 overflow-y-auto px-3 py-3 text-[11px] leading-relaxed text-muted-foreground font-mono whitespace-before-wrap break-all" }, d.join("\n")))), u && /* @__PURE__ */ t.createElement("div", { className: "rounded-lg border border-amber-200/60 bg-amber-50/40 dark:border-amber-900/40 dark:bg-amber-950/20" }, /* @__PURE__ */ t.createElement("button", {
|
|
15858
15887
|
onClick: () => this.setState((e) => ({ debugOpen: !e.debugOpen })),
|
|
15859
15888
|
className: "flex w-full items-center gap-2 px-3 py-2.5 text-left text-xs font-medium text-amber-700 dark:text-amber-400 transition-colors hover:opacity-80"
|
|
15860
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15889
|
+
}, /* @__PURE__ */ t.createElement(mm, null), /* @__PURE__ */ t.createElement(dm, { open: i }), "Debug information", /* @__PURE__ */ t.createElement("span", { className: "ml-auto text-[10px] font-normal opacity-60" }, "DEV")), i && /* @__PURE__ */ t.createElement("div", { className: "border-t border-amber-200/60 dark:border-amber-900/40 px-3 py-3 space-y-3" }, /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Context"), /* @__PURE__ */ t.createElement("dl", { className: "grid grid-cols-[5rem_1fr] gap-x-2 gap-y-0.5 text-[11px] font-mono" }, /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "URL"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground" }, typeof window < "u" ? window.location.href : "-"), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Time"), /* @__PURE__ */ t.createElement("dd", { className: "text-foreground" }, (/* @__PURE__ */ new Date()).toISOString()), /* @__PURE__ */ t.createElement("dt", { className: "text-muted-foreground" }, "Agent"), /* @__PURE__ */ t.createElement("dd", { className: "truncate text-foreground opacity-70" }, typeof navigator < "u" ? navigator.userAgent : "-"))), f.length > 0 && /* @__PURE__ */ t.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ t.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, "Component tree"), /* @__PURE__ */ t.createElement("pre", { className: "max-h-36 overflow-y-auto text-[11px] font-mono leading-relaxed text-foreground/80 whitespace-before-wrap" }, f.join("\n"))), /* @__PURE__ */ t.createElement("button", {
|
|
15861
15890
|
onClick: this.copy,
|
|
15862
15891
|
className: "flex items-center gap-1.5 rounded border px-2.5 py-1 text-[11px] font-medium transition-colors hover:bg-accent"
|
|
15863
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15892
|
+
}, /* @__PURE__ */ t.createElement(fm, null), a ? "Copied!" : "Copy debug info"))), /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ t.createElement("button", {
|
|
15864
15893
|
onClick: this.reset,
|
|
15865
15894
|
className: "rounded-md border bg-background px-4 py-1.5 text-sm font-medium shadow-sm transition-colors hover:bg-accent"
|
|
15866
15895
|
}, "Try again"), /* @__PURE__ */ t.createElement("a", {
|
|
@@ -15870,15 +15899,15 @@ var um = () => {
|
|
|
15870
15899
|
onClick: this.sendReport,
|
|
15871
15900
|
disabled: o === "sending" || o === "sent",
|
|
15872
15901
|
className: "ml-auto flex items-center gap-1.5 rounded-md border px-4 py-1.5 text-sm font-medium transition-colors hover:bg-accent disabled:opacity-50"
|
|
15873
|
-
}, /* @__PURE__ */ t.createElement(
|
|
15902
|
+
}, /* @__PURE__ */ t.createElement(pm, null), o === "idle" && "Send report", o === "sending" && "Sending...", o === "sent" && "Report sent ✓", o === "failed" && "Failed - retry"))));
|
|
15874
15903
|
}
|
|
15875
|
-
},
|
|
15904
|
+
}, vm = async () => {
|
|
15876
15905
|
window.google?.accounts?.id || (vt([{
|
|
15877
15906
|
src: "https://accounts.google.com/gsi/client",
|
|
15878
15907
|
async: !0,
|
|
15879
15908
|
clean: !0
|
|
15880
15909
|
}]), await new Promise((e) => setTimeout(e, 0)));
|
|
15881
|
-
},
|
|
15910
|
+
}, ym = class {
|
|
15882
15911
|
getConfigurationState() {
|
|
15883
15912
|
return oi("GoogleAuthProvider", ai(Oa("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
15884
15913
|
}
|
|
@@ -15901,7 +15930,7 @@ var um = () => {
|
|
|
15901
15930
|
async signIn(e = {}) {
|
|
15902
15931
|
let t = Oa("oAuth2");
|
|
15903
15932
|
if (!this.isConfigured() || !t?.clientId) throw Error("GoogleAuthProvider: missing google.oAuth2.clientId configuration.");
|
|
15904
|
-
return await
|
|
15933
|
+
return await vm(), new Promise((n, r) => {
|
|
15905
15934
|
if (!window.google?.accounts?.id) {
|
|
15906
15935
|
r(/* @__PURE__ */ Error("GoogleAuthProvider: Google Identity Services script is not available."));
|
|
15907
15936
|
return;
|
|
@@ -15935,7 +15964,7 @@ var um = () => {
|
|
|
15935
15964
|
let e = Zr("user");
|
|
15936
15965
|
e?.profile?.sub && window.google?.accounts?.id?.revoke(e.profile.sub), localStorage.removeItem("googleCredentialToken"), $r("user");
|
|
15937
15966
|
let t = Fa();
|
|
15938
|
-
t && await
|
|
15967
|
+
t && await K(t);
|
|
15939
15968
|
}
|
|
15940
15969
|
onAuthChange(e) {
|
|
15941
15970
|
let t = Fa();
|
|
@@ -15982,41 +16011,41 @@ var um = () => {
|
|
|
15982
16011
|
isAuthenticated() {
|
|
15983
16012
|
return !!this.getUser();
|
|
15984
16013
|
}
|
|
15985
|
-
},
|
|
16014
|
+
}, bm = a(null), xm = ({ registry: e, defaultKey: n, children: r }) => {
|
|
15986
16015
|
let i = p(() => ({
|
|
15987
16016
|
registry: e,
|
|
15988
16017
|
defaultKey: n
|
|
15989
16018
|
}), [e, n]);
|
|
15990
|
-
return /* @__PURE__ */ t.createElement(
|
|
15991
|
-
},
|
|
15992
|
-
let t = c(
|
|
16019
|
+
return /* @__PURE__ */ t.createElement(bm.Provider, { value: i }, r);
|
|
16020
|
+
}, Sm = (e) => {
|
|
16021
|
+
let t = c(bm);
|
|
15993
16022
|
if (!t) return null;
|
|
15994
16023
|
let n = e ?? t.defaultKey;
|
|
15995
16024
|
return t.registry[n] ?? null;
|
|
15996
|
-
},
|
|
16025
|
+
}, Cm = a(null), wm = ({ registry: e, defaultKey: n, children: r }) => {
|
|
15997
16026
|
let i = p(() => ({
|
|
15998
16027
|
registry: e,
|
|
15999
16028
|
defaultKey: n
|
|
16000
16029
|
}), [e, n]);
|
|
16001
|
-
return /* @__PURE__ */ t.createElement(
|
|
16002
|
-
},
|
|
16003
|
-
let t = c(
|
|
16030
|
+
return /* @__PURE__ */ t.createElement(Cm.Provider, { value: i }, r);
|
|
16031
|
+
}, Tm = (e) => {
|
|
16032
|
+
let t = c(Cm);
|
|
16004
16033
|
if (!t) throw Error("useCredentialsProvider must be used inside <App providers={...} />.");
|
|
16005
16034
|
let n = e ?? t.defaultKey, r = t.registry[n];
|
|
16006
16035
|
if (!r) throw Error(`CredentialsProvider '${n}' is not registered. Available: ${Object.keys(t.registry).join(", ")}`);
|
|
16007
16036
|
return r;
|
|
16008
|
-
},
|
|
16037
|
+
}, Em = {
|
|
16009
16038
|
key: "@key",
|
|
16010
16039
|
value: "@value"
|
|
16011
|
-
},
|
|
16040
|
+
}, Dm = () => Ie(), Om = (e, t, n) => {
|
|
16012
16041
|
let r = `Error during ${e}: ${String(t)}`;
|
|
16013
16042
|
if (n) throw Error(r);
|
|
16014
16043
|
console.error(r);
|
|
16015
|
-
},
|
|
16044
|
+
}, km = (e, t) => {
|
|
16016
16045
|
if (!e || !(t in e)) return e;
|
|
16017
16046
|
let { [t]: n, ...r } = e;
|
|
16018
16047
|
return Object.keys(r).length ? r : void 0;
|
|
16019
|
-
},
|
|
16048
|
+
}, Am = (e) => {
|
|
16020
16049
|
let t = typeof e == "object" && e && !Array.isArray(e) ? e : Array.isArray(e) ? { in: e } : { eq: e }, n;
|
|
16021
16050
|
return t.gt !== void 0 && (n = {
|
|
16022
16051
|
...n,
|
|
@@ -16034,28 +16063,28 @@ var um = () => {
|
|
|
16034
16063
|
condition: t,
|
|
16035
16064
|
clientCondition: n
|
|
16036
16065
|
};
|
|
16037
|
-
},
|
|
16066
|
+
}, jm = (e, t) => {
|
|
16038
16067
|
switch (t) {
|
|
16039
|
-
case
|
|
16040
|
-
case
|
|
16068
|
+
case Em.key: return Ve(e, ze());
|
|
16069
|
+
case Em.value: return Ve(e, Be());
|
|
16041
16070
|
default: return Ve(e, Re(t));
|
|
16042
16071
|
}
|
|
16043
|
-
},
|
|
16072
|
+
}, Mm = (e, t, n) => {
|
|
16044
16073
|
let [r] = Object.entries(t || {});
|
|
16045
16074
|
if (!r) return {
|
|
16046
16075
|
dbRef: e,
|
|
16047
16076
|
clientWhere: n
|
|
16048
16077
|
};
|
|
16049
|
-
let [i] = r, a =
|
|
16078
|
+
let [i] = r, a = jm(e, i), o = n?.[i];
|
|
16050
16079
|
if (o == null) return {
|
|
16051
16080
|
dbRef: a,
|
|
16052
16081
|
clientWhere: n
|
|
16053
16082
|
};
|
|
16054
|
-
let { condition: s, clientCondition: c } =
|
|
16083
|
+
let { condition: s, clientCondition: c } = Am(o);
|
|
16055
16084
|
switch (!0) {
|
|
16056
16085
|
case s.eq !== void 0: return {
|
|
16057
16086
|
dbRef: Ve(a, Fe(s.eq)),
|
|
16058
|
-
clientWhere:
|
|
16087
|
+
clientWhere: km(n, i)
|
|
16059
16088
|
};
|
|
16060
16089
|
case s.gte !== void 0 && s.lte !== void 0:
|
|
16061
16090
|
a = Ve(a, Ge(s.gte), Pe(s.lte));
|
|
@@ -16085,11 +16114,11 @@ var um = () => {
|
|
|
16085
16114
|
return {
|
|
16086
16115
|
dbRef: a,
|
|
16087
16116
|
clientWhere: c ? {
|
|
16088
|
-
...
|
|
16117
|
+
...km(n, i) || {},
|
|
16089
16118
|
[i]: c
|
|
16090
|
-
} :
|
|
16119
|
+
} : km(n, i)
|
|
16091
16120
|
};
|
|
16092
|
-
},
|
|
16121
|
+
}, Nm = (e, t) => {
|
|
16093
16122
|
if (!t) return e;
|
|
16094
16123
|
let n = t.split("."), r = e;
|
|
16095
16124
|
for (let e of n) {
|
|
@@ -16097,10 +16126,10 @@ var um = () => {
|
|
|
16097
16126
|
r = r[e];
|
|
16098
16127
|
}
|
|
16099
16128
|
return r;
|
|
16100
|
-
},
|
|
16129
|
+
}, Pm = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : typeof e == "boolean" && typeof t == "boolean" ? Number(e) - Number(t) : globalThis.String(e).localeCompare(globalThis.String(t), void 0, {
|
|
16101
16130
|
numeric: !0,
|
|
16102
16131
|
sensitivity: "base"
|
|
16103
|
-
}),
|
|
16132
|
+
}), Fm = (e, t) => {
|
|
16104
16133
|
let n = typeof t == "object" && t && !Array.isArray(t) ? t : { eq: t };
|
|
16105
16134
|
for (let [t, r] of Object.entries(n)) switch (t) {
|
|
16106
16135
|
case "eq":
|
|
@@ -16127,23 +16156,23 @@ var um = () => {
|
|
|
16127
16156
|
default: return !1;
|
|
16128
16157
|
}
|
|
16129
16158
|
return !0;
|
|
16130
|
-
},
|
|
16159
|
+
}, Im = (e, t, n) => {
|
|
16131
16160
|
let [r, ...i] = Object.entries(n || {}), a = Object.entries(t || {}), o = Object.entries(e);
|
|
16132
|
-
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) =>
|
|
16161
|
+
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => Fm(Nm(e, t), n)))), r) {
|
|
16133
16162
|
let e = [r, ...i];
|
|
16134
16163
|
o.sort((t, n) => {
|
|
16135
16164
|
for (let [r, i] of e) {
|
|
16136
|
-
let e =
|
|
16165
|
+
let e = Pm(Nm(t[1], r), Nm(n[1], r));
|
|
16137
16166
|
if (e) return i === "desc" ? -e : e;
|
|
16138
16167
|
}
|
|
16139
16168
|
return 0;
|
|
16140
16169
|
});
|
|
16141
16170
|
}
|
|
16142
16171
|
return Object.fromEntries(o);
|
|
16143
|
-
},
|
|
16144
|
-
let t = await Fa()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(
|
|
16172
|
+
}, Lm = async (e) => {
|
|
16173
|
+
let t = await Fa()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, He(Dm()).toString());
|
|
16145
16174
|
return n.searchParams.set("shallow", "true"), t && n.searchParams.set("auth", t), n.toString();
|
|
16146
|
-
},
|
|
16175
|
+
}, Rm = class e {
|
|
16147
16176
|
static listenerRegistered = !1;
|
|
16148
16177
|
constructor() {
|
|
16149
16178
|
!e.listenerRegistered && typeof wa == "function" && (e.listenerRegistered = !0, wa((e) => {
|
|
@@ -16158,43 +16187,43 @@ var um = () => {
|
|
|
16158
16187
|
}
|
|
16159
16188
|
readShallow = async (e, t = !1) => {
|
|
16160
16189
|
try {
|
|
16161
|
-
let t = await
|
|
16190
|
+
let t = await Lm(e), n = await fetch(t);
|
|
16162
16191
|
if (!n.ok) throw Error(`${n.status} ${n.statusText}`);
|
|
16163
16192
|
let r = await n.json();
|
|
16164
16193
|
return r ? Object.keys(r) : [];
|
|
16165
16194
|
} catch (n) {
|
|
16166
|
-
return
|
|
16195
|
+
return Om(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
|
|
16167
16196
|
}
|
|
16168
16197
|
};
|
|
16169
16198
|
read = async (e, { where: t, order: n, toArray: r = !1, exception: i = !1 } = {}) => {
|
|
16170
|
-
let { dbRef: a, clientWhere: o } =
|
|
16199
|
+
let { dbRef: a, clientWhere: o } = Mm(He(Dm(), e), n, t);
|
|
16171
16200
|
try {
|
|
16172
16201
|
let t = await J(a);
|
|
16173
16202
|
if (t.exists()) {
|
|
16174
16203
|
`${e}`;
|
|
16175
|
-
let i =
|
|
16204
|
+
let i = Im(t.val(), o, n);
|
|
16176
16205
|
return r ? Object.values(i) : i;
|
|
16177
|
-
} else i &&
|
|
16206
|
+
} else i && Om(`Data not found in Firebase for path ${e}`, null, i);
|
|
16178
16207
|
} catch (t) {
|
|
16179
|
-
|
|
16208
|
+
Om(`reading data in Firebase for ${e}`, t, i);
|
|
16180
16209
|
}
|
|
16181
16210
|
};
|
|
16182
16211
|
update = async (e, t, n = !1) => {
|
|
16183
16212
|
try {
|
|
16184
|
-
await Ke(He(
|
|
16213
|
+
await Ke(He(Dm(), e), t), `${e}`;
|
|
16185
16214
|
} catch (t) {
|
|
16186
|
-
|
|
16215
|
+
Om(`updating data in Firebase for ${e}`, t, n);
|
|
16187
16216
|
}
|
|
16188
16217
|
};
|
|
16189
16218
|
set = async (e, t, n = !1) => {
|
|
16190
16219
|
try {
|
|
16191
|
-
await We(He(
|
|
16220
|
+
await We(He(Dm(), e), t), `${e}`;
|
|
16192
16221
|
} catch (t) {
|
|
16193
|
-
|
|
16222
|
+
Om(`updating data in Firebase for ${e}`, t, n);
|
|
16194
16223
|
}
|
|
16195
16224
|
};
|
|
16196
16225
|
setChunks = async (e, t, { chunkSize: n = 1e3, purge: r = !1, onProgress: i } = {}) => {
|
|
16197
|
-
let a = He(
|
|
16226
|
+
let a = He(Dm(), e);
|
|
16198
16227
|
try {
|
|
16199
16228
|
r && (await Ue(a), i?.(0, 0, `Purging existing data at ${e}`));
|
|
16200
16229
|
let o = Object.entries(Nt(t)), s = Math.ceil(o.length / n);
|
|
@@ -16204,14 +16233,14 @@ var um = () => {
|
|
|
16204
16233
|
i?.(t, s, `Saving chunk ${t}/${s}`);
|
|
16205
16234
|
}
|
|
16206
16235
|
} catch (t) {
|
|
16207
|
-
|
|
16236
|
+
Om(`setting data in chunks in Firebase for ${e}`, t, !1);
|
|
16208
16237
|
}
|
|
16209
16238
|
};
|
|
16210
16239
|
remove = async (e, t = !1) => {
|
|
16211
16240
|
try {
|
|
16212
|
-
await Ue(He(
|
|
16241
|
+
await Ue(He(Dm(), e)), `${e}`;
|
|
16213
16242
|
} catch (n) {
|
|
16214
|
-
|
|
16243
|
+
Om(`removing data from Firebase for ${e}`, n, t);
|
|
16215
16244
|
}
|
|
16216
16245
|
};
|
|
16217
16246
|
count = async (e) => (await this.readShallow(e)).length;
|
|
@@ -16219,14 +16248,14 @@ var um = () => {
|
|
|
16219
16248
|
let o = Fa();
|
|
16220
16249
|
if (!o || !e) return () => void 0;
|
|
16221
16250
|
let s = () => {
|
|
16222
|
-
let { dbRef: o, clientWhere: s } =
|
|
16251
|
+
let { dbRef: o, clientWhere: s } = Mm(He(Dm(), e), r, n);
|
|
16223
16252
|
return Le(o, (e) => {
|
|
16224
16253
|
let n = e.val();
|
|
16225
16254
|
if (!n) {
|
|
16226
16255
|
t([]);
|
|
16227
16256
|
return;
|
|
16228
16257
|
}
|
|
16229
|
-
let o = a ? a(
|
|
16258
|
+
let o = a ? a(Im(n, s, r)) : Im(n, s, r), c = Object.entries(o);
|
|
16230
16259
|
if (!i) {
|
|
16231
16260
|
t(c.map(([e, t], n) => typeof t == "object" && t ? {
|
|
16232
16261
|
_index: n,
|
|
@@ -16235,22 +16264,22 @@ var um = () => {
|
|
|
16235
16264
|
} : {
|
|
16236
16265
|
_index: n,
|
|
16237
16266
|
[za]: e,
|
|
16238
|
-
[
|
|
16267
|
+
[Em.value]: t
|
|
16239
16268
|
}));
|
|
16240
16269
|
return;
|
|
16241
16270
|
}
|
|
16242
16271
|
let l = Object.keys(i);
|
|
16243
16272
|
t(c.map(([e, t], n) => {
|
|
16244
16273
|
let r = typeof t == "object" && t ? {
|
|
16245
|
-
[
|
|
16274
|
+
[Em.key]: e,
|
|
16246
16275
|
...t
|
|
16247
16276
|
} : {
|
|
16248
|
-
[
|
|
16249
|
-
[
|
|
16277
|
+
[Em.key]: e,
|
|
16278
|
+
[Em.value]: t
|
|
16250
16279
|
}, a = {};
|
|
16251
16280
|
for (let n of l) {
|
|
16252
16281
|
let o = i[n];
|
|
16253
|
-
a[n] = o.includes("{") ? et.parse(r, o) : o ===
|
|
16282
|
+
a[n] = o.includes("{") ? et.parse(r, o) : o === Em.key ? e : o === Em.value ? t : r[o];
|
|
16254
16283
|
}
|
|
16255
16284
|
return {
|
|
16256
16285
|
[za]: e,
|
|
@@ -16267,10 +16296,10 @@ var um = () => {
|
|
|
16267
16296
|
};
|
|
16268
16297
|
};
|
|
16269
16298
|
};
|
|
16270
|
-
new
|
|
16299
|
+
new Rm();
|
|
16271
16300
|
//#endregion
|
|
16272
16301
|
//#region src/providers/auth/firebase/FirebaseAuthProvider.ts
|
|
16273
|
-
var
|
|
16302
|
+
var zm = {
|
|
16274
16303
|
github: "github.com",
|
|
16275
16304
|
apple: "apple.com",
|
|
16276
16305
|
microsoft: "microsoft.com",
|
|
@@ -16278,10 +16307,10 @@ var Bm = {
|
|
|
16278
16307
|
twitter: "twitter.com",
|
|
16279
16308
|
facebook: "facebook.com"
|
|
16280
16309
|
};
|
|
16281
|
-
function
|
|
16282
|
-
return new R(
|
|
16310
|
+
function Bm(e) {
|
|
16311
|
+
return new R(zm[e] ?? e);
|
|
16283
16312
|
}
|
|
16284
|
-
function
|
|
16313
|
+
function Vm(e) {
|
|
16285
16314
|
return e ? {
|
|
16286
16315
|
uid: e.uid,
|
|
16287
16316
|
email: e.email ?? void 0,
|
|
@@ -16290,7 +16319,7 @@ function Hm(e) {
|
|
|
16290
16319
|
isAnonymous: e.isAnonymous
|
|
16291
16320
|
} : null;
|
|
16292
16321
|
}
|
|
16293
|
-
var
|
|
16322
|
+
var Hm = class {
|
|
16294
16323
|
options;
|
|
16295
16324
|
appName;
|
|
16296
16325
|
initPromise;
|
|
@@ -16304,7 +16333,7 @@ var Um = class {
|
|
|
16304
16333
|
return this.getConfigurationState().configured;
|
|
16305
16334
|
}
|
|
16306
16335
|
getUser() {
|
|
16307
|
-
return
|
|
16336
|
+
return Vm(Fa(this.appName)?.currentUser ?? null);
|
|
16308
16337
|
}
|
|
16309
16338
|
isAuthenticated() {
|
|
16310
16339
|
return !!this.getUser();
|
|
@@ -16316,29 +16345,29 @@ var Um = class {
|
|
|
16316
16345
|
let n = e.method ?? "password";
|
|
16317
16346
|
if (n === "anonymous") {
|
|
16318
16347
|
let { user: e } = await ee(t);
|
|
16319
|
-
return
|
|
16348
|
+
return Vm(e);
|
|
16320
16349
|
}
|
|
16321
16350
|
if (n === "oauth") {
|
|
16322
16351
|
let { provider: n } = e;
|
|
16323
16352
|
if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
|
|
16324
|
-
let { user: r } = await
|
|
16325
|
-
return
|
|
16353
|
+
let { user: r } = await re(t, Bm(n));
|
|
16354
|
+
return Vm(r);
|
|
16326
16355
|
}
|
|
16327
16356
|
let { email: r, password: i } = e;
|
|
16328
16357
|
if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
|
|
16329
|
-
let { user: a } = await
|
|
16330
|
-
return
|
|
16358
|
+
let { user: a } = await ne(t, r, i);
|
|
16359
|
+
return Vm(a);
|
|
16331
16360
|
}
|
|
16332
16361
|
async signOut() {
|
|
16333
16362
|
await this.initPromise;
|
|
16334
16363
|
let e = Fa(this.appName);
|
|
16335
16364
|
if (!e) throw Error("FirebaseAuthProvider: Firebase auth is not initialized");
|
|
16336
|
-
await
|
|
16365
|
+
await K(e);
|
|
16337
16366
|
}
|
|
16338
16367
|
onAuthChange(e) {
|
|
16339
16368
|
if (!this.options.config) {
|
|
16340
16369
|
let t = Fa(this.appName);
|
|
16341
|
-
return t ? H(t, (t) => e(
|
|
16370
|
+
return t ? H(t, (t) => e(Vm(t))) : (e(null), () => {});
|
|
16342
16371
|
}
|
|
16343
16372
|
let t = () => {}, n = !1;
|
|
16344
16373
|
return this.initPromise.then(() => {
|
|
@@ -16348,7 +16377,7 @@ var Um = class {
|
|
|
16348
16377
|
e(null);
|
|
16349
16378
|
return;
|
|
16350
16379
|
}
|
|
16351
|
-
t = H(r, (t) => e(
|
|
16380
|
+
t = H(r, (t) => e(Vm(t)));
|
|
16352
16381
|
}), () => {
|
|
16353
16382
|
n = !0, t();
|
|
16354
16383
|
};
|
|
@@ -16366,26 +16395,26 @@ var Um = class {
|
|
|
16366
16395
|
let { claims: n } = await t.currentUser.getIdTokenResult(e);
|
|
16367
16396
|
return n;
|
|
16368
16397
|
}
|
|
16369
|
-
},
|
|
16370
|
-
function
|
|
16398
|
+
}, Um = "https://oauth2.googleapis.com/token";
|
|
16399
|
+
function Wm(e) {
|
|
16371
16400
|
let t = e.replace(/-----BEGIN PRIVATE KEY-----/, "").replace(/-----END PRIVATE KEY-----/, "").replace(/\s+/g, ""), n = atob(t), r = new Uint8Array(n.length);
|
|
16372
16401
|
for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
|
|
16373
16402
|
return r.buffer;
|
|
16374
16403
|
}
|
|
16375
|
-
function
|
|
16404
|
+
function Gm(e) {
|
|
16376
16405
|
return btoa(typeof e == "string" ? e : String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
16377
16406
|
}
|
|
16378
|
-
async function
|
|
16379
|
-
let n = `${
|
|
16407
|
+
async function Km(e, t) {
|
|
16408
|
+
let n = `${Gm(JSON.stringify({
|
|
16380
16409
|
alg: "RS256",
|
|
16381
16410
|
typ: "JWT"
|
|
16382
|
-
}))}.${
|
|
16411
|
+
}))}.${Gm(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", Wm(t), {
|
|
16383
16412
|
name: "RSASSA-PKCS1-v1_5",
|
|
16384
16413
|
hash: "SHA-256"
|
|
16385
16414
|
}, !1, ["sign"]);
|
|
16386
|
-
return `${n}.${
|
|
16415
|
+
return `${n}.${Gm(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
|
|
16387
16416
|
}
|
|
16388
|
-
var
|
|
16417
|
+
var qm = class {
|
|
16389
16418
|
config;
|
|
16390
16419
|
cache = /* @__PURE__ */ new Map();
|
|
16391
16420
|
constructor(e) {
|
|
@@ -16394,13 +16423,13 @@ var Jm = class {
|
|
|
16394
16423
|
async getToken(e = "https://www.googleapis.com/auth/cloud-platform") {
|
|
16395
16424
|
let t = this.cache.get(e);
|
|
16396
16425
|
if (t && t.expiresAt > Date.now() + 6e4) return t.token;
|
|
16397
|
-
let n = Math.floor(Date.now() / 1e3), r = await
|
|
16426
|
+
let n = Math.floor(Date.now() / 1e3), r = await Km({
|
|
16398
16427
|
iss: this.config.client_email,
|
|
16399
16428
|
scope: e,
|
|
16400
|
-
aud:
|
|
16429
|
+
aud: Um,
|
|
16401
16430
|
iat: n,
|
|
16402
16431
|
exp: n + 3600
|
|
16403
|
-
}, this.config.private_key), i = await fetch(
|
|
16432
|
+
}, this.config.private_key), i = await fetch(Um, {
|
|
16404
16433
|
method: "POST",
|
|
16405
16434
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
16406
16435
|
body: new URLSearchParams({
|
|
@@ -16418,7 +16447,7 @@ var Jm = class {
|
|
|
16418
16447
|
expiresAt: Date.now() + (a.expires_in ?? 3600) * 1e3
|
|
16419
16448
|
}), a.access_token;
|
|
16420
16449
|
}
|
|
16421
|
-
},
|
|
16450
|
+
}, Jm = "www.dropbox.com/oauth2", Ym = class {
|
|
16422
16451
|
config;
|
|
16423
16452
|
constructor(e) {
|
|
16424
16453
|
this.config = e;
|
|
@@ -16442,7 +16471,7 @@ var Jm = class {
|
|
|
16442
16471
|
async signIn(e = {}) {
|
|
16443
16472
|
if (!this.isConfigured()) throw Error("DropboxAuthProvider: missing dropbox.clientId configuration.");
|
|
16444
16473
|
return pi({
|
|
16445
|
-
authServer:
|
|
16474
|
+
authServer: Jm,
|
|
16446
16475
|
clientID: this.config.clientId,
|
|
16447
16476
|
scopes: e.scopes,
|
|
16448
16477
|
refreshParamName: "token_access_type"
|
|
@@ -16463,7 +16492,7 @@ var Jm = class {
|
|
|
16463
16492
|
isAuthenticated() {
|
|
16464
16493
|
return this.isConfigured() ? !!vi(this.config.clientId)?.access_token : !1;
|
|
16465
16494
|
}
|
|
16466
|
-
},
|
|
16495
|
+
}, Xm = (e) => {
|
|
16467
16496
|
let t = Oa("oAuth2");
|
|
16468
16497
|
if (!t) return console.warn("GoogleAuth: Missing oAuth2.clientId in configuration"), Promise.reject("Google client ID not found");
|
|
16469
16498
|
let n = e.join(" "), r = `googleAccessToken::${n}`, i = `googleExpiresAt::${n}`;
|
|
@@ -16480,8 +16509,8 @@ var Jm = class {
|
|
|
16480
16509
|
};
|
|
16481
16510
|
//#endregion
|
|
16482
16511
|
//#region src/providers/email/google/email.ts
|
|
16483
|
-
async function
|
|
16484
|
-
let i = await
|
|
16512
|
+
async function Zm({ to: e, bcc: t, subject: n, message: r }) {
|
|
16513
|
+
let i = await Xm(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
|
|
16485
16514
|
t && t.length && a.push(`Bcc: ${t.join(", ")}`);
|
|
16486
16515
|
let o = [
|
|
16487
16516
|
...a,
|
|
@@ -16506,7 +16535,7 @@ async function Qm({ to: e, bcc: t, subject: n, message: r }) {
|
|
|
16506
16535
|
}
|
|
16507
16536
|
//#endregion
|
|
16508
16537
|
//#region src/providers/email/google/GmailEmailProvider.ts
|
|
16509
|
-
var
|
|
16538
|
+
var Qm = class {
|
|
16510
16539
|
getConfigurationState() {
|
|
16511
16540
|
return oi("GmailEmailProvider", ai(Oa("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
16512
16541
|
}
|
|
@@ -16515,7 +16544,7 @@ var $m = class {
|
|
|
16515
16544
|
}
|
|
16516
16545
|
async send(e) {
|
|
16517
16546
|
if (!this.isConfigured()) throw Error(this.getConfigurationState().reason || "GmailEmailProvider is not configured.");
|
|
16518
|
-
await
|
|
16547
|
+
await Zm({
|
|
16519
16548
|
to: Array.isArray(e.to) ? e.to : [e.to],
|
|
16520
16549
|
bcc: e.bcc ? Array.isArray(e.bcc) ? e.bcc : [e.bcc] : void 0,
|
|
16521
16550
|
subject: e.subject,
|
|
@@ -16525,7 +16554,7 @@ var $m = class {
|
|
|
16525
16554
|
};
|
|
16526
16555
|
//#endregion
|
|
16527
16556
|
//#region src/providers/auth/supabase/SupabaseAuthProvider.ts
|
|
16528
|
-
function
|
|
16557
|
+
function $m(e) {
|
|
16529
16558
|
return e ? {
|
|
16530
16559
|
uid: e.id,
|
|
16531
16560
|
email: e.email ?? void 0,
|
|
@@ -16534,7 +16563,7 @@ function eh(e) {
|
|
|
16534
16563
|
raw: e
|
|
16535
16564
|
} : null;
|
|
16536
16565
|
}
|
|
16537
|
-
var
|
|
16566
|
+
var eh = class {
|
|
16538
16567
|
config;
|
|
16539
16568
|
get client() {
|
|
16540
16569
|
return Za(this.config.url, this.config.anonKey);
|
|
@@ -16549,7 +16578,7 @@ var th = class {
|
|
|
16549
16578
|
return this.getConfigurationState().configured;
|
|
16550
16579
|
}
|
|
16551
16580
|
getUser() {
|
|
16552
|
-
return
|
|
16581
|
+
return $m((this.client.auth?._session ?? null)?.user ?? null);
|
|
16553
16582
|
}
|
|
16554
16583
|
isAuthenticated() {
|
|
16555
16584
|
return !!this.getUser();
|
|
@@ -16559,7 +16588,7 @@ var th = class {
|
|
|
16559
16588
|
if (t === "anonymous") {
|
|
16560
16589
|
let { data: e, error: t } = await this.client.auth.signInAnonymously();
|
|
16561
16590
|
if (t) throw t;
|
|
16562
|
-
return
|
|
16591
|
+
return $m(e.user);
|
|
16563
16592
|
}
|
|
16564
16593
|
if (t === "magic_link") {
|
|
16565
16594
|
let t = e.email;
|
|
@@ -16588,7 +16617,7 @@ var th = class {
|
|
|
16588
16617
|
password: r
|
|
16589
16618
|
});
|
|
16590
16619
|
if (a) throw a;
|
|
16591
|
-
return
|
|
16620
|
+
return $m(i.user);
|
|
16592
16621
|
}
|
|
16593
16622
|
async signOut() {
|
|
16594
16623
|
let { error: e } = await this.client.auth.signOut();
|
|
@@ -16596,10 +16625,10 @@ var th = class {
|
|
|
16596
16625
|
}
|
|
16597
16626
|
onAuthChange(e) {
|
|
16598
16627
|
this.client.auth.getSession().then(({ data: t }) => {
|
|
16599
|
-
e(
|
|
16628
|
+
e($m(t.session?.user ?? null));
|
|
16600
16629
|
});
|
|
16601
16630
|
let { data: { subscription: t } } = this.client.auth.onAuthStateChange((t, n) => {
|
|
16602
|
-
e(
|
|
16631
|
+
e($m(n?.user ?? null));
|
|
16603
16632
|
});
|
|
16604
16633
|
return () => t.unsubscribe();
|
|
16605
16634
|
}
|
|
@@ -16610,15 +16639,15 @@ var th = class {
|
|
|
16610
16639
|
if (!n) throw Error("SupabaseAuthProvider: no active session");
|
|
16611
16640
|
return n;
|
|
16612
16641
|
}
|
|
16613
|
-
},
|
|
16614
|
-
function
|
|
16642
|
+
}, th = "https://api.anthropic.com/v1/models", nh = "https://api.anthropic.com/v1/messages";
|
|
16643
|
+
function rh(e) {
|
|
16615
16644
|
return {
|
|
16616
16645
|
name: e.name,
|
|
16617
16646
|
description: e.description,
|
|
16618
16647
|
input_schema: e.inputSchema
|
|
16619
16648
|
};
|
|
16620
16649
|
}
|
|
16621
|
-
function
|
|
16650
|
+
function ih(e) {
|
|
16622
16651
|
if (e.role === "user") return {
|
|
16623
16652
|
role: "user",
|
|
16624
16653
|
content: e.content
|
|
@@ -16650,7 +16679,7 @@ function ah(e) {
|
|
|
16650
16679
|
}))
|
|
16651
16680
|
};
|
|
16652
16681
|
}
|
|
16653
|
-
function
|
|
16682
|
+
function ah(e) {
|
|
16654
16683
|
let t = e?.content;
|
|
16655
16684
|
if (!Array.isArray(t)) return null;
|
|
16656
16685
|
let n = t.filter((e) => e?.type === "text").map((e) => String(e.text ?? "")), r = t.filter((e) => e?.type === "tool_use");
|
|
@@ -16669,7 +16698,7 @@ function oh(e) {
|
|
|
16669
16698
|
text: i
|
|
16670
16699
|
} : null;
|
|
16671
16700
|
}
|
|
16672
|
-
var
|
|
16701
|
+
var oh = {
|
|
16673
16702
|
id: "anthropic",
|
|
16674
16703
|
label: "Anthropic",
|
|
16675
16704
|
description: "Claude models via the Anthropic API.",
|
|
@@ -16693,7 +16722,7 @@ var sh = {
|
|
|
16693
16722
|
supportsDocuments: !0
|
|
16694
16723
|
},
|
|
16695
16724
|
discoverModels: async (e) => {
|
|
16696
|
-
let t = await Wt(
|
|
16725
|
+
let t = await Wt(th, { headers: {
|
|
16697
16726
|
"x-api-key": e,
|
|
16698
16727
|
"anthropic-version": "2023-06-01"
|
|
16699
16728
|
} }, al);
|
|
@@ -16721,7 +16750,7 @@ var sh = {
|
|
|
16721
16750
|
type: "text",
|
|
16722
16751
|
text: n.prompt
|
|
16723
16752
|
}] : n.prompt;
|
|
16724
|
-
return
|
|
16753
|
+
return ah(await Wt(nh, {
|
|
16725
16754
|
method: "POST",
|
|
16726
16755
|
headers: {
|
|
16727
16756
|
"x-api-key": t,
|
|
@@ -16732,18 +16761,18 @@ var sh = {
|
|
|
16732
16761
|
model: n.model,
|
|
16733
16762
|
max_tokens: 4096,
|
|
16734
16763
|
...n.role ? { system: Jc.parseRole(n.role, n) } : {},
|
|
16735
|
-
messages: [...(n.history ?? []).map(
|
|
16764
|
+
messages: [...(n.history ?? []).map(ih), ...n.prompt ? [{
|
|
16736
16765
|
role: "user",
|
|
16737
16766
|
content: i
|
|
16738
16767
|
}] : []],
|
|
16739
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
16768
|
+
...n.tools?.length ? { tools: n.tools.map(rh) } : {},
|
|
16740
16769
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
|
|
16741
16770
|
},
|
|
16742
16771
|
signal: n.signal
|
|
16743
16772
|
}, al));
|
|
16744
16773
|
}
|
|
16745
|
-
},
|
|
16746
|
-
function
|
|
16774
|
+
}, sh = (e) => e.replace(/\/+$/, "");
|
|
16775
|
+
function ch(e) {
|
|
16747
16776
|
return {
|
|
16748
16777
|
type: "function",
|
|
16749
16778
|
function: {
|
|
@@ -16753,7 +16782,7 @@ function lh(e) {
|
|
|
16753
16782
|
}
|
|
16754
16783
|
};
|
|
16755
16784
|
}
|
|
16756
|
-
function
|
|
16785
|
+
function lh(e) {
|
|
16757
16786
|
if (typeof e != "string") return {};
|
|
16758
16787
|
try {
|
|
16759
16788
|
return JSON.parse(e);
|
|
@@ -16761,7 +16790,7 @@ function uh(e) {
|
|
|
16761
16790
|
return {};
|
|
16762
16791
|
}
|
|
16763
16792
|
}
|
|
16764
|
-
function
|
|
16793
|
+
function uh(e) {
|
|
16765
16794
|
return e.role === "user" ? [{
|
|
16766
16795
|
role: "user",
|
|
16767
16796
|
content: e.content
|
|
@@ -16782,7 +16811,7 @@ function dh(e) {
|
|
|
16782
16811
|
content: typeof e.output == "string" ? e.output : JSON.stringify(e.output)
|
|
16783
16812
|
}));
|
|
16784
16813
|
}
|
|
16785
|
-
function
|
|
16814
|
+
function dh(e) {
|
|
16786
16815
|
let t = e?.choices?.[0]?.message;
|
|
16787
16816
|
if (!t) return null;
|
|
16788
16817
|
let n = Array.isArray(t.tool_calls) ? t.tool_calls : [];
|
|
@@ -16795,7 +16824,7 @@ function fh(e) {
|
|
|
16795
16824
|
return {
|
|
16796
16825
|
id: String(e.id),
|
|
16797
16826
|
name: String(t.name ?? ""),
|
|
16798
|
-
input:
|
|
16827
|
+
input: lh(t.arguments)
|
|
16799
16828
|
};
|
|
16800
16829
|
}),
|
|
16801
16830
|
text: e || void 0
|
|
@@ -16807,8 +16836,8 @@ function fh(e) {
|
|
|
16807
16836
|
text: r
|
|
16808
16837
|
} : null;
|
|
16809
16838
|
}
|
|
16810
|
-
var
|
|
16811
|
-
let m =
|
|
16839
|
+
var fh = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a, defaultModel: o, fallbackModels: s, baseUrl: c, modelsUrl: l, chatCompletionsUrl: u, dashboardUrl: d, credentialsHint: f, validateApiKey: p }) => {
|
|
16840
|
+
let m = sh(c), h = l || `${m}/models`, g = u || `${m}/chat/completions`;
|
|
16812
16841
|
return {
|
|
16813
16842
|
id: t,
|
|
16814
16843
|
label: n,
|
|
@@ -16885,22 +16914,22 @@ var ph = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
16885
16914
|
role: "system",
|
|
16886
16915
|
content: Jc.parseRole(r.role, r)
|
|
16887
16916
|
}] : [],
|
|
16888
|
-
...(r.history ?? []).flatMap(
|
|
16917
|
+
...(r.history ?? []).flatMap(uh),
|
|
16889
16918
|
...r.prompt ? [{
|
|
16890
16919
|
role: "user",
|
|
16891
16920
|
content: a
|
|
16892
16921
|
}] : []
|
|
16893
16922
|
],
|
|
16894
|
-
...r.tools?.length ? { tools: r.tools.map(
|
|
16923
|
+
...r.tools?.length ? { tools: r.tools.map(ch) } : {},
|
|
16895
16924
|
...typeof r.temperature == "number" ? { temperature: r.temperature } : {}
|
|
16896
16925
|
},
|
|
16897
16926
|
signal: r.signal
|
|
16898
16927
|
}, al);
|
|
16899
16928
|
if (!o) throw dl(n);
|
|
16900
|
-
return
|
|
16929
|
+
return dh(o);
|
|
16901
16930
|
}
|
|
16902
16931
|
};
|
|
16903
|
-
},
|
|
16932
|
+
}, ph = fh({
|
|
16904
16933
|
id: "deepseek",
|
|
16905
16934
|
label: "DeepSeek",
|
|
16906
16935
|
description: "Cost-efficient reasoning and chat models.",
|
|
@@ -16910,15 +16939,15 @@ var ph = ({ id: t, label: n, description: r, configKey: i, requiredConfigKeys: a
|
|
|
16910
16939
|
baseUrl: "https://api.deepseek.com",
|
|
16911
16940
|
dashboardUrl: "https://platform.deepseek.com/api_keys",
|
|
16912
16941
|
credentialsHint: "DeepSeek platform → API Keys → Create new API key."
|
|
16913
|
-
}),
|
|
16914
|
-
function
|
|
16942
|
+
}), mh = "https://generativelanguage.googleapis.com/v1beta/models", hh = "https://generativelanguage.googleapis.com/v1beta/models";
|
|
16943
|
+
function gh(e) {
|
|
16915
16944
|
return [{ function_declarations: e.map((e) => ({
|
|
16916
16945
|
name: e.name,
|
|
16917
16946
|
description: e.description,
|
|
16918
16947
|
parameters: e.inputSchema
|
|
16919
16948
|
})) }];
|
|
16920
16949
|
}
|
|
16921
|
-
function
|
|
16950
|
+
function _h(e) {
|
|
16922
16951
|
if (e.role === "user") return {
|
|
16923
16952
|
role: "user",
|
|
16924
16953
|
parts: [{ text: e.content }]
|
|
@@ -16943,7 +16972,7 @@ function vh(e) {
|
|
|
16943
16972
|
} }))
|
|
16944
16973
|
};
|
|
16945
16974
|
}
|
|
16946
|
-
function
|
|
16975
|
+
function vh(e) {
|
|
16947
16976
|
let t = e?.candidates?.[0]?.content?.parts;
|
|
16948
16977
|
if (!Array.isArray(t)) return null;
|
|
16949
16978
|
let n = t.filter((e) => typeof e?.text == "string").map((e) => e.text), r = t.filter((e) => e?.functionCall);
|
|
@@ -16962,7 +16991,7 @@ function yh(e) {
|
|
|
16962
16991
|
text: i
|
|
16963
16992
|
} : null;
|
|
16964
16993
|
}
|
|
16965
|
-
var
|
|
16994
|
+
var yh = {
|
|
16966
16995
|
id: "gemini",
|
|
16967
16996
|
label: "Gemini",
|
|
16968
16997
|
description: "Google's multimodal Gemini model family.",
|
|
@@ -16986,12 +17015,12 @@ var bh = {
|
|
|
16986
17015
|
supportsDocuments: !0
|
|
16987
17016
|
},
|
|
16988
17017
|
discoverModels: async (e) => {
|
|
16989
|
-
let t = await Wt(`${
|
|
17018
|
+
let t = await Wt(`${mh}?key=${e}`, null, al);
|
|
16990
17019
|
return Array.isArray(t?.models) ? t.models.map((e) => e.name?.replace(/^models\//, "")).filter(Boolean) : [];
|
|
16991
17020
|
},
|
|
16992
17021
|
validateApiKey: async (e) => {
|
|
16993
17022
|
try {
|
|
16994
|
-
let t = await Wt(`${
|
|
17023
|
+
let t = await Wt(`${mh}?key=${e}`, null, al);
|
|
16995
17024
|
return t === null ? {
|
|
16996
17025
|
valid: !1,
|
|
16997
17026
|
error: "Nessuna risposta dal server (CORS o rete)"
|
|
@@ -17012,22 +17041,22 @@ var bh = {
|
|
|
17012
17041
|
mime_type: e.mimeType,
|
|
17013
17042
|
data: e.base64
|
|
17014
17043
|
} }), { text: n.prompt }];
|
|
17015
|
-
return
|
|
17044
|
+
return vh(await Wt(`${hh}/${n.model}:generateContent?key=${t}`, {
|
|
17016
17045
|
method: "POST",
|
|
17017
17046
|
headers: n.logId ? { [e]: n.logId } : void 0,
|
|
17018
17047
|
body: {
|
|
17019
|
-
contents: [...(n.history ?? []).map(
|
|
17048
|
+
contents: [...(n.history ?? []).map(_h), ...n.prompt ? [{
|
|
17020
17049
|
role: "user",
|
|
17021
17050
|
parts: r
|
|
17022
17051
|
}] : []],
|
|
17023
17052
|
...n.role ? { systemInstruction: { parts: [{ text: Jc.parseRole(n.role, n) }] } } : {},
|
|
17024
|
-
...n.tools?.length ? { tools:
|
|
17053
|
+
...n.tools?.length ? { tools: gh(n.tools) } : {},
|
|
17025
17054
|
generationConfig: typeof n.temperature == "number" ? { temperature: n.temperature } : void 0
|
|
17026
17055
|
},
|
|
17027
17056
|
signal: n.signal
|
|
17028
17057
|
}, al));
|
|
17029
17058
|
}
|
|
17030
|
-
},
|
|
17059
|
+
}, bh = fh({
|
|
17031
17060
|
id: "mistral",
|
|
17032
17061
|
label: "Mistral",
|
|
17033
17062
|
description: "European-hosted open and commercial language models.",
|
|
@@ -17041,7 +17070,7 @@ var bh = {
|
|
|
17041
17070
|
baseUrl: "https://api.mistral.ai/v1",
|
|
17042
17071
|
dashboardUrl: "https://console.mistral.ai/api-keys",
|
|
17043
17072
|
credentialsHint: "Mistral Console → API Keys → Create new key."
|
|
17044
|
-
}),
|
|
17073
|
+
}), xh = fh({
|
|
17045
17074
|
id: "openai",
|
|
17046
17075
|
label: "OpenAI",
|
|
17047
17076
|
description: "GPT models via the OpenAI API.",
|
|
@@ -17059,7 +17088,7 @@ var bh = {
|
|
|
17059
17088
|
baseUrl: "https://api.openai.com/v1",
|
|
17060
17089
|
dashboardUrl: "https://platform.openai.com/api-keys",
|
|
17061
17090
|
credentialsHint: "OpenAI dashboard → API keys → Create new secret key."
|
|
17062
|
-
}),
|
|
17091
|
+
}), Sh = "https://opencode.ai/zen/v1/models", Ch = "https://opencode.ai/zen/v1/chat/completions", wh = {
|
|
17063
17092
|
id: "opencode",
|
|
17064
17093
|
label: "OpenCode",
|
|
17065
17094
|
description: "OpenCode Zen — a curated set of coding-focused models.",
|
|
@@ -17091,7 +17120,7 @@ var bh = {
|
|
|
17091
17120
|
supportsDocuments: !0
|
|
17092
17121
|
},
|
|
17093
17122
|
discoverModels: async (e) => {
|
|
17094
|
-
let t = await Wt(
|
|
17123
|
+
let t = await Wt(Sh, { headers: { Authorization: `Bearer ${e}` } }, al);
|
|
17095
17124
|
return (Array.isArray(t?.data) ? t.data : Array.isArray(t?.models) ? t.models : Array.isArray(t) ? t : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0);
|
|
17096
17125
|
},
|
|
17097
17126
|
complete: async (t, n) => {
|
|
@@ -17107,7 +17136,7 @@ var bh = {
|
|
|
17107
17136
|
}).concat({
|
|
17108
17137
|
type: "text",
|
|
17109
17138
|
text: n.prompt
|
|
17110
|
-
}) : n.prompt, a = await Wt(
|
|
17139
|
+
}) : n.prompt, a = await Wt(Ch, {
|
|
17111
17140
|
method: "POST",
|
|
17112
17141
|
headers: {
|
|
17113
17142
|
Authorization: `Bearer ${t}`,
|
|
@@ -17120,21 +17149,21 @@ var bh = {
|
|
|
17120
17149
|
role: "system",
|
|
17121
17150
|
content: Jc.parseRole(n.role, n)
|
|
17122
17151
|
}] : [],
|
|
17123
|
-
...(n.history ?? []).flatMap(
|
|
17152
|
+
...(n.history ?? []).flatMap(uh),
|
|
17124
17153
|
...n.prompt ? [{
|
|
17125
17154
|
role: "user",
|
|
17126
17155
|
content: i
|
|
17127
17156
|
}] : []
|
|
17128
17157
|
],
|
|
17129
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
17158
|
+
...n.tools?.length ? { tools: n.tools.map(ch) } : {},
|
|
17130
17159
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {}
|
|
17131
17160
|
},
|
|
17132
17161
|
signal: n.signal
|
|
17133
17162
|
}, al);
|
|
17134
17163
|
if (!a) throw dl("OpenCode");
|
|
17135
|
-
return
|
|
17164
|
+
return dh(a);
|
|
17136
17165
|
}
|
|
17137
|
-
},
|
|
17166
|
+
}, Th = fh({
|
|
17138
17167
|
id: "openrouter",
|
|
17139
17168
|
label: "OpenRouter",
|
|
17140
17169
|
description: "Unified access to many model providers through one API.",
|
|
@@ -17168,10 +17197,10 @@ var bh = {
|
|
|
17168
17197
|
};
|
|
17169
17198
|
}
|
|
17170
17199
|
}
|
|
17171
|
-
}),
|
|
17200
|
+
}), Eh = {
|
|
17172
17201
|
dbRealtime: {
|
|
17173
17202
|
service: "data",
|
|
17174
|
-
create: () => new
|
|
17203
|
+
create: () => new Rm()
|
|
17175
17204
|
},
|
|
17176
17205
|
firestoreDb: {
|
|
17177
17206
|
service: "data",
|
|
@@ -17183,26 +17212,26 @@ var bh = {
|
|
|
17183
17212
|
},
|
|
17184
17213
|
firebaseAuth: {
|
|
17185
17214
|
service: "auth",
|
|
17186
|
-
create: () => new
|
|
17215
|
+
create: () => new Hm()
|
|
17187
17216
|
}
|
|
17188
|
-
},
|
|
17217
|
+
}, Dh = {
|
|
17189
17218
|
googleAuth: {
|
|
17190
17219
|
service: "auth",
|
|
17191
|
-
create: () => new
|
|
17220
|
+
create: () => new ym()
|
|
17192
17221
|
},
|
|
17193
17222
|
gmail: {
|
|
17194
17223
|
service: "email",
|
|
17195
|
-
create: () => new
|
|
17224
|
+
create: () => new Qm()
|
|
17196
17225
|
},
|
|
17197
17226
|
googleServiceAccount: {
|
|
17198
17227
|
service: "credentials",
|
|
17199
|
-
create: (e) => new
|
|
17228
|
+
create: (e) => new qm(e.serviceAccount),
|
|
17200
17229
|
when: (e) => !!e.serviceAccount
|
|
17201
17230
|
}
|
|
17202
|
-
},
|
|
17231
|
+
}, Oh = { dropboxAuth: {
|
|
17203
17232
|
service: "auth",
|
|
17204
|
-
create: (e) => new
|
|
17205
|
-
} },
|
|
17233
|
+
create: (e) => new Ym(e)
|
|
17234
|
+
} }, kh = {
|
|
17206
17235
|
supabaseDb: {
|
|
17207
17236
|
service: "data",
|
|
17208
17237
|
create: (e) => new co(e)
|
|
@@ -17213,32 +17242,32 @@ var bh = {
|
|
|
17213
17242
|
},
|
|
17214
17243
|
supabaseAuth: {
|
|
17215
17244
|
service: "auth",
|
|
17216
|
-
create: (e) => new
|
|
17245
|
+
create: (e) => new eh(e)
|
|
17217
17246
|
}
|
|
17218
|
-
},
|
|
17247
|
+
}, Ah = { mock: {
|
|
17219
17248
|
service: "data",
|
|
17220
17249
|
create: (e) => new go(e?.data)
|
|
17221
|
-
} },
|
|
17250
|
+
} }, jh = (e, t) => ({
|
|
17222
17251
|
service: "ai",
|
|
17223
17252
|
create: (n) => new _l(e, n?.[t] || ""),
|
|
17224
17253
|
when: (e) => !!e?.[t]
|
|
17225
|
-
}),
|
|
17226
|
-
firebase:
|
|
17227
|
-
google:
|
|
17228
|
-
dropbox:
|
|
17229
|
-
supabase:
|
|
17230
|
-
mock:
|
|
17254
|
+
}), Mh = {
|
|
17255
|
+
firebase: Eh,
|
|
17256
|
+
google: Dh,
|
|
17257
|
+
dropbox: Oh,
|
|
17258
|
+
supabase: kh,
|
|
17259
|
+
mock: Ah,
|
|
17231
17260
|
ai: {
|
|
17232
|
-
openai:
|
|
17233
|
-
openrouter:
|
|
17234
|
-
opencode:
|
|
17235
|
-
deepseek:
|
|
17236
|
-
gemini:
|
|
17237
|
-
anthropic:
|
|
17238
|
-
mistral:
|
|
17261
|
+
openai: jh(xh, "openaiApiKey"),
|
|
17262
|
+
openrouter: jh(Th, "openRouterApiKey"),
|
|
17263
|
+
opencode: jh(wh, "openCodeApiKey"),
|
|
17264
|
+
deepseek: jh(ph, "deepSeekApiKey"),
|
|
17265
|
+
gemini: jh(yh, "geminiApiKey"),
|
|
17266
|
+
anthropic: jh(oh, "anthropicApiKey"),
|
|
17267
|
+
mistral: jh(bh, "mistralApiKey")
|
|
17239
17268
|
}
|
|
17240
|
-
},
|
|
17241
|
-
function
|
|
17269
|
+
}, Nh = () => /* @__PURE__ */ t.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ t.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
|
|
17270
|
+
function Ph(e, t) {
|
|
17242
17271
|
if (!t) return;
|
|
17243
17272
|
let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
|
|
17244
17273
|
if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
|
|
@@ -17247,10 +17276,10 @@ function Fh(e, t) {
|
|
|
17247
17276
|
}
|
|
17248
17277
|
e.custom = t;
|
|
17249
17278
|
}
|
|
17250
|
-
function
|
|
17279
|
+
function Fh(e, t, n = "default") {
|
|
17251
17280
|
return t && e[t] ? t : Object.keys(e)[0] ?? n;
|
|
17252
17281
|
}
|
|
17253
|
-
function
|
|
17282
|
+
function Ih(e = {}) {
|
|
17254
17283
|
let t = {
|
|
17255
17284
|
data: {},
|
|
17256
17285
|
storage: {},
|
|
@@ -17259,24 +17288,24 @@ function Lh(e = {}) {
|
|
|
17259
17288
|
ai: {},
|
|
17260
17289
|
credentials: {}
|
|
17261
17290
|
}, n = (e) => t[e] ??= {};
|
|
17262
|
-
for (let [t, r] of Object.entries(
|
|
17291
|
+
for (let [t, r] of Object.entries(Mh)) {
|
|
17263
17292
|
let i = e[t];
|
|
17264
17293
|
if (i !== void 0) for (let [e, t] of Object.entries(r)) t.when && !t.when(i) || (n(t.service)[e] = t.create(i));
|
|
17265
17294
|
}
|
|
17266
|
-
for (let [t, r] of Object.entries(e.custom ?? {}))
|
|
17267
|
-
Object.keys(t.data).length === 0 && (t.data.mock = new go()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new
|
|
17295
|
+
for (let [t, r] of Object.entries(e.custom ?? {})) Ph(n(t), r);
|
|
17296
|
+
Object.keys(t.data).length === 0 && (t.data.mock = new go()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new ym());
|
|
17268
17297
|
let r = e.services ?? {}, i = {};
|
|
17269
17298
|
for (let [e, n] of Object.entries(t)) i[e] = {
|
|
17270
17299
|
registry: n,
|
|
17271
|
-
defaultKey:
|
|
17300
|
+
defaultKey: Fh(n, r[e])
|
|
17272
17301
|
};
|
|
17273
17302
|
return i;
|
|
17274
17303
|
}
|
|
17275
|
-
var
|
|
17276
|
-
|
|
17277
|
-
},
|
|
17278
|
-
function
|
|
17279
|
-
let [p, g] = h(() =>
|
|
17304
|
+
var Lh = {}, Rh = (e) => {
|
|
17305
|
+
Lh = e;
|
|
17306
|
+
}, zh = (e) => Lh[e] || [];
|
|
17307
|
+
function Bh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native", scrapeConfig: i, iconProvider: a, googleMaps: o, themeProvider: s, i18n: c, children: l, errorReportUrl: u, debug: d, basename: f }) {
|
|
17308
|
+
let [p, g] = h(() => Ih(n)), v = m(p);
|
|
17280
17309
|
v.current = p;
|
|
17281
17310
|
let y = m(void 0);
|
|
17282
17311
|
y.current ||= (async (e, t, n) => {
|
|
@@ -17293,7 +17322,7 @@ function Vh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17293
17322
|
})));
|
|
17294
17323
|
});
|
|
17295
17324
|
let b = y.current, x = e ?? t.Fragment;
|
|
17296
|
-
return /* @__PURE__ */ t.createElement(
|
|
17325
|
+
return /* @__PURE__ */ t.createElement(_m, {
|
|
17297
17326
|
fullPage: !0,
|
|
17298
17327
|
reportUrl: u,
|
|
17299
17328
|
debug: d
|
|
@@ -17315,10 +17344,10 @@ function Vh({ contextProviders: e, providers: n = {}, appName: r = "LLM Native",
|
|
|
17315
17344
|
} }, /* @__PURE__ */ t.createElement(ga, {
|
|
17316
17345
|
registries: p,
|
|
17317
17346
|
setProvider: b
|
|
17318
|
-
}, /* @__PURE__ */ t.createElement(ti, p.auth, /* @__PURE__ */ t.createElement(
|
|
17347
|
+
}, /* @__PURE__ */ t.createElement(ti, p.auth, /* @__PURE__ */ t.createElement(wm, p.credentials, /* @__PURE__ */ t.createElement(wi, p.data, /* @__PURE__ */ t.createElement(cc, p.storage, /* @__PURE__ */ t.createElement(xm, p.email, /* @__PURE__ */ t.createElement(Qc, p.ai, /* @__PURE__ */ t.createElement(Sr, { config: a }, /* @__PURE__ */ t.createElement(pf, { config: o }, /* @__PURE__ */ t.createElement(Cp, { appName: r }, /* @__PURE__ */ t.createElement(Pn, { config: c }, /* @__PURE__ */ t.createElement(xn, { config: s }, /* @__PURE__ */ t.createElement(x, null, l))))))))))))))));
|
|
17319
17348
|
}
|
|
17320
|
-
function
|
|
17321
|
-
|
|
17349
|
+
function Vh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, children: a, ...o }) {
|
|
17350
|
+
Rh(r);
|
|
17322
17351
|
let s = ({ children: e }) => /* @__PURE__ */ t.createElement(t.Fragment, null, e), c = ({ pageSource: e, message: n }) => /* @__PURE__ */ t.createElement(Io, { variant: "warning" }, "Missing Page: ", e, n && /* @__PURE__ */ t.createElement("code", { className: "ml-2" }, n));
|
|
17323
17352
|
function l(r, a, l) {
|
|
17324
17353
|
let u = `./pages${a.component ? "/" + a.component : a.path === "/" ? "/Home" : et.toCamel(a.path.split("*")[0])}.js`, d = a.page || t.lazy(() => e(u).then((e) => typeof e.default == "function" ? { default: e.default } : (console.warn(`⚠️ Invalid default export in ${u}`), { default: () => /* @__PURE__ */ t.createElement(c, { pageSource: u }) })).catch((e) => (console.error(`❌ Failed to load ${u}:`, e), { default: () => /* @__PURE__ */ t.createElement(c, {
|
|
@@ -17328,32 +17357,32 @@ function Hh({ importPage: e, LayoutDefault: n = void 0, menuConfig: r = {}, chil
|
|
|
17328
17357
|
return /* @__PURE__ */ t.createElement(y, {
|
|
17329
17358
|
key: `${r}-${l}`,
|
|
17330
17359
|
path: a.path,
|
|
17331
|
-
element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(
|
|
17360
|
+
element: /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(_m, {
|
|
17332
17361
|
key: a.path,
|
|
17333
17362
|
reportUrl: o.errorReportUrl,
|
|
17334
17363
|
debug: o.debug
|
|
17335
|
-
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(
|
|
17364
|
+
}, /* @__PURE__ */ t.createElement(i, { fallback: /* @__PURE__ */ t.createElement(Nh, null) }, /* @__PURE__ */ t.createElement(d, null))))
|
|
17336
17365
|
});
|
|
17337
17366
|
}
|
|
17338
17367
|
let u = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && l(t, e, n), e.children && u({ children: e.children })].filter(Boolean)));
|
|
17339
|
-
return /* @__PURE__ */ t.createElement(
|
|
17368
|
+
return /* @__PURE__ */ t.createElement(Bh, o, a, /* @__PURE__ */ t.createElement(b, null, /* @__PURE__ */ t.createElement(y, {
|
|
17340
17369
|
path: ci,
|
|
17341
17370
|
element: /* @__PURE__ */ t.createElement(hi, null)
|
|
17342
17371
|
}), /* @__PURE__ */ t.createElement(t.Fragment, null, u({
|
|
17343
17372
|
default: [{ path: "/" }],
|
|
17344
|
-
...
|
|
17373
|
+
...Lh,
|
|
17345
17374
|
_auth: [{
|
|
17346
17375
|
path: "/users",
|
|
17347
|
-
page:
|
|
17376
|
+
page: cm,
|
|
17348
17377
|
layout: n
|
|
17349
17378
|
}]
|
|
17350
17379
|
})), /* @__PURE__ */ t.createElement(y, {
|
|
17351
17380
|
path: "*",
|
|
17352
|
-
element: /* @__PURE__ */ t.createElement(
|
|
17381
|
+
element: /* @__PURE__ */ t.createElement(lm, null)
|
|
17353
17382
|
})));
|
|
17354
17383
|
}
|
|
17355
|
-
var
|
|
17356
|
-
let t =
|
|
17384
|
+
var Hh = (e) => {
|
|
17385
|
+
let t = zh(e), n = x(), r = (e) => e.map((e) => {
|
|
17357
17386
|
let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
|
|
17358
17387
|
return {
|
|
17359
17388
|
...e,
|
|
@@ -17362,7 +17391,7 @@ var Uh = (e) => {
|
|
|
17362
17391
|
};
|
|
17363
17392
|
});
|
|
17364
17393
|
return p(() => r(t), [n.pathname]);
|
|
17365
|
-
},
|
|
17394
|
+
}, Uh = {
|
|
17366
17395
|
common: {
|
|
17367
17396
|
save: "Salva",
|
|
17368
17397
|
cancel: "Annulla",
|
|
@@ -17529,7 +17558,7 @@ var Uh = (e) => {
|
|
|
17529
17558
|
notConfigured: "La ricerca indirizzi non è configurata (manca la API key Google Maps).",
|
|
17530
17559
|
loadError: "Impossibile caricare la ricerca indirizzi."
|
|
17531
17560
|
}
|
|
17532
|
-
},
|
|
17561
|
+
}, Wh = {
|
|
17533
17562
|
common: {
|
|
17534
17563
|
save: "Speichern",
|
|
17535
17564
|
cancel: "Abbrechen",
|
|
@@ -17696,7 +17725,7 @@ var Uh = (e) => {
|
|
|
17696
17725
|
notConfigured: "Adresssuche ist nicht konfiguriert (Google Maps API-Schlüssel fehlt).",
|
|
17697
17726
|
loadError: "Adresssuche konnte nicht geladen werden."
|
|
17698
17727
|
}
|
|
17699
|
-
},
|
|
17728
|
+
}, Gh = {
|
|
17700
17729
|
common: {
|
|
17701
17730
|
save: "Сохранить",
|
|
17702
17731
|
cancel: "Отменить",
|
|
@@ -17863,7 +17892,7 @@ var Uh = (e) => {
|
|
|
17863
17892
|
notConfigured: "Поиск адресов не настроен (отсутствует ключ Google Maps API).",
|
|
17864
17893
|
loadError: "Не удалось загрузить поиск адресов."
|
|
17865
17894
|
}
|
|
17866
|
-
},
|
|
17895
|
+
}, Kh = {
|
|
17867
17896
|
common: {
|
|
17868
17897
|
save: "保存",
|
|
17869
17898
|
cancel: "取消",
|
|
@@ -18030,7 +18059,7 @@ var Uh = (e) => {
|
|
|
18030
18059
|
notConfigured: "地址搜索未配置(缺少 Google Maps API 密钥)。",
|
|
18031
18060
|
loadError: "无法加载地址搜索。"
|
|
18032
18061
|
}
|
|
18033
|
-
},
|
|
18062
|
+
}, qh = {
|
|
18034
18063
|
common: {
|
|
18035
18064
|
save: "حفظ",
|
|
18036
18065
|
cancel: "إلغاء",
|
|
@@ -18197,22 +18226,22 @@ var Uh = (e) => {
|
|
|
18197
18226
|
notConfigured: "البحث عن العناوين غير مُعد (مفتاح Google Maps API مفقود).",
|
|
18198
18227
|
loadError: "تعذر تحميل البحث عن العناوين."
|
|
18199
18228
|
}
|
|
18200
|
-
},
|
|
18201
|
-
ar: () =>
|
|
18202
|
-
de: () =>
|
|
18229
|
+
}, Jh = /* @__PURE__ */ Je({
|
|
18230
|
+
ar: () => qh,
|
|
18231
|
+
de: () => Wh,
|
|
18203
18232
|
en: () => wn,
|
|
18204
|
-
it: () =>
|
|
18205
|
-
ru: () =>
|
|
18206
|
-
zh: () =>
|
|
18207
|
-
}),
|
|
18233
|
+
it: () => Uh,
|
|
18234
|
+
ru: () => Gh,
|
|
18235
|
+
zh: () => Kh
|
|
18236
|
+
}), Yh = (e) => ya("api", e);
|
|
18208
18237
|
//#endregion
|
|
18209
18238
|
//#region src/providers/api/direct.ts
|
|
18210
|
-
async function
|
|
18239
|
+
async function Xh(e) {
|
|
18211
18240
|
if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
|
|
18212
18241
|
let t = await e.text();
|
|
18213
18242
|
return t ? JSON.parse(t) : void 0;
|
|
18214
18243
|
}
|
|
18215
|
-
var
|
|
18244
|
+
var Zh = class {
|
|
18216
18245
|
config;
|
|
18217
18246
|
constructor(e) {
|
|
18218
18247
|
this.config = e;
|
|
@@ -18227,7 +18256,7 @@ var Qh = class {
|
|
|
18227
18256
|
...e.body,
|
|
18228
18257
|
...this.config.body
|
|
18229
18258
|
};
|
|
18230
|
-
return
|
|
18259
|
+
return Xh(await al(n.toString(), {
|
|
18231
18260
|
method: t,
|
|
18232
18261
|
headers: {
|
|
18233
18262
|
"Content-Type": "application/json",
|
|
@@ -18236,7 +18265,7 @@ var Qh = class {
|
|
|
18236
18265
|
body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
|
|
18237
18266
|
}));
|
|
18238
18267
|
}
|
|
18239
|
-
},
|
|
18268
|
+
}, Qh = class {
|
|
18240
18269
|
resolver;
|
|
18241
18270
|
constructor(e) {
|
|
18242
18271
|
this.resolver = e;
|
|
@@ -18244,7 +18273,7 @@ var Qh = class {
|
|
|
18244
18273
|
async fetch(e) {
|
|
18245
18274
|
return this.resolver(e);
|
|
18246
18275
|
}
|
|
18247
|
-
},
|
|
18276
|
+
}, $h = class {
|
|
18248
18277
|
config;
|
|
18249
18278
|
constructor(e) {
|
|
18250
18279
|
this.config = e;
|
|
@@ -18255,7 +18284,7 @@ var Qh = class {
|
|
|
18255
18284
|
request: e
|
|
18256
18285
|
}, void 0, this.config.region);
|
|
18257
18286
|
}
|
|
18258
|
-
},
|
|
18287
|
+
}, eg = class {
|
|
18259
18288
|
config;
|
|
18260
18289
|
constructor(e) {
|
|
18261
18290
|
this.config = e;
|
|
@@ -18268,7 +18297,7 @@ var Qh = class {
|
|
|
18268
18297
|
if (n) throw n;
|
|
18269
18298
|
return t;
|
|
18270
18299
|
}
|
|
18271
|
-
},
|
|
18300
|
+
}, tg = [
|
|
18272
18301
|
{
|
|
18273
18302
|
id: "resend",
|
|
18274
18303
|
label: "Resend",
|
|
@@ -18379,7 +18408,7 @@ var Qh = class {
|
|
|
18379
18408
|
],
|
|
18380
18409
|
credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
|
|
18381
18410
|
}
|
|
18382
|
-
],
|
|
18411
|
+
], ng = [
|
|
18383
18412
|
{
|
|
18384
18413
|
id: "cloudflare_pages",
|
|
18385
18414
|
label: "Cloudflare Pages",
|
|
@@ -18609,15 +18638,15 @@ var Qh = class {
|
|
|
18609
18638
|
description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
|
|
18610
18639
|
credentialFields: []
|
|
18611
18640
|
}
|
|
18612
|
-
],
|
|
18613
|
-
|
|
18614
|
-
Eh,
|
|
18641
|
+
], rg = [
|
|
18642
|
+
xh,
|
|
18615
18643
|
Th,
|
|
18616
|
-
|
|
18644
|
+
wh,
|
|
18645
|
+
ph,
|
|
18646
|
+
yh,
|
|
18647
|
+
oh,
|
|
18617
18648
|
bh,
|
|
18618
|
-
|
|
18619
|
-
xh,
|
|
18620
|
-
ph({
|
|
18649
|
+
fh({
|
|
18621
18650
|
id: "glm",
|
|
18622
18651
|
label: "ZhipuAI (GLM)",
|
|
18623
18652
|
description: "Zhipu AI's GLM model family.",
|
|
@@ -18634,7 +18663,7 @@ var Qh = class {
|
|
|
18634
18663
|
dashboardUrl: "https://bigmodel.cn/usercenter/apikeys",
|
|
18635
18664
|
credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
|
|
18636
18665
|
})
|
|
18637
|
-
],
|
|
18666
|
+
], ig = (e) => ({
|
|
18638
18667
|
id: e.id,
|
|
18639
18668
|
label: e.label,
|
|
18640
18669
|
description: e.description ?? "",
|
|
@@ -18645,7 +18674,7 @@ var Qh = class {
|
|
|
18645
18674
|
}],
|
|
18646
18675
|
credentialsUrl: e.dashboardUrl,
|
|
18647
18676
|
credentialsHint: e.credentialsHint
|
|
18648
|
-
}),
|
|
18677
|
+
}), ag = rg.map(ig), og = {
|
|
18649
18678
|
id: "openai-compatible",
|
|
18650
18679
|
label: "OpenAI-compatible",
|
|
18651
18680
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18659,9 +18688,9 @@ var Qh = class {
|
|
|
18659
18688
|
type: "text",
|
|
18660
18689
|
placeholder: "https://api.example.com/v1"
|
|
18661
18690
|
}]
|
|
18662
|
-
},
|
|
18691
|
+
}, sg = (e) => {
|
|
18663
18692
|
let t = e?.openAICompatible?.baseUrl?.trim();
|
|
18664
|
-
return t ? [
|
|
18693
|
+
return t ? [fh({
|
|
18665
18694
|
id: "openai-compatible",
|
|
18666
18695
|
label: e?.openAICompatible?.label?.trim() || "OpenAI-compatible",
|
|
18667
18696
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -18673,35 +18702,35 @@ var Qh = class {
|
|
|
18673
18702
|
modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
|
|
18674
18703
|
chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
|
|
18675
18704
|
})] : [];
|
|
18676
|
-
},
|
|
18705
|
+
}, cg = (e) => e ? [...rg, ...sg(e)].reduce((t, n) => {
|
|
18677
18706
|
let r = n.id === "openai-compatible" ? e.openAICompatible?.apiKey?.trim() || "" : typeof n.configKey == "string" && typeof e[n.configKey] == "string" ? String(e[n.configKey] || "").trim() : "";
|
|
18678
18707
|
return r && (t[n.id] = new _l(n, r)), t;
|
|
18679
|
-
}, {}) : {},
|
|
18708
|
+
}, {}) : {}, lg = void 0;
|
|
18680
18709
|
typeof wa == "function" && wa((e) => {
|
|
18681
|
-
|
|
18710
|
+
lg = e.google;
|
|
18682
18711
|
});
|
|
18683
|
-
var
|
|
18712
|
+
var ug = {
|
|
18684
18713
|
ita: "geoTargetConstants/2380",
|
|
18685
18714
|
rome: "geoTargetConstants/1033236",
|
|
18686
18715
|
mil: "geoTargetConstants/1033239",
|
|
18687
18716
|
nap: "geoTargetConstants/1033245",
|
|
18688
18717
|
tor: "geoTargetConstants/1033247"
|
|
18689
|
-
},
|
|
18718
|
+
}, dg = {
|
|
18690
18719
|
it: "languageConstants/1000",
|
|
18691
18720
|
en: "languageConstants/1001",
|
|
18692
18721
|
fr: "languageConstants/1002",
|
|
18693
18722
|
es: "languageConstants/1003",
|
|
18694
18723
|
de: "languageConstants/1005"
|
|
18695
18724
|
};
|
|
18696
|
-
function
|
|
18697
|
-
return
|
|
18725
|
+
function fg(e) {
|
|
18726
|
+
return ug[e.toLowerCase()] || "geoTargetConstants/2380";
|
|
18698
18727
|
}
|
|
18699
|
-
function
|
|
18700
|
-
return
|
|
18728
|
+
function pg(e) {
|
|
18729
|
+
return dg[e.toLowerCase()] || "languageConstants/1000";
|
|
18701
18730
|
}
|
|
18702
|
-
async function
|
|
18703
|
-
if (!
|
|
18704
|
-
let i = await
|
|
18731
|
+
async function mg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
|
|
18732
|
+
if (!lg?.developerToken) return console.error("\n❌ Google Ads API: developerToken non configurato.\n\nPer ottenere un developerToken segui questi passaggi:\n\n1️⃣ Vai su https://ads.google.com/aw/apicenter\n2️⃣ Seleziona o crea un account Google Ads Manager (MCC) se non ne hai uno.\n3️⃣ Vai alla sezione \"Strumenti e impostazioni\" → \"Accesso API\" (o \"API Center\").\n4️⃣ Clicca su \"Richiedi accesso API\" se non l'hai ancora fatto.\n5️⃣ Copia il valore del tuo Developer Token (è un identificatore simile a: 'ABc123456789xyz').\n6️⃣ Inseriscilo nel tuo file di configurazione, nella sezione:\n config.google.developerToken\n\nℹ️ Attenzione: Inizialmente il token sarà in modalità di test. Per usarlo in produzione, dovrai richiedere l'approvazione da Google Ads.\n"), [];
|
|
18733
|
+
let i = await Xm(["https://www.googleapis.com/auth/adwords"]), a = fg(n), o = pg(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
|
|
18705
18734
|
keywordSeed: { keywords: [e] },
|
|
18706
18735
|
geoTargetConstants: [a],
|
|
18707
18736
|
language: o
|
|
@@ -18709,7 +18738,7 @@ async function hg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
18709
18738
|
method: "POST",
|
|
18710
18739
|
headers: {
|
|
18711
18740
|
Authorization: `Bearer ${i}`,
|
|
18712
|
-
"developer-token":
|
|
18741
|
+
"developer-token": lg.developerToken,
|
|
18713
18742
|
"Content-Type": "application/json"
|
|
18714
18743
|
},
|
|
18715
18744
|
body: JSON.stringify(c)
|
|
@@ -18727,7 +18756,7 @@ async function hg({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
18727
18756
|
}
|
|
18728
18757
|
//#endregion
|
|
18729
18758
|
//#region src/providers/seo/google/trend.ts
|
|
18730
|
-
async function
|
|
18759
|
+
async function hg(e, t = "IT", n = "today 12-m") {
|
|
18731
18760
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
18732
18761
|
comparisonItem: [{
|
|
18733
18762
|
keyword: e,
|
|
@@ -18747,7 +18776,7 @@ async function gg(e, t = "IT", n = "today 12-m") {
|
|
|
18747
18776
|
}))
|
|
18748
18777
|
};
|
|
18749
18778
|
}
|
|
18750
|
-
async function
|
|
18779
|
+
async function gg(e, t = "IT", n = "today 12-m") {
|
|
18751
18780
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
18752
18781
|
comparisonItem: [{
|
|
18753
18782
|
keyword: e,
|
|
@@ -18773,13 +18802,13 @@ async function _g(e, t = "IT", n = "today 12-m") {
|
|
|
18773
18802
|
}
|
|
18774
18803
|
//#endregion
|
|
18775
18804
|
//#region src/providers/storage/dropbox.tsx
|
|
18776
|
-
var
|
|
18805
|
+
var _g = 5e3, vg = "https://www.dropbox.com/home", yg = void 0;
|
|
18777
18806
|
typeof wa == "function" && wa((e) => {
|
|
18778
|
-
|
|
18807
|
+
yg = e.dropbox;
|
|
18779
18808
|
});
|
|
18780
|
-
var
|
|
18781
|
-
if (!
|
|
18782
|
-
let r = await bi(
|
|
18809
|
+
var bg = async (e, t, n = {}) => {
|
|
18810
|
+
if (!yg) return console.error("DropBox: Config not found"), null;
|
|
18811
|
+
let r = await bi(yg.clientId);
|
|
18783
18812
|
if (!r) throw Error("DropBox: Access token not found");
|
|
18784
18813
|
return await fetch(e, {
|
|
18785
18814
|
method: "POST",
|
|
@@ -18792,12 +18821,12 @@ var xg = async (e, t, n = {}) => {
|
|
|
18792
18821
|
}).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
|
|
18793
18822
|
console.log("DropBox: Fetch operation completed");
|
|
18794
18823
|
});
|
|
18795
|
-
},
|
|
18796
|
-
if (!
|
|
18824
|
+
}, xg = async (e, t, n = {}) => {
|
|
18825
|
+
if (!yg) {
|
|
18797
18826
|
console.error("DropBox: Config not found");
|
|
18798
18827
|
return;
|
|
18799
18828
|
}
|
|
18800
|
-
let r = await bi(
|
|
18829
|
+
let r = await bi(yg.clientId);
|
|
18801
18830
|
if (!r) {
|
|
18802
18831
|
console.error("DropBox: Access token not found");
|
|
18803
18832
|
return;
|
|
@@ -18822,47 +18851,47 @@ var xg = async (e, t, n = {}) => {
|
|
|
18822
18851
|
}).finally(() => {
|
|
18823
18852
|
console.log("DropBox: Fetch operation completed", e, t);
|
|
18824
18853
|
});
|
|
18825
|
-
},
|
|
18826
|
-
let n =
|
|
18827
|
-
return (t ?
|
|
18828
|
-
},
|
|
18854
|
+
}, Sg = (e, t = !1) => {
|
|
18855
|
+
let n = yg?.rootPath || "";
|
|
18856
|
+
return (t ? vg : "") + (e.startsWith(n) ? e : n + e);
|
|
18857
|
+
}, Cg = async (e, t = "", n = !1) => {
|
|
18829
18858
|
let r = {};
|
|
18830
|
-
return (await
|
|
18859
|
+
return (await Lg.listFolders({
|
|
18831
18860
|
path: `${e + t}`,
|
|
18832
18861
|
recursive: !0
|
|
18833
18862
|
})).forEach((e) => {
|
|
18834
18863
|
e[".tag"] !== "folder" && (r[n ? ri.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
|
|
18835
18864
|
}), r;
|
|
18836
|
-
},
|
|
18865
|
+
}, wg = async (e, t) => {
|
|
18837
18866
|
if (!e.async_job_id) return Promise.reject(e);
|
|
18838
18867
|
let n, r = !0;
|
|
18839
|
-
for (; r;) await ut(100), n = await
|
|
18868
|
+
for (; r;) await ut(100), n = await xg(`https://api.dropboxapi.com/2/${t}/check`, { async_job_id: e.async_job_id }), console.log("DropBox: Check folders response: ", n), n?.[".tag"] !== "in_progress" && (r = !1);
|
|
18840
18869
|
return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
|
|
18841
|
-
},
|
|
18842
|
-
let n = "files/create_folder_batch", r = await
|
|
18870
|
+
}, Tg = async (e, t = "") => {
|
|
18871
|
+
let n = "files/create_folder_batch", r = await xg(`https://api.dropboxapi.com/2/${n}`, {
|
|
18843
18872
|
autorename: !1,
|
|
18844
18873
|
force_async: !0,
|
|
18845
|
-
paths: e.map((e) =>
|
|
18874
|
+
paths: e.map((e) => Sg(t + e))
|
|
18846
18875
|
});
|
|
18847
|
-
return r ?
|
|
18848
|
-
},
|
|
18849
|
-
let n = "files/create_folder_batch", r = await
|
|
18850
|
-
return r ?
|
|
18851
|
-
},
|
|
18876
|
+
return r ? wg(r, n) : void 0;
|
|
18877
|
+
}, Eg = async (e, t = "") => {
|
|
18878
|
+
let n = "files/create_folder_batch", r = await xg(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: Sg(t + e) })) });
|
|
18879
|
+
return r ? wg(r, n) : void 0;
|
|
18880
|
+
}, Dg = async (e, t) => xg("https://api.dropboxapi.com/2/files/tags/add", {
|
|
18852
18881
|
path: e,
|
|
18853
18882
|
tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
|
|
18854
|
-
}),
|
|
18855
|
-
for (let n in e) for (let r of e[n]) await
|
|
18856
|
-
},
|
|
18857
|
-
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await
|
|
18883
|
+
}), Og = async (e, t = "") => {
|
|
18884
|
+
for (let n in e) for (let r of e[n]) await Dg(Sg(t + n), r);
|
|
18885
|
+
}, kg = async ({ path: e = "", recursive: t = !1 } = {}) => {
|
|
18886
|
+
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await xg("https://api.dropboxapi.com/2/files/list_folder", {
|
|
18858
18887
|
include_deleted: !1,
|
|
18859
18888
|
include_has_explicit_shared_members: !1,
|
|
18860
18889
|
include_media_info: !1,
|
|
18861
18890
|
include_mounted_folders: !0,
|
|
18862
18891
|
include_non_downloadable_files: !0,
|
|
18863
|
-
path:
|
|
18892
|
+
path: Sg(e),
|
|
18864
18893
|
recursive: n
|
|
18865
|
-
}) : await
|
|
18894
|
+
}) : await xg("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
|
|
18866
18895
|
has_more: !0,
|
|
18867
18896
|
cursor: "",
|
|
18868
18897
|
entries: []
|
|
@@ -18875,44 +18904,44 @@ var xg = async (e, t, n = {}) => {
|
|
|
18875
18904
|
recursive: t
|
|
18876
18905
|
}), i && n.push(...i.entries);
|
|
18877
18906
|
return n;
|
|
18878
|
-
},
|
|
18879
|
-
let t = async (e) => await
|
|
18907
|
+
}, Ag = async (e) => {
|
|
18908
|
+
let t = async (e) => await xg("https://api.dropboxapi.com/2/files/copy_batch_v2", {
|
|
18880
18909
|
entries: e,
|
|
18881
18910
|
autorename: !1
|
|
18882
|
-
}), n = async (e) => await
|
|
18911
|
+
}), n = async (e) => await xg("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
|
|
18883
18912
|
for (let a = 0; a < e.length; a += 900) {
|
|
18884
18913
|
i = e.slice(a, a + 900).map((e) => ({
|
|
18885
|
-
from_path:
|
|
18886
|
-
to_path:
|
|
18914
|
+
from_path: Sg(e.from),
|
|
18915
|
+
to_path: Sg(e.to)
|
|
18887
18916
|
}));
|
|
18888
18917
|
let o = await t(i);
|
|
18889
18918
|
if (!o) continue;
|
|
18890
18919
|
if (o.error) throw Error(`Error starting copy: ${o.error}`);
|
|
18891
18920
|
let s = o;
|
|
18892
|
-
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(
|
|
18921
|
+
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await ut(_g), s = await n(o.async_job_id ?? "");
|
|
18893
18922
|
if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
|
|
18894
18923
|
s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
|
|
18895
18924
|
}
|
|
18896
18925
|
return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
|
|
18897
|
-
},
|
|
18898
|
-
let t = async (e) => await
|
|
18926
|
+
}, jg = async (e) => {
|
|
18927
|
+
let t = async (e) => await xg("https://api.dropboxapi.com/2/files/move_v2", {
|
|
18899
18928
|
...e,
|
|
18900
18929
|
autorename: !0
|
|
18901
18930
|
});
|
|
18902
18931
|
for (let n of e) await t({
|
|
18903
|
-
from_path:
|
|
18904
|
-
to_path:
|
|
18932
|
+
from_path: Sg(n.from),
|
|
18933
|
+
to_path: Sg(n.to)
|
|
18905
18934
|
});
|
|
18906
|
-
},
|
|
18935
|
+
}, Mg = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
|
|
18907
18936
|
let a = {}, o = [];
|
|
18908
18937
|
for (let s = 0; s < e.length; s += 25) {
|
|
18909
18938
|
let c = e.slice(s, s + 25), l = c.map((e) => ({
|
|
18910
|
-
path:
|
|
18939
|
+
path: Sg(e.path),
|
|
18911
18940
|
format: n,
|
|
18912
18941
|
size: t,
|
|
18913
18942
|
mode: r
|
|
18914
18943
|
}));
|
|
18915
|
-
await ut(100), o.push(
|
|
18944
|
+
await ut(100), o.push(xg("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
|
|
18916
18945
|
if (!e) return;
|
|
18917
18946
|
let n = e.entries.reduce((e, n, r) => {
|
|
18918
18947
|
let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
|
|
@@ -18931,7 +18960,7 @@ var xg = async (e, t, n = {}) => {
|
|
|
18931
18960
|
}));
|
|
18932
18961
|
}
|
|
18933
18962
|
return Promise.all(o).then(() => a);
|
|
18934
|
-
},
|
|
18963
|
+
}, Ng = (e, t = "application/octet-stream", n = 512) => {
|
|
18935
18964
|
let r = atob(e), i = [];
|
|
18936
18965
|
for (let e = 0; e < r.length; e += n) {
|
|
18937
18966
|
let t = r.slice(e, e + n), a = Array(t.length);
|
|
@@ -18940,11 +18969,11 @@ var xg = async (e, t, n = {}) => {
|
|
|
18940
18969
|
i.push(o);
|
|
18941
18970
|
}
|
|
18942
18971
|
return new Blob(i, { type: t });
|
|
18943
|
-
},
|
|
18972
|
+
}, Pg = async (e, t) => {
|
|
18944
18973
|
try {
|
|
18945
18974
|
let n = t.split(",")[1];
|
|
18946
|
-
|
|
18947
|
-
path:
|
|
18975
|
+
bg("https://content.dropboxapi.com/2/files/upload", Ng(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
|
|
18976
|
+
path: Sg(e),
|
|
18948
18977
|
mode: "overwrite",
|
|
18949
18978
|
autorename: !0,
|
|
18950
18979
|
mute: !1
|
|
@@ -18954,12 +18983,12 @@ var xg = async (e, t, n = {}) => {
|
|
|
18954
18983
|
} catch (e) {
|
|
18955
18984
|
console.error("Errore durante il caricamento su Dropbox:", e);
|
|
18956
18985
|
}
|
|
18957
|
-
},
|
|
18958
|
-
if (!
|
|
18986
|
+
}, Fg = (e = !1) => yg ? _i(yg.clientId, e) : !1, Ig = (e = {}) => {
|
|
18987
|
+
if (!yg) return /* @__PURE__ */ t.createElement("div", {
|
|
18959
18988
|
title: "DropBox: configurazione mancante. Recupera il \"Client ID\" accedendo a https://www.dropbox.com/developers, vai su \"App Console\", seleziona un'app esistente o chiedi il Client ID a chi ha configurato il sistema.",
|
|
18960
18989
|
className: "text-danger flex items-center gap-2"
|
|
18961
18990
|
}, /* @__PURE__ */ t.createElement(Q, { name: "warning" }), /* @__PURE__ */ t.createElement("span", null, "Dropbox non configurato"));
|
|
18962
|
-
let n =
|
|
18991
|
+
let n = Fg(!0);
|
|
18963
18992
|
return /* @__PURE__ */ t.createElement(Si, {
|
|
18964
18993
|
provider: "dropboxAuth",
|
|
18965
18994
|
intent: "connect",
|
|
@@ -18971,33 +19000,33 @@ var xg = async (e, t, n = {}) => {
|
|
|
18971
19000
|
title: n ? "DropBox Connected" : "DropBox Disconnected"
|
|
18972
19001
|
}
|
|
18973
19002
|
});
|
|
18974
|
-
},
|
|
19003
|
+
}, Lg = {
|
|
18975
19004
|
setRootPath: (e) => {
|
|
18976
|
-
|
|
19005
|
+
yg && (yg.rootPath = e);
|
|
18977
19006
|
},
|
|
18978
|
-
resolvePath:
|
|
18979
|
-
createFolders:
|
|
18980
|
-
deleteBulk:
|
|
18981
|
-
addTags:
|
|
18982
|
-
listFolders:
|
|
18983
|
-
getThumbnails:
|
|
18984
|
-
search:
|
|
18985
|
-
upload:
|
|
18986
|
-
copy:
|
|
18987
|
-
move:
|
|
18988
|
-
},
|
|
19007
|
+
resolvePath: Sg,
|
|
19008
|
+
createFolders: Tg,
|
|
19009
|
+
deleteBulk: Eg,
|
|
19010
|
+
addTags: Og,
|
|
19011
|
+
listFolders: kg,
|
|
19012
|
+
getThumbnails: Mg,
|
|
19013
|
+
search: Cg,
|
|
19014
|
+
upload: Pg,
|
|
19015
|
+
copy: Ag,
|
|
19016
|
+
move: jg
|
|
19017
|
+
}, Rg = "https://api.serpapi.com/search", zg = "google", Bg = "google_images", Vg = "google_autocomplete", Hg = "google_trends", Ug = "google_maps", Wg = "google_maps_photos", Gg = "google_maps_reviews", Kg = {
|
|
18989
19018
|
engine: null,
|
|
18990
19019
|
device: null,
|
|
18991
19020
|
no_cache: !1,
|
|
18992
19021
|
async: !1,
|
|
18993
19022
|
output: "json"
|
|
18994
|
-
},
|
|
19023
|
+
}, qg = { q: null }, Jg = {
|
|
18995
19024
|
tbs: null,
|
|
18996
19025
|
safe: "active",
|
|
18997
19026
|
nfpr: 0,
|
|
18998
19027
|
filter: 1
|
|
18999
19028
|
};
|
|
19000
|
-
function
|
|
19029
|
+
function Yg(e) {
|
|
19001
19030
|
let t = Rc(), n = Rc(!0), r = zc(!0), i = {
|
|
19002
19031
|
location: t,
|
|
19003
19032
|
uule: null
|
|
@@ -19015,13 +19044,13 @@ function Xg(e) {
|
|
|
19015
19044
|
hl: r
|
|
19016
19045
|
};
|
|
19017
19046
|
return {
|
|
19018
|
-
[
|
|
19019
|
-
...
|
|
19047
|
+
[zg]: {
|
|
19048
|
+
...Kg,
|
|
19020
19049
|
...i,
|
|
19021
19050
|
...o,
|
|
19022
|
-
...Yg,
|
|
19023
19051
|
...Jg,
|
|
19024
|
-
|
|
19052
|
+
...qg,
|
|
19053
|
+
engine: zg,
|
|
19025
19054
|
ludocid: null,
|
|
19026
19055
|
lsig: null,
|
|
19027
19056
|
kgmid: null,
|
|
@@ -19030,29 +19059,29 @@ function Xg(e) {
|
|
|
19030
19059
|
start: null,
|
|
19031
19060
|
num: null
|
|
19032
19061
|
},
|
|
19033
|
-
[
|
|
19034
|
-
...
|
|
19062
|
+
[Bg]: {
|
|
19063
|
+
...Kg,
|
|
19035
19064
|
...i,
|
|
19036
19065
|
...o,
|
|
19037
|
-
...Yg,
|
|
19038
19066
|
...Jg,
|
|
19039
|
-
|
|
19067
|
+
...qg,
|
|
19068
|
+
engine: Bg,
|
|
19040
19069
|
chips: null,
|
|
19041
19070
|
ijn: null
|
|
19042
19071
|
},
|
|
19043
|
-
[
|
|
19044
|
-
...
|
|
19072
|
+
[Vg]: {
|
|
19073
|
+
...Kg,
|
|
19045
19074
|
...o,
|
|
19046
|
-
...
|
|
19047
|
-
engine:
|
|
19075
|
+
...qg,
|
|
19076
|
+
engine: Vg,
|
|
19048
19077
|
cp: null,
|
|
19049
19078
|
client: null
|
|
19050
19079
|
},
|
|
19051
|
-
[
|
|
19052
|
-
...
|
|
19080
|
+
[Hg]: {
|
|
19081
|
+
...Kg,
|
|
19053
19082
|
...a,
|
|
19054
|
-
...
|
|
19055
|
-
engine:
|
|
19083
|
+
...qg,
|
|
19084
|
+
engine: Hg,
|
|
19056
19085
|
data_type: null,
|
|
19057
19086
|
tz: null,
|
|
19058
19087
|
cat: null,
|
|
@@ -19060,73 +19089,73 @@ function Xg(e) {
|
|
|
19060
19089
|
date: null,
|
|
19061
19090
|
csv: null
|
|
19062
19091
|
},
|
|
19063
|
-
[
|
|
19064
|
-
...
|
|
19092
|
+
[Ug]: {
|
|
19093
|
+
...Kg,
|
|
19065
19094
|
...i,
|
|
19066
19095
|
...o,
|
|
19067
|
-
...Yg,
|
|
19068
19096
|
...Jg,
|
|
19097
|
+
...qg,
|
|
19098
|
+
engine: Ug
|
|
19099
|
+
},
|
|
19100
|
+
[Wg]: {
|
|
19101
|
+
...Kg,
|
|
19102
|
+
...s,
|
|
19069
19103
|
engine: Wg
|
|
19070
19104
|
},
|
|
19071
19105
|
[Gg]: {
|
|
19072
|
-
...
|
|
19106
|
+
...Kg,
|
|
19073
19107
|
...s,
|
|
19074
19108
|
engine: Gg
|
|
19075
|
-
},
|
|
19076
|
-
[Kg]: {
|
|
19077
|
-
...qg,
|
|
19078
|
-
...s,
|
|
19079
|
-
engine: Kg
|
|
19080
19109
|
}
|
|
19081
19110
|
}[e] ?? {};
|
|
19082
19111
|
}
|
|
19083
|
-
var
|
|
19112
|
+
var Xg = void 0;
|
|
19084
19113
|
typeof wa == "function" && wa((e) => {
|
|
19085
|
-
|
|
19114
|
+
Xg = e.scrape;
|
|
19086
19115
|
});
|
|
19087
|
-
function
|
|
19116
|
+
function Zg(e) {
|
|
19088
19117
|
let t = {};
|
|
19089
19118
|
for (let n in e) e[n] !== null && (t[n] = e[n]);
|
|
19090
19119
|
return t;
|
|
19091
19120
|
}
|
|
19092
|
-
var
|
|
19093
|
-
function
|
|
19094
|
-
let t =
|
|
19095
|
-
return t.length === 0 ? null : (e &&
|
|
19121
|
+
var Qg = 0;
|
|
19122
|
+
function $g(e = !1) {
|
|
19123
|
+
let t = Xg?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
|
|
19124
|
+
return t.length === 0 ? null : (e && Qg++, Qg < t.length ? t[Qg] : null);
|
|
19096
19125
|
}
|
|
19097
|
-
var
|
|
19126
|
+
var e_ = async (e, t) => {
|
|
19098
19127
|
let n = (n) => {
|
|
19099
|
-
let r =
|
|
19100
|
-
...
|
|
19128
|
+
let r = Zg({
|
|
19129
|
+
...Yg(t),
|
|
19101
19130
|
api_key: n,
|
|
19102
19131
|
q: e
|
|
19103
19132
|
});
|
|
19104
|
-
return console.log(
|
|
19105
|
-
}, r =
|
|
19133
|
+
return console.log(Rg, r), `${Rg}?${new URLSearchParams(r)}`;
|
|
19134
|
+
}, r = $g();
|
|
19106
19135
|
for (; r;) try {
|
|
19107
19136
|
return await Wt(n(r));
|
|
19108
19137
|
} catch (e) {
|
|
19109
19138
|
if (e?.error === "quota_exceeded") {
|
|
19110
|
-
console.warn(`SerpApi: invalid api key: ${r}`, e), r =
|
|
19139
|
+
console.warn(`SerpApi: invalid api key: ${r}`, e), r = $g(!0);
|
|
19111
19140
|
continue;
|
|
19112
19141
|
}
|
|
19113
19142
|
throw console.error(`SerpApi: ${r}`, e), e;
|
|
19114
19143
|
}
|
|
19115
19144
|
return null;
|
|
19116
|
-
},
|
|
19145
|
+
}, t_ = async (e, t, n) => {
|
|
19117
19146
|
let r = `${ka}/${ct(t)}/${ct(e)}`, i = await n.read(r);
|
|
19118
19147
|
if (i) return i;
|
|
19119
|
-
let a = await
|
|
19148
|
+
let a = await e_(e, t);
|
|
19120
19149
|
return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
|
|
19121
|
-
},
|
|
19122
|
-
googleSearch: async (t) =>
|
|
19123
|
-
googleImages: async (t) =>
|
|
19124
|
-
googleAutocomplete: async (t) =>
|
|
19125
|
-
googleTrends: async (t) =>
|
|
19126
|
-
googleMaps: async (t) =>
|
|
19127
|
-
googleMapsPhotos: async (t) =>
|
|
19128
|
-
googleMapsReviews: async (t) =>
|
|
19129
|
-
}),
|
|
19150
|
+
}, n_ = (e) => ({
|
|
19151
|
+
googleSearch: async (t) => t_(t, zg, e),
|
|
19152
|
+
googleImages: async (t) => t_(t, Bg, e),
|
|
19153
|
+
googleAutocomplete: async (t) => t_(t, Vg, e),
|
|
19154
|
+
googleTrends: async (t) => t_(t, Hg, e),
|
|
19155
|
+
googleMaps: async (t) => t_(t, Ug, e),
|
|
19156
|
+
googleMapsPhotos: async (t) => t_(t, Wg, e),
|
|
19157
|
+
googleMapsReviews: async (t) => t_(t, Gg, e)
|
|
19158
|
+
}), r_ = {
|
|
19130
19159
|
"+": "+",
|
|
19131
19160
|
"﹢": "+",
|
|
19132
19161
|
"-": "-",
|
|
@@ -19201,7 +19230,7 @@ var t_ = async (e, t) => {
|
|
|
19201
19230
|
x: "x",
|
|
19202
19231
|
y: "y",
|
|
19203
19232
|
z: "z"
|
|
19204
|
-
},
|
|
19233
|
+
}, i_ = {
|
|
19205
19234
|
email: {
|
|
19206
19235
|
description: "Email: no spaces -> Lower/Trim",
|
|
19207
19236
|
transformations: [{
|
|
@@ -19247,7 +19276,7 @@ var t_ = async (e, t) => {
|
|
|
19247
19276
|
transformations: [],
|
|
19248
19277
|
mask: ["toSlug"]
|
|
19249
19278
|
}
|
|
19250
|
-
},
|
|
19279
|
+
}, a_ = [
|
|
19251
19280
|
{
|
|
19252
19281
|
pattern: "email*",
|
|
19253
19282
|
use: "email"
|
|
@@ -19264,24 +19293,24 @@ var t_ = async (e, t) => {
|
|
|
19264
19293
|
pattern: "date*",
|
|
19265
19294
|
use: "date"
|
|
19266
19295
|
}
|
|
19267
|
-
],
|
|
19268
|
-
function
|
|
19269
|
-
return e ? e.normalize("NFKC").replace(
|
|
19296
|
+
], o_ = new RegExp(Object.keys(r_).join("|"), "g");
|
|
19297
|
+
function s_(e) {
|
|
19298
|
+
return e ? e.normalize("NFKC").replace(o_, (e) => r_[e] ?? e) : "";
|
|
19270
19299
|
}
|
|
19271
|
-
var
|
|
19300
|
+
var c_ = class {
|
|
19272
19301
|
config;
|
|
19273
19302
|
matches;
|
|
19274
19303
|
constructor(e = {}, t = []) {
|
|
19275
19304
|
this.config = {
|
|
19276
|
-
...
|
|
19305
|
+
...i_,
|
|
19277
19306
|
...e
|
|
19278
|
-
}, this.matches = [...
|
|
19307
|
+
}, this.matches = [...a_, ...t];
|
|
19279
19308
|
}
|
|
19280
19309
|
apply(e, t, n = !1) {
|
|
19281
19310
|
let r = this.config[e];
|
|
19282
19311
|
if (!r) return n ? It(t) : t;
|
|
19283
19312
|
let i = t;
|
|
19284
|
-
i =
|
|
19313
|
+
i = s_(String(i ?? ""));
|
|
19285
19314
|
let a = r.exclusions;
|
|
19286
19315
|
if (Array.isArray(a) && a.length) {
|
|
19287
19316
|
let e = String(i).toLowerCase();
|
|
@@ -19340,7 +19369,7 @@ var l_ = class {
|
|
|
19340
19369
|
};
|
|
19341
19370
|
//#endregion
|
|
19342
19371
|
//#region src/libs/csv.ts
|
|
19343
|
-
function
|
|
19372
|
+
function l_(e, t) {
|
|
19344
19373
|
let n = Oe.parse(e, {
|
|
19345
19374
|
header: !0,
|
|
19346
19375
|
skipEmptyLines: !0,
|
|
@@ -19353,6 +19382,6 @@ function u_(e, t) {
|
|
|
19353
19382
|
};
|
|
19354
19383
|
}
|
|
19355
19384
|
//#endregion
|
|
19356
|
-
export { Qc as AIProvider,
|
|
19385
|
+
export { Qc as AIProvider, rg as AI_PROVIDER_DEFINITIONS, ag as AI_PROVIDER_DESCRIPTORS, Hr as ActionButton, Ef as AddressAutocomplete, Io as Alert, Vh as App, Bh as AppProvider, zi as AsyncDropdown, Si as AuthButton, ti as AuthProvider, Js as Autocomplete, sn as BUILT_IN_THEMES, nn as BUILT_IN_THEME_IDS, Ur as BackLink, Qn as Badge, Zn as BadgeOverlay, Ki as Brand, ea as Breadcrumbs, wl as CONTEXT_MENU_SEARCH_THRESHOLD, ji as Card, ta as Carousel, Gl as Chatbot, js as Checkbox, Ys as Checklist, Go as Code, Mu as CodeEditor, pu as CodeSyntaxError, Jn as Col, Ss as Color, nd as Component, rd as ComponentBlock, Kn as Container, Bl as ContextMenu, yc as CropImage, ap as DEFAULT_DOCUMENT_HEAD, ip as DEFAULT_HEAD_APP_NAME, op as DEFAULT_LANGUAGE_HEAD, Is as DEFAULT_ORDER, wi as DataProvider, Cs as Date, Ts as DateTime, Zh as DirectApiProviderAdapter, Ig as DropBoxConnectButton, Ym as DropboxAuthProvider, Ri as Dropdown, Bi as DropdownButton, Ui as DropdownDivider, Hi as DropdownHeader, Vi as DropdownItem, Wi as DropdownMenu, tg as EMAIL_PROVIDER_DEFINITIONS, bs as Email, xm as EmailProvider, hs as FieldError, Ec as FileNameEditor, $h as FirebaseApiProviderAdapter, Hm as FirebaseAuthProvider, Rm as FirebaseDataProvider, So as FirebaseStorageProvider, Ya as FirestoreDataProvider, jd as Form, gd as FormControllerContext, Kp as Gallery, Qm as GmailEmailProvider, Wr as GoSite, ym as GoogleAuthProvider, pf as GoogleMapsProvider, qm as GoogleServiceAccountProvider, sm as Grid, om as GridArray, am as GridCore, Hf as GridDB, qp as GridGalleryView, tp as GridTableView, Fp as Head, Cp as HeadProvider, As as Hidden, Pn as I18nProvider, Q as Icon, Sr as IconProvider, Gi as Image, ii as ImageAvatar, dc as ImageEditor, pc as ImageField, _s as Input, Ns as Label, df as LayoutBuilder, kf as ListCard, Fs as ListGroup, Ei as Loader, Vr as LoadingButton, qo as LocaleSwitcher, dr as LucideIconProvider, Up as MarkdownReader, Ii as Menu, Qh as MockApiProviderAdapter, go as MockDataProvider, Mi as Modal, Fi as ModalOk, Pi as ModalYesNo, Ds as Month, r_ as NORMALIZE_MAP, na as Notifications, ys as Number, og as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, zs as Order, ng as PUBLISH_PROVIDER_DEFINITIONS, cm as PageUsers, Gp as Pagination, xs as Password, $o as Percentage, mr as PhosphorIconProvider, ru as Prompt, Kl as PromptMode, Cl as PromptUtils, No as ProviderSwitcher, Os as Range, Gr as ReferSite, Hd as Repeat, ed as RichText, qn as Row, c_ as Sanitizer, ia as Search, qs as Select, zf as SideNav, cc as StorageProvider, vs as String, eg as SupabaseApiProviderAdapter, eh as SupabaseAuthProvider, co as SupabaseDataProvider, Co as SupabaseStorageProvider, Ms as Switch, Xd as Tab, Wp as TabDynamic, Jd as TabItem, qd as TabLayouts, $d as Table, Ps as TextArea, ma as ThemeSwitcher, ws as Time, sa as Toolbar, Df as UploadCSV, Pc as UploadDocument, Fc as UploadImage, ks as Url, Es as Week, Z as Wrapper, xt as arrayUnique, Et as arraysEqual, Tt as base64Encode, At as base64ToBlob, jt as base64ToUrl, qi as buildBreadcrumbSchema, Ll as buildTextCommandContext, Er as buttonBaseClass, kr as buttonDangerClass, Pr as buttonDarkClass, Mr as buttonInfoClass, Nr as buttonLightClass, zr as buttonLinkClass, Lr as buttonOutlineDangerClass, Fr as buttonOutlinePrimaryClass, Ir as buttonOutlineSecondaryClass, Rr as buttonOutlineSuccessClass, Dr as buttonPrimaryClass, Or as buttonSecondaryClass, Ar as buttonSuccessClass, jr as buttonWarningClass, Ra as callFirebaseFunction, ht as checkConditions, Nt as cleanRecord, X as cn, il as configureProxy, et as converter, it as copyToClipboard, gt as crc32, cg as createAIProviderRegistry, rr as createMotionTransition, En as createTranslations, rt as decodeJWT, Tn as defineLocaleMessages, lt as dirname, Lg as dropBox, ft as eventClosest, Wt as fetchJson, Ut as fetchRest, Gt as fetchWithRetry, ss as fieldAddonClass, is as fieldControlBaseClass, rs as fieldFeedbackClass, os as fieldGroupClass, ns as fieldLabelClass, as as fieldTextAreaBaseClass, Yc as formatAIModelRef, dt as generateUniqueId, gl as getAIModelCatalog, bi as getAccessToken, Pl as getAutoClosedSuffixLength, Cu as getCodeValidationResult, Nc as getFileUrl, Zr as getGlobalVars, hg as getGoogleTrendsData, gg as getGoogleTrendsRelated, mg as getKeywordIdeas, si as getProviderConfigurationState, Mt as getRecordValue, Wd as getTabLayoutConfig, Kd as getTabPaneClassName, Gd as getTabTriggerClassName, Xm as googleGetAccessToken, Nl as hasAutoClosedSuffix, Dn as interpolate, yt as intersectObjects, Yn as isBadgeDescriptor, St as isEmpty, Ot as isInteractiveElement, sl as isProxyEnabled, _f as loadGoogleMaps, vt as loadScripts, Jh as locales, Fl as matchCommandTrigger, Xn as normalizeBadgeProps, ct as normalizeKey, ot as normalizePath, s_ as normalizeVisualChars, Xc as parseAIModelRef, l_ as parseCsvText, ri as path, al as proxyFetch, Ft as recordsEqual, To as registerProviderSessionFactory, $r as removeGlobalVars, kt as render2Base64, mt as replacePlaceholders, bt as replaceVariables, ir as resolveMotionEffect, fu as runPrompt, wt as safeClone, Dt as sanitizeKey, n_ as scrape, Zm as sendEmail, Qr as setGlobalVars, ut as sleep, It as smartTypeCast, pt as substrCount, ig as toProviderDescriptor, at as trimPath, st as trimSlash, _t as ucfirst, $c as useAIProvider, el as useAIProviderRegistry, _i as useAccessToken, Yh as useApiProvider, Mp as useAssetsHead, ni as useAuthProvider, Tm as useCredentialsProvider, Ti as useDataProvider, jp as useDocumentHead, Fg as useDropBoxConnect, ts as useEditorHeight, Sm as useEmailProvider, cr as useEnterMotion, Dc as useFileUploadCore, vd as useFormActions, Dd as useFormContext, _d as useFormController, Xr as useGlobalVars, mf as useGoogleMapsConfig, Ep as useHead, Op as useHeadLinks, Fn as useI18n, wr as useIconController, Cr as useIconProvider, ec as useImage, Ap as useLanguageHead, Hh as useMenu, ar as useMotionEffect, or as useMotionState, kp as usePaginationHead, sr as usePressMotion, ya as useProvider, jo as useProviderSession, ol as useProxy, Np as usePwaHead, Pp as useSchemaOrgHead, va as useSetProvider, Dp as useSocialHead, lc as useStorageProvider, Y as useTheme, Cn as useThemeController, Su as validateCodeSyntax };
|
|
19357
19386
|
|
|
19358
19387
|
//# sourceMappingURL=index.mjs.map
|