@gram-ai/elements 1.16.5 → 1.17.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/elements.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as g, Fragment as Fn, jsxs as q } from "react/jsx-runtime";
2
- import { c as Ie, a as Dx, r as Mx, E as Ux, b as Lx, d as j, u as We, C as Zx, e as Rr, f as hn, g as wm } from "./index-Bjdy_BPv.js";
2
+ import { c as Ie, a as Mx, r as Dx, E as Ux, b as Lx, d as M, u as We, C as Zx, e as Rr, f as hn, g as wm } from "./index-BAP7yZTT.js";
3
3
  import { getExternalStoreMessages as au, unstable_createMessageConverter as Fx, useAssistantApi as $m, INTERNAL as Sm, useRuntimeAdapters as qx, useExternalStoreRuntime as Vx, unstable_useCloudThreadListAdapter as Bx, unstable_useRemoteThreadListRuntime as Jx, useAssistantState as It, makeAssistantTool as Wx, AssistantRuntimeProvider as Hx, useScrollLock as Gx, MessagePrimitive as dr, ComposerPrimitive as zt, AttachmentPrimitive as su, ThreadPrimitive as Jt, ErrorPrimitive as Gd, BranchPickerPrimitive as On, ActionBarPrimitive as Un } from "@assistant-ui/react";
4
4
  import * as _ from "react";
5
5
  import xm, { useRef as Wt, useCallback as wi, useState as Ae, useEffect as Ht, useMemo as Ut, useSyncExternalStore as Es, useLayoutEffect as Kx, forwardRef as Yx, memo as Gu } from "react";
@@ -125,12 +125,12 @@ const zI = [
125
125
  ["path", { d: "M5 12h14", key: "1ays0h" }],
126
126
  ["path", { d: "M12 5v14", key: "s699le" }]
127
127
  ], jI = Ie("plus", zI);
128
- const DI = [
128
+ const MI = [
129
129
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
130
130
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
131
131
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
132
132
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
133
- ], MI = Ie("refresh-cw", DI);
133
+ ], DI = Ie("refresh-cw", MI);
134
134
  const UI = [
135
135
  ["path", { d: "M14 17H5", key: "gfn3mx" }],
136
136
  ["path", { d: "M19 7h-9", key: "6i9tg" }],
@@ -174,7 +174,7 @@ var Am = "vercel.ai.error", VI = Symbol.for(Am), Rm, BI = class zm extends Error
174
174
  }
175
175
  };
176
176
  Rm = VI;
177
- var K = BI, jm = "AI_APICallError", Dm = `vercel.ai.error.${jm}`, JI = Symbol.for(Dm), Mm, Je = class extends K {
177
+ var K = BI, jm = "AI_APICallError", Mm = `vercel.ai.error.${jm}`, JI = Symbol.for(Mm), Dm, Je = class extends K {
178
178
  constructor({
179
179
  message: t,
180
180
  url: n,
@@ -190,13 +190,13 @@ var K = BI, jm = "AI_APICallError", Dm = `vercel.ai.error.${jm}`, JI = Symbol.fo
190
190
  // server error
191
191
  data: u
192
192
  }) {
193
- super({ name: jm, message: t, cause: s }), this[Mm] = !0, this.url = n, this.requestBodyValues = o, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = l, this.data = u;
193
+ super({ name: jm, message: t, cause: s }), this[Dm] = !0, this.url = n, this.requestBodyValues = o, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = l, this.data = u;
194
194
  }
195
195
  static isInstance(t) {
196
- return K.hasMarker(t, Dm);
196
+ return K.hasMarker(t, Mm);
197
197
  }
198
198
  };
199
- Mm = JI;
199
+ Dm = JI;
200
200
  var Um = "AI_EmptyResponseBodyError", Lm = `vercel.ai.error.${Um}`, WI = Symbol.for(Lm), Zm, HI = class extends K {
201
201
  // used in isInstance
202
202
  constructor({ message: t = "Empty response body" } = {}) {
@@ -1086,11 +1086,11 @@ const mo = (e) => (t, n, o, r) => {
1086
1086
  }, Ek = /* @__PURE__ */ ll(it), cl = (e) => (t, n, o) => go(e)(t, n, o), Ok = /* @__PURE__ */ cl(it), dl = (e) => async (t, n, o) => {
1087
1087
  const r = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
1088
1088
  return vo(e)(t, n, r);
1089
- }, Tk = /* @__PURE__ */ dl(it), fl = (e) => async (t, n, o) => vo(e)(t, n, o), Nk = /* @__PURE__ */ fl(it), Eh = /^[cC][^\s-]{8,}$/, Oh = /^[0-9a-z]+$/, Th = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Nh = /^[0-9a-vA-V]{20}$/, Ph = /^[A-Za-z0-9]{27}$/, Ch = /^[a-zA-Z0-9_-]{21}$/, Ah = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Pk = /^[-+]?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)?)??$/, Rh = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, nn = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Ck = /* @__PURE__ */ nn(4), Ak = /* @__PURE__ */ nn(6), Rk = /* @__PURE__ */ nn(7), zh = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, zk = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, jk = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, jh = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u, Dk = jh, Mk = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, Uk = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1090
- function Dh() {
1089
+ }, Tk = /* @__PURE__ */ dl(it), fl = (e) => async (t, n, o) => vo(e)(t, n, o), Nk = /* @__PURE__ */ fl(it), Eh = /^[cC][^\s-]{8,}$/, Oh = /^[0-9a-z]+$/, Th = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Nh = /^[0-9a-vA-V]{20}$/, Ph = /^[A-Za-z0-9]{27}$/, Ch = /^[a-zA-Z0-9_-]{21}$/, Ah = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Pk = /^[-+]?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)?)??$/, Rh = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, nn = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Ck = /* @__PURE__ */ nn(4), Ak = /* @__PURE__ */ nn(6), Rk = /* @__PURE__ */ nn(7), zh = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, zk = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, jk = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, jh = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u, Mk = jh, Dk = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, Uk = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1090
+ function Mh() {
1091
1091
  return new RegExp(Uk, "u");
1092
1092
  }
1093
- const Mh = /^(?:(?: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])$/, Uh = /^(([0-9a-fA-F]{1,4}:){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}|:))$/, Lh = (e) => {
1093
+ const Dh = /^(?:(?: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])$/, Uh = /^(([0-9a-fA-F]{1,4}:){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}|:))$/, Lh = (e) => {
1094
1094
  const t = Yt(e ?? ":");
1095
1095
  return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`);
1096
1096
  }, Zh = /^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/, Fh = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, qh = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, pl = /^[A-Za-z0-9_-]*$/, Vh = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, Bh = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/, Jh = /^\+(?:[0-9]){6,14}[0-9]$/, Wh = "(?:(?:\\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])))", Hh = /* @__PURE__ */ new RegExp(`^${Wh}$`);
@@ -1123,7 +1123,7 @@ const Lk = /^[0-9a-fA-F]{32}$/, Zk = /* @__PURE__ */ yo(22, "=="), Fk = /* @__PU
1123
1123
  base64url: pl,
1124
1124
  bigint: Xh,
1125
1125
  boolean: rg,
1126
- browserEmail: Mk,
1126
+ browserEmail: Dk,
1127
1127
  cidrv4: Zh,
1128
1128
  cidrv6: Fh,
1129
1129
  cuid: Eh,
@@ -1134,15 +1134,15 @@ const Lk = /^[0-9a-fA-F]{32}$/, Zk = /* @__PURE__ */ yo(22, "=="), Fk = /* @__PU
1134
1134
  duration: Ah,
1135
1135
  e164: Jh,
1136
1136
  email: zh,
1137
- emoji: Dh,
1137
+ emoji: Mh,
1138
1138
  extendedDuration: Pk,
1139
1139
  guid: Rh,
1140
1140
  hex: sg,
1141
1141
  hostname: Vh,
1142
1142
  html5Email: zk,
1143
- idnEmail: Dk,
1143
+ idnEmail: Mk,
1144
1144
  integer: eg,
1145
- ipv4: Mh,
1145
+ ipv4: Dh,
1146
1146
  ipv6: Uh,
1147
1147
  ksuid: Ph,
1148
1148
  lowercase: ig,
@@ -1736,16 +1736,16 @@ const Og = {
1736
1736
  }
1737
1737
  };
1738
1738
  }), Ag = /* @__PURE__ */ x("$ZodEmoji", (e, t) => {
1739
- t.pattern ?? (t.pattern = Dh()), me.init(e, t);
1739
+ t.pattern ?? (t.pattern = Mh()), me.init(e, t);
1740
1740
  }), Rg = /* @__PURE__ */ x("$ZodNanoID", (e, t) => {
1741
1741
  t.pattern ?? (t.pattern = Ch), me.init(e, t);
1742
1742
  }), zg = /* @__PURE__ */ x("$ZodCUID", (e, t) => {
1743
1743
  t.pattern ?? (t.pattern = Eh), me.init(e, t);
1744
1744
  }), jg = /* @__PURE__ */ x("$ZodCUID2", (e, t) => {
1745
1745
  t.pattern ?? (t.pattern = Oh), me.init(e, t);
1746
- }), Dg = /* @__PURE__ */ x("$ZodULID", (e, t) => {
1746
+ }), Mg = /* @__PURE__ */ x("$ZodULID", (e, t) => {
1747
1747
  t.pattern ?? (t.pattern = Th), me.init(e, t);
1748
- }), Mg = /* @__PURE__ */ x("$ZodXID", (e, t) => {
1748
+ }), Dg = /* @__PURE__ */ x("$ZodXID", (e, t) => {
1749
1749
  t.pattern ?? (t.pattern = Nh), me.init(e, t);
1750
1750
  }), Ug = /* @__PURE__ */ x("$ZodKSUID", (e, t) => {
1751
1751
  t.pattern ?? (t.pattern = Ph), me.init(e, t);
@@ -1758,7 +1758,7 @@ const Og = {
1758
1758
  }), qg = /* @__PURE__ */ x("$ZodISODuration", (e, t) => {
1759
1759
  t.pattern ?? (t.pattern = Ah), me.init(e, t);
1760
1760
  }), Vg = /* @__PURE__ */ x("$ZodIPv4", (e, t) => {
1761
- t.pattern ?? (t.pattern = Mh), me.init(e, t), e._zod.bag.format = "ipv4";
1761
+ t.pattern ?? (t.pattern = Dh), me.init(e, t), e._zod.bag.format = "ipv4";
1762
1762
  }), Bg = /* @__PURE__ */ x("$ZodIPv6", (e, t) => {
1763
1763
  t.pattern ?? (t.pattern = Uh), me.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1764
1764
  try {
@@ -2680,7 +2680,7 @@ const jv = /* @__PURE__ */ x("$ZodReadonly", (e, t) => {
2680
2680
  function lf(e) {
2681
2681
  return e.value = Object.freeze(e.value), e;
2682
2682
  }
2683
- const Dv = /* @__PURE__ */ x("$ZodTemplateLiteral", (e, t) => {
2683
+ const Mv = /* @__PURE__ */ x("$ZodTemplateLiteral", (e, t) => {
2684
2684
  Q.init(e, t);
2685
2685
  const n = [];
2686
2686
  for (const o of t.parts)
@@ -2708,7 +2708,7 @@ const Dv = /* @__PURE__ */ x("$ZodTemplateLiteral", (e, t) => {
2708
2708
  format: t.format ?? "template_literal",
2709
2709
  pattern: e._zod.pattern.source
2710
2710
  }), o);
2711
- }), Mv = /* @__PURE__ */ x("$ZodFunction", (e, t) => (Q.init(e, t), e._def = t, e._zod.def = t, e.implement = (n) => {
2711
+ }), Dv = /* @__PURE__ */ x("$ZodFunction", (e, t) => (Q.init(e, t), e._def = t, e._zod.def = t, e.implement = (n) => {
2712
2712
  if (typeof n != "function")
2713
2713
  throw new Error("implement() must be called with a function");
2714
2714
  return function(...o) {
@@ -4516,7 +4516,7 @@ function jE() {
4516
4516
  localeError: zE()
4517
4517
  };
4518
4518
  }
4519
- const DE = () => {
4519
+ const ME = () => {
4520
4520
  const e = {
4521
4521
  string: { unit: "karakter", verb: "memiliki" },
4522
4522
  file: { unit: "byte", verb: "memiliki" },
@@ -4604,9 +4604,9 @@ const DE = () => {
4604
4604
  }
4605
4605
  };
4606
4606
  };
4607
- function ME() {
4607
+ function DE() {
4608
4608
  return {
4609
- localeError: DE()
4609
+ localeError: ME()
4610
4610
  };
4611
4611
  }
4612
4612
  const UE = (e) => {
@@ -6988,7 +6988,7 @@ function jO() {
6988
6988
  localeError: zO()
6989
6989
  };
6990
6990
  }
6991
- const DO = () => {
6991
+ const MO = () => {
6992
6992
  const e = {
6993
6993
  string: { unit: "字符", verb: "包含" },
6994
6994
  file: { unit: "字节", verb: "包含" },
@@ -7076,9 +7076,9 @@ const DO = () => {
7076
7076
  }
7077
7077
  };
7078
7078
  };
7079
- function MO() {
7079
+ function DO() {
7080
7080
  return {
7081
- localeError: DO()
7081
+ localeError: MO()
7082
7082
  };
7083
7083
  }
7084
7084
  const UO = () => {
@@ -7286,7 +7286,7 @@ const Bv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7286
7286
  frCA: CE,
7287
7287
  he: RE,
7288
7288
  hu: jE,
7289
- id: ME,
7289
+ id: DE,
7290
7290
  is: ZE,
7291
7291
  it: qE,
7292
7292
  ja: BE,
@@ -7314,7 +7314,7 @@ const Bv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7314
7314
  ur: RO,
7315
7315
  vi: jO,
7316
7316
  yo: FO,
7317
- zhCN: MO,
7317
+ zhCN: DO,
7318
7318
  zhTW: LO
7319
7319
  }, Symbol.toStringTag, { value: "Module" }));
7320
7320
  var mf;
@@ -7509,7 +7509,7 @@ function jl(e, t) {
7509
7509
  ...N(t)
7510
7510
  });
7511
7511
  }
7512
- function Dl(e, t) {
7512
+ function Ml(e, t) {
7513
7513
  return new e({
7514
7514
  type: "string",
7515
7515
  format: "ipv6",
@@ -7527,7 +7527,7 @@ function Yv(e, t) {
7527
7527
  ...N(t)
7528
7528
  });
7529
7529
  }
7530
- function Ml(e, t) {
7530
+ function Dl(e, t) {
7531
7531
  return new e({
7532
7532
  type: "string",
7533
7533
  format: "cidrv4",
@@ -8461,10 +8461,10 @@ const zy = (e, t = {}) => (n) => {
8461
8461
  }))
8462
8462
  ]);
8463
8463
  }
8464
- }, Dy = (e, t, n, o) => {
8464
+ }, My = (e, t, n, o) => {
8465
8465
  const r = n, { minimum: i, maximum: a, format: s, multipleOf: l, exclusiveMaximum: u, exclusiveMinimum: c } = e._zod.bag;
8466
8466
  typeof s == "string" && s.includes("int") ? r.type = "integer" : r.type = "number", typeof c == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (r.minimum = c, r.exclusiveMinimum = !0) : r.exclusiveMinimum = c), typeof i == "number" && (r.minimum = i, typeof c == "number" && t.target !== "draft-04" && (c >= i ? delete r.minimum : delete r.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (r.maximum = u, r.exclusiveMaximum = !0) : r.exclusiveMaximum = u), typeof a == "number" && (r.maximum = a, typeof u == "number" && t.target !== "draft-04" && (u <= a ? delete r.maximum : delete r.exclusiveMaximum)), typeof l == "number" && (r.multipleOf = l);
8467
- }, My = (e, t, n, o) => {
8467
+ }, Dy = (e, t, n, o) => {
8468
8468
  n.type = "boolean";
8469
8469
  }, Uy = (e, t, n, o) => {
8470
8470
  if (t.unrepresentable === "throw")
@@ -8658,8 +8658,8 @@ const zy = (e, t = {}) => (n) => {
8658
8658
  i.ref = r;
8659
8659
  }, pu = {
8660
8660
  string: jy,
8661
- number: Dy,
8662
- boolean: My,
8661
+ number: My,
8662
+ boolean: Dy,
8663
8663
  bigint: Uy,
8664
8664
  symbol: Ly,
8665
8665
  null: Zy,
@@ -8837,7 +8837,7 @@ const mT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8837
8837
  $ZodEnum: Sv,
8838
8838
  $ZodError: rl,
8839
8839
  $ZodFile: Iv,
8840
- $ZodFunction: Mv,
8840
+ $ZodFunction: Dv,
8841
8841
  $ZodGUID: Tg,
8842
8842
  $ZodIPv4: Vg,
8843
8843
  $ZodIPv6: Bg,
@@ -8875,18 +8875,18 @@ const mT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8875
8875
  $ZodStringFormat: me,
8876
8876
  $ZodSuccess: Cv,
8877
8877
  $ZodSymbol: ov,
8878
- $ZodTemplateLiteral: Dv,
8878
+ $ZodTemplateLiteral: Mv,
8879
8879
  $ZodTransform: kv,
8880
8880
  $ZodTuple: wl,
8881
8881
  $ZodType: Q,
8882
- $ZodULID: Dg,
8882
+ $ZodULID: Mg,
8883
8883
  $ZodURL: Cg,
8884
8884
  $ZodUUID: Ng,
8885
8885
  $ZodUndefined: iv,
8886
8886
  $ZodUnion: ua,
8887
8887
  $ZodUnknown: uv,
8888
8888
  $ZodVoid: cv,
8889
- $ZodXID: Mg,
8889
+ $ZodXID: Dg,
8890
8890
  $ZodXor: vv,
8891
8891
  $brand: nh,
8892
8892
  $constructor: x,
@@ -8905,7 +8905,7 @@ const mT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8905
8905
  _boolean: cy,
8906
8906
  _catch: aT,
8907
8907
  _check: Py,
8908
- _cidrv4: Ml,
8908
+ _cidrv4: Dl,
8909
8909
  _cidrv6: Ul,
8910
8910
  _coercedBigint: py,
8911
8911
  _coercedBoolean: dy,
@@ -8939,7 +8939,7 @@ const mT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8939
8939
  _int64: my,
8940
8940
  _intersection: JO,
8941
8941
  _ipv4: jl,
8942
- _ipv6: Dl,
8942
+ _ipv6: Ml,
8943
8943
  _isoDate: ey,
8944
8944
  _isoDateTime: Xv,
8945
8945
  _isoDuration: ry,
@@ -9167,7 +9167,7 @@ const xb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9167
9167
  ...t.checks ?? [],
9168
9168
  ...n.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
9169
9169
  ]
9170
- })), e.clone = (n, o) => pt(e, n, o), e.brand = () => e, e.register = ((n, o) => (n.add(e, o), e)), e.parse = (n, o) => kb(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => Ob(e, n, o), e.parseAsync = async (n, o) => Eb(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => xa(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => Tb(e, n, o), e.decode = (n, o) => Nb(e, n, o), e.encodeAsync = async (n, o) => Pb(e, n, o), e.decodeAsync = async (n, o) => Cb(e, n, o), e.safeEncode = (n, o) => Ab(e, n, o), e.safeDecode = (n, o) => Rb(e, n, o), e.safeEncodeAsync = async (n, o) => zb(e, n, o), e.safeDecodeAsync = async (n, o) => jb(e, n, o), e.refine = (n, o) => e.check(Dc(n, o)), e.superRefine = (n) => e.check(Mc(n)), e.overwrite = (n) => e.check(rr(n)), e.optional = () => X(e), e.nullable = () => Jn(e), e.nullish = () => X(Jn(e)), e.nonoptional = (n) => kc(e, n), e.array = () => R(e), e.or = (n) => J([e, n]), e.and = (n) => pc(e, n), e.transform = (n) => Wn(e, Wa(n)), e.default = (n) => Sc(e, n), e.prefault = (n) => Ic(e, n), e.catch = (n) => Tc(e, n), e.pipe = (n) => Wn(e, n), e.readonly = () => Cc(e), e.describe = (n) => {
9170
+ })), e.clone = (n, o) => pt(e, n, o), e.brand = () => e, e.register = ((n, o) => (n.add(e, o), e)), e.parse = (n, o) => kb(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => Ob(e, n, o), e.parseAsync = async (n, o) => Eb(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => xa(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => Tb(e, n, o), e.decode = (n, o) => Nb(e, n, o), e.encodeAsync = async (n, o) => Pb(e, n, o), e.decodeAsync = async (n, o) => Cb(e, n, o), e.safeEncode = (n, o) => Ab(e, n, o), e.safeDecode = (n, o) => Rb(e, n, o), e.safeEncodeAsync = async (n, o) => zb(e, n, o), e.safeDecodeAsync = async (n, o) => jb(e, n, o), e.refine = (n, o) => e.check(Mc(n, o)), e.superRefine = (n) => e.check(Dc(n)), e.overwrite = (n) => e.check(rr(n)), e.optional = () => X(e), e.nullable = () => Jn(e), e.nullish = () => X(Jn(e)), e.nonoptional = (n) => kc(e, n), e.array = () => R(e), e.or = (n) => J([e, n]), e.and = (n) => pc(e, n), e.transform = (n) => Wn(e, Wa(n)), e.default = (n) => Sc(e, n), e.prefault = (n) => Ic(e, n), e.catch = (n) => Tc(e, n), e.pipe = (n) => Wn(e, n), e.readonly = () => Cc(e), e.describe = (n) => {
9171
9171
  const o = e.clone();
9172
9172
  return St.add(o, { description: n }), o;
9173
9173
  }, Object.defineProperty(e, "description", {
@@ -9185,7 +9185,7 @@ const xb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9185
9185
  const n = e._zod.bag;
9186
9186
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(da(...o)), e.includes = (...o) => e.check(ma(...o)), e.startsWith = (...o) => e.check(ha(...o)), e.endsWith = (...o) => e.check(ga(...o)), e.min = (...o) => e.check(kr(...o)), e.max = (...o) => e.check(So(...o)), e.length = (...o) => e.check(xo(...o)), e.nonempty = (...o) => e.check(kr(1, ...o)), e.lowercase = (o) => e.check(fa(o)), e.uppercase = (o) => e.check(pa(o)), e.trim = () => e.check(ba()), e.normalize = (...o) => e.check(ya(...o)), e.toLowerCase = () => e.check(_a()), e.toUpperCase = () => e.check(wa()), e.slugify = () => e.check($a());
9187
9187
  }), ko = /* @__PURE__ */ x("ZodString", (e, t) => {
9188
- wo.init(e, t), Ia.init(e, t), e.email = (n) => e.check(xl(ka, n)), e.url = (n) => e.check(la(Eo, n)), e.jwt = (n) => e.check(ql(Fa, n)), e.emoji = (n) => e.check(Tl(Ea, n)), e.guid = (n) => e.check(ki(Bn, n)), e.uuid = (n) => e.check(Il(jt, n)), e.uuidv4 = (n) => e.check(kl(jt, n)), e.uuidv6 = (n) => e.check(El(jt, n)), e.uuidv7 = (n) => e.check(Ol(jt, n)), e.nanoid = (n) => e.check(Nl(Oa, n)), e.guid = (n) => e.check(ki(Bn, n)), e.cuid = (n) => e.check(Pl(Ta, n)), e.cuid2 = (n) => e.check(Cl(Na, n)), e.ulid = (n) => e.check(Al(Pa, n)), e.base64 = (n) => e.check(Ll(Ma, n)), e.base64url = (n) => e.check(Zl(La, n)), e.xid = (n) => e.check(Rl(Ca, n)), e.ksuid = (n) => e.check(zl(Aa, n)), e.ipv4 = (n) => e.check(jl(Ra, n)), e.ipv6 = (n) => e.check(Dl(za, n)), e.cidrv4 = (n) => e.check(Ml(ja, n)), e.cidrv6 = (n) => e.check(Ul(Da, n)), e.e164 = (n) => e.check(Fl(Za, n)), e.datetime = (n) => e.check(_b(n)), e.date = (n) => e.check(wb(n)), e.time = (n) => e.check($b(n)), e.duration = (n) => e.check(Sb(n));
9188
+ wo.init(e, t), Ia.init(e, t), e.email = (n) => e.check(xl(ka, n)), e.url = (n) => e.check(la(Eo, n)), e.jwt = (n) => e.check(ql(Fa, n)), e.emoji = (n) => e.check(Tl(Ea, n)), e.guid = (n) => e.check(ki(Bn, n)), e.uuid = (n) => e.check(Il(jt, n)), e.uuidv4 = (n) => e.check(kl(jt, n)), e.uuidv6 = (n) => e.check(El(jt, n)), e.uuidv7 = (n) => e.check(Ol(jt, n)), e.nanoid = (n) => e.check(Nl(Oa, n)), e.guid = (n) => e.check(ki(Bn, n)), e.cuid = (n) => e.check(Pl(Ta, n)), e.cuid2 = (n) => e.check(Cl(Na, n)), e.ulid = (n) => e.check(Al(Pa, n)), e.base64 = (n) => e.check(Ll(Da, n)), e.base64url = (n) => e.check(Zl(La, n)), e.xid = (n) => e.check(Rl(Ca, n)), e.ksuid = (n) => e.check(zl(Aa, n)), e.ipv4 = (n) => e.check(jl(Ra, n)), e.ipv6 = (n) => e.check(Ml(za, n)), e.cidrv4 = (n) => e.check(Dl(ja, n)), e.cidrv6 = (n) => e.check(Ul(Ma, n)), e.e164 = (n) => e.check(Fl(Za, n)), e.datetime = (n) => e.check(_b(n)), e.date = (n) => e.check(wb(n)), e.time = (n) => e.check($b(n)), e.duration = (n) => e.check(Sb(n));
9189
9189
  });
9190
9190
  function w(e) {
9191
9191
  return Gv(ko, e);
@@ -9195,13 +9195,13 @@ const he = /* @__PURE__ */ x("ZodStringFormat", (e, t) => {
9195
9195
  }), ka = /* @__PURE__ */ x("ZodEmail", (e, t) => {
9196
9196
  Pg.init(e, t), he.init(e, t);
9197
9197
  });
9198
- function Db(e) {
9198
+ function Mb(e) {
9199
9199
  return xl(ka, e);
9200
9200
  }
9201
9201
  const Bn = /* @__PURE__ */ x("ZodGUID", (e, t) => {
9202
9202
  Tg.init(e, t), he.init(e, t);
9203
9203
  });
9204
- function Mb(e) {
9204
+ function Db(e) {
9205
9205
  return ki(Bn, e);
9206
9206
  }
9207
9207
  const jt = /* @__PURE__ */ x("ZodUUID", (e, t) => {
@@ -9257,13 +9257,13 @@ function Hb(e) {
9257
9257
  return Cl(Na, e);
9258
9258
  }
9259
9259
  const Pa = /* @__PURE__ */ x("ZodULID", (e, t) => {
9260
- Dg.init(e, t), he.init(e, t);
9260
+ Mg.init(e, t), he.init(e, t);
9261
9261
  });
9262
9262
  function Gb(e) {
9263
9263
  return Al(Pa, e);
9264
9264
  }
9265
9265
  const Ca = /* @__PURE__ */ x("ZodXID", (e, t) => {
9266
- Mg.init(e, t), he.init(e, t);
9266
+ Dg.init(e, t), he.init(e, t);
9267
9267
  });
9268
9268
  function Kb(e) {
9269
9269
  return Rl(Ca, e);
@@ -9290,25 +9290,25 @@ const za = /* @__PURE__ */ x("ZodIPv6", (e, t) => {
9290
9290
  Bg.init(e, t), he.init(e, t);
9291
9291
  });
9292
9292
  function e_(e) {
9293
- return Dl(za, e);
9293
+ return Ml(za, e);
9294
9294
  }
9295
9295
  const ja = /* @__PURE__ */ x("ZodCIDRv4", (e, t) => {
9296
9296
  Wg.init(e, t), he.init(e, t);
9297
9297
  });
9298
9298
  function t_(e) {
9299
- return Ml(ja, e);
9299
+ return Dl(ja, e);
9300
9300
  }
9301
- const Da = /* @__PURE__ */ x("ZodCIDRv6", (e, t) => {
9301
+ const Ma = /* @__PURE__ */ x("ZodCIDRv6", (e, t) => {
9302
9302
  Hg.init(e, t), he.init(e, t);
9303
9303
  });
9304
9304
  function r_(e) {
9305
- return Ul(Da, e);
9305
+ return Ul(Ma, e);
9306
9306
  }
9307
- const Ma = /* @__PURE__ */ x("ZodBase64", (e, t) => {
9307
+ const Da = /* @__PURE__ */ x("ZodBase64", (e, t) => {
9308
9308
  Gg.init(e, t), he.init(e, t);
9309
9309
  });
9310
9310
  function Ua(e) {
9311
- return Ll(Ma, e);
9311
+ return Ll(Da, e);
9312
9312
  }
9313
9313
  const La = /* @__PURE__ */ x("ZodBase64URL", (e, t) => {
9314
9314
  Yg.init(e, t), he.init(e, t);
@@ -9347,7 +9347,7 @@ function l_(e, t) {
9347
9347
  return Io(vn, o, r, t);
9348
9348
  }
9349
9349
  const Oo = /* @__PURE__ */ x("ZodNumber", (e, t) => {
9350
- yl.init(e, t), ee.init(e, t), e._zod.processJSONSchema = (o, r, i) => Dy(e, o, r), e.gt = (o, r) => e.check(pr(o, r)), e.gte = (o, r) => e.check(Ge(o, r)), e.min = (o, r) => e.check(Ge(o, r)), e.lt = (o, r) => e.check(fr(o, r)), e.lte = (o, r) => e.check(lt(o, r)), e.max = (o, r) => e.check(lt(o, r)), e.int = (o) => e.check(Ei(o)), e.safe = (o) => e.check(Ei(o)), e.positive = (o) => e.check(pr(0, o)), e.nonnegative = (o) => e.check(Ge(0, o)), e.negative = (o) => e.check(fr(0, o)), e.nonpositive = (o) => e.check(lt(0, o)), e.multipleOf = (o, r) => e.check(on(o, r)), e.step = (o, r) => e.check(on(o, r)), e.finite = () => e;
9350
+ yl.init(e, t), ee.init(e, t), e._zod.processJSONSchema = (o, r, i) => My(e, o, r), e.gt = (o, r) => e.check(pr(o, r)), e.gte = (o, r) => e.check(Ge(o, r)), e.min = (o, r) => e.check(Ge(o, r)), e.lt = (o, r) => e.check(fr(o, r)), e.lte = (o, r) => e.check(lt(o, r)), e.max = (o, r) => e.check(lt(o, r)), e.int = (o) => e.check(Ei(o)), e.safe = (o) => e.check(Ei(o)), e.positive = (o) => e.check(pr(0, o)), e.nonnegative = (o) => e.check(Ge(0, o)), e.negative = (o) => e.check(fr(0, o)), e.nonpositive = (o) => e.check(lt(0, o)), e.multipleOf = (o, r) => e.check(on(o, r)), e.step = (o, r) => e.check(on(o, r)), e.finite = () => e;
9351
9351
  const n = e._zod.bag;
9352
9352
  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;
9353
9353
  });
@@ -9373,7 +9373,7 @@ function p_(e) {
9373
9373
  return ly(jr, e);
9374
9374
  }
9375
9375
  const To = /* @__PURE__ */ x("ZodBoolean", (e, t) => {
9376
- bl.init(e, t), ee.init(e, t), e._zod.processJSONSchema = (n, o, r) => My(e, n, o);
9376
+ bl.init(e, t), ee.init(e, t), e._zod.processJSONSchema = (n, o, r) => Dy(e, n, o);
9377
9377
  });
9378
9378
  function ce(e) {
9379
9379
  return cy(To, e);
@@ -9792,7 +9792,7 @@ function Cc(e) {
9792
9792
  });
9793
9793
  }
9794
9794
  const Ac = /* @__PURE__ */ x("ZodTemplateLiteral", (e, t) => {
9795
- Dv.init(e, t), ee.init(e, t), e._zod.processJSONSchema = (n, o, r) => Yy(e, n, o);
9795
+ Mv.init(e, t), ee.init(e, t), e._zod.processJSONSchema = (n, o, r) => Yy(e, n, o);
9796
9796
  });
9797
9797
  function C_(e, t) {
9798
9798
  return new Ac({
@@ -9820,7 +9820,7 @@ function A_(e) {
9820
9820
  });
9821
9821
  }
9822
9822
  const jc = /* @__PURE__ */ x("ZodFunction", (e, t) => {
9823
- Mv.init(e, t), ee.init(e, t), e._zod.processJSONSchema = (n, o, r) => tb(e, n);
9823
+ Dv.init(e, t), ee.init(e, t), e._zod.processJSONSchema = (n, o, r) => tb(e, n);
9824
9824
  });
9825
9825
  function Oi(e) {
9826
9826
  return new jc({
@@ -9839,13 +9839,13 @@ function R_(e) {
9839
9839
  });
9840
9840
  return t._zod.check = e, t;
9841
9841
  }
9842
- function Do(e, t) {
9842
+ function Mo(e, t) {
9843
9843
  return Oy(jo, e ?? (() => !0), t);
9844
9844
  }
9845
- function Dc(e, t = {}) {
9845
+ function Mc(e, t = {}) {
9846
9846
  return Ty(jo, e, t);
9847
9847
  }
9848
- function Mc(e) {
9848
+ function Dc(e) {
9849
9849
  return Ny(e);
9850
9850
  }
9851
9851
  const z_ = Cy, j_ = Ay;
@@ -9861,12 +9861,12 @@ function Lt(e, t = {
9861
9861
  });
9862
9862
  return n._zod.bag.Class = e, n;
9863
9863
  }
9864
- const D_ = (...e) => Ry({
9864
+ const M_ = (...e) => Ry({
9865
9865
  Codec: Ya,
9866
9866
  Boolean: To,
9867
9867
  String: ko
9868
9868
  }, ...e);
9869
- function M_(e) {
9869
+ function D_(e) {
9870
9870
  const t = zo(() => J([w(e), Z(), ce(), Po(), R(t), tt(w(), t)]));
9871
9871
  return t;
9872
9872
  }
@@ -9877,13 +9877,13 @@ const yT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9877
9877
  __proto__: null,
9878
9878
  ZodAny: ic,
9879
9879
  ZodArray: lc,
9880
- ZodBase64: Ma,
9880
+ ZodBase64: Da,
9881
9881
  ZodBase64URL: La,
9882
9882
  ZodBigInt: No,
9883
9883
  ZodBigIntFormat: qa,
9884
9884
  ZodBoolean: To,
9885
9885
  ZodCIDRv4: ja,
9886
- ZodCIDRv6: Da,
9886
+ ZodCIDRv6: Ma,
9887
9887
  ZodCUID: Ta,
9888
9888
  ZodCUID2: Na,
9889
9889
  ZodCatch: Oc,
@@ -9958,19 +9958,19 @@ const yT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9958
9958
  codec: P_,
9959
9959
  cuid: Wb,
9960
9960
  cuid2: Hb,
9961
- custom: Do,
9961
+ custom: Mo,
9962
9962
  date: b_,
9963
9963
  describe: z_,
9964
9964
  discriminatedUnion: Ja,
9965
9965
  e164: o_,
9966
- email: Db,
9966
+ email: Mb,
9967
9967
  emoji: Bb,
9968
9968
  enum: yr,
9969
9969
  file: E_,
9970
9970
  float32: c_,
9971
9971
  float64: d_,
9972
9972
  function: Oi,
9973
- guid: Mb,
9973
+ guid: Db,
9974
9974
  hash: l_,
9975
9975
  hex: u_,
9976
9976
  hostname: s_,
@@ -9982,7 +9982,7 @@ const yT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9982
9982
  intersection: pc,
9983
9983
  ipv4: Qb,
9984
9984
  ipv6: e_,
9985
- json: M_,
9985
+ json: D_,
9986
9986
  jwt: i_,
9987
9987
  keyof: __,
9988
9988
  ksuid: Yb,
@@ -10011,14 +10011,14 @@ const yT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10011
10011
  promise: A_,
10012
10012
  readonly: Cc,
10013
10013
  record: tt,
10014
- refine: Dc,
10014
+ refine: Mc,
10015
10015
  set: I_,
10016
10016
  strictObject: ye,
10017
10017
  string: w,
10018
10018
  stringFormat: a_,
10019
- stringbool: D_,
10019
+ stringbool: M_,
10020
10020
  success: T_,
10021
- superRefine: Mc,
10021
+ superRefine: Dc,
10022
10022
  symbol: v_,
10023
10023
  templateLiteral: C_,
10024
10024
  transform: Wa,
@@ -10060,7 +10060,7 @@ function _T() {
10060
10060
  }
10061
10061
  var mu;
10062
10062
  mu || (mu = {});
10063
- const z = {
10063
+ const j = {
10064
10064
  ...yT,
10065
10065
  ...gT,
10066
10066
  iso: xb
@@ -10087,7 +10087,7 @@ function $T(e, t) {
10087
10087
  function Z_(e, t) {
10088
10088
  if (e.not !== void 0) {
10089
10089
  if (typeof e.not == "object" && Object.keys(e.not).length === 0)
10090
- return z.never();
10090
+ return j.never();
10091
10091
  throw new Error("not is not supported in Zod (except { not: {} } for never)");
10092
10092
  }
10093
10093
  if (e.unevaluatedItems !== void 0)
@@ -10103,118 +10103,118 @@ function Z_(e, t) {
10103
10103
  if (t.refs.has(r))
10104
10104
  return t.refs.get(r);
10105
10105
  if (t.processing.has(r))
10106
- return z.lazy(() => {
10106
+ return j.lazy(() => {
10107
10107
  if (!t.refs.has(r))
10108
10108
  throw new Error(`Circular reference not resolved: ${r}`);
10109
10109
  return t.refs.get(r);
10110
10110
  });
10111
10111
  t.processing.add(r);
10112
- const i = $T(r, t), a = Me(i, t);
10112
+ const i = $T(r, t), a = De(i, t);
10113
10113
  return t.refs.set(r, a), t.processing.delete(r), a;
10114
10114
  }
10115
10115
  if (e.enum !== void 0) {
10116
10116
  const r = e.enum;
10117
10117
  if (t.version === "openapi-3.0" && e.nullable === !0 && r.length === 1 && r[0] === null)
10118
- return z.null();
10118
+ return j.null();
10119
10119
  if (r.length === 0)
10120
- return z.never();
10120
+ return j.never();
10121
10121
  if (r.length === 1)
10122
- return z.literal(r[0]);
10122
+ return j.literal(r[0]);
10123
10123
  if (r.every((a) => typeof a == "string"))
10124
- return z.enum(r);
10125
- const i = r.map((a) => z.literal(a));
10126
- return i.length < 2 ? i[0] : z.union([i[0], i[1], ...i.slice(2)]);
10124
+ return j.enum(r);
10125
+ const i = r.map((a) => j.literal(a));
10126
+ return i.length < 2 ? i[0] : j.union([i[0], i[1], ...i.slice(2)]);
10127
10127
  }
10128
10128
  if (e.const !== void 0)
10129
- return z.literal(e.const);
10129
+ return j.literal(e.const);
10130
10130
  const n = e.type;
10131
10131
  if (Array.isArray(n)) {
10132
10132
  const r = n.map((i) => {
10133
10133
  const a = { ...e, type: i };
10134
10134
  return Z_(a, t);
10135
10135
  });
10136
- return r.length === 0 ? z.never() : r.length === 1 ? r[0] : z.union(r);
10136
+ return r.length === 0 ? j.never() : r.length === 1 ? r[0] : j.union(r);
10137
10137
  }
10138
10138
  if (!n)
10139
- return z.any();
10139
+ return j.any();
10140
10140
  let o;
10141
10141
  switch (n) {
10142
10142
  case "string": {
10143
- let r = z.string();
10143
+ let r = j.string();
10144
10144
  if (e.format) {
10145
10145
  const i = e.format;
10146
- i === "email" ? r = r.check(z.email()) : i === "uri" || i === "uri-reference" ? r = r.check(z.url()) : i === "uuid" || i === "guid" ? r = r.check(z.uuid()) : i === "date-time" ? r = r.check(z.iso.datetime()) : i === "date" ? r = r.check(z.iso.date()) : i === "time" ? r = r.check(z.iso.time()) : i === "duration" ? r = r.check(z.iso.duration()) : i === "ipv4" ? r = r.check(z.ipv4()) : i === "ipv6" ? r = r.check(z.ipv6()) : i === "mac" ? r = r.check(z.mac()) : i === "cidr" ? r = r.check(z.cidrv4()) : i === "cidr-v6" ? r = r.check(z.cidrv6()) : i === "base64" ? r = r.check(z.base64()) : i === "base64url" ? r = r.check(z.base64url()) : i === "e164" ? r = r.check(z.e164()) : i === "jwt" ? r = r.check(z.jwt()) : i === "emoji" ? r = r.check(z.emoji()) : i === "nanoid" ? r = r.check(z.nanoid()) : i === "cuid" ? r = r.check(z.cuid()) : i === "cuid2" ? r = r.check(z.cuid2()) : i === "ulid" ? r = r.check(z.ulid()) : i === "xid" ? r = r.check(z.xid()) : i === "ksuid" && (r = r.check(z.ksuid()));
10146
+ i === "email" ? r = r.check(j.email()) : i === "uri" || i === "uri-reference" ? r = r.check(j.url()) : i === "uuid" || i === "guid" ? r = r.check(j.uuid()) : i === "date-time" ? r = r.check(j.iso.datetime()) : i === "date" ? r = r.check(j.iso.date()) : i === "time" ? r = r.check(j.iso.time()) : i === "duration" ? r = r.check(j.iso.duration()) : i === "ipv4" ? r = r.check(j.ipv4()) : i === "ipv6" ? r = r.check(j.ipv6()) : i === "mac" ? r = r.check(j.mac()) : i === "cidr" ? r = r.check(j.cidrv4()) : i === "cidr-v6" ? r = r.check(j.cidrv6()) : i === "base64" ? r = r.check(j.base64()) : i === "base64url" ? r = r.check(j.base64url()) : i === "e164" ? r = r.check(j.e164()) : i === "jwt" ? r = r.check(j.jwt()) : i === "emoji" ? r = r.check(j.emoji()) : i === "nanoid" ? r = r.check(j.nanoid()) : i === "cuid" ? r = r.check(j.cuid()) : i === "cuid2" ? r = r.check(j.cuid2()) : i === "ulid" ? r = r.check(j.ulid()) : i === "xid" ? r = r.check(j.xid()) : i === "ksuid" && (r = r.check(j.ksuid()));
10147
10147
  }
10148
10148
  typeof e.minLength == "number" && (r = r.min(e.minLength)), typeof e.maxLength == "number" && (r = r.max(e.maxLength)), e.pattern && (r = r.regex(new RegExp(e.pattern))), o = r;
10149
10149
  break;
10150
10150
  }
10151
10151
  case "number":
10152
10152
  case "integer": {
10153
- let r = n === "integer" ? z.number().int() : z.number();
10153
+ let r = n === "integer" ? j.number().int() : j.number();
10154
10154
  typeof e.minimum == "number" && (r = r.min(e.minimum)), typeof e.maximum == "number" && (r = r.max(e.maximum)), typeof e.exclusiveMinimum == "number" ? r = r.gt(e.exclusiveMinimum) : e.exclusiveMinimum === !0 && typeof e.minimum == "number" && (r = r.gt(e.minimum)), typeof e.exclusiveMaximum == "number" ? r = r.lt(e.exclusiveMaximum) : e.exclusiveMaximum === !0 && typeof e.maximum == "number" && (r = r.lt(e.maximum)), typeof e.multipleOf == "number" && (r = r.multipleOf(e.multipleOf)), o = r;
10155
10155
  break;
10156
10156
  }
10157
10157
  case "boolean": {
10158
- o = z.boolean();
10158
+ o = j.boolean();
10159
10159
  break;
10160
10160
  }
10161
10161
  case "null": {
10162
- o = z.null();
10162
+ o = j.null();
10163
10163
  break;
10164
10164
  }
10165
10165
  case "object": {
10166
10166
  const r = {}, i = e.properties || {}, a = new Set(e.required || []);
10167
10167
  for (const [l, u] of Object.entries(i)) {
10168
- const c = Me(u, t);
10168
+ const c = De(u, t);
10169
10169
  r[l] = a.has(l) ? c : c.optional();
10170
10170
  }
10171
10171
  if (e.propertyNames) {
10172
- const l = Me(e.propertyNames, t), u = e.additionalProperties && typeof e.additionalProperties == "object" ? Me(e.additionalProperties, t) : z.any();
10172
+ const l = De(e.propertyNames, t), u = e.additionalProperties && typeof e.additionalProperties == "object" ? De(e.additionalProperties, t) : j.any();
10173
10173
  if (Object.keys(r).length === 0) {
10174
- o = z.record(l, u);
10174
+ o = j.record(l, u);
10175
10175
  break;
10176
10176
  }
10177
- const c = z.object(r).passthrough(), d = z.looseRecord(l, u);
10178
- o = z.intersection(c, d);
10177
+ const c = j.object(r).passthrough(), d = j.looseRecord(l, u);
10178
+ o = j.intersection(c, d);
10179
10179
  break;
10180
10180
  }
10181
10181
  if (e.patternProperties) {
10182
10182
  const l = e.patternProperties, u = Object.keys(l), c = [];
10183
10183
  for (const p of u) {
10184
- const f = Me(l[p], t), h = z.string().regex(new RegExp(p));
10185
- c.push(z.looseRecord(h, f));
10184
+ const f = De(l[p], t), h = j.string().regex(new RegExp(p));
10185
+ c.push(j.looseRecord(h, f));
10186
10186
  }
10187
10187
  const d = [];
10188
- if (Object.keys(r).length > 0 && d.push(z.object(r).passthrough()), d.push(...c), d.length === 0)
10189
- o = z.object({}).passthrough();
10188
+ if (Object.keys(r).length > 0 && d.push(j.object(r).passthrough()), d.push(...c), d.length === 0)
10189
+ o = j.object({}).passthrough();
10190
10190
  else if (d.length === 1)
10191
10191
  o = d[0];
10192
10192
  else {
10193
- let p = z.intersection(d[0], d[1]);
10193
+ let p = j.intersection(d[0], d[1]);
10194
10194
  for (let f = 2; f < d.length; f++)
10195
- p = z.intersection(p, d[f]);
10195
+ p = j.intersection(p, d[f]);
10196
10196
  o = p;
10197
10197
  }
10198
10198
  break;
10199
10199
  }
10200
- const s = z.object(r);
10201
- e.additionalProperties === !1 ? o = s.strict() : typeof e.additionalProperties == "object" ? o = s.catchall(Me(e.additionalProperties, t)) : o = s.passthrough();
10200
+ const s = j.object(r);
10201
+ e.additionalProperties === !1 ? o = s.strict() : typeof e.additionalProperties == "object" ? o = s.catchall(De(e.additionalProperties, t)) : o = s.passthrough();
10202
10202
  break;
10203
10203
  }
10204
10204
  case "array": {
10205
10205
  const r = e.prefixItems, i = e.items;
10206
10206
  if (r && Array.isArray(r)) {
10207
- const a = r.map((l) => Me(l, t)), s = i && typeof i == "object" && !Array.isArray(i) ? Me(i, t) : void 0;
10208
- s ? o = z.tuple(a).rest(s) : o = z.tuple(a), typeof e.minItems == "number" && (o = o.check(z.minLength(e.minItems))), typeof e.maxItems == "number" && (o = o.check(z.maxLength(e.maxItems)));
10207
+ const a = r.map((l) => De(l, t)), s = i && typeof i == "object" && !Array.isArray(i) ? De(i, t) : void 0;
10208
+ s ? o = j.tuple(a).rest(s) : o = j.tuple(a), typeof e.minItems == "number" && (o = o.check(j.minLength(e.minItems))), typeof e.maxItems == "number" && (o = o.check(j.maxLength(e.maxItems)));
10209
10209
  } else if (Array.isArray(i)) {
10210
- const a = i.map((l) => Me(l, t)), s = e.additionalItems && typeof e.additionalItems == "object" ? Me(e.additionalItems, t) : void 0;
10211
- s ? o = z.tuple(a).rest(s) : o = z.tuple(a), typeof e.minItems == "number" && (o = o.check(z.minLength(e.minItems))), typeof e.maxItems == "number" && (o = o.check(z.maxLength(e.maxItems)));
10210
+ const a = i.map((l) => De(l, t)), s = e.additionalItems && typeof e.additionalItems == "object" ? De(e.additionalItems, t) : void 0;
10211
+ s ? o = j.tuple(a).rest(s) : o = j.tuple(a), typeof e.minItems == "number" && (o = o.check(j.minLength(e.minItems))), typeof e.maxItems == "number" && (o = o.check(j.maxLength(e.maxItems)));
10212
10212
  } else if (i !== void 0) {
10213
- const a = Me(i, t);
10214
- let s = z.array(a);
10213
+ const a = De(i, t);
10214
+ let s = j.array(a);
10215
10215
  typeof e.minItems == "number" && (s = s.min(e.minItems)), typeof e.maxItems == "number" && (s = s.max(e.maxItems)), o = s;
10216
10216
  } else
10217
- o = z.array(z.any());
10217
+ o = j.array(j.any());
10218
10218
  break;
10219
10219
  }
10220
10220
  default:
@@ -10222,36 +10222,36 @@ function Z_(e, t) {
10222
10222
  }
10223
10223
  return e.description && (o = o.describe(e.description)), e.default !== void 0 && (o = o.default(e.default)), o;
10224
10224
  }
10225
- function Me(e, t) {
10225
+ function De(e, t) {
10226
10226
  if (typeof e == "boolean")
10227
- return e ? z.any() : z.never();
10227
+ return e ? j.any() : j.never();
10228
10228
  let n = Z_(e, t);
10229
10229
  const o = e.type || e.enum !== void 0 || e.const !== void 0;
10230
10230
  if (e.anyOf && Array.isArray(e.anyOf)) {
10231
- const r = e.anyOf.map((a) => Me(a, t)), i = z.union(r);
10232
- n = o ? z.intersection(n, i) : i;
10231
+ const r = e.anyOf.map((a) => De(a, t)), i = j.union(r);
10232
+ n = o ? j.intersection(n, i) : i;
10233
10233
  }
10234
10234
  if (e.oneOf && Array.isArray(e.oneOf)) {
10235
- const r = e.oneOf.map((a) => Me(a, t)), i = z.xor(r);
10236
- n = o ? z.intersection(n, i) : i;
10235
+ const r = e.oneOf.map((a) => De(a, t)), i = j.xor(r);
10236
+ n = o ? j.intersection(n, i) : i;
10237
10237
  }
10238
10238
  if (e.allOf && Array.isArray(e.allOf))
10239
10239
  if (e.allOf.length === 0)
10240
- n = o ? n : z.any();
10240
+ n = o ? n : j.any();
10241
10241
  else {
10242
- let r = o ? n : Me(e.allOf[0], t);
10242
+ let r = o ? n : De(e.allOf[0], t);
10243
10243
  const i = o ? 0 : 1;
10244
10244
  for (let a = i; a < e.allOf.length; a++)
10245
- r = z.intersection(r, Me(e.allOf[a], t));
10245
+ r = j.intersection(r, De(e.allOf[a], t));
10246
10246
  n = r;
10247
10247
  }
10248
- return e.nullable === !0 && t.version === "openapi-3.0" && (n = z.nullable(n)), e.readOnly === !0 && (n = z.readonly(n)), n;
10248
+ return e.nullable === !0 && t.version === "openapi-3.0" && (n = j.nullable(n)), e.readOnly === !0 && (n = j.readonly(n)), n;
10249
10249
  }
10250
10250
  function ST(e, t) {
10251
10251
  if (typeof e == "boolean")
10252
- return e ? z.any() : z.never();
10252
+ return e ? j.any() : j.never();
10253
10253
  const n = wT(e, t?.defaultTarget), o = e.$defs || e.definitions || {};
10254
- return Me(e, {
10254
+ return De(e, {
10255
10255
  version: n,
10256
10256
  defs: o,
10257
10257
  refs: /* @__PURE__ */ new Map(),
@@ -10292,13 +10292,13 @@ const Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10292
10292
  TimePrecision: Qv,
10293
10293
  ZodAny: ic,
10294
10294
  ZodArray: lc,
10295
- ZodBase64: Ma,
10295
+ ZodBase64: Da,
10296
10296
  ZodBase64URL: La,
10297
10297
  ZodBigInt: No,
10298
10298
  ZodBigIntFormat: qa,
10299
10299
  ZodBoolean: To,
10300
10300
  ZodCIDRv4: ja,
10301
- ZodCIDRv6: Da,
10301
+ ZodCIDRv6: Ma,
10302
10302
  ZodCUID: Ta,
10303
10303
  ZodCUID2: Na,
10304
10304
  ZodCatch: Oc,
@@ -10387,14 +10387,14 @@ const Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10387
10387
  core: hT,
10388
10388
  cuid: Wb,
10389
10389
  cuid2: Hb,
10390
- custom: Do,
10390
+ custom: Mo,
10391
10391
  date: b_,
10392
10392
  decode: Nb,
10393
10393
  decodeAsync: Cb,
10394
10394
  describe: z_,
10395
10395
  discriminatedUnion: Ja,
10396
10396
  e164: o_,
10397
- email: Db,
10397
+ email: Mb,
10398
10398
  emoji: Bb,
10399
10399
  encode: Tb,
10400
10400
  encodeAsync: Pb,
@@ -10411,7 +10411,7 @@ const Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10411
10411
  globalRegistry: St,
10412
10412
  gt: pr,
10413
10413
  gte: Ge,
10414
- guid: Mb,
10414
+ guid: Db,
10415
10415
  hash: l_,
10416
10416
  hex: u_,
10417
10417
  hostname: s_,
@@ -10425,7 +10425,7 @@ const Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10425
10425
  ipv4: Qb,
10426
10426
  ipv6: e_,
10427
10427
  iso: xb,
10428
- json: M_,
10428
+ json: D_,
10429
10429
  jwt: i_,
10430
10430
  keyof: __,
10431
10431
  ksuid: Yb,
@@ -10475,7 +10475,7 @@ const Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10475
10475
  property: Hl,
10476
10476
  readonly: Cc,
10477
10477
  record: tt,
10478
- refine: Dc,
10478
+ refine: Mc,
10479
10479
  regex: da,
10480
10480
  regexes: ml,
10481
10481
  registry: Sl,
@@ -10493,9 +10493,9 @@ const Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10493
10493
  strictObject: ye,
10494
10494
  string: w,
10495
10495
  stringFormat: a_,
10496
- stringbool: D_,
10496
+ stringbool: M_,
10497
10497
  success: T_,
10498
- superRefine: Mc,
10498
+ superRefine: Dc,
10499
10499
  symbol: v_,
10500
10500
  templateLiteral: C_,
10501
10501
  toJSONSchema: Sa,
@@ -10679,7 +10679,7 @@ var A;
10679
10679
  (function(e) {
10680
10680
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
10681
10681
  })(A || (A = {}));
10682
- var Mo = ({
10682
+ var Do = ({
10683
10683
  prefix: e,
10684
10684
  size: t = 16,
10685
10685
  alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
@@ -10699,7 +10699,7 @@ var Mo = ({
10699
10699
  message: `The separator "${o}" must not be part of the alphabet "${n}".`
10700
10700
  });
10701
10701
  return () => `${e}${o}${r()}`;
10702
- }, F_ = Mo();
10702
+ }, F_ = Do();
10703
10703
  function vf(e = globalThis) {
10704
10704
  var t, n, o;
10705
10705
  return e.window ? "runtime/browser" : (t = e.navigator) != null && t.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : (o = (n = e.process) == null ? void 0 : n.versions) != null && o.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
@@ -10773,10 +10773,10 @@ function jT(e) {
10773
10773
  let t;
10774
10774
  return () => (t == null && (t = e()), t);
10775
10775
  }
10776
- function DT(e) {
10777
- return zT(e) ? e : typeof e == "function" ? e() : MT(e);
10778
- }
10779
10776
  function MT(e) {
10777
+ return zT(e) ? e : typeof e == "function" ? e() : DT(e);
10778
+ }
10779
+ function DT(e) {
10780
10780
  return RT(async (t) => {
10781
10781
  const n = await e["~standard"].validate(t);
10782
10782
  return n.issues == null ? { success: !0, value: n.value } : {
@@ -10801,7 +10801,7 @@ async function Uc({
10801
10801
  value: e,
10802
10802
  schema: t
10803
10803
  }) {
10804
- const n = DT(t);
10804
+ const n = MT(t);
10805
10805
  try {
10806
10806
  if (n.validate == null)
10807
10807
  return { success: !0, value: e, rawValue: e };
@@ -11908,7 +11908,7 @@ function Zc(e, t) {
11908
11908
  var n = Kn[Gn];
11909
11909
  n && delete n[e];
11910
11910
  }
11911
- var DN = function(e, t) {
11911
+ var MN = function(e, t) {
11912
11912
  var n = typeof Symbol == "function" && e[Symbol.iterator];
11913
11913
  if (!n) return e;
11914
11914
  var o = n.call(e), r, i = [], a;
@@ -11924,7 +11924,7 @@ var DN = function(e, t) {
11924
11924
  }
11925
11925
  }
11926
11926
  return i;
11927
- }, MN = function(e, t, n) {
11927
+ }, DN = function(e, t, n) {
11928
11928
  if (n || arguments.length === 2) for (var o = 0, r = t.length, i; o < r; o++)
11929
11929
  (i || !(o in t)) && (i || (i = Array.prototype.slice.call(t, 0, o)), i[o] = t[o]);
11930
11930
  return e.concat(i || Array.prototype.slice.call(t));
@@ -11960,7 +11960,7 @@ var DN = function(e, t) {
11960
11960
  function Nn(e, t, n) {
11961
11961
  var o = Yn("diag");
11962
11962
  if (o)
11963
- return n.unshift(t), o[e].apply(o, MN([], DN(n), !1));
11963
+ return n.unshift(t), o[e].apply(o, DN([], MN(n), !1));
11964
11964
  }
11965
11965
  var Qe;
11966
11966
  (function(e) {
@@ -12328,7 +12328,7 @@ var kf = "5.0.116", nw = J([
12328
12328
  w(),
12329
12329
  Lt(Uint8Array),
12330
12330
  Lt(ArrayBuffer),
12331
- Do(
12331
+ Mo(
12332
12332
  // Buffer might not be available in some environments such as CloudFlare:
12333
12333
  (e) => {
12334
12334
  var t, n;
@@ -12452,7 +12452,7 @@ J([
12452
12452
  xP,
12453
12453
  IP
12454
12454
  ]);
12455
- Mo({
12455
+ Do({
12456
12456
  prefix: "aitxt",
12457
12457
  size: 24
12458
12458
  });
@@ -12579,7 +12579,7 @@ var kP = jT(
12579
12579
  providerMetadata: ke.optional()
12580
12580
  }),
12581
12581
  ye({
12582
- type: Do(
12582
+ type: Mo(
12583
12583
  (e) => typeof e == "string" && e.startsWith("data-"),
12584
12584
  { message: 'Type must start with "data-"' }
12585
12585
  ),
@@ -12966,7 +12966,7 @@ function PP({
12966
12966
  function y(v) {
12967
12967
  var k;
12968
12968
  const T = u.message.parts.find(
12969
- (D) => Gr(D) && D.toolCallId === v.toolCallId
12969
+ (z) => Gr(z) && z.toolCallId === v.toolCallId
12970
12970
  ), I = v, O = T;
12971
12971
  T != null ? (T.state = v.state, O.input = I.input, O.output = I.output, O.errorText = I.errorText, O.rawInput = I.rawInput, O.preliminary = I.preliminary, O.providerExecuted = (k = I.providerExecuted) != null ? k : T.providerExecuted, I.providerMetadata != null && T.state === "input-available" && (T.callProviderMetadata = I.providerMetadata)) : u.message.parts.push({
12972
12972
  type: `tool-${v.toolName}`,
@@ -12985,8 +12985,8 @@ function PP({
12985
12985
  var k, T;
12986
12986
  const I = u.message.parts.find(
12987
12987
  (L) => L.type === "dynamic-tool" && L.toolCallId === v.toolCallId
12988
- ), O = v, D = I;
12989
- I != null ? (I.state = v.state, D.toolName = v.toolName, D.input = O.input, D.output = O.output, D.errorText = O.errorText, D.rawInput = (k = O.rawInput) != null ? k : D.rawInput, D.preliminary = O.preliminary, D.providerExecuted = (T = O.providerExecuted) != null ? T : I.providerExecuted, O.providerMetadata != null && I.state === "input-available" && (I.callProviderMetadata = O.providerMetadata)) : u.message.parts.push({
12988
+ ), O = v, z = I;
12989
+ I != null ? (I.state = v.state, z.toolName = v.toolName, z.input = O.input, z.output = O.output, z.errorText = O.errorText, z.rawInput = (k = O.rawInput) != null ? k : z.rawInput, z.preliminary = O.preliminary, z.providerExecuted = (T = O.providerExecuted) != null ? T : I.providerExecuted, O.providerMetadata != null && I.state === "input-available" && (I.callProviderMetadata = O.providerMetadata)) : u.message.parts.push({
12990
12990
  type: "dynamic-tool",
12991
12991
  toolName: v.toolName,
12992
12992
  toolCallId: v.toolCallId,
@@ -13280,11 +13280,11 @@ async function CP({
13280
13280
  n.releaseLock();
13281
13281
  }
13282
13282
  }
13283
- Mo({
13283
+ Do({
13284
13284
  prefix: "aitxt",
13285
13285
  size: 24
13286
13286
  });
13287
- Mo({ prefix: "aiobj", size: 24 });
13287
+ Do({ prefix: "aiobj", size: 24 });
13288
13288
  var AP = class {
13289
13289
  constructor() {
13290
13290
  this.queue = [], this.isProcessing = !1;
@@ -13308,7 +13308,7 @@ var AP = class {
13308
13308
  });
13309
13309
  }
13310
13310
  };
13311
- Mo({ prefix: "aiobj", size: 24 });
13311
+ Do({ prefix: "aiobj", size: 24 });
13312
13312
  var RP = {};
13313
13313
  gP(RP, {
13314
13314
  object: () => jP,
@@ -13379,7 +13379,7 @@ var zP = () => ({
13379
13379
  }
13380
13380
  };
13381
13381
  };
13382
- async function DP(e) {
13382
+ async function MP(e) {
13383
13383
  if (e == null)
13384
13384
  return [];
13385
13385
  if (!globalThis.FileList || !(e instanceof globalThis.FileList))
@@ -13402,7 +13402,7 @@ async function DP(e) {
13402
13402
  })
13403
13403
  );
13404
13404
  }
13405
- var MP = class {
13405
+ var DP = class {
13406
13406
  constructor({
13407
13407
  api: e = "/api/chat",
13408
13408
  credentials: t,
@@ -13492,7 +13492,7 @@ var MP = class {
13492
13492
  throw new Error("The response body is empty.");
13493
13493
  return this.processResponseStream(m.body);
13494
13494
  }
13495
- }, lw = class extends MP {
13495
+ }, lw = class extends DP {
13496
13496
  constructor(e = {}) {
13497
13497
  super(e);
13498
13498
  }
@@ -13537,7 +13537,7 @@ var MP = class {
13537
13537
  let y;
13538
13538
  if ("text" in d || "files" in d ? y = {
13539
13539
  parts: [
13540
- ...Array.isArray(d.files) ? d.files : await DP(d.files),
13540
+ ...Array.isArray(d.files) ? d.files : await MP(d.files),
13541
13541
  ..."text" in d && d.text != null ? [{ type: "text", text: d.text }] : []
13542
13542
  ]
13543
13543
  } : y = d, d.messageId != null) {
@@ -14191,7 +14191,7 @@ function YP() {
14191
14191
  var c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? u : s;
14192
14192
  return js.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : c, js;
14193
14193
  }
14194
- var Ds = {};
14194
+ var Ms = {};
14195
14195
  var zf;
14196
14196
  function QP() {
14197
14197
  return zf || (zf = 1, process.env.NODE_ENV !== "production" && (function() {
@@ -14242,8 +14242,8 @@ function QP() {
14242
14242
  }
14243
14243
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
14244
14244
  var r = xm, i = typeof Object.is == "function" ? Object.is : e, a = r.useState, s = r.useEffect, l = r.useLayoutEffect, u = r.useDebugValue, c = !1, d = !1, p = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? o : t;
14245
- Ds.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : p, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
14246
- })()), Ds;
14245
+ Ms.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : p, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
14246
+ })()), Ms;
14247
14247
  }
14248
14248
  var jf;
14249
14249
  function XP() {
@@ -14260,9 +14260,9 @@ var e1 = XP(), cw = (e, t, n) => {
14260
14260
  function t1(e, t) {
14261
14261
  return t != null ? KP(e, t) : e;
14262
14262
  }
14263
- var st, mi, hi, zn, jn, Dn, Jr, yu, bu, r1 = class {
14263
+ var st, mi, hi, zn, jn, Mn, Jr, yu, bu, r1 = class {
14264
14264
  constructor(e = []) {
14265
- Pt(this, st, void 0), Pt(this, mi, "ready"), Pt(this, hi, void 0), Pt(this, zn, /* @__PURE__ */ new Set()), Pt(this, jn, /* @__PURE__ */ new Set()), Pt(this, Dn, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
14265
+ Pt(this, st, void 0), Pt(this, mi, "ready"), Pt(this, hi, void 0), Pt(this, zn, /* @__PURE__ */ new Set()), Pt(this, jn, /* @__PURE__ */ new Set()), Pt(this, Mn, /* @__PURE__ */ new Set()), this.pushMessage = (t) => {
14266
14266
  ir(this, st, be(this, st).concat(t)), be(this, Jr).call(this);
14267
14267
  }, this.popMessage = () => {
14268
14268
  ir(this, st, be(this, st).slice(0, -1)), be(this, Jr).call(this);
@@ -14280,14 +14280,14 @@ var st, mi, hi, zn, jn, Dn, Jr, yu, bu, r1 = class {
14280
14280
  };
14281
14281
  }, this["~registerStatusCallback"] = (t) => (be(this, jn).add(t), () => {
14282
14282
  be(this, jn).delete(t);
14283
- }), this["~registerErrorCallback"] = (t) => (be(this, Dn).add(t), () => {
14284
- be(this, Dn).delete(t);
14283
+ }), this["~registerErrorCallback"] = (t) => (be(this, Mn).add(t), () => {
14284
+ be(this, Mn).delete(t);
14285
14285
  }), Pt(this, Jr, () => {
14286
14286
  be(this, zn).forEach((t) => t());
14287
14287
  }), Pt(this, yu, () => {
14288
14288
  be(this, jn).forEach((t) => t());
14289
14289
  }), Pt(this, bu, () => {
14290
- be(this, Dn).forEach((t) => t());
14290
+ be(this, Mn).forEach((t) => t());
14291
14291
  }), ir(this, st, e);
14292
14292
  }
14293
14293
  get status() {
@@ -14314,11 +14314,11 @@ mi = /* @__PURE__ */ new WeakMap();
14314
14314
  hi = /* @__PURE__ */ new WeakMap();
14315
14315
  zn = /* @__PURE__ */ new WeakMap();
14316
14316
  jn = /* @__PURE__ */ new WeakMap();
14317
- Dn = /* @__PURE__ */ new WeakMap();
14317
+ Mn = /* @__PURE__ */ new WeakMap();
14318
14318
  Jr = /* @__PURE__ */ new WeakMap();
14319
14319
  yu = /* @__PURE__ */ new WeakMap();
14320
14320
  bu = /* @__PURE__ */ new WeakMap();
14321
- var Wr, Df = class extends UP {
14321
+ var Wr, Mf = class extends UP {
14322
14322
  constructor({ messages: t, ...n }) {
14323
14323
  const o = new r1(t);
14324
14324
  super({ ...n, state: o }), Pt(this, Wr, void 0), this["~registerMessagesCallback"] = (r, i) => be(this, Wr)["~registerMessagesCallback"](r, i), this["~registerStatusCallback"] = (r) => be(this, Wr)["~registerStatusCallback"](r), this["~registerErrorCallback"] = (r) => be(this, Wr)["~registerErrorCallback"](r), ir(this, Wr, o);
@@ -14331,9 +14331,9 @@ function n1({
14331
14331
  ...n
14332
14332
  } = {}) {
14333
14333
  const o = Wt(
14334
- "chat" in n ? n.chat : new Df(n)
14334
+ "chat" in n ? n.chat : new Mf(n)
14335
14335
  );
14336
- ("chat" in n && n.chat !== o.current || "id" in n && o.current.id !== n.id) && (o.current = "chat" in n ? n.chat : new Df(n));
14336
+ ("chat" in n && n.chat !== o.current || "id" in n && o.current.id !== n.id) && (o.current = "chat" in n ? n.chat : new Mf(n));
14337
14337
  const i = wi(
14338
14338
  (c) => o.current["~registerMessagesCallback"](c, e),
14339
14339
  // `chatRef.current.id` is required to trigger re-subscription when the chat ID changes
@@ -14384,7 +14384,7 @@ const o1 = (e) => Object.fromEntries(Object.entries(e).map(([t, n]) => [
14384
14384
  parameters: n.parameters instanceof Ti.ZodType ? Ti.toJSONSchema(n.parameters) : n.parameters
14385
14385
  }
14386
14386
  ])), i1 = (e) => Object.fromEntries(Object.entries(e).filter(([, t]) => !t.disabled && t.type !== "backend"));
14387
- class Mf extends lw {
14387
+ class Df extends lw {
14388
14388
  runtime;
14389
14389
  constructor(t) {
14390
14390
  super({
@@ -14428,7 +14428,7 @@ const a1 = (e) => {
14428
14428
  }
14429
14429
  }), []);
14430
14430
  }, s1 = (e) => {
14431
- const { adapters: t, transport: n, toCreateMessage: o, ...r } = e ?? {}, i = a1(n ?? new Mf()), a = It(({ threadListItem: u }) => u.id), s = n1({
14431
+ const { adapters: t, transport: n, toCreateMessage: o, ...r } = e ?? {}, i = a1(n ?? new Df()), a = It(({ threadListItem: u }) => u.id), s = n1({
14432
14432
  ...r,
14433
14433
  id: a,
14434
14434
  transport: i
@@ -14436,7 +14436,7 @@ const a1 = (e) => {
14436
14436
  adapters: t,
14437
14437
  ...o && { toCreateMessage: o }
14438
14438
  });
14439
- return i instanceof Mf && i.setRuntime(l), l;
14439
+ return i instanceof Df && i.setRuntime(l), l;
14440
14440
  }, u1 = ({ cloud: e, ...t } = {}) => {
14441
14441
  const n = Bx({ cloud: e });
14442
14442
  return Jx({
@@ -14588,15 +14588,15 @@ var Rw = "AI_LoadAPIKeyError", zw = `vercel.ai.error.${Rw}`, I1 = Symbol.for(zw)
14588
14588
  }
14589
14589
  };
14590
14590
  jw = I1;
14591
- var Dw = "AI_NoContentGeneratedError", Mw = `vercel.ai.error.${Dw}`, k1 = Symbol.for(Mw), Uw, Lw = class extends Ne {
14591
+ var Mw = "AI_NoContentGeneratedError", Dw = `vercel.ai.error.${Mw}`, k1 = Symbol.for(Dw), Uw, Lw = class extends Ne {
14592
14592
  // used in isInstance
14593
14593
  constructor({
14594
14594
  message: e = "No content generated."
14595
14595
  } = {}) {
14596
- super({ name: Dw, message: e }), this[Uw] = !0;
14596
+ super({ name: Mw, message: e }), this[Uw] = !0;
14597
14597
  }
14598
14598
  static isInstance(e) {
14599
- return Ne.hasMarker(e, Mw);
14599
+ return Ne.hasMarker(e, Dw);
14600
14600
  }
14601
14601
  };
14602
14602
  Uw = k1;
@@ -14647,14 +14647,14 @@ var Zf = class extends Error {
14647
14647
  super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
14648
14648
  }
14649
14649
  };
14650
- function Ms(e) {
14650
+ function Ds(e) {
14651
14651
  }
14652
14652
  function N1(e) {
14653
14653
  if (typeof e == "function")
14654
14654
  throw new TypeError(
14655
14655
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
14656
14656
  );
14657
- const { onEvent: t = Ms, onError: n = Ms, onRetry: o = Ms, onComment: r } = e;
14657
+ const { onEvent: t = Ds, onError: n = Ds, onRetry: o = Ds, onComment: r } = e;
14658
14658
  let i = "", a = !0, s, l = "", u = "";
14659
14659
  function c(m) {
14660
14660
  const b = a ? m.replace(/^\xEF\xBB\xBF/, "") : m, [y, $] = P1(`${i}${b}`);
@@ -14827,7 +14827,7 @@ function j1(e) {
14827
14827
  Object.entries(e).filter(([t, n]) => n != null)
14828
14828
  );
14829
14829
  }
14830
- function D1({
14830
+ function M1({
14831
14831
  apiKey: e,
14832
14832
  environmentVariableName: t,
14833
14833
  apiKeyParameterName: n = "apiKey",
@@ -14853,10 +14853,10 @@ function D1({
14853
14853
  });
14854
14854
  return e;
14855
14855
  }
14856
- var M1 = /"__proto__"\s*:/, U1 = /"constructor"\s*:/;
14856
+ var D1 = /"__proto__"\s*:/, U1 = /"constructor"\s*:/;
14857
14857
  function L1(e) {
14858
14858
  const t = JSON.parse(e);
14859
- return t === null || typeof t != "object" || M1.test(e) === !1 && U1.test(e) === !1 ? t : Z1(t);
14859
+ return t === null || typeof t != "object" || D1.test(e) === !1 && U1.test(e) === !1 ? t : Z1(t);
14860
14860
  }
14861
14861
  function Z1(e) {
14862
14862
  let t = [e];
@@ -15252,7 +15252,7 @@ var es = E({
15252
15252
  annotations: R(Yw).optional()
15253
15253
  }).optional()
15254
15254
  }).optional();
15255
- function Di(e) {
15255
+ function Mi(e) {
15256
15256
  switch (e) {
15257
15257
  case "stop":
15258
15258
  return "stop";
@@ -15411,14 +15411,14 @@ function uC(e) {
15411
15411
  const m = or(h), b = f.map(
15412
15412
  (y) => {
15413
15413
  var $, S, v, k, T, I, O;
15414
- const D = ($ = or(y.providerOptions)) != null ? $ : m;
15414
+ const z = ($ = or(y.providerOptions)) != null ? $ : m;
15415
15415
  switch (y.type) {
15416
15416
  case "text":
15417
15417
  return {
15418
15418
  type: "text",
15419
15419
  text: y.text,
15420
15420
  // For text parts, only use part-specific cache control
15421
- cache_control: D
15421
+ cache_control: z
15422
15422
  };
15423
15423
  case "file": {
15424
15424
  if ((S = y.mediaType) != null && S.startsWith("image/"))
@@ -15431,13 +15431,13 @@ function uC(e) {
15431
15431
  })
15432
15432
  },
15433
15433
  // For image parts, use part-specific or message-level cache control
15434
- cache_control: D
15434
+ cache_control: z
15435
15435
  };
15436
15436
  if ((v = y.mediaType) != null && v.startsWith("audio/"))
15437
15437
  return {
15438
15438
  type: "input_audio",
15439
15439
  input_audio: sC(y),
15440
- cache_control: D
15440
+ cache_control: z
15441
15441
  };
15442
15442
  const L = String(
15443
15443
  (O = (I = (T = (k = y.providerOptions) == null ? void 0 : k.openrouter) == null ? void 0 : T.filename) != null ? I : y.filename) != null ? O : ""
@@ -15460,14 +15460,14 @@ function uC(e) {
15460
15460
  filename: L,
15461
15461
  file_data: te
15462
15462
  },
15463
- cache_control: D
15463
+ cache_control: z
15464
15464
  };
15465
15465
  }
15466
15466
  default:
15467
15467
  return {
15468
15468
  type: "text",
15469
15469
  text: "",
15470
- cache_control: D
15470
+ cache_control: z
15471
15471
  };
15472
15472
  }
15473
15473
  }
@@ -15846,7 +15846,7 @@ var dC = E({
15846
15846
  }
15847
15847
  async doGenerate(e) {
15848
15848
  var t, n, o, r, i, a, s, l, u, c, d, p, f, h, m, b, y, $, S, v, k, T, I;
15849
- const D = (e.providerOptions || {}).openrouter || {}, L = ie(ie({}, this.getArgs(e)), D), { value: te, responseHeaders: ge } = await to({
15849
+ const z = (e.providerOptions || {}).openrouter || {}, L = ie(ie({}, this.getArgs(e)), z), { value: te, responseHeaders: ge } = await to({
15850
15850
  url: this.config.url({
15851
15851
  path: "/chat/completions",
15852
15852
  modelId: this.modelId
@@ -15861,9 +15861,9 @@ var dC = E({
15861
15861
  fetch: this.config.fetch
15862
15862
  });
15863
15863
  if ("error" in te) {
15864
- const M = te.error;
15864
+ const D = te.error;
15865
15865
  throw new xt({
15866
- message: M.message,
15866
+ message: D.message,
15867
15867
  url: this.config.url({
15868
15868
  path: "/chat/completions",
15869
15869
  modelId: this.modelId
@@ -15871,7 +15871,7 @@ var dC = E({
15871
15871
  requestBodyValues: L,
15872
15872
  statusCode: 200,
15873
15873
  responseHeaders: ge,
15874
- data: M
15874
+ data: D
15875
15875
  });
15876
15876
  }
15877
15877
  const H = te, F = H.choices[0];
@@ -15891,42 +15891,42 @@ var dC = E({
15891
15891
  totalTokens: 0,
15892
15892
  reasoningTokens: 0,
15893
15893
  cachedInputTokens: 0
15894
- }, ne = (u = F.message.reasoning_details) != null ? u : [], le = ne.length > 0 ? ne.map((M) => {
15895
- switch (M.type) {
15894
+ }, ne = (u = F.message.reasoning_details) != null ? u : [], le = ne.length > 0 ? ne.map((D) => {
15895
+ switch (D.type) {
15896
15896
  case "reasoning.text": {
15897
- if (M.text)
15897
+ if (D.text)
15898
15898
  return {
15899
15899
  type: "reasoning",
15900
- text: M.text,
15900
+ text: D.text,
15901
15901
  providerMetadata: {
15902
15902
  openrouter: {
15903
- reasoning_details: [M]
15903
+ reasoning_details: [D]
15904
15904
  }
15905
15905
  }
15906
15906
  };
15907
15907
  break;
15908
15908
  }
15909
15909
  case "reasoning.summary": {
15910
- if (M.summary)
15910
+ if (D.summary)
15911
15911
  return {
15912
15912
  type: "reasoning",
15913
- text: M.summary,
15913
+ text: D.summary,
15914
15914
  providerMetadata: {
15915
15915
  openrouter: {
15916
- reasoning_details: [M]
15916
+ reasoning_details: [D]
15917
15917
  }
15918
15918
  }
15919
15919
  };
15920
15920
  break;
15921
15921
  }
15922
15922
  case "reasoning.encrypted": {
15923
- if (M.data)
15923
+ if (D.data)
15924
15924
  return {
15925
15925
  type: "reasoning",
15926
15926
  text: "[REDACTED]",
15927
15927
  providerMetadata: {
15928
15928
  openrouter: {
15929
- reasoning_details: [M]
15929
+ reasoning_details: [D]
15930
15930
  }
15931
15931
  }
15932
15932
  };
@@ -15934,7 +15934,7 @@ var dC = E({
15934
15934
  }
15935
15935
  }
15936
15936
  return null;
15937
- }).filter((M) => M !== null) : F.message.reasoning ? [
15937
+ }).filter((D) => D !== null) : F.message.reasoning ? [
15938
15938
  {
15939
15939
  type: "reasoning",
15940
15940
  text: F.message.reasoning
@@ -15944,12 +15944,12 @@ var dC = E({
15944
15944
  type: "text",
15945
15945
  text: F.message.content
15946
15946
  }), F.message.tool_calls)
15947
- for (const M of F.message.tool_calls)
15947
+ for (const D of F.message.tool_calls)
15948
15948
  G.push({
15949
15949
  type: "tool-call",
15950
- toolCallId: (c = M.id) != null ? c : wt(),
15951
- toolName: M.function.name,
15952
- input: M.function.arguments,
15950
+ toolCallId: (c = D.id) != null ? c : wt(),
15951
+ toolName: D.function.name,
15952
+ input: D.function.arguments,
15953
15953
  providerMetadata: {
15954
15954
  openrouter: {
15955
15955
  reasoning_details: ne
@@ -15957,31 +15957,31 @@ var dC = E({
15957
15957
  }
15958
15958
  });
15959
15959
  if (F.message.images)
15960
- for (const M of F.message.images)
15960
+ for (const D of F.message.images)
15961
15961
  G.push({
15962
15962
  type: "file",
15963
- mediaType: qf(M.image_url.url, "image/jpeg"),
15964
- data: xu(M.image_url.url)
15963
+ mediaType: qf(D.image_url.url, "image/jpeg"),
15964
+ data: xu(D.image_url.url)
15965
15965
  });
15966
15966
  if (F.message.annotations)
15967
- for (const M of F.message.annotations)
15968
- M.type === "url_citation" && G.push({
15967
+ for (const D of F.message.annotations)
15968
+ D.type === "url_citation" && G.push({
15969
15969
  type: "source",
15970
15970
  sourceType: "url",
15971
- id: M.url_citation.url,
15972
- url: M.url_citation.url,
15973
- title: M.url_citation.title,
15971
+ id: D.url_citation.url,
15972
+ url: D.url_citation.url,
15973
+ title: D.url_citation.title,
15974
15974
  providerMetadata: {
15975
15975
  openrouter: {
15976
- content: M.url_citation.content || ""
15976
+ content: D.url_citation.content || ""
15977
15977
  }
15978
15978
  }
15979
15979
  });
15980
15980
  const de = (d = F.message.annotations) == null ? void 0 : d.filter(
15981
- (M) => M.type === "file"
15981
+ (D) => D.type === "file"
15982
15982
  ), V = F.message.tool_calls && F.message.tool_calls.length > 0, Le = ne.some(
15983
- (M) => M.type === "reasoning.encrypted" && M.data
15984
- ), Ze = V && Le && F.finish_reason === "stop" ? "tool-calls" : Di(F.finish_reason);
15983
+ (D) => D.type === "reasoning.encrypted" && D.data
15984
+ ), Ze = V && Le && F.finish_reason === "stop" ? "tool-calls" : Mi(F.finish_reason);
15985
15985
  return {
15986
15986
  content: G,
15987
15987
  finishReason: Ze,
@@ -16055,7 +16055,7 @@ var dC = E({
16055
16055
  stream: i.pipeThrough(
16056
16056
  new TransformStream({
16057
16057
  transform(S, v) {
16058
- var k, T, I, O, D, L, te, ge, H, F, _e, ne, le, G, de;
16058
+ var k, T, I, O, z, L, te, ge, H, F, _e, ne, le, G, de;
16059
16059
  if (!S.success) {
16060
16060
  l = "error", v.enqueue({ type: "error", error: S.error });
16061
16061
  return;
@@ -16085,15 +16085,15 @@ var dC = E({
16085
16085
  };
16086
16086
  }
16087
16087
  c.cost = V.usage.cost, c.totalTokens = V.usage.total_tokens;
16088
- const M = (I = V.usage.cost_details) == null ? void 0 : I.upstream_inference_cost;
16089
- M != null && (c.costDetails = {
16090
- upstreamInferenceCost: M
16088
+ const D = (I = V.usage.cost_details) == null ? void 0 : I.upstream_inference_cost;
16089
+ D != null && (c.costDetails = {
16090
+ upstreamInferenceCost: D
16091
16091
  });
16092
16092
  }
16093
16093
  const Le = V.choices[0];
16094
- if (Le?.finish_reason != null && (l = Di(Le.finish_reason)), Le?.delta == null)
16094
+ if (Le?.finish_reason != null && (l = Mi(Le.finish_reason)), Le?.delta == null)
16095
16095
  return;
16096
- const ve = Le.delta, Ze = (M, Y) => {
16096
+ const ve = Le.delta, Ze = (D, Y) => {
16097
16097
  h || (b = y || wt(), v.enqueue({
16098
16098
  providerMetadata: Y,
16099
16099
  type: "reasoning-start",
@@ -16101,7 +16101,7 @@ var dC = E({
16101
16101
  }), h = !0), v.enqueue({
16102
16102
  providerMetadata: Y,
16103
16103
  type: "reasoning-delta",
16104
- delta: M,
16104
+ delta: D,
16105
16105
  id: b || wt()
16106
16106
  });
16107
16107
  };
@@ -16112,7 +16112,7 @@ var dC = E({
16112
16112
  fe?.type === "reasoning.text" ? (fe.text = (fe.text || "") + (Y.text || ""), fe.signature = fe.signature || Y.signature, fe.format = fe.format || Y.format) : d.push(ie({}, Y));
16113
16113
  } else
16114
16114
  d.push(Y);
16115
- const M = {
16115
+ const D = {
16116
16116
  openrouter: {
16117
16117
  reasoning_details: ve.reasoning_details
16118
16118
  }
@@ -16120,15 +16120,15 @@ var dC = E({
16120
16120
  for (const Y of ve.reasoning_details)
16121
16121
  switch (Y.type) {
16122
16122
  case "reasoning.text": {
16123
- Y.text && Ze(Y.text, M);
16123
+ Y.text && Ze(Y.text, D);
16124
16124
  break;
16125
16125
  }
16126
16126
  case "reasoning.encrypted": {
16127
- Y.data && Ze("[REDACTED]", M);
16127
+ Y.data && Ze("[REDACTED]", D);
16128
16128
  break;
16129
16129
  }
16130
16130
  case "reasoning.summary": {
16131
- Y.summary && Ze(Y.summary, M);
16131
+ Y.summary && Ze(Y.summary, D);
16132
16132
  break;
16133
16133
  }
16134
16134
  }
@@ -16144,52 +16144,52 @@ var dC = E({
16144
16144
  delta: ve.content,
16145
16145
  id: m || wt()
16146
16146
  })), ve.annotations) {
16147
- for (const M of ve.annotations)
16148
- if (M.type === "url_citation")
16147
+ for (const D of ve.annotations)
16148
+ if (D.type === "url_citation")
16149
16149
  v.enqueue({
16150
16150
  type: "source",
16151
16151
  sourceType: "url",
16152
- id: M.url_citation.url,
16153
- url: M.url_citation.url,
16154
- title: M.url_citation.title,
16152
+ id: D.url_citation.url,
16153
+ url: D.url_citation.url,
16154
+ title: D.url_citation.title,
16155
16155
  providerMetadata: {
16156
16156
  openrouter: {
16157
- content: M.url_citation.content || ""
16157
+ content: D.url_citation.content || ""
16158
16158
  }
16159
16159
  }
16160
16160
  });
16161
- else if (M.type === "file") {
16162
- const Y = M.file;
16161
+ else if (D.type === "file") {
16162
+ const Y = D.file;
16163
16163
  Y && typeof Y == "object" && "hash" in Y && "name" in Y && p.push(
16164
- M
16164
+ D
16165
16165
  );
16166
16166
  }
16167
16167
  }
16168
16168
  if (ve.tool_calls != null)
16169
- for (const M of ve.tool_calls) {
16170
- const Y = (O = M.index) != null ? O : s.length - 1;
16169
+ for (const D of ve.tool_calls) {
16170
+ const Y = (O = D.index) != null ? O : s.length - 1;
16171
16171
  if (s[Y] == null) {
16172
- if (M.type !== "function")
16172
+ if (D.type !== "function")
16173
16173
  throw new Pn({
16174
- data: M,
16174
+ data: D,
16175
16175
  message: "Expected 'function' type."
16176
16176
  });
16177
- if (M.id == null)
16177
+ if (D.id == null)
16178
16178
  throw new Pn({
16179
- data: M,
16179
+ data: D,
16180
16180
  message: "Expected 'id' to be a string."
16181
16181
  });
16182
- if (((D = M.function) == null ? void 0 : D.name) == null)
16182
+ if (((z = D.function) == null ? void 0 : z.name) == null)
16183
16183
  throw new Pn({
16184
- data: M,
16184
+ data: D,
16185
16185
  message: "Expected 'function.name' to be a string."
16186
16186
  });
16187
16187
  s[Y] = {
16188
- id: M.id,
16188
+ id: D.id,
16189
16189
  type: "function",
16190
16190
  function: {
16191
- name: M.function.name,
16192
- arguments: (L = M.function.arguments) != null ? L : ""
16191
+ name: D.function.name,
16192
+ arguments: (L = D.function.arguments) != null ? L : ""
16193
16193
  },
16194
16194
  inputStarted: !1,
16195
16195
  sent: !1
@@ -16230,7 +16230,7 @@ var dC = E({
16230
16230
  data: {
16231
16231
  index: Y,
16232
16232
  toolCallsLength: s.length,
16233
- toolCallDelta: M
16233
+ toolCallDelta: D
16234
16234
  },
16235
16235
  message: `Tool call at index ${Y} is missing during merge.`
16236
16236
  });
@@ -16238,10 +16238,10 @@ var dC = E({
16238
16238
  type: "tool-input-start",
16239
16239
  id: fe.id,
16240
16240
  toolName: fe.function.name
16241
- })), ((H = M.function) == null ? void 0 : H.arguments) != null && (fe.function.arguments += (_e = (F = M.function) == null ? void 0 : F.arguments) != null ? _e : ""), v.enqueue({
16241
+ })), ((H = D.function) == null ? void 0 : H.arguments) != null && (fe.function.arguments += (_e = (F = D.function) == null ? void 0 : F.arguments) != null ? _e : ""), v.enqueue({
16242
16242
  type: "tool-input-delta",
16243
16243
  id: fe.id,
16244
- delta: (ne = M.function.arguments) != null ? ne : ""
16244
+ delta: (ne = D.function.arguments) != null ? ne : ""
16245
16245
  }), ((le = fe.function) == null ? void 0 : le.name) != null && ((G = fe.function) == null ? void 0 : G.arguments) != null && Us(fe.function.arguments) && (v.enqueue({
16246
16246
  type: "tool-call",
16247
16247
  toolCallId: (de = fe.id) != null ? de : wt(),
@@ -16255,11 +16255,11 @@ var dC = E({
16255
16255
  }), fe.sent = !0);
16256
16256
  }
16257
16257
  if (ve.images != null)
16258
- for (const M of ve.images)
16258
+ for (const D of ve.images)
16259
16259
  v.enqueue({
16260
16260
  type: "file",
16261
- mediaType: qf(M.image_url.url, "image/jpeg"),
16262
- data: xu(M.image_url.url)
16261
+ mediaType: qf(D.image_url.url, "image/jpeg"),
16262
+ data: xu(D.image_url.url)
16263
16263
  });
16264
16264
  },
16265
16265
  flush(S) {
@@ -16529,7 +16529,7 @@ var Vf = J([
16529
16529
  text: (t = k.text) != null ? t : ""
16530
16530
  }
16531
16531
  ],
16532
- finishReason: Di(k.finish_reason),
16532
+ finishReason: Mi(k.finish_reason),
16533
16533
  usage: {
16534
16534
  inputTokens: (o = (n = S.usage) == null ? void 0 : n.prompt_tokens) != null ? o : 0,
16535
16535
  outputTokens: (i = (r = S.usage) == null ? void 0 : r.completion_tokens) != null ? i : 0,
@@ -16604,7 +16604,7 @@ var Vf = J([
16604
16604
  });
16605
16605
  }
16606
16606
  const m = h.choices[0];
16607
- m?.finish_reason != null && (a = Di(m.finish_reason)), m?.text != null && c.enqueue({
16607
+ m?.finish_reason != null && (a = Mi(m.finish_reason)), m?.text != null && c.enqueue({
16608
16608
  type: "text-delta",
16609
16609
  delta: m.text,
16610
16610
  id: wt()
@@ -16703,7 +16703,7 @@ function e$(e = {}) {
16703
16703
  var t, n, o;
16704
16704
  const r = (n = eC((t = e.baseURL) != null ? t : e.baseUrl)) != null ? n : "https://openrouter.ai/api/v1", i = (o = e.compatibility) != null ? o : "compatible", a = () => SC(
16705
16705
  ie(ie({
16706
- Authorization: `Bearer ${D1({
16706
+ Authorization: `Bearer ${M1({
16707
16707
  apiKey: e.apiKey,
16708
16708
  environmentVariableName: "OPENROUTER_API_KEY",
16709
16709
  description: "OpenRouter"
@@ -16967,21 +16967,21 @@ function i$(e) {
16967
16967
  Error.stackTraceLimit = t;
16968
16968
  }
16969
16969
  }
16970
- var Mi = Symbol.for("vercel.ai.validator");
16970
+ var Di = Symbol.for("vercel.ai.validator");
16971
16971
  function RC(e) {
16972
- return { [Mi]: !0, validate: e };
16972
+ return { [Di]: !0, validate: e };
16973
16973
  }
16974
16974
  function zC(e) {
16975
- return typeof e == "object" && e !== null && Mi in e && e[Mi] === !0 && "validate" in e;
16975
+ return typeof e == "object" && e !== null && Di in e && e[Di] === !0 && "validate" in e;
16976
16976
  }
16977
16977
  function yn(e) {
16978
16978
  let t;
16979
16979
  return () => (t == null && (t = e()), t);
16980
16980
  }
16981
16981
  function jC(e) {
16982
- return zC(e) ? e : typeof e == "function" ? e() : DC(e);
16982
+ return zC(e) ? e : typeof e == "function" ? e() : MC(e);
16983
16983
  }
16984
- function DC(e) {
16984
+ function MC(e) {
16985
16985
  return RC(async (t) => {
16986
16986
  const n = await e["~standard"].validate(t);
16987
16987
  return n.issues == null ? { success: !0, value: n.value } : {
@@ -17024,7 +17024,7 @@ async function mr({
17024
17024
  };
17025
17025
  }
17026
17026
  }
17027
- async function MC({
17027
+ async function DC({
17028
17028
  text: e,
17029
17029
  schema: t
17030
17030
  }) {
@@ -17167,7 +17167,7 @@ var no = ({
17167
17167
  })
17168
17168
  };
17169
17169
  try {
17170
- const l = await MC({
17170
+ const l = await DC({
17171
17171
  text: a,
17172
17172
  schema: e
17173
17173
  });
@@ -18173,7 +18173,7 @@ function PA(e, t) {
18173
18173
  function CA(e) {
18174
18174
  return "_zod" in e;
18175
18175
  }
18176
- function Dr(e, t) {
18176
+ function Mr(e, t) {
18177
18177
  return CA(e) ? PA(e) : NA(e);
18178
18178
  }
18179
18179
  var Tu = Symbol.for("vercel.ai.schema");
@@ -18184,7 +18184,7 @@ function Qc(e, {
18184
18184
  [Tu]: !0,
18185
18185
  _type: void 0,
18186
18186
  // should never be used directly
18187
- [Mi]: !0,
18187
+ [Di]: !0,
18188
18188
  get jsonSchema() {
18189
18189
  return typeof e == "function" && (e = e()), e;
18190
18190
  },
@@ -18198,7 +18198,7 @@ function rs(e) {
18198
18198
  return e == null ? Qc({
18199
18199
  properties: {},
18200
18200
  additionalProperties: !1
18201
- }) : AA(e) ? e : typeof e == "function" ? e() : Dr(e);
18201
+ }) : AA(e) ? e : typeof e == "function" ? e() : Mr(e);
18202
18202
  }
18203
18203
  var { btoa: RA, atob: zA } = globalThis;
18204
18204
  function Xc(e) {
@@ -18214,16 +18214,16 @@ function Nu(e) {
18214
18214
  function jA(e) {
18215
18215
  return e?.replace(/\/$/, "");
18216
18216
  }
18217
- function DA(e) {
18217
+ function MA(e) {
18218
18218
  return e != null && typeof e[Symbol.asyncIterator] == "function";
18219
18219
  }
18220
- async function* MA({
18220
+ async function* DA({
18221
18221
  execute: e,
18222
18222
  input: t,
18223
18223
  options: n
18224
18224
  }) {
18225
18225
  const o = e(t, n);
18226
- if (DA(o)) {
18226
+ if (MA(o)) {
18227
18227
  let r;
18228
18228
  for await (const i of o)
18229
18229
  r = i, yield { type: "preliminary", output: i };
@@ -18366,7 +18366,7 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
18366
18366
  return ot.hasMarker(e) && ip in e;
18367
18367
  }
18368
18368
  }, g$ = "GatewayModelNotFoundError", WA = `vercel.ai.gateway.error.${g$}`, up = Symbol.for(WA), HA = yn(
18369
- () => Dr(
18369
+ () => Mr(
18370
18370
  E({
18371
18371
  modelId: w()
18372
18372
  })
@@ -18459,7 +18459,7 @@ async function yp({
18459
18459
  }
18460
18460
  }
18461
18461
  var QA = yn(
18462
- () => Dr(
18462
+ () => Mr(
18463
18463
  E({
18464
18464
  error: E({
18465
18465
  message: w(),
@@ -18506,7 +18506,7 @@ async function oo(e) {
18506
18506
  return t.success ? t.value : void 0;
18507
18507
  }
18508
18508
  var eR = yn(
18509
- () => Dr(J([P("api-key"), P("oidc")]))
18509
+ () => Mr(J([P("api-key"), P("oidc")]))
18510
18510
  ), bp = class {
18511
18511
  constructor(e) {
18512
18512
  this.config = e;
@@ -18550,7 +18550,7 @@ var eR = yn(
18550
18550
  }
18551
18551
  }
18552
18552
  }, tR = yn(
18553
- () => Dr(
18553
+ () => Mr(
18554
18554
  E({
18555
18555
  models: R(
18556
18556
  E({
@@ -18581,7 +18581,7 @@ var eR = yn(
18581
18581
  })
18582
18582
  )
18583
18583
  ), rR = yn(
18584
- () => Dr(
18584
+ () => Mr(
18585
18585
  E({
18586
18586
  balance: w(),
18587
18587
  total_used: w()
@@ -18779,7 +18779,7 @@ var eR = yn(
18779
18779
  };
18780
18780
  }
18781
18781
  }, iR = yn(
18782
- () => Dr(
18782
+ () => Mr(
18783
18783
  E({
18784
18784
  embeddings: R(R(Z())),
18785
18785
  usage: E({ tokens: Z() }).nullish(),
@@ -19002,16 +19002,16 @@ var R$ = "AI_NoOutputGeneratedError", z$ = `vercel.ai.error.${R$}`, $R = Symbol.
19002
19002
  }
19003
19003
  };
19004
19004
  j$ = $R;
19005
- var D$ = "AI_NoSuchToolError", M$ = `vercel.ai.error.${D$}`, xR = Symbol.for(M$), U$, Pu = class extends K {
19005
+ var M$ = "AI_NoSuchToolError", D$ = `vercel.ai.error.${M$}`, xR = Symbol.for(D$), U$, Pu = class extends K {
19006
19006
  constructor({
19007
19007
  toolName: e,
19008
19008
  availableTools: t = void 0,
19009
19009
  message: n = `Model tried to call unavailable tool '${e}'. ${t === void 0 ? "No tools are available." : `Available tools: ${t.join(", ")}.`}`
19010
19010
  }) {
19011
- super({ name: D$, message: n }), this[U$] = !0, this.toolName = e, this.availableTools = t;
19011
+ super({ name: M$, message: n }), this[U$] = !0, this.toolName = e, this.availableTools = t;
19012
19012
  }
19013
19013
  static isInstance(e) {
19014
- return K.hasMarker(e, M$);
19014
+ return K.hasMarker(e, D$);
19015
19015
  }
19016
19016
  };
19017
19017
  U$ = xR;
@@ -19189,16 +19189,16 @@ var zR = [
19189
19189
  const t = typeof e == "string" ? Xc(e) : e, n = (t[6] & 127) << 21 | (t[7] & 127) << 14 | (t[8] & 127) << 7 | t[9] & 127;
19190
19190
  return t.slice(n + 10);
19191
19191
  };
19192
- function DR(e) {
19192
+ function MR(e) {
19193
19193
  return typeof e == "string" && e.startsWith("SUQz") || typeof e != "string" && e.length > 10 && e[0] === 73 && // 'I'
19194
19194
  e[1] === 68 && // 'D'
19195
19195
  e[2] === 51 ? jR(e) : e;
19196
19196
  }
19197
- function MR({
19197
+ function DR({
19198
19198
  data: e,
19199
19199
  signatures: t
19200
19200
  }) {
19201
- const n = DR(e), o = typeof n == "string" ? Xc(
19201
+ const n = MR(e), o = typeof n == "string" ? Xc(
19202
19202
  n.substring(0, Math.min(n.length, 24))
19203
19203
  ) : n;
19204
19204
  for (const r of t)
@@ -19254,7 +19254,7 @@ var rS = J([
19254
19254
  w(),
19255
19255
  Lt(Uint8Array),
19256
19256
  Lt(ArrayBuffer),
19257
- Do(
19257
+ Mo(
19258
19258
  // Buffer might not be available in some environments such as CloudFlare:
19259
19259
  (e) => {
19260
19260
  var t, n;
@@ -19466,7 +19466,7 @@ function WR(e, t) {
19466
19466
  }
19467
19467
  switch (r) {
19468
19468
  case "image":
19469
- return (l instanceof Uint8Array || typeof l == "string") && (s = (n = MR({ data: l, signatures: zR })) != null ? n : s), {
19469
+ return (l instanceof Uint8Array || typeof l == "string") && (s = (n = DR({ data: l, signatures: zR })) != null ? n : s), {
19470
19470
  type: "file",
19471
19471
  mediaType: s ?? "image/*",
19472
19472
  // any image
@@ -20789,7 +20789,7 @@ function Nz({
20789
20789
  function y(v) {
20790
20790
  var k;
20791
20791
  const T = u.message.parts.find(
20792
- (D) => Kr(D) && D.toolCallId === v.toolCallId
20792
+ (z) => Kr(z) && z.toolCallId === v.toolCallId
20793
20793
  ), I = v, O = T;
20794
20794
  T != null ? (T.state = v.state, O.input = I.input, O.output = I.output, O.errorText = I.errorText, O.rawInput = I.rawInput, O.preliminary = I.preliminary, O.providerExecuted = (k = I.providerExecuted) != null ? k : T.providerExecuted, I.providerMetadata != null && T.state === "input-available" && (T.callProviderMetadata = I.providerMetadata)) : u.message.parts.push({
20795
20795
  type: `tool-${v.toolName}`,
@@ -20808,8 +20808,8 @@ function Nz({
20808
20808
  var k, T;
20809
20809
  const I = u.message.parts.find(
20810
20810
  (L) => L.type === "dynamic-tool" && L.toolCallId === v.toolCallId
20811
- ), O = v, D = I;
20812
- I != null ? (I.state = v.state, D.toolName = v.toolName, D.input = O.input, D.output = O.output, D.errorText = O.errorText, D.rawInput = (k = O.rawInput) != null ? k : D.rawInput, D.preliminary = O.preliminary, D.providerExecuted = (T = O.providerExecuted) != null ? T : I.providerExecuted, O.providerMetadata != null && I.state === "input-available" && (I.callProviderMetadata = O.providerMetadata)) : u.message.parts.push({
20811
+ ), O = v, z = I;
20812
+ I != null ? (I.state = v.state, z.toolName = v.toolName, z.input = O.input, z.output = O.output, z.errorText = O.errorText, z.rawInput = (k = O.rawInput) != null ? k : z.rawInput, z.preliminary = O.preliminary, z.providerExecuted = (T = O.providerExecuted) != null ? T : I.providerExecuted, O.providerMetadata != null && I.state === "input-available" && (I.callProviderMetadata = O.providerMetadata)) : u.message.parts.push({
20813
20813
  type: "dynamic-tool",
20814
20814
  toolName: v.toolName,
20815
20815
  toolCallId: v.toolCallId,
@@ -21431,7 +21431,7 @@ function jz({
21431
21431
  fn: async (I) => {
21432
21432
  let O;
21433
21433
  try {
21434
- const D = MA({
21434
+ const z = DA({
21435
21435
  execute: k.execute.bind(k),
21436
21436
  input: v.input,
21437
21437
  options: {
@@ -21441,7 +21441,7 @@ function jz({
21441
21441
  experimental_context: l
21442
21442
  }
21443
21443
  });
21444
- for await (const L of D)
21444
+ for await (const L of z)
21445
21445
  u.enqueue({
21446
21446
  ...v,
21447
21447
  type: "tool-result",
@@ -21450,11 +21450,11 @@ function jz({
21450
21450
  preliminary: !0
21451
21451
  }
21452
21452
  }), L.type === "final" && (O = L.output);
21453
- } catch (D) {
21454
- sS(I, D), u.enqueue({
21453
+ } catch (z) {
21454
+ sS(I, z), u.enqueue({
21455
21455
  ...v,
21456
21456
  type: "tool-error",
21457
- error: D
21457
+ error: z
21458
21458
  }), d.delete(T), m();
21459
21459
  return;
21460
21460
  }
@@ -21535,11 +21535,11 @@ function jz({
21535
21535
  }
21536
21536
  });
21537
21537
  }
21538
- var Dz = Lo({
21538
+ var Mz = Lo({
21539
21539
  prefix: "aitxt",
21540
21540
  size: 24
21541
21541
  });
21542
- function Mz({
21542
+ function Dz({
21543
21543
  model: e,
21544
21544
  tools: t,
21545
21545
  toolChoice: n,
@@ -21567,10 +21567,10 @@ function Mz({
21567
21567
  onFinish: T,
21568
21568
  onAbort: I,
21569
21569
  onStepFinish: O,
21570
- experimental_context: D,
21570
+ experimental_context: z,
21571
21571
  _internal: {
21572
21572
  now: L = zz,
21573
- generateId: te = Dz,
21573
+ generateId: te = Mz,
21574
21574
  currentDate: ge = () => /* @__PURE__ */ new Date()
21575
21575
  } = {},
21576
21576
  ...H
@@ -21603,7 +21603,7 @@ function Mz({
21603
21603
  now: L,
21604
21604
  currentDate: ge,
21605
21605
  generateId: te,
21606
- experimental_context: D,
21606
+ experimental_context: z,
21607
21607
  download: $
21608
21608
  });
21609
21609
  }
@@ -21684,7 +21684,7 @@ var Lz = class {
21684
21684
  onChunk: T,
21685
21685
  onError: I,
21686
21686
  onFinish: O,
21687
- onAbort: D,
21687
+ onAbort: z,
21688
21688
  onStepFinish: L,
21689
21689
  experimental_context: te,
21690
21690
  download: ge
@@ -21695,7 +21695,7 @@ var Lz = class {
21695
21695
  let ne, le, G = {}, de = [];
21696
21696
  const V = [];
21697
21697
  let Le, ve = {}, Ze = {};
21698
- const M = new TransformStream({
21698
+ const D = new TransformStream({
21699
21699
  async transform(Ee, Oe) {
21700
21700
  var ze, oe, ht, Sn;
21701
21701
  Oe.enqueue(Ee);
@@ -21859,7 +21859,7 @@ var Lz = class {
21859
21859
  },
21860
21860
  async pull(Ee) {
21861
21861
  function Oe() {
21862
- D?.({ steps: V }), Ee.enqueue({ type: "abort" }), Ee.close();
21862
+ z?.({ steps: V }), Ee.enqueue({ type: "abort" }), Ee.close();
21863
21863
  }
21864
21864
  try {
21865
21865
  const { done: ze, value: oe } = await fe.read();
@@ -21889,7 +21889,7 @@ var Lz = class {
21889
21889
  }
21890
21890
  })
21891
21891
  );
21892
- this.baseStream = we.pipeThrough(Uz(m)).pipeThrough(M);
21892
+ this.baseStream = we.pipeThrough(Uz(m)).pipeThrough(D);
21893
21893
  const { maxRetries: Wo, retry: bs } = gz({
21894
21894
  maxRetries: r,
21895
21895
  abortSignal: i
@@ -21936,14 +21936,14 @@ var Lz = class {
21936
21936
  steps: V,
21937
21937
  stepNumber: V.length,
21938
21938
  messages: In
21939
- }), Mr = tS(
21939
+ }), Dr = tS(
21940
21940
  (Sn = Tt?.model) != null ? Sn : e
21941
21941
  ), Fd = await VR({
21942
21942
  prompt: {
21943
21943
  system: (U = Tt?.system) != null ? U : Zd.system,
21944
21944
  messages: (xe = Tt?.messages) != null ? xe : In
21945
21945
  },
21946
- supportedUrls: await Mr.supportedUrls,
21946
+ supportedUrls: await Dr.supportedUrls,
21947
21947
  download: ge
21948
21948
  }), { toolChoice: _s, tools: ws } = KR({
21949
21949
  tools: u,
@@ -21965,8 +21965,8 @@ var Lz = class {
21965
21965
  }),
21966
21966
  ...Ho,
21967
21967
  // model:
21968
- "ai.model.provider": Mr.provider,
21969
- "ai.model.id": Mr.modelId,
21968
+ "ai.model.provider": Dr.provider,
21969
+ "ai.model.id": Dr.modelId,
21970
21970
  // prompt:
21971
21971
  "ai.prompt.messages": {
21972
21972
  input: () => fz(Fd)
@@ -21979,8 +21979,8 @@ var Lz = class {
21979
21979
  input: () => _s != null ? JSON.stringify(_s) : void 0
21980
21980
  },
21981
21981
  // standardized gen-ai llm span attributes:
21982
- "gen_ai.system": Mr.provider,
21983
- "gen_ai.request.model": Mr.modelId,
21982
+ "gen_ai.system": Dr.provider,
21983
+ "gen_ai.request.model": Dr.modelId,
21984
21984
  "gen_ai.request.frequency_penalty": mt.frequencyPenalty,
21985
21985
  "gen_ai.request.max_tokens": mt.maxOutputTokens,
21986
21986
  "gen_ai.request.presence_penalty": mt.presencePenalty,
@@ -21996,7 +21996,7 @@ var Lz = class {
21996
21996
  startTimestampMs: S(),
21997
21997
  // get before the call
21998
21998
  doStreamSpan: B,
21999
- result: await Mr.doStream({
21999
+ result: await Dr.doStream({
22000
22000
  ...mt,
22001
22001
  tools: ws,
22002
22002
  toolChoice: _s,
@@ -23113,7 +23113,7 @@ function rd(e, t) {
23113
23113
  function ao(e) {
23114
23114
  return JSON.stringify(
23115
23115
  e,
23116
- (t, n) => Du(n) ? Object.keys(n).sort().reduce((o, r) => (o[r] = n[r], o), {}) : n
23116
+ (t, n) => Mu(n) ? Object.keys(n).sort().reduce((o, r) => (o[r] = n[r], o), {}) : n
23117
23117
  );
23118
23118
  }
23119
23119
  function so(e, t) {
@@ -23124,7 +23124,7 @@ function zu(e, t) {
23124
23124
  if (e === t)
23125
23125
  return e;
23126
23126
  const n = Cp(e) && Cp(t);
23127
- if (!n && !(Du(e) && Du(t))) return t;
23127
+ if (!n && !(Mu(e) && Mu(t))) return t;
23128
23128
  const r = (n ? e : Object.keys(e)).length, i = n ? t : Object.keys(t), a = i.length, s = n ? new Array(a) : {};
23129
23129
  let l = 0;
23130
23130
  for (let u = 0; u < a; u++) {
@@ -23153,7 +23153,7 @@ function ju(e, t) {
23153
23153
  function Cp(e) {
23154
23154
  return Array.isArray(e) && e.length === Object.keys(e).length;
23155
23155
  }
23156
- function Du(e) {
23156
+ function Mu(e) {
23157
23157
  if (!Ap(e))
23158
23158
  return !1;
23159
23159
  const t = e.constructor;
@@ -23170,7 +23170,7 @@ function ej(e) {
23170
23170
  Sr.setTimeout(t, e);
23171
23171
  });
23172
23172
  }
23173
- function Mu(e, t, n) {
23173
+ function Du(e, t, n) {
23174
23174
  if (typeof n.structuralSharing == "function")
23175
23175
  return n.structuralSharing(e, t);
23176
23176
  if (n.structuralSharing !== !1) {
@@ -23323,7 +23323,7 @@ function aj() {
23323
23323
  }
23324
23324
  };
23325
23325
  }
23326
- var De = aj(), sj = class extends Zo {
23326
+ var Me = aj(), sj = class extends Zo {
23327
23327
  #e = !0;
23328
23328
  #t;
23329
23329
  #r;
@@ -23469,7 +23469,7 @@ var bS = class {
23469
23469
  !this.observers.length && this.state.fetchStatus === "idle" && this.#r.remove(this);
23470
23470
  }
23471
23471
  setData(e, t) {
23472
- const n = Mu(this.state.data, e, this.options);
23472
+ const n = Du(this.state.data, e, this.options);
23473
23473
  return this.#i({
23474
23474
  data: n,
23475
23475
  type: "success",
@@ -23696,7 +23696,7 @@ var bS = class {
23696
23696
  };
23697
23697
  }
23698
23698
  };
23699
- this.state = t(this.state), De.batch(() => {
23699
+ this.state = t(this.state), Me.batch(() => {
23700
23700
  this.observers.forEach((n) => {
23701
23701
  n.onQueryUpdate();
23702
23702
  }), this.#r.notify({ query: this, type: "updated", action: e });
@@ -23799,7 +23799,7 @@ var cj = class extends Zo {
23799
23799
  observer: this
23800
23800
  });
23801
23801
  const o = this.hasListeners();
23802
- o && Dp(
23802
+ o && Mp(
23803
23803
  this.#t,
23804
23804
  n,
23805
23805
  this.options,
@@ -23887,8 +23887,8 @@ var cj = class extends Zo {
23887
23887
  const n = this.#t, o = this.options, r = this.#o, i = this.#n, a = this.#s, l = e !== n ? e.state : this.#r, { state: u } = e;
23888
23888
  let c = { ...u }, d = !1, p;
23889
23889
  if (t._optimisticResults) {
23890
- const O = this.hasListeners(), D = !O && jp(e, t), L = O && Dp(e, n, t, o);
23891
- (D || L) && (c = {
23890
+ const O = this.hasListeners(), z = !O && jp(e, t), L = O && Mp(e, n, t, o);
23891
+ (z || L) && (c = {
23892
23892
  ...c,
23893
23893
  ..._S(u.data, e.options)
23894
23894
  }), t._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
@@ -23901,7 +23901,7 @@ var cj = class extends Zo {
23901
23901
  r?.isPlaceholderData && t.placeholderData === a?.placeholderData ? (O = r.data, b = !0) : O = typeof t.placeholderData == "function" ? t.placeholderData(
23902
23902
  this.#p?.state.data,
23903
23903
  this.#p
23904
- ) : t.placeholderData, O !== void 0 && (m = "success", p = Mu(
23904
+ ) : t.placeholderData, O !== void 0 && (m = "success", p = Du(
23905
23905
  r?.data,
23906
23906
  O,
23907
23907
  t
@@ -23912,7 +23912,7 @@ var cj = class extends Zo {
23912
23912
  p = this.#f;
23913
23913
  else
23914
23914
  try {
23915
- this.#h = t.select, p = t.select(p), p = Mu(r?.data, p, t), this.#f = p, this.#i = null;
23915
+ this.#h = t.select, p = t.select(p), p = Du(r?.data, p, t), this.#f = p, this.#i = null;
23916
23916
  } catch (O) {
23917
23917
  this.#i = O;
23918
23918
  }
@@ -23948,7 +23948,7 @@ var cj = class extends Zo {
23948
23948
  if (this.options.experimental_prefetchInRender) {
23949
23949
  const O = (te) => {
23950
23950
  I.status === "error" ? te.reject(I.error) : I.data !== void 0 && te.resolve(I.data);
23951
- }, D = () => {
23951
+ }, z = () => {
23952
23952
  const te = this.#a = I.promise = Uu();
23953
23953
  O(te);
23954
23954
  }, L = this.#a;
@@ -23957,10 +23957,10 @@ var cj = class extends Zo {
23957
23957
  e.queryHash === n.queryHash && O(L);
23958
23958
  break;
23959
23959
  case "fulfilled":
23960
- (I.status === "error" || I.data !== L.value) && D();
23960
+ (I.status === "error" || I.data !== L.value) && z();
23961
23961
  break;
23962
23962
  case "rejected":
23963
- (I.status !== "error" || I.error !== L.reason) && D();
23963
+ (I.status !== "error" || I.error !== L.reason) && z();
23964
23964
  break;
23965
23965
  }
23966
23966
  }
@@ -23998,7 +23998,7 @@ var cj = class extends Zo {
23998
23998
  this.updateResult(), this.hasListeners() && this.#b();
23999
23999
  }
24000
24000
  #S(e) {
24001
- De.batch(() => {
24001
+ Me.batch(() => {
24002
24002
  e.listeners && this.listeners.forEach((t) => {
24003
24003
  t(this.#o);
24004
24004
  }), this.#e.getQueryCache().notify({
@@ -24021,7 +24021,7 @@ function Zu(e, t, n) {
24021
24021
  }
24022
24022
  return !1;
24023
24023
  }
24024
- function Dp(e, t, n, o) {
24024
+ function Mp(e, t, n, o) {
24025
24025
  return (e !== t || ut(o.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && od(e, n);
24026
24026
  }
24027
24027
  function od(e, t) {
@@ -24030,7 +24030,7 @@ function od(e, t) {
24030
24030
  function fj(e, t) {
24031
24031
  return !ju(e.getCurrentResult(), t);
24032
24032
  }
24033
- function Mp(e) {
24033
+ function Dp(e) {
24034
24034
  return {
24035
24035
  onFetch: (t, n) => {
24036
24036
  const o = t.options, r = t.fetchOptions?.meta?.fetchMore?.direction, i = t.state.data?.pages || [], a = t.state.data?.pageParams || [];
@@ -24298,7 +24298,7 @@ var mj = class extends bS {
24298
24298
  };
24299
24299
  }
24300
24300
  };
24301
- this.state = t(this.state), De.batch(() => {
24301
+ this.state = t(this.state), Me.batch(() => {
24302
24302
  this.#t.forEach((n) => {
24303
24303
  n.onMutationUpdate(e);
24304
24304
  }), this.#r.notify({
@@ -24377,7 +24377,7 @@ var gj = class extends Zo {
24377
24377
  return typeof t == "string" ? this.#t.get(t)?.find((o) => o !== e && o.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
24378
24378
  }
24379
24379
  clear() {
24380
- De.batch(() => {
24380
+ Me.batch(() => {
24381
24381
  this.#e.forEach((e) => {
24382
24382
  this.notify({ type: "removed", mutation: e });
24383
24383
  }), this.#e.clear(), this.#t.clear();
@@ -24396,7 +24396,7 @@ var gj = class extends Zo {
24396
24396
  return this.getAll().filter((t) => Pp(e, t));
24397
24397
  }
24398
24398
  notify(e) {
24399
- De.batch(() => {
24399
+ Me.batch(() => {
24400
24400
  this.listeners.forEach((t) => {
24401
24401
  t(e);
24402
24402
  });
@@ -24404,7 +24404,7 @@ var gj = class extends Zo {
24404
24404
  }
24405
24405
  resumePausedMutations() {
24406
24406
  const e = this.getAll().filter((t) => t.state.isPaused);
24407
- return De.batch(
24407
+ return Me.batch(
24408
24408
  () => Promise.all(
24409
24409
  e.map((t) => t.continue().catch(He))
24410
24410
  )
@@ -24442,7 +24442,7 @@ var vj = class extends Zo {
24442
24442
  t && (e.destroy(), t === e && this.#e.delete(e.queryHash), this.notify({ type: "removed", query: e }));
24443
24443
  }
24444
24444
  clear() {
24445
- De.batch(() => {
24445
+ Me.batch(() => {
24446
24446
  this.getAll().forEach((e) => {
24447
24447
  this.remove(e);
24448
24448
  });
@@ -24465,21 +24465,21 @@ var vj = class extends Zo {
24465
24465
  return Object.keys(e).length > 0 ? t.filter((n) => Np(e, n)) : t;
24466
24466
  }
24467
24467
  notify(e) {
24468
- De.batch(() => {
24468
+ Me.batch(() => {
24469
24469
  this.listeners.forEach((t) => {
24470
24470
  t(e);
24471
24471
  });
24472
24472
  });
24473
24473
  }
24474
24474
  onFocus() {
24475
- De.batch(() => {
24475
+ Me.batch(() => {
24476
24476
  this.getAll().forEach((e) => {
24477
24477
  e.onFocus();
24478
24478
  });
24479
24479
  });
24480
24480
  }
24481
24481
  onOnline() {
24482
- De.batch(() => {
24482
+ Me.batch(() => {
24483
24483
  this.getAll().forEach((e) => {
24484
24484
  e.onOnline();
24485
24485
  });
@@ -24542,7 +24542,7 @@ var vj = class extends Zo {
24542
24542
  return this.#e.build(this, o).setData(a, { ...n, manual: !0 });
24543
24543
  }
24544
24544
  setQueriesData(e, t, n) {
24545
- return De.batch(
24545
+ return Me.batch(
24546
24546
  () => this.#e.findAll(e).map(({ queryKey: o }) => [
24547
24547
  o,
24548
24548
  this.setQueryData(o, t, n)
@@ -24557,7 +24557,7 @@ var vj = class extends Zo {
24557
24557
  }
24558
24558
  removeQueries(e) {
24559
24559
  const t = this.#e;
24560
- De.batch(() => {
24560
+ Me.batch(() => {
24561
24561
  t.findAll(e).forEach((n) => {
24562
24562
  t.remove(n);
24563
24563
  });
@@ -24565,7 +24565,7 @@ var vj = class extends Zo {
24565
24565
  }
24566
24566
  resetQueries(e, t) {
24567
24567
  const n = this.#e;
24568
- return De.batch(() => (n.findAll(e).forEach((o) => {
24568
+ return Me.batch(() => (n.findAll(e).forEach((o) => {
24569
24569
  o.reset();
24570
24570
  }), this.refetchQueries(
24571
24571
  {
@@ -24576,13 +24576,13 @@ var vj = class extends Zo {
24576
24576
  )));
24577
24577
  }
24578
24578
  cancelQueries(e, t = {}) {
24579
- const n = { revert: !0, ...t }, o = De.batch(
24579
+ const n = { revert: !0, ...t }, o = Me.batch(
24580
24580
  () => this.#e.findAll(e).map((r) => r.cancel(n))
24581
24581
  );
24582
24582
  return Promise.all(o).then(He).catch(He);
24583
24583
  }
24584
24584
  invalidateQueries(e, t = {}) {
24585
- return De.batch(() => (this.#e.findAll(e).forEach((n) => {
24585
+ return Me.batch(() => (this.#e.findAll(e).forEach((n) => {
24586
24586
  n.invalidate();
24587
24587
  }), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries(
24588
24588
  {
@@ -24596,7 +24596,7 @@ var vj = class extends Zo {
24596
24596
  const n = {
24597
24597
  ...t,
24598
24598
  cancelRefetch: t.cancelRefetch ?? !0
24599
- }, o = De.batch(
24599
+ }, o = Me.batch(
24600
24600
  () => this.#e.findAll(e).filter((r) => !r.isDisabled() && !r.isStatic()).map((r) => {
24601
24601
  let i = r.fetch(void 0, n);
24602
24602
  return n.throwOnError || (i = i.catch(He)), r.state.fetchStatus === "paused" ? Promise.resolve() : i;
@@ -24616,13 +24616,13 @@ var vj = class extends Zo {
24616
24616
  return this.fetchQuery(e).then(He).catch(He);
24617
24617
  }
24618
24618
  fetchInfiniteQuery(e) {
24619
- return e.behavior = Mp(e.pages), this.fetchQuery(e);
24619
+ return e.behavior = Dp(e.pages), this.fetchQuery(e);
24620
24620
  }
24621
24621
  prefetchInfiniteQuery(e) {
24622
24622
  return this.fetchInfiniteQuery(e).then(He).catch(He);
24623
24623
  }
24624
24624
  ensureInfiniteQueryData(e) {
24625
- return e.behavior = Mp(e.pages), this.ensureQueryData(e);
24625
+ return e.behavior = Dp(e.pages), this.ensureQueryData(e);
24626
24626
  }
24627
24627
  resumePausedMutations() {
24628
24628
  return Fi.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
@@ -24757,7 +24757,7 @@ function Nj(e, t, n) {
24757
24757
  if (_.useSyncExternalStore(
24758
24758
  _.useCallback(
24759
24759
  (d) => {
24760
- const p = c ? l.subscribe(De.batchCalls(d)) : He;
24760
+ const p = c ? l.subscribe(Me.batchCalls(d)) : He;
24761
24761
  return l.updateResult(), p;
24762
24762
  },
24763
24763
  [l, c]
@@ -24879,13 +24879,13 @@ function jj(e, {
24879
24879
  }
24880
24880
  let id;
24881
24881
  id = globalThis.crypto;
24882
- async function Dj(e) {
24882
+ async function Mj(e) {
24883
24883
  return (await id).getRandomValues(new Uint8Array(e));
24884
24884
  }
24885
- async function Mj(e) {
24885
+ async function Dj(e) {
24886
24886
  const t = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";
24887
24887
  let n = "";
24888
- const o = await Dj(e);
24888
+ const o = await Mj(e);
24889
24889
  for (let r = 0; r < e; r++) {
24890
24890
  const i = o[r] % t.length;
24891
24891
  n += t[i];
@@ -24893,7 +24893,7 @@ async function Mj(e) {
24893
24893
  return n;
24894
24894
  }
24895
24895
  async function Uj(e) {
24896
- return await Mj(e);
24896
+ return await Dj(e);
24897
24897
  }
24898
24898
  async function Lj(e) {
24899
24899
  const t = await (await id).subtle.digest("SHA-256", new TextEncoder().encode(e));
@@ -25092,12 +25092,12 @@ var Wj = Qt.extend({
25092
25092
  method: w(),
25093
25093
  params: X(os)
25094
25094
  })
25095
- ).strict(), Mn = J([
25095
+ ).strict(), Dn = J([
25096
25096
  l4,
25097
25097
  f4,
25098
25098
  c4,
25099
25099
  d4
25100
- ]), DS = typeof __PACKAGE_VERSION__ < "u" ? __PACKAGE_VERSION__ : "0.0.0-test", MS = E({
25100
+ ]), MS = typeof __PACKAGE_VERSION__ < "u" ? __PACKAGE_VERSION__ : "0.0.0-test", DS = E({
25101
25101
  access_token: w(),
25102
25102
  id_token: w().optional(),
25103
25103
  // Optional for OAuth 2.1, but necessary in OpenID Connect
@@ -25486,7 +25486,7 @@ async function z4(e, {
25486
25486
  });
25487
25487
  if (!h.ok)
25488
25488
  throw await ud(h);
25489
- return MS.parse(await h.json());
25489
+ return DS.parse(await h.json());
25490
25490
  }
25491
25491
  async function j4(e, {
25492
25492
  metadata: t,
@@ -25529,12 +25529,12 @@ async function j4(e, {
25529
25529
  });
25530
25530
  if (!p.ok)
25531
25531
  throw await ud(p);
25532
- return MS.parse({
25532
+ return DS.parse({
25533
25533
  refresh_token: o,
25534
25534
  ...await p.json()
25535
25535
  });
25536
25536
  }
25537
- async function D4(e, {
25537
+ async function M4(e, {
25538
25538
  metadata: t,
25539
25539
  clientMetadata: n,
25540
25540
  fetchFn: o
@@ -25571,7 +25571,7 @@ async function Hi(e, t) {
25571
25571
  throw r;
25572
25572
  }
25573
25573
  }
25574
- async function M4(e, t, n) {
25574
+ async function D4(e, t, n) {
25575
25575
  const o = S4(e);
25576
25576
  if (t.validateResourceURL)
25577
25577
  return await t.validateResourceURL(
@@ -25606,7 +25606,7 @@ async function Ks(e, {
25606
25606
  } catch {
25607
25607
  }
25608
25608
  s || (s = t);
25609
- const l = await M4(
25609
+ const l = await D4(
25610
25610
  t,
25611
25611
  e,
25612
25612
  a
@@ -25626,7 +25626,7 @@ async function Ks(e, {
25626
25626
  throw new Error(
25627
25627
  "OAuth client information must be saveable for dynamic registration"
25628
25628
  );
25629
- const m = await D4(s, {
25629
+ const m = await M4(s, {
25630
25630
  metadata: u,
25631
25631
  clientMetadata: e.clientMetadata,
25632
25632
  fetchFn: i
@@ -25697,7 +25697,7 @@ var U4 = class {
25697
25697
  }
25698
25698
  return ES(
25699
25699
  t,
25700
- `ai-sdk/${DS}`,
25700
+ `ai-sdk/${MS}`,
25701
25701
  kS()
25702
25702
  );
25703
25703
  }
@@ -25759,7 +25759,7 @@ var U4 = class {
25759
25759
  this.connected = !0, e();
25760
25760
  } else if (S === "message")
25761
25761
  try {
25762
- const k = Mn.parse(
25762
+ const k = Dn.parse(
25763
25763
  JSON.parse(v)
25764
25764
  );
25765
25765
  (h = this.onmessage) == null || h.call(this, k);
@@ -25865,7 +25865,7 @@ var U4 = class {
25865
25865
  }
25866
25866
  return ES(
25867
25867
  t,
25868
- `ai-sdk/${DS}`,
25868
+ `ai-sdk/${MS}`,
25869
25869
  kS()
25870
25870
  );
25871
25871
  }
@@ -25934,7 +25934,7 @@ var U4 = class {
25934
25934
  }
25935
25935
  const h = p.headers.get("content-type") || "";
25936
25936
  if (h.includes("application/json")) {
25937
- const b = await p.json(), y = Array.isArray(b) ? b.map(($) => Mn.parse($)) : [Mn.parse(b)];
25937
+ const b = await p.json(), y = Array.isArray(b) ? b.map(($) => Dn.parse($)) : [Dn.parse(b)];
25938
25938
  for (const $ of y) (a = this.onmessage) == null || a.call(this, $);
25939
25939
  return;
25940
25940
  }
@@ -25952,10 +25952,10 @@ var U4 = class {
25952
25952
  for (; ; ) {
25953
25953
  const { done: T, value: I } = await y.read();
25954
25954
  if (T) return;
25955
- const { event: O, data: D } = I;
25955
+ const { event: O, data: z } = I;
25956
25956
  if (O === "message")
25957
25957
  try {
25958
- const L = Mn.parse(JSON.parse(D));
25958
+ const L = Dn.parse(JSON.parse(z));
25959
25959
  (S = this.onmessage) == null || S.call(this, L);
25960
25960
  } catch (L) {
25961
25961
  const te = new ae({
@@ -26060,7 +26060,7 @@ var U4 = class {
26060
26060
  const { event: v, data: k, id: T } = S;
26061
26061
  if (T && (this.lastInboundEventId = T), v === "message")
26062
26062
  try {
26063
- const I = Mn.parse(JSON.parse(k));
26063
+ const I = Dn.parse(JSON.parse(k));
26064
26064
  (h = this.onmessage) == null || h.call(this, I);
26065
26065
  } catch (I) {
26066
26066
  const O = new ae({
@@ -26527,7 +26527,7 @@ function J4({
26527
26527
  });
26528
26528
  return xS({
26529
26529
  queryKey: ["mcpTools", t, n, r],
26530
- queryFn: async () => (Dx(r, "No session found"), await (await V4({
26530
+ queryFn: async () => (Mx(r, "No session found"), await (await V4({
26531
26531
  name: "gram-elements-mcp-client",
26532
26532
  transport: {
26533
26533
  type: "http",
@@ -26577,7 +26577,7 @@ const Q4 = ({
26577
26577
  t.model?.defaultModel ?? Nm[0]
26578
26578
  ), [a, s] = Ae(
26579
26579
  t.modal?.defaultExpanded ?? !1
26580
- ), [l, u] = Ae(t.modal?.defaultOpen), c = t.plugins ?? Mx, d = K4(
26580
+ ), [l, u] = Ae(t.modal?.defaultOpen), c = t.plugins ?? Dx, d = K4(
26581
26581
  t.systemPrompt,
26582
26582
  c
26583
26583
  ), { data: p, isLoading: f } = J4({
@@ -26588,13 +26588,14 @@ const Q4 = ({
26588
26588
  }), h = !p || f, m = Ut(
26589
26589
  () => ({
26590
26590
  sendMessages: async ({ messages: y, abortSignal: $ }) => {
26591
+ const S = !!t.languageModel;
26591
26592
  if (!o)
26592
26593
  throw new Error("No session found");
26593
26594
  if (f || !p)
26594
26595
  throw new Error("MCP tools are still being discovered");
26595
- const S = b.thread.getModelContext(), v = Wz(
26596
- Hz(S?.tools ?? {})
26597
- ), k = e$({
26596
+ const v = b.thread.getModelContext(), k = Wz(
26597
+ Hz(v?.tools ?? {})
26598
+ ), T = S ? null : e$({
26598
26599
  baseURL: H4,
26599
26600
  apiKey: "unused, but must be set",
26600
26601
  headers: {
@@ -26602,24 +26603,41 @@ const Q4 = ({
26602
26603
  "Gram-Chat-Session": o
26603
26604
  }
26604
26605
  });
26605
- return Mz({
26606
- system: d,
26607
- model: k.chat(r),
26608
- messages: Zz(y),
26609
- tools: {
26610
- ...p,
26611
- ...l1(v)
26612
- },
26613
- stopWhen: lS(10),
26614
- experimental_transform: Jz({ delayInMs: 15 }),
26615
- abortSignal: $
26616
- }).toUIMessageStream();
26606
+ t.languageModel && console.log("Using custom language model", t.languageModel);
26607
+ const I = {
26608
+ ...p,
26609
+ ...l1(k)
26610
+ }, O = t.languageModel ? t.languageModel : T.chat(r);
26611
+ try {
26612
+ return Dz({
26613
+ system: d,
26614
+ model: O,
26615
+ messages: Zz(y),
26616
+ tools: I,
26617
+ stopWhen: lS(10),
26618
+ experimental_transform: Jz({ delayInMs: 15 }),
26619
+ abortSignal: $,
26620
+ onError: ({ error: L }) => {
26621
+ console.error("Stream error in onError callback:", L);
26622
+ }
26623
+ }).toUIMessageStream();
26624
+ } catch (z) {
26625
+ throw console.error("Error creating stream:", z), z;
26626
+ }
26617
26627
  },
26618
26628
  reconnectToStream: async () => {
26619
26629
  throw new Error("Stream reconnection not supported");
26620
26630
  }
26621
26631
  }),
26622
- [t, r, d, o, p, f]
26632
+ [
26633
+ t,
26634
+ t.languageModel,
26635
+ r,
26636
+ d,
26637
+ o,
26638
+ p,
26639
+ f
26640
+ ]
26623
26641
  ), b = u1({
26624
26642
  transport: m
26625
26643
  });
@@ -26672,18 +26690,18 @@ function Ye(...e) {
26672
26690
  return _.useCallback(ld(...e), e);
26673
26691
  }
26674
26692
  var X4 = Symbol.for("react.lazy"), Gi = _[" use ".trim().toString()];
26675
- function eD(e) {
26693
+ function eM(e) {
26676
26694
  return typeof e == "object" && e !== null && "then" in e;
26677
26695
  }
26678
26696
  function qS(e) {
26679
- return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === X4 && "_payload" in e && eD(e._payload);
26697
+ return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === X4 && "_payload" in e && eM(e._payload);
26680
26698
  }
26681
26699
  // @__NO_SIDE_EFFECTS__
26682
26700
  function VS(e) {
26683
- const t = /* @__PURE__ */ rD(e), n = _.forwardRef((o, r) => {
26701
+ const t = /* @__PURE__ */ rM(e), n = _.forwardRef((o, r) => {
26684
26702
  let { children: i, ...a } = o;
26685
26703
  qS(i) && typeof Gi == "function" && (i = Gi(i._payload));
26686
- const s = _.Children.toArray(i), l = s.find(iD);
26704
+ const s = _.Children.toArray(i), l = s.find(iM);
26687
26705
  if (l) {
26688
26706
  const u = l.props.children, c = s.map((d) => d === l ? _.Children.count(u) > 1 ? _.Children.only(null) : _.isValidElement(u) ? u.props.children : null : d);
26689
26707
  return /* @__PURE__ */ g(t, { ...a, ref: r, children: _.isValidElement(u) ? _.cloneElement(u, void 0, c) : null });
@@ -26692,13 +26710,13 @@ function VS(e) {
26692
26710
  });
26693
26711
  return n.displayName = `${e}.Slot`, n;
26694
26712
  }
26695
- var tD = /* @__PURE__ */ VS("Slot");
26713
+ var tM = /* @__PURE__ */ VS("Slot");
26696
26714
  // @__NO_SIDE_EFFECTS__
26697
- function rD(e) {
26715
+ function rM(e) {
26698
26716
  const t = _.forwardRef((n, o) => {
26699
26717
  let { children: r, ...i } = n;
26700
26718
  if (qS(r) && typeof Gi == "function" && (r = Gi(r._payload)), _.isValidElement(r)) {
26701
- const a = sD(r), s = aD(i, r.props);
26719
+ const a = sM(r), s = aM(i, r.props);
26702
26720
  return r.type !== _.Fragment && (s.ref = o ? ld(o, a) : a), _.cloneElement(r, s);
26703
26721
  }
26704
26722
  return _.Children.count(r) > 1 ? _.Children.only(null) : null;
@@ -26707,15 +26725,15 @@ function rD(e) {
26707
26725
  }
26708
26726
  var BS = Symbol("radix.slottable");
26709
26727
  // @__NO_SIDE_EFFECTS__
26710
- function nD(e) {
26728
+ function nM(e) {
26711
26729
  const t = ({ children: n }) => /* @__PURE__ */ g(Fn, { children: n });
26712
26730
  return t.displayName = `${e}.Slottable`, t.__radixId = BS, t;
26713
26731
  }
26714
- var oD = /* @__PURE__ */ nD("Slottable");
26715
- function iD(e) {
26732
+ var oM = /* @__PURE__ */ nM("Slottable");
26733
+ function iM(e) {
26716
26734
  return _.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === BS;
26717
26735
  }
26718
- function aD(e, t) {
26736
+ function aM(e, t) {
26719
26737
  const n = { ...t };
26720
26738
  for (const o in t) {
26721
26739
  const r = e[o], i = t[o];
@@ -26726,11 +26744,11 @@ function aD(e, t) {
26726
26744
  }
26727
26745
  return { ...e, ...n };
26728
26746
  }
26729
- function sD(e) {
26747
+ function sM(e) {
26730
26748
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
26731
26749
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
26732
26750
  }
26733
- const Gp = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Kp = Lx, uD = (e, t) => (n) => {
26751
+ const Gp = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Kp = Lx, uM = (e, t) => (n) => {
26734
26752
  var o;
26735
26753
  if (t?.variants == null) return Kp(e, n?.class, n?.className);
26736
26754
  const { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((u) => {
@@ -26759,7 +26777,7 @@ const Gp = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Kp = Lx, u
26759
26777
  ] : u;
26760
26778
  }, []);
26761
26779
  return Kp(e, a, l, n?.class, n?.className);
26762
- }, lD = uD(
26780
+ }, lM = uM(
26763
26781
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
26764
26782
  {
26765
26783
  variants: {
@@ -26786,10 +26804,10 @@ const Gp = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Kp = Lx, u
26786
26804
  }
26787
26805
  }
26788
26806
  ), Zt = _.forwardRef(({ className: e, variant: t, size: n, asChild: o = !1, ...r }, i) => /* @__PURE__ */ g(
26789
- o ? tD : "button",
26807
+ o ? tM : "button",
26790
26808
  {
26791
26809
  "data-slot": "button",
26792
- className: j(lD({ variant: t, size: n, className: e })),
26810
+ className: M(lM({ variant: t, size: n, className: e })),
26793
26811
  ref: i,
26794
26812
  ...r
26795
26813
  }
@@ -26801,7 +26819,7 @@ function Te(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
26801
26819
  return t?.(r);
26802
26820
  };
26803
26821
  }
26804
- function cD(e, t) {
26822
+ function cM(e, t) {
26805
26823
  const n = _.createContext(t), o = (i) => {
26806
26824
  const { children: a, ...s } = i, l = _.useMemo(() => s, Object.values(s));
26807
26825
  return /* @__PURE__ */ g(n.Provider, { value: l, children: a });
@@ -26843,9 +26861,9 @@ function qo(e, t = []) {
26843
26861
  );
26844
26862
  };
26845
26863
  };
26846
- return r.scopeName = e, [o, dD(r, ...t)];
26864
+ return r.scopeName = e, [o, dM(r, ...t)];
26847
26865
  }
26848
- function dD(...e) {
26866
+ function dM(...e) {
26849
26867
  const t = e[0];
26850
26868
  if (e.length === 1) return t;
26851
26869
  const n = () => {
@@ -26865,8 +26883,8 @@ function dD(...e) {
26865
26883
  }
26866
26884
  // @__NO_SIDE_EFFECTS__
26867
26885
  function cd(e) {
26868
- const t = /* @__PURE__ */ fD(e), n = _.forwardRef((o, r) => {
26869
- const { children: i, ...a } = o, s = _.Children.toArray(i), l = s.find(mD);
26886
+ const t = /* @__PURE__ */ fM(e), n = _.forwardRef((o, r) => {
26887
+ const { children: i, ...a } = o, s = _.Children.toArray(i), l = s.find(mM);
26870
26888
  if (l) {
26871
26889
  const u = l.props.children, c = s.map((d) => d === l ? _.Children.count(u) > 1 ? _.Children.only(null) : _.isValidElement(u) ? u.props.children : null : d);
26872
26890
  return /* @__PURE__ */ g(t, { ...a, ref: r, children: _.isValidElement(u) ? _.cloneElement(u, void 0, c) : null });
@@ -26876,11 +26894,11 @@ function cd(e) {
26876
26894
  return n.displayName = `${e}.Slot`, n;
26877
26895
  }
26878
26896
  // @__NO_SIDE_EFFECTS__
26879
- function fD(e) {
26897
+ function fM(e) {
26880
26898
  const t = _.forwardRef((n, o) => {
26881
26899
  const { children: r, ...i } = n;
26882
26900
  if (_.isValidElement(r)) {
26883
- const a = gD(r), s = hD(i, r.props);
26901
+ const a = gM(r), s = hM(i, r.props);
26884
26902
  return r.type !== _.Fragment && (s.ref = o ? ld(o, a) : a), _.cloneElement(r, s);
26885
26903
  }
26886
26904
  return _.Children.count(r) > 1 ? _.Children.only(null) : null;
@@ -26889,14 +26907,14 @@ function fD(e) {
26889
26907
  }
26890
26908
  var JS = Symbol("radix.slottable");
26891
26909
  // @__NO_SIDE_EFFECTS__
26892
- function pD(e) {
26910
+ function pM(e) {
26893
26911
  const t = ({ children: n }) => /* @__PURE__ */ g(Fn, { children: n });
26894
26912
  return t.displayName = `${e}.Slottable`, t.__radixId = JS, t;
26895
26913
  }
26896
- function mD(e) {
26914
+ function mM(e) {
26897
26915
  return _.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === JS;
26898
26916
  }
26899
- function hD(e, t) {
26917
+ function hM(e, t) {
26900
26918
  const n = { ...t };
26901
26919
  for (const o in t) {
26902
26920
  const r = e[o], i = t[o];
@@ -26907,11 +26925,11 @@ function hD(e, t) {
26907
26925
  }
26908
26926
  return { ...e, ...n };
26909
26927
  }
26910
- function gD(e) {
26928
+ function gM(e) {
26911
26929
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
26912
26930
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
26913
26931
  }
26914
- var vD = [
26932
+ var vM = [
26915
26933
  "a",
26916
26934
  "button",
26917
26935
  "div",
@@ -26929,14 +26947,14 @@ var vD = [
26929
26947
  "span",
26930
26948
  "svg",
26931
26949
  "ul"
26932
- ], Ce = vD.reduce((e, t) => {
26950
+ ], Ce = vM.reduce((e, t) => {
26933
26951
  const n = /* @__PURE__ */ cd(`Primitive.${t}`), o = _.forwardRef((r, i) => {
26934
26952
  const { asChild: a, ...s } = r, l = a ? n : t;
26935
26953
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ g(l, { ...s, ref: i });
26936
26954
  });
26937
26955
  return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
26938
26956
  }, {});
26939
- function yD(e, t) {
26957
+ function yM(e, t) {
26940
26958
  e && Tm.flushSync(() => e.dispatchEvent(t));
26941
26959
  }
26942
26960
  function Pr(e) {
@@ -26945,7 +26963,7 @@ function Pr(e) {
26945
26963
  t.current = e;
26946
26964
  }), _.useMemo(() => (...n) => t.current?.(...n), []);
26947
26965
  }
26948
- function bD(e, t = globalThis?.document) {
26966
+ function bM(e, t = globalThis?.document) {
26949
26967
  const n = Pr(e);
26950
26968
  _.useEffect(() => {
26951
26969
  const o = (r) => {
@@ -26954,7 +26972,7 @@ function bD(e, t = globalThis?.document) {
26954
26972
  return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
26955
26973
  }, [n, t]);
26956
26974
  }
26957
- var _D = "DismissableLayer", Fu = "dismissableLayer.update", wD = "dismissableLayer.pointerDownOutside", $D = "dismissableLayer.focusOutside", Yp, WS = _.createContext({
26975
+ var _M = "DismissableLayer", Fu = "dismissableLayer.update", wM = "dismissableLayer.pointerDownOutside", $M = "dismissableLayer.focusOutside", Yp, WS = _.createContext({
26958
26976
  layers: /* @__PURE__ */ new Set(),
26959
26977
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
26960
26978
  branches: /* @__PURE__ */ new Set()
@@ -26968,14 +26986,14 @@ var _D = "DismissableLayer", Fu = "dismissableLayer.update", wD = "dismissableLa
26968
26986
  onInteractOutside: a,
26969
26987
  onDismiss: s,
26970
26988
  ...l
26971
- } = e, u = _.useContext(WS), [c, d] = _.useState(null), p = c?.ownerDocument ?? globalThis?.document, [, f] = _.useState({}), h = Ye(t, (I) => d(I)), m = Array.from(u.layers), [b] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), y = m.indexOf(b), $ = c ? m.indexOf(c) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, v = $ >= y, k = ID((I) => {
26972
- const O = I.target, D = [...u.branches].some((L) => L.contains(O));
26973
- !v || D || (r?.(I), a?.(I), I.defaultPrevented || s?.());
26974
- }, p), T = kD((I) => {
26989
+ } = e, u = _.useContext(WS), [c, d] = _.useState(null), p = c?.ownerDocument ?? globalThis?.document, [, f] = _.useState({}), h = Ye(t, (I) => d(I)), m = Array.from(u.layers), [b] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), y = m.indexOf(b), $ = c ? m.indexOf(c) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, v = $ >= y, k = IM((I) => {
26990
+ const O = I.target, z = [...u.branches].some((L) => L.contains(O));
26991
+ !v || z || (r?.(I), a?.(I), I.defaultPrevented || s?.());
26992
+ }, p), T = kM((I) => {
26975
26993
  const O = I.target;
26976
26994
  [...u.branches].some((L) => L.contains(O)) || (i?.(I), a?.(I), I.defaultPrevented || s?.());
26977
26995
  }, p);
26978
- return bD((I) => {
26996
+ return bM((I) => {
26979
26997
  $ === u.layers.size - 1 && (o?.(I), !I.defaultPrevented && s && (I.preventDefault(), s()));
26980
26998
  }, p), _.useEffect(() => {
26981
26999
  if (c)
@@ -27006,8 +27024,8 @@ var _D = "DismissableLayer", Fu = "dismissableLayer.update", wD = "dismissableLa
27006
27024
  );
27007
27025
  }
27008
27026
  );
27009
- as.displayName = _D;
27010
- var SD = "DismissableLayerBranch", xD = _.forwardRef((e, t) => {
27027
+ as.displayName = _M;
27028
+ var SM = "DismissableLayerBranch", xM = _.forwardRef((e, t) => {
27011
27029
  const n = _.useContext(WS), o = _.useRef(null), r = Ye(t, o);
27012
27030
  return _.useEffect(() => {
27013
27031
  const i = o.current;
@@ -27017,8 +27035,8 @@ var SD = "DismissableLayerBranch", xD = _.forwardRef((e, t) => {
27017
27035
  };
27018
27036
  }, [n.branches]), /* @__PURE__ */ g(Ce.div, { ...e, ref: r });
27019
27037
  });
27020
- xD.displayName = SD;
27021
- function ID(e, t = globalThis?.document) {
27038
+ xM.displayName = SM;
27039
+ function IM(e, t = globalThis?.document) {
27022
27040
  const n = Pr(e), o = _.useRef(!1), r = _.useRef(() => {
27023
27041
  });
27024
27042
  return _.useEffect(() => {
@@ -27026,7 +27044,7 @@ function ID(e, t = globalThis?.document) {
27026
27044
  if (s.target && !o.current) {
27027
27045
  let l = function() {
27028
27046
  HS(
27029
- wD,
27047
+ wM,
27030
27048
  n,
27031
27049
  u,
27032
27050
  { discrete: !0 }
@@ -27048,11 +27066,11 @@ function ID(e, t = globalThis?.document) {
27048
27066
  onPointerDownCapture: () => o.current = !0
27049
27067
  };
27050
27068
  }
27051
- function kD(e, t = globalThis?.document) {
27069
+ function kM(e, t = globalThis?.document) {
27052
27070
  const n = Pr(e), o = _.useRef(!1);
27053
27071
  return _.useEffect(() => {
27054
27072
  const r = (i) => {
27055
- i.target && !o.current && HS($D, n, { originalEvent: i }, {
27073
+ i.target && !o.current && HS($M, n, { originalEvent: i }, {
27056
27074
  discrete: !1
27057
27075
  });
27058
27076
  };
@@ -27068,26 +27086,26 @@ function Qp() {
27068
27086
  }
27069
27087
  function HS(e, t, n, { discrete: o }) {
27070
27088
  const r = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
27071
- t && r.addEventListener(e, t, { once: !0 }), o ? yD(r, i) : r.dispatchEvent(i);
27089
+ t && r.addEventListener(e, t, { once: !0 }), o ? yM(r, i) : r.dispatchEvent(i);
27072
27090
  }
27073
27091
  var dt = globalThis?.document ? _.useLayoutEffect : () => {
27074
- }, ED = _[" useId ".trim().toString()] || (() => {
27075
- }), OD = 0;
27092
+ }, EM = _[" useId ".trim().toString()] || (() => {
27093
+ }), OM = 0;
27076
27094
  function Yr(e) {
27077
- const [t, n] = _.useState(ED());
27095
+ const [t, n] = _.useState(EM());
27078
27096
  return dt(() => {
27079
- n((o) => o ?? String(OD++));
27097
+ n((o) => o ?? String(OM++));
27080
27098
  }, [e]), t ? `radix-${t}` : "";
27081
27099
  }
27082
- const TD = ["top", "right", "bottom", "left"], hr = Math.min, Xe = Math.max, Ki = Math.round, si = Math.floor, Mt = (e) => ({
27100
+ const TM = ["top", "right", "bottom", "left"], hr = Math.min, Xe = Math.max, Ki = Math.round, si = Math.floor, Dt = (e) => ({
27083
27101
  x: e,
27084
27102
  y: e
27085
- }), ND = {
27103
+ }), NM = {
27086
27104
  left: "right",
27087
27105
  right: "left",
27088
27106
  bottom: "top",
27089
27107
  top: "bottom"
27090
- }, PD = {
27108
+ }, PM = {
27091
27109
  start: "end",
27092
27110
  end: "start"
27093
27111
  };
@@ -27109,48 +27127,48 @@ function dd(e) {
27109
27127
  function fd(e) {
27110
27128
  return e === "y" ? "height" : "width";
27111
27129
  }
27112
- const CD = /* @__PURE__ */ new Set(["top", "bottom"]);
27113
- function Dt(e) {
27114
- return CD.has(er(e)) ? "y" : "x";
27130
+ const CM = /* @__PURE__ */ new Set(["top", "bottom"]);
27131
+ function Mt(e) {
27132
+ return CM.has(er(e)) ? "y" : "x";
27115
27133
  }
27116
27134
  function pd(e) {
27117
- return dd(Dt(e));
27135
+ return dd(Mt(e));
27118
27136
  }
27119
- function AD(e, t, n) {
27137
+ function AM(e, t, n) {
27120
27138
  n === void 0 && (n = !1);
27121
27139
  const o = _n(e), r = pd(e), i = fd(r);
27122
27140
  let a = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
27123
27141
  return t.reference[i] > t.floating[i] && (a = Yi(a)), [a, Yi(a)];
27124
27142
  }
27125
- function RD(e) {
27143
+ function RM(e) {
27126
27144
  const t = Yi(e);
27127
27145
  return [Vu(e), t, Vu(t)];
27128
27146
  }
27129
27147
  function Vu(e) {
27130
- return e.replace(/start|end/g, (t) => PD[t]);
27148
+ return e.replace(/start|end/g, (t) => PM[t]);
27131
27149
  }
27132
- const Xp = ["left", "right"], em = ["right", "left"], zD = ["top", "bottom"], jD = ["bottom", "top"];
27133
- function DD(e, t, n) {
27150
+ const Xp = ["left", "right"], em = ["right", "left"], zM = ["top", "bottom"], jM = ["bottom", "top"];
27151
+ function MM(e, t, n) {
27134
27152
  switch (e) {
27135
27153
  case "top":
27136
27154
  case "bottom":
27137
27155
  return n ? t ? em : Xp : t ? Xp : em;
27138
27156
  case "left":
27139
27157
  case "right":
27140
- return t ? zD : jD;
27158
+ return t ? zM : jM;
27141
27159
  default:
27142
27160
  return [];
27143
27161
  }
27144
27162
  }
27145
- function MD(e, t, n, o) {
27163
+ function DM(e, t, n, o) {
27146
27164
  const r = _n(e);
27147
- let i = DD(er(e), n === "start", o);
27165
+ let i = MM(er(e), n === "start", o);
27148
27166
  return r && (i = i.map((a) => a + "-" + r), t && (i = i.concat(i.map(Vu)))), i;
27149
27167
  }
27150
27168
  function Yi(e) {
27151
- return e.replace(/left|right|bottom|top/g, (t) => ND[t]);
27169
+ return e.replace(/left|right|bottom|top/g, (t) => NM[t]);
27152
27170
  }
27153
- function UD(e) {
27171
+ function UM(e) {
27154
27172
  return {
27155
27173
  top: 0,
27156
27174
  right: 0,
@@ -27160,7 +27178,7 @@ function UD(e) {
27160
27178
  };
27161
27179
  }
27162
27180
  function GS(e) {
27163
- return typeof e != "number" ? UD(e) : {
27181
+ return typeof e != "number" ? UM(e) : {
27164
27182
  top: e,
27165
27183
  right: e,
27166
27184
  bottom: e,
@@ -27190,7 +27208,7 @@ function tm(e, t, n) {
27190
27208
  reference: o,
27191
27209
  floating: r
27192
27210
  } = e;
27193
- const i = Dt(t), a = pd(t), s = fd(a), l = er(t), u = i === "y", c = o.x + o.width / 2 - r.width / 2, d = o.y + o.height / 2 - r.height / 2, p = o[s] / 2 - r[s] / 2;
27211
+ const i = Mt(t), a = pd(t), s = fd(a), l = er(t), u = i === "y", c = o.x + o.width / 2 - r.width / 2, d = o.y + o.height / 2 - r.height / 2, p = o[s] / 2 - r[s] / 2;
27194
27212
  let f;
27195
27213
  switch (l) {
27196
27214
  case "top":
@@ -27233,7 +27251,7 @@ function tm(e, t, n) {
27233
27251
  }
27234
27252
  return f;
27235
27253
  }
27236
- const LD = async (e, t, n) => {
27254
+ const LM = async (e, t, n) => {
27237
27255
  const {
27238
27256
  placement: o = "bottom",
27239
27257
  strategy: r = "absolute",
@@ -27339,7 +27357,7 @@ async function uo(e, t) {
27339
27357
  right: (k.right - y.right + h.right) / v.x
27340
27358
  };
27341
27359
  }
27342
- const ZD = (e) => ({
27360
+ const ZM = (e) => ({
27343
27361
  name: "arrow",
27344
27362
  options: e,
27345
27363
  async fn(t) {
@@ -27363,7 +27381,7 @@ const ZD = (e) => ({
27363
27381
  }, f = pd(r), h = fd(f), m = await a.getDimensions(u), b = f === "y", y = b ? "top" : "left", $ = b ? "bottom" : "right", S = b ? "clientHeight" : "clientWidth", v = i.reference[h] + i.reference[f] - p[f] - i.floating[h], k = p[f] - i.reference[f], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(u));
27364
27382
  let I = T ? T[S] : 0;
27365
27383
  (!I || !await (a.isElement == null ? void 0 : a.isElement(T))) && (I = s.floating[S] || i.floating[h]);
27366
- const O = v / 2 - k / 2, D = I / 2 - m[h] / 2 - 1, L = hr(d[y], D), te = hr(d[$], D), ge = L, H = I - m[h] - te, F = I / 2 - m[h] / 2 + O, _e = qu(ge, F, H), ne = !l.arrow && _n(r) != null && F !== _e && i.reference[h] / 2 - (F < ge ? L : te) - m[h] / 2 < 0, le = ne ? F < ge ? F - ge : F - H : 0;
27384
+ const O = v / 2 - k / 2, z = I / 2 - m[h] / 2 - 1, L = hr(d[y], z), te = hr(d[$], z), ge = L, H = I - m[h] - te, F = I / 2 - m[h] / 2 + O, _e = qu(ge, F, H), ne = !l.arrow && _n(r) != null && F !== _e && i.reference[h] / 2 - (F < ge ? L : te) - m[h] / 2 < 0, le = ne ? F < ge ? F - ge : F - H : 0;
27367
27385
  return {
27368
27386
  [f]: p[f] + le,
27369
27387
  data: {
@@ -27376,7 +27394,7 @@ const ZD = (e) => ({
27376
27394
  reset: ne
27377
27395
  };
27378
27396
  }
27379
- }), FD = function(e) {
27397
+ }), FM = function(e) {
27380
27398
  return e === void 0 && (e = {}), {
27381
27399
  name: "flip",
27382
27400
  options: e,
@@ -27400,23 +27418,23 @@ const ZD = (e) => ({
27400
27418
  } = Xt(e, t);
27401
27419
  if ((n = i.arrow) != null && n.alignmentOffset)
27402
27420
  return {};
27403
- const y = er(r), $ = Dt(s), S = er(s) === s, v = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), k = p || (S || !m ? [Yi(s)] : RD(s)), T = h !== "none";
27404
- !p && T && k.push(...MD(s, m, h, v));
27405
- const I = [s, ...k], O = await uo(t, b), D = [];
27421
+ const y = er(r), $ = Mt(s), S = er(s) === s, v = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), k = p || (S || !m ? [Yi(s)] : RM(s)), T = h !== "none";
27422
+ !p && T && k.push(...DM(s, m, h, v));
27423
+ const I = [s, ...k], O = await uo(t, b), z = [];
27406
27424
  let L = ((o = i.flip) == null ? void 0 : o.overflows) || [];
27407
- if (c && D.push(O[y]), d) {
27408
- const F = AD(r, a, v);
27409
- D.push(O[F[0]], O[F[1]]);
27425
+ if (c && z.push(O[y]), d) {
27426
+ const F = AM(r, a, v);
27427
+ z.push(O[F[0]], O[F[1]]);
27410
27428
  }
27411
27429
  if (L = [...L, {
27412
27430
  placement: r,
27413
- overflows: D
27414
- }], !D.every((F) => F <= 0)) {
27431
+ overflows: z
27432
+ }], !z.every((F) => F <= 0)) {
27415
27433
  var te, ge;
27416
27434
  const F = (((te = i.flip) == null ? void 0 : te.index) || 0) + 1, _e = I[F];
27417
- if (_e && (!(d === "alignment" ? $ !== Dt(_e) : !1) || // We leave the current main axis only if every placement on that axis
27435
+ if (_e && (!(d === "alignment" ? $ !== Mt(_e) : !1) || // We leave the current main axis only if every placement on that axis
27418
27436
  // overflows the main axis.
27419
- L.every((G) => Dt(G.placement) === $ ? G.overflows[0] > 0 : !0)))
27437
+ L.every((G) => Mt(G.placement) === $ ? G.overflows[0] > 0 : !0)))
27420
27438
  return {
27421
27439
  data: {
27422
27440
  index: F,
@@ -27433,7 +27451,7 @@ const ZD = (e) => ({
27433
27451
  var H;
27434
27452
  const le = (H = L.filter((G) => {
27435
27453
  if (T) {
27436
- const de = Dt(G.placement);
27454
+ const de = Mt(G.placement);
27437
27455
  return de === $ || // Create a bias to the `y` side axis due to horizontal
27438
27456
  // reading directions favoring greater width.
27439
27457
  de === "y";
@@ -27467,9 +27485,9 @@ function rm(e, t) {
27467
27485
  };
27468
27486
  }
27469
27487
  function nm(e) {
27470
- return TD.some((t) => e[t] >= 0);
27488
+ return TM.some((t) => e[t] >= 0);
27471
27489
  }
27472
- const qD = function(e) {
27490
+ const qM = function(e) {
27473
27491
  return e === void 0 && (e = {}), {
27474
27492
  name: "hide",
27475
27493
  options: e,
@@ -27511,12 +27529,12 @@ const qD = function(e) {
27511
27529
  }
27512
27530
  };
27513
27531
  }, KS = /* @__PURE__ */ new Set(["left", "top"]);
27514
- async function VD(e, t) {
27532
+ async function VM(e, t) {
27515
27533
  const {
27516
27534
  placement: n,
27517
27535
  platform: o,
27518
27536
  elements: r
27519
- } = e, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), a = er(n), s = _n(n), l = Dt(n) === "y", u = KS.has(a) ? -1 : 1, c = i && l ? -1 : 1, d = Xt(t, e);
27537
+ } = e, i = await (o.isRTL == null ? void 0 : o.isRTL(r.floating)), a = er(n), s = _n(n), l = Mt(n) === "y", u = KS.has(a) ? -1 : 1, c = i && l ? -1 : 1, d = Xt(t, e);
27520
27538
  let {
27521
27539
  mainAxis: p,
27522
27540
  crossAxis: f,
@@ -27538,7 +27556,7 @@ async function VD(e, t) {
27538
27556
  y: f * c
27539
27557
  };
27540
27558
  }
27541
- const BD = function(e) {
27559
+ const BM = function(e) {
27542
27560
  return e === void 0 && (e = 0), {
27543
27561
  name: "offset",
27544
27562
  options: e,
@@ -27549,7 +27567,7 @@ const BD = function(e) {
27549
27567
  y: i,
27550
27568
  placement: a,
27551
27569
  middlewareData: s
27552
- } = t, l = await VD(t, e);
27570
+ } = t, l = await VM(t, e);
27553
27571
  return a === ((n = s.offset) == null ? void 0 : n.placement) && (o = s.arrow) != null && o.alignmentOffset ? {} : {
27554
27572
  x: r + l.x,
27555
27573
  y: i + l.y,
@@ -27560,7 +27578,7 @@ const BD = function(e) {
27560
27578
  };
27561
27579
  }
27562
27580
  };
27563
- }, JD = function(e) {
27581
+ }, JM = function(e) {
27564
27582
  return e === void 0 && (e = {}), {
27565
27583
  name: "shift",
27566
27584
  options: e,
@@ -27588,7 +27606,7 @@ const BD = function(e) {
27588
27606
  } = Xt(e, t), u = {
27589
27607
  x: n,
27590
27608
  y: o
27591
- }, c = await uo(t, l), d = Dt(er(r)), p = dd(d);
27609
+ }, c = await uo(t, l), d = Mt(er(r)), p = dd(d);
27592
27610
  let f = u[p], h = u[d];
27593
27611
  if (i) {
27594
27612
  const b = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", $ = f + c[b], S = f - c[y];
@@ -27616,7 +27634,7 @@ const BD = function(e) {
27616
27634
  };
27617
27635
  }
27618
27636
  };
27619
- }, WD = function(e) {
27637
+ }, WM = function(e) {
27620
27638
  return e === void 0 && (e = {}), {
27621
27639
  options: e,
27622
27640
  fn(t) {
@@ -27633,7 +27651,7 @@ const BD = function(e) {
27633
27651
  } = Xt(e, t), c = {
27634
27652
  x: n,
27635
27653
  y: o
27636
- }, d = Dt(r), p = dd(d);
27654
+ }, d = Mt(r), p = dd(d);
27637
27655
  let f = c[p], h = c[d];
27638
27656
  const m = Xt(s, t), b = typeof m == "number" ? {
27639
27657
  mainAxis: m,
@@ -27658,7 +27676,7 @@ const BD = function(e) {
27658
27676
  };
27659
27677
  }
27660
27678
  };
27661
- }, HD = function(e) {
27679
+ }, HM = function(e) {
27662
27680
  return e === void 0 && (e = {}), {
27663
27681
  name: "size",
27664
27682
  options: e,
@@ -27673,7 +27691,7 @@ const BD = function(e) {
27673
27691
  apply: l = () => {
27674
27692
  },
27675
27693
  ...u
27676
- } = Xt(e, t), c = await uo(t, u), d = er(r), p = _n(r), f = Dt(r) === "y", {
27694
+ } = Xt(e, t), c = await uo(t, u), d = er(r), p = _n(r), f = Mt(r) === "y", {
27677
27695
  width: h,
27678
27696
  height: m
27679
27697
  } = i.floating;
@@ -27690,8 +27708,8 @@ const BD = function(e) {
27690
27708
  availableWidth: O,
27691
27709
  availableHeight: I
27692
27710
  });
27693
- const D = await a.getDimensions(s.floating);
27694
- return h !== D.width || m !== D.height ? {
27711
+ const z = await a.getDimensions(s.floating);
27712
+ return h !== z.width || m !== z.height ? {
27695
27713
  reset: {
27696
27714
  rects: !0
27697
27715
  }
@@ -27725,7 +27743,7 @@ function Ft(e) {
27725
27743
  function om(e) {
27726
27744
  return !ss() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof et(e).ShadowRoot;
27727
27745
  }
27728
- const GD = /* @__PURE__ */ new Set(["inline", "contents"]);
27746
+ const GM = /* @__PURE__ */ new Set(["inline", "contents"]);
27729
27747
  function Vo(e) {
27730
27748
  const {
27731
27749
  overflow: t,
@@ -27733,15 +27751,15 @@ function Vo(e) {
27733
27751
  overflowY: o,
27734
27752
  display: r
27735
27753
  } = Et(e);
27736
- return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !GD.has(r);
27754
+ return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !GM.has(r);
27737
27755
  }
27738
- const KD = /* @__PURE__ */ new Set(["table", "td", "th"]);
27739
- function YD(e) {
27740
- return KD.has(wn(e));
27756
+ const KM = /* @__PURE__ */ new Set(["table", "td", "th"]);
27757
+ function YM(e) {
27758
+ return KM.has(wn(e));
27741
27759
  }
27742
- const QD = [":popover-open", ":modal"];
27760
+ const QM = [":popover-open", ":modal"];
27743
27761
  function us(e) {
27744
- return QD.some((t) => {
27762
+ return QM.some((t) => {
27745
27763
  try {
27746
27764
  return e.matches(t);
27747
27765
  } catch {
@@ -27749,12 +27767,12 @@ function us(e) {
27749
27767
  }
27750
27768
  });
27751
27769
  }
27752
- const XD = ["transform", "translate", "scale", "rotate", "perspective"], eM = ["transform", "translate", "scale", "rotate", "perspective", "filter"], tM = ["paint", "layout", "strict", "content"];
27770
+ const XM = ["transform", "translate", "scale", "rotate", "perspective"], eD = ["transform", "translate", "scale", "rotate", "perspective", "filter"], tD = ["paint", "layout", "strict", "content"];
27753
27771
  function md(e) {
27754
27772
  const t = hd(), n = kt(e) ? Et(e) : e;
27755
- return XD.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || eM.some((o) => (n.willChange || "").includes(o)) || tM.some((o) => (n.contain || "").includes(o));
27773
+ return XM.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || eD.some((o) => (n.willChange || "").includes(o)) || tD.some((o) => (n.contain || "").includes(o));
27756
27774
  }
27757
- function rM(e) {
27775
+ function rD(e) {
27758
27776
  let t = gr(e);
27759
27777
  for (; Ft(t) && !fn(t); ) {
27760
27778
  if (md(t))
@@ -27768,9 +27786,9 @@ function rM(e) {
27768
27786
  function hd() {
27769
27787
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
27770
27788
  }
27771
- const nM = /* @__PURE__ */ new Set(["html", "body", "#document"]);
27789
+ const nD = /* @__PURE__ */ new Set(["html", "body", "#document"]);
27772
27790
  function fn(e) {
27773
- return nM.has(wn(e));
27791
+ return nD.has(wn(e));
27774
27792
  }
27775
27793
  function Et(e) {
27776
27794
  return et(e).getComputedStyle(e);
@@ -27829,7 +27847,7 @@ function gd(e) {
27829
27847
  function Qr(e) {
27830
27848
  const t = gd(e);
27831
27849
  if (!Ft(t))
27832
- return Mt(1);
27850
+ return Dt(1);
27833
27851
  const n = t.getBoundingClientRect(), {
27834
27852
  width: o,
27835
27853
  height: r,
@@ -27841,23 +27859,23 @@ function Qr(e) {
27841
27859
  y: s
27842
27860
  };
27843
27861
  }
27844
- const oM = /* @__PURE__ */ Mt(0);
27862
+ const oD = /* @__PURE__ */ Dt(0);
27845
27863
  function e0(e) {
27846
27864
  const t = et(e);
27847
- return !hd() || !t.visualViewport ? oM : {
27865
+ return !hd() || !t.visualViewport ? oD : {
27848
27866
  x: t.visualViewport.offsetLeft,
27849
27867
  y: t.visualViewport.offsetTop
27850
27868
  };
27851
27869
  }
27852
- function iM(e, t, n) {
27870
+ function iD(e, t, n) {
27853
27871
  return t === void 0 && (t = !1), !n || t && n !== et(e) ? !1 : t;
27854
27872
  }
27855
27873
  function Cr(e, t, n, o) {
27856
27874
  t === void 0 && (t = !1), n === void 0 && (n = !1);
27857
27875
  const r = e.getBoundingClientRect(), i = gd(e);
27858
- let a = Mt(1);
27876
+ let a = Dt(1);
27859
27877
  t && (o ? kt(o) && (a = Qr(o)) : a = Qr(e));
27860
- const s = iM(i, n, o) ? e0(i) : Mt(0);
27878
+ const s = iD(i, n, o) ? e0(i) : Dt(0);
27861
27879
  let l = (r.left + s.x) / a.x, u = (r.top + s.y) / a.y, c = r.width / a.x, d = r.height / a.y;
27862
27880
  if (i) {
27863
27881
  const p = et(i), f = o && kt(o) ? et(o) : o;
@@ -27889,7 +27907,7 @@ function t0(e, t, n) {
27889
27907
  y: i
27890
27908
  };
27891
27909
  }
27892
- function aM(e) {
27910
+ function aD(e) {
27893
27911
  let {
27894
27912
  elements: t,
27895
27913
  rect: n,
@@ -27902,13 +27920,13 @@ function aM(e) {
27902
27920
  let l = {
27903
27921
  scrollLeft: 0,
27904
27922
  scrollTop: 0
27905
- }, u = Mt(1);
27906
- const c = Mt(0), d = Ft(o);
27923
+ }, u = Dt(1);
27924
+ const c = Dt(0), d = Ft(o);
27907
27925
  if ((d || !d && !i) && ((wn(o) !== "body" || Vo(a)) && (l = ls(o)), Ft(o))) {
27908
27926
  const f = Cr(o);
27909
27927
  u = Qr(o), c.x = f.x + o.clientLeft, c.y = f.y + o.clientTop;
27910
27928
  }
27911
- const p = a && !d && !i ? t0(a, l, !0) : Mt(0);
27929
+ const p = a && !d && !i ? t0(a, l, !0) : Dt(0);
27912
27930
  return {
27913
27931
  width: n.width * u.x,
27914
27932
  height: n.height * u.y,
@@ -27916,10 +27934,10 @@ function aM(e) {
27916
27934
  y: n.y * u.y - l.scrollTop * u.y + c.y + p.y
27917
27935
  };
27918
27936
  }
27919
- function sM(e) {
27937
+ function sD(e) {
27920
27938
  return Array.from(e.getClientRects());
27921
27939
  }
27922
- function uM(e) {
27940
+ function uD(e) {
27923
27941
  const t = Vt(e), n = ls(e), o = e.ownerDocument.body, r = Xe(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = Xe(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
27924
27942
  let a = -n.scrollLeft + vd(e);
27925
27943
  const s = -n.scrollTop;
@@ -27930,7 +27948,7 @@ function uM(e) {
27930
27948
  y: s
27931
27949
  };
27932
27950
  }
27933
- function lM(e, t) {
27951
+ function lD(e, t) {
27934
27952
  const n = et(e), o = Vt(e), r = n.visualViewport;
27935
27953
  let i = o.clientWidth, a = o.clientHeight, s = 0, l = 0;
27936
27954
  if (r) {
@@ -27945,9 +27963,9 @@ function lM(e, t) {
27945
27963
  y: l
27946
27964
  };
27947
27965
  }
27948
- const cM = /* @__PURE__ */ new Set(["absolute", "fixed"]);
27949
- function dM(e, t) {
27950
- const n = Cr(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, i = Ft(e) ? Qr(e) : Mt(1), a = e.clientWidth * i.x, s = e.clientHeight * i.y, l = r * i.x, u = o * i.y;
27966
+ const cD = /* @__PURE__ */ new Set(["absolute", "fixed"]);
27967
+ function dD(e, t) {
27968
+ const n = Cr(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, i = Ft(e) ? Qr(e) : Dt(1), a = e.clientWidth * i.x, s = e.clientHeight * i.y, l = r * i.x, u = o * i.y;
27951
27969
  return {
27952
27970
  width: a,
27953
27971
  height: s,
@@ -27958,11 +27976,11 @@ function dM(e, t) {
27958
27976
  function im(e, t, n) {
27959
27977
  let o;
27960
27978
  if (t === "viewport")
27961
- o = lM(e, n);
27979
+ o = lD(e, n);
27962
27980
  else if (t === "document")
27963
- o = uM(Vt(e));
27981
+ o = uD(Vt(e));
27964
27982
  else if (kt(t))
27965
- o = dM(t, n);
27983
+ o = dD(t, n);
27966
27984
  else {
27967
27985
  const r = e0(e);
27968
27986
  o = {
@@ -27978,7 +27996,7 @@ function r0(e, t) {
27978
27996
  const n = gr(e);
27979
27997
  return n === t || !kt(n) || fn(n) ? !1 : Et(n).position === "fixed" || r0(n, t);
27980
27998
  }
27981
- function fM(e, t) {
27999
+ function fD(e, t) {
27982
28000
  const n = t.get(e);
27983
28001
  if (n)
27984
28002
  return n;
@@ -27987,18 +28005,18 @@ function fM(e, t) {
27987
28005
  let a = i ? gr(e) : e;
27988
28006
  for (; kt(a) && !fn(a); ) {
27989
28007
  const s = Et(a), l = md(a);
27990
- !l && s.position === "fixed" && (r = null), (i ? !l && !r : !l && s.position === "static" && !!r && cM.has(r.position) || Vo(a) && !l && r0(e, a)) ? o = o.filter((c) => c !== a) : r = s, a = gr(a);
28008
+ !l && s.position === "fixed" && (r = null), (i ? !l && !r : !l && s.position === "static" && !!r && cD.has(r.position) || Vo(a) && !l && r0(e, a)) ? o = o.filter((c) => c !== a) : r = s, a = gr(a);
27991
28009
  }
27992
28010
  return t.set(e, o), o;
27993
28011
  }
27994
- function pM(e) {
28012
+ function pD(e) {
27995
28013
  let {
27996
28014
  element: t,
27997
28015
  boundary: n,
27998
28016
  rootBoundary: o,
27999
28017
  strategy: r
28000
28018
  } = e;
28001
- const a = [...n === "clippingAncestors" ? us(t) ? [] : fM(t, this._c) : [].concat(n), o], s = a[0], l = a.reduce((u, c) => {
28019
+ const a = [...n === "clippingAncestors" ? us(t) ? [] : fD(t, this._c) : [].concat(n), o], s = a[0], l = a.reduce((u, c) => {
28002
28020
  const d = im(t, c, r);
28003
28021
  return u.top = Xe(d.top, u.top), u.right = hr(d.right, u.right), u.bottom = hr(d.bottom, u.bottom), u.left = Xe(d.left, u.left), u;
28004
28022
  }, im(t, s, r));
@@ -28009,7 +28027,7 @@ function pM(e) {
28009
28027
  y: l.top
28010
28028
  };
28011
28029
  }
28012
- function mM(e) {
28030
+ function mD(e) {
28013
28031
  const {
28014
28032
  width: t,
28015
28033
  height: n
@@ -28019,13 +28037,13 @@ function mM(e) {
28019
28037
  height: n
28020
28038
  };
28021
28039
  }
28022
- function hM(e, t, n) {
28040
+ function hD(e, t, n) {
28023
28041
  const o = Ft(t), r = Vt(t), i = n === "fixed", a = Cr(e, !0, i, t);
28024
28042
  let s = {
28025
28043
  scrollLeft: 0,
28026
28044
  scrollTop: 0
28027
28045
  };
28028
- const l = Mt(0);
28046
+ const l = Dt(0);
28029
28047
  function u() {
28030
28048
  l.x = vd(r);
28031
28049
  }
@@ -28035,7 +28053,7 @@ function hM(e, t, n) {
28035
28053
  l.x = f.x + t.clientLeft, l.y = f.y + t.clientTop;
28036
28054
  } else r && u();
28037
28055
  i && !o && r && u();
28038
- const c = r && !o && !i ? t0(r, s) : Mt(0), d = a.left + s.scrollLeft - l.x - c.x, p = a.top + s.scrollTop - l.y - c.y;
28056
+ const c = r && !o && !i ? t0(r, s) : Dt(0), d = a.left + s.scrollLeft - l.x - c.x, p = a.top + s.scrollTop - l.y - c.y;
28039
28057
  return {
28040
28058
  x: d,
28041
28059
  y: p,
@@ -28068,14 +28086,14 @@ function n0(e, t) {
28068
28086
  return n;
28069
28087
  }
28070
28088
  let o = am(e, t);
28071
- for (; o && YD(o) && Ys(o); )
28089
+ for (; o && YM(o) && Ys(o); )
28072
28090
  o = am(o, t);
28073
- return o && fn(o) && Ys(o) && !md(o) ? n : o || rM(e) || n;
28091
+ return o && fn(o) && Ys(o) && !md(o) ? n : o || rD(e) || n;
28074
28092
  }
28075
- const gM = async function(e) {
28093
+ const gD = async function(e) {
28076
28094
  const t = this.getOffsetParent || n0, n = this.getDimensions, o = await n(e.floating);
28077
28095
  return {
28078
- reference: hM(e.reference, await t(e.floating), e.strategy),
28096
+ reference: hD(e.reference, await t(e.floating), e.strategy),
28079
28097
  floating: {
28080
28098
  x: 0,
28081
28099
  y: 0,
@@ -28084,25 +28102,25 @@ const gM = async function(e) {
28084
28102
  }
28085
28103
  };
28086
28104
  };
28087
- function vM(e) {
28105
+ function vD(e) {
28088
28106
  return Et(e).direction === "rtl";
28089
28107
  }
28090
- const yM = {
28091
- convertOffsetParentRelativeRectToViewportRelativeRect: aM,
28108
+ const yD = {
28109
+ convertOffsetParentRelativeRectToViewportRelativeRect: aD,
28092
28110
  getDocumentElement: Vt,
28093
- getClippingRect: pM,
28111
+ getClippingRect: pD,
28094
28112
  getOffsetParent: n0,
28095
- getElementRects: gM,
28096
- getClientRects: sM,
28097
- getDimensions: mM,
28113
+ getElementRects: gD,
28114
+ getClientRects: sD,
28115
+ getDimensions: mD,
28098
28116
  getScale: Qr,
28099
28117
  isElement: kt,
28100
- isRTL: vM
28118
+ isRTL: vD
28101
28119
  };
28102
28120
  function o0(e, t) {
28103
28121
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
28104
28122
  }
28105
- function bM(e, t) {
28123
+ function bD(e, t) {
28106
28124
  let n = null, o;
28107
28125
  const r = Vt(e);
28108
28126
  function i() {
@@ -28148,7 +28166,7 @@ function bM(e, t) {
28148
28166
  }
28149
28167
  return a(!0), i;
28150
28168
  }
28151
- function _M(e, t, n, o) {
28169
+ function _D(e, t, n, o) {
28152
28170
  o === void 0 && (o = {});
28153
28171
  const {
28154
28172
  ancestorScroll: r = !0,
@@ -28162,7 +28180,7 @@ function _M(e, t, n, o) {
28162
28180
  passive: !0
28163
28181
  }), i && y.addEventListener("resize", n);
28164
28182
  });
28165
- const d = u && s ? bM(u, n) : null;
28183
+ const d = u && s ? bD(u, n) : null;
28166
28184
  let p = -1, f = null;
28167
28185
  a && (f = new ResizeObserver((y) => {
28168
28186
  let [$] = y;
@@ -28184,21 +28202,21 @@ function _M(e, t, n, o) {
28184
28202
  }), d?.(), (y = f) == null || y.disconnect(), f = null, l && cancelAnimationFrame(h);
28185
28203
  };
28186
28204
  }
28187
- const wM = BD, $M = JD, SM = FD, xM = HD, IM = qD, sm = ZD, kM = WD, EM = (e, t, n) => {
28205
+ const wD = BM, $D = JM, SD = FM, xD = HM, ID = qM, sm = ZM, kD = WM, ED = (e, t, n) => {
28188
28206
  const o = /* @__PURE__ */ new Map(), r = {
28189
- platform: yM,
28207
+ platform: yD,
28190
28208
  ...n
28191
28209
  }, i = {
28192
28210
  ...r.platform,
28193
28211
  _c: o
28194
28212
  };
28195
- return LD(e, t, {
28213
+ return LM(e, t, {
28196
28214
  ...r,
28197
28215
  platform: i
28198
28216
  });
28199
28217
  };
28200
- var OM = typeof document < "u", TM = function() {
28201
- }, yi = OM ? Kx : TM;
28218
+ var OD = typeof document < "u", TD = function() {
28219
+ }, yi = OD ? Kx : TD;
28202
28220
  function Xi(e, t) {
28203
28221
  if (e === t)
28204
28222
  return !0;
@@ -28242,7 +28260,7 @@ function Qs(e) {
28242
28260
  t.current = e;
28243
28261
  }), t;
28244
28262
  }
28245
- function NM(e) {
28263
+ function ND(e) {
28246
28264
  e === void 0 && (e = {});
28247
28265
  const {
28248
28266
  placement: t = "bottom",
@@ -28269,7 +28287,7 @@ function NM(e) {
28269
28287
  G !== T.current && (T.current = G, m(G));
28270
28288
  }, []), S = _.useCallback((G) => {
28271
28289
  G !== I.current && (I.current = G, y(G));
28272
- }, []), v = i || h, k = a || b, T = _.useRef(null), I = _.useRef(null), O = _.useRef(c), D = l != null, L = Qs(l), te = Qs(r), ge = Qs(u), H = _.useCallback(() => {
28290
+ }, []), v = i || h, k = a || b, T = _.useRef(null), I = _.useRef(null), O = _.useRef(c), z = l != null, L = Qs(l), te = Qs(r), ge = Qs(u), H = _.useCallback(() => {
28273
28291
  if (!T.current || !I.current)
28274
28292
  return;
28275
28293
  const G = {
@@ -28277,7 +28295,7 @@ function NM(e) {
28277
28295
  strategy: n,
28278
28296
  middleware: p
28279
28297
  };
28280
- te.current && (G.platform = te.current), EM(T.current, I.current, G).then((de) => {
28298
+ te.current && (G.platform = te.current), ED(T.current, I.current, G).then((de) => {
28281
28299
  const V = {
28282
28300
  ...de,
28283
28301
  // The floating element's position may be recomputed while it's closed
@@ -28306,7 +28324,7 @@ function NM(e) {
28306
28324
  return L.current(v, k, H);
28307
28325
  H();
28308
28326
  }
28309
- }, [v, k, H, L, D]);
28327
+ }, [v, k, H, L, z]);
28310
28328
  const _e = _.useMemo(() => ({
28311
28329
  reference: T,
28312
28330
  floating: I,
@@ -28344,7 +28362,7 @@ function NM(e) {
28344
28362
  floatingStyles: le
28345
28363
  }), [c, H, _e, ne, le]);
28346
28364
  }
28347
- const PM = (e) => {
28365
+ const PD = (e) => {
28348
28366
  function t(n) {
28349
28367
  return {}.hasOwnProperty.call(n, "current");
28350
28368
  }
@@ -28365,29 +28383,29 @@ const PM = (e) => {
28365
28383
  }).fn(n) : {};
28366
28384
  }
28367
28385
  };
28368
- }, CM = (e, t) => ({
28369
- ...wM(e),
28386
+ }, CD = (e, t) => ({
28387
+ ...wD(e),
28370
28388
  options: [e, t]
28371
- }), AM = (e, t) => ({
28372
- ...$M(e),
28389
+ }), AD = (e, t) => ({
28390
+ ...$D(e),
28373
28391
  options: [e, t]
28374
- }), RM = (e, t) => ({
28375
- ...kM(e),
28392
+ }), RD = (e, t) => ({
28393
+ ...kD(e),
28376
28394
  options: [e, t]
28377
- }), zM = (e, t) => ({
28378
- ...SM(e),
28395
+ }), zD = (e, t) => ({
28396
+ ...SD(e),
28379
28397
  options: [e, t]
28380
- }), jM = (e, t) => ({
28381
- ...xM(e),
28398
+ }), jD = (e, t) => ({
28399
+ ...xD(e),
28382
28400
  options: [e, t]
28383
- }), DM = (e, t) => ({
28384
- ...IM(e),
28401
+ }), MD = (e, t) => ({
28402
+ ...ID(e),
28385
28403
  options: [e, t]
28386
- }), MM = (e, t) => ({
28387
- ...PM(e),
28404
+ }), DD = (e, t) => ({
28405
+ ...PD(e),
28388
28406
  options: [e, t]
28389
28407
  });
28390
- var UM = "Arrow", a0 = _.forwardRef((e, t) => {
28408
+ var UD = "Arrow", a0 = _.forwardRef((e, t) => {
28391
28409
  const { children: n, width: o = 10, height: r = 5, ...i } = e;
28392
28410
  return /* @__PURE__ */ g(
28393
28411
  Ce.svg,
@@ -28402,9 +28420,9 @@ var UM = "Arrow", a0 = _.forwardRef((e, t) => {
28402
28420
  }
28403
28421
  );
28404
28422
  });
28405
- a0.displayName = UM;
28406
- var LM = a0;
28407
- function ZM(e) {
28423
+ a0.displayName = UD;
28424
+ var LD = a0;
28425
+ function ZD(e) {
28408
28426
  const [t, n] = _.useState(void 0);
28409
28427
  return dt(() => {
28410
28428
  if (e) {
@@ -28426,9 +28444,9 @@ function ZM(e) {
28426
28444
  n(void 0);
28427
28445
  }, [e]), t;
28428
28446
  }
28429
- var yd = "Popper", [s0, cs] = qo(yd), [FM, u0] = s0(yd), l0 = (e) => {
28447
+ var yd = "Popper", [s0, cs] = qo(yd), [FD, u0] = s0(yd), l0 = (e) => {
28430
28448
  const { __scopePopper: t, children: n } = e, [o, r] = _.useState(null);
28431
- return /* @__PURE__ */ g(FM, { scope: t, anchor: o, onAnchorChange: r, children: n });
28449
+ return /* @__PURE__ */ g(FD, { scope: t, anchor: o, onAnchorChange: r, children: n });
28432
28450
  };
28433
28451
  l0.displayName = yd;
28434
28452
  var c0 = "PopperAnchor", d0 = _.forwardRef(
@@ -28441,7 +28459,7 @@ var c0 = "PopperAnchor", d0 = _.forwardRef(
28441
28459
  }
28442
28460
  );
28443
28461
  d0.displayName = c0;
28444
- var bd = "PopperContent", [qM, VM] = s0(bd), f0 = _.forwardRef(
28462
+ var bd = "PopperContent", [qD, VD] = s0(bd), f0 = _.forwardRef(
28445
28463
  (e, t) => {
28446
28464
  const {
28447
28465
  __scopePopper: n,
@@ -28458,46 +28476,46 @@ var bd = "PopperContent", [qM, VM] = s0(bd), f0 = _.forwardRef(
28458
28476
  updatePositionStrategy: f = "optimized",
28459
28477
  onPlaced: h,
28460
28478
  ...m
28461
- } = e, b = u0(bd, n), [y, $] = _.useState(null), S = Ye(t, (we) => $(we)), [v, k] = _.useState(null), T = ZM(v), I = T?.width ?? 0, O = T?.height ?? 0, D = o + (i !== "center" ? "-" + i : ""), L = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, te = Array.isArray(u) ? u : [u], ge = te.length > 0, H = {
28479
+ } = e, b = u0(bd, n), [y, $] = _.useState(null), S = Ye(t, (we) => $(we)), [v, k] = _.useState(null), T = ZD(v), I = T?.width ?? 0, O = T?.height ?? 0, z = o + (i !== "center" ? "-" + i : ""), L = typeof c == "number" ? c : { top: 0, right: 0, bottom: 0, left: 0, ...c }, te = Array.isArray(u) ? u : [u], ge = te.length > 0, H = {
28462
28480
  padding: L,
28463
- boundary: te.filter(JM),
28481
+ boundary: te.filter(JD),
28464
28482
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
28465
28483
  altBoundary: ge
28466
- }, { refs: F, floatingStyles: _e, placement: ne, isPositioned: le, middlewareData: G } = NM({
28484
+ }, { refs: F, floatingStyles: _e, placement: ne, isPositioned: le, middlewareData: G } = ND({
28467
28485
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
28468
28486
  strategy: "fixed",
28469
- placement: D,
28470
- whileElementsMounted: (...we) => _M(...we, {
28487
+ placement: z,
28488
+ whileElementsMounted: (...we) => _D(...we, {
28471
28489
  animationFrame: f === "always"
28472
28490
  }),
28473
28491
  elements: {
28474
28492
  reference: b.anchor
28475
28493
  },
28476
28494
  middleware: [
28477
- CM({ mainAxis: r + O, alignmentAxis: a }),
28478
- l && AM({
28495
+ CD({ mainAxis: r + O, alignmentAxis: a }),
28496
+ l && AD({
28479
28497
  mainAxis: !0,
28480
28498
  crossAxis: !1,
28481
- limiter: d === "partial" ? RM() : void 0,
28499
+ limiter: d === "partial" ? RD() : void 0,
28482
28500
  ...H
28483
28501
  }),
28484
- l && zM({ ...H }),
28485
- jM({
28502
+ l && zD({ ...H }),
28503
+ jD({
28486
28504
  ...H,
28487
28505
  apply: ({ elements: we, rects: Wo, availableWidth: bs, availableHeight: $n }) => {
28488
28506
  const { width: mt, height: Ho } = Wo.reference, Re = we.floating.style;
28489
28507
  Re.setProperty("--radix-popper-available-width", `${bs}px`), Re.setProperty("--radix-popper-available-height", `${$n}px`), Re.setProperty("--radix-popper-anchor-width", `${mt}px`), Re.setProperty("--radix-popper-anchor-height", `${Ho}px`);
28490
28508
  }
28491
28509
  }),
28492
- v && MM({ element: v, padding: s }),
28493
- WM({ arrowWidth: I, arrowHeight: O }),
28494
- p && DM({ strategy: "referenceHidden", ...H })
28510
+ v && DD({ element: v, padding: s }),
28511
+ WD({ arrowWidth: I, arrowHeight: O }),
28512
+ p && MD({ strategy: "referenceHidden", ...H })
28495
28513
  ]
28496
28514
  }), [de, V] = h0(ne), Le = Pr(h);
28497
28515
  dt(() => {
28498
28516
  le && Le?.();
28499
28517
  }, [le, Le]);
28500
- const ve = G.arrow?.x, Ze = G.arrow?.y, M = G.arrow?.centerOffset !== 0, [Y, fe] = _.useState();
28518
+ const ve = G.arrow?.x, Ze = G.arrow?.y, D = G.arrow?.centerOffset !== 0, [Y, fe] = _.useState();
28501
28519
  return dt(() => {
28502
28520
  y && fe(window.getComputedStyle(y).zIndex);
28503
28521
  }, [y]), /* @__PURE__ */ g(
@@ -28525,14 +28543,14 @@ var bd = "PopperContent", [qM, VM] = s0(bd), f0 = _.forwardRef(
28525
28543
  },
28526
28544
  dir: e.dir,
28527
28545
  children: /* @__PURE__ */ g(
28528
- qM,
28546
+ qD,
28529
28547
  {
28530
28548
  scope: n,
28531
28549
  placedSide: de,
28532
28550
  onArrowChange: k,
28533
28551
  arrowX: ve,
28534
28552
  arrowY: Ze,
28535
- shouldHideArrow: M,
28553
+ shouldHideArrow: D,
28536
28554
  children: /* @__PURE__ */ g(
28537
28555
  Ce.div,
28538
28556
  {
@@ -28555,13 +28573,13 @@ var bd = "PopperContent", [qM, VM] = s0(bd), f0 = _.forwardRef(
28555
28573
  }
28556
28574
  );
28557
28575
  f0.displayName = bd;
28558
- var p0 = "PopperArrow", BM = {
28576
+ var p0 = "PopperArrow", BD = {
28559
28577
  top: "bottom",
28560
28578
  right: "left",
28561
28579
  bottom: "top",
28562
28580
  left: "right"
28563
28581
  }, m0 = _.forwardRef(function(t, n) {
28564
- const { __scopePopper: o, ...r } = t, i = VM(p0, o), a = BM[i.placedSide];
28582
+ const { __scopePopper: o, ...r } = t, i = VD(p0, o), a = BD[i.placedSide];
28565
28583
  return (
28566
28584
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
28567
28585
  // doesn't report size as we'd expect on SVG elements.
@@ -28590,7 +28608,7 @@ var p0 = "PopperArrow", BM = {
28590
28608
  visibility: i.shouldHideArrow ? "hidden" : void 0
28591
28609
  },
28592
28610
  children: /* @__PURE__ */ g(
28593
- LM,
28611
+ LD,
28594
28612
  {
28595
28613
  ...r,
28596
28614
  ref: n,
@@ -28606,10 +28624,10 @@ var p0 = "PopperArrow", BM = {
28606
28624
  );
28607
28625
  });
28608
28626
  m0.displayName = p0;
28609
- function JM(e) {
28627
+ function JD(e) {
28610
28628
  return e !== null;
28611
28629
  }
28612
- var WM = (e) => ({
28630
+ var WD = (e) => ({
28613
28631
  name: "transformOrigin",
28614
28632
  options: e,
28615
28633
  fn(t) {
@@ -28622,23 +28640,23 @@ function h0(e) {
28622
28640
  const [t, n = "center"] = e.split("-");
28623
28641
  return [t, n];
28624
28642
  }
28625
- var g0 = l0, _d = d0, v0 = f0, y0 = m0, HM = "Portal", ds = _.forwardRef((e, t) => {
28643
+ var g0 = l0, _d = d0, v0 = f0, y0 = m0, HD = "Portal", ds = _.forwardRef((e, t) => {
28626
28644
  const { container: n, ...o } = e, [r, i] = _.useState(!1);
28627
28645
  dt(() => i(!0), []);
28628
28646
  const a = n || r && globalThis?.document?.body;
28629
28647
  return a ? rI.createPortal(/* @__PURE__ */ g(Ce.div, { ...o, ref: t }), a) : null;
28630
28648
  });
28631
- ds.displayName = HM;
28632
- function GM(e, t) {
28649
+ ds.displayName = HD;
28650
+ function GD(e, t) {
28633
28651
  return _.useReducer((n, o) => t[n][o] ?? n, e);
28634
28652
  }
28635
28653
  var nr = (e) => {
28636
- const { present: t, children: n } = e, o = KM(t), r = typeof n == "function" ? n({ present: o.isPresent }) : _.Children.only(n), i = Ye(o.ref, YM(r));
28654
+ const { present: t, children: n } = e, o = KD(t), r = typeof n == "function" ? n({ present: o.isPresent }) : _.Children.only(n), i = Ye(o.ref, YD(r));
28637
28655
  return typeof n == "function" || o.isPresent ? _.cloneElement(r, { ref: i }) : null;
28638
28656
  };
28639
28657
  nr.displayName = "Presence";
28640
- function KM(e) {
28641
- const [t, n] = _.useState(), o = _.useRef(null), r = _.useRef(e), i = _.useRef("none"), a = e ? "mounted" : "unmounted", [s, l] = GM(a, {
28658
+ function KD(e) {
28659
+ const [t, n] = _.useState(), o = _.useRef(null), r = _.useRef(e), i = _.useRef("none"), a = e ? "mounted" : "unmounted", [s, l] = GD(a, {
28642
28660
  mounted: {
28643
28661
  UNMOUNT: "unmounted",
28644
28662
  ANIMATION_OUT: "unmountSuspended"
@@ -28689,11 +28707,11 @@ function KM(e) {
28689
28707
  function ui(e) {
28690
28708
  return e?.animationName || "none";
28691
28709
  }
28692
- function YM(e) {
28710
+ function YD(e) {
28693
28711
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
28694
28712
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
28695
28713
  }
28696
- var QM = _[" useInsertionEffect ".trim().toString()] || dt;
28714
+ var QD = _[" useInsertionEffect ".trim().toString()] || dt;
28697
28715
  function fs({
28698
28716
  prop: e,
28699
28717
  defaultProp: t,
@@ -28701,7 +28719,7 @@ function fs({
28701
28719
  },
28702
28720
  caller: o
28703
28721
  }) {
28704
- const [r, i, a] = XM({
28722
+ const [r, i, a] = XD({
28705
28723
  defaultProp: t,
28706
28724
  onChange: n
28707
28725
  }), s = e !== void 0, l = s ? e : r;
@@ -28726,12 +28744,12 @@ function fs({
28726
28744
  );
28727
28745
  return [l, u];
28728
28746
  }
28729
- function XM({
28747
+ function XD({
28730
28748
  defaultProp: e,
28731
28749
  onChange: t
28732
28750
  }) {
28733
28751
  const [n, o] = _.useState(e), r = _.useRef(n), i = _.useRef(t);
28734
- return QM(() => {
28752
+ return QD(() => {
28735
28753
  i.current = t;
28736
28754
  }, [t]), _.useEffect(() => {
28737
28755
  r.current !== n && (i.current?.(n), r.current = n);
@@ -28918,7 +28936,7 @@ var pn = "TooltipContent", I0 = _.forwardRef(
28918
28936
  return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
28919
28937
  }
28920
28938
  }, [l, c, a, u, p]), /* @__PURE__ */ g(k0, { ...e, ref: i });
28921
- }), [cU, dU] = ps(co, { isInside: !1 }), fU = /* @__PURE__ */ pD("TooltipContent"), k0 = _.forwardRef(
28939
+ }), [cU, dU] = ps(co, { isInside: !1 }), fU = /* @__PURE__ */ pM("TooltipContent"), k0 = _.forwardRef(
28922
28940
  (e, t) => {
28923
28941
  const {
28924
28942
  __scopeTooltip: n,
@@ -29107,7 +29125,7 @@ function Id({
29107
29125
  {
29108
29126
  "data-slot": "tooltip-content",
29109
29127
  sideOffset: t,
29110
- className: j(
29128
+ className: M(
29111
29129
  "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-20 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
29112
29130
  e
29113
29131
  ),
@@ -29134,10 +29152,10 @@ const ft = Yx(
29134
29152
  variant: "ghost",
29135
29153
  size: "icon",
29136
29154
  ...i,
29137
- className: j("aui-button-icon size-6 p-1", r),
29155
+ className: M("aui-button-icon size-6 p-1", r),
29138
29156
  ref: a,
29139
29157
  children: [
29140
- /* @__PURE__ */ g(oD, { children: e }),
29158
+ /* @__PURE__ */ g(oM, { children: e }),
29141
29159
  /* @__PURE__ */ g("span", { className: "aui-sr-only sr-only", children: t })
29142
29160
  ]
29143
29161
  }
@@ -29190,7 +29208,7 @@ const kU = () => {
29190
29208
  h1: ({ className: e, ...t }) => /* @__PURE__ */ g(
29191
29209
  "h1",
29192
29210
  {
29193
- className: j(
29211
+ className: M(
29194
29212
  "aui-md-h1 mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",
29195
29213
  e
29196
29214
  ),
@@ -29200,7 +29218,7 @@ const kU = () => {
29200
29218
  h2: ({ className: e, ...t }) => /* @__PURE__ */ g(
29201
29219
  "h2",
29202
29220
  {
29203
- className: j(
29221
+ className: M(
29204
29222
  "aui-md-h2 mt-8 mb-4 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",
29205
29223
  e
29206
29224
  ),
@@ -29210,7 +29228,7 @@ const kU = () => {
29210
29228
  h3: ({ className: e, ...t }) => /* @__PURE__ */ g(
29211
29229
  "h3",
29212
29230
  {
29213
- className: j(
29231
+ className: M(
29214
29232
  "aui-md-h3 mt-6 mb-4 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",
29215
29233
  e
29216
29234
  ),
@@ -29220,7 +29238,7 @@ const kU = () => {
29220
29238
  h4: ({ className: e, ...t }) => /* @__PURE__ */ g(
29221
29239
  "h4",
29222
29240
  {
29223
- className: j(
29241
+ className: M(
29224
29242
  "aui-md-h4 mt-6 mb-4 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",
29225
29243
  e
29226
29244
  ),
@@ -29230,7 +29248,7 @@ const kU = () => {
29230
29248
  h5: ({ className: e, ...t }) => /* @__PURE__ */ g(
29231
29249
  "h5",
29232
29250
  {
29233
- className: j(
29251
+ className: M(
29234
29252
  "aui-md-h5 my-4 text-lg font-semibold first:mt-0 last:mb-0",
29235
29253
  e
29236
29254
  ),
@@ -29240,7 +29258,7 @@ const kU = () => {
29240
29258
  h6: ({ className: e, ...t }) => /* @__PURE__ */ g(
29241
29259
  "h6",
29242
29260
  {
29243
- className: j(
29261
+ className: M(
29244
29262
  "aui-md-h6 my-4 font-semibold first:mt-0 last:mb-0",
29245
29263
  e
29246
29264
  ),
@@ -29250,7 +29268,7 @@ const kU = () => {
29250
29268
  p: ({ className: e, ...t }) => /* @__PURE__ */ g(
29251
29269
  "p",
29252
29270
  {
29253
- className: j(
29271
+ className: M(
29254
29272
  "aui-md-p mt-5 mb-5 leading-7 first:mt-0 last:mb-0",
29255
29273
  e
29256
29274
  ),
@@ -29260,7 +29278,7 @@ const kU = () => {
29260
29278
  a: ({ className: e, ...t }) => /* @__PURE__ */ g(
29261
29279
  "a",
29262
29280
  {
29263
- className: j(
29281
+ className: M(
29264
29282
  "aui-md-a text-primary font-medium underline underline-offset-4",
29265
29283
  e
29266
29284
  ),
@@ -29270,29 +29288,29 @@ const kU = () => {
29270
29288
  blockquote: ({ className: e, ...t }) => /* @__PURE__ */ g(
29271
29289
  "blockquote",
29272
29290
  {
29273
- className: j("aui-md-blockquote border-l-2 pl-6 italic", e),
29291
+ className: M("aui-md-blockquote border-l-2 pl-6 italic", e),
29274
29292
  ...t
29275
29293
  }
29276
29294
  ),
29277
29295
  ul: ({ className: e, ...t }) => /* @__PURE__ */ g(
29278
29296
  "ul",
29279
29297
  {
29280
- className: j("aui-md-ul my-5 ml-6 list-disc [&>li]:mt-2", e),
29298
+ className: M("aui-md-ul my-5 ml-6 list-disc [&>li]:mt-2", e),
29281
29299
  ...t
29282
29300
  }
29283
29301
  ),
29284
29302
  ol: ({ className: e, ...t }) => /* @__PURE__ */ g(
29285
29303
  "ol",
29286
29304
  {
29287
- className: j("aui-md-ol my-5 ml-6 list-decimal [&>li]:mt-2", e),
29305
+ className: M("aui-md-ol my-5 ml-6 list-decimal [&>li]:mt-2", e),
29288
29306
  ...t
29289
29307
  }
29290
29308
  ),
29291
- hr: ({ className: e, ...t }) => /* @__PURE__ */ g("hr", { className: j("aui-md-hr my-5 border-b", e), ...t }),
29309
+ hr: ({ className: e, ...t }) => /* @__PURE__ */ g("hr", { className: M("aui-md-hr my-5 border-b", e), ...t }),
29292
29310
  table: ({ className: e, ...t }) => /* @__PURE__ */ g(
29293
29311
  "table",
29294
29312
  {
29295
- className: j(
29313
+ className: M(
29296
29314
  "aui-md-table my-5 w-full border-separate border-spacing-0 overflow-y-auto",
29297
29315
  e
29298
29316
  ),
@@ -29302,7 +29320,7 @@ const kU = () => {
29302
29320
  th: ({ className: e, ...t }) => /* @__PURE__ */ g(
29303
29321
  "th",
29304
29322
  {
29305
- className: j(
29323
+ className: M(
29306
29324
  "aui-md-th bg-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [[align=center]]:text-center [[align=right]]:text-right",
29307
29325
  e
29308
29326
  ),
@@ -29312,7 +29330,7 @@ const kU = () => {
29312
29330
  td: ({ className: e, ...t }) => /* @__PURE__ */ g(
29313
29331
  "td",
29314
29332
  {
29315
- className: j(
29333
+ className: M(
29316
29334
  "aui-md-td border-b border-l px-4 py-2 text-left last:border-r [[align=center]]:text-center [[align=right]]:text-right",
29317
29335
  e
29318
29336
  ),
@@ -29322,7 +29340,7 @@ const kU = () => {
29322
29340
  tr: ({ className: e, ...t }) => /* @__PURE__ */ g(
29323
29341
  "tr",
29324
29342
  {
29325
- className: j(
29343
+ className: M(
29326
29344
  "aui-md-tr m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",
29327
29345
  e
29328
29346
  ),
@@ -29332,14 +29350,14 @@ const kU = () => {
29332
29350
  sup: ({ className: e, ...t }) => /* @__PURE__ */ g(
29333
29351
  "sup",
29334
29352
  {
29335
- className: j("aui-md-sup [&>a]:text-xs [&>a]:no-underline", e),
29353
+ className: M("aui-md-sup [&>a]:text-xs [&>a]:no-underline", e),
29336
29354
  ...t
29337
29355
  }
29338
29356
  ),
29339
29357
  pre: ({ className: e, ...t }) => /* @__PURE__ */ g(
29340
29358
  "pre",
29341
29359
  {
29342
- className: j(
29360
+ className: M(
29343
29361
  "aui-md-pre text-foreground bg-muted overflow-x-auto rounded-t-none! rounded-b-lg border border-t-0 p-4",
29344
29362
  e
29345
29363
  ),
@@ -29351,7 +29369,7 @@ const kU = () => {
29351
29369
  return /* @__PURE__ */ g(
29352
29370
  "code",
29353
29371
  {
29354
- className: j(
29372
+ className: M(
29355
29373
  !o && "aui-md-inline-code bg-muted rounded border font-semibold",
29356
29374
  t
29357
29375
  ),
@@ -29395,7 +29413,7 @@ const CU = ({
29395
29413
  return /* @__PURE__ */ q(
29396
29414
  "div",
29397
29415
  {
29398
- className: j(
29416
+ className: M(
29399
29417
  "aui-tool-fallback-root flex w-full flex-col",
29400
29418
  a !== -1 && "border-b",
29401
29419
  a === i.length - 1 && "border-b-0"
@@ -29404,7 +29422,7 @@ const CU = ({
29404
29422
  /* @__PURE__ */ q(
29405
29423
  "button",
29406
29424
  {
29407
- className: j(
29425
+ className: M(
29408
29426
  "aui-tool-fallback-header flex h-full w-full cursor-pointer items-center",
29409
29427
  l("py-xs"),
29410
29428
  l("px-md"),
@@ -29461,7 +29479,7 @@ function AU({ result: e, args: t }) {
29461
29479
  /* @__PURE__ */ g(
29462
29480
  "div",
29463
29481
  {
29464
- className: j(
29482
+ className: M(
29465
29483
  "w-full transition-opacity",
29466
29484
  n === "args" ? "opacity-100" : "pointer-events-none absolute opacity-0"
29467
29485
  ),
@@ -29471,7 +29489,7 @@ function AU({ result: e, args: t }) {
29471
29489
  /* @__PURE__ */ g(
29472
29490
  "div",
29473
29491
  {
29474
- className: j(
29492
+ className: M(
29475
29493
  "w-full transition-opacity",
29476
29494
  n === "result" ? "opacity-100" : "pointer-events-none absolute opacity-0"
29477
29495
  ),
@@ -29490,7 +29508,7 @@ function RU({
29490
29508
  "button",
29491
29509
  {
29492
29510
  onClick: (r) => n(r, o.id),
29493
- className: j(
29511
+ className: M(
29494
29512
  "cursor-pointer rounded-md px-3 py-1 text-sm font-medium transition-all",
29495
29513
  t === o.id ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
29496
29514
  ),
@@ -29504,12 +29522,12 @@ function zU({
29504
29522
  className: t
29505
29523
  }) {
29506
29524
  const n = PU.parse(e);
29507
- return /* @__PURE__ */ g("div", { className: j("w-full", t), children: n?.content.map((o, r) => {
29525
+ return /* @__PURE__ */ g("div", { className: M("w-full", t), children: n?.content.map((o, r) => {
29508
29526
  switch (o.type) {
29509
29527
  case "text": {
29510
29528
  const i = jU(
29511
29529
  o._meta?.["getgram.ai/mime-type"] ?? "text/plain"
29512
- ), a = DU(o.text, i);
29530
+ ), a = MU(o.text, i);
29513
29531
  return /* @__PURE__ */ g(C0, { text: a, language: i }, o.text);
29514
29532
  }
29515
29533
  case "image": {
@@ -29600,7 +29618,7 @@ function C0({
29600
29618
  }, [e]), o ? /* @__PURE__ */ g(
29601
29619
  "div",
29602
29620
  {
29603
- className: j(
29621
+ className: M(
29604
29622
  "aui-tool-fallback-result-content w-full bg-slate-800/90",
29605
29623
  n
29606
29624
  ),
@@ -29609,7 +29627,7 @@ function C0({
29609
29627
  ) : /* @__PURE__ */ g(
29610
29628
  "pre",
29611
29629
  {
29612
- className: j(
29630
+ className: M(
29613
29631
  "aui-tool-fallback-result-content text-background flex w-full items-start bg-slate-800/90 px-5 py-3 whitespace-normal",
29614
29632
  n
29615
29633
  ),
@@ -29617,7 +29635,7 @@ function C0({
29617
29635
  }
29618
29636
  );
29619
29637
  }
29620
- function DU(e, t) {
29638
+ function MU(e, t) {
29621
29639
  if (!t) return e;
29622
29640
  switch (t) {
29623
29641
  case "json":
@@ -29626,7 +29644,7 @@ function DU(e, t) {
29626
29644
  return e;
29627
29645
  }
29628
29646
  }
29629
- var hs = "Collapsible", [MU] = qo(hs), [UU, kd] = MU(hs), A0 = _.forwardRef(
29647
+ var hs = "Collapsible", [DU] = qo(hs), [UU, kd] = DU(hs), A0 = _.forwardRef(
29630
29648
  (e, t) => {
29631
29649
  const {
29632
29650
  __scopeCollapsible: n,
@@ -29754,7 +29772,7 @@ function VU({
29754
29772
  }
29755
29773
  );
29756
29774
  }
29757
- const lm = 200, D0 = ({ className: e, children: t }) => {
29775
+ const lm = 200, M0 = ({ className: e, children: t }) => {
29758
29776
  const n = Wt(null), [o, r] = Ae(!1), i = Gx(n, lm), a = wi(
29759
29777
  (s) => {
29760
29778
  s || i(), r(s);
@@ -29767,7 +29785,7 @@ const lm = 200, D0 = ({ className: e, children: t }) => {
29767
29785
  ref: n,
29768
29786
  open: o,
29769
29787
  onOpenChange: a,
29770
- className: j("aui-reasoning-root mb-4 w-full", e),
29788
+ className: M("aui-reasoning-root mb-4 w-full", e),
29771
29789
  style: {
29772
29790
  "--animation-duration": `${lm}ms`
29773
29791
  },
@@ -29775,11 +29793,11 @@ const lm = 200, D0 = ({ className: e, children: t }) => {
29775
29793
  }
29776
29794
  );
29777
29795
  };
29778
- D0.displayName = "ReasoningRoot";
29796
+ M0.displayName = "ReasoningRoot";
29779
29797
  const BU = ({ className: e }) => /* @__PURE__ */ g(
29780
29798
  "div",
29781
29799
  {
29782
- className: j(
29800
+ className: M(
29783
29801
  "aui-reasoning-fade pointer-events-none absolute inset-x-0 bottom-0 z-10 h-16",
29784
29802
  "bg-[linear-gradient(to_top,var(--color-background),transparent)]",
29785
29803
  "fade-in-0 animate-in",
@@ -29799,7 +29817,7 @@ const BU = ({ className: e }) => /* @__PURE__ */ g(
29799
29817
  }) => /* @__PURE__ */ q(
29800
29818
  qU,
29801
29819
  {
29802
- className: j(
29820
+ className: M(
29803
29821
  "aui-reasoning-trigger group/trigger text-muted-foreground hover:text-foreground -mb-2 flex max-w-[75%] items-center gap-2 py-2 text-sm transition-colors",
29804
29822
  t,
29805
29823
  e && "shimmer"
@@ -29820,7 +29838,7 @@ const BU = ({ className: e }) => /* @__PURE__ */ g(
29820
29838
  /* @__PURE__ */ g(
29821
29839
  Ku,
29822
29840
  {
29823
- className: j(
29841
+ className: M(
29824
29842
  "aui-reasoning-trigger-chevron mt-0.5 size-4 shrink-0",
29825
29843
  "transition-transform duration-(--animation-duration) ease-out",
29826
29844
  "group-data-[state=closed]/trigger:-rotate-90",
@@ -29830,10 +29848,10 @@ const BU = ({ className: e }) => /* @__PURE__ */ g(
29830
29848
  )
29831
29849
  ]
29832
29850
  }
29833
- ), M0 = ({ className: e, children: t, "aria-busy": n }) => /* @__PURE__ */ q(
29851
+ ), D0 = ({ className: e, children: t, "aria-busy": n }) => /* @__PURE__ */ q(
29834
29852
  VU,
29835
29853
  {
29836
- className: j(
29854
+ className: M(
29837
29855
  "aui-reasoning-content text-muted-foreground relative overflow-hidden text-sm outline-none",
29838
29856
  "group/collapsible-content ease-out",
29839
29857
  "data-[state=closed]:animate-collapsible-up",
@@ -29851,11 +29869,11 @@ const BU = ({ className: e }) => /* @__PURE__ */ g(
29851
29869
  ]
29852
29870
  }
29853
29871
  );
29854
- M0.displayName = "ReasoningContent";
29872
+ D0.displayName = "ReasoningContent";
29855
29873
  const U0 = ({ className: e, children: t }) => /* @__PURE__ */ g(
29856
29874
  "div",
29857
29875
  {
29858
- className: j(
29876
+ className: M(
29859
29877
  "aui-reasoning-text relative z-0 space-y-4 pt-4 pl-6 leading-relaxed",
29860
29878
  "transform-gpu transition-[transform,opacity]",
29861
29879
  "group-data-[state=open]/collapsible-content:animate-in",
@@ -29883,9 +29901,9 @@ const WU = () => /* @__PURE__ */ g(N0, {}), HU = ({
29883
29901
  const i = r.parts.length - 1;
29884
29902
  return i < 0 || r.parts[i]?.type !== "reasoning" ? !1 : i >= t && i <= n;
29885
29903
  });
29886
- return /* @__PURE__ */ q(D0, { children: [
29904
+ return /* @__PURE__ */ q(M0, { children: [
29887
29905
  /* @__PURE__ */ g(JU, { active: o }),
29888
- /* @__PURE__ */ g(M0, { "aria-busy": o, children: /* @__PURE__ */ g(U0, { children: e }) })
29906
+ /* @__PURE__ */ g(D0, { "aria-busy": o, children: /* @__PURE__ */ g(U0, { children: e }) })
29889
29907
  ] });
29890
29908
  }, L0 = Gu(WU);
29891
29909
  L0.displayName = "Reasoning";
@@ -30442,8 +30460,8 @@ function z6(e) {
30442
30460
  return !1;
30443
30461
  if (!o.current && "changedTouches" in m && (S || v) && (o.current = k), !k)
30444
30462
  return !0;
30445
- var D = o.current || k;
30446
- return P6(D, b, m, D === "h" ? S : v);
30463
+ var z = o.current || k;
30464
+ return P6(z, b, m, z === "h" ? S : v);
30447
30465
  }, []), l = _.useCallback(function(m) {
30448
30466
  var b = m;
30449
30467
  if (!(!Vr.length || Vr[Vr.length - 1] !== i)) {
@@ -30499,12 +30517,12 @@ function j6(e) {
30499
30517
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
30500
30518
  return t;
30501
30519
  }
30502
- const D6 = d6(J0, z6);
30520
+ const M6 = d6(J0, z6);
30503
30521
  var Nd = _.forwardRef(function(e, t) {
30504
- return _.createElement(gs, Rt({}, e, { ref: t, sideCar: D6 }));
30522
+ return _.createElement(gs, Rt({}, e, { ref: t, sideCar: M6 }));
30505
30523
  });
30506
30524
  Nd.classNames = gs.classNames;
30507
- var M6 = function(e) {
30525
+ var D6 = function(e) {
30508
30526
  if (typeof document > "u")
30509
30527
  return null;
30510
30528
  var t = Array.isArray(e) ? e[0] : e;
@@ -30548,7 +30566,7 @@ var M6 = function(e) {
30548
30566
  };
30549
30567
  }, Q0 = function(e, t, n) {
30550
30568
  n === void 0 && (n = "data-aria-hidden");
30551
- var o = Array.from(Array.isArray(e) ? e : [e]), r = M6(e);
30569
+ var o = Array.from(Array.isArray(e) ? e : [e]), r = D6(e);
30552
30570
  return r ? (o.push.apply(o, Array.from(r.querySelectorAll("[aria-live], script"))), L6(o, r, n, "aria-hidden")) : function() {
30553
30571
  return null;
30554
30572
  };
@@ -30754,7 +30772,7 @@ dx.displayName = cx;
30754
30772
  function Ad(e) {
30755
30773
  return e ? "open" : "closed";
30756
30774
  }
30757
- var fx = "DialogTitleWarning", [zL, px] = cD(fx, {
30775
+ var fx = "DialogTitleWarning", [zL, px] = cM(fx, {
30758
30776
  contentName: Ar,
30759
30777
  titleName: Cd,
30760
30778
  docsSlug: "dialog"
@@ -30797,7 +30815,7 @@ function s2({
30797
30815
  e2,
30798
30816
  {
30799
30817
  "data-slot": "dialog-overlay",
30800
- className: j(
30818
+ className: M(
30801
30819
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
30802
30820
  e
30803
30821
  ),
@@ -30817,7 +30835,7 @@ function u2({
30817
30835
  t2,
30818
30836
  {
30819
30837
  "data-slot": "dialog-content",
30820
- className: j(
30838
+ className: M(
30821
30839
  "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
30822
30840
  e
30823
30841
  ),
@@ -30848,7 +30866,7 @@ function l2({
30848
30866
  r2,
30849
30867
  {
30850
30868
  "data-slot": "dialog-title",
30851
- className: j("text-lg leading-none font-semibold", e),
30869
+ className: M("text-lg leading-none font-semibold", e),
30852
30870
  ...t
30853
30871
  }
30854
30872
  );
@@ -31007,7 +31025,7 @@ function w2({
31007
31025
  y2,
31008
31026
  {
31009
31027
  "data-slot": "avatar",
31010
- className: j(
31028
+ className: M(
31011
31029
  "relative flex size-8 shrink-0 overflow-hidden rounded-full",
31012
31030
  e
31013
31031
  ),
@@ -31023,7 +31041,7 @@ function $2({
31023
31041
  b2,
31024
31042
  {
31025
31043
  "data-slot": "avatar-image",
31026
- className: j("aspect-square size-full", e),
31044
+ className: M("aspect-square size-full", e),
31027
31045
  ...t
31028
31046
  }
31029
31047
  );
@@ -31036,7 +31054,7 @@ function S2({
31036
31054
  _2,
31037
31055
  {
31038
31056
  "data-slot": "avatar-fallback",
31039
- className: j(
31057
+ className: M(
31040
31058
  "bg-muted flex size-full items-center justify-center rounded-full",
31041
31059
  e
31042
31060
  ),
@@ -31130,7 +31148,7 @@ const x2 = (e) => {
31130
31148
  /* @__PURE__ */ q(
31131
31149
  su.Root,
31132
31150
  {
31133
- className: j(
31151
+ className: M(
31134
31152
  "aui-attachment-root relative",
31135
31153
  n && "aui-attachment-root-composer only:[&>#attachment-tile]:size-24"
31136
31154
  ),
@@ -31138,7 +31156,7 @@ const x2 = (e) => {
31138
31156
  /* @__PURE__ */ g(k2, { children: /* @__PURE__ */ g(xd, { asChild: !0, children: /* @__PURE__ */ g(
31139
31157
  "div",
31140
31158
  {
31141
- className: j(
31159
+ className: M(
31142
31160
  "aui-attachment-tile bg-muted size-14 cursor-pointer overflow-hidden rounded-[14px] border transition-opacity hover:opacity-75",
31143
31161
  t && "aui-attachment-tile-composer border-foreground/20"
31144
31162
  ),
@@ -31248,21 +31266,21 @@ var Ix = "PopoverTrigger", kx = _.forwardRef(
31248
31266
  }
31249
31267
  );
31250
31268
  kx.displayName = Ix;
31251
- var Dd = "PopoverPortal", [R2, z2] = $x(Dd, {
31269
+ var Md = "PopoverPortal", [R2, z2] = $x(Md, {
31252
31270
  forceMount: void 0
31253
31271
  }), Ex = (e) => {
31254
- const { __scopePopover: t, forceMount: n, children: o, container: r } = e, i = br(Dd, t);
31272
+ const { __scopePopover: t, forceMount: n, children: o, container: r } = e, i = br(Md, t);
31255
31273
  return /* @__PURE__ */ g(R2, { scope: t, forceMount: n, children: /* @__PURE__ */ g(nr, { present: n || i.open, children: /* @__PURE__ */ g(ds, { asChild: !0, container: r, children: o }) }) });
31256
31274
  };
31257
- Ex.displayName = Dd;
31275
+ Ex.displayName = Md;
31258
31276
  var mn = "PopoverContent", Ox = _.forwardRef(
31259
31277
  (e, t) => {
31260
31278
  const n = z2(mn, e.__scopePopover), { forceMount: o = n.forceMount, ...r } = e, i = br(mn, e.__scopePopover);
31261
- return /* @__PURE__ */ g(nr, { present: o || i.open, children: i.modal ? /* @__PURE__ */ g(D2, { ...r, ref: t }) : /* @__PURE__ */ g(M2, { ...r, ref: t }) });
31279
+ return /* @__PURE__ */ g(nr, { present: o || i.open, children: i.modal ? /* @__PURE__ */ g(M2, { ...r, ref: t }) : /* @__PURE__ */ g(D2, { ...r, ref: t }) });
31262
31280
  }
31263
31281
  );
31264
31282
  Ox.displayName = mn;
31265
- var j2 = /* @__PURE__ */ cd("PopoverContent.RemoveScroll"), D2 = _.forwardRef(
31283
+ var j2 = /* @__PURE__ */ cd("PopoverContent.RemoveScroll"), M2 = _.forwardRef(
31266
31284
  (e, t) => {
31267
31285
  const n = br(mn, e.__scopePopover), o = _.useRef(null), r = Ye(t, o), i = _.useRef(!1);
31268
31286
  return _.useEffect(() => {
@@ -31294,7 +31312,7 @@ var j2 = /* @__PURE__ */ cd("PopoverContent.RemoveScroll"), D2 = _.forwardRef(
31294
31312
  }
31295
31313
  ) });
31296
31314
  }
31297
- ), M2 = _.forwardRef(
31315
+ ), D2 = _.forwardRef(
31298
31316
  (e, t) => {
31299
31317
  const n = br(mn, e.__scopePopover), o = _.useRef(!1), r = _.useRef(!1);
31300
31318
  return /* @__PURE__ */ g(
@@ -31419,7 +31437,7 @@ function H2({
31419
31437
  "data-slot": "popover-content",
31420
31438
  align: t,
31421
31439
  sideOffset: n,
31422
- className: j(
31440
+ className: M(
31423
31441
  "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-20 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
31424
31442
  e
31425
31443
  ),
@@ -31439,7 +31457,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31439
31457
  return a.tools?.components?.[o[0].toolName] ? e : /* @__PURE__ */ g(ta, { features: Im, children: o.length > 1 ? /* @__PURE__ */ q(
31440
31458
  "button",
31441
31459
  {
31442
- className: j(
31460
+ className: M(
31443
31461
  "group my-4 w-full max-w-xl cursor-pointer border",
31444
31462
  t("sm")
31445
31463
  ),
@@ -31448,7 +31466,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31448
31466
  /* @__PURE__ */ q(
31449
31467
  "div",
31450
31468
  {
31451
- className: j(
31469
+ className: M(
31452
31470
  "bg-muted/40 flex items-center rounded-b-none!",
31453
31471
  t("sm"),
31454
31472
  u("py-xs"),
@@ -31461,7 +31479,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31461
31479
  /* @__PURE__ */ g(
31462
31480
  "span",
31463
31481
  {
31464
- className: j(
31482
+ className: M(
31465
31483
  "font-semibold",
31466
31484
  r && "shimmer"
31467
31485
  ),
@@ -31497,25 +31515,25 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31497
31515
  ) : /* @__PURE__ */ g(
31498
31516
  "div",
31499
31517
  {
31500
- className: j(
31518
+ className: M(
31501
31519
  "bg-muted/40 my-4 flex w-full max-w-xl cursor-pointer items-center rounded-b-none! border"
31502
31520
  ),
31503
31521
  children: e
31504
31522
  }
31505
31523
  ) });
31506
- }, Md = () => {
31524
+ }, Dd = () => {
31507
31525
  const e = jd(), t = Rr(), { config: n } = We(), o = n.components ?? {};
31508
31526
  return /* @__PURE__ */ g(ta, { features: Im, children: /* @__PURE__ */ g(Em, { reducedMotion: "user", children: /* @__PURE__ */ g(
31509
31527
  Jt.Root,
31510
31528
  {
31511
- className: j(
31529
+ className: M(
31512
31530
  "aui-root aui-thread-root bg-background @container flex h-full flex-col",
31513
31531
  e.className
31514
31532
  ),
31515
31533
  children: /* @__PURE__ */ q(
31516
31534
  Jt.Viewport,
31517
31535
  {
31518
- className: j(
31536
+ className: M(
31519
31537
  "aui-thread-viewport relative mx-auto flex w-full flex-1 flex-col overflow-x-auto overflow-y-scroll pb-0!",
31520
31538
  t("p-lg")
31521
31539
  ),
@@ -31551,7 +31569,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31551
31569
  return /* @__PURE__ */ q(
31552
31570
  "div",
31553
31571
  {
31554
- className: j(
31572
+ className: M(
31555
31573
  "aui-thread-welcome-root my-auto flex w-full grow flex-col",
31556
31574
  r ? "items-center justify-center" : "",
31557
31575
  t("gap-lg")
@@ -31560,13 +31578,13 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31560
31578
  /* @__PURE__ */ g(
31561
31579
  "div",
31562
31580
  {
31563
- className: j(
31581
+ className: M(
31564
31582
  "aui-thread-welcome-center flex w-full grow flex-col items-center justify-start"
31565
31583
  ),
31566
31584
  children: /* @__PURE__ */ q(
31567
31585
  "div",
31568
31586
  {
31569
- className: j(
31587
+ className: M(
31570
31588
  "aui-thread-welcome-message flex flex-col",
31571
31589
  r ? "items-center text-center" : "size-full justify-start",
31572
31590
  t("gap-sm"),
@@ -31580,7 +31598,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31580
31598
  animate: { opacity: 1, y: 0 },
31581
31599
  exit: { opacity: 0, y: 10 },
31582
31600
  transition: { duration: 0.25, ease: Gt },
31583
- className: j(
31601
+ className: M(
31584
31602
  "aui-thread-welcome-message-motion-1 font-semibold",
31585
31603
  t("text-title")
31586
31604
  ),
@@ -31594,7 +31612,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31594
31612
  animate: { opacity: 1, y: 0 },
31595
31613
  exit: { opacity: 0, y: 10 },
31596
31614
  transition: { duration: 0.25, delay: 0.05, ease: Gt },
31597
- className: j(
31615
+ className: M(
31598
31616
  "aui-thread-welcome-message-motion-2 text-muted-foreground/65",
31599
31617
  t("text-subtitle")
31600
31618
  ),
@@ -31615,11 +31633,11 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31615
31633
  return r.length === 0 ? null : /* @__PURE__ */ g(
31616
31634
  "div",
31617
31635
  {
31618
- className: j(
31636
+ className: M(
31619
31637
  "aui-thread-welcome-suggestions w-full",
31620
31638
  o("gap-md"),
31621
31639
  o("py-lg"),
31622
- i ? "flex flex-wrap items-center justify-center" : r.length === 1 ? "flex" : "grid @md:grid-cols-2"
31640
+ i ? "flex flex-wrap items-center justify-center" : r.length === 1 ? "flex" : "grid max-w-fit @md:grid-cols-2"
31623
31641
  ),
31624
31642
  children: r.map((a, s) => /* @__PURE__ */ g(
31625
31643
  At.div,
@@ -31632,7 +31650,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31632
31650
  delay: 0.03 * s,
31633
31651
  ease: Gt
31634
31652
  },
31635
- className: j(
31653
+ className: M(
31636
31654
  "aui-thread-welcome-suggestion-display",
31637
31655
  !i && "nth-[n+3]:hidden @md:nth-[n+3]:block"
31638
31656
  ),
@@ -31647,7 +31665,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31647
31665
  Zt,
31648
31666
  {
31649
31667
  variant: "ghost",
31650
- className: j(
31668
+ className: M(
31651
31669
  "aui-thread-welcome-suggestion dark:hover:bg-accent/60 h-auto w-full border text-left whitespace-break-spaces",
31652
31670
  o("text-base"),
31653
31671
  i ? `flex-row items-center ${o("gap-sm")} ${o("px-md")} ${o("py-sm")} ${n("full")}` : `w-full flex-1 flex-col flex-wrap items-start justify-start ${o("gap-sm")} ${o("px-lg")} ${o("py-md")} ${n("xl")}`
@@ -31674,7 +31692,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31674
31692
  return r.Composer ? /* @__PURE__ */ g(r.Composer, {}) : /* @__PURE__ */ q(
31675
31693
  "div",
31676
31694
  {
31677
- className: j(
31695
+ className: M(
31678
31696
  "aui-composer-wrapper bg-background sticky bottom-0 flex w-full flex-col overflow-visible",
31679
31697
  n("gap-md"),
31680
31698
  n("py-md"),
@@ -31685,7 +31703,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31685
31703
  /* @__PURE__ */ q(
31686
31704
  zt.Root,
31687
31705
  {
31688
- className: j(
31706
+ className: M(
31689
31707
  "aui-composer-root group/input-group border-input bg-background has-[textarea:focus-visible]:border-ring has-[textarea:focus-visible]:ring-ring/5 dark:bg-background relative flex w-full flex-col border px-1 pt-2 shadow-xs transition-[color,box-shadow] outline-none has-[textarea:focus-visible]:ring-1",
31690
31708
  t("xl")
31691
31709
  ),
@@ -31695,7 +31713,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31695
31713
  zt.Input,
31696
31714
  {
31697
31715
  placeholder: o.placeholder,
31698
- className: j(
31716
+ className: M(
31699
31717
  "aui-composer-input placeholder:text-muted-foreground mb-1 max-h-32 w-full resize-none bg-transparent px-3.5 pt-1.5 pb-3 outline-none focus-visible:ring-0",
31700
31718
  n("h-input"),
31701
31719
  n("text-base")
@@ -31776,7 +31794,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31776
31794
  return /* @__PURE__ */ q("div", { className: "aui-composer-action-wrapper relative mx-1 mt-2 mb-2 flex items-center justify-between", children: [
31777
31795
  /* @__PURE__ */ q("div", { className: "aui-composer-action-wrapper-inner flex items-center", children: [
31778
31796
  n.attachments ? /* @__PURE__ */ g(P2, {}) : /* @__PURE__ */ g("div", { className: "aui-composer-add-attachment-placeholder" }),
31779
- e.model?.showModelPicker && /* @__PURE__ */ g(eL, {})
31797
+ e.model?.showModelPicker && !e.languageModel && /* @__PURE__ */ g(eL, {})
31780
31798
  ] }),
31781
31799
  /* @__PURE__ */ g(Jt.If, { running: !1, children: /* @__PURE__ */ g(zt.Send, { asChild: !0, children: /* @__PURE__ */ g(
31782
31800
  ft,
@@ -31786,7 +31804,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31786
31804
  type: "submit",
31787
31805
  variant: "default",
31788
31806
  size: "icon",
31789
- className: j("aui-composer-send size-[34px] p-1", t("full")),
31807
+ className: M("aui-composer-send size-[34px] p-1", t("full")),
31790
31808
  "aria-label": "Send message",
31791
31809
  children: /* @__PURE__ */ g(lI, { className: "aui-composer-send-icon size-5" })
31792
31810
  }
@@ -31797,7 +31815,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31797
31815
  type: "button",
31798
31816
  variant: "default",
31799
31817
  size: "icon",
31800
- className: j(
31818
+ className: M(
31801
31819
  "aui-composer-cancel border-muted-foreground/60 hover:bg-primary/75 dark:border-muted-foreground/90 size-[34px] border",
31802
31820
  t("full")
31803
31821
  ),
@@ -31852,7 +31870,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31852
31870
  /* @__PURE__ */ g(dr.If, { copied: !0, children: /* @__PURE__ */ g(fo, {}) }),
31853
31871
  /* @__PURE__ */ g(dr.If, { copied: !1, children: /* @__PURE__ */ g(Cm, {}) })
31854
31872
  ] }) }),
31855
- /* @__PURE__ */ g(Un.Reload, { asChild: !0, children: /* @__PURE__ */ g(ft, { tooltip: "Refresh", children: /* @__PURE__ */ g(MI, {}) }) })
31873
+ /* @__PURE__ */ g(Un.Reload, { asChild: !0, children: /* @__PURE__ */ g(ft, { tooltip: "Refresh", children: /* @__PURE__ */ g(DI, {}) }) })
31856
31874
  ]
31857
31875
  }
31858
31876
  ), aL = () => {
@@ -31868,7 +31886,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31868
31886
  /* @__PURE__ */ g(
31869
31887
  "div",
31870
31888
  {
31871
- className: j(
31889
+ className: M(
31872
31890
  "aui-user-message-content bg-muted text-foreground px-5 py-2.5 wrap-break-word",
31873
31891
  e("xl")
31874
31892
  ),
@@ -31908,7 +31926,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31908
31926
  On.Root,
31909
31927
  {
31910
31928
  hideWhenSingleBranch: !0,
31911
- className: j(
31929
+ className: M(
31912
31930
  "aui-branch-picker-root text-muted-foreground mr-2 -ml-2 inline-flex items-center text-xs",
31913
31931
  e
31914
31932
  ),
@@ -31956,7 +31974,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31956
31974
  return /* @__PURE__ */ g(ta, { features: Om, children: /* @__PURE__ */ g(Em, { reducedMotion: "user", transition: lL, children: /* @__PURE__ */ g(
31957
31975
  "div",
31958
31976
  {
31959
- className: j(
31977
+ className: M(
31960
31978
  "aui-root aui-modal-anchor fixed z-10",
31961
31979
  p,
31962
31980
  t.className,
@@ -31968,7 +31986,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31968
31986
  {
31969
31987
  layout: !0,
31970
31988
  layoutId: "chat-container",
31971
- className: j(
31989
+ className: M(
31972
31990
  "aui-modal-content bg-popover text-popover-foreground flex flex-col overflow-hidden border [&>.aui-thread-root]:bg-inherit",
31973
31991
  n("lg")
31974
31992
  ),
@@ -31984,7 +32002,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31984
32002
  /* @__PURE__ */ q(
31985
32003
  At.div,
31986
32004
  {
31987
- className: j(
32005
+ className: M(
31988
32006
  "aui-modal-header flex shrink-0 items-center justify-between border-b",
31989
32007
  o("h-header"),
31990
32008
  o("px-lg")
@@ -31997,10 +32015,10 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
31997
32015
  ease: Gt
31998
32016
  },
31999
32017
  children: [
32000
- /* @__PURE__ */ g("div", { className: j("flex min-w-0 items-center"), children: /* @__PURE__ */ q(
32018
+ /* @__PURE__ */ g("div", { className: M("flex min-w-0 items-center"), children: /* @__PURE__ */ q(
32001
32019
  "span",
32002
32020
  {
32003
- className: j(
32021
+ className: M(
32004
32022
  "text-md flex items-center gap-2 truncate font-medium",
32005
32023
  b && "shimmer"
32006
32024
  ),
@@ -32022,7 +32040,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
32022
32040
  {
32023
32041
  type: "button",
32024
32042
  onClick: () => l((v) => !v),
32025
- className: j(
32043
+ className: M(
32026
32044
  "text-muted-foreground hover:text-foreground hover:bg-accent flex h-8 cursor-pointer items-center rounded-md px-2 text-xs transition-colors"
32027
32045
  ),
32028
32046
  "aria-pressed": s,
@@ -32068,7 +32086,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
32068
32086
  delay: 0.05,
32069
32087
  ease: Gt
32070
32088
  },
32071
- children: /* @__PURE__ */ g(Md, {})
32089
+ children: /* @__PURE__ */ g(Dd, {})
32072
32090
  }
32073
32091
  )
32074
32092
  ]
@@ -32080,7 +32098,7 @@ const Gt = [0.23, 1, 0.32, 1], G2 = ({ children: e }) => {
32080
32098
  layout: !0,
32081
32099
  layoutId: "chat-container",
32082
32100
  onClick: () => i(!0),
32083
- className: j(
32101
+ className: M(
32084
32102
  "aui-modal-button bg-primary text-primary-foreground flex size-12 cursor-pointer items-center justify-center border shadow-lg transition-shadow hover:shadow-xl",
32085
32103
  n("full")
32086
32104
  ),
@@ -32134,7 +32152,7 @@ const fL = () => {
32134
32152
  height: i ? r?.expanded?.height ?? "100%" : r?.default?.height ?? "100vh"
32135
32153
  },
32136
32154
  transition: { duration: 0.3, ease: Gt },
32137
- className: j(
32155
+ className: M(
32138
32156
  "aui-root aui-sidecar bg-popover text-popover-foreground fixed top-0 right-0 border-l",
32139
32157
  t.className
32140
32158
  ),
@@ -32143,7 +32161,7 @@ const fL = () => {
32143
32161
  /* @__PURE__ */ g(
32144
32162
  "span",
32145
32163
  {
32146
- className: j(
32164
+ className: M(
32147
32165
  "flex items-center gap-2 text-sm font-medium",
32148
32166
  l && "shimmer"
32149
32167
  ),
@@ -32161,7 +32179,7 @@ const fL = () => {
32161
32179
  }
32162
32180
  ) })
32163
32181
  ] }),
32164
- /* @__PURE__ */ g("div", { className: "aui-sidecar-content h-[calc(100%-3.5rem)] overflow-hidden", children: /* @__PURE__ */ g(Md, {}) })
32182
+ /* @__PURE__ */ g("div", { className: "aui-sidecar-content h-[calc(100%-3.5rem)] overflow-hidden", children: /* @__PURE__ */ g(Dd, {}) })
32165
32183
  ]
32166
32184
  }
32167
32185
  ) });
@@ -32169,7 +32187,7 @@ const fL = () => {
32169
32187
  const { config: e } = We();
32170
32188
  switch (e.variant) {
32171
32189
  case "standalone":
32172
- return /* @__PURE__ */ g(Md, {});
32190
+ return /* @__PURE__ */ g(Dd, {});
32173
32191
  case "sidecar":
32174
32192
  return /* @__PURE__ */ g(fL, {});
32175
32193
  case "widget":