@multiplayer-app/ai-agent-react 0.1.0-beta.88 → 0.1.0-beta.90

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.
@@ -247,7 +247,7 @@ var sd;
247
247
  })(sd || (sd = {}));
248
248
  var Kr;
249
249
  (function(e) {
250
- e.Processing = "processing", e.Streaming = "streaming", e.Finished = "finished", e.Aborted = "aborted", e.WaitingForUserAction = "waitingForUserAction", e.Error = "error";
250
+ e.Processing = "processing", e.Streaming = "streaming", e.Finished = "finished", e.Aborted = "aborted", e.WaitingForUserAction = "waitingForUserAction", e.Error = "error", e.Timedout = "timedout";
251
251
  })(Kr || (Kr = {}));
252
252
  var Kh;
253
253
  (function(e) {
@@ -29897,8 +29897,8 @@ function pp(e, t) {
29897
29897
  Array.from(N).every((fe) => !Nr(K, fe)))
29898
29898
  return;
29899
29899
  if (Ct($) && Q) {
29900
- const fe = Hn($), ke = hn($), Ce = /auto|scroll/, Pe = fe || Ce.test(ke.overflowX), ot = fe || Ce.test(ke.overflowY), We = Pe && $.clientWidth > 0 && $.scrollWidth > $.clientWidth, re = ot && $.clientHeight > 0 && $.scrollHeight > $.clientHeight, Se = ke.direction === "rtl", Ue = re && (Se ? W.offsetX <= $.offsetWidth - $.clientWidth : W.offsetX > $.clientWidth), Ye = We && W.offsetY > $.clientHeight;
29901
- if (Ue || Ye)
29900
+ const fe = Hn($), ke = hn($), Ce = /auto|scroll/, Pe = fe || Ce.test(ke.overflowX), ot = fe || Ce.test(ke.overflowY), We = Pe && $.clientWidth > 0 && $.scrollWidth > $.clientWidth, re = ot && $.clientHeight > 0 && $.scrollHeight > $.clientHeight, Se = ke.direction === "rtl", He = re && (Se ? W.offsetX <= $.offsetWidth - $.clientWidth : W.offsetX > $.clientWidth), Ye = We && W.offsetY > $.clientHeight;
29901
+ if (He || Ye)
29902
29902
  return;
29903
29903
  }
29904
29904
  const J = (R = i.current.floatingContext) == null ? void 0 : R.nodeId, O = f && ka(f.nodesRef.current, J).some((fe) => {
@@ -30287,7 +30287,7 @@ function i7e(e, t) {
30287
30287
  }, [e, E]);
30288
30288
  const R = Qt(() => {
30289
30289
  l($.current === -1 ? null : $.current);
30290
- }), U = G6e(a.domReference), H = ee.useRef(w), $ = ee.useRef(d ?? -1), V = ee.useRef(null), N = ee.useRef(!0), K = ee.useRef(R), J = ee.useRef(!!a.floating), O = ee.useRef(n), le = ee.useRef(!1), fe = ee.useRef(!1), ke = Bn(_), Ce = Bn(n), Pe = Bn(D), ot = Bn(d), [We, re] = ee.useState(), [Se, Ue] = ee.useState(), Ye = Qt(() => {
30290
+ }), U = G6e(a.domReference), H = ee.useRef(w), $ = ee.useRef(d ?? -1), V = ee.useRef(null), N = ee.useRef(!0), K = ee.useRef(R), J = ee.useRef(!!a.floating), O = ee.useRef(n), le = ee.useRef(!1), fe = ee.useRef(!1), ke = Bn(_), Ce = Bn(n), Pe = Bn(D), ot = Bn(d), [We, re] = ee.useState(), [Se, He] = ee.useState(), Ye = Qt(() => {
30291
30291
  function ce(q) {
30292
30292
  if (f) {
30293
30293
  var Y;
@@ -30339,7 +30339,7 @@ function i7e(e, t) {
30339
30339
  if (!u || !W || !f || Q)
30340
30340
  return;
30341
30341
  function ce(Me) {
30342
- Ue(Me.id), P && (P.current = Me);
30342
+ He(Me.id), P && (P.current = Me);
30343
30343
  }
30344
30344
  return W.events.on("virtualfocus", ce), () => {
30345
30345
  W.events.off("virtualfocus", ce);
@@ -30465,7 +30465,7 @@ function i7e(e, t) {
30465
30465
  onPointerMove() {
30466
30466
  N.current = !0;
30467
30467
  }
30468
- }), [tt, de, E, U]), Ve = ee.useMemo(() => {
30468
+ }), [tt, de, E, U]), je = ee.useMemo(() => {
30469
30469
  function ce(ye) {
30470
30470
  w === "auto" && Z6e(ye.nativeEvent) && (H.current = !0);
30471
30471
  }
@@ -30487,7 +30487,7 @@ function i7e(e, t) {
30487
30487
  if (te || pe) {
30488
30488
  var Mt, Qn;
30489
30489
  const N7 = ((Mt = Ot.context) == null ? void 0 : Mt.elements.domReference) === ye.currentTarget, Uh = pe && !N7 ? (Qn = Ot.context) == null ? void 0 : Qn.elements.domReference : te ? o.current.find((Hh) => Hh?.id === We) : null;
30490
- Uh && (an(ye), Uh.dispatchEvent(qt), Ue(void 0));
30490
+ Uh && (an(ye), Uh.dispatchEvent(qt), He(void 0));
30491
30491
  }
30492
30492
  if ((Le || q) && Ot.context && Ot.context.open && Ot.parentId && ye.currentTarget !== Ot.context.elements.domReference) {
30493
30493
  var Jn;
@@ -30519,10 +30519,10 @@ function i7e(e, t) {
30519
30519
  };
30520
30520
  }, [We, tt, x, de, ke, w, o, h, R, r, n, k, E, Ke, g, d, W, f, P]);
30521
30521
  return ee.useMemo(() => u ? {
30522
- reference: Ve,
30522
+ reference: je,
30523
30523
  floating: Ze,
30524
30524
  item: ve
30525
- } : {}, [u, Ve, Ze, ve]);
30525
+ } : {}, [u, je, Ze, ve]);
30526
30526
  }
30527
30527
  const o7e = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
30528
30528
  function fp(e, t) {
@@ -30675,7 +30675,7 @@ const An = ({
30675
30675
  }
30676
30676
  }, "aria-label": "Copy message", size: "sm" }) });
30677
30677
  }, gn = () => {
30678
- const e = Ge();
30678
+ const e = Ue();
30679
30679
  return { ...od, ...e.config.translations ?? {} };
30680
30680
  }, x2 = 300, c3 = Rt(({ field: e, isExpanded: t, canApply: n, onToggleExpand: r, onApply: a }) => {
30681
30681
  const i = gn(), o = e.value.length > x2, s = o && !t ? `${e.value.slice(0, x2)}...` : e.value, l = Xe(() => {
@@ -30733,7 +30733,7 @@ const Ha = 30 * 1e3, Va = 5 * 60 * 1e3, u3 = 20, on = {
30733
30733
  data: [],
30734
30734
  cursor: { total: 0, skip: 0, limit: e }
30735
30735
  }), CVe = (e) => {
30736
- const t = Ge(), {
30736
+ const t = Ue(), {
30737
30737
  groupId: n,
30738
30738
  parentId: r,
30739
30739
  sourceType: a,
@@ -30776,7 +30776,7 @@ const Ha = 30 * 1e3, Va = 5 * 60 * 1e3, u3 = 20, on = {
30776
30776
  gcTime: Va
30777
30777
  });
30778
30778
  }, RVe = (e) => {
30779
- const t = Ge(), {
30779
+ const t = Ue(), {
30780
30780
  groupId: n,
30781
30781
  parentId: r,
30782
30782
  sourceType: a,
@@ -30820,7 +30820,7 @@ const Ha = 30 * 1e3, Va = 5 * 60 * 1e3, u3 = 20, on = {
30820
30820
  hasPreviousPage: i > 1
30821
30821
  };
30822
30822
  }, IVe = (e) => {
30823
- const t = Ge();
30823
+ const t = Ue();
30824
30824
  return fr({
30825
30825
  queryKey: on.detail(e),
30826
30826
  queryFn: async () => !e || !t.transport.getActivity ? null : t.transport.getActivity(e),
@@ -30829,7 +30829,7 @@ const Ha = 30 * 1e3, Va = 5 * 60 * 1e3, u3 = 20, on = {
30829
30829
  gcTime: Va
30830
30830
  });
30831
30831
  }, OVe = (e) => {
30832
- const t = Ge(), { enabled: n = !0, ...r } = e ?? {};
30832
+ const t = Ue(), { enabled: n = !0, ...r } = e ?? {};
30833
30833
  return fr({
30834
30834
  queryKey: on.summary(r),
30835
30835
  queryFn: async () => t.transport.getActivitySummary ? t.transport.getActivitySummary(r) : [],
@@ -30838,7 +30838,7 @@ const Ha = 30 * 1e3, Va = 5 * 60 * 1e3, u3 = 20, on = {
30838
30838
  gcTime: Va
30839
30839
  });
30840
30840
  }, LVe = (e) => {
30841
- const t = Ge(), { enabled: n = !0, groupId: r, parentId: a, from: i, to: o, tenant: s, ownerId: l } = e ?? {}, u = i instanceof Date ? i.toISOString() : i, d = o instanceof Date ? o.toISOString() : o;
30841
+ const t = Ue(), { enabled: n = !0, groupId: r, parentId: a, from: i, to: o, tenant: s, ownerId: l } = e ?? {}, u = i instanceof Date ? i.toISOString() : i, d = o instanceof Date ? o.toISOString() : o;
30842
30842
  return fr({
30843
30843
  queryKey: on.sourceTypes({ groupId: r, parentId: a, from: u, to: d, tenant: s, ownerId: l }),
30844
30844
  queryFn: async () => t.transport.listActivitySourceTypes ? t.transport.listActivitySourceTypes({
@@ -30871,7 +30871,7 @@ const h3 = 30 * 1e3, m3 = 5 * 60 * 1e3, yp = 20, ar = {
30871
30871
  infinite: (e) => [...ar.infinites(), e],
30872
30872
  detail: (e) => [...ar.all, "detail", e]
30873
30873
  }, s7e = (e) => e?.pages.flatMap((t) => t.data) ?? [], f3 = (e) => {
30874
- const t = Ge(), n = t.config.user?.id ?? na(), r = t.config.appId, {
30874
+ const t = Ue(), n = t.config.user?.id ?? na(), r = t.config.appId, {
30875
30875
  pageSize: a = yp,
30876
30876
  sortOrder: i = "desc",
30877
30877
  sortField: o = "updatedAt",
@@ -30898,7 +30898,7 @@ const h3 = 30 * 1e3, m3 = 5 * 60 * 1e3, yp = 20, ar = {
30898
30898
  gcTime: m3
30899
30899
  });
30900
30900
  }, l7e = f3, DVe = (e) => {
30901
- const t = Ge(), n = t.config.user?.id ?? na(), r = t.config.appId, {
30901
+ const t = Ue(), n = t.config.user?.id ?? na(), r = t.config.appId, {
30902
30902
  page: a,
30903
30903
  pageSize: i = yp,
30904
30904
  sortOrder: o = "desc",
@@ -31014,7 +31014,7 @@ const h3 = 30 * 1e3, m3 = 5 * 60 * 1e3, yp = 20, ar = {
31014
31014
  checkIsNearBottom: m
31015
31015
  };
31016
31016
  }, c7e = () => {
31017
- const e = Ge();
31017
+ const e = Ue();
31018
31018
  return fr({
31019
31019
  queryKey: ["mp-agents", "models"],
31020
31020
  queryFn: async () => e.transport.listModels ? await e.transport.listModels() : [],
@@ -31394,7 +31394,7 @@ const Wi = (e) => e === Kr.Streaming || e === Kr.Processing || e === Kr.WaitingF
31394
31394
  removeAttachment: (s) => o(e, s)
31395
31395
  };
31396
31396
  }, p7e = (e) => {
31397
- const t = Ge();
31397
+ const t = Ue();
31398
31398
  return fr({
31399
31399
  queryKey: ["mp-agents", "configurations", e ?? "all"],
31400
31400
  queryFn: async () => t.transport.listAgentConfigurations ? t.transport.listAgentConfigurations(e) : [],
@@ -31402,12 +31402,12 @@ const Wi = (e) => e === Kr.Streaming || e === Kr.Processing || e === Kr.WaitingF
31402
31402
  refetchOnWindowFocus: !1
31403
31403
  });
31404
31404
  }, zVe = (e, t = []) => {
31405
- const n = Ge(), r = Fe(e), a = Xe(e, t);
31405
+ const n = Ue(), r = Fe(e), a = Xe(e, t);
31406
31406
  r.current = a;
31407
31407
  const i = Xe((o) => r.current(o), []);
31408
31408
  $e(() => n.registerPageContextProvider(i), [n, i]);
31409
31409
  }, h7e = (e) => {
31410
- const t = Ge();
31410
+ const t = Ue();
31411
31411
  return Xe(
31412
31412
  (r) => {
31413
31413
  t.events.dispatchEvent(
@@ -31419,7 +31419,7 @@ const Wi = (e) => e === Kr.Streaming || e === Kr.Processing || e === Kr.WaitingF
31419
31419
  [t, e]
31420
31420
  );
31421
31421
  }, m7e = (e, t, n = [], r) => {
31422
- const a = Ge(), i = Fe(t), o = Xe(t, n);
31422
+ const a = Ue(), i = Fe(t), o = Xe(t, n);
31423
31423
  i.current = o;
31424
31424
  const s = Xe((u) => {
31425
31425
  i.current(u);
@@ -31436,7 +31436,7 @@ const Wi = (e) => e === Kr.Streaming || e === Kr.Processing || e === Kr.WaitingF
31436
31436
  [n, e, t]
31437
31437
  );
31438
31438
  }, f7e = ["mp-agents", "configurations"], g7e = () => {
31439
- const e = Ge(), t = w5(), n = () => t.invalidateQueries({
31439
+ const e = Ue(), t = w5(), n = () => t.invalidateQueries({
31440
31440
  queryKey: f7e
31441
31441
  }), r = Vh({
31442
31442
  mutationFn: async ({ agentName: i, input: o }) => {
@@ -31458,7 +31458,7 @@ const Wi = (e) => e === Kr.Streaming || e === Kr.Processing || e === Kr.WaitingF
31458
31458
  upsertBatch: a
31459
31459
  };
31460
31460
  }, y7e = () => {
31461
- const e = Ge(), t = be((s) => s.activeChatId), n = be((s) => s.upsertChat), r = be((s) => s.setActiveChat), a = be((s) => s.setChatStatus), o = fr({
31461
+ const e = Ue(), t = be((s) => s.activeChatId), n = be((s) => s.upsertChat), r = be((s) => s.setActiveChat), a = be((s) => s.setChatStatus), o = fr({
31462
31462
  queryKey: ["mp-agents", "chat", t],
31463
31463
  queryFn: () => e.transport.getChat(t),
31464
31464
  enabled: !!t,
@@ -31471,7 +31471,7 @@ const Wi = (e) => e === Kr.Streaming || e === Kr.Processing || e === Kr.WaitingF
31471
31471
  o.isError && t && r(void 0);
31472
31472
  }, [o.isError, t, r]), o;
31473
31473
  }, b7e = 20, b3 = (e) => {
31474
- const t = Ge(), n = t.config.messagesPageSize ?? b7e, r = be((o) => o.setChatMessages), a = be((o) => !!(e && o.chats[e])), i = Qd({
31474
+ const t = Ue(), n = t.config.messagesPageSize ?? b7e, r = be((o) => o.setChatMessages), a = be((o) => !!(e && o.chats[e])), i = Qd({
31475
31475
  queryKey: ["mp-agents", "messages", e, n],
31476
31476
  queryFn: async ({ pageParam: o }) => {
31477
31477
  if (!e || !t.transport.getMessages)
@@ -31496,7 +31496,7 @@ const Wi = (e) => e === Kr.Streaming || e === Kr.Processing || e === Kr.WaitingF
31496
31496
  });
31497
31497
  }, [e, i.data, r]), i;
31498
31498
  }, k3 = () => {
31499
- const e = Ge(), t = e.config.user?.id ?? na(), n = be((u) => u.activeChatId), r = be((u) => u.removeChat), a = be((u) => u.setActiveChat), [i, o] = et(/* @__PURE__ */ new Set()), s = Xe(
31499
+ const e = Ue(), t = e.config.user?.id ?? na(), n = be((u) => u.activeChatId), r = be((u) => u.removeChat), a = be((u) => u.setActiveChat), [i, o] = et(/* @__PURE__ */ new Set()), s = Xe(
31500
31500
  async (u) => {
31501
31501
  o((d) => new Set(d).add(u));
31502
31502
  try {
@@ -31545,7 +31545,7 @@ const Wi = (e) => e === Kr.Streaming || e === Kr.Processing || e === Kr.WaitingF
31545
31545
  applyAllButtonText: n,
31546
31546
  showStatus: r = !0
31547
31547
  }) => {
31548
- const a = Ge(), i = h7e(O5), o = gn(), s = lt(() => v7e(e), [e]), [l, u] = et(/* @__PURE__ */ new Set()), d = lt(() => {
31548
+ const a = Ue(), i = h7e(O5), o = gn(), s = lt(() => v7e(e), [e]), [l, u] = et(/* @__PURE__ */ new Set()), d = lt(() => {
31549
31549
  const x = (e.output ?? {})?._mp?.lastAction, D = typeof x?.action == "string" ? x.action : void 0, P = typeof x?.at == "string" ? x.at : void 0;
31550
31550
  return { action: D, at: P };
31551
31551
  }, [e.output]), p = lt(() => d.action === "apply", [d.action]), m = lt(() => d.action === "reject", [d.action]), h = lt(
@@ -31775,8 +31775,6 @@ class S7e {
31775
31775
  const n = Gh.parse(t);
31776
31776
  this.config = {
31777
31777
  ...n,
31778
- toolRenderers: t.toolRenderers,
31779
- composerAttachmentActions: t.composerAttachmentActions,
31780
31778
  // Preserve tool handlers which are functions and can't be validated by Zod
31781
31779
  tools: t.tools,
31782
31780
  // Preserve optional pageContext hooks which are functions and can't be validated by Zod
@@ -31784,7 +31782,11 @@ class S7e {
31784
31782
  // Merge user translations with defaults
31785
31783
  translations: t.translations ? { ...od, ...t.translations } : od,
31786
31784
  // Preserve onError callback from transport config (stripped by Zod since it's a function)
31787
- transport: t.transport.onError ? { ...n.transport, onError: t.transport.onError } : n.transport
31785
+ transport: t.transport.onError ? { ...n.transport, onError: t.transport.onError } : n.transport,
31786
+ // Preserve ReactNode values which are stripped by Zod
31787
+ toolRenderers: t.toolRenderers,
31788
+ contextAttachmentIcons: t.contextAttachmentIcons,
31789
+ composerAttachmentActions: t.composerAttachmentActions
31788
31790
  }, this.transport = this.createTransport(this.config.transport), this.tools = new e_(this.config.tools), this.tools.bindInvoke(this.invokeTool.bind(this)), this.configureTransportAfterCreate(this.transport), Object.entries(t.toolRenderers ?? {}).forEach(([r, a]) => {
31789
31791
  a && this.toolRendererMap.set(r, a);
31790
31792
  }), this.toolRendererMap.has("propose_form_values") || this.toolRendererMap.set("propose_form_values", _7e), this.queryClient = new T7({
@@ -34401,7 +34403,7 @@ Object.assign(Oi, {
34401
34403
  connect: Oi
34402
34404
  });
34403
34405
  const T_e = Zd(null), C_e = ({ children: e }) => {
34404
- const t = Ge(), n = be((v) => v.upsertChat), r = be((v) => v.upsertChatState), a = be((v) => v.contextKey), i = be((v) => v.activeChatId), o = lt(() => t.config.user?.id ?? na(), [t.config.user?.id]), s = t.config.transport, [l, u] = et(null), [d, p] = et(void 0), m = Fe(a), h = Fe(n), g = Fe(r), f = Fe(void 0);
34406
+ const t = Ue(), n = be((v) => v.upsertChat), r = be((v) => v.upsertChatState), a = be((v) => v.contextKey), i = be((v) => v.activeChatId), o = lt(() => t.config.user?.id ?? na(), [t.config.user?.id]), s = t.config.transport, [l, u] = et(null), [d, p] = et(void 0), m = Fe(a), h = Fe(n), g = Fe(r), f = Fe(void 0);
34405
34407
  $e(() => {
34406
34408
  m.current = a, h.current = n, g.current = r;
34407
34409
  }, [a, n, r]), $e(() => {
@@ -34514,7 +34516,7 @@ const T_e = Zd(null), C_e = ({ children: e }) => {
34514
34516
  D7e(u, l);
34515
34517
  });
34516
34518
  }, []), /* @__PURE__ */ C(Ep.Provider, { value: i, children: /* @__PURE__ */ C(C7, { client: i.runtime.queryClient, children: /* @__PURE__ */ C(T7e, { value: i.runtime.config.theme, children: /* @__PURE__ */ C(C_e, { children: t }) }) }) });
34517
- }, Ge = () => {
34519
+ }, Ue = () => {
34518
34520
  const e = Xd(Ep);
34519
34521
  if (!e)
34520
34522
  throw new Error("useAgentRuntime must be used inside <AgentProvider />");
@@ -34530,7 +34532,7 @@ const T_e = Zd(null), C_e = ({ children: e }) => {
34530
34532
  multiUser: n = !1,
34531
34533
  participantIds: r = []
34532
34534
  }) => {
34533
- const a = Ge(), {
34535
+ const a = Ue(), {
34534
34536
  composer: i,
34535
34537
  contextKey: o,
34536
34538
  activeChatId: s,
@@ -34600,9 +34602,9 @@ const T_e = Zd(null), C_e = ({ children: e }) => {
34600
34602
  const ce = await Z(V, K);
34601
34603
  ce && ce.trim().length > 0 && (ke = { ...ke ?? {}, title: ce });
34602
34604
  }
34603
- const Ce = a.store.getState(), Pe = s ? Ce.chats[s] : void 0, We = (s ? Ce.chatState[s] : void 0)?.messages ?? [], re = N.filter((ce) => P3(ce) ? !I_e(We, ce) : !0), Se = Pe?.model, Ue = i.model !== Se;
34605
+ const Ce = a.store.getState(), Pe = s ? Ce.chats[s] : void 0, We = (s ? Ce.chatState[s] : void 0)?.messages ?? [], re = N.filter((ce) => P3(ce) ? !I_e(We, ce) : !0), Se = Pe?.model, He = i.model !== Se;
34604
34606
  let Ye, Ae = !1;
34605
- Ue ? (Ye = i.model, Ae = !0) : Se ? (Ye = Se, Ae = !1) : (Ye = void 0, Ae = !1);
34607
+ He ? (Ye = i.model, Ae = !0) : Se ? (Ye = Se, Ae = !1) : (Ye = void 0, Ae = !1);
34606
34608
  const ve = O_e(V), Ke = {
34607
34609
  userId: K,
34608
34610
  content: V,
@@ -34635,7 +34637,7 @@ const T_e = Zd(null), C_e = ({ children: e }) => {
34635
34637
  } catch (ce) {
34636
34638
  return tt(ce);
34637
34639
  }
34638
- }, Ve = async () => {
34640
+ }, je = async () => {
34639
34641
  let ce = `pending-${Date.now()}`, Me = "", ye;
34640
34642
  m(le.current, Nt.Streaming), v(le.current, {
34641
34643
  id: ce,
@@ -34693,7 +34695,7 @@ const T_e = Zd(null), C_e = ({ children: e }) => {
34693
34695
  }
34694
34696
  };
34695
34697
  try {
34696
- const ce = await (n ? Ze() : Ve());
34698
+ const ce = await (n ? Ze() : je());
34697
34699
  return ce.type === "success" && (D.current = !1), ce;
34698
34700
  } catch (ce) {
34699
34701
  de();
@@ -34899,14 +34901,17 @@ function z_e() {
34899
34901
  // All types allowed by default
34900
34902
  };
34901
34903
  }
34902
- const q3 = (e) => {
34904
+ const q3 = (e, t) => {
34903
34905
  switch (e.type) {
34904
34906
  case bt.Link:
34905
34907
  return /* @__PURE__ */ C(A5, { size: 12 });
34906
34908
  case bt.Artifact:
34907
34909
  return /* @__PURE__ */ C(ho, { size: 12 });
34908
- case bt.Context:
34909
- switch (e?.metadata?.kind) {
34910
+ case bt.Context: {
34911
+ const n = e?.metadata?.kind;
34912
+ if (n && t?.[n])
34913
+ return t[n];
34914
+ switch (n) {
34910
34915
  case "pageContext":
34911
34916
  return /* @__PURE__ */ C(tp, { size: 12 });
34912
34917
  case "formSnapshot":
@@ -34915,62 +34920,66 @@ const q3 = (e) => {
34915
34920
  default:
34916
34921
  return /* @__PURE__ */ C(np, { size: 12 });
34917
34922
  }
34923
+ }
34918
34924
  case bt.File:
34919
34925
  default:
34920
34926
  return /* @__PURE__ */ C(S5, { size: 12 });
34921
34927
  }
34922
- }, F_e = ({ attachments: e }) => !e || e.length === 0 ? null : /* @__PURE__ */ C("div", { className: "mp-agent-message-attachments", "aria-label": "Message attachments", children: e.map((t, n) => {
34923
- const r = /* @__PURE__ */ se(en, { children: [
34924
- /* @__PURE__ */ C("span", { className: "mp-agent-message-attachment-icon", children: q3(t) }),
34925
- /* @__PURE__ */ C("span", { className: "mp-agent-message-attachment-name", children: t.name })
34926
- ] });
34927
- return t.url ? /* @__PURE__ */ C(
34928
- "a",
34929
- {
34930
- className: "mp-agent-message-attachment",
34931
- href: t.url,
34932
- target: "_blank",
34933
- rel: "noreferrer",
34934
- title: t.url,
34935
- children: r
34936
- },
34937
- t.id || n
34938
- ) : /* @__PURE__ */ C("span", { className: "mp-agent-message-attachment", title: t.mimeType ?? t.name, children: r }, t.id || n);
34939
- }) }), P_e = ({ attachments: e, onRemove: t, uploadProgress: n, uploadErrors: r }) => {
34940
- const a = gn();
34941
- return !e || e.length === 0 ? null : /* @__PURE__ */ C("div", { className: "mp-agent-composer-attachments", "aria-label": a.attachments, children: e.map((i) => {
34942
- const o = n?.get(i.id), s = r?.get(i.name), l = i.metadata?.size || i.size, u = l ? ` (${Mp(l)})` : "";
34928
+ }, F_e = ({ attachments: e }) => {
34929
+ const { config: t } = Ue();
34930
+ return !e || e.length === 0 ? null : /* @__PURE__ */ C("div", { className: "mp-agent-message-attachments", "aria-label": "Message attachments", children: e.map((n, r) => {
34931
+ const a = /* @__PURE__ */ se(en, { children: [
34932
+ /* @__PURE__ */ C("span", { className: "mp-agent-message-attachment-icon", children: q3(n, t.contextAttachmentIcons) }),
34933
+ /* @__PURE__ */ C("span", { className: "mp-agent-message-attachment-name", children: n.name })
34934
+ ] });
34935
+ return n.url ? /* @__PURE__ */ C(
34936
+ "a",
34937
+ {
34938
+ className: "mp-agent-message-attachment",
34939
+ href: n.url,
34940
+ target: "_blank",
34941
+ rel: "noreferrer",
34942
+ title: n.url,
34943
+ children: a
34944
+ },
34945
+ n.id || r
34946
+ ) : /* @__PURE__ */ C("span", { className: "mp-agent-message-attachment", title: n.mimeType ?? n.name, children: a }, n.id || r);
34947
+ }) });
34948
+ }, P_e = ({ attachments: e, onRemove: t, uploadProgress: n, uploadErrors: r }) => {
34949
+ const a = gn(), { config: i } = Ue();
34950
+ return !e || e.length === 0 ? null : /* @__PURE__ */ C("div", { className: "mp-agent-composer-attachments", "aria-label": a.attachments, children: e.map((o) => {
34951
+ const s = n?.get(o.id), l = r?.get(o.name), u = o.metadata?.size || o.size, d = u ? ` (${Mp(u)})` : "";
34943
34952
  return /* @__PURE__ */ se(
34944
34953
  "span",
34945
34954
  {
34946
- className: `mp-agent-attachment-chip ${s ? "mp-agent-attachment-chip-error" : ""} ${o?.status === "uploading" ? "mp-agent-attachment-chip-uploading" : ""}`,
34947
- title: s || i.name,
34955
+ className: `mp-agent-attachment-chip ${l ? "mp-agent-attachment-chip-error" : ""} ${s?.status === "uploading" ? "mp-agent-attachment-chip-uploading" : ""}`,
34956
+ title: l || o.name,
34948
34957
  children: [
34949
- /* @__PURE__ */ C("span", { className: "mp-agent-attachment-chip-icon", children: q3(i) }),
34950
- /* @__PURE__ */ se("span", { className: "mp-agent-attachment-chip-name", title: i.name, children: [
34951
- i.name,
34952
- u
34958
+ /* @__PURE__ */ C("span", { className: "mp-agent-attachment-chip-icon", children: q3(o, i.contextAttachmentIcons) }),
34959
+ /* @__PURE__ */ se("span", { className: "mp-agent-attachment-chip-name", title: o.name, children: [
34960
+ o.name,
34961
+ d
34953
34962
  ] }),
34954
- o?.status === "uploading" && /* @__PURE__ */ se("span", { className: "mp-agent-attachment-chip-progress", children: [
34955
- o.progress,
34963
+ s?.status === "uploading" && /* @__PURE__ */ se("span", { className: "mp-agent-attachment-chip-progress", children: [
34964
+ s.progress,
34956
34965
  "%"
34957
34966
  ] }),
34958
- s && /* @__PURE__ */ C("span", { className: "mp-agent-attachment-chip-error-text", title: s, children: "⚠" }),
34967
+ l && /* @__PURE__ */ C("span", { className: "mp-agent-attachment-chip-error-text", title: l, children: "⚠" }),
34959
34968
  t ? /* @__PURE__ */ C(
34960
34969
  dn,
34961
34970
  {
34962
34971
  size: "sm",
34963
34972
  icon: "X",
34964
34973
  type: "button",
34965
- onClick: (d) => {
34966
- d.preventDefault(), d.stopPropagation(), t(i.id);
34974
+ onClick: (p) => {
34975
+ p.preventDefault(), p.stopPropagation(), t(o.id);
34967
34976
  },
34968
- "aria-label": `Remove attachment ${i.name}`
34977
+ "aria-label": `Remove attachment ${o.name}`
34969
34978
  }
34970
34979
  ) : null
34971
34980
  ]
34972
34981
  },
34973
- i.id
34982
+ o.id
34974
34983
  );
34975
34984
  }) });
34976
34985
  }, q_e = (e) => {
@@ -35280,7 +35289,7 @@ const K_e = ({
35280
35289
  )
35281
35290
  ] });
35282
35291
  }, Y_e = Rt(() => {
35283
- const e = Ge(), t = be((p) => p.composer), n = be((p) => p.contextKey), r = be((p) => p.setComposerOptions), a = e.config.models, { data: i, isLoading: o } = c7e(), s = lt(() => {
35292
+ const e = Ue(), t = be((p) => p.composer), n = be((p) => p.contextKey), r = be((p) => p.setComposerOptions), a = e.config.models, { data: i, isLoading: o } = c7e(), s = lt(() => {
35284
35293
  const p = i && i.length > 0 ? i : a;
35285
35294
  return x3(p, e.config.transport).filter((h) => !h.contexts?.length || h.contexts.includes(n));
35286
35295
  }, [i, a, e.config.transport, n]), l = lt(() => {
@@ -35416,7 +35425,7 @@ function J_e(e) {
35416
35425
  });
35417
35426
  }
35418
35427
  const ewe = () => {
35419
- const e = gn(), t = Ge(), n = be((l) => l.contextKey), { data: r, isLoading: a, isError: i } = p7e(n), o = lt(() => J_e(r ?? []), [r]), s = !!t.transport.upsertAgentPreferences && !!t.transport.upsertAgentPreferencesBatch;
35428
+ const e = gn(), t = Ue(), n = be((l) => l.contextKey), { data: r, isLoading: a, isError: i } = p7e(n), o = lt(() => J_e(r ?? []), [r]), s = !!t.transport.upsertAgentPreferences && !!t.transport.upsertAgentPreferencesBatch;
35420
35429
  return a ? /* @__PURE__ */ C(en, { children: e.agentSettingsLoading }) : i ? /* @__PURE__ */ C(en, { children: e.agentSettingsError }) : /* @__PURE__ */ C(Q_e, { preferences: o, disabled: !s });
35421
35430
  }, twe = () => {
35422
35431
  const [e, t] = et(!1), n = gn(), { refs: r, floatingStyles: a, context: i, isPositioned: o } = hp({
@@ -35463,7 +35472,7 @@ const ewe = () => {
35463
35472
  ] });
35464
35473
  }, nwe = co(
35465
35474
  ({ autoFocus: e, activeChatId: t, status: n, onStop: r, onSubmit: a }, i) => {
35466
- const o = gn(), s = Ge(), l = Fe(null), u = Fe(null), d = be((re) => re.activeChatId ?? re.draftChatKey), p = be((re) => ze(re, d).composerDraft), m = be((re) => ze(re, d).composerError), h = be((re) => ze(re, d).pageContextDismissed), g = be((re) => re.setComposerValue), f = be((re) => re.setComposerDraft), w = be((re) => re.clearComposerDraft), v = be((re) => re.setComposerError), k = be((re) => re.addComposerAttachments), _ = be((re) => re.removeComposerAttachment), E = be((re) => re.setPageContextDismissed), S = p.value, x = p.attachments, [D, P] = et(/* @__PURE__ */ new Map()), [T, L] = et(/* @__PURE__ */ new Map()), j = Fe(S), Z = Fe(x), Q = Fe(h), W = s.config.features?.pageContextAttachments !== !1, R = s.config.composerAttachmentActions, U = (re) => re.type === bt.Context && re?.metadata?.kind === "pageContext", H = x.some(U), $ = () => {
35475
+ const o = gn(), s = Ue(), l = Fe(null), u = Fe(null), d = be((re) => re.activeChatId ?? re.draftChatKey), p = be((re) => ze(re, d).composerDraft), m = be((re) => ze(re, d).composerError), h = be((re) => ze(re, d).pageContextDismissed), g = be((re) => re.setComposerValue), f = be((re) => re.setComposerDraft), w = be((re) => re.clearComposerDraft), v = be((re) => re.setComposerError), k = be((re) => re.addComposerAttachments), _ = be((re) => re.removeComposerAttachment), E = be((re) => re.setPageContextDismissed), S = p.value, x = p.attachments, [D, P] = et(/* @__PURE__ */ new Map()), [T, L] = et(/* @__PURE__ */ new Map()), j = Fe(S), Z = Fe(x), Q = Fe(h), W = s.config.features?.pageContextAttachments !== !1, R = s.config.composerAttachmentActions, U = (re) => re.type === bt.Context && re?.metadata?.kind === "pageContext", H = x.some(U), $ = () => {
35467
35476
  if (W)
35468
35477
  return s.buildPageContextAttachment();
35469
35478
  };
@@ -35486,10 +35495,10 @@ const ewe = () => {
35486
35495
  const re = Z.current, Se = re.find(U);
35487
35496
  if (!Se)
35488
35497
  return;
35489
- const Ue = $();
35490
- if (!Ue)
35498
+ const He = $();
35499
+ if (!He)
35491
35500
  return;
35492
- const Ye = { ...Ue, id: Se.id }, Ae = re.map((ve) => ve.id === Se.id ? Ye : ve);
35501
+ const Ye = { ...He, id: Se.id }, Ae = re.map((ve) => ve.id === Se.id ? Ye : ve);
35493
35502
  f(d, { value: j.current, attachments: Ae });
35494
35503
  });
35495
35504
  }, [W, d, f]), A7(i, () => ({
@@ -35511,7 +35520,7 @@ const ewe = () => {
35511
35520
  const V = async (re) => {
35512
35521
  if (!re || re.length === 0)
35513
35522
  return;
35514
- const Se = Array.from(re), Ue = z_e(), Ye = $_e(Se, x, Ue);
35523
+ const Se = Array.from(re), He = z_e(), Ye = $_e(Se, x, He);
35515
35524
  if (Ye) {
35516
35525
  L((Ae) => {
35517
35526
  const ve = new Map(Ae);
@@ -35568,17 +35577,17 @@ const ewe = () => {
35568
35577
  return !1;
35569
35578
  if (x.some((Ae) => Ae.type === bt.Link && Ae.url === Se))
35570
35579
  return !0;
35571
- const Ue = B_e(Se), Ye = {
35580
+ const He = B_e(Se), Ye = {
35572
35581
  id: At(),
35573
35582
  url: Se,
35574
- name: Ue,
35583
+ name: He,
35575
35584
  type: bt.Link
35576
35585
  };
35577
35586
  return k(d, [Ye]), !0;
35578
35587
  }, J = async (re) => {
35579
35588
  await V(re.target.files), re.target.value = "";
35580
35589
  }, O = (re) => {
35581
- const Se = x.find((Ue) => Ue.id === re);
35590
+ const Se = x.find((He) => He.id === re);
35582
35591
  Se && U(Se) && E(d, !0), _(d, re);
35583
35592
  }, le = () => {
35584
35593
  if (typeof window > "u" || typeof document > "u")
@@ -35586,12 +35595,12 @@ const ewe = () => {
35586
35595
  const re = E7e(), Se = re?.selectedText ?? window.getSelection?.()?.toString()?.trim() ?? "";
35587
35596
  if (!Se)
35588
35597
  return !1;
35589
- const Ue = window.location?.href, Ye = Se.slice(0, 20), Ae = Se.length > 20 ? Ye + "..." : Se, ve = bp({
35598
+ const He = window.location?.href, Ye = Se.slice(0, 20), Ae = Se.length > 20 ? Ye + "..." : Se, ve = bp({
35590
35599
  kind: "webSnippet",
35591
- url: Ue,
35600
+ url: He,
35592
35601
  title: Ae,
35593
35602
  selectedText: Se,
35594
- source: { app: "browser", url: Ue },
35603
+ source: { app: "browser", url: He },
35595
35604
  ...re?.target ? { target: re.target } : {}
35596
35605
  });
35597
35606
  return k(d, [ve]), !0;
@@ -36417,7 +36426,7 @@ const gwe = (e, t) => {
36417
36426
  return "[unserializable]";
36418
36427
  }
36419
36428
  }
36420
- }, B2 = ({ call: e }) => Ge().config.debug ? /* @__PURE__ */ se("details", { className: "mp-agent-tool-debug-details", children: [
36429
+ }, B2 = ({ call: e }) => Ue().config.debug ? /* @__PURE__ */ se("details", { className: "mp-agent-tool-debug-details", children: [
36421
36430
  /* @__PURE__ */ C("summary", { className: "mp-agent-tool-debug-summary", children: "Details" }),
36422
36431
  /* @__PURE__ */ se("div", { className: "mp-agent-tool-debug-body", children: [
36423
36432
  /* @__PURE__ */ se("div", { className: "mp-agent-tool-debug-row", children: [
@@ -36442,7 +36451,7 @@ const gwe = (e, t) => {
36442
36451
  ] })
36443
36452
  ] })
36444
36453
  ] }) : null, U2 = ({ call: e, isExpandable: t = !1, isExpanded: n = !1, onToggleExpand: r }) => {
36445
- const a = Ge(), i = Fe(!1), o = e.status === Et.Succeeded || e.status === Et.Failed, s = t || a.config.debug && !o, l = s || t;
36454
+ const a = Ue(), i = Fe(!1), o = e.status === Et.Succeeded || e.status === Et.Failed, s = t || a.config.debug && !o, l = s || t;
36446
36455
  if ($e(() => {
36447
36456
  !t || o || n || i.current || (i.current = !0, r?.());
36448
36457
  }, [t, o, n, r]), !l)
@@ -36572,7 +36581,7 @@ const H3 = ({ call: e }) => {
36572
36581
  /* @__PURE__ */ C("div", { className: "mp-agent-tool-approval-actions", children: /* @__PURE__ */ C("button", { className: "mp-agent-tool-approve-button", onClick: m, disabled: n, children: n ? "Submitting..." : "Submit response" }) })
36573
36582
  ] }) : /* @__PURE__ */ C("div", { className: "mp-agent-tool-user-action-form", children: /* @__PURE__ */ C("div", { className: "mp-agent-tool-input-error", children: "Invalid user action input schema in tool call." }) });
36574
36583
  }, vwe = ({ call: e, messageId: t, chatId: n, onApprovalSent: r }) => {
36575
- const a = Ge(), i = a.tools.get(e.name)?.label ?? e.name, o = be((D) => D.appendMessagesToChat), [s, l] = et(!1), [u, d] = et(!1), [p, m] = et(!1), [h, g] = et(JSON.stringify(e.input ?? {}, null, 2)), [f, w] = et(void 0), v = a.config.user?.id ?? "guest", k = e.requiresUserAction;
36584
+ const a = Ue(), i = a.tools.get(e.name)?.label ?? e.name, o = be((D) => D.appendMessagesToChat), [s, l] = et(!1), [u, d] = et(!1), [p, m] = et(!1), [h, g] = et(JSON.stringify(e.input ?? {}, null, 2)), [f, w] = et(void 0), v = a.config.user?.id ?? "guest", k = e.requiresUserAction;
36576
36585
  $e(() => {
36577
36586
  u || (g(JSON.stringify(e.input ?? {}, null, 2)), w(void 0));
36578
36587
  }, [e.id, e.input, u]);
@@ -36707,7 +36716,7 @@ const H3 = ({ call: e }) => {
36707
36716
  ] })
36708
36717
  ] });
36709
36718
  }, H2 = ({ call: e, messageId: t, chatId: n }) => {
36710
- const r = Ge(), a = be((d) => d.upsertChat), i = r.config.debug && !!e.approvalId, o = e.requiresConfirmation && e.approvalId || i, s = o && e.approved === void 0, l = o && e.approved !== void 0, u = async () => {
36719
+ const r = Ue(), a = be((d) => d.upsertChat), i = r.config.debug && !!e.approvalId, o = e.requiresConfirmation && e.approvalId || i, s = o && e.approved === void 0, l = o && e.approved !== void 0, u = async () => {
36711
36720
  try {
36712
36721
  const d = await r.transport.getChat(n);
36713
36722
  a(d);
@@ -36720,7 +36729,7 @@ const H3 = ({ call: e }) => {
36720
36729
  l && /* @__PURE__ */ C(H3, { call: e })
36721
36730
  ] });
36722
36731
  }, V2 = ({ chatId: e, isExpanded: t }) => {
36723
- const n = Ge(), r = be((l) => ze(l, e).messages), a = be((l) => ze(l, e).pendingAssistant), i = be((l) => l.chats[e]?.contextKey ?? l.contextKey), o = b3(e), s = lt(() => {
36732
+ const n = Ue(), r = be((l) => ze(l, e).messages), a = be((l) => ze(l, e).pendingAssistant), i = be((l) => l.chats[e]?.contextKey ?? l.contextKey), o = b3(e), s = lt(() => {
36724
36733
  const l = [...r].sort((d, p) => d.createdAt.localeCompare(p.createdAt));
36725
36734
  if (n.config.debug)
36726
36735
  return l;
@@ -36732,7 +36741,7 @@ const H3 = ({ call: e }) => {
36732
36741
  a && /* @__PURE__ */ C(lo, { message: a, contextKey: i, isStreaming: !0 })
36733
36742
  ] }) }) });
36734
36743
  }, _we = ({ call: e, contextKey: t, messageId: n, chatId: r }) => {
36735
- const a = Ge(), i = e.subagentChatId || (typeof e.input?.subagentChatId == "string" ? e.input.subagentChatId : void 0), [o, s] = et(!1), l = lt(() => a.getToolRenderer(e), [a, e]);
36744
+ const a = Ue(), i = e.subagentChatId || (typeof e.input?.subagentChatId == "string" ? e.input.subagentChatId : void 0), [o, s] = et(!1), l = lt(() => a.getToolRenderer(e), [a, e]);
36736
36745
  return l ? /* @__PURE__ */ se("div", { className: "mp-agent-tool-panel", children: [
36737
36746
  i && /* @__PURE__ */ C(
36738
36747
  U2,
@@ -38650,7 +38659,7 @@ const Sd = gr(/\d/), q9e = gr(/[\dA-Fa-f]/), B9e = gr(/[!-/:-@[-`{-~]/);
38650
38659
  function he(e) {
38651
38660
  return e !== null && e < -2;
38652
38661
  }
38653
- function He(e) {
38662
+ function Ve(e) {
38654
38663
  return e !== null && (e < 0 || e === 32);
38655
38664
  }
38656
38665
  function Oe(e) {
@@ -38846,7 +38855,7 @@ function G9e(e, t, n) {
38846
38855
  return Te(e, e.attempt(this.parser.constructs.document, t, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
38847
38856
  }
38848
38857
  function Qr(e) {
38849
- if (e === null || He(e) || xn(e))
38858
+ if (e === null || Ve(e) || xn(e))
38850
38859
  return 1;
38851
38860
  if (dr(e))
38852
38861
  return 2;
@@ -39519,7 +39528,7 @@ function mv(e, t, n, r, a, i, o, s, l) {
39519
39528
  return v === 60 || v === 62 || v === 92 ? (e.consume(v), h) : h(v);
39520
39529
  }
39521
39530
  function f(v) {
39522
- return !d && (v === null || v === 41 || He(v)) ? (e.exit("chunkString"), e.exit(s), e.exit(o), e.exit(r), t(v)) : d < u && v === 40 ? (e.consume(v), d++, f) : v === 41 ? (e.consume(v), d--, f) : v === null || v === 32 || v === 40 || Ki(v) ? n(v) : (e.consume(v), v === 92 ? w : f);
39531
+ return !d && (v === null || v === 41 || Ve(v)) ? (e.exit("chunkString"), e.exit(s), e.exit(o), e.exit(r), t(v)) : d < u && v === 40 ? (e.consume(v), d++, f) : v === 41 ? (e.consume(v), d--, f) : v === null || v === 32 || v === 40 || Ki(v) ? n(v) : (e.consume(v), v === 92 ? w : f);
39523
39532
  }
39524
39533
  function w(v) {
39525
39534
  return v === 40 || v === 41 || v === 92 ? (e.consume(v), f) : f(v);
@@ -39607,7 +39616,7 @@ function _xe(e, t, n) {
39607
39616
  return a = wn(r.sliceSerialize(r.events[r.events.length - 1][1]).slice(1, -1)), h === 58 ? (e.enter("definitionMarker"), e.consume(h), e.exit("definitionMarker"), l) : n(h);
39608
39617
  }
39609
39618
  function l(h) {
39610
- return He(h) ? Un(e, u)(h) : u(h);
39619
+ return Ve(h) ? Un(e, u)(h) : u(h);
39611
39620
  }
39612
39621
  function u(h) {
39613
39622
  return mv(
@@ -39635,7 +39644,7 @@ function _xe(e, t, n) {
39635
39644
  function wxe(e, t, n) {
39636
39645
  return r;
39637
39646
  function r(s) {
39638
- return He(s) ? Un(e, a)(s) : n(s);
39647
+ return Ve(s) ? Un(e, a)(s) : n(s);
39639
39648
  }
39640
39649
  function a(s) {
39641
39650
  return gv(e, i, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(s);
@@ -39688,7 +39697,7 @@ function Nxe(e, t, n) {
39688
39697
  return e.enter("atxHeadingSequence"), o(d);
39689
39698
  }
39690
39699
  function o(d) {
39691
- return d === 35 && r++ < 6 ? (e.consume(d), o) : d === null || He(d) ? (e.exit("atxHeadingSequence"), s(d)) : n(d);
39700
+ return d === 35 && r++ < 6 ? (e.consume(d), o) : d === null || Ve(d) ? (e.exit("atxHeadingSequence"), s(d)) : n(d);
39692
39701
  }
39693
39702
  function s(d) {
39694
39703
  return d === 35 ? (e.enter("atxHeadingSequence"), l(d)) : d === null || he(d) ? (e.exit("atxHeading"), t(d)) : Oe(d) ? Te(e, s, "whitespace")(d) : (e.enter("atxHeadingText"), u(d));
@@ -39697,7 +39706,7 @@ function Nxe(e, t, n) {
39697
39706
  return d === 35 ? (e.consume(d), l) : (e.exit("atxHeadingSequence"), s(d));
39698
39707
  }
39699
39708
  function u(d) {
39700
- return d === null || d === 35 || He(d) ? (e.exit("atxHeadingText"), s(d)) : (e.consume(d), u);
39709
+ return d === null || d === 35 || Ve(d) ? (e.exit("atxHeadingText"), s(d)) : (e.consume(d), u);
39701
39710
  }
39702
39711
  }
39703
39712
  const Axe = [
@@ -39808,7 +39817,7 @@ function Oxe(e, t, n) {
39808
39817
  return zt(O) ? (e.consume(O), o = String.fromCharCode(O), w) : n(O);
39809
39818
  }
39810
39819
  function w(O) {
39811
- if (O === null || O === 47 || O === 62 || He(O)) {
39820
+ if (O === null || O === 47 || O === 62 || Ve(O)) {
39812
39821
  const le = O === 47, fe = o.toLowerCase();
39813
39822
  return !le && !i && dm.includes(fe) ? (a = 1, r.interrupt ? t(O) : Z(O)) : Axe.includes(o.toLowerCase()) ? (a = 6, le ? (e.consume(O), v) : r.interrupt ? t(O) : Z(O)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(O) : i ? k(O) : _(O));
39814
39823
  }
@@ -39836,7 +39845,7 @@ function Oxe(e, t, n) {
39836
39845
  return O === l ? (e.consume(O), l = null, T) : O === null || he(O) ? n(O) : (e.consume(O), D);
39837
39846
  }
39838
39847
  function P(O) {
39839
- return O === null || O === 34 || O === 39 || O === 47 || O === 60 || O === 61 || O === 62 || O === 96 || He(O) ? S(O) : (e.consume(O), P);
39848
+ return O === null || O === 34 || O === 39 || O === 47 || O === 60 || O === 61 || O === 62 || O === 96 || Ve(O) ? S(O) : (e.consume(O), P);
39840
39849
  }
39841
39850
  function T(O) {
39842
39851
  return O === 47 || O === 62 || Oe(O) ? _(O) : n(O);
@@ -39962,7 +39971,7 @@ function zxe(e, t, n) {
39962
39971
  return he(N) ? (o = D, H(N)) : Oe(N) ? (e.consume(N), D) : U(N);
39963
39972
  }
39964
39973
  function P(N) {
39965
- return N === 45 || Tt(N) ? (e.consume(N), P) : N === 47 || N === 62 || He(N) ? T(N) : n(N);
39974
+ return N === 45 || Tt(N) ? (e.consume(N), P) : N === 47 || N === 62 || Ve(N) ? T(N) : n(N);
39966
39975
  }
39967
39976
  function T(N) {
39968
39977
  return N === 47 ? (e.consume(N), U) : N === 58 || N === 95 || zt(N) ? (e.consume(N), L) : he(N) ? (o = T, H(N)) : Oe(N) ? (e.consume(N), T) : U(N);
@@ -39980,10 +39989,10 @@ function zxe(e, t, n) {
39980
39989
  return N === a ? (e.consume(N), a = void 0, R) : N === null ? n(N) : he(N) ? (o = Q, H(N)) : (e.consume(N), Q);
39981
39990
  }
39982
39991
  function W(N) {
39983
- return N === null || N === 34 || N === 39 || N === 60 || N === 61 || N === 96 ? n(N) : N === 47 || N === 62 || He(N) ? T(N) : (e.consume(N), W);
39992
+ return N === null || N === 34 || N === 39 || N === 60 || N === 61 || N === 96 ? n(N) : N === 47 || N === 62 || Ve(N) ? T(N) : (e.consume(N), W);
39984
39993
  }
39985
39994
  function R(N) {
39986
- return N === 47 || N === 62 || He(N) ? T(N) : n(N);
39995
+ return N === 47 || N === 62 || Ve(N) ? T(N) : n(N);
39987
39996
  }
39988
39997
  function U(N) {
39989
39998
  return N === 62 ? (e.consume(N), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(N);
@@ -40097,13 +40106,13 @@ function Vxe(e, t, n) {
40097
40106
  return e.enter("resource"), e.enter("resourceMarker"), e.consume(p), e.exit("resourceMarker"), a;
40098
40107
  }
40099
40108
  function a(p) {
40100
- return He(p) ? Un(e, i)(p) : i(p);
40109
+ return Ve(p) ? Un(e, i)(p) : i(p);
40101
40110
  }
40102
40111
  function i(p) {
40103
40112
  return p === 41 ? d(p) : mv(e, o, s, "resourceDestination", "resourceDestinationLiteral", "resourceDestinationLiteralMarker", "resourceDestinationRaw", "resourceDestinationString", 32)(p);
40104
40113
  }
40105
40114
  function o(p) {
40106
- return He(p) ? Un(e, l)(p) : d(p);
40115
+ return Ve(p) ? Un(e, l)(p) : d(p);
40107
40116
  }
40108
40117
  function s(p) {
40109
40118
  return n(p);
@@ -40112,7 +40121,7 @@ function Vxe(e, t, n) {
40112
40121
  return p === 34 || p === 39 || p === 40 ? gv(e, u, n, "resourceTitle", "resourceTitleMarker", "resourceTitleString")(p) : d(p);
40113
40122
  }
40114
40123
  function u(p) {
40115
- return He(p) ? Un(e, d)(p) : d(p);
40124
+ return Ve(p) ? Un(e, d)(p) : d(p);
40116
40125
  }
40117
40126
  function d(p) {
40118
40127
  return p === 41 ? (e.enter("resourceMarker"), e.consume(p), e.exit("resourceMarker"), e.exit("resource"), t) : n(p);
@@ -40840,7 +40849,7 @@ function LEe(e) {
40840
40849
  codeTextData: T,
40841
40850
  data: T,
40842
40851
  codeFlowValue: T,
40843
- definition: i(Ue),
40852
+ definition: i(He),
40844
40853
  definitionDestinationString: o,
40845
40854
  definitionLabelString: o,
40846
40855
  definitionTitleString: o,
@@ -40854,7 +40863,7 @@ function LEe(e) {
40854
40863
  image: i(de),
40855
40864
  label: o,
40856
40865
  link: i(tt),
40857
- listItem: i(Ve),
40866
+ listItem: i(je),
40858
40867
  listItemValue: m,
40859
40868
  listOrdered: i(Ze, p),
40860
40869
  listUnordered: i(Ze),
@@ -41248,7 +41257,7 @@ function LEe(e) {
41248
41257
  value: ""
41249
41258
  };
41250
41259
  }
41251
- function Ue() {
41260
+ function He() {
41252
41261
  return {
41253
41262
  type: "definition",
41254
41263
  identifier: "",
@@ -41307,7 +41316,7 @@ function LEe(e) {
41307
41316
  children: []
41308
41317
  };
41309
41318
  }
41310
- function Ve(q) {
41319
+ function je(q) {
41311
41320
  return {
41312
41321
  type: "listItem",
41313
41322
  spread: q._spread,
@@ -44842,7 +44851,7 @@ function ONe(e, t, n) {
44842
44851
  return p === 47 ? (e.consume(p), i ? u : (i = !0, l)) : n(p);
44843
44852
  }
44844
44853
  function u(p) {
44845
- return p === null || Ki(p) || He(p) || xn(p) || dr(p) ? n(p) : e.attempt(Wv, e.attempt(Kv, d), n)(p);
44854
+ return p === null || Ki(p) || Ve(p) || xn(p) || dr(p) ? n(p) : e.attempt(Wv, e.attempt(Kv, d), n)(p);
44846
44855
  }
44847
44856
  function d(p) {
44848
44857
  return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(p);
@@ -44862,7 +44871,7 @@ function DNe(e, t, n) {
44862
44871
  let r, a, i;
44863
44872
  return o;
44864
44873
  function o(u) {
44865
- return u === 46 || u === 95 ? e.check(Yv, l, s)(u) : u === null || He(u) || xn(u) || u !== 45 && dr(u) ? l(u) : (i = !0, e.consume(u), o);
44874
+ return u === 46 || u === 95 ? e.check(Yv, l, s)(u) : u === null || Ve(u) || xn(u) || u !== 45 && dr(u) ? l(u) : (i = !0, e.consume(u), o);
44866
44875
  }
44867
44876
  function s(u) {
44868
44877
  return u === 95 ? r = !0 : (a = r, r = void 0), e.consume(u), o;
@@ -44875,7 +44884,7 @@ function $Ne(e, t) {
44875
44884
  let n = 0, r = 0;
44876
44885
  return a;
44877
44886
  function a(o) {
44878
- return o === 40 ? (n++, e.consume(o), a) : o === 41 && r < n ? i(o) : o === 33 || o === 34 || o === 38 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 60 || o === 63 || o === 93 || o === 95 || o === 126 ? e.check(Yv, t, i)(o) : o === null || He(o) || xn(o) ? t(o) : (e.consume(o), a);
44887
+ return o === 40 ? (n++, e.consume(o), a) : o === 41 && r < n ? i(o) : o === 33 || o === 34 || o === 38 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 60 || o === 63 || o === 93 || o === 95 || o === 126 ? e.check(Yv, t, i)(o) : o === null || Ve(o) || xn(o) ? t(o) : (e.consume(o), a);
44879
44888
  }
44880
44889
  function i(o) {
44881
44890
  return o === 41 && r++, e.consume(o), a;
@@ -44887,11 +44896,11 @@ function zNe(e, t, n) {
44887
44896
  return s === 33 || s === 34 || s === 39 || s === 41 || s === 42 || s === 44 || s === 46 || s === 58 || s === 59 || s === 63 || s === 95 || s === 126 ? (e.consume(s), r) : s === 38 ? (e.consume(s), i) : s === 93 ? (e.consume(s), a) : (
44888
44897
  // `<` is an end.
44889
44898
  s === 60 || // So is whitespace.
44890
- s === null || He(s) || xn(s) ? t(s) : n(s)
44899
+ s === null || Ve(s) || xn(s) ? t(s) : n(s)
44891
44900
  );
44892
44901
  }
44893
44902
  function a(s) {
44894
- return s === null || s === 40 || s === 91 || He(s) || xn(s) ? t(s) : r(s);
44903
+ return s === null || s === 40 || s === 91 || Ve(s) || xn(s) ? t(s) : r(s);
44895
44904
  }
44896
44905
  function i(s) {
44897
44906
  return zt(s) ? o(s) : n(s);
@@ -44910,7 +44919,7 @@ function FNe(e, t, n) {
44910
44919
  }
44911
44920
  }
44912
44921
  function Qv(e) {
44913
- return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || He(e);
44922
+ return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || Ve(e);
44914
44923
  }
44915
44924
  function Jv(e) {
44916
44925
  return !zt(e);
@@ -45057,7 +45066,7 @@ function HNe(e, t, n) {
45057
45066
  i > 999 || // Closing brace with nothing.
45058
45067
  p === 93 && !o || // Space or tab is not supported by GFM for some reason.
45059
45068
  // `\n` and `[` not being supported makes sense.
45060
- p === null || p === 91 || He(p)
45069
+ p === null || p === 91 || Ve(p)
45061
45070
  )
45062
45071
  return n(p);
45063
45072
  if (p === 93) {
@@ -45065,7 +45074,7 @@ function HNe(e, t, n) {
45065
45074
  const m = e.exit("gfmFootnoteCallString");
45066
45075
  return a.includes(wn(r.sliceSerialize(m))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(p), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), t) : n(p);
45067
45076
  }
45068
- return He(p) || (o = !0), i++, e.consume(p), p === 92 ? d : u;
45077
+ return Ve(p) || (o = !0), i++, e.consume(p), p === 92 ? d : u;
45069
45078
  }
45070
45079
  function d(p) {
45071
45080
  return p === 91 || p === 92 || p === 93 ? (e.consume(p), i++, u) : u(p);
@@ -45087,7 +45096,7 @@ function VNe(e, t, n) {
45087
45096
  o > 999 || // Closing brace with nothing.
45088
45097
  g === 93 && !s || // Space or tab is not supported by GFM for some reason.
45089
45098
  // `\n` and `[` not being supported makes sense.
45090
- g === null || g === 91 || He(g)
45099
+ g === null || g === 91 || Ve(g)
45091
45100
  )
45092
45101
  return n(g);
45093
45102
  if (g === 93) {
@@ -45095,7 +45104,7 @@ function VNe(e, t, n) {
45095
45104
  const f = e.exit("gfmFootnoteDefinitionLabelString");
45096
45105
  return i = wn(r.sliceSerialize(f)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(g), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), m;
45097
45106
  }
45098
- return He(g) || (s = !0), o++, e.consume(g), g === 92 ? p : d;
45107
+ return Ve(g) || (s = !0), o++, e.consume(g), g === 92 ? p : d;
45099
45108
  }
45100
45109
  function p(g) {
45101
45110
  return g === 91 || g === 92 || g === 93 ? (e.consume(g), o++, d) : d(g);
@@ -45310,7 +45319,7 @@ function JNe(e, t, n) {
45310
45319
  return L === null ? n(L) : he(L) ? i > 1 ? (i = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(L), e.exit("lineEnding"), h) : n(L) : Oe(L) ? Te(e, d, "whitespace")(L) : (i += 1, o && (o = !1, a += 1), L === 124 ? (e.enter("tableCellDivider"), e.consume(L), e.exit("tableCellDivider"), o = !0, d) : (e.enter("data"), p(L)));
45311
45320
  }
45312
45321
  function p(L) {
45313
- return L === null || L === 124 || He(L) ? (e.exit("data"), d(L)) : (e.consume(L), L === 92 ? m : p);
45322
+ return L === null || L === 124 || Ve(L) ? (e.exit("data"), d(L)) : (e.consume(L), L === 92 ? m : p);
45314
45323
  }
45315
45324
  function m(L) {
45316
45325
  return L === 92 || L === 124 ? (e.consume(L), p) : p(L);
@@ -45349,7 +45358,7 @@ function JNe(e, t, n) {
45349
45358
  return L === 124 ? (e.enter("tableCellDivider"), e.consume(L), e.exit("tableCellDivider"), D) : L === null || he(L) ? (e.exit("tableRow"), t(L)) : Oe(L) ? Te(e, D, "whitespace")(L) : (e.enter("data"), P(L));
45350
45359
  }
45351
45360
  function P(L) {
45352
- return L === null || L === 124 || He(L) ? (e.exit("data"), D(L)) : (e.consume(L), L === 92 ? T : P);
45361
+ return L === null || L === 124 || Ve(L) ? (e.exit("data"), D(L)) : (e.consume(L), L === 92 ? T : P);
45353
45362
  }
45354
45363
  function T(L) {
45355
45364
  return L === 92 || L === 124 ? (e.consume(L), P) : P(L);
@@ -45435,7 +45444,7 @@ function rAe(e, t, n) {
45435
45444
  );
45436
45445
  }
45437
45446
  function i(l) {
45438
- return He(l) ? (e.enter("taskListCheckValueUnchecked"), e.consume(l), e.exit("taskListCheckValueUnchecked"), o) : l === 88 || l === 120 ? (e.enter("taskListCheckValueChecked"), e.consume(l), e.exit("taskListCheckValueChecked"), o) : n(l);
45447
+ return Ve(l) ? (e.enter("taskListCheckValueUnchecked"), e.consume(l), e.exit("taskListCheckValueUnchecked"), o) : l === 88 || l === 120 ? (e.enter("taskListCheckValueChecked"), e.consume(l), e.exit("taskListCheckValueChecked"), o) : n(l);
45439
45448
  }
45440
45449
  function o(l) {
45441
45450
  return l === 93 ? (e.enter("taskListCheckMarker"), e.consume(l), e.exit("taskListCheckMarker"), e.exit("taskListCheck"), s) : n(l);
@@ -50470,7 +50479,7 @@ var ro = function(t) {
50470
50479
  }, kt = function(t, n, r, a) {
50471
50480
  a === void 0 && (a = [null, null]);
50472
50481
  for (var i = [], o = 0; o < t.length; o++) {
50473
- var s = je(t[o], n);
50482
+ var s = Ge(t[o], n);
50474
50483
  if (s instanceof Ya) {
50475
50484
  var l = s.children;
50476
50485
  i.push(...l);
@@ -50534,7 +50543,7 @@ var ro = function(t) {
50534
50543
  }, Da = function(t, n) {
50535
50544
  var r = ["nulldelimiter"].concat(t.baseSizingClasses());
50536
50545
  return Kn(n.concat(r));
50537
- }, je = function(t, n, r) {
50546
+ }, Ge = function(t, n, r) {
50538
50547
  if (!t)
50539
50548
  return Kn();
50540
50549
  if (to[t.type]) {
@@ -51013,10 +51022,10 @@ function zo(e) {
51013
51022
  }
51014
51023
  var Zp = (e, t) => {
51015
51024
  var n, r, a;
51016
- e && e.type === "supsub" ? (r = Ie(e.base, "accent"), n = r.base, e.base = n, a = ZAe(je(e, t)), e.base = r) : (r = Ie(e, "accent"), n = r.base);
51017
- var i = je(n, t.havingCrampedStyle()), o = r.isShifty && _e.isCharacterBox(n), s = 0;
51025
+ e && e.type === "supsub" ? (r = Ie(e.base, "accent"), n = r.base, e.base = n, a = ZAe(Ge(e, t)), e.base = r) : (r = Ie(e, "accent"), n = r.base);
51026
+ var i = Ge(n, t.havingCrampedStyle()), o = r.isShifty && _e.isCharacterBox(n), s = 0;
51018
51027
  if (o) {
51019
- var l = _e.getBaseElem(n), u = je(l, t.havingCrampedStyle());
51028
+ var l = _e.getBaseElem(n), u = Ge(l, t.havingCrampedStyle());
51020
51029
  s = Gm(u).skew;
51021
51030
  }
51022
51031
  var d = r.label === "\\c", p = d ? i.height + i.depth : Math.min(i.height, t.fontMetrics().xHeight), m;
@@ -51128,7 +51137,7 @@ me({
51128
51137
  };
51129
51138
  },
51130
51139
  htmlBuilder: (e, t) => {
51131
- var n = je(e.base, t), r = Yn.svgSpan(e, t), a = e.label === "\\utilde" ? 0.12 : 0, i = X.makeVList({
51140
+ var n = Ge(e.base, t), r = Yn.svgSpan(e, t), a = e.label === "\\utilde" ? 0.12 : 0, i = X.makeVList({
51132
51141
  positionType: "top",
51133
51142
  positionData: n.height,
51134
51143
  children: [{
@@ -51206,10 +51215,10 @@ me({
51206
51215
  // Flow is unable to correctly infer the type of `group`, even though it's
51207
51216
  // unambiguously determined from the passed-in `type` above.
51208
51217
  htmlBuilder(e, t) {
51209
- var n = t.style, r = t.havingStyle(n.sup()), a = X.wrapFragment(je(e.body, r, t), t), i = e.label.slice(0, 2) === "\\x" ? "x" : "cd";
51218
+ var n = t.style, r = t.havingStyle(n.sup()), a = X.wrapFragment(Ge(e.body, r, t), t), i = e.label.slice(0, 2) === "\\x" ? "x" : "cd";
51210
51219
  a.classes.push(i + "-arrow-pad");
51211
51220
  var o;
51212
- e.below && (r = t.havingStyle(n.sub()), o = X.wrapFragment(je(e.below, r, t), t), o.classes.push(i + "-arrow-pad"));
51221
+ e.below && (r = t.havingStyle(n.sub()), o = X.wrapFragment(Ge(e.below, r, t), t), o.classes.push(i + "-arrow-pad"));
51213
51222
  var s = Yn.svgSpan(e, t), l = -t.fontMetrics().axisHeight + 0.5 * s.height, u = -t.fontMetrics().axisHeight - 0.5 * s.height - 0.111;
51214
51223
  (a.depth > 0.25 || e.label === "\\xleftequilibrium") && (u -= a.depth);
51215
51224
  var d;
@@ -51535,7 +51544,7 @@ me({
51535
51544
  };
51536
51545
  },
51537
51546
  htmlBuilder(e, t) {
51538
- var n = t.havingStyle(t.style.sup()), r = X.wrapFragment(je(e.label, n, t), t);
51547
+ var n = t.havingStyle(t.style.sup()), r = X.wrapFragment(Ge(e.label, n, t), t);
51539
51548
  return r.classes.push("cd-label-" + e.side), r.style.bottom = ue(0.8 - r.depth), r.height = 0, r.depth = 0, r;
51540
51549
  },
51541
51550
  mathmlBuilder(e, t) {
@@ -51560,7 +51569,7 @@ me({
51560
51569
  };
51561
51570
  },
51562
51571
  htmlBuilder(e, t) {
51563
- var n = X.wrapFragment(je(e.fragment, t), t);
51572
+ var n = X.wrapFragment(Ge(e.fragment, t), t);
51564
51573
  return n.classes.push("cd-vert-arrow"), n;
51565
51574
  },
51566
51575
  mathmlBuilder(e, t) {
@@ -52245,7 +52254,7 @@ me({
52245
52254
  }
52246
52255
  });
52247
52256
  var Qp = (e, t) => {
52248
- var n = X.wrapFragment(je(e.body, t), t), r = e.label.slice(1), a = t.sizeMultiplier, i, o = 0, s = _e.isCharacterBox(e.body);
52257
+ var n = X.wrapFragment(Ge(e.body, t), t), r = e.label.slice(1), a = t.sizeMultiplier, i, o = 0, s = _e.isCharacterBox(e.body);
52249
52258
  if (r === "sout")
52250
52259
  i = X.makeSpan(["stretchy", "sout"]), i.height = t.fontMetrics().defaultRuleThickness / a, o = -0.5 * t.fontMetrics().xHeight;
52251
52260
  else if (r === "phase") {
@@ -52607,7 +52616,7 @@ var $n = function(t, n) {
52607
52616
  s < S.length && (s = S.length);
52608
52617
  var P = new Array(S.length);
52609
52618
  for (a = 0; a < S.length; ++a) {
52610
- var T = je(S[a], n);
52619
+ var T = Ge(S[a], n);
52611
52620
  D < T.depth && (D = T.depth), x < T.height && (x = T.height), P[a] = T;
52612
52621
  }
52613
52622
  var L = t.rowGaps[r], j = 0;
@@ -52662,7 +52671,7 @@ var $n = function(t, n) {
52662
52671
  }
52663
52672
  }
52664
52673
  if (l = X.makeSpan(["mtable"], W), u.length > 0) {
52665
- for (var Se = X.makeLineSpan("hline", n, d), Ue = X.makeLineSpan("hdashline", n, d), Ye = [{
52674
+ for (var Se = X.makeLineSpan("hline", n, d), He = X.makeLineSpan("hdashline", n, d), Ye = [{
52666
52675
  type: "elem",
52667
52676
  elem: l,
52668
52677
  shift: 0
@@ -52670,7 +52679,7 @@ var $n = function(t, n) {
52670
52679
  var Ae = u.pop(), ve = Ae.pos - Z;
52671
52680
  Ae.isDashed ? Ye.push({
52672
52681
  type: "elem",
52673
- elem: Ue,
52682
+ elem: He,
52674
52683
  shift: ve
52675
52684
  }) : Ye.push({
52676
52685
  type: "elem",
@@ -53071,7 +53080,7 @@ me({
53071
53080
  });
53072
53081
  var $6 = (e, t) => {
53073
53082
  var n = e.font, r = t.withFont(n);
53074
- return je(e.body, r);
53083
+ return Ge(e.body, r);
53075
53084
  }, z6 = (e, t) => {
53076
53085
  var n = e.font, r = t.withFont(n);
53077
53086
  return nt(e.body, r);
@@ -53179,13 +53188,13 @@ var F6 = (e, t) => {
53179
53188
  }, nh = (e, t) => {
53180
53189
  var n = F6(e.size, t.style), r = n.fracNum(), a = n.fracDen(), i;
53181
53190
  i = t.havingStyle(r);
53182
- var o = je(e.numer, i, t);
53191
+ var o = Ge(e.numer, i, t);
53183
53192
  if (e.continued) {
53184
53193
  var s = 8.5 / t.fontMetrics().ptPerEm, l = 3.5 / t.fontMetrics().ptPerEm;
53185
53194
  o.height = o.height < s ? s : o.height, o.depth = o.depth < l ? l : o.depth;
53186
53195
  }
53187
53196
  i = t.havingStyle(a);
53188
- var u = je(e.denom, i, t), d, p, m;
53197
+ var u = Ge(e.denom, i, t), d, p, m;
53189
53198
  e.hasBarLine ? (e.barSize ? (p = dt(e.barSize, t), d = X.makeLineSpan("frac-line", t, p)) : d = X.makeLineSpan("frac-line", t), p = d.height, m = d.height) : (d = null, p = 0, m = t.fontMetrics().defaultRuleThickness);
53190
53199
  var h, g, f;
53191
53200
  n.size === xe.DISPLAY.size || e.size === "display" ? (h = t.fontMetrics().num1, p > 0 ? g = 3 * m : g = 7 * m, f = t.fontMetrics().denom1) : (p > 0 ? (h = t.fontMetrics().num2, g = m) : (h = t.fontMetrics().num3, g = 3 * m), f = t.fontMetrics().denom2);
@@ -53490,8 +53499,8 @@ me({
53490
53499
  });
53491
53500
  var P6 = (e, t) => {
53492
53501
  var n = t.style, r, a;
53493
- e.type === "supsub" ? (r = e.sup ? je(e.sup, t.havingStyle(n.sup()), t) : je(e.sub, t.havingStyle(n.sub()), t), a = Ie(e.base, "horizBrace")) : a = Ie(e, "horizBrace");
53494
- var i = je(a.base, t.havingBaseStyle(xe.DISPLAY)), o = Yn.svgSpan(a, t), s;
53502
+ e.type === "supsub" ? (r = e.sup ? Ge(e.sup, t.havingStyle(n.sup()), t) : Ge(e.sub, t.havingStyle(n.sub()), t), a = Ie(e.base, "horizBrace")) : a = Ie(e, "horizBrace");
53503
+ var i = Ge(a.base, t.havingBaseStyle(xe.DISPLAY)), o = Yn.svgSpan(a, t), s;
53495
53504
  if (a.isOver ? (s = X.makeVList({
53496
53505
  positionType: "firstBaseline",
53497
53506
  children: [{
@@ -53915,7 +53924,7 @@ me({
53915
53924
  },
53916
53925
  htmlBuilder: (e, t) => {
53917
53926
  var n;
53918
- e.alignment === "clap" ? (n = X.makeSpan([], [je(e.body, t)]), n = X.makeSpan(["inner"], [n], t)) : n = X.makeSpan(["inner"], [je(e.body, t)]);
53927
+ e.alignment === "clap" ? (n = X.makeSpan([], [Ge(e.body, t)]), n = X.makeSpan(["inner"], [n], t)) : n = X.makeSpan(["inner"], [Ge(e.body, t)]);
53919
53928
  var r = X.makeSpan(["fix"], []), a = X.makeSpan([e.alignment], [n, r], t), i = X.makeSpan(["strut"]);
53920
53929
  return i.style.height = ue(a.height + a.depth), a.depth && (i.style.verticalAlign = ue(-a.depth)), a.children.unshift(i), a = X.makeSpan(["thinbox"], [a], t), X.makeSpan(["mord", "vbox"], [a], t);
53921
53930
  },
@@ -54011,14 +54020,14 @@ var q6 = (e, t, n, r, a, i, o) => {
54011
54020
  e = X.makeSpan([], [e]);
54012
54021
  var s = n && _e.isCharacterBox(n), l, u;
54013
54022
  if (t) {
54014
- var d = je(t, r.havingStyle(a.sup()), r);
54023
+ var d = Ge(t, r.havingStyle(a.sup()), r);
54015
54024
  u = {
54016
54025
  elem: d,
54017
54026
  kern: Math.max(r.fontMetrics().bigOpSpacing1, r.fontMetrics().bigOpSpacing3 - d.depth)
54018
54027
  };
54019
54028
  }
54020
54029
  if (n) {
54021
- var p = je(n, r.havingStyle(a.sub()), r);
54030
+ var p = Ge(n, r.havingStyle(a.sub()), r);
54022
54031
  l = {
54023
54032
  elem: p,
54024
54033
  kern: Math.max(r.fontMetrics().bigOpSpacing2, r.fontMetrics().bigOpSpacing4 - p.height)
@@ -54387,7 +54396,7 @@ me({
54387
54396
  };
54388
54397
  },
54389
54398
  htmlBuilder(e, t) {
54390
- var n = je(e.body, t.havingCrampedStyle()), r = X.makeLineSpan("overline-line", t), a = t.fontMetrics().defaultRuleThickness, i = X.makeVList({
54399
+ var n = Ge(e.body, t.havingCrampedStyle()), r = X.makeLineSpan("overline-line", t), a = t.fontMetrics().defaultRuleThickness, i = X.makeVList({
54391
54400
  positionType: "firstBaseline",
54392
54401
  children: [{
54393
54402
  type: "elem",
@@ -54456,7 +54465,7 @@ me({
54456
54465
  };
54457
54466
  },
54458
54467
  htmlBuilder: (e, t) => {
54459
- var n = X.makeSpan([], [je(e.body, t.withPhantom())]);
54468
+ var n = X.makeSpan([], [Ge(e.body, t.withPhantom())]);
54460
54469
  if (n.height = 0, n.depth = 0, n.children)
54461
54470
  for (var r = 0; r < n.children.length; r++)
54462
54471
  n.children[r].height = 0, n.children[r].depth = 0;
@@ -54491,7 +54500,7 @@ me({
54491
54500
  };
54492
54501
  },
54493
54502
  htmlBuilder: (e, t) => {
54494
- var n = X.makeSpan(["inner"], [je(e.body, t.withPhantom())]), r = X.makeSpan(["fix"], []);
54503
+ var n = X.makeSpan(["inner"], [Ge(e.body, t.withPhantom())]), r = X.makeSpan(["fix"], []);
54495
54504
  return X.makeSpan(["mord", "rlap"], [n, r], t);
54496
54505
  },
54497
54506
  mathmlBuilder: (e, t) => {
@@ -54519,7 +54528,7 @@ me({
54519
54528
  };
54520
54529
  },
54521
54530
  htmlBuilder(e, t) {
54522
- var n = je(e.body, t), r = dt(e.dy, t);
54531
+ var n = Ge(e.body, t), r = dt(e.dy, t);
54523
54532
  return X.makeVList({
54524
54533
  positionType: "shift",
54525
54534
  positionData: -r,
@@ -54656,7 +54665,7 @@ me({
54656
54665
  };
54657
54666
  },
54658
54667
  htmlBuilder: (e, t) => {
54659
- var n = X.makeSpan([], [je(e.body, t)]);
54668
+ var n = X.makeSpan([], [Ge(e.body, t)]);
54660
54669
  if (!e.smashHeight && !e.smashDepth)
54661
54670
  return n;
54662
54671
  if (e.smashHeight && (n.height = 0, n.children))
@@ -54698,7 +54707,7 @@ me({
54698
54707
  };
54699
54708
  },
54700
54709
  htmlBuilder(e, t) {
54701
- var n = je(e.body, t.havingCrampedStyle());
54710
+ var n = Ge(e.body, t.havingCrampedStyle());
54702
54711
  n.height === 0 && (n.height = t.fontMetrics().xHeight), n = X.wrapFragment(n, t);
54703
54712
  var r = t.fontMetrics(), a = r.defaultRuleThickness, i = a;
54704
54713
  t.style.id < xe.TEXT.id && (i = t.fontMetrics().xHeight);
@@ -54728,7 +54737,7 @@ me({
54728
54737
  }]
54729
54738
  }, t);
54730
54739
  if (e.index) {
54731
- var g = t.havingStyle(xe.SCRIPTSCRIPT), f = je(e.index, g, t), w = 0.6 * (h.height - h.depth), v = X.makeVList({
54740
+ var g = t.havingStyle(xe.SCRIPTSCRIPT), f = Ge(e.index, g, t), w = 0.6 * (h.height - h.depth), v = X.makeVList({
54732
54741
  positionType: "shift",
54733
54742
  positionData: -w,
54734
54743
  children: [{
@@ -54822,14 +54831,14 @@ Cr({
54822
54831
  base: r,
54823
54832
  sup: a,
54824
54833
  sub: i
54825
- } = e, o = je(r, t), s, l, u = t.fontMetrics(), d = 0, p = 0, m = r && _e.isCharacterBox(r);
54834
+ } = e, o = Ge(r, t), s, l, u = t.fontMetrics(), d = 0, p = 0, m = r && _e.isCharacterBox(r);
54826
54835
  if (a) {
54827
54836
  var h = t.havingStyle(t.style.sup());
54828
- s = je(a, h, t), m || (d = o.height - h.fontMetrics().supDrop * h.sizeMultiplier / t.sizeMultiplier);
54837
+ s = Ge(a, h, t), m || (d = o.height - h.fontMetrics().supDrop * h.sizeMultiplier / t.sizeMultiplier);
54829
54838
  }
54830
54839
  if (i) {
54831
54840
  var g = t.havingStyle(t.style.sub());
54832
- l = je(i, g, t), m || (p = o.depth + g.fontMetrics().subDrop * g.sizeMultiplier / t.sizeMultiplier);
54841
+ l = Ge(i, g, t), m || (p = o.depth + g.fontMetrics().subDrop * g.sizeMultiplier / t.sizeMultiplier);
54833
54842
  }
54834
54843
  var f;
54835
54844
  t.style === xe.DISPLAY ? f = u.sup1 : t.style.cramped ? f = u.sup3 : f = u.sup2;
@@ -55094,7 +55103,7 @@ me({
55094
55103
  };
55095
55104
  },
55096
55105
  htmlBuilder(e, t) {
55097
- var n = je(e.body, t), r = X.makeLineSpan("underline-line", t), a = t.fontMetrics().defaultRuleThickness, i = X.makeVList({
55106
+ var n = Ge(e.body, t), r = X.makeLineSpan("underline-line", t), a = t.fontMetrics().defaultRuleThickness, i = X.makeVList({
55098
55107
  positionType: "top",
55099
55108
  positionData: n.height,
55100
55109
  children: [{
@@ -55140,7 +55149,7 @@ me({
55140
55149
  };
55141
55150
  },
55142
55151
  htmlBuilder(e, t) {
55143
- var n = je(e.body, t), r = t.fontMetrics().axisHeight, a = 0.5 * (n.height - r - (n.depth + r));
55152
+ var n = Ge(e.body, t), r = t.fontMetrics().axisHeight, a = 0.5 * (n.height - r - (n.depth + r));
55144
55153
  return X.makeVList({
55145
55154
  positionType: "shift",
55146
55155
  positionData: a,
@@ -58107,7 +58116,7 @@ function uh(e, t, n, r, a, i, o, s, l, u, d, p, m, h, g) {
58107
58116
  return e.enter(r), e.enter(a), e.consume(R), e.exit(a), k;
58108
58117
  }
58109
58118
  function k(R) {
58110
- return R === 35 ? (f = o, _(R)) : R === 46 ? (f = s, _(R)) : g && Oe(R) ? Te(e, k, "whitespace")(R) : !g && He(R) ? Un(e, k)(R) : R === null || he(R) || xn(R) || dr(R) && R !== 45 && R !== 95 ? W(R) : (e.enter(i), e.enter(l), e.consume(R), x);
58119
+ return R === 35 ? (f = o, _(R)) : R === 46 ? (f = s, _(R)) : g && Oe(R) ? Te(e, k, "whitespace")(R) : !g && Ve(R) ? Un(e, k)(R) : R === null || he(R) || xn(R) || dr(R) && R !== 45 && R !== 95 ? W(R) : (e.enter(i), e.enter(l), e.consume(R), x);
58111
58120
  }
58112
58121
  function _(R) {
58113
58122
  const U = (
@@ -58117,7 +58126,7 @@ function uh(e, t, n, r, a, i, o, s, l, u, d, p, m, h, g) {
58117
58126
  return e.enter(i), e.enter(f), e.enter(U), e.consume(R), e.exit(U), E;
58118
58127
  }
58119
58128
  function E(R) {
58120
- if (R === null || R === 34 || R === 35 || R === 39 || R === 46 || R === 60 || R === 61 || R === 62 || R === 96 || R === 125 || He(R))
58129
+ if (R === null || R === 34 || R === 35 || R === 39 || R === 46 || R === 60 || R === 61 || R === 62 || R === 96 || R === 125 || Ve(R))
58121
58130
  return n(R);
58122
58131
  const U = (
58123
58132
  /** @type {TokenType} */
@@ -58128,7 +58137,7 @@ function uh(e, t, n, r, a, i, o, s, l, u, d, p, m, h, g) {
58128
58137
  function S(R) {
58129
58138
  if (R === null || R === 34 || R === 39 || R === 60 || R === 61 || R === 62 || R === 96)
58130
58139
  return n(R);
58131
- if (R === 35 || R === 46 || R === 125 || He(R)) {
58140
+ if (R === 35 || R === 46 || R === 125 || Ve(R)) {
58132
58141
  const U = (
58133
58142
  /** @type {TokenType} */
58134
58143
  f + "Value"
@@ -58138,16 +58147,16 @@ function uh(e, t, n, r, a, i, o, s, l, u, d, p, m, h, g) {
58138
58147
  return e.consume(R), S;
58139
58148
  }
58140
58149
  function x(R) {
58141
- return R === null || he(R) || xn(R) || dr(R) && R !== 45 && R !== 46 && R !== 58 && R !== 95 ? (e.exit(l), g && Oe(R) ? Te(e, D, "whitespace")(R) : !g && He(R) ? Un(e, D)(R) : D(R)) : (e.consume(R), x);
58150
+ return R === null || he(R) || xn(R) || dr(R) && R !== 45 && R !== 46 && R !== 58 && R !== 95 ? (e.exit(l), g && Oe(R) ? Te(e, D, "whitespace")(R) : !g && Ve(R) ? Un(e, D)(R) : D(R)) : (e.consume(R), x);
58142
58151
  }
58143
58152
  function D(R) {
58144
58153
  return R === 61 ? (e.enter(u), e.consume(R), e.exit(u), P) : (e.exit(i), k(R));
58145
58154
  }
58146
58155
  function P(R) {
58147
- return R === null || R === 60 || R === 61 || R === 62 || R === 96 || R === 125 || g && he(R) ? n(R) : R === 34 || R === 39 ? (e.enter(d), e.enter(m), e.consume(R), e.exit(m), w = R, L) : g && Oe(R) ? Te(e, P, "whitespace")(R) : !g && He(R) ? Un(e, P)(R) : (e.enter(p), e.enter(h), e.consume(R), w = void 0, T);
58156
+ return R === null || R === 60 || R === 61 || R === 62 || R === 96 || R === 125 || g && he(R) ? n(R) : R === 34 || R === 39 ? (e.enter(d), e.enter(m), e.consume(R), e.exit(m), w = R, L) : g && Oe(R) ? Te(e, P, "whitespace")(R) : !g && Ve(R) ? Un(e, P)(R) : (e.enter(p), e.enter(h), e.consume(R), w = void 0, T);
58148
58157
  }
58149
58158
  function T(R) {
58150
- return R === null || R === 34 || R === 39 || R === 60 || R === 61 || R === 62 || R === 96 ? n(R) : R === 125 || He(R) ? (e.exit(h), e.exit(p), e.exit(i), k(R)) : (e.consume(R), T);
58159
+ return R === null || R === 34 || R === 39 || R === 60 || R === 61 || R === 62 || R === 96 ? n(R) : R === 125 || Ve(R) ? (e.exit(h), e.exit(p), e.exit(i), k(R)) : (e.consume(R), T);
58151
58160
  }
58152
58161
  function L(R) {
58153
58162
  return R === w ? (e.enter(m), e.consume(R), e.exit(m), e.exit(d), e.exit(i), Q) : (e.enter(p), j(R));
@@ -58159,7 +58168,7 @@ function uh(e, t, n, r, a, i, o, s, l, u, d, p, m, h, g) {
58159
58168
  return R === w || R === null || he(R) ? (e.exit(h), j(R)) : (e.consume(R), Z);
58160
58169
  }
58161
58170
  function Q(R) {
58162
- return R === 125 || He(R) ? k(R) : W(R);
58171
+ return R === 125 || Ve(R) ? k(R) : W(R);
58163
58172
  }
58164
58173
  function W(R) {
58165
58174
  return R === 125 ? (e.enter(a), e.consume(R), e.exit(a), e.exit(r), t) : n(R);
@@ -70099,7 +70108,7 @@ function iOe(e) {
70099
70108
  ...Uf
70100
70109
  ],
70101
70110
  end: /}/
70102
- }, Ue = {
70111
+ }, He = {
70103
70112
  match: [
70104
70113
  /class\b/,
70105
70114
  /\s+/,
@@ -70182,7 +70191,7 @@ function iOe(e) {
70182
70191
  ...r,
70183
70192
  ot,
70184
70193
  We,
70185
- Ue,
70194
+ He,
70186
70195
  Ye,
70187
70196
  Ae,
70188
70197
  re,
@@ -72320,14 +72329,14 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = U, V = H), $ ===
72320
72329
  }
72321
72330
  function J() {
72322
72331
  if (!de.keywords) {
72323
- Ze.addText(Ve);
72332
+ Ze.addText(je);
72324
72333
  return;
72325
72334
  }
72326
72335
  let q = 0;
72327
72336
  de.keywordPatternRe.lastIndex = 0;
72328
- let Y = de.keywordPatternRe.exec(Ve), te = "";
72337
+ let Y = de.keywordPatternRe.exec(je), te = "";
72329
72338
  for (; Y; ) {
72330
- te += Ve.substring(q, Y.index);
72339
+ te += je.substring(q, Y.index);
72331
72340
  const pe = Ae.case_insensitive ? Y[0].toLowerCase() : Y[0], Ee = K(de, pe);
72332
72341
  if (Ee) {
72333
72342
  const [Le, _t] = Ee;
@@ -72339,27 +72348,27 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = U, V = H), $ ===
72339
72348
  }
72340
72349
  } else
72341
72350
  te += Y[0];
72342
- q = de.keywordPatternRe.lastIndex, Y = de.keywordPatternRe.exec(Ve);
72351
+ q = de.keywordPatternRe.lastIndex, Y = de.keywordPatternRe.exec(je);
72343
72352
  }
72344
- te += Ve.substring(q), Ze.addText(te);
72353
+ te += je.substring(q), Ze.addText(te);
72345
72354
  }
72346
72355
  function O() {
72347
- if (Ve === "")
72356
+ if (je === "")
72348
72357
  return;
72349
72358
  let q = null;
72350
72359
  if (typeof de.subLanguage == "string") {
72351
72360
  if (!t[de.subLanguage]) {
72352
- Ze.addText(Ve);
72361
+ Ze.addText(je);
72353
72362
  return;
72354
72363
  }
72355
- q = p(de.subLanguage, Ve, !0, tt[de.subLanguage]), tt[de.subLanguage] = /** @type {CompiledMode} */
72364
+ q = p(de.subLanguage, je, !0, tt[de.subLanguage]), tt[de.subLanguage] = /** @type {CompiledMode} */
72356
72365
  q._top;
72357
72366
  } else
72358
- q = h(Ve, de.subLanguage.length ? de.subLanguage : null);
72367
+ q = h(je, de.subLanguage.length ? de.subLanguage : null);
72359
72368
  de.relevance > 0 && (ce += q.relevance), Ze.__addSublanguage(q._emitter, q.language);
72360
72369
  }
72361
72370
  function le() {
72362
- de.subLanguage != null ? O() : J(), Ve = "";
72371
+ de.subLanguage != null ? O() : J(), je = "";
72363
72372
  }
72364
72373
  function fe(q, Y) {
72365
72374
  q !== "" && (Ze.startScope(Y), Ze.addText(q), Ze.endScope());
@@ -72373,11 +72382,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = U, V = H), $ ===
72373
72382
  continue;
72374
72383
  }
72375
72384
  const Ee = Ae.classNameAliases[q[te]] || q[te], Le = Y[te];
72376
- Ee ? fe(Le, Ee) : (Ve = Le, J(), Ve = ""), te++;
72385
+ Ee ? fe(Le, Ee) : (je = Le, J(), je = ""), te++;
72377
72386
  }
72378
72387
  }
72379
72388
  function Ce(q, Y) {
72380
- return q.scope && typeof q.scope == "string" && Ze.openNode(Ae.classNameAliases[q.scope] || q.scope), q.beginScope && (q.beginScope._wrap ? (fe(Ve, Ae.classNameAliases[q.beginScope._wrap] || q.beginScope._wrap), Ve = "") : q.beginScope._multi && (ke(q.beginScope, Y), Ve = "")), de = Object.create(q, { parent: { value: de } }), de;
72389
+ return q.scope && typeof q.scope == "string" && Ze.openNode(Ae.classNameAliases[q.scope] || q.scope), q.beginScope && (q.beginScope._wrap ? (fe(je, Ae.classNameAliases[q.beginScope._wrap] || q.beginScope._wrap), je = "") : q.beginScope._multi && (ke(q.beginScope, Y), je = "")), de = Object.create(q, { parent: { value: de } }), de;
72381
72390
  }
72382
72391
  function Pe(q, Y, te) {
72383
72392
  let pe = vOe(q.endRe, te);
@@ -72396,21 +72405,21 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = U, V = H), $ ===
72396
72405
  return Pe(q.parent, Y, te);
72397
72406
  }
72398
72407
  function ot(q) {
72399
- return de.matcher.regexIndex === 0 ? (Ve += q[0], 1) : (qe = !0, 0);
72408
+ return de.matcher.regexIndex === 0 ? (je += q[0], 1) : (qe = !0, 0);
72400
72409
  }
72401
72410
  function We(q) {
72402
72411
  const Y = q[0], te = q.rule, pe = new Vf(te), Ee = [te.__beforeBegin, te["on:begin"]];
72403
72412
  for (const Le of Ee)
72404
72413
  if (Le && (Le(q, pe), pe.isMatchIgnored))
72405
72414
  return ot(Y);
72406
- return te.skip ? Ve += Y : (te.excludeBegin && (Ve += Y), le(), !te.returnBegin && !te.excludeBegin && (Ve = Y)), Ce(te, q), te.returnBegin ? 0 : Y.length;
72415
+ return te.skip ? je += Y : (te.excludeBegin && (je += Y), le(), !te.returnBegin && !te.excludeBegin && (je = Y)), Ce(te, q), te.returnBegin ? 0 : Y.length;
72407
72416
  }
72408
72417
  function re(q) {
72409
72418
  const Y = q[0], te = H.substring(q.index), pe = Pe(de, q, te);
72410
72419
  if (!pe)
72411
72420
  return Zf;
72412
72421
  const Ee = de;
72413
- de.endScope && de.endScope._wrap ? (le(), fe(Y, de.endScope._wrap)) : de.endScope && de.endScope._multi ? (le(), ke(de.endScope, q)) : Ee.skip ? Ve += Y : (Ee.returnEnd || Ee.excludeEnd || (Ve += Y), le(), Ee.excludeEnd && (Ve = Y));
72422
+ de.endScope && de.endScope._wrap ? (le(), fe(Y, de.endScope._wrap)) : de.endScope && de.endScope._multi ? (le(), ke(de.endScope, q)) : Ee.skip ? je += Y : (Ee.returnEnd || Ee.excludeEnd || (je += Y), le(), Ee.excludeEnd && (je = Y));
72414
72423
  do
72415
72424
  de.scope && Ze.closeNode(), !de.skip && !de.subLanguage && (ce += de.relevance), de = de.parent;
72416
72425
  while (de !== pe.parent);
@@ -72422,19 +72431,19 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = U, V = H), $ ===
72422
72431
  Y.scope && q.unshift(Y.scope);
72423
72432
  q.forEach((Y) => Ze.openNode(Y));
72424
72433
  }
72425
- let Ue = {};
72434
+ let He = {};
72426
72435
  function Ye(q, Y) {
72427
72436
  const te = Y && Y[0];
72428
- if (Ve += q, te == null)
72437
+ if (je += q, te == null)
72429
72438
  return le(), 0;
72430
- if (Ue.type === "begin" && Y.type === "end" && Ue.index === Y.index && te === "") {
72431
- if (Ve += H.slice(Y.index, Y.index + 1), !a) {
72439
+ if (He.type === "begin" && Y.type === "end" && He.index === Y.index && te === "") {
72440
+ if (je += H.slice(Y.index, Y.index + 1), !a) {
72432
72441
  const pe = new Error(`0 width match regex (${U})`);
72433
- throw pe.languageName = U, pe.badRule = Ue.rule, pe;
72442
+ throw pe.languageName = U, pe.badRule = He.rule, pe;
72434
72443
  }
72435
72444
  return 1;
72436
72445
  }
72437
- if (Ue = Y, Y.type === "begin")
72446
+ if (He = Y, Y.type === "begin")
72438
72447
  return We(Y);
72439
72448
  if (Y.type === "illegal" && !$) {
72440
72449
  const pe = new Error('Illegal lexeme "' + te + '" for mode "' + (de.scope || "<unnamed>") + '"');
@@ -72445,11 +72454,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = U, V = H), $ ===
72445
72454
  return pe;
72446
72455
  }
72447
72456
  if (Y.type === "illegal" && te === "")
72448
- return Ve += `
72457
+ return je += `
72449
72458
  `, 1;
72450
72459
  if (ye > 1e5 && ye > Y.index * 3)
72451
72460
  throw new Error("potential infinite loop, way more iterations than matches");
72452
- return Ve += te, te.length;
72461
+ return je += te, te.length;
72453
72462
  }
72454
72463
  const Ae = P(U);
72455
72464
  if (!Ae)
@@ -72458,7 +72467,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), N = U, V = H), $ ===
72458
72467
  let Ke = "", de = V || ve;
72459
72468
  const tt = {}, Ze = new s.__emitter(s);
72460
72469
  Se();
72461
- let Ve = "", ce = 0, Me = 0, ye = 0, qe = !1;
72470
+ let je = "", ce = 0, Me = 0, ye = 0, qe = !1;
72462
72471
  try {
72463
72472
  if (Ae.__emitTokens)
72464
72473
  Ae.__emitTokens(H, Ze);
@@ -74934,11 +74943,11 @@ var p7 = { exports: {} };
74934
74943
  Pe && (re = m(_, re, Pe), V += Pe.length), h(_, re, K);
74935
74944
  var Se = new l(P, Z ? s.tokenize(Ce, Z) : Ce, R, Ce);
74936
74945
  if ($ = m(_, re, Se), ot && m(_, $, ot), K > 1) {
74937
- var Ue = {
74946
+ var He = {
74938
74947
  cause: P + "," + L,
74939
74948
  reach: We
74940
74949
  };
74941
- d(k, _, E, $.prev, V, Ue), D && Ue.reach > D.reach && (D.reach = Ue.reach);
74950
+ d(k, _, E, $.prev, V, He), D && He.reach > D.reach && (D.reach = He.reach);
74942
74951
  }
74943
74952
  }
74944
74953
  }
@@ -96449,7 +96458,7 @@ const lVe = () => /* @__PURE__ */ se("span", { className: "mp-agent-message-typi
96449
96458
  isStreaming: n,
96450
96459
  showParticipantChrome: r = !1
96451
96460
  }) => {
96452
- const o = Ge().config.features?.reasoning !== !1 && e.role === Qe.Assistant && !!e.reasoning, s = e.role === Qe.Assistant && typeof e.content == "string" && e.content.trim().length > 0, l = !!(n && !o && !s), u = typeof e.content == "string" && e.content.trim().length > 0 || (e.attachments?.length ?? 0) > 0, d = (() => {
96461
+ const o = Ue().config.features?.reasoning !== !1 && e.role === Qe.Assistant && !!e.reasoning, s = e.role === Qe.Assistant && typeof e.content == "string" && e.content.trim().length > 0, l = !!(n && !o && !s), u = typeof e.content == "string" && e.content.trim().length > 0 || (e.attachments?.length ?? 0) > 0, d = (() => {
96453
96462
  const p = e.toolCalls ?? [];
96454
96463
  if (p.length <= 1)
96455
96464
  return p;
@@ -96589,7 +96598,7 @@ const lVe = () => /* @__PURE__ */ se("span", { className: "mp-agent-message-typi
96589
96598
  );
96590
96599
  }
96591
96600
  ), mVe = ({ onClose: e, agentLogo: t }) => {
96592
- const n = gn(), a = Ge().config.features?.historySidebar !== !1, i = be((u) => u.isChatHistoryOpen), o = be((u) => u.setChatHistoryOpen), s = be((u) => u.setActiveChat), l = () => {
96601
+ const n = gn(), a = Ue().config.features?.historySidebar !== !1, i = be((u) => u.isChatHistoryOpen), o = be((u) => u.setChatHistoryOpen), s = be((u) => u.setActiveChat), l = () => {
96593
96602
  s(void 0);
96594
96603
  };
96595
96604
  return /* @__PURE__ */ se("div", { className: "mp-agent-agent-controls", children: [
@@ -96682,7 +96691,7 @@ const lVe = () => /* @__PURE__ */ se("span", { className: "mp-agent-message-typi
96682
96691
  ] })
96683
96692
  ] });
96684
96693
  }, gVe = ({ loadChats: e = !0, multiUser: t = !1 }) => {
96685
- const n = Ge(), r = be((o) => o.isChatHistoryOpen), a = n.config.features?.historySidebar !== !1, i = g3({ enabled: e && a, multiUser: t });
96694
+ const n = Ue(), r = be((o) => o.isChatHistoryOpen), a = n.config.features?.historySidebar !== !1, i = g3({ enabled: e && a, multiUser: t });
96686
96695
  return !a || !r ? null : /* @__PURE__ */ C("div", { className: "mp-agent-chat-history-panel", children: /* @__PURE__ */ C(
96687
96696
  fVe,
96688
96697
  {
@@ -96703,7 +96712,7 @@ const lVe = () => /* @__PURE__ */ se("span", { className: "mp-agent-message-typi
96703
96712
  loadChats: i = !0,
96704
96713
  restoreLastActiveChat: o = !0
96705
96714
  }) => {
96706
- const s = gn(), l = Ge(), u = be((g) => g.activeChatId), d = be((g) => g.setActiveChat), { isLoading: p } = y7e(), { isLoading: m, error: h } = g3({ enabled: i, multiUser: r });
96715
+ const s = gn(), l = Ue(), u = be((g) => g.activeChatId), d = be((g) => g.setActiveChat), { isLoading: p } = y7e(), { isLoading: m, error: h } = g3({ enabled: i, multiUser: r });
96707
96716
  return uo(() => {
96708
96717
  if (!o)
96709
96718
  return;
@@ -96872,7 +96881,7 @@ export {
96872
96881
  OVe as useActivitySummary,
96873
96882
  p7e as useAgentConfigurations,
96874
96883
  g7e as useAgentPreferences,
96875
- Ge as useAgentRuntime,
96884
+ Ue as useAgentRuntime,
96876
96885
  be as useAgentStore,
96877
96886
  C7e as useAgentTheme,
96878
96887
  $Ve as useAutoScroll,