@pagelines/sdk 1.0.575 → 1.0.576

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