@pagelines/sdk 1.0.605 → 1.0.607

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.
@@ -1,24 +1,24 @@
1
1
  var Un = Object.defineProperty;
2
- var Ps = (r, t, e) => t in r ? Un(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var d = (r, t) => Un(r, "name", { value: t, configurable: !0 });
4
- var C = (r, t, e) => Ps(r, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as Re, openBlock as v, createElementBlock as w, createElementVNode as y, normalizeClass as A, ref as ae, watch as Mt, computed as U, createCommentVNode as j, renderSlot as dn, onMounted as Bt, unref as on, Fragment as $e, toDisplayString as se, shallowRef as ps, onBeforeUnmount as fs, nextTick as Bs, createVNode as Ye, withCtx as Fs, renderList as tn, createBlock as Hn, withModifiers as ht, createTextVNode as Ct, withDirectives as Us, vModelText as Hs } from "vue";
2
+ var Ps = (a, t, e) => t in a ? Un(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
+ var d = (a, t) => Un(a, "name", { value: t, configurable: !0 });
4
+ var C = (a, t, e) => Ps(a, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as _e, openBlock as v, createElementBlock as w, createElementVNode as y, normalizeClass as A, ref as le, watch as Mt, computed as U, createCommentVNode as G, renderSlot as dn, onMounted as Bt, unref as on, Fragment as Pe, toDisplayString as ne, shallowRef as ps, onBeforeUnmount as fs, nextTick as Bs, createVNode as Ze, withCtx as Fs, renderList as tn, createBlock as Hn, withModifiers as ft, createTextVNode as Ct, withDirectives as Us, vModelText as Hs } from "vue";
6
6
  import { SettingsObject as Gs, Agent as Nt, getDefaultAvatarUrl as gs, createLogger as js } from "@pagelines/core";
7
7
  import { P as Ws } from "./sdkClient.js";
8
8
  const qs = { class: "spinner max-w-sm" }, Ys = {
9
9
  class: "ring-circular h-full w-full origin-center",
10
10
  viewBox: "25 25 50 50"
11
- }, Gn = /* @__PURE__ */ Re({
11
+ }, Gn = /* @__PURE__ */ _e({
12
12
  __name: "FSpinner",
13
13
  props: {
14
14
  width: { type: String, default: "" },
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
- setup(r) {
17
+ setup(a) {
18
18
  return (t, e) => (v(), w("div", qs, [
19
19
  (v(), w("svg", Ys, [
20
20
  y("circle", {
21
- class: A([r.colorMode, "ring-path"]),
21
+ class: A([a.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
24
24
  r: "20",
@@ -33,16 +33,16 @@ const qs = { class: "spinner max-w-sm" }, Ys = {
33
33
  }), Vs = [
34
34
  { pattern: /\bNO_REP\w*\b/g, label: "NO_REPLY — bot chose not to respond" },
35
35
  { pattern: /\bHEARTBEAT_OK\b/g, label: "HEARTBEAT_OK — scheduled check, nothing to do" }
36
- ], Zs = 9e4, ms = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Xs = /* @__PURE__ */ new Set([...ms, "EMPTY_STREAM", "RATE_LIMIT"]), bs = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]);
37
- function Ks(r) {
38
- if (!(r.bucket !== void 0 || Xs.has(r.code)))
36
+ ], Zs = 9e4, ms = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Xs = /* @__PURE__ */ new Set([...ms, "EMPTY_STREAM", "RATE_LIMIT"]), xs = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]);
37
+ function Ks(a) {
38
+ if (!(a.bucket !== void 0 || Xs.has(a.code)))
39
39
  return { surface: "hard" };
40
- const e = r.bucket ?? (ms.has(r.code) ? "account" : "error"), n = {
41
- ...r.actionLabel ? { actionLabel: r.actionLabel } : {},
42
- ...r.actionUrl ? { actionUrl: r.actionUrl } : {},
43
- ...r.help ? { help: r.help } : {}
40
+ const e = a.bucket ?? (ms.has(a.code) ? "account" : "error"), n = {
41
+ ...a.actionLabel ? { actionLabel: a.actionLabel } : {},
42
+ ...a.actionUrl ? { actionUrl: a.actionUrl } : {},
43
+ ...a.help ? { help: a.help } : {}
44
44
  };
45
- return e === "account" ? { surface: "transcript", issue: { code: r.code, bucket: e, ...n }, sendBlockedReason: "account" } : bs.has(r.code) ? { surface: "transcript", issue: { code: r.code, bucket: e, ...n }, sendBlockedReason: "agent_deleted" } : { surface: "transient", issue: { code: r.code, message: r.error, ...n } };
45
+ return e === "account" ? { surface: "transcript", issue: { code: a.code, bucket: e, ...n }, sendBlockedReason: "account" } : xs.has(a.code) ? { surface: "transcript", issue: { code: a.code, bucket: e, ...n }, sendBlockedReason: "agent_deleted" } : { surface: "transient", issue: { code: a.code, message: a.error, ...n } };
46
46
  }
47
47
  d(Ks, "presentChatStreamError");
48
48
  const wn = class wn extends Gs {
@@ -54,14 +54,14 @@ const wn = class wn extends Gs {
54
54
  C(this, "activeTurnGeneration", 0);
55
55
  // Chat conversation tracking (server-managed persistence)
56
56
  C(this, "conversationId");
57
- C(this, "textState", ae({
57
+ C(this, "textState", le({
58
58
  isActive: !1,
59
59
  isConnected: !1,
60
60
  isThinking: !1,
61
61
  connectionStatus: "disconnected"
62
62
  }));
63
- C(this, "agentMode", ae("self"));
64
- C(this, "sharedMessages", ae([]));
63
+ C(this, "agentMode", le("self"));
64
+ C(this, "sharedMessages", le([]));
65
65
  C(this, "_agent");
66
66
  this._agent = e.agent instanceof Nt ? e.agent : new Nt({ config: e.agent }), this.setupModeWatcher(), this.setupAvailabilityWatcher();
67
67
  }
@@ -243,32 +243,32 @@ Current User:
243
243
  this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0, workingDescription: void 0, toolActivities: [], transientIssue: void 0 });
244
244
  const l = ++this.activeTurnGeneration, o = `stream-${Date.now()}`;
245
245
  let h = !1, c = !1;
246
- const m = /* @__PURE__ */ d(() => l === this.activeTurnGeneration, "isCurrentTurn"), b = /* @__PURE__ */ d((E, L = "assistant") => {
246
+ const m = /* @__PURE__ */ d(() => l === this.activeTurnGeneration, "isCurrentTurn"), x = /* @__PURE__ */ d((E, L = "assistant") => {
247
247
  if (!m())
248
248
  return;
249
249
  this.updateState(this.textState, { workingDescription: void 0 }), h || (h = !0, this.sharedMessages.value = [
250
250
  ...this.sharedMessages.value,
251
251
  { id: o, text: "", sender: L === "system" ? "system" : "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
252
252
  ]);
253
- const I = this.sharedMessages.value, B = I[I.length - 1];
254
- B?.id === o && (B.text += E, this.sharedMessages.value = [...I]);
253
+ const R = this.sharedMessages.value, B = R[R.length - 1];
254
+ B?.id === o && (B.text += E, this.sharedMessages.value = [...R]);
255
255
  }, "onDelta"), k = /* @__PURE__ */ d((E) => {
256
256
  if (!m())
257
257
  return;
258
258
  c = !0, h = !0, this.updateState(this.textState, { workingDescription: void 0 }), this.finishToolActivities("completed");
259
- const L = this.sharedMessages.value, I = L.findIndex((B) => B.id === E.id);
260
- if (I >= 0)
259
+ const L = this.sharedMessages.value, R = L.findIndex((B) => B.id === E.id);
260
+ if (R >= 0)
261
261
  this.sharedMessages.value = [
262
- ...L.slice(0, I),
262
+ ...L.slice(0, R),
263
263
  E,
264
- ...L.slice(I + 1)
264
+ ...L.slice(R + 1)
265
265
  ];
266
266
  else {
267
267
  const B = L[L.length - 1];
268
268
  this.sharedMessages.value = B?.id === o ? [...L.slice(0, -1), E] : [...L, E];
269
269
  }
270
- E.sender === "system" && E.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : E.sender === "system" && E.issue?.code && bs.has(E.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
271
- }, "onMessage"), T = /* @__PURE__ */ d((E) => {
270
+ E.sender === "system" && E.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : E.sender === "system" && E.issue?.code && xs.has(E.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
271
+ }, "onMessage"), S = /* @__PURE__ */ d((E) => {
272
272
  if (!m())
273
273
  return;
274
274
  if (!h && !c) {
@@ -276,24 +276,24 @@ Current User:
276
276
  return;
277
277
  }
278
278
  this.finishToolActivities("completed");
279
- const L = this.sharedMessages.value, I = L[L.length - 1];
280
- if (I?.id === o && I.sender === "agent" && I.text) {
281
- let B = I.text;
279
+ const L = this.sharedMessages.value, R = L[L.length - 1];
280
+ if (R?.id === o && R.sender === "agent" && R.text) {
281
+ let B = R.text;
282
282
  for (const z of Vs)
283
283
  z.pattern.test(B) && (console.debug(`[chat] filtered directive: ${z.label}`), B = B.replace(z.pattern, "").trim(), z.pattern.lastIndex = 0);
284
- B ? B !== I.text && (I.text = B, this.sharedMessages.value = [...L]) : this.sharedMessages.value = L.slice(0, -1);
284
+ B ? B !== R.text && (R.text = B, this.sharedMessages.value = [...L]) : this.sharedMessages.value = L.slice(0, -1);
285
285
  }
286
286
  E && (this.conversationId = E), this.updateState(this.textState, { isThinking: !1, workingDescription: void 0, transientIssue: void 0 });
287
287
  }, "onDone"), F = /* @__PURE__ */ d((E) => {
288
288
  if (!m())
289
289
  return;
290
290
  this.updateState(this.textState, { workingDescription: void 0 }), this.finishToolActivities("failed");
291
- const L = this.sharedMessages.value, I = L[L.length - 1];
292
- if (I?.id === o && !I.text && (this.sharedMessages.value = L.slice(0, -1)), typeof E == "object" && E.code && E.error) {
293
- const Z = Ks(E);
294
- Z.surface === "transient" ? this.updateState(this.textState, { isThinking: !1, transientIssue: Z.issue }) : Z.surface === "transcript" ? (this.addMessage(E.error, "system", void 0, Z.issue), this.updateState(this.textState, {
291
+ const L = this.sharedMessages.value, R = L[L.length - 1];
292
+ if (R?.id === o && !R.text && (this.sharedMessages.value = L.slice(0, -1)), typeof E == "object" && E.code && E.error) {
293
+ const j = Ks(E);
294
+ j.surface === "transient" ? this.updateState(this.textState, { isThinking: !1, transientIssue: j.issue }) : j.surface === "transcript" ? (this.addMessage(E.error, "system", void 0, j.issue), this.updateState(this.textState, {
295
295
  isThinking: !1,
296
- ...Z.sendBlockedReason ? { sendBlockedReason: Z.sendBlockedReason } : {}
296
+ ...j.sendBlockedReason ? { sendBlockedReason: j.sendBlockedReason } : {}
297
297
  })) : this.handleError(new Error(E.error));
298
298
  return;
299
299
  }
@@ -304,9 +304,9 @@ Current User:
304
304
  return;
305
305
  const L = E.trim();
306
306
  this.updateState(this.textState, { workingDescription: L || void 0 });
307
- }, "onStatus"), V = /* @__PURE__ */ d((E) => {
307
+ }, "onStatus"), Z = /* @__PURE__ */ d((E) => {
308
308
  m() && this.updateToolActivity(E);
309
- }, "onToolActivity"), oe = /* @__PURE__ */ d(() => {
309
+ }, "onToolActivity"), ce = /* @__PURE__ */ d(() => {
310
310
  m() && this.updateState(this.textState, { workingDescription: void 0 });
311
311
  }, "onWorkingEnd");
312
312
  try {
@@ -315,30 +315,30 @@ Current User:
315
315
  attachments: n,
316
316
  conversationId: this.conversationId,
317
317
  history: this.buildHistory(),
318
- onDelta: b,
318
+ onDelta: x,
319
319
  onMessage: k,
320
- onDone: T,
320
+ onDone: S,
321
321
  onError: F,
322
322
  onStatus: M,
323
- onToolActivity: V,
324
- onWorkingEnd: oe
323
+ onToolActivity: Z,
324
+ onWorkingEnd: ce
325
325
  }) : s.chat.chatStreamPublic({
326
326
  handle: this._agent.handle.value,
327
327
  message: e,
328
328
  attachments: n,
329
329
  anonymousId: s.user.generateAnonId(),
330
330
  context: this.getDynamicSettings().context || void 0,
331
- onDelta: b,
331
+ onDelta: x,
332
332
  onMessage: k,
333
- onDone: T,
333
+ onDone: S,
334
334
  onError: F,
335
335
  onStatus: M,
336
- onToolActivity: V,
337
- onWorkingEnd: oe
336
+ onToolActivity: Z,
337
+ onWorkingEnd: ce
338
338
  });
339
339
  await Promise.race([
340
340
  E,
341
- new Promise((L, I) => setTimeout(() => I(new Error("timed out")), Zs))
341
+ new Promise((L, R) => setTimeout(() => R(new Error("timed out")), Zs))
342
342
  ]);
343
343
  } catch (E) {
344
344
  F(E.message || "Something went wrong");
@@ -380,28 +380,28 @@ Current User:
380
380
  };
381
381
  d(wn, "AgentChatController");
382
382
  let jn = wn;
383
- function Wn(r) {
384
- return r ? typeof r == "string" ? r : r.src || "" : "";
383
+ function Wn(a) {
384
+ return a ? typeof a == "string" ? a : a.src || "" : "";
385
385
  }
386
386
  d(Wn, "getImageSrc");
387
- function ba(r) {
388
- return Wn(r.cover) || Wn(r.avatar) || gs(r.name);
387
+ function kr(a) {
388
+ return Wn(a.cover) || Wn(a.avatar) || gs(a.name);
389
389
  }
390
- d(ba, "getAgentAvatarUrl");
391
- function qn(r) {
392
- const t = r.target;
390
+ d(kr, "getAgentAvatarUrl");
391
+ function qn(a) {
392
+ const t = a.target;
393
393
  t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = gs());
394
394
  }
395
395
  d(qn, "handleImageError");
396
- function xa(r) {
397
- const { template: t, agent: e } = r;
396
+ function vr(a) {
397
+ const { template: t, agent: e } = a;
398
398
  return t.replace(/{name}/g, e.name || "Assistant").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
399
399
  }
400
- d(xa, "parseButtonTemplate");
400
+ d(vr, "parseButtonTemplate");
401
401
  const Qs = {
402
402
  key: 0,
403
403
  class: "absolute inset-0 flex items-center justify-center"
404
- }, ka = /* @__PURE__ */ Re({
404
+ }, yr = /* @__PURE__ */ _e({
405
405
  __name: "ElAgentButton",
406
406
  props: {
407
407
  theme: { default: "primary" },
@@ -410,49 +410,49 @@ const Qs = {
410
410
  icon: {},
411
411
  iconAfter: {}
412
412
  },
413
- setup(r) {
413
+ setup(a) {
414
414
  const t = U(() => ({
415
415
  primary: "bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",
416
416
  green: "bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",
417
417
  red: "bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",
418
418
  default: "bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20"
419
- })[r.theme]), e = U(() => ({
419
+ })[a.theme]), e = U(() => ({
420
420
  sm: "px-4 py-2 text-sm",
421
421
  md: "px-6 py-3 text-base",
422
422
  lg: "px-8 py-4 text-base"
423
- })[r.size]), n = U(() => ({
423
+ })[a.size]), n = U(() => ({
424
424
  sm: "size-4",
425
425
  md: "size-4",
426
426
  lg: "size-5"
427
- })[r.size]);
427
+ })[a.size]);
428
428
  return (i, s) => (v(), w("button", {
429
429
  class: A(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
430
430
  }, [
431
- r.loading ? (v(), w("div", Qs, [...s[0] || (s[0] = [
431
+ a.loading ? (v(), w("div", Qs, [...s[0] || (s[0] = [
432
432
  y("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
433
- ])])) : j("", !0),
433
+ ])])) : G("", !0),
434
434
  y("span", {
435
- class: A(["flex items-center gap-2 transition-opacity duration-200", r.loading ? "opacity-0" : "opacity-100"])
435
+ class: A(["flex items-center gap-2 transition-opacity duration-200", a.loading ? "opacity-0" : "opacity-100"])
436
436
  }, [
437
- r.icon ? (v(), w("i", {
437
+ a.icon ? (v(), w("i", {
438
438
  key: 0,
439
- class: A([r.icon, n.value])
440
- }, null, 2)) : j("", !0),
439
+ class: A([a.icon, n.value])
440
+ }, null, 2)) : G("", !0),
441
441
  dn(i.$slots, "default"),
442
- r.iconAfter ? (v(), w("i", {
442
+ a.iconAfter ? (v(), w("i", {
443
443
  key: 1,
444
- class: A([r.iconAfter, n.value])
445
- }, null, 2)) : j("", !0)
444
+ class: A([a.iconAfter, n.value])
445
+ }, null, 2)) : G("", !0)
446
446
  ], 2)
447
447
  ], 2));
448
448
  }
449
- }), Js = ["value"], va = /* @__PURE__ */ Re({
449
+ }), Js = ["value"], wr = /* @__PURE__ */ _e({
450
450
  __name: "AgentInputEmail",
451
451
  props: {
452
452
  modelValue: { default: "" }
453
453
  },
454
454
  emits: ["update:modelValue"],
455
- setup(r, { emit: t }) {
455
+ setup(a, { emit: t }) {
456
456
  const e = t;
457
457
  return (n, i) => (v(), w("input", {
458
458
  name: "username",
@@ -463,13 +463,13 @@ const Qs = {
463
463
  autocorrect: "off",
464
464
  spellcheck: "false",
465
465
  placeholder: "Enter your email",
466
- value: r.modelValue,
466
+ value: a.modelValue,
467
467
  class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
468
468
  style: { "font-size": "16px" },
469
469
  onInput: i[0] || (i[0] = (s) => e("update:modelValue", s.target.value))
470
470
  }, null, 40, Js));
471
471
  }
472
- }), ei = ["placeholder", "value"], ya = /* @__PURE__ */ Re({
472
+ }), ei = ["placeholder", "value"], Tr = /* @__PURE__ */ _e({
473
473
  __name: "AgentInputOneTimeCode",
474
474
  props: {
475
475
  modelValue: {},
@@ -477,8 +477,8 @@ const Qs = {
477
477
  focusFirst: { type: Boolean }
478
478
  },
479
479
  emits: ["update:modelValue", "autoSubmit"],
480
- setup(r, { emit: t }) {
481
- const e = r, n = t, i = ae(null), s = U(() => "0".repeat(e.length));
480
+ setup(a, { emit: t }) {
481
+ const e = a, n = t, i = le(null), s = U(() => "0".repeat(e.length));
482
482
  Bt(() => {
483
483
  e.focusFirst && !("ontouchstart" in window) && i.value?.focus();
484
484
  });
@@ -498,7 +498,7 @@ const Qs = {
498
498
  spellcheck: "false",
499
499
  enterkeyhint: "done",
500
500
  placeholder: s.value,
501
- value: r.modelValue,
501
+ value: a.modelValue,
502
502
  class: "w-full px-6 py-3 text-center font-mono tracking-[0.35em] text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
503
503
  style: { "font-size": "16px" },
504
504
  onInput: l
@@ -507,7 +507,7 @@ const Qs = {
507
507
  }), ti = { class: "relative flex-shrink-0" }, ni = ["src", "alt"], si = { class: "absolute top-1 right-1" }, ii = {
508
508
  key: 1,
509
509
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
510
- }, ri = { class: "min-w-0" }, ai = /* @__PURE__ */ Re({
510
+ }, ai = { class: "min-w-0" }, ri = /* @__PURE__ */ _e({
511
511
  __name: "ElModeHeader",
512
512
  props: {
513
513
  agent: {},
@@ -515,26 +515,26 @@ const Qs = {
515
515
  isOnline: { type: Boolean, default: !1 },
516
516
  layout: { default: "centered" }
517
517
  },
518
- setup(r) {
518
+ setup(a) {
519
519
  return (t, e) => (v(), w("div", {
520
520
  class: A(["flex gap-4", [
521
- r.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
521
+ a.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
522
522
  ]])
523
523
  }, [
524
524
  y("div", ti, [
525
525
  y("div", {
526
- class: A(["rounded-full overflow-hidden border-white", r.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
526
+ class: A(["rounded-full overflow-hidden border-white", a.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
527
527
  }, [
528
528
  y("img", {
529
- src: r.agent.avatarUrl.value,
530
- alt: r.agent.displayName.value,
529
+ src: a.agent.avatarUrl.value,
530
+ alt: a.agent.displayName.value,
531
531
  class: "w-full h-full object-cover",
532
532
  onError: e[0] || (e[0] = //@ts-ignore
533
533
  (...n) => on(qn) && on(qn)(...n))
534
534
  }, null, 40, ni)
535
535
  ], 2),
536
536
  y("div", si, [
537
- r.isOnline ? (v(), w($e, { key: 0 }, [
537
+ a.isOnline ? (v(), w(Pe, { key: 0 }, [
538
538
  e[1] || (e[1] = y("div", {
539
539
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
540
540
  style: { "animation-duration": "3s" }
@@ -543,39 +543,39 @@ const Qs = {
543
543
  ], 64)) : (v(), w("div", ii))
544
544
  ])
545
545
  ]),
546
- y("div", ri, [
546
+ y("div", ai, [
547
547
  y("h1", {
548
548
  class: A(["font-light text-white mb-1 truncate", [
549
- r.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
550
- r.layout === "horizontal" ? "text-white/95" : ""
549
+ a.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
550
+ a.layout === "horizontal" ? "text-white/95" : ""
551
551
  ]])
552
- }, se(r.agent.displayName.value), 3),
552
+ }, ne(a.agent.displayName.value), 3),
553
553
  y("p", {
554
554
  class: A(["font-light line-clamp-1", [
555
- r.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
556
- r.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
555
+ a.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
556
+ a.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
557
557
  ]])
558
- }, se(r.layout === "horizontal" ? r.agent.title.value || "Assistant" : r.agent.title.value), 3)
558
+ }, ne(a.layout === "horizontal" ? a.agent.title.value || "Assistant" : a.agent.title.value), 3)
559
559
  ])
560
560
  ], 2));
561
561
  }
562
562
  });
563
- function Yn(r, t) {
564
- (t == null || t > r.length) && (t = r.length);
565
- for (var e = 0, n = Array(t); e < t; e++) n[e] = r[e];
563
+ function Yn(a, t) {
564
+ (t == null || t > a.length) && (t = a.length);
565
+ for (var e = 0, n = Array(t); e < t; e++) n[e] = a[e];
566
566
  return n;
567
567
  }
568
568
  d(Yn, "_arrayLikeToArray");
569
- function li(r) {
570
- if (Array.isArray(r)) return r;
569
+ function li(a) {
570
+ if (Array.isArray(a)) return a;
571
571
  }
572
572
  d(li, "_arrayWithHoles");
573
- function oi(r, t) {
574
- var e = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
573
+ function oi(a, t) {
574
+ var e = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
575
575
  if (e != null) {
576
576
  var n, i, s, l, o = [], h = !0, c = !1;
577
577
  try {
578
- if (s = (e = e.call(r)).next, t !== 0) for (; !(h = (n = s.call(e)).done) && (o.push(n.value), o.length !== t); h = !0) ;
578
+ if (s = (e = e.call(a)).next, t !== 0) for (; !(h = (n = s.call(e)).done) && (o.push(n.value), o.length !== t); h = !0) ;
579
579
  } catch (m) {
580
580
  c = !0, i = m;
581
581
  } finally {
@@ -594,24 +594,24 @@ function ci() {
594
594
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
595
595
  }
596
596
  d(ci, "_nonIterableRest");
597
- function ui(r, t) {
598
- return li(r) || oi(r, t) || hi(r, t) || ci();
597
+ function ui(a, t) {
598
+ return li(a) || oi(a, t) || hi(a, t) || ci();
599
599
  }
600
600
  d(ui, "_slicedToArray");
601
- function hi(r, t) {
602
- if (r) {
603
- if (typeof r == "string") return Yn(r, t);
604
- var e = {}.toString.call(r).slice(8, -1);
605
- return e === "Object" && r.constructor && (e = r.constructor.name), e === "Map" || e === "Set" ? Array.from(r) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? Yn(r, t) : void 0;
601
+ function hi(a, t) {
602
+ if (a) {
603
+ if (typeof a == "string") return Yn(a, t);
604
+ var e = {}.toString.call(a).slice(8, -1);
605
+ return e === "Object" && a.constructor && (e = a.constructor.name), e === "Map" || e === "Set" ? Array.from(a) : e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e) ? Yn(a, t) : void 0;
606
606
  }
607
607
  }
608
608
  d(hi, "_unsupportedIterableToArray");
609
- const xs = Object.entries, Vn = Object.setPrototypeOf, di = Object.isFrozen, pi = Object.getPrototypeOf, fi = Object.getOwnPropertyDescriptor;
610
- let le = Object.freeze, he = Object.seal, Qe = Object.create, ks = typeof Reflect < "u" && Reflect, cn = ks.apply, un = ks.construct;
611
- le || (le = /* @__PURE__ */ d(function(t) {
609
+ const bs = Object.entries, Vn = Object.setPrototypeOf, di = Object.isFrozen, pi = Object.getPrototypeOf, fi = Object.getOwnPropertyDescriptor;
610
+ let oe = Object.freeze, de = Object.seal, et = Object.create, ks = typeof Reflect < "u" && Reflect, cn = ks.apply, un = ks.construct;
611
+ oe || (oe = /* @__PURE__ */ d(function(t) {
612
612
  return t;
613
613
  }, "freeze"));
614
- he || (he = /* @__PURE__ */ d(function(t) {
614
+ de || (de = /* @__PURE__ */ d(function(t) {
615
615
  return t;
616
616
  }, "seal"));
617
617
  cn || (cn = /* @__PURE__ */ d(function(t, e) {
@@ -624,28 +624,28 @@ un || (un = /* @__PURE__ */ d(function(t) {
624
624
  n[i - 1] = arguments[i];
625
625
  return new t(...n);
626
626
  }, "construct"));
627
- const Ve = Q(Array.prototype.forEach), gi = Q(Array.prototype.lastIndexOf), Zn = Q(Array.prototype.pop), Ze = Q(Array.prototype.push), mi = Q(Array.prototype.splice), re = Array.isArray, gt = Q(String.prototype.toLowerCase), nn = Q(String.prototype.toString), Xn = Q(String.prototype.match), Xe = Q(String.prototype.replace), Kn = Q(String.prototype.indexOf), bi = Q(String.prototype.trim), xi = Q(Number.prototype.toString), ki = Q(Boolean.prototype.toString), Qn = typeof BigInt > "u" ? null : Q(BigInt.prototype.toString), Jn = typeof Symbol > "u" ? null : Q(Symbol.prototype.toString), Y = Q(Object.prototype.hasOwnProperty), dt = Q(Object.prototype.toString), te = Q(RegExp.prototype.test), pt = vi(TypeError);
628
- function Q(r) {
627
+ const Xe = Q(Array.prototype.forEach), gi = Q(Array.prototype.lastIndexOf), Zn = Q(Array.prototype.pop), Ke = Q(Array.prototype.push), mi = Q(Array.prototype.splice), re = Array.isArray, bt = Q(String.prototype.toLowerCase), nn = Q(String.prototype.toString), Xn = Q(String.prototype.match), Qe = Q(String.prototype.replace), Kn = Q(String.prototype.indexOf), xi = Q(String.prototype.trim), bi = Q(Number.prototype.toString), ki = Q(Boolean.prototype.toString), Qn = typeof BigInt > "u" ? null : Q(BigInt.prototype.toString), Jn = typeof Symbol > "u" ? null : Q(Symbol.prototype.toString), V = Q(Object.prototype.hasOwnProperty), gt = Q(Object.prototype.toString), te = Q(RegExp.prototype.test), mt = vi(TypeError);
628
+ function Q(a) {
629
629
  return function(t) {
630
630
  t instanceof RegExp && (t.lastIndex = 0);
631
631
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
632
632
  n[i - 1] = arguments[i];
633
- return cn(r, t, n);
633
+ return cn(a, t, n);
634
634
  };
635
635
  }
636
636
  d(Q, "unapply");
637
- function vi(r) {
637
+ function vi(a) {
638
638
  return function() {
639
639
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
640
640
  e[n] = arguments[n];
641
- return un(r, e);
641
+ return un(a, e);
642
642
  };
643
643
  }
644
644
  d(vi, "unconstruct");
645
- function _(r, t) {
646
- let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : gt;
647
- if (Vn && Vn(r, null), !re(t))
648
- return r;
645
+ function _(a, t) {
646
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : bt;
647
+ if (Vn && Vn(a, null), !re(t))
648
+ return a;
649
649
  let n = t.length;
650
650
  for (; n--; ) {
651
651
  let i = t[n];
@@ -653,89 +653,89 @@ function _(r, t) {
653
653
  const s = e(i);
654
654
  s !== i && (di(t) || (t[n] = s), i = s);
655
655
  }
656
- r[i] = !0;
656
+ a[i] = !0;
657
657
  }
658
- return r;
658
+ return a;
659
659
  }
660
660
  d(_, "addToSet");
661
- function yi(r) {
662
- for (let t = 0; t < r.length; t++)
663
- Y(r, t) || (r[t] = null);
664
- return r;
661
+ function yi(a) {
662
+ for (let t = 0; t < a.length; t++)
663
+ V(a, t) || (a[t] = null);
664
+ return a;
665
665
  }
666
666
  d(yi, "cleanArray");
667
- function ne(r) {
668
- const t = Qe(null);
669
- for (const n of xs(r)) {
667
+ function se(a) {
668
+ const t = et(null);
669
+ for (const n of bs(a)) {
670
670
  var e = ui(n, 2);
671
671
  const i = e[0], s = e[1];
672
- Y(r, i) && (re(s) ? t[i] = yi(s) : s && typeof s == "object" && s.constructor === Object ? t[i] = ne(s) : t[i] = s);
672
+ V(a, i) && (re(s) ? t[i] = yi(s) : s && typeof s == "object" && s.constructor === Object ? t[i] = se(s) : t[i] = s);
673
673
  }
674
674
  return t;
675
675
  }
676
- d(ne, "clone");
677
- function wi(r) {
678
- switch (typeof r) {
676
+ d(se, "clone");
677
+ function wi(a) {
678
+ switch (typeof a) {
679
679
  case "string":
680
- return r;
680
+ return a;
681
681
  case "number":
682
- return xi(r);
682
+ return bi(a);
683
683
  case "boolean":
684
- return ki(r);
684
+ return ki(a);
685
685
  case "bigint":
686
- return Qn ? Qn(r) : "0";
686
+ return Qn ? Qn(a) : "0";
687
687
  case "symbol":
688
- return Jn ? Jn(r) : "Symbol()";
688
+ return Jn ? Jn(a) : "Symbol()";
689
689
  case "undefined":
690
- return dt(r);
690
+ return gt(a);
691
691
  case "function":
692
692
  case "object": {
693
- if (r === null)
694
- return dt(r);
695
- const t = r, e = Te(t, "toString");
693
+ if (a === null)
694
+ return gt(a);
695
+ const t = a, e = Se(t, "toString");
696
696
  if (typeof e == "function") {
697
697
  const n = e(t);
698
- return typeof n == "string" ? n : dt(n);
698
+ return typeof n == "string" ? n : gt(n);
699
699
  }
700
- return dt(r);
700
+ return gt(a);
701
701
  }
702
702
  default:
703
- return dt(r);
703
+ return gt(a);
704
704
  }
705
705
  }
706
706
  d(wi, "stringifyValue");
707
- function Te(r, t) {
708
- for (; r !== null; ) {
709
- const n = fi(r, t);
707
+ function Se(a, t) {
708
+ for (; a !== null; ) {
709
+ const n = fi(a, t);
710
710
  if (n) {
711
711
  if (n.get)
712
712
  return Q(n.get);
713
713
  if (typeof n.value == "function")
714
714
  return Q(n.value);
715
715
  }
716
- r = pi(r);
716
+ a = pi(a);
717
717
  }
718
718
  function e() {
719
719
  return null;
720
720
  }
721
721
  return d(e, "fallbackValue"), e;
722
722
  }
723
- d(Te, "lookupGetter");
724
- function Ti(r) {
723
+ d(Se, "lookupGetter");
724
+ function Ti(a) {
725
725
  try {
726
- return te(r, ""), !0;
726
+ return te(a, ""), !0;
727
727
  } catch {
728
728
  return !1;
729
729
  }
730
730
  }
731
731
  d(Ti, "isRegex");
732
- const es = le(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), sn = le(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), rn = le(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Si = le(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), an = le(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ai = le(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ts = le(["#text"]), ns = le(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ln = le(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ss = le(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Dt = le(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ei = he(/{{[\w\W]*|^[\w\W]*}}/g), _i = he(/<%[\w\W]*|^[\w\W]*%>/g), Ri = he(/\${[\w\W]*/g), Ii = he(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ci = he(/^aria-[\-\w]+$/), is = he(
732
+ const es = oe(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), sn = oe(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), an = oe(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Si = oe(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), rn = oe(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ai = oe(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ts = oe(["#text"]), ns = oe(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), ln = oe(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ss = oe(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Dt = oe(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ei = de(/{{[\w\W]*|^[\w\W]*}}/g), _i = de(/<%[\w\W]*|^[\w\W]*%>/g), Ri = de(/\${[\w\W]*/g), Ii = de(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ci = de(/^aria-[\-\w]+$/), is = de(
733
733
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
734
734
  // eslint-disable-line no-useless-escape
735
- ), Di = he(/^(?:\w+script|data):/i), Oi = he(
735
+ ), Di = de(/^(?:\w+script|data):/i), Li = de(
736
736
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
737
737
  // eslint-disable-line no-control-regex
738
- ), Li = he(/^html$/i), Mi = he(/^[a-z][.\w]*(-[.\w]+)+$/i), we = {
738
+ ), Oi = de(/^html$/i), Mi = de(/^[a-z][.\w]*(-[.\w]+)+$/i), Te = {
739
739
  element: 1,
740
740
  attribute: 2,
741
741
  text: 3,
@@ -772,7 +772,7 @@ const es = le(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
772
772
  } catch {
773
773
  return console.warn("TrustedTypes policy " + s + " could not be created."), null;
774
774
  }
775
- }, "_createTrustedTypesPolicy"), rs = /* @__PURE__ */ d(function() {
775
+ }, "_createTrustedTypesPolicy"), as = /* @__PURE__ */ d(function() {
776
776
  return {
777
777
  afterSanitizeAttributes: [],
778
778
  afterSanitizeElements: [],
@@ -786,30 +786,30 @@ const es = le(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
786
786
  };
787
787
  }, "_createHooksMap");
788
788
  function vs() {
789
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ni();
790
- const t = /* @__PURE__ */ d((x) => vs(x), "DOMPurify");
791
- if (t.version = "3.4.7", t.removed = [], !r || !r.document || r.document.nodeType !== we.document || !r.Element)
789
+ let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ni();
790
+ const t = /* @__PURE__ */ d((b) => vs(b), "DOMPurify");
791
+ if (t.version = "3.4.7", t.removed = [], !a || !a.document || a.document.nodeType !== Te.document || !a.Element)
792
792
  return t.isSupported = !1, t;
793
- let e = r.document;
793
+ let e = a.document;
794
794
  const n = e, i = n.currentScript;
795
- r.DocumentFragment;
796
- const s = r.HTMLTemplateElement, l = r.Node, o = r.Element, h = r.NodeFilter, c = r.NamedNodeMap;
797
- c === void 0 && (r.NamedNodeMap || r.MozNamedAttrMap), r.HTMLFormElement;
798
- const m = r.DOMParser, b = r.trustedTypes, k = o.prototype, T = Te(k, "cloneNode"), F = Te(k, "remove"), M = Te(k, "nextSibling"), V = Te(k, "childNodes"), oe = Te(k, "parentNode"), E = Te(k, "shadowRoot"), L = Te(k, "attributes"), I = l && l.prototype ? Te(l.prototype, "nodeType") : null, B = l && l.prototype ? Te(l.prototype, "nodeName") : null;
795
+ a.DocumentFragment;
796
+ const s = a.HTMLTemplateElement, l = a.Node, o = a.Element, h = a.NodeFilter, c = a.NamedNodeMap;
797
+ c === void 0 && (a.NamedNodeMap || a.MozNamedAttrMap), a.HTMLFormElement;
798
+ const m = a.DOMParser, x = a.trustedTypes, k = o.prototype, S = Se(k, "cloneNode"), F = Se(k, "remove"), M = Se(k, "nextSibling"), Z = Se(k, "childNodes"), ce = Se(k, "parentNode"), E = Se(k, "shadowRoot"), L = Se(k, "attributes"), R = l && l.prototype ? Se(l.prototype, "nodeType") : null, B = l && l.prototype ? Se(l.prototype, "nodeName") : null;
799
799
  if (typeof s == "function") {
800
- const x = e.createElement("template");
801
- x.content && x.content.ownerDocument && (e = x.content.ownerDocument);
802
- }
803
- let z, Z = "";
804
- const ce = e, de = ce.implementation, xt = ce.createNodeIterator, it = ce.createDocumentFragment, Ue = ce.getElementsByTagName, Ht = n.importNode;
805
- let K = rs();
806
- t.isSupported = typeof xs == "function" && typeof oe == "function" && de && de.createHTMLDocument !== void 0;
807
- const xe = Ei, Me = _i, R = Ri, kt = Ii, rt = Ci, vt = Di, yt = Oi, Gt = Mi;
800
+ const b = e.createElement("template");
801
+ b.content && b.content.ownerDocument && (e = b.content.ownerDocument);
802
+ }
803
+ let z, j = "";
804
+ const Me = e, ue = Me.implementation, be = Me.createNodeIterator, Ht = Me.createDocumentFragment, rt = Me.getElementsByTagName, He = n.importNode;
805
+ let K = as();
806
+ t.isSupported = typeof bs == "function" && typeof ce == "function" && ue && ue.createHTMLDocument !== void 0;
807
+ const Ge = Ei, ke = _i, Ne = Ri, I = Ii, yt = Ci, lt = Di, ot = Li, Gt = Mi;
808
808
  let wt = is, W = null;
809
- const at = _({}, [...es, ...sn, ...rn, ...an, ...ts]);
810
- let q = null;
811
- const lt = _({}, [...ns, ...ln, ...ss, ...Dt]);
812
- let G = Object.seal(Qe(null, {
809
+ const ct = _({}, [...es, ...sn, ...an, ...rn, ...ts]);
810
+ let Y = null;
811
+ const ut = _({}, [...ns, ...ln, ...ss, ...Dt]);
812
+ let q = Object.seal(et(null, {
813
813
  tagNameCheck: {
814
814
  writable: !0,
815
815
  configurable: !1,
@@ -828,8 +828,8 @@ function vs() {
828
828
  enumerable: !0,
829
829
  value: !1
830
830
  }
831
- })), Ie = null, S = null;
832
- const f = Object.seal(Qe(null, {
831
+ })), Re = null, ze = null;
832
+ const T = Object.seal(et(null, {
833
833
  tagCheck: {
834
834
  writable: !0,
835
835
  configurable: !1,
@@ -843,142 +843,142 @@ function vs() {
843
843
  value: null
844
844
  }
845
845
  }));
846
- let p = !0, D = !0, J = !1, Ae = !0, pe = !1, Ee = !0, Ne = !1, jt = !1, Wt = !1, He = !1, Tt = !1, St = !1, Tn = !0, Sn = !1;
846
+ let g = !0, p = !0, O = !1, J = !0, ae = !1, Ie = !0, pe = !1, jt = !1, Wt = !1, je = !1, Tt = !1, St = !1, Tn = !0, Sn = !1;
847
847
  const An = "user-content-";
848
- let qt = !0, ot = !1, Ge = {}, ke = null;
848
+ let qt = !0, ht = !1, We = {}, ve = null;
849
849
  const Yt = _({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
850
850
  let En = null;
851
851
  const _n = _({}, ["audio", "video", "img", "source", "image", "track"]);
852
852
  let Vt = null;
853
- const Rn = _({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), At = "http://www.w3.org/1998/Math/MathML", Et = "http://www.w3.org/2000/svg", ve = "http://www.w3.org/1999/xhtml";
854
- let je = ve, Zt = !1, Xt = null;
855
- const Ds = _({}, [At, Et, ve], nn);
853
+ const Rn = _({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), At = "http://www.w3.org/1998/Math/MathML", Et = "http://www.w3.org/2000/svg", ye = "http://www.w3.org/1999/xhtml";
854
+ let qe = ye, Zt = !1, Xt = null;
855
+ const Ds = _({}, [At, Et, ye], nn);
856
856
  let Kt = _({}, ["mi", "mo", "mn", "ms", "mtext"]), Qt = _({}, ["annotation-xml"]);
857
- const Os = _({}, ["title", "style", "font", "a", "script"]);
858
- let ct = null;
859
- const Ls = ["application/xhtml+xml", "text/html"], Ms = "text/html";
860
- let X = null, We = null;
861
- const Ns = e.createElement("form"), In = /* @__PURE__ */ d(function(a) {
862
- return a instanceof RegExp || a instanceof Function;
857
+ const Ls = _({}, ["title", "style", "font", "a", "script"]);
858
+ let dt = null;
859
+ const Os = ["application/xhtml+xml", "text/html"], Ms = "text/html";
860
+ let X = null, Ye = null;
861
+ const Ns = e.createElement("form"), In = /* @__PURE__ */ d(function(r) {
862
+ return r instanceof RegExp || r instanceof Function;
863
863
  }, "isRegexOrFunction"), Jt = /* @__PURE__ */ d(function() {
864
- let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
865
- if (We && We === a)
864
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
865
+ if (Ye && Ye === r)
866
866
  return;
867
- (!a || typeof a != "object") && (a = {}), a = ne(a), ct = // eslint-disable-next-line unicorn/prefer-includes
868
- Ls.indexOf(a.PARSER_MEDIA_TYPE) === -1 ? Ms : a.PARSER_MEDIA_TYPE, X = ct === "application/xhtml+xml" ? nn : gt, W = Y(a, "ALLOWED_TAGS") && re(a.ALLOWED_TAGS) ? _({}, a.ALLOWED_TAGS, X) : at, q = Y(a, "ALLOWED_ATTR") && re(a.ALLOWED_ATTR) ? _({}, a.ALLOWED_ATTR, X) : lt, Xt = Y(a, "ALLOWED_NAMESPACES") && re(a.ALLOWED_NAMESPACES) ? _({}, a.ALLOWED_NAMESPACES, nn) : Ds, Vt = Y(a, "ADD_URI_SAFE_ATTR") && re(a.ADD_URI_SAFE_ATTR) ? _(ne(Rn), a.ADD_URI_SAFE_ATTR, X) : Rn, En = Y(a, "ADD_DATA_URI_TAGS") && re(a.ADD_DATA_URI_TAGS) ? _(ne(_n), a.ADD_DATA_URI_TAGS, X) : _n, ke = Y(a, "FORBID_CONTENTS") && re(a.FORBID_CONTENTS) ? _({}, a.FORBID_CONTENTS, X) : Yt, Ie = Y(a, "FORBID_TAGS") && re(a.FORBID_TAGS) ? _({}, a.FORBID_TAGS, X) : ne({}), S = Y(a, "FORBID_ATTR") && re(a.FORBID_ATTR) ? _({}, a.FORBID_ATTR, X) : ne({}), Ge = Y(a, "USE_PROFILES") ? a.USE_PROFILES && typeof a.USE_PROFILES == "object" ? ne(a.USE_PROFILES) : a.USE_PROFILES : !1, p = a.ALLOW_ARIA_ATTR !== !1, D = a.ALLOW_DATA_ATTR !== !1, J = a.ALLOW_UNKNOWN_PROTOCOLS || !1, Ae = a.ALLOW_SELF_CLOSE_IN_ATTR !== !1, pe = a.SAFE_FOR_TEMPLATES || !1, Ee = a.SAFE_FOR_XML !== !1, Ne = a.WHOLE_DOCUMENT || !1, He = a.RETURN_DOM || !1, Tt = a.RETURN_DOM_FRAGMENT || !1, St = a.RETURN_TRUSTED_TYPE || !1, Wt = a.FORCE_BODY || !1, Tn = a.SANITIZE_DOM !== !1, Sn = a.SANITIZE_NAMED_PROPS || !1, qt = a.KEEP_CONTENT !== !1, ot = a.IN_PLACE || !1, wt = Ti(a.ALLOWED_URI_REGEXP) ? a.ALLOWED_URI_REGEXP : is, je = typeof a.NAMESPACE == "string" ? a.NAMESPACE : ve, Kt = Y(a, "MATHML_TEXT_INTEGRATION_POINTS") && a.MATHML_TEXT_INTEGRATION_POINTS && typeof a.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ne(a.MATHML_TEXT_INTEGRATION_POINTS) : _({}, ["mi", "mo", "mn", "ms", "mtext"]), Qt = Y(a, "HTML_INTEGRATION_POINTS") && a.HTML_INTEGRATION_POINTS && typeof a.HTML_INTEGRATION_POINTS == "object" ? ne(a.HTML_INTEGRATION_POINTS) : _({}, ["annotation-xml"]);
869
- const u = Y(a, "CUSTOM_ELEMENT_HANDLING") && a.CUSTOM_ELEMENT_HANDLING && typeof a.CUSTOM_ELEMENT_HANDLING == "object" ? ne(a.CUSTOM_ELEMENT_HANDLING) : Qe(null);
870
- if (G = Qe(null), Y(u, "tagNameCheck") && In(u.tagNameCheck) && (G.tagNameCheck = u.tagNameCheck), Y(u, "attributeNameCheck") && In(u.attributeNameCheck) && (G.attributeNameCheck = u.attributeNameCheck), Y(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), pe && (D = !1), Tt && (He = !0), Ge && (W = _({}, ts), q = Qe(null), Ge.html === !0 && (_(W, es), _(q, ns)), Ge.svg === !0 && (_(W, sn), _(q, ln), _(q, Dt)), Ge.svgFilters === !0 && (_(W, rn), _(q, ln), _(q, Dt)), Ge.mathMl === !0 && (_(W, an), _(q, ss), _(q, Dt))), f.tagCheck = null, f.attributeCheck = null, Y(a, "ADD_TAGS") && (typeof a.ADD_TAGS == "function" ? f.tagCheck = a.ADD_TAGS : re(a.ADD_TAGS) && (W === at && (W = ne(W)), _(W, a.ADD_TAGS, X))), Y(a, "ADD_ATTR") && (typeof a.ADD_ATTR == "function" ? f.attributeCheck = a.ADD_ATTR : re(a.ADD_ATTR) && (q === lt && (q = ne(q)), _(q, a.ADD_ATTR, X))), Y(a, "ADD_URI_SAFE_ATTR") && re(a.ADD_URI_SAFE_ATTR) && _(Vt, a.ADD_URI_SAFE_ATTR, X), Y(a, "FORBID_CONTENTS") && re(a.FORBID_CONTENTS) && (ke === Yt && (ke = ne(ke)), _(ke, a.FORBID_CONTENTS, X)), Y(a, "ADD_FORBID_CONTENTS") && re(a.ADD_FORBID_CONTENTS) && (ke === Yt && (ke = ne(ke)), _(ke, a.ADD_FORBID_CONTENTS, X)), qt && (W["#text"] = !0), Ne && _(W, ["html", "head", "body"]), W.table && (_(W, ["tbody"]), delete Ie.tbody), a.TRUSTED_TYPES_POLICY) {
871
- if (typeof a.TRUSTED_TYPES_POLICY.createHTML != "function")
872
- throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
873
- if (typeof a.TRUSTED_TYPES_POLICY.createScriptURL != "function")
874
- throw pt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
875
- z = a.TRUSTED_TYPES_POLICY, Z = z.createHTML("");
867
+ (!r || typeof r != "object") && (r = {}), r = se(r), dt = // eslint-disable-next-line unicorn/prefer-includes
868
+ Os.indexOf(r.PARSER_MEDIA_TYPE) === -1 ? Ms : r.PARSER_MEDIA_TYPE, X = dt === "application/xhtml+xml" ? nn : bt, W = V(r, "ALLOWED_TAGS") && re(r.ALLOWED_TAGS) ? _({}, r.ALLOWED_TAGS, X) : ct, Y = V(r, "ALLOWED_ATTR") && re(r.ALLOWED_ATTR) ? _({}, r.ALLOWED_ATTR, X) : ut, Xt = V(r, "ALLOWED_NAMESPACES") && re(r.ALLOWED_NAMESPACES) ? _({}, r.ALLOWED_NAMESPACES, nn) : Ds, Vt = V(r, "ADD_URI_SAFE_ATTR") && re(r.ADD_URI_SAFE_ATTR) ? _(se(Rn), r.ADD_URI_SAFE_ATTR, X) : Rn, En = V(r, "ADD_DATA_URI_TAGS") && re(r.ADD_DATA_URI_TAGS) ? _(se(_n), r.ADD_DATA_URI_TAGS, X) : _n, ve = V(r, "FORBID_CONTENTS") && re(r.FORBID_CONTENTS) ? _({}, r.FORBID_CONTENTS, X) : Yt, Re = V(r, "FORBID_TAGS") && re(r.FORBID_TAGS) ? _({}, r.FORBID_TAGS, X) : se({}), ze = V(r, "FORBID_ATTR") && re(r.FORBID_ATTR) ? _({}, r.FORBID_ATTR, X) : se({}), We = V(r, "USE_PROFILES") ? r.USE_PROFILES && typeof r.USE_PROFILES == "object" ? se(r.USE_PROFILES) : r.USE_PROFILES : !1, g = r.ALLOW_ARIA_ATTR !== !1, p = r.ALLOW_DATA_ATTR !== !1, O = r.ALLOW_UNKNOWN_PROTOCOLS || !1, J = r.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ae = r.SAFE_FOR_TEMPLATES || !1, Ie = r.SAFE_FOR_XML !== !1, pe = r.WHOLE_DOCUMENT || !1, je = r.RETURN_DOM || !1, Tt = r.RETURN_DOM_FRAGMENT || !1, St = r.RETURN_TRUSTED_TYPE || !1, Wt = r.FORCE_BODY || !1, Tn = r.SANITIZE_DOM !== !1, Sn = r.SANITIZE_NAMED_PROPS || !1, qt = r.KEEP_CONTENT !== !1, ht = r.IN_PLACE || !1, wt = Ti(r.ALLOWED_URI_REGEXP) ? r.ALLOWED_URI_REGEXP : is, qe = typeof r.NAMESPACE == "string" ? r.NAMESPACE : ye, Kt = V(r, "MATHML_TEXT_INTEGRATION_POINTS") && r.MATHML_TEXT_INTEGRATION_POINTS && typeof r.MATHML_TEXT_INTEGRATION_POINTS == "object" ? se(r.MATHML_TEXT_INTEGRATION_POINTS) : _({}, ["mi", "mo", "mn", "ms", "mtext"]), Qt = V(r, "HTML_INTEGRATION_POINTS") && r.HTML_INTEGRATION_POINTS && typeof r.HTML_INTEGRATION_POINTS == "object" ? se(r.HTML_INTEGRATION_POINTS) : _({}, ["annotation-xml"]);
869
+ const u = V(r, "CUSTOM_ELEMENT_HANDLING") && r.CUSTOM_ELEMENT_HANDLING && typeof r.CUSTOM_ELEMENT_HANDLING == "object" ? se(r.CUSTOM_ELEMENT_HANDLING) : et(null);
870
+ if (q = et(null), V(u, "tagNameCheck") && In(u.tagNameCheck) && (q.tagNameCheck = u.tagNameCheck), V(u, "attributeNameCheck") && In(u.attributeNameCheck) && (q.attributeNameCheck = u.attributeNameCheck), V(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (q.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), ae && (p = !1), Tt && (je = !0), We && (W = _({}, ts), Y = et(null), We.html === !0 && (_(W, es), _(Y, ns)), We.svg === !0 && (_(W, sn), _(Y, ln), _(Y, Dt)), We.svgFilters === !0 && (_(W, an), _(Y, ln), _(Y, Dt)), We.mathMl === !0 && (_(W, rn), _(Y, ss), _(Y, Dt))), T.tagCheck = null, T.attributeCheck = null, V(r, "ADD_TAGS") && (typeof r.ADD_TAGS == "function" ? T.tagCheck = r.ADD_TAGS : re(r.ADD_TAGS) && (W === ct && (W = se(W)), _(W, r.ADD_TAGS, X))), V(r, "ADD_ATTR") && (typeof r.ADD_ATTR == "function" ? T.attributeCheck = r.ADD_ATTR : re(r.ADD_ATTR) && (Y === ut && (Y = se(Y)), _(Y, r.ADD_ATTR, X))), V(r, "ADD_URI_SAFE_ATTR") && re(r.ADD_URI_SAFE_ATTR) && _(Vt, r.ADD_URI_SAFE_ATTR, X), V(r, "FORBID_CONTENTS") && re(r.FORBID_CONTENTS) && (ve === Yt && (ve = se(ve)), _(ve, r.FORBID_CONTENTS, X)), V(r, "ADD_FORBID_CONTENTS") && re(r.ADD_FORBID_CONTENTS) && (ve === Yt && (ve = se(ve)), _(ve, r.ADD_FORBID_CONTENTS, X)), qt && (W["#text"] = !0), pe && _(W, ["html", "head", "body"]), W.table && (_(W, ["tbody"]), delete Re.tbody), r.TRUSTED_TYPES_POLICY) {
871
+ if (typeof r.TRUSTED_TYPES_POLICY.createHTML != "function")
872
+ throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
873
+ if (typeof r.TRUSTED_TYPES_POLICY.createScriptURL != "function")
874
+ throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
875
+ z = r.TRUSTED_TYPES_POLICY, j = z.createHTML("");
876
876
  } else
877
- z === void 0 && (z = zi(b, i)), z !== null && typeof Z == "string" && (Z = z.createHTML(""));
878
- (K.uponSanitizeElement.length > 0 || K.uponSanitizeAttribute.length > 0) && W === at && (W = ne(W)), K.uponSanitizeAttribute.length > 0 && q === lt && (q = ne(q)), le && le(a), We = a;
879
- }, "_parseConfig"), Cn = _({}, [...sn, ...rn, ...Si]), Dn = _({}, [...an, ...Ai]), zs = /* @__PURE__ */ d(function(a) {
880
- let u = oe(a);
877
+ z === void 0 && (z = zi(x, i)), z !== null && typeof j == "string" && (j = z.createHTML(""));
878
+ (K.uponSanitizeElement.length > 0 || K.uponSanitizeAttribute.length > 0) && W === ct && (W = se(W)), K.uponSanitizeAttribute.length > 0 && Y === ut && (Y = se(Y)), oe && oe(r), Ye = r;
879
+ }, "_parseConfig"), Cn = _({}, [...sn, ...an, ...Si]), Dn = _({}, [...rn, ...Ai]), zs = /* @__PURE__ */ d(function(r) {
880
+ let u = ce(r);
881
881
  (!u || !u.tagName) && (u = {
882
- namespaceURI: je,
882
+ namespaceURI: qe,
883
883
  tagName: "template"
884
884
  });
885
- const g = gt(a.tagName), P = gt(u.tagName);
886
- return Xt[a.namespaceURI] ? a.namespaceURI === Et ? u.namespaceURI === ve ? g === "svg" : u.namespaceURI === At ? g === "svg" && (P === "annotation-xml" || Kt[P]) : !!Cn[g] : a.namespaceURI === At ? u.namespaceURI === ve ? g === "math" : u.namespaceURI === Et ? g === "math" && Qt[P] : !!Dn[g] : a.namespaceURI === ve ? u.namespaceURI === Et && !Qt[P] || u.namespaceURI === At && !Kt[P] ? !1 : !Dn[g] && (Os[g] || !Cn[g]) : !!(ct === "application/xhtml+xml" && Xt[a.namespaceURI]) : !1;
887
- }, "_checkValidNamespace"), fe = /* @__PURE__ */ d(function(a) {
888
- Ze(t.removed, {
889
- element: a
885
+ const f = bt(r.tagName), P = bt(u.tagName);
886
+ return Xt[r.namespaceURI] ? r.namespaceURI === Et ? u.namespaceURI === ye ? f === "svg" : u.namespaceURI === At ? f === "svg" && (P === "annotation-xml" || Kt[P]) : !!Cn[f] : r.namespaceURI === At ? u.namespaceURI === ye ? f === "math" : u.namespaceURI === Et ? f === "math" && Qt[P] : !!Dn[f] : r.namespaceURI === ye ? u.namespaceURI === Et && !Qt[P] || u.namespaceURI === At && !Kt[P] ? !1 : !Dn[f] && (Ls[f] || !Cn[f]) : !!(dt === "application/xhtml+xml" && Xt[r.namespaceURI]) : !1;
887
+ }, "_checkValidNamespace"), fe = /* @__PURE__ */ d(function(r) {
888
+ Ke(t.removed, {
889
+ element: r
890
890
  });
891
891
  try {
892
- oe(a).removeChild(a);
892
+ ce(r).removeChild(r);
893
893
  } catch {
894
- F(a);
894
+ F(r);
895
895
  }
896
- }, "_forceRemove"), ze = /* @__PURE__ */ d(function(a, u) {
896
+ }, "_forceRemove"), $e = /* @__PURE__ */ d(function(r, u) {
897
897
  try {
898
- Ze(t.removed, {
899
- attribute: u.getAttributeNode(a),
898
+ Ke(t.removed, {
899
+ attribute: u.getAttributeNode(r),
900
900
  from: u
901
901
  });
902
902
  } catch {
903
- Ze(t.removed, {
903
+ Ke(t.removed, {
904
904
  attribute: null,
905
905
  from: u
906
906
  });
907
907
  }
908
- if (u.removeAttribute(a), a === "is")
909
- if (He || Tt)
908
+ if (u.removeAttribute(r), r === "is")
909
+ if (je || Tt)
910
910
  try {
911
911
  fe(u);
912
912
  } catch {
913
913
  }
914
914
  else
915
915
  try {
916
- u.setAttribute(a, "");
916
+ u.setAttribute(r, "");
917
917
  } catch {
918
918
  }
919
- }, "_removeAttribute"), On = /* @__PURE__ */ d(function(a) {
920
- let u = null, g = null;
919
+ }, "_removeAttribute"), Ln = /* @__PURE__ */ d(function(r) {
920
+ let u = null, f = null;
921
921
  if (Wt)
922
- a = "<remove></remove>" + a;
922
+ r = "<remove></remove>" + r;
923
923
  else {
924
- const H = Xn(a, /^[\r\n\t ]+/);
925
- g = H && H[0];
924
+ const H = Xn(r, /^[\r\n\t ]+/);
925
+ f = H && H[0];
926
926
  }
927
- ct === "application/xhtml+xml" && je === ve && (a = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + a + "</body></html>");
928
- const P = z ? z.createHTML(a) : a;
929
- if (je === ve)
927
+ dt === "application/xhtml+xml" && qe === ye && (r = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + r + "</body></html>");
928
+ const P = z ? z.createHTML(r) : r;
929
+ if (qe === ye)
930
930
  try {
931
- u = new m().parseFromString(P, ct);
931
+ u = new m().parseFromString(P, dt);
932
932
  } catch {
933
933
  }
934
934
  if (!u || !u.documentElement) {
935
- u = de.createDocument(je, "template", null);
935
+ u = ue.createDocument(qe, "template", null);
936
936
  try {
937
- u.documentElement.innerHTML = Zt ? Z : P;
937
+ u.documentElement.innerHTML = Zt ? j : P;
938
938
  } catch {
939
939
  }
940
940
  }
941
- const O = u.body || u.documentElement;
942
- return a && g && O.insertBefore(e.createTextNode(g), O.childNodes[0] || null), je === ve ? Ue.call(u, Ne ? "html" : "body")[0] : Ne ? u.documentElement : O;
943
- }, "_initDocument"), Ln = /* @__PURE__ */ d(function(a) {
944
- return xt.call(
945
- a.ownerDocument || a,
946
- a,
941
+ const D = u.body || u.documentElement;
942
+ return r && f && D.insertBefore(e.createTextNode(f), D.childNodes[0] || null), qe === ye ? rt.call(u, pe ? "html" : "body")[0] : pe ? u.documentElement : D;
943
+ }, "_initDocument"), On = /* @__PURE__ */ d(function(r) {
944
+ return be.call(
945
+ r.ownerDocument || r,
946
+ r,
947
947
  // eslint-disable-next-line no-bitwise
948
948
  h.SHOW_ELEMENT | h.SHOW_COMMENT | h.SHOW_TEXT | h.SHOW_PROCESSING_INSTRUCTION | h.SHOW_CDATA_SECTION,
949
949
  null
950
950
  );
951
- }, "_createNodeIterator"), Mn = /* @__PURE__ */ d(function(a) {
952
- a.normalize();
953
- const u = xt.call(
954
- a.ownerDocument || a,
955
- a,
951
+ }, "_createNodeIterator"), Mn = /* @__PURE__ */ d(function(r) {
952
+ r.normalize();
953
+ const u = be.call(
954
+ r.ownerDocument || r,
955
+ r,
956
956
  // eslint-disable-next-line no-bitwise
957
957
  h.SHOW_TEXT | h.SHOW_COMMENT | h.SHOW_CDATA_SECTION | h.SHOW_PROCESSING_INSTRUCTION,
958
958
  null
959
959
  );
960
- let g = u.nextNode();
961
- for (; g; ) {
962
- let P = g.data;
963
- Ve([xe, Me, R], (O) => {
964
- P = Xe(P, O, " ");
965
- }), g.data = P, g = u.nextNode();
966
- }
967
- }, "_scrubTemplateExpressions"), _t = /* @__PURE__ */ d(function(a) {
968
- const u = B ? B(a) : null;
969
- return typeof u != "string" || X(u) !== "form" ? !1 : typeof a.nodeName != "string" || typeof a.textContent != "string" || typeof a.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
960
+ let f = u.nextNode();
961
+ for (; f; ) {
962
+ let P = f.data;
963
+ Xe([Ge, ke, Ne], (D) => {
964
+ P = Qe(P, D, " ");
965
+ }), f.data = P, f = u.nextNode();
966
+ }
967
+ }, "_scrubTemplateExpressions"), _t = /* @__PURE__ */ d(function(r) {
968
+ const u = B ? B(r) : null;
969
+ return typeof u != "string" || X(u) !== "form" ? !1 : typeof r.nodeName != "string" || typeof r.textContent != "string" || typeof r.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
970
970
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
971
971
  // makes the direct read diverge from the cached read; a clean form
972
972
  // (same-realm OR foreign-realm) has both reads pointing at the same
973
973
  // canonical NamedNodeMap.
974
- a.attributes !== L(a) || typeof a.removeAttribute != "function" || typeof a.setAttribute != "function" || typeof a.namespaceURI != "string" || typeof a.insertBefore != "function" || typeof a.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
974
+ r.attributes !== L(r) || typeof r.removeAttribute != "function" || typeof r.setAttribute != "function" || typeof r.namespaceURI != "string" || typeof r.insertBefore != "function" || typeof r.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
975
975
  // returns the integer 1 for any Element regardless of realm; direct
976
976
  // read on a clobbered form (e.g. <input name="nodeType">) returns
977
977
  // the named child element. Cheap addition — nodeType is read from
978
978
  // an internal slot, no serialization cost — and removes a residual
979
979
  // clobbering surface used by several mXSS / PI / comment branches
980
980
  // in _sanitizeElements that compare currentNode.nodeType directly.
981
- a.nodeType !== I(a) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
981
+ r.nodeType !== R(r) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
982
982
  // "childNodes" shadows the prototype getter. Direct reads of
983
983
  // form.childNodes from a clobbered form return the named child
984
984
  // instead of the real NodeList, so any walk that reads it directly
@@ -989,80 +989,80 @@ function vs() {
989
989
  // select, etc.) regardless of whether the named child happens to
990
990
  // carry a numeric .length, which a typeof-based probe would miss
991
991
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
992
- a.childNodes !== V(a);
993
- }, "_isClobbered"), ut = /* @__PURE__ */ d(function(a) {
994
- if (!I || typeof a != "object" || a === null)
992
+ r.childNodes !== Z(r);
993
+ }, "_isClobbered"), pt = /* @__PURE__ */ d(function(r) {
994
+ if (!R || typeof r != "object" || r === null)
995
995
  return !1;
996
996
  try {
997
- return I(a) === we.documentFragment;
997
+ return R(r) === Te.documentFragment;
998
998
  } catch {
999
999
  return !1;
1000
1000
  }
1001
- }, "_isDocumentFragment"), Rt = /* @__PURE__ */ d(function(a) {
1002
- if (!I || typeof a != "object" || a === null)
1001
+ }, "_isDocumentFragment"), Rt = /* @__PURE__ */ d(function(r) {
1002
+ if (!R || typeof r != "object" || r === null)
1003
1003
  return !1;
1004
1004
  try {
1005
- return typeof I(a) == "number";
1005
+ return typeof R(r) == "number";
1006
1006
  } catch {
1007
1007
  return !1;
1008
1008
  }
1009
1009
  }, "_isNode");
1010
- function _e(x, a, u) {
1011
- Ve(x, (g) => {
1012
- g.call(t, a, u, We);
1010
+ function Ee(b, r, u) {
1011
+ Xe(b, (f) => {
1012
+ f.call(t, r, u, Ye);
1013
1013
  });
1014
1014
  }
1015
- d(_e, "_executeHooks");
1016
- const Nn = /* @__PURE__ */ d(function(a) {
1015
+ d(Ee, "_executeHooks");
1016
+ const Nn = /* @__PURE__ */ d(function(r) {
1017
1017
  let u = null;
1018
- if (_e(K.beforeSanitizeElements, a, null), _t(a))
1019
- return fe(a), !0;
1020
- const g = X(a.nodeName);
1021
- if (_e(K.uponSanitizeElement, a, {
1022
- tagName: g,
1018
+ if (Ee(K.beforeSanitizeElements, r, null), _t(r))
1019
+ return fe(r), !0;
1020
+ const f = X(r.nodeName);
1021
+ if (Ee(K.uponSanitizeElement, r, {
1022
+ tagName: f,
1023
1023
  allowedTags: W
1024
- }), Ee && a.hasChildNodes() && !Rt(a.firstElementChild) && te(/<[/\w!]/g, a.innerHTML) && te(/<[/\w!]/g, a.textContent) || Ee && a.namespaceURI === ve && g === "style" && Rt(a.firstElementChild) || a.nodeType === we.progressingInstruction || Ee && a.nodeType === we.comment && te(/<[/\w]/g, a.data))
1025
- return fe(a), !0;
1026
- if (Ie[g] || !(f.tagCheck instanceof Function && f.tagCheck(g)) && !W[g]) {
1027
- if (!Ie[g] && $n(g) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, g) || G.tagNameCheck instanceof Function && G.tagNameCheck(g)))
1024
+ }), Ie && r.hasChildNodes() && !Rt(r.firstElementChild) && te(/<[/\w!]/g, r.innerHTML) && te(/<[/\w!]/g, r.textContent) || Ie && r.namespaceURI === ye && f === "style" && Rt(r.firstElementChild) || r.nodeType === Te.progressingInstruction || Ie && r.nodeType === Te.comment && te(/<[/\w]/g, r.data))
1025
+ return fe(r), !0;
1026
+ if (Re[f] || !(T.tagCheck instanceof Function && T.tagCheck(f)) && !W[f]) {
1027
+ if (!Re[f] && $n(f) && (q.tagNameCheck instanceof RegExp && te(q.tagNameCheck, f) || q.tagNameCheck instanceof Function && q.tagNameCheck(f)))
1028
1028
  return !1;
1029
- if (qt && !ke[g]) {
1030
- const O = oe(a), H = V(a);
1031
- if (H && O) {
1032
- const ue = H.length;
1033
- for (let ye = ue - 1; ye >= 0; --ye) {
1034
- const ge = T(H[ye], !0);
1035
- O.insertBefore(ge, M(a));
1029
+ if (qt && !ve[f]) {
1030
+ const D = ce(r), H = Z(r);
1031
+ if (H && D) {
1032
+ const he = H.length;
1033
+ for (let we = he - 1; we >= 0; --we) {
1034
+ const ge = S(H[we], !0);
1035
+ D.insertBefore(ge, M(r));
1036
1036
  }
1037
1037
  }
1038
1038
  }
1039
- return fe(a), !0;
1039
+ return fe(r), !0;
1040
1040
  }
1041
- return (I ? I(a) : a.nodeType) === we.element && !zs(a) || (g === "noscript" || g === "noembed" || g === "noframes") && te(/<\/no(script|embed|frames)/i, a.innerHTML) ? (fe(a), !0) : (pe && a.nodeType === we.text && (u = a.textContent, Ve([xe, Me, R], (O) => {
1042
- u = Xe(u, O, " ");
1043
- }), a.textContent !== u && (Ze(t.removed, {
1044
- element: a.cloneNode()
1045
- }), a.textContent = u)), _e(K.afterSanitizeElements, a, null), !1);
1046
- }, "_sanitizeElements"), zn = /* @__PURE__ */ d(function(a, u, g) {
1047
- if (S[u] || Tn && (u === "id" || u === "name") && (g in e || g in Ns))
1041
+ return (R ? R(r) : r.nodeType) === Te.element && !zs(r) || (f === "noscript" || f === "noembed" || f === "noframes") && te(/<\/no(script|embed|frames)/i, r.innerHTML) ? (fe(r), !0) : (ae && r.nodeType === Te.text && (u = r.textContent, Xe([Ge, ke, Ne], (D) => {
1042
+ u = Qe(u, D, " ");
1043
+ }), r.textContent !== u && (Ke(t.removed, {
1044
+ element: r.cloneNode()
1045
+ }), r.textContent = u)), Ee(K.afterSanitizeElements, r, null), !1);
1046
+ }, "_sanitizeElements"), zn = /* @__PURE__ */ d(function(r, u, f) {
1047
+ if (ze[u] || Tn && (u === "id" || u === "name") && (f in e || f in Ns))
1048
1048
  return !1;
1049
- const P = q[u] || f.attributeCheck instanceof Function && f.attributeCheck(u, a);
1050
- if (!(D && !S[u] && te(kt, u))) {
1051
- if (!(p && te(rt, u))) {
1052
- if (!P || S[u]) {
1049
+ const P = Y[u] || T.attributeCheck instanceof Function && T.attributeCheck(u, r);
1050
+ if (!(p && !ze[u] && te(I, u))) {
1051
+ if (!(g && te(yt, u))) {
1052
+ if (!P || ze[u]) {
1053
1053
  if (
1054
1054
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1055
1055
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1056
1056
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1057
- !($n(a) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, a) || G.tagNameCheck instanceof Function && G.tagNameCheck(a)) && (G.attributeNameCheck instanceof RegExp && te(G.attributeNameCheck, u) || G.attributeNameCheck instanceof Function && G.attributeNameCheck(u, a)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1057
+ !($n(r) && (q.tagNameCheck instanceof RegExp && te(q.tagNameCheck, r) || q.tagNameCheck instanceof Function && q.tagNameCheck(r)) && (q.attributeNameCheck instanceof RegExp && te(q.attributeNameCheck, u) || q.attributeNameCheck instanceof Function && q.attributeNameCheck(u, r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1058
1058
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1059
- u === "is" && G.allowCustomizedBuiltInElements && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, g) || G.tagNameCheck instanceof Function && G.tagNameCheck(g)))
1059
+ u === "is" && q.allowCustomizedBuiltInElements && (q.tagNameCheck instanceof RegExp && te(q.tagNameCheck, f) || q.tagNameCheck instanceof Function && q.tagNameCheck(f)))
1060
1060
  ) return !1;
1061
1061
  } else if (!Vt[u]) {
1062
- if (!te(wt, Xe(g, yt, ""))) {
1063
- if (!((u === "src" || u === "xlink:href" || u === "href") && a !== "script" && Kn(g, "data:") === 0 && En[a])) {
1064
- if (!(J && !te(vt, Xe(g, yt, "")))) {
1065
- if (g)
1062
+ if (!te(wt, Qe(f, ot, ""))) {
1063
+ if (!((u === "src" || u === "xlink:href" || u === "href") && r !== "script" && Kn(f, "data:") === 0 && En[r])) {
1064
+ if (!(O && !te(lt, Qe(f, ot, "")))) {
1065
+ if (f)
1066
1066
  return !1;
1067
1067
  }
1068
1068
  }
@@ -1071,52 +1071,52 @@ function vs() {
1071
1071
  }
1072
1072
  }
1073
1073
  return !0;
1074
- }, "_isValidAttribute"), $s = _({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), $n = /* @__PURE__ */ d(function(a) {
1075
- return !$s[gt(a)] && te(Gt, a);
1076
- }, "_isBasicCustomElement"), Pn = /* @__PURE__ */ d(function(a) {
1077
- _e(K.beforeSanitizeAttributes, a, null);
1078
- const u = a.attributes;
1079
- if (!u || _t(a))
1074
+ }, "_isValidAttribute"), $s = _({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), $n = /* @__PURE__ */ d(function(r) {
1075
+ return !$s[bt(r)] && te(Gt, r);
1076
+ }, "_isBasicCustomElement"), Pn = /* @__PURE__ */ d(function(r) {
1077
+ Ee(K.beforeSanitizeAttributes, r, null);
1078
+ const u = r.attributes;
1079
+ if (!u || _t(r))
1080
1080
  return;
1081
- const g = {
1081
+ const f = {
1082
1082
  attrName: "",
1083
1083
  attrValue: "",
1084
1084
  keepAttr: !0,
1085
- allowedAttributes: q,
1085
+ allowedAttributes: Y,
1086
1086
  forceKeepAttr: void 0
1087
1087
  };
1088
1088
  let P = u.length;
1089
1089
  for (; P--; ) {
1090
- const O = u[P], H = O.name, ue = O.namespaceURI, ye = O.value, ge = X(H), en = ye;
1091
- let ee = H === "value" ? en : bi(en);
1092
- if (g.attrName = ge, g.attrValue = ee, g.keepAttr = !0, g.forceKeepAttr = void 0, _e(K.uponSanitizeAttribute, a, g), ee = g.attrValue, Sn && (ge === "id" || ge === "name") && Kn(ee, An) !== 0 && (ze(H, a), ee = An + ee), Ee && te(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, ee)) {
1093
- ze(H, a);
1090
+ const D = u[P], H = D.name, he = D.namespaceURI, we = D.value, ge = X(H), en = we;
1091
+ let ee = H === "value" ? en : xi(en);
1092
+ if (f.attrName = ge, f.attrValue = ee, f.keepAttr = !0, f.forceKeepAttr = void 0, Ee(K.uponSanitizeAttribute, r, f), ee = f.attrValue, Sn && (ge === "id" || ge === "name") && Kn(ee, An) !== 0 && ($e(H, r), ee = An + ee), Ie && te(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, ee)) {
1093
+ $e(H, r);
1094
1094
  continue;
1095
1095
  }
1096
1096
  if (ge === "attributename" && Xn(ee, "href")) {
1097
- ze(H, a);
1097
+ $e(H, r);
1098
1098
  continue;
1099
1099
  }
1100
- if (g.forceKeepAttr)
1100
+ if (f.forceKeepAttr)
1101
1101
  continue;
1102
- if (!g.keepAttr) {
1103
- ze(H, a);
1102
+ if (!f.keepAttr) {
1103
+ $e(H, r);
1104
1104
  continue;
1105
1105
  }
1106
- if (!Ae && te(/\/>/i, ee)) {
1107
- ze(H, a);
1106
+ if (!J && te(/\/>/i, ee)) {
1107
+ $e(H, r);
1108
1108
  continue;
1109
1109
  }
1110
- pe && Ve([xe, Me, R], (Fn) => {
1111
- ee = Xe(ee, Fn, " ");
1110
+ ae && Xe([Ge, ke, Ne], (Fn) => {
1111
+ ee = Qe(ee, Fn, " ");
1112
1112
  });
1113
- const Bn = X(a.nodeName);
1113
+ const Bn = X(r.nodeName);
1114
1114
  if (!zn(Bn, ge, ee)) {
1115
- ze(H, a);
1115
+ $e(H, r);
1116
1116
  continue;
1117
1117
  }
1118
- if (z && typeof b == "object" && typeof b.getAttributeType == "function" && !ue)
1119
- switch (b.getAttributeType(Bn, ge)) {
1118
+ if (z && typeof x == "object" && typeof x.getAttributeType == "function" && !he)
1119
+ switch (x.getAttributeType(Bn, ge)) {
1120
1120
  case "TrustedHTML": {
1121
1121
  ee = z.createHTML(ee);
1122
1122
  break;
@@ -1128,109 +1128,109 @@ function vs() {
1128
1128
  }
1129
1129
  if (ee !== en)
1130
1130
  try {
1131
- ue ? a.setAttributeNS(ue, H, ee) : a.setAttribute(H, ee), _t(a) ? fe(a) : Zn(t.removed);
1131
+ he ? r.setAttributeNS(he, H, ee) : r.setAttribute(H, ee), _t(r) ? fe(r) : Zn(t.removed);
1132
1132
  } catch {
1133
- ze(H, a);
1133
+ $e(H, r);
1134
1134
  }
1135
1135
  }
1136
- _e(K.afterSanitizeAttributes, a, null);
1137
- }, "_sanitizeAttributes"), It = /* @__PURE__ */ d(function(a) {
1136
+ Ee(K.afterSanitizeAttributes, r, null);
1137
+ }, "_sanitizeAttributes"), It = /* @__PURE__ */ d(function(r) {
1138
1138
  let u = null;
1139
- const g = Ln(a);
1140
- for (_e(K.beforeSanitizeShadowDOM, a, null); u = g.nextNode(); )
1141
- if (_e(K.uponSanitizeShadowNode, u, null), Nn(u), Pn(u), ut(u.content) && It(u.content), (I ? I(u) : u.nodeType) === we.element) {
1142
- const O = E ? E(u) : u.shadowRoot;
1143
- ut(O) && (qe(O), It(O));
1144
- }
1145
- _e(K.afterSanitizeShadowDOM, a, null);
1146
- }, "_sanitizeShadowDOM"), qe = /* @__PURE__ */ d(function(a) {
1147
- const u = I ? I(a) : a.nodeType;
1148
- if (u === we.element) {
1149
- const O = E ? E(a) : a.shadowRoot;
1150
- ut(O) && (qe(O), It(O));
1151
- }
1152
- const g = V ? V(a) : a.childNodes;
1153
- if (!g)
1139
+ const f = On(r);
1140
+ for (Ee(K.beforeSanitizeShadowDOM, r, null); u = f.nextNode(); )
1141
+ if (Ee(K.uponSanitizeShadowNode, u, null), Nn(u), Pn(u), pt(u.content) && It(u.content), (R ? R(u) : u.nodeType) === Te.element) {
1142
+ const D = E ? E(u) : u.shadowRoot;
1143
+ pt(D) && (Ve(D), It(D));
1144
+ }
1145
+ Ee(K.afterSanitizeShadowDOM, r, null);
1146
+ }, "_sanitizeShadowDOM"), Ve = /* @__PURE__ */ d(function(r) {
1147
+ const u = R ? R(r) : r.nodeType;
1148
+ if (u === Te.element) {
1149
+ const D = E ? E(r) : r.shadowRoot;
1150
+ pt(D) && (Ve(D), It(D));
1151
+ }
1152
+ const f = Z ? Z(r) : r.childNodes;
1153
+ if (!f)
1154
1154
  return;
1155
1155
  const P = [];
1156
- Ve(g, (O) => {
1157
- Ze(P, O);
1156
+ Xe(f, (D) => {
1157
+ Ke(P, D);
1158
1158
  });
1159
- for (const O of P)
1160
- qe(O);
1161
- if (u === we.element) {
1162
- const O = B ? B(a) : null;
1163
- if (typeof O == "string" && X(O) === "template") {
1164
- const H = a.content;
1165
- ut(H) && qe(H);
1159
+ for (const D of P)
1160
+ Ve(D);
1161
+ if (u === Te.element) {
1162
+ const D = B ? B(r) : null;
1163
+ if (typeof D == "string" && X(D) === "template") {
1164
+ const H = r.content;
1165
+ pt(H) && Ve(H);
1166
1166
  }
1167
1167
  }
1168
1168
  }, "_sanitizeAttachedShadowRoots");
1169
- return t.sanitize = function(x) {
1170
- let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, g = null, P = null, O = null;
1171
- if (Zt = !x, Zt && (x = "<!-->"), typeof x != "string" && !Rt(x) && (x = wi(x), typeof x != "string"))
1172
- throw pt("dirty is not a string, aborting");
1169
+ return t.sanitize = function(b) {
1170
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, f = null, P = null, D = null;
1171
+ if (Zt = !b, Zt && (b = "<!-->"), typeof b != "string" && !Rt(b) && (b = wi(b), typeof b != "string"))
1172
+ throw mt("dirty is not a string, aborting");
1173
1173
  if (!t.isSupported)
1174
- return x;
1175
- if (jt || Jt(a), t.removed = [], typeof x == "string" && (ot = !1), ot) {
1176
- const ye = B ? B(x) : x.nodeName;
1177
- if (typeof ye == "string") {
1178
- const ge = X(ye);
1179
- if (!W[ge] || Ie[ge])
1180
- throw pt("root node is forbidden and cannot be sanitized in-place");
1181
- }
1182
- if (_t(x))
1183
- throw pt("root node is clobbered and cannot be sanitized in-place");
1184
- qe(x);
1185
- } else if (Rt(x))
1186
- u = On("<!---->"), g = u.ownerDocument.importNode(x, !0), g.nodeType === we.element && g.nodeName === "BODY" || g.nodeName === "HTML" ? u = g : u.appendChild(g), qe(g);
1174
+ return b;
1175
+ if (jt || Jt(r), t.removed = [], typeof b == "string" && (ht = !1), ht) {
1176
+ const we = B ? B(b) : b.nodeName;
1177
+ if (typeof we == "string") {
1178
+ const ge = X(we);
1179
+ if (!W[ge] || Re[ge])
1180
+ throw mt("root node is forbidden and cannot be sanitized in-place");
1181
+ }
1182
+ if (_t(b))
1183
+ throw mt("root node is clobbered and cannot be sanitized in-place");
1184
+ Ve(b);
1185
+ } else if (Rt(b))
1186
+ u = Ln("<!---->"), f = u.ownerDocument.importNode(b, !0), f.nodeType === Te.element && f.nodeName === "BODY" || f.nodeName === "HTML" ? u = f : u.appendChild(f), Ve(f);
1187
1187
  else {
1188
- if (!He && !pe && !Ne && // eslint-disable-next-line unicorn/prefer-includes
1189
- x.indexOf("<") === -1)
1190
- return z && St ? z.createHTML(x) : x;
1191
- if (u = On(x), !u)
1192
- return He ? null : St ? Z : "";
1188
+ if (!je && !ae && !pe && // eslint-disable-next-line unicorn/prefer-includes
1189
+ b.indexOf("<") === -1)
1190
+ return z && St ? z.createHTML(b) : b;
1191
+ if (u = Ln(b), !u)
1192
+ return je ? null : St ? j : "";
1193
1193
  }
1194
1194
  u && Wt && fe(u.firstChild);
1195
- const H = Ln(ot ? x : u);
1195
+ const H = On(ht ? b : u);
1196
1196
  for (; P = H.nextNode(); )
1197
- Nn(P), Pn(P), ut(P.content) && It(P.content);
1198
- if (ot)
1199
- return pe && Mn(x), x;
1200
- if (He) {
1201
- if (pe && Mn(u), Tt)
1202
- for (O = it.call(u.ownerDocument); u.firstChild; )
1203
- O.appendChild(u.firstChild);
1197
+ Nn(P), Pn(P), pt(P.content) && It(P.content);
1198
+ if (ht)
1199
+ return ae && Mn(b), b;
1200
+ if (je) {
1201
+ if (ae && Mn(u), Tt)
1202
+ for (D = Ht.call(u.ownerDocument); u.firstChild; )
1203
+ D.appendChild(u.firstChild);
1204
1204
  else
1205
- O = u;
1206
- return (q.shadowroot || q.shadowrootmode) && (O = Ht.call(n, O, !0)), O;
1207
- }
1208
- let ue = Ne ? u.outerHTML : u.innerHTML;
1209
- return Ne && W["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && te(Li, u.ownerDocument.doctype.name) && (ue = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1210
- ` + ue), pe && Ve([xe, Me, R], (ye) => {
1211
- ue = Xe(ue, ye, " ");
1212
- }), z && St ? z.createHTML(ue) : ue;
1205
+ D = u;
1206
+ return (Y.shadowroot || Y.shadowrootmode) && (D = He.call(n, D, !0)), D;
1207
+ }
1208
+ let he = pe ? u.outerHTML : u.innerHTML;
1209
+ return pe && W["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && te(Oi, u.ownerDocument.doctype.name) && (he = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1210
+ ` + he), ae && Xe([Ge, ke, Ne], (we) => {
1211
+ he = Qe(he, we, " ");
1212
+ }), z && St ? z.createHTML(he) : he;
1213
1213
  }, t.setConfig = function() {
1214
- let x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1215
- Jt(x), jt = !0;
1214
+ let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1215
+ Jt(b), jt = !0;
1216
1216
  }, t.clearConfig = function() {
1217
- We = null, jt = !1;
1218
- }, t.isValidAttribute = function(x, a, u) {
1219
- We || Jt({});
1220
- const g = X(x), P = X(a);
1221
- return zn(g, P, u);
1222
- }, t.addHook = function(x, a) {
1223
- typeof a == "function" && Ze(K[x], a);
1224
- }, t.removeHook = function(x, a) {
1225
- if (a !== void 0) {
1226
- const u = gi(K[x], a);
1227
- return u === -1 ? void 0 : mi(K[x], u, 1)[0];
1228
- }
1229
- return Zn(K[x]);
1230
- }, t.removeHooks = function(x) {
1231
- K[x] = [];
1217
+ Ye = null, jt = !1;
1218
+ }, t.isValidAttribute = function(b, r, u) {
1219
+ Ye || Jt({});
1220
+ const f = X(b), P = X(r);
1221
+ return zn(f, P, u);
1222
+ }, t.addHook = function(b, r) {
1223
+ typeof r == "function" && Ke(K[b], r);
1224
+ }, t.removeHook = function(b, r) {
1225
+ if (r !== void 0) {
1226
+ const u = gi(K[b], r);
1227
+ return u === -1 ? void 0 : mi(K[b], u, 1)[0];
1228
+ }
1229
+ return Zn(K[b]);
1230
+ }, t.removeHooks = function(b) {
1231
+ K[b] = [];
1232
1232
  }, t.removeAllHooks = function() {
1233
- K = rs();
1233
+ K = as();
1234
1234
  }, t;
1235
1235
  }
1236
1236
  d(vs, "createDOMPurify");
@@ -1239,54 +1239,54 @@ function pn() {
1239
1239
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1240
1240
  }
1241
1241
  d(pn, "M");
1242
- var Fe = pn();
1243
- function ys(r) {
1244
- Fe = r;
1242
+ var Ue = pn();
1243
+ function ys(a) {
1244
+ Ue = a;
1245
1245
  }
1246
1246
  d(ys, "N");
1247
- var Pe = { exec: /* @__PURE__ */ d(() => null, "exec") };
1248
- function Ke(r) {
1247
+ var Be = { exec: /* @__PURE__ */ d(() => null, "exec") };
1248
+ function Je(a) {
1249
1249
  let t = [];
1250
1250
  return (e) => {
1251
1251
  let n = Math.max(0, Math.min(3, e - 1)), i = t[n];
1252
- return i || (i = r(n), t[n] = i), i;
1252
+ return i || (i = a(n), t[n] = i), i;
1253
1253
  };
1254
1254
  }
1255
- d(Ke, "E");
1256
- function N(r, t = "") {
1257
- let e = typeof r == "string" ? r : r.source, n = { replace: /* @__PURE__ */ d((i, s) => {
1255
+ d(Je, "E");
1256
+ function N(a, t = "") {
1257
+ let e = typeof a == "string" ? a : a.source, n = { replace: /* @__PURE__ */ d((i, s) => {
1258
1258
  let l = typeof s == "string" ? s : s.source;
1259
1259
  return l = l.replace(ie.caret, "$1"), e = e.replace(i, l), n;
1260
1260
  }, "replace"), getRegex: /* @__PURE__ */ d(() => new RegExp(e, t), "getRegex") };
1261
1261
  return n;
1262
1262
  }
1263
1263
  d(N, "d");
1264
- var Pi = ((r = "") => {
1264
+ var Pi = ((a = "") => {
1265
1265
  try {
1266
- return !!new RegExp("(?<=1)(?<!1)" + r);
1266
+ return !!new RegExp("(?<=1)(?<!1)" + a);
1267
1267
  } catch {
1268
1268
  return !1;
1269
1269
  }
1270
- })(), ie = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ d((r) => new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: Ke((r) => new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Ke((r) => new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Ke((r) => new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)), headingBeginRegex: Ke((r) => new RegExp(`^ {0,${r}}#`)), htmlBeginRegex: Ke((r) => new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Ke((r) => new RegExp(`^ {0,${r}}>`)) }, Bi = /^(?:[ \t]*(?:\n|$))+/, Fi = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ui = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, bt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Hi = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, fn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ws = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ts = N(ws).replace(/bull/g, fn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Gi = N(ws).replace(/bull/g, fn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), gn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ji = /^[^\n]+/, mn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Wi = N(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", mn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), qi = N(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, fn).getRegex(), Ft = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", bn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Yi = N("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", bn).replace("tag", Ft).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ss = N(gn).replace("hr", bt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex(), Vi = N(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ss).getRegex(), xn = { blockquote: Vi, code: Fi, def: Wi, fences: Ui, heading: Hi, hr: bt, html: Yi, lheading: Ts, list: qi, newline: Bi, paragraph: Ss, table: Pe, text: ji }, as = N("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", bt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex(), Zi = { ...xn, lheading: Gi, table: as, paragraph: N(gn).replace("hr", bt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", as).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex() }, Xi = { ...xn, html: N(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", bn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Pe, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: N(gn).replace("hr", bt).replace("heading", ` *#{1,6} *[^
1271
- ]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ki = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Qi = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, As = /^( {2,}|\\)\n(?!\s*$)/, Ji = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, st = /[\p{P}\p{S}]/u, Ut = /[\s\p{P}\p{S}]/u, kn = /[^\s\p{P}\p{S}]/u, er = N(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ut).getRegex(), Es = /(?!~)[\p{P}\p{S}]/u, tr = /(?!~)[\s\p{P}\p{S}]/u, nr = /(?:[^\s\p{P}\p{S}]|~)/u, sr = N(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Pi ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), _s = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ir = N(_s, "u").replace(/punct/g, st).getRegex(), rr = N(_s, "u").replace(/punct/g, Es).getRegex(), Rs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ar = N(Rs, "gu").replace(/notPunctSpace/g, kn).replace(/punctSpace/g, Ut).replace(/punct/g, st).getRegex(), lr = N(Rs, "gu").replace(/notPunctSpace/g, nr).replace(/punctSpace/g, tr).replace(/punct/g, Es).getRegex(), or = N("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, kn).replace(/punctSpace/g, Ut).replace(/punct/g, st).getRegex(), cr = N(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, st).getRegex(), ur = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", hr = N(ur, "gu").replace(/notPunctSpace/g, kn).replace(/punctSpace/g, Ut).replace(/punct/g, st).getRegex(), dr = N(/\\(punct)/, "gu").replace(/punct/g, st).getRegex(), pr = N(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[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])?)+(?![-_])/).getRegex(), fr = N(bn).replace("(?:-->|$)", "-->").getRegex(), gr = N("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", fr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), zt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, mr = N(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", zt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Is = N(/^!?\[(label)\]\[(ref)\]/).replace("label", zt).replace("ref", mn).getRegex(), Cs = N(/^!?\[(ref)\](?:\[\])?/).replace("ref", mn).getRegex(), br = N("reflink|nolink(?!\\()", "g").replace("reflink", Is).replace("nolink", Cs).getRegex(), ls = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, vn = { _backpedal: Pe, anyPunctuation: dr, autolink: pr, blockSkip: sr, br: As, code: Qi, del: Pe, delLDelim: Pe, delRDelim: Pe, emStrongLDelim: ir, emStrongRDelimAst: ar, emStrongRDelimUnd: or, escape: Ki, link: mr, nolink: Cs, punctuation: er, reflink: Is, reflinkSearch: br, tag: gr, text: Ji, url: Pe }, xr = { ...vn, link: N(/^!?\[(label)\]\((.*?)\)/).replace("label", zt).getRegex(), reflink: N(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", zt).getRegex() }, hn = { ...vn, emStrongRDelimAst: lr, emStrongLDelim: rr, delLDelim: cr, delRDelim: hr, url: N(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ls).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: N(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ls).getRegex() }, kr = { ...hn, br: N(As).replace("{2,}", "*").getRegex(), text: N(hn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Ot = { normal: xn, gfm: Zi, pedantic: Xi }, ft = { normal: vn, gfm: hn, breaks: kr, pedantic: xr }, vr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, os = /* @__PURE__ */ d((r) => vr[r], "ge");
1272
- function Se(r, t) {
1270
+ })(), ie = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: /* @__PURE__ */ d((a) => new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: Je((a) => new RegExp(`^ {0,${a}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Je((a) => new RegExp(`^ {0,${a}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Je((a) => new RegExp(`^ {0,${a}}(?:\`\`\`|~~~)`)), headingBeginRegex: Je((a) => new RegExp(`^ {0,${a}}#`)), htmlBeginRegex: Je((a) => new RegExp(`^ {0,${a}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Je((a) => new RegExp(`^ {0,${a}}>`)) }, Bi = /^(?:[ \t]*(?:\n|$))+/, Fi = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ui = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, vt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Hi = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, fn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ws = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ts = N(ws).replace(/bull/g, fn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Gi = N(ws).replace(/bull/g, fn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), gn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ji = /^[^\n]+/, mn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Wi = N(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", mn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), qi = N(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, fn).getRegex(), Ft = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", xn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Yi = N("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", xn).replace("tag", Ft).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ss = N(gn).replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex(), Vi = N(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ss).getRegex(), bn = { blockquote: Vi, code: Fi, def: Wi, fences: Ui, heading: Hi, hr: vt, html: Yi, lheading: Ts, list: qi, newline: Bi, paragraph: Ss, table: Be, text: ji }, rs = N("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex(), Zi = { ...bn, lheading: Gi, table: rs, paragraph: N(gn).replace("hr", vt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", rs).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex() }, Xi = { ...bn, html: N(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", xn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Be, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: N(gn).replace("hr", vt).replace("heading", ` *#{1,6} *[^
1271
+ ]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Ki = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Qi = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, As = /^( {2,}|\\)\n(?!\s*$)/, Ji = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, at = /[\p{P}\p{S}]/u, Ut = /[\s\p{P}\p{S}]/u, kn = /[^\s\p{P}\p{S}]/u, ea = N(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ut).getRegex(), Es = /(?!~)[\p{P}\p{S}]/u, ta = /(?!~)[\s\p{P}\p{S}]/u, na = /(?:[^\s\p{P}\p{S}]|~)/u, sa = N(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Pi ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), _s = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ia = N(_s, "u").replace(/punct/g, at).getRegex(), aa = N(_s, "u").replace(/punct/g, Es).getRegex(), Rs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ra = N(Rs, "gu").replace(/notPunctSpace/g, kn).replace(/punctSpace/g, Ut).replace(/punct/g, at).getRegex(), la = N(Rs, "gu").replace(/notPunctSpace/g, na).replace(/punctSpace/g, ta).replace(/punct/g, Es).getRegex(), oa = N("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, kn).replace(/punctSpace/g, Ut).replace(/punct/g, at).getRegex(), ca = N(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, at).getRegex(), ua = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", ha = N(ua, "gu").replace(/notPunctSpace/g, kn).replace(/punctSpace/g, Ut).replace(/punct/g, at).getRegex(), da = N(/\\(punct)/, "gu").replace(/punct/g, at).getRegex(), pa = N(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[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])?)+(?![-_])/).getRegex(), fa = N(xn).replace("(?:-->|$)", "-->").getRegex(), ga = N("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", fa).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), zt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, ma = N(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", zt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Is = N(/^!?\[(label)\]\[(ref)\]/).replace("label", zt).replace("ref", mn).getRegex(), Cs = N(/^!?\[(ref)\](?:\[\])?/).replace("ref", mn).getRegex(), xa = N("reflink|nolink(?!\\()", "g").replace("reflink", Is).replace("nolink", Cs).getRegex(), ls = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, vn = { _backpedal: Be, anyPunctuation: da, autolink: pa, blockSkip: sa, br: As, code: Qi, del: Be, delLDelim: Be, delRDelim: Be, emStrongLDelim: ia, emStrongRDelimAst: ra, emStrongRDelimUnd: oa, escape: Ki, link: ma, nolink: Cs, punctuation: ea, reflink: Is, reflinkSearch: xa, tag: ga, text: Ji, url: Be }, ba = { ...vn, link: N(/^!?\[(label)\]\((.*?)\)/).replace("label", zt).getRegex(), reflink: N(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", zt).getRegex() }, hn = { ...vn, emStrongRDelimAst: la, emStrongLDelim: aa, delLDelim: ca, delRDelim: ha, url: N(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ls).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: N(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ls).getRegex() }, ka = { ...hn, br: N(As).replace("{2,}", "*").getRegex(), text: N(hn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Lt = { normal: bn, gfm: Zi, pedantic: Xi }, xt = { normal: vn, gfm: hn, breaks: ka, pedantic: ba }, va = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, os = /* @__PURE__ */ d((a) => va[a], "ge");
1272
+ function Ae(a, t) {
1273
1273
  if (t) {
1274
- if (ie.escapeTest.test(r)) return r.replace(ie.escapeReplace, os);
1275
- } else if (ie.escapeTestNoEncode.test(r)) return r.replace(ie.escapeReplaceNoEncode, os);
1276
- return r;
1274
+ if (ie.escapeTest.test(a)) return a.replace(ie.escapeReplace, os);
1275
+ } else if (ie.escapeTestNoEncode.test(a)) return a.replace(ie.escapeReplaceNoEncode, os);
1276
+ return a;
1277
1277
  }
1278
- d(Se, "O");
1279
- function cs(r) {
1278
+ d(Ae, "O");
1279
+ function cs(a) {
1280
1280
  try {
1281
- r = encodeURI(r).replace(ie.percentDecode, "%");
1281
+ a = encodeURI(a).replace(ie.percentDecode, "%");
1282
1282
  } catch {
1283
1283
  return null;
1284
1284
  }
1285
- return r;
1285
+ return a;
1286
1286
  }
1287
1287
  d(cs, "V");
1288
- function us(r, t) {
1289
- let e = r.replace(ie.findPipe, (s, l, o) => {
1288
+ function us(a, t) {
1289
+ let e = a.replace(ie.findPipe, (s, l, o) => {
1290
1290
  let h = !1, c = l;
1291
1291
  for (; --c >= 0 && o[c] === "\\"; ) h = !h;
1292
1292
  return h ? "|" : " |";
@@ -1297,50 +1297,50 @@ function us(r, t) {
1297
1297
  return n;
1298
1298
  }
1299
1299
  d(us, "Y");
1300
- function Ce(r, t, e) {
1301
- let n = r.length;
1300
+ function Ce(a, t, e) {
1301
+ let n = a.length;
1302
1302
  if (n === 0) return "";
1303
1303
  let i = 0;
1304
- for (; i < n && r.charAt(n - i - 1) === t; )
1304
+ for (; i < n && a.charAt(n - i - 1) === t; )
1305
1305
  i++;
1306
- return r.slice(0, n - i);
1306
+ return a.slice(0, n - i);
1307
1307
  }
1308
1308
  d(Ce, "$");
1309
- function hs(r) {
1310
- let t = r.split(`
1309
+ function hs(a) {
1310
+ let t = a.split(`
1311
1311
  `), e = t.length - 1;
1312
1312
  for (; e >= 0 && ie.blankLine.test(t[e]); ) e--;
1313
- return t.length - e <= 2 ? r : t.slice(0, e + 1).join(`
1313
+ return t.length - e <= 2 ? a : t.slice(0, e + 1).join(`
1314
1314
  `);
1315
1315
  }
1316
1316
  d(hs, "ee");
1317
- function yr(r, t) {
1318
- if (r.indexOf(t[1]) === -1) return -1;
1317
+ function ya(a, t) {
1318
+ if (a.indexOf(t[1]) === -1) return -1;
1319
1319
  let e = 0;
1320
- for (let n = 0; n < r.length; n++) if (r[n] === "\\") n++;
1321
- else if (r[n] === t[0]) e++;
1322
- else if (r[n] === t[1] && (e--, e < 0)) return n;
1320
+ for (let n = 0; n < a.length; n++) if (a[n] === "\\") n++;
1321
+ else if (a[n] === t[0]) e++;
1322
+ else if (a[n] === t[1] && (e--, e < 0)) return n;
1323
1323
  return e > 0 ? -2 : -1;
1324
1324
  }
1325
- d(yr, "fe");
1326
- function wr(r, t = 0) {
1325
+ d(ya, "fe");
1326
+ function wa(a, t = 0) {
1327
1327
  let e = t, n = "";
1328
- for (let i of r) if (i === " ") {
1328
+ for (let i of a) if (i === " ") {
1329
1329
  let s = 4 - e % 4;
1330
1330
  n += " ".repeat(s), e += s;
1331
1331
  } else n += i, e++;
1332
1332
  return n;
1333
1333
  }
1334
- d(wr, "me");
1335
- function ds(r, t, e, n, i) {
1336
- let s = t.href, l = t.title || null, o = r[1].replace(i.other.outputLinkReplace, "$1");
1334
+ d(wa, "me");
1335
+ function ds(a, t, e, n, i) {
1336
+ let s = t.href, l = t.title || null, o = a[1].replace(i.other.outputLinkReplace, "$1");
1337
1337
  n.state.inLink = !0;
1338
- let h = { type: r[0].charAt(0) === "!" ? "image" : "link", raw: e, href: s, title: l, text: o, tokens: n.inlineTokens(o) };
1338
+ let h = { type: a[0].charAt(0) === "!" ? "image" : "link", raw: e, href: s, title: l, text: o, tokens: n.inlineTokens(o) };
1339
1339
  return n.state.inLink = !1, h;
1340
1340
  }
1341
1341
  d(ds, "xe");
1342
- function Tr(r, t, e) {
1343
- let n = r.match(e.other.indentCodeCompensation);
1342
+ function Ta(a, t, e) {
1343
+ let n = a.match(e.other.indentCodeCompensation);
1344
1344
  if (n === null) return t;
1345
1345
  let i = n[1];
1346
1346
  return t.split(`
@@ -1352,13 +1352,13 @@ function Tr(r, t, e) {
1352
1352
  }).join(`
1353
1353
  `);
1354
1354
  }
1355
- d(Tr, "st");
1356
- var Je, $t = (Je = class {
1355
+ d(Ta, "st");
1356
+ var tt, $t = (tt = class {
1357
1357
  constructor(t) {
1358
1358
  C(this, "options");
1359
1359
  C(this, "rules");
1360
1360
  C(this, "lexer");
1361
- this.options = t || Fe;
1361
+ this.options = t || Ue;
1362
1362
  }
1363
1363
  space(t) {
1364
1364
  let e = this.rules.block.newline.exec(t);
@@ -1374,7 +1374,7 @@ var Je, $t = (Je = class {
1374
1374
  fences(t) {
1375
1375
  let e = this.rules.block.fences.exec(t);
1376
1376
  if (e) {
1377
- let n = e[0], i = Tr(n, e[3] || "", this.rules);
1377
+ let n = e[0], i = Ta(n, e[3] || "", this.rules);
1378
1378
  return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: i };
1379
1379
  }
1380
1380
  }
@@ -1408,26 +1408,26 @@ var Je, $t = (Je = class {
1408
1408
  else break;
1409
1409
  n = n.slice(c);
1410
1410
  let m = h.join(`
1411
- `), b = m.replace(this.rules.other.blockquoteSetextReplace, `
1411
+ `), x = m.replace(this.rules.other.blockquoteSetextReplace, `
1412
1412
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1413
1413
  i = i ? `${i}
1414
1414
  ${m}` : m, s = s ? `${s}
1415
- ${b}` : b;
1415
+ ${x}` : x;
1416
1416
  let k = this.lexer.state.top;
1417
- if (this.lexer.state.top = !0, this.lexer.blockTokens(b, l, !0), this.lexer.state.top = k, n.length === 0) break;
1418
- let T = l.at(-1);
1419
- if (T?.type === "code") break;
1420
- if (T?.type === "blockquote") {
1421
- let F = T, M = F.raw + `
1417
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(x, l, !0), this.lexer.state.top = k, n.length === 0) break;
1418
+ let S = l.at(-1);
1419
+ if (S?.type === "code") break;
1420
+ if (S?.type === "blockquote") {
1421
+ let F = S, M = F.raw + `
1422
1422
  ` + n.join(`
1423
- `), V = this.blockquote(M);
1424
- l[l.length - 1] = V, i = i.substring(0, i.length - F.raw.length) + V.raw, s = s.substring(0, s.length - F.text.length) + V.text;
1423
+ `), Z = this.blockquote(M);
1424
+ l[l.length - 1] = Z, i = i.substring(0, i.length - F.raw.length) + Z.raw, s = s.substring(0, s.length - F.text.length) + Z.text;
1425
1425
  break;
1426
- } else if (T?.type === "list") {
1427
- let F = T, M = F.raw + `
1426
+ } else if (S?.type === "list") {
1427
+ let F = S, M = F.raw + `
1428
1428
  ` + n.join(`
1429
- `), V = this.list(M);
1430
- l[l.length - 1] = V, i = i.substring(0, i.length - T.raw.length) + V.raw, s = s.substring(0, s.length - F.raw.length) + V.raw, n = M.substring(l.at(-1).raw.length).split(`
1429
+ `), Z = this.list(M);
1430
+ l[l.length - 1] = Z, i = i.substring(0, i.length - S.raw.length) + Z.raw, s = s.substring(0, s.length - F.raw.length) + Z.raw, n = M.substring(l.at(-1).raw.length).split(`
1431
1431
  `);
1432
1432
  continue;
1433
1433
  }
@@ -1442,31 +1442,31 @@ ${b}` : b;
1442
1442
  n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = i ? n : "[*+-]");
1443
1443
  let l = this.rules.other.listItemRegex(n), o = !1;
1444
1444
  for (; t; ) {
1445
- let c = !1, m = "", b = "";
1445
+ let c = !1, m = "", x = "";
1446
1446
  if (!(e = l.exec(t)) || this.rules.block.hr.test(t)) break;
1447
1447
  m = e[0], t = t.substring(m.length);
1448
- let k = wr(e[2].split(`
1449
- `, 1)[0], e[1].length), T = t.split(`
1448
+ let k = wa(e[2].split(`
1449
+ `, 1)[0], e[1].length), S = t.split(`
1450
1450
  `, 1)[0], F = !k.trim(), M = 0;
1451
- if (this.options.pedantic ? (M = 2, b = k.trimStart()) : F ? M = e[1].length + 1 : (M = k.search(this.rules.other.nonSpaceChar), M = M > 4 ? 1 : M, b = k.slice(M), M += e[1].length), F && this.rules.other.blankLine.test(T) && (m += T + `
1452
- `, t = t.substring(T.length + 1), c = !0), !c) {
1453
- let V = this.rules.other.nextBulletRegex(M), oe = this.rules.other.hrRegex(M), E = this.rules.other.fencesBeginRegex(M), L = this.rules.other.headingBeginRegex(M), I = this.rules.other.htmlBeginRegex(M), B = this.rules.other.blockquoteBeginRegex(M);
1451
+ if (this.options.pedantic ? (M = 2, x = k.trimStart()) : F ? M = e[1].length + 1 : (M = k.search(this.rules.other.nonSpaceChar), M = M > 4 ? 1 : M, x = k.slice(M), M += e[1].length), F && this.rules.other.blankLine.test(S) && (m += S + `
1452
+ `, t = t.substring(S.length + 1), c = !0), !c) {
1453
+ let Z = this.rules.other.nextBulletRegex(M), ce = this.rules.other.hrRegex(M), E = this.rules.other.fencesBeginRegex(M), L = this.rules.other.headingBeginRegex(M), R = this.rules.other.htmlBeginRegex(M), B = this.rules.other.blockquoteBeginRegex(M);
1454
1454
  for (; t; ) {
1455
1455
  let z = t.split(`
1456
- `, 1)[0], Z;
1457
- if (T = z, this.options.pedantic ? (T = T.replace(this.rules.other.listReplaceNesting, " "), Z = T) : Z = T.replace(this.rules.other.tabCharGlobal, " "), E.test(T) || L.test(T) || I.test(T) || B.test(T) || V.test(T) || oe.test(T)) break;
1458
- if (Z.search(this.rules.other.nonSpaceChar) >= M || !T.trim()) b += `
1459
- ` + Z.slice(M);
1456
+ `, 1)[0], j;
1457
+ if (S = z, this.options.pedantic ? (S = S.replace(this.rules.other.listReplaceNesting, " "), j = S) : j = S.replace(this.rules.other.tabCharGlobal, " "), E.test(S) || L.test(S) || R.test(S) || B.test(S) || Z.test(S) || ce.test(S)) break;
1458
+ if (j.search(this.rules.other.nonSpaceChar) >= M || !S.trim()) x += `
1459
+ ` + j.slice(M);
1460
1460
  else {
1461
- if (F || k.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || E.test(k) || L.test(k) || oe.test(k)) break;
1462
- b += `
1463
- ` + T;
1461
+ if (F || k.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || E.test(k) || L.test(k) || ce.test(k)) break;
1462
+ x += `
1463
+ ` + S;
1464
1464
  }
1465
- F = !T.trim(), m += z + `
1466
- `, t = t.substring(z.length + 1), k = Z.slice(M);
1465
+ F = !S.trim(), m += z + `
1466
+ `, t = t.substring(z.length + 1), k = j.slice(M);
1467
1467
  }
1468
1468
  }
1469
- s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(m) && (o = !0)), s.items.push({ type: "list_item", raw: m, task: !!this.options.gfm && this.rules.other.listIsTask.test(b), loose: !1, text: b, tokens: [] }), s.raw += m;
1469
+ s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(m) && (o = !0)), s.items.push({ type: "list_item", raw: m, task: !!this.options.gfm && this.rules.other.listIsTask.test(x), loose: !1, text: x, tokens: [] }), s.raw += m;
1470
1470
  }
1471
1471
  let h = s.items.at(-1);
1472
1472
  if (h) h.raw = h.raw.trimEnd(), h.text = h.text.trimEnd();
@@ -1481,14 +1481,14 @@ ${b}` : b;
1481
1481
  this.lexer.inlineQueue[k].src = this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask, "");
1482
1482
  break;
1483
1483
  }
1484
- let b = this.rules.other.listTaskCheckbox.exec(c.raw);
1485
- if (b) {
1486
- let k = { type: "checkbox", raw: b[0] + " ", checked: b[0] !== "[ ]" };
1484
+ let x = this.rules.other.listTaskCheckbox.exec(c.raw);
1485
+ if (x) {
1486
+ let k = { type: "checkbox", raw: x[0] + " ", checked: x[0] !== "[ ]" };
1487
1487
  c.checked = k.checked, s.loose ? c.tokens[0] && ["paragraph", "text"].includes(c.tokens[0].type) && "tokens" in c.tokens[0] && c.tokens[0].tokens ? (c.tokens[0].raw = k.raw + c.tokens[0].raw, c.tokens[0].text = k.raw + c.tokens[0].text, c.tokens[0].tokens.unshift(k)) : c.tokens.unshift({ type: "paragraph", raw: k.raw, text: k.raw, tokens: [k] }) : c.tokens.unshift(k);
1488
1488
  }
1489
1489
  } else c.task && (c.task = !1);
1490
1490
  if (!s.loose) {
1491
- let b = c.tokens.filter((T) => T.type === "space"), k = b.length > 0 && b.some((T) => this.rules.other.anyLine.test(T.raw));
1491
+ let x = c.tokens.filter((S) => S.type === "space"), k = x.length > 0 && x.some((S) => this.rules.other.anyLine.test(S.raw));
1492
1492
  s.loose = k;
1493
1493
  }
1494
1494
  }
@@ -1564,7 +1564,7 @@ ${b}` : b;
1564
1564
  let l = Ce(n.slice(0, -1), "\\");
1565
1565
  if ((n.length - l.length) % 2 === 0) return;
1566
1566
  } else {
1567
- let l = yr(e[2], "()");
1567
+ let l = ya(e[2], "()");
1568
1568
  if (l === -2) return;
1569
1569
  if (l > -1) {
1570
1570
  let o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + l;
@@ -1605,13 +1605,13 @@ ${b}` : b;
1605
1605
  }
1606
1606
  if (h -= o, h > 0) continue;
1607
1607
  o = Math.min(o, o + h + c);
1608
- let b = [...i[0]][0].length, k = t.slice(0, s + i.index + b + o);
1608
+ let x = [...i[0]][0].length, k = t.slice(0, s + i.index + x + o);
1609
1609
  if (Math.min(s, o) % 2) {
1610
1610
  let F = k.slice(1, -1);
1611
1611
  return { type: "em", raw: k, text: F, tokens: this.lexer.inlineTokens(F) };
1612
1612
  }
1613
- let T = k.slice(2, -2);
1614
- return { type: "strong", raw: k, text: T, tokens: this.lexer.inlineTokens(T) };
1613
+ let S = k.slice(2, -2);
1614
+ return { type: "strong", raw: k, text: S, tokens: this.lexer.inlineTokens(S) };
1615
1615
  }
1616
1616
  }
1617
1617
  }
@@ -1638,8 +1638,8 @@ ${b}` : b;
1638
1638
  }
1639
1639
  if (h -= o, h > 0) continue;
1640
1640
  o = Math.min(o, o + h);
1641
- let m = [...i[0]][0].length, b = t.slice(0, s + i.index + m + o), k = b.slice(s, -s);
1642
- return { type: "del", raw: b, text: k, tokens: this.lexer.inlineTokens(k) };
1641
+ let m = [...i[0]][0].length, x = t.slice(0, s + i.index + m + o), k = x.slice(s, -s);
1642
+ return { type: "del", raw: x, text: k, tokens: this.lexer.inlineTokens(k) };
1643
1643
  }
1644
1644
  }
1645
1645
  }
@@ -1672,25 +1672,25 @@ ${b}` : b;
1672
1672
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1673
1673
  }
1674
1674
  }
1675
- }, d(Je, "w"), Je), Oe, me = (Oe = class {
1675
+ }, d(tt, "w"), tt), Le, me = (Le = class {
1676
1676
  constructor(t) {
1677
1677
  C(this, "tokens");
1678
1678
  C(this, "options");
1679
1679
  C(this, "state");
1680
1680
  C(this, "inlineQueue");
1681
1681
  C(this, "tokenizer");
1682
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Fe, this.options.tokenizer = this.options.tokenizer || new $t(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1683
- let e = { other: ie, block: Ot.normal, inline: ft.normal };
1684
- this.options.pedantic ? (e.block = Ot.pedantic, e.inline = ft.pedantic) : this.options.gfm && (e.block = Ot.gfm, this.options.breaks ? e.inline = ft.breaks : e.inline = ft.gfm), this.tokenizer.rules = e;
1682
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Ue, this.options.tokenizer = this.options.tokenizer || new $t(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1683
+ let e = { other: ie, block: Lt.normal, inline: xt.normal };
1684
+ this.options.pedantic ? (e.block = Lt.pedantic, e.inline = xt.pedantic) : this.options.gfm && (e.block = Lt.gfm, this.options.breaks ? e.inline = xt.breaks : e.inline = xt.gfm), this.tokenizer.rules = e;
1685
1685
  }
1686
1686
  static get rules() {
1687
- return { block: Ot, inline: ft };
1687
+ return { block: Lt, inline: xt };
1688
1688
  }
1689
1689
  static lex(t, e) {
1690
- return new Oe(e).lex(t);
1690
+ return new Le(e).lex(t);
1691
1691
  }
1692
1692
  static lexInline(t, e) {
1693
- return new Oe(e).inlineTokens(t);
1693
+ return new Le(e).inlineTokens(t);
1694
1694
  }
1695
1695
  lex(t) {
1696
1696
  t = t.replace(ie.carriageReturn, `
@@ -1823,7 +1823,7 @@ ${b}` : b;
1823
1823
  }
1824
1824
  l || (o = ""), l = !1;
1825
1825
  let c;
1826
- if (this.options.extensions?.inline?.some((b) => (c = b.call({ lexer: this }, t, e)) ? (t = t.substring(c.raw.length), e.push(c), !0) : !1)) continue;
1826
+ if (this.options.extensions?.inline?.some((x) => (c = x.call({ lexer: this }, t, e)) ? (t = t.substring(c.raw.length), e.push(c), !0) : !1)) continue;
1827
1827
  if (c = this.tokenizer.escape(t)) {
1828
1828
  t = t.substring(c.raw.length), e.push(c);
1829
1829
  continue;
@@ -1838,8 +1838,8 @@ ${b}` : b;
1838
1838
  }
1839
1839
  if (c = this.tokenizer.reflink(t, this.tokens.links)) {
1840
1840
  t = t.substring(c.raw.length);
1841
- let b = e.at(-1);
1842
- c.type === "text" && b?.type === "text" ? (b.raw += c.raw, b.text += c.text) : e.push(c);
1841
+ let x = e.at(-1);
1842
+ c.type === "text" && x?.type === "text" ? (x.raw += c.raw, x.text += c.text) : e.push(c);
1843
1843
  continue;
1844
1844
  }
1845
1845
  if (c = this.tokenizer.emStrong(t, n, o)) {
@@ -1868,15 +1868,15 @@ ${b}` : b;
1868
1868
  }
1869
1869
  let m = t;
1870
1870
  if (this.options.extensions?.startInline) {
1871
- let b = 1 / 0, k = t.slice(1), T;
1871
+ let x = 1 / 0, k = t.slice(1), S;
1872
1872
  this.options.extensions.startInline.forEach((F) => {
1873
- T = F.call({ lexer: this }, k), typeof T == "number" && T >= 0 && (b = Math.min(b, T));
1874
- }), b < 1 / 0 && b >= 0 && (m = t.substring(0, b + 1));
1873
+ S = F.call({ lexer: this }, k), typeof S == "number" && S >= 0 && (x = Math.min(x, S));
1874
+ }), x < 1 / 0 && x >= 0 && (m = t.substring(0, x + 1));
1875
1875
  }
1876
1876
  if (c = this.tokenizer.inlineText(m)) {
1877
1877
  t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (o = c.raw.slice(-1)), l = !0;
1878
- let b = e.at(-1);
1879
- b?.type === "text" ? (b.raw += c.raw, b.text += c.text) : e.push(c);
1878
+ let x = e.at(-1);
1879
+ x?.type === "text" ? (x.raw += c.raw, x.text += c.text) : e.push(c);
1880
1880
  continue;
1881
1881
  }
1882
1882
  if (t) {
@@ -1891,11 +1891,11 @@ ${b}` : b;
1891
1891
  if (this.options.silent) console.error(e);
1892
1892
  else throw new Error(e);
1893
1893
  }
1894
- }, d(Oe, "l"), Oe), et, Pt = (et = class {
1894
+ }, d(Le, "l"), Le), nt, Pt = (nt = class {
1895
1895
  constructor(t) {
1896
1896
  C(this, "options");
1897
1897
  C(this, "parser");
1898
- this.options = t || Fe;
1898
+ this.options = t || Ue;
1899
1899
  }
1900
1900
  space(t) {
1901
1901
  return "";
@@ -1903,8 +1903,8 @@ ${b}` : b;
1903
1903
  code({ text: t, lang: e, escaped: n }) {
1904
1904
  let i = (e || "").match(ie.notSpaceStart)?.[0], s = t.replace(ie.endingNewline, "") + `
1905
1905
  `;
1906
- return i ? '<pre><code class="language-' + Se(i) + '">' + (n ? s : Se(s, !0)) + `</code></pre>
1907
- ` : "<pre><code>" + (n ? s : Se(s, !0)) + `</code></pre>
1906
+ return i ? '<pre><code class="language-' + Ae(i) + '">' + (n ? s : Ae(s, !0)) + `</code></pre>
1907
+ ` : "<pre><code>" + (n ? s : Ae(s, !0)) + `</code></pre>
1908
1908
  `;
1909
1909
  }
1910
1910
  blockquote({ tokens: t }) {
@@ -1982,7 +1982,7 @@ ${t}</tr>
1982
1982
  return `<em>${this.parser.parseInline(t)}</em>`;
1983
1983
  }
1984
1984
  codespan({ text: t }) {
1985
- return `<code>${Se(t, !0)}</code>`;
1985
+ return `<code>${Ae(t, !0)}</code>`;
1986
1986
  }
1987
1987
  br(t) {
1988
1988
  return "<br>";
@@ -1995,20 +1995,20 @@ ${t}</tr>
1995
1995
  if (s === null) return i;
1996
1996
  t = s;
1997
1997
  let l = '<a href="' + t + '"';
1998
- return e && (l += ' title="' + Se(e) + '"'), l += ">" + i + "</a>", l;
1998
+ return e && (l += ' title="' + Ae(e) + '"'), l += ">" + i + "</a>", l;
1999
1999
  }
2000
2000
  image({ href: t, title: e, text: n, tokens: i }) {
2001
2001
  i && (n = this.parser.parseInline(i, this.parser.textRenderer));
2002
2002
  let s = cs(t);
2003
- if (s === null) return Se(n);
2003
+ if (s === null) return Ae(n);
2004
2004
  t = s;
2005
- let l = `<img src="${t}" alt="${Se(n)}"`;
2006
- return e && (l += ` title="${Se(e)}"`), l += ">", l;
2005
+ let l = `<img src="${t}" alt="${Ae(n)}"`;
2006
+ return e && (l += ` title="${Ae(e)}"`), l += ">", l;
2007
2007
  }
2008
2008
  text(t) {
2009
- return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : Se(t.text);
2009
+ return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : Ae(t.text);
2010
2010
  }
2011
- }, d(et, "y"), et), tt, yn = (tt = class {
2011
+ }, d(nt, "y"), nt), st, yn = (st = class {
2012
2012
  strong({ text: t }) {
2013
2013
  return t;
2014
2014
  }
@@ -2039,18 +2039,18 @@ ${t}</tr>
2039
2039
  checkbox({ raw: t }) {
2040
2040
  return t;
2041
2041
  }
2042
- }, d(tt, "L"), tt), Le, be = (Le = class {
2042
+ }, d(st, "L"), st), Oe, xe = (Oe = class {
2043
2043
  constructor(t) {
2044
2044
  C(this, "options");
2045
2045
  C(this, "renderer");
2046
2046
  C(this, "textRenderer");
2047
- this.options = t || Fe, this.options.renderer = this.options.renderer || new Pt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new yn();
2047
+ this.options = t || Ue, this.options.renderer = this.options.renderer || new Pt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new yn();
2048
2048
  }
2049
2049
  static parse(t, e) {
2050
- return new Le(e).parse(t);
2050
+ return new Oe(e).parse(t);
2051
2051
  }
2052
2052
  static parseInline(t, e) {
2053
- return new Le(e).parseInline(t);
2053
+ return new Oe(e).parseInline(t);
2054
2054
  }
2055
2055
  parse(t) {
2056
2056
  this.renderer.parser = this;
@@ -2190,11 +2190,11 @@ ${t}</tr>
2190
2190
  }
2191
2191
  return n;
2192
2192
  }
2193
- }, d(Le, "l"), Le), De, mt = (De = class {
2193
+ }, d(Oe, "l"), Oe), De, kt = (De = class {
2194
2194
  constructor(t) {
2195
2195
  C(this, "options");
2196
2196
  C(this, "block");
2197
- this.options = t || Fe;
2197
+ this.options = t || Ue;
2198
2198
  }
2199
2199
  preprocess(t) {
2200
2200
  return t;
@@ -2212,20 +2212,20 @@ ${t}</tr>
2212
2212
  return t ? me.lex : me.lexInline;
2213
2213
  }
2214
2214
  provideParser(t = this.block) {
2215
- return t ? be.parse : be.parseInline;
2215
+ return t ? xe.parse : xe.parseInline;
2216
2216
  }
2217
- }, d(De, "P"), C(De, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(De, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), De), nt, Sr = (nt = class {
2217
+ }, d(De, "P"), C(De, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(De, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), De), it, Sa = (it = class {
2218
2218
  constructor(...t) {
2219
2219
  C(this, "defaults", pn());
2220
2220
  C(this, "options", this.setOptions);
2221
2221
  C(this, "parse", this.parseMarkdown(!0));
2222
2222
  C(this, "parseInline", this.parseMarkdown(!1));
2223
- C(this, "Parser", be);
2223
+ C(this, "Parser", xe);
2224
2224
  C(this, "Renderer", Pt);
2225
2225
  C(this, "TextRenderer", yn);
2226
2226
  C(this, "Lexer", me);
2227
2227
  C(this, "Tokenizer", $t);
2228
- C(this, "Hooks", mt);
2228
+ C(this, "Hooks", kt);
2229
2229
  this.use(...t);
2230
2230
  }
2231
2231
  walkTokens(t, e) {
@@ -2278,8 +2278,8 @@ ${t}</tr>
2278
2278
  if (["options", "parser"].includes(l)) continue;
2279
2279
  let o = l, h = n.renderer[o], c = s[o];
2280
2280
  s[o] = (...m) => {
2281
- let b = h.apply(s, m);
2282
- return b === !1 && (b = c.apply(s, m)), b || "";
2281
+ let x = h.apply(s, m);
2282
+ return x === !1 && (x = c.apply(s, m)), x || "";
2283
2283
  };
2284
2284
  }
2285
2285
  i.renderer = s;
@@ -2291,32 +2291,32 @@ ${t}</tr>
2291
2291
  if (["options", "rules", "lexer"].includes(l)) continue;
2292
2292
  let o = l, h = n.tokenizer[o], c = s[o];
2293
2293
  s[o] = (...m) => {
2294
- let b = h.apply(s, m);
2295
- return b === !1 && (b = c.apply(s, m)), b;
2294
+ let x = h.apply(s, m);
2295
+ return x === !1 && (x = c.apply(s, m)), x;
2296
2296
  };
2297
2297
  }
2298
2298
  i.tokenizer = s;
2299
2299
  }
2300
2300
  if (n.hooks) {
2301
- let s = this.defaults.hooks || new mt();
2301
+ let s = this.defaults.hooks || new kt();
2302
2302
  for (let l in n.hooks) {
2303
2303
  if (!(l in s)) throw new Error(`hook '${l}' does not exist`);
2304
2304
  if (["options", "block"].includes(l)) continue;
2305
2305
  let o = l, h = n.hooks[o], c = s[o];
2306
- mt.passThroughHooks.has(l) ? s[o] = (m) => {
2307
- if (this.defaults.async && mt.passThroughHooksRespectAsync.has(l)) return (async () => {
2306
+ kt.passThroughHooks.has(l) ? s[o] = (m) => {
2307
+ if (this.defaults.async && kt.passThroughHooksRespectAsync.has(l)) return (async () => {
2308
2308
  let k = await h.call(s, m);
2309
2309
  return c.call(s, k);
2310
2310
  })();
2311
- let b = h.call(s, m);
2312
- return c.call(s, b);
2311
+ let x = h.call(s, m);
2312
+ return c.call(s, x);
2313
2313
  } : s[o] = (...m) => {
2314
2314
  if (this.defaults.async) return (async () => {
2315
2315
  let k = await h.apply(s, m);
2316
2316
  return k === !1 && (k = await c.apply(s, m)), k;
2317
2317
  })();
2318
- let b = h.apply(s, m);
2319
- return b === !1 && (b = c.apply(s, m)), b;
2318
+ let x = h.apply(s, m);
2319
+ return x === !1 && (x = c.apply(s, m)), x;
2320
2320
  };
2321
2321
  }
2322
2322
  i.hooks = s;
@@ -2338,7 +2338,7 @@ ${t}</tr>
2338
2338
  return me.lex(t, e ?? this.defaults);
2339
2339
  }
2340
2340
  parser(t, e) {
2341
- return be.parse(t, e ?? this.defaults);
2341
+ return xe.parse(t, e ?? this.defaults);
2342
2342
  }
2343
2343
  parseMarkdown(t) {
2344
2344
  return (e, n) => {
@@ -2349,14 +2349,14 @@ ${t}</tr>
2349
2349
  if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
2350
2350
  let o = s.hooks ? await s.hooks.preprocess(e) : e, h = await (s.hooks ? await s.hooks.provideLexer(t) : t ? me.lex : me.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(h) : h;
2351
2351
  s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
2352
- let m = await (s.hooks ? await s.hooks.provideParser(t) : t ? be.parse : be.parseInline)(c, s);
2352
+ let m = await (s.hooks ? await s.hooks.provideParser(t) : t ? xe.parse : xe.parseInline)(c, s);
2353
2353
  return s.hooks ? await s.hooks.postprocess(m) : m;
2354
2354
  })().catch(l);
2355
2355
  try {
2356
2356
  s.hooks && (e = s.hooks.preprocess(e));
2357
2357
  let o = (s.hooks ? s.hooks.provideLexer(t) : t ? me.lex : me.lexInline)(e, s);
2358
2358
  s.hooks && (o = s.hooks.processAllTokens(o)), s.walkTokens && this.walkTokens(o, s.walkTokens);
2359
- let h = (s.hooks ? s.hooks.provideParser(t) : t ? be.parse : be.parseInline)(o, s);
2359
+ let h = (s.hooks ? s.hooks.provideParser(t) : t ? xe.parse : xe.parseInline)(o, s);
2360
2360
  return s.hooks && (h = s.hooks.postprocess(h)), h;
2361
2361
  } catch (o) {
2362
2362
  return l(o);
@@ -2367,55 +2367,55 @@ ${t}</tr>
2367
2367
  return (n) => {
2368
2368
  if (n.message += `
2369
2369
  Please report this to https://github.com/markedjs/marked.`, t) {
2370
- let i = "<p>An error occurred:</p><pre>" + Se(n.message + "", !0) + "</pre>";
2370
+ let i = "<p>An error occurred:</p><pre>" + Ae(n.message + "", !0) + "</pre>";
2371
2371
  return e ? Promise.resolve(i) : i;
2372
2372
  }
2373
2373
  if (e) return Promise.reject(n);
2374
2374
  throw n;
2375
2375
  };
2376
2376
  }
2377
- }, d(nt, "q"), nt), Be = new Sr();
2378
- function $(r, t) {
2379
- return Be.parse(r, t);
2377
+ }, d(it, "q"), it), Fe = new Sa();
2378
+ function $(a, t) {
2379
+ return Fe.parse(a, t);
2380
2380
  }
2381
2381
  d($, "g");
2382
- $.options = $.setOptions = function(r) {
2383
- return Be.setOptions(r), $.defaults = Be.defaults, ys($.defaults), $;
2382
+ $.options = $.setOptions = function(a) {
2383
+ return Fe.setOptions(a), $.defaults = Fe.defaults, ys($.defaults), $;
2384
2384
  };
2385
2385
  $.getDefaults = pn;
2386
- $.defaults = Fe;
2387
- $.use = function(...r) {
2388
- return Be.use(...r), $.defaults = Be.defaults, ys($.defaults), $;
2386
+ $.defaults = Ue;
2387
+ $.use = function(...a) {
2388
+ return Fe.use(...a), $.defaults = Fe.defaults, ys($.defaults), $;
2389
2389
  };
2390
- $.walkTokens = function(r, t) {
2391
- return Be.walkTokens(r, t);
2390
+ $.walkTokens = function(a, t) {
2391
+ return Fe.walkTokens(a, t);
2392
2392
  };
2393
- $.parseInline = Be.parseInline;
2394
- $.Parser = be;
2395
- $.parser = be.parse;
2393
+ $.parseInline = Fe.parseInline;
2394
+ $.Parser = xe;
2395
+ $.parser = xe.parse;
2396
2396
  $.Renderer = Pt;
2397
2397
  $.TextRenderer = yn;
2398
2398
  $.Lexer = me;
2399
2399
  $.lexer = me.lex;
2400
2400
  $.Tokenizer = $t;
2401
- $.Hooks = mt;
2401
+ $.Hooks = kt;
2402
2402
  $.parse = $;
2403
2403
  $.options;
2404
2404
  $.setOptions;
2405
2405
  $.use;
2406
2406
  $.walkTokens;
2407
2407
  $.parseInline;
2408
- be.parse;
2408
+ xe.parse;
2409
2409
  me.lex;
2410
- const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2410
+ const Aa = ["innerHTML"], Ot = /* @__PURE__ */ _e({
2411
2411
  __name: "ChatRichText",
2412
2412
  props: {
2413
2413
  text: {},
2414
2414
  inverted: { type: Boolean },
2415
2415
  streaming: { type: Boolean }
2416
2416
  },
2417
- setup(r) {
2418
- const t = r, e = ps(t.text);
2417
+ setup(a) {
2418
+ const t = a, e = ps(t.text);
2419
2419
  let n;
2420
2420
  Mt(
2421
2421
  [() => t.text, () => t.streaming],
@@ -2452,14 +2452,14 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2452
2452
  return $i.sanitize(o, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2453
2453
  });
2454
2454
  return (l, o) => (v(), w("div", {
2455
- class: A(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", r.inverted ? "chat-msg-prose-invert" : ""]),
2455
+ class: A(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", a.inverted ? "chat-msg-prose-invert" : ""]),
2456
2456
  innerHTML: s.value
2457
- }, null, 10, Ar));
2457
+ }, null, 10, Aa));
2458
2458
  }
2459
- }), Er = 80, _r = /* @__PURE__ */ Re({
2459
+ }), Ea = 80, _a = /* @__PURE__ */ _e({
2460
2460
  __name: "ChatScroller",
2461
- setup(r, { expose: t }) {
2462
- const e = ae(), n = ae();
2461
+ setup(a, { expose: t }) {
2462
+ const e = le(), n = le();
2463
2463
  let i = !0, s;
2464
2464
  function l() {
2465
2465
  const c = e.value;
@@ -2468,7 +2468,7 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2468
2468
  d(l, "scrollToBottom");
2469
2469
  function o() {
2470
2470
  const c = e.value;
2471
- c && (i = c.scrollHeight - c.scrollTop - c.clientHeight <= Er);
2471
+ c && (i = c.scrollHeight - c.scrollTop - c.clientHeight <= Ea);
2472
2472
  }
2473
2473
  d(o, "onScroll");
2474
2474
  function h() {
@@ -2497,41 +2497,41 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2497
2497
  ], 512)
2498
2498
  ], 544));
2499
2499
  }
2500
- }), Rr = { class: "@container/chat flex flex-col h-full relative" }, Ir = {
2500
+ }), Ra = { class: "@container/chat flex flex-col h-full relative" }, Ia = {
2501
2501
  key: 0,
2502
2502
  class: "pb-4"
2503
- }, Cr = {
2503
+ }, Ca = {
2504
2504
  key: 0,
2505
2505
  class: "flex flex-col items-center justify-center px-4 min-h-full"
2506
- }, Dr = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Or = ["src", "alt"], Lr = ["title"], Mr = {
2506
+ }, Da = { class: "relative mb-4 size-20 @sm/chat:size-24" }, La = ["src", "alt"], Oa = ["title"], Ma = {
2507
2507
  key: 0,
2508
2508
  class: "flex items-center gap-3 py-3 px-2"
2509
- }, Nr = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-issue-action-label", "data-issue-action-url", "data-streaming"], zr = { class: "max-w-[85%] min-w-0" }, $r = ["href"], Pr = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-streaming"], Br = ["data-test", "data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-streaming"], Fr = {
2509
+ }, Na = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-issue-action-label", "data-issue-action-url", "data-streaming"], za = { class: "max-w-[85%] min-w-0" }, $a = ["href"], Pa = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-streaming"], Ba = ["data-test", "data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-streaming"], Fa = {
2510
2510
  key: 0,
2511
2511
  class: "flex-shrink-0 size-7 @sm/chat:size-8"
2512
- }, Ur = ["src", "alt"], Hr = ["src", "alt"], Gr = ["src"], jr = ["href"], Wr = ["data-working-description"], qr = { class: "truncate" }, Yr = ["data-tool-activity-status"], Vr = { class: "truncate" }, Zr = ["data-issue-code"], Xr = ["href"], Kr = {
2512
+ }, Ua = ["src", "alt"], Ha = ["src", "alt"], Ga = ["src"], ja = ["href"], Wa = ["data-tool-activity-status"], qa = { class: "truncate" }, Ya = ["data-working-description"], Va = { class: "truncate" }, Za = ["data-tool-activity-status"], Xa = { class: "truncate" }, Ka = ["data-issue-code"], Qa = ["href"], Ja = {
2513
2513
  key: 4,
2514
2514
  "data-test": "messaging-thinking-indicator",
2515
2515
  class: "flex gap-2 justify-start items-center mb-4"
2516
- }, Qr = ["src", "alt"], Jr = {
2516
+ }, er = ["src", "alt"], tr = {
2517
2517
  key: 0,
2518
2518
  class: "flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
2519
- }, ea = ["src", "alt"], ta = { class: "max-w-20 truncate" }, na = ["onClick"], sa = {
2519
+ }, nr = ["src", "alt"], sr = { class: "max-w-20 truncate" }, ir = ["onClick"], ar = {
2520
2520
  key: 0,
2521
2521
  class: "shrink-0 flex items-center justify-center size-14"
2522
- }, ia = ["disabled"], ra = {
2522
+ }, rr = ["disabled"], lr = {
2523
2523
  key: 0,
2524
2524
  class: "i-svg-spinners-ring-resize size-4"
2525
- }, aa = {
2525
+ }, or = {
2526
2526
  key: 1,
2527
2527
  class: "i-tabler-paperclip size-5"
2528
- }, la = ["placeholder", "disabled"], oa = ["disabled", "aria-label"], ca = {
2528
+ }, cr = ["placeholder", "disabled"], ur = ["disabled", "aria-label"], hr = {
2529
2529
  key: 0,
2530
2530
  class: "i-tabler-player-stop-filled size-4"
2531
- }, ua = {
2531
+ }, dr = {
2532
2532
  key: 1,
2533
2533
  class: "i-tabler-arrow-up size-5"
2534
- }, wa = /* @__PURE__ */ Re({
2534
+ }, Sr = /* @__PURE__ */ _e({
2535
2535
  __name: "ElAgentChat",
2536
2536
  props: {
2537
2537
  chatController: {},
@@ -2543,166 +2543,170 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2543
2543
  setupHint: {},
2544
2544
  emptyStateMessage: {}
2545
2545
  },
2546
- setup(r) {
2546
+ setup(a) {
2547
2547
  const t = {
2548
2548
  private: { icon: "i-tabler-lock", label: "Private", tooltip: "Only you can see this conversation" },
2549
2549
  org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
2550
2550
  public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
2551
2551
  }, e = U(() => {
2552
- const S = { ...t[r.scope] };
2553
- return r.scope === "org" && r.scopeName && (S.label = r.scopeName, S.tooltip = `Visible to ${r.scopeName} members`), S;
2554
- }), n = ae(""), i = ae(!1), s = ae(), l = ae(), o = ae(), h = ae([]), c = ae(!1);
2555
- function m(S) {
2556
- return S ? /\[[^\]]+\]\([^)]+\)/.test(S) : !1;
2552
+ const T = { ...t[a.scope] };
2553
+ return a.scope === "org" && a.scopeName && (T.label = a.scopeName, T.tooltip = `Visible to ${a.scopeName} members`), T;
2554
+ }), n = le(""), i = le(!1), s = le(), l = le(), o = le(), h = le([]), c = le(!1);
2555
+ function m(T) {
2556
+ return T ? /\[[^\]]+\]\([^)]+\)/.test(T) : !1;
2557
2557
  }
2558
2558
  d(m, "containsMarkdownLink");
2559
- function b(S) {
2560
- return S.sender === "system" && (!!S.issue || S.id === de.value);
2559
+ function x(T) {
2560
+ return T.sender === "system" && (!!T.issue || T.id === be.value);
2561
2561
  }
2562
- d(b, "isSystemExplainerMessage");
2563
- function k(S, f) {
2564
- const p = S[f], D = S[f + 1];
2565
- return !D || D.sender !== p.sender;
2562
+ d(x, "isSystemExplainerMessage");
2563
+ function k(T, g) {
2564
+ const p = T[g], O = T[g + 1];
2565
+ return !O || O.sender !== p.sender;
2566
2566
  }
2567
2567
  d(k, "shouldShowAvatar");
2568
- const T = U(() => r.chatController?.textState.value), F = U(() => T.value?.isConnected ?? !1), M = U(() => T.value?.isThinking ?? !1), V = U(() => T.value?.connectionStatus === "disconnected" && !!T.value?.error), oe = U(() => T.value?.connectionStatus !== "connected" && !T.value?.error), E = U(() => T.value?.error), L = U(() => r.chatController?.sharedMessages.value ?? []), I = U(() => T.value?.workingDescription?.trim() || void 0), B = U(() => M.value ? T.value?.toolActivities ?? [] : []), z = U(() => {
2569
- const S = B.value, f = Z(S, "started");
2570
- if (f)
2571
- return { status: "started", icon: "i-tabler-loader-2 animate-spin", label: f.label };
2572
- const p = Z(S, "failed");
2568
+ const S = U(() => a.chatController?.textState.value), F = U(() => S.value?.isConnected ?? !1), M = U(() => S.value?.isThinking ?? !1), Z = U(() => S.value?.connectionStatus === "disconnected" && !!S.value?.error), ce = U(() => S.value?.connectionStatus !== "connected" && !S.value?.error), E = U(() => S.value?.error), L = U(() => a.chatController?.sharedMessages.value ?? []), R = U(() => S.value?.workingDescription?.trim() || void 0), B = U(() => M.value ? S.value?.toolActivities ?? [] : []), z = U(() => j(B.value));
2569
+ function j(T) {
2570
+ if (!T?.length)
2571
+ return;
2572
+ const g = Me(T, "started");
2573
+ if (g)
2574
+ return { status: "started", icon: "i-tabler-loader-2 animate-spin", label: g.label };
2575
+ const p = Me(T, "failed");
2573
2576
  if (p)
2574
- return { status: "failed", icon: "i-tabler-alert-circle text-red-500", label: p.label };
2575
- const D = S.filter((J) => J.status === "completed").length;
2576
- if (D > 0)
2577
+ return { status: "failed", icon: "i-tabler-alert-circle text-theme-500", label: p.label };
2578
+ const O = T.filter((J) => J.status === "completed").length;
2579
+ if (O > 0)
2577
2580
  return {
2578
2581
  status: "completed",
2579
- icon: "i-tabler-circle-check-filled text-emerald-500",
2580
- label: D === 1 ? "1 action completed" : `${D} actions completed`
2582
+ icon: "i-tabler-circle-check-filled text-primary-500",
2583
+ label: O === 1 ? "1 action completed" : `${O} actions completed`
2581
2584
  };
2582
- });
2583
- function Z(S, f) {
2584
- for (let p = S.length - 1; p >= 0; p--) {
2585
- const D = S[p];
2586
- if (D?.status === f)
2587
- return D;
2585
+ }
2586
+ d(j, "toolActivityLineFor");
2587
+ function Me(T, g) {
2588
+ for (let p = T.length - 1; p >= 0; p--) {
2589
+ const O = T[p];
2590
+ if (O?.status === g)
2591
+ return O;
2588
2592
  }
2589
2593
  }
2590
- d(Z, "lastToolActivityWithStatus");
2591
- const ce = U(() => T.value?.transientIssue), de = U(() => {
2594
+ d(Me, "lastToolActivityWithStatus");
2595
+ const ue = U(() => S.value?.transientIssue), be = U(() => {
2592
2596
  if (!M.value) return;
2593
- const S = L.value, f = S[S.length - 1];
2594
- return f?.sender === "agent" || f?.sender === "system" ? f.id : void 0;
2595
- }), xt = U(() => !M.value || I.value ? !1 : de.value === void 0), it = U(() => T.value?.sendBlockedReason), Ue = U(() => !F.value || it.value !== void 0), Ht = U(() => V.value ? "Agent is offline" : oe.value ? "Connecting..." : it.value === "agent_deleted" ? "This assistant was deleted" : it.value === "account" ? "Resolve the billing issue above to continue" : "Message"), K = U(() => (n.value.trim() || h.value.length > 0) && !Ue.value && !c.value && !M.value), xe = U(() => !!r.chatController && M.value && !c.value), Me = U(() => K.value || xe.value), R = U(() => r.variant === "light"), kt = U(
2596
- () => R.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2597
- ), rt = U(() => R.value ? "text-theme-300" : "text-white/30");
2597
+ const T = L.value, g = T[T.length - 1];
2598
+ return g?.sender === "agent" || g?.sender === "system" ? g.id : void 0;
2599
+ }), Ht = U(() => !M.value || R.value ? !1 : be.value === void 0), rt = U(() => S.value?.sendBlockedReason), He = U(() => !F.value || rt.value !== void 0), K = U(() => Z.value ? "Agent is offline" : ce.value ? "Connecting..." : rt.value === "agent_deleted" ? "This assistant was deleted" : rt.value === "account" ? "Resolve the billing issue above to continue" : "Message"), Ge = U(() => (n.value.trim() || h.value.length > 0) && !He.value && !c.value && !M.value), ke = U(() => !!a.chatController && M.value && !c.value), Ne = U(() => Ge.value || ke.value), I = U(() => a.variant === "light"), yt = U(
2600
+ () => I.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2601
+ ), lt = U(() => I.value ? "text-theme-300" : "text-white/30");
2598
2602
  Bt(async () => {
2599
- r.chatController && !F.value && await r.chatController.startTextConversation();
2603
+ a.chatController && !F.value && await a.chatController.startTextConversation();
2600
2604
  });
2601
- async function vt() {
2602
- const S = n.value.trim(), f = h.value.length > 0;
2603
- if (!S && !f || !r.chatController || Ue.value || c.value || M.value)
2605
+ async function ot() {
2606
+ const T = n.value.trim(), g = h.value.length > 0;
2607
+ if (!T && !g || !a.chatController || He.value || c.value || M.value)
2604
2608
  return;
2605
- const p = n.value, D = f ? [...h.value] : void 0;
2606
- n.value = "", h.value = [], l.value && (l.value.style.height = "auto", l.value.focus()), s.value?.pin(), await r.chatController.sendChatMessage(p, D);
2609
+ const p = n.value, O = g ? [...h.value] : void 0;
2610
+ n.value = "", h.value = [], l.value && (l.value.style.height = "auto", l.value.focus()), s.value?.pin(), await a.chatController.sendChatMessage(p, O);
2607
2611
  }
2608
- d(vt, "sendMessage");
2609
- async function yt() {
2610
- !r.chatController || !xe.value || await r.chatController.stopChatTurn();
2611
- }
2612
- d(yt, "stopMessage");
2612
+ d(ot, "sendMessage");
2613
2613
  async function Gt() {
2614
- if (xe.value) {
2615
- await yt();
2614
+ !a.chatController || !ke.value || await a.chatController.stopChatTurn();
2615
+ }
2616
+ d(Gt, "stopMessage");
2617
+ async function wt() {
2618
+ if (ke.value) {
2619
+ await Gt();
2616
2620
  return;
2617
2621
  }
2618
- await vt();
2622
+ await ot();
2619
2623
  }
2620
- d(Gt, "handleComposerAction");
2621
- async function wt(S) {
2622
- S.key === "Enter" && !S.shiftKey && (S.preventDefault(), await vt());
2624
+ d(wt, "handleComposerAction");
2625
+ async function W(T) {
2626
+ T.key === "Enter" && !T.shiftKey && (T.preventDefault(), await ot());
2623
2627
  }
2624
- d(wt, "handleKeydown");
2625
- function W() {
2628
+ d(W, "handleKeydown");
2629
+ function ct() {
2626
2630
  l.value && (l.value.style.height = "auto", l.value.style.height = `${Math.min(l.value.scrollHeight, 150)}px`);
2627
2631
  }
2628
- d(W, "adjustTextareaHeight"), Mt(n, () => Bs(() => W()));
2629
- function at() {
2632
+ d(ct, "adjustTextareaHeight"), Mt(n, () => Bs(() => ct()));
2633
+ function Y() {
2630
2634
  o.value?.click();
2631
2635
  }
2632
- d(at, "triggerFileInput");
2633
- async function q(S) {
2634
- const f = S.target, p = f.files?.[0];
2635
- if (!(!p || !r.uploadFn)) {
2636
+ d(Y, "triggerFileInput");
2637
+ async function ut(T) {
2638
+ const g = T.target, p = g.files?.[0];
2639
+ if (!(!p || !a.uploadFn)) {
2636
2640
  c.value = !0;
2637
2641
  try {
2638
- const D = await r.uploadFn(p);
2639
- h.value = [...h.value, D];
2640
- } catch (D) {
2641
- const J = D instanceof Error ? D.message : "Couldn't attach that file.";
2642
- r.chatController?.notify(`Upload failed — ${J}`);
2642
+ const O = await a.uploadFn(p);
2643
+ h.value = [...h.value, O];
2644
+ } catch (O) {
2645
+ const J = O instanceof Error ? O.message : "Couldn't attach that file.";
2646
+ a.chatController?.notify(`Upload failed — ${J}`);
2643
2647
  } finally {
2644
- c.value = !1, f.value = "";
2648
+ c.value = !1, g.value = "";
2645
2649
  }
2646
2650
  }
2647
2651
  }
2648
- d(q, "handleFileSelect");
2649
- function lt(S) {
2650
- h.value = h.value.filter((f, p) => p !== S);
2652
+ d(ut, "handleFileSelect");
2653
+ function q(T) {
2654
+ h.value = h.value.filter((g, p) => p !== T);
2651
2655
  }
2652
- d(lt, "removeAttachment");
2653
- function G(S, f) {
2654
- if (f === 0) {
2655
- const Ee = S[f];
2656
- return Ee?.timestamp ? Ie(new Date(Ee.timestamp)) : null;
2656
+ d(q, "removeAttachment");
2657
+ function Re(T, g) {
2658
+ if (g === 0) {
2659
+ const pe = T[g];
2660
+ return pe?.timestamp ? ze(new Date(pe.timestamp)) : null;
2657
2661
  }
2658
- const p = S[f - 1], D = S[f];
2659
- if (!p?.timestamp || !D?.timestamp) return null;
2662
+ const p = T[g - 1], O = T[g];
2663
+ if (!p?.timestamp || !O?.timestamp) return null;
2660
2664
  const J = new Date(p.timestamp).getTime();
2661
- return new Date(D.timestamp).getTime() - J > 36e5 ? Ie(new Date(D.timestamp)) : null;
2662
- }
2663
- d(G, "shouldShowTimeDivider");
2664
- function Ie(S) {
2665
- const f = /* @__PURE__ */ new Date(), p = S.toDateString() === f.toDateString(), D = new Date(f);
2666
- D.setDate(D.getDate() - 1);
2667
- const J = S.toDateString() === D.toDateString(), Ae = S.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2668
- if (p) return Ae;
2669
- if (J) return `Yesterday, ${Ae}`;
2670
- const pe = S.getFullYear() === f.getFullYear();
2671
- return `${S.toLocaleDateString("en-US", {
2665
+ return new Date(O.timestamp).getTime() - J > 36e5 ? ze(new Date(O.timestamp)) : null;
2666
+ }
2667
+ d(Re, "shouldShowTimeDivider");
2668
+ function ze(T) {
2669
+ const g = /* @__PURE__ */ new Date(), p = T.toDateString() === g.toDateString(), O = new Date(g);
2670
+ O.setDate(O.getDate() - 1);
2671
+ const J = T.toDateString() === O.toDateString(), ae = T.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2672
+ if (p) return ae;
2673
+ if (J) return `Yesterday, ${ae}`;
2674
+ const Ie = T.getFullYear() === g.getFullYear();
2675
+ return `${T.toLocaleDateString("en-US", {
2672
2676
  weekday: "long",
2673
2677
  month: "short",
2674
2678
  day: "numeric",
2675
- ...pe ? {} : { year: "numeric" }
2676
- })}, ${Ae}`;
2679
+ ...Ie ? {} : { year: "numeric" }
2680
+ })}, ${ae}`;
2677
2681
  }
2678
- return d(Ie, "formatTimeDivider"), (S, f) => (v(), w("div", Rr, [
2679
- R.value ? j("", !0) : (v(), w("div", Ir, [
2680
- Ye(ai, {
2681
- agent: r.agent,
2682
+ return d(ze, "formatTimeDivider"), (T, g) => (v(), w("div", Ra, [
2683
+ I.value ? G("", !0) : (v(), w("div", Ia, [
2684
+ Ze(ri, {
2685
+ agent: a.agent,
2682
2686
  "is-online": F.value
2683
2687
  }, null, 8, ["agent", "is-online"])
2684
2688
  ])),
2685
- V.value ? (v(), w("div", {
2689
+ Z.value ? (v(), w("div", {
2686
2690
  key: 1,
2687
- class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", R.value ? "text-theme-400" : "text-white/60"])
2691
+ class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", I.value ? "text-theme-400" : "text-white/60"])
2688
2692
  }, [
2689
2693
  y("i", {
2690
- class: A(["i-heroicons-cloud-arrow-down size-8", R.value ? "text-theme-300" : "text-white/40"])
2694
+ class: A(["i-heroicons-cloud-arrow-down size-8", I.value ? "text-theme-300" : "text-white/40"])
2691
2695
  }, null, 2),
2692
- y("span", null, se(E.value), 1)
2693
- ], 2)) : oe.value ? (v(), w("div", {
2696
+ y("span", null, ne(E.value), 1)
2697
+ ], 2)) : ce.value ? (v(), w("div", {
2694
2698
  key: 2,
2695
- class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", R.value ? "text-theme-400" : "text-theme-600"])
2699
+ class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", I.value ? "text-theme-400" : "text-theme-600"])
2696
2700
  }, [
2697
- Ye(Gn, { class: "size-4" })
2698
- ], 2)) : r.setupHint ? (v(), w("div", {
2701
+ Ze(Gn, { class: "size-4" })
2702
+ ], 2)) : a.setupHint ? (v(), w("div", {
2699
2703
  key: 3,
2700
- class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", rt.value])
2704
+ class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", lt.value])
2701
2705
  }, [
2702
- f[10] || (f[10] = y("i", { class: "i-tabler-tool size-3" }, null, -1)),
2703
- y("span", null, se(r.setupHint), 1)
2704
- ], 2)) : j("", !0),
2705
- Ye(_r, {
2706
+ g[10] || (g[10] = y("i", { class: "i-tabler-tool size-3" }, null, -1)),
2707
+ y("span", null, ne(a.setupHint), 1)
2708
+ ], 2)) : G("", !0),
2709
+ Ze(_a, {
2706
2710
  ref_key: "chatScroller",
2707
2711
  ref: s,
2708
2712
  class: "flex-1"
@@ -2711,51 +2715,51 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2711
2715
  y("div", {
2712
2716
  class: A(L.value.length === 0 ? "flex-1 flex flex-col items-center justify-center px-3" : "pt-4 pb-[120px] px-3 space-y-1")
2713
2717
  }, [
2714
- L.value.length === 0 && !oe.value && !V.value ? (v(), w("div", Cr, [
2715
- y("div", Dr, [
2718
+ L.value.length === 0 && !ce.value && !Z.value ? (v(), w("div", Ca, [
2719
+ y("div", Da, [
2716
2720
  y("img", {
2717
- src: r.agent.avatarUrl.value,
2718
- alt: r.agent.displayName.value,
2719
- class: A(["size-full rounded-full object-cover ring-1", R.value ? "ring-black/5" : "ring-white/10"])
2720
- }, null, 10, Or),
2721
+ src: a.agent.avatarUrl.value,
2722
+ alt: a.agent.displayName.value,
2723
+ class: A(["size-full rounded-full object-cover ring-1", I.value ? "ring-black/5" : "ring-white/10"])
2724
+ }, null, 10, La),
2721
2725
  F.value ? (v(), w("span", {
2722
2726
  key: 0,
2723
- class: A(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", R.value ? "bg-white" : "bg-theme-900"])
2724
- }, [...f[11] || (f[11] = [
2727
+ class: A(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", I.value ? "bg-white" : "bg-theme-900"])
2728
+ }, [...g[11] || (g[11] = [
2725
2729
  y("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2726
- ])], 2)) : j("", !0)
2730
+ ])], 2)) : G("", !0)
2727
2731
  ]),
2728
2732
  y("div", {
2729
- class: A(["text-base @sm/chat:text-lg font-semibold", R.value ? "text-theme-900" : "text-white"])
2730
- }, se(r.agent.displayName.value), 3),
2733
+ class: A(["text-base @sm/chat:text-lg font-semibold", I.value ? "text-theme-900" : "text-white"])
2734
+ }, ne(a.agent.displayName.value), 3),
2731
2735
  y("p", {
2732
- class: A(["mt-1 text-center text-xs @sm/chat:text-sm", rt.value])
2733
- }, se(r.emptyStateMessage || "Type your message to get started."), 3),
2736
+ class: A(["mt-1 text-center text-xs @sm/chat:text-sm", lt.value])
2737
+ }, ne(a.emptyStateMessage || "Type your message to get started."), 3),
2734
2738
  y("div", {
2735
- class: A(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", R.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2739
+ class: A(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", I.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2736
2740
  title: e.value.tooltip
2737
2741
  }, [
2738
2742
  y("i", {
2739
2743
  class: A([e.value.icon, "size-3"])
2740
2744
  }, null, 2),
2741
- y("span", null, se(e.value.label), 1)
2742
- ], 10, Lr)
2743
- ])) : j("", !0),
2744
- (v(!0), w($e, null, tn(L.value, (p, D) => (v(), w($e, {
2745
+ y("span", null, ne(e.value.label), 1)
2746
+ ], 10, Oa)
2747
+ ])) : G("", !0),
2748
+ (v(!0), w(Pe, null, tn(L.value, (p, O) => (v(), w(Pe, {
2745
2749
  key: p.id
2746
2750
  }, [
2747
- G(L.value, D) ? (v(), w("div", Mr, [
2751
+ Re(L.value, O) ? (v(), w("div", Ma, [
2748
2752
  y("div", {
2749
- class: A(["flex-1 h-px", kt.value])
2753
+ class: A(["flex-1 h-px", yt.value])
2750
2754
  }, null, 2),
2751
2755
  y("span", {
2752
- class: A(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", rt.value])
2753
- }, se(G(L.value, D)), 3),
2756
+ class: A(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", lt.value])
2757
+ }, ne(Re(L.value, O)), 3),
2754
2758
  y("div", {
2755
- class: A(["flex-1 h-px", kt.value])
2759
+ class: A(["flex-1 h-px", yt.value])
2756
2760
  }, null, 2)
2757
- ])) : j("", !0),
2758
- b(p) ? (v(), w("div", {
2761
+ ])) : G("", !0),
2762
+ x(p) ? (v(), w("div", {
2759
2763
  key: 1,
2760
2764
  "data-test": "messaging-system-msg",
2761
2765
  "data-message-id": p.id,
@@ -2767,42 +2771,42 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2767
2771
  "data-issue-bucket": p.issue?.bucket,
2768
2772
  "data-issue-action-label": p.issue?.actionLabel,
2769
2773
  "data-issue-action-url": p.issue?.actionUrl,
2770
- "data-streaming": p.id === de.value ? "true" : void 0,
2774
+ "data-streaming": p.id === be.value ? "true" : void 0,
2771
2775
  class: "flex gap-2 items-end justify-start mb-4"
2772
2776
  }, [
2773
- y("div", zr, [
2777
+ y("div", za, [
2774
2778
  y("div", {
2775
- class: A(["mb-1 pl-1 text-[11px] font-medium", R.value ? "text-theme-500" : "text-white/45"])
2779
+ class: A(["mb-1 pl-1 text-[11px] font-medium", I.value ? "text-theme-500" : "text-white/45"])
2776
2780
  }, " System Message ", 2),
2777
2781
  y("div", {
2778
- class: A(["rounded-2xl rounded-bl-[4px] px-3.5 py-2 border system-msg-content", R.value ? "bg-theme-100 border-theme-200 text-theme-800" : "bg-white/[0.18] border-white/15 text-white/90"])
2782
+ class: A(["rounded-2xl rounded-bl-[4px] px-3.5 py-2 border system-msg-content", I.value ? "bg-theme-100 border-theme-200 text-theme-800" : "bg-white/[0.18] border-white/15 text-white/90"])
2779
2783
  }, [
2780
- p.text ? (v(), Hn(Lt, {
2784
+ p.text ? (v(), Hn(Ot, {
2781
2785
  key: 0,
2782
2786
  text: p.text,
2783
- inverted: !R.value,
2784
- streaming: p.id === de.value,
2785
- onClick: f[0] || (f[0] = ht(() => {
2787
+ inverted: !I.value,
2788
+ streaming: p.id === be.value,
2789
+ onClick: g[0] || (g[0] = ft(() => {
2786
2790
  }, ["stop"]))
2787
- }, null, 8, ["text", "inverted", "streaming"])) : p.issue?.help ? (v(), Hn(Lt, {
2791
+ }, null, 8, ["text", "inverted", "streaming"])) : p.issue?.help ? (v(), Hn(Ot, {
2788
2792
  key: 1,
2789
2793
  text: p.issue.help,
2790
- inverted: !R.value
2791
- }, null, 8, ["text", "inverted"])) : j("", !0),
2794
+ inverted: !I.value
2795
+ }, null, 8, ["text", "inverted"])) : G("", !0),
2792
2796
  p.issue?.actionUrl && !m(p.text) ? (v(), w("a", {
2793
2797
  key: 2,
2794
2798
  href: p.issue.actionUrl,
2795
2799
  "data-test": "messaging-system-msg-action",
2796
- class: A(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", R.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
2797
- onClick: f[1] || (f[1] = ht(() => {
2800
+ class: A(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", I.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
2801
+ onClick: g[1] || (g[1] = ft(() => {
2798
2802
  }, ["stop"]))
2799
2803
  }, [
2800
- Ct(se(p.issue.actionLabel) + " ", 1),
2801
- f[12] || (f[12] = y("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2802
- ], 10, $r)) : j("", !0)
2804
+ Ct(ne(p.issue.actionLabel) + " ", 1),
2805
+ g[12] || (g[12] = y("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2806
+ ], 10, $a)) : G("", !0)
2803
2807
  ], 2)
2804
2808
  ])
2805
- ], 8, Nr)) : p.sender === "system" ? (v(), w("div", {
2809
+ ], 8, Na)) : p.sender === "system" ? (v(), w("div", {
2806
2810
  key: 2,
2807
2811
  "data-test": "messaging-system-status-msg",
2808
2812
  "data-message-id": p.id,
@@ -2812,17 +2816,17 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2812
2816
  "data-system-kind": p.systemKind,
2813
2817
  "data-issue-code": p.issue?.code,
2814
2818
  "data-issue-bucket": p.issue?.bucket,
2815
- "data-streaming": p.id === de.value ? "true" : void 0,
2816
- class: A(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", R.value ? "text-theme-500" : "text-white/60"])
2819
+ "data-streaming": p.id === be.value ? "true" : void 0,
2820
+ class: A(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", I.value ? "text-theme-500" : "text-white/60"])
2817
2821
  }, [
2818
- f[13] || (f[13] = y("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)),
2819
- Ye(Lt, {
2822
+ g[13] || (g[13] = y("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)),
2823
+ Ze(Ot, {
2820
2824
  text: p.text,
2821
- inverted: !R.value,
2822
- onClick: f[2] || (f[2] = ht(() => {
2825
+ inverted: !I.value,
2826
+ onClick: g[2] || (g[2] = ft(() => {
2823
2827
  }, ["stop"]))
2824
2828
  }, null, 8, ["text", "inverted"])
2825
- ], 10, Pr)) : (v(), w("div", {
2829
+ ], 10, Pa)) : (v(), w("div", {
2826
2830
  key: 3,
2827
2831
  "data-test": p.sender === "agent" ? "messaging-assistant-msg" : p.sender === "user" ? "messaging-user-msg" : void 0,
2828
2832
  "data-message-id": p.id,
@@ -2830,21 +2834,21 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2830
2834
  "data-conversation-id": p.conversationId,
2831
2835
  "data-message-sequence": p.sequence,
2832
2836
  "data-system-kind": p.systemKind,
2833
- "data-streaming": p.id === de.value ? "true" : void 0,
2837
+ "data-streaming": p.id === be.value ? "true" : void 0,
2834
2838
  class: A(["flex gap-2 items-end", {
2835
2839
  "justify-end": p.sender === "user",
2836
2840
  "justify-start": p.sender === "agent",
2837
- "mb-4": k(L.value, D)
2841
+ "mb-4": k(L.value, O)
2838
2842
  }])
2839
2843
  }, [
2840
- p.sender === "agent" ? (v(), w("div", Fr, [
2841
- k(L.value, D) ? (v(), w("img", {
2844
+ p.sender === "agent" ? (v(), w("div", Fa, [
2845
+ k(L.value, O) ? (v(), w("img", {
2842
2846
  key: 0,
2843
- src: r.agent.avatarUrl.value,
2844
- alt: r.agent.displayName.value,
2845
- class: A(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", R.value ? "ring-1 ring-black/5" : ""])
2846
- }, null, 10, Ur)) : j("", !0)
2847
- ])) : j("", !0),
2847
+ src: a.agent.avatarUrl.value,
2848
+ alt: a.agent.displayName.value,
2849
+ class: A(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", I.value ? "ring-1 ring-black/5" : ""])
2850
+ }, null, 10, Ua)) : G("", !0)
2851
+ ])) : G("", !0),
2848
2852
  y("div", {
2849
2853
  class: A(p.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2850
2854
  }, [
@@ -2852,200 +2856,212 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
2852
2856
  key: 0,
2853
2857
  class: A(["mb-1 space-y-1", p.sender === "user" ? "flex flex-col items-end" : ""])
2854
2858
  }, [
2855
- (v(!0), w($e, null, tn(p.attachments, (J, Ae) => (v(), w($e, { key: Ae }, [
2859
+ (v(!0), w(Pe, null, tn(p.attachments, (J, ae) => (v(), w(Pe, { key: ae }, [
2856
2860
  J.type === "image" ? (v(), w("img", {
2857
2861
  key: 0,
2858
2862
  src: J.src,
2859
2863
  alt: J.filename,
2860
2864
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
2861
- }, null, 8, Hr)) : J.type === "audio" ? (v(), w("audio", {
2865
+ }, null, 8, Ha)) : J.type === "audio" ? (v(), w("audio", {
2862
2866
  key: 1,
2863
2867
  src: J.src,
2864
2868
  controls: "",
2865
2869
  class: "max-w-full"
2866
- }, null, 8, Gr)) : (v(), w("a", {
2870
+ }, null, 8, Ga)) : (v(), w("a", {
2867
2871
  key: 2,
2868
2872
  href: J.src,
2869
2873
  target: "_blank",
2870
2874
  rel: "noopener",
2871
- class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", R.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2875
+ class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", I.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2872
2876
  }, [
2873
- f[14] || (f[14] = y("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2874
- Ct(" " + se(J.filename), 1)
2875
- ], 10, jr))
2877
+ g[14] || (g[14] = y("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2878
+ Ct(" " + ne(J.filename), 1)
2879
+ ], 10, ja))
2876
2880
  ], 64))), 128))
2877
- ], 2)) : j("", !0),
2881
+ ], 2)) : G("", !0),
2878
2882
  p.text ? (v(), w("div", {
2879
2883
  key: 1,
2880
2884
  class: A(["rounded-2xl px-3.5 py-2", [
2881
- p.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : R.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
2885
+ p.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : I.value ? "bg-theme-50 text-theme-800 border border-black/[0.02] rounded-bl-[4px]" : "bg-white/15 backdrop-blur-sm text-white/95 rounded-bl-[4px]"
2882
2886
  ]])
2883
2887
  }, [
2884
- Ye(Lt, {
2888
+ Ze(Ot, {
2885
2889
  text: p.text,
2886
- inverted: p.sender === "user" || !R.value,
2887
- streaming: p.id === de.value,
2888
- onClick: f[3] || (f[3] = ht(() => {
2890
+ inverted: p.sender === "user" || !I.value,
2891
+ streaming: p.id === be.value,
2892
+ onClick: g[3] || (g[3] = ft(() => {
2889
2893
  }, ["stop"]))
2890
2894
  }, null, 8, ["text", "inverted", "streaming"])
2891
- ], 2)) : j("", !0)
2895
+ ], 2)) : G("", !0),
2896
+ j(p.toolActivities) ? (v(), w("div", {
2897
+ key: 2,
2898
+ "data-test": "messaging-message-tool-activity",
2899
+ "data-tool-activity-status": j(p.toolActivities)?.status,
2900
+ class: A(["mt-1 flex items-center gap-1.5 pl-2 pr-3 text-[12px] leading-none", I.value ? "text-theme-500" : "text-white/45"])
2901
+ }, [
2902
+ y("i", {
2903
+ class: A(["size-3.5 shrink-0 opacity-80", j(p.toolActivities)?.icon]),
2904
+ "aria-hidden": "true"
2905
+ }, null, 2),
2906
+ y("span", qa, ne(j(p.toolActivities)?.label), 1)
2907
+ ], 10, Wa)) : G("", !0)
2892
2908
  ], 2)
2893
- ], 10, Br))
2909
+ ], 10, Ba))
2894
2910
  ], 64))), 128)),
2895
- I.value ? (v(), w("div", {
2911
+ R.value ? (v(), w("div", {
2896
2912
  key: 1,
2897
2913
  "data-test": "messaging-working-state",
2898
- "data-working-description": I.value,
2899
- class: A(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", R.value ? "text-theme-500" : "text-white/45"])
2914
+ "data-working-description": R.value,
2915
+ class: A(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", I.value ? "text-theme-500" : "text-white/45"])
2900
2916
  }, [
2901
- f[15] || (f[15] = y("i", {
2917
+ g[15] || (g[15] = y("i", {
2902
2918
  class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
2903
2919
  "aria-hidden": "true"
2904
2920
  }, null, -1)),
2905
- y("span", qr, se(I.value), 1)
2906
- ], 10, Wr)) : j("", !0),
2921
+ y("span", Va, ne(R.value), 1)
2922
+ ], 10, Ya)) : G("", !0),
2907
2923
  z.value ? (v(), w("div", {
2908
2924
  key: 2,
2909
2925
  "data-test": "messaging-tool-activity",
2910
2926
  "data-tool-activity-status": z.value.status,
2911
- class: A(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", R.value ? "text-theme-500" : "text-white/45"])
2927
+ class: A(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", I.value ? "text-theme-500" : "text-white/45"])
2912
2928
  }, [
2913
2929
  y("i", {
2914
2930
  class: A(["size-3.5 shrink-0 opacity-80", z.value.icon]),
2915
2931
  "aria-hidden": "true"
2916
2932
  }, null, 2),
2917
- y("span", Vr, se(z.value.label), 1)
2918
- ], 10, Yr)) : j("", !0),
2919
- ce.value ? (v(), w("div", {
2933
+ y("span", Xa, ne(z.value.label), 1)
2934
+ ], 10, Za)) : G("", !0),
2935
+ ue.value ? (v(), w("div", {
2920
2936
  key: 3,
2921
2937
  "data-test": "messaging-transient-issue",
2922
- "data-issue-code": ce.value.code,
2923
- class: A(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", R.value ? "text-theme-600" : "text-white/60"])
2938
+ "data-issue-code": ue.value.code,
2939
+ class: A(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", I.value ? "text-theme-600" : "text-white/60"])
2924
2940
  }, [
2925
- f[16] || (f[16] = y("i", {
2941
+ g[16] || (g[16] = y("i", {
2926
2942
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
2927
2943
  "aria-hidden": "true"
2928
2944
  }, null, -1)),
2929
2945
  y("span", null, [
2930
- Ct(se(ce.value.message), 1),
2931
- ce.value.help ? (v(), w($e, { key: 0 }, [
2932
- Ct(se(ce.value.help), 1)
2933
- ], 64)) : j("", !0)
2946
+ Ct(ne(ue.value.message), 1),
2947
+ ue.value.help ? (v(), w(Pe, { key: 0 }, [
2948
+ Ct(ne(ue.value.help), 1)
2949
+ ], 64)) : G("", !0)
2934
2950
  ]),
2935
- ce.value.actionUrl && ce.value.actionLabel ? (v(), w("a", {
2951
+ ue.value.actionUrl && ue.value.actionLabel ? (v(), w("a", {
2936
2952
  key: 0,
2937
- href: ce.value.actionUrl,
2953
+ href: ue.value.actionUrl,
2938
2954
  class: "shrink-0 underline underline-offset-2",
2939
- onClick: f[4] || (f[4] = ht(() => {
2955
+ onClick: g[4] || (g[4] = ft(() => {
2940
2956
  }, ["stop"]))
2941
- }, se(ce.value.actionLabel), 9, Xr)) : j("", !0)
2942
- ], 10, Zr)) : j("", !0),
2943
- xt.value ? (v(), w("div", Kr, [
2957
+ }, ne(ue.value.actionLabel), 9, Qa)) : G("", !0)
2958
+ ], 10, Ka)) : G("", !0),
2959
+ Ht.value ? (v(), w("div", Ja, [
2944
2960
  y("img", {
2945
- src: r.agent.avatarUrl.value,
2946
- alt: r.agent.displayName.value,
2947
- class: A(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", R.value ? "ring-1 ring-black/5" : ""])
2948
- }, null, 10, Qr),
2961
+ src: a.agent.avatarUrl.value,
2962
+ alt: a.agent.displayName.value,
2963
+ class: A(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", I.value ? "ring-1 ring-black/5" : ""])
2964
+ }, null, 10, er),
2949
2965
  y("div", {
2950
- class: A(["rounded-2xl px-3.5 py-2.5 flex items-center", R.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2966
+ class: A(["rounded-2xl px-3.5 py-2.5 flex items-center", I.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2951
2967
  }, [
2952
2968
  y("i", {
2953
- class: A(["i-svg-spinners-3-dots-bounce size-7", R.value ? "text-theme-400" : "text-white/50"])
2969
+ class: A(["i-svg-spinners-3-dots-bounce size-7", I.value ? "text-theme-400" : "text-white/50"])
2954
2970
  }, null, 2)
2955
2971
  ], 2)
2956
- ])) : j("", !0)
2972
+ ])) : G("", !0)
2957
2973
  ], 2)
2958
2974
  ]),
2959
2975
  _: 1
2960
2976
  }, 512),
2961
2977
  y("div", {
2962
- class: A(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", R.value ? "bg-gradient-to-t from-theme-50/90 via-theme-50/55 to-transparent" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
2978
+ class: A(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", I.value ? "bg-gradient-to-t from-theme-50/90 via-theme-50/55 to-transparent" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
2963
2979
  }, [
2964
- h.value.length > 0 ? (v(), w("div", Jr, [
2965
- (v(!0), w($e, null, tn(h.value, (p, D) => (v(), w("div", {
2966
- key: D,
2980
+ h.value.length > 0 ? (v(), w("div", tr, [
2981
+ (v(!0), w(Pe, null, tn(h.value, (p, O) => (v(), w("div", {
2982
+ key: O,
2967
2983
  class: "relative shrink-0 group"
2968
2984
  }, [
2969
2985
  p.type === "image" ? (v(), w("img", {
2970
2986
  key: 0,
2971
2987
  src: p.src,
2972
2988
  alt: p.filename,
2973
- class: A(["size-14 rounded-xl object-cover border", R.value ? "border-black/10" : "border-white/20"])
2974
- }, null, 10, ea)) : (v(), w("div", {
2989
+ class: A(["size-14 rounded-xl object-cover border", I.value ? "border-black/10" : "border-white/20"])
2990
+ }, null, 10, nr)) : (v(), w("div", {
2975
2991
  key: 1,
2976
- class: A(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", R.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2992
+ class: A(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", I.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2977
2993
  }, [
2978
- f[17] || (f[17] = y("i", { class: "i-tabler-file size-4" }, null, -1)),
2979
- y("span", ta, se(p.filename), 1)
2994
+ g[17] || (g[17] = y("i", { class: "i-tabler-file size-4" }, null, -1)),
2995
+ y("span", sr, ne(p.filename), 1)
2980
2996
  ], 2)),
2981
2997
  y("button", {
2982
2998
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
2983
- onClick: /* @__PURE__ */ d((J) => lt(D), "onClick")
2984
- }, [...f[18] || (f[18] = [
2999
+ onClick: /* @__PURE__ */ d((J) => q(O), "onClick")
3000
+ }, [...g[18] || (g[18] = [
2985
3001
  y("i", { class: "i-tabler-x size-3" }, null, -1)
2986
- ])], 8, na)
3002
+ ])], 8, ir)
2987
3003
  ]))), 128)),
2988
- c.value ? (v(), w("div", sa, [
2989
- Ye(Gn, { class: "size-5" })
2990
- ])) : j("", !0)
2991
- ])) : j("", !0),
2992
- r.uploadFn ? (v(), w("input", {
3004
+ c.value ? (v(), w("div", ar, [
3005
+ Ze(Gn, { class: "size-5" })
3006
+ ])) : G("", !0)
3007
+ ])) : G("", !0),
3008
+ a.uploadFn ? (v(), w("input", {
2993
3009
  key: 1,
2994
3010
  ref_key: "fileInput",
2995
3011
  ref: o,
2996
3012
  type: "file",
2997
3013
  accept: "image/*,audio/*,video/*",
2998
3014
  class: "hidden",
2999
- onChange: q
3000
- }, null, 544)) : j("", !0),
3015
+ onChange: ut
3016
+ }, null, 544)) : G("", !0),
3001
3017
  y("div", {
3002
- class: A(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-colors duration-200", R.value ? i.value ? "bg-theme-50 ring-1 ring-theme-300" : "bg-theme-25 ring-1 ring-theme-200 hover:ring-theme-300" : i.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
3018
+ class: A(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-colors duration-200", I.value ? i.value ? "bg-theme-50 ring-1 ring-theme-300" : "bg-theme-25 ring-1 ring-theme-200 hover:ring-theme-300" : i.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
3003
3019
  }, [
3004
3020
  y("button", {
3005
3021
  class: A(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
3006
- r.uploadFn ? "cursor-pointer" : "cursor-default",
3007
- R.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
3022
+ a.uploadFn ? "cursor-pointer" : "cursor-default",
3023
+ I.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
3008
3024
  c.value ? "opacity-50 pointer-events-none" : ""
3009
3025
  ]]),
3010
- disabled: Ue.value || c.value || !r.uploadFn,
3011
- onClick: f[5] || (f[5] = (p) => r.uploadFn && at())
3026
+ disabled: He.value || c.value || !a.uploadFn,
3027
+ onClick: g[5] || (g[5] = (p) => a.uploadFn && Y())
3012
3028
  }, [
3013
- c.value ? (v(), w("i", ra)) : (v(), w("i", aa))
3014
- ], 10, ia),
3029
+ c.value ? (v(), w("i", lr)) : (v(), w("i", or))
3030
+ ], 10, rr),
3015
3031
  Us(y("textarea", {
3016
3032
  ref_key: "textarea",
3017
3033
  ref: l,
3018
- "onUpdate:modelValue": f[6] || (f[6] = (p) => n.value = p),
3034
+ "onUpdate:modelValue": g[6] || (g[6] = (p) => n.value = p),
3019
3035
  "data-test": "messaging-input",
3020
3036
  rows: "1",
3021
3037
  enterkeyhint: "send",
3022
- placeholder: Ht.value,
3023
- disabled: Ue.value,
3038
+ placeholder: K.value,
3039
+ disabled: He.value,
3024
3040
  style: { fontSize: "16px", resize: "none" },
3025
- class: A(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", R.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
3026
- onKeydown: wt,
3027
- onFocus: f[7] || (f[7] = (p) => i.value = !0),
3028
- onBlur: f[8] || (f[8] = (p) => i.value = !1)
3029
- }, null, 42, la), [
3041
+ class: A(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", I.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
3042
+ onKeydown: W,
3043
+ onFocus: g[7] || (g[7] = (p) => i.value = !0),
3044
+ onBlur: g[8] || (g[8] = (p) => i.value = !1)
3045
+ }, null, 42, cr), [
3030
3046
  [Hs, n.value]
3031
3047
  ]),
3032
3048
  y("button", {
3033
3049
  "data-test": "messaging-send-btn",
3034
- class: A(["shrink-0 flex items-center justify-center rounded-full transition-transform duration-200 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", Me.value ? "bg-primary-500 text-white hover:scale-105 active:scale-95 cursor-pointer" : R.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
3035
- disabled: !Me.value,
3036
- "aria-label": xe.value ? "Stop reply" : "Send message",
3037
- onClick: f[9] || (f[9] = (p) => Gt())
3050
+ class: A(["shrink-0 flex items-center justify-center rounded-full transition-transform duration-200 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", Ne.value ? "bg-primary-500 text-white hover:scale-105 active:scale-95 cursor-pointer" : I.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
3051
+ disabled: !Ne.value,
3052
+ "aria-label": ke.value ? "Stop reply" : "Send message",
3053
+ onClick: g[9] || (g[9] = (p) => wt())
3038
3054
  }, [
3039
- xe.value ? (v(), w("i", ca)) : (v(), w("i", ua))
3040
- ], 10, oa)
3055
+ ke.value ? (v(), w("i", hr)) : (v(), w("i", dr))
3056
+ ], 10, ur)
3041
3057
  ], 2)
3042
3058
  ], 2)
3043
3059
  ]));
3044
3060
  }
3045
- }), ha = { class: "agent-wrap" }, da = {
3061
+ }), pr = { class: "agent-wrap" }, fr = {
3046
3062
  key: 0,
3047
3063
  class: "flex items-center justify-center h-full"
3048
- }, Ta = /* @__PURE__ */ Re({
3064
+ }, Ar = /* @__PURE__ */ _e({
3049
3065
  __name: "AgentWrap",
3050
3066
  props: {
3051
3067
  sdk: {},
@@ -3058,11 +3074,11 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
3058
3074
  hasClose: { type: Boolean },
3059
3075
  apiBase: {}
3060
3076
  },
3061
- setup(r) {
3062
- const t = js("AgentWrap"), e = r, n = e.sdk || Ws.getInstance({
3077
+ setup(a) {
3078
+ const t = js("AgentWrap"), e = a, n = e.sdk || Ws.getInstance({
3063
3079
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
3064
3080
  ...e.apiBase && { apiBase: e.apiBase }
3065
- }), i = ae(!e.agent), s = ps(e.agent ? new Nt({ config: e.agent }) : void 0), l = ae();
3081
+ }), i = le(!e.agent), s = ps(e.agent ? new Nt({ config: e.agent }) : void 0), l = le();
3066
3082
  return Bt(async () => {
3067
3083
  if (e.agent) {
3068
3084
  t.debug("Agent provided via props, skipping fetch", {
@@ -3139,33 +3155,33 @@ const Ar = ["innerHTML"], Lt = /* @__PURE__ */ Re({
3139
3155
  }
3140
3156
  });
3141
3157
  }
3142
- }), (o, h) => (v(), w("div", ha, [
3143
- i.value ? (v(), w("div", da, [...h[0] || (h[0] = [
3158
+ }), (o, h) => (v(), w("div", pr, [
3159
+ i.value ? (v(), w("div", fr, [...h[0] || (h[0] = [
3144
3160
  y("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
3145
3161
  ])])) : s.value ? dn(o.$slots, "default", {
3146
3162
  key: 1,
3147
3163
  sdk: on(n),
3148
3164
  agent: s.value,
3149
- context: r.context,
3150
- firstMessage: r.firstMessage,
3151
- buttonText: r.buttonText,
3152
- buttonIcon: r.buttonIcon,
3165
+ context: a.context,
3166
+ firstMessage: a.firstMessage,
3167
+ buttonText: a.buttonText,
3168
+ buttonIcon: a.buttonIcon,
3153
3169
  loading: i.value
3154
- }) : j("", !0)
3170
+ }) : G("", !0)
3155
3171
  ]));
3156
3172
  }
3157
3173
  });
3158
3174
  export {
3159
3175
  jn as A,
3160
- Ta as _,
3161
- wa as a,
3162
- va as b,
3163
- ka as c,
3164
- ya as d,
3176
+ Ar as _,
3177
+ Sr as a,
3178
+ wr as b,
3179
+ yr as c,
3180
+ Tr as d,
3165
3181
  Gn as e,
3166
- ai as f,
3167
- ba as g,
3182
+ ri as f,
3183
+ kr as g,
3168
3184
  qn as h,
3169
- xa as p
3185
+ vr as p
3170
3186
  };
3171
3187
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map