@mlightcad/cad-llm-plugin 1.8.0-preview.6 → 1.8.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/{cad-llm-plugin-cad-llm-plugin-CUD12ss2.js → cad-llm-plugin-cad-llm-plugin-DO9FgSsR.js} +390 -387
- package/dist/{cad-llm-plugin-cad-llm-plugin-nXv_Lph-.js → cad-llm-plugin-cad-llm-plugin-DlRbTdyT.js} +17 -17
- package/dist/{cad-llm-plugin-cad-llm-plugin-register-BMfUTRMq.js → cad-llm-plugin-cad-llm-plugin-register-CwDcWhV5.js} +1 -1
- package/dist/{cad-llm-plugin-cad-llm-plugin-register-W9G8zpBG.js → cad-llm-plugin-cad-llm-plugin-register-TJETetnW.js} +1 -1
- package/dist/cad-llm-plugin-register.js +2 -2
- package/dist/cad-llm-plugin-register.umd.cjs +1 -1
- package/dist/cad-llm-plugin.js +2 -2
- package/dist/cad-llm-plugin.umd.cjs +1 -1
- package/lib/AcApLlmOcrProviders.d.ts.map +1 -1
- package/lib/AcApLlmOcrProviders.js +19 -6
- package/lib/AcApLlmOcrProviders.js.map +1 -1
- package/package.json +3 -3
package/dist/{cad-llm-plugin-cad-llm-plugin-CUD12ss2.js → cad-llm-plugin-cad-llm-plugin-DO9FgSsR.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AcApTextRecognitionService as
|
|
2
|
-
import { l as j, a as kc, L as Ic } from "./cad-llm-plugin-cad-llm-plugin-register-
|
|
1
|
+
import { AcApTextRecognitionService as _r, AcUiDialog as bc, AcEdCommand as wc, AcEdCommandStack as xc } from "@mlightcad/cad-simple-viewer";
|
|
2
|
+
import { l as j, a as kc, L as Ic } from "./cad-llm-plugin-cad-llm-plugin-register-TJETetnW.js";
|
|
3
3
|
var ws = "vercel.ai.error", Tc = Symbol.for(ws), Uo, Bo, te = class xs extends (Bo = Error, Uo = Tc, Bo) {
|
|
4
4
|
/**
|
|
5
5
|
* Creates an AI SDK Error.
|
|
@@ -83,7 +83,7 @@ var Es = "AI_InvalidArgumentError", Cs = `vercel.ai.error.${Es}`, Oc = Symbol.fo
|
|
|
83
83
|
static isInstance(e) {
|
|
84
84
|
return te.hasMarker(e, $s);
|
|
85
85
|
}
|
|
86
|
-
}, Ns = "AI_InvalidResponseDataError", Rs = `vercel.ai.error.${Ns}`, $c = Symbol.for(Rs), Yo, Xo,
|
|
86
|
+
}, Ns = "AI_InvalidResponseDataError", Rs = `vercel.ai.error.${Ns}`, $c = Symbol.for(Rs), Yo, Xo, gr = class extends (Xo = te, Yo = $c, Xo) {
|
|
87
87
|
constructor({
|
|
88
88
|
data: e,
|
|
89
89
|
message: t = `Invalid response data: ${JSON.stringify(e)}.`
|
|
@@ -93,7 +93,7 @@ var Es = "AI_InvalidArgumentError", Cs = `vercel.ai.error.${Es}`, Oc = Symbol.fo
|
|
|
93
93
|
static isInstance(e) {
|
|
94
94
|
return te.hasMarker(e, Rs);
|
|
95
95
|
}
|
|
96
|
-
}, Ps = "AI_JSONParseError", Ms = `vercel.ai.error.${Ps}`, Nc = Symbol.for(Ms), Qo, ei,
|
|
96
|
+
}, Ps = "AI_JSONParseError", Ms = `vercel.ai.error.${Ps}`, Nc = Symbol.for(Ms), Qo, ei, Vn = class extends (ei = te, Qo = Nc, ei) {
|
|
97
97
|
constructor({ text: e, cause: t }) {
|
|
98
98
|
super({
|
|
99
99
|
name: Ps,
|
|
@@ -135,7 +135,7 @@ Error message: ${In(t)}`,
|
|
|
135
135
|
static isInstance(e) {
|
|
136
136
|
return te.hasMarker(e, Us);
|
|
137
137
|
}
|
|
138
|
-
}, Bs = "AI_TypeValidationError", Fs = `vercel.ai.error.${Bs}`, Dc = Symbol.for(Fs), li, ui, mn = class
|
|
138
|
+
}, Bs = "AI_TypeValidationError", Fs = `vercel.ai.error.${Bs}`, Dc = Symbol.for(Fs), li, ui, mn = class zr extends (ui = te, li = Dc, ui) {
|
|
139
139
|
constructor({ value: t, cause: n }) {
|
|
140
140
|
super({
|
|
141
141
|
name: Bs,
|
|
@@ -161,7 +161,7 @@ Error message: ${In(n)}`,
|
|
|
161
161
|
value: t,
|
|
162
162
|
cause: n
|
|
163
163
|
}) {
|
|
164
|
-
return
|
|
164
|
+
return zr.isInstance(n) && n.value === t ? n : new zr({ value: t, cause: n });
|
|
165
165
|
}
|
|
166
166
|
}, Vs = "AI_UnsupportedFunctionalityError", qs = `vercel.ai.error.${Vs}`, Zc = Symbol.for(qs), ci, di, Le = class extends (di = te, ci = Zc, di) {
|
|
167
167
|
constructor({
|
|
@@ -174,20 +174,20 @@ Error message: ${In(n)}`,
|
|
|
174
174
|
return te.hasMarker(e, qs);
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
|
-
class
|
|
177
|
+
class yr extends Error {
|
|
178
178
|
constructor(t, n) {
|
|
179
179
|
super(t), this.name = "ParseError", this.type = n.type, this.field = n.field, this.value = n.value, this.line = n.line;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
const pi = 10, jc = 13, Dt = 32;
|
|
183
|
-
function
|
|
183
|
+
function vr(e) {
|
|
184
184
|
}
|
|
185
185
|
function Lc(e) {
|
|
186
186
|
if (typeof e == "function")
|
|
187
187
|
throw new TypeError(
|
|
188
188
|
"`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?"
|
|
189
189
|
);
|
|
190
|
-
const { onEvent: t =
|
|
190
|
+
const { onEvent: t = vr, onError: n = vr, onRetry: r = vr, onComment: o, maxBufferSize: i } = e, a = [];
|
|
191
191
|
let s = 0, l = !0, c, p = "", g = 0, x, T = !1;
|
|
192
192
|
function I(b) {
|
|
193
193
|
if (T)
|
|
@@ -212,7 +212,7 @@ function Lc(e) {
|
|
|
212
212
|
}
|
|
213
213
|
function E() {
|
|
214
214
|
i !== void 0 && (s + p.length <= i || (T = !0, a.length = 0, s = 0, c = void 0, p = "", g = 0, x = void 0, n(
|
|
215
|
-
new
|
|
215
|
+
new yr(`Buffered data exceeded max buffer size of ${i} characters`, {
|
|
216
216
|
type: "max-buffer-size-exceeded"
|
|
217
217
|
})
|
|
218
218
|
)));
|
|
@@ -307,7 +307,7 @@ ${S}`, g++;
|
|
|
307
307
|
break;
|
|
308
308
|
case "retry":
|
|
309
309
|
/^\d+$/.test(S) ? r(parseInt(S, 10)) : n(
|
|
310
|
-
new
|
|
310
|
+
new yr(`Invalid \`retry\` value: "${S}"`, {
|
|
311
311
|
type: "invalid-retry",
|
|
312
312
|
value: S,
|
|
313
313
|
line: m
|
|
@@ -316,7 +316,7 @@ ${S}`, g++;
|
|
|
316
316
|
break;
|
|
317
317
|
default:
|
|
318
318
|
n(
|
|
319
|
-
new
|
|
319
|
+
new yr(
|
|
320
320
|
`Unknown field "${b.length > 20 ? `${b.slice(0, 20)}…` : b}"`,
|
|
321
321
|
{ type: "unknown-field", field: b, value: S, line: m }
|
|
322
322
|
)
|
|
@@ -415,7 +415,7 @@ function Hs(e) {
|
|
|
415
415
|
function Bc(e, t) {
|
|
416
416
|
return typeof t == "bigint" ? t.toString() : t;
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function oo(e) {
|
|
419
419
|
return {
|
|
420
420
|
get value() {
|
|
421
421
|
{
|
|
@@ -425,10 +425,10 @@ function ro(e) {
|
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function io(e) {
|
|
429
429
|
return e == null;
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function ao(e) {
|
|
432
432
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
433
433
|
return e.slice(t, n);
|
|
434
434
|
}
|
|
@@ -453,7 +453,7 @@ function fe(e, t, n) {
|
|
|
453
453
|
configurable: !0
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function ar(e, t, n) {
|
|
457
457
|
Object.defineProperty(e, t, {
|
|
458
458
|
value: n,
|
|
459
459
|
writable: !0,
|
|
@@ -466,10 +466,10 @@ function an(e) {
|
|
|
466
466
|
}
|
|
467
467
|
const Ws = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
|
|
468
468
|
};
|
|
469
|
-
function
|
|
469
|
+
function qn(e) {
|
|
470
470
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
471
471
|
}
|
|
472
|
-
const Vc =
|
|
472
|
+
const Vc = oo(() => {
|
|
473
473
|
var e;
|
|
474
474
|
if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
|
|
475
475
|
return !1;
|
|
@@ -480,14 +480,14 @@ const Vc = ro(() => {
|
|
|
480
480
|
return !1;
|
|
481
481
|
}
|
|
482
482
|
});
|
|
483
|
-
function
|
|
484
|
-
if (
|
|
483
|
+
function Gn(e) {
|
|
484
|
+
if (qn(e) === !1)
|
|
485
485
|
return !1;
|
|
486
486
|
const t = e.constructor;
|
|
487
487
|
if (t === void 0)
|
|
488
488
|
return !0;
|
|
489
489
|
const n = t.prototype;
|
|
490
|
-
return !(
|
|
490
|
+
return !(qn(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
491
491
|
}
|
|
492
492
|
const qc = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
493
493
|
function Tn(e) {
|
|
@@ -547,13 +547,13 @@ function Jc(e, t) {
|
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
549
|
function Kc(e, t) {
|
|
550
|
-
if (!
|
|
550
|
+
if (!Gn(t))
|
|
551
551
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
552
552
|
const n = {
|
|
553
553
|
...e._zod.def,
|
|
554
554
|
get shape() {
|
|
555
555
|
const r = { ...e._zod.def.shape, ...t };
|
|
556
|
-
return
|
|
556
|
+
return ar(this, "shape", r), r;
|
|
557
557
|
},
|
|
558
558
|
checks: []
|
|
559
559
|
// delete existing checks
|
|
@@ -565,7 +565,7 @@ function Yc(e, t) {
|
|
|
565
565
|
...e._zod.def,
|
|
566
566
|
get shape() {
|
|
567
567
|
const n = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
568
|
-
return
|
|
568
|
+
return ar(this, "shape", n), n;
|
|
569
569
|
},
|
|
570
570
|
catchall: t._zod.def.catchall,
|
|
571
571
|
checks: []
|
|
@@ -644,7 +644,7 @@ function At(e, t, n) {
|
|
|
644
644
|
}
|
|
645
645
|
return delete r.inst, delete r.continue, t != null && t.reportInput || delete r.input, r;
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function so(e) {
|
|
648
648
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
649
649
|
}
|
|
650
650
|
function gn(...e) {
|
|
@@ -874,7 +874,7 @@ const Ed = (e) => {
|
|
|
874
874
|
var n;
|
|
875
875
|
Fe.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
876
876
|
const o = r.value;
|
|
877
|
-
return !
|
|
877
|
+
return !io(o) && o.length !== void 0;
|
|
878
878
|
}), e._zod.onattach.push((r) => {
|
|
879
879
|
const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
|
|
880
880
|
t.maximum < o && (r._zod.bag.maximum = t.maximum);
|
|
@@ -882,7 +882,7 @@ const Ed = (e) => {
|
|
|
882
882
|
const o = r.value;
|
|
883
883
|
if (o.length <= t.maximum)
|
|
884
884
|
return;
|
|
885
|
-
const a =
|
|
885
|
+
const a = so(o);
|
|
886
886
|
r.issues.push({
|
|
887
887
|
origin: a,
|
|
888
888
|
code: "too_big",
|
|
@@ -897,7 +897,7 @@ const Ed = (e) => {
|
|
|
897
897
|
var n;
|
|
898
898
|
Fe.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
899
899
|
const o = r.value;
|
|
900
|
-
return !
|
|
900
|
+
return !io(o) && o.length !== void 0;
|
|
901
901
|
}), e._zod.onattach.push((r) => {
|
|
902
902
|
const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
|
|
903
903
|
t.minimum > o && (r._zod.bag.minimum = t.minimum);
|
|
@@ -905,7 +905,7 @@ const Ed = (e) => {
|
|
|
905
905
|
const o = r.value;
|
|
906
906
|
if (o.length >= t.minimum)
|
|
907
907
|
return;
|
|
908
|
-
const a =
|
|
908
|
+
const a = so(o);
|
|
909
909
|
r.issues.push({
|
|
910
910
|
origin: a,
|
|
911
911
|
code: "too_small",
|
|
@@ -920,7 +920,7 @@ const Ed = (e) => {
|
|
|
920
920
|
var n;
|
|
921
921
|
Fe.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
922
922
|
const o = r.value;
|
|
923
|
-
return !
|
|
923
|
+
return !io(o) && o.length !== void 0;
|
|
924
924
|
}), e._zod.onattach.push((r) => {
|
|
925
925
|
const o = r._zod.bag;
|
|
926
926
|
o.minimum = t.length, o.maximum = t.length, o.length = t.length;
|
|
@@ -928,7 +928,7 @@ const Ed = (e) => {
|
|
|
928
928
|
const o = r.value, i = o.length;
|
|
929
929
|
if (i === t.length)
|
|
930
930
|
return;
|
|
931
|
-
const a =
|
|
931
|
+
const a = so(o), s = i > t.length;
|
|
932
932
|
r.issues.push({
|
|
933
933
|
origin: a,
|
|
934
934
|
...s ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
|
|
@@ -939,7 +939,7 @@ const Ed = (e) => {
|
|
|
939
939
|
continue: !t.abort
|
|
940
940
|
});
|
|
941
941
|
};
|
|
942
|
-
}),
|
|
942
|
+
}), sr = /* @__PURE__ */ O("$ZodCheckStringFormat", (e, t) => {
|
|
943
943
|
var n, r;
|
|
944
944
|
Fe.init(e, t), e._zod.onattach.push((o) => {
|
|
945
945
|
const i = o._zod.bag;
|
|
@@ -957,7 +957,7 @@ const Ed = (e) => {
|
|
|
957
957
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
958
958
|
});
|
|
959
959
|
}), jd = /* @__PURE__ */ O("$ZodCheckRegex", (e, t) => {
|
|
960
|
-
|
|
960
|
+
sr.init(e, t), e._zod.check = (n) => {
|
|
961
961
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
962
962
|
origin: "string",
|
|
963
963
|
code: "invalid_format",
|
|
@@ -969,9 +969,9 @@ const Ed = (e) => {
|
|
|
969
969
|
});
|
|
970
970
|
};
|
|
971
971
|
}), Ld = /* @__PURE__ */ O("$ZodCheckLowerCase", (e, t) => {
|
|
972
|
-
t.pattern ?? (t.pattern = Nd),
|
|
972
|
+
t.pattern ?? (t.pattern = Nd), sr.init(e, t);
|
|
973
973
|
}), Ud = /* @__PURE__ */ O("$ZodCheckUpperCase", (e, t) => {
|
|
974
|
-
t.pattern ?? (t.pattern = Rd),
|
|
974
|
+
t.pattern ?? (t.pattern = Rd), sr.init(e, t);
|
|
975
975
|
}), Bd = /* @__PURE__ */ O("$ZodCheckIncludes", (e, t) => {
|
|
976
976
|
Fe.init(e, t);
|
|
977
977
|
const n = Tn(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
@@ -1118,7 +1118,7 @@ const Hd = {
|
|
|
1118
1118
|
vendor: "zod",
|
|
1119
1119
|
version: 1
|
|
1120
1120
|
};
|
|
1121
|
-
}),
|
|
1121
|
+
}), lo = /* @__PURE__ */ O("$ZodString", (e, t) => {
|
|
1122
1122
|
var n;
|
|
1123
1123
|
_e.init(e, t), e._zod.pattern = [...((n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) ?? []].pop() ?? Ed(e._zod.bag), e._zod.parse = (r, o) => {
|
|
1124
1124
|
if (t.coerce)
|
|
@@ -1134,7 +1134,7 @@ const Hd = {
|
|
|
1134
1134
|
}), r;
|
|
1135
1135
|
};
|
|
1136
1136
|
}), xe = /* @__PURE__ */ O("$ZodStringFormat", (e, t) => {
|
|
1137
|
-
|
|
1137
|
+
sr.init(e, t), lo.init(e, t);
|
|
1138
1138
|
}), Wd = /* @__PURE__ */ O("$ZodGUID", (e, t) => {
|
|
1139
1139
|
t.pattern ?? (t.pattern = hd), xe.init(e, t);
|
|
1140
1140
|
}), Jd = /* @__PURE__ */ O("$ZodUUID", (e, t) => {
|
|
@@ -1418,7 +1418,7 @@ function gi(e, t, n, r) {
|
|
|
1418
1418
|
}
|
|
1419
1419
|
const Sp = /* @__PURE__ */ O("$ZodObject", (e, t) => {
|
|
1420
1420
|
_e.init(e, t);
|
|
1421
|
-
const n =
|
|
1421
|
+
const n = oo(() => {
|
|
1422
1422
|
const g = Object.keys(t.shape);
|
|
1423
1423
|
for (const T of g)
|
|
1424
1424
|
if (!(t.shape[T] instanceof _e))
|
|
@@ -1493,7 +1493,7 @@ const Sp = /* @__PURE__ */ O("$ZodObject", (e, t) => {
|
|
|
1493
1493
|
return (v, y) => _(g, v, y);
|
|
1494
1494
|
};
|
|
1495
1495
|
let o;
|
|
1496
|
-
const i =
|
|
1496
|
+
const i = qn, a = !Gs.jitless, l = a && Vc.value, c = t.catchall;
|
|
1497
1497
|
let p;
|
|
1498
1498
|
e._zod.parse = (g, x) => {
|
|
1499
1499
|
p ?? (p = n.value);
|
|
@@ -1555,7 +1555,7 @@ const ll = /* @__PURE__ */ O("$ZodUnion", (e, t) => {
|
|
|
1555
1555
|
}), fe(e._zod, "pattern", () => {
|
|
1556
1556
|
if (t.options.every((n) => n._zod.pattern)) {
|
|
1557
1557
|
const n = t.options.map((r) => r._zod.pattern);
|
|
1558
|
-
return new RegExp(`^(${n.map((r) =>
|
|
1558
|
+
return new RegExp(`^(${n.map((r) => ao(r.source)).join("|")})$`);
|
|
1559
1559
|
}
|
|
1560
1560
|
}), e._zod.parse = (n, r) => {
|
|
1561
1561
|
let o = !1;
|
|
@@ -1592,7 +1592,7 @@ const ll = /* @__PURE__ */ O("$ZodUnion", (e, t) => {
|
|
|
1592
1592
|
}
|
|
1593
1593
|
return o;
|
|
1594
1594
|
});
|
|
1595
|
-
const r =
|
|
1595
|
+
const r = oo(() => {
|
|
1596
1596
|
const o = t.options, i = /* @__PURE__ */ new Map();
|
|
1597
1597
|
for (const a of o) {
|
|
1598
1598
|
const s = a._zod.propValues[t.discriminator];
|
|
@@ -1608,7 +1608,7 @@ const ll = /* @__PURE__ */ O("$ZodUnion", (e, t) => {
|
|
|
1608
1608
|
});
|
|
1609
1609
|
e._zod.parse = (o, i) => {
|
|
1610
1610
|
const a = o.value;
|
|
1611
|
-
if (!
|
|
1611
|
+
if (!qn(a))
|
|
1612
1612
|
return o.issues.push({
|
|
1613
1613
|
code: "invalid_type",
|
|
1614
1614
|
expected: "object",
|
|
@@ -1631,15 +1631,15 @@ const ll = /* @__PURE__ */ O("$ZodUnion", (e, t) => {
|
|
|
1631
1631
|
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([l, c]) => vi(n, l, c)) : vi(n, i, a);
|
|
1632
1632
|
};
|
|
1633
1633
|
});
|
|
1634
|
-
function
|
|
1634
|
+
function Dr(e, t) {
|
|
1635
1635
|
if (e === t)
|
|
1636
1636
|
return { valid: !0, data: e };
|
|
1637
1637
|
if (e instanceof Date && t instanceof Date && +e == +t)
|
|
1638
1638
|
return { valid: !0, data: e };
|
|
1639
|
-
if (
|
|
1639
|
+
if (Gn(e) && Gn(t)) {
|
|
1640
1640
|
const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
|
|
1641
1641
|
for (const i of r) {
|
|
1642
|
-
const a =
|
|
1642
|
+
const a = Dr(e[i], t[i]);
|
|
1643
1643
|
if (!a.valid)
|
|
1644
1644
|
return {
|
|
1645
1645
|
valid: !1,
|
|
@@ -1654,7 +1654,7 @@ function zr(e, t) {
|
|
|
1654
1654
|
return { valid: !1, mergeErrorPath: [] };
|
|
1655
1655
|
const n = [];
|
|
1656
1656
|
for (let r = 0; r < e.length; r++) {
|
|
1657
|
-
const o = e[r], i = t[r], a =
|
|
1657
|
+
const o = e[r], i = t[r], a = Dr(o, i);
|
|
1658
1658
|
if (!a.valid)
|
|
1659
1659
|
return {
|
|
1660
1660
|
valid: !1,
|
|
@@ -1669,7 +1669,7 @@ function zr(e, t) {
|
|
|
1669
1669
|
function vi(e, t, n) {
|
|
1670
1670
|
if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), pn(e))
|
|
1671
1671
|
return e;
|
|
1672
|
-
const r =
|
|
1672
|
+
const r = Dr(t.value, n.value);
|
|
1673
1673
|
if (!r.valid)
|
|
1674
1674
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
|
|
1675
1675
|
return e.value = r.data, e;
|
|
@@ -1728,7 +1728,7 @@ function zn(e, t, n) {
|
|
|
1728
1728
|
const Ap = /* @__PURE__ */ O("$ZodRecord", (e, t) => {
|
|
1729
1729
|
_e.init(e, t), e._zod.parse = (n, r) => {
|
|
1730
1730
|
const o = n.value;
|
|
1731
|
-
if (!
|
|
1731
|
+
if (!Gn(o))
|
|
1732
1732
|
return n.issues.push({
|
|
1733
1733
|
expected: "record",
|
|
1734
1734
|
code: "invalid_type",
|
|
@@ -1816,12 +1816,12 @@ const Ap = /* @__PURE__ */ O("$ZodRecord", (e, t) => {
|
|
|
1816
1816
|
}), Pp = /* @__PURE__ */ O("$ZodOptional", (e, t) => {
|
|
1817
1817
|
_e.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", fe(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), fe(e._zod, "pattern", () => {
|
|
1818
1818
|
const n = t.innerType._zod.pattern;
|
|
1819
|
-
return n ? new RegExp(`^(${
|
|
1819
|
+
return n ? new RegExp(`^(${ao(n.source)})?$`) : void 0;
|
|
1820
1820
|
}), e._zod.parse = (n, r) => t.innerType._zod.optin === "optional" ? t.innerType._zod.run(n, r) : n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
1821
1821
|
}), Mp = /* @__PURE__ */ O("$ZodNullable", (e, t) => {
|
|
1822
1822
|
_e.init(e, t), fe(e._zod, "optin", () => t.innerType._zod.optin), fe(e._zod, "optout", () => t.innerType._zod.optout), fe(e._zod, "pattern", () => {
|
|
1823
1823
|
const n = t.innerType._zod.pattern;
|
|
1824
|
-
return n ? new RegExp(`^(${
|
|
1824
|
+
return n ? new RegExp(`^(${ao(n.source)}|null)$`) : void 0;
|
|
1825
1825
|
}), fe(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
1826
1826
|
}), zp = /* @__PURE__ */ O("$ZodDefault", (e, t) => {
|
|
1827
1827
|
_e.init(e, t), e._zod.optin = "optional", fe(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
@@ -2252,7 +2252,7 @@ function Si(e, t) {
|
|
|
2252
2252
|
inclusive: !1
|
|
2253
2253
|
});
|
|
2254
2254
|
}
|
|
2255
|
-
function
|
|
2255
|
+
function br(e, t) {
|
|
2256
2256
|
return new ol({
|
|
2257
2257
|
check: "less_than",
|
|
2258
2258
|
...q(t),
|
|
@@ -2268,7 +2268,7 @@ function Ei(e, t) {
|
|
|
2268
2268
|
inclusive: !1
|
|
2269
2269
|
});
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2271
|
+
function wr(e, t) {
|
|
2272
2272
|
return new il({
|
|
2273
2273
|
check: "greater_than",
|
|
2274
2274
|
...q(t),
|
|
@@ -2290,7 +2290,7 @@ function cl(e, t) {
|
|
|
2290
2290
|
maximum: e
|
|
2291
2291
|
});
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2293
|
+
function Hn(e, t) {
|
|
2294
2294
|
return new Dd({
|
|
2295
2295
|
check: "min_length",
|
|
2296
2296
|
...q(t),
|
|
@@ -2957,9 +2957,9 @@ const Hh = (e, t) => {
|
|
|
2957
2957
|
// enumerable: false,
|
|
2958
2958
|
}
|
|
2959
2959
|
});
|
|
2960
|
-
},
|
|
2960
|
+
}, lr = O("ZodError", Hh, {
|
|
2961
2961
|
Parent: Error
|
|
2962
|
-
}), Wh = /* @__PURE__ */ nd(
|
|
2962
|
+
}), Wh = /* @__PURE__ */ nd(lr), Jh = /* @__PURE__ */ rd(lr), Kh = /* @__PURE__ */ Xs(lr), pl = /* @__PURE__ */ Qs(lr), ve = /* @__PURE__ */ O("ZodType", (e, t) => (_e.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(
|
|
2963
2963
|
{
|
|
2964
2964
|
...t,
|
|
2965
2965
|
checks: [
|
|
@@ -2983,11 +2983,11 @@ const Hh = (e, t) => {
|
|
|
2983
2983
|
const r = e.clone();
|
|
2984
2984
|
return cn.add(r, n[0]), r;
|
|
2985
2985
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), hl = /* @__PURE__ */ O("_ZodString", (e, t) => {
|
|
2986
|
-
|
|
2986
|
+
lo.init(e, t), ve.init(e, t);
|
|
2987
2987
|
const n = e._zod.bag;
|
|
2988
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(Th(...r)), e.includes = (...r) => e.check(Ch(...r)), e.startsWith = (...r) => e.check(Oh(...r)), e.endsWith = (...r) => e.check(Ah(...r)), e.min = (...r) => e.check(
|
|
2988
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(Th(...r)), e.includes = (...r) => e.check(Ch(...r)), e.startsWith = (...r) => e.check(Oh(...r)), e.endsWith = (...r) => e.check(Ah(...r)), e.min = (...r) => e.check(Hn(...r)), e.max = (...r) => e.check(cl(...r)), e.length = (...r) => e.check(dl(...r)), e.nonempty = (...r) => e.check(Hn(1, ...r)), e.lowercase = (r) => e.check(Sh(r)), e.uppercase = (r) => e.check(Eh(r)), e.trim = () => e.check(Nh()), e.normalize = (...r) => e.check($h(...r)), e.toLowerCase = () => e.check(Rh()), e.toUpperCase = () => e.check(Ph());
|
|
2989
2989
|
}), Yh = /* @__PURE__ */ O("ZodString", (e, t) => {
|
|
2990
|
-
|
|
2990
|
+
lo.init(e, t), hl.init(e, t), e.email = (n) => e.check(Gp(Xh, n)), e.url = (n) => e.check(Yp(Qh, n)), e.jwt = (n) => e.check(ph(mf, n)), e.emoji = (n) => e.check(Xp(ef, n)), e.guid = (n) => e.check(Ti(Ai, n)), e.uuid = (n) => e.check(Hp(Dn, n)), e.uuidv4 = (n) => e.check(Wp(Dn, n)), e.uuidv6 = (n) => e.check(Jp(Dn, n)), e.uuidv7 = (n) => e.check(Kp(Dn, n)), e.nanoid = (n) => e.check(Qp(tf, n)), e.guid = (n) => e.check(Ti(Ai, n)), e.cuid = (n) => e.check(eh(nf, n)), e.cuid2 = (n) => e.check(th(rf, n)), e.ulid = (n) => e.check(nh(of, n)), e.base64 = (n) => e.check(uh(pf, n)), e.base64url = (n) => e.check(ch(hf, n)), e.xid = (n) => e.check(rh(af, n)), e.ksuid = (n) => e.check(oh(sf, n)), e.ipv4 = (n) => e.check(ih(lf, n)), e.ipv6 = (n) => e.check(ah(uf, n)), e.cidrv4 = (n) => e.check(sh(cf, n)), e.cidrv6 = (n) => e.check(lh(df, n)), e.e164 = (n) => e.check(dh(ff, n)), e.datetime = (n) => e.check(Lh(n)), e.date = (n) => e.check(Bh(n)), e.time = (n) => e.check(Vh(n)), e.duration = (n) => e.check(Gh(n));
|
|
2991
2991
|
});
|
|
2992
2992
|
function u(e) {
|
|
2993
2993
|
return qp(Yh, e);
|
|
@@ -3032,16 +3032,16 @@ const Te = /* @__PURE__ */ O("ZodStringFormat", (e, t) => {
|
|
|
3032
3032
|
_p.init(e, t), Te.init(e, t);
|
|
3033
3033
|
}), mf = /* @__PURE__ */ O("ZodJWT", (e, t) => {
|
|
3034
3034
|
yp.init(e, t), Te.init(e, t);
|
|
3035
|
-
}),
|
|
3036
|
-
sl.init(e, t), ve.init(e, t), e.gt = (r, o) => e.check(Ei(r, o)), e.gte = (r, o) => e.check(
|
|
3035
|
+
}), uo = /* @__PURE__ */ O("ZodNumber", (e, t) => {
|
|
3036
|
+
sl.init(e, t), ve.init(e, t), e.gt = (r, o) => e.check(Ei(r, o)), e.gte = (r, o) => e.check(wr(r, o)), e.min = (r, o) => e.check(wr(r, o)), e.lt = (r, o) => e.check(Si(r, o)), e.lte = (r, o) => e.check(br(r, o)), e.max = (r, o) => e.check(br(r, o)), e.int = (r) => e.check($i(r)), e.safe = (r) => e.check($i(r)), e.positive = (r) => e.check(Ei(0, r)), e.nonnegative = (r) => e.check(wr(0, r)), e.negative = (r) => e.check(Si(0, r)), e.nonpositive = (r) => e.check(br(0, r)), e.multipleOf = (r, o) => e.check(Ci(r, o)), e.step = (r, o) => e.check(Ci(r, o)), e.finite = () => e;
|
|
3037
3037
|
const n = e._zod.bag;
|
|
3038
3038
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
3039
3039
|
});
|
|
3040
3040
|
function f(e) {
|
|
3041
|
-
return gh(
|
|
3041
|
+
return gh(uo, e);
|
|
3042
3042
|
}
|
|
3043
3043
|
const _f = /* @__PURE__ */ O("ZodNumberFormat", (e, t) => {
|
|
3044
|
-
vp.init(e, t),
|
|
3044
|
+
vp.init(e, t), uo.init(e, t);
|
|
3045
3045
|
});
|
|
3046
3046
|
function $i(e) {
|
|
3047
3047
|
return vh(_f, e);
|
|
@@ -3077,7 +3077,7 @@ function kf(e) {
|
|
|
3077
3077
|
return Ih(xf, e);
|
|
3078
3078
|
}
|
|
3079
3079
|
const If = /* @__PURE__ */ O("ZodArray", (e, t) => {
|
|
3080
|
-
Tp.init(e, t), ve.init(e, t), e.element = t.element, e.min = (n, r) => e.check(
|
|
3080
|
+
Tp.init(e, t), ve.init(e, t), e.element = t.element, e.min = (n, r) => e.check(Hn(n, r)), e.nonempty = (n) => e.check(Hn(1, n)), e.max = (n, r) => e.check(cl(n, r)), e.length = (n, r) => e.check(dl(n, r)), e.unwrap = () => e.element;
|
|
3081
3081
|
});
|
|
3082
3082
|
function R(e, t) {
|
|
3083
3083
|
return Mh(If, e, t);
|
|
@@ -3089,17 +3089,17 @@ function d(e, t) {
|
|
|
3089
3089
|
const n = {
|
|
3090
3090
|
type: "object",
|
|
3091
3091
|
get shape() {
|
|
3092
|
-
return
|
|
3092
|
+
return ar(this, "shape", { ...e }), this.shape;
|
|
3093
3093
|
},
|
|
3094
3094
|
...q(t)
|
|
3095
3095
|
};
|
|
3096
3096
|
return new fl(n);
|
|
3097
3097
|
}
|
|
3098
|
-
function
|
|
3098
|
+
function Zr(e, t) {
|
|
3099
3099
|
return new fl({
|
|
3100
3100
|
type: "object",
|
|
3101
3101
|
get shape() {
|
|
3102
|
-
return
|
|
3102
|
+
return ar(this, "shape", { ...e }), this.shape;
|
|
3103
3103
|
},
|
|
3104
3104
|
catchall: ze(),
|
|
3105
3105
|
...q(t)
|
|
@@ -3142,7 +3142,7 @@ const Cf = /* @__PURE__ */ O("ZodTuple", (e, t) => {
|
|
|
3142
3142
|
rest: n
|
|
3143
3143
|
});
|
|
3144
3144
|
});
|
|
3145
|
-
function
|
|
3145
|
+
function jr(e, t, n) {
|
|
3146
3146
|
const r = t instanceof _e, o = r ? n : t, i = r ? t : null;
|
|
3147
3147
|
return new Cf({
|
|
3148
3148
|
type: "tuple",
|
|
@@ -3162,7 +3162,7 @@ function Se(e, t, n) {
|
|
|
3162
3162
|
...q(n)
|
|
3163
3163
|
});
|
|
3164
3164
|
}
|
|
3165
|
-
const
|
|
3165
|
+
const Lr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
|
|
3166
3166
|
$p.init(e, t), ve.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3167
3167
|
const n = new Set(Object.keys(t.entries));
|
|
3168
3168
|
e.extract = (r, o) => {
|
|
@@ -3172,7 +3172,7 @@ const jr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
|
|
|
3172
3172
|
i[a] = t.entries[a];
|
|
3173
3173
|
else
|
|
3174
3174
|
throw new Error(`Key ${a} not found in enum`);
|
|
3175
|
-
return new
|
|
3175
|
+
return new Lr({
|
|
3176
3176
|
...t,
|
|
3177
3177
|
checks: [],
|
|
3178
3178
|
...q(o),
|
|
@@ -3185,7 +3185,7 @@ const jr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
|
|
|
3185
3185
|
delete i[a];
|
|
3186
3186
|
else
|
|
3187
3187
|
throw new Error(`Key ${a} not found in enum`);
|
|
3188
|
-
return new
|
|
3188
|
+
return new Lr({
|
|
3189
3189
|
...t,
|
|
3190
3190
|
checks: [],
|
|
3191
3191
|
...q(o),
|
|
@@ -3195,7 +3195,7 @@ const jr = /* @__PURE__ */ O("ZodEnum", (e, t) => {
|
|
|
3195
3195
|
});
|
|
3196
3196
|
function X(e, t) {
|
|
3197
3197
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
|
|
3198
|
-
return new
|
|
3198
|
+
return new Lr({
|
|
3199
3199
|
type: "enum",
|
|
3200
3200
|
entries: n,
|
|
3201
3201
|
...q(t)
|
|
@@ -3328,7 +3328,7 @@ function yl(e) {
|
|
|
3328
3328
|
getter: e
|
|
3329
3329
|
});
|
|
3330
3330
|
}
|
|
3331
|
-
const
|
|
3331
|
+
const co = /* @__PURE__ */ O("ZodCustom", (e, t) => {
|
|
3332
3332
|
Fp.init(e, t), ve.init(e, t);
|
|
3333
3333
|
});
|
|
3334
3334
|
function qf(e) {
|
|
@@ -3339,10 +3339,10 @@ function qf(e) {
|
|
|
3339
3339
|
return t._zod.check = e, t;
|
|
3340
3340
|
}
|
|
3341
3341
|
function Gf(e, t) {
|
|
3342
|
-
return zh(
|
|
3342
|
+
return zh(co, e ?? (() => !0), t);
|
|
3343
3343
|
}
|
|
3344
3344
|
function Hf(e, t = {}) {
|
|
3345
|
-
return Dh(
|
|
3345
|
+
return Dh(co, e, t);
|
|
3346
3346
|
}
|
|
3347
3347
|
function Wf(e) {
|
|
3348
3348
|
const t = qf((n) => (n.addIssue = (r) => {
|
|
@@ -3355,10 +3355,10 @@ function Wf(e) {
|
|
|
3355
3355
|
}, e(n.value, n)));
|
|
3356
3356
|
return t;
|
|
3357
3357
|
}
|
|
3358
|
-
function
|
|
3358
|
+
function Wn(e, t = {
|
|
3359
3359
|
error: `Input not instance of ${e.name}`
|
|
3360
3360
|
}) {
|
|
3361
|
-
const n = new
|
|
3361
|
+
const n = new co({
|
|
3362
3362
|
type: "custom",
|
|
3363
3363
|
check: "custom",
|
|
3364
3364
|
fn: (r) => r instanceof e,
|
|
@@ -3368,7 +3368,7 @@ function Hn(e, t = {
|
|
|
3368
3368
|
return n._zod.bag.Class = e, n;
|
|
3369
3369
|
}
|
|
3370
3370
|
function Jf(e) {
|
|
3371
|
-
return yh(
|
|
3371
|
+
return yh(uo, e);
|
|
3372
3372
|
}
|
|
3373
3373
|
var pe;
|
|
3374
3374
|
(function(e) {
|
|
@@ -3539,7 +3539,7 @@ class _t extends Error {
|
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
3541
|
_t.create = (e) => new _t(e);
|
|
3542
|
-
const
|
|
3542
|
+
const Ur = (e, t) => {
|
|
3543
3543
|
let n;
|
|
3544
3544
|
switch (e.code) {
|
|
3545
3545
|
case P.invalid_type:
|
|
@@ -3595,7 +3595,7 @@ const Lr = (e, t) => {
|
|
|
3595
3595
|
}
|
|
3596
3596
|
return { message: n };
|
|
3597
3597
|
};
|
|
3598
|
-
let Kf =
|
|
3598
|
+
let Kf = Ur;
|
|
3599
3599
|
function Yf() {
|
|
3600
3600
|
return Kf;
|
|
3601
3601
|
}
|
|
@@ -3632,7 +3632,7 @@ function U(e, t) {
|
|
|
3632
3632
|
// then schema-bound map if available
|
|
3633
3633
|
n,
|
|
3634
3634
|
// then global override map
|
|
3635
|
-
n ===
|
|
3635
|
+
n === Ur ? void 0 : Ur
|
|
3636
3636
|
// then global default map
|
|
3637
3637
|
].filter((o) => !!o)
|
|
3638
3638
|
});
|
|
@@ -3681,7 +3681,7 @@ class Je {
|
|
|
3681
3681
|
}
|
|
3682
3682
|
const Q = Object.freeze({
|
|
3683
3683
|
status: "aborted"
|
|
3684
|
-
}), dn = (e) => ({ status: "dirty", value: e }), et = (e) => ({ status: "valid", value: e }), zi = (e) => e.status === "aborted", Di = (e) => e.status === "dirty", Kt = (e) => e.status === "valid",
|
|
3684
|
+
}), dn = (e) => ({ status: "dirty", value: e }), et = (e) => ({ status: "valid", value: e }), zi = (e) => e.status === "aborted", Di = (e) => e.status === "dirty", Kt = (e) => e.status === "valid", Jn = (e) => typeof Promise < "u" && e instanceof Promise;
|
|
3685
3685
|
var G;
|
|
3686
3686
|
(function(e) {
|
|
3687
3687
|
e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
|
|
@@ -3752,7 +3752,7 @@ class ce {
|
|
|
3752
3752
|
}
|
|
3753
3753
|
_parseSync(t) {
|
|
3754
3754
|
const n = this._parse(t);
|
|
3755
|
-
if (
|
|
3755
|
+
if (Jn(n))
|
|
3756
3756
|
throw new Error("Synchronous parse encountered promise.");
|
|
3757
3757
|
return n;
|
|
3758
3758
|
}
|
|
@@ -3832,7 +3832,7 @@ class ce {
|
|
|
3832
3832
|
parent: null,
|
|
3833
3833
|
data: t,
|
|
3834
3834
|
parsedType: xt(t)
|
|
3835
|
-
}, o = this._parse({ data: t, path: r.path, parent: r }), i = await (
|
|
3835
|
+
}, o = this._parse({ data: t, path: r.path, parent: r }), i = await (Jn(o) ? o : Promise.resolve(o));
|
|
3836
3836
|
return Zi(r, i);
|
|
3837
3837
|
}
|
|
3838
3838
|
refine(t, n) {
|
|
@@ -3878,13 +3878,13 @@ class ce {
|
|
|
3878
3878
|
return dt.create(this);
|
|
3879
3879
|
}
|
|
3880
3880
|
promise() {
|
|
3881
|
-
return
|
|
3881
|
+
return Qn.create(this, this._def);
|
|
3882
3882
|
}
|
|
3883
3883
|
or(t) {
|
|
3884
|
-
return
|
|
3884
|
+
return Yn.create([this, t], this._def);
|
|
3885
3885
|
}
|
|
3886
3886
|
and(t) {
|
|
3887
|
-
return
|
|
3887
|
+
return Xn.create(this, t, this._def);
|
|
3888
3888
|
}
|
|
3889
3889
|
transform(t) {
|
|
3890
3890
|
return new Qt({
|
|
@@ -3896,7 +3896,7 @@ class ce {
|
|
|
3896
3896
|
}
|
|
3897
3897
|
default(t) {
|
|
3898
3898
|
const n = typeof t == "function" ? t : () => t;
|
|
3899
|
-
return new
|
|
3899
|
+
return new Fr({
|
|
3900
3900
|
...ae(this._def),
|
|
3901
3901
|
innerType: this,
|
|
3902
3902
|
defaultValue: n,
|
|
@@ -3912,7 +3912,7 @@ class ce {
|
|
|
3912
3912
|
}
|
|
3913
3913
|
catch(t) {
|
|
3914
3914
|
const n = typeof t == "function" ? t : () => t;
|
|
3915
|
-
return new
|
|
3915
|
+
return new Vr({
|
|
3916
3916
|
...ae(this._def),
|
|
3917
3917
|
innerType: this,
|
|
3918
3918
|
catchValue: n,
|
|
@@ -3927,10 +3927,10 @@ class ce {
|
|
|
3927
3927
|
});
|
|
3928
3928
|
}
|
|
3929
3929
|
pipe(t) {
|
|
3930
|
-
return
|
|
3930
|
+
return po.create(this, t);
|
|
3931
3931
|
}
|
|
3932
3932
|
readonly() {
|
|
3933
|
-
return
|
|
3933
|
+
return qr.create(this);
|
|
3934
3934
|
}
|
|
3935
3935
|
isOptional() {
|
|
3936
3936
|
return this.safeParse(void 0).success;
|
|
@@ -3940,7 +3940,7 @@ class ce {
|
|
|
3940
3940
|
}
|
|
3941
3941
|
}
|
|
3942
3942
|
const Qf = /^c[^\s-]{8,}$/i, em = /^[0-9a-z]+$/, tm = /^[0-9A-HJKMNP-TV-Z]{26}$/i, nm = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, rm = /^[a-z0-9_-]{21}$/i, om = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, im = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, am = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, sm = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
3943
|
-
let
|
|
3943
|
+
let xr;
|
|
3944
3944
|
const lm = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, um = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, cm = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, dm = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, pm = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, hm = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, vl = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", fm = new RegExp(`^${vl}$`);
|
|
3945
3945
|
function bl(e) {
|
|
3946
3946
|
let t = "[0-5]\\d";
|
|
@@ -4030,7 +4030,7 @@ class It extends ce {
|
|
|
4030
4030
|
message: i.message
|
|
4031
4031
|
}), r.dirty());
|
|
4032
4032
|
else if (i.kind === "emoji")
|
|
4033
|
-
|
|
4033
|
+
xr || (xr = new RegExp(sm, "u")), xr.test(t.data) || (o = this._getOrReturnCtx(t, o), U(o, {
|
|
4034
4034
|
validation: "emoji",
|
|
4035
4035
|
code: P.invalid_string,
|
|
4036
4036
|
message: i.message
|
|
@@ -4685,7 +4685,7 @@ ji.create = (e) => new ji({
|
|
|
4685
4685
|
coerce: (e == null ? void 0 : e.coerce) || !1,
|
|
4686
4686
|
...ae(e)
|
|
4687
4687
|
});
|
|
4688
|
-
class
|
|
4688
|
+
class Kn extends ce {
|
|
4689
4689
|
_parse(t) {
|
|
4690
4690
|
if (this._def.coerce && (t.data = new Date(t.data)), this._getType(t) !== V.date) {
|
|
4691
4691
|
const i = this._getOrReturnCtx(t);
|
|
@@ -4725,7 +4725,7 @@ class Jn extends ce {
|
|
|
4725
4725
|
};
|
|
4726
4726
|
}
|
|
4727
4727
|
_addCheck(t) {
|
|
4728
|
-
return new
|
|
4728
|
+
return new Kn({
|
|
4729
4729
|
...this._def,
|
|
4730
4730
|
checks: [...this._def.checks, t]
|
|
4731
4731
|
});
|
|
@@ -4757,7 +4757,7 @@ class Jn extends ce {
|
|
|
4757
4757
|
return t != null ? new Date(t) : null;
|
|
4758
4758
|
}
|
|
4759
4759
|
}
|
|
4760
|
-
|
|
4760
|
+
Kn.create = (e) => new Kn({
|
|
4761
4761
|
checks: [],
|
|
4762
4762
|
coerce: (e == null ? void 0 : e.coerce) || !1,
|
|
4763
4763
|
typeName: M.ZodDate,
|
|
@@ -5246,7 +5246,7 @@ Oe.lazycreate = (e, t) => new Oe({
|
|
|
5246
5246
|
typeName: M.ZodObject,
|
|
5247
5247
|
...ae(t)
|
|
5248
5248
|
});
|
|
5249
|
-
class
|
|
5249
|
+
class Yn extends ce {
|
|
5250
5250
|
_parse(t) {
|
|
5251
5251
|
const { ctx: n } = this._processInputParams(t), r = this._def.options;
|
|
5252
5252
|
function o(i) {
|
|
@@ -5314,19 +5314,19 @@ class Kn extends ce {
|
|
|
5314
5314
|
return this._def.options;
|
|
5315
5315
|
}
|
|
5316
5316
|
}
|
|
5317
|
-
|
|
5317
|
+
Yn.create = (e, t) => new Yn({
|
|
5318
5318
|
options: e,
|
|
5319
5319
|
typeName: M.ZodUnion,
|
|
5320
5320
|
...ae(t)
|
|
5321
5321
|
});
|
|
5322
|
-
function
|
|
5322
|
+
function Br(e, t) {
|
|
5323
5323
|
const n = xt(e), r = xt(t);
|
|
5324
5324
|
if (e === t)
|
|
5325
5325
|
return { valid: !0, data: e };
|
|
5326
5326
|
if (n === V.object && r === V.object) {
|
|
5327
5327
|
const o = pe.objectKeys(t), i = pe.objectKeys(e).filter((s) => o.indexOf(s) !== -1), a = { ...e, ...t };
|
|
5328
5328
|
for (const s of i) {
|
|
5329
|
-
const l =
|
|
5329
|
+
const l = Br(e[s], t[s]);
|
|
5330
5330
|
if (!l.valid)
|
|
5331
5331
|
return { valid: !1 };
|
|
5332
5332
|
a[s] = l.data;
|
|
@@ -5337,7 +5337,7 @@ function Ur(e, t) {
|
|
|
5337
5337
|
return { valid: !1 };
|
|
5338
5338
|
const o = [];
|
|
5339
5339
|
for (let i = 0; i < e.length; i++) {
|
|
5340
|
-
const a = e[i], s = t[i], l =
|
|
5340
|
+
const a = e[i], s = t[i], l = Br(a, s);
|
|
5341
5341
|
if (!l.valid)
|
|
5342
5342
|
return { valid: !1 };
|
|
5343
5343
|
o.push(l.data);
|
|
@@ -5345,12 +5345,12 @@ function Ur(e, t) {
|
|
|
5345
5345
|
return { valid: !0, data: o };
|
|
5346
5346
|
} else return n === V.date && r === V.date && +e == +t ? { valid: !0, data: e } : { valid: !1 };
|
|
5347
5347
|
}
|
|
5348
|
-
class
|
|
5348
|
+
class Xn extends ce {
|
|
5349
5349
|
_parse(t) {
|
|
5350
5350
|
const { status: n, ctx: r } = this._processInputParams(t), o = (i, a) => {
|
|
5351
5351
|
if (zi(i) || zi(a))
|
|
5352
5352
|
return Q;
|
|
5353
|
-
const s =
|
|
5353
|
+
const s = Br(i.value, a.value);
|
|
5354
5354
|
return s.valid ? ((Di(i) || Di(a)) && n.dirty(), { status: n.value, value: s.data }) : (U(r, {
|
|
5355
5355
|
code: P.invalid_intersection_types
|
|
5356
5356
|
}), Q);
|
|
@@ -5377,7 +5377,7 @@ class Yn extends ce {
|
|
|
5377
5377
|
}));
|
|
5378
5378
|
}
|
|
5379
5379
|
}
|
|
5380
|
-
|
|
5380
|
+
Xn.create = (e, t, n) => new Xn({
|
|
5381
5381
|
left: e,
|
|
5382
5382
|
right: t,
|
|
5383
5383
|
typeName: M.ZodIntersection,
|
|
@@ -5672,7 +5672,7 @@ Ji.create = (e, t) => new Ji({
|
|
|
5672
5672
|
typeName: M.ZodNativeEnum,
|
|
5673
5673
|
...ae(t)
|
|
5674
5674
|
});
|
|
5675
|
-
class
|
|
5675
|
+
class Qn extends ce {
|
|
5676
5676
|
unwrap() {
|
|
5677
5677
|
return this._def.type;
|
|
5678
5678
|
}
|
|
@@ -5691,7 +5691,7 @@ class Xn extends ce {
|
|
|
5691
5691
|
})));
|
|
5692
5692
|
}
|
|
5693
5693
|
}
|
|
5694
|
-
|
|
5694
|
+
Qn.create = (e, t) => new Qn({
|
|
5695
5695
|
type: e,
|
|
5696
5696
|
typeName: M.ZodPromise,
|
|
5697
5697
|
...ae(t)
|
|
@@ -5814,7 +5814,7 @@ en.create = (e, t) => new en({
|
|
|
5814
5814
|
typeName: M.ZodNullable,
|
|
5815
5815
|
...ae(t)
|
|
5816
5816
|
});
|
|
5817
|
-
class
|
|
5817
|
+
class Fr extends ce {
|
|
5818
5818
|
_parse(t) {
|
|
5819
5819
|
const { ctx: n } = this._processInputParams(t);
|
|
5820
5820
|
let r = n.data;
|
|
@@ -5828,13 +5828,13 @@ class Br extends ce {
|
|
|
5828
5828
|
return this._def.innerType;
|
|
5829
5829
|
}
|
|
5830
5830
|
}
|
|
5831
|
-
|
|
5831
|
+
Fr.create = (e, t) => new Fr({
|
|
5832
5832
|
innerType: e,
|
|
5833
5833
|
typeName: M.ZodDefault,
|
|
5834
5834
|
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
5835
5835
|
...ae(t)
|
|
5836
5836
|
});
|
|
5837
|
-
class
|
|
5837
|
+
class Vr extends ce {
|
|
5838
5838
|
_parse(t) {
|
|
5839
5839
|
const { ctx: n } = this._processInputParams(t), r = {
|
|
5840
5840
|
...n,
|
|
@@ -5849,7 +5849,7 @@ class Fr extends ce {
|
|
|
5849
5849
|
...r
|
|
5850
5850
|
}
|
|
5851
5851
|
});
|
|
5852
|
-
return
|
|
5852
|
+
return Jn(o) ? o.then((i) => ({
|
|
5853
5853
|
status: "valid",
|
|
5854
5854
|
value: i.status === "valid" ? i.value : this._def.catchValue({
|
|
5855
5855
|
get error() {
|
|
@@ -5871,7 +5871,7 @@ class Fr extends ce {
|
|
|
5871
5871
|
return this._def.innerType;
|
|
5872
5872
|
}
|
|
5873
5873
|
}
|
|
5874
|
-
|
|
5874
|
+
Vr.create = (e, t) => new Vr({
|
|
5875
5875
|
innerType: e,
|
|
5876
5876
|
typeName: M.ZodCatch,
|
|
5877
5877
|
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
@@ -5907,7 +5907,7 @@ class wm extends ce {
|
|
|
5907
5907
|
return this._def.type;
|
|
5908
5908
|
}
|
|
5909
5909
|
}
|
|
5910
|
-
class
|
|
5910
|
+
class po extends ce {
|
|
5911
5911
|
_parse(t) {
|
|
5912
5912
|
const { status: n, ctx: r } = this._processInputParams(t);
|
|
5913
5913
|
if (r.common.async)
|
|
@@ -5940,23 +5940,23 @@ class co extends ce {
|
|
|
5940
5940
|
}
|
|
5941
5941
|
}
|
|
5942
5942
|
static create(t, n) {
|
|
5943
|
-
return new
|
|
5943
|
+
return new po({
|
|
5944
5944
|
in: t,
|
|
5945
5945
|
out: n,
|
|
5946
5946
|
typeName: M.ZodPipeline
|
|
5947
5947
|
});
|
|
5948
5948
|
}
|
|
5949
5949
|
}
|
|
5950
|
-
class
|
|
5950
|
+
class qr extends ce {
|
|
5951
5951
|
_parse(t) {
|
|
5952
5952
|
const n = this._def.innerType._parse(t), r = (o) => (Kt(o) && (o.value = Object.freeze(o.value)), o);
|
|
5953
|
-
return
|
|
5953
|
+
return Jn(n) ? n.then((o) => r(o)) : r(n);
|
|
5954
5954
|
}
|
|
5955
5955
|
unwrap() {
|
|
5956
5956
|
return this._def.innerType;
|
|
5957
5957
|
}
|
|
5958
5958
|
}
|
|
5959
|
-
|
|
5959
|
+
qr.create = (e, t) => new qr({
|
|
5960
5960
|
innerType: e,
|
|
5961
5961
|
typeName: M.ZodReadonly,
|
|
5962
5962
|
...ae(t)
|
|
@@ -5967,11 +5967,11 @@ var M;
|
|
|
5967
5967
|
})(M || (M = {}));
|
|
5968
5968
|
const ye = It.create, ct = Yt.create;
|
|
5969
5969
|
Nt.create;
|
|
5970
|
-
const Ct = dt.create, it = Oe.create,
|
|
5971
|
-
Yn.create;
|
|
5972
|
-
Lt.create;
|
|
5973
|
-
const lr = Xt.create;
|
|
5970
|
+
const Ct = dt.create, it = Oe.create, ho = Yn.create;
|
|
5974
5971
|
Xn.create;
|
|
5972
|
+
Lt.create;
|
|
5973
|
+
const ur = Xt.create;
|
|
5974
|
+
Qn.create;
|
|
5975
5975
|
Et.create;
|
|
5976
5976
|
en.create;
|
|
5977
5977
|
function De(...e) {
|
|
@@ -6022,7 +6022,7 @@ var xl = "AI_DownloadError", kl = `vercel.ai.error.${xl}`, km = Symbol.for(kl),
|
|
|
6022
6022
|
return te.hasMarker(e, kl);
|
|
6023
6023
|
}
|
|
6024
6024
|
};
|
|
6025
|
-
async function
|
|
6025
|
+
async function fo(e) {
|
|
6026
6026
|
var t;
|
|
6027
6027
|
try {
|
|
6028
6028
|
await ((t = e.body) == null ? void 0 : t.cancel());
|
|
@@ -6164,7 +6164,7 @@ async function Om({
|
|
|
6164
6164
|
}
|
|
6165
6165
|
const l = s.headers.get("location");
|
|
6166
6166
|
if (s.status >= 300 && s.status < 400 && l) {
|
|
6167
|
-
await
|
|
6167
|
+
await fo(s), i = new URL(l, i).toString();
|
|
6168
6168
|
continue;
|
|
6169
6169
|
}
|
|
6170
6170
|
return s;
|
|
@@ -6184,7 +6184,7 @@ async function El({
|
|
|
6184
6184
|
if (r != null) {
|
|
6185
6185
|
const p = parseInt(r, 10);
|
|
6186
6186
|
if (!isNaN(p) && p > n)
|
|
6187
|
-
throw await
|
|
6187
|
+
throw await fo(e), new qe({
|
|
6188
6188
|
url: t,
|
|
6189
6189
|
message: `Download of ${t} exceeded maximum size of ${n} bytes (Content-Length: ${p}).`
|
|
6190
6190
|
});
|
|
@@ -6269,7 +6269,7 @@ function Ol({
|
|
|
6269
6269
|
}
|
|
6270
6270
|
return e;
|
|
6271
6271
|
}
|
|
6272
|
-
function
|
|
6272
|
+
function mo(e = globalThis) {
|
|
6273
6273
|
var t, n, r;
|
|
6274
6274
|
return e.window ? "runtime/browser" : (t = e.navigator) != null && t.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : (r = (n = e.process) == null ? void 0 : n.versions) != null && r.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
|
|
6275
6275
|
}
|
|
@@ -6295,7 +6295,7 @@ function qt(e, ...t) {
|
|
|
6295
6295
|
[r, ...t].filter(Boolean).join(" ")
|
|
6296
6296
|
), Object.fromEntries(n.entries());
|
|
6297
6297
|
}
|
|
6298
|
-
var Al = "3.0.28", Nm = () => globalThis.fetch,
|
|
6298
|
+
var Al = "3.0.28", Nm = () => globalThis.fetch, er = async ({
|
|
6299
6299
|
url: e,
|
|
6300
6300
|
headers: t = {},
|
|
6301
6301
|
successfulResponseHandler: n,
|
|
@@ -6309,7 +6309,7 @@ var Al = "3.0.28", Nm = () => globalThis.fetch, Qn = async ({
|
|
|
6309
6309
|
headers: qt(
|
|
6310
6310
|
t,
|
|
6311
6311
|
`ai-sdk/provider-utils/${Al}`,
|
|
6312
|
-
|
|
6312
|
+
mo()
|
|
6313
6313
|
),
|
|
6314
6314
|
signal: o
|
|
6315
6315
|
}), s = nn(a);
|
|
@@ -6432,7 +6432,7 @@ function Dm(e) {
|
|
|
6432
6432
|
}
|
|
6433
6433
|
return e;
|
|
6434
6434
|
}
|
|
6435
|
-
function
|
|
6435
|
+
function _o(e) {
|
|
6436
6436
|
const { stackTraceLimit: t } = Error;
|
|
6437
6437
|
try {
|
|
6438
6438
|
Error.stackTraceLimit = 0;
|
|
@@ -6445,12 +6445,12 @@ function mo(e) {
|
|
|
6445
6445
|
Error.stackTraceLimit = t;
|
|
6446
6446
|
}
|
|
6447
6447
|
}
|
|
6448
|
-
var
|
|
6448
|
+
var tr = /* @__PURE__ */ Symbol.for("vercel.ai.validator");
|
|
6449
6449
|
function Zm(e) {
|
|
6450
|
-
return { [
|
|
6450
|
+
return { [tr]: !0, validate: e };
|
|
6451
6451
|
}
|
|
6452
6452
|
function jm(e) {
|
|
6453
|
-
return typeof e == "object" && e !== null &&
|
|
6453
|
+
return typeof e == "object" && e !== null && tr in e && e[tr] === !0 && "validate" in e;
|
|
6454
6454
|
}
|
|
6455
6455
|
function Ee(e) {
|
|
6456
6456
|
let t;
|
|
@@ -6507,10 +6507,10 @@ async function Bm({
|
|
|
6507
6507
|
schema: t
|
|
6508
6508
|
}) {
|
|
6509
6509
|
try {
|
|
6510
|
-
const n =
|
|
6510
|
+
const n = _o(e);
|
|
6511
6511
|
return t == null ? n : Me({ value: n, schema: t });
|
|
6512
6512
|
} catch (n) {
|
|
6513
|
-
throw
|
|
6513
|
+
throw Vn.isInstance(n) || mn.isInstance(n) ? n : new Vn({ text: e, cause: n });
|
|
6514
6514
|
}
|
|
6515
6515
|
}
|
|
6516
6516
|
async function Ut({
|
|
@@ -6518,19 +6518,19 @@ async function Ut({
|
|
|
6518
6518
|
schema: t
|
|
6519
6519
|
}) {
|
|
6520
6520
|
try {
|
|
6521
|
-
const n =
|
|
6521
|
+
const n = _o(e);
|
|
6522
6522
|
return t == null ? { success: !0, value: n, rawValue: n } : await gt({ value: n, schema: t });
|
|
6523
6523
|
} catch (n) {
|
|
6524
6524
|
return {
|
|
6525
6525
|
success: !1,
|
|
6526
|
-
error:
|
|
6526
|
+
error: Vn.isInstance(n) ? n : new Vn({ text: e, cause: n }),
|
|
6527
6527
|
rawValue: void 0
|
|
6528
6528
|
};
|
|
6529
6529
|
}
|
|
6530
6530
|
}
|
|
6531
6531
|
function ta(e) {
|
|
6532
6532
|
try {
|
|
6533
|
-
return
|
|
6533
|
+
return _o(e), !0;
|
|
6534
6534
|
} catch {
|
|
6535
6535
|
return !1;
|
|
6536
6536
|
}
|
|
@@ -6622,7 +6622,7 @@ var Vm = () => globalThis.fetch, Ze = async ({
|
|
|
6622
6622
|
headers: qt(
|
|
6623
6623
|
t,
|
|
6624
6624
|
`ai-sdk/provider-utils/${Al}`,
|
|
6625
|
-
|
|
6625
|
+
mo()
|
|
6626
6626
|
),
|
|
6627
6627
|
body: n.content,
|
|
6628
6628
|
signal: i
|
|
@@ -6846,38 +6846,38 @@ var pt = ({
|
|
|
6846
6846
|
cause: o
|
|
6847
6847
|
});
|
|
6848
6848
|
}
|
|
6849
|
-
},
|
|
6849
|
+
}, Gr = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
|
|
6850
6850
|
function K(e) {
|
|
6851
6851
|
let t;
|
|
6852
6852
|
return () => (t == null && (t = e()), t);
|
|
6853
6853
|
}
|
|
6854
|
-
function
|
|
6854
|
+
function go(e, {
|
|
6855
6855
|
validate: t
|
|
6856
6856
|
} = {}) {
|
|
6857
6857
|
return {
|
|
6858
|
-
[
|
|
6858
|
+
[Gr]: !0,
|
|
6859
6859
|
_type: void 0,
|
|
6860
6860
|
// should never be used directly
|
|
6861
|
-
[
|
|
6861
|
+
[tr]: !0,
|
|
6862
6862
|
get jsonSchema() {
|
|
6863
6863
|
return typeof e == "function" && (e = e()), e;
|
|
6864
6864
|
},
|
|
6865
6865
|
validate: t
|
|
6866
6866
|
};
|
|
6867
6867
|
}
|
|
6868
|
-
function
|
|
6868
|
+
function Un(e) {
|
|
6869
6869
|
if (e.type === "object") {
|
|
6870
6870
|
e.additionalProperties = !1;
|
|
6871
6871
|
const t = e.properties;
|
|
6872
6872
|
if (t != null)
|
|
6873
6873
|
for (const n in t)
|
|
6874
|
-
t[n] =
|
|
6874
|
+
t[n] = Un(
|
|
6875
6875
|
t[n]
|
|
6876
6876
|
);
|
|
6877
6877
|
}
|
|
6878
6878
|
return e.type === "array" && e.items != null && (Array.isArray(e.items) ? e.items = e.items.map(
|
|
6879
|
-
(t) =>
|
|
6880
|
-
) : e.items =
|
|
6879
|
+
(t) => Un(t)
|
|
6880
|
+
) : e.items = Un(
|
|
6881
6881
|
e.items
|
|
6882
6882
|
)), e;
|
|
6883
6883
|
}
|
|
@@ -7037,7 +7037,7 @@ function a_(e) {
|
|
|
7037
7037
|
const: e.value
|
|
7038
7038
|
};
|
|
7039
7039
|
}
|
|
7040
|
-
var
|
|
7040
|
+
var kr = void 0, rt = {
|
|
7041
7041
|
/**
|
|
7042
7042
|
* `c` was changed to `[cC]` to replicate /i flag
|
|
7043
7043
|
*/
|
|
@@ -7059,10 +7059,10 @@ var wr = void 0, rt = {
|
|
|
7059
7059
|
* Fix in Zod:
|
|
7060
7060
|
* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
|
|
7061
7061
|
*/
|
|
7062
|
-
emoji: () => (
|
|
7062
|
+
emoji: () => (kr === void 0 && (kr = RegExp(
|
|
7063
7063
|
"^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
|
|
7064
7064
|
"u"
|
|
7065
|
-
)),
|
|
7065
|
+
)), kr),
|
|
7066
7066
|
/**
|
|
7067
7067
|
* Unused
|
|
7068
7068
|
*/
|
|
@@ -7126,7 +7126,7 @@ function zl(e, t) {
|
|
|
7126
7126
|
case "startsWith":
|
|
7127
7127
|
Pe(
|
|
7128
7128
|
n,
|
|
7129
|
-
RegExp(`^${
|
|
7129
|
+
RegExp(`^${Ir(r.value, t)}`),
|
|
7130
7130
|
r.message,
|
|
7131
7131
|
t
|
|
7132
7132
|
);
|
|
@@ -7134,7 +7134,7 @@ function zl(e, t) {
|
|
|
7134
7134
|
case "endsWith":
|
|
7135
7135
|
Pe(
|
|
7136
7136
|
n,
|
|
7137
|
-
RegExp(`${
|
|
7137
|
+
RegExp(`${Ir(r.value, t)}$`),
|
|
7138
7138
|
r.message,
|
|
7139
7139
|
t
|
|
7140
7140
|
);
|
|
@@ -7157,7 +7157,7 @@ function zl(e, t) {
|
|
|
7157
7157
|
case "includes": {
|
|
7158
7158
|
Pe(
|
|
7159
7159
|
n,
|
|
7160
|
-
RegExp(
|
|
7160
|
+
RegExp(Ir(r.value, t)),
|
|
7161
7161
|
r.message,
|
|
7162
7162
|
t
|
|
7163
7163
|
);
|
|
@@ -7206,7 +7206,7 @@ function zl(e, t) {
|
|
|
7206
7206
|
}
|
|
7207
7207
|
return n;
|
|
7208
7208
|
}
|
|
7209
|
-
function
|
|
7209
|
+
function Ir(e, t) {
|
|
7210
7210
|
return t.patternStrategy === "escape" ? l_(e) : e;
|
|
7211
7211
|
}
|
|
7212
7212
|
var s_ = new Set(
|
|
@@ -7369,7 +7369,7 @@ function p_() {
|
|
|
7369
7369
|
type: "null"
|
|
7370
7370
|
};
|
|
7371
7371
|
}
|
|
7372
|
-
var
|
|
7372
|
+
var Hr = {
|
|
7373
7373
|
ZodString: "string",
|
|
7374
7374
|
ZodNumber: "number",
|
|
7375
7375
|
ZodBigInt: "integer",
|
|
@@ -7379,10 +7379,10 @@ var Gr = {
|
|
|
7379
7379
|
function h_(e, t) {
|
|
7380
7380
|
const n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
|
|
7381
7381
|
if (n.every(
|
|
7382
|
-
(r) => r._def.typeName in
|
|
7382
|
+
(r) => r._def.typeName in Hr && (!r._def.checks || !r._def.checks.length)
|
|
7383
7383
|
)) {
|
|
7384
7384
|
const r = n.reduce((o, i) => {
|
|
7385
|
-
const a =
|
|
7385
|
+
const a = Hr[i._def.typeName];
|
|
7386
7386
|
return a && !o.includes(a) ? [...o, a] : o;
|
|
7387
7387
|
}, []);
|
|
7388
7388
|
return {
|
|
@@ -7450,7 +7450,7 @@ function m_(e, t) {
|
|
|
7450
7450
|
) && (!e.innerType._def.checks || !e.innerType._def.checks.length))
|
|
7451
7451
|
return {
|
|
7452
7452
|
type: [
|
|
7453
|
-
|
|
7453
|
+
Hr[e.innerType._def.typeName],
|
|
7454
7454
|
"null"
|
|
7455
7455
|
]
|
|
7456
7456
|
};
|
|
@@ -7791,7 +7791,7 @@ var A_ = (e, t) => {
|
|
|
7791
7791
|
function M_(e, t) {
|
|
7792
7792
|
var n;
|
|
7793
7793
|
const r = (n = void 0) != null ? n : !1;
|
|
7794
|
-
return
|
|
7794
|
+
return go(
|
|
7795
7795
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
7796
7796
|
() => P_(e, {
|
|
7797
7797
|
$refStrategy: r ? "root" : "none"
|
|
@@ -7807,9 +7807,9 @@ function M_(e, t) {
|
|
|
7807
7807
|
function z_(e, t) {
|
|
7808
7808
|
var n;
|
|
7809
7809
|
const r = (n = void 0) != null ? n : !1;
|
|
7810
|
-
return
|
|
7810
|
+
return go(
|
|
7811
7811
|
// defer json schema creation to avoid unnecessary computation when only validation is needed
|
|
7812
|
-
() =>
|
|
7812
|
+
() => Un(
|
|
7813
7813
|
Zh(e, {
|
|
7814
7814
|
target: "draft-7",
|
|
7815
7815
|
io: "input",
|
|
@@ -7831,29 +7831,29 @@ function L(e, t) {
|
|
|
7831
7831
|
return D_(e) ? z_(e) : M_(e);
|
|
7832
7832
|
}
|
|
7833
7833
|
function Z_(e) {
|
|
7834
|
-
return typeof e == "object" && e !== null &&
|
|
7834
|
+
return typeof e == "object" && e !== null && Gr in e && e[Gr] === !0 && "jsonSchema" in e && "validate" in e;
|
|
7835
7835
|
}
|
|
7836
|
-
function
|
|
7837
|
-
return e == null ?
|
|
7836
|
+
function cr(e) {
|
|
7837
|
+
return e == null ? go({
|
|
7838
7838
|
properties: {},
|
|
7839
7839
|
additionalProperties: !1
|
|
7840
7840
|
}) : Z_(e) ? e : typeof e == "function" ? e() : L(e);
|
|
7841
7841
|
}
|
|
7842
7842
|
var { btoa: j_, atob: L_ } = globalThis;
|
|
7843
|
-
function
|
|
7843
|
+
function dr(e) {
|
|
7844
7844
|
const t = e.replace(/-/g, "+").replace(/_/g, "/"), n = L_(t);
|
|
7845
7845
|
return Uint8Array.from(n, (r) => r.codePointAt(0));
|
|
7846
7846
|
}
|
|
7847
|
-
function
|
|
7847
|
+
function nr(e) {
|
|
7848
7848
|
let t = "";
|
|
7849
7849
|
for (let n = 0; n < e.length; n++)
|
|
7850
7850
|
t += String.fromCodePoint(e[n]);
|
|
7851
7851
|
return j_(t);
|
|
7852
7852
|
}
|
|
7853
7853
|
function Tt(e) {
|
|
7854
|
-
return e instanceof Uint8Array ?
|
|
7854
|
+
return e instanceof Uint8Array ? nr(e) : e;
|
|
7855
7855
|
}
|
|
7856
|
-
function
|
|
7856
|
+
function yo(e) {
|
|
7857
7857
|
return e == null ? void 0 : e.replace(/\/$/, "");
|
|
7858
7858
|
}
|
|
7859
7859
|
function U_(e) {
|
|
@@ -7873,9 +7873,9 @@ async function* B_({
|
|
|
7873
7873
|
} else
|
|
7874
7874
|
yield { type: "final", output: await r };
|
|
7875
7875
|
}
|
|
7876
|
-
var
|
|
7876
|
+
var Tr, oa;
|
|
7877
7877
|
function F_() {
|
|
7878
|
-
if (oa) return
|
|
7878
|
+
if (oa) return Tr;
|
|
7879
7879
|
oa = 1;
|
|
7880
7880
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, o = (p, g) => {
|
|
7881
7881
|
for (var x in g)
|
|
@@ -7889,17 +7889,17 @@ function F_() {
|
|
|
7889
7889
|
o(s, {
|
|
7890
7890
|
SYMBOL_FOR_REQ_CONTEXT: () => l,
|
|
7891
7891
|
getContext: () => c
|
|
7892
|
-
}),
|
|
7892
|
+
}), Tr = a(s);
|
|
7893
7893
|
const l = Symbol.for("@vercel/request-context");
|
|
7894
7894
|
function c() {
|
|
7895
7895
|
var g, x;
|
|
7896
7896
|
return ((x = (g = globalThis[l]) == null ? void 0 : g.get) == null ? void 0 : x.call(g)) ?? {};
|
|
7897
7897
|
}
|
|
7898
|
-
return
|
|
7898
|
+
return Tr;
|
|
7899
7899
|
}
|
|
7900
|
-
var
|
|
7900
|
+
var Sr, ia;
|
|
7901
7901
|
function V_() {
|
|
7902
|
-
if (ia) return
|
|
7902
|
+
if (ia) return Sr;
|
|
7903
7903
|
ia = 1;
|
|
7904
7904
|
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, o = (g, x) => {
|
|
7905
7905
|
for (var T in x)
|
|
@@ -7914,7 +7914,7 @@ function V_() {
|
|
|
7914
7914
|
getContext: () => l.getContext,
|
|
7915
7915
|
getVercelOidcToken: () => c,
|
|
7916
7916
|
getVercelOidcTokenSync: () => p
|
|
7917
|
-
}),
|
|
7917
|
+
}), Sr = a(s);
|
|
7918
7918
|
var l = F_();
|
|
7919
7919
|
async function c() {
|
|
7920
7920
|
return "";
|
|
@@ -7922,9 +7922,9 @@ function V_() {
|
|
|
7922
7922
|
function p() {
|
|
7923
7923
|
return "";
|
|
7924
7924
|
}
|
|
7925
|
-
return
|
|
7925
|
+
return Sr;
|
|
7926
7926
|
}
|
|
7927
|
-
var Zl = V_(), q_ = "vercel.ai.gateway.error",
|
|
7927
|
+
var Zl = V_(), q_ = "vercel.ai.gateway.error", Er = Symbol.for(q_), aa, sa, Ne = class jl extends (sa = Error, aa = Er, sa) {
|
|
7928
7928
|
constructor({
|
|
7929
7929
|
message: t,
|
|
7930
7930
|
statusCode: n = 500,
|
|
@@ -7941,9 +7941,9 @@ var Zl = V_(), q_ = "vercel.ai.gateway.error", Tr = Symbol.for(q_), aa, sa, Ne =
|
|
|
7941
7941
|
return jl.hasMarker(t);
|
|
7942
7942
|
}
|
|
7943
7943
|
static hasMarker(t) {
|
|
7944
|
-
return typeof t == "object" && t !== null &&
|
|
7944
|
+
return typeof t == "object" && t !== null && Er in t && t[Er] === !0;
|
|
7945
7945
|
}
|
|
7946
|
-
}, Ll = "GatewayAuthenticationError", G_ = `vercel.ai.gateway.error.${Ll}`, la = Symbol.for(G_), ua, ca,
|
|
7946
|
+
}, Ll = "GatewayAuthenticationError", G_ = `vercel.ai.gateway.error.${Ll}`, la = Symbol.for(G_), ua, ca, vo = class Ul extends (ca = Ne, ua = la, ca) {
|
|
7947
7947
|
constructor({
|
|
7948
7948
|
message: t = "Authentication failed",
|
|
7949
7949
|
statusCode: n = 401,
|
|
@@ -8084,7 +8084,7 @@ async function Aa({
|
|
|
8084
8084
|
const a = i.value, s = a.error.type, l = a.error.message;
|
|
8085
8085
|
switch (s) {
|
|
8086
8086
|
case "authentication_error":
|
|
8087
|
-
return
|
|
8087
|
+
return vo.createContextualError({
|
|
8088
8088
|
apiKeyProvided: o === "api-key",
|
|
8089
8089
|
oidcTokenProvided: o === "oidc",
|
|
8090
8090
|
statusCode: t,
|
|
@@ -8214,7 +8214,7 @@ var lg = Ee(
|
|
|
8214
8214
|
}
|
|
8215
8215
|
async getAvailableModels() {
|
|
8216
8216
|
try {
|
|
8217
|
-
const { value: e } = await
|
|
8217
|
+
const { value: e } = await er({
|
|
8218
8218
|
url: `${this.config.baseURL}/config`,
|
|
8219
8219
|
headers: await Ue(this.config.headers()),
|
|
8220
8220
|
successfulResponseHandler: Be(
|
|
@@ -8233,7 +8233,7 @@ var lg = Ee(
|
|
|
8233
8233
|
}
|
|
8234
8234
|
async getCredits() {
|
|
8235
8235
|
try {
|
|
8236
|
-
const e = new URL(this.config.baseURL), { value: t } = await
|
|
8236
|
+
const e = new URL(this.config.baseURL), { value: t } = await er({
|
|
8237
8237
|
url: `${e.origin}/v1/credits`,
|
|
8238
8238
|
headers: await Ue(this.config.headers()),
|
|
8239
8239
|
successfulResponseHandler: Be(
|
|
@@ -8303,7 +8303,7 @@ var lg = Ee(
|
|
|
8303
8303
|
try {
|
|
8304
8304
|
const t = new URL(this.config.baseURL), n = new URLSearchParams();
|
|
8305
8305
|
n.set("start_date", e.startDate), n.set("end_date", e.endDate), e.groupBy && n.set("group_by", e.groupBy), e.datePart && n.set("date_part", e.datePart), e.userId && n.set("user_id", e.userId), e.model && n.set("model", e.model), e.provider && n.set("provider", e.provider), e.credentialType && n.set("credential_type", e.credentialType), e.tags && e.tags.length > 0 && n.set("tags", e.tags.join(","));
|
|
8306
|
-
const { value: r } = await
|
|
8306
|
+
const { value: r } = await er({
|
|
8307
8307
|
url: `${t.origin}/v1/report?${n.toString()}`,
|
|
8308
8308
|
headers: await Ue(this.config.headers()),
|
|
8309
8309
|
successfulResponseHandler: Be(
|
|
@@ -8374,7 +8374,7 @@ var lg = Ee(
|
|
|
8374
8374
|
}
|
|
8375
8375
|
async getGenerationInfo(e) {
|
|
8376
8376
|
try {
|
|
8377
|
-
const t = new URL(this.config.baseURL), { value: n } = await
|
|
8377
|
+
const t = new URL(this.config.baseURL), { value: n } = await er({
|
|
8378
8378
|
url: `${t.origin}/v1/generation?id=${encodeURIComponent(e.id)}`,
|
|
8379
8379
|
headers: await Ue(this.config.headers()),
|
|
8380
8380
|
successfulResponseHandler: Be(
|
|
@@ -8751,7 +8751,7 @@ var lg = Ee(
|
|
|
8751
8751
|
search_queries: Ct(ye()).optional().describe(
|
|
8752
8752
|
"Optional search queries to supplement the objective. Maximum 200 characters per query."
|
|
8753
8753
|
),
|
|
8754
|
-
mode:
|
|
8754
|
+
mode: ur(["one-shot", "agentic"]).optional().describe(
|
|
8755
8755
|
'Mode preset: "one-shot" for comprehensive results with longer excerpts (default), "agentic" for concise, token-efficient results for multi-step workflows.'
|
|
8756
8756
|
),
|
|
8757
8757
|
max_results: ct().optional().describe(
|
|
@@ -8779,7 +8779,7 @@ var lg = Ee(
|
|
|
8779
8779
|
)
|
|
8780
8780
|
), Ig = K(
|
|
8781
8781
|
() => L(
|
|
8782
|
-
|
|
8782
|
+
ho([
|
|
8783
8783
|
// Success response
|
|
8784
8784
|
it({
|
|
8785
8785
|
searchId: ye(),
|
|
@@ -8795,7 +8795,7 @@ var lg = Ee(
|
|
|
8795
8795
|
}),
|
|
8796
8796
|
// Error response
|
|
8797
8797
|
it({
|
|
8798
|
-
error:
|
|
8798
|
+
error: ur([
|
|
8799
8799
|
"api_error",
|
|
8800
8800
|
"rate_limit",
|
|
8801
8801
|
"timeout",
|
|
@@ -8816,7 +8816,7 @@ var lg = Ee(
|
|
|
8816
8816
|
}), Sg = (e = {}) => Tg(e), Eg = K(
|
|
8817
8817
|
() => L(
|
|
8818
8818
|
it({
|
|
8819
|
-
query:
|
|
8819
|
+
query: ho([ye(), Ct(ye())]).describe(
|
|
8820
8820
|
"Search query (string) or multiple queries (array of up to 5 strings). Multi-query searches return combined results from all queries."
|
|
8821
8821
|
),
|
|
8822
8822
|
max_results: ct().optional().describe(
|
|
@@ -8849,14 +8849,14 @@ var lg = Ee(
|
|
|
8849
8849
|
last_updated_before_filter: ye().optional().describe(
|
|
8850
8850
|
"Include only results last updated before this date. Format: 'MM/DD/YYYY' (e.g., '3/15/2025'). Cannot be used with search_recency_filter."
|
|
8851
8851
|
),
|
|
8852
|
-
search_recency_filter:
|
|
8852
|
+
search_recency_filter: ur(["day", "week", "month", "year"]).optional().describe(
|
|
8853
8853
|
"Filter results by relative time period. Cannot be used with search_after_date or search_before_date."
|
|
8854
8854
|
)
|
|
8855
8855
|
})
|
|
8856
8856
|
)
|
|
8857
8857
|
), Cg = K(
|
|
8858
8858
|
() => L(
|
|
8859
|
-
|
|
8859
|
+
ho([
|
|
8860
8860
|
// Success response
|
|
8861
8861
|
it({
|
|
8862
8862
|
results: Ct(
|
|
@@ -8872,7 +8872,7 @@ var lg = Ee(
|
|
|
8872
8872
|
}),
|
|
8873
8873
|
// Error response
|
|
8874
8874
|
it({
|
|
8875
|
-
error:
|
|
8875
|
+
error: ur([
|
|
8876
8876
|
"api_error",
|
|
8877
8877
|
"rate_limit",
|
|
8878
8878
|
"timeout",
|
|
@@ -8918,7 +8918,7 @@ function Mg(e = {}) {
|
|
|
8918
8918
|
let r = null, o = null;
|
|
8919
8919
|
const i = (t = e.metadataCacheRefreshMillis) != null ? t : 1e3 * 60 * 5;
|
|
8920
8920
|
let a = 0;
|
|
8921
|
-
const s = (n =
|
|
8921
|
+
const s = (n = yo(e.baseURL)) != null ? n : "https://ai-gateway.vercel.sh/v1/ai", l = async () => {
|
|
8922
8922
|
const k = await Dg(e);
|
|
8923
8923
|
if (k)
|
|
8924
8924
|
return qt(
|
|
@@ -8930,7 +8930,7 @@ function Mg(e = {}) {
|
|
|
8930
8930
|
},
|
|
8931
8931
|
`ai-sdk/gateway/${Rg}`
|
|
8932
8932
|
);
|
|
8933
|
-
throw
|
|
8933
|
+
throw vo.createContextualError({
|
|
8934
8934
|
apiKeyProvided: !1,
|
|
8935
8935
|
oidcTokenProvided: !1,
|
|
8936
8936
|
statusCode: 401
|
|
@@ -9379,7 +9379,7 @@ var Qg = (
|
|
|
9379
9379
|
}, e.prototype.removeBatchObservableCallback = function(t) {
|
|
9380
9380
|
}, e;
|
|
9381
9381
|
})()
|
|
9382
|
-
),
|
|
9382
|
+
), pr = (
|
|
9383
9383
|
/** @class */
|
|
9384
9384
|
/* @__PURE__ */ (function() {
|
|
9385
9385
|
function e() {
|
|
@@ -9395,7 +9395,7 @@ var Qg = (
|
|
|
9395
9395
|
}
|
|
9396
9396
|
return t.prototype.add = function(n, r) {
|
|
9397
9397
|
}, t;
|
|
9398
|
-
})(
|
|
9398
|
+
})(pr)
|
|
9399
9399
|
), ry = (
|
|
9400
9400
|
/** @class */
|
|
9401
9401
|
(function(e) {
|
|
@@ -9405,7 +9405,7 @@ var Qg = (
|
|
|
9405
9405
|
}
|
|
9406
9406
|
return t.prototype.add = function(n, r) {
|
|
9407
9407
|
}, t;
|
|
9408
|
-
})(
|
|
9408
|
+
})(pr)
|
|
9409
9409
|
), oy = (
|
|
9410
9410
|
/** @class */
|
|
9411
9411
|
(function(e) {
|
|
@@ -9415,7 +9415,7 @@ var Qg = (
|
|
|
9415
9415
|
}
|
|
9416
9416
|
return t.prototype.record = function(n, r) {
|
|
9417
9417
|
}, t;
|
|
9418
|
-
})(
|
|
9418
|
+
})(pr)
|
|
9419
9419
|
), iy = (
|
|
9420
9420
|
/** @class */
|
|
9421
9421
|
(function(e) {
|
|
@@ -9425,8 +9425,8 @@ var Qg = (
|
|
|
9425
9425
|
}
|
|
9426
9426
|
return t.prototype.record = function(n, r) {
|
|
9427
9427
|
}, t;
|
|
9428
|
-
})(
|
|
9429
|
-
),
|
|
9428
|
+
})(pr)
|
|
9429
|
+
), bo = (
|
|
9430
9430
|
/** @class */
|
|
9431
9431
|
(function() {
|
|
9432
9432
|
function e() {
|
|
@@ -9443,7 +9443,7 @@ var Qg = (
|
|
|
9443
9443
|
return e !== null && e.apply(this, arguments) || this;
|
|
9444
9444
|
}
|
|
9445
9445
|
return t;
|
|
9446
|
-
})(
|
|
9446
|
+
})(bo)
|
|
9447
9447
|
), sy = (
|
|
9448
9448
|
/** @class */
|
|
9449
9449
|
(function(e) {
|
|
@@ -9452,7 +9452,7 @@ var Qg = (
|
|
|
9452
9452
|
return e !== null && e.apply(this, arguments) || this;
|
|
9453
9453
|
}
|
|
9454
9454
|
return t;
|
|
9455
|
-
})(
|
|
9455
|
+
})(bo)
|
|
9456
9456
|
), ly = (
|
|
9457
9457
|
/** @class */
|
|
9458
9458
|
(function(e) {
|
|
@@ -9461,7 +9461,7 @@ var Qg = (
|
|
|
9461
9461
|
return e !== null && e.apply(this, arguments) || this;
|
|
9462
9462
|
}
|
|
9463
9463
|
return t;
|
|
9464
|
-
})(
|
|
9464
|
+
})(bo)
|
|
9465
9465
|
), uy = new ty(), cy = new ny(), dy = new oy(), py = new iy(), hy = new ry(), fy = new ay(), my = new sy(), _y = new ly(), gy = {
|
|
9466
9466
|
get: function(e, t) {
|
|
9467
9467
|
if (e != null)
|
|
@@ -9533,7 +9533,7 @@ var Qg = (
|
|
|
9533
9533
|
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
9534
9534
|
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
9535
9535
|
return e.concat(i || Array.prototype.slice.call(t));
|
|
9536
|
-
},
|
|
9536
|
+
}, Cr = "context", Iy = new wy(), hr = (
|
|
9537
9537
|
/** @class */
|
|
9538
9538
|
(function() {
|
|
9539
9539
|
function e() {
|
|
@@ -9541,7 +9541,7 @@ var Qg = (
|
|
|
9541
9541
|
return e.getInstance = function() {
|
|
9542
9542
|
return this._instance || (this._instance = new e()), this._instance;
|
|
9543
9543
|
}, e.prototype.setGlobalContextManager = function(t) {
|
|
9544
|
-
return On(
|
|
9544
|
+
return On(Cr, t, ht.instance());
|
|
9545
9545
|
}, e.prototype.active = function() {
|
|
9546
9546
|
return this._getContextManager().active();
|
|
9547
9547
|
}, e.prototype.with = function(t, n, r) {
|
|
@@ -9551,19 +9551,19 @@ var Qg = (
|
|
|
9551
9551
|
}, e.prototype.bind = function(t, n) {
|
|
9552
9552
|
return this._getContextManager().bind(t, n);
|
|
9553
9553
|
}, e.prototype._getContextManager = function() {
|
|
9554
|
-
return Bt(
|
|
9554
|
+
return Bt(Cr) || Iy;
|
|
9555
9555
|
}, e.prototype.disable = function() {
|
|
9556
|
-
this._getContextManager().disable(), An(
|
|
9556
|
+
this._getContextManager().disable(), An(Cr, ht.instance());
|
|
9557
9557
|
}, e;
|
|
9558
9558
|
})()
|
|
9559
|
-
),
|
|
9559
|
+
), Wr;
|
|
9560
9560
|
(function(e) {
|
|
9561
9561
|
e[e.NONE = 0] = "NONE", e[e.SAMPLED = 1] = "SAMPLED";
|
|
9562
|
-
})(
|
|
9562
|
+
})(Wr || (Wr = {}));
|
|
9563
9563
|
var Xl = "0000000000000000", Ql = "00000000000000000000000000000000", Ty = {
|
|
9564
9564
|
traceId: Ql,
|
|
9565
9565
|
spanId: Xl,
|
|
9566
|
-
traceFlags:
|
|
9566
|
+
traceFlags: Wr.NONE
|
|
9567
9567
|
}, hn = (
|
|
9568
9568
|
/** @class */
|
|
9569
9569
|
(function() {
|
|
@@ -9592,25 +9592,25 @@ var Xl = "0000000000000000", Ql = "00000000000000000000000000000000", Ty = {
|
|
|
9592
9592
|
}, e.prototype.recordException = function(t, n) {
|
|
9593
9593
|
}, e;
|
|
9594
9594
|
})()
|
|
9595
|
-
),
|
|
9596
|
-
function
|
|
9597
|
-
return e.getValue(
|
|
9595
|
+
), wo = Yl("OpenTelemetry Context Key SPAN");
|
|
9596
|
+
function xo(e) {
|
|
9597
|
+
return e.getValue(wo) || void 0;
|
|
9598
9598
|
}
|
|
9599
9599
|
function Sy() {
|
|
9600
|
-
return
|
|
9600
|
+
return xo(hr.getInstance().active());
|
|
9601
9601
|
}
|
|
9602
|
-
function
|
|
9603
|
-
return e.setValue(
|
|
9602
|
+
function ko(e, t) {
|
|
9603
|
+
return e.setValue(wo, t);
|
|
9604
9604
|
}
|
|
9605
9605
|
function Ey(e) {
|
|
9606
|
-
return e.deleteValue(
|
|
9606
|
+
return e.deleteValue(wo);
|
|
9607
9607
|
}
|
|
9608
9608
|
function Cy(e, t) {
|
|
9609
|
-
return
|
|
9609
|
+
return ko(e, new hn(t));
|
|
9610
9610
|
}
|
|
9611
9611
|
function eu(e) {
|
|
9612
9612
|
var t;
|
|
9613
|
-
return (t =
|
|
9613
|
+
return (t = xo(e)) === null || t === void 0 ? void 0 : t.spanContext();
|
|
9614
9614
|
}
|
|
9615
9615
|
var Oy = /^([0-9a-f]{32})$/i, Ay = /^[0-9a-f]{16}$/i;
|
|
9616
9616
|
function $y(e) {
|
|
@@ -9625,13 +9625,13 @@ function tu(e) {
|
|
|
9625
9625
|
function Ry(e) {
|
|
9626
9626
|
return new hn(e);
|
|
9627
9627
|
}
|
|
9628
|
-
var
|
|
9628
|
+
var Or = hr.getInstance(), nu = (
|
|
9629
9629
|
/** @class */
|
|
9630
9630
|
(function() {
|
|
9631
9631
|
function e() {
|
|
9632
9632
|
}
|
|
9633
9633
|
return e.prototype.startSpan = function(t, n, r) {
|
|
9634
|
-
r === void 0 && (r =
|
|
9634
|
+
r === void 0 && (r = Or.active());
|
|
9635
9635
|
var o = !!(n != null && n.root);
|
|
9636
9636
|
if (o)
|
|
9637
9637
|
return new hn();
|
|
@@ -9641,8 +9641,8 @@ var Er = pr.getInstance(), nu = (
|
|
|
9641
9641
|
var i, a, s;
|
|
9642
9642
|
if (!(arguments.length < 2)) {
|
|
9643
9643
|
arguments.length === 2 ? s = n : arguments.length === 3 ? (i = n, s = r) : (i = n, a = r, s = o);
|
|
9644
|
-
var l = a ??
|
|
9645
|
-
return
|
|
9644
|
+
var l = a ?? Or.active(), c = this.startSpan(t, i, l), p = ko(l, c);
|
|
9645
|
+
return Or.with(p, s, void 0, c);
|
|
9646
9646
|
}
|
|
9647
9647
|
}, e;
|
|
9648
9648
|
})()
|
|
@@ -9695,11 +9695,11 @@ var My = new nu(), zy = (
|
|
|
9695
9695
|
return (o = this._delegate) === null || o === void 0 ? void 0 : o.getTracer(t, n, r);
|
|
9696
9696
|
}, e;
|
|
9697
9697
|
})()
|
|
9698
|
-
),
|
|
9698
|
+
), rr;
|
|
9699
9699
|
(function(e) {
|
|
9700
9700
|
e[e.UNSET = 0] = "UNSET", e[e.OK = 1] = "OK", e[e.ERROR = 2] = "ERROR";
|
|
9701
|
-
})(
|
|
9702
|
-
|
|
9701
|
+
})(rr || (rr = {}));
|
|
9702
|
+
hr.getInstance();
|
|
9703
9703
|
ht.instance();
|
|
9704
9704
|
var jy = (
|
|
9705
9705
|
/** @class */
|
|
@@ -9710,7 +9710,7 @@ var jy = (
|
|
|
9710
9710
|
return uy;
|
|
9711
9711
|
}, e;
|
|
9712
9712
|
})()
|
|
9713
|
-
), Ly = new jy(),
|
|
9713
|
+
), Ly = new jy(), Ar = "metrics", Uy = (
|
|
9714
9714
|
/** @class */
|
|
9715
9715
|
(function() {
|
|
9716
9716
|
function e() {
|
|
@@ -9718,13 +9718,13 @@ var jy = (
|
|
|
9718
9718
|
return e.getInstance = function() {
|
|
9719
9719
|
return this._instance || (this._instance = new e()), this._instance;
|
|
9720
9720
|
}, e.prototype.setGlobalMeterProvider = function(t) {
|
|
9721
|
-
return On(
|
|
9721
|
+
return On(Ar, t, ht.instance());
|
|
9722
9722
|
}, e.prototype.getMeterProvider = function() {
|
|
9723
|
-
return Bt(
|
|
9723
|
+
return Bt(Ar) || Ly;
|
|
9724
9724
|
}, e.prototype.getMeter = function(t, n, r) {
|
|
9725
9725
|
return this.getMeterProvider().getMeter(t, n, r);
|
|
9726
9726
|
}, e.prototype.disable = function() {
|
|
9727
|
-
An(
|
|
9727
|
+
An(Ar, ht.instance());
|
|
9728
9728
|
}, e;
|
|
9729
9729
|
})()
|
|
9730
9730
|
);
|
|
@@ -9741,20 +9741,20 @@ var By = (
|
|
|
9741
9741
|
return [];
|
|
9742
9742
|
}, e;
|
|
9743
9743
|
})()
|
|
9744
|
-
),
|
|
9744
|
+
), Io = Yl("OpenTelemetry Baggage Key");
|
|
9745
9745
|
function ru(e) {
|
|
9746
|
-
return e.getValue(
|
|
9746
|
+
return e.getValue(Io) || void 0;
|
|
9747
9747
|
}
|
|
9748
9748
|
function Fy() {
|
|
9749
|
-
return ru(
|
|
9749
|
+
return ru(hr.getInstance().active());
|
|
9750
9750
|
}
|
|
9751
9751
|
function Vy(e, t) {
|
|
9752
|
-
return e.setValue(
|
|
9752
|
+
return e.setValue(Io, t);
|
|
9753
9753
|
}
|
|
9754
9754
|
function qy(e) {
|
|
9755
|
-
return e.deleteValue(
|
|
9755
|
+
return e.deleteValue(Io);
|
|
9756
9756
|
}
|
|
9757
|
-
var
|
|
9757
|
+
var $r = "propagation", Gy = new By(), Hy = (
|
|
9758
9758
|
/** @class */
|
|
9759
9759
|
(function() {
|
|
9760
9760
|
function e() {
|
|
@@ -9763,7 +9763,7 @@ var Or = "propagation", Gy = new By(), Hy = (
|
|
|
9763
9763
|
return e.getInstance = function() {
|
|
9764
9764
|
return this._instance || (this._instance = new e()), this._instance;
|
|
9765
9765
|
}, e.prototype.setGlobalPropagator = function(t) {
|
|
9766
|
-
return On(
|
|
9766
|
+
return On($r, t, ht.instance());
|
|
9767
9767
|
}, e.prototype.inject = function(t, n, r) {
|
|
9768
9768
|
return r === void 0 && (r = yy), this._getGlobalPropagator().inject(t, n, r);
|
|
9769
9769
|
}, e.prototype.extract = function(t, n, r) {
|
|
@@ -9771,30 +9771,30 @@ var Or = "propagation", Gy = new By(), Hy = (
|
|
|
9771
9771
|
}, e.prototype.fields = function() {
|
|
9772
9772
|
return this._getGlobalPropagator().fields();
|
|
9773
9773
|
}, e.prototype.disable = function() {
|
|
9774
|
-
An(
|
|
9774
|
+
An($r, ht.instance());
|
|
9775
9775
|
}, e.prototype._getGlobalPropagator = function() {
|
|
9776
|
-
return Bt(
|
|
9776
|
+
return Bt($r) || Gy;
|
|
9777
9777
|
}, e;
|
|
9778
9778
|
})()
|
|
9779
9779
|
);
|
|
9780
9780
|
Hy.getInstance();
|
|
9781
|
-
var
|
|
9781
|
+
var Nr = "trace", Wy = (
|
|
9782
9782
|
/** @class */
|
|
9783
9783
|
(function() {
|
|
9784
9784
|
function e() {
|
|
9785
|
-
this._proxyTracerProvider = new Za(), this.wrapSpanContext = Ry, this.isSpanContextValid = tu, this.deleteSpan = Ey, this.getSpan =
|
|
9785
|
+
this._proxyTracerProvider = new Za(), this.wrapSpanContext = Ry, this.isSpanContextValid = tu, this.deleteSpan = Ey, this.getSpan = xo, this.getActiveSpan = Sy, this.getSpanContext = eu, this.setSpan = ko, this.setSpanContext = Cy;
|
|
9786
9786
|
}
|
|
9787
9787
|
return e.getInstance = function() {
|
|
9788
9788
|
return this._instance || (this._instance = new e()), this._instance;
|
|
9789
9789
|
}, e.prototype.setGlobalTracerProvider = function(t) {
|
|
9790
|
-
var n = On(
|
|
9790
|
+
var n = On(Nr, this._proxyTracerProvider, ht.instance());
|
|
9791
9791
|
return n && this._proxyTracerProvider.setDelegate(t), n;
|
|
9792
9792
|
}, e.prototype.getTracerProvider = function() {
|
|
9793
|
-
return Bt(
|
|
9793
|
+
return Bt(Nr) || this._proxyTracerProvider;
|
|
9794
9794
|
}, e.prototype.getTracer = function(t, n) {
|
|
9795
9795
|
return this.getTracerProvider().getTracer(t, n);
|
|
9796
9796
|
}, e.prototype.disable = function() {
|
|
9797
|
-
An(
|
|
9797
|
+
An(Nr, ht.instance()), this._proxyTracerProvider = new Za();
|
|
9798
9798
|
}, e;
|
|
9799
9799
|
})()
|
|
9800
9800
|
), Jy = Wy.getInstance(), Ky = Object.defineProperty, Yy = (e, t) => {
|
|
@@ -9887,7 +9887,7 @@ var fu = "AI_NoObjectGeneratedError", mu = `vercel.ai.error.${fu}`, iv = Symbol.
|
|
|
9887
9887
|
}
|
|
9888
9888
|
};
|
|
9889
9889
|
_u = iv;
|
|
9890
|
-
var gu = "AI_NoSuchToolError", yu = `vercel.ai.error.${gu}`, av = Symbol.for(yu), vu,
|
|
9890
|
+
var gu = "AI_NoSuchToolError", yu = `vercel.ai.error.${gu}`, av = Symbol.for(yu), vu, Jr = class extends te {
|
|
9891
9891
|
constructor({
|
|
9892
9892
|
toolName: e,
|
|
9893
9893
|
availableTools: t = void 0,
|
|
@@ -10044,7 +10044,7 @@ var fv = [
|
|
|
10044
10044
|
]
|
|
10045
10045
|
}
|
|
10046
10046
|
], mv = (e) => {
|
|
10047
|
-
const t = typeof e == "string" ?
|
|
10047
|
+
const t = typeof e == "string" ? dr(e) : e, n = (t[6] & 127) << 21 | (t[7] & 127) << 14 | (t[8] & 127) << 7 | t[9] & 127;
|
|
10048
10048
|
return t.slice(n + 10);
|
|
10049
10049
|
};
|
|
10050
10050
|
function _v(e) {
|
|
@@ -10056,7 +10056,7 @@ function gv({
|
|
|
10056
10056
|
data: e,
|
|
10057
10057
|
signatures: t
|
|
10058
10058
|
}) {
|
|
10059
|
-
const n = _v(e), r = typeof n == "string" ?
|
|
10059
|
+
const n = _v(e), r = typeof n == "string" ? dr(
|
|
10060
10060
|
n.substring(0, Math.min(n.length, 24))
|
|
10061
10061
|
) : n;
|
|
10062
10062
|
for (const o of t)
|
|
@@ -10076,14 +10076,14 @@ var Ou = "5.0.208", Au = async ({
|
|
|
10076
10076
|
const i = qt(
|
|
10077
10077
|
{},
|
|
10078
10078
|
`ai-sdk/${Ou}`,
|
|
10079
|
-
|
|
10079
|
+
mo()
|
|
10080
10080
|
), a = await Om({
|
|
10081
10081
|
url: o,
|
|
10082
10082
|
headers: i,
|
|
10083
10083
|
abortSignal: n
|
|
10084
10084
|
});
|
|
10085
10085
|
if (!a.ok)
|
|
10086
|
-
throw await
|
|
10086
|
+
throw await fo(a), new qe({
|
|
10087
10087
|
url: o,
|
|
10088
10088
|
statusCode: a.status,
|
|
10089
10089
|
statusText: a.statusText
|
|
@@ -10120,8 +10120,8 @@ function vv(e) {
|
|
|
10120
10120
|
}
|
|
10121
10121
|
var $u = ee([
|
|
10122
10122
|
u(),
|
|
10123
|
-
|
|
10124
|
-
|
|
10123
|
+
Wn(Uint8Array),
|
|
10124
|
+
Wn(ArrayBuffer),
|
|
10125
10125
|
Gf(
|
|
10126
10126
|
// Buffer might not be available in some environments such as CloudFlare:
|
|
10127
10127
|
(e) => {
|
|
@@ -10155,7 +10155,7 @@ function Nu(e) {
|
|
|
10155
10155
|
return { data: e, mediaType: void 0 };
|
|
10156
10156
|
}
|
|
10157
10157
|
function bv(e) {
|
|
10158
|
-
return typeof e == "string" ? e : e instanceof ArrayBuffer ?
|
|
10158
|
+
return typeof e == "string" ? e : e instanceof ArrayBuffer ? nr(new Uint8Array(e)) : nr(e);
|
|
10159
10159
|
}
|
|
10160
10160
|
async function wv({
|
|
10161
10161
|
prompt: e,
|
|
@@ -10447,7 +10447,7 @@ function Sv({
|
|
|
10447
10447
|
type: "function",
|
|
10448
10448
|
name: o,
|
|
10449
10449
|
description: i.description,
|
|
10450
|
-
inputSchema:
|
|
10450
|
+
inputSchema: cr(i.inputSchema).jsonSchema,
|
|
10451
10451
|
providerOptions: i.providerOptions
|
|
10452
10452
|
};
|
|
10453
10453
|
case "provider-defined":
|
|
@@ -10487,12 +10487,12 @@ var xn = yl(
|
|
|
10487
10487
|
providerOptions: mt.optional()
|
|
10488
10488
|
}), Ev = d({
|
|
10489
10489
|
type: h("image"),
|
|
10490
|
-
image: ee([$u,
|
|
10490
|
+
image: ee([$u, Wn(URL)]),
|
|
10491
10491
|
mediaType: u().optional(),
|
|
10492
10492
|
providerOptions: mt.optional()
|
|
10493
10493
|
}), Pu = d({
|
|
10494
10494
|
type: h("file"),
|
|
10495
|
-
data: ee([$u,
|
|
10495
|
+
data: ee([$u, Wn(URL)]),
|
|
10496
10496
|
filename: u().optional(),
|
|
10497
10497
|
mediaType: u(),
|
|
10498
10498
|
providerOptions: mt.optional()
|
|
@@ -10642,7 +10642,7 @@ async function zv({
|
|
|
10642
10642
|
return { messages: r, system: t };
|
|
10643
10643
|
}
|
|
10644
10644
|
function Dv(e) {
|
|
10645
|
-
if (!
|
|
10645
|
+
if (!vo.isInstance(e))
|
|
10646
10646
|
return e;
|
|
10647
10647
|
const t = (process == null ? void 0 : process.env.NODE_ENV) === "production", n = "https://v5.ai-sdk.dev/unauthenticated-ai-gateway";
|
|
10648
10648
|
return t ? new te({
|
|
@@ -10661,7 +10661,7 @@ Learn more: \x1B[34m${n}\x1B[0m
|
|
|
10661
10661
|
{ name: "GatewayAuthenticationError" }
|
|
10662
10662
|
);
|
|
10663
10663
|
}
|
|
10664
|
-
function
|
|
10664
|
+
function Kr({
|
|
10665
10665
|
operationId: e,
|
|
10666
10666
|
telemetry: t
|
|
10667
10667
|
}) {
|
|
@@ -10752,7 +10752,7 @@ function Uv({
|
|
|
10752
10752
|
} = {}) {
|
|
10753
10753
|
return e ? t || Jy.getTracer("ai") : jv;
|
|
10754
10754
|
}
|
|
10755
|
-
function
|
|
10755
|
+
function Yr({
|
|
10756
10756
|
name: e,
|
|
10757
10757
|
tracer: t,
|
|
10758
10758
|
attributes: n,
|
|
@@ -10779,9 +10779,9 @@ function zu(e, t) {
|
|
|
10779
10779
|
message: t.message,
|
|
10780
10780
|
stack: t.stack
|
|
10781
10781
|
}), e.setStatus({
|
|
10782
|
-
code:
|
|
10782
|
+
code: rr.ERROR,
|
|
10783
10783
|
message: t.message
|
|
10784
|
-
})) : e.setStatus({ code:
|
|
10784
|
+
})) : e.setStatus({ code: rr.ERROR });
|
|
10785
10785
|
}
|
|
10786
10786
|
function Jt({
|
|
10787
10787
|
telemetry: e,
|
|
@@ -10956,11 +10956,11 @@ var Wv = class {
|
|
|
10956
10956
|
}
|
|
10957
10957
|
// lazy conversion with caching to avoid unnecessary conversion overhead:
|
|
10958
10958
|
get base64() {
|
|
10959
|
-
return this.base64Data == null && (this.base64Data =
|
|
10959
|
+
return this.base64Data == null && (this.base64Data = nr(this.uint8ArrayData)), this.base64Data;
|
|
10960
10960
|
}
|
|
10961
10961
|
// lazy conversion with caching to avoid unnecessary conversion overhead:
|
|
10962
10962
|
get uint8Array() {
|
|
10963
|
-
return this.uint8ArrayData == null && (this.uint8ArrayData =
|
|
10963
|
+
return this.uint8ArrayData == null && (this.uint8ArrayData = dr(this.base64Data)), this.uint8ArrayData;
|
|
10964
10964
|
}
|
|
10965
10965
|
};
|
|
10966
10966
|
async function Jv({
|
|
@@ -10972,11 +10972,11 @@ async function Jv({
|
|
|
10972
10972
|
}) {
|
|
10973
10973
|
try {
|
|
10974
10974
|
if (t == null)
|
|
10975
|
-
throw new
|
|
10975
|
+
throw new Jr({ toolName: e.toolName });
|
|
10976
10976
|
try {
|
|
10977
10977
|
return await qa({ toolCall: e, tools: t });
|
|
10978
10978
|
} catch (i) {
|
|
10979
|
-
if (n == null || !(
|
|
10979
|
+
if (n == null || !(Jr.isInstance(i) || hu.isInstance(i)))
|
|
10980
10980
|
throw i;
|
|
10981
10981
|
let a = null;
|
|
10982
10982
|
try {
|
|
@@ -10985,7 +10985,7 @@ async function Jv({
|
|
|
10985
10985
|
tools: t,
|
|
10986
10986
|
inputSchema: ({ toolName: s }) => {
|
|
10987
10987
|
const { inputSchema: l } = t[s];
|
|
10988
|
-
return
|
|
10988
|
+
return cr(l).jsonSchema;
|
|
10989
10989
|
},
|
|
10990
10990
|
system: r,
|
|
10991
10991
|
messages: o,
|
|
@@ -11021,11 +11021,11 @@ async function qa({
|
|
|
11021
11021
|
}) {
|
|
11022
11022
|
const n = e.toolName, r = t[n];
|
|
11023
11023
|
if (r == null)
|
|
11024
|
-
throw new
|
|
11024
|
+
throw new Jr({
|
|
11025
11025
|
toolName: e.toolName,
|
|
11026
11026
|
availableTools: Object.keys(t)
|
|
11027
11027
|
});
|
|
11028
|
-
const o =
|
|
11028
|
+
const o = cr(r.inputSchema), i = e.input.trim() === "" ? await gt({ value: {}, schema: o }) : await Ut({ text: e.input, schema: o });
|
|
11029
11029
|
if (i.success === !1)
|
|
11030
11030
|
throw new hu({
|
|
11031
11031
|
toolName: n,
|
|
@@ -11112,7 +11112,7 @@ async function Xv({
|
|
|
11112
11112
|
}) {
|
|
11113
11113
|
return (await Promise.all(e.map((n) => n({ steps: t })))).some((n) => n);
|
|
11114
11114
|
}
|
|
11115
|
-
function
|
|
11115
|
+
function Rr({
|
|
11116
11116
|
output: e,
|
|
11117
11117
|
tool: t,
|
|
11118
11118
|
errorMode: n
|
|
@@ -11163,7 +11163,7 @@ function Qv({
|
|
|
11163
11163
|
type: "tool-result",
|
|
11164
11164
|
toolCallId: i.toolCallId,
|
|
11165
11165
|
toolName: i.toolName,
|
|
11166
|
-
output:
|
|
11166
|
+
output: Rr({
|
|
11167
11167
|
tool: t == null ? void 0 : t[i.toolName],
|
|
11168
11168
|
output: i.output,
|
|
11169
11169
|
errorMode: "none"
|
|
@@ -11176,7 +11176,7 @@ function Qv({
|
|
|
11176
11176
|
type: "tool-result",
|
|
11177
11177
|
toolCallId: i.toolCallId,
|
|
11178
11178
|
toolName: i.toolName,
|
|
11179
|
-
output:
|
|
11179
|
+
output: Rr({
|
|
11180
11180
|
tool: t == null ? void 0 : t[i.toolName],
|
|
11181
11181
|
output: i.error,
|
|
11182
11182
|
errorMode: "json"
|
|
@@ -11193,7 +11193,7 @@ function Qv({
|
|
|
11193
11193
|
type: "tool-result",
|
|
11194
11194
|
toolCallId: i.toolCallId,
|
|
11195
11195
|
toolName: i.toolName,
|
|
11196
|
-
output:
|
|
11196
|
+
output: Rr({
|
|
11197
11197
|
tool: t == null ? void 0 : t[i.toolName],
|
|
11198
11198
|
output: i.type === "tool-result" ? i.output : i.error,
|
|
11199
11199
|
errorMode: i.type === "tool-error" ? "text" : "none"
|
|
@@ -11256,12 +11256,12 @@ async function Zu({
|
|
|
11256
11256
|
allowSystemInMessages: a
|
|
11257
11257
|
}), Y = Uv(x);
|
|
11258
11258
|
try {
|
|
11259
|
-
return await
|
|
11259
|
+
return await Yr({
|
|
11260
11260
|
name: "ai.generateText",
|
|
11261
11261
|
attributes: Jt({
|
|
11262
11262
|
telemetry: x,
|
|
11263
11263
|
attributes: {
|
|
11264
|
-
...
|
|
11264
|
+
...Kr({
|
|
11265
11265
|
operationId: "ai.generateText",
|
|
11266
11266
|
telemetry: x
|
|
11267
11267
|
}),
|
|
@@ -11292,14 +11292,14 @@ async function Zu({
|
|
|
11292
11292
|
messages: nt
|
|
11293
11293
|
})), Mt = Ba(
|
|
11294
11294
|
(ge = st == null ? void 0 : st.model) != null ? ge : Z
|
|
11295
|
-
),
|
|
11295
|
+
), Oo = await wv({
|
|
11296
11296
|
prompt: {
|
|
11297
11297
|
system: (Ce = st == null ? void 0 : st.system) != null ? Ce : be.system,
|
|
11298
11298
|
messages: (le = st == null ? void 0 : st.messages) != null ? le : nt
|
|
11299
11299
|
},
|
|
11300
11300
|
supportedUrls: await Mt.supportedUrls,
|
|
11301
11301
|
download: y
|
|
11302
|
-
}), { toolChoice:
|
|
11302
|
+
}), { toolChoice: fr, tools: mr } = Sv({
|
|
11303
11303
|
tools: t,
|
|
11304
11304
|
toolChoice: (he = st == null ? void 0 : st.toolChoice) != null ? he : n,
|
|
11305
11305
|
activeTools: (de = st == null ? void 0 : st.activeTools) != null ? de : E
|
|
@@ -11307,12 +11307,12 @@ async function Zu({
|
|
|
11307
11307
|
C = await oe(
|
|
11308
11308
|
() => {
|
|
11309
11309
|
var Ie;
|
|
11310
|
-
return
|
|
11310
|
+
return Yr({
|
|
11311
11311
|
name: "ai.generateText.doGenerate",
|
|
11312
11312
|
attributes: Jt({
|
|
11313
11313
|
telemetry: x,
|
|
11314
11314
|
attributes: {
|
|
11315
|
-
...
|
|
11315
|
+
...Kr({
|
|
11316
11316
|
operationId: "ai.generateText.doGenerate",
|
|
11317
11317
|
telemetry: x
|
|
11318
11318
|
}),
|
|
@@ -11322,14 +11322,14 @@ async function Zu({
|
|
|
11322
11322
|
"ai.model.id": Mt.modelId,
|
|
11323
11323
|
// prompt:
|
|
11324
11324
|
"ai.prompt.messages": {
|
|
11325
|
-
input: () => Bv(
|
|
11325
|
+
input: () => Bv(Oo)
|
|
11326
11326
|
},
|
|
11327
11327
|
"ai.prompt.tools": {
|
|
11328
11328
|
// convert the language model level tools:
|
|
11329
|
-
input: () =>
|
|
11329
|
+
input: () => mr == null ? void 0 : mr.map((zt) => JSON.stringify(zt))
|
|
11330
11330
|
},
|
|
11331
11331
|
"ai.prompt.toolChoice": {
|
|
11332
|
-
input: () =>
|
|
11332
|
+
input: () => fr != null ? JSON.stringify(fr) : void 0
|
|
11333
11333
|
},
|
|
11334
11334
|
// standardized gen-ai llm span attributes:
|
|
11335
11335
|
"gen_ai.system": Mt.provider,
|
|
@@ -11345,22 +11345,22 @@ async function Zu({
|
|
|
11345
11345
|
}),
|
|
11346
11346
|
tracer: Y,
|
|
11347
11347
|
fn: async (zt) => {
|
|
11348
|
-
var
|
|
11348
|
+
var No, Ro, Po, Mo, zo, Do, Zo, jo;
|
|
11349
11349
|
const Re = await Mt.doGenerate({
|
|
11350
11350
|
...ne,
|
|
11351
|
-
tools:
|
|
11352
|
-
toolChoice:
|
|
11351
|
+
tools: mr,
|
|
11352
|
+
toolChoice: fr,
|
|
11353
11353
|
responseFormat: g == null ? void 0 : g.responseFormat,
|
|
11354
|
-
prompt:
|
|
11354
|
+
prompt: Oo,
|
|
11355
11355
|
providerOptions: T,
|
|
11356
11356
|
abortSignal: l,
|
|
11357
11357
|
headers: F
|
|
11358
11358
|
}), Ht = {
|
|
11359
|
-
id: (
|
|
11360
|
-
timestamp: (
|
|
11361
|
-
modelId: (
|
|
11362
|
-
headers: (
|
|
11363
|
-
body: (
|
|
11359
|
+
id: (Ro = (No = Re.response) == null ? void 0 : No.id) != null ? Ro : b(),
|
|
11360
|
+
timestamp: (Mo = (Po = Re.response) == null ? void 0 : Po.timestamp) != null ? Mo : S(),
|
|
11361
|
+
modelId: (Do = (zo = Re.response) == null ? void 0 : zo.modelId) != null ? Do : Mt.modelId,
|
|
11362
|
+
headers: (Zo = Re.response) == null ? void 0 : Zo.headers,
|
|
11363
|
+
body: (jo = Re.response) == null ? void 0 : jo.body
|
|
11364
11364
|
};
|
|
11365
11365
|
return zt.setAttributes(
|
|
11366
11366
|
Jt({
|
|
@@ -11372,8 +11372,8 @@ async function Zu({
|
|
|
11372
11372
|
},
|
|
11373
11373
|
"ai.response.toolCalls": {
|
|
11374
11374
|
output: () => {
|
|
11375
|
-
const
|
|
11376
|
-
return
|
|
11375
|
+
const Lo = Ha(Re.content);
|
|
11376
|
+
return Lo == null ? void 0 : JSON.stringify(Lo);
|
|
11377
11377
|
}
|
|
11378
11378
|
},
|
|
11379
11379
|
"ai.response.id": Ht.id,
|
|
@@ -11451,19 +11451,19 @@ async function Zu({
|
|
|
11451
11451
|
experimental_context: $
|
|
11452
11452
|
})
|
|
11453
11453
|
);
|
|
11454
|
-
const
|
|
11454
|
+
const Ao = rb({
|
|
11455
11455
|
content: C.content,
|
|
11456
11456
|
toolCalls: Nn,
|
|
11457
11457
|
toolOutputs: re
|
|
11458
11458
|
});
|
|
11459
11459
|
w.push(
|
|
11460
11460
|
...Qv({
|
|
11461
|
-
content:
|
|
11461
|
+
content: Ao,
|
|
11462
11462
|
tools: t
|
|
11463
11463
|
})
|
|
11464
11464
|
);
|
|
11465
|
-
const
|
|
11466
|
-
content:
|
|
11465
|
+
const $o = new Kv({
|
|
11466
|
+
content: Ao,
|
|
11467
11467
|
finishReason: C.finishReason,
|
|
11468
11468
|
usage: C.usage,
|
|
11469
11469
|
warnings: C.warnings,
|
|
@@ -11475,7 +11475,7 @@ async function Zu({
|
|
|
11475
11475
|
messages: structuredClone(w)
|
|
11476
11476
|
}
|
|
11477
11477
|
});
|
|
11478
|
-
nv((A = C.warnings) != null ? A : []), ie.push(
|
|
11478
|
+
nv((A = C.warnings) != null ? A : []), ie.push($o), await (m == null ? void 0 : m($o));
|
|
11479
11479
|
} while (
|
|
11480
11480
|
// there are tool calls:
|
|
11481
11481
|
H.length > 0 && // all current tool calls have outputs (incl. execution errors):
|
|
@@ -11537,12 +11537,12 @@ async function tb({
|
|
|
11537
11537
|
e.map(async ({ toolCallId: l, toolName: c, input: p }) => {
|
|
11538
11538
|
const g = t[c];
|
|
11539
11539
|
if ((g == null ? void 0 : g.execute) != null)
|
|
11540
|
-
return
|
|
11540
|
+
return Yr({
|
|
11541
11541
|
name: "ai.toolCall",
|
|
11542
11542
|
attributes: Jt({
|
|
11543
11543
|
telemetry: r,
|
|
11544
11544
|
attributes: {
|
|
11545
|
-
...
|
|
11545
|
+
...Kr({
|
|
11546
11546
|
operationId: "ai.toolCall",
|
|
11547
11547
|
telemetry: r
|
|
11548
11548
|
}),
|
|
@@ -12043,7 +12043,7 @@ var lb = () => ({
|
|
|
12043
12043
|
}), ub = ({
|
|
12044
12044
|
schema: e
|
|
12045
12045
|
}) => {
|
|
12046
|
-
const t =
|
|
12046
|
+
const t = cr(e);
|
|
12047
12047
|
return {
|
|
12048
12048
|
type: "object",
|
|
12049
12049
|
responseFormat: {
|
|
@@ -12312,7 +12312,7 @@ var lb = () => ({
|
|
|
12312
12312
|
stop_reason: u().nullish(),
|
|
12313
12313
|
stop_sequence: u().nullish(),
|
|
12314
12314
|
stop_details: ju.nullish(),
|
|
12315
|
-
usage:
|
|
12315
|
+
usage: Zr({
|
|
12316
12316
|
input_tokens: f(),
|
|
12317
12317
|
output_tokens: f(),
|
|
12318
12318
|
cache_creation_input_tokens: f().nullish(),
|
|
@@ -12373,7 +12373,7 @@ var lb = () => ({
|
|
|
12373
12373
|
message: d({
|
|
12374
12374
|
id: u().nullish(),
|
|
12375
12375
|
model: u().nullish(),
|
|
12376
|
-
usage:
|
|
12376
|
+
usage: Zr({
|
|
12377
12377
|
input_tokens: f(),
|
|
12378
12378
|
cache_creation_input_tokens: f().nullish(),
|
|
12379
12379
|
cache_read_input_tokens: f().nullish()
|
|
@@ -12628,7 +12628,7 @@ var lb = () => ({
|
|
|
12628
12628
|
).nullish()
|
|
12629
12629
|
}).nullish()
|
|
12630
12630
|
}),
|
|
12631
|
-
usage:
|
|
12631
|
+
usage: Zr({
|
|
12632
12632
|
input_tokens: f().nullish(),
|
|
12633
12633
|
output_tokens: f(),
|
|
12634
12634
|
cache_creation_input_tokens: f().nullish(),
|
|
@@ -12902,7 +12902,7 @@ function _b(e) {
|
|
|
12902
12902
|
const n = e == null ? void 0 : e.anthropic;
|
|
12903
12903
|
return (t = n == null ? void 0 : n.cacheControl) != null ? t : n == null ? void 0 : n.cache_control;
|
|
12904
12904
|
}
|
|
12905
|
-
var
|
|
12905
|
+
var To = class {
|
|
12906
12906
|
constructor() {
|
|
12907
12907
|
this.breakpointCount = 0, this.warnings = [];
|
|
12908
12908
|
}
|
|
@@ -13046,7 +13046,7 @@ async function Ob({
|
|
|
13046
13046
|
}) {
|
|
13047
13047
|
var o;
|
|
13048
13048
|
e = e != null && e.length ? e : void 0;
|
|
13049
|
-
const i = [], a = /* @__PURE__ */ new Set(), s = r || new
|
|
13049
|
+
const i = [], a = /* @__PURE__ */ new Set(), s = r || new To();
|
|
13050
13050
|
if (e == null)
|
|
13051
13051
|
return { tools: void 0, toolChoice: void 0, toolWarnings: i, betas: a };
|
|
13052
13052
|
const l = [];
|
|
@@ -13386,7 +13386,7 @@ async function Db({
|
|
|
13386
13386
|
cacheControlValidator: r
|
|
13387
13387
|
}) {
|
|
13388
13388
|
var o, i, a, s, l, c;
|
|
13389
|
-
const p = /* @__PURE__ */ new Set(), g = Zb(e), x = r || new
|
|
13389
|
+
const p = /* @__PURE__ */ new Set(), g = Zb(e), x = r || new To();
|
|
13390
13390
|
let T;
|
|
13391
13391
|
const I = [];
|
|
13392
13392
|
async function E(_) {
|
|
@@ -14069,7 +14069,7 @@ var qb = class {
|
|
|
14069
14069
|
name: "json",
|
|
14070
14070
|
description: "Respond with a JSON object.",
|
|
14071
14071
|
inputSchema: c.schema
|
|
14072
|
-
} : void 0, W = new
|
|
14072
|
+
} : void 0, W = new To(), { prompt: be, betas: Y } = await Db({
|
|
14073
14073
|
prompt: t,
|
|
14074
14074
|
sendReasoning: (E = m == null ? void 0 : m.sendReasoning) != null ? E : !0,
|
|
14075
14075
|
warnings: S,
|
|
@@ -15334,11 +15334,11 @@ var Hb = K(
|
|
|
15334
15334
|
"wait",
|
|
15335
15335
|
"screenshot"
|
|
15336
15336
|
]),
|
|
15337
|
-
coordinate:
|
|
15337
|
+
coordinate: jr([f().int(), f().int()]).optional(),
|
|
15338
15338
|
duration: f().optional(),
|
|
15339
15339
|
scroll_amount: f().optional(),
|
|
15340
15340
|
scroll_direction: X(["up", "down", "left", "right"]).optional(),
|
|
15341
|
-
start_coordinate:
|
|
15341
|
+
start_coordinate: jr([f().int(), f().int()]).optional(),
|
|
15342
15342
|
text: u().optional()
|
|
15343
15343
|
})
|
|
15344
15344
|
)
|
|
@@ -15352,7 +15352,7 @@ var Hb = K(
|
|
|
15352
15352
|
d({
|
|
15353
15353
|
command: h("view"),
|
|
15354
15354
|
path: u(),
|
|
15355
|
-
view_range:
|
|
15355
|
+
view_range: jr([f(), f()]).optional()
|
|
15356
15356
|
}),
|
|
15357
15357
|
d({
|
|
15358
15358
|
command: h("create"),
|
|
@@ -15599,7 +15599,7 @@ var Hb = K(
|
|
|
15599
15599
|
};
|
|
15600
15600
|
function Gu(e = {}) {
|
|
15601
15601
|
var t, n;
|
|
15602
|
-
const r = (t =
|
|
15602
|
+
const r = (t = yo(
|
|
15603
15603
|
Zt({
|
|
15604
15604
|
settingValue: e.baseURL,
|
|
15605
15605
|
environmentVariableName: "ANTHROPIC_BASE_URL"
|
|
@@ -15641,7 +15641,7 @@ function Gu(e = {}) {
|
|
|
15641
15641
|
}, s.tools = hw, s;
|
|
15642
15642
|
}
|
|
15643
15643
|
Gu();
|
|
15644
|
-
var
|
|
15644
|
+
var So = d({
|
|
15645
15645
|
error: d({
|
|
15646
15646
|
message: u(),
|
|
15647
15647
|
// The additional information below is handled loosely to support
|
|
@@ -15652,7 +15652,7 @@ var To = d({
|
|
|
15652
15652
|
code: ee([u(), f()]).nullish()
|
|
15653
15653
|
})
|
|
15654
15654
|
}), ft = pt({
|
|
15655
|
-
errorSchema:
|
|
15655
|
+
errorSchema: So,
|
|
15656
15656
|
errorToMessage: (e) => e.error.message
|
|
15657
15657
|
});
|
|
15658
15658
|
function Hu(e) {
|
|
@@ -15828,7 +15828,7 @@ function fw({
|
|
|
15828
15828
|
}
|
|
15829
15829
|
return { messages: n, warnings: r };
|
|
15830
15830
|
}
|
|
15831
|
-
function
|
|
15831
|
+
function Pr({
|
|
15832
15832
|
id: e,
|
|
15833
15833
|
model: t,
|
|
15834
15834
|
created: n
|
|
@@ -15987,7 +15987,7 @@ var mw = Ee(
|
|
|
15987
15987
|
}).nullish()
|
|
15988
15988
|
}).nullish()
|
|
15989
15989
|
}),
|
|
15990
|
-
|
|
15990
|
+
So
|
|
15991
15991
|
])
|
|
15992
15992
|
)
|
|
15993
15993
|
), gw = Ee(
|
|
@@ -16339,7 +16339,7 @@ var vw = class {
|
|
|
16339
16339
|
},
|
|
16340
16340
|
request: { body: E },
|
|
16341
16341
|
response: {
|
|
16342
|
-
...
|
|
16342
|
+
...Pr(v),
|
|
16343
16343
|
headers: _,
|
|
16344
16344
|
body: y
|
|
16345
16345
|
},
|
|
@@ -16394,10 +16394,10 @@ var vw = class {
|
|
|
16394
16394
|
return;
|
|
16395
16395
|
}
|
|
16396
16396
|
if (!c) {
|
|
16397
|
-
const A =
|
|
16397
|
+
const A = Pr(he);
|
|
16398
16398
|
Object.values(A).some(Boolean) && (c = !0, T.enqueue({
|
|
16399
16399
|
type: "response-metadata",
|
|
16400
|
-
...
|
|
16400
|
+
...Pr(he)
|
|
16401
16401
|
}));
|
|
16402
16402
|
}
|
|
16403
16403
|
he.usage != null && (l.inputTokens = (I = he.usage.prompt_tokens) != null ? I : void 0, l.outputTokens = (E = he.usage.completion_tokens) != null ? E : void 0, l.totalTokens = (k = he.usage.total_tokens) != null ? k : void 0, l.reasoningTokens = (v = (_ = he.usage.completion_tokens_details) == null ? void 0 : _.reasoning_tokens) != null ? v : void 0, l.cachedInputTokens = ($ = (y = he.usage.prompt_tokens_details) == null ? void 0 : y.cached_tokens) != null ? $ : void 0, ((b = he.usage.completion_tokens_details) == null ? void 0 : b.accepted_prediction_tokens) != null && (g.openai.acceptedPredictionTokens = (S = he.usage.completion_tokens_details) == null ? void 0 : S.accepted_prediction_tokens), ((m = he.usage.completion_tokens_details) == null ? void 0 : m.rejected_prediction_tokens) != null && (g.openai.rejectedPredictionTokens = (N = he.usage.completion_tokens_details) == null ? void 0 : N.rejected_prediction_tokens));
|
|
@@ -16414,17 +16414,17 @@ var vw = class {
|
|
|
16414
16414
|
const ne = A.index;
|
|
16415
16415
|
if (a[ne] == null) {
|
|
16416
16416
|
if (A.type != null && A.type !== "function")
|
|
16417
|
-
throw new
|
|
16417
|
+
throw new gr({
|
|
16418
16418
|
data: A,
|
|
16419
16419
|
message: "Expected 'function' type."
|
|
16420
16420
|
});
|
|
16421
16421
|
if (A.id == null)
|
|
16422
|
-
throw new
|
|
16422
|
+
throw new gr({
|
|
16423
16423
|
data: A,
|
|
16424
16424
|
message: "Expected 'id' to be a string."
|
|
16425
16425
|
});
|
|
16426
16426
|
if (((B = A.function) == null ? void 0 : B.name) == null)
|
|
16427
|
-
throw new
|
|
16427
|
+
throw new gr({
|
|
16428
16428
|
data: A,
|
|
16429
16429
|
message: "Expected 'function.name' to be a string."
|
|
16430
16430
|
});
|
|
@@ -16634,7 +16634,7 @@ var ww = Ee(
|
|
|
16634
16634
|
total_tokens: f()
|
|
16635
16635
|
}).nullish()
|
|
16636
16636
|
}),
|
|
16637
|
-
|
|
16637
|
+
So
|
|
16638
16638
|
])
|
|
16639
16639
|
)
|
|
16640
16640
|
), rs = Ee(
|
|
@@ -19465,7 +19465,7 @@ var b0 = Ee(
|
|
|
19465
19465
|
provider: "openai",
|
|
19466
19466
|
providerOptions: n,
|
|
19467
19467
|
schema: k0
|
|
19468
|
-
}), i = new FormData(), a = e instanceof Uint8Array ? new Blob([e]) : new Blob([
|
|
19468
|
+
}), i = new FormData(), a = e instanceof Uint8Array ? new Blob([e]) : new Blob([dr(e)]);
|
|
19469
19469
|
i.append("model", this.modelId);
|
|
19470
19470
|
const s = Pm(t);
|
|
19471
19471
|
if (i.append(
|
|
@@ -19542,9 +19542,9 @@ var b0 = Ee(
|
|
|
19542
19542
|
};
|
|
19543
19543
|
}
|
|
19544
19544
|
}, T0 = "2.0.110";
|
|
19545
|
-
function
|
|
19545
|
+
function Bn(e = {}) {
|
|
19546
19546
|
var t, n;
|
|
19547
|
-
const r = (t =
|
|
19547
|
+
const r = (t = yo(
|
|
19548
19548
|
Zt({
|
|
19549
19549
|
settingValue: e.baseURL,
|
|
19550
19550
|
environmentVariableName: "OPENAI_BASE_URL"
|
|
@@ -19608,7 +19608,7 @@ function Un(e = {}) {
|
|
|
19608
19608
|
};
|
|
19609
19609
|
return I.languageModel = x, I.chat = a, I.completion = s, I.responses = T, I.embedding = l, I.textEmbedding = l, I.textEmbeddingModel = l, I.image = c, I.imageModel = c, I.transcription = p, I.transcriptionModel = p, I.speech = g, I.speechModel = g, I.tools = r0, I;
|
|
19610
19610
|
}
|
|
19611
|
-
|
|
19611
|
+
Bn();
|
|
19612
19612
|
const Qu = {
|
|
19613
19613
|
"anthropic-dangerous-direct-browser-access": "true"
|
|
19614
19614
|
};
|
|
@@ -19649,7 +19649,7 @@ function tc(e) {
|
|
|
19649
19649
|
apiKey: e.apiKey,
|
|
19650
19650
|
baseURL: t,
|
|
19651
19651
|
headers: Qu
|
|
19652
|
-
})(e.model) : e.protocol === "openai-responses" ?
|
|
19652
|
+
})(e.model) : e.protocol === "openai-responses" ? Bn({ apiKey: e.apiKey, baseURL: t }).responses(e.model) : e.kind === "builtin" && e.provider === "openai" ? Bn({ apiKey: e.apiKey, baseURL: t }).chat(e.model) : Bn({
|
|
19653
19653
|
apiKey: e.apiKey,
|
|
19654
19654
|
baseURL: t,
|
|
19655
19655
|
fetch: S0()
|
|
@@ -19756,7 +19756,7 @@ function oc(e) {
|
|
|
19756
19756
|
var t;
|
|
19757
19757
|
return ((t = e.name) == null ? void 0 : t.trim()) || e.id;
|
|
19758
19758
|
}
|
|
19759
|
-
const N0 = 1, ic = "cad-agent-plugin-api-key-v1",
|
|
19759
|
+
const N0 = 1, ic = "cad-agent-plugin-api-key-v1", Xr = 12, Qr = `enc:v${N0}:`;
|
|
19760
19760
|
function R0() {
|
|
19761
19761
|
var t;
|
|
19762
19762
|
return `${typeof ((t = globalThis.location) == null ? void 0 : t.origin) == "string" ? globalThis.location.origin : "file://"}:${ic}`;
|
|
@@ -19797,22 +19797,22 @@ function M0(e) {
|
|
|
19797
19797
|
async function z0(e) {
|
|
19798
19798
|
if (!e)
|
|
19799
19799
|
return "";
|
|
19800
|
-
const t = await ac(), n = crypto.getRandomValues(new Uint8Array(
|
|
19800
|
+
const t = await ac(), n = crypto.getRandomValues(new Uint8Array(Xr)), r = new TextEncoder().encode(e), o = await crypto.subtle.encrypt(
|
|
19801
19801
|
{ name: "AES-GCM", iv: n },
|
|
19802
19802
|
t,
|
|
19803
19803
|
r
|
|
19804
19804
|
), i = new Uint8Array(n.length + o.byteLength);
|
|
19805
|
-
return i.set(n, 0), i.set(new Uint8Array(o), n.length), `${
|
|
19805
|
+
return i.set(n, 0), i.set(new Uint8Array(o), n.length), `${Qr}${P0(i)}`;
|
|
19806
19806
|
}
|
|
19807
19807
|
async function sc(e) {
|
|
19808
19808
|
if (!e)
|
|
19809
19809
|
return "";
|
|
19810
|
-
if (!e.startsWith(
|
|
19810
|
+
if (!e.startsWith(Qr))
|
|
19811
19811
|
return e;
|
|
19812
19812
|
try {
|
|
19813
19813
|
const t = await ac(), n = M0(
|
|
19814
|
-
e.slice(
|
|
19815
|
-
), r = n.slice(0,
|
|
19814
|
+
e.slice(Qr.length)
|
|
19815
|
+
), r = n.slice(0, Xr), o = n.slice(Xr), i = await crypto.subtle.decrypt(
|
|
19816
19816
|
{ name: "AES-GCM", iv: r },
|
|
19817
19817
|
t,
|
|
19818
19818
|
o
|
|
@@ -19822,12 +19822,12 @@ async function sc(e) {
|
|
|
19822
19822
|
return "";
|
|
19823
19823
|
}
|
|
19824
19824
|
}
|
|
19825
|
-
const lc = "cad-agent-plugin.llm-config", D0 = "cad-agent-plugin.llm-settings",
|
|
19826
|
-
function
|
|
19825
|
+
const lc = "cad-agent-plugin.llm-config", D0 = "cad-agent-plugin.llm-settings", or = "deepseek", uc = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
|
|
19826
|
+
function Fn() {
|
|
19827
19827
|
return {
|
|
19828
19828
|
providers: [],
|
|
19829
|
-
activeProviderId:
|
|
19830
|
-
activeModel: rn[
|
|
19829
|
+
activeProviderId: or,
|
|
19830
|
+
activeModel: rn[or].models[0].id
|
|
19831
19831
|
};
|
|
19832
19832
|
}
|
|
19833
19833
|
function Ft(e) {
|
|
@@ -19840,7 +19840,7 @@ function Ft(e) {
|
|
|
19840
19840
|
models: null
|
|
19841
19841
|
};
|
|
19842
19842
|
}
|
|
19843
|
-
function
|
|
19843
|
+
function eo() {
|
|
19844
19844
|
return {
|
|
19845
19845
|
id: "",
|
|
19846
19846
|
kind: "custom",
|
|
@@ -19858,18 +19858,18 @@ function on(e, t) {
|
|
|
19858
19858
|
function Rt(e) {
|
|
19859
19859
|
return e.models ? e.models : e.kind === "builtin" && at(e.id) ? rn[e.id].models : [];
|
|
19860
19860
|
}
|
|
19861
|
-
function
|
|
19861
|
+
function ir(e) {
|
|
19862
19862
|
const t = e.baseUrl.trim();
|
|
19863
19863
|
return t || (e.kind === "builtin" && at(e.id) ? rn[e.id].baseUrl : "");
|
|
19864
19864
|
}
|
|
19865
19865
|
function cc(e) {
|
|
19866
|
-
const t = on(e, e.activeProviderId) ?? Ft(
|
|
19866
|
+
const t = on(e, e.activeProviderId) ?? Ft(or);
|
|
19867
19867
|
return {
|
|
19868
19868
|
provider: t.id,
|
|
19869
19869
|
kind: t.kind,
|
|
19870
19870
|
protocol: t.protocol,
|
|
19871
19871
|
apiKey: t.apiKey,
|
|
19872
|
-
baseUrl:
|
|
19872
|
+
baseUrl: ir(t),
|
|
19873
19873
|
model: e.activeModel
|
|
19874
19874
|
};
|
|
19875
19875
|
}
|
|
@@ -19879,7 +19879,7 @@ function dc(e) {
|
|
|
19879
19879
|
) : void 0;
|
|
19880
19880
|
return n ? n.vision : kn(e.activeModel);
|
|
19881
19881
|
}
|
|
19882
|
-
function
|
|
19882
|
+
function Eo(e) {
|
|
19883
19883
|
const t = cc(e);
|
|
19884
19884
|
if (t.apiKey.trim() && dc(e))
|
|
19885
19885
|
return t;
|
|
@@ -19915,7 +19915,7 @@ function hc(e, t) {
|
|
|
19915
19915
|
kind: e.kind,
|
|
19916
19916
|
protocol: e.protocol,
|
|
19917
19917
|
apiKey: e.apiKey,
|
|
19918
|
-
baseUrl:
|
|
19918
|
+
baseUrl: ir(e),
|
|
19919
19919
|
model: t
|
|
19920
19920
|
};
|
|
19921
19921
|
}
|
|
@@ -19956,10 +19956,10 @@ function U0(e) {
|
|
|
19956
19956
|
};
|
|
19957
19957
|
}
|
|
19958
19958
|
const o = (s = e.model) == null ? void 0 : s.trim();
|
|
19959
|
-
return r !== "openai-compatible" || !o ?
|
|
19959
|
+
return r !== "openai-compatible" || !o ? Fn() : {
|
|
19960
19960
|
providers: [
|
|
19961
19961
|
{
|
|
19962
|
-
...
|
|
19962
|
+
...eo(),
|
|
19963
19963
|
id: r,
|
|
19964
19964
|
baseUrl: n,
|
|
19965
19965
|
apiKey: t,
|
|
@@ -20009,7 +20009,7 @@ function ds(e) {
|
|
|
20009
20009
|
function fc(e) {
|
|
20010
20010
|
var n;
|
|
20011
20011
|
if (on(e, e.activeProviderId)) return e;
|
|
20012
|
-
const t = e.providers.find((r) => r.apiKey.trim()) ?? Ft(
|
|
20012
|
+
const t = e.providers.find((r) => r.apiKey.trim()) ?? Ft(or);
|
|
20013
20013
|
return {
|
|
20014
20014
|
...e,
|
|
20015
20015
|
activeProviderId: t.id,
|
|
@@ -20025,21 +20025,21 @@ async function $n() {
|
|
|
20025
20025
|
const e = localStorage.getItem(lc);
|
|
20026
20026
|
if (!e) {
|
|
20027
20027
|
const o = localStorage.getItem(D0);
|
|
20028
|
-
return o ? U0(await F0(o)) :
|
|
20028
|
+
return o ? U0(await F0(o)) : Fn();
|
|
20029
20029
|
}
|
|
20030
20030
|
const t = JSON.parse(e), n = [];
|
|
20031
20031
|
for (const o of t.providers ?? []) {
|
|
20032
20032
|
const i = o.apiKeyEnc ? await sc(o.apiKeyEnc) : "", a = B0(o, i);
|
|
20033
20033
|
a && !n.some((s) => s.id === a.id) && n.push(a);
|
|
20034
20034
|
}
|
|
20035
|
-
const r =
|
|
20035
|
+
const r = Fn();
|
|
20036
20036
|
return fc({
|
|
20037
20037
|
providers: n,
|
|
20038
20038
|
activeProviderId: t.activeProviderId ?? r.activeProviderId,
|
|
20039
20039
|
activeModel: t.activeModel ?? r.activeModel
|
|
20040
20040
|
});
|
|
20041
20041
|
} catch {
|
|
20042
|
-
return
|
|
20042
|
+
return Fn();
|
|
20043
20043
|
}
|
|
20044
20044
|
}
|
|
20045
20045
|
async function ps(e) {
|
|
@@ -20059,20 +20059,20 @@ async function ps(e) {
|
|
|
20059
20059
|
activeProviderId: e.activeProviderId,
|
|
20060
20060
|
activeModel: e.activeModel
|
|
20061
20061
|
};
|
|
20062
|
-
localStorage.setItem(lc, JSON.stringify(n)),
|
|
20063
|
-
new CustomEvent(
|
|
20062
|
+
localStorage.setItem(lc, JSON.stringify(n)), no.dispatchEvent(
|
|
20063
|
+
new CustomEvent(to, { detail: e })
|
|
20064
20064
|
);
|
|
20065
20065
|
}
|
|
20066
|
-
const
|
|
20066
|
+
const to = "change", no = new EventTarget();
|
|
20067
20067
|
function V0(e) {
|
|
20068
20068
|
const t = (n) => e(n.detail);
|
|
20069
|
-
return
|
|
20069
|
+
return no.addEventListener(to, t), () => no.removeEventListener(to, t);
|
|
20070
20070
|
}
|
|
20071
20071
|
async function wx() {
|
|
20072
20072
|
const e = await $n();
|
|
20073
20073
|
return {
|
|
20074
20074
|
configured: e.providers.some((t) => t.apiKey.trim()),
|
|
20075
|
-
vision: !!
|
|
20075
|
+
vision: !!Eo(e)
|
|
20076
20076
|
};
|
|
20077
20077
|
}
|
|
20078
20078
|
const q0 = `You read text from images of CAD drawings.
|
|
@@ -20213,7 +20213,7 @@ function gc(e, t) {
|
|
|
20213
20213
|
e,
|
|
20214
20214
|
t.providerId,
|
|
20215
20215
|
t.modelId
|
|
20216
|
-
) : pc(e, t.providerId) :
|
|
20216
|
+
) : pc(e, t.providerId) : Eo(e);
|
|
20217
20217
|
}
|
|
20218
20218
|
const K0 = {
|
|
20219
20219
|
deepseek: "providerDeepseek",
|
|
@@ -20224,11 +20224,11 @@ const K0 = {
|
|
|
20224
20224
|
function yc(e) {
|
|
20225
20225
|
return j(K0[e]);
|
|
20226
20226
|
}
|
|
20227
|
-
function
|
|
20227
|
+
function Co(e) {
|
|
20228
20228
|
var t;
|
|
20229
20229
|
return e.kind === "builtin" && at(e.id) ? yc(e.id) : ((t = e.displayName) == null ? void 0 : t.trim()) || e.id;
|
|
20230
20230
|
}
|
|
20231
|
-
const
|
|
20231
|
+
const jn = /* @__PURE__ */ new Map();
|
|
20232
20232
|
let _s, un;
|
|
20233
20233
|
async function Y0() {
|
|
20234
20234
|
return un || (un = X0().finally(() => {
|
|
@@ -20244,41 +20244,44 @@ async function X0() {
|
|
|
20244
20244
|
const e = await $n(), t = /* @__PURE__ */ new Set();
|
|
20245
20245
|
for (const n of e.providers) {
|
|
20246
20246
|
if (!n.apiKey.trim()) continue;
|
|
20247
|
-
const r =
|
|
20247
|
+
const r = Co(n);
|
|
20248
20248
|
for (const o of Q0(n)) {
|
|
20249
20249
|
const i = kc(n.id, o.id);
|
|
20250
20250
|
t.add(i);
|
|
20251
|
-
const a = oc(o), s =
|
|
20252
|
-
|
|
20251
|
+
const a = oc(o), s = `${r} — ${a}`;
|
|
20252
|
+
if (jn.get(i) === s && _r.has(i))
|
|
20253
|
+
continue;
|
|
20254
|
+
const l = () => s;
|
|
20255
|
+
_r.register({
|
|
20253
20256
|
id: i,
|
|
20254
|
-
label:
|
|
20257
|
+
label: l,
|
|
20255
20258
|
keyword: () => ({
|
|
20256
|
-
display:
|
|
20257
|
-
local:
|
|
20259
|
+
display: l(),
|
|
20260
|
+
local: l(),
|
|
20258
20261
|
// Stable English slug for `-pdfimport` keywords.
|
|
20259
20262
|
global: `${n.id}/${o.id}`
|
|
20260
20263
|
}),
|
|
20261
20264
|
// Picker-only: `pdftext` keeps using the bootstrap `cad-llm` auto entry.
|
|
20262
20265
|
auto: !1,
|
|
20263
20266
|
isAvailable: () => !0,
|
|
20264
|
-
recognize: (
|
|
20267
|
+
recognize: (c) => J0(c, {
|
|
20265
20268
|
providerId: n.id,
|
|
20266
20269
|
modelId: o.id
|
|
20267
20270
|
}),
|
|
20268
|
-
recognizeBatch: (
|
|
20271
|
+
recognizeBatch: (c) => H0(c, {
|
|
20269
20272
|
providerId: n.id,
|
|
20270
20273
|
modelId: o.id
|
|
20271
20274
|
})
|
|
20272
|
-
}),
|
|
20275
|
+
}), jn.set(i, s);
|
|
20273
20276
|
}
|
|
20274
20277
|
}
|
|
20275
|
-
for (const n of [...
|
|
20276
|
-
t.has(n) || (
|
|
20278
|
+
for (const n of [...jn.keys()])
|
|
20279
|
+
t.has(n) || (_r.unregister(n), jn.delete(n));
|
|
20277
20280
|
}
|
|
20278
20281
|
function Q0(e) {
|
|
20279
20282
|
return Rt(e).filter((t) => t.vision);
|
|
20280
20283
|
}
|
|
20281
|
-
const ex = "1.8.0
|
|
20284
|
+
const ex = "1.8.0", tx = {
|
|
20282
20285
|
version: ex
|
|
20283
20286
|
};
|
|
20284
20287
|
class fn extends Error {
|
|
@@ -20357,7 +20360,7 @@ function ux(e) {
|
|
|
20357
20360
|
return o === t && n && !a.some((s) => s.id === n) && a.push({ id: n, vision: !1 }), [
|
|
20358
20361
|
{
|
|
20359
20362
|
providerId: o,
|
|
20360
|
-
label:
|
|
20363
|
+
label: Co(i),
|
|
20361
20364
|
options: a.map((s) => ({
|
|
20362
20365
|
providerId: o,
|
|
20363
20366
|
modelId: s.id,
|
|
@@ -20788,7 +20791,7 @@ const cx = `
|
|
|
20788
20791
|
"openai-chat": "protocolOpenaiChat",
|
|
20789
20792
|
"openai-responses": "protocolOpenaiResponses",
|
|
20790
20793
|
"anthropic-messages": "protocolAnthropicMessages"
|
|
20791
|
-
},
|
|
20794
|
+
}, Ln = `
|
|
20792
20795
|
`, px = "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z", hx = "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z", fx = "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z";
|
|
20793
20796
|
function ys(e) {
|
|
20794
20797
|
return {
|
|
@@ -20825,7 +20828,7 @@ function J(e, t = "", n) {
|
|
|
20825
20828
|
const r = document.createElement(e);
|
|
20826
20829
|
return t && (r.className = t), n !== void 0 && (r.textContent = n), r;
|
|
20827
20830
|
}
|
|
20828
|
-
function
|
|
20831
|
+
function Mr(e, t = "") {
|
|
20829
20832
|
const n = "http://www.w3.org/2000/svg", r = document.createElementNS(n, "svg");
|
|
20830
20833
|
r.setAttribute("viewBox", "0 0 24 24"), r.setAttribute("aria-hidden", "true"), t && r.setAttribute("class", t);
|
|
20831
20834
|
const o = document.createElementNS(n, "path");
|
|
@@ -20895,7 +20898,7 @@ const je = class je extends bc {
|
|
|
20895
20898
|
}
|
|
20896
20899
|
loadCustom(t) {
|
|
20897
20900
|
const n = t ? this.storedProvider(t) : void 0;
|
|
20898
|
-
return ys(n ??
|
|
20901
|
+
return ys(n ?? eo());
|
|
20899
20902
|
}
|
|
20900
20903
|
get draft() {
|
|
20901
20904
|
return this.mode === "builtin" ? this.builtinDraft : this.customDraft;
|
|
@@ -20905,7 +20908,7 @@ const je = class je extends bc {
|
|
|
20905
20908
|
}
|
|
20906
20909
|
/** Whether the provider being edited differs from its saved copy. */
|
|
20907
20910
|
isDirty() {
|
|
20908
|
-
const t = this.mode === "builtin" ? this.storedProvider(this.builtinId) ?? Ft(this.builtinId) : this.storedProvider(this.customId) ??
|
|
20911
|
+
const t = this.mode === "builtin" ? this.storedProvider(this.builtinId) ?? Ft(this.builtinId) : this.storedProvider(this.customId) ?? eo();
|
|
20909
20912
|
return !lx(this.draft, t);
|
|
20910
20913
|
}
|
|
20911
20914
|
displayModels() {
|
|
@@ -20916,7 +20919,7 @@ const je = class je extends bc {
|
|
|
20916
20919
|
this.draft.models = t;
|
|
20917
20920
|
}
|
|
20918
20921
|
fetchBlockedReason() {
|
|
20919
|
-
return
|
|
20922
|
+
return ir(this.draft) ? this.draft.apiKey.trim() ? "" : j("fetchNeedsKey") : j("fetchNeedsBaseUrl");
|
|
20920
20923
|
}
|
|
20921
20924
|
providerIdError() {
|
|
20922
20925
|
if (!this.isNewCustom()) return "";
|
|
@@ -20989,15 +20992,15 @@ const je = class je extends bc {
|
|
|
20989
20992
|
a.label = i.label;
|
|
20990
20993
|
for (const s of i.options) {
|
|
20991
20994
|
const l = J("option", "", s.label);
|
|
20992
|
-
l.value = `${s.providerId}${
|
|
20995
|
+
l.value = `${s.providerId}${Ln}${s.modelId}`, a.appendChild(l);
|
|
20993
20996
|
}
|
|
20994
20997
|
n.appendChild(a);
|
|
20995
20998
|
}
|
|
20996
|
-
return n.value = `${this.config.activeProviderId}${
|
|
20999
|
+
return n.value = `${this.config.activeProviderId}${Ln}${this.config.activeModel}`, n.addEventListener("change", () => {
|
|
20997
21000
|
this.selectActiveModel(n.value);
|
|
20998
21001
|
}), t.appendChild(lt(j("activeModel"), n)), this.config.providers.some(
|
|
20999
21002
|
(i) => i.apiKey.trim()
|
|
21000
|
-
) ?
|
|
21003
|
+
) ? Eo(this.config) || t.appendChild(J("p", "ml-llm-warning", j("visionMissing"))) : t.appendChild(J("p", "ml-llm-warning", j("activeModelNone"))), t.appendChild(J("p", "ml-llm-hint", j("activeModelHint"))), t;
|
|
21001
21004
|
}
|
|
21002
21005
|
renderEditor() {
|
|
21003
21006
|
const t = J("div", "ml-llm-segmented");
|
|
@@ -21057,7 +21060,7 @@ const je = class je extends bc {
|
|
|
21057
21060
|
this.showAdvanced = !this.showAdvanced, this.render();
|
|
21058
21061
|
});
|
|
21059
21062
|
i.setAttribute("aria-expanded", String(this.showAdvanced)), i.append(
|
|
21060
|
-
|
|
21063
|
+
Mr(
|
|
21061
21064
|
px,
|
|
21062
21065
|
`ml-llm-disclosure-icon${this.showAdvanced ? " is-open" : ""}`
|
|
21063
21066
|
),
|
|
@@ -21095,7 +21098,7 @@ const je = class je extends bc {
|
|
|
21095
21098
|
if (r.length) {
|
|
21096
21099
|
const l = J("select");
|
|
21097
21100
|
for (const p of r) {
|
|
21098
|
-
const g = J("option", "",
|
|
21101
|
+
const g = J("option", "", Co(p));
|
|
21099
21102
|
g.value = p.id, l.appendChild(g);
|
|
21100
21103
|
}
|
|
21101
21104
|
const c = J("option", "", j("newCustomProvider"));
|
|
@@ -21212,7 +21215,7 @@ const je = class je extends bc {
|
|
|
21212
21215
|
this.displayModels().filter((p, g) => g !== o).map((p) => ({ ...p }))
|
|
21213
21216
|
), this.statusMessage = "", this.render();
|
|
21214
21217
|
});
|
|
21215
|
-
c.title = j("removeModel"), c.setAttribute("aria-label", `${j("removeModel")} ${o + 1}`), c.appendChild(
|
|
21218
|
+
c.title = j("removeModel"), c.setAttribute("aria-label", `${j("removeModel")} ${o + 1}`), c.appendChild(Mr(hx)), i.append(s, l, c), n.appendChild(i);
|
|
21216
21219
|
}), [n, this.renderAddModelButton()];
|
|
21217
21220
|
}
|
|
21218
21221
|
renderAddModelButton() {
|
|
@@ -21229,7 +21232,7 @@ const je = class je extends bc {
|
|
|
21229
21232
|
(r = n[n.length - 1]) == null || r.focus();
|
|
21230
21233
|
}
|
|
21231
21234
|
);
|
|
21232
|
-
return t.append(
|
|
21235
|
+
return t.append(Mr(fx), document.createTextNode(j("addModel"))), t;
|
|
21233
21236
|
}
|
|
21234
21237
|
updateModel(t, n) {
|
|
21235
21238
|
this.setModels(
|
|
@@ -21372,7 +21375,7 @@ const je = class je extends bc {
|
|
|
21372
21375
|
const r = await ax(
|
|
21373
21376
|
{
|
|
21374
21377
|
protocol: this.draft.protocol,
|
|
21375
|
-
baseUrl:
|
|
21378
|
+
baseUrl: ir(this.draft),
|
|
21376
21379
|
apiKey: this.draft.apiKey
|
|
21377
21380
|
},
|
|
21378
21381
|
void 0,
|
|
@@ -21452,9 +21455,9 @@ const je = class je extends bc {
|
|
|
21452
21455
|
this.customId = ((r = n.providers.find((o) => o.kind === "custom")) == null ? void 0 : r.id) ?? "", await this.commit(n);
|
|
21453
21456
|
}
|
|
21454
21457
|
async selectActiveModel(t) {
|
|
21455
|
-
const n = t.indexOf(
|
|
21458
|
+
const n = t.indexOf(Ln);
|
|
21456
21459
|
if (n < 0) return;
|
|
21457
|
-
const r = t.slice(0, n), o = t.slice(n +
|
|
21460
|
+
const r = t.slice(0, n), o = t.slice(n + Ln.length);
|
|
21458
21461
|
r === this.config.activeProviderId && o === this.config.activeModel || (this.config = { ...this.config, activeProviderId: r, activeModel: o }, await ps(this.config), this.statusMessage = j("saved"), this.render());
|
|
21459
21462
|
}
|
|
21460
21463
|
/** Injects the dialog styles once per document. */
|
|
@@ -21465,7 +21468,7 @@ const je = class je extends bc {
|
|
|
21465
21468
|
}
|
|
21466
21469
|
};
|
|
21467
21470
|
je.settingsStyleId = "ml-llm-settings-styles", je.openInstance = null;
|
|
21468
|
-
let
|
|
21471
|
+
let ro = je;
|
|
21469
21472
|
class _x extends wc {
|
|
21470
21473
|
constructor() {
|
|
21471
21474
|
super(...arguments), this.recordsUndoStack = !1;
|
|
@@ -21477,7 +21480,7 @@ class _x extends wc {
|
|
|
21477
21480
|
*/
|
|
21478
21481
|
async execute(t) {
|
|
21479
21482
|
var n;
|
|
21480
|
-
await
|
|
21483
|
+
await ro.open({
|
|
21481
21484
|
host: ((n = t.view) == null ? void 0 : n.container) ?? document.body
|
|
21482
21485
|
});
|
|
21483
21486
|
}
|
|
@@ -21526,13 +21529,13 @@ export {
|
|
|
21526
21529
|
V0 as F,
|
|
21527
21530
|
W0 as G,
|
|
21528
21531
|
ix as H,
|
|
21529
|
-
|
|
21532
|
+
Co as I,
|
|
21530
21533
|
J0 as J,
|
|
21531
21534
|
H0 as K,
|
|
21532
21535
|
Ix as L,
|
|
21533
21536
|
L0 as M,
|
|
21534
21537
|
cc as N,
|
|
21535
|
-
|
|
21538
|
+
Eo as O,
|
|
21536
21539
|
Z0 as P,
|
|
21537
21540
|
pc as Q,
|
|
21538
21541
|
ds as R,
|
|
@@ -21550,16 +21553,16 @@ export {
|
|
|
21550
21553
|
fn as e,
|
|
21551
21554
|
gx as f,
|
|
21552
21555
|
_x as g,
|
|
21553
|
-
|
|
21556
|
+
ro as h,
|
|
21554
21557
|
dc as i,
|
|
21555
21558
|
lx as j,
|
|
21556
21559
|
yc as k,
|
|
21557
21560
|
_c as l,
|
|
21558
21561
|
Ft as m,
|
|
21559
|
-
|
|
21560
|
-
|
|
21562
|
+
eo as n,
|
|
21563
|
+
Fn as o,
|
|
21561
21564
|
tc as p,
|
|
21562
|
-
|
|
21565
|
+
ir as q,
|
|
21563
21566
|
Rt as r,
|
|
21564
21567
|
fc as s,
|
|
21565
21568
|
ax as t,
|