@llmnative/react 1.46.0 → 1.48.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 +14 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +646 -511
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/I18n.d.ts +10 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/widgets/chat/ChatActivity.d.ts +51 -0
- package/llms-full.txt +1487 -1471
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3042,7 +3042,16 @@ var Pn = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10
|
|
|
3042
3042
|
back: "Back",
|
|
3043
3043
|
submit: "Submit",
|
|
3044
3044
|
noAnswer: "No answer",
|
|
3045
|
-
answered: "Answered"
|
|
3045
|
+
answered: "Answered",
|
|
3046
|
+
activityCount: "{count} steps",
|
|
3047
|
+
activityFailed: "{count} failed",
|
|
3048
|
+
activityCommands: "Commands",
|
|
3049
|
+
activityHide: "Hide",
|
|
3050
|
+
activityLog: "Whole log",
|
|
3051
|
+
activitySteps: "Steps view",
|
|
3052
|
+
activityFiles: "{count} files changed",
|
|
3053
|
+
activityChanges: "See the changes",
|
|
3054
|
+
activityEmpty: "Nothing yet"
|
|
3046
3055
|
},
|
|
3047
3056
|
charts: {
|
|
3048
3057
|
noData: "No data",
|
|
@@ -4288,7 +4297,7 @@ var Hi = "rounded-lg border border-border bg-card text-card-foreground shadow-sm
|
|
|
4288
4297
|
}))
|
|
4289
4298
|
}, e);
|
|
4290
4299
|
}, sa = ({ menuKey: e, as: t = "ul", badges: n = {}, before: r = void 0, after: i = void 0, wrapperClassName: a = void 0, className: o = void 0, headerClassName: s = void 0, itemClassName: c = void 0, linkClassName: l = void 0, iconClassName: u = void 0, textClassName: d = void 0, badgeClassName: p = void 0, arrowClassName: m = void 0, submenuClassName: h = void 0 }) => {
|
|
4291
|
-
let g =
|
|
4300
|
+
let g = Jv(e), _ = J("menu"), v = ({ item: e, index: r }) => {
|
|
4292
4301
|
let [i, a] = E(e.active);
|
|
4293
4302
|
b(() => {
|
|
4294
4303
|
a(e.active);
|
|
@@ -11176,14 +11185,21 @@ function Fd({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
|
|
|
11176
11185
|
}));
|
|
11177
11186
|
R((e) => [...e, ...t]);
|
|
11178
11187
|
}, []), ue = v((e) => {
|
|
11188
|
+
if (!c) return;
|
|
11189
|
+
let t = Array.from(e.clipboardData.items).filter((e) => e.kind === "file").map((e) => e.getAsFile()).filter((e) => !!e);
|
|
11190
|
+
if (!t.length) return;
|
|
11191
|
+
e.preventDefault();
|
|
11192
|
+
let n = (/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 14);
|
|
11193
|
+
le(t.map((e, r) => !e.name || e.name === "image.png" ? new File([e], `pasted-${n}${t.length > 1 ? `-${r + 1}` : ""}.${(e.type.split("/")[1] || "png").replace("jpeg", "jpg")}`, { type: e.type }) : e));
|
|
11194
|
+
}, [c, le]), de = v((e) => {
|
|
11179
11195
|
c && e.dataTransfer.types.includes("Files") && (e.preventDefault(), V.current += 1, B(!0));
|
|
11180
|
-
}, [c]), de = v((e) => {
|
|
11181
|
-
c && e.dataTransfer.types.includes("Files") && e.preventDefault();
|
|
11182
11196
|
}, [c]), fe = v((e) => {
|
|
11183
|
-
c &&
|
|
11197
|
+
c && e.dataTransfer.types.includes("Files") && e.preventDefault();
|
|
11184
11198
|
}, [c]), pe = v((e) => {
|
|
11199
|
+
c && (e.preventDefault(), V.current = Math.max(0, V.current - 1), V.current === 0 && B(!1));
|
|
11200
|
+
}, [c]), me = v((e) => {
|
|
11185
11201
|
c && (e.preventDefault(), V.current = 0, B(!1), e.dataTransfer.files.length && le(e.dataTransfer.files));
|
|
11186
|
-
}, [c, le]),
|
|
11202
|
+
}, [c, le]), K = Ec({
|
|
11187
11203
|
minHeight: O,
|
|
11188
11204
|
maxHeight: k
|
|
11189
11205
|
});
|
|
@@ -11191,21 +11207,21 @@ function Fd({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
|
|
|
11191
11207
|
let e = P.current;
|
|
11192
11208
|
if (!e) return;
|
|
11193
11209
|
e.style.height = "auto";
|
|
11194
|
-
let t = Math.max(e.scrollHeight,
|
|
11195
|
-
e.style.height = `${n}px`, e.style.overflowY =
|
|
11210
|
+
let t = Math.max(e.scrollHeight, K.resolvedMinHeight), n = K.resolvedMaxHeight ? Math.min(t, K.resolvedMaxHeight) : t;
|
|
11211
|
+
e.style.height = `${n}px`, e.style.overflowY = K.resolvedMaxHeight && t > K.resolvedMaxHeight ? "auto" : "hidden";
|
|
11196
11212
|
}, [
|
|
11197
11213
|
t,
|
|
11198
|
-
|
|
11199
|
-
|
|
11214
|
+
K.resolvedMinHeight,
|
|
11215
|
+
K.resolvedMaxHeight
|
|
11200
11216
|
]);
|
|
11201
|
-
let
|
|
11217
|
+
let he = l?.length ? u ?? "/" : void 0, ge = (l?.length ?? 0) >= 10, _e = f.useMemo(() => new Map((l ?? []).map((e) => [e.name, e])), [l]), ve = f.useMemo(() => (l ?? []).map((e) => ({
|
|
11202
11218
|
key: e.name,
|
|
11203
|
-
label: `${
|
|
11219
|
+
label: `${he ?? "/"}${e.name}`,
|
|
11204
11220
|
value: e.name,
|
|
11205
11221
|
icon: e.icon,
|
|
11206
11222
|
description: e.description
|
|
11207
|
-
})), [l,
|
|
11208
|
-
let n =
|
|
11223
|
+
})), [l, he]), ye = v(async (e, t) => {
|
|
11224
|
+
let n = _e.get(e.value);
|
|
11209
11225
|
if (n) {
|
|
11210
11226
|
if (n.handler) {
|
|
11211
11227
|
let e = await n.handler(vd(t)), r = n.consumeSuffix ? hd(t.textAfterCaret, n.consumeSuffix) : 0;
|
|
@@ -11214,7 +11230,7 @@ function Fd({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
|
|
|
11214
11230
|
}
|
|
11215
11231
|
t.replace(t.triggerRange.start, t.triggerRange.end, `${t.trigger}${n.name} `);
|
|
11216
11232
|
}
|
|
11217
|
-
}, [
|
|
11233
|
+
}, [_e]), be = d.find((e) => e.value === p)?.label ?? Pd(p), xe = () => {
|
|
11218
11234
|
o || i || (s({
|
|
11219
11235
|
text: t,
|
|
11220
11236
|
files: L.map((e) => e.file),
|
|
@@ -11227,31 +11243,32 @@ function Fd({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
|
|
|
11227
11243
|
temperature: oe
|
|
11228
11244
|
} : {}
|
|
11229
11245
|
}), L.forEach(({ objectUrl: e }) => URL.revokeObjectURL(e)), R([]));
|
|
11230
|
-
},
|
|
11246
|
+
}, Se = () => {
|
|
11231
11247
|
if (i) {
|
|
11232
11248
|
U(!0), a?.();
|
|
11233
11249
|
return;
|
|
11234
11250
|
}
|
|
11235
|
-
|
|
11236
|
-
},
|
|
11251
|
+
xe();
|
|
11252
|
+
}, Ce = /* @__PURE__ */ f.createElement("textarea", {
|
|
11237
11253
|
id: I,
|
|
11238
11254
|
name: e,
|
|
11239
11255
|
ref: P,
|
|
11240
11256
|
value: t,
|
|
11241
11257
|
onChange: (e) => n(e.target.value),
|
|
11258
|
+
onPaste: ue,
|
|
11242
11259
|
placeholder: r,
|
|
11243
11260
|
className: j || Nd,
|
|
11244
11261
|
style: { maxHeight: k },
|
|
11245
11262
|
onKeyDown: (e) => {
|
|
11246
|
-
e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && !e.nativeEvent.defaultPrevented && (e.preventDefault(),
|
|
11263
|
+
e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && !e.nativeEvent.defaultPrevented && (e.preventDefault(), Se());
|
|
11247
11264
|
}
|
|
11248
11265
|
});
|
|
11249
11266
|
return /* @__PURE__ */ f.createElement(Z, { className: A || M.Prompt.wrapperClassName }, /* @__PURE__ */ f.createElement("div", {
|
|
11250
11267
|
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"}`,
|
|
11251
|
-
onDragEnter:
|
|
11252
|
-
onDragOver:
|
|
11253
|
-
onDragLeave:
|
|
11254
|
-
onDrop:
|
|
11268
|
+
onDragEnter: de,
|
|
11269
|
+
onDragOver: fe,
|
|
11270
|
+
onDragLeave: pe,
|
|
11271
|
+
onDrop: me
|
|
11255
11272
|
}, c && z && /* @__PURE__ */ f.createElement("div", { className: "pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-xl bg-primary/5" }, /* @__PURE__ */ f.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__ */ f.createElement(Q, {
|
|
11256
11273
|
name: "paperclip",
|
|
11257
11274
|
size: 13
|
|
@@ -11273,19 +11290,19 @@ function Fd({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
|
|
|
11273
11290
|
}, /* @__PURE__ */ f.createElement(Q, {
|
|
11274
11291
|
name: "x",
|
|
11275
11292
|
size: 9
|
|
11276
|
-
}))))),
|
|
11277
|
-
trigger:
|
|
11278
|
-
searchable:
|
|
11293
|
+
}))))), he && ve.length > 0 ? /* @__PURE__ */ f.createElement(Sd, {
|
|
11294
|
+
trigger: he,
|
|
11295
|
+
searchable: ge,
|
|
11279
11296
|
onSelect: (e, t) => {
|
|
11280
|
-
|
|
11297
|
+
ye(e, t);
|
|
11281
11298
|
}
|
|
11282
|
-
},
|
|
11299
|
+
}, ve.map((e) => /* @__PURE__ */ f.createElement(Sd.Item, {
|
|
11283
11300
|
key: e.key,
|
|
11284
11301
|
label: e.label,
|
|
11285
11302
|
value: e.value,
|
|
11286
11303
|
icon: e.icon,
|
|
11287
11304
|
description: e.description
|
|
11288
|
-
})),
|
|
11305
|
+
})), Ce) : Ce), c && /* @__PURE__ */ f.createElement("input", {
|
|
11289
11306
|
ref: F,
|
|
11290
11307
|
type: "file",
|
|
11291
11308
|
multiple: !0,
|
|
@@ -11324,7 +11341,7 @@ function Fd({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
|
|
|
11324
11341
|
}), e.showLabel && e.label && /* @__PURE__ */ f.createElement("span", { className: "whitespace-nowrap" }, e.label))), /* @__PURE__ */ f.createElement("div", { className: "mx-1 h-4 w-px shrink-0 bg-border" })), d.length > 0 && /* @__PURE__ */ f.createElement(la, {
|
|
11325
11342
|
trigger: {
|
|
11326
11343
|
icon: "cpu",
|
|
11327
|
-
text:
|
|
11344
|
+
text: be ?? h ?? N.defaultOption
|
|
11328
11345
|
},
|
|
11329
11346
|
placement: "top",
|
|
11330
11347
|
position: "start",
|
|
@@ -11399,7 +11416,7 @@ function Fd({ name: e, value: t, onChange: n, placeholder: r, running: i = !1, o
|
|
|
11399
11416
|
className: "w-full cursor-pointer accent-primary"
|
|
11400
11417
|
})))), /* @__PURE__ */ f.createElement("div", { className: "flex-1" }), /* @__PURE__ */ f.createElement("button", {
|
|
11401
11418
|
type: "button",
|
|
11402
|
-
onClick:
|
|
11419
|
+
onClick: Se,
|
|
11403
11420
|
disabled: i ? !a : o,
|
|
11404
11421
|
title: H ? N.stopping : i ? N.stop : N.run,
|
|
11405
11422
|
"aria-label": H ? N.stopping : i ? N.stop : N.run,
|
|
@@ -15186,7 +15203,7 @@ function Gp({ columns: e = void 0, records: t = void 0, footer: n = void 0, onRo
|
|
|
15186
15203
|
width: "1%",
|
|
15187
15204
|
whiteSpace: "nowrap"
|
|
15188
15205
|
}
|
|
15189
|
-
}))), Pe = /* @__PURE__ */ f.createElement(
|
|
15206
|
+
}))), Pe = /* @__PURE__ */ f.createElement(gg, {
|
|
15190
15207
|
records: xe,
|
|
15191
15208
|
appendTo: ee,
|
|
15192
15209
|
wrapperClassName: "px-3 pt-4 pb-2",
|
|
@@ -16220,7 +16237,7 @@ function jm({ group: e, expanded: t, openItems: n, showIcons: r, onToggle: i })
|
|
|
16220
16237
|
}))));
|
|
16221
16238
|
}
|
|
16222
16239
|
function Mm({ menuKey: e, items: t, bottomItems: n = [], defaultCollapsed: r = !1, collapsed: i, onCollapsedChange: a, showIcons: o = !0, showCollapseButton: s = !0, footer: c, header: l, embedded: u = !1 }) {
|
|
16223
|
-
let { pathname: d } = M(), p = J("sideNav"), m = Y("sideNav"), h =
|
|
16240
|
+
let { pathname: d } = M(), p = J("sideNav"), m = Y("sideNav"), h = Jv(e ?? ""), g = t ?? (e ? Tm(h) : []), _ = i !== void 0, [y, x] = E(r), S = i === void 0 ? y : i, C = v((e) => {
|
|
16224
16241
|
let t = typeof e == "function" ? e(S) : e;
|
|
16225
16242
|
_ ? a?.(t) : x(t);
|
|
16226
16243
|
}, [
|
|
@@ -16349,7 +16366,7 @@ function Fm({ path: e, fromUrl: t, where: n, order: r, fieldMap: i, recordId: a
|
|
|
16349
16366
|
dir: n
|
|
16350
16367
|
};
|
|
16351
16368
|
}, [r]), d = o.sortable === void 0 || o.sortable === !0 ? u ?? o.sortable : o.sortable;
|
|
16352
|
-
return /* @__PURE__ */ f.createElement(
|
|
16369
|
+
return /* @__PURE__ */ f.createElement(Ag, {
|
|
16353
16370
|
...o,
|
|
16354
16371
|
records: l,
|
|
16355
16372
|
recordId: a,
|
|
@@ -17595,8 +17612,81 @@ function fg({ questions: e, onSubmit: t, numbering: n, allowOther: r = !0, answe
|
|
|
17595
17612
|
}), s ?? u.submit))));
|
|
17596
17613
|
}
|
|
17597
17614
|
//#endregion
|
|
17615
|
+
//#region src/components/widgets/chat/ChatActivity.tsx
|
|
17616
|
+
function pg({ item: e, className: t }) {
|
|
17617
|
+
let n = Y("chat"), [r, i] = f.useState(!1), a = f.useId(), o = e.detail ?? [], s = e.lines ?? [];
|
|
17618
|
+
return /* @__PURE__ */ f.createElement("li", { className: X("min-w-0 space-y-1", t) }, /* @__PURE__ */ f.createElement("div", { className: "flex min-w-0 items-center gap-2 text-sm" }, /* @__PURE__ */ f.createElement(Q, {
|
|
17619
|
+
name: e.icon ?? "terminal",
|
|
17620
|
+
size: 14,
|
|
17621
|
+
className: "shrink-0 text-muted-foreground"
|
|
17622
|
+
}), /* @__PURE__ */ f.createElement("span", { className: "shrink-0 font-medium" }, e.label), (e.count ?? 1) > 1 && /* @__PURE__ */ f.createElement("span", { className: "shrink-0 rounded-full bg-muted px-2 text-xs text-muted-foreground" }, Vn(n.activityCount, { count: e.count ?? 1 })), (e.failed ?? 0) > 0 && /* @__PURE__ */ f.createElement("span", { className: "shrink-0 rounded-full bg-warning/15 px-2 text-xs text-warning" }, Vn(n.activityFailed, { count: e.failed ?? 0 })), o.length > 0 && /* @__PURE__ */ f.createElement("span", {
|
|
17623
|
+
className: "min-w-0 truncate text-xs text-muted-foreground",
|
|
17624
|
+
title: o.join(", ")
|
|
17625
|
+
}, o.slice(0, 4).join(", "), o.length > 4 ? "…" : ""), s.length > 0 && /* @__PURE__ */ f.createElement("button", {
|
|
17626
|
+
type: "button",
|
|
17627
|
+
onClick: () => i((e) => !e),
|
|
17628
|
+
"aria-expanded": r,
|
|
17629
|
+
"aria-controls": a,
|
|
17630
|
+
className: "ms-auto inline-flex shrink-0 items-center gap-1 rounded-md text-xs text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
17631
|
+
}, r ? n.activityHide : n.activityCommands, /* @__PURE__ */ f.createElement(Q, {
|
|
17632
|
+
name: "chevron-down",
|
|
17633
|
+
size: 12,
|
|
17634
|
+
className: X("transition-transform", r && "rotate-180")
|
|
17635
|
+
}))), s.length > 0 && /* @__PURE__ */ f.createElement("pre", {
|
|
17636
|
+
id: a,
|
|
17637
|
+
hidden: !r,
|
|
17638
|
+
className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-muted p-2 font-mono text-xs leading-relaxed text-muted-foreground"
|
|
17639
|
+
}, r ? s.join("\n") : null));
|
|
17640
|
+
}
|
|
17641
|
+
function mg({ items: e, files: t = [], onShowChanges: n, log: r, className: i, classNames: a }) {
|
|
17642
|
+
let o = Y("chat"), [s, c] = f.useState(!1);
|
|
17643
|
+
return s && r ? /* @__PURE__ */ f.createElement("div", { className: X("rf-chat-activity min-w-0 space-y-2", i, a?.root) }, /* @__PURE__ */ f.createElement("button", {
|
|
17644
|
+
type: "button",
|
|
17645
|
+
onClick: () => c(!1),
|
|
17646
|
+
className: "inline-flex items-center gap-1 text-xs text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
17647
|
+
}, /* @__PURE__ */ f.createElement(Q, {
|
|
17648
|
+
name: "list",
|
|
17649
|
+
size: 12
|
|
17650
|
+
}), o.activitySteps), /* @__PURE__ */ f.createElement("pre", { className: X("max-h-96 overflow-auto whitespace-pre-wrap break-words rounded-md border border-border bg-muted p-3 font-mono text-xs leading-relaxed", a?.log) }, r.join("\n") || o.activityEmpty)) : /* @__PURE__ */ f.createElement("div", { className: X("rf-chat-activity min-w-0 space-y-3", i, a?.root) }, !e.length && /* @__PURE__ */ f.createElement("p", { className: "text-xs text-muted-foreground" }, o.activityEmpty), e.length > 0 && /* @__PURE__ */ f.createElement("ul", { className: "space-y-2" }, e.map((e, t) => e.type === "steps" ? /* @__PURE__ */ f.createElement(pg, {
|
|
17651
|
+
key: t,
|
|
17652
|
+
item: e,
|
|
17653
|
+
className: a?.step
|
|
17654
|
+
}) : e.type === "text" ? /* @__PURE__ */ f.createElement("li", {
|
|
17655
|
+
key: t,
|
|
17656
|
+
className: X("rounded-md bg-card px-3 py-2", a?.text)
|
|
17657
|
+
}, /* @__PURE__ */ f.createElement($h, {
|
|
17658
|
+
content: e.text,
|
|
17659
|
+
className: "text-sm"
|
|
17660
|
+
})) : /* @__PURE__ */ f.createElement("li", {
|
|
17661
|
+
key: t,
|
|
17662
|
+
className: "flex items-center gap-2 text-xs"
|
|
17663
|
+
}, /* @__PURE__ */ f.createElement(Q, {
|
|
17664
|
+
name: e.ok ? "circle-check" : "circle-x",
|
|
17665
|
+
size: 14,
|
|
17666
|
+
className: e.ok ? "text-success" : "text-danger"
|
|
17667
|
+
}), /* @__PURE__ */ f.createElement("span", { className: "text-muted-foreground" }, e.text)))), t.length > 0 && /* @__PURE__ */ f.createElement("div", { className: X("rounded-md border border-border px-3 py-2", a?.files) }, /* @__PURE__ */ f.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs font-semibold" }, Vn(o.activityFiles, { count: t.length })), n && /* @__PURE__ */ f.createElement("button", {
|
|
17668
|
+
type: "button",
|
|
17669
|
+
onClick: n,
|
|
17670
|
+
className: "ms-auto inline-flex items-center gap-1 text-xs text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
17671
|
+
}, /* @__PURE__ */ f.createElement(Q, {
|
|
17672
|
+
name: "git-compare",
|
|
17673
|
+
size: 12
|
|
17674
|
+
}), o.activityChanges)), /* @__PURE__ */ f.createElement("ul", { className: "mt-1 space-y-0.5" }, t.map((e) => /* @__PURE__ */ f.createElement("li", {
|
|
17675
|
+
key: e,
|
|
17676
|
+
className: "truncate font-mono text-xs text-muted-foreground",
|
|
17677
|
+
title: e
|
|
17678
|
+
}, e)))), r && /* @__PURE__ */ f.createElement("button", {
|
|
17679
|
+
type: "button",
|
|
17680
|
+
onClick: () => c(!0),
|
|
17681
|
+
className: "inline-flex items-center gap-1 text-xs text-primary hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
17682
|
+
}, /* @__PURE__ */ f.createElement(Q, {
|
|
17683
|
+
name: "terminal",
|
|
17684
|
+
size: 12
|
|
17685
|
+
}), o.activityLog));
|
|
17686
|
+
}
|
|
17687
|
+
//#endregion
|
|
17598
17688
|
//#region src/components/widgets/TabDynamic.tsx
|
|
17599
|
-
var
|
|
17689
|
+
var hg = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRemove: i = void 0, label: a = "Tab", min: o = 1, max: s = void 0, activeIndex: c = 0, title: l = void 0, readOnly: u = !1, tabPosition: d = "default" }) => {
|
|
17600
17690
|
let { value: p, handleChange: m } = yp({
|
|
17601
17691
|
name: t,
|
|
17602
17692
|
onChange: n
|
|
@@ -17653,7 +17743,7 @@ var pg = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRem
|
|
|
17653
17743
|
}))),
|
|
17654
17744
|
content: /* @__PURE__ */ f.createElement("div", { className: Rp() }, C)
|
|
17655
17745
|
}));
|
|
17656
|
-
},
|
|
17746
|
+
}, gg = ({ records: e, children: t, limit: n = void 0, page: r = void 0, maxPageButtons: i = void 0, appendTo: a = void 0, before: o = void 0, after: s = void 0, className: c = void 0, wrapperClassName: l = void 0, scrollToTopOnChange: u = void 0, scrollBehavior: d = void 0, align: p = void 0, sticky: m = void 0 }) => {
|
|
17657
17747
|
let h = J("pagination"), g = Y("common"), [_, v] = E(r || 1), [y, x] = E(e.length);
|
|
17658
17748
|
e.length !== y && (x(e.length), v(1));
|
|
17659
17749
|
let S = n || e.length, C = Math.ceil(e.length / S), T = (_ - 1) * S, D = T + S, O = w(() => e.slice(T, D), [
|
|
@@ -17719,7 +17809,7 @@ var pg = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRem
|
|
|
17719
17809
|
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", M === "disabled" ? "pointer-events-none opacity-40" : "cursor-pointer hover:bg-accent hover:text-accent-foreground")
|
|
17720
17810
|
}, /* @__PURE__ */ f.createElement("span", null, "»"))))), s);
|
|
17721
17811
|
return /* @__PURE__ */ f.createElement(f.Fragment, null, t(O, T), a ? H(F, a) : a === void 0 && F);
|
|
17722
|
-
},
|
|
17812
|
+
}, _g = ({ records: e = void 0, header: t = void 0, footer: n = void 0, overlays: r = void 0, renderItem: i = void 0, onRowClick: a = void 0, onSelectionChange: o = void 0, sortable: s = !1, pagination: c = void 0, gap: l = void 0, columns: u = void 0, groupBy: d = void 0, selectedKeys: p = void 0, before: m = void 0, after: h = void 0, wrapperClassName: g = void 0, className: _ = void 0, headerClassName: y = void 0, scrollClassName: x = void 0, bodyClassName: S = void 0, footerClassName: C = void 0, selectedClassName: D = void 0 }) => {
|
|
17723
17813
|
let O = J("gallery"), k = Y("gallery"), A = Y("common"), j = D || O.Gallery.selectedClassName, [M, N] = E(null), P = v((e) => {
|
|
17724
17814
|
e && N(e);
|
|
17725
17815
|
}, []), F = l ?? O.Gallery.gap, I = u ?? O.Gallery.rowCols, L = {
|
|
@@ -17928,7 +18018,7 @@ var pg = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRem
|
|
|
17928
18018
|
d,
|
|
17929
18019
|
U
|
|
17930
18020
|
]);
|
|
17931
|
-
return he === void 0 ? /* @__PURE__ */ f.createElement("p", { className: "p-4" }, /* @__PURE__ */ f.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : he.length === 0 ? /* @__PURE__ */ f.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ f.createElement("div", { className: X("flex items-stretch gap-3", g || O.Gallery.wrapperClassName) }, m && /* @__PURE__ */ f.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, m), /* @__PURE__ */ f.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", _ || O.Gallery.className) }, t && /* @__PURE__ */ f.createElement("div", { className: y || O.Gallery.headerClassName }, t), /* @__PURE__ */ f.createElement(Z, { className: X("min-w-0 flex-1", x || O.Gallery.scrollClassName) }, /* @__PURE__ */ f.createElement(
|
|
18021
|
+
return he === void 0 ? /* @__PURE__ */ f.createElement("p", { className: "p-4" }, /* @__PURE__ */ f.createElement("span", { className: "mr-2 inline-block h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }), A.loading) : he.length === 0 ? /* @__PURE__ */ f.createElement("p", { className: "p-4" }, A.noDataFound) : /* @__PURE__ */ f.createElement("div", { className: X("flex items-stretch gap-3", g || O.Gallery.wrapperClassName) }, m && /* @__PURE__ */ f.createElement("div", { className: "gallery-before flex shrink-0 items-center self-stretch" }, m), /* @__PURE__ */ f.createElement(Z, { className: X("min-w-0 flex-1 flex flex-col", _ || O.Gallery.className) }, t && /* @__PURE__ */ f.createElement("div", { className: y || O.Gallery.headerClassName }, t), /* @__PURE__ */ f.createElement(Z, { className: X("min-w-0 flex-1", x || O.Gallery.scrollClassName) }, /* @__PURE__ */ f.createElement(gg, {
|
|
17932
18022
|
records: he,
|
|
17933
18023
|
appendTo: M,
|
|
17934
18024
|
wrapperClassName: "px-3 pt-4 pb-2",
|
|
@@ -17949,12 +18039,12 @@ var pg = ({ children: e, name: t, onChange: n = void 0, onAdd: r = void 0, onRem
|
|
|
17949
18039
|
};
|
|
17950
18040
|
//#endregion
|
|
17951
18041
|
//#region src/components/widgets/grid-core/GridGalleryView.tsx
|
|
17952
|
-
function
|
|
18042
|
+
function vg({ records: e, recordId: t, sortable: n, pagination: r, selection: i = !1, selectedKeys: a, onSelectionChange: o, onRowClick: s, groupBy: c, wrapperClassName: l, before: u, after: d, columns: p, overlays: m, renderItem: h }) {
|
|
17953
18043
|
let g = w(() => Lm(t), [t]), _ = w(() => e.reduce((e, t) => (e.set(g(t), t), e), /* @__PURE__ */ new Map()), [g, e]), v = w(() => e.map((e) => ({
|
|
17954
18044
|
...e,
|
|
17955
18045
|
[fo]: g(e)
|
|
17956
18046
|
})), [e, g]);
|
|
17957
|
-
return /* @__PURE__ */ f.createElement(
|
|
18047
|
+
return /* @__PURE__ */ f.createElement(_g, {
|
|
17958
18048
|
records: v,
|
|
17959
18049
|
overlays: m,
|
|
17960
18050
|
renderItem: h ? (e, t, n) => h(e, t, n) : void 0,
|
|
@@ -17990,7 +18080,7 @@ function gg({ records: e, recordId: t, sortable: n, pagination: r, selection: i
|
|
|
17990
18080
|
}
|
|
17991
18081
|
//#endregion
|
|
17992
18082
|
//#region src/components/widgets/grid-core/useGridActions.tsx
|
|
17993
|
-
function
|
|
18083
|
+
function yg({ actions: e, form: t, editDeepLink: n, preparedRecords: r, recordId: i, sourcePath: a, db: o, onSave: s, onDelete: c, onComplete: l, audit: u = !1 }) {
|
|
17994
18084
|
let d = M(), p = N(), m = x(), h = lp(), g = w(() => Lm(i), [i]), _ = w(() => Um(e, !!t), [e, t]), [y, S] = E(null), C = w(() => `${Im(a || "grid-records")}-${Im(m)}`, [m, a]), T = v(() => {
|
|
17995
18085
|
S(null), n && d.hash.startsWith(`#${C}:`) && p({
|
|
17996
18086
|
pathname: d.pathname,
|
|
@@ -18184,7 +18274,7 @@ function _g({ actions: e, form: t, editDeepLink: n, preparedRecords: r, recordId
|
|
|
18184
18274
|
}
|
|
18185
18275
|
//#endregion
|
|
18186
18276
|
//#region src/components/widgets/grid-core/useGridColumns.ts
|
|
18187
|
-
function
|
|
18277
|
+
function bg({ columns: e, records: t, form: n }) {
|
|
18188
18278
|
return w(() => Hm(e, t, n), [
|
|
18189
18279
|
e,
|
|
18190
18280
|
n,
|
|
@@ -18193,7 +18283,7 @@ function vg({ columns: e, records: t, form: n }) {
|
|
|
18193
18283
|
}
|
|
18194
18284
|
//#endregion
|
|
18195
18285
|
//#region src/components/widgets/grid-core/useGridPreparedRecords.ts
|
|
18196
|
-
function
|
|
18286
|
+
function xg({ records: e, onLoad: t }) {
|
|
18197
18287
|
let [n, r] = E(e), [i, a] = E(!1);
|
|
18198
18288
|
return b(() => {
|
|
18199
18289
|
if (!t) {
|
|
@@ -18216,7 +18306,7 @@ function yg({ records: e, onLoad: t }) {
|
|
|
18216
18306
|
}
|
|
18217
18307
|
//#endregion
|
|
18218
18308
|
//#region src/components/widgets/grid-core/useGridSelection.ts
|
|
18219
|
-
function
|
|
18309
|
+
function Sg({ selection: e }) {
|
|
18220
18310
|
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] = E(r ?? []), [s, c] = E([]), l = r?.join("\0") ?? "";
|
|
18221
18311
|
b(() => {
|
|
18222
18312
|
o(r ?? []), c([]);
|
|
@@ -18249,7 +18339,7 @@ function bg({ selection: e }) {
|
|
|
18249
18339
|
}
|
|
18250
18340
|
//#endregion
|
|
18251
18341
|
//#region src/components/widgets/grid-core/GridCore.tsx
|
|
18252
|
-
var
|
|
18342
|
+
var Cg = (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 || Km(e, t, i) : Km(e, t, i), wg = (e) => {
|
|
18253
18343
|
switch (e.kind) {
|
|
18254
18344
|
case "select": return "";
|
|
18255
18345
|
case "multiselect": return [];
|
|
@@ -18263,7 +18353,7 @@ var xg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
18263
18353
|
};
|
|
18264
18354
|
default: return e.defaultValue ?? !1;
|
|
18265
18355
|
}
|
|
18266
|
-
},
|
|
18356
|
+
}, Tg = (e, t) => {
|
|
18267
18357
|
switch (e.kind) {
|
|
18268
18358
|
case "select": return typeof t == "string" && t !== "";
|
|
18269
18359
|
case "multiselect": return Array.isArray(t) && t.length > 0;
|
|
@@ -18277,7 +18367,7 @@ var xg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
18277
18367
|
}
|
|
18278
18368
|
default: return !!t != !!(e.defaultValue ?? !1);
|
|
18279
18369
|
}
|
|
18280
|
-
},
|
|
18370
|
+
}, Eg = (e, t, n) => {
|
|
18281
18371
|
switch (e.kind) {
|
|
18282
18372
|
case "select": return e.predicate(t, n);
|
|
18283
18373
|
case "multiselect": return e.predicate(t, n);
|
|
@@ -18285,7 +18375,7 @@ var xg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
18285
18375
|
case "numberRange": return e.predicate(t, n);
|
|
18286
18376
|
default: return e.predicate(t, n);
|
|
18287
18377
|
}
|
|
18288
|
-
},
|
|
18378
|
+
}, Dg = (e, t, n) => {
|
|
18289
18379
|
switch (e.kind) {
|
|
18290
18380
|
case "select": {
|
|
18291
18381
|
let n = e.options.find((e) => e.value === t);
|
|
@@ -18309,10 +18399,10 @@ var xg = (e, t, n, r, i) => t?.kind === "delete" ? typeof t.title == "function"
|
|
|
18309
18399
|
}
|
|
18310
18400
|
default: return e.label;
|
|
18311
18401
|
}
|
|
18312
|
-
},
|
|
18313
|
-
function
|
|
18402
|
+
}, Og = "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";
|
|
18403
|
+
function kg({ filter: e, value: t, onChange: n, dict: r }) {
|
|
18314
18404
|
if (e.kind === "select") return /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ f.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ f.createElement("select", {
|
|
18315
|
-
className:
|
|
18405
|
+
className: Og,
|
|
18316
18406
|
value: t,
|
|
18317
18407
|
onChange: (e) => n(e.target.value)
|
|
18318
18408
|
}, /* @__PURE__ */ f.createElement("option", { value: "" }, r.filtersSelectPlaceholder), e.options.map((e) => /* @__PURE__ */ f.createElement("option", {
|
|
@@ -18334,7 +18424,7 @@ function Dg({ filter: e, value: t, onChange: n, dict: r }) {
|
|
|
18334
18424
|
let i = t;
|
|
18335
18425
|
return /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ f.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs text-muted-foreground" }, r.filtersRangeFrom), /* @__PURE__ */ f.createElement("input", {
|
|
18336
18426
|
type: "date",
|
|
18337
|
-
className:
|
|
18427
|
+
className: Og,
|
|
18338
18428
|
value: i.from,
|
|
18339
18429
|
onChange: (e) => n({
|
|
18340
18430
|
...i,
|
|
@@ -18342,7 +18432,7 @@ function Dg({ filter: e, value: t, onChange: n, dict: r }) {
|
|
|
18342
18432
|
})
|
|
18343
18433
|
})), /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs text-muted-foreground" }, r.filtersRangeTo), /* @__PURE__ */ f.createElement("input", {
|
|
18344
18434
|
type: "date",
|
|
18345
|
-
className:
|
|
18435
|
+
className: Og,
|
|
18346
18436
|
value: i.to,
|
|
18347
18437
|
onChange: (e) => n({
|
|
18348
18438
|
...i,
|
|
@@ -18354,7 +18444,7 @@ function Dg({ filter: e, value: t, onChange: n, dict: r }) {
|
|
|
18354
18444
|
let i = t;
|
|
18355
18445
|
return /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-1.5" }, /* @__PURE__ */ f.createElement("span", { className: "text-sm font-medium text-foreground" }, e.label), /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs text-muted-foreground" }, r.filtersRangeMin), /* @__PURE__ */ f.createElement("input", {
|
|
18356
18446
|
type: "number",
|
|
18357
|
-
className:
|
|
18447
|
+
className: Og,
|
|
18358
18448
|
value: i.min ?? "",
|
|
18359
18449
|
onChange: (e) => n({
|
|
18360
18450
|
...i,
|
|
@@ -18362,7 +18452,7 @@ function Dg({ filter: e, value: t, onChange: n, dict: r }) {
|
|
|
18362
18452
|
})
|
|
18363
18453
|
})), /* @__PURE__ */ f.createElement("label", { className: "flex flex-col gap-1" }, /* @__PURE__ */ f.createElement("span", { className: "text-xs text-muted-foreground" }, r.filtersRangeMax), /* @__PURE__ */ f.createElement("input", {
|
|
18364
18454
|
type: "number",
|
|
18365
|
-
className:
|
|
18455
|
+
className: Og,
|
|
18366
18456
|
value: i.max ?? "",
|
|
18367
18457
|
onChange: (e) => n({
|
|
18368
18458
|
...i,
|
|
@@ -18381,15 +18471,15 @@ function Dg({ filter: e, value: t, onChange: n, dict: r }) {
|
|
|
18381
18471
|
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", i ? "bg-primary" : "bg-muted-foreground/35")
|
|
18382
18472
|
}, /* @__PURE__ */ f.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", i && "translate-x-4") }))), /* @__PURE__ */ f.createElement("span", { className: "text-sm text-foreground" }, e.label));
|
|
18383
18473
|
}
|
|
18384
|
-
function
|
|
18385
|
-
let R = J("grid"), z = Y("grid"), B = Y("common"), V = w(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Bi(), { preparedRecords: U, loading: ee } =
|
|
18474
|
+
function Ag({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, form: a, editDeepLink: o, header: s, footer: c, view: l = "table", views: u, sticky: d, wrapperClassName: p, cardClassName: m, bodyClassName: h, loading: g = !1, title: _, before: y, after: x, sortable: S = !0, pagination: C, selection: T, onRowClick: D, reorderable: O = !1, onReorder: k, groupBy: A, searchable: j, filters: M, onSave: N, onDelete: P, onComplete: F, audit: I = !1, onLoad: L }) {
|
|
18475
|
+
let R = J("grid"), z = Y("grid"), B = Y("common"), V = w(() => ({ add: z.buttonAdd }), [z.buttonAdd]), H = Bi(), { preparedRecords: U, loading: ee } = xg({
|
|
18386
18476
|
records: e,
|
|
18387
18477
|
onLoad: L
|
|
18388
|
-
}), te =
|
|
18478
|
+
}), te = bg({
|
|
18389
18479
|
columns: r,
|
|
18390
18480
|
records: U,
|
|
18391
18481
|
form: a
|
|
18392
|
-
}), [ne, re] = E(() => Object.fromEntries((M ?? []).map((e) => [e.key,
|
|
18482
|
+
}), [ne, re] = E(() => Object.fromEntries((M ?? []).map((e) => [e.key, wg(e)]))), [W, G] = E(!1), ie = v((e, t) => {
|
|
18393
18483
|
re((n) => ({
|
|
18394
18484
|
...n,
|
|
18395
18485
|
[e]: t
|
|
@@ -18397,9 +18487,9 @@ function Og({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
|
|
|
18397
18487
|
}, []), ae = v((e) => {
|
|
18398
18488
|
re((t) => ({
|
|
18399
18489
|
...t,
|
|
18400
|
-
[e.key]:
|
|
18490
|
+
[e.key]: wg(e)
|
|
18401
18491
|
}));
|
|
18402
|
-
}, []), oe = (M ?? []).filter((e) =>
|
|
18492
|
+
}, []), oe = (M ?? []).filter((e) => Tg(e, ne[e.key] ?? wg(e))), se = w(() => !M || M.length === 0 ? U : U.filter((e) => M.every((t) => Eg(t, e, ne[t.key] ?? wg(t)))), [
|
|
18403
18493
|
U,
|
|
18404
18494
|
M,
|
|
18405
18495
|
ne
|
|
@@ -18414,7 +18504,7 @@ function Og({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
|
|
|
18414
18504
|
key: e.key,
|
|
18415
18505
|
variant: "info",
|
|
18416
18506
|
className: "inline-flex items-center gap-1"
|
|
18417
|
-
},
|
|
18507
|
+
}, Dg(e, ne[e.key] ?? wg(e), z), /* @__PURE__ */ f.createElement(ri, {
|
|
18418
18508
|
icon: "x",
|
|
18419
18509
|
variant: "link",
|
|
18420
18510
|
ariaLabel: `${z.filtersClearAll} ${e.label}`,
|
|
@@ -18429,12 +18519,12 @@ function Og({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
|
|
|
18429
18519
|
label: z.filtersClearAll,
|
|
18430
18520
|
variant: "link",
|
|
18431
18521
|
disabled: oe.length === 0,
|
|
18432
|
-
onClick: () => re(Object.fromEntries(M.map((e) => [e.key,
|
|
18522
|
+
onClick: () => re(Object.fromEntries(M.map((e) => [e.key, wg(e)])))
|
|
18433
18523
|
})
|
|
18434
|
-
}, /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ f.createElement(
|
|
18524
|
+
}, /* @__PURE__ */ f.createElement("div", { className: "flex flex-col gap-5" }, M.map((e) => /* @__PURE__ */ f.createElement(kg, {
|
|
18435
18525
|
key: e.key,
|
|
18436
18526
|
filter: e,
|
|
18437
|
-
value: ne[e.key] ??
|
|
18527
|
+
value: ne[e.key] ?? wg(e),
|
|
18438
18528
|
onChange: (t) => ie(e.key, t),
|
|
18439
18529
|
dict: z
|
|
18440
18530
|
})))) : null, fe = j === !0 ? {} : j || void 0, [pe, me] = E(""), K = w(() => {
|
|
@@ -18493,7 +18583,7 @@ function Og({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
|
|
|
18493
18583
|
ve.overlays,
|
|
18494
18584
|
ve.renderItem,
|
|
18495
18585
|
ke
|
|
18496
|
-
]), { mode: je, activeSelectionKeys: Me, selectionState: Ne, handleSelectionChange: Pe } =
|
|
18586
|
+
]), { mode: je, activeSelectionKeys: Me, selectionState: Ne, handleSelectionChange: Pe } = Sg({ selection: T }), { normalizedActions: Fe, activeAction: Ie, activeActionConfig: q, activeActionBody: Le, activeKey: Re, runAction: ze, close: Be, getActionContext: Ve, getModalActionContext: He, getRecordKey: Ue, formController: We } = yg({
|
|
18497
18587
|
actions: i,
|
|
18498
18588
|
form: a,
|
|
18499
18589
|
editDeepLink: o,
|
|
@@ -18637,7 +18727,7 @@ function Og({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
|
|
|
18637
18727
|
bodyClassName: X(R.Grid.Card.bodyClassName, h),
|
|
18638
18728
|
footerClassName: R.Grid.Card.footerClassName,
|
|
18639
18729
|
loading: g || ee
|
|
18640
|
-
}, ye === "gallery" ? /* @__PURE__ */ f.createElement(
|
|
18730
|
+
}, ye === "gallery" ? /* @__PURE__ */ f.createElement(vg, {
|
|
18641
18731
|
records: K,
|
|
18642
18732
|
recordId: t,
|
|
18643
18733
|
sortable: st || S,
|
|
@@ -18679,7 +18769,7 @@ function Og({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
|
|
|
18679
18769
|
size: (q.kind === "modal" || q.kind === "delete") && q.size || R.Grid.Modal.size,
|
|
18680
18770
|
position: (q.kind === "modal" || q.kind === "delete") && q.position || R.Grid.Modal.position,
|
|
18681
18771
|
header: at,
|
|
18682
|
-
title:
|
|
18772
|
+
title: Cg(Ie.actionKey, q, q.kind === "modal" || q.kind === "delete" ? He(Ie.actionKey, Ie.record) : Ve(Ie.actionKey, Ie.record), z.deleteConfirm, V),
|
|
18683
18773
|
onClose: Be,
|
|
18684
18774
|
onSave: q.kind === "modal" && q.footer === void 0 && (Ie.actionKey === "add" || Ie.actionKey === "edit") ? (e) => We.save(e) : void 0,
|
|
18685
18775
|
onDelete: q.kind === "delete" ? async () => {
|
|
@@ -18707,18 +18797,18 @@ function Og({ records: e, recordId: t, sourcePath: n, columns: r, actions: i, fo
|
|
|
18707
18797
|
}
|
|
18708
18798
|
//#endregion
|
|
18709
18799
|
//#region src/components/widgets/grid-core/GridArray.tsx
|
|
18710
|
-
function
|
|
18711
|
-
return /* @__PURE__ */ f.createElement(
|
|
18800
|
+
function jg(e) {
|
|
18801
|
+
return /* @__PURE__ */ f.createElement(Ag, e);
|
|
18712
18802
|
}
|
|
18713
18803
|
//#endregion
|
|
18714
18804
|
//#region src/components/widgets/Grid.tsx
|
|
18715
|
-
function
|
|
18716
|
-
return "records" in e ? /* @__PURE__ */ f.createElement(
|
|
18805
|
+
function Mg(e) {
|
|
18806
|
+
return "records" in e ? /* @__PURE__ */ f.createElement(jg, e) : /* @__PURE__ */ f.createElement(Fm, e);
|
|
18717
18807
|
}
|
|
18718
18808
|
//#endregion
|
|
18719
18809
|
//#region src/pages/Users.tsx
|
|
18720
|
-
function
|
|
18721
|
-
return /* @__PURE__ */ f.createElement(
|
|
18810
|
+
function Ng() {
|
|
18811
|
+
return /* @__PURE__ */ f.createElement(Mg, {
|
|
18722
18812
|
path: "/users",
|
|
18723
18813
|
recordId: (e) => `${e.email ?? ""}`.replace("@", "-"),
|
|
18724
18814
|
form: /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(Uc, {
|
|
@@ -18745,10 +18835,10 @@ function jg() {
|
|
|
18745
18835
|
}
|
|
18746
18836
|
//#endregion
|
|
18747
18837
|
//#region src/pages/NotFound.tsx
|
|
18748
|
-
var
|
|
18838
|
+
var Pg = () => {
|
|
18749
18839
|
let e = Y("common");
|
|
18750
18840
|
return /* @__PURE__ */ f.createElement("div", { className: "flex flex-col justify-center items-center vh-100" }, /* @__PURE__ */ f.createElement("h1", null, "404"), /* @__PURE__ */ f.createElement("p", null, e.notFoundMessage), /* @__PURE__ */ f.createElement(k, { to: "/" }, /* @__PURE__ */ f.createElement(Q, { name: "house-door" }), " ", e.goHome));
|
|
18751
|
-
},
|
|
18841
|
+
}, Fg = ({ size: e = 28 }) => /* @__PURE__ */ f.createElement("svg", {
|
|
18752
18842
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18753
18843
|
width: e,
|
|
18754
18844
|
height: e,
|
|
@@ -18768,7 +18858,7 @@ var Mg = () => {
|
|
|
18768
18858
|
x2: "12.01",
|
|
18769
18859
|
y1: "17",
|
|
18770
18860
|
y2: "17"
|
|
18771
|
-
})),
|
|
18861
|
+
})), Ig = ({ open: e }) => /* @__PURE__ */ f.createElement("svg", {
|
|
18772
18862
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18773
18863
|
width: "13",
|
|
18774
18864
|
height: "13",
|
|
@@ -18783,7 +18873,7 @@ var Mg = () => {
|
|
|
18783
18873
|
transform: e ? "rotate(180deg)" : "none",
|
|
18784
18874
|
flexShrink: 0
|
|
18785
18875
|
}
|
|
18786
|
-
}, /* @__PURE__ */ f.createElement("polyline", { points: "6 9 12 15 18 9" })),
|
|
18876
|
+
}, /* @__PURE__ */ f.createElement("polyline", { points: "6 9 12 15 18 9" })), Lg = () => /* @__PURE__ */ f.createElement("svg", {
|
|
18787
18877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18788
18878
|
width: "13",
|
|
18789
18879
|
height: "13",
|
|
@@ -18800,7 +18890,7 @@ var Mg = () => {
|
|
|
18800
18890
|
y: "8",
|
|
18801
18891
|
rx: "2",
|
|
18802
18892
|
ry: "2"
|
|
18803
|
-
}), /* @__PURE__ */ f.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })),
|
|
18893
|
+
}), /* @__PURE__ */ f.createElement("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })), Rg = () => /* @__PURE__ */ f.createElement("svg", {
|
|
18804
18894
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18805
18895
|
width: "13",
|
|
18806
18896
|
height: "13",
|
|
@@ -18810,7 +18900,7 @@ var Mg = () => {
|
|
|
18810
18900
|
strokeWidth: "2",
|
|
18811
18901
|
strokeLinecap: "round",
|
|
18812
18902
|
strokeLinejoin: "round"
|
|
18813
|
-
}, /* @__PURE__ */ f.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ f.createElement("path", { d: "M22 2 11 13" })),
|
|
18903
|
+
}, /* @__PURE__ */ f.createElement("path", { d: "m22 2-7 20-4-9-9-4Z" }), /* @__PURE__ */ f.createElement("path", { d: "M22 2 11 13" })), zg = () => /* @__PURE__ */ f.createElement("svg", {
|
|
18814
18904
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18815
18905
|
width: "14",
|
|
18816
18906
|
height: "14",
|
|
@@ -18820,7 +18910,7 @@ var Mg = () => {
|
|
|
18820
18910
|
strokeWidth: "2",
|
|
18821
18911
|
strokeLinecap: "round",
|
|
18822
18912
|
strokeLinejoin: "round"
|
|
18823
|
-
}, /* @__PURE__ */ f.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ f.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ f.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__ */ f.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ f.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ f.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ f.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ f.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ f.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ f.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })),
|
|
18913
|
+
}, /* @__PURE__ */ f.createElement("path", { d: "m8 2 1.88 1.88M14.12 3.88 16 2" }), /* @__PURE__ */ f.createElement("path", { d: "M9 7.13v-1a3.003 3.003 0 1 1 6 0v1" }), /* @__PURE__ */ f.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__ */ f.createElement("path", { d: "M12 20v-9" }), /* @__PURE__ */ f.createElement("path", { d: "M6.53 9C4.6 8.8 3 7.1 3 5" }), /* @__PURE__ */ f.createElement("path", { d: "M6 13H2" }), /* @__PURE__ */ f.createElement("path", { d: "M3 21c0-2.1 1.7-3.9 3.8-4" }), /* @__PURE__ */ f.createElement("path", { d: "M20.97 5c0 2.1-1.6 3.8-3.5 4" }), /* @__PURE__ */ f.createElement("path", { d: "M22 13h-4" }), /* @__PURE__ */ f.createElement("path", { d: "M17.2 17c2.1.1 3.8 1.9 3.8 4" })), Bg = (e, t) => ({
|
|
18824
18914
|
error: {
|
|
18825
18915
|
message: e.message,
|
|
18826
18916
|
stack: e.stack ?? ""
|
|
@@ -18831,8 +18921,8 @@ var Mg = () => {
|
|
|
18831
18921
|
userAgent: typeof navigator < "u" ? navigator.userAgent : "",
|
|
18832
18922
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
18833
18923
|
}
|
|
18834
|
-
}),
|
|
18835
|
-
let n =
|
|
18924
|
+
}), Vg = (e, t) => {
|
|
18925
|
+
let n = Bg(e, t);
|
|
18836
18926
|
return [
|
|
18837
18927
|
`Error: ${n.error.message}`,
|
|
18838
18928
|
"",
|
|
@@ -18847,7 +18937,7 @@ var Mg = () => {
|
|
|
18847
18937
|
`Timestamp: ${n.context.timestamp}`,
|
|
18848
18938
|
`Agent: ${n.context.userAgent}`
|
|
18849
18939
|
].join("\n");
|
|
18850
|
-
},
|
|
18940
|
+
}, Hg = ({ children: e }) => /* @__PURE__ */ f.createElement(f.Fragment, null, e(Yn().errorBoundary)), Ug = class extends f.Component {
|
|
18851
18941
|
constructor(e) {
|
|
18852
18942
|
super(e), this.state = {
|
|
18853
18943
|
error: null,
|
|
@@ -18869,7 +18959,7 @@ var Mg = () => {
|
|
|
18869
18959
|
};
|
|
18870
18960
|
copy = () => {
|
|
18871
18961
|
let { error: e, errorInfo: t } = this.state;
|
|
18872
|
-
e && navigator.clipboard?.writeText(
|
|
18962
|
+
e && navigator.clipboard?.writeText(Vg(e, t)).then(() => {
|
|
18873
18963
|
this.setState({ copied: !0 }), setTimeout(() => this.setState({ copied: !1 }), 2e3);
|
|
18874
18964
|
});
|
|
18875
18965
|
};
|
|
@@ -18878,7 +18968,7 @@ var Mg = () => {
|
|
|
18878
18968
|
e && n && (this.setState({ reportState: "sending" }), fetch(n, {
|
|
18879
18969
|
method: "POST",
|
|
18880
18970
|
headers: { "Content-Type": "application/json" },
|
|
18881
|
-
body: JSON.stringify(
|
|
18971
|
+
body: JSON.stringify(Bg(e, t))
|
|
18882
18972
|
}).then((e) => this.setState({ reportState: e.ok ? "sent" : "failed" })).catch(() => this.setState({ reportState: "failed" })));
|
|
18883
18973
|
};
|
|
18884
18974
|
render() {
|
|
@@ -18888,16 +18978,16 @@ var Mg = () => {
|
|
|
18888
18978
|
if (typeof o == "function") return o(e, this.reset);
|
|
18889
18979
|
if (o != null) return o;
|
|
18890
18980
|
let u = (e.stack ?? e.message).split("\n").map((e) => e.trim()).filter(Boolean), d = (t?.componentStack ?? "").split("\n").map((e) => e.trim()).filter(Boolean), p = c ? "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";
|
|
18891
|
-
return /* @__PURE__ */ f.createElement(
|
|
18981
|
+
return /* @__PURE__ */ f.createElement(Hg, null, (t) => /* @__PURE__ */ f.createElement("div", { className: p }, /* @__PURE__ */ f.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__ */ f.createElement("div", { className: "flex items-start gap-4" }, /* @__PURE__ */ f.createElement("div", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-destructive/12 text-destructive" }, /* @__PURE__ */ f.createElement(Fg, { size: 22 })), /* @__PURE__ */ f.createElement("div", null, /* @__PURE__ */ f.createElement("p", { className: "text-sm font-semibold text-foreground" }, t.title), /* @__PURE__ */ f.createElement("p", { className: "mt-0.5 text-xs text-muted-foreground" }, t.description))), /* @__PURE__ */ f.createElement("div", { className: "rounded-lg border bg-background/60" }, /* @__PURE__ */ f.createElement("button", {
|
|
18892
18982
|
onClick: () => this.setState((e) => ({ detailsOpen: !e.detailsOpen })),
|
|
18893
18983
|
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"
|
|
18894
|
-
}, /* @__PURE__ */ f.createElement(
|
|
18984
|
+
}, /* @__PURE__ */ f.createElement(Ig, { open: n }), t.technicalDetails, /* @__PURE__ */ f.createElement("span", { className: "ml-auto truncate max-w-[280px] font-mono text-[11px] text-muted-foreground/70" }, e.message)), n && /* @__PURE__ */ f.createElement("div", { className: "border-t" }, /* @__PURE__ */ f.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" }, u.join("\n")))), l && /* @__PURE__ */ f.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__ */ f.createElement("button", {
|
|
18895
18985
|
onClick: () => this.setState((e) => ({ debugOpen: !e.debugOpen })),
|
|
18896
18986
|
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"
|
|
18897
|
-
}, /* @__PURE__ */ f.createElement(
|
|
18987
|
+
}, /* @__PURE__ */ f.createElement(zg, null), /* @__PURE__ */ f.createElement(Ig, { open: r }), t.debugInformation, /* @__PURE__ */ f.createElement("span", { className: "ml-auto text-[10px] font-normal opacity-60" }, "DEV")), r && /* @__PURE__ */ f.createElement("div", { className: "border-t border-amber-200/60 dark:border-amber-900/40 px-3 py-3 space-y-3" }, /* @__PURE__ */ f.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ f.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, t.context), /* @__PURE__ */ f.createElement("dl", { className: "grid grid-cols-[5rem_1fr] gap-x-2 gap-y-0.5 text-[11px] font-mono" }, /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, "URL"), /* @__PURE__ */ f.createElement("dd", { className: "truncate text-foreground" }, typeof window < "u" ? window.location.href : "-"), /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, t.time), /* @__PURE__ */ f.createElement("dd", { className: "text-foreground" }, (/* @__PURE__ */ new Date()).toISOString()), /* @__PURE__ */ f.createElement("dt", { className: "text-muted-foreground" }, t.agent), /* @__PURE__ */ f.createElement("dd", { className: "truncate text-foreground opacity-70" }, typeof navigator < "u" ? navigator.userAgent : "-"))), d.length > 0 && /* @__PURE__ */ f.createElement("div", { className: "space-y-1" }, /* @__PURE__ */ f.createElement("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-amber-700/70 dark:text-amber-400/70" }, t.componentTree), /* @__PURE__ */ f.createElement("pre", { className: "max-h-36 overflow-y-auto text-[11px] font-mono leading-relaxed text-foreground/80 whitespace-before-wrap" }, d.join("\n"))), /* @__PURE__ */ f.createElement("button", {
|
|
18898
18988
|
onClick: this.copy,
|
|
18899
18989
|
className: "flex items-center gap-1.5 rounded border px-2.5 py-1 text-[11px] font-medium transition-colors hover:bg-accent"
|
|
18900
|
-
}, /* @__PURE__ */ f.createElement(
|
|
18990
|
+
}, /* @__PURE__ */ f.createElement(Lg, null), i ? t.copied : t.copyDebug))), /* @__PURE__ */ f.createElement("div", { className: "flex flex-wrap items-center gap-2" }, /* @__PURE__ */ f.createElement("button", {
|
|
18901
18991
|
onClick: this.reset,
|
|
18902
18992
|
className: "rounded-md border bg-background px-4 py-1.5 text-sm font-medium shadow-sm transition-colors hover:bg-accent"
|
|
18903
18993
|
}, t.tryAgain), /* @__PURE__ */ f.createElement("a", {
|
|
@@ -18907,15 +18997,15 @@ var Mg = () => {
|
|
|
18907
18997
|
onClick: this.sendReport,
|
|
18908
18998
|
disabled: a === "sending" || a === "sent",
|
|
18909
18999
|
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"
|
|
18910
|
-
}, /* @__PURE__ */ f.createElement(
|
|
19000
|
+
}, /* @__PURE__ */ f.createElement(Rg, null), a === "idle" && t.sendReport, a === "sending" && t.sending, a === "sent" && t.reportSent, a === "failed" && t.reportFailed)))));
|
|
18911
19001
|
}
|
|
18912
|
-
},
|
|
19002
|
+
}, Wg = async () => {
|
|
18913
19003
|
window.google?.accounts?.id || (At([{
|
|
18914
19004
|
src: "https://accounts.google.com/gsi/client",
|
|
18915
19005
|
async: !0,
|
|
18916
19006
|
clean: !0
|
|
18917
19007
|
}]), await new Promise((e) => setTimeout(e, 0)));
|
|
18918
|
-
},
|
|
19008
|
+
}, Gg = class {
|
|
18919
19009
|
getConfigurationState() {
|
|
18920
19010
|
return xi("GoogleAuthProvider", bi(eo("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
18921
19011
|
}
|
|
@@ -18938,7 +19028,7 @@ var Mg = () => {
|
|
|
18938
19028
|
async signIn(e = {}) {
|
|
18939
19029
|
let t = eo("oAuth2");
|
|
18940
19030
|
if (!this.isConfigured() || !t?.clientId) throw Error("GoogleAuthProvider: missing google.oAuth2.clientId configuration.");
|
|
18941
|
-
return await
|
|
19031
|
+
return await Wg(), new Promise((n, r) => {
|
|
18942
19032
|
if (!window.google?.accounts?.id) {
|
|
18943
19033
|
r(/* @__PURE__ */ Error("GoogleAuthProvider: Google Identity Services script is not available."));
|
|
18944
19034
|
return;
|
|
@@ -19019,41 +19109,41 @@ var Mg = () => {
|
|
|
19019
19109
|
isAuthenticated() {
|
|
19020
19110
|
return !!this.getUser();
|
|
19021
19111
|
}
|
|
19022
|
-
},
|
|
19112
|
+
}, Kg = g(null), qg = ({ registry: e, defaultKey: t, children: n }) => {
|
|
19023
19113
|
let r = w(() => ({
|
|
19024
19114
|
registry: e,
|
|
19025
19115
|
defaultKey: t
|
|
19026
19116
|
}), [e, t]);
|
|
19027
|
-
return /* @__PURE__ */ f.createElement(
|
|
19028
|
-
},
|
|
19029
|
-
let t = y(
|
|
19117
|
+
return /* @__PURE__ */ f.createElement(Kg.Provider, { value: r }, n);
|
|
19118
|
+
}, Jg = (e) => {
|
|
19119
|
+
let t = y(Kg);
|
|
19030
19120
|
if (!t) return null;
|
|
19031
19121
|
let n = e ?? t.defaultKey;
|
|
19032
19122
|
return t.registry[n] ?? null;
|
|
19033
|
-
},
|
|
19123
|
+
}, Yg = g(null), Xg = ({ registry: e, defaultKey: t, children: n }) => {
|
|
19034
19124
|
let r = w(() => ({
|
|
19035
19125
|
registry: e,
|
|
19036
19126
|
defaultKey: t
|
|
19037
19127
|
}), [e, t]);
|
|
19038
|
-
return /* @__PURE__ */ f.createElement(
|
|
19039
|
-
},
|
|
19040
|
-
let t = y(
|
|
19128
|
+
return /* @__PURE__ */ f.createElement(Yg.Provider, { value: r }, n);
|
|
19129
|
+
}, Zg = (e) => {
|
|
19130
|
+
let t = y(Yg);
|
|
19041
19131
|
if (!t) throw Error("useCredentialsProvider must be used inside <App providers={...} />.");
|
|
19042
19132
|
let n = e ?? t.defaultKey, r = t.registry[n];
|
|
19043
19133
|
if (!r) throw Error(`CredentialsProvider '${n}' is not registered. Available: ${Object.keys(t.registry).join(", ")}`);
|
|
19044
19134
|
return r;
|
|
19045
|
-
},
|
|
19135
|
+
}, Qg = {
|
|
19046
19136
|
key: "@key",
|
|
19047
19137
|
value: "@value"
|
|
19048
|
-
},
|
|
19138
|
+
}, $g = () => Je(), e_ = (e, t, n) => {
|
|
19049
19139
|
let r = `Error during ${e}: ${String(t)}`;
|
|
19050
19140
|
if (n) throw Error(r);
|
|
19051
19141
|
console.error(r);
|
|
19052
|
-
},
|
|
19142
|
+
}, t_ = (e, t) => {
|
|
19053
19143
|
if (!e || !(t in e)) return e;
|
|
19054
19144
|
let { [t]: n, ...r } = e;
|
|
19055
19145
|
return Object.keys(r).length ? r : void 0;
|
|
19056
|
-
},
|
|
19146
|
+
}, n_ = (e) => {
|
|
19057
19147
|
let t = typeof e == "object" && e && !Array.isArray(e) ? e : Array.isArray(e) ? { in: e } : { eq: e }, n;
|
|
19058
19148
|
return t.gt !== void 0 && (n = {
|
|
19059
19149
|
...n,
|
|
@@ -19071,28 +19161,28 @@ var Mg = () => {
|
|
|
19071
19161
|
condition: t,
|
|
19072
19162
|
clientCondition: n
|
|
19073
19163
|
};
|
|
19074
|
-
},
|
|
19164
|
+
}, r_ = (e, t) => {
|
|
19075
19165
|
switch (t) {
|
|
19076
|
-
case
|
|
19077
|
-
case
|
|
19166
|
+
case Qg.key: return $e(e, Ze());
|
|
19167
|
+
case Qg.value: return $e(e, Qe());
|
|
19078
19168
|
default: return $e(e, Xe(t));
|
|
19079
19169
|
}
|
|
19080
|
-
},
|
|
19170
|
+
}, i_ = (e, t, n) => {
|
|
19081
19171
|
let [r] = Object.entries(t || {});
|
|
19082
19172
|
if (!r) return {
|
|
19083
19173
|
dbRef: e,
|
|
19084
19174
|
clientWhere: n
|
|
19085
19175
|
};
|
|
19086
|
-
let [i] = r, a =
|
|
19176
|
+
let [i] = r, a = r_(e, i), o = n?.[i];
|
|
19087
19177
|
if (o == null) return {
|
|
19088
19178
|
dbRef: a,
|
|
19089
19179
|
clientWhere: n
|
|
19090
19180
|
};
|
|
19091
|
-
let { condition: s, clientCondition: c } =
|
|
19181
|
+
let { condition: s, clientCondition: c } = n_(o);
|
|
19092
19182
|
switch (!0) {
|
|
19093
19183
|
case s.eq !== void 0: return {
|
|
19094
19184
|
dbRef: $e(a, Ke(s.eq)),
|
|
19095
|
-
clientWhere:
|
|
19185
|
+
clientWhere: t_(n, i)
|
|
19096
19186
|
};
|
|
19097
19187
|
case s.gte !== void 0 && s.lte !== void 0:
|
|
19098
19188
|
a = $e(a, rt(s.gte), Ge(s.lte));
|
|
@@ -19120,11 +19210,11 @@ var Mg = () => {
|
|
|
19120
19210
|
return {
|
|
19121
19211
|
dbRef: a,
|
|
19122
19212
|
clientWhere: c ? {
|
|
19123
|
-
|
|
19213
|
+
...t_(n, i) || {},
|
|
19124
19214
|
[i]: c
|
|
19125
|
-
} :
|
|
19215
|
+
} : t_(n, i)
|
|
19126
19216
|
};
|
|
19127
|
-
},
|
|
19217
|
+
}, a_ = (e, t) => {
|
|
19128
19218
|
if (!t) return e;
|
|
19129
19219
|
let n = t.split("."), r = e;
|
|
19130
19220
|
for (let e of n) {
|
|
@@ -19132,10 +19222,10 @@ var Mg = () => {
|
|
|
19132
19222
|
r = r[e];
|
|
19133
19223
|
}
|
|
19134
19224
|
return r;
|
|
19135
|
-
},
|
|
19225
|
+
}, o_ = (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, {
|
|
19136
19226
|
numeric: !0,
|
|
19137
19227
|
sensitivity: "base"
|
|
19138
|
-
}),
|
|
19228
|
+
}), s_ = (e, t) => {
|
|
19139
19229
|
let n = typeof t == "object" && t && !Array.isArray(t) ? t : { eq: t };
|
|
19140
19230
|
for (let [t, r] of Object.entries(n)) switch (t) {
|
|
19141
19231
|
case "eq":
|
|
@@ -19162,23 +19252,23 @@ var Mg = () => {
|
|
|
19162
19252
|
default: return !1;
|
|
19163
19253
|
}
|
|
19164
19254
|
return !0;
|
|
19165
|
-
},
|
|
19255
|
+
}, c_ = (e, t, n) => {
|
|
19166
19256
|
let [r, ...i] = Object.entries(n || {}), a = Object.entries(t || {}), o = Object.entries(e);
|
|
19167
|
-
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => a_(
|
|
19257
|
+
if (a.length && (o = o.filter(([, e]) => a.every(([t, n]) => s_(a_(e, t), n)))), r) {
|
|
19168
19258
|
let e = [r, ...i];
|
|
19169
19259
|
o.sort((t, n) => {
|
|
19170
19260
|
for (let [r, i] of e) {
|
|
19171
|
-
let e =
|
|
19261
|
+
let e = o_(a_(t[1], r), a_(n[1], r));
|
|
19172
19262
|
if (e) return i === "desc" ? -e : e;
|
|
19173
19263
|
}
|
|
19174
19264
|
return 0;
|
|
19175
19265
|
});
|
|
19176
19266
|
}
|
|
19177
19267
|
return Object.fromEntries(o);
|
|
19178
|
-
},
|
|
19179
|
-
let t = await so()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, et(
|
|
19268
|
+
}, l_ = async (e) => {
|
|
19269
|
+
let t = await so()?.currentUser?.getIdToken().catch(() => void 0), n = new URL(`${e}.json`, et($g()).toString());
|
|
19180
19270
|
return n.searchParams.set("shallow", "true"), t && n.searchParams.set("auth", t), n.toString();
|
|
19181
|
-
},
|
|
19271
|
+
}, u_ = class e {
|
|
19182
19272
|
static listenerRegistered = !1;
|
|
19183
19273
|
constructor() {
|
|
19184
19274
|
!e.listenerRegistered && typeof Xa == "function" && (e.listenerRegistered = !0, Xa((e) => {
|
|
@@ -19193,44 +19283,44 @@ var Mg = () => {
|
|
|
19193
19283
|
}
|
|
19194
19284
|
readShallow = async (e, t = !1) => {
|
|
19195
19285
|
try {
|
|
19196
|
-
let t = await
|
|
19286
|
+
let t = await l_(e), n = await fetch(t);
|
|
19197
19287
|
if (!n.ok) throw Error(`${n.status} ${n.statusText}`);
|
|
19198
19288
|
let r = await n.json();
|
|
19199
19289
|
return r ? Object.keys(r) : [];
|
|
19200
19290
|
} catch (n) {
|
|
19201
|
-
return
|
|
19291
|
+
return e_(`reading SHALLOW data in Firebase for ${e}`, n, t), [];
|
|
19202
19292
|
}
|
|
19203
19293
|
};
|
|
19204
19294
|
read = async (e, { where: t, order: n, toArray: r = !1, exception: i = !1 } = {}) => {
|
|
19205
|
-
let { dbRef: a, clientWhere: o } =
|
|
19295
|
+
let { dbRef: a, clientWhere: o } = i_(et($g(), e), n, t);
|
|
19206
19296
|
try {
|
|
19207
19297
|
let t = await qe(a);
|
|
19208
19298
|
if (t.exists()) {
|
|
19209
19299
|
`${e}`;
|
|
19210
|
-
let i =
|
|
19300
|
+
let i = c_(t.val(), o, n);
|
|
19211
19301
|
return r ? Object.values(i) : i;
|
|
19212
19302
|
}
|
|
19213
|
-
i &&
|
|
19303
|
+
i && e_(`Data not found in Firebase for path ${e}`, null, i);
|
|
19214
19304
|
} catch (t) {
|
|
19215
|
-
|
|
19305
|
+
e_(`reading data in Firebase for ${e}`, t, i);
|
|
19216
19306
|
}
|
|
19217
19307
|
};
|
|
19218
19308
|
update = async (e, t, n = !1) => {
|
|
19219
19309
|
try {
|
|
19220
|
-
await it(et(
|
|
19310
|
+
await it(et($g(), e), t), `${e}`;
|
|
19221
19311
|
} catch (t) {
|
|
19222
|
-
|
|
19312
|
+
e_(`updating data in Firebase for ${e}`, t, n);
|
|
19223
19313
|
}
|
|
19224
19314
|
};
|
|
19225
19315
|
set = async (e, t, n = !1) => {
|
|
19226
19316
|
try {
|
|
19227
|
-
await nt(et(
|
|
19317
|
+
await nt(et($g(), e), t), `${e}`;
|
|
19228
19318
|
} catch (t) {
|
|
19229
|
-
|
|
19319
|
+
e_(`updating data in Firebase for ${e}`, t, n);
|
|
19230
19320
|
}
|
|
19231
19321
|
};
|
|
19232
19322
|
setChunks = async (e, t, { chunkSize: n = 1e3, purge: r = !1, onProgress: i } = {}) => {
|
|
19233
|
-
let a =
|
|
19323
|
+
let a = $g(), o = et(a, e);
|
|
19234
19324
|
try {
|
|
19235
19325
|
r && (await tt(o), i?.(0, 0, `Purging existing data at ${e}`));
|
|
19236
19326
|
let a = Object.entries(Gt(t)), s = Math.ceil(a.length / n);
|
|
@@ -19241,14 +19331,14 @@ var Mg = () => {
|
|
|
19241
19331
|
i?.(r, s, `Saving chunk ${r}/${s}`);
|
|
19242
19332
|
}
|
|
19243
19333
|
} catch (t) {
|
|
19244
|
-
|
|
19334
|
+
e_(`setting data in chunks in Firebase for ${e}`, t, !1);
|
|
19245
19335
|
}
|
|
19246
19336
|
};
|
|
19247
19337
|
remove = async (e, t = !1) => {
|
|
19248
19338
|
try {
|
|
19249
|
-
await tt(et(
|
|
19339
|
+
await tt(et($g(), e)), `${e}`;
|
|
19250
19340
|
} catch (n) {
|
|
19251
|
-
|
|
19341
|
+
e_(`removing data from Firebase for ${e}`, n, t);
|
|
19252
19342
|
}
|
|
19253
19343
|
};
|
|
19254
19344
|
count = async (e) => (await this.readShallow(e)).length;
|
|
@@ -19256,14 +19346,14 @@ var Mg = () => {
|
|
|
19256
19346
|
let o = so();
|
|
19257
19347
|
if (!o || !e) return () => void 0;
|
|
19258
19348
|
let s = () => {
|
|
19259
|
-
let { dbRef: o, clientWhere: s } =
|
|
19349
|
+
let { dbRef: o, clientWhere: s } = i_(et($g(), e), r, n);
|
|
19260
19350
|
return Ye(o, (e) => {
|
|
19261
19351
|
let n = e.val();
|
|
19262
19352
|
if (!n) {
|
|
19263
19353
|
t([]);
|
|
19264
19354
|
return;
|
|
19265
19355
|
}
|
|
19266
|
-
let o = a ? a(
|
|
19356
|
+
let o = a ? a(c_(n, s, r)) : c_(n, s, r), c = Object.entries(o);
|
|
19267
19357
|
if (!i) {
|
|
19268
19358
|
t(c.map(([e, t], n) => typeof t == "object" && t ? {
|
|
19269
19359
|
_index: n,
|
|
@@ -19272,22 +19362,22 @@ var Mg = () => {
|
|
|
19272
19362
|
} : {
|
|
19273
19363
|
_index: n,
|
|
19274
19364
|
[fo]: e,
|
|
19275
|
-
[
|
|
19365
|
+
[Qg.value]: t
|
|
19276
19366
|
}));
|
|
19277
19367
|
return;
|
|
19278
19368
|
}
|
|
19279
19369
|
let l = Object.keys(i);
|
|
19280
19370
|
t(c.map(([e, t], n) => {
|
|
19281
19371
|
let r = typeof t == "object" && t ? {
|
|
19282
|
-
[
|
|
19372
|
+
[Qg.key]: e,
|
|
19283
19373
|
...t
|
|
19284
19374
|
} : {
|
|
19285
|
-
[
|
|
19286
|
-
[
|
|
19375
|
+
[Qg.key]: e,
|
|
19376
|
+
[Qg.value]: t
|
|
19287
19377
|
}, a = {};
|
|
19288
19378
|
for (let n of l) {
|
|
19289
19379
|
let o = i[n];
|
|
19290
|
-
a[n] = o.includes("{") ? ft.parse(r, o) : o ===
|
|
19380
|
+
a[n] = o.includes("{") ? ft.parse(r, o) : o === Qg.key ? e : o === Qg.value ? t : r[o];
|
|
19291
19381
|
}
|
|
19292
19382
|
return {
|
|
19293
19383
|
[fo]: e,
|
|
@@ -19304,10 +19394,10 @@ var Mg = () => {
|
|
|
19304
19394
|
};
|
|
19305
19395
|
};
|
|
19306
19396
|
};
|
|
19307
|
-
new
|
|
19397
|
+
new u_();
|
|
19308
19398
|
//#endregion
|
|
19309
19399
|
//#region src/providers/auth/firebase/FirebaseAuthProvider.ts
|
|
19310
|
-
var
|
|
19400
|
+
var d_ = {
|
|
19311
19401
|
github: "github.com",
|
|
19312
19402
|
apple: "apple.com",
|
|
19313
19403
|
microsoft: "microsoft.com",
|
|
@@ -19315,11 +19405,11 @@ var l_ = {
|
|
|
19315
19405
|
twitter: "twitter.com",
|
|
19316
19406
|
facebook: "facebook.com"
|
|
19317
19407
|
};
|
|
19318
|
-
function
|
|
19319
|
-
let t =
|
|
19408
|
+
function f_(e) {
|
|
19409
|
+
let t = d_[e] ?? e;
|
|
19320
19410
|
return new G(t);
|
|
19321
19411
|
}
|
|
19322
|
-
function
|
|
19412
|
+
function p_(e) {
|
|
19323
19413
|
return e ? {
|
|
19324
19414
|
uid: e.uid,
|
|
19325
19415
|
email: e.email ?? void 0,
|
|
@@ -19328,7 +19418,7 @@ function d_(e) {
|
|
|
19328
19418
|
isAnonymous: e.isAnonymous
|
|
19329
19419
|
} : null;
|
|
19330
19420
|
}
|
|
19331
|
-
var
|
|
19421
|
+
var m_ = class {
|
|
19332
19422
|
options;
|
|
19333
19423
|
appName;
|
|
19334
19424
|
initPromise;
|
|
@@ -19342,7 +19432,7 @@ var f_ = class {
|
|
|
19342
19432
|
return this.getConfigurationState().configured;
|
|
19343
19433
|
}
|
|
19344
19434
|
getUser() {
|
|
19345
|
-
return
|
|
19435
|
+
return p_(so(this.appName)?.currentUser ?? null);
|
|
19346
19436
|
}
|
|
19347
19437
|
isAuthenticated() {
|
|
19348
19438
|
return !!this.getUser();
|
|
@@ -19354,18 +19444,18 @@ var f_ = class {
|
|
|
19354
19444
|
let n = e.method ?? "password";
|
|
19355
19445
|
if (n === "anonymous") {
|
|
19356
19446
|
let { user: e } = await ue(t);
|
|
19357
|
-
return
|
|
19447
|
+
return p_(e);
|
|
19358
19448
|
}
|
|
19359
19449
|
if (n === "oauth") {
|
|
19360
19450
|
let { provider: n } = e;
|
|
19361
19451
|
if (!n) throw Error("FirebaseAuthProvider.signIn: provider is required for oauth");
|
|
19362
|
-
let { user: r } = await me(t,
|
|
19363
|
-
return
|
|
19452
|
+
let { user: r } = await me(t, f_(n));
|
|
19453
|
+
return p_(r);
|
|
19364
19454
|
}
|
|
19365
19455
|
let { email: r, password: i } = e;
|
|
19366
19456
|
if (!r || !i) throw Error("FirebaseAuthProvider.signIn: email and password are required");
|
|
19367
19457
|
let { user: a } = await pe(t, r, i);
|
|
19368
|
-
return
|
|
19458
|
+
return p_(a);
|
|
19369
19459
|
}
|
|
19370
19460
|
async signOut() {
|
|
19371
19461
|
await this.initPromise;
|
|
@@ -19376,7 +19466,7 @@ var f_ = class {
|
|
|
19376
19466
|
onAuthChange(e) {
|
|
19377
19467
|
if (!this.options.config) {
|
|
19378
19468
|
let t = so(this.appName);
|
|
19379
|
-
return t ? se(t, (t) => e(
|
|
19469
|
+
return t ? se(t, (t) => e(p_(t))) : (e(null), () => {});
|
|
19380
19470
|
}
|
|
19381
19471
|
let t = () => {}, n = !1;
|
|
19382
19472
|
return this.initPromise.then(() => {
|
|
@@ -19386,7 +19476,7 @@ var f_ = class {
|
|
|
19386
19476
|
e(null);
|
|
19387
19477
|
return;
|
|
19388
19478
|
}
|
|
19389
|
-
t = se(r, (t) => e(
|
|
19479
|
+
t = se(r, (t) => e(p_(t)));
|
|
19390
19480
|
}), () => {
|
|
19391
19481
|
n = !0, t();
|
|
19392
19482
|
};
|
|
@@ -19404,26 +19494,26 @@ var f_ = class {
|
|
|
19404
19494
|
let { claims: n } = await t.currentUser.getIdTokenResult(e);
|
|
19405
19495
|
return n;
|
|
19406
19496
|
}
|
|
19407
|
-
},
|
|
19408
|
-
function
|
|
19497
|
+
}, h_ = "https://oauth2.googleapis.com/token";
|
|
19498
|
+
function g_(e) {
|
|
19409
19499
|
let t = e.replace(/-----BEGIN PRIVATE KEY-----/, "").replace(/-----END PRIVATE KEY-----/, "").replace(/\s+/g, ""), n = atob(t), r = new Uint8Array(n.length);
|
|
19410
19500
|
for (let e = 0; e < n.length; e++) r[e] = n.charCodeAt(e);
|
|
19411
19501
|
return r.buffer;
|
|
19412
19502
|
}
|
|
19413
|
-
function
|
|
19503
|
+
function __(e) {
|
|
19414
19504
|
return btoa(typeof e == "string" ? e : String.fromCharCode(...new Uint8Array(e))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
19415
19505
|
}
|
|
19416
|
-
async function
|
|
19417
|
-
let n = `${
|
|
19506
|
+
async function v_(e, t) {
|
|
19507
|
+
let n = `${__(JSON.stringify({
|
|
19418
19508
|
alg: "RS256",
|
|
19419
19509
|
typ: "JWT"
|
|
19420
|
-
}))}.${
|
|
19510
|
+
}))}.${__(JSON.stringify(e))}`, r = await crypto.subtle.importKey("pkcs8", g_(t), {
|
|
19421
19511
|
name: "RSASSA-PKCS1-v1_5",
|
|
19422
19512
|
hash: "SHA-256"
|
|
19423
19513
|
}, !1, ["sign"]);
|
|
19424
|
-
return `${n}.${
|
|
19514
|
+
return `${n}.${__(await crypto.subtle.sign("RSASSA-PKCS1-v1_5", r, new TextEncoder().encode(n)))}`;
|
|
19425
19515
|
}
|
|
19426
|
-
var
|
|
19516
|
+
var y_ = class {
|
|
19427
19517
|
config;
|
|
19428
19518
|
cache = /* @__PURE__ */ new Map();
|
|
19429
19519
|
constructor(e) {
|
|
@@ -19432,13 +19522,13 @@ var __ = class {
|
|
|
19432
19522
|
async getToken(e = "https://www.googleapis.com/auth/cloud-platform") {
|
|
19433
19523
|
let t = this.cache.get(e);
|
|
19434
19524
|
if (t && t.expiresAt > Date.now() + 6e4) return t.token;
|
|
19435
|
-
let n = Math.floor(Date.now() / 1e3), r = await
|
|
19525
|
+
let n = Math.floor(Date.now() / 1e3), r = await v_({
|
|
19436
19526
|
iss: this.config.client_email,
|
|
19437
19527
|
scope: e,
|
|
19438
|
-
aud:
|
|
19528
|
+
aud: h_,
|
|
19439
19529
|
iat: n,
|
|
19440
19530
|
exp: n + 3600
|
|
19441
|
-
}, this.config.private_key), i = await fetch(
|
|
19531
|
+
}, this.config.private_key), i = await fetch(h_, {
|
|
19442
19532
|
method: "POST",
|
|
19443
19533
|
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
19444
19534
|
body: new URLSearchParams({
|
|
@@ -19456,7 +19546,7 @@ var __ = class {
|
|
|
19456
19546
|
expiresAt: Date.now() + (a.expires_in ?? 3600) * 1e3
|
|
19457
19547
|
}), a.access_token;
|
|
19458
19548
|
}
|
|
19459
|
-
},
|
|
19549
|
+
}, b_ = "www.dropbox.com/oauth2", x_ = class {
|
|
19460
19550
|
config;
|
|
19461
19551
|
constructor(e) {
|
|
19462
19552
|
this.config = e;
|
|
@@ -19480,7 +19570,7 @@ var __ = class {
|
|
|
19480
19570
|
async signIn(e = {}) {
|
|
19481
19571
|
if (!this.isConfigured()) throw Error("DropboxAuthProvider: missing dropbox.clientId configuration.");
|
|
19482
19572
|
return Oi({
|
|
19483
|
-
authServer:
|
|
19573
|
+
authServer: b_,
|
|
19484
19574
|
clientID: this.config.clientId,
|
|
19485
19575
|
scopes: e.scopes,
|
|
19486
19576
|
refreshParamName: "token_access_type"
|
|
@@ -19501,14 +19591,14 @@ var __ = class {
|
|
|
19501
19591
|
isAuthenticated() {
|
|
19502
19592
|
return this.isConfigured() ? !!Ni(this.config.clientId)?.access_token : !1;
|
|
19503
19593
|
}
|
|
19504
|
-
},
|
|
19594
|
+
}, S_ = (e) => ({
|
|
19505
19595
|
uid: e.login,
|
|
19506
19596
|
displayName: e.name || e.login,
|
|
19507
19597
|
...e.email ? { email: e.email } : {},
|
|
19508
19598
|
...e.avatarUrl ? { photoURL: e.avatarUrl } : {},
|
|
19509
19599
|
provider: "github",
|
|
19510
19600
|
login: e.login
|
|
19511
|
-
}),
|
|
19601
|
+
}), C_ = class {
|
|
19512
19602
|
config;
|
|
19513
19603
|
user = null;
|
|
19514
19604
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -19535,7 +19625,7 @@ var __ = class {
|
|
|
19535
19625
|
return this.loading ??= fetch(`${this.base}/me`, {
|
|
19536
19626
|
credentials: "include",
|
|
19537
19627
|
headers: { Accept: "application/json" }
|
|
19538
|
-
}).then(async (e) => e.ok ?
|
|
19628
|
+
}).then(async (e) => e.ok ? S_(await e.json()) : null).catch(() => null).then((e) => (this.setUser(e), e)).finally(() => {
|
|
19539
19629
|
this.loading = null;
|
|
19540
19630
|
}), this.loading;
|
|
19541
19631
|
}
|
|
@@ -19559,7 +19649,7 @@ var __ = class {
|
|
|
19559
19649
|
let t = (e?.uid ?? null) !== (this.user?.uid ?? null);
|
|
19560
19650
|
this.user = e, t && this.listeners.forEach((t) => t(e));
|
|
19561
19651
|
}
|
|
19562
|
-
},
|
|
19652
|
+
}, w_ = (e) => {
|
|
19563
19653
|
let t = eo("oAuth2");
|
|
19564
19654
|
if (!t) return console.warn("GoogleAuth: Missing oAuth2.clientId in configuration"), Promise.reject("Google client ID not found");
|
|
19565
19655
|
let n = e.join(" "), r = `googleAccessToken::${n}`, i = `googleExpiresAt::${n}`;
|
|
@@ -19576,8 +19666,8 @@ var __ = class {
|
|
|
19576
19666
|
};
|
|
19577
19667
|
//#endregion
|
|
19578
19668
|
//#region src/providers/email/google/email.ts
|
|
19579
|
-
async function
|
|
19580
|
-
let i = await
|
|
19669
|
+
async function T_({ to: e, bcc: t, subject: n, message: r }) {
|
|
19670
|
+
let i = await w_(["https://www.googleapis.com/auth/gmail.send"]), a = [`To: ${e.join(", ")}`];
|
|
19581
19671
|
t && t.length && a.push(`Bcc: ${t.join(", ")}`);
|
|
19582
19672
|
let o = [
|
|
19583
19673
|
...a,
|
|
@@ -19602,7 +19692,7 @@ async function C_({ to: e, bcc: t, subject: n, message: r }) {
|
|
|
19602
19692
|
}
|
|
19603
19693
|
//#endregion
|
|
19604
19694
|
//#region src/providers/email/google/GmailEmailProvider.ts
|
|
19605
|
-
var
|
|
19695
|
+
var E_ = class {
|
|
19606
19696
|
getConfigurationState() {
|
|
19607
19697
|
return xi("GmailEmailProvider", bi(eo("oAuth2"), ["clientId"], "google.oAuth2."));
|
|
19608
19698
|
}
|
|
@@ -19611,7 +19701,7 @@ var w_ = class {
|
|
|
19611
19701
|
}
|
|
19612
19702
|
async send(e) {
|
|
19613
19703
|
if (!this.isConfigured()) throw Error(this.getConfigurationState().reason || "GmailEmailProvider is not configured.");
|
|
19614
|
-
await
|
|
19704
|
+
await T_({
|
|
19615
19705
|
to: Array.isArray(e.to) ? e.to : [e.to],
|
|
19616
19706
|
bcc: e.bcc ? Array.isArray(e.bcc) ? e.bcc : [e.bcc] : void 0,
|
|
19617
19707
|
subject: e.subject,
|
|
@@ -19621,7 +19711,7 @@ var w_ = class {
|
|
|
19621
19711
|
};
|
|
19622
19712
|
//#endregion
|
|
19623
19713
|
//#region src/providers/auth/supabase/SupabaseAuthProvider.ts
|
|
19624
|
-
function
|
|
19714
|
+
function D_(e) {
|
|
19625
19715
|
return e ? {
|
|
19626
19716
|
uid: e.id,
|
|
19627
19717
|
email: e.email ?? void 0,
|
|
@@ -19630,7 +19720,7 @@ function T_(e) {
|
|
|
19630
19720
|
raw: e
|
|
19631
19721
|
} : null;
|
|
19632
19722
|
}
|
|
19633
|
-
var
|
|
19723
|
+
var O_ = class {
|
|
19634
19724
|
config;
|
|
19635
19725
|
get client() {
|
|
19636
19726
|
return wo(this.config.url, this.config.anonKey);
|
|
@@ -19645,7 +19735,7 @@ var E_ = class {
|
|
|
19645
19735
|
return this.getConfigurationState().configured;
|
|
19646
19736
|
}
|
|
19647
19737
|
getUser() {
|
|
19648
|
-
return
|
|
19738
|
+
return D_((this.client.auth?._session ?? null)?.user ?? null);
|
|
19649
19739
|
}
|
|
19650
19740
|
isAuthenticated() {
|
|
19651
19741
|
return !!this.getUser();
|
|
@@ -19655,7 +19745,7 @@ var E_ = class {
|
|
|
19655
19745
|
if (t === "anonymous") {
|
|
19656
19746
|
let { data: e, error: t } = await this.client.auth.signInAnonymously();
|
|
19657
19747
|
if (t) throw t;
|
|
19658
|
-
return
|
|
19748
|
+
return D_(e.user);
|
|
19659
19749
|
}
|
|
19660
19750
|
if (t === "magic_link") {
|
|
19661
19751
|
let t = e.email;
|
|
@@ -19684,7 +19774,7 @@ var E_ = class {
|
|
|
19684
19774
|
password: r
|
|
19685
19775
|
});
|
|
19686
19776
|
if (a) throw a;
|
|
19687
|
-
return
|
|
19777
|
+
return D_(i.user);
|
|
19688
19778
|
}
|
|
19689
19779
|
async signOut() {
|
|
19690
19780
|
let { error: e } = await this.client.auth.signOut();
|
|
@@ -19692,10 +19782,10 @@ var E_ = class {
|
|
|
19692
19782
|
}
|
|
19693
19783
|
onAuthChange(e) {
|
|
19694
19784
|
this.client.auth.getSession().then(({ data: t }) => {
|
|
19695
|
-
e(
|
|
19785
|
+
e(D_(t.session?.user ?? null));
|
|
19696
19786
|
});
|
|
19697
19787
|
let { data: { subscription: t } } = this.client.auth.onAuthStateChange((t, n) => {
|
|
19698
|
-
e(
|
|
19788
|
+
e(D_(n?.user ?? null));
|
|
19699
19789
|
});
|
|
19700
19790
|
return () => t.unsubscribe();
|
|
19701
19791
|
}
|
|
@@ -19706,15 +19796,15 @@ var E_ = class {
|
|
|
19706
19796
|
if (!n) throw Error("SupabaseAuthProvider: no active session");
|
|
19707
19797
|
return n;
|
|
19708
19798
|
}
|
|
19709
|
-
},
|
|
19710
|
-
function
|
|
19799
|
+
}, k_ = "https://api.anthropic.com/v1/models", A_ = "https://api.anthropic.com/v1/messages";
|
|
19800
|
+
function j_(e) {
|
|
19711
19801
|
return {
|
|
19712
19802
|
name: e.name,
|
|
19713
19803
|
description: e.description,
|
|
19714
19804
|
input_schema: e.inputSchema
|
|
19715
19805
|
};
|
|
19716
19806
|
}
|
|
19717
|
-
function
|
|
19807
|
+
function M_(e) {
|
|
19718
19808
|
if (e.role === "user") return {
|
|
19719
19809
|
role: "user",
|
|
19720
19810
|
content: e.content
|
|
@@ -19746,7 +19836,7 @@ function A_(e) {
|
|
|
19746
19836
|
}))
|
|
19747
19837
|
};
|
|
19748
19838
|
}
|
|
19749
|
-
function
|
|
19839
|
+
function N_(e) {
|
|
19750
19840
|
let t = e?.content;
|
|
19751
19841
|
if (!Array.isArray(t)) return null;
|
|
19752
19842
|
let n = t.filter((e) => e?.type === "text").map((e) => String(e.text ?? "")), r = t.filter((e) => e?.type === "tool_use");
|
|
@@ -19765,7 +19855,7 @@ function j_(e) {
|
|
|
19765
19855
|
text: i
|
|
19766
19856
|
} : null;
|
|
19767
19857
|
}
|
|
19768
|
-
var
|
|
19858
|
+
var P_ = {
|
|
19769
19859
|
id: "anthropic",
|
|
19770
19860
|
label: "Anthropic",
|
|
19771
19861
|
description: "Claude models via the Anthropic API.",
|
|
@@ -19789,7 +19879,7 @@ var M_ = {
|
|
|
19789
19879
|
supportsDocuments: !0
|
|
19790
19880
|
},
|
|
19791
19881
|
discoverModels: async (e) => {
|
|
19792
|
-
let t = await nn(
|
|
19882
|
+
let t = await nn(k_, { headers: {
|
|
19793
19883
|
"x-api-key": e,
|
|
19794
19884
|
"anthropic-version": "2023-06-01"
|
|
19795
19885
|
} }, Fu);
|
|
@@ -19817,7 +19907,7 @@ var M_ = {
|
|
|
19817
19907
|
type: "text",
|
|
19818
19908
|
text: t.prompt
|
|
19819
19909
|
}] : t.prompt;
|
|
19820
|
-
return
|
|
19910
|
+
return N_(await nn(A_, {
|
|
19821
19911
|
method: "POST",
|
|
19822
19912
|
headers: {
|
|
19823
19913
|
"x-api-key": e,
|
|
@@ -19828,19 +19918,19 @@ var M_ = {
|
|
|
19828
19918
|
model: t.model,
|
|
19829
19919
|
max_tokens: 4096,
|
|
19830
19920
|
...t.role ? { system: xu.parseRole(t.role, t) } : {},
|
|
19831
|
-
messages: [...(t.history ?? []).map(
|
|
19921
|
+
messages: [...(t.history ?? []).map(M_), ...t.prompt ? [{
|
|
19832
19922
|
role: "user",
|
|
19833
19923
|
content: r
|
|
19834
19924
|
}] : []],
|
|
19835
|
-
...t.tools?.length ? { tools: t.tools.map(
|
|
19925
|
+
...t.tools?.length ? { tools: t.tools.map(j_) } : {},
|
|
19836
19926
|
...typeof t.temperature == "number" ? { temperature: t.temperature } : {},
|
|
19837
19927
|
...Hu(t.model, t.reasoning)
|
|
19838
19928
|
},
|
|
19839
19929
|
signal: t.signal
|
|
19840
19930
|
}, Fu));
|
|
19841
19931
|
}
|
|
19842
|
-
},
|
|
19843
|
-
function
|
|
19932
|
+
}, F_ = (e) => typeof e.id == "string" ? e.id : void 0, I_ = (e) => e.replace(/\/+$/, "");
|
|
19933
|
+
function L_(e) {
|
|
19844
19934
|
return {
|
|
19845
19935
|
type: "function",
|
|
19846
19936
|
function: {
|
|
@@ -19850,7 +19940,7 @@ function F_(e) {
|
|
|
19850
19940
|
}
|
|
19851
19941
|
};
|
|
19852
19942
|
}
|
|
19853
|
-
function
|
|
19943
|
+
function R_(e) {
|
|
19854
19944
|
if (typeof e != "string") return {};
|
|
19855
19945
|
try {
|
|
19856
19946
|
return JSON.parse(e);
|
|
@@ -19858,7 +19948,7 @@ function I_(e) {
|
|
|
19858
19948
|
return {};
|
|
19859
19949
|
}
|
|
19860
19950
|
}
|
|
19861
|
-
function
|
|
19951
|
+
function z_(e) {
|
|
19862
19952
|
return e.role === "user" ? [{
|
|
19863
19953
|
role: "user",
|
|
19864
19954
|
content: e.content
|
|
@@ -19879,7 +19969,7 @@ function L_(e) {
|
|
|
19879
19969
|
content: typeof e.output == "string" ? e.output : JSON.stringify(e.output)
|
|
19880
19970
|
}));
|
|
19881
19971
|
}
|
|
19882
|
-
function
|
|
19972
|
+
function B_(e) {
|
|
19883
19973
|
let t = e?.choices?.[0]?.message;
|
|
19884
19974
|
if (!t) return null;
|
|
19885
19975
|
let n = Array.isArray(t.tool_calls) ? t.tool_calls : [];
|
|
@@ -19892,7 +19982,7 @@ function R_(e) {
|
|
|
19892
19982
|
return {
|
|
19893
19983
|
id: String(e.id),
|
|
19894
19984
|
name: String(t.name ?? ""),
|
|
19895
|
-
input:
|
|
19985
|
+
input: R_(t.arguments)
|
|
19896
19986
|
};
|
|
19897
19987
|
}),
|
|
19898
19988
|
text: e || void 0
|
|
@@ -19904,8 +19994,8 @@ function R_(e) {
|
|
|
19904
19994
|
text: r
|
|
19905
19995
|
} : null;
|
|
19906
19996
|
}
|
|
19907
|
-
var
|
|
19908
|
-
let g =
|
|
19997
|
+
var V_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i, defaultModel: a, fallbackModels: o, baseUrl: s, modelsUrl: c, chatCompletionsUrl: l, dashboardUrl: u, credentialsHint: f, validateApiKey: p, mapModelEntry: m = F_, reasoningStyle: h }) => {
|
|
19998
|
+
let g = I_(s), _ = c || `${g}/models`, v = l || `${g}/chat/completions`;
|
|
19909
19999
|
return {
|
|
19910
20000
|
id: e,
|
|
19911
20001
|
label: t,
|
|
@@ -19982,23 +20072,23 @@ var z_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
|
|
|
19982
20072
|
role: "system",
|
|
19983
20073
|
content: xu.parseRole(n.role, n)
|
|
19984
20074
|
}] : [],
|
|
19985
|
-
...(n.history ?? []).flatMap(
|
|
20075
|
+
...(n.history ?? []).flatMap(z_),
|
|
19986
20076
|
...n.prompt ? [{
|
|
19987
20077
|
role: "user",
|
|
19988
20078
|
content: i
|
|
19989
20079
|
}] : []
|
|
19990
20080
|
],
|
|
19991
|
-
...n.tools?.length ? { tools: n.tools.map(
|
|
20081
|
+
...n.tools?.length ? { tools: n.tools.map(L_) } : {},
|
|
19992
20082
|
...typeof n.temperature == "number" ? { temperature: n.temperature } : {},
|
|
19993
20083
|
...Wu(n.model, n.reasoning, h)
|
|
19994
20084
|
},
|
|
19995
20085
|
signal: n.signal
|
|
19996
20086
|
}, Fu);
|
|
19997
20087
|
if (!a) throw Ku(t);
|
|
19998
|
-
return
|
|
20088
|
+
return B_(a);
|
|
19999
20089
|
}
|
|
20000
20090
|
};
|
|
20001
|
-
},
|
|
20091
|
+
}, H_ = "https://api.cloudflare.com/client/v4", U_ = 100, W_ = 5, G_ = /-guard-/, K_ = "Cloudflare Workers AI", q_ = "Open-weight models (Llama, GPT-OSS, Qwen, Gemma, GLM…) with a free daily allowance.", J_ = "https://dash.cloudflare.com/?to=/:account/ai/workers-ai", Y_ = "Cloudflare dashboard → AI → Workers AI → REST API: create a Workers AI API token and copy the Account ID.", X_ = [{
|
|
20002
20092
|
key: "apiKey",
|
|
20003
20093
|
label: "API Token",
|
|
20004
20094
|
type: "password"
|
|
@@ -20007,7 +20097,7 @@ var z_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
|
|
|
20007
20097
|
label: "Account ID",
|
|
20008
20098
|
type: "text",
|
|
20009
20099
|
placeholder: "32-character account id"
|
|
20010
|
-
}],
|
|
20100
|
+
}], Z_ = (e, t) => (e.properties ?? []).some((e) => e.property_id === t && String(e.value) === "true"), Q_ = (e) => {
|
|
20011
20101
|
let t = (e.properties ?? []).find((e) => e.property_id === "price")?.value;
|
|
20012
20102
|
if (!Array.isArray(t)) return;
|
|
20013
20103
|
let n = (e) => {
|
|
@@ -20020,11 +20110,11 @@ var z_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
|
|
|
20020
20110
|
currency: "USD",
|
|
20021
20111
|
source: "provider"
|
|
20022
20112
|
};
|
|
20023
|
-
},
|
|
20113
|
+
}, $_ = (e) => e?.map((e) => e.role === "assistant" && !e.content ? {
|
|
20024
20114
|
...e,
|
|
20025
20115
|
content: ""
|
|
20026
|
-
} : e),
|
|
20027
|
-
let r = `${
|
|
20116
|
+
} : e), ev = ({ accountId: e, defaultModel: t = "@cf/meta/llama-3.3-70b-instruct-fp8-fast", includePaidModels: n = !1 }) => {
|
|
20117
|
+
let r = `${H_}/accounts/${encodeURIComponent(e.trim())}`, i = `${r}/ai/models/search`, a = (e, t, n) => {
|
|
20028
20118
|
let r = new URLSearchParams({
|
|
20029
20119
|
task: "Text Generation",
|
|
20030
20120
|
hide_experimental: "true",
|
|
@@ -20032,10 +20122,10 @@ var z_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
|
|
|
20032
20122
|
per_page: String(n)
|
|
20033
20123
|
});
|
|
20034
20124
|
return nn(`${i}?${r}`, { headers: { Authorization: `Bearer ${e}` } }, Fu);
|
|
20035
|
-
}, o =
|
|
20125
|
+
}, o = V_({
|
|
20036
20126
|
id: "cloudflare",
|
|
20037
|
-
label:
|
|
20038
|
-
description:
|
|
20127
|
+
label: K_,
|
|
20128
|
+
description: q_,
|
|
20039
20129
|
configKey: "cloudflare",
|
|
20040
20130
|
requiredConfigKeys: ["ai.cloudflare.apiToken", "ai.cloudflare.accountId"],
|
|
20041
20131
|
defaultModel: t,
|
|
@@ -20046,8 +20136,8 @@ var z_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
|
|
|
20046
20136
|
"@cf/meta/llama-4-scout-17b-16e-instruct"
|
|
20047
20137
|
].filter((e, t, n) => n.indexOf(e) === t),
|
|
20048
20138
|
baseUrl: `${r}/ai/v1`,
|
|
20049
|
-
dashboardUrl:
|
|
20050
|
-
credentialsHint:
|
|
20139
|
+
dashboardUrl: J_,
|
|
20140
|
+
credentialsHint: Y_,
|
|
20051
20141
|
validateApiKey: async (e) => {
|
|
20052
20142
|
try {
|
|
20053
20143
|
let t = await a(e, 1, 1);
|
|
@@ -20068,33 +20158,33 @@ var z_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
|
|
|
20068
20158
|
});
|
|
20069
20159
|
return {
|
|
20070
20160
|
...o,
|
|
20071
|
-
credentialFields:
|
|
20161
|
+
credentialFields: X_,
|
|
20072
20162
|
discoverModels: async (e) => {
|
|
20073
20163
|
let t = [];
|
|
20074
|
-
for (let r = 1; r <=
|
|
20075
|
-
let i = await a(e, r,
|
|
20076
|
-
if (o.filter((e) => !
|
|
20164
|
+
for (let r = 1; r <= W_; r++) {
|
|
20165
|
+
let i = await a(e, r, U_), o = Array.isArray(i?.result) ? i.result : [];
|
|
20166
|
+
if (o.filter((e) => !G_.test(e.name ?? "")).filter((e) => n || !Z_(e, "require_workers_paid")).forEach((e) => {
|
|
20077
20167
|
e.name && t.push({
|
|
20078
20168
|
model: e.name,
|
|
20079
|
-
pricing:
|
|
20169
|
+
pricing: Q_(e)
|
|
20080
20170
|
});
|
|
20081
|
-
}), o.length <
|
|
20171
|
+
}), o.length < U_) break;
|
|
20082
20172
|
}
|
|
20083
20173
|
return t;
|
|
20084
20174
|
},
|
|
20085
20175
|
complete: (e, t) => o.complete(e, {
|
|
20086
20176
|
...t,
|
|
20087
|
-
history:
|
|
20177
|
+
history: $_(t.history)
|
|
20088
20178
|
})
|
|
20089
20179
|
};
|
|
20090
|
-
},
|
|
20180
|
+
}, tv = {
|
|
20091
20181
|
id: "cloudflare",
|
|
20092
|
-
label:
|
|
20093
|
-
description:
|
|
20094
|
-
credentialFields:
|
|
20095
|
-
credentialsUrl:
|
|
20096
|
-
credentialsHint:
|
|
20097
|
-
},
|
|
20182
|
+
label: K_,
|
|
20183
|
+
description: q_,
|
|
20184
|
+
credentialFields: X_,
|
|
20185
|
+
credentialsUrl: J_,
|
|
20186
|
+
credentialsHint: Y_
|
|
20187
|
+
}, nv = V_({
|
|
20098
20188
|
id: "deepseek",
|
|
20099
20189
|
label: "DeepSeek",
|
|
20100
20190
|
description: "Cost-efficient reasoning and chat models.",
|
|
@@ -20104,15 +20194,15 @@ var z_ = ({ id: e, label: t, description: n, configKey: r, requiredConfigKeys: i
|
|
|
20104
20194
|
baseUrl: "https://api.deepseek.com",
|
|
20105
20195
|
dashboardUrl: "https://platform.deepseek.com/api_keys",
|
|
20106
20196
|
credentialsHint: "DeepSeek platform → API Keys → Create new API key."
|
|
20107
|
-
}),
|
|
20108
|
-
function
|
|
20197
|
+
}), rv = "https://generativelanguage.googleapis.com/v1beta/models", iv = "https://generativelanguage.googleapis.com/v1beta/models";
|
|
20198
|
+
function av(e) {
|
|
20109
20199
|
return [{ function_declarations: e.map((e) => ({
|
|
20110
20200
|
name: e.name,
|
|
20111
20201
|
description: e.description,
|
|
20112
20202
|
parameters: e.inputSchema
|
|
20113
20203
|
})) }];
|
|
20114
20204
|
}
|
|
20115
|
-
function
|
|
20205
|
+
function ov(e) {
|
|
20116
20206
|
if (e.role === "user") return {
|
|
20117
20207
|
role: "user",
|
|
20118
20208
|
parts: [{ text: e.content }]
|
|
@@ -20137,7 +20227,7 @@ function iv(e) {
|
|
|
20137
20227
|
} }))
|
|
20138
20228
|
};
|
|
20139
20229
|
}
|
|
20140
|
-
function
|
|
20230
|
+
function sv(e) {
|
|
20141
20231
|
let t = e?.candidates?.[0]?.content?.parts;
|
|
20142
20232
|
if (!Array.isArray(t)) return null;
|
|
20143
20233
|
let n = t.filter((e) => typeof e?.text == "string").map((e) => e.text), r = t.filter((e) => e?.functionCall);
|
|
@@ -20156,7 +20246,7 @@ function av(e) {
|
|
|
20156
20246
|
text: i
|
|
20157
20247
|
} : null;
|
|
20158
20248
|
}
|
|
20159
|
-
var
|
|
20249
|
+
var cv = {
|
|
20160
20250
|
id: "gemini",
|
|
20161
20251
|
label: "Gemini",
|
|
20162
20252
|
description: "Google's multimodal Gemini model family.",
|
|
@@ -20180,12 +20270,12 @@ var ov = {
|
|
|
20180
20270
|
supportsDocuments: !0
|
|
20181
20271
|
},
|
|
20182
20272
|
discoverModels: async (e) => {
|
|
20183
|
-
let t = await nn(`${
|
|
20273
|
+
let t = await nn(`${rv}?key=${e}`, null, Fu);
|
|
20184
20274
|
return Array.isArray(t?.models) ? t.models.map((e) => e.name?.replace(/^models\//, "")).filter(Boolean) : [];
|
|
20185
20275
|
},
|
|
20186
20276
|
validateApiKey: async (e) => {
|
|
20187
20277
|
try {
|
|
20188
|
-
let t = await nn(`${
|
|
20278
|
+
let t = await nn(`${rv}?key=${e}`, null, Fu);
|
|
20189
20279
|
return t === null ? {
|
|
20190
20280
|
valid: !1,
|
|
20191
20281
|
error: "Nessuna risposta dal server (CORS o rete)"
|
|
@@ -20206,22 +20296,22 @@ var ov = {
|
|
|
20206
20296
|
mime_type: e.mimeType,
|
|
20207
20297
|
data: e.base64
|
|
20208
20298
|
} }), { text: t.prompt }];
|
|
20209
|
-
return
|
|
20299
|
+
return sv(await nn(`${iv}/${t.model}:generateContent?key=${e}`, {
|
|
20210
20300
|
method: "POST",
|
|
20211
20301
|
headers: t.logId ? { [d]: t.logId } : void 0,
|
|
20212
20302
|
body: {
|
|
20213
|
-
contents: [...(t.history ?? []).map(
|
|
20303
|
+
contents: [...(t.history ?? []).map(ov), ...t.prompt ? [{
|
|
20214
20304
|
role: "user",
|
|
20215
20305
|
parts: n
|
|
20216
20306
|
}] : []],
|
|
20217
20307
|
...t.role ? { systemInstruction: { parts: [{ text: xu.parseRole(t.role, t) }] } } : {},
|
|
20218
|
-
...t.tools?.length ? { tools:
|
|
20308
|
+
...t.tools?.length ? { tools: av(t.tools) } : {},
|
|
20219
20309
|
generationConfig: typeof t.temperature == "number" ? { temperature: t.temperature } : void 0
|
|
20220
20310
|
},
|
|
20221
20311
|
signal: t.signal
|
|
20222
20312
|
}, Fu));
|
|
20223
20313
|
}
|
|
20224
|
-
},
|
|
20314
|
+
}, lv = V_({
|
|
20225
20315
|
id: "mistral",
|
|
20226
20316
|
label: "Mistral",
|
|
20227
20317
|
description: "European-hosted open and commercial language models.",
|
|
@@ -20235,7 +20325,7 @@ var ov = {
|
|
|
20235
20325
|
baseUrl: "https://api.mistral.ai/v1",
|
|
20236
20326
|
dashboardUrl: "https://console.mistral.ai/api-keys",
|
|
20237
20327
|
credentialsHint: "Mistral Console → API Keys → Create new key."
|
|
20238
|
-
}),
|
|
20328
|
+
}), uv = /whisper|orpheus|tts|guard/i, dv = V_({
|
|
20239
20329
|
id: "groq",
|
|
20240
20330
|
label: "Groq",
|
|
20241
20331
|
description: "Very fast inference on open-weight models, with a free tier.",
|
|
@@ -20245,8 +20335,8 @@ var ov = {
|
|
|
20245
20335
|
baseUrl: "https://api.groq.com/openai/v1",
|
|
20246
20336
|
dashboardUrl: "https://console.groq.com/keys",
|
|
20247
20337
|
credentialsHint: "Groq Console → API Keys → Create API Key.",
|
|
20248
|
-
mapModelEntry: (e) => typeof e.id == "string" && e.active !== !1 && !
|
|
20249
|
-
}),
|
|
20338
|
+
mapModelEntry: (e) => typeof e.id == "string" && e.active !== !1 && !uv.test(e.id) ? e.id : void 0
|
|
20339
|
+
}), fv = V_({
|
|
20250
20340
|
id: "openai",
|
|
20251
20341
|
label: "OpenAI",
|
|
20252
20342
|
description: "GPT models via the OpenAI API.",
|
|
@@ -20264,8 +20354,8 @@ var ov = {
|
|
|
20264
20354
|
baseUrl: "https://api.openai.com/v1",
|
|
20265
20355
|
dashboardUrl: "https://platform.openai.com/api-keys",
|
|
20266
20356
|
credentialsHint: "OpenAI dashboard → API keys → Create new secret key."
|
|
20267
|
-
}),
|
|
20268
|
-
|
|
20357
|
+
}), pv = "https://opencode.ai/zen/v1/models", mv = "https://opencode.ai/zen/v1/chat/completions", hv = "deepseek-v4.1-flash", gv = [
|
|
20358
|
+
hv,
|
|
20269
20359
|
"deepseek-v4-pro",
|
|
20270
20360
|
"glm-5.3",
|
|
20271
20361
|
"glm-5.3-flash",
|
|
@@ -20273,13 +20363,13 @@ var ov = {
|
|
|
20273
20363
|
"kimi-k3",
|
|
20274
20364
|
"minimax-m3",
|
|
20275
20365
|
"qwen3.8-flash"
|
|
20276
|
-
],
|
|
20366
|
+
], _v = /-free$/, vv = /* @__PURE__ */ new Set(["big-pickle"]), yv = (e) => _v.test(e) || vv.has(e), bv = {
|
|
20277
20367
|
id: "opencode",
|
|
20278
20368
|
label: "OpenCode",
|
|
20279
20369
|
description: "OpenCode Zen — a curated set of coding-focused models.",
|
|
20280
20370
|
configKey: "openCodeApiKey",
|
|
20281
|
-
defaultModel:
|
|
20282
|
-
fallbackModels:
|
|
20371
|
+
defaultModel: hv,
|
|
20372
|
+
fallbackModels: gv,
|
|
20283
20373
|
dashboardUrl: "https://opencode.ai",
|
|
20284
20374
|
credentialsHint: "OpenCode Zen dashboard → API Keys → Create Key.",
|
|
20285
20375
|
credentialFields: [{
|
|
@@ -20293,12 +20383,12 @@ var ov = {
|
|
|
20293
20383
|
supportsDocuments: !0
|
|
20294
20384
|
},
|
|
20295
20385
|
discoverModels: async (e) => {
|
|
20296
|
-
let t = await nn(
|
|
20297
|
-
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).filter((e) => !
|
|
20386
|
+
let t = await nn(pv, { headers: { Authorization: `Bearer ${e}` } }, Fu);
|
|
20387
|
+
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).filter((e) => !yv(e));
|
|
20298
20388
|
},
|
|
20299
|
-
complete: (e, t) =>
|
|
20389
|
+
complete: (e, t) => xv(mv, "OpenCode", e, t)
|
|
20300
20390
|
};
|
|
20301
|
-
async function
|
|
20391
|
+
async function xv(e, t, n, r, i = {}) {
|
|
20302
20392
|
let a = r.attachments ?? [], o = a.length > 0 ? a.map((e) => e.mimeType.startsWith("image/") ? {
|
|
20303
20393
|
type: "image_url",
|
|
20304
20394
|
image_url: { url: `data:${e.mimeType};base64,${e.base64}` }
|
|
@@ -20325,25 +20415,25 @@ async function yv(e, t, n, r, i = {}) {
|
|
|
20325
20415
|
role: "system",
|
|
20326
20416
|
content: xu.parseRole(r.role, r)
|
|
20327
20417
|
}] : [],
|
|
20328
|
-
...(r.history ?? []).flatMap(
|
|
20418
|
+
...(r.history ?? []).flatMap(z_),
|
|
20329
20419
|
...r.prompt ? [{
|
|
20330
20420
|
role: "user",
|
|
20331
20421
|
content: o
|
|
20332
20422
|
}] : []
|
|
20333
20423
|
],
|
|
20334
|
-
...r.tools?.length ? { tools: r.tools.map(
|
|
20424
|
+
...r.tools?.length ? { tools: r.tools.map(L_) } : {},
|
|
20335
20425
|
...typeof r.temperature == "number" ? { temperature: r.temperature } : {},
|
|
20336
20426
|
...Wu(r.model, r.reasoning)
|
|
20337
20427
|
},
|
|
20338
20428
|
signal: r.signal
|
|
20339
20429
|
}, Fu);
|
|
20340
20430
|
if (!s) throw Ku(t);
|
|
20341
|
-
return
|
|
20431
|
+
return B_(s);
|
|
20342
20432
|
}
|
|
20343
20433
|
//#endregion
|
|
20344
20434
|
//#region src/providers/ai/opencodeGo.ts
|
|
20345
|
-
var
|
|
20346
|
-
|
|
20435
|
+
var Sv = "https://opencode.ai/zen/go/v1/models", Cv = "https://opencode.ai/zen/go/v1/chat/completions", wv = "x-opencode-session", Tv = "kimi-k3", Ev = [
|
|
20436
|
+
Tv,
|
|
20347
20437
|
"kimi-k3.1-pro",
|
|
20348
20438
|
"glm-5.3",
|
|
20349
20439
|
"glm-5.3-flash",
|
|
@@ -20354,13 +20444,13 @@ var bv = "https://opencode.ai/zen/go/v1/models", xv = "https://opencode.ai/zen/g
|
|
|
20354
20444
|
"minimax-m3",
|
|
20355
20445
|
"claude-haiku-5-5",
|
|
20356
20446
|
"gemini-4-argon"
|
|
20357
|
-
],
|
|
20447
|
+
], Dv = () => typeof crypto < "u" && "randomUUID" in crypto ? crypto.randomUUID() : `s-${Date.now()}-${Math.random().toString(36).slice(2)}`, Ov = {
|
|
20358
20448
|
id: "opencode-go",
|
|
20359
20449
|
label: "OpenCode Go",
|
|
20360
20450
|
description: "OpenCode Go — a monthly subscription to open and frontier coding models, with an API key.",
|
|
20361
20451
|
configKey: "openCodeGoApiKey",
|
|
20362
|
-
defaultModel:
|
|
20363
|
-
fallbackModels:
|
|
20452
|
+
defaultModel: Tv,
|
|
20453
|
+
fallbackModels: Ev,
|
|
20364
20454
|
dashboardUrl: "https://opencode.ai/go",
|
|
20365
20455
|
credentialsHint: "OpenCode Console → subscribe to Go → API key.",
|
|
20366
20456
|
credentialFields: [{
|
|
@@ -20374,11 +20464,11 @@ var bv = "https://opencode.ai/zen/go/v1/models", xv = "https://opencode.ai/zen/g
|
|
|
20374
20464
|
supportsDocuments: !0
|
|
20375
20465
|
},
|
|
20376
20466
|
discoverModels: async (e) => {
|
|
20377
|
-
let t = await nn(
|
|
20378
|
-
return (Array.isArray(t?.data) ? t.data : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0).filter((e) => !
|
|
20467
|
+
let t = await nn(Sv, { headers: { Authorization: `Bearer ${e}` } }, Fu);
|
|
20468
|
+
return (Array.isArray(t?.data) ? t.data : []).map((e) => e.id).filter((e) => typeof e == "string" && e.length > 0).filter((e) => !yv(e));
|
|
20379
20469
|
},
|
|
20380
|
-
complete: (e, t) =>
|
|
20381
|
-
},
|
|
20470
|
+
complete: (e, t) => xv(Cv, "OpenCode Go", e, t, { [wv]: t.logId || Dv() })
|
|
20471
|
+
}, kv = (e) => {
|
|
20382
20472
|
if (!e || typeof e != "object") return;
|
|
20383
20473
|
let { prompt: t, completion: n } = e, r = Number(t), i = Number(n);
|
|
20384
20474
|
if (t === void 0 || n === void 0 || !Number.isFinite(r) || !Number.isFinite(i) || r < 0 || i < 0) return;
|
|
@@ -20389,7 +20479,7 @@ var bv = "https://opencode.ai/zen/go/v1/models", xv = "https://opencode.ai/zen/g
|
|
|
20389
20479
|
currency: "USD",
|
|
20390
20480
|
source: "provider"
|
|
20391
20481
|
};
|
|
20392
|
-
},
|
|
20482
|
+
}, Av = V_({
|
|
20393
20483
|
id: "openrouter",
|
|
20394
20484
|
label: "OpenRouter",
|
|
20395
20485
|
description: "Unified access to many model providers through one API.",
|
|
@@ -20406,7 +20496,7 @@ var bv = "https://opencode.ai/zen/go/v1/models", xv = "https://opencode.ai/zen/g
|
|
|
20406
20496
|
credentialsHint: "OpenRouter → Settings → API Keys → Create Key.",
|
|
20407
20497
|
mapModelEntry: (e) => typeof e.id == "string" ? {
|
|
20408
20498
|
model: e.id,
|
|
20409
|
-
pricing:
|
|
20499
|
+
pricing: kv(e.pricing)
|
|
20410
20500
|
} : void 0,
|
|
20411
20501
|
validateApiKey: async (e) => {
|
|
20412
20502
|
try {
|
|
@@ -20428,10 +20518,10 @@ var bv = "https://opencode.ai/zen/go/v1/models", xv = "https://opencode.ai/zen/g
|
|
|
20428
20518
|
};
|
|
20429
20519
|
}
|
|
20430
20520
|
}
|
|
20431
|
-
}),
|
|
20521
|
+
}), jv = {
|
|
20432
20522
|
dbRealtime: {
|
|
20433
20523
|
service: "data",
|
|
20434
|
-
create: () => new
|
|
20524
|
+
create: () => new u_()
|
|
20435
20525
|
},
|
|
20436
20526
|
firestoreDb: {
|
|
20437
20527
|
service: "data",
|
|
@@ -20443,30 +20533,30 @@ var bv = "https://opencode.ai/zen/go/v1/models", xv = "https://opencode.ai/zen/g
|
|
|
20443
20533
|
},
|
|
20444
20534
|
firebaseAuth: {
|
|
20445
20535
|
service: "auth",
|
|
20446
|
-
create: () => new
|
|
20536
|
+
create: () => new m_()
|
|
20447
20537
|
}
|
|
20448
|
-
},
|
|
20538
|
+
}, Mv = {
|
|
20449
20539
|
googleAuth: {
|
|
20450
20540
|
service: "auth",
|
|
20451
|
-
create: () => new
|
|
20541
|
+
create: () => new Gg()
|
|
20452
20542
|
},
|
|
20453
20543
|
gmail: {
|
|
20454
20544
|
service: "email",
|
|
20455
|
-
create: () => new
|
|
20545
|
+
create: () => new E_()
|
|
20456
20546
|
},
|
|
20457
20547
|
googleServiceAccount: {
|
|
20458
20548
|
service: "credentials",
|
|
20459
|
-
create: (e) => new
|
|
20549
|
+
create: (e) => new y_(e.serviceAccount),
|
|
20460
20550
|
when: (e) => !!e.serviceAccount
|
|
20461
20551
|
}
|
|
20462
|
-
},
|
|
20552
|
+
}, Nv = { dropboxAuth: {
|
|
20463
20553
|
service: "auth",
|
|
20464
|
-
create: (e) => new
|
|
20465
|
-
} },
|
|
20554
|
+
create: (e) => new x_(e)
|
|
20555
|
+
} }, Pv = { githubAuth: {
|
|
20466
20556
|
service: "auth",
|
|
20467
|
-
create: (e) => new
|
|
20557
|
+
create: (e) => new C_(e),
|
|
20468
20558
|
when: (e) => !!e?.sessionUrl?.trim()
|
|
20469
|
-
} },
|
|
20559
|
+
} }, Fv = {
|
|
20470
20560
|
supabaseDb: {
|
|
20471
20561
|
service: "data",
|
|
20472
20562
|
create: (e) => new Fo(e)
|
|
@@ -20477,35 +20567,35 @@ var bv = "https://opencode.ai/zen/go/v1/models", xv = "https://opencode.ai/zen/g
|
|
|
20477
20567
|
},
|
|
20478
20568
|
supabaseAuth: {
|
|
20479
20569
|
service: "auth",
|
|
20480
|
-
create: (e) => new
|
|
20570
|
+
create: (e) => new O_(e)
|
|
20481
20571
|
}
|
|
20482
|
-
},
|
|
20572
|
+
}, Iv = { mock: {
|
|
20483
20573
|
service: "data",
|
|
20484
20574
|
create: (e) => new Ho(e?.data)
|
|
20485
|
-
} },
|
|
20575
|
+
} }, Lv = (e, t) => ({
|
|
20486
20576
|
service: "ai",
|
|
20487
20577
|
create: (n) => new Qu(e, n?.[t] || ""),
|
|
20488
20578
|
when: (e) => !!e?.[t]
|
|
20489
|
-
}),
|
|
20490
|
-
firebase:
|
|
20491
|
-
google:
|
|
20492
|
-
dropbox:
|
|
20493
|
-
github:
|
|
20494
|
-
supabase:
|
|
20495
|
-
mock:
|
|
20579
|
+
}), Rv = {
|
|
20580
|
+
firebase: jv,
|
|
20581
|
+
google: Mv,
|
|
20582
|
+
dropbox: Nv,
|
|
20583
|
+
github: Pv,
|
|
20584
|
+
supabase: Fv,
|
|
20585
|
+
mock: Iv,
|
|
20496
20586
|
ai: {
|
|
20497
|
-
openai:
|
|
20498
|
-
openrouter:
|
|
20499
|
-
opencode:
|
|
20500
|
-
"opencode-go":
|
|
20501
|
-
deepseek:
|
|
20502
|
-
gemini:
|
|
20503
|
-
anthropic:
|
|
20504
|
-
mistral:
|
|
20505
|
-
groq:
|
|
20587
|
+
openai: Lv(fv, "openaiApiKey"),
|
|
20588
|
+
openrouter: Lv(Av, "openRouterApiKey"),
|
|
20589
|
+
opencode: Lv(bv, "openCodeApiKey"),
|
|
20590
|
+
"opencode-go": Lv(Ov, "openCodeGoApiKey"),
|
|
20591
|
+
deepseek: Lv(nv, "deepSeekApiKey"),
|
|
20592
|
+
gemini: Lv(cv, "geminiApiKey"),
|
|
20593
|
+
anthropic: Lv(P_, "anthropicApiKey"),
|
|
20594
|
+
mistral: Lv(lv, "mistralApiKey"),
|
|
20595
|
+
groq: Lv(dv, "groqApiKey"),
|
|
20506
20596
|
cloudflare: {
|
|
20507
20597
|
service: "ai",
|
|
20508
|
-
create: (e) => new Qu(
|
|
20598
|
+
create: (e) => new Qu(ev({
|
|
20509
20599
|
accountId: e?.cloudflare?.accountId?.trim() || "",
|
|
20510
20600
|
defaultModel: e?.cloudflare?.defaultModel?.trim() || void 0,
|
|
20511
20601
|
includePaidModels: e?.cloudflare?.includePaidModels
|
|
@@ -20513,8 +20603,8 @@ var bv = "https://opencode.ai/zen/go/v1/models", xv = "https://opencode.ai/zen/g
|
|
|
20513
20603
|
when: (e) => !!e?.cloudflare?.apiToken?.trim() && !!e?.cloudflare?.accountId?.trim()
|
|
20514
20604
|
}
|
|
20515
20605
|
}
|
|
20516
|
-
},
|
|
20517
|
-
function
|
|
20606
|
+
}, zv = () => /* @__PURE__ */ f.createElement("div", { className: "flex min-h-[calc(100vh-4rem)] items-center justify-center" }, /* @__PURE__ */ f.createElement("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-muted border-t-primary" }));
|
|
20607
|
+
function Bv(e, t) {
|
|
20518
20608
|
if (!t) return;
|
|
20519
20609
|
let n = t, r = typeof t == "object" && !Array.isArray(t) ? Object.entries(n) : [];
|
|
20520
20610
|
if (r.length > 0 && r.every(([, e]) => typeof e == "object" && !!e)) {
|
|
@@ -20523,10 +20613,10 @@ function Rv(e, t) {
|
|
|
20523
20613
|
}
|
|
20524
20614
|
e.custom = t;
|
|
20525
20615
|
}
|
|
20526
|
-
function
|
|
20616
|
+
function Vv(e, t, n = "default") {
|
|
20527
20617
|
return t && e[t] ? t : Object.keys(e)[0] ?? n;
|
|
20528
20618
|
}
|
|
20529
|
-
function
|
|
20619
|
+
function Hv(e = {}) {
|
|
20530
20620
|
let t = {
|
|
20531
20621
|
data: {},
|
|
20532
20622
|
storage: {},
|
|
@@ -20535,24 +20625,24 @@ function Bv(e = {}) {
|
|
|
20535
20625
|
ai: {},
|
|
20536
20626
|
credentials: {}
|
|
20537
20627
|
}, n = (e) => t[e] ??= {};
|
|
20538
|
-
for (let [t, r] of Object.entries(
|
|
20628
|
+
for (let [t, r] of Object.entries(Rv)) {
|
|
20539
20629
|
let i = e[t];
|
|
20540
20630
|
if (i !== void 0) for (let [e, t] of Object.entries(r)) (!t.when || t.when(i)) && (n(t.service)[e] = t.create(i));
|
|
20541
20631
|
}
|
|
20542
|
-
for (let [t, r] of Object.entries(e.custom ?? {}))
|
|
20543
|
-
Object.keys(t.data).length === 0 && (t.data.mock = new Ho()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new
|
|
20632
|
+
for (let [t, r] of Object.entries(e.custom ?? {})) Bv(n(t), r);
|
|
20633
|
+
Object.keys(t.data).length === 0 && (t.data.mock = new Ho()), Object.keys(t.auth).length === 0 && (t.auth.googleAuth = new Gg());
|
|
20544
20634
|
let r = e.services ?? {}, i = {};
|
|
20545
20635
|
for (let [e, n] of Object.entries(t)) i[e] = {
|
|
20546
20636
|
registry: n,
|
|
20547
|
-
defaultKey:
|
|
20637
|
+
defaultKey: Vv(n, r[e])
|
|
20548
20638
|
};
|
|
20549
20639
|
return i;
|
|
20550
20640
|
}
|
|
20551
|
-
var
|
|
20552
|
-
|
|
20553
|
-
},
|
|
20554
|
-
function
|
|
20555
|
-
let [p, m] = E(() =>
|
|
20641
|
+
var Uv = {}, Wv = (e) => {
|
|
20642
|
+
Uv = e;
|
|
20643
|
+
}, Gv = (e) => Uv[e] || [];
|
|
20644
|
+
function Kv({ contextProviders: e, providers: t = {}, appName: n = "LLM Native", scrapeConfig: r, iconProvider: i, googleMaps: a, themeProvider: o, i18n: s, children: c, errorReportUrl: l, debug: u, basename: d }) {
|
|
20645
|
+
let [p, m] = E(() => Hv(t)), h = T(p);
|
|
20556
20646
|
h.current = p;
|
|
20557
20647
|
let g = T(void 0);
|
|
20558
20648
|
g.current ||= (async (e, t, n) => {
|
|
@@ -20569,7 +20659,7 @@ function Wv({ contextProviders: e, providers: t = {}, appName: n = "LLM Native",
|
|
|
20569
20659
|
})));
|
|
20570
20660
|
});
|
|
20571
20661
|
let _ = g.current, v = e ?? f.Fragment;
|
|
20572
|
-
return /* @__PURE__ */ f.createElement(
|
|
20662
|
+
return /* @__PURE__ */ f.createElement(Ug, {
|
|
20573
20663
|
fullPage: !0,
|
|
20574
20664
|
reportUrl: l,
|
|
20575
20665
|
debug: u
|
|
@@ -20591,10 +20681,10 @@ function Wv({ contextProviders: e, providers: t = {}, appName: n = "LLM Native",
|
|
|
20591
20681
|
} }, /* @__PURE__ */ f.createElement(Ha, {
|
|
20592
20682
|
registries: p,
|
|
20593
20683
|
setProvider: _
|
|
20594
|
-
}, /* @__PURE__ */ f.createElement(gi, p.auth, /* @__PURE__ */ f.createElement(
|
|
20684
|
+
}, /* @__PURE__ */ f.createElement(gi, p.auth, /* @__PURE__ */ f.createElement(Xg, p.credentials, /* @__PURE__ */ f.createElement(zi, p.data, /* @__PURE__ */ f.createElement(Fl, p.storage, /* @__PURE__ */ f.createElement(qg, p.email, /* @__PURE__ */ f.createElement(Eu, p.ai, /* @__PURE__ */ f.createElement(Lr, { config: i }, /* @__PURE__ */ f.createElement(im, { config: a }, /* @__PURE__ */ f.createElement(gh, { appName: n }, /* @__PURE__ */ f.createElement(Jn, { config: s }, /* @__PURE__ */ f.createElement(Fn, { config: o }, /* @__PURE__ */ f.createElement(v, null, c))))))))))))))));
|
|
20595
20685
|
}
|
|
20596
|
-
function
|
|
20597
|
-
|
|
20686
|
+
function qv({ importPage: e, LayoutDefault: t = void 0, menuConfig: n = {}, children: r, ...i }) {
|
|
20687
|
+
Wv(n);
|
|
20598
20688
|
let a = ({ children: e }) => /* @__PURE__ */ f.createElement(f.Fragment, null, e), o = ({ pageSource: e, message: t }) => /* @__PURE__ */ f.createElement(cs, { variant: "warning" }, "Missing Page: ", e, t && /* @__PURE__ */ f.createElement("code", { className: "ml-2" }, t));
|
|
20599
20689
|
function s(n, r, s) {
|
|
20600
20690
|
let c = `./pages${r.component ? "/" + r.component : r.path === "/" ? "/Home" : ft.toCamel(r.path.split("*")[0])}.js`, l = r.page || f.lazy(() => e(c).then((e) => typeof e.default == "function" ? { default: e.default } : (console.warn(`⚠️ Invalid default export in ${c}`), { default: () => /* @__PURE__ */ f.createElement(o, { pageSource: c }) })).catch((e) => (console.error(`❌ Failed to load ${c}:`, e), { default: () => /* @__PURE__ */ f.createElement(o, {
|
|
@@ -20604,32 +20694,32 @@ function Gv({ importPage: e, LayoutDefault: t = void 0, menuConfig: n = {}, chil
|
|
|
20604
20694
|
return /* @__PURE__ */ f.createElement(A, {
|
|
20605
20695
|
key: `${n}-${s}`,
|
|
20606
20696
|
path: r.path,
|
|
20607
|
-
element: /* @__PURE__ */ f.createElement(u, null, /* @__PURE__ */ f.createElement(
|
|
20697
|
+
element: /* @__PURE__ */ f.createElement(u, null, /* @__PURE__ */ f.createElement(Ug, {
|
|
20608
20698
|
key: r.path,
|
|
20609
20699
|
reportUrl: i.errorReportUrl,
|
|
20610
20700
|
debug: i.debug
|
|
20611
|
-
}, /* @__PURE__ */ f.createElement(h, { fallback: /* @__PURE__ */ f.createElement(
|
|
20701
|
+
}, /* @__PURE__ */ f.createElement(h, { fallback: /* @__PURE__ */ f.createElement(zv, null) }, /* @__PURE__ */ f.createElement(l, null))))
|
|
20612
20702
|
});
|
|
20613
20703
|
}
|
|
20614
|
-
let c = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && s(t, e, n), e.children && c({ children: e.children })].filter(Boolean))), l = (e, t) => e.some((e) => e.path === t || !!e.children && l(e.children, t)), u = Object.values(
|
|
20615
|
-
return /* @__PURE__ */ f.createElement(
|
|
20704
|
+
let c = (e) => Object.keys(e).flatMap((t) => e[t].flatMap((e, n) => [e.path && s(t, e, n), e.children && c({ children: e.children })].filter(Boolean))), l = (e, t) => e.some((e) => e.path === t || !!e.children && l(e.children, t)), u = Object.values(Uv).some((e) => l(e, "/")) ? {} : { default: [{ path: "/" }] };
|
|
20705
|
+
return /* @__PURE__ */ f.createElement(Kv, i, r, /* @__PURE__ */ f.createElement(j, null, /* @__PURE__ */ f.createElement(A, {
|
|
20616
20706
|
path: Ci,
|
|
20617
20707
|
element: /* @__PURE__ */ f.createElement(Ai, null)
|
|
20618
20708
|
}), /* @__PURE__ */ f.createElement(f.Fragment, null, c({
|
|
20619
20709
|
...u,
|
|
20620
|
-
...
|
|
20710
|
+
...Uv,
|
|
20621
20711
|
_auth: [{
|
|
20622
20712
|
path: "/users",
|
|
20623
|
-
page:
|
|
20713
|
+
page: Ng,
|
|
20624
20714
|
layout: t
|
|
20625
20715
|
}]
|
|
20626
20716
|
})), /* @__PURE__ */ f.createElement(A, {
|
|
20627
20717
|
path: "*",
|
|
20628
|
-
element: /* @__PURE__ */ f.createElement(
|
|
20718
|
+
element: /* @__PURE__ */ f.createElement(Pg, null)
|
|
20629
20719
|
})));
|
|
20630
20720
|
}
|
|
20631
|
-
var
|
|
20632
|
-
let t =
|
|
20721
|
+
var Jv = (e) => {
|
|
20722
|
+
let t = Gv(e), n = M(), r = (e) => e.map((e) => {
|
|
20633
20723
|
let t = n.pathname === e.path, i = e.children ? r(e.children) : [], a = t || i.some((e) => e.active);
|
|
20634
20724
|
return {
|
|
20635
20725
|
...e,
|
|
@@ -20638,7 +20728,7 @@ var Kv = (e) => {
|
|
|
20638
20728
|
};
|
|
20639
20729
|
});
|
|
20640
20730
|
return w(() => r(t), [n.pathname]);
|
|
20641
|
-
},
|
|
20731
|
+
}, Yv = {
|
|
20642
20732
|
common: {
|
|
20643
20733
|
save: "Salva",
|
|
20644
20734
|
cancel: "Annulla",
|
|
@@ -20976,7 +21066,16 @@ var Kv = (e) => {
|
|
|
20976
21066
|
back: "Indietro",
|
|
20977
21067
|
submit: "Invia",
|
|
20978
21068
|
noAnswer: "Nessuna risposta",
|
|
20979
|
-
answered: "Risposte date"
|
|
21069
|
+
answered: "Risposte date",
|
|
21070
|
+
activityCount: "{count} passi",
|
|
21071
|
+
activityFailed: "{count} non riusciti",
|
|
21072
|
+
activityCommands: "Comandi",
|
|
21073
|
+
activityHide: "Nascondi",
|
|
21074
|
+
activityLog: "Registro completo",
|
|
21075
|
+
activitySteps: "Vista per passi",
|
|
21076
|
+
activityFiles: "{count} file modificati",
|
|
21077
|
+
activityChanges: "Vedi le modifiche",
|
|
21078
|
+
activityEmpty: "Ancora niente"
|
|
20980
21079
|
},
|
|
20981
21080
|
charts: {
|
|
20982
21081
|
noData: "Nessun dato",
|
|
@@ -20986,7 +21085,7 @@ var Kv = (e) => {
|
|
|
20986
21085
|
dataTable: "Dati del grafico",
|
|
20987
21086
|
sequence: "Sequenza"
|
|
20988
21087
|
}
|
|
20989
|
-
},
|
|
21088
|
+
}, Xv = {
|
|
20990
21089
|
common: {
|
|
20991
21090
|
save: "Speichern",
|
|
20992
21091
|
cancel: "Abbrechen",
|
|
@@ -21324,7 +21423,16 @@ var Kv = (e) => {
|
|
|
21324
21423
|
back: "Zurück",
|
|
21325
21424
|
submit: "Senden",
|
|
21326
21425
|
noAnswer: "Keine Antwort",
|
|
21327
|
-
answered: "Beantwortet"
|
|
21426
|
+
answered: "Beantwortet",
|
|
21427
|
+
activityCount: "{count} Schritte",
|
|
21428
|
+
activityFailed: "{count} fehlgeschlagen",
|
|
21429
|
+
activityCommands: "Befehle",
|
|
21430
|
+
activityHide: "Ausblenden",
|
|
21431
|
+
activityLog: "Vollständiges Protokoll",
|
|
21432
|
+
activitySteps: "Schrittansicht",
|
|
21433
|
+
activityFiles: "{count} Dateien geändert",
|
|
21434
|
+
activityChanges: "Änderungen ansehen",
|
|
21435
|
+
activityEmpty: "Noch nichts"
|
|
21328
21436
|
},
|
|
21329
21437
|
charts: {
|
|
21330
21438
|
noData: "Keine Daten",
|
|
@@ -21334,7 +21442,7 @@ var Kv = (e) => {
|
|
|
21334
21442
|
dataTable: "Diagrammdaten",
|
|
21335
21443
|
sequence: "Abfolge"
|
|
21336
21444
|
}
|
|
21337
|
-
},
|
|
21445
|
+
}, Zv = {
|
|
21338
21446
|
common: {
|
|
21339
21447
|
save: "Сохранить",
|
|
21340
21448
|
cancel: "Отменить",
|
|
@@ -21672,7 +21780,16 @@ var Kv = (e) => {
|
|
|
21672
21780
|
back: "Назад",
|
|
21673
21781
|
submit: "Отправить",
|
|
21674
21782
|
noAnswer: "Нет ответа",
|
|
21675
|
-
answered: "Отвечено"
|
|
21783
|
+
answered: "Отвечено",
|
|
21784
|
+
activityCount: "Шагов: {count}",
|
|
21785
|
+
activityFailed: "Не удалось: {count}",
|
|
21786
|
+
activityCommands: "Команды",
|
|
21787
|
+
activityHide: "Скрыть",
|
|
21788
|
+
activityLog: "Полный журнал",
|
|
21789
|
+
activitySteps: "По шагам",
|
|
21790
|
+
activityFiles: "Изменено файлов: {count}",
|
|
21791
|
+
activityChanges: "Посмотреть изменения",
|
|
21792
|
+
activityEmpty: "Пока ничего"
|
|
21676
21793
|
},
|
|
21677
21794
|
charts: {
|
|
21678
21795
|
noData: "Нет данных",
|
|
@@ -21682,7 +21799,7 @@ var Kv = (e) => {
|
|
|
21682
21799
|
dataTable: "Данные диаграммы",
|
|
21683
21800
|
sequence: "Последовательность"
|
|
21684
21801
|
}
|
|
21685
|
-
},
|
|
21802
|
+
}, Qv = {
|
|
21686
21803
|
common: {
|
|
21687
21804
|
save: "保存",
|
|
21688
21805
|
cancel: "取消",
|
|
@@ -22020,7 +22137,16 @@ var Kv = (e) => {
|
|
|
22020
22137
|
back: "返回",
|
|
22021
22138
|
submit: "提交",
|
|
22022
22139
|
noAnswer: "未回答",
|
|
22023
|
-
answered: "已回答"
|
|
22140
|
+
answered: "已回答",
|
|
22141
|
+
activityCount: "{count} 步",
|
|
22142
|
+
activityFailed: "{count} 个失败",
|
|
22143
|
+
activityCommands: "命令",
|
|
22144
|
+
activityHide: "隐藏",
|
|
22145
|
+
activityLog: "完整日志",
|
|
22146
|
+
activitySteps: "按步骤查看",
|
|
22147
|
+
activityFiles: "已修改 {count} 个文件",
|
|
22148
|
+
activityChanges: "查看更改",
|
|
22149
|
+
activityEmpty: "暂无内容"
|
|
22024
22150
|
},
|
|
22025
22151
|
charts: {
|
|
22026
22152
|
noData: "暂无数据",
|
|
@@ -22030,7 +22156,7 @@ var Kv = (e) => {
|
|
|
22030
22156
|
dataTable: "图表数据",
|
|
22031
22157
|
sequence: "顺序"
|
|
22032
22158
|
}
|
|
22033
|
-
},
|
|
22159
|
+
}, $v = {
|
|
22034
22160
|
common: {
|
|
22035
22161
|
save: "حفظ",
|
|
22036
22162
|
cancel: "إلغاء",
|
|
@@ -22368,7 +22494,16 @@ var Kv = (e) => {
|
|
|
22368
22494
|
back: "رجوع",
|
|
22369
22495
|
submit: "إرسال",
|
|
22370
22496
|
noAnswer: "لا توجد إجابة",
|
|
22371
|
-
answered: "تمت الإجابة"
|
|
22497
|
+
answered: "تمت الإجابة",
|
|
22498
|
+
activityCount: "{count} خطوات",
|
|
22499
|
+
activityFailed: "{count} فشلت",
|
|
22500
|
+
activityCommands: "الأوامر",
|
|
22501
|
+
activityHide: "إخفاء",
|
|
22502
|
+
activityLog: "السجل الكامل",
|
|
22503
|
+
activitySteps: "عرض الخطوات",
|
|
22504
|
+
activityFiles: "{count} ملفات معدلة",
|
|
22505
|
+
activityChanges: "عرض التغييرات",
|
|
22506
|
+
activityEmpty: "لا شيء بعد"
|
|
22372
22507
|
},
|
|
22373
22508
|
charts: {
|
|
22374
22509
|
noData: "لا توجد بيانات",
|
|
@@ -22378,22 +22513,22 @@ var Kv = (e) => {
|
|
|
22378
22513
|
dataTable: "بيانات المخطط",
|
|
22379
22514
|
sequence: "التسلسل"
|
|
22380
22515
|
}
|
|
22381
|
-
},
|
|
22382
|
-
ar: () =>
|
|
22383
|
-
de: () =>
|
|
22516
|
+
}, ey = /* @__PURE__ */ ot({
|
|
22517
|
+
ar: () => $v,
|
|
22518
|
+
de: () => Xv,
|
|
22384
22519
|
en: () => Rn,
|
|
22385
|
-
it: () =>
|
|
22386
|
-
ru: () =>
|
|
22387
|
-
zh: () =>
|
|
22388
|
-
}),
|
|
22520
|
+
it: () => Yv,
|
|
22521
|
+
ru: () => Zv,
|
|
22522
|
+
zh: () => Qv
|
|
22523
|
+
}), ty = (e) => Ga("api", e);
|
|
22389
22524
|
//#endregion
|
|
22390
22525
|
//#region src/providers/api/direct.ts
|
|
22391
|
-
async function
|
|
22526
|
+
async function ny(e) {
|
|
22392
22527
|
if (!e.ok) throw Error(`ApiProvider request failed: ${e.status} ${e.statusText}`);
|
|
22393
22528
|
let t = await e.text();
|
|
22394
22529
|
return t ? JSON.parse(t) : void 0;
|
|
22395
22530
|
}
|
|
22396
|
-
var
|
|
22531
|
+
var ry = class {
|
|
22397
22532
|
config;
|
|
22398
22533
|
constructor(e) {
|
|
22399
22534
|
this.config = e;
|
|
@@ -22408,7 +22543,7 @@ var ty = class {
|
|
|
22408
22543
|
...e.body,
|
|
22409
22544
|
...this.config.body
|
|
22410
22545
|
};
|
|
22411
|
-
return
|
|
22546
|
+
return ny(await Fu(n.toString(), {
|
|
22412
22547
|
method: t,
|
|
22413
22548
|
headers: {
|
|
22414
22549
|
"Content-Type": "application/json",
|
|
@@ -22417,7 +22552,7 @@ var ty = class {
|
|
|
22417
22552
|
body: t === "GET" || t === "HEAD" ? void 0 : JSON.stringify(r)
|
|
22418
22553
|
}));
|
|
22419
22554
|
}
|
|
22420
|
-
},
|
|
22555
|
+
}, iy = class {
|
|
22421
22556
|
resolver;
|
|
22422
22557
|
constructor(e) {
|
|
22423
22558
|
this.resolver = e;
|
|
@@ -22425,7 +22560,7 @@ var ty = class {
|
|
|
22425
22560
|
async fetch(e) {
|
|
22426
22561
|
return this.resolver(e);
|
|
22427
22562
|
}
|
|
22428
|
-
},
|
|
22563
|
+
}, ay = class {
|
|
22429
22564
|
config;
|
|
22430
22565
|
constructor(e) {
|
|
22431
22566
|
this.config = e;
|
|
@@ -22436,7 +22571,7 @@ var ty = class {
|
|
|
22436
22571
|
request: e
|
|
22437
22572
|
}, void 0, this.config.region);
|
|
22438
22573
|
}
|
|
22439
|
-
},
|
|
22574
|
+
}, oy = class {
|
|
22440
22575
|
config;
|
|
22441
22576
|
constructor(e) {
|
|
22442
22577
|
this.config = e;
|
|
@@ -22449,7 +22584,7 @@ var ty = class {
|
|
|
22449
22584
|
if (n) throw n;
|
|
22450
22585
|
return t;
|
|
22451
22586
|
}
|
|
22452
|
-
},
|
|
22587
|
+
}, sy = [
|
|
22453
22588
|
{
|
|
22454
22589
|
id: "resend",
|
|
22455
22590
|
label: "Resend",
|
|
@@ -22560,7 +22695,7 @@ var ty = class {
|
|
|
22560
22695
|
],
|
|
22561
22696
|
credentialsHint: "Ask your mail host or hosting provider for the SMTP host, port, and credentials."
|
|
22562
22697
|
}
|
|
22563
|
-
],
|
|
22698
|
+
], cy = [
|
|
22564
22699
|
{
|
|
22565
22700
|
id: "cloudflare_pages",
|
|
22566
22701
|
label: "Cloudflare Pages",
|
|
@@ -22790,16 +22925,16 @@ var ty = class {
|
|
|
22790
22925
|
description: "No vendor — packages the build as a downloadable archive for self-hosting anywhere else.",
|
|
22791
22926
|
credentialFields: []
|
|
22792
22927
|
}
|
|
22793
|
-
],
|
|
22794
|
-
|
|
22928
|
+
], ly = [
|
|
22929
|
+
fv,
|
|
22930
|
+
Av,
|
|
22931
|
+
bv,
|
|
22795
22932
|
Ov,
|
|
22796
|
-
|
|
22797
|
-
|
|
22798
|
-
|
|
22799
|
-
|
|
22800
|
-
|
|
22801
|
-
sv,
|
|
22802
|
-
z_({
|
|
22933
|
+
nv,
|
|
22934
|
+
cv,
|
|
22935
|
+
P_,
|
|
22936
|
+
lv,
|
|
22937
|
+
V_({
|
|
22803
22938
|
id: "glm",
|
|
22804
22939
|
label: "ZhipuAI (GLM)",
|
|
22805
22940
|
description: "Zhipu AI's GLM model family.",
|
|
@@ -22816,8 +22951,8 @@ var ty = class {
|
|
|
22816
22951
|
dashboardUrl: "https://bigmodel.cn/usercenter/apikeys",
|
|
22817
22952
|
credentialsHint: "Zhipu BigModel → User Center → API Keys → Create Key."
|
|
22818
22953
|
}),
|
|
22819
|
-
|
|
22820
|
-
],
|
|
22954
|
+
dv
|
|
22955
|
+
], uy = (e) => ({
|
|
22821
22956
|
id: e.id,
|
|
22822
22957
|
label: e.label,
|
|
22823
22958
|
description: e.description ?? "",
|
|
@@ -22828,7 +22963,7 @@ var ty = class {
|
|
|
22828
22963
|
}],
|
|
22829
22964
|
credentialsUrl: e.dashboardUrl,
|
|
22830
22965
|
credentialsHint: e.credentialsHint
|
|
22831
|
-
}),
|
|
22966
|
+
}), dy = [...ly.map(uy), tv], fy = {
|
|
22832
22967
|
id: "openai-compatible",
|
|
22833
22968
|
label: "OpenAI-compatible",
|
|
22834
22969
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -22842,15 +22977,15 @@ var ty = class {
|
|
|
22842
22977
|
type: "text",
|
|
22843
22978
|
placeholder: "https://api.example.com/v1"
|
|
22844
22979
|
}]
|
|
22845
|
-
},
|
|
22980
|
+
}, py = (e) => {
|
|
22846
22981
|
let t = [], n = e?.cloudflare?.accountId?.trim();
|
|
22847
|
-
n && t.push(
|
|
22982
|
+
n && t.push(ev({
|
|
22848
22983
|
accountId: n,
|
|
22849
22984
|
defaultModel: e?.cloudflare?.defaultModel?.trim() || void 0,
|
|
22850
22985
|
includePaidModels: e?.cloudflare?.includePaidModels
|
|
22851
22986
|
}));
|
|
22852
22987
|
let r = e?.openAICompatible?.baseUrl?.trim();
|
|
22853
|
-
return r ? [...t,
|
|
22988
|
+
return r ? [...t, V_({
|
|
22854
22989
|
id: "openai-compatible",
|
|
22855
22990
|
label: e?.openAICompatible?.label?.trim() || "OpenAI-compatible",
|
|
22856
22991
|
description: "Any OpenAI-compatible endpoint (self-hosted or third-party).",
|
|
@@ -22862,10 +22997,10 @@ var ty = class {
|
|
|
22862
22997
|
modelsUrl: e?.openAICompatible?.modelsUrl?.trim() || void 0,
|
|
22863
22998
|
chatCompletionsUrl: e?.openAICompatible?.chatCompletionsUrl?.trim() || void 0
|
|
22864
22999
|
})] : t;
|
|
22865
|
-
},
|
|
23000
|
+
}, my = (e) => e ? [...ly, ...py(e)].reduce((t, n) => {
|
|
22866
23001
|
let r = n.id === "openai-compatible" ? e.openAICompatible?.apiKey?.trim() || "" : n.id === "cloudflare" ? e.cloudflare?.apiToken?.trim() || "" : typeof n.configKey == "string" && typeof e[n.configKey] == "string" ? String(e[n.configKey] || "").trim() : "";
|
|
22867
23002
|
return r && (t[n.id] = new Qu(n, r)), t;
|
|
22868
|
-
}, {}) : {},
|
|
23003
|
+
}, {}) : {}, hy = (e, { scope: t }) => my(e.reduce((e, n) => {
|
|
22869
23004
|
let i = r(t, n.id);
|
|
22870
23005
|
if (n.id === "openai-compatible") return n.baseUrl ? {
|
|
22871
23006
|
...e,
|
|
@@ -22883,37 +23018,37 @@ var ty = class {
|
|
|
22883
23018
|
accountId: n.accountId
|
|
22884
23019
|
}
|
|
22885
23020
|
} : e;
|
|
22886
|
-
let a =
|
|
23021
|
+
let a = ly.find((e) => e.id === n.id)?.configKey;
|
|
22887
23022
|
return a ? {
|
|
22888
23023
|
...e,
|
|
22889
23024
|
[a]: i
|
|
22890
23025
|
} : e;
|
|
22891
|
-
}, {})),
|
|
23026
|
+
}, {})), gy = void 0;
|
|
22892
23027
|
typeof Xa == "function" && Xa((e) => {
|
|
22893
|
-
|
|
23028
|
+
gy = e.google;
|
|
22894
23029
|
});
|
|
22895
|
-
var
|
|
23030
|
+
var _y = {
|
|
22896
23031
|
ita: "geoTargetConstants/2380",
|
|
22897
23032
|
rome: "geoTargetConstants/1033236",
|
|
22898
23033
|
mil: "geoTargetConstants/1033239",
|
|
22899
23034
|
nap: "geoTargetConstants/1033245",
|
|
22900
23035
|
tor: "geoTargetConstants/1033247"
|
|
22901
|
-
},
|
|
23036
|
+
}, vy = {
|
|
22902
23037
|
it: "languageConstants/1000",
|
|
22903
23038
|
en: "languageConstants/1001",
|
|
22904
23039
|
fr: "languageConstants/1002",
|
|
22905
23040
|
es: "languageConstants/1003",
|
|
22906
23041
|
de: "languageConstants/1005"
|
|
22907
23042
|
};
|
|
22908
|
-
function
|
|
22909
|
-
return
|
|
23043
|
+
function yy(e) {
|
|
23044
|
+
return _y[e.toLowerCase()] || "geoTargetConstants/2380";
|
|
22910
23045
|
}
|
|
22911
|
-
function
|
|
22912
|
-
return
|
|
23046
|
+
function by(e) {
|
|
23047
|
+
return vy[e.toLowerCase()] || "languageConstants/1000";
|
|
22913
23048
|
}
|
|
22914
|
-
async function
|
|
22915
|
-
if (!
|
|
22916
|
-
let i = await
|
|
23049
|
+
async function xy({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", languageCode: r = "it" }) {
|
|
23050
|
+
if (!gy?.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"), [];
|
|
23051
|
+
let i = await w_(["https://www.googleapis.com/auth/adwords"]), a = yy(n), o = by(r), s = `https://googleads.googleapis.com/v13/customers/${t}:generateKeywordIdeas`, c = {
|
|
22917
23052
|
keywordSeed: { keywords: [e] },
|
|
22918
23053
|
geoTargetConstants: [a],
|
|
22919
23054
|
language: o
|
|
@@ -22921,7 +23056,7 @@ async function yy({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
22921
23056
|
method: "POST",
|
|
22922
23057
|
headers: {
|
|
22923
23058
|
Authorization: `Bearer ${i}`,
|
|
22924
|
-
"developer-token":
|
|
23059
|
+
"developer-token": gy.developerToken,
|
|
22925
23060
|
"Content-Type": "application/json"
|
|
22926
23061
|
},
|
|
22927
23062
|
body: JSON.stringify(c)
|
|
@@ -22939,7 +23074,7 @@ async function yy({ keyword: e, googleAdsAccountId: t, geoCode: n = "ita", langu
|
|
|
22939
23074
|
}
|
|
22940
23075
|
//#endregion
|
|
22941
23076
|
//#region src/providers/seo/google/trend.ts
|
|
22942
|
-
async function
|
|
23077
|
+
async function Sy(e, t = "IT", n = "today 12-m") {
|
|
22943
23078
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
22944
23079
|
comparisonItem: [{
|
|
22945
23080
|
keyword: e,
|
|
@@ -22959,7 +23094,7 @@ async function by(e, t = "IT", n = "today 12-m") {
|
|
|
22959
23094
|
}))
|
|
22960
23095
|
};
|
|
22961
23096
|
}
|
|
22962
|
-
async function
|
|
23097
|
+
async function Cy(e, t = "IT", n = "today 12-m") {
|
|
22963
23098
|
let r = `https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=${encodeURIComponent(JSON.stringify({
|
|
22964
23099
|
comparisonItem: [{
|
|
22965
23100
|
keyword: e,
|
|
@@ -22985,13 +23120,13 @@ async function xy(e, t = "IT", n = "today 12-m") {
|
|
|
22985
23120
|
}
|
|
22986
23121
|
//#endregion
|
|
22987
23122
|
//#region src/providers/storage/dropbox.tsx
|
|
22988
|
-
var
|
|
23123
|
+
var wy = 5e3, Ty = "https://www.dropbox.com/home", Ey = void 0;
|
|
22989
23124
|
typeof Xa == "function" && Xa((e) => {
|
|
22990
|
-
|
|
23125
|
+
Ey = e.dropbox;
|
|
22991
23126
|
});
|
|
22992
|
-
var
|
|
22993
|
-
if (!
|
|
22994
|
-
let r = await Fi(
|
|
23127
|
+
var Dy = async (e, t, n = {}) => {
|
|
23128
|
+
if (!Ey) return console.error("DropBox: Config not found"), null;
|
|
23129
|
+
let r = await Fi(Ey.clientId);
|
|
22995
23130
|
if (!r) throw Error("DropBox: Access token not found");
|
|
22996
23131
|
return await fetch(e, {
|
|
22997
23132
|
method: "POST",
|
|
@@ -23004,12 +23139,12 @@ var Ty = async (e, t, n = {}) => {
|
|
|
23004
23139
|
}).catch((e) => (console.error("There was a problem with the fetch operation:", e), null)).finally(() => {
|
|
23005
23140
|
console.log("DropBox: Fetch operation completed");
|
|
23006
23141
|
});
|
|
23007
|
-
},
|
|
23008
|
-
if (!
|
|
23142
|
+
}, Oy = async (e, t, n = {}) => {
|
|
23143
|
+
if (!Ey) {
|
|
23009
23144
|
console.error("DropBox: Config not found");
|
|
23010
23145
|
return;
|
|
23011
23146
|
}
|
|
23012
|
-
let r = await Fi(
|
|
23147
|
+
let r = await Fi(Ey.clientId);
|
|
23013
23148
|
if (!r) {
|
|
23014
23149
|
console.error("DropBox: Access token not found");
|
|
23015
23150
|
return;
|
|
@@ -23034,47 +23169,47 @@ var Ty = async (e, t, n = {}) => {
|
|
|
23034
23169
|
}).finally(() => {
|
|
23035
23170
|
console.log("DropBox: Fetch operation completed", e, t);
|
|
23036
23171
|
});
|
|
23037
|
-
},
|
|
23038
|
-
let n =
|
|
23039
|
-
return (t ?
|
|
23040
|
-
},
|
|
23172
|
+
}, ky = (e, t = !1) => {
|
|
23173
|
+
let n = Ey?.rootPath || "";
|
|
23174
|
+
return (t ? Ty : "") + (e.startsWith(n) ? e : n + e);
|
|
23175
|
+
}, Ay = async (e, t = "", n = !1) => {
|
|
23041
23176
|
let r = {};
|
|
23042
|
-
return (await
|
|
23177
|
+
return (await Wy.listFolders({
|
|
23043
23178
|
path: `${e + t}`,
|
|
23044
23179
|
recursive: !0
|
|
23045
23180
|
})).forEach((e) => {
|
|
23046
23181
|
e[".tag"] !== "folder" && (r[n ? vi.changeFilename(e.path_display, { ext: "" }) : e.path_display] = e.name);
|
|
23047
23182
|
}), r;
|
|
23048
|
-
},
|
|
23183
|
+
}, jy = async (e, t) => {
|
|
23049
23184
|
if (!e.async_job_id) return Promise.reject(e);
|
|
23050
23185
|
let n, r = !0;
|
|
23051
|
-
for (; r;) await St(100), n = await
|
|
23186
|
+
for (; r;) await St(100), n = await Oy(`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);
|
|
23052
23187
|
return n?.[".tag"] === "complete" ? Promise.resolve(n.entries) : Promise.reject(n);
|
|
23053
|
-
},
|
|
23054
|
-
let n = "files/create_folder_batch", r = await
|
|
23188
|
+
}, My = async (e, t = "") => {
|
|
23189
|
+
let n = "files/create_folder_batch", r = await Oy(`https://api.dropboxapi.com/2/${n}`, {
|
|
23055
23190
|
autorename: !1,
|
|
23056
23191
|
force_async: !0,
|
|
23057
|
-
paths: e.map((e) =>
|
|
23192
|
+
paths: e.map((e) => ky(t + e))
|
|
23058
23193
|
});
|
|
23059
|
-
return r ?
|
|
23060
|
-
},
|
|
23061
|
-
let n = "files/create_folder_batch", r = await
|
|
23062
|
-
return r ?
|
|
23063
|
-
},
|
|
23194
|
+
return r ? jy(r, n) : void 0;
|
|
23195
|
+
}, Ny = async (e, t = "") => {
|
|
23196
|
+
let n = "files/create_folder_batch", r = await Oy(`https://api.dropboxapi.com/2/${n}`, { entries: e.map((e) => ({ path: ky(t + e) })) });
|
|
23197
|
+
return r ? jy(r, n) : void 0;
|
|
23198
|
+
}, Py = async (e, t) => Oy("https://api.dropboxapi.com/2/files/tags/add", {
|
|
23064
23199
|
path: e,
|
|
23065
23200
|
tag_text: t.toLowerCase().replaceAll(/[^a-z0-9]/g, "")
|
|
23066
|
-
}),
|
|
23067
|
-
for (let n in e) for (let r of e[n]) await
|
|
23068
|
-
},
|
|
23069
|
-
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await
|
|
23201
|
+
}), Fy = async (e, t = "") => {
|
|
23202
|
+
for (let n in e) for (let r of e[n]) await Py(ky(t + n), r);
|
|
23203
|
+
}, Iy = async ({ path: e = "", recursive: t = !1 } = {}) => {
|
|
23204
|
+
let n = [], r = async ({ path: e, cursor: t, recursive: n }) => e ? await Oy("https://api.dropboxapi.com/2/files/list_folder", {
|
|
23070
23205
|
include_deleted: !1,
|
|
23071
23206
|
include_has_explicit_shared_members: !1,
|
|
23072
23207
|
include_media_info: !1,
|
|
23073
23208
|
include_mounted_folders: !0,
|
|
23074
23209
|
include_non_downloadable_files: !0,
|
|
23075
|
-
path:
|
|
23210
|
+
path: ky(e),
|
|
23076
23211
|
recursive: n
|
|
23077
|
-
}) : await
|
|
23212
|
+
}) : await Oy("https://api.dropboxapi.com/2/files/list_folder/continue", { cursor: t }), i = {
|
|
23078
23213
|
has_more: !0,
|
|
23079
23214
|
cursor: "",
|
|
23080
23215
|
entries: []
|
|
@@ -23087,44 +23222,44 @@ var Ty = async (e, t, n = {}) => {
|
|
|
23087
23222
|
recursive: t
|
|
23088
23223
|
}), i && n.push(...i.entries);
|
|
23089
23224
|
return n;
|
|
23090
|
-
},
|
|
23091
|
-
let t = async (e) => await
|
|
23225
|
+
}, Ly = async (e) => {
|
|
23226
|
+
let t = async (e) => await Oy("https://api.dropboxapi.com/2/files/copy_batch_v2", {
|
|
23092
23227
|
entries: e,
|
|
23093
23228
|
autorename: !1
|
|
23094
|
-
}), n = async (e) => await
|
|
23229
|
+
}), n = async (e) => await Oy("https://api.dropboxapi.com/2/files/copy_batch/check_v2", { async_job_id: e }), r = [], i = [];
|
|
23095
23230
|
for (let a = 0; a < e.length; a += 900) {
|
|
23096
23231
|
i = e.slice(a, a + 900).map((e) => ({
|
|
23097
|
-
from_path:
|
|
23098
|
-
to_path:
|
|
23232
|
+
from_path: ky(e.from),
|
|
23233
|
+
to_path: ky(e.to)
|
|
23099
23234
|
}));
|
|
23100
23235
|
let o = await t(i);
|
|
23101
23236
|
if (!o) continue;
|
|
23102
23237
|
if (o.error) throw Error(`Error starting copy: ${o.error}`);
|
|
23103
23238
|
let s = o;
|
|
23104
|
-
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await St(
|
|
23239
|
+
for (; s?.[".tag"] === "async_job_id" || s?.[".tag"] === "in_progress";) await St(wy), s = await n(o.async_job_id ?? "");
|
|
23105
23240
|
if (s?.[".tag"] === "failed") throw Error(`Copy operation failed: ${s[".tag"]}`);
|
|
23106
23241
|
s?.[".tag"] === "complete" && s.entries && r.push(...s.entries);
|
|
23107
23242
|
}
|
|
23108
23243
|
return r.filter((e) => e[".tag"] === "failure").map((e) => e.failure);
|
|
23109
|
-
},
|
|
23110
|
-
let t = async (e) => await
|
|
23244
|
+
}, Ry = async (e) => {
|
|
23245
|
+
let t = async (e) => await Oy("https://api.dropboxapi.com/2/files/move_v2", {
|
|
23111
23246
|
...e,
|
|
23112
23247
|
autorename: !0
|
|
23113
23248
|
});
|
|
23114
23249
|
for (let n of e) await t({
|
|
23115
|
-
from_path:
|
|
23116
|
-
to_path:
|
|
23250
|
+
from_path: ky(n.from),
|
|
23251
|
+
to_path: ky(n.to)
|
|
23117
23252
|
});
|
|
23118
|
-
},
|
|
23253
|
+
}, zy = async ({ thumbnailsRequest: e = [], size: t = "w64h64", format: n = "jpeg", mode: r = "strict" }, i) => {
|
|
23119
23254
|
let a = {}, o = [];
|
|
23120
23255
|
for (let s = 0; s < e.length; s += 25) {
|
|
23121
23256
|
let c = e.slice(s, s + 25), l = c.map((e) => ({
|
|
23122
|
-
path:
|
|
23257
|
+
path: ky(e.path),
|
|
23123
23258
|
format: n,
|
|
23124
23259
|
size: t,
|
|
23125
23260
|
mode: r
|
|
23126
23261
|
}));
|
|
23127
|
-
await St(100), o.push(
|
|
23262
|
+
await St(100), o.push(Oy("https://content.dropboxapi.com/2/files/get_thumbnail_batch", { entries: l }).then((e) => {
|
|
23128
23263
|
if (!e) return;
|
|
23129
23264
|
let n = e.entries.reduce((e, n, r) => {
|
|
23130
23265
|
let i = c[r].path, [a, o] = t.replace("w", "").split("h").map(Number), s = n;
|
|
@@ -23143,7 +23278,7 @@ var Ty = async (e, t, n = {}) => {
|
|
|
23143
23278
|
}));
|
|
23144
23279
|
}
|
|
23145
23280
|
return Promise.all(o).then(() => a);
|
|
23146
|
-
},
|
|
23281
|
+
}, By = (e, t = "application/octet-stream", n = 512) => {
|
|
23147
23282
|
let r = atob(e), i = [];
|
|
23148
23283
|
for (let e = 0; e < r.length; e += n) {
|
|
23149
23284
|
let t = r.slice(e, e + n), a = Array(t.length);
|
|
@@ -23152,11 +23287,11 @@ var Ty = async (e, t, n = {}) => {
|
|
|
23152
23287
|
i.push(o);
|
|
23153
23288
|
}
|
|
23154
23289
|
return new Blob(i, { type: t });
|
|
23155
|
-
},
|
|
23290
|
+
}, Vy = async (e, t) => {
|
|
23156
23291
|
try {
|
|
23157
23292
|
let n = t.split(",")[1];
|
|
23158
|
-
|
|
23159
|
-
path:
|
|
23293
|
+
Dy("https://content.dropboxapi.com/2/files/upload", By(n, "application/octet-stream"), { "Dropbox-API-Arg": JSON.stringify({
|
|
23294
|
+
path: ky(e),
|
|
23160
23295
|
mode: "overwrite",
|
|
23161
23296
|
autorename: !0,
|
|
23162
23297
|
mute: !1
|
|
@@ -23166,12 +23301,12 @@ var Ty = async (e, t, n = {}) => {
|
|
|
23166
23301
|
} catch (e) {
|
|
23167
23302
|
console.error("Errore durante il caricamento su Dropbox:", e);
|
|
23168
23303
|
}
|
|
23169
|
-
},
|
|
23170
|
-
if (!
|
|
23304
|
+
}, Hy = (e = !1) => Ey ? Mi(Ey.clientId, e) : !1, Uy = (e = {}) => {
|
|
23305
|
+
if (!Ey) return /* @__PURE__ */ f.createElement("div", {
|
|
23171
23306
|
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.",
|
|
23172
23307
|
className: "text-danger flex items-center gap-2"
|
|
23173
23308
|
}, /* @__PURE__ */ f.createElement(Q, { name: "warning" }), /* @__PURE__ */ f.createElement("span", null, "Dropbox non configurato"));
|
|
23174
|
-
let t =
|
|
23309
|
+
let t = Hy(!0);
|
|
23175
23310
|
return /* @__PURE__ */ f.createElement(Li, {
|
|
23176
23311
|
provider: "dropboxAuth",
|
|
23177
23312
|
intent: "connect",
|
|
@@ -23183,33 +23318,33 @@ var Ty = async (e, t, n = {}) => {
|
|
|
23183
23318
|
title: t ? "DropBox Connected" : "DropBox Disconnected"
|
|
23184
23319
|
}
|
|
23185
23320
|
});
|
|
23186
|
-
},
|
|
23321
|
+
}, Wy = {
|
|
23187
23322
|
setRootPath: (e) => {
|
|
23188
|
-
|
|
23189
|
-
},
|
|
23190
|
-
resolvePath:
|
|
23191
|
-
createFolders:
|
|
23192
|
-
deleteBulk:
|
|
23193
|
-
addTags:
|
|
23194
|
-
listFolders:
|
|
23195
|
-
getThumbnails:
|
|
23196
|
-
search:
|
|
23197
|
-
upload:
|
|
23198
|
-
copy:
|
|
23199
|
-
move:
|
|
23200
|
-
},
|
|
23323
|
+
Ey && (Ey.rootPath = e);
|
|
23324
|
+
},
|
|
23325
|
+
resolvePath: ky,
|
|
23326
|
+
createFolders: My,
|
|
23327
|
+
deleteBulk: Ny,
|
|
23328
|
+
addTags: Fy,
|
|
23329
|
+
listFolders: Iy,
|
|
23330
|
+
getThumbnails: zy,
|
|
23331
|
+
search: Ay,
|
|
23332
|
+
upload: Vy,
|
|
23333
|
+
copy: Ly,
|
|
23334
|
+
move: Ry
|
|
23335
|
+
}, Gy = "https://api.serpapi.com/search", Ky = "google", qy = "google_images", Jy = "google_autocomplete", Yy = "google_trends", Xy = "google_maps", Zy = "google_maps_photos", Qy = "google_maps_reviews", $y = {
|
|
23201
23336
|
engine: null,
|
|
23202
23337
|
device: null,
|
|
23203
23338
|
no_cache: !1,
|
|
23204
23339
|
async: !1,
|
|
23205
23340
|
output: "json"
|
|
23206
|
-
},
|
|
23341
|
+
}, eb = { q: null }, tb = {
|
|
23207
23342
|
tbs: null,
|
|
23208
23343
|
safe: "active",
|
|
23209
23344
|
nfpr: 0,
|
|
23210
23345
|
filter: 1
|
|
23211
23346
|
};
|
|
23212
|
-
function
|
|
23347
|
+
function nb(e) {
|
|
23213
23348
|
let t = du(), n = du(!0), r = fu(!0), i = {
|
|
23214
23349
|
location: t,
|
|
23215
23350
|
uule: null
|
|
@@ -23227,13 +23362,13 @@ function eb(e) {
|
|
|
23227
23362
|
hl: r
|
|
23228
23363
|
};
|
|
23229
23364
|
return {
|
|
23230
|
-
[
|
|
23231
|
-
|
|
23365
|
+
[Ky]: {
|
|
23366
|
+
...$y,
|
|
23232
23367
|
...i,
|
|
23233
23368
|
...o,
|
|
23234
|
-
|
|
23235
|
-
...
|
|
23236
|
-
engine:
|
|
23369
|
+
...tb,
|
|
23370
|
+
...eb,
|
|
23371
|
+
engine: Ky,
|
|
23237
23372
|
ludocid: null,
|
|
23238
23373
|
lsig: null,
|
|
23239
23374
|
kgmid: null,
|
|
@@ -23242,29 +23377,29 @@ function eb(e) {
|
|
|
23242
23377
|
start: null,
|
|
23243
23378
|
num: null
|
|
23244
23379
|
},
|
|
23245
|
-
[
|
|
23246
|
-
|
|
23380
|
+
[qy]: {
|
|
23381
|
+
...$y,
|
|
23247
23382
|
...i,
|
|
23248
23383
|
...o,
|
|
23249
|
-
|
|
23250
|
-
...
|
|
23251
|
-
engine:
|
|
23384
|
+
...tb,
|
|
23385
|
+
...eb,
|
|
23386
|
+
engine: qy,
|
|
23252
23387
|
chips: null,
|
|
23253
23388
|
ijn: null
|
|
23254
23389
|
},
|
|
23255
|
-
[
|
|
23256
|
-
|
|
23390
|
+
[Jy]: {
|
|
23391
|
+
...$y,
|
|
23257
23392
|
...o,
|
|
23258
|
-
...
|
|
23259
|
-
engine:
|
|
23393
|
+
...eb,
|
|
23394
|
+
engine: Jy,
|
|
23260
23395
|
cp: null,
|
|
23261
23396
|
client: null
|
|
23262
23397
|
},
|
|
23263
|
-
[
|
|
23264
|
-
|
|
23398
|
+
[Yy]: {
|
|
23399
|
+
...$y,
|
|
23265
23400
|
...a,
|
|
23266
|
-
...
|
|
23267
|
-
engine:
|
|
23401
|
+
...eb,
|
|
23402
|
+
engine: Yy,
|
|
23268
23403
|
data_type: null,
|
|
23269
23404
|
tz: null,
|
|
23270
23405
|
cat: null,
|
|
@@ -23272,73 +23407,73 @@ function eb(e) {
|
|
|
23272
23407
|
date: null,
|
|
23273
23408
|
csv: null
|
|
23274
23409
|
},
|
|
23275
|
-
[
|
|
23276
|
-
|
|
23410
|
+
[Xy]: {
|
|
23411
|
+
...$y,
|
|
23277
23412
|
...i,
|
|
23278
23413
|
...o,
|
|
23279
|
-
|
|
23280
|
-
...
|
|
23281
|
-
engine:
|
|
23414
|
+
...tb,
|
|
23415
|
+
...eb,
|
|
23416
|
+
engine: Xy
|
|
23282
23417
|
},
|
|
23283
|
-
[
|
|
23284
|
-
|
|
23418
|
+
[Zy]: {
|
|
23419
|
+
...$y,
|
|
23285
23420
|
...s,
|
|
23286
|
-
engine:
|
|
23421
|
+
engine: Zy
|
|
23287
23422
|
},
|
|
23288
|
-
[
|
|
23289
|
-
|
|
23423
|
+
[Qy]: {
|
|
23424
|
+
...$y,
|
|
23290
23425
|
...s,
|
|
23291
|
-
engine:
|
|
23426
|
+
engine: Qy
|
|
23292
23427
|
}
|
|
23293
23428
|
}[e] ?? {};
|
|
23294
23429
|
}
|
|
23295
|
-
var
|
|
23430
|
+
var rb = void 0;
|
|
23296
23431
|
typeof Xa == "function" && Xa((e) => {
|
|
23297
|
-
|
|
23432
|
+
rb = e.scrape;
|
|
23298
23433
|
});
|
|
23299
|
-
function
|
|
23434
|
+
function ib(e) {
|
|
23300
23435
|
let t = {};
|
|
23301
23436
|
for (let n in e) e[n] !== null && (t[n] = e[n]);
|
|
23302
23437
|
return t;
|
|
23303
23438
|
}
|
|
23304
|
-
var
|
|
23305
|
-
function
|
|
23306
|
-
let t =
|
|
23307
|
-
return t.length === 0 ? null : (e &&
|
|
23439
|
+
var ab = 0;
|
|
23440
|
+
function ob(e = !1) {
|
|
23441
|
+
let t = rb?.serpApiKey?.split(",").map((e) => e.trim()).filter(Boolean) || [];
|
|
23442
|
+
return t.length === 0 ? null : (e && ab++, ab < t.length ? t[ab] : null);
|
|
23308
23443
|
}
|
|
23309
|
-
var
|
|
23444
|
+
var sb = async (e, t) => {
|
|
23310
23445
|
let n = (n) => {
|
|
23311
|
-
let r =
|
|
23312
|
-
...
|
|
23446
|
+
let r = ib({
|
|
23447
|
+
...nb(t),
|
|
23313
23448
|
api_key: n,
|
|
23314
23449
|
q: e
|
|
23315
23450
|
});
|
|
23316
|
-
return console.log(
|
|
23317
|
-
}, r =
|
|
23451
|
+
return console.log(Gy, r), `${Gy}?${new URLSearchParams(r)}`;
|
|
23452
|
+
}, r = ob();
|
|
23318
23453
|
for (; r;) try {
|
|
23319
23454
|
return await nn(n(r));
|
|
23320
23455
|
} catch (e) {
|
|
23321
23456
|
if (e?.error === "quota_exceeded") {
|
|
23322
|
-
console.warn(`SerpApi: invalid api key: ${r}`, e), r =
|
|
23457
|
+
console.warn(`SerpApi: invalid api key: ${r}`, e), r = ob(!0);
|
|
23323
23458
|
continue;
|
|
23324
23459
|
}
|
|
23325
23460
|
throw console.error(`SerpApi: ${r}`, e), e;
|
|
23326
23461
|
}
|
|
23327
23462
|
return null;
|
|
23328
|
-
},
|
|
23463
|
+
}, cb = async (e, t, n) => {
|
|
23329
23464
|
let r = `${to}/${bt(t)}/${bt(e)}`, i = await n.read(r);
|
|
23330
23465
|
if (i) return i;
|
|
23331
|
-
let a = await
|
|
23466
|
+
let a = await sb(e, t);
|
|
23332
23467
|
return a ? n.set(r, a) : console.warn(`SerpApi ${t}: No Result`), a ?? {};
|
|
23333
|
-
},
|
|
23334
|
-
googleSearch: async (t) =>
|
|
23335
|
-
googleImages: async (t) =>
|
|
23336
|
-
googleAutocomplete: async (t) =>
|
|
23337
|
-
googleTrends: async (t) =>
|
|
23338
|
-
googleMaps: async (t) =>
|
|
23339
|
-
googleMapsPhotos: async (t) =>
|
|
23340
|
-
googleMapsReviews: async (t) =>
|
|
23341
|
-
}),
|
|
23468
|
+
}, lb = (e) => ({
|
|
23469
|
+
googleSearch: async (t) => cb(t, Ky, e),
|
|
23470
|
+
googleImages: async (t) => cb(t, qy, e),
|
|
23471
|
+
googleAutocomplete: async (t) => cb(t, Jy, e),
|
|
23472
|
+
googleTrends: async (t) => cb(t, Yy, e),
|
|
23473
|
+
googleMaps: async (t) => cb(t, Xy, e),
|
|
23474
|
+
googleMapsPhotos: async (t) => cb(t, Zy, e),
|
|
23475
|
+
googleMapsReviews: async (t) => cb(t, Qy, e)
|
|
23476
|
+
}), ub = {
|
|
23342
23477
|
"+": "+",
|
|
23343
23478
|
"﹢": "+",
|
|
23344
23479
|
"-": "-",
|
|
@@ -23413,7 +23548,7 @@ var ab = async (e, t) => {
|
|
|
23413
23548
|
x: "x",
|
|
23414
23549
|
y: "y",
|
|
23415
23550
|
z: "z"
|
|
23416
|
-
},
|
|
23551
|
+
}, db = {
|
|
23417
23552
|
email: {
|
|
23418
23553
|
description: "Email: no spaces -> Lower/Trim",
|
|
23419
23554
|
transformations: [{
|
|
@@ -23459,7 +23594,7 @@ var ab = async (e, t) => {
|
|
|
23459
23594
|
transformations: [],
|
|
23460
23595
|
mask: ["toSlug"]
|
|
23461
23596
|
}
|
|
23462
|
-
},
|
|
23597
|
+
}, fb = [
|
|
23463
23598
|
{
|
|
23464
23599
|
pattern: "email*",
|
|
23465
23600
|
use: "email"
|
|
@@ -23476,24 +23611,24 @@ var ab = async (e, t) => {
|
|
|
23476
23611
|
pattern: "date*",
|
|
23477
23612
|
use: "date"
|
|
23478
23613
|
}
|
|
23479
|
-
],
|
|
23480
|
-
function
|
|
23481
|
-
return e ? e.normalize("NFKC").replace(
|
|
23614
|
+
], pb = new RegExp(Object.keys(ub).join("|"), "g");
|
|
23615
|
+
function mb(e) {
|
|
23616
|
+
return e ? e.normalize("NFKC").replace(pb, (e) => ub[e] ?? e) : "";
|
|
23482
23617
|
}
|
|
23483
|
-
var
|
|
23618
|
+
var hb = class {
|
|
23484
23619
|
config;
|
|
23485
23620
|
matches;
|
|
23486
23621
|
constructor(e = {}, t = []) {
|
|
23487
23622
|
this.config = {
|
|
23488
|
-
...
|
|
23623
|
+
...db,
|
|
23489
23624
|
...e
|
|
23490
|
-
}, this.matches = [...
|
|
23625
|
+
}, this.matches = [...fb, ...t];
|
|
23491
23626
|
}
|
|
23492
23627
|
apply(e, t, n = !1) {
|
|
23493
23628
|
let r = this.config[e];
|
|
23494
23629
|
if (!r) return n ? Jt(t) : t;
|
|
23495
23630
|
let i = t;
|
|
23496
|
-
i =
|
|
23631
|
+
i = mb(String(i ?? ""));
|
|
23497
23632
|
let a = r.exclusions;
|
|
23498
23633
|
if (Array.isArray(a) && a.length) {
|
|
23499
23634
|
let e = String(i).toLowerCase();
|
|
@@ -23552,7 +23687,7 @@ var pb = class {
|
|
|
23552
23687
|
};
|
|
23553
23688
|
//#endregion
|
|
23554
23689
|
//#region src/libs/csv.ts
|
|
23555
|
-
function
|
|
23690
|
+
function gb(e, t) {
|
|
23556
23691
|
let n = ze.parse(e, {
|
|
23557
23692
|
header: !0,
|
|
23558
23693
|
skipEmptyLines: !0,
|
|
@@ -23565,6 +23700,6 @@ function mb(e, t) {
|
|
|
23565
23700
|
};
|
|
23566
23701
|
}
|
|
23567
23702
|
//#endregion
|
|
23568
|
-
export { Eu as AIProvider,
|
|
23703
|
+
export { Eu as AIProvider, ly as AI_PROVIDER_DEFINITIONS, dy as AI_PROVIDER_DESCRIPTORS, l as AI_PROVIDER_HOSTS, ri as ActionButton, _m as AddressAutocomplete, cs as Alert, gc as AnimatedNumber, qv as App, Kv as AppProvider, oc as AreaChart, ua as AsyncDropdown, Li as AuthButton, gi as AuthProvider, xl as Autocomplete, xn as BUILT_IN_THEMES, _n as BUILT_IN_THEME_IDS, ii as BackLink, pr as Badge, fr as BadgeOverlay, uc as BarList, _a as Brand, Ta as Breadcrumbs, tv as CLOUDFLARE_PROVIDER_DESCRIPTOR, ad as CONTEXT_MENU_SEARCH_THRESHOLD, mc as CalendarHeatmap, Ki as Card, Ea as Carousel, Ys as ChartDataTable, qs as ChartLegend, mg as ChatActivity, $h as ChatMarkdown, fg as ChatQuestions, tg as ChatReasoning, Fd as Chatbot, nl as Checkbox, Sl as Checklist, ks as Code, Cf as CodeEditor, rf as CodeSyntaxError, lr as Col, qc as Color, Qs as ColumnChart, Jf as Component, Yf as ComponentBlock, sr as Container, Sd as ContextMenu, Kl as CropImage, Qm as DEFAULT_DOCUMENT_HEAD, Zm as DEFAULT_HEAD_APP_NAME, $m as DEFAULT_LANGUAGE_HEAD, sl as DEFAULT_ORDER, zi as DataProvider, Jc as Date, Xc as DateTime, ds as DescriptionList, ry as DirectApiProviderAdapter, tc as DivergingBarChart, Uy as DropBoxConnectButton, x_ as DropboxAuthProvider, la as Dropdown, da as DropdownButton, ma as DropdownDivider, pa as DropdownHeader, fa as DropdownItem, ha as DropdownMenu, sy as EMAIL_PROVIDER_DEFINITIONS, Gc as Email, qg as EmailProvider, Bc as FieldError, $l as FileNameEditor, ay as FirebaseApiProviderAdapter, m_ as FirebaseAuthProvider, u_ as FirebaseDataProvider, Jo as FirebaseStorageProvider, So as FirestoreDataProvider, Cp as Form, cp as FormControllerContext, _g as Gallery, C_ as GitHubAuthProvider, E_ as GmailEmailProvider, ai as GoSite, Gg as GoogleAuthProvider, im as GoogleMapsProvider, y_ as GoogleServiceAccountProvider, Mg as Grid, jg as GridArray, Ag as GridCore, Fm as GridDB, vg as GridGalleryView, Jm as GridTableView, Oh as Head, gh as HeadProvider, fc as Heatmap, tl as Hidden, Jn as I18nProvider, Q as Icon, Lr as IconProvider, Ns as Identicon, ga as Image, yi as ImageAvatar, Rl as ImageEditor, Bl as ImageField, Hc as Input, il as Label, nm as LayoutBuilder, ac as LineChart, bm as ListCard, ol as ListGroup, Vi as Loader, ni as LoadingButton, vc as LocaleSwitcher, Er as LucideIconProvider, Ih as MarkdownReader, dc as MeasureBarList, sa as Menu, iy as MockApiProviderAdapter, Ho as MockDataProvider, ra as Modal, oa as ModalOk, aa as ModalYesNo, Qc as Month, ub as NORMALIZE_MAP, Oa as Notifications, Wc as Number, fy as OPENAI_COMPATIBLE_PROVIDER_DESCRIPTOR, ul as Order, cy as PUBLISH_PROVIDER_DEFINITIONS, Ng as PageUsers, gg as Pagination, Kc as Password, wc as Percentage, kr as PhosphorIconProvider, qd as Prompt, Id as PromptMode, id as PromptUtils, as as ProviderSwitcher, $c as Range, oi as ReferSite, Pp as Repeat, Gf as RichText, cr as Row, t as SERVER_CREDENTIAL_PREFIX, hb as Sanitizer, cc as ScatterChart, Aa as Search, yl as Select, ec as SequenceColumnChart, Mm as SideNav, Sm as SortableList, sc as Sparkline, $s as StackedColumnChart, Fl as StorageProvider, Uc as String, oy as SupabaseApiProviderAdapter, O_ as SupabaseAuthProvider, Fo as SupabaseDataProvider, Yo as SupabaseStorageProvider, rl as Switch, Hp as Tab, hg as TabDynamic, Bp as TabItem, zp as TabLayouts, Gp as Table, al as TextArea, Ba as ThemeSwitcher, Yc as Time, Na as Toolbar, hs as Tree, vm as UploadCSV, su as UploadDocument, cu as UploadImage, el as Url, Zc as Week, Z as Wrapper, Nt as arrayUnique, Rt as arraysEqual, Lt as base64Encode, Ht as base64ToBlob, Ut as base64ToUrl, va as buildBreadcrumbSchema, u as buildModelIdentityIndex, vd as buildTextCommandContext, Vr as buttonBaseClass, Wr as buttonDangerClass, Yr as buttonDarkClass, qr as buttonInfoClass, Jr as buttonLightClass, ei as buttonLinkClass, Qr as buttonOutlineDangerClass, Xr as buttonOutlinePrimaryClass, Zr as buttonOutlineSecondaryClass, $r as buttonOutlineSuccessClass, Hr as buttonPrimaryClass, Ur as buttonSecondaryClass, Gr as buttonSuccessClass, Kr as buttonWarningClass, uo as callFirebaseFunction, o as canonicalModelName, Fs as chartFill, Ps as chartToken, Dt as checkConditions, Gt as cleanRecord, X as cn, Mu as configureProxy, ft as converter, gt as copyToClipboard, Ot as crc32, my as createAIProviderRegistry, ev as createCloudflareProviderDefinition, vr as createMotionTransition, hy as createServerCredentialAIRegistry, Bn as createTranslations, ht as decodeJWT, zn as defineLocaleMessages, xt as dirname, Wy as dropBox, wt as eventClosest, nn as fetchJson, tn as fetchRest, rn as fetchWithRetry, Mc as fieldAddonClass, kc as fieldControlBaseClass, Oc as fieldFeedbackClass, jc as fieldGroupClass, Dc as fieldLabelClass, Ac as fieldTextAreaBaseClass, Cu as formatAIModelRef, Ct as generateUniqueId, Zu as getAIModelCatalog, Fi as getAccessToken, hd as getAutoClosedSuffixLength, mf as getCodeValidationResult, ou as getFileUrl, fi as getGlobalVars, Sy as getGoogleTrendsData, Cy as getGoogleTrendsRelated, xy as getKeywordIdeas, Si as getProviderConfigurationState, Wt as getRecordValue, Ip as getTabLayoutConfig, Rp as getTabPaneClassName, Lp as getTabTriggerClassName, w_ as googleGetAccessToken, Cd as groupModelOptions, md as hasAutoClosedSuffix, Ms as identiconPattern, Vn as interpolate, jt as intersectObjects, n as isAIProviderTarget, ur as isBadgeDescriptor, Pt as isEmpty, Su as isFreeAIModel, Td as isFreeModelOption, Bt as isInteractiveElement, Lu as isProxyEnabled, dl as labelText, cm as loadGoogleMaps, c as loadModelIdentityIndex, At as loadScripts, ey as locales, gd as matchCommandTrigger, i as modelOffers, xm as moveItem, Rs as niceMax, dr as normalizeBadgeProps, bt as normalizeKey, vt as normalizePath, mb as normalizeVisualChars, wu as parseAIModelRef, gb as parseCsvText, vi as path, Fu as proxyFetch, qt as recordsEqual, Zo as registerProviderSessionFactory, mi as removeGlobalVars, Vt as render2Base64, Gh as repairStreamingMarkdown, Et as replacePlaceholders, Mt as replaceVariables, e as resolveModel, yr as resolveMotionEffect, nf as runPrompt, It as safeClone, zt as sanitizeKey, lb as scrape, T_ as sendEmail, r as serverCredential, pi as setGlobalVars, St as sleep, Jt as smartTypeCast, Tt as substrCount, zs as ticks, uy as toProviderDescriptor, gs as treeFromPaths, _t as trimPath, yt as trimSlash, kt as ucfirst, Du as useAIProvider, Ou as useAIProviderRegistry, Mi as useAccessToken, Us as useAnimatedValues, ty as useApiProvider, Th as useAssetsHead, _i as useAuthProvider, Bs as useChartFormat, Js as useChartTooltip, Ks as useChartWidth, Zg as useCredentialsProvider, Bi as useDataProvider, wh as useDocumentHead, Hy as useDropBoxConnect, Ec as useEditorHeight, Jg as useEmailProvider, Cr as useEnterMotion, eu as useFileUploadCore, up as useFormActions, yp as useFormContext, lp as useFormController, di as useGlobalVars, am as useGoogleMapsConfig, yh as useHead, xh as useHeadLinks, Y as useI18n, zr as useIconController, Rr as useIconProvider, Dl as useImage, Ch as useLanguageHead, Jv as useMenu, br as useMotionEffect, xr as useMotionState, Sh as usePaginationHead, Sr as usePressMotion, Ga as useProvider, rs as useProviderSession, Iu as useProxy, Eh as usePwaHead, Ws as useReveal, Dh as useSchemaOrgHead, Wa as useSetProvider, bh as useSocialHead, Il as useStorageProvider, J as useTheme, Ln as useThemeController, pf as validateCodeSyntax };
|
|
23569
23704
|
|
|
23570
23705
|
//# sourceMappingURL=index.mjs.map
|