@pagelines/sdk 1.0.573 → 1.0.575

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,14 +1,14 @@
1
1
  var Fn = Object.defineProperty;
2
2
  var Ps = (a, t, e) => t in a ? Fn(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
- var d = (a, t) => Fn(a, "name", { value: t, configurable: !0 });
4
- var O = (a, t, e) => Ps(a, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as ve, openBlock as T, createElementBlock as S, createElementVNode as v, normalizeClass as _, ref as ie, watch as Ct, computed as G, createCommentVNode as V, renderSlot as on, onMounted as Nt, unref as sn, Fragment as Ze, toDisplayString as he, shallowRef as fs, onBeforeUnmount as gs, nextTick as Bs, createVNode as Ge, withCtx as Fs, renderList as Kt, createBlock as Un, withModifiers as Et, createTextVNode as Hn, withDirectives as Us, vModelText as Hs } from "vue";
3
+ var p = (a, t) => Fn(a, "name", { value: t, configurable: !0 });
4
+ var D = (a, t, e) => Ps(a, typeof t != "symbol" ? t + "" : t, e);
5
+ import { defineComponent as Te, openBlock as T, createElementBlock as S, createElementVNode as w, normalizeClass as A, ref as ie, watch as It, computed as j, createCommentVNode as Z, renderSlot as on, onMounted as Lt, unref as sn, Fragment as Xe, toDisplayString as le, shallowRef as fs, onBeforeUnmount as gs, nextTick as Bs, createVNode as We, withCtx as Fs, renderList as Kt, createBlock as Un, withModifiers as At, createTextVNode as Hn, withDirectives as Us, vModelText as Hs } from "vue";
6
6
  import { SettingsObject as js, Agent as Dt, getDefaultAvatarUrl as ms, createLogger as Gs } 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
- }, jn = /* @__PURE__ */ ve({
11
+ }, jn = /* @__PURE__ */ Te({
12
12
  __name: "FSpinner",
13
13
  props: {
14
14
  width: { type: String, default: "" },
@@ -17,8 +17,8 @@ const qs = { class: "spinner max-w-sm" }, Ys = {
17
17
  setup(a) {
18
18
  return (t, e) => (T(), S("div", qs, [
19
19
  (T(), S("svg", Ys, [
20
- v("circle", {
21
- class: _([a.colorMode, "ring-path"]),
20
+ w("circle", {
21
+ class: A([a.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
24
24
  r: "20",
@@ -36,20 +36,20 @@ const qs = { class: "spinner max-w-sm" }, Ys = {
36
36
  ], Zs = 9e4, bs = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Xs = /* @__PURE__ */ new Set([...bs, "EMPTY_STREAM", "RATE_LIMIT"]), Gn = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), xn = class xn extends js {
37
37
  constructor(e) {
38
38
  super("AgentChatController", e);
39
- O(this, "isTextMode", !1);
40
- O(this, "lastMessage", { hash: "", time: 0 });
41
- O(this, "isConnecting", !1);
39
+ D(this, "isTextMode", !1);
40
+ D(this, "lastMessage", { hash: "", time: 0 });
41
+ D(this, "isConnecting", !1);
42
42
  // Chat conversation tracking (server-managed persistence)
43
- O(this, "conversationId");
44
- O(this, "textState", ie({
43
+ D(this, "conversationId");
44
+ D(this, "textState", ie({
45
45
  isActive: !1,
46
46
  isConnected: !1,
47
47
  isThinking: !1,
48
48
  connectionStatus: "disconnected"
49
49
  }));
50
- O(this, "agentMode", ie("self"));
51
- O(this, "sharedMessages", ie([]));
52
- O(this, "_agent");
50
+ D(this, "agentMode", ie("self"));
51
+ D(this, "sharedMessages", ie([]));
52
+ D(this, "_agent");
53
53
  this._agent = e.agent instanceof Dt ? e.agent : new Dt({ config: e.agent }), this.setupModeWatcher(), this.setupAvailabilityWatcher();
54
54
  }
55
55
  get chatEnabled() {
@@ -123,16 +123,17 @@ Current User:
123
123
  isThinking: !1,
124
124
  connectionStatus: "disconnected",
125
125
  error: void 0,
126
- sendBlockedReason: void 0
126
+ sendBlockedReason: void 0,
127
+ workingDescription: void 0
127
128
  });
128
129
  }
129
130
  setupModeWatcher() {
130
- Ct(this.agentMode, async (e, n) => {
131
+ It(this.agentMode, async (e, n) => {
131
132
  this.logger.info(`Mode changed from ${n} to ${e}`), this.isTextMode && (n === "talk" || n === "chat") && await this.endConversation();
132
133
  });
133
134
  }
134
135
  setupAvailabilityWatcher() {
135
- Ct(() => this.chatEnabled, (e) => {
136
+ It(() => this.chatEnabled, (e) => {
136
137
  if (!(!this.isTextMode || this.isConnecting)) {
137
138
  if (e) {
138
139
  this.textState.value.isConnected || this.updateState(this.textState, {
@@ -215,76 +216,81 @@ Current User:
215
216
  this.handleError(new Error("Agent handle required for chat"));
216
217
  return;
217
218
  }
218
- this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0 });
219
+ this.addMessage(e, "user", n), this.updateState(this.textState, { isThinking: !0, workingDescription: void 0 });
219
220
  const l = `stream-${Date.now()}`;
220
221
  let o = !1, h = !1;
221
- const c = /* @__PURE__ */ d((y, A = "assistant") => {
222
- o || (o = !0, this.sharedMessages.value = [
222
+ const c = /* @__PURE__ */ p((m, _ = "assistant") => {
223
+ this.updateState(this.textState, { workingDescription: void 0 }), o || (o = !0, this.sharedMessages.value = [
223
224
  ...this.sharedMessages.value,
224
- { id: l, text: "", sender: A === "system" ? "system" : "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
225
+ { id: l, text: "", sender: _ === "system" ? "system" : "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
225
226
  ]);
226
- const C = this.sharedMessages.value, z = C[C.length - 1];
227
- z?.id === l && (z.text += y, this.sharedMessages.value = [...C]);
228
- }, "onDelta"), k = /* @__PURE__ */ d((y) => {
229
- h = !0, o = !0;
230
- const A = this.sharedMessages.value, C = A.findIndex((z) => z.id === y.id);
231
- if (C >= 0)
227
+ const L = this.sharedMessages.value, P = L[L.length - 1];
228
+ P?.id === l && (P.text += m, this.sharedMessages.value = [...L]);
229
+ }, "onDelta"), y = /* @__PURE__ */ p((m) => {
230
+ h = !0, o = !0, this.updateState(this.textState, { workingDescription: void 0 });
231
+ const _ = this.sharedMessages.value, L = _.findIndex((P) => P.id === m.id);
232
+ if (L >= 0)
232
233
  this.sharedMessages.value = [
233
- ...A.slice(0, C),
234
- y,
235
- ...A.slice(C + 1)
234
+ ..._.slice(0, L),
235
+ m,
236
+ ..._.slice(L + 1)
236
237
  ];
237
238
  else {
238
- const z = A[A.length - 1];
239
- this.sharedMessages.value = z?.id === l ? [...A.slice(0, -1), y] : [...A, y];
239
+ const P = _[_.length - 1];
240
+ this.sharedMessages.value = P?.id === l ? [..._.slice(0, -1), m] : [..._, m];
240
241
  }
241
- y.sender === "system" && y.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : y.sender === "system" && y.issue?.code && Gn.has(y.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
242
- }, "onMessage"), g = /* @__PURE__ */ d((y) => {
242
+ m.sender === "system" && m.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : m.sender === "system" && m.issue?.code && Gn.has(m.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
243
+ }, "onMessage"), g = /* @__PURE__ */ p((m) => {
243
244
  if (!o && !h) {
244
- m("empty_stream — assistant returned no content");
245
+ x("empty_stream — assistant returned no content");
245
246
  return;
246
247
  }
247
- const A = this.sharedMessages.value, C = A[A.length - 1];
248
- if (C?.id === l && C.sender === "agent" && C.text) {
249
- let z = C.text;
250
- for (const Z of Vs)
251
- Z.pattern.test(z) && (console.debug(`[chat] filtered directive: ${Z.label}`), z = z.replace(Z.pattern, "").trim(), Z.pattern.lastIndex = 0);
252
- z ? z !== C.text && (C.text = z, this.sharedMessages.value = [...A]) : this.sharedMessages.value = A.slice(0, -1);
253
- }
254
- y && (this.conversationId = y), this.updateState(this.textState, { isThinking: !1 });
255
- }, "onDone"), m = /* @__PURE__ */ d((y) => {
256
- const A = this.sharedMessages.value, C = A[A.length - 1];
257
- if (C?.id === l && !C.text && (this.sharedMessages.value = A.slice(0, -1)), typeof y == "object" && y.code && y.error) {
258
- const { bucket: ee, actionUrl: H, actionLabel: ae, help: B } = y;
259
- if (ee !== void 0 || Xs.has(y.code)) {
260
- const ye = ee ?? (bs.has(y.code) ? "account" : "error"), Te = {
261
- code: y.code,
262
- bucket: ye,
263
- ...ae ? { actionLabel: ae } : {},
264
- ...H ? { actionUrl: H } : {},
265
- ...B ? { help: B } : {}
248
+ const _ = this.sharedMessages.value, L = _[_.length - 1];
249
+ if (L?.id === l && L.sender === "agent" && L.text) {
250
+ let P = L.text;
251
+ for (const G of Vs)
252
+ G.pattern.test(P) && (console.debug(`[chat] filtered directive: ${G.label}`), P = P.replace(G.pattern, "").trim(), G.pattern.lastIndex = 0);
253
+ P ? P !== L.text && (L.text = P, this.sharedMessages.value = [..._]) : this.sharedMessages.value = _.slice(0, -1);
254
+ }
255
+ m && (this.conversationId = m), this.updateState(this.textState, { isThinking: !1, workingDescription: void 0 });
256
+ }, "onDone"), x = /* @__PURE__ */ p((m) => {
257
+ this.updateState(this.textState, { workingDescription: void 0 });
258
+ const _ = this.sharedMessages.value, L = _[_.length - 1];
259
+ if (L?.id === l && !L.text && (this.sharedMessages.value = _.slice(0, -1)), typeof m == "object" && m.code && m.error) {
260
+ const { bucket: q, actionUrl: K, actionLabel: U, help: Q } = m;
261
+ if (q !== void 0 || Xs.has(m.code)) {
262
+ const Se = q ?? (bs.has(m.code) ? "account" : "error"), Ce = {
263
+ code: m.code,
264
+ bucket: Se,
265
+ ...U ? { actionLabel: U } : {},
266
+ ...K ? { actionUrl: K } : {},
267
+ ...Q ? { help: Q } : {}
266
268
  };
267
- this.addMessage(y.error, "system", void 0, Te), ye === "account" ? this.updateState(this.textState, { isThinking: !1, sendBlockedReason: "account" }) : Gn.has(y.code) ? this.updateState(this.textState, { isThinking: !1, sendBlockedReason: "agent_deleted" }) : this.updateState(this.textState, { isThinking: !1 });
269
+ this.addMessage(m.error, "system", void 0, Ce), Se === "account" ? this.updateState(this.textState, { isThinking: !1, sendBlockedReason: "account" }) : Gn.has(m.code) ? this.updateState(this.textState, { isThinking: !1, sendBlockedReason: "agent_deleted" }) : this.updateState(this.textState, { isThinking: !1 });
268
270
  } else
269
- this.handleError(new Error(y.error));
271
+ this.handleError(new Error(m.error));
270
272
  return;
271
273
  }
272
- const z = typeof y == "string" ? y : y.error, Z = this.mapChatError(z);
273
- this.isTransientError(z) ? (this.logger.warn("Chat turn failed (transient):", { raw: z, friendly: Z }), this.addMessage(Z, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(Z), z);
274
- }, "onError"), w = /* @__PURE__ */ d((y) => {
275
- this.addMessage(y, "system");
276
- }, "onStatus");
274
+ const P = typeof m == "string" ? m : m.error, G = this.mapChatError(P);
275
+ this.isTransientError(P) ? (this.logger.warn("Chat turn failed (transient):", { raw: P, friendly: G }), this.addMessage(G, "system"), this.updateState(this.textState, { isThinking: !1 })) : this.handleError(new Error(G), P);
276
+ }, "onError"), v = /* @__PURE__ */ p((m) => {
277
+ const _ = m.trim();
278
+ this.updateState(this.textState, { workingDescription: _ || void 0 });
279
+ }, "onStatus"), B = /* @__PURE__ */ p(() => {
280
+ this.updateState(this.textState, { workingDescription: void 0 });
281
+ }, "onWorkingEnd");
277
282
  try {
278
- const y = i ? i({
283
+ const m = i ? i({
279
284
  message: e,
280
285
  attachments: n,
281
286
  conversationId: this.conversationId,
282
287
  history: this.buildHistory(),
283
288
  onDelta: c,
284
- onMessage: k,
289
+ onMessage: y,
285
290
  onDone: g,
286
- onError: m,
287
- onStatus: w
291
+ onError: x,
292
+ onStatus: v,
293
+ onWorkingEnd: B
288
294
  }) : s.chat.chatStreamPublic({
289
295
  handle: this._agent.handle.value,
290
296
  message: e,
@@ -292,17 +298,18 @@ Current User:
292
298
  anonymousId: s.user.generateAnonId(),
293
299
  context: this.getDynamicSettings().context || void 0,
294
300
  onDelta: c,
295
- onMessage: k,
301
+ onMessage: y,
296
302
  onDone: g,
297
- onError: m,
298
- onStatus: w
303
+ onError: x,
304
+ onStatus: v,
305
+ onWorkingEnd: B
299
306
  });
300
307
  await Promise.race([
301
- y,
302
- new Promise((A, C) => setTimeout(() => C(new Error("timed out")), Zs))
308
+ m,
309
+ new Promise((_, L) => setTimeout(() => L(new Error("timed out")), Zs))
303
310
  ]);
304
- } catch (y) {
305
- m(y.message || "Something went wrong");
311
+ } catch (m) {
312
+ x(m.message || "Something went wrong");
306
313
  }
307
314
  }
308
315
  buildHistory() {
@@ -322,30 +329,30 @@ Current User:
322
329
  await this.endConversation();
323
330
  }
324
331
  };
325
- d(xn, "AgentChatController");
332
+ p(xn, "AgentChatController");
326
333
  let Wn = xn;
327
334
  function qn(a) {
328
335
  return a ? typeof a == "string" ? a : a.src || "" : "";
329
336
  }
330
- d(qn, "getImageSrc");
331
- function oa(a) {
337
+ p(qn, "getImageSrc");
338
+ function ua(a) {
332
339
  return qn(a.cover) || qn(a.avatar) || ms(a.name);
333
340
  }
334
- d(oa, "getAgentAvatarUrl");
341
+ p(ua, "getAgentAvatarUrl");
335
342
  function Yn(a) {
336
343
  const t = a.target;
337
344
  t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = ms());
338
345
  }
339
- d(Yn, "handleImageError");
340
- function ca(a) {
346
+ p(Yn, "handleImageError");
347
+ function ha(a) {
341
348
  const { template: t, agent: e } = a;
342
349
  return t.replace(/{name}/g, e.name || "Assistant").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
343
350
  }
344
- d(ca, "parseButtonTemplate");
351
+ p(ha, "parseButtonTemplate");
345
352
  const Ks = {
346
353
  key: 0,
347
354
  class: "absolute inset-0 flex items-center justify-center"
348
- }, ua = /* @__PURE__ */ ve({
355
+ }, da = /* @__PURE__ */ Te({
349
356
  __name: "ElAgentButton",
350
357
  props: {
351
358
  theme: { default: "primary" },
@@ -355,42 +362,42 @@ const Ks = {
355
362
  iconAfter: {}
356
363
  },
357
364
  setup(a) {
358
- const t = G(() => ({
365
+ const t = j(() => ({
359
366
  primary: "bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",
360
367
  green: "bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",
361
368
  red: "bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",
362
369
  default: "bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20"
363
- })[a.theme]), e = G(() => ({
370
+ })[a.theme]), e = j(() => ({
364
371
  sm: "px-4 py-2 text-sm",
365
372
  md: "px-6 py-3 text-base",
366
373
  lg: "px-8 py-4 text-base"
367
- })[a.size]), n = G(() => ({
374
+ })[a.size]), n = j(() => ({
368
375
  sm: "size-4",
369
376
  md: "size-4",
370
377
  lg: "size-5"
371
378
  })[a.size]);
372
379
  return (i, s) => (T(), S("button", {
373
- class: _(["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]])
380
+ 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]])
374
381
  }, [
375
382
  a.loading ? (T(), S("div", Ks, [...s[0] || (s[0] = [
376
- v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
377
- ])])) : V("", !0),
378
- v("span", {
379
- class: _(["flex items-center gap-2 transition-opacity duration-200", a.loading ? "opacity-0" : "opacity-100"])
383
+ w("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
384
+ ])])) : Z("", !0),
385
+ w("span", {
386
+ class: A(["flex items-center gap-2 transition-opacity duration-200", a.loading ? "opacity-0" : "opacity-100"])
380
387
  }, [
381
388
  a.icon ? (T(), S("i", {
382
389
  key: 0,
383
- class: _([a.icon, n.value])
384
- }, null, 2)) : V("", !0),
390
+ class: A([a.icon, n.value])
391
+ }, null, 2)) : Z("", !0),
385
392
  on(i.$slots, "default"),
386
393
  a.iconAfter ? (T(), S("i", {
387
394
  key: 1,
388
- class: _([a.iconAfter, n.value])
389
- }, null, 2)) : V("", !0)
395
+ class: A([a.iconAfter, n.value])
396
+ }, null, 2)) : Z("", !0)
390
397
  ], 2)
391
398
  ], 2));
392
399
  }
393
- }), Qs = ["value"], ha = /* @__PURE__ */ ve({
400
+ }), Qs = ["value"], pa = /* @__PURE__ */ Te({
394
401
  __name: "AgentInputEmail",
395
402
  props: {
396
403
  modelValue: { default: "" }
@@ -413,7 +420,7 @@ const Ks = {
413
420
  onInput: i[0] || (i[0] = (s) => e("update:modelValue", s.target.value))
414
421
  }, null, 40, Qs));
415
422
  }
416
- }), Js = ["placeholder", "value"], da = /* @__PURE__ */ ve({
423
+ }), Js = ["placeholder", "value"], fa = /* @__PURE__ */ Te({
417
424
  __name: "AgentInputOneTimeCode",
418
425
  props: {
419
426
  modelValue: {},
@@ -422,15 +429,15 @@ const Ks = {
422
429
  },
423
430
  emits: ["update:modelValue", "autoSubmit"],
424
431
  setup(a, { emit: t }) {
425
- const e = a, n = t, i = ie(null), s = G(() => "0".repeat(e.length));
426
- Nt(() => {
432
+ const e = a, n = t, i = ie(null), s = j(() => "0".repeat(e.length));
433
+ Lt(() => {
427
434
  e.focusFirst && !("ontouchstart" in window) && i.value?.focus();
428
435
  });
429
436
  function l(o) {
430
437
  const h = o.target.value.replace(/\D/g, "").slice(0, e.length);
431
438
  n("update:modelValue", h), h.length === e.length && n("autoSubmit", h);
432
439
  }
433
- return d(l, "onInput"), (o, h) => (T(), S("input", {
440
+ return p(l, "onInput"), (o, h) => (T(), S("input", {
434
441
  ref_key: "input",
435
442
  ref: i,
436
443
  name: "one-time-code",
@@ -451,7 +458,7 @@ const Ks = {
451
458
  }), ei = { class: "relative flex-shrink-0" }, ti = ["src", "alt"], ni = { class: "absolute top-1 right-1" }, si = {
452
459
  key: 1,
453
460
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
454
- }, ii = { class: "min-w-0" }, ri = /* @__PURE__ */ ve({
461
+ }, ii = { class: "min-w-0" }, ri = /* @__PURE__ */ Te({
455
462
  __name: "ElModeHeader",
456
463
  props: {
457
464
  agent: {},
@@ -461,15 +468,15 @@ const Ks = {
461
468
  },
462
469
  setup(a) {
463
470
  return (t, e) => (T(), S("div", {
464
- class: _(["flex gap-4", [
471
+ class: A(["flex gap-4", [
465
472
  a.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
466
473
  ]])
467
474
  }, [
468
- v("div", ei, [
469
- v("div", {
470
- class: _(["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"])
475
+ w("div", ei, [
476
+ w("div", {
477
+ 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"])
471
478
  }, [
472
- v("img", {
479
+ w("img", {
473
480
  src: a.agent.avatarUrl.value,
474
481
  alt: a.agent.displayName.value,
475
482
  class: "w-full h-full object-cover",
@@ -477,29 +484,29 @@ const Ks = {
477
484
  (...n) => sn(Yn) && sn(Yn)(...n))
478
485
  }, null, 40, ti)
479
486
  ], 2),
480
- v("div", ni, [
481
- a.isOnline ? (T(), S(Ze, { key: 0 }, [
482
- e[1] || (e[1] = v("div", {
487
+ w("div", ni, [
488
+ a.isOnline ? (T(), S(Xe, { key: 0 }, [
489
+ e[1] || (e[1] = w("div", {
483
490
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
484
491
  style: { "animation-duration": "3s" }
485
492
  }, null, -1)),
486
- e[2] || (e[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
493
+ e[2] || (e[2] = w("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
487
494
  ], 64)) : (T(), S("div", si))
488
495
  ])
489
496
  ]),
490
- v("div", ii, [
491
- v("h1", {
492
- class: _(["font-light text-white mb-1 truncate", [
497
+ w("div", ii, [
498
+ w("h1", {
499
+ class: A(["font-light text-white mb-1 truncate", [
493
500
  a.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
494
501
  a.layout === "horizontal" ? "text-white/95" : ""
495
502
  ]])
496
- }, he(a.agent.displayName.value), 3),
497
- v("p", {
498
- class: _(["font-light line-clamp-1", [
503
+ }, le(a.agent.displayName.value), 3),
504
+ w("p", {
505
+ class: A(["font-light line-clamp-1", [
499
506
  a.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
500
507
  a.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
501
508
  ]])
502
- }, he(a.layout === "horizontal" ? a.agent.title.value || "Assistant" : a.agent.title.value), 3)
509
+ }, le(a.layout === "horizontal" ? a.agent.title.value || "Assistant" : a.agent.title.value), 3)
503
510
  ])
504
511
  ], 2));
505
512
  }
@@ -509,19 +516,19 @@ function Vn(a, t) {
509
516
  for (var e = 0, n = Array(t); e < t; e++) n[e] = a[e];
510
517
  return n;
511
518
  }
512
- d(Vn, "_arrayLikeToArray");
519
+ p(Vn, "_arrayLikeToArray");
513
520
  function ai(a) {
514
521
  if (Array.isArray(a)) return a;
515
522
  }
516
- d(ai, "_arrayWithHoles");
523
+ p(ai, "_arrayWithHoles");
517
524
  function li(a, t) {
518
525
  var e = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
519
526
  if (e != null) {
520
527
  var n, i, s, l, o = [], h = !0, c = !1;
521
528
  try {
522
529
  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) ;
523
- } catch (k) {
524
- c = !0, i = k;
530
+ } catch (y) {
531
+ c = !0, i = y;
525
532
  } finally {
526
533
  try {
527
534
  if (!h && e.return != null && (l = e.return(), Object(l) !== l)) return;
@@ -532,16 +539,16 @@ function li(a, t) {
532
539
  return o;
533
540
  }
534
541
  }
535
- d(li, "_iterableToArrayLimit");
542
+ p(li, "_iterableToArrayLimit");
536
543
  function oi() {
537
544
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
538
545
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
539
546
  }
540
- d(oi, "_nonIterableRest");
547
+ p(oi, "_nonIterableRest");
541
548
  function ci(a, t) {
542
549
  return ai(a) || li(a, t) || ui(a, t) || oi();
543
550
  }
544
- d(ci, "_slicedToArray");
551
+ p(ci, "_slicedToArray");
545
552
  function ui(a, t) {
546
553
  if (a) {
547
554
  if (typeof a == "string") return Vn(a, t);
@@ -549,27 +556,27 @@ function ui(a, t) {
549
556
  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) ? Vn(a, t) : void 0;
550
557
  }
551
558
  }
552
- d(ui, "_unsupportedIterableToArray");
559
+ p(ui, "_unsupportedIterableToArray");
553
560
  const xs = Object.entries, Zn = Object.setPrototypeOf, hi = Object.isFrozen, di = Object.getPrototypeOf, pi = Object.getOwnPropertyDescriptor;
554
- let re = Object.freeze, oe = Object.seal, Xe = Object.create, ks = typeof Reflect < "u" && Reflect, rn = ks.apply, an = ks.construct;
555
- re || (re = /* @__PURE__ */ d(function(t) {
561
+ let re = Object.freeze, oe = Object.seal, Ke = Object.create, ks = typeof Reflect < "u" && Reflect, rn = ks.apply, an = ks.construct;
562
+ re || (re = /* @__PURE__ */ p(function(t) {
556
563
  return t;
557
564
  }, "freeze"));
558
- oe || (oe = /* @__PURE__ */ d(function(t) {
565
+ oe || (oe = /* @__PURE__ */ p(function(t) {
559
566
  return t;
560
567
  }, "seal"));
561
- rn || (rn = /* @__PURE__ */ d(function(t, e) {
568
+ rn || (rn = /* @__PURE__ */ p(function(t, e) {
562
569
  for (var n = arguments.length, i = new Array(n > 2 ? n - 2 : 0), s = 2; s < n; s++)
563
570
  i[s - 2] = arguments[s];
564
571
  return t.apply(e, i);
565
572
  }, "apply"));
566
- an || (an = /* @__PURE__ */ d(function(t) {
573
+ an || (an = /* @__PURE__ */ p(function(t) {
567
574
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
568
575
  n[i - 1] = arguments[i];
569
576
  return new t(...n);
570
577
  }, "construct"));
571
- const We = Y(Array.prototype.forEach), fi = Y(Array.prototype.lastIndexOf), Xn = Y(Array.prototype.pop), qe = Y(Array.prototype.push), gi = Y(Array.prototype.splice), se = Array.isArray, ht = Y(String.prototype.toLowerCase), Qt = Y(String.prototype.toString), Kn = Y(String.prototype.match), Ye = Y(String.prototype.replace), Qn = Y(String.prototype.indexOf), mi = Y(String.prototype.trim), bi = Y(Number.prototype.toString), xi = Y(Boolean.prototype.toString), Jn = typeof BigInt > "u" ? null : Y(BigInt.prototype.toString), es = typeof Symbol > "u" ? null : Y(Symbol.prototype.toString), j = Y(Object.prototype.hasOwnProperty), ot = Y(Object.prototype.toString), J = Y(RegExp.prototype.test), ct = ki(TypeError);
572
- function Y(a) {
578
+ const qe = X(Array.prototype.forEach), fi = X(Array.prototype.lastIndexOf), Xn = X(Array.prototype.pop), Ye = X(Array.prototype.push), gi = X(Array.prototype.splice), se = Array.isArray, dt = X(String.prototype.toLowerCase), Qt = X(String.prototype.toString), Kn = X(String.prototype.match), Ve = X(String.prototype.replace), Qn = X(String.prototype.indexOf), mi = X(String.prototype.trim), bi = X(Number.prototype.toString), xi = X(Boolean.prototype.toString), Jn = typeof BigInt > "u" ? null : X(BigInt.prototype.toString), es = typeof Symbol > "u" ? null : X(Symbol.prototype.toString), W = X(Object.prototype.hasOwnProperty), ct = X(Object.prototype.toString), ee = X(RegExp.prototype.test), ut = ki(TypeError);
579
+ function X(a) {
573
580
  return function(t) {
574
581
  t instanceof RegExp && (t.lastIndex = 0);
575
582
  for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
@@ -577,7 +584,7 @@ function Y(a) {
577
584
  return rn(a, t, n);
578
585
  };
579
586
  }
580
- d(Y, "unapply");
587
+ p(X, "unapply");
581
588
  function ki(a) {
582
589
  return function() {
583
590
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
@@ -585,9 +592,9 @@ function ki(a) {
585
592
  return an(a, e);
586
593
  };
587
594
  }
588
- d(ki, "unconstruct");
589
- function R(a, t) {
590
- let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ht;
595
+ p(ki, "unconstruct");
596
+ function E(a, t) {
597
+ let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : dt;
591
598
  if (Zn && Zn(a, null), !se(t))
592
599
  return a;
593
600
  let n = t.length;
@@ -601,23 +608,23 @@ function R(a, t) {
601
608
  }
602
609
  return a;
603
610
  }
604
- d(R, "addToSet");
611
+ p(E, "addToSet");
605
612
  function yi(a) {
606
613
  for (let t = 0; t < a.length; t++)
607
- j(a, t) || (a[t] = null);
614
+ W(a, t) || (a[t] = null);
608
615
  return a;
609
616
  }
610
- d(yi, "cleanArray");
617
+ p(yi, "cleanArray");
611
618
  function te(a) {
612
- const t = Xe(null);
619
+ const t = Ke(null);
613
620
  for (const n of xs(a)) {
614
621
  var e = ci(n, 2);
615
622
  const i = e[0], s = e[1];
616
- j(a, i) && (se(s) ? t[i] = yi(s) : s && typeof s == "object" && s.constructor === Object ? t[i] = te(s) : t[i] = s);
623
+ W(a, i) && (se(s) ? t[i] = yi(s) : s && typeof s == "object" && s.constructor === Object ? t[i] = te(s) : t[i] = s);
617
624
  }
618
625
  return t;
619
626
  }
620
- d(te, "clone");
627
+ p(te, "clone");
621
628
  function wi(a) {
622
629
  switch (typeof a) {
623
630
  case "string":
@@ -631,55 +638,55 @@ function wi(a) {
631
638
  case "symbol":
632
639
  return es ? es(a) : "Symbol()";
633
640
  case "undefined":
634
- return ot(a);
641
+ return ct(a);
635
642
  case "function":
636
643
  case "object": {
637
644
  if (a === null)
638
- return ot(a);
639
- const t = a, e = xe(t, "toString");
645
+ return ct(a);
646
+ const t = a, e = ke(t, "toString");
640
647
  if (typeof e == "function") {
641
648
  const n = e(t);
642
- return typeof n == "string" ? n : ot(n);
649
+ return typeof n == "string" ? n : ct(n);
643
650
  }
644
- return ot(a);
651
+ return ct(a);
645
652
  }
646
653
  default:
647
- return ot(a);
654
+ return ct(a);
648
655
  }
649
656
  }
650
- d(wi, "stringifyValue");
651
- function xe(a, t) {
657
+ p(wi, "stringifyValue");
658
+ function ke(a, t) {
652
659
  for (; a !== null; ) {
653
660
  const n = pi(a, t);
654
661
  if (n) {
655
662
  if (n.get)
656
- return Y(n.get);
663
+ return X(n.get);
657
664
  if (typeof n.value == "function")
658
- return Y(n.value);
665
+ return X(n.value);
659
666
  }
660
667
  a = di(a);
661
668
  }
662
669
  function e() {
663
670
  return null;
664
671
  }
665
- return d(e, "fallbackValue"), e;
672
+ return p(e, "fallbackValue"), e;
666
673
  }
667
- d(xe, "lookupGetter");
674
+ p(ke, "lookupGetter");
668
675
  function vi(a) {
669
676
  try {
670
- return J(a, ""), !0;
677
+ return ee(a, ""), !0;
671
678
  } catch {
672
679
  return !1;
673
680
  }
674
681
  }
675
- d(vi, "isRegex");
676
- const ts = re(["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"]), Jt = re(["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"]), en = re(["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"]), Ti = re(["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"]), tn = re(["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"]), Si = re(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ns = re(["#text"]), ss = re(["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"]), nn = re(["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"]), is = re(["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"]), _t = re(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ai = oe(/{{[\w\W]*|^[\w\W]*}}/g), Ei = oe(/<%[\w\W]*|^[\w\W]*%>/g), _i = oe(/\${[\w\W]*/g), Ri = oe(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ii = oe(/^aria-[\-\w]+$/), rs = oe(
682
+ p(vi, "isRegex");
683
+ const ts = re(["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"]), Jt = re(["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"]), en = re(["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"]), Ti = re(["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"]), tn = re(["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"]), Si = re(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ns = re(["#text"]), ss = re(["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"]), nn = re(["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"]), is = re(["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"]), Et = re(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Ai = oe(/{{[\w\W]*|^[\w\W]*}}/g), Ei = oe(/<%[\w\W]*|^[\w\W]*%>/g), _i = oe(/\${[\w\W]*/g), Ri = oe(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ii = oe(/^aria-[\-\w]+$/), rs = oe(
677
684
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
678
685
  // eslint-disable-line no-useless-escape
679
- ), Ci = oe(/^(?:\w+script|data):/i), Di = oe(
686
+ ), Di = oe(/^(?:\w+script|data):/i), Ci = oe(
680
687
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
681
688
  // eslint-disable-line no-control-regex
682
- ), Oi = oe(/^html$/i), Mi = oe(/^[a-z][.\w]*(-[.\w]+)+$/i), be = {
689
+ ), Oi = oe(/^html$/i), Mi = oe(/^[a-z][.\w]*(-[.\w]+)+$/i), xe = {
683
690
  element: 1,
684
691
  attribute: 2,
685
692
  text: 3,
@@ -695,9 +702,9 @@ const ts = re(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
695
702
  documentFragment: 11,
696
703
  notation: 12
697
704
  // Deprecated
698
- }, Li = /* @__PURE__ */ d(function() {
705
+ }, Li = /* @__PURE__ */ p(function() {
699
706
  return typeof window > "u" ? null : window;
700
- }, "getGlobal"), Ni = /* @__PURE__ */ d(function(t, e) {
707
+ }, "getGlobal"), Ni = /* @__PURE__ */ p(function(t, e) {
701
708
  if (typeof t != "object" || typeof t.createPolicy != "function")
702
709
  return null;
703
710
  let n = null;
@@ -716,7 +723,7 @@ const ts = re(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
716
723
  } catch {
717
724
  return console.warn("TrustedTypes policy " + s + " could not be created."), null;
718
725
  }
719
- }, "_createTrustedTypesPolicy"), as = /* @__PURE__ */ d(function() {
726
+ }, "_createTrustedTypesPolicy"), as = /* @__PURE__ */ p(function() {
720
727
  return {
721
728
  afterSanitizeAttributes: [],
722
729
  afterSanitizeElements: [],
@@ -731,29 +738,29 @@ const ts = re(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
731
738
  }, "_createHooksMap");
732
739
  function ys() {
733
740
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Li();
734
- const t = /* @__PURE__ */ d((x) => ys(x), "DOMPurify");
735
- if (t.version = "3.4.7", t.removed = [], !a || !a.document || a.document.nodeType !== be.document || !a.Element)
741
+ const t = /* @__PURE__ */ p((k) => ys(k), "DOMPurify");
742
+ if (t.version = "3.4.7", t.removed = [], !a || !a.document || a.document.nodeType !== xe.document || !a.Element)
736
743
  return t.isSupported = !1, t;
737
744
  let e = a.document;
738
745
  const n = e, i = n.currentScript;
739
746
  a.DocumentFragment;
740
747
  const s = a.HTMLTemplateElement, l = a.Node, o = a.Element, h = a.NodeFilter, c = a.NamedNodeMap;
741
748
  c === void 0 && (a.NamedNodeMap || a.MozNamedAttrMap), a.HTMLFormElement;
742
- const k = a.DOMParser, g = a.trustedTypes, m = o.prototype, w = xe(m, "cloneNode"), y = xe(m, "remove"), A = xe(m, "nextSibling"), C = xe(m, "childNodes"), z = xe(m, "parentNode"), Z = xe(m, "shadowRoot"), ee = xe(m, "attributes"), H = l && l.prototype ? xe(l.prototype, "nodeType") : null, ae = l && l.prototype ? xe(l.prototype, "nodeName") : null;
749
+ const y = a.DOMParser, g = a.trustedTypes, x = o.prototype, v = ke(x, "cloneNode"), B = ke(x, "remove"), m = ke(x, "nextSibling"), _ = ke(x, "childNodes"), L = ke(x, "parentNode"), P = ke(x, "shadowRoot"), G = ke(x, "attributes"), q = l && l.prototype ? ke(l.prototype, "nodeType") : null, K = l && l.prototype ? ke(l.prototype, "nodeName") : null;
743
750
  if (typeof s == "function") {
744
- const x = e.createElement("template");
745
- x.content && x.content.ownerDocument && (e = x.content.ownerDocument);
746
- }
747
- let B, Q = "";
748
- const ye = e, Te = ye.implementation, M = ye.createNodeIterator, ft = ye.createDocumentFragment, nt = ye.getElementsByTagName, gt = n.importNode;
749
- let q = as();
750
- t.isSupported = typeof xs == "function" && typeof z == "function" && Te && Te.createHTMLDocument !== void 0;
751
- const Ne = Ai, ze = Ei, $e = _i, Pt = Ri, mt = Ii, bt = Ci, I = Di, b = Mi;
752
- let p = rs, E = null;
753
- const X = R({}, [...ts, ...Jt, ...en, ...tn, ...ns]);
754
- let P = null;
755
- const Pe = R({}, [...ss, ...nn, ...is, ..._t]);
756
- let F = Object.seal(Xe(null, {
751
+ const k = e.createElement("template");
752
+ k.content && k.content.ownerDocument && (e = k.content.ownerDocument);
753
+ }
754
+ let U, Q = "";
755
+ const pe = e, Se = pe.implementation, Ce = pe.createNodeIterator, O = pe.createDocumentFragment, gt = pe.getElementsByTagName, st = n.importNode;
756
+ let Y = as();
757
+ t.isSupported = typeof xs == "function" && typeof L == "function" && Se && Se.createHTMLDocument !== void 0;
758
+ const $e = Ai, Pe = Ei, Be = _i, $t = Ri, Pt = Ii, mt = Di, it = Ci, R = Mi;
759
+ let b = rs, d = null;
760
+ const $ = E({}, [...ts, ...Jt, ...en, ...tn, ...ns]);
761
+ let C = null;
762
+ const fe = E({}, [...ss, ...nn, ...is, ...Et]);
763
+ let H = Object.seal(Ke(null, {
757
764
  tagNameCheck: {
758
765
  writable: !0,
759
766
  configurable: !1,
@@ -772,8 +779,8 @@ function ys() {
772
779
  enumerable: !0,
773
780
  value: !1
774
781
  }
775
- })), st = null, xt = null;
776
- const Se = Object.seal(Xe(null, {
782
+ })), we = null, bt = null;
783
+ const Ae = Object.seal(Ke(null, {
777
784
  tagCheck: {
778
785
  writable: !0,
779
786
  configurable: !1,
@@ -787,70 +794,70 @@ function ys() {
787
794
  value: null
788
795
  }
789
796
  }));
790
- let kn = !0, Bt = !0, yn = !1, wn = !0, Ae = !1, it = !0, Ce = !1, Ft = !1, Ut = !1, Be = !1, kt = !1, yt = !1, vn = !0, Tn = !1;
797
+ let kn = !0, Bt = !0, yn = !1, wn = !0, Ee = !1, rt = !0, Oe = !1, Ft = !1, Ut = !1, Fe = !1, xt = !1, kt = !1, vn = !0, Tn = !1;
791
798
  const Sn = "user-content-";
792
- let Ht = !0, rt = !1, Fe = {}, fe = null;
793
- const jt = R({}, ["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"]);
799
+ let Ht = !0, at = !1, Ue = {}, ge = null;
800
+ const jt = E({}, ["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"]);
794
801
  let An = null;
795
- const En = R({}, ["audio", "video", "img", "source", "image", "track"]);
802
+ const En = E({}, ["audio", "video", "img", "source", "image", "track"]);
796
803
  let Gt = null;
797
- const _n = R({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), wt = "http://www.w3.org/1998/Math/MathML", vt = "http://www.w3.org/2000/svg", ge = "http://www.w3.org/1999/xhtml";
798
- let Ue = ge, Wt = !1, qt = null;
799
- const Ds = R({}, [wt, vt, ge], Qt);
800
- let Yt = R({}, ["mi", "mo", "mn", "ms", "mtext"]), Vt = R({}, ["annotation-xml"]);
801
- const Os = R({}, ["title", "style", "font", "a", "script"]);
802
- let at = null;
804
+ const _n = E({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), yt = "http://www.w3.org/1998/Math/MathML", wt = "http://www.w3.org/2000/svg", me = "http://www.w3.org/1999/xhtml";
805
+ let He = me, Wt = !1, qt = null;
806
+ const Cs = E({}, [yt, wt, me], Qt);
807
+ let Yt = E({}, ["mi", "mo", "mn", "ms", "mtext"]), Vt = E({}, ["annotation-xml"]);
808
+ const Os = E({}, ["title", "style", "font", "a", "script"]);
809
+ let lt = null;
803
810
  const Ms = ["application/xhtml+xml", "text/html"], Ls = "text/html";
804
- let W = null, He = null;
805
- const Ns = e.createElement("form"), Rn = /* @__PURE__ */ d(function(r) {
811
+ let V = null, je = null;
812
+ const Ns = e.createElement("form"), Rn = /* @__PURE__ */ p(function(r) {
806
813
  return r instanceof RegExp || r instanceof Function;
807
- }, "isRegexOrFunction"), Zt = /* @__PURE__ */ d(function() {
814
+ }, "isRegexOrFunction"), Zt = /* @__PURE__ */ p(function() {
808
815
  let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
809
- if (He && He === r)
816
+ if (je && je === r)
810
817
  return;
811
- (!r || typeof r != "object") && (r = {}), r = te(r), at = // eslint-disable-next-line unicorn/prefer-includes
812
- Ms.indexOf(r.PARSER_MEDIA_TYPE) === -1 ? Ls : r.PARSER_MEDIA_TYPE, W = at === "application/xhtml+xml" ? Qt : ht, E = j(r, "ALLOWED_TAGS") && se(r.ALLOWED_TAGS) ? R({}, r.ALLOWED_TAGS, W) : X, P = j(r, "ALLOWED_ATTR") && se(r.ALLOWED_ATTR) ? R({}, r.ALLOWED_ATTR, W) : Pe, qt = j(r, "ALLOWED_NAMESPACES") && se(r.ALLOWED_NAMESPACES) ? R({}, r.ALLOWED_NAMESPACES, Qt) : Ds, Gt = j(r, "ADD_URI_SAFE_ATTR") && se(r.ADD_URI_SAFE_ATTR) ? R(te(_n), r.ADD_URI_SAFE_ATTR, W) : _n, An = j(r, "ADD_DATA_URI_TAGS") && se(r.ADD_DATA_URI_TAGS) ? R(te(En), r.ADD_DATA_URI_TAGS, W) : En, fe = j(r, "FORBID_CONTENTS") && se(r.FORBID_CONTENTS) ? R({}, r.FORBID_CONTENTS, W) : jt, st = j(r, "FORBID_TAGS") && se(r.FORBID_TAGS) ? R({}, r.FORBID_TAGS, W) : te({}), xt = j(r, "FORBID_ATTR") && se(r.FORBID_ATTR) ? R({}, r.FORBID_ATTR, W) : te({}), Fe = j(r, "USE_PROFILES") ? r.USE_PROFILES && typeof r.USE_PROFILES == "object" ? te(r.USE_PROFILES) : r.USE_PROFILES : !1, kn = r.ALLOW_ARIA_ATTR !== !1, Bt = r.ALLOW_DATA_ATTR !== !1, yn = r.ALLOW_UNKNOWN_PROTOCOLS || !1, wn = r.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ae = r.SAFE_FOR_TEMPLATES || !1, it = r.SAFE_FOR_XML !== !1, Ce = r.WHOLE_DOCUMENT || !1, Be = r.RETURN_DOM || !1, kt = r.RETURN_DOM_FRAGMENT || !1, yt = r.RETURN_TRUSTED_TYPE || !1, Ut = r.FORCE_BODY || !1, vn = r.SANITIZE_DOM !== !1, Tn = r.SANITIZE_NAMED_PROPS || !1, Ht = r.KEEP_CONTENT !== !1, rt = r.IN_PLACE || !1, p = vi(r.ALLOWED_URI_REGEXP) ? r.ALLOWED_URI_REGEXP : rs, Ue = typeof r.NAMESPACE == "string" ? r.NAMESPACE : ge, Yt = j(r, "MATHML_TEXT_INTEGRATION_POINTS") && r.MATHML_TEXT_INTEGRATION_POINTS && typeof r.MATHML_TEXT_INTEGRATION_POINTS == "object" ? te(r.MATHML_TEXT_INTEGRATION_POINTS) : R({}, ["mi", "mo", "mn", "ms", "mtext"]), Vt = j(r, "HTML_INTEGRATION_POINTS") && r.HTML_INTEGRATION_POINTS && typeof r.HTML_INTEGRATION_POINTS == "object" ? te(r.HTML_INTEGRATION_POINTS) : R({}, ["annotation-xml"]);
813
- const u = j(r, "CUSTOM_ELEMENT_HANDLING") && r.CUSTOM_ELEMENT_HANDLING && typeof r.CUSTOM_ELEMENT_HANDLING == "object" ? te(r.CUSTOM_ELEMENT_HANDLING) : Xe(null);
814
- if (F = Xe(null), j(u, "tagNameCheck") && Rn(u.tagNameCheck) && (F.tagNameCheck = u.tagNameCheck), j(u, "attributeNameCheck") && Rn(u.attributeNameCheck) && (F.attributeNameCheck = u.attributeNameCheck), j(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (F.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), Ae && (Bt = !1), kt && (Be = !0), Fe && (E = R({}, ns), P = Xe(null), Fe.html === !0 && (R(E, ts), R(P, ss)), Fe.svg === !0 && (R(E, Jt), R(P, nn), R(P, _t)), Fe.svgFilters === !0 && (R(E, en), R(P, nn), R(P, _t)), Fe.mathMl === !0 && (R(E, tn), R(P, is), R(P, _t))), Se.tagCheck = null, Se.attributeCheck = null, j(r, "ADD_TAGS") && (typeof r.ADD_TAGS == "function" ? Se.tagCheck = r.ADD_TAGS : se(r.ADD_TAGS) && (E === X && (E = te(E)), R(E, r.ADD_TAGS, W))), j(r, "ADD_ATTR") && (typeof r.ADD_ATTR == "function" ? Se.attributeCheck = r.ADD_ATTR : se(r.ADD_ATTR) && (P === Pe && (P = te(P)), R(P, r.ADD_ATTR, W))), j(r, "ADD_URI_SAFE_ATTR") && se(r.ADD_URI_SAFE_ATTR) && R(Gt, r.ADD_URI_SAFE_ATTR, W), j(r, "FORBID_CONTENTS") && se(r.FORBID_CONTENTS) && (fe === jt && (fe = te(fe)), R(fe, r.FORBID_CONTENTS, W)), j(r, "ADD_FORBID_CONTENTS") && se(r.ADD_FORBID_CONTENTS) && (fe === jt && (fe = te(fe)), R(fe, r.ADD_FORBID_CONTENTS, W)), Ht && (E["#text"] = !0), Ce && R(E, ["html", "head", "body"]), E.table && (R(E, ["tbody"]), delete st.tbody), r.TRUSTED_TYPES_POLICY) {
818
+ (!r || typeof r != "object") && (r = {}), r = te(r), lt = // eslint-disable-next-line unicorn/prefer-includes
819
+ Ms.indexOf(r.PARSER_MEDIA_TYPE) === -1 ? Ls : r.PARSER_MEDIA_TYPE, V = lt === "application/xhtml+xml" ? Qt : dt, d = W(r, "ALLOWED_TAGS") && se(r.ALLOWED_TAGS) ? E({}, r.ALLOWED_TAGS, V) : $, C = W(r, "ALLOWED_ATTR") && se(r.ALLOWED_ATTR) ? E({}, r.ALLOWED_ATTR, V) : fe, qt = W(r, "ALLOWED_NAMESPACES") && se(r.ALLOWED_NAMESPACES) ? E({}, r.ALLOWED_NAMESPACES, Qt) : Cs, Gt = W(r, "ADD_URI_SAFE_ATTR") && se(r.ADD_URI_SAFE_ATTR) ? E(te(_n), r.ADD_URI_SAFE_ATTR, V) : _n, An = W(r, "ADD_DATA_URI_TAGS") && se(r.ADD_DATA_URI_TAGS) ? E(te(En), r.ADD_DATA_URI_TAGS, V) : En, ge = W(r, "FORBID_CONTENTS") && se(r.FORBID_CONTENTS) ? E({}, r.FORBID_CONTENTS, V) : jt, we = W(r, "FORBID_TAGS") && se(r.FORBID_TAGS) ? E({}, r.FORBID_TAGS, V) : te({}), bt = W(r, "FORBID_ATTR") && se(r.FORBID_ATTR) ? E({}, r.FORBID_ATTR, V) : te({}), Ue = W(r, "USE_PROFILES") ? r.USE_PROFILES && typeof r.USE_PROFILES == "object" ? te(r.USE_PROFILES) : r.USE_PROFILES : !1, kn = r.ALLOW_ARIA_ATTR !== !1, Bt = r.ALLOW_DATA_ATTR !== !1, yn = r.ALLOW_UNKNOWN_PROTOCOLS || !1, wn = r.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ee = r.SAFE_FOR_TEMPLATES || !1, rt = r.SAFE_FOR_XML !== !1, Oe = r.WHOLE_DOCUMENT || !1, Fe = r.RETURN_DOM || !1, xt = r.RETURN_DOM_FRAGMENT || !1, kt = r.RETURN_TRUSTED_TYPE || !1, Ut = r.FORCE_BODY || !1, vn = r.SANITIZE_DOM !== !1, Tn = r.SANITIZE_NAMED_PROPS || !1, Ht = r.KEEP_CONTENT !== !1, at = r.IN_PLACE || !1, b = vi(r.ALLOWED_URI_REGEXP) ? r.ALLOWED_URI_REGEXP : rs, He = typeof r.NAMESPACE == "string" ? r.NAMESPACE : me, Yt = W(r, "MATHML_TEXT_INTEGRATION_POINTS") && r.MATHML_TEXT_INTEGRATION_POINTS && typeof r.MATHML_TEXT_INTEGRATION_POINTS == "object" ? te(r.MATHML_TEXT_INTEGRATION_POINTS) : E({}, ["mi", "mo", "mn", "ms", "mtext"]), Vt = W(r, "HTML_INTEGRATION_POINTS") && r.HTML_INTEGRATION_POINTS && typeof r.HTML_INTEGRATION_POINTS == "object" ? te(r.HTML_INTEGRATION_POINTS) : E({}, ["annotation-xml"]);
820
+ const u = W(r, "CUSTOM_ELEMENT_HANDLING") && r.CUSTOM_ELEMENT_HANDLING && typeof r.CUSTOM_ELEMENT_HANDLING == "object" ? te(r.CUSTOM_ELEMENT_HANDLING) : Ke(null);
821
+ if (H = Ke(null), W(u, "tagNameCheck") && Rn(u.tagNameCheck) && (H.tagNameCheck = u.tagNameCheck), W(u, "attributeNameCheck") && Rn(u.attributeNameCheck) && (H.attributeNameCheck = u.attributeNameCheck), W(u, "allowCustomizedBuiltInElements") && typeof u.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = u.allowCustomizedBuiltInElements), Ee && (Bt = !1), xt && (Fe = !0), Ue && (d = E({}, ns), C = Ke(null), Ue.html === !0 && (E(d, ts), E(C, ss)), Ue.svg === !0 && (E(d, Jt), E(C, nn), E(C, Et)), Ue.svgFilters === !0 && (E(d, en), E(C, nn), E(C, Et)), Ue.mathMl === !0 && (E(d, tn), E(C, is), E(C, Et))), Ae.tagCheck = null, Ae.attributeCheck = null, W(r, "ADD_TAGS") && (typeof r.ADD_TAGS == "function" ? Ae.tagCheck = r.ADD_TAGS : se(r.ADD_TAGS) && (d === $ && (d = te(d)), E(d, r.ADD_TAGS, V))), W(r, "ADD_ATTR") && (typeof r.ADD_ATTR == "function" ? Ae.attributeCheck = r.ADD_ATTR : se(r.ADD_ATTR) && (C === fe && (C = te(C)), E(C, r.ADD_ATTR, V))), W(r, "ADD_URI_SAFE_ATTR") && se(r.ADD_URI_SAFE_ATTR) && E(Gt, r.ADD_URI_SAFE_ATTR, V), W(r, "FORBID_CONTENTS") && se(r.FORBID_CONTENTS) && (ge === jt && (ge = te(ge)), E(ge, r.FORBID_CONTENTS, V)), W(r, "ADD_FORBID_CONTENTS") && se(r.ADD_FORBID_CONTENTS) && (ge === jt && (ge = te(ge)), E(ge, r.ADD_FORBID_CONTENTS, V)), Ht && (d["#text"] = !0), Oe && E(d, ["html", "head", "body"]), d.table && (E(d, ["tbody"]), delete we.tbody), r.TRUSTED_TYPES_POLICY) {
815
822
  if (typeof r.TRUSTED_TYPES_POLICY.createHTML != "function")
816
- throw ct('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
823
+ throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
817
824
  if (typeof r.TRUSTED_TYPES_POLICY.createScriptURL != "function")
818
- throw ct('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
819
- B = r.TRUSTED_TYPES_POLICY, Q = B.createHTML("");
825
+ throw ut('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
826
+ U = r.TRUSTED_TYPES_POLICY, Q = U.createHTML("");
820
827
  } else
821
- B === void 0 && (B = Ni(g, i)), B !== null && typeof Q == "string" && (Q = B.createHTML(""));
822
- (q.uponSanitizeElement.length > 0 || q.uponSanitizeAttribute.length > 0) && E === X && (E = te(E)), q.uponSanitizeAttribute.length > 0 && P === Pe && (P = te(P)), re && re(r), He = r;
823
- }, "_parseConfig"), In = R({}, [...Jt, ...en, ...Ti]), Cn = R({}, [...tn, ...Si]), zs = /* @__PURE__ */ d(function(r) {
824
- let u = z(r);
828
+ U === void 0 && (U = Ni(g, i)), U !== null && typeof Q == "string" && (Q = U.createHTML(""));
829
+ (Y.uponSanitizeElement.length > 0 || Y.uponSanitizeAttribute.length > 0) && d === $ && (d = te(d)), Y.uponSanitizeAttribute.length > 0 && C === fe && (C = te(C)), re && re(r), je = r;
830
+ }, "_parseConfig"), In = E({}, [...Jt, ...en, ...Ti]), Dn = E({}, [...tn, ...Si]), zs = /* @__PURE__ */ p(function(r) {
831
+ let u = L(r);
825
832
  (!u || !u.tagName) && (u = {
826
- namespaceURI: Ue,
833
+ namespaceURI: He,
827
834
  tagName: "template"
828
835
  });
829
- const f = ht(r.tagName), $ = ht(u.tagName);
830
- return qt[r.namespaceURI] ? r.namespaceURI === vt ? u.namespaceURI === ge ? f === "svg" : u.namespaceURI === wt ? f === "svg" && ($ === "annotation-xml" || Yt[$]) : !!In[f] : r.namespaceURI === wt ? u.namespaceURI === ge ? f === "math" : u.namespaceURI === vt ? f === "math" && Vt[$] : !!Cn[f] : r.namespaceURI === ge ? u.namespaceURI === vt && !Vt[$] || u.namespaceURI === wt && !Yt[$] ? !1 : !Cn[f] && (Os[f] || !In[f]) : !!(at === "application/xhtml+xml" && qt[r.namespaceURI]) : !1;
831
- }, "_checkValidNamespace"), ce = /* @__PURE__ */ d(function(r) {
832
- qe(t.removed, {
836
+ const f = dt(r.tagName), z = dt(u.tagName);
837
+ return qt[r.namespaceURI] ? r.namespaceURI === wt ? u.namespaceURI === me ? f === "svg" : u.namespaceURI === yt ? f === "svg" && (z === "annotation-xml" || Yt[z]) : !!In[f] : r.namespaceURI === yt ? u.namespaceURI === me ? f === "math" : u.namespaceURI === wt ? f === "math" && Vt[z] : !!Dn[f] : r.namespaceURI === me ? u.namespaceURI === wt && !Vt[z] || u.namespaceURI === yt && !Yt[z] ? !1 : !Dn[f] && (Os[f] || !In[f]) : !!(lt === "application/xhtml+xml" && qt[r.namespaceURI]) : !1;
838
+ }, "_checkValidNamespace"), ce = /* @__PURE__ */ p(function(r) {
839
+ Ye(t.removed, {
833
840
  element: r
834
841
  });
835
842
  try {
836
- z(r).removeChild(r);
843
+ L(r).removeChild(r);
837
844
  } catch {
838
- y(r);
845
+ B(r);
839
846
  }
840
- }, "_forceRemove"), De = /* @__PURE__ */ d(function(r, u) {
847
+ }, "_forceRemove"), Me = /* @__PURE__ */ p(function(r, u) {
841
848
  try {
842
- qe(t.removed, {
849
+ Ye(t.removed, {
843
850
  attribute: u.getAttributeNode(r),
844
851
  from: u
845
852
  });
846
853
  } catch {
847
- qe(t.removed, {
854
+ Ye(t.removed, {
848
855
  attribute: null,
849
856
  from: u
850
857
  });
851
858
  }
852
859
  if (u.removeAttribute(r), r === "is")
853
- if (Be || kt)
860
+ if (Fe || xt)
854
861
  try {
855
862
  ce(u);
856
863
  } catch {
@@ -860,41 +867,41 @@ function ys() {
860
867
  u.setAttribute(r, "");
861
868
  } catch {
862
869
  }
863
- }, "_removeAttribute"), Dn = /* @__PURE__ */ d(function(r) {
870
+ }, "_removeAttribute"), Cn = /* @__PURE__ */ p(function(r) {
864
871
  let u = null, f = null;
865
872
  if (Ut)
866
873
  r = "<remove></remove>" + r;
867
874
  else {
868
- const U = Kn(r, /^[\r\n\t ]+/);
869
- f = U && U[0];
875
+ const F = Kn(r, /^[\r\n\t ]+/);
876
+ f = F && F[0];
870
877
  }
871
- at === "application/xhtml+xml" && Ue === ge && (r = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + r + "</body></html>");
872
- const $ = B ? B.createHTML(r) : r;
873
- if (Ue === ge)
878
+ lt === "application/xhtml+xml" && He === me && (r = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + r + "</body></html>");
879
+ const z = U ? U.createHTML(r) : r;
880
+ if (He === me)
874
881
  try {
875
- u = new k().parseFromString($, at);
882
+ u = new y().parseFromString(z, lt);
876
883
  } catch {
877
884
  }
878
885
  if (!u || !u.documentElement) {
879
- u = Te.createDocument(Ue, "template", null);
886
+ u = Se.createDocument(He, "template", null);
880
887
  try {
881
- u.documentElement.innerHTML = Wt ? Q : $;
888
+ u.documentElement.innerHTML = Wt ? Q : z;
882
889
  } catch {
883
890
  }
884
891
  }
885
- const D = u.body || u.documentElement;
886
- return r && f && D.insertBefore(e.createTextNode(f), D.childNodes[0] || null), Ue === ge ? nt.call(u, Ce ? "html" : "body")[0] : Ce ? u.documentElement : D;
887
- }, "_initDocument"), On = /* @__PURE__ */ d(function(r) {
888
- return M.call(
892
+ const I = u.body || u.documentElement;
893
+ return r && f && I.insertBefore(e.createTextNode(f), I.childNodes[0] || null), He === me ? gt.call(u, Oe ? "html" : "body")[0] : Oe ? u.documentElement : I;
894
+ }, "_initDocument"), On = /* @__PURE__ */ p(function(r) {
895
+ return Ce.call(
889
896
  r.ownerDocument || r,
890
897
  r,
891
898
  // eslint-disable-next-line no-bitwise
892
899
  h.SHOW_ELEMENT | h.SHOW_COMMENT | h.SHOW_TEXT | h.SHOW_PROCESSING_INSTRUCTION | h.SHOW_CDATA_SECTION,
893
900
  null
894
901
  );
895
- }, "_createNodeIterator"), Mn = /* @__PURE__ */ d(function(r) {
902
+ }, "_createNodeIterator"), Mn = /* @__PURE__ */ p(function(r) {
896
903
  r.normalize();
897
- const u = M.call(
904
+ const u = Ce.call(
898
905
  r.ownerDocument || r,
899
906
  r,
900
907
  // eslint-disable-next-line no-bitwise
@@ -903,26 +910,26 @@ function ys() {
903
910
  );
904
911
  let f = u.nextNode();
905
912
  for (; f; ) {
906
- let $ = f.data;
907
- We([Ne, ze, $e], (D) => {
908
- $ = Ye($, D, " ");
909
- }), f.data = $, f = u.nextNode();
910
- }
911
- }, "_scrubTemplateExpressions"), Tt = /* @__PURE__ */ d(function(r) {
912
- const u = ae ? ae(r) : null;
913
- return typeof u != "string" || W(u) !== "form" ? !1 : typeof r.nodeName != "string" || typeof r.textContent != "string" || typeof r.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
913
+ let z = f.data;
914
+ qe([$e, Pe, Be], (I) => {
915
+ z = Ve(z, I, " ");
916
+ }), f.data = z, f = u.nextNode();
917
+ }
918
+ }, "_scrubTemplateExpressions"), vt = /* @__PURE__ */ p(function(r) {
919
+ const u = K ? K(r) : null;
920
+ return typeof u != "string" || V(u) !== "form" ? !1 : typeof r.nodeName != "string" || typeof r.textContent != "string" || typeof r.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
914
921
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
915
922
  // makes the direct read diverge from the cached read; a clean form
916
923
  // (same-realm OR foreign-realm) has both reads pointing at the same
917
924
  // canonical NamedNodeMap.
918
- r.attributes !== ee(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
925
+ r.attributes !== G(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
919
926
  // returns the integer 1 for any Element regardless of realm; direct
920
927
  // read on a clobbered form (e.g. <input name="nodeType">) returns
921
928
  // the named child element. Cheap addition — nodeType is read from
922
929
  // an internal slot, no serialization cost — and removes a residual
923
930
  // clobbering surface used by several mXSS / PI / comment branches
924
931
  // in _sanitizeElements that compare currentNode.nodeType directly.
925
- r.nodeType !== H(r) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
932
+ r.nodeType !== q(r) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
926
933
  // "childNodes" shadows the prototype getter. Direct reads of
927
934
  // form.childNodes from a clobbered form return the named child
928
935
  // instead of the real NodeList, so any walk that reads it directly
@@ -933,79 +940,79 @@ function ys() {
933
940
  // select, etc.) regardless of whether the named child happens to
934
941
  // carry a numeric .length, which a typeof-based probe would miss
935
942
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
936
- r.childNodes !== C(r);
937
- }, "_isClobbered"), lt = /* @__PURE__ */ d(function(r) {
938
- if (!H || typeof r != "object" || r === null)
943
+ r.childNodes !== _(r);
944
+ }, "_isClobbered"), ot = /* @__PURE__ */ p(function(r) {
945
+ if (!q || typeof r != "object" || r === null)
939
946
  return !1;
940
947
  try {
941
- return H(r) === be.documentFragment;
948
+ return q(r) === xe.documentFragment;
942
949
  } catch {
943
950
  return !1;
944
951
  }
945
- }, "_isDocumentFragment"), St = /* @__PURE__ */ d(function(r) {
946
- if (!H || typeof r != "object" || r === null)
952
+ }, "_isDocumentFragment"), Tt = /* @__PURE__ */ p(function(r) {
953
+ if (!q || typeof r != "object" || r === null)
947
954
  return !1;
948
955
  try {
949
- return typeof H(r) == "number";
956
+ return typeof q(r) == "number";
950
957
  } catch {
951
958
  return !1;
952
959
  }
953
960
  }, "_isNode");
954
- function we(x, r, u) {
955
- We(x, (f) => {
956
- f.call(t, r, u, He);
961
+ function ve(k, r, u) {
962
+ qe(k, (f) => {
963
+ f.call(t, r, u, je);
957
964
  });
958
965
  }
959
- d(we, "_executeHooks");
960
- const Ln = /* @__PURE__ */ d(function(r) {
966
+ p(ve, "_executeHooks");
967
+ const Ln = /* @__PURE__ */ p(function(r) {
961
968
  let u = null;
962
- if (we(q.beforeSanitizeElements, r, null), Tt(r))
969
+ if (ve(Y.beforeSanitizeElements, r, null), vt(r))
963
970
  return ce(r), !0;
964
- const f = W(r.nodeName);
965
- if (we(q.uponSanitizeElement, r, {
971
+ const f = V(r.nodeName);
972
+ if (ve(Y.uponSanitizeElement, r, {
966
973
  tagName: f,
967
- allowedTags: E
968
- }), it && r.hasChildNodes() && !St(r.firstElementChild) && J(/<[/\w!]/g, r.innerHTML) && J(/<[/\w!]/g, r.textContent) || it && r.namespaceURI === ge && f === "style" && St(r.firstElementChild) || r.nodeType === be.progressingInstruction || it && r.nodeType === be.comment && J(/<[/\w]/g, r.data))
974
+ allowedTags: d
975
+ }), rt && r.hasChildNodes() && !Tt(r.firstElementChild) && ee(/<[/\w!]/g, r.innerHTML) && ee(/<[/\w!]/g, r.textContent) || rt && r.namespaceURI === me && f === "style" && Tt(r.firstElementChild) || r.nodeType === xe.progressingInstruction || rt && r.nodeType === xe.comment && ee(/<[/\w]/g, r.data))
969
976
  return ce(r), !0;
970
- if (st[f] || !(Se.tagCheck instanceof Function && Se.tagCheck(f)) && !E[f]) {
971
- if (!st[f] && zn(f) && (F.tagNameCheck instanceof RegExp && J(F.tagNameCheck, f) || F.tagNameCheck instanceof Function && F.tagNameCheck(f)))
977
+ if (we[f] || !(Ae.tagCheck instanceof Function && Ae.tagCheck(f)) && !d[f]) {
978
+ if (!we[f] && zn(f) && (H.tagNameCheck instanceof RegExp && ee(H.tagNameCheck, f) || H.tagNameCheck instanceof Function && H.tagNameCheck(f)))
972
979
  return !1;
973
- if (Ht && !fe[f]) {
974
- const D = z(r), U = C(r);
975
- if (U && D) {
976
- const le = U.length;
977
- for (let me = le - 1; me >= 0; --me) {
978
- const ue = w(U[me], !0);
979
- D.insertBefore(ue, A(r));
980
+ if (Ht && !ge[f]) {
981
+ const I = L(r), F = _(r);
982
+ if (F && I) {
983
+ const ae = F.length;
984
+ for (let be = ae - 1; be >= 0; --be) {
985
+ const ue = v(F[be], !0);
986
+ I.insertBefore(ue, m(r));
980
987
  }
981
988
  }
982
989
  }
983
990
  return ce(r), !0;
984
991
  }
985
- return (H ? H(r) : r.nodeType) === be.element && !zs(r) || (f === "noscript" || f === "noembed" || f === "noframes") && J(/<\/no(script|embed|frames)/i, r.innerHTML) ? (ce(r), !0) : (Ae && r.nodeType === be.text && (u = r.textContent, We([Ne, ze, $e], (D) => {
986
- u = Ye(u, D, " ");
987
- }), r.textContent !== u && (qe(t.removed, {
992
+ return (q ? q(r) : r.nodeType) === xe.element && !zs(r) || (f === "noscript" || f === "noembed" || f === "noframes") && ee(/<\/no(script|embed|frames)/i, r.innerHTML) ? (ce(r), !0) : (Ee && r.nodeType === xe.text && (u = r.textContent, qe([$e, Pe, Be], (I) => {
993
+ u = Ve(u, I, " ");
994
+ }), r.textContent !== u && (Ye(t.removed, {
988
995
  element: r.cloneNode()
989
- }), r.textContent = u)), we(q.afterSanitizeElements, r, null), !1);
990
- }, "_sanitizeElements"), Nn = /* @__PURE__ */ d(function(r, u, f) {
991
- if (xt[u] || vn && (u === "id" || u === "name") && (f in e || f in Ns))
996
+ }), r.textContent = u)), ve(Y.afterSanitizeElements, r, null), !1);
997
+ }, "_sanitizeElements"), Nn = /* @__PURE__ */ p(function(r, u, f) {
998
+ if (bt[u] || vn && (u === "id" || u === "name") && (f in e || f in Ns))
992
999
  return !1;
993
- const $ = P[u] || Se.attributeCheck instanceof Function && Se.attributeCheck(u, r);
994
- if (!(Bt && !xt[u] && J(Pt, u))) {
995
- if (!(kn && J(mt, u))) {
996
- if (!$ || xt[u]) {
1000
+ const z = C[u] || Ae.attributeCheck instanceof Function && Ae.attributeCheck(u, r);
1001
+ if (!(Bt && !bt[u] && ee($t, u))) {
1002
+ if (!(kn && ee(Pt, u))) {
1003
+ if (!z || bt[u]) {
997
1004
  if (
998
1005
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
999
1006
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1000
1007
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1001
- !(zn(r) && (F.tagNameCheck instanceof RegExp && J(F.tagNameCheck, r) || F.tagNameCheck instanceof Function && F.tagNameCheck(r)) && (F.attributeNameCheck instanceof RegExp && J(F.attributeNameCheck, u) || F.attributeNameCheck instanceof Function && F.attributeNameCheck(u, r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1008
+ !(zn(r) && (H.tagNameCheck instanceof RegExp && ee(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r)) && (H.attributeNameCheck instanceof RegExp && ee(H.attributeNameCheck, u) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(u, r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1002
1009
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1003
- u === "is" && F.allowCustomizedBuiltInElements && (F.tagNameCheck instanceof RegExp && J(F.tagNameCheck, f) || F.tagNameCheck instanceof Function && F.tagNameCheck(f)))
1010
+ u === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && ee(H.tagNameCheck, f) || H.tagNameCheck instanceof Function && H.tagNameCheck(f)))
1004
1011
  ) return !1;
1005
1012
  } else if (!Gt[u]) {
1006
- if (!J(p, Ye(f, I, ""))) {
1013
+ if (!ee(b, Ve(f, it, ""))) {
1007
1014
  if (!((u === "src" || u === "xlink:href" || u === "href") && r !== "script" && Qn(f, "data:") === 0 && An[r])) {
1008
- if (!(yn && !J(bt, Ye(f, I, "")))) {
1015
+ if (!(yn && !ee(mt, Ve(f, it, "")))) {
1009
1016
  if (f)
1010
1017
  return !1;
1011
1018
  }
@@ -1015,211 +1022,211 @@ function ys() {
1015
1022
  }
1016
1023
  }
1017
1024
  return !0;
1018
- }, "_isValidAttribute"), $s = R({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), zn = /* @__PURE__ */ d(function(r) {
1019
- return !$s[ht(r)] && J(b, r);
1020
- }, "_isBasicCustomElement"), $n = /* @__PURE__ */ d(function(r) {
1021
- we(q.beforeSanitizeAttributes, r, null);
1025
+ }, "_isValidAttribute"), $s = E({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), zn = /* @__PURE__ */ p(function(r) {
1026
+ return !$s[dt(r)] && ee(R, r);
1027
+ }, "_isBasicCustomElement"), $n = /* @__PURE__ */ p(function(r) {
1028
+ ve(Y.beforeSanitizeAttributes, r, null);
1022
1029
  const u = r.attributes;
1023
- if (!u || Tt(r))
1030
+ if (!u || vt(r))
1024
1031
  return;
1025
1032
  const f = {
1026
1033
  attrName: "",
1027
1034
  attrValue: "",
1028
1035
  keepAttr: !0,
1029
- allowedAttributes: P,
1036
+ allowedAttributes: C,
1030
1037
  forceKeepAttr: void 0
1031
1038
  };
1032
- let $ = u.length;
1033
- for (; $--; ) {
1034
- const D = u[$], U = D.name, le = D.namespaceURI, me = D.value, ue = W(U), Xt = me;
1035
- let K = U === "value" ? Xt : mi(Xt);
1036
- if (f.attrName = ue, f.attrValue = K, f.keepAttr = !0, f.forceKeepAttr = void 0, we(q.uponSanitizeAttribute, r, f), K = f.attrValue, Tn && (ue === "id" || ue === "name") && Qn(K, Sn) !== 0 && (De(U, r), K = Sn + K), it && J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, K)) {
1037
- De(U, r);
1039
+ let z = u.length;
1040
+ for (; z--; ) {
1041
+ const I = u[z], F = I.name, ae = I.namespaceURI, be = I.value, ue = V(F), Xt = be;
1042
+ let J = F === "value" ? Xt : mi(Xt);
1043
+ if (f.attrName = ue, f.attrValue = J, f.keepAttr = !0, f.forceKeepAttr = void 0, ve(Y.uponSanitizeAttribute, r, f), J = f.attrValue, Tn && (ue === "id" || ue === "name") && Qn(J, Sn) !== 0 && (Me(F, r), J = Sn + J), rt && ee(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, J)) {
1044
+ Me(F, r);
1038
1045
  continue;
1039
1046
  }
1040
- if (ue === "attributename" && Kn(K, "href")) {
1041
- De(U, r);
1047
+ if (ue === "attributename" && Kn(J, "href")) {
1048
+ Me(F, r);
1042
1049
  continue;
1043
1050
  }
1044
1051
  if (f.forceKeepAttr)
1045
1052
  continue;
1046
1053
  if (!f.keepAttr) {
1047
- De(U, r);
1054
+ Me(F, r);
1048
1055
  continue;
1049
1056
  }
1050
- if (!wn && J(/\/>/i, K)) {
1051
- De(U, r);
1057
+ if (!wn && ee(/\/>/i, J)) {
1058
+ Me(F, r);
1052
1059
  continue;
1053
1060
  }
1054
- Ae && We([Ne, ze, $e], (Bn) => {
1055
- K = Ye(K, Bn, " ");
1061
+ Ee && qe([$e, Pe, Be], (Bn) => {
1062
+ J = Ve(J, Bn, " ");
1056
1063
  });
1057
- const Pn = W(r.nodeName);
1058
- if (!Nn(Pn, ue, K)) {
1059
- De(U, r);
1064
+ const Pn = V(r.nodeName);
1065
+ if (!Nn(Pn, ue, J)) {
1066
+ Me(F, r);
1060
1067
  continue;
1061
1068
  }
1062
- if (B && typeof g == "object" && typeof g.getAttributeType == "function" && !le)
1069
+ if (U && typeof g == "object" && typeof g.getAttributeType == "function" && !ae)
1063
1070
  switch (g.getAttributeType(Pn, ue)) {
1064
1071
  case "TrustedHTML": {
1065
- K = B.createHTML(K);
1072
+ J = U.createHTML(J);
1066
1073
  break;
1067
1074
  }
1068
1075
  case "TrustedScriptURL": {
1069
- K = B.createScriptURL(K);
1076
+ J = U.createScriptURL(J);
1070
1077
  break;
1071
1078
  }
1072
1079
  }
1073
- if (K !== Xt)
1080
+ if (J !== Xt)
1074
1081
  try {
1075
- le ? r.setAttributeNS(le, U, K) : r.setAttribute(U, K), Tt(r) ? ce(r) : Xn(t.removed);
1082
+ ae ? r.setAttributeNS(ae, F, J) : r.setAttribute(F, J), vt(r) ? ce(r) : Xn(t.removed);
1076
1083
  } catch {
1077
- De(U, r);
1084
+ Me(F, r);
1078
1085
  }
1079
1086
  }
1080
- we(q.afterSanitizeAttributes, r, null);
1081
- }, "_sanitizeAttributes"), At = /* @__PURE__ */ d(function(r) {
1087
+ ve(Y.afterSanitizeAttributes, r, null);
1088
+ }, "_sanitizeAttributes"), St = /* @__PURE__ */ p(function(r) {
1082
1089
  let u = null;
1083
1090
  const f = On(r);
1084
- for (we(q.beforeSanitizeShadowDOM, r, null); u = f.nextNode(); )
1085
- if (we(q.uponSanitizeShadowNode, u, null), Ln(u), $n(u), lt(u.content) && At(u.content), (H ? H(u) : u.nodeType) === be.element) {
1086
- const D = Z ? Z(u) : u.shadowRoot;
1087
- lt(D) && (je(D), At(D));
1088
- }
1089
- we(q.afterSanitizeShadowDOM, r, null);
1090
- }, "_sanitizeShadowDOM"), je = /* @__PURE__ */ d(function(r) {
1091
- const u = H ? H(r) : r.nodeType;
1092
- if (u === be.element) {
1093
- const D = Z ? Z(r) : r.shadowRoot;
1094
- lt(D) && (je(D), At(D));
1095
- }
1096
- const f = C ? C(r) : r.childNodes;
1091
+ for (ve(Y.beforeSanitizeShadowDOM, r, null); u = f.nextNode(); )
1092
+ if (ve(Y.uponSanitizeShadowNode, u, null), Ln(u), $n(u), ot(u.content) && St(u.content), (q ? q(u) : u.nodeType) === xe.element) {
1093
+ const I = P ? P(u) : u.shadowRoot;
1094
+ ot(I) && (Ge(I), St(I));
1095
+ }
1096
+ ve(Y.afterSanitizeShadowDOM, r, null);
1097
+ }, "_sanitizeShadowDOM"), Ge = /* @__PURE__ */ p(function(r) {
1098
+ const u = q ? q(r) : r.nodeType;
1099
+ if (u === xe.element) {
1100
+ const I = P ? P(r) : r.shadowRoot;
1101
+ ot(I) && (Ge(I), St(I));
1102
+ }
1103
+ const f = _ ? _(r) : r.childNodes;
1097
1104
  if (!f)
1098
1105
  return;
1099
- const $ = [];
1100
- We(f, (D) => {
1101
- qe($, D);
1106
+ const z = [];
1107
+ qe(f, (I) => {
1108
+ Ye(z, I);
1102
1109
  });
1103
- for (const D of $)
1104
- je(D);
1105
- if (u === be.element) {
1106
- const D = ae ? ae(r) : null;
1107
- if (typeof D == "string" && W(D) === "template") {
1108
- const U = r.content;
1109
- lt(U) && je(U);
1110
+ for (const I of z)
1111
+ Ge(I);
1112
+ if (u === xe.element) {
1113
+ const I = K ? K(r) : null;
1114
+ if (typeof I == "string" && V(I) === "template") {
1115
+ const F = r.content;
1116
+ ot(F) && Ge(F);
1110
1117
  }
1111
1118
  }
1112
1119
  }, "_sanitizeAttachedShadowRoots");
1113
- return t.sanitize = function(x) {
1114
- let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, f = null, $ = null, D = null;
1115
- if (Wt = !x, Wt && (x = "<!-->"), typeof x != "string" && !St(x) && (x = wi(x), typeof x != "string"))
1116
- throw ct("dirty is not a string, aborting");
1120
+ return t.sanitize = function(k) {
1121
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, f = null, z = null, I = null;
1122
+ if (Wt = !k, Wt && (k = "<!-->"), typeof k != "string" && !Tt(k) && (k = wi(k), typeof k != "string"))
1123
+ throw ut("dirty is not a string, aborting");
1117
1124
  if (!t.isSupported)
1118
- return x;
1119
- if (Ft || Zt(r), t.removed = [], typeof x == "string" && (rt = !1), rt) {
1120
- const me = ae ? ae(x) : x.nodeName;
1121
- if (typeof me == "string") {
1122
- const ue = W(me);
1123
- if (!E[ue] || st[ue])
1124
- throw ct("root node is forbidden and cannot be sanitized in-place");
1125
- }
1126
- if (Tt(x))
1127
- throw ct("root node is clobbered and cannot be sanitized in-place");
1128
- je(x);
1129
- } else if (St(x))
1130
- u = Dn("<!---->"), f = u.ownerDocument.importNode(x, !0), f.nodeType === be.element && f.nodeName === "BODY" || f.nodeName === "HTML" ? u = f : u.appendChild(f), je(f);
1125
+ return k;
1126
+ if (Ft || Zt(r), t.removed = [], typeof k == "string" && (at = !1), at) {
1127
+ const be = K ? K(k) : k.nodeName;
1128
+ if (typeof be == "string") {
1129
+ const ue = V(be);
1130
+ if (!d[ue] || we[ue])
1131
+ throw ut("root node is forbidden and cannot be sanitized in-place");
1132
+ }
1133
+ if (vt(k))
1134
+ throw ut("root node is clobbered and cannot be sanitized in-place");
1135
+ Ge(k);
1136
+ } else if (Tt(k))
1137
+ u = Cn("<!---->"), f = u.ownerDocument.importNode(k, !0), f.nodeType === xe.element && f.nodeName === "BODY" || f.nodeName === "HTML" ? u = f : u.appendChild(f), Ge(f);
1131
1138
  else {
1132
- if (!Be && !Ae && !Ce && // eslint-disable-next-line unicorn/prefer-includes
1133
- x.indexOf("<") === -1)
1134
- return B && yt ? B.createHTML(x) : x;
1135
- if (u = Dn(x), !u)
1136
- return Be ? null : yt ? Q : "";
1139
+ if (!Fe && !Ee && !Oe && // eslint-disable-next-line unicorn/prefer-includes
1140
+ k.indexOf("<") === -1)
1141
+ return U && kt ? U.createHTML(k) : k;
1142
+ if (u = Cn(k), !u)
1143
+ return Fe ? null : kt ? Q : "";
1137
1144
  }
1138
1145
  u && Ut && ce(u.firstChild);
1139
- const U = On(rt ? x : u);
1140
- for (; $ = U.nextNode(); )
1141
- Ln($), $n($), lt($.content) && At($.content);
1142
- if (rt)
1143
- return Ae && Mn(x), x;
1144
- if (Be) {
1145
- if (Ae && Mn(u), kt)
1146
- for (D = ft.call(u.ownerDocument); u.firstChild; )
1147
- D.appendChild(u.firstChild);
1146
+ const F = On(at ? k : u);
1147
+ for (; z = F.nextNode(); )
1148
+ Ln(z), $n(z), ot(z.content) && St(z.content);
1149
+ if (at)
1150
+ return Ee && Mn(k), k;
1151
+ if (Fe) {
1152
+ if (Ee && Mn(u), xt)
1153
+ for (I = O.call(u.ownerDocument); u.firstChild; )
1154
+ I.appendChild(u.firstChild);
1148
1155
  else
1149
- D = u;
1150
- return (P.shadowroot || P.shadowrootmode) && (D = gt.call(n, D, !0)), D;
1151
- }
1152
- let le = Ce ? u.outerHTML : u.innerHTML;
1153
- return Ce && E["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && J(Oi, u.ownerDocument.doctype.name) && (le = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1154
- ` + le), Ae && We([Ne, ze, $e], (me) => {
1155
- le = Ye(le, me, " ");
1156
- }), B && yt ? B.createHTML(le) : le;
1156
+ I = u;
1157
+ return (C.shadowroot || C.shadowrootmode) && (I = st.call(n, I, !0)), I;
1158
+ }
1159
+ let ae = Oe ? u.outerHTML : u.innerHTML;
1160
+ return Oe && d["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && ee(Oi, u.ownerDocument.doctype.name) && (ae = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
1161
+ ` + ae), Ee && qe([$e, Pe, Be], (be) => {
1162
+ ae = Ve(ae, be, " ");
1163
+ }), U && kt ? U.createHTML(ae) : ae;
1157
1164
  }, t.setConfig = function() {
1158
- let x = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1159
- Zt(x), Ft = !0;
1165
+ let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1166
+ Zt(k), Ft = !0;
1160
1167
  }, t.clearConfig = function() {
1161
- He = null, Ft = !1;
1162
- }, t.isValidAttribute = function(x, r, u) {
1163
- He || Zt({});
1164
- const f = W(x), $ = W(r);
1165
- return Nn(f, $, u);
1166
- }, t.addHook = function(x, r) {
1167
- typeof r == "function" && qe(q[x], r);
1168
- }, t.removeHook = function(x, r) {
1168
+ je = null, Ft = !1;
1169
+ }, t.isValidAttribute = function(k, r, u) {
1170
+ je || Zt({});
1171
+ const f = V(k), z = V(r);
1172
+ return Nn(f, z, u);
1173
+ }, t.addHook = function(k, r) {
1174
+ typeof r == "function" && Ye(Y[k], r);
1175
+ }, t.removeHook = function(k, r) {
1169
1176
  if (r !== void 0) {
1170
- const u = fi(q[x], r);
1171
- return u === -1 ? void 0 : gi(q[x], u, 1)[0];
1177
+ const u = fi(Y[k], r);
1178
+ return u === -1 ? void 0 : gi(Y[k], u, 1)[0];
1172
1179
  }
1173
- return Xn(q[x]);
1174
- }, t.removeHooks = function(x) {
1175
- q[x] = [];
1180
+ return Xn(Y[k]);
1181
+ }, t.removeHooks = function(k) {
1182
+ Y[k] = [];
1176
1183
  }, t.removeAllHooks = function() {
1177
- q = as();
1184
+ Y = as();
1178
1185
  }, t;
1179
1186
  }
1180
- d(ys, "createDOMPurify");
1187
+ p(ys, "createDOMPurify");
1181
1188
  var zi = ys();
1182
1189
  function cn() {
1183
1190
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1184
1191
  }
1185
- d(cn, "M");
1186
- var Le = cn();
1192
+ p(cn, "M");
1193
+ var ze = cn();
1187
1194
  function ws(a) {
1188
- Le = a;
1195
+ ze = a;
1189
1196
  }
1190
- d(ws, "N");
1191
- var Oe = { exec: /* @__PURE__ */ d(() => null, "exec") };
1192
- function Ve(a) {
1197
+ p(ws, "N");
1198
+ var Le = { exec: /* @__PURE__ */ p(() => null, "exec") };
1199
+ function Ze(a) {
1193
1200
  let t = [];
1194
1201
  return (e) => {
1195
1202
  let n = Math.max(0, Math.min(3, e - 1)), i = t[n];
1196
1203
  return i || (i = a(n), t[n] = i), i;
1197
1204
  };
1198
1205
  }
1199
- d(Ve, "E");
1200
- function L(a, t = "") {
1201
- let e = typeof a == "string" ? a : a.source, n = { replace: /* @__PURE__ */ d((i, s) => {
1206
+ p(Ze, "E");
1207
+ function M(a, t = "") {
1208
+ let e = typeof a == "string" ? a : a.source, n = { replace: /* @__PURE__ */ p((i, s) => {
1202
1209
  let l = typeof s == "string" ? s : s.source;
1203
1210
  return l = l.replace(ne.caret, "$1"), e = e.replace(i, l), n;
1204
- }, "replace"), getRegex: /* @__PURE__ */ d(() => new RegExp(e, t), "getRegex") };
1211
+ }, "replace"), getRegex: /* @__PURE__ */ p(() => new RegExp(e, t), "getRegex") };
1205
1212
  return n;
1206
1213
  }
1207
- d(L, "d");
1214
+ p(M, "d");
1208
1215
  var $i = ((a = "") => {
1209
1216
  try {
1210
1217
  return !!new RegExp("(?<=1)(?<!1)" + a);
1211
1218
  } catch {
1212
1219
  return !1;
1213
1220
  }
1214
- })(), ne = { 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: Ve((a) => new RegExp(`^ {0,${a}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Ve((a) => new RegExp(`^ {0,${a}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Ve((a) => new RegExp(`^ {0,${a}}(?:\`\`\`|~~~)`)), headingBeginRegex: Ve((a) => new RegExp(`^ {0,${a}}#`)), htmlBeginRegex: Ve((a) => new RegExp(`^ {0,${a}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Ve((a) => new RegExp(`^ {0,${a}}>`)) }, Pi = /^(?:[ \t]*(?:\n|$))+/, Bi = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Fi = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, pt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ui = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, un = / {0,3}(?:[*+-]|\d{1,9}[.)])/, vs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ts = L(vs).replace(/bull/g, un).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(), Hi = L(vs).replace(/bull/g, un).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(), hn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ji = /^[^\n]+/, dn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Gi = L(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", dn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Wi = L(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, un).getRegex(), zt = "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", pn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, qi = L("^ {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", pn).replace("tag", zt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ss = L(hn).replace("hr", pt).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]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), Yi = L(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ss).getRegex(), fn = { blockquote: Yi, code: Bi, def: Gi, fences: Fi, heading: Ui, hr: pt, html: qi, lheading: Ts, list: Wi, newline: Pi, paragraph: Ss, table: Oe, text: ji }, ls = L("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", pt).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", zt).getRegex(), Vi = { ...fn, lheading: Hi, table: ls, paragraph: L(hn).replace("hr", pt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ls).replace("blockquote", " {0,3}>").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", zt).getRegex() }, Zi = { ...fn, html: L(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", pn).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: Oe, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: L(hn).replace("hr", pt).replace("heading", ` *#{1,6} *[^
1215
- ]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Xi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ki = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, As = /^( {2,}|\\)\n(?!\s*$)/, Qi = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, tt = /[\p{P}\p{S}]/u, $t = /[\s\p{P}\p{S}]/u, gn = /[^\s\p{P}\p{S}]/u, Ji = L(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, $t).getRegex(), Es = /(?!~)[\p{P}\p{S}]/u, er = /(?!~)[\s\p{P}\p{S}]/u, tr = /(?:[^\s\p{P}\p{S}]|~)/u, nr = L(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", $i ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), _s = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, sr = L(_s, "u").replace(/punct/g, tt).getRegex(), ir = L(_s, "u").replace(/punct/g, Es).getRegex(), Rs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", rr = L(Rs, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, $t).replace(/punct/g, tt).getRegex(), ar = L(Rs, "gu").replace(/notPunctSpace/g, tr).replace(/punctSpace/g, er).replace(/punct/g, Es).getRegex(), lr = L("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, $t).replace(/punct/g, tt).getRegex(), or = L(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, tt).getRegex(), cr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", ur = L(cr, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, $t).replace(/punct/g, tt).getRegex(), hr = L(/\\(punct)/, "gu").replace(/punct/g, tt).getRegex(), dr = L(/^<(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(), pr = L(pn).replace("(?:-->|$)", "-->").getRegex(), fr = L("^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", pr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ot = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, gr = L(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ot).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Is = L(/^!?\[(label)\]\[(ref)\]/).replace("label", Ot).replace("ref", dn).getRegex(), Cs = L(/^!?\[(ref)\](?:\[\])?/).replace("ref", dn).getRegex(), mr = L("reflink|nolink(?!\\()", "g").replace("reflink", Is).replace("nolink", Cs).getRegex(), os = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: Oe, anyPunctuation: hr, autolink: dr, blockSkip: nr, br: As, code: Ki, del: Oe, delLDelim: Oe, delRDelim: Oe, emStrongLDelim: sr, emStrongRDelimAst: rr, emStrongRDelimUnd: lr, escape: Xi, link: gr, nolink: Cs, punctuation: Ji, reflink: Is, reflinkSearch: mr, tag: fr, text: Qi, url: Oe }, br = { ...mn, link: L(/^!?\[(label)\]\((.*?)\)/).replace("label", Ot).getRegex(), reflink: L(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ot).getRegex() }, ln = { ...mn, emStrongRDelimAst: ar, emStrongLDelim: ir, delLDelim: or, delRDelim: ur, url: L(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", os).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: L(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", os).getRegex() }, xr = { ...ln, br: L(As).replace("{2,}", "*").getRegex(), text: L(ln.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Rt = { normal: fn, gfm: Vi, pedantic: Zi }, ut = { normal: mn, gfm: ln, breaks: xr, pedantic: br }, kr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, cs = /* @__PURE__ */ d((a) => kr[a], "ge");
1216
- function ke(a, t) {
1221
+ })(), ne = { 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__ */ p((a) => new RegExp(`^( {0,3}${a})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: Ze((a) => new RegExp(`^ {0,${a}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Ze((a) => new RegExp(`^ {0,${a}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Ze((a) => new RegExp(`^ {0,${a}}(?:\`\`\`|~~~)`)), headingBeginRegex: Ze((a) => new RegExp(`^ {0,${a}}#`)), htmlBeginRegex: Ze((a) => new RegExp(`^ {0,${a}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Ze((a) => new RegExp(`^ {0,${a}}>`)) }, Pi = /^(?:[ \t]*(?:\n|$))+/, Bi = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Fi = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ft = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ui = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, un = / {0,3}(?:[*+-]|\d{1,9}[.)])/, vs = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Ts = M(vs).replace(/bull/g, un).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(), Hi = M(vs).replace(/bull/g, un).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(), hn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ji = /^[^\n]+/, dn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Gi = M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", dn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Wi = M(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, un).getRegex(), Nt = "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", pn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, qi = M("^ {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", pn).replace("tag", Nt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Ss = M(hn).replace("hr", ft).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]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Nt).getRegex(), Yi = M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ss).getRegex(), fn = { blockquote: Yi, code: Bi, def: Gi, fences: Fi, heading: Ui, hr: ft, html: qi, lheading: Ts, list: Wi, newline: Pi, paragraph: Ss, table: Le, text: ji }, ls = M("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ft).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", Nt).getRegex(), Vi = { ...fn, lheading: Hi, table: ls, paragraph: M(hn).replace("hr", ft).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ls).replace("blockquote", " {0,3}>").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", Nt).getRegex() }, Zi = { ...fn, html: M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", pn).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: Le, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: M(hn).replace("hr", ft).replace("heading", ` *#{1,6} *[^
1222
+ ]`).replace("lheading", Ts).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Xi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ki = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, As = /^( {2,}|\\)\n(?!\s*$)/, Qi = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, nt = /[\p{P}\p{S}]/u, zt = /[\s\p{P}\p{S}]/u, gn = /[^\s\p{P}\p{S}]/u, Ji = M(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, zt).getRegex(), Es = /(?!~)[\p{P}\p{S}]/u, er = /(?!~)[\s\p{P}\p{S}]/u, tr = /(?:[^\s\p{P}\p{S}]|~)/u, nr = M(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", $i ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), _s = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, sr = M(_s, "u").replace(/punct/g, nt).getRegex(), ir = M(_s, "u").replace(/punct/g, Es).getRegex(), Rs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", rr = M(Rs, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, zt).replace(/punct/g, nt).getRegex(), ar = M(Rs, "gu").replace(/notPunctSpace/g, tr).replace(/punctSpace/g, er).replace(/punct/g, Es).getRegex(), lr = M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, zt).replace(/punct/g, nt).getRegex(), or = M(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, nt).getRegex(), cr = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", ur = M(cr, "gu").replace(/notPunctSpace/g, gn).replace(/punctSpace/g, zt).replace(/punct/g, nt).getRegex(), hr = M(/\\(punct)/, "gu").replace(/punct/g, nt).getRegex(), dr = M(/^<(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(), pr = M(pn).replace("(?:-->|$)", "-->").getRegex(), fr = M("^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", pr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ct = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, gr = M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ct).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Is = M(/^!?\[(label)\]\[(ref)\]/).replace("label", Ct).replace("ref", dn).getRegex(), Ds = M(/^!?\[(ref)\](?:\[\])?/).replace("ref", dn).getRegex(), mr = M("reflink|nolink(?!\\()", "g").replace("reflink", Is).replace("nolink", Ds).getRegex(), os = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mn = { _backpedal: Le, anyPunctuation: hr, autolink: dr, blockSkip: nr, br: As, code: Ki, del: Le, delLDelim: Le, delRDelim: Le, emStrongLDelim: sr, emStrongRDelimAst: rr, emStrongRDelimUnd: lr, escape: Xi, link: gr, nolink: Ds, punctuation: Ji, reflink: Is, reflinkSearch: mr, tag: fr, text: Qi, url: Le }, br = { ...mn, link: M(/^!?\[(label)\]\((.*?)\)/).replace("label", Ct).getRegex(), reflink: M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ct).getRegex() }, ln = { ...mn, emStrongRDelimAst: ar, emStrongLDelim: ir, delLDelim: or, delRDelim: ur, url: M(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", os).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: M(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", os).getRegex() }, xr = { ...ln, br: M(As).replace("{2,}", "*").getRegex(), text: M(ln.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, _t = { normal: fn, gfm: Vi, pedantic: Zi }, ht = { normal: mn, gfm: ln, breaks: xr, pedantic: br }, kr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, cs = /* @__PURE__ */ p((a) => kr[a], "ge");
1223
+ function ye(a, t) {
1217
1224
  if (t) {
1218
1225
  if (ne.escapeTest.test(a)) return a.replace(ne.escapeReplace, cs);
1219
1226
  } else if (ne.escapeTestNoEncode.test(a)) return a.replace(ne.escapeReplaceNoEncode, cs);
1220
1227
  return a;
1221
1228
  }
1222
- d(ke, "O");
1229
+ p(ye, "O");
1223
1230
  function us(a) {
1224
1231
  try {
1225
1232
  a = encodeURI(a).replace(ne.percentDecode, "%");
@@ -1228,7 +1235,7 @@ function us(a) {
1228
1235
  }
1229
1236
  return a;
1230
1237
  }
1231
- d(us, "V");
1238
+ p(us, "V");
1232
1239
  function hs(a, t) {
1233
1240
  let e = a.replace(ne.findPipe, (s, l, o) => {
1234
1241
  let h = !1, c = l;
@@ -1240,8 +1247,8 @@ function hs(a, t) {
1240
1247
  for (; i < n.length; i++) n[i] = n[i].trim().replace(ne.slashPipe, "|");
1241
1248
  return n;
1242
1249
  }
1243
- d(hs, "Y");
1244
- function Ee(a, t, e) {
1250
+ p(hs, "Y");
1251
+ function _e(a, t, e) {
1245
1252
  let n = a.length;
1246
1253
  if (n === 0) return "";
1247
1254
  let i = 0;
@@ -1249,7 +1256,7 @@ function Ee(a, t, e) {
1249
1256
  i++;
1250
1257
  return a.slice(0, n - i);
1251
1258
  }
1252
- d(Ee, "$");
1259
+ p(_e, "$");
1253
1260
  function ds(a) {
1254
1261
  let t = a.split(`
1255
1262
  `), e = t.length - 1;
@@ -1257,7 +1264,7 @@ function ds(a) {
1257
1264
  return t.length - e <= 2 ? a : t.slice(0, e + 1).join(`
1258
1265
  `);
1259
1266
  }
1260
- d(ds, "ee");
1267
+ p(ds, "ee");
1261
1268
  function yr(a, t) {
1262
1269
  if (a.indexOf(t[1]) === -1) return -1;
1263
1270
  let e = 0;
@@ -1266,7 +1273,7 @@ function yr(a, t) {
1266
1273
  else if (a[n] === t[1] && (e--, e < 0)) return n;
1267
1274
  return e > 0 ? -2 : -1;
1268
1275
  }
1269
- d(yr, "fe");
1276
+ p(yr, "fe");
1270
1277
  function wr(a, t = 0) {
1271
1278
  let e = t, n = "";
1272
1279
  for (let i of a) if (i === " ") {
@@ -1275,14 +1282,14 @@ function wr(a, t = 0) {
1275
1282
  } else n += i, e++;
1276
1283
  return n;
1277
1284
  }
1278
- d(wr, "me");
1285
+ p(wr, "me");
1279
1286
  function ps(a, t, e, n, i) {
1280
1287
  let s = t.href, l = t.title || null, o = a[1].replace(i.other.outputLinkReplace, "$1");
1281
1288
  n.state.inLink = !0;
1282
1289
  let h = { type: a[0].charAt(0) === "!" ? "image" : "link", raw: e, href: s, title: l, text: o, tokens: n.inlineTokens(o) };
1283
1290
  return n.state.inLink = !1, h;
1284
1291
  }
1285
- d(ps, "xe");
1292
+ p(ps, "xe");
1286
1293
  function vr(a, t, e) {
1287
1294
  let n = a.match(e.other.indentCodeCompensation);
1288
1295
  if (n === null) return t;
@@ -1296,13 +1303,13 @@ function vr(a, t, e) {
1296
1303
  }).join(`
1297
1304
  `);
1298
1305
  }
1299
- d(vr, "st");
1300
- var Ke, Mt = (Ke = class {
1306
+ p(vr, "st");
1307
+ var Qe, Ot = (Qe = class {
1301
1308
  constructor(t) {
1302
- O(this, "options");
1303
- O(this, "rules");
1304
- O(this, "lexer");
1305
- this.options = t || Le;
1309
+ D(this, "options");
1310
+ D(this, "rules");
1311
+ D(this, "lexer");
1312
+ this.options = t || ze;
1306
1313
  }
1307
1314
  space(t) {
1308
1315
  let e = this.rules.block.newline.exec(t);
@@ -1327,22 +1334,22 @@ var Ke, Mt = (Ke = class {
1327
1334
  if (e) {
1328
1335
  let n = e[2].trim();
1329
1336
  if (this.rules.other.endingHash.test(n)) {
1330
- let i = Ee(n, "#");
1337
+ let i = _e(n, "#");
1331
1338
  (this.options.pedantic || !i || this.rules.other.endingSpaceChar.test(i)) && (n = i.trim());
1332
1339
  }
1333
- return { type: "heading", raw: Ee(e[0], `
1340
+ return { type: "heading", raw: _e(e[0], `
1334
1341
  `), depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
1335
1342
  }
1336
1343
  }
1337
1344
  hr(t) {
1338
1345
  let e = this.rules.block.hr.exec(t);
1339
- if (e) return { type: "hr", raw: Ee(e[0], `
1346
+ if (e) return { type: "hr", raw: _e(e[0], `
1340
1347
  `) };
1341
1348
  }
1342
1349
  blockquote(t) {
1343
1350
  let e = this.rules.block.blockquote.exec(t);
1344
1351
  if (e) {
1345
- let n = Ee(e[0], `
1352
+ let n = _e(e[0], `
1346
1353
  `).split(`
1347
1354
  `), i = "", s = "", l = [];
1348
1355
  for (; n.length > 0; ) {
@@ -1351,27 +1358,27 @@ var Ke, Mt = (Ke = class {
1351
1358
  else if (!o) h.push(n[c]);
1352
1359
  else break;
1353
1360
  n = n.slice(c);
1354
- let k = h.join(`
1355
- `), g = k.replace(this.rules.other.blockquoteSetextReplace, `
1361
+ let y = h.join(`
1362
+ `), g = y.replace(this.rules.other.blockquoteSetextReplace, `
1356
1363
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1357
1364
  i = i ? `${i}
1358
- ${k}` : k, s = s ? `${s}
1365
+ ${y}` : y, s = s ? `${s}
1359
1366
  ${g}` : g;
1360
- let m = this.lexer.state.top;
1361
- if (this.lexer.state.top = !0, this.lexer.blockTokens(g, l, !0), this.lexer.state.top = m, n.length === 0) break;
1362
- let w = l.at(-1);
1363
- if (w?.type === "code") break;
1364
- if (w?.type === "blockquote") {
1365
- let y = w, A = y.raw + `
1367
+ let x = this.lexer.state.top;
1368
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(g, l, !0), this.lexer.state.top = x, n.length === 0) break;
1369
+ let v = l.at(-1);
1370
+ if (v?.type === "code") break;
1371
+ if (v?.type === "blockquote") {
1372
+ let B = v, m = B.raw + `
1366
1373
  ` + n.join(`
1367
- `), C = this.blockquote(A);
1368
- l[l.length - 1] = C, i = i.substring(0, i.length - y.raw.length) + C.raw, s = s.substring(0, s.length - y.text.length) + C.text;
1374
+ `), _ = this.blockquote(m);
1375
+ l[l.length - 1] = _, i = i.substring(0, i.length - B.raw.length) + _.raw, s = s.substring(0, s.length - B.text.length) + _.text;
1369
1376
  break;
1370
- } else if (w?.type === "list") {
1371
- let y = w, A = y.raw + `
1377
+ } else if (v?.type === "list") {
1378
+ let B = v, m = B.raw + `
1372
1379
  ` + n.join(`
1373
- `), C = this.list(A);
1374
- l[l.length - 1] = C, i = i.substring(0, i.length - w.raw.length) + C.raw, s = s.substring(0, s.length - y.raw.length) + C.raw, n = A.substring(l.at(-1).raw.length).split(`
1380
+ `), _ = this.list(m);
1381
+ l[l.length - 1] = _, i = i.substring(0, i.length - v.raw.length) + _.raw, s = s.substring(0, s.length - B.raw.length) + _.raw, n = m.substring(l.at(-1).raw.length).split(`
1375
1382
  `);
1376
1383
  continue;
1377
1384
  }
@@ -1386,31 +1393,31 @@ ${g}` : g;
1386
1393
  n = i ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = i ? n : "[*+-]");
1387
1394
  let l = this.rules.other.listItemRegex(n), o = !1;
1388
1395
  for (; t; ) {
1389
- let c = !1, k = "", g = "";
1396
+ let c = !1, y = "", g = "";
1390
1397
  if (!(e = l.exec(t)) || this.rules.block.hr.test(t)) break;
1391
- k = e[0], t = t.substring(k.length);
1392
- let m = wr(e[2].split(`
1393
- `, 1)[0], e[1].length), w = t.split(`
1394
- `, 1)[0], y = !m.trim(), A = 0;
1395
- if (this.options.pedantic ? (A = 2, g = m.trimStart()) : y ? A = e[1].length + 1 : (A = m.search(this.rules.other.nonSpaceChar), A = A > 4 ? 1 : A, g = m.slice(A), A += e[1].length), y && this.rules.other.blankLine.test(w) && (k += w + `
1396
- `, t = t.substring(w.length + 1), c = !0), !c) {
1397
- let C = this.rules.other.nextBulletRegex(A), z = this.rules.other.hrRegex(A), Z = this.rules.other.fencesBeginRegex(A), ee = this.rules.other.headingBeginRegex(A), H = this.rules.other.htmlBeginRegex(A), ae = this.rules.other.blockquoteBeginRegex(A);
1398
+ y = e[0], t = t.substring(y.length);
1399
+ let x = wr(e[2].split(`
1400
+ `, 1)[0], e[1].length), v = t.split(`
1401
+ `, 1)[0], B = !x.trim(), m = 0;
1402
+ if (this.options.pedantic ? (m = 2, g = x.trimStart()) : B ? m = e[1].length + 1 : (m = x.search(this.rules.other.nonSpaceChar), m = m > 4 ? 1 : m, g = x.slice(m), m += e[1].length), B && this.rules.other.blankLine.test(v) && (y += v + `
1403
+ `, t = t.substring(v.length + 1), c = !0), !c) {
1404
+ let _ = this.rules.other.nextBulletRegex(m), L = this.rules.other.hrRegex(m), P = this.rules.other.fencesBeginRegex(m), G = this.rules.other.headingBeginRegex(m), q = this.rules.other.htmlBeginRegex(m), K = this.rules.other.blockquoteBeginRegex(m);
1398
1405
  for (; t; ) {
1399
- let B = t.split(`
1406
+ let U = t.split(`
1400
1407
  `, 1)[0], Q;
1401
- if (w = B, this.options.pedantic ? (w = w.replace(this.rules.other.listReplaceNesting, " "), Q = w) : Q = w.replace(this.rules.other.tabCharGlobal, " "), Z.test(w) || ee.test(w) || H.test(w) || ae.test(w) || C.test(w) || z.test(w)) break;
1402
- if (Q.search(this.rules.other.nonSpaceChar) >= A || !w.trim()) g += `
1403
- ` + Q.slice(A);
1408
+ if (v = U, this.options.pedantic ? (v = v.replace(this.rules.other.listReplaceNesting, " "), Q = v) : Q = v.replace(this.rules.other.tabCharGlobal, " "), P.test(v) || G.test(v) || q.test(v) || K.test(v) || _.test(v) || L.test(v)) break;
1409
+ if (Q.search(this.rules.other.nonSpaceChar) >= m || !v.trim()) g += `
1410
+ ` + Q.slice(m);
1404
1411
  else {
1405
- if (y || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || Z.test(m) || ee.test(m) || z.test(m)) break;
1412
+ if (B || x.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || P.test(x) || G.test(x) || L.test(x)) break;
1406
1413
  g += `
1407
- ` + w;
1414
+ ` + v;
1408
1415
  }
1409
- y = !w.trim(), k += B + `
1410
- `, t = t.substring(B.length + 1), m = Q.slice(A);
1416
+ B = !v.trim(), y += U + `
1417
+ `, t = t.substring(U.length + 1), x = Q.slice(m);
1411
1418
  }
1412
1419
  }
1413
- s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(k) && (o = !0)), s.items.push({ type: "list_item", raw: k, task: !!this.options.gfm && this.rules.other.listIsTask.test(g), loose: !1, text: g, tokens: [] }), s.raw += k;
1420
+ s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(y) && (o = !0)), s.items.push({ type: "list_item", raw: y, task: !!this.options.gfm && this.rules.other.listIsTask.test(g), loose: !1, text: g, tokens: [] }), s.raw += y;
1414
1421
  }
1415
1422
  let h = s.items.at(-1);
1416
1423
  if (h) h.raw = h.raw.trimEnd(), h.text = h.text.trimEnd();
@@ -1418,27 +1425,27 @@ ${g}` : g;
1418
1425
  s.raw = s.raw.trimEnd();
1419
1426
  for (let c of s.items) {
1420
1427
  this.lexer.state.top = !1, c.tokens = this.lexer.blockTokens(c.text, []);
1421
- let k = c.tokens[0];
1422
- if (c.task && (k?.type === "text" || k?.type === "paragraph")) {
1423
- c.text = c.text.replace(this.rules.other.listReplaceTask, ""), k.raw = k.raw.replace(this.rules.other.listReplaceTask, ""), k.text = k.text.replace(this.rules.other.listReplaceTask, "");
1424
- for (let m = this.lexer.inlineQueue.length - 1; m >= 0; m--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)) {
1425
- this.lexer.inlineQueue[m].src = this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask, "");
1428
+ let y = c.tokens[0];
1429
+ if (c.task && (y?.type === "text" || y?.type === "paragraph")) {
1430
+ c.text = c.text.replace(this.rules.other.listReplaceTask, ""), y.raw = y.raw.replace(this.rules.other.listReplaceTask, ""), y.text = y.text.replace(this.rules.other.listReplaceTask, "");
1431
+ for (let x = this.lexer.inlineQueue.length - 1; x >= 0; x--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[x].src)) {
1432
+ this.lexer.inlineQueue[x].src = this.lexer.inlineQueue[x].src.replace(this.rules.other.listReplaceTask, "");
1426
1433
  break;
1427
1434
  }
1428
1435
  let g = this.rules.other.listTaskCheckbox.exec(c.raw);
1429
1436
  if (g) {
1430
- let m = { type: "checkbox", raw: g[0] + " ", checked: g[0] !== "[ ]" };
1431
- c.checked = m.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 = m.raw + c.tokens[0].raw, c.tokens[0].text = m.raw + c.tokens[0].text, c.tokens[0].tokens.unshift(m)) : c.tokens.unshift({ type: "paragraph", raw: m.raw, text: m.raw, tokens: [m] }) : c.tokens.unshift(m);
1437
+ let x = { type: "checkbox", raw: g[0] + " ", checked: g[0] !== "[ ]" };
1438
+ c.checked = x.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 = x.raw + c.tokens[0].raw, c.tokens[0].text = x.raw + c.tokens[0].text, c.tokens[0].tokens.unshift(x)) : c.tokens.unshift({ type: "paragraph", raw: x.raw, text: x.raw, tokens: [x] }) : c.tokens.unshift(x);
1432
1439
  }
1433
1440
  } else c.task && (c.task = !1);
1434
1441
  if (!s.loose) {
1435
- let g = c.tokens.filter((w) => w.type === "space"), m = g.length > 0 && g.some((w) => this.rules.other.anyLine.test(w.raw));
1436
- s.loose = m;
1442
+ let g = c.tokens.filter((v) => v.type === "space"), x = g.length > 0 && g.some((v) => this.rules.other.anyLine.test(v.raw));
1443
+ s.loose = x;
1437
1444
  }
1438
1445
  }
1439
1446
  if (s.loose) for (let c of s.items) {
1440
1447
  c.loose = !0;
1441
- for (let k of c.tokens) k.type === "text" && (k.type = "paragraph");
1448
+ for (let y of c.tokens) y.type === "text" && (y.type = "paragraph");
1442
1449
  }
1443
1450
  return s;
1444
1451
  }
@@ -1454,7 +1461,7 @@ ${g}` : g;
1454
1461
  let e = this.rules.block.def.exec(t);
1455
1462
  if (e) {
1456
1463
  let n = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), i = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", s = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
1457
- return { type: "def", tag: n, raw: Ee(e[0], `
1464
+ return { type: "def", tag: n, raw: _e(e[0], `
1458
1465
  `), href: i, title: s };
1459
1466
  }
1460
1467
  }
@@ -1462,7 +1469,7 @@ ${g}` : g;
1462
1469
  let e = this.rules.block.table.exec(t);
1463
1470
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
1464
1471
  let n = hs(e[1]), i = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1465
- `) : [], l = { type: "table", raw: Ee(e[0], `
1472
+ `) : [], l = { type: "table", raw: _e(e[0], `
1466
1473
  `), header: [], align: [], rows: [] };
1467
1474
  if (n.length === i.length) {
1468
1475
  for (let o of i) this.rules.other.tableAlignRight.test(o) ? l.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? l.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? l.align.push("left") : l.align.push(null);
@@ -1475,7 +1482,7 @@ ${g}` : g;
1475
1482
  let e = this.rules.block.lheading.exec(t);
1476
1483
  if (e) {
1477
1484
  let n = e[1].trim();
1478
- return { type: "heading", raw: Ee(e[0], `
1485
+ return { type: "heading", raw: _e(e[0], `
1479
1486
  `), depth: e[2].charAt(0) === "=" ? 1 : 2, text: n, tokens: this.lexer.inline(n) };
1480
1487
  }
1481
1488
  }
@@ -1505,7 +1512,7 @@ ${g}` : g;
1505
1512
  let n = e[2].trim();
1506
1513
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
1507
1514
  if (!this.rules.other.endAngleBracket.test(n)) return;
1508
- let l = Ee(n.slice(0, -1), "\\");
1515
+ let l = _e(n.slice(0, -1), "\\");
1509
1516
  if ((n.length - l.length) % 2 === 0) return;
1510
1517
  } else {
1511
1518
  let l = yr(e[2], "()");
@@ -1537,8 +1544,8 @@ ${g}` : g;
1537
1544
  emStrong(t, e, n = "") {
1538
1545
  let i = this.rules.inline.emStrongLDelim.exec(t);
1539
1546
  if (!(!i || !i[1] && !i[2] && !i[3] && !i[4] || i[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(i[1] || i[3]) || !n || this.rules.inline.punctuation.exec(n))) {
1540
- let s = [...i[0]].length - 1, l, o, h = s, c = 0, k = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1541
- for (k.lastIndex = 0, e = e.slice(-1 * t.length + s); (i = k.exec(e)) !== null; ) {
1547
+ let s = [...i[0]].length - 1, l, o, h = s, c = 0, y = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1548
+ for (y.lastIndex = 0, e = e.slice(-1 * t.length + s); (i = y.exec(e)) !== null; ) {
1542
1549
  if (l = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !l) continue;
1543
1550
  if (o = [...l].length, i[3] || i[4]) {
1544
1551
  h += o;
@@ -1549,13 +1556,13 @@ ${g}` : g;
1549
1556
  }
1550
1557
  if (h -= o, h > 0) continue;
1551
1558
  o = Math.min(o, o + h + c);
1552
- let g = [...i[0]][0].length, m = t.slice(0, s + i.index + g + o);
1559
+ let g = [...i[0]][0].length, x = t.slice(0, s + i.index + g + o);
1553
1560
  if (Math.min(s, o) % 2) {
1554
- let y = m.slice(1, -1);
1555
- return { type: "em", raw: m, text: y, tokens: this.lexer.inlineTokens(y) };
1561
+ let B = x.slice(1, -1);
1562
+ return { type: "em", raw: x, text: B, tokens: this.lexer.inlineTokens(B) };
1556
1563
  }
1557
- let w = m.slice(2, -2);
1558
- return { type: "strong", raw: m, text: w, tokens: this.lexer.inlineTokens(w) };
1564
+ let v = x.slice(2, -2);
1565
+ return { type: "strong", raw: x, text: v, tokens: this.lexer.inlineTokens(v) };
1559
1566
  }
1560
1567
  }
1561
1568
  }
@@ -1582,8 +1589,8 @@ ${g}` : g;
1582
1589
  }
1583
1590
  if (h -= o, h > 0) continue;
1584
1591
  o = Math.min(o, o + h);
1585
- let k = [...i[0]][0].length, g = t.slice(0, s + i.index + k + o), m = g.slice(s, -s);
1586
- return { type: "del", raw: g, text: m, tokens: this.lexer.inlineTokens(m) };
1592
+ let y = [...i[0]][0].length, g = t.slice(0, s + i.index + y + o), x = g.slice(s, -s);
1593
+ return { type: "del", raw: g, text: x, tokens: this.lexer.inlineTokens(x) };
1587
1594
  }
1588
1595
  }
1589
1596
  }
@@ -1616,25 +1623,25 @@ ${g}` : g;
1616
1623
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1617
1624
  }
1618
1625
  }
1619
- }, d(Ke, "w"), Ke), Re, de = (Re = class {
1626
+ }, p(Qe, "w"), Qe), Ie, he = (Ie = class {
1620
1627
  constructor(t) {
1621
- O(this, "tokens");
1622
- O(this, "options");
1623
- O(this, "state");
1624
- O(this, "inlineQueue");
1625
- O(this, "tokenizer");
1626
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || Le, this.options.tokenizer = this.options.tokenizer || new Mt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1627
- let e = { other: ne, block: Rt.normal, inline: ut.normal };
1628
- this.options.pedantic ? (e.block = Rt.pedantic, e.inline = ut.pedantic) : this.options.gfm && (e.block = Rt.gfm, this.options.breaks ? e.inline = ut.breaks : e.inline = ut.gfm), this.tokenizer.rules = e;
1628
+ D(this, "tokens");
1629
+ D(this, "options");
1630
+ D(this, "state");
1631
+ D(this, "inlineQueue");
1632
+ D(this, "tokenizer");
1633
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || ze, this.options.tokenizer = this.options.tokenizer || new Ot(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1634
+ let e = { other: ne, block: _t.normal, inline: ht.normal };
1635
+ this.options.pedantic ? (e.block = _t.pedantic, e.inline = ht.pedantic) : this.options.gfm && (e.block = _t.gfm, this.options.breaks ? e.inline = ht.breaks : e.inline = ht.gfm), this.tokenizer.rules = e;
1629
1636
  }
1630
1637
  static get rules() {
1631
- return { block: Rt, inline: ut };
1638
+ return { block: _t, inline: ht };
1632
1639
  }
1633
1640
  static lex(t, e) {
1634
- return new Re(e).lex(t);
1641
+ return new Ie(e).lex(t);
1635
1642
  }
1636
1643
  static lexInline(t, e) {
1637
- return new Re(e).inlineTokens(t);
1644
+ return new Ie(e).inlineTokens(t);
1638
1645
  }
1639
1646
  lex(t) {
1640
1647
  t = t.replace(ne.carriageReturn, `
@@ -1716,8 +1723,8 @@ ${g}` : g;
1716
1723
  let l = t;
1717
1724
  if (this.options.extensions?.startBlock) {
1718
1725
  let o = 1 / 0, h = t.slice(1), c;
1719
- this.options.extensions.startBlock.forEach((k) => {
1720
- c = k.call({ lexer: this }, h), typeof c == "number" && c >= 0 && (o = Math.min(o, c));
1726
+ this.options.extensions.startBlock.forEach((y) => {
1727
+ c = y.call({ lexer: this }, h), typeof c == "number" && c >= 0 && (o = Math.min(o, c));
1721
1728
  }), o < 1 / 0 && o >= 0 && (l = t.substring(0, o + 1));
1722
1729
  }
1723
1730
  if (this.state.top && (s = this.tokenizer.paragraph(l))) {
@@ -1810,14 +1817,14 @@ ${g}` : g;
1810
1817
  t = t.substring(c.raw.length), e.push(c);
1811
1818
  continue;
1812
1819
  }
1813
- let k = t;
1820
+ let y = t;
1814
1821
  if (this.options.extensions?.startInline) {
1815
- let g = 1 / 0, m = t.slice(1), w;
1816
- this.options.extensions.startInline.forEach((y) => {
1817
- w = y.call({ lexer: this }, m), typeof w == "number" && w >= 0 && (g = Math.min(g, w));
1818
- }), g < 1 / 0 && g >= 0 && (k = t.substring(0, g + 1));
1822
+ let g = 1 / 0, x = t.slice(1), v;
1823
+ this.options.extensions.startInline.forEach((B) => {
1824
+ v = B.call({ lexer: this }, x), typeof v == "number" && v >= 0 && (g = Math.min(g, v));
1825
+ }), g < 1 / 0 && g >= 0 && (y = t.substring(0, g + 1));
1819
1826
  }
1820
- if (c = this.tokenizer.inlineText(k)) {
1827
+ if (c = this.tokenizer.inlineText(y)) {
1821
1828
  t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (o = c.raw.slice(-1)), l = !0;
1822
1829
  let g = e.at(-1);
1823
1830
  g?.type === "text" ? (g.raw += c.raw, g.text += c.text) : e.push(c);
@@ -1835,11 +1842,11 @@ ${g}` : g;
1835
1842
  if (this.options.silent) console.error(e);
1836
1843
  else throw new Error(e);
1837
1844
  }
1838
- }, d(Re, "l"), Re), Qe, Lt = (Qe = class {
1845
+ }, p(Ie, "l"), Ie), Je, Mt = (Je = class {
1839
1846
  constructor(t) {
1840
- O(this, "options");
1841
- O(this, "parser");
1842
- this.options = t || Le;
1847
+ D(this, "options");
1848
+ D(this, "parser");
1849
+ this.options = t || ze;
1843
1850
  }
1844
1851
  space(t) {
1845
1852
  return "";
@@ -1847,8 +1854,8 @@ ${g}` : g;
1847
1854
  code({ text: t, lang: e, escaped: n }) {
1848
1855
  let i = (e || "").match(ne.notSpaceStart)?.[0], s = t.replace(ne.endingNewline, "") + `
1849
1856
  `;
1850
- return i ? '<pre><code class="language-' + ke(i) + '">' + (n ? s : ke(s, !0)) + `</code></pre>
1851
- ` : "<pre><code>" + (n ? s : ke(s, !0)) + `</code></pre>
1857
+ return i ? '<pre><code class="language-' + ye(i) + '">' + (n ? s : ye(s, !0)) + `</code></pre>
1858
+ ` : "<pre><code>" + (n ? s : ye(s, !0)) + `</code></pre>
1852
1859
  `;
1853
1860
  }
1854
1861
  blockquote({ tokens: t }) {
@@ -1926,7 +1933,7 @@ ${t}</tr>
1926
1933
  return `<em>${this.parser.parseInline(t)}</em>`;
1927
1934
  }
1928
1935
  codespan({ text: t }) {
1929
- return `<code>${ke(t, !0)}</code>`;
1936
+ return `<code>${ye(t, !0)}</code>`;
1930
1937
  }
1931
1938
  br(t) {
1932
1939
  return "<br>";
@@ -1939,20 +1946,20 @@ ${t}</tr>
1939
1946
  if (s === null) return i;
1940
1947
  t = s;
1941
1948
  let l = '<a href="' + t + '"';
1942
- return e && (l += ' title="' + ke(e) + '"'), l += ">" + i + "</a>", l;
1949
+ return e && (l += ' title="' + ye(e) + '"'), l += ">" + i + "</a>", l;
1943
1950
  }
1944
1951
  image({ href: t, title: e, text: n, tokens: i }) {
1945
1952
  i && (n = this.parser.parseInline(i, this.parser.textRenderer));
1946
1953
  let s = us(t);
1947
- if (s === null) return ke(n);
1954
+ if (s === null) return ye(n);
1948
1955
  t = s;
1949
- let l = `<img src="${t}" alt="${ke(n)}"`;
1950
- return e && (l += ` title="${ke(e)}"`), l += ">", l;
1956
+ let l = `<img src="${t}" alt="${ye(n)}"`;
1957
+ return e && (l += ` title="${ye(e)}"`), l += ">", l;
1951
1958
  }
1952
1959
  text(t) {
1953
- return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : ke(t.text);
1960
+ return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : ye(t.text);
1954
1961
  }
1955
- }, d(Qe, "y"), Qe), Je, bn = (Je = class {
1962
+ }, p(Je, "y"), Je), et, bn = (et = class {
1956
1963
  strong({ text: t }) {
1957
1964
  return t;
1958
1965
  }
@@ -1983,18 +1990,18 @@ ${t}</tr>
1983
1990
  checkbox({ raw: t }) {
1984
1991
  return t;
1985
1992
  }
1986
- }, d(Je, "L"), Je), Ie, pe = (Ie = class {
1993
+ }, p(et, "L"), et), De, de = (De = class {
1987
1994
  constructor(t) {
1988
- O(this, "options");
1989
- O(this, "renderer");
1990
- O(this, "textRenderer");
1991
- this.options = t || Le, this.options.renderer = this.options.renderer || new Lt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new bn();
1995
+ D(this, "options");
1996
+ D(this, "renderer");
1997
+ D(this, "textRenderer");
1998
+ this.options = t || ze, this.options.renderer = this.options.renderer || new Mt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new bn();
1992
1999
  }
1993
2000
  static parse(t, e) {
1994
- return new Ie(e).parse(t);
2001
+ return new De(e).parse(t);
1995
2002
  }
1996
2003
  static parseInline(t, e) {
1997
- return new Ie(e).parseInline(t);
2004
+ return new De(e).parseInline(t);
1998
2005
  }
1999
2006
  parse(t) {
2000
2007
  this.renderer.parser = this;
@@ -2134,11 +2141,11 @@ ${t}</tr>
2134
2141
  }
2135
2142
  return n;
2136
2143
  }
2137
- }, d(Ie, "l"), Ie), _e, dt = (_e = class {
2144
+ }, p(De, "l"), De), Re, pt = (Re = class {
2138
2145
  constructor(t) {
2139
- O(this, "options");
2140
- O(this, "block");
2141
- this.options = t || Le;
2146
+ D(this, "options");
2147
+ D(this, "block");
2148
+ this.options = t || ze;
2142
2149
  }
2143
2150
  preprocess(t) {
2144
2151
  return t;
@@ -2153,23 +2160,23 @@ ${t}</tr>
2153
2160
  return t;
2154
2161
  }
2155
2162
  provideLexer(t = this.block) {
2156
- return t ? de.lex : de.lexInline;
2163
+ return t ? he.lex : he.lexInline;
2157
2164
  }
2158
2165
  provideParser(t = this.block) {
2159
- return t ? pe.parse : pe.parseInline;
2166
+ return t ? de.parse : de.parseInline;
2160
2167
  }
2161
- }, d(_e, "P"), O(_e, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), O(_e, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _e), et, Tr = (et = class {
2168
+ }, p(Re, "P"), D(Re, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), D(Re, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Re), tt, Tr = (tt = class {
2162
2169
  constructor(...t) {
2163
- O(this, "defaults", cn());
2164
- O(this, "options", this.setOptions);
2165
- O(this, "parse", this.parseMarkdown(!0));
2166
- O(this, "parseInline", this.parseMarkdown(!1));
2167
- O(this, "Parser", pe);
2168
- O(this, "Renderer", Lt);
2169
- O(this, "TextRenderer", bn);
2170
- O(this, "Lexer", de);
2171
- O(this, "Tokenizer", Mt);
2172
- O(this, "Hooks", dt);
2170
+ D(this, "defaults", cn());
2171
+ D(this, "options", this.setOptions);
2172
+ D(this, "parse", this.parseMarkdown(!0));
2173
+ D(this, "parseInline", this.parseMarkdown(!1));
2174
+ D(this, "Parser", de);
2175
+ D(this, "Renderer", Mt);
2176
+ D(this, "TextRenderer", bn);
2177
+ D(this, "Lexer", he);
2178
+ D(this, "Tokenizer", Ot);
2179
+ D(this, "Hooks", pt);
2173
2180
  this.use(...t);
2174
2181
  }
2175
2182
  walkTokens(t, e) {
@@ -2216,51 +2223,51 @@ ${t}</tr>
2216
2223
  }
2217
2224
  "childTokens" in s && s.childTokens && (e.childTokens[s.name] = s.childTokens);
2218
2225
  }), i.extensions = e), n.renderer) {
2219
- let s = this.defaults.renderer || new Lt(this.defaults);
2226
+ let s = this.defaults.renderer || new Mt(this.defaults);
2220
2227
  for (let l in n.renderer) {
2221
2228
  if (!(l in s)) throw new Error(`renderer '${l}' does not exist`);
2222
2229
  if (["options", "parser"].includes(l)) continue;
2223
2230
  let o = l, h = n.renderer[o], c = s[o];
2224
- s[o] = (...k) => {
2225
- let g = h.apply(s, k);
2226
- return g === !1 && (g = c.apply(s, k)), g || "";
2231
+ s[o] = (...y) => {
2232
+ let g = h.apply(s, y);
2233
+ return g === !1 && (g = c.apply(s, y)), g || "";
2227
2234
  };
2228
2235
  }
2229
2236
  i.renderer = s;
2230
2237
  }
2231
2238
  if (n.tokenizer) {
2232
- let s = this.defaults.tokenizer || new Mt(this.defaults);
2239
+ let s = this.defaults.tokenizer || new Ot(this.defaults);
2233
2240
  for (let l in n.tokenizer) {
2234
2241
  if (!(l in s)) throw new Error(`tokenizer '${l}' does not exist`);
2235
2242
  if (["options", "rules", "lexer"].includes(l)) continue;
2236
2243
  let o = l, h = n.tokenizer[o], c = s[o];
2237
- s[o] = (...k) => {
2238
- let g = h.apply(s, k);
2239
- return g === !1 && (g = c.apply(s, k)), g;
2244
+ s[o] = (...y) => {
2245
+ let g = h.apply(s, y);
2246
+ return g === !1 && (g = c.apply(s, y)), g;
2240
2247
  };
2241
2248
  }
2242
2249
  i.tokenizer = s;
2243
2250
  }
2244
2251
  if (n.hooks) {
2245
- let s = this.defaults.hooks || new dt();
2252
+ let s = this.defaults.hooks || new pt();
2246
2253
  for (let l in n.hooks) {
2247
2254
  if (!(l in s)) throw new Error(`hook '${l}' does not exist`);
2248
2255
  if (["options", "block"].includes(l)) continue;
2249
2256
  let o = l, h = n.hooks[o], c = s[o];
2250
- dt.passThroughHooks.has(l) ? s[o] = (k) => {
2251
- if (this.defaults.async && dt.passThroughHooksRespectAsync.has(l)) return (async () => {
2252
- let m = await h.call(s, k);
2253
- return c.call(s, m);
2257
+ pt.passThroughHooks.has(l) ? s[o] = (y) => {
2258
+ if (this.defaults.async && pt.passThroughHooksRespectAsync.has(l)) return (async () => {
2259
+ let x = await h.call(s, y);
2260
+ return c.call(s, x);
2254
2261
  })();
2255
- let g = h.call(s, k);
2262
+ let g = h.call(s, y);
2256
2263
  return c.call(s, g);
2257
- } : s[o] = (...k) => {
2264
+ } : s[o] = (...y) => {
2258
2265
  if (this.defaults.async) return (async () => {
2259
- let m = await h.apply(s, k);
2260
- return m === !1 && (m = await c.apply(s, k)), m;
2266
+ let x = await h.apply(s, y);
2267
+ return x === !1 && (x = await c.apply(s, y)), x;
2261
2268
  })();
2262
- let g = h.apply(s, k);
2263
- return g === !1 && (g = c.apply(s, k)), g;
2269
+ let g = h.apply(s, y);
2270
+ return g === !1 && (g = c.apply(s, y)), g;
2264
2271
  };
2265
2272
  }
2266
2273
  i.hooks = s;
@@ -2279,10 +2286,10 @@ ${t}</tr>
2279
2286
  return this.defaults = { ...this.defaults, ...t }, this;
2280
2287
  }
2281
2288
  lexer(t, e) {
2282
- return de.lex(t, e ?? this.defaults);
2289
+ return he.lex(t, e ?? this.defaults);
2283
2290
  }
2284
2291
  parser(t, e) {
2285
- return pe.parse(t, e ?? this.defaults);
2292
+ return de.parse(t, e ?? this.defaults);
2286
2293
  }
2287
2294
  parseMarkdown(t) {
2288
2295
  return (e, n) => {
@@ -2291,16 +2298,16 @@ ${t}</tr>
2291
2298
  if (typeof e > "u" || e === null) return l(new Error("marked(): input parameter is undefined or null"));
2292
2299
  if (typeof e != "string") return l(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
2293
2300
  if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
2294
- let o = s.hooks ? await s.hooks.preprocess(e) : e, h = await (s.hooks ? await s.hooks.provideLexer(t) : t ? de.lex : de.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(h) : h;
2301
+ let o = s.hooks ? await s.hooks.preprocess(e) : e, h = await (s.hooks ? await s.hooks.provideLexer(t) : t ? he.lex : he.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(h) : h;
2295
2302
  s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
2296
- let k = await (s.hooks ? await s.hooks.provideParser(t) : t ? pe.parse : pe.parseInline)(c, s);
2297
- return s.hooks ? await s.hooks.postprocess(k) : k;
2303
+ let y = await (s.hooks ? await s.hooks.provideParser(t) : t ? de.parse : de.parseInline)(c, s);
2304
+ return s.hooks ? await s.hooks.postprocess(y) : y;
2298
2305
  })().catch(l);
2299
2306
  try {
2300
2307
  s.hooks && (e = s.hooks.preprocess(e));
2301
- let o = (s.hooks ? s.hooks.provideLexer(t) : t ? de.lex : de.lexInline)(e, s);
2308
+ let o = (s.hooks ? s.hooks.provideLexer(t) : t ? he.lex : he.lexInline)(e, s);
2302
2309
  s.hooks && (o = s.hooks.processAllTokens(o)), s.walkTokens && this.walkTokens(o, s.walkTokens);
2303
- let h = (s.hooks ? s.hooks.provideParser(t) : t ? pe.parse : pe.parseInline)(o, s);
2310
+ let h = (s.hooks ? s.hooks.provideParser(t) : t ? de.parse : de.parseInline)(o, s);
2304
2311
  return s.hooks && (h = s.hooks.postprocess(h)), h;
2305
2312
  } catch (o) {
2306
2313
  return l(o);
@@ -2311,47 +2318,47 @@ ${t}</tr>
2311
2318
  return (n) => {
2312
2319
  if (n.message += `
2313
2320
  Please report this to https://github.com/markedjs/marked.`, t) {
2314
- let i = "<p>An error occurred:</p><pre>" + ke(n.message + "", !0) + "</pre>";
2321
+ let i = "<p>An error occurred:</p><pre>" + ye(n.message + "", !0) + "</pre>";
2315
2322
  return e ? Promise.resolve(i) : i;
2316
2323
  }
2317
2324
  if (e) return Promise.reject(n);
2318
2325
  throw n;
2319
2326
  };
2320
2327
  }
2321
- }, d(et, "q"), et), Me = new Tr();
2328
+ }, p(tt, "q"), tt), Ne = new Tr();
2322
2329
  function N(a, t) {
2323
- return Me.parse(a, t);
2330
+ return Ne.parse(a, t);
2324
2331
  }
2325
- d(N, "g");
2332
+ p(N, "g");
2326
2333
  N.options = N.setOptions = function(a) {
2327
- return Me.setOptions(a), N.defaults = Me.defaults, ws(N.defaults), N;
2334
+ return Ne.setOptions(a), N.defaults = Ne.defaults, ws(N.defaults), N;
2328
2335
  };
2329
2336
  N.getDefaults = cn;
2330
- N.defaults = Le;
2337
+ N.defaults = ze;
2331
2338
  N.use = function(...a) {
2332
- return Me.use(...a), N.defaults = Me.defaults, ws(N.defaults), N;
2339
+ return Ne.use(...a), N.defaults = Ne.defaults, ws(N.defaults), N;
2333
2340
  };
2334
2341
  N.walkTokens = function(a, t) {
2335
- return Me.walkTokens(a, t);
2342
+ return Ne.walkTokens(a, t);
2336
2343
  };
2337
- N.parseInline = Me.parseInline;
2338
- N.Parser = pe;
2339
- N.parser = pe.parse;
2340
- N.Renderer = Lt;
2344
+ N.parseInline = Ne.parseInline;
2345
+ N.Parser = de;
2346
+ N.parser = de.parse;
2347
+ N.Renderer = Mt;
2341
2348
  N.TextRenderer = bn;
2342
- N.Lexer = de;
2343
- N.lexer = de.lex;
2344
- N.Tokenizer = Mt;
2345
- N.Hooks = dt;
2349
+ N.Lexer = he;
2350
+ N.lexer = he.lex;
2351
+ N.Tokenizer = Ot;
2352
+ N.Hooks = pt;
2346
2353
  N.parse = N;
2347
2354
  N.options;
2348
2355
  N.setOptions;
2349
2356
  N.use;
2350
2357
  N.walkTokens;
2351
2358
  N.parseInline;
2352
- pe.parse;
2353
- de.lex;
2354
- const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2359
+ de.parse;
2360
+ he.lex;
2361
+ const Sr = ["innerHTML"], Rt = /* @__PURE__ */ Te({
2355
2362
  __name: "ChatRichText",
2356
2363
  props: {
2357
2364
  text: {},
@@ -2361,7 +2368,7 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2361
2368
  setup(a) {
2362
2369
  const t = a, e = fs(t.text);
2363
2370
  let n;
2364
- Ct(
2371
+ It(
2365
2372
  [() => t.text, () => t.streaming],
2366
2373
  ([l, o]) => {
2367
2374
  if (!o) {
@@ -2389,18 +2396,18 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2389
2396
  }
2390
2397
  return c ? `<a href="${l}">${o}</a>` : `<a href="${l}" target="_blank" rel="noopener noreferrer">${o}</a>`;
2391
2398
  }, N.setOptions({ breaks: !0, gfm: !0, renderer: i });
2392
- const s = G(() => {
2399
+ const s = j(() => {
2393
2400
  const l = e.value;
2394
2401
  if (!l) return "";
2395
2402
  const o = N.parse(l, { async: !1 });
2396
2403
  return zi.sanitize(o, { ADD_ATTR: ["target"], ADD_DATA_URI_TAGS: ["img"] });
2397
2404
  });
2398
2405
  return (l, o) => (T(), S("div", {
2399
- class: _(["chat-msg-prose break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed", a.inverted ? "chat-msg-prose-invert" : ""]),
2406
+ 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" : ""]),
2400
2407
  innerHTML: s.value
2401
2408
  }, null, 10, Sr));
2402
2409
  }
2403
- }), Ar = 80, Er = /* @__PURE__ */ ve({
2410
+ }), Ar = 80, Er = /* @__PURE__ */ Te({
2404
2411
  __name: "ChatScroller",
2405
2412
  setup(a, { expose: t }) {
2406
2413
  const e = ie(), n = ie();
@@ -2409,16 +2416,16 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2409
2416
  const c = e.value;
2410
2417
  c && (c.scrollTop = c.scrollHeight);
2411
2418
  }
2412
- d(l, "scrollToBottom");
2419
+ p(l, "scrollToBottom");
2413
2420
  function o() {
2414
2421
  const c = e.value;
2415
2422
  c && (i = c.scrollHeight - c.scrollTop - c.clientHeight <= Ar);
2416
2423
  }
2417
- d(o, "onScroll");
2424
+ p(o, "onScroll");
2418
2425
  function h() {
2419
2426
  i = !0, l();
2420
2427
  }
2421
- return d(h, "pin"), t({ pin: h }), Nt(() => {
2428
+ return p(h, "pin"), t({ pin: h }), Lt(() => {
2422
2429
  requestAnimationFrame(() => {
2423
2430
  l(), requestAnimationFrame(l);
2424
2431
  }), n.value && (s = new ResizeObserver(() => {
@@ -2426,13 +2433,13 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2426
2433
  }), s.observe(n.value));
2427
2434
  }), gs(() => {
2428
2435
  s?.disconnect();
2429
- }), (c, k) => (T(), S("div", {
2436
+ }), (c, y) => (T(), S("div", {
2430
2437
  ref_key: "viewport",
2431
2438
  ref: e,
2432
2439
  class: "overflow-y-auto overflow-x-hidden min-h-0 flex flex-col [overflow-anchor:none] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
2433
2440
  onScrollPassive: o
2434
2441
  }, [
2435
- v("div", {
2442
+ w("div", {
2436
2443
  ref_key: "content",
2437
2444
  ref: n,
2438
2445
  class: "flex-1 flex flex-col"
@@ -2447,29 +2454,29 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2447
2454
  }, Ir = {
2448
2455
  key: 0,
2449
2456
  class: "flex flex-col items-center justify-center px-4 min-h-full"
2450
- }, Cr = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Dr = ["src", "alt"], Or = ["title"], Mr = {
2457
+ }, Dr = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Cr = ["src", "alt"], Or = ["title"], Mr = {
2451
2458
  key: 0,
2452
2459
  class: "flex items-center gap-3 py-3 px-2"
2453
2460
  }, Lr = ["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"], Nr = { class: "max-w-[85%] min-w-0" }, zr = ["href"], $r = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-streaming"], Pr = ["data-test", "data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-streaming"], Br = {
2454
2461
  key: 0,
2455
2462
  class: "flex-shrink-0 size-7 @sm/chat:size-8"
2456
- }, Fr = ["src", "alt"], Ur = ["src", "alt"], Hr = ["src"], jr = ["href"], Gr = {
2457
- key: 1,
2463
+ }, Fr = ["src", "alt"], Ur = ["src", "alt"], Hr = ["src"], jr = ["href"], Gr = ["data-working-description"], Wr = { class: "truncate" }, qr = {
2464
+ key: 2,
2458
2465
  "data-test": "messaging-thinking-indicator",
2459
2466
  class: "flex gap-2 justify-start items-center mb-4"
2460
- }, Wr = ["src", "alt"], qr = {
2467
+ }, Yr = ["src", "alt"], Vr = {
2461
2468
  key: 0,
2462
2469
  class: "flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
2463
- }, Yr = ["src", "alt"], Vr = { class: "max-w-20 truncate" }, Zr = ["onClick"], Xr = {
2470
+ }, Zr = ["src", "alt"], Xr = { class: "max-w-20 truncate" }, Kr = ["onClick"], Qr = {
2464
2471
  key: 0,
2465
2472
  class: "shrink-0 flex items-center justify-center size-14"
2466
- }, Kr = ["disabled"], Qr = {
2473
+ }, Jr = ["disabled"], ea = {
2467
2474
  key: 0,
2468
2475
  class: "i-svg-spinners-ring-resize size-4"
2469
- }, Jr = {
2476
+ }, ta = {
2470
2477
  key: 1,
2471
2478
  class: "i-tabler-paperclip size-5"
2472
- }, ea = ["placeholder", "disabled"], ta = ["disabled"], pa = /* @__PURE__ */ ve({
2479
+ }, na = ["placeholder", "disabled"], sa = ["disabled"], ga = /* @__PURE__ */ Te({
2473
2480
  __name: "ElAgentChat",
2474
2481
  props: {
2475
2482
  chatController: {},
@@ -2486,364 +2493,376 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2486
2493
  private: { icon: "i-tabler-lock", label: "Private", tooltip: "Only you can see this conversation" },
2487
2494
  org: { icon: "i-tabler-users", label: "Workspace", tooltip: "Visible to workspace members" },
2488
2495
  public: { icon: "i-tabler-globe", label: "Public", tooltip: "Anyone with the link can see this" }
2489
- }, e = G(() => {
2490
- const I = { ...t[a.scope] };
2491
- return a.scope === "org" && a.scopeName && (I.label = a.scopeName, I.tooltip = `Visible to ${a.scopeName} members`), I;
2496
+ }, e = j(() => {
2497
+ const R = { ...t[a.scope] };
2498
+ return a.scope === "org" && a.scopeName && (R.label = a.scopeName, R.tooltip = `Visible to ${a.scopeName} members`), R;
2492
2499
  }), n = ie(""), i = ie(!1), s = ie(), l = ie(), o = ie(), h = ie([]), c = ie(!1);
2493
- function k(I) {
2494
- return I ? /\[[^\]]+\]\([^)]+\)/.test(I) : !1;
2495
- }
2496
- d(k, "containsMarkdownLink");
2497
- function g(I) {
2498
- return I.sender === "system" && (!!I.issue || I.id === H.value);
2499
- }
2500
- d(g, "isSystemExplainerMessage");
2501
- function m(I, b) {
2502
- const p = I[b], E = I[b + 1];
2503
- return !E || E.sender !== p.sender;
2504
- }
2505
- d(m, "shouldShowAvatar");
2506
- const w = G(() => a.chatController?.textState.value), y = G(() => w.value?.isConnected ?? !1), A = G(() => w.value?.isThinking ?? !1), C = G(() => w.value?.connectionStatus === "disconnected" && !!w.value?.error), z = G(() => w.value?.connectionStatus !== "connected" && !w.value?.error), Z = G(() => w.value?.error), ee = G(() => a.chatController?.sharedMessages.value ?? []), H = G(() => {
2507
- if (!A.value) return;
2508
- const I = ee.value, b = I[I.length - 1];
2500
+ function y(R) {
2501
+ return R ? /\[[^\]]+\]\([^)]+\)/.test(R) : !1;
2502
+ }
2503
+ p(y, "containsMarkdownLink");
2504
+ function g(R) {
2505
+ return R.sender === "system" && (!!R.issue || R.id === K.value);
2506
+ }
2507
+ p(g, "isSystemExplainerMessage");
2508
+ function x(R, b) {
2509
+ const d = R[b], $ = R[b + 1];
2510
+ return !$ || $.sender !== d.sender;
2511
+ }
2512
+ p(x, "shouldShowAvatar");
2513
+ const v = j(() => a.chatController?.textState.value), B = j(() => v.value?.isConnected ?? !1), m = j(() => v.value?.isThinking ?? !1), _ = j(() => v.value?.connectionStatus === "disconnected" && !!v.value?.error), L = j(() => v.value?.connectionStatus !== "connected" && !v.value?.error), P = j(() => v.value?.error), G = j(() => a.chatController?.sharedMessages.value ?? []), q = j(() => v.value?.workingDescription?.trim() || void 0), K = j(() => {
2514
+ if (!m.value) return;
2515
+ const R = G.value, b = R[R.length - 1];
2509
2516
  return b?.sender === "agent" || b?.sender === "system" ? b.id : void 0;
2510
- }), ae = G(() => A.value ? H.value === void 0 : !1), B = G(() => w.value?.sendBlockedReason), Q = G(() => !y.value || B.value !== void 0), ye = G(() => C.value ? "Agent is offline" : z.value ? "Connecting..." : B.value === "agent_deleted" ? "This assistant was deleted" : B.value === "account" ? "Resolve the billing issue above to continue" : "Message"), Te = G(() => (n.value.trim() || h.value.length > 0) && !Q.value && !c.value), M = G(() => a.variant === "light"), ft = G(
2511
- () => M.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2512
- ), nt = G(() => M.value ? "text-theme-300" : "text-white/30");
2513
- Nt(async () => {
2514
- a.chatController && !y.value && await a.chatController.startTextConversation();
2517
+ }), U = j(() => !m.value || q.value ? !1 : K.value === void 0), Q = j(() => v.value?.sendBlockedReason), pe = j(() => !B.value || Q.value !== void 0), Se = j(() => _.value ? "Agent is offline" : L.value ? "Connecting..." : Q.value === "agent_deleted" ? "This assistant was deleted" : Q.value === "account" ? "Resolve the billing issue above to continue" : "Message"), Ce = j(() => (n.value.trim() || h.value.length > 0) && !pe.value && !c.value), O = j(() => a.variant === "light"), gt = j(
2518
+ () => O.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
2519
+ ), st = j(() => O.value ? "text-theme-300" : "text-white/30");
2520
+ Lt(async () => {
2521
+ a.chatController && !B.value && await a.chatController.startTextConversation();
2515
2522
  });
2516
- async function gt() {
2517
- const I = n.value.trim(), b = h.value.length > 0;
2518
- if (!I && !b || !a.chatController || Q.value || c.value)
2523
+ async function Y() {
2524
+ const R = n.value.trim(), b = h.value.length > 0;
2525
+ if (!R && !b || !a.chatController || pe.value || c.value)
2519
2526
  return;
2520
- const p = n.value, E = b ? [...h.value] : void 0;
2521
- n.value = "", h.value = [], l.value && (l.value.style.height = "auto", l.value.focus()), s.value?.pin(), await a.chatController.sendChatMessage(p, E);
2527
+ const d = n.value, $ = b ? [...h.value] : void 0;
2528
+ n.value = "", h.value = [], l.value && (l.value.style.height = "auto", l.value.focus()), s.value?.pin(), await a.chatController.sendChatMessage(d, $);
2522
2529
  }
2523
- d(gt, "sendMessage");
2524
- async function q(I) {
2525
- I.key === "Enter" && !I.shiftKey && (I.preventDefault(), await gt());
2530
+ p(Y, "sendMessage");
2531
+ async function $e(R) {
2532
+ R.key === "Enter" && !R.shiftKey && (R.preventDefault(), await Y());
2526
2533
  }
2527
- d(q, "handleKeydown");
2528
- function Ne() {
2534
+ p($e, "handleKeydown");
2535
+ function Pe() {
2529
2536
  l.value && (l.value.style.height = "auto", l.value.style.height = `${Math.min(l.value.scrollHeight, 150)}px`);
2530
2537
  }
2531
- d(Ne, "adjustTextareaHeight"), Ct(n, () => Bs(() => Ne()));
2532
- function ze() {
2538
+ p(Pe, "adjustTextareaHeight"), It(n, () => Bs(() => Pe()));
2539
+ function Be() {
2533
2540
  o.value?.click();
2534
2541
  }
2535
- d(ze, "triggerFileInput");
2536
- async function $e(I) {
2537
- const b = I.target, p = b.files?.[0];
2538
- if (!(!p || !a.uploadFn)) {
2542
+ p(Be, "triggerFileInput");
2543
+ async function $t(R) {
2544
+ const b = R.target, d = b.files?.[0];
2545
+ if (!(!d || !a.uploadFn)) {
2539
2546
  c.value = !0;
2540
2547
  try {
2541
- const E = await a.uploadFn(p);
2542
- h.value = [...h.value, E];
2543
- } catch (E) {
2544
- const X = E instanceof Error ? E.message : "Couldn't attach that file.";
2545
- a.chatController?.notify(`Upload failed — ${X}`);
2548
+ const $ = await a.uploadFn(d);
2549
+ h.value = [...h.value, $];
2550
+ } catch ($) {
2551
+ const C = $ instanceof Error ? $.message : "Couldn't attach that file.";
2552
+ a.chatController?.notify(`Upload failed — ${C}`);
2546
2553
  } finally {
2547
2554
  c.value = !1, b.value = "";
2548
2555
  }
2549
2556
  }
2550
2557
  }
2551
- d($e, "handleFileSelect");
2552
- function Pt(I) {
2553
- h.value = h.value.filter((b, p) => p !== I);
2558
+ p($t, "handleFileSelect");
2559
+ function Pt(R) {
2560
+ h.value = h.value.filter((b, d) => d !== R);
2554
2561
  }
2555
- d(Pt, "removeAttachment");
2556
- function mt(I, b) {
2562
+ p(Pt, "removeAttachment");
2563
+ function mt(R, b) {
2557
2564
  if (b === 0) {
2558
- const F = I[b];
2559
- return F?.timestamp ? bt(new Date(F.timestamp)) : null;
2560
- }
2561
- const p = I[b - 1], E = I[b];
2562
- if (!p?.timestamp || !E?.timestamp) return null;
2563
- const X = new Date(p.timestamp).getTime();
2564
- return new Date(E.timestamp).getTime() - X > 36e5 ? bt(new Date(E.timestamp)) : null;
2565
- }
2566
- d(mt, "shouldShowTimeDivider");
2567
- function bt(I) {
2568
- const b = /* @__PURE__ */ new Date(), p = I.toDateString() === b.toDateString(), E = new Date(b);
2569
- E.setDate(E.getDate() - 1);
2570
- const X = I.toDateString() === E.toDateString(), P = I.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2571
- if (p) return P;
2572
- if (X) return `Yesterday, ${P}`;
2573
- const Pe = I.getFullYear() === b.getFullYear();
2574
- return `${I.toLocaleDateString("en-US", {
2565
+ const we = R[b];
2566
+ return we?.timestamp ? it(new Date(we.timestamp)) : null;
2567
+ }
2568
+ const d = R[b - 1], $ = R[b];
2569
+ if (!d?.timestamp || !$?.timestamp) return null;
2570
+ const C = new Date(d.timestamp).getTime();
2571
+ return new Date($.timestamp).getTime() - C > 36e5 ? it(new Date($.timestamp)) : null;
2572
+ }
2573
+ p(mt, "shouldShowTimeDivider");
2574
+ function it(R) {
2575
+ const b = /* @__PURE__ */ new Date(), d = R.toDateString() === b.toDateString(), $ = new Date(b);
2576
+ $.setDate($.getDate() - 1);
2577
+ const C = R.toDateString() === $.toDateString(), fe = R.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2578
+ if (d) return fe;
2579
+ if (C) return `Yesterday, ${fe}`;
2580
+ const H = R.getFullYear() === b.getFullYear();
2581
+ return `${R.toLocaleDateString("en-US", {
2575
2582
  weekday: "long",
2576
2583
  month: "short",
2577
2584
  day: "numeric",
2578
- ...Pe ? {} : { year: "numeric" }
2579
- })}, ${P}`;
2585
+ ...H ? {} : { year: "numeric" }
2586
+ })}, ${fe}`;
2580
2587
  }
2581
- return d(bt, "formatTimeDivider"), (I, b) => (T(), S("div", _r, [
2582
- M.value ? V("", !0) : (T(), S("div", Rr, [
2583
- Ge(ri, {
2588
+ return p(it, "formatTimeDivider"), (R, b) => (T(), S("div", _r, [
2589
+ O.value ? Z("", !0) : (T(), S("div", Rr, [
2590
+ We(ri, {
2584
2591
  agent: a.agent,
2585
- "is-online": y.value
2592
+ "is-online": B.value
2586
2593
  }, null, 8, ["agent", "is-online"])
2587
2594
  ])),
2588
- C.value ? (T(), S("div", {
2595
+ _.value ? (T(), S("div", {
2589
2596
  key: 1,
2590
- class: _(["py-16 flex flex-col items-center justify-center gap-3 text-sm", M.value ? "text-theme-400" : "text-white/60"])
2597
+ class: A(["py-16 flex flex-col items-center justify-center gap-3 text-sm", O.value ? "text-theme-400" : "text-white/60"])
2591
2598
  }, [
2592
- v("i", {
2593
- class: _(["i-heroicons-cloud-arrow-down size-8", M.value ? "text-theme-300" : "text-white/40"])
2599
+ w("i", {
2600
+ class: A(["i-heroicons-cloud-arrow-down size-8", O.value ? "text-theme-300" : "text-white/40"])
2594
2601
  }, null, 2),
2595
- v("span", null, he(Z.value), 1)
2596
- ], 2)) : z.value ? (T(), S("div", {
2602
+ w("span", null, le(P.value), 1)
2603
+ ], 2)) : L.value ? (T(), S("div", {
2597
2604
  key: 2,
2598
- class: _(["py-16 flex flex-col items-center justify-center gap-2 text-sm", M.value ? "text-theme-400" : "text-theme-600"])
2605
+ class: A(["py-16 flex flex-col items-center justify-center gap-2 text-sm", O.value ? "text-theme-400" : "text-theme-600"])
2599
2606
  }, [
2600
- Ge(jn, { class: "size-4" })
2607
+ We(jn, { class: "size-4" })
2601
2608
  ], 2)) : a.setupHint ? (T(), S("div", {
2602
2609
  key: 3,
2603
- class: _(["flex items-center justify-center gap-1.5 py-2 text-[11px]", nt.value])
2610
+ class: A(["flex items-center justify-center gap-1.5 py-2 text-[11px]", st.value])
2604
2611
  }, [
2605
- b[9] || (b[9] = v("i", { class: "i-tabler-tool size-3" }, null, -1)),
2606
- v("span", null, he(a.setupHint), 1)
2607
- ], 2)) : V("", !0),
2608
- Ge(Er, {
2612
+ b[9] || (b[9] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2613
+ w("span", null, le(a.setupHint), 1)
2614
+ ], 2)) : Z("", !0),
2615
+ We(Er, {
2609
2616
  ref_key: "chatScroller",
2610
2617
  ref: s,
2611
2618
  class: "flex-1"
2612
2619
  }, {
2613
2620
  default: Fs(() => [
2614
- v("div", {
2615
- class: _(ee.value.length === 0 ? "flex-1 flex flex-col items-center justify-center px-3" : "pt-4 pb-[120px] px-3 space-y-1")
2621
+ w("div", {
2622
+ class: A(G.value.length === 0 ? "flex-1 flex flex-col items-center justify-center px-3" : "pt-4 pb-[120px] px-3 space-y-1")
2616
2623
  }, [
2617
- ee.value.length === 0 && !z.value && !C.value ? (T(), S("div", Ir, [
2618
- v("div", Cr, [
2619
- v("img", {
2624
+ G.value.length === 0 && !L.value && !_.value ? (T(), S("div", Ir, [
2625
+ w("div", Dr, [
2626
+ w("img", {
2620
2627
  src: a.agent.avatarUrl.value,
2621
2628
  alt: a.agent.displayName.value,
2622
- class: _(["size-full rounded-full object-cover ring-1", M.value ? "ring-black/5" : "ring-white/10"])
2623
- }, null, 10, Dr),
2624
- y.value ? (T(), S("span", {
2629
+ class: A(["size-full rounded-full object-cover ring-1", O.value ? "ring-black/5" : "ring-white/10"])
2630
+ }, null, 10, Cr),
2631
+ B.value ? (T(), S("span", {
2625
2632
  key: 0,
2626
- class: _(["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", M.value ? "bg-white" : "bg-theme-900"])
2633
+ 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", O.value ? "bg-white" : "bg-theme-900"])
2627
2634
  }, [...b[10] || (b[10] = [
2628
- v("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2629
- ])], 2)) : V("", !0)
2635
+ w("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
2636
+ ])], 2)) : Z("", !0)
2630
2637
  ]),
2631
- v("div", {
2632
- class: _(["text-base @sm/chat:text-lg font-semibold", M.value ? "text-theme-900" : "text-white"])
2633
- }, he(a.agent.displayName.value), 3),
2634
- v("p", {
2635
- class: _(["mt-1 text-center text-xs @sm/chat:text-sm", nt.value])
2636
- }, he(a.emptyStateMessage || "Type your message to get started."), 3),
2637
- v("div", {
2638
- class: _(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", M.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2638
+ w("div", {
2639
+ class: A(["text-base @sm/chat:text-lg font-semibold", O.value ? "text-theme-900" : "text-white"])
2640
+ }, le(a.agent.displayName.value), 3),
2641
+ w("p", {
2642
+ class: A(["mt-1 text-center text-xs @sm/chat:text-sm", st.value])
2643
+ }, le(a.emptyStateMessage || "Type your message to get started."), 3),
2644
+ w("div", {
2645
+ class: A(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", O.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2639
2646
  title: e.value.tooltip
2640
2647
  }, [
2641
- v("i", {
2642
- class: _([e.value.icon, "size-3"])
2648
+ w("i", {
2649
+ class: A([e.value.icon, "size-3"])
2643
2650
  }, null, 2),
2644
- v("span", null, he(e.value.label), 1)
2651
+ w("span", null, le(e.value.label), 1)
2645
2652
  ], 10, Or)
2646
- ])) : V("", !0),
2647
- (T(!0), S(Ze, null, Kt(ee.value, (p, E) => (T(), S(Ze, {
2648
- key: p.id
2653
+ ])) : Z("", !0),
2654
+ (T(!0), S(Xe, null, Kt(G.value, (d, $) => (T(), S(Xe, {
2655
+ key: d.id
2649
2656
  }, [
2650
- mt(ee.value, E) ? (T(), S("div", Mr, [
2651
- v("div", {
2652
- class: _(["flex-1 h-px", ft.value])
2657
+ mt(G.value, $) ? (T(), S("div", Mr, [
2658
+ w("div", {
2659
+ class: A(["flex-1 h-px", gt.value])
2653
2660
  }, null, 2),
2654
- v("span", {
2655
- class: _(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", nt.value])
2656
- }, he(mt(ee.value, E)), 3),
2657
- v("div", {
2658
- class: _(["flex-1 h-px", ft.value])
2661
+ w("span", {
2662
+ class: A(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", st.value])
2663
+ }, le(mt(G.value, $)), 3),
2664
+ w("div", {
2665
+ class: A(["flex-1 h-px", gt.value])
2659
2666
  }, null, 2)
2660
- ])) : V("", !0),
2661
- g(p) ? (T(), S("div", {
2667
+ ])) : Z("", !0),
2668
+ g(d) ? (T(), S("div", {
2662
2669
  key: 1,
2663
2670
  "data-test": "messaging-system-msg",
2664
- "data-message-id": p.id,
2665
- "data-message-sender": p.sender,
2666
- "data-conversation-id": p.conversationId,
2667
- "data-message-sequence": p.sequence,
2668
- "data-system-kind": p.systemKind,
2669
- "data-issue-code": p.issue?.code,
2670
- "data-issue-bucket": p.issue?.bucket,
2671
- "data-issue-action-label": p.issue?.actionLabel,
2672
- "data-issue-action-url": p.issue?.actionUrl,
2673
- "data-streaming": p.id === H.value ? "true" : void 0,
2671
+ "data-message-id": d.id,
2672
+ "data-message-sender": d.sender,
2673
+ "data-conversation-id": d.conversationId,
2674
+ "data-message-sequence": d.sequence,
2675
+ "data-system-kind": d.systemKind,
2676
+ "data-issue-code": d.issue?.code,
2677
+ "data-issue-bucket": d.issue?.bucket,
2678
+ "data-issue-action-label": d.issue?.actionLabel,
2679
+ "data-issue-action-url": d.issue?.actionUrl,
2680
+ "data-streaming": d.id === K.value ? "true" : void 0,
2674
2681
  class: "flex gap-2 items-end justify-start mb-4"
2675
2682
  }, [
2676
- v("div", Nr, [
2677
- v("div", {
2678
- class: _(["mb-1 pl-1 text-[11px] font-medium", M.value ? "text-theme-500" : "text-white/45"])
2683
+ w("div", Nr, [
2684
+ w("div", {
2685
+ class: A(["mb-1 pl-1 text-[11px] font-medium", O.value ? "text-theme-500" : "text-white/45"])
2679
2686
  }, " System Message ", 2),
2680
- v("div", {
2681
- class: _(["rounded-2xl rounded-bl-[4px] px-3.5 py-2 border system-msg-content", M.value ? "bg-theme-100 border-theme-200 text-theme-800" : "bg-white/[0.18] border-white/15 text-white/90"])
2687
+ w("div", {
2688
+ class: A(["rounded-2xl rounded-bl-[4px] px-3.5 py-2 border system-msg-content", O.value ? "bg-theme-100 border-theme-200 text-theme-800" : "bg-white/[0.18] border-white/15 text-white/90"])
2682
2689
  }, [
2683
- p.text ? (T(), Un(It, {
2690
+ d.text ? (T(), Un(Rt, {
2684
2691
  key: 0,
2685
- text: p.text,
2686
- inverted: !M.value,
2687
- streaming: p.id === H.value,
2688
- onClick: b[0] || (b[0] = Et(() => {
2692
+ text: d.text,
2693
+ inverted: !O.value,
2694
+ streaming: d.id === K.value,
2695
+ onClick: b[0] || (b[0] = At(() => {
2689
2696
  }, ["stop"]))
2690
- }, null, 8, ["text", "inverted", "streaming"])) : p.issue?.help ? (T(), Un(It, {
2697
+ }, null, 8, ["text", "inverted", "streaming"])) : d.issue?.help ? (T(), Un(Rt, {
2691
2698
  key: 1,
2692
- text: p.issue.help,
2693
- inverted: !M.value
2694
- }, null, 8, ["text", "inverted"])) : V("", !0),
2695
- p.issue?.actionUrl && !k(p.text) ? (T(), S("a", {
2699
+ text: d.issue.help,
2700
+ inverted: !O.value
2701
+ }, null, 8, ["text", "inverted"])) : Z("", !0),
2702
+ d.issue?.actionUrl && !y(d.text) ? (T(), S("a", {
2696
2703
  key: 2,
2697
- href: p.issue.actionUrl,
2704
+ href: d.issue.actionUrl,
2698
2705
  "data-test": "messaging-system-msg-action",
2699
- class: _(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", M.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
2700
- onClick: b[1] || (b[1] = Et(() => {
2706
+ class: A(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", O.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
2707
+ onClick: b[1] || (b[1] = At(() => {
2701
2708
  }, ["stop"]))
2702
2709
  }, [
2703
- Hn(he(p.issue.actionLabel) + " ", 1),
2704
- b[11] || (b[11] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2705
- ], 10, zr)) : V("", !0)
2710
+ Hn(le(d.issue.actionLabel) + " ", 1),
2711
+ b[11] || (b[11] = w("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
2712
+ ], 10, zr)) : Z("", !0)
2706
2713
  ], 2)
2707
2714
  ])
2708
- ], 8, Lr)) : p.sender === "system" ? (T(), S("div", {
2715
+ ], 8, Lr)) : d.sender === "system" ? (T(), S("div", {
2709
2716
  key: 2,
2710
2717
  "data-test": "messaging-system-status-msg",
2711
- "data-message-id": p.id,
2712
- "data-message-sender": p.sender,
2713
- "data-conversation-id": p.conversationId,
2714
- "data-message-sequence": p.sequence,
2715
- "data-system-kind": p.systemKind,
2716
- "data-issue-code": p.issue?.code,
2717
- "data-issue-bucket": p.issue?.bucket,
2718
- "data-streaming": p.id === H.value ? "true" : void 0,
2719
- class: _(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", M.value ? "text-theme-500" : "text-white/60"])
2718
+ "data-message-id": d.id,
2719
+ "data-message-sender": d.sender,
2720
+ "data-conversation-id": d.conversationId,
2721
+ "data-message-sequence": d.sequence,
2722
+ "data-system-kind": d.systemKind,
2723
+ "data-issue-code": d.issue?.code,
2724
+ "data-issue-bucket": d.issue?.bucket,
2725
+ "data-streaming": d.id === K.value ? "true" : void 0,
2726
+ class: A(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", O.value ? "text-theme-500" : "text-white/60"])
2720
2727
  }, [
2721
- b[12] || (b[12] = v("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)),
2722
- Ge(It, {
2723
- text: p.text,
2724
- inverted: !M.value,
2725
- onClick: b[2] || (b[2] = Et(() => {
2728
+ b[12] || (b[12] = w("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)),
2729
+ We(Rt, {
2730
+ text: d.text,
2731
+ inverted: !O.value,
2732
+ onClick: b[2] || (b[2] = At(() => {
2726
2733
  }, ["stop"]))
2727
2734
  }, null, 8, ["text", "inverted"])
2728
2735
  ], 10, $r)) : (T(), S("div", {
2729
2736
  key: 3,
2730
- "data-test": p.sender === "agent" ? "messaging-assistant-msg" : p.sender === "user" ? "messaging-user-msg" : void 0,
2731
- "data-message-id": p.id,
2732
- "data-message-sender": p.sender,
2733
- "data-conversation-id": p.conversationId,
2734
- "data-message-sequence": p.sequence,
2735
- "data-system-kind": p.systemKind,
2736
- "data-streaming": p.id === H.value ? "true" : void 0,
2737
- class: _(["flex gap-2 items-end", {
2738
- "justify-end": p.sender === "user",
2739
- "justify-start": p.sender === "agent",
2740
- "mb-4": m(ee.value, E)
2737
+ "data-test": d.sender === "agent" ? "messaging-assistant-msg" : d.sender === "user" ? "messaging-user-msg" : void 0,
2738
+ "data-message-id": d.id,
2739
+ "data-message-sender": d.sender,
2740
+ "data-conversation-id": d.conversationId,
2741
+ "data-message-sequence": d.sequence,
2742
+ "data-system-kind": d.systemKind,
2743
+ "data-streaming": d.id === K.value ? "true" : void 0,
2744
+ class: A(["flex gap-2 items-end", {
2745
+ "justify-end": d.sender === "user",
2746
+ "justify-start": d.sender === "agent",
2747
+ "mb-4": x(G.value, $)
2741
2748
  }])
2742
2749
  }, [
2743
- p.sender === "agent" ? (T(), S("div", Br, [
2744
- m(ee.value, E) ? (T(), S("img", {
2750
+ d.sender === "agent" ? (T(), S("div", Br, [
2751
+ x(G.value, $) ? (T(), S("img", {
2745
2752
  key: 0,
2746
2753
  src: a.agent.avatarUrl.value,
2747
2754
  alt: a.agent.displayName.value,
2748
- class: _(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", M.value ? "ring-1 ring-black/5" : ""])
2749
- }, null, 10, Fr)) : V("", !0)
2750
- ])) : V("", !0),
2751
- v("div", {
2752
- class: _(p.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2755
+ class: A(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", O.value ? "ring-1 ring-black/5" : ""])
2756
+ }, null, 10, Fr)) : Z("", !0)
2757
+ ])) : Z("", !0),
2758
+ w("div", {
2759
+ class: A(d.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2753
2760
  }, [
2754
- p.attachments?.length ? (T(), S("div", {
2761
+ d.attachments?.length ? (T(), S("div", {
2755
2762
  key: 0,
2756
- class: _(["mb-1 space-y-1", p.sender === "user" ? "flex flex-col items-end" : ""])
2763
+ class: A(["mb-1 space-y-1", d.sender === "user" ? "flex flex-col items-end" : ""])
2757
2764
  }, [
2758
- (T(!0), S(Ze, null, Kt(p.attachments, (X, P) => (T(), S(Ze, { key: P }, [
2759
- X.type === "image" ? (T(), S("img", {
2765
+ (T(!0), S(Xe, null, Kt(d.attachments, (C, fe) => (T(), S(Xe, { key: fe }, [
2766
+ C.type === "image" ? (T(), S("img", {
2760
2767
  key: 0,
2761
- src: X.src,
2762
- alt: X.filename,
2768
+ src: C.src,
2769
+ alt: C.filename,
2763
2770
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
2764
- }, null, 8, Ur)) : X.type === "audio" ? (T(), S("audio", {
2771
+ }, null, 8, Ur)) : C.type === "audio" ? (T(), S("audio", {
2765
2772
  key: 1,
2766
- src: X.src,
2773
+ src: C.src,
2767
2774
  controls: "",
2768
2775
  class: "max-w-full"
2769
2776
  }, null, 8, Hr)) : (T(), S("a", {
2770
2777
  key: 2,
2771
- href: X.src,
2778
+ href: C.src,
2772
2779
  target: "_blank",
2773
2780
  rel: "noopener",
2774
- class: _(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", M.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2781
+ class: A(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", O.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2775
2782
  }, [
2776
- b[13] || (b[13] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2777
- Hn(" " + he(X.filename), 1)
2783
+ b[13] || (b[13] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2784
+ Hn(" " + le(C.filename), 1)
2778
2785
  ], 10, jr))
2779
2786
  ], 64))), 128))
2780
- ], 2)) : V("", !0),
2781
- p.text ? (T(), S("div", {
2787
+ ], 2)) : Z("", !0),
2788
+ d.text ? (T(), S("div", {
2782
2789
  key: 1,
2783
- class: _(["rounded-2xl px-3.5 py-2", [
2784
- p.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : M.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]"
2790
+ class: A(["rounded-2xl px-3.5 py-2", [
2791
+ d.sender === "user" ? "bg-primary-500 text-white rounded-br-[4px]" : O.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]"
2785
2792
  ]])
2786
2793
  }, [
2787
- Ge(It, {
2788
- text: p.text,
2789
- inverted: p.sender === "user" || !M.value,
2790
- streaming: p.id === H.value,
2791
- onClick: b[3] || (b[3] = Et(() => {
2794
+ We(Rt, {
2795
+ text: d.text,
2796
+ inverted: d.sender === "user" || !O.value,
2797
+ streaming: d.id === K.value,
2798
+ onClick: b[3] || (b[3] = At(() => {
2792
2799
  }, ["stop"]))
2793
2800
  }, null, 8, ["text", "inverted", "streaming"])
2794
- ], 2)) : V("", !0)
2801
+ ], 2)) : Z("", !0)
2795
2802
  ], 2)
2796
2803
  ], 10, Pr))
2797
2804
  ], 64))), 128)),
2798
- ae.value ? (T(), S("div", Gr, [
2799
- v("img", {
2805
+ q.value ? (T(), S("div", {
2806
+ key: 1,
2807
+ "data-test": "messaging-working-state",
2808
+ "data-working-description": q.value,
2809
+ class: A(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", O.value ? "text-theme-500" : "text-white/45"])
2810
+ }, [
2811
+ b[14] || (b[14] = w("i", {
2812
+ class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
2813
+ "aria-hidden": "true"
2814
+ }, null, -1)),
2815
+ w("span", Wr, le(q.value), 1)
2816
+ ], 10, Gr)) : Z("", !0),
2817
+ U.value ? (T(), S("div", qr, [
2818
+ w("img", {
2800
2819
  src: a.agent.avatarUrl.value,
2801
2820
  alt: a.agent.displayName.value,
2802
- class: _(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", M.value ? "ring-1 ring-black/5" : ""])
2803
- }, null, 10, Wr),
2804
- v("div", {
2805
- class: _(["rounded-2xl px-3.5 py-2.5 flex items-center", M.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2821
+ class: A(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", O.value ? "ring-1 ring-black/5" : ""])
2822
+ }, null, 10, Yr),
2823
+ w("div", {
2824
+ class: A(["rounded-2xl px-3.5 py-2.5 flex items-center", O.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2806
2825
  }, [
2807
- v("i", {
2808
- class: _(["i-svg-spinners-3-dots-bounce size-7", M.value ? "text-theme-400" : "text-white/50"])
2826
+ w("i", {
2827
+ class: A(["i-svg-spinners-3-dots-bounce size-7", O.value ? "text-theme-400" : "text-white/50"])
2809
2828
  }, null, 2)
2810
2829
  ], 2)
2811
- ])) : V("", !0)
2830
+ ])) : Z("", !0)
2812
2831
  ], 2)
2813
2832
  ]),
2814
2833
  _: 1
2815
2834
  }, 512),
2816
- v("div", {
2817
- class: _(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", M.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"])
2835
+ w("div", {
2836
+ class: A(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", O.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"])
2818
2837
  }, [
2819
- h.value.length > 0 ? (T(), S("div", qr, [
2820
- (T(!0), S(Ze, null, Kt(h.value, (p, E) => (T(), S("div", {
2821
- key: E,
2838
+ h.value.length > 0 ? (T(), S("div", Vr, [
2839
+ (T(!0), S(Xe, null, Kt(h.value, (d, $) => (T(), S("div", {
2840
+ key: $,
2822
2841
  class: "relative shrink-0 group"
2823
2842
  }, [
2824
- p.type === "image" ? (T(), S("img", {
2843
+ d.type === "image" ? (T(), S("img", {
2825
2844
  key: 0,
2826
- src: p.src,
2827
- alt: p.filename,
2828
- class: _(["size-14 rounded-xl object-cover border", M.value ? "border-black/10" : "border-white/20"])
2829
- }, null, 10, Yr)) : (T(), S("div", {
2845
+ src: d.src,
2846
+ alt: d.filename,
2847
+ class: A(["size-14 rounded-xl object-cover border", O.value ? "border-black/10" : "border-white/20"])
2848
+ }, null, 10, Zr)) : (T(), S("div", {
2830
2849
  key: 1,
2831
- class: _(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", M.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2850
+ class: A(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", O.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2832
2851
  }, [
2833
- b[14] || (b[14] = v("i", { class: "i-tabler-file size-4" }, null, -1)),
2834
- v("span", Vr, he(p.filename), 1)
2852
+ b[15] || (b[15] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2853
+ w("span", Xr, le(d.filename), 1)
2835
2854
  ], 2)),
2836
- v("button", {
2855
+ w("button", {
2837
2856
  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",
2838
- onClick: /* @__PURE__ */ d((X) => Pt(E), "onClick")
2839
- }, [...b[15] || (b[15] = [
2840
- v("i", { class: "i-tabler-x size-3" }, null, -1)
2841
- ])], 8, Zr)
2857
+ onClick: /* @__PURE__ */ p((C) => Pt($), "onClick")
2858
+ }, [...b[16] || (b[16] = [
2859
+ w("i", { class: "i-tabler-x size-3" }, null, -1)
2860
+ ])], 8, Kr)
2842
2861
  ]))), 128)),
2843
- c.value ? (T(), S("div", Xr, [
2844
- Ge(jn, { class: "size-5" })
2845
- ])) : V("", !0)
2846
- ])) : V("", !0),
2862
+ c.value ? (T(), S("div", Qr, [
2863
+ We(jn, { class: "size-5" })
2864
+ ])) : Z("", !0)
2865
+ ])) : Z("", !0),
2847
2866
  a.uploadFn ? (T(), S("input", {
2848
2867
  key: 1,
2849
2868
  ref_key: "fileInput",
@@ -2851,55 +2870,55 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2851
2870
  type: "file",
2852
2871
  accept: "image/*,audio/*,video/*",
2853
2872
  class: "hidden",
2854
- onChange: $e
2855
- }, null, 544)) : V("", !0),
2856
- v("div", {
2857
- class: _(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-colors duration-200", M.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"])
2873
+ onChange: $t
2874
+ }, null, 544)) : Z("", !0),
2875
+ w("div", {
2876
+ class: A(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-colors duration-200", O.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"])
2858
2877
  }, [
2859
- v("button", {
2860
- class: _(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
2878
+ w("button", {
2879
+ 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", [
2861
2880
  a.uploadFn ? "cursor-pointer" : "cursor-default",
2862
- M.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2881
+ O.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
2863
2882
  c.value ? "opacity-50 pointer-events-none" : ""
2864
2883
  ]]),
2865
- disabled: Q.value || c.value || !a.uploadFn,
2866
- onClick: b[4] || (b[4] = (p) => a.uploadFn && ze())
2884
+ disabled: pe.value || c.value || !a.uploadFn,
2885
+ onClick: b[4] || (b[4] = (d) => a.uploadFn && Be())
2867
2886
  }, [
2868
- c.value ? (T(), S("i", Qr)) : (T(), S("i", Jr))
2869
- ], 10, Kr),
2870
- Us(v("textarea", {
2887
+ c.value ? (T(), S("i", ea)) : (T(), S("i", ta))
2888
+ ], 10, Jr),
2889
+ Us(w("textarea", {
2871
2890
  ref_key: "textarea",
2872
2891
  ref: l,
2873
- "onUpdate:modelValue": b[5] || (b[5] = (p) => n.value = p),
2892
+ "onUpdate:modelValue": b[5] || (b[5] = (d) => n.value = d),
2874
2893
  "data-test": "messaging-input",
2875
2894
  rows: "1",
2876
2895
  enterkeyhint: "send",
2877
- placeholder: ye.value,
2878
- disabled: Q.value,
2896
+ placeholder: Se.value,
2897
+ disabled: pe.value,
2879
2898
  style: { fontSize: "16px", resize: "none" },
2880
- class: _(["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", M.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2881
- onKeydown: q,
2882
- onFocus: b[6] || (b[6] = (p) => i.value = !0),
2883
- onBlur: b[7] || (b[7] = (p) => i.value = !1)
2884
- }, null, 42, ea), [
2899
+ 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", O.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2900
+ onKeydown: $e,
2901
+ onFocus: b[6] || (b[6] = (d) => i.value = !0),
2902
+ onBlur: b[7] || (b[7] = (d) => i.value = !1)
2903
+ }, null, 42, na), [
2885
2904
  [Hs, n.value]
2886
2905
  ]),
2887
- v("button", {
2906
+ w("button", {
2888
2907
  "data-test": "messaging-send-btn",
2889
- class: _(["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", Te.value ? "bg-primary-500 text-white hover:scale-105 active:scale-95 cursor-pointer" : M.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2890
- disabled: !Te.value,
2891
- onClick: b[8] || (b[8] = (p) => gt())
2892
- }, [...b[16] || (b[16] = [
2893
- v("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2894
- ])], 10, ta)
2908
+ 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", Ce.value ? "bg-primary-500 text-white hover:scale-105 active:scale-95 cursor-pointer" : O.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
2909
+ disabled: !Ce.value,
2910
+ onClick: b[8] || (b[8] = (d) => Y())
2911
+ }, [...b[17] || (b[17] = [
2912
+ w("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2913
+ ])], 10, sa)
2895
2914
  ], 2)
2896
2915
  ], 2)
2897
2916
  ]));
2898
2917
  }
2899
- }), na = { class: "agent-wrap" }, sa = {
2918
+ }), ia = { class: "agent-wrap" }, ra = {
2900
2919
  key: 0,
2901
2920
  class: "flex items-center justify-center h-full"
2902
- }, fa = /* @__PURE__ */ ve({
2921
+ }, ma = /* @__PURE__ */ Te({
2903
2922
  __name: "AgentWrap",
2904
2923
  props: {
2905
2924
  sdk: {},
@@ -2917,7 +2936,7 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2917
2936
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2918
2937
  ...e.apiBase && { apiBase: e.apiBase }
2919
2938
  }), i = ie(!e.agent), s = fs(e.agent ? new Dt({ config: e.agent }) : void 0), l = ie();
2920
- return Nt(async () => {
2939
+ return Lt(async () => {
2921
2940
  if (e.agent) {
2922
2941
  t.debug("Agent provided via props, skipping fetch", {
2923
2942
  agentId: e.agent.agentId,
@@ -2993,9 +3012,9 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
2993
3012
  }
2994
3013
  });
2995
3014
  }
2996
- }), (o, h) => (T(), S("div", na, [
2997
- i.value ? (T(), S("div", sa, [...h[0] || (h[0] = [
2998
- v("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
3015
+ }), (o, h) => (T(), S("div", ia, [
3016
+ i.value ? (T(), S("div", ra, [...h[0] || (h[0] = [
3017
+ w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2999
3018
  ])])) : s.value ? on(o.$slots, "default", {
3000
3019
  key: 1,
3001
3020
  sdk: sn(n),
@@ -3005,21 +3024,21 @@ const Sr = ["innerHTML"], It = /* @__PURE__ */ ve({
3005
3024
  buttonText: a.buttonText,
3006
3025
  buttonIcon: a.buttonIcon,
3007
3026
  loading: i.value
3008
- }) : V("", !0)
3027
+ }) : Z("", !0)
3009
3028
  ]));
3010
3029
  }
3011
3030
  });
3012
3031
  export {
3013
3032
  Wn as A,
3014
- fa as _,
3015
- pa as a,
3016
- ha as b,
3017
- ua as c,
3018
- da as d,
3033
+ ma as _,
3034
+ ga as a,
3035
+ pa as b,
3036
+ da as c,
3037
+ fa as d,
3019
3038
  jn as e,
3020
3039
  ri as f,
3021
- oa as g,
3040
+ ua as g,
3022
3041
  Yn as h,
3023
- ca as p
3042
+ ha as p
3024
3043
  };
3025
3044
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map