@llmnative/react 1.10.1 → 1.10.3
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.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +216 -210
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/components/widgets/Chatbot.d.ts +8 -1
- package/package.json +1 -1
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 K, signInWithEmailAndPassword as te, signInWithPopup as ne, signOut as re } 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";
|
|
@@ -3636,16 +3636,16 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3636
3636
|
P.current = window.setTimeout(() => {
|
|
3637
3637
|
a?.();
|
|
3638
3638
|
}, e);
|
|
3639
|
-
},
|
|
3639
|
+
}, K = or(A, W, W), te = T ? { right: T } : {}, ne = {
|
|
3640
3640
|
...or(A, O.Modal.motion?.backdrop ?? "fade", O.Modal.motion?.backdrop ?? "fade"),
|
|
3641
3641
|
cursor: S && a ? "pointer" : "default",
|
|
3642
3642
|
...C === void 0 ? {} : { zIndex: C - 10 },
|
|
3643
|
-
...
|
|
3644
|
-
},
|
|
3643
|
+
...te
|
|
3644
|
+
}, re = {
|
|
3645
3645
|
cursor: S && a ? "pointer" : "default",
|
|
3646
3646
|
...C === void 0 ? {} : { zIndex: C },
|
|
3647
3647
|
...w ? { pointerEvents: "none" } : {},
|
|
3648
|
-
...
|
|
3648
|
+
...te
|
|
3649
3649
|
}, ie = w ? {
|
|
3650
3650
|
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)",
|
|
3651
3651
|
transformOrigin: l === "left" ? "left center" : l === "right" ? "right center" : l === "bottom" ? "bottom center" : l === "top" ? "top center" : "center",
|
|
@@ -3654,17 +3654,17 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3654
3654
|
} : {}, 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";
|
|
3655
3655
|
return j(/* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
3656
3656
|
className: U,
|
|
3657
|
-
style:
|
|
3657
|
+
style: re,
|
|
3658
3658
|
onClick: () => {
|
|
3659
3659
|
S && a && G();
|
|
3660
3660
|
}
|
|
3661
3661
|
}, /* @__PURE__ */ t.createElement("div", {
|
|
3662
3662
|
className: H.dialogClass,
|
|
3663
3663
|
style: {
|
|
3664
|
-
...
|
|
3664
|
+
...K,
|
|
3665
3665
|
...ie,
|
|
3666
3666
|
...C === void 0 ? {} : { zIndex: C },
|
|
3667
|
-
...V === "right" ?
|
|
3667
|
+
...V === "right" ? te : {}
|
|
3668
3668
|
},
|
|
3669
3669
|
onClick: (e) => e.stopPropagation()
|
|
3670
3670
|
}, 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", {
|
|
@@ -3709,7 +3709,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3709
3709
|
"data-rf-modal-backdrop": "",
|
|
3710
3710
|
"aria-hidden": "true",
|
|
3711
3711
|
className: "fixed inset-0 z-40 bg-black/60 backdrop-blur-sm",
|
|
3712
|
-
style:
|
|
3712
|
+
style: ne,
|
|
3713
3713
|
onClick: () => {
|
|
3714
3714
|
S && a && G();
|
|
3715
3715
|
}
|
|
@@ -3841,7 +3841,7 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3841
3841
|
}, H(n) ? /* @__PURE__ */ t.createElement(t.Fragment, null, n.icon && /* @__PURE__ */ t.createElement(Q, {
|
|
3842
3842
|
name: n.icon,
|
|
3843
3843
|
className: n.text ? "mr-2" : void 0
|
|
3844
|
-
}), 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",
|
|
3844
|
+
}), 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", K = /* @__PURE__ */ t.createElement(Li.Provider, { value: {
|
|
3845
3845
|
closeOnSelect: l,
|
|
3846
3846
|
close: () => V(!1)
|
|
3847
3847
|
} }, /* @__PURE__ */ t.createElement("div", {
|
|
@@ -3862,11 +3862,11 @@ var Di = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
3862
3862
|
onClick: (e) => {
|
|
3863
3863
|
e.stopPropagation();
|
|
3864
3864
|
}
|
|
3865
|
-
}, 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))),
|
|
3865
|
+
}, 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))), te = !u && p === "fixed" && typeof document < "u";
|
|
3866
3866
|
return /* @__PURE__ */ t.createElement(Z, { className: W }, g, /* @__PURE__ */ t.createElement("div", {
|
|
3867
3867
|
ref: D,
|
|
3868
3868
|
className: X(u ? "inline-block text-left" : "relative inline-block text-left", h || w.Dropdown.className)
|
|
3869
|
-
}, U,
|
|
3869
|
+
}, U, te ? j(K, document.body) : K), _);
|
|
3870
3870
|
};
|
|
3871
3871
|
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 }) {
|
|
3872
3872
|
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) => {
|
|
@@ -4659,7 +4659,7 @@ var Oa = (e) => Da?.[e], ka = "scrape", Aa = "[DEFAULT]", ja = /* @__PURE__ */ n
|
|
|
4659
4659
|
let t = Fa();
|
|
4660
4660
|
if (!t) return !1;
|
|
4661
4661
|
try {
|
|
4662
|
-
return await W(t, V), await
|
|
4662
|
+
return await W(t, V), await K(t, e), !0;
|
|
4663
4663
|
} catch (e) {
|
|
4664
4664
|
let n = t.app.options?.apiKey;
|
|
4665
4665
|
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;
|
|
@@ -6691,11 +6691,11 @@ var Ws = (e, t, n) => {
|
|
|
6691
6691
|
} });
|
|
6692
6692
|
}, 0), r;
|
|
6693
6693
|
});
|
|
6694
|
-
},
|
|
6694
|
+
}, K = u(), te = `${K}-options`;
|
|
6695
6695
|
return /* @__PURE__ */ t.createElement(Z, { className: A || M.Autocomplete.wrapperClassName }, d && /* @__PURE__ */ t.createElement(Ns, {
|
|
6696
6696
|
label: d,
|
|
6697
6697
|
required: o,
|
|
6698
|
-
htmlFor:
|
|
6698
|
+
htmlFor: K
|
|
6699
6699
|
}), /* @__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", {
|
|
6700
6700
|
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",
|
|
6701
6701
|
key: e
|
|
@@ -6704,19 +6704,19 @@ var Ws = (e, t, n) => {
|
|
|
6704
6704
|
className: "ml-0.5 opacity-60 transition-opacity hover:opacity-100",
|
|
6705
6705
|
onClick: () => G(e)
|
|
6706
6706
|
}, "×"))), (!i || P.length < i) && /* @__PURE__ */ t.createElement("input", {
|
|
6707
|
-
id:
|
|
6707
|
+
id: K,
|
|
6708
6708
|
type: "text",
|
|
6709
6709
|
className: X("min-w-[120px] flex-1 border-none bg-transparent text-sm outline-none placeholder:text-muted-foreground", w || M.Autocomplete.className),
|
|
6710
6710
|
required: o && P.length < (r || 0),
|
|
6711
6711
|
disabled: c || s && !St(O),
|
|
6712
6712
|
placeholder: E ? m ?? "Type or press Enter to create..." : m,
|
|
6713
6713
|
title: f,
|
|
6714
|
-
list:
|
|
6714
|
+
list: te,
|
|
6715
6715
|
onChange: W,
|
|
6716
6716
|
onKeyDown: ee
|
|
6717
|
-
})), /* @__PURE__ */ t.createElement("datalist", { id:
|
|
6717
|
+
})), /* @__PURE__ */ t.createElement("datalist", { id: te }, H.map((e, n) => /* @__PURE__ */ t.createElement("option", {
|
|
6718
6718
|
value: e.value,
|
|
6719
|
-
key: `${
|
|
6719
|
+
key: `${K}-${n}`
|
|
6720
6720
|
}, 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));
|
|
6721
6721
|
}, 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 }) => {
|
|
6722
6722
|
let { value: w, handleChange: T, formWrapClass: E } = Dd({
|
|
@@ -8034,13 +8034,13 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8034
8034
|
return C((e) => o ? [...e, t] : [t]), H(""), W(void 0), B(!1), !0;
|
|
8035
8035
|
}, G = () => {
|
|
8036
8036
|
B(!1), H(""), W(void 0);
|
|
8037
|
-
},
|
|
8037
|
+
}, K = (e, t) => {
|
|
8038
8038
|
let n = e.currentTarget, r = n.naturalWidth > 0 && n.naturalHeight > 0 && (n.naturalWidth < d || n.naturalHeight < u);
|
|
8039
8039
|
R((e) => {
|
|
8040
8040
|
let n = new Set(e);
|
|
8041
8041
|
return r ? n.add(t) : n.delete(t), n;
|
|
8042
8042
|
});
|
|
8043
|
-
},
|
|
8043
|
+
}, te = ({ scales: e }) => {
|
|
8044
8044
|
if (!e) return;
|
|
8045
8045
|
let n = Object.keys(e);
|
|
8046
8046
|
return n.length === 0 ? null : n.map((n) => /* @__PURE__ */ t.createElement(Qn, { key: n }, /* @__PURE__ */ t.createElement("a", {
|
|
@@ -8082,7 +8082,7 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8082
8082
|
src: Nc(e),
|
|
8083
8083
|
alt: `preview-${n}`,
|
|
8084
8084
|
className: `absolute inset-0 w-full h-full ${L.has(e.key) ? "object-contain p-1" : "object-cover"}`,
|
|
8085
|
-
onLoad: (t) =>
|
|
8085
|
+
onLoad: (t) => K(t, e.key)
|
|
8086
8086
|
}), /* @__PURE__ */ t.createElement("div", {
|
|
8087
8087
|
className: "absolute inset-0 bg-black/55 backdrop-blur-[1px] flex flex-col items-center justify-end pb-2 gap-1 transition-opacity",
|
|
8088
8088
|
style: { display: F === n ? "flex" : "none" }
|
|
@@ -8110,7 +8110,7 @@ var bc = 120, xc = 88, Sc = (e) => {
|
|
|
8110
8110
|
}, /* @__PURE__ */ t.createElement(Q, {
|
|
8111
8111
|
name: "x",
|
|
8112
8112
|
className: "w-4 h-4"
|
|
8113
|
-
}))), a && e.variants && Object.keys(e.variants).length > 0 && /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap gap-1 px-1" }, /* @__PURE__ */ t.createElement(
|
|
8113
|
+
}))), a && e.variants && Object.keys(e.variants).length > 0 && /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap gap-1 px-1" }, /* @__PURE__ */ t.createElement(te, { scales: e.variants })))) : /* @__PURE__ */ t.createElement($o, {
|
|
8114
8114
|
max: 100,
|
|
8115
8115
|
min: 0,
|
|
8116
8116
|
value: e.progress,
|
|
@@ -8371,7 +8371,13 @@ var al = (e, t) => {
|
|
|
8371
8371
|
model: n,
|
|
8372
8372
|
label: `${t} / ${n}`
|
|
8373
8373
|
})), gl = async (e, t = !1) => {
|
|
8374
|
-
let n = await Promise.all(Object.entries(e).map(async ([e, n]) =>
|
|
8374
|
+
let n = await Promise.all(Object.entries(e).map(async ([e, n]) => {
|
|
8375
|
+
try {
|
|
8376
|
+
return [e, await n.getCapabilities(t)];
|
|
8377
|
+
} catch (t) {
|
|
8378
|
+
return console.warn(`getAIModelCatalog: provider "${e}" getCapabilities() failed`, t), [e, { models: [] }];
|
|
8379
|
+
}
|
|
8380
|
+
})), r = n.reduce((e, [t, n]) => (e[t] = n, e), {}), i = n.reduce((e, [t, n]) => (e[t] = n.models, e), {}), a = /* @__PURE__ */ new Set();
|
|
8375
8381
|
return {
|
|
8376
8382
|
models: n.flatMap(([, e]) => e.models).filter((e) => a.has(e.id) ? !1 : (a.add(e.id), !0)),
|
|
8377
8383
|
modelsByProvider: i,
|
|
@@ -8849,51 +8855,51 @@ var Vl = "h-7 w-7 cursor-pointer rounded-md text-muted-foreground transition-col
|
|
|
8849
8855
|
function Wl(e) {
|
|
8850
8856
|
return e ? (e.includes("/") ? e.split("/").pop() : e) || e : null;
|
|
8851
8857
|
}
|
|
8852
|
-
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,
|
|
8853
|
-
let
|
|
8858
|
+
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 }) {
|
|
8859
|
+
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, K] = h(C), [te, ne] = h(w), [re, ie] = h(T), [ae, oe] = h(E);
|
|
8854
8860
|
l(() => {
|
|
8855
|
-
a ||
|
|
8861
|
+
a || U(!1);
|
|
8856
8862
|
}, [a]), l(() => () => {
|
|
8857
|
-
|
|
8858
|
-
}, [
|
|
8859
|
-
let
|
|
8860
|
-
|
|
8861
|
-
}, []),
|
|
8863
|
+
L.forEach(({ objectUrl: e }) => URL.revokeObjectURL(e));
|
|
8864
|
+
}, [L]);
|
|
8865
|
+
let se = s((e) => {
|
|
8866
|
+
R((t) => (URL.revokeObjectURL(t[e].objectUrl), t.filter((t, n) => n !== e)));
|
|
8867
|
+
}, []), ce = s((e) => {
|
|
8862
8868
|
let t = Array.from(e).map((e) => ({
|
|
8863
8869
|
file: e,
|
|
8864
8870
|
objectUrl: URL.createObjectURL(e)
|
|
8865
8871
|
}));
|
|
8866
|
-
|
|
8867
|
-
}, []),
|
|
8868
|
-
!f || !e.dataTransfer.types.includes("Files") || (e.preventDefault(),
|
|
8869
|
-
}, [f]), le = s((e) => {
|
|
8870
|
-
!f || !e.dataTransfer.types.includes("Files") || e.preventDefault();
|
|
8872
|
+
R((e) => [...e, ...t]);
|
|
8873
|
+
}, []), le = s((e) => {
|
|
8874
|
+
!f || !e.dataTransfer.types.includes("Files") || (e.preventDefault(), V.current += 1, B(!0));
|
|
8871
8875
|
}, [f]), ue = s((e) => {
|
|
8872
|
-
f
|
|
8876
|
+
!f || !e.dataTransfer.types.includes("Files") || e.preventDefault();
|
|
8873
8877
|
}, [f]), de = s((e) => {
|
|
8874
|
-
f && (e.preventDefault(),
|
|
8875
|
-
}, [f
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
+
f && (e.preventDefault(), V.current = Math.max(0, V.current - 1), V.current === 0 && B(!1));
|
|
8879
|
+
}, [f]), fe = s((e) => {
|
|
8880
|
+
f && (e.preventDefault(), V.current = 0, B(!1), e.dataTransfer.files.length && ce(e.dataTransfer.files));
|
|
8881
|
+
}, [f, ce]), q = ts({
|
|
8882
|
+
minHeight: O,
|
|
8883
|
+
maxHeight: k
|
|
8878
8884
|
});
|
|
8879
8885
|
l(() => {
|
|
8880
|
-
let e =
|
|
8886
|
+
let e = P.current;
|
|
8881
8887
|
if (!e) return;
|
|
8882
8888
|
e.style.height = "auto";
|
|
8883
|
-
let t = Math.max(e.scrollHeight,
|
|
8884
|
-
e.style.height = `${n}px`, e.style.overflowY =
|
|
8889
|
+
let t = Math.max(e.scrollHeight, q.resolvedMinHeight), n = q.resolvedMaxHeight ? Math.min(t, q.resolvedMaxHeight) : t;
|
|
8890
|
+
e.style.height = `${n}px`, e.style.overflowY = q.resolvedMaxHeight && t > q.resolvedMaxHeight ? "auto" : "hidden";
|
|
8885
8891
|
}, [
|
|
8886
8892
|
n,
|
|
8887
|
-
|
|
8888
|
-
|
|
8893
|
+
q.resolvedMinHeight,
|
|
8894
|
+
q.resolvedMaxHeight
|
|
8889
8895
|
]);
|
|
8890
|
-
let
|
|
8896
|
+
let pe = p?.length ? g ?? "/" : void 0, me = (p?.length ?? 0) >= 10, he = t.useMemo(() => new Map((p ?? []).map((e) => [e.name, e])), [p]), ge = t.useMemo(() => (p ?? []).map((e) => ({
|
|
8891
8897
|
key: e.name,
|
|
8892
|
-
label: `${
|
|
8898
|
+
label: `${pe ?? "/"}${e.name}`,
|
|
8893
8899
|
value: e.name,
|
|
8894
8900
|
icon: e.icon
|
|
8895
|
-
})), [p,
|
|
8896
|
-
let n =
|
|
8901
|
+
})), [p, pe]), _e = s(async (e, t) => {
|
|
8902
|
+
let n = he.get(e.value);
|
|
8897
8903
|
if (n) {
|
|
8898
8904
|
if (n.handler) {
|
|
8899
8905
|
let e = await n.handler(Ll(t)), r = n.consumeSuffix ? Pl(t.textAfterCaret, n.consumeSuffix) : 0;
|
|
@@ -8902,48 +8908,48 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
8902
8908
|
}
|
|
8903
8909
|
t.replace(t.triggerRange.start, t.triggerRange.end, `${t.trigger}${n.name} `);
|
|
8904
8910
|
}
|
|
8905
|
-
}, [
|
|
8911
|
+
}, [he]), ve = Wl(v), ye = () => {
|
|
8906
8912
|
c || a || (d({
|
|
8907
8913
|
text: n,
|
|
8908
|
-
files:
|
|
8914
|
+
files: L.map((e) => e.file),
|
|
8909
8915
|
model: v ?? "",
|
|
8910
|
-
...
|
|
8911
|
-
role:
|
|
8912
|
-
voice:
|
|
8916
|
+
...x ? {
|
|
8917
|
+
role: W,
|
|
8918
|
+
voice: G,
|
|
8913
8919
|
style: te,
|
|
8914
8920
|
language: re,
|
|
8915
|
-
temperature:
|
|
8921
|
+
temperature: ae
|
|
8916
8922
|
} : {}
|
|
8917
|
-
}),
|
|
8918
|
-
},
|
|
8923
|
+
}), L.forEach(({ objectUrl: e }) => URL.revokeObjectURL(e)), R([]));
|
|
8924
|
+
}, be = () => {
|
|
8919
8925
|
if (a) {
|
|
8920
|
-
|
|
8926
|
+
U(!0), o?.();
|
|
8921
8927
|
return;
|
|
8922
8928
|
}
|
|
8923
|
-
|
|
8924
|
-
},
|
|
8925
|
-
id:
|
|
8929
|
+
ye();
|
|
8930
|
+
}, xe = /* @__PURE__ */ t.createElement("textarea", {
|
|
8931
|
+
id: I,
|
|
8926
8932
|
name: e,
|
|
8927
|
-
ref:
|
|
8933
|
+
ref: P,
|
|
8928
8934
|
value: n,
|
|
8929
8935
|
onChange: (e) => r(e.target.value),
|
|
8930
8936
|
placeholder: i,
|
|
8931
|
-
className:
|
|
8932
|
-
style: { maxHeight:
|
|
8937
|
+
className: j || Ul,
|
|
8938
|
+
style: { maxHeight: k },
|
|
8933
8939
|
onKeyDown: (e) => {
|
|
8934
|
-
e.key === "Enter" && !e.shiftKey && !
|
|
8940
|
+
e.key === "Enter" && !e.shiftKey && !pe && (e.preventDefault(), be());
|
|
8935
8941
|
}
|
|
8936
8942
|
});
|
|
8937
|
-
return /* @__PURE__ */ t.createElement(Z, { className:
|
|
8938
|
-
className: `group relative rounded-xl border shadow-sm transition-shadow focus-within:shadow-md focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-0 ${
|
|
8939
|
-
onDragEnter:
|
|
8940
|
-
onDragOver:
|
|
8941
|
-
onDragLeave:
|
|
8942
|
-
onDrop:
|
|
8943
|
-
}, f &&
|
|
8943
|
+
return /* @__PURE__ */ t.createElement(Z, { className: A || M.Prompt.wrapperClassName }, /* @__PURE__ */ t.createElement("div", {
|
|
8944
|
+
className: `group relative rounded-xl border shadow-sm transition-shadow focus-within:shadow-md focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-0 ${z ? "border-primary ring-2 ring-primary" : "border-input"}`,
|
|
8945
|
+
onDragEnter: le,
|
|
8946
|
+
onDragOver: ue,
|
|
8947
|
+
onDragLeave: de,
|
|
8948
|
+
onDrop: fe
|
|
8949
|
+
}, f && z && /* @__PURE__ */ t.createElement("div", { className: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-xl bg-primary/5" }, /* @__PURE__ */ t.createElement("div", { className: "flex items-center gap-2 rounded-lg bg-background px-3 py-1.5 text-xs font-medium text-primary shadow" }, /* @__PURE__ */ t.createElement(Q, {
|
|
8944
8950
|
name: "paperclip",
|
|
8945
8951
|
size: 13
|
|
8946
|
-
}),
|
|
8952
|
+
}), N.dropFilesHere)), /* @__PURE__ */ t.createElement("div", { className: "overflow-hidden rounded-t-xl" }, L.length > 0 && /* @__PURE__ */ t.createElement("div", { className: "flex gap-2 overflow-x-auto border-b border-input px-3 py-2.5" }, L.map(({ file: e, objectUrl: n }, r) => /* @__PURE__ */ t.createElement("div", {
|
|
8947
8953
|
key: n,
|
|
8948
8954
|
className: "relative shrink-0"
|
|
8949
8955
|
}, e.type.startsWith("image/") ? /* @__PURE__ */ t.createElement("div", { className: "h-16 w-16 overflow-hidden rounded-lg border border-input bg-muted/30" }, /* @__PURE__ */ t.createElement("img", {
|
|
@@ -8957,38 +8963,38 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
8957
8963
|
}), /* @__PURE__ */ t.createElement("div", { className: "max-w-[100px]" }, /* @__PURE__ */ t.createElement("p", { className: "truncate font-medium text-foreground" }, e.name), /* @__PURE__ */ t.createElement("p", { className: "text-muted-foreground" }, (e.size / 1024).toFixed(0), " KB"))), /* @__PURE__ */ t.createElement("button", {
|
|
8958
8964
|
type: "button",
|
|
8959
8965
|
className: "absolute -right-1.5 -top-1.5 flex h-4 w-4 cursor-pointer items-center justify-center rounded-full bg-foreground text-background shadow",
|
|
8960
|
-
onClick: () =>
|
|
8966
|
+
onClick: () => se(r)
|
|
8961
8967
|
}, /* @__PURE__ */ t.createElement(Q, {
|
|
8962
8968
|
name: "x",
|
|
8963
8969
|
size: 9
|
|
8964
|
-
}))))),
|
|
8965
|
-
trigger:
|
|
8966
|
-
searchable:
|
|
8970
|
+
}))))), pe && ge.length > 0 ? /* @__PURE__ */ t.createElement(Bl, {
|
|
8971
|
+
trigger: pe,
|
|
8972
|
+
searchable: me,
|
|
8967
8973
|
onSelect: (e, t) => {
|
|
8968
|
-
|
|
8974
|
+
_e(e, t);
|
|
8969
8975
|
}
|
|
8970
|
-
},
|
|
8976
|
+
}, ge.map((e) => /* @__PURE__ */ t.createElement(Bl.Item, {
|
|
8971
8977
|
key: e.key,
|
|
8972
8978
|
label: e.label,
|
|
8973
8979
|
value: e.value,
|
|
8974
8980
|
icon: e.icon
|
|
8975
|
-
})),
|
|
8976
|
-
ref:
|
|
8981
|
+
})), xe) : xe), f && /* @__PURE__ */ t.createElement("input", {
|
|
8982
|
+
ref: F,
|
|
8977
8983
|
type: "file",
|
|
8978
8984
|
multiple: !0,
|
|
8979
8985
|
className: "hidden",
|
|
8980
8986
|
onChange: (e) => {
|
|
8981
|
-
e.target.files && (
|
|
8987
|
+
e.target.files && (ce(e.target.files), e.target.value = "");
|
|
8982
8988
|
}
|
|
8983
|
-
}), /* @__PURE__ */ t.createElement("div", { className: "relative flex items-center gap-1 rounded-b-xl border-t border-input px-2 py-1" }, (f || (
|
|
8989
|
+
}), /* @__PURE__ */ t.createElement("div", { className: "relative flex items-center gap-1 rounded-b-xl border-t border-input px-2 py-1" }, (f || (D?.length ?? 0) > 0) && /* @__PURE__ */ t.createElement(t.Fragment, null, f && /* @__PURE__ */ t.createElement("button", {
|
|
8984
8990
|
type: "button",
|
|
8985
|
-
title:
|
|
8991
|
+
title: N.attachFiles,
|
|
8986
8992
|
className: `${Vl} flex items-center justify-center`,
|
|
8987
|
-
onClick: () =>
|
|
8993
|
+
onClick: () => F.current?.click()
|
|
8988
8994
|
}, /* @__PURE__ */ t.createElement(Q, {
|
|
8989
8995
|
name: "paperclip",
|
|
8990
8996
|
size: 13
|
|
8991
|
-
})),
|
|
8997
|
+
})), D?.map((e) => e.content ? /* @__PURE__ */ t.createElement(Ri, {
|
|
8992
8998
|
key: e.key,
|
|
8993
8999
|
trigger: {
|
|
8994
9000
|
icon: e.icon,
|
|
@@ -9008,7 +9014,7 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9008
9014
|
}))), /* @__PURE__ */ t.createElement("div", { className: "mx-1 h-4 w-px shrink-0 bg-border" })), _.length > 0 && /* @__PURE__ */ t.createElement(Ri, {
|
|
9009
9015
|
trigger: {
|
|
9010
9016
|
icon: "cpu",
|
|
9011
|
-
text:
|
|
9017
|
+
text: ve ?? b ?? N.defaultOption
|
|
9012
9018
|
},
|
|
9013
9019
|
placement: "top",
|
|
9014
9020
|
position: "start",
|
|
@@ -9016,7 +9022,7 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9016
9022
|
}, _.map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9017
9023
|
key: e.value,
|
|
9018
9024
|
onClick: () => y?.(e.value)
|
|
9019
|
-
}, e.label))),
|
|
9025
|
+
}, e.label))), x && /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Ri, {
|
|
9020
9026
|
trigger: {
|
|
9021
9027
|
icon: "user",
|
|
9022
9028
|
title: "Role"
|
|
@@ -9024,9 +9030,9 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9024
9030
|
placement: "top",
|
|
9025
9031
|
position: "start",
|
|
9026
9032
|
triggerClassName: Vl
|
|
9027
|
-
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () =>
|
|
9033
|
+
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => ee("") }, N.defaultOption), Jc.getRoles().map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9028
9034
|
key: e,
|
|
9029
|
-
onClick: () =>
|
|
9035
|
+
onClick: () => ee(e)
|
|
9030
9036
|
}, e))), /* @__PURE__ */ t.createElement(Ri, {
|
|
9031
9037
|
trigger: {
|
|
9032
9038
|
icon: "globe",
|
|
@@ -9035,9 +9041,9 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9035
9041
|
placement: "top",
|
|
9036
9042
|
position: "start",
|
|
9037
9043
|
triggerClassName: Vl
|
|
9038
|
-
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () =>
|
|
9044
|
+
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => ie("") }, N.defaultOption), Jc.getLangs().map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9039
9045
|
key: e,
|
|
9040
|
-
onClick: () =>
|
|
9046
|
+
onClick: () => ie(e)
|
|
9041
9047
|
}, e))), /* @__PURE__ */ t.createElement(Ri, {
|
|
9042
9048
|
trigger: {
|
|
9043
9049
|
icon: "mic",
|
|
@@ -9046,9 +9052,9 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9046
9052
|
placement: "top",
|
|
9047
9053
|
position: "start",
|
|
9048
9054
|
triggerClassName: Vl
|
|
9049
|
-
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () =>
|
|
9055
|
+
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => K("") }, N.defaultOption), Jc.getVoices().map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9050
9056
|
key: e,
|
|
9051
|
-
onClick: () =>
|
|
9057
|
+
onClick: () => K(e)
|
|
9052
9058
|
}, e))), /* @__PURE__ */ t.createElement(Ri, {
|
|
9053
9059
|
trigger: {
|
|
9054
9060
|
icon: "feather",
|
|
@@ -9057,7 +9063,7 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9057
9063
|
placement: "top",
|
|
9058
9064
|
position: "start",
|
|
9059
9065
|
triggerClassName: Vl
|
|
9060
|
-
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => ne("") },
|
|
9066
|
+
}, /* @__PURE__ */ t.createElement(Vi, { onClick: () => ne("") }, N.defaultOption), Jc.getStyles().map((e) => /* @__PURE__ */ t.createElement(Vi, {
|
|
9061
9067
|
key: e,
|
|
9062
9068
|
onClick: () => ne(e)
|
|
9063
9069
|
}, e))), /* @__PURE__ */ t.createElement(Ri, {
|
|
@@ -9074,17 +9080,17 @@ function Gl({ name: e, value: n, onChange: r, placeholder: i, running: a = !1, o
|
|
|
9074
9080
|
min: 0,
|
|
9075
9081
|
max: 1,
|
|
9076
9082
|
step: .1,
|
|
9077
|
-
value:
|
|
9078
|
-
onChange: (e) =>
|
|
9083
|
+
value: ae ?? 0,
|
|
9084
|
+
onChange: (e) => oe(Number(e.target.value)),
|
|
9079
9085
|
className: "w-full cursor-pointer accent-primary"
|
|
9080
9086
|
})))), /* @__PURE__ */ t.createElement("div", { className: "flex-1" }), /* @__PURE__ */ t.createElement("button", {
|
|
9081
9087
|
type: "button",
|
|
9082
|
-
onClick:
|
|
9088
|
+
onClick: be,
|
|
9083
9089
|
disabled: a ? !o : c,
|
|
9084
|
-
title:
|
|
9085
|
-
"aria-label":
|
|
9090
|
+
title: H ? "Stopping…" : a ? "Stop" : N.run,
|
|
9091
|
+
"aria-label": H ? "Stopping…" : a ? "Stop" : N.run,
|
|
9086
9092
|
className: `flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${a ? "bg-destructive text-destructive-foreground hover:bg-destructive/90" : "bg-primary text-primary-foreground hover:bg-primary/90"}`
|
|
9087
|
-
},
|
|
9093
|
+
}, H || a && !o ? /* @__PURE__ */ t.createElement("span", { className: "inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ t.createElement(Q, {
|
|
9088
9094
|
name: a ? "square" : "send",
|
|
9089
9095
|
size: 14
|
|
9090
9096
|
})))));
|
|
@@ -9229,12 +9235,12 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9229
9235
|
let { handleChange: C, record: w } = Dd({
|
|
9230
9236
|
name: e,
|
|
9231
9237
|
subscribeToFullRecord: !0
|
|
9232
|
-
}), 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,
|
|
9238
|
+
}), 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, K] = h(null), te = !G && !W.configured ? g?.({
|
|
9233
9239
|
mode: "run",
|
|
9234
9240
|
providerId: W.providerId,
|
|
9235
9241
|
reason: W.reason,
|
|
9236
9242
|
configured: W.configured
|
|
9237
|
-
}) : null,
|
|
9243
|
+
}) : null, ne = t.useMemo(() => {
|
|
9238
9244
|
if (!A) return "";
|
|
9239
9245
|
let e = {
|
|
9240
9246
|
...w,
|
|
@@ -9245,7 +9251,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9245
9251
|
A,
|
|
9246
9252
|
w,
|
|
9247
9253
|
_
|
|
9248
|
-
]),
|
|
9254
|
+
]), re = ne !== A, ie = (e, t) => C?.({ target: {
|
|
9249
9255
|
name: e,
|
|
9250
9256
|
value: t
|
|
9251
9257
|
} }), ae = x?.map((e) => e.key === "tokenUsage" && !e.content ? {
|
|
@@ -9269,7 +9275,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9269
9275
|
noProvider: E.noProvider,
|
|
9270
9276
|
noResponse: E.noResponse
|
|
9271
9277
|
}), c = Date.now() - a;
|
|
9272
|
-
if (
|
|
9278
|
+
if (K(null), C?.({ target: {
|
|
9273
9279
|
name: e + ".value",
|
|
9274
9280
|
value: s
|
|
9275
9281
|
} }), 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) {
|
|
@@ -9284,7 +9290,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9284
9290
|
});
|
|
9285
9291
|
}
|
|
9286
9292
|
} catch (e) {
|
|
9287
|
-
|
|
9293
|
+
K(Ql(e, E.runFailed));
|
|
9288
9294
|
}
|
|
9289
9295
|
};
|
|
9290
9296
|
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, {
|
|
@@ -9312,7 +9318,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9312
9318
|
className: `${p || T.Prompt.className} ${su}`,
|
|
9313
9319
|
minHeight: s,
|
|
9314
9320
|
maxHeight: c
|
|
9315
|
-
}),
|
|
9321
|
+
}), re && 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" }, ne)), re && /* @__PURE__ */ t.createElement("div", { className: "flex items-center justify-end border-t border-input px-2 py-1" }, /* @__PURE__ */ t.createElement("button", {
|
|
9316
9322
|
type: "button",
|
|
9317
9323
|
title: M ? E.hidePreview : E.showPreview,
|
|
9318
9324
|
className: `${cu} flex items-center justify-center ${M ? "bg-muted text-foreground" : ""}`,
|
|
@@ -9359,7 +9365,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9359
9365
|
maxHeight: c,
|
|
9360
9366
|
className: p || T.Prompt.className,
|
|
9361
9367
|
wrapperClassName: ""
|
|
9362
|
-
}), (G || !W.configured) && (
|
|
9368
|
+
}), (G || !W.configured) && (te ? /* @__PURE__ */ t.createElement("div", { className: "mt-1" }, te) : /* @__PURE__ */ t.createElement("span", { className: "mt-1 flex min-w-0 items-center gap-1 text-xs text-warning" }, /* @__PURE__ */ t.createElement(Q, {
|
|
9363
9369
|
name: "triangle-alert",
|
|
9364
9370
|
size: 13,
|
|
9365
9371
|
className: "shrink-0"
|
|
@@ -9615,16 +9621,16 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9615
9621
|
editorContext: null
|
|
9616
9622
|
}), H = m(j ?? ""), U = m(B);
|
|
9617
9623
|
U.current = B;
|
|
9618
|
-
let W = S?.length ? C ?? "/" : void 0, ee = (S?.length ?? 0) >= 10, G = t.useMemo(() => new Map((S ?? []).map((e) => [e.name, e])), [S]),
|
|
9624
|
+
let W = S?.length ? C ?? "/" : void 0, ee = (S?.length ?? 0) >= 10, G = t.useMemo(() => new Map((S ?? []).map((e) => [e.name, e])), [S]), K = t.useMemo(() => (S ?? []).map((e) => ({
|
|
9619
9625
|
key: e.name,
|
|
9620
9626
|
label: `${W ?? "/"}${e.name}`,
|
|
9621
9627
|
value: e.name,
|
|
9622
9628
|
icon: e.icon,
|
|
9623
9629
|
description: e.description,
|
|
9624
9630
|
group: e.group
|
|
9625
|
-
})), [S, W]),
|
|
9631
|
+
})), [S, W]), te = t.useMemo(() => {
|
|
9626
9632
|
let e = [], n;
|
|
9627
|
-
return
|
|
9633
|
+
return K.forEach((r) => {
|
|
9628
9634
|
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, {
|
|
9629
9635
|
key: r.key,
|
|
9630
9636
|
label: r.label,
|
|
@@ -9633,17 +9639,17 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9633
9639
|
description: r.description
|
|
9634
9640
|
}));
|
|
9635
9641
|
}), e;
|
|
9636
|
-
}, [
|
|
9642
|
+
}, [K]);
|
|
9637
9643
|
l(() => {
|
|
9638
9644
|
I.current || (H.current = j ?? "");
|
|
9639
9645
|
}, [j]);
|
|
9640
|
-
let
|
|
9646
|
+
let ne = s((t) => {
|
|
9641
9647
|
H.current = t, M({ target: {
|
|
9642
9648
|
name: e,
|
|
9643
9649
|
value: t
|
|
9644
9650
|
} });
|
|
9645
|
-
}, [M, e]),
|
|
9646
|
-
|
|
9651
|
+
}, [M, e]), re = m(ne);
|
|
9652
|
+
re.current = ne;
|
|
9647
9653
|
let ie = s(() => {
|
|
9648
9654
|
V({
|
|
9649
9655
|
open: !1,
|
|
@@ -9711,7 +9717,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9711
9717
|
n.language,
|
|
9712
9718
|
r,
|
|
9713
9719
|
n.EditorView.updateListener.of((e) => {
|
|
9714
|
-
e.docChanged &&
|
|
9720
|
+
e.docChanged && re.current(e.state.doc.toString());
|
|
9715
9721
|
}),
|
|
9716
9722
|
...x ?? []
|
|
9717
9723
|
];
|
|
@@ -9819,7 +9825,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9819
9825
|
required: p,
|
|
9820
9826
|
htmlFor: O,
|
|
9821
9827
|
className: v
|
|
9822
|
-
}), /* @__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 &&
|
|
9828
|
+
}), /* @__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 && K.length > 0 ? /* @__PURE__ */ t.createElement(Bl, {
|
|
9823
9829
|
ref: L,
|
|
9824
9830
|
className: X(A.fill && "flex-1 min-h-0 flex flex-col"),
|
|
9825
9831
|
trigger: W,
|
|
@@ -9834,7 +9840,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
9834
9840
|
onSelect: (e, t) => {
|
|
9835
9841
|
ae(e, t);
|
|
9836
9842
|
}
|
|
9837
|
-
},
|
|
9843
|
+
}, te, 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" }, _));
|
|
9838
9844
|
}, Nu = () => Promise.all([
|
|
9839
9845
|
import("@tiptap/react"),
|
|
9840
9846
|
import("@tiptap/react/menus"),
|
|
@@ -10461,19 +10467,19 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10461
10467
|
a
|
|
10462
10468
|
] : a;
|
|
10463
10469
|
}
|
|
10464
|
-
}), { 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), [
|
|
10470
|
+
}), { 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), [K, te] = h({
|
|
10465
10471
|
open: !1,
|
|
10466
10472
|
query: "",
|
|
10467
10473
|
anchorPosition: null,
|
|
10468
10474
|
editorContext: null
|
|
10469
|
-
}),
|
|
10470
|
-
|
|
10471
|
-
let
|
|
10475
|
+
}), ne = m(K);
|
|
10476
|
+
ne.current = K;
|
|
10477
|
+
let re = 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) => ({
|
|
10472
10478
|
key: e.name,
|
|
10473
|
-
label: `${
|
|
10479
|
+
label: `${re ?? "/"}${e.name}`,
|
|
10474
10480
|
value: e.name,
|
|
10475
10481
|
icon: e.icon
|
|
10476
|
-
})), [x,
|
|
10482
|
+
})), [x, re]), se = g?.srcsetWidths === void 0 ? [400, 800] : g.srcsetWidths, ce = lc(), le = Dc({
|
|
10477
10483
|
uploadPath: g?.path,
|
|
10478
10484
|
srcsetWidths: se,
|
|
10479
10485
|
onFileReady: (e) => {
|
|
@@ -10489,7 +10495,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10489
10495
|
maxHeight: p,
|
|
10490
10496
|
paddingOffset: 16
|
|
10491
10497
|
}), de = s(() => {
|
|
10492
|
-
|
|
10498
|
+
te({
|
|
10493
10499
|
open: !1,
|
|
10494
10500
|
query: "",
|
|
10495
10501
|
anchorPosition: null,
|
|
@@ -10568,7 +10574,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10568
10574
|
return !1;
|
|
10569
10575
|
},
|
|
10570
10576
|
handleKeyDown(e, t) {
|
|
10571
|
-
if (!
|
|
10577
|
+
if (!ne.current.open) return !1;
|
|
10572
10578
|
switch (t.key) {
|
|
10573
10579
|
case "ArrowDown": return t.preventDefault(), G.current?.moveNext(), !0;
|
|
10574
10580
|
case "ArrowUp": return t.preventDefault(), G.current?.movePrev(), !0;
|
|
@@ -10594,32 +10600,32 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10594
10600
|
q.off("selectionUpdate", W);
|
|
10595
10601
|
};
|
|
10596
10602
|
}, [q, ue.adjustedMinHeight]), l(() => {
|
|
10597
|
-
if (!q || !
|
|
10598
|
-
|
|
10603
|
+
if (!q || !re || I) {
|
|
10604
|
+
ne.current.open && de();
|
|
10599
10605
|
return;
|
|
10600
10606
|
}
|
|
10601
10607
|
let e = () => {
|
|
10602
10608
|
if (!q.isFocused) {
|
|
10603
|
-
|
|
10609
|
+
ne.current.open && de();
|
|
10604
10610
|
return;
|
|
10605
10611
|
}
|
|
10606
10612
|
let e = q.state.selection;
|
|
10607
10613
|
if (!e.empty) {
|
|
10608
|
-
|
|
10614
|
+
ne.current.open && de();
|
|
10609
10615
|
return;
|
|
10610
10616
|
}
|
|
10611
10617
|
let { $from: t } = e, n = t.parent;
|
|
10612
10618
|
if (!n.isTextblock) {
|
|
10613
|
-
|
|
10619
|
+
ne.current.open && de();
|
|
10614
10620
|
return;
|
|
10615
10621
|
}
|
|
10616
|
-
let r = n.textContent ?? "", i = t.parentOffset, a = Qu(r, i,
|
|
10622
|
+
let r = n.textContent ?? "", i = t.parentOffset, a = Qu(r, i, re);
|
|
10617
10623
|
if (!a) {
|
|
10618
|
-
|
|
10624
|
+
ne.current.open && de();
|
|
10619
10625
|
return;
|
|
10620
10626
|
}
|
|
10621
|
-
let o = q.view.coordsAtPos(e.from), s = fe(q,
|
|
10622
|
-
!o || !s ||
|
|
10627
|
+
let o = q.view.coordsAtPos(e.from), s = fe(q, re);
|
|
10628
|
+
!o || !s || te({
|
|
10623
10629
|
open: !0,
|
|
10624
10630
|
query: a.query,
|
|
10625
10631
|
anchorPosition: {
|
|
@@ -10636,7 +10642,7 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10636
10642
|
de,
|
|
10637
10643
|
q,
|
|
10638
10644
|
fe,
|
|
10639
|
-
|
|
10645
|
+
re,
|
|
10640
10646
|
I
|
|
10641
10647
|
]);
|
|
10642
10648
|
let me = s(async (e, t) => {
|
|
@@ -10857,15 +10863,15 @@ var nu = ({ mode: e, availability: n, renderAIUnavailable: r }) => {
|
|
|
10857
10863
|
style: ue.wrapperStyle,
|
|
10858
10864
|
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)]")
|
|
10859
10865
|
}, /* @__PURE__ */ t.createElement(w, { editor: q }));
|
|
10860
|
-
return
|
|
10866
|
+
return re && oe.length > 0 ? /* @__PURE__ */ t.createElement(Bl, {
|
|
10861
10867
|
ref: G,
|
|
10862
|
-
trigger:
|
|
10868
|
+
trigger: re,
|
|
10863
10869
|
searchable: ie,
|
|
10864
|
-
controlled:
|
|
10865
|
-
open:
|
|
10866
|
-
anchorPosition:
|
|
10867
|
-
query:
|
|
10868
|
-
editorContext:
|
|
10870
|
+
controlled: K.editorContext ? {
|
|
10871
|
+
open: K.open,
|
|
10872
|
+
anchorPosition: K.anchorPosition,
|
|
10873
|
+
query: K.query,
|
|
10874
|
+
editorContext: K.editorContext,
|
|
10869
10875
|
onClose: de
|
|
10870
10876
|
} : void 0,
|
|
10871
10877
|
onSelect: (e, t) => {
|
|
@@ -12054,7 +12060,7 @@ function Fd(e) {
|
|
|
12054
12060
|
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 }) => {
|
|
12055
12061
|
let j = x(), N = Y("form"), P = Fn("form"), F = Ti(), I = _d(r), L = md(I), R = m(void 0);
|
|
12056
12062
|
R.current ||= Fd(c);
|
|
12057
|
-
let z = R.current, B = g(z.subscribe, z.getRecord), V = z.setRecord, [H, U] = h(!1), [W, ee] = h(!1), G = !c?.[za],
|
|
12063
|
+
let z = R.current, B = g(z.subscribe, z.getRecord), V = z.setRecord, [H, U] = h(!1), [W, ee] = h(!1), G = !c?.[za], K = m(wt(c ?? {})), [te, ne] = h(() => Nd(c)), [re, ie] = h(null), ae = m({ isDirty: !1 }), oe = p(() => {
|
|
12058
12064
|
if (!C) return;
|
|
12059
12065
|
let e = ct(C), t = ct(o || `${j.pathname}${j.hash || ""}`);
|
|
12060
12066
|
return e && t ? `llmnative.form-draft.${e}.${t}` : void 0;
|
|
@@ -12063,12 +12069,12 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12063
12069
|
j.pathname,
|
|
12064
12070
|
j.hash,
|
|
12065
12071
|
o
|
|
12066
|
-
]), se = !!(_ || o || !G), ce = !!(v || !G), le = p(() => !Ft(B,
|
|
12072
|
+
]), se = !!(_ || o || !G), ce = !!(v || !G), le = p(() => !Ft(B, K.current), [B, K.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(() => {
|
|
12067
12073
|
!oe || typeof localStorage > "u" || localStorage.removeItem(oe);
|
|
12068
12074
|
}, [oe]), _e = s(() => {
|
|
12069
12075
|
if (!(!oe || typeof localStorage > "u")) return Pd(localStorage.getItem(oe));
|
|
12070
12076
|
}, [oe]), ve = s(() => {
|
|
12071
|
-
V(wt(
|
|
12077
|
+
V(wt(K.current));
|
|
12072
12078
|
}, []), [ye, be] = h(void 0), xe = s(({ message: e, type: t = "danger" }) => {
|
|
12073
12079
|
S && be({
|
|
12074
12080
|
type: t,
|
|
@@ -12173,7 +12179,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12173
12179
|
action: t,
|
|
12174
12180
|
storagePath: je.current
|
|
12175
12181
|
})) ?? ze(Ee.current ?? {});
|
|
12176
|
-
return e && await F.set(e, Nt(Ee.current)),
|
|
12182
|
+
return e && await F.set(e, Nt(Ee.current)), K.current = wt(Ee.current ?? {}), ne(Nd(Ee.current)), ge(), ie(null), await Be(t);
|
|
12177
12183
|
} finally {
|
|
12178
12184
|
U(!1);
|
|
12179
12185
|
}
|
|
@@ -12205,7 +12211,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12205
12211
|
]);
|
|
12206
12212
|
l(() => {
|
|
12207
12213
|
let e = wt(c ?? {});
|
|
12208
|
-
if (c && (V(e), d?.(wt(e))),
|
|
12214
|
+
if (c && (V(e), d?.(wt(e))), K.current = e, ne(Nd(e)), !C) {
|
|
12209
12215
|
ie(null);
|
|
12210
12216
|
return;
|
|
12211
12217
|
}
|
|
@@ -12235,7 +12241,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12235
12241
|
if (!oe || typeof localStorage > "u" || B === void 0) return;
|
|
12236
12242
|
if (!le) {
|
|
12237
12243
|
let e = _e();
|
|
12238
|
-
if (e && Nd(e) !==
|
|
12244
|
+
if (e && Nd(e) !== te) return;
|
|
12239
12245
|
localStorage.removeItem(oe);
|
|
12240
12246
|
return;
|
|
12241
12247
|
}
|
|
@@ -12244,7 +12250,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12244
12250
|
}, 150);
|
|
12245
12251
|
return () => window.clearTimeout(e);
|
|
12246
12252
|
}, [
|
|
12247
|
-
|
|
12253
|
+
te,
|
|
12248
12254
|
oe,
|
|
12249
12255
|
le,
|
|
12250
12256
|
_e,
|
|
@@ -12288,8 +12294,8 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12288
12294
|
isDeleting: W,
|
|
12289
12295
|
saveDisabled: !se || !le || H,
|
|
12290
12296
|
deleteDisabled: !ce || W,
|
|
12291
|
-
hasDraft:
|
|
12292
|
-
draftStatus:
|
|
12297
|
+
hasDraft: re !== null,
|
|
12298
|
+
draftStatus: re,
|
|
12293
12299
|
errors: Se,
|
|
12294
12300
|
hasErrors: Object.keys(Se).length > 0
|
|
12295
12301
|
});
|
|
@@ -12297,7 +12303,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12297
12303
|
ce,
|
|
12298
12304
|
se,
|
|
12299
12305
|
L,
|
|
12300
|
-
|
|
12306
|
+
re,
|
|
12301
12307
|
Se,
|
|
12302
12308
|
W,
|
|
12303
12309
|
le,
|
|
@@ -12334,13 +12340,13 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12334
12340
|
timeout: ye.type === "success" ? 3e3 : void 0,
|
|
12335
12341
|
onClose: ye.type === "success" ? () => be(void 0) : void 0
|
|
12336
12342
|
}, ye.message) : null, [ye, w]), Je = p(() => {
|
|
12337
|
-
if (!
|
|
12338
|
-
let e =
|
|
12343
|
+
if (!re) return null;
|
|
12344
|
+
let e = re === "restore" ? de : me, n = re === "restore" ? fe : he;
|
|
12339
12345
|
return /* @__PURE__ */ t.createElement(Io, {
|
|
12340
|
-
variant:
|
|
12341
|
-
timeout:
|
|
12342
|
-
onClose:
|
|
12343
|
-
}, /* @__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" },
|
|
12346
|
+
variant: re === "restore" ? "warning" : "info",
|
|
12347
|
+
timeout: re === "restored" ? 6e3 : void 0,
|
|
12348
|
+
onClose: re === "restored" ? () => ie(null) : void 0
|
|
12349
|
+
}, /* @__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" }, re === "restore" ? /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(Hr, {
|
|
12344
12350
|
label: q,
|
|
12345
12351
|
variant: "warning",
|
|
12346
12352
|
onClick: () => Pe()
|
|
@@ -12356,7 +12362,7 @@ var Id = {}, Ld = ({ children: e, appearance: n = void 0, controller: r = void 0
|
|
|
12356
12362
|
}, [
|
|
12357
12363
|
Ne,
|
|
12358
12364
|
pe,
|
|
12359
|
-
|
|
12365
|
+
re,
|
|
12360
12366
|
q,
|
|
12361
12367
|
fe,
|
|
12362
12368
|
de,
|
|
@@ -12682,7 +12688,7 @@ function $d(e, t) {
|
|
|
12682
12688
|
function ef({ 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 }) {
|
|
12683
12689
|
let F = Y("table"), I = Fn("table"), L = N || F.Table.selectedClassName, [R, z] = h(n || []), B = p(() => {
|
|
12684
12690
|
if (!(!d || typeof d == "boolean")) return d;
|
|
12685
|
-
}, [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,
|
|
12691
|
+
}, [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, K] = h(null), [te, ne] = h(null), [re, ie] = h(null), [ae, oe] = h(null), se = m(!1), ce = s((e) => {
|
|
12686
12692
|
e && ee(e);
|
|
12687
12693
|
}, []), le = u(), ue = !!a, de = V || !!zs.normalize(B), fe = ue && de, q = !fe && V, pe = fe ? void 0 : B;
|
|
12688
12694
|
l(() => {
|
|
@@ -12751,8 +12757,8 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12751
12757
|
]), Te = s((e, t) => {
|
|
12752
12758
|
if (!G) return;
|
|
12753
12759
|
let n = be.findIndex((e, t) => he(e, t) === G), r = be.findIndex((n, r) => he(n, r) === he(e, t));
|
|
12754
|
-
|
|
12755
|
-
let i =
|
|
12760
|
+
ne(null), K(null);
|
|
12761
|
+
let i = re?.position || "after";
|
|
12756
12762
|
if (ie(null), n < 0 || r < 0 || n === r) return;
|
|
12757
12763
|
let o = [...be], [s] = o.splice(n, 1), c = n < r ? r + (i === "after" ? 0 : -1) : r + +(i === "after");
|
|
12758
12764
|
o.splice(c, 0, s), U(void 0), z(o), a?.(o, {
|
|
@@ -12762,7 +12768,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12762
12768
|
});
|
|
12763
12769
|
}, [
|
|
12764
12770
|
G,
|
|
12765
|
-
|
|
12771
|
+
re?.position,
|
|
12766
12772
|
he,
|
|
12767
12773
|
a,
|
|
12768
12774
|
be
|
|
@@ -12777,10 +12783,10 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12777
12783
|
F.Table.scrollClassName,
|
|
12778
12784
|
j ? `${j} overflow-auto` : "",
|
|
12779
12785
|
M || ""
|
|
12780
|
-
].filter(Boolean).join(" "), Oe = !!j, ke = Ee.length + +!!ve + +!!ue, Ae = Oe ? "sticky top-0 z-10 bg-card" : "", je = (e, n, r, i) => !
|
|
12786
|
+
].filter(Boolean).join(" "), Oe = !!j, ke = Ee.length + +!!ve + +!!ue, Ae = Oe ? "sticky top-0 z-10 bg-card" : "", je = (e, n, r, i) => !re || re.key !== e || re.position !== n ? null : /* @__PURE__ */ t.createElement("tr", {
|
|
12781
12787
|
"aria-hidden": "true",
|
|
12782
12788
|
onDragOver: (t) => {
|
|
12783
|
-
ue && (t.preventDefault(),
|
|
12789
|
+
ue && (t.preventDefault(), te !== e && ne(e), ie({
|
|
12784
12790
|
key: e,
|
|
12785
12791
|
position: n
|
|
12786
12792
|
}));
|
|
@@ -12854,7 +12860,7 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12854
12860
|
return e.map((e, o) => {
|
|
12855
12861
|
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;
|
|
12856
12862
|
a = u;
|
|
12857
|
-
let f = ge.includes(l), p =
|
|
12863
|
+
let f = ge.includes(l), p = te === l, m = G === l, h = L && (g === void 0 ? ae : g) === l;
|
|
12858
12864
|
return /* @__PURE__ */ t.createElement(t.Fragment, { key: l }, d && /* @__PURE__ */ t.createElement("tr", { "aria-hidden": "true" }, /* @__PURE__ */ t.createElement("td", {
|
|
12859
12865
|
colSpan: ke,
|
|
12860
12866
|
className: "bg-muted/40 px-3 py-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground"
|
|
@@ -12873,22 +12879,22 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12873
12879
|
i && xe(t, e, s);
|
|
12874
12880
|
},
|
|
12875
12881
|
onDragStart: () => {
|
|
12876
|
-
|
|
12882
|
+
K(l);
|
|
12877
12883
|
},
|
|
12878
12884
|
onDragOver: (e) => {
|
|
12879
12885
|
if (!ue) return;
|
|
12880
12886
|
e.preventDefault();
|
|
12881
12887
|
let t = e.currentTarget.getBoundingClientRect(), n = e.clientY < t.top + t.height / 2 ? "before" : "after";
|
|
12882
|
-
|
|
12888
|
+
te !== l && ne(l), G !== l && ie((e) => e?.key === l && e.position === n ? e : {
|
|
12883
12889
|
key: l,
|
|
12884
12890
|
position: n
|
|
12885
12891
|
});
|
|
12886
12892
|
},
|
|
12887
12893
|
onDragLeave: () => {
|
|
12888
|
-
|
|
12894
|
+
te === l && ne(null);
|
|
12889
12895
|
},
|
|
12890
12896
|
onDragEnd: () => {
|
|
12891
|
-
|
|
12897
|
+
K(null), ne(null), ie(null);
|
|
12892
12898
|
},
|
|
12893
12899
|
onDrop: (t) => {
|
|
12894
12900
|
ue && (t.preventDefault(), Te(e, s));
|
|
@@ -12927,10 +12933,10 @@ function ef({ columns: e = void 0, records: n = void 0, footer: r = void 0, onRo
|
|
|
12927
12933
|
"aria-label": Dn(I.reorderRow, { key: l }),
|
|
12928
12934
|
onClick: (e) => e.preventDefault(),
|
|
12929
12935
|
onDragStart: (e) => {
|
|
12930
|
-
e.stopPropagation(),
|
|
12936
|
+
e.stopPropagation(), K(l);
|
|
12931
12937
|
},
|
|
12932
12938
|
onDragEnd: (e) => {
|
|
12933
|
-
e.stopPropagation(),
|
|
12939
|
+
e.stopPropagation(), K(null), ne(null), ie(null);
|
|
12934
12940
|
}
|
|
12935
12941
|
}, /* @__PURE__ */ t.createElement(k, { size: 14 }))), Ee.map((n) => /* @__PURE__ */ t.createElement("td", {
|
|
12936
12942
|
key: n.key,
|
|
@@ -13287,9 +13293,9 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13287
13293
|
required: r,
|
|
13288
13294
|
label: n,
|
|
13289
13295
|
validator: f
|
|
13290
|
-
}), V = u(), H = v ?? V, U = typeof _ == "object" ? _ : {}, W = !!_, ee = U.position ?? "below", G = U.defaultZoom ?? 15,
|
|
13296
|
+
}), V = u(), H = v ?? V, U = typeof _ == "object" ? _ : {}, W = !!_, ee = U.position ?? "below", G = U.defaultZoom ?? 15, K = U.height ?? 240, [te, ne] = h(typeof A.value == "string" ? A.value : ""), [re, 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);
|
|
13291
13297
|
l(() => {
|
|
13292
|
-
typeof A.value == "string" && A.value !==
|
|
13298
|
+
typeof A.value == "string" && A.value !== te && ne(A.value);
|
|
13293
13299
|
}, [A.value]), l(() => {
|
|
13294
13300
|
if (!ae) return;
|
|
13295
13301
|
let e = (e) => {
|
|
@@ -13298,7 +13304,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13298
13304
|
return window.document.addEventListener("pointerdown", e), () => window.document.removeEventListener("pointerdown", e);
|
|
13299
13305
|
}, [ae]), l(() => {
|
|
13300
13306
|
if (!O) return;
|
|
13301
|
-
let e = ++fe.current, t =
|
|
13307
|
+
let e = ++fe.current, t = te.trim();
|
|
13302
13308
|
if (t.length < 3) {
|
|
13303
13309
|
ie([]), ce(!1);
|
|
13304
13310
|
return;
|
|
@@ -13336,11 +13342,11 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13336
13342
|
})();
|
|
13337
13343
|
}, 250);
|
|
13338
13344
|
return () => window.clearTimeout(n);
|
|
13339
|
-
}, [
|
|
13345
|
+
}, [te, O]);
|
|
13340
13346
|
let ye = (e, t) => {
|
|
13341
13347
|
ve.current = !0;
|
|
13342
|
-
let n = e.formatted ??
|
|
13343
|
-
|
|
13348
|
+
let n = e.formatted ?? te;
|
|
13349
|
+
ne(n), A.handleChange({ target: {
|
|
13344
13350
|
name: k.formatted,
|
|
13345
13351
|
value: n
|
|
13346
13352
|
} }), e.street !== void 0 && j.handleChange({ target: {
|
|
@@ -13421,7 +13427,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13421
13427
|
})).results[0];
|
|
13422
13428
|
if (!n) return;
|
|
13423
13429
|
let r = Ef(n), i = r.formatted ?? t;
|
|
13424
|
-
if (
|
|
13430
|
+
if (ne(i), A.handleChange({ target: {
|
|
13425
13431
|
name: k.formatted,
|
|
13426
13432
|
value: i
|
|
13427
13433
|
} }), r.lat !== void 0 && L.handleChange({ target: {
|
|
@@ -13523,7 +13529,7 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13523
13529
|
let we = W ? /* @__PURE__ */ t.createElement("div", {
|
|
13524
13530
|
ref: pe,
|
|
13525
13531
|
className: X("mt-2 w-full overflow-hidden rounded-md border", T),
|
|
13526
|
-
style: { height:
|
|
13532
|
+
style: { height: K }
|
|
13527
13533
|
}) : null;
|
|
13528
13534
|
return /* @__PURE__ */ t.createElement(Z, { className: A.formWrapClass || D.AddressAutocomplete.wrapperClassName }, n && /* @__PURE__ */ t.createElement(Ns, {
|
|
13529
13535
|
label: n,
|
|
@@ -13544,16 +13550,16 @@ var Df = ({ name: e, label: n = void 0, required: r = !1, placeholder: i = void
|
|
|
13544
13550
|
placeholder: i ?? E.placeholder,
|
|
13545
13551
|
required: r,
|
|
13546
13552
|
disabled: a,
|
|
13547
|
-
value:
|
|
13553
|
+
value: te,
|
|
13548
13554
|
onChange: (e) => {
|
|
13549
|
-
|
|
13555
|
+
ne(e.target.value), oe(!0);
|
|
13550
13556
|
},
|
|
13551
13557
|
onFocus: () => oe(!0)
|
|
13552
13558
|
}), /* @__PURE__ */ t.createElement("span", { className: "pointer-events-none absolute inset-y-0 right-2 flex items-center text-muted-foreground" }, /* @__PURE__ */ t.createElement(Q, {
|
|
13553
13559
|
name: se ? "loader-circle" : "map-pin",
|
|
13554
13560
|
size: 15,
|
|
13555
13561
|
className: se ? "animate-spin" : void 0
|
|
13556
|
-
})), ae &&
|
|
13562
|
+
})), ae && te.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 && re.length === 0 ? /* @__PURE__ */ t.createElement("div", { className: "px-2 py-3 text-center text-muted-foreground" }, E.searching) : re.length === 0 ? /* @__PURE__ */ t.createElement("div", { className: "px-2 py-3 text-center text-muted-foreground" }, E.noResults) : re.map((e) => /* @__PURE__ */ t.createElement("button", {
|
|
13557
13563
|
key: e.id,
|
|
13558
13564
|
type: "button",
|
|
13559
13565
|
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),
|
|
@@ -14710,17 +14716,17 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14710
14716
|
typeof c == "object" ? c?.dir : void 0,
|
|
14711
14717
|
typeof c == "object" ? c?.field : void 0,
|
|
14712
14718
|
c
|
|
14713
|
-
]), U = $d("item"), W = s((e, t) => U(e, t), [U]), { activeSelectedKeys: ee, showSelection: G, updateSelection:
|
|
14719
|
+
]), U = $d("item"), W = s((e, t) => U(e, t), [U]), { activeSelectedKeys: ee, showSelection: G, updateSelection: K } = Qd({
|
|
14714
14720
|
records: V,
|
|
14715
14721
|
selectedKeys: _,
|
|
14716
14722
|
onSelectionChange: o,
|
|
14717
14723
|
getRecordKey: W
|
|
14718
|
-
}),
|
|
14724
|
+
}), te = m(/* @__PURE__ */ new Map());
|
|
14719
14725
|
l(() => {
|
|
14720
14726
|
let e = new Set(V.map((e, t) => W(e, t)));
|
|
14721
|
-
for (let t of
|
|
14727
|
+
for (let t of te.current.keys()) e.has(t) || te.current.delete(t);
|
|
14722
14728
|
}, [V, W]);
|
|
14723
|
-
let
|
|
14729
|
+
let ne = (e, t) => {
|
|
14724
14730
|
if (A) {
|
|
14725
14731
|
let t = A.split(/\s+/).filter(Boolean), n = e.target;
|
|
14726
14732
|
for (; n && !n.classList.contains("item");) {
|
|
@@ -14737,13 +14743,13 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14737
14743
|
}), n.classList.add(...t));
|
|
14738
14744
|
}
|
|
14739
14745
|
a?.(t);
|
|
14740
|
-
},
|
|
14746
|
+
}, re = s((e, t) => {
|
|
14741
14747
|
let n = W(e, t), r = ee.includes(n) ? ee.filter((e) => e !== n) : [...ee, n];
|
|
14742
|
-
|
|
14748
|
+
K(r);
|
|
14743
14749
|
}, [
|
|
14744
14750
|
ee,
|
|
14745
14751
|
W,
|
|
14746
|
-
|
|
14752
|
+
K
|
|
14747
14753
|
]), ie = (e, n) => {
|
|
14748
14754
|
let r = e.img;
|
|
14749
14755
|
return r && t.isValidElement(r) ? t.cloneElement(r, {
|
|
@@ -14754,7 +14760,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14754
14760
|
cursor: a ? "pointer" : "default"
|
|
14755
14761
|
},
|
|
14756
14762
|
onClick: a ? ((t) => {
|
|
14757
|
-
|
|
14763
|
+
ne(t, e), r.props.onClick?.(t);
|
|
14758
14764
|
}) : r.props.onClick
|
|
14759
14765
|
}) : /* @__PURE__ */ t.createElement("img", {
|
|
14760
14766
|
className: "block h-auto w-full max-w-full rounded-lg object-cover",
|
|
@@ -14766,7 +14772,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14766
14772
|
aspectRatio: "16 / 11",
|
|
14767
14773
|
cursor: a ? "pointer" : "default"
|
|
14768
14774
|
},
|
|
14769
|
-
onClick: a ? ((t) =>
|
|
14775
|
+
onClick: a ? ((t) => ne(t, e)) : void 0
|
|
14770
14776
|
});
|
|
14771
14777
|
}, ae = (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, {
|
|
14772
14778
|
badge: e,
|
|
@@ -14825,7 +14831,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14825
14831
|
...r.style
|
|
14826
14832
|
}, o.align, r.className)) : null;
|
|
14827
14833
|
}) : null, de = s((e, t) => {
|
|
14828
|
-
let n = W(e, t), r =
|
|
14834
|
+
let n = W(e, t), r = te.current.get(n);
|
|
14829
14835
|
if (r && r.recordRef === e && r.overlaysRef === i && r.onClickRef === a && r.rowIndex === t) return {
|
|
14830
14836
|
image: r.image,
|
|
14831
14837
|
overlays: r.overlays
|
|
@@ -14834,7 +14840,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14834
14840
|
image: ie(e, t),
|
|
14835
14841
|
overlays: ue(e, t)
|
|
14836
14842
|
};
|
|
14837
|
-
return
|
|
14843
|
+
return te.current.set(n, {
|
|
14838
14844
|
recordRef: e,
|
|
14839
14845
|
overlaysRef: i,
|
|
14840
14846
|
onClickRef: a,
|
|
@@ -14859,7 +14865,7 @@ var Gp = ({ children: e, name: n, onChange: r = void 0, onAdd: i = void 0, onRem
|
|
|
14859
14865
|
type: "checkbox",
|
|
14860
14866
|
"aria-label": Dn(O.selectItem, { key: r }),
|
|
14861
14867
|
checked: i,
|
|
14862
|
-
onChange: () =>
|
|
14868
|
+
onChange: () => re(n, e),
|
|
14863
14869
|
onClick: (e) => e.stopPropagation()
|
|
14864
14870
|
})), o.image, o.overlays));
|
|
14865
14871
|
}, q = (e, t) => {
|
|
@@ -15348,13 +15354,13 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15348
15354
|
columns: i,
|
|
15349
15355
|
records: U,
|
|
15350
15356
|
form: o
|
|
15351
|
-
}), [G,
|
|
15352
|
-
|
|
15357
|
+
}), [G, K] = h(() => Object.fromEntries((M ?? []).map((e) => [e.key, em(e)]))), [te, ne] = h(!1), re = s((e, t) => {
|
|
15358
|
+
K((n) => ({
|
|
15353
15359
|
...n,
|
|
15354
15360
|
[e]: t
|
|
15355
15361
|
}));
|
|
15356
15362
|
}, []), ie = s((e) => {
|
|
15357
|
-
|
|
15363
|
+
K((t) => ({
|
|
15358
15364
|
...t,
|
|
15359
15365
|
[e.key]: em(e)
|
|
15360
15366
|
}));
|
|
@@ -15368,7 +15374,7 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15368
15374
|
title: z.filtersButton,
|
|
15369
15375
|
variant: "link",
|
|
15370
15376
|
badge: ae.length > 0 ? ae.length : void 0,
|
|
15371
|
-
onClick: () =>
|
|
15377
|
+
onClick: () => ne(!0)
|
|
15372
15378
|
}) : 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, {
|
|
15373
15379
|
key: e.key,
|
|
15374
15380
|
variant: "info",
|
|
@@ -15379,22 +15385,22 @@ function om({ records: e, recordId: n, sourcePath: r, columns: i, actions: a, fo
|
|
|
15379
15385
|
ariaLabel: `${z.filtersClearAll} ${e.label}`,
|
|
15380
15386
|
title: `${z.filtersClearAll} ${e.label}`,
|
|
15381
15387
|
onClick: () => ie(e)
|
|
15382
|
-
})))) : null, le = !j && se ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, se, ce) : null, ue =
|
|
15388
|
+
})))) : null, le = !j && se ? /* @__PURE__ */ t.createElement("div", { className: "flex flex-wrap items-center gap-2" }, se, ce) : null, ue = te && M && M.length > 0 ? /* @__PURE__ */ t.createElement(Mi, {
|
|
15383
15389
|
title: z.filtersPanelTitle,
|
|
15384
15390
|
size: "md",
|
|
15385
15391
|
position: "right",
|
|
15386
|
-
onClose: () =>
|
|
15392
|
+
onClose: () => ne(!1),
|
|
15387
15393
|
footer: /* @__PURE__ */ t.createElement(Hr, {
|
|
15388
15394
|
label: z.filtersClearAll,
|
|
15389
15395
|
variant: "link",
|
|
15390
15396
|
disabled: ae.length === 0,
|
|
15391
|
-
onClick: () =>
|
|
15397
|
+
onClick: () => K(Object.fromEntries(M.map((e) => [e.key, em(e)])))
|
|
15392
15398
|
})
|
|
15393
15399
|
}, /* @__PURE__ */ t.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ t.createElement(am, {
|
|
15394
15400
|
key: e.key,
|
|
15395
15401
|
filter: e,
|
|
15396
15402
|
value: G[e.key] ?? em(e),
|
|
15397
|
-
onChange: (t) =>
|
|
15403
|
+
onChange: (t) => re(e.key, t),
|
|
15398
15404
|
dict: z
|
|
15399
15405
|
})))) : null, de = j === !0 ? {} : j || void 0, [fe, q] = h(""), pe = p(() => {
|
|
15400
15406
|
if (!de || !fe.trim()) return oe;
|
|
@@ -15925,7 +15931,7 @@ var um = () => {
|
|
|
15925
15931
|
let e = Zr("user");
|
|
15926
15932
|
e?.profile?.sub && window.google?.accounts?.id?.revoke(e.profile.sub), localStorage.removeItem("googleCredentialToken"), $r("user");
|
|
15927
15933
|
let t = Fa();
|
|
15928
|
-
t && await
|
|
15934
|
+
t && await re(t);
|
|
15929
15935
|
}
|
|
15930
15936
|
onAuthChange(e) {
|
|
15931
15937
|
let t = Fa();
|
|
@@ -16311,19 +16317,19 @@ var Um = class {
|
|
|
16311
16317
|
if (n === "oauth") {
|
|
16312
16318
|
let { provider: n } = e;
|
|
16313
16319
|
if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
|
|
16314
|
-
let { user: r } = await
|
|
16320
|
+
let { user: r } = await ne(t, Vm(n));
|
|
16315
16321
|
return Hm(r);
|
|
16316
16322
|
}
|
|
16317
16323
|
let { email: r, password: i } = e;
|
|
16318
16324
|
if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
|
|
16319
|
-
let { user: a } = await
|
|
16325
|
+
let { user: a } = await te(t, r, i);
|
|
16320
16326
|
return Hm(a);
|
|
16321
16327
|
}
|
|
16322
16328
|
async signOut() {
|
|
16323
16329
|
await this.initPromise;
|
|
16324
16330
|
let e = Fa(this.appName);
|
|
16325
16331
|
if (!e) throw Error("FirebaseAuthProvider: Firebase auth is not initialized");
|
|
16326
|
-
await
|
|
16332
|
+
await re(e);
|
|
16327
16333
|
}
|
|
16328
16334
|
onAuthChange(e) {
|
|
16329
16335
|
if (!this.options.config) {
|