@pagelines/sdk 1.0.307 → 1.0.308

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.
@@ -2,7 +2,7 @@ var En = Object.defineProperty;
2
2
  var ks = (l, t, e) => t in l ? En(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
3
  var h = (l, t) => En(l, "name", { value: t, configurable: !0 });
4
4
  var _ = (l, t, e) => ks(l, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as xt, openBlock as v, createElementBlock as S, createElementVNode as w, normalizeClass as E, ref as se, watch as Wt, unref as jt, Fragment as ve, toDisplayString as ne, computed as Q, onMounted as jn, nextTick as Nt, createVNode as zt, createCommentVNode as q, renderList as Pt, createTextVNode as xs, withDirectives as bs, normalizeStyle as ws, vModelText as ys, shallowRef as Ts, renderSlot as vs } from "vue";
5
+ import { defineComponent as xt, openBlock as A, createElementBlock as E, createElementVNode as w, normalizeClass as v, ref as ne, watch as Wt, unref as jt, Fragment as ve, toDisplayString as ce, computed as Q, onMounted as jn, nextTick as zt, createVNode as Nt, createCommentVNode as q, renderList as Pt, createTextVNode as xs, withDirectives as bs, normalizeStyle as ws, vModelText as ys, shallowRef as Ts, renderSlot as vs } from "vue";
6
6
  import { SettingsObject as Ss, Agent as dt, getDefaultAvatarUrl as qn, createLogger as As } from "@pagelines/core";
7
7
  import { P as Es } from "./sdkClient-6j3pmwVP.js";
8
8
  const _s = { class: "spinner max-w-sm" }, Rs = {
@@ -15,10 +15,10 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
17
  setup(l) {
18
- return (t, e) => (v(), S("div", _s, [
19
- (v(), S("svg", Rs, [
18
+ return (t, e) => (A(), E("div", _s, [
19
+ (A(), E("svg", Rs, [
20
20
  w("circle", {
21
- class: E([l.colorMode, "ring-path"]),
21
+ class: v([l.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
24
24
  r: "20",
@@ -38,14 +38,14 @@ const _s = { class: "spinner max-w-sm" }, Rs = {
38
38
  _(this, "isConnecting", !1);
39
39
  // Chat conversation tracking (server-managed persistence)
40
40
  _(this, "conversationId");
41
- _(this, "textState", se({
41
+ _(this, "textState", ne({
42
42
  isActive: !1,
43
43
  isConnected: !1,
44
44
  isThinking: !1,
45
45
  connectionStatus: "disconnected"
46
46
  }));
47
- _(this, "agentMode", se("self"));
48
- _(this, "sharedMessages", se([]));
47
+ _(this, "agentMode", ne("self"));
48
+ _(this, "sharedMessages", ne([]));
49
49
  _(this, "_agent");
50
50
  this._agent = e.agent instanceof dt ? e.agent : new dt({ config: e.agent }), this.setupModeWatcher();
51
51
  }
@@ -222,25 +222,25 @@ Current User:
222
222
  };
223
223
  h(rn, "AgentChatController");
224
224
  let Rn = rn;
225
- function Cn(l) {
225
+ function Dn(l) {
226
226
  return l ? typeof l == "string" ? l : l.src || "" : "";
227
227
  }
228
- h(Cn, "getImageSrc");
229
- function Ai(l) {
230
- return Cn(l.cover) || Cn(l.avatar) || qn(l.name);
228
+ h(Dn, "getImageSrc");
229
+ function Si(l) {
230
+ return Dn(l.cover) || Dn(l.avatar) || qn(l.name);
231
231
  }
232
- h(Ai, "getAgentAvatarUrl");
233
- function Dn(l) {
232
+ h(Si, "getAgentAvatarUrl");
233
+ function Cn(l) {
234
234
  const t = l.target;
235
235
  t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = qn());
236
236
  }
237
- h(Dn, "handleImageError");
238
- function Ei(l) {
237
+ h(Cn, "handleImageError");
238
+ function Ai(l) {
239
239
  const { template: t, agent: e } = l;
240
240
  return t.replace(/{name}/g, e.name || "Digital Agent").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
241
241
  }
242
- h(Ei, "parseButtonTemplate");
243
- const Cs = { class: "relative flex-shrink-0" }, Ds = ["src", "alt"], Is = { class: "absolute top-1 right-1" }, Ms = {
242
+ h(Ai, "parseButtonTemplate");
243
+ const Ds = { class: "relative flex-shrink-0" }, Cs = ["src", "alt"], Is = { class: "absolute top-1 right-1" }, Ms = {
244
244
  key: 1,
245
245
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
246
246
  }, Ls = { class: "min-w-0" }, Os = /* @__PURE__ */ xt({
@@ -252,46 +252,46 @@ const Cs = { class: "relative flex-shrink-0" }, Ds = ["src", "alt"], Is = { clas
252
252
  layout: { default: "centered" }
253
253
  },
254
254
  setup(l) {
255
- return (t, e) => (v(), S("div", {
256
- class: E(["flex gap-4", [
255
+ return (t, e) => (A(), E("div", {
256
+ class: v(["flex gap-4", [
257
257
  l.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
258
258
  ]])
259
259
  }, [
260
- w("div", Cs, [
260
+ w("div", Ds, [
261
261
  w("div", {
262
- class: E(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
262
+ class: v(["rounded-full overflow-hidden border-white", l.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
263
263
  }, [
264
264
  w("img", {
265
265
  src: l.agent.avatarUrl.value,
266
266
  alt: l.agent.displayName.value,
267
267
  class: "w-full h-full object-cover",
268
268
  onError: e[0] || (e[0] = //@ts-ignore
269
- (...n) => jt(Dn) && jt(Dn)(...n))
270
- }, null, 40, Ds)
269
+ (...n) => jt(Cn) && jt(Cn)(...n))
270
+ }, null, 40, Cs)
271
271
  ], 2),
272
272
  w("div", Is, [
273
- l.isOnline ? (v(), S(ve, { key: 0 }, [
273
+ l.isOnline ? (A(), E(ve, { key: 0 }, [
274
274
  e[1] || (e[1] = w("div", {
275
275
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
276
276
  style: { "animation-duration": "3s" }
277
277
  }, null, -1)),
278
278
  e[2] || (e[2] = w("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
279
- ], 64)) : (v(), S("div", Ms))
279
+ ], 64)) : (A(), E("div", Ms))
280
280
  ])
281
281
  ]),
282
282
  w("div", Ls, [
283
283
  w("h1", {
284
- class: E(["font-light text-white mb-1 truncate", [
284
+ class: v(["font-light text-white mb-1 truncate", [
285
285
  l.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
286
286
  l.layout === "horizontal" ? "text-white/95" : ""
287
287
  ]])
288
- }, ne(l.agent.displayName.value), 3),
288
+ }, ce(l.agent.displayName.value), 3),
289
289
  w("p", {
290
- class: E(["font-light line-clamp-1", [
290
+ class: v(["font-light line-clamp-1", [
291
291
  l.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
292
292
  l.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
293
293
  ]])
294
- }, ne(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
294
+ }, ce(l.layout === "horizontal" ? l.agent.title.value || "Digital Agent" : l.agent.title.value), 3)
295
295
  ])
296
296
  ], 2));
297
297
  }
@@ -299,8 +299,8 @@ const Cs = { class: "relative flex-shrink-0" }, Ds = ["src", "alt"], Is = { clas
299
299
  const {
300
300
  entries: Yn,
301
301
  setPrototypeOf: In,
302
- isFrozen: Ns,
303
- getPrototypeOf: zs,
302
+ isFrozen: zs,
303
+ getPrototypeOf: Ns,
304
304
  getOwnPropertyDescriptor: Ps
305
305
  } = Object;
306
306
  let {
@@ -345,7 +345,7 @@ function Hs(l) {
345
345
  };
346
346
  }
347
347
  h(Hs, "unconstruct");
348
- function A(l, t) {
348
+ function S(l, t) {
349
349
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ft;
350
350
  In && In(l, null);
351
351
  let n = t.length;
@@ -353,26 +353,26 @@ function A(l, t) {
353
353
  let s = t[n];
354
354
  if (typeof s == "string") {
355
355
  const r = e(s);
356
- r !== s && (Ns(t) || (t[n] = r), s = r);
356
+ r !== s && (zs(t) || (t[n] = r), s = r);
357
357
  }
358
358
  l[s] = !0;
359
359
  }
360
360
  return l;
361
361
  }
362
- h(A, "addToSet");
362
+ h(S, "addToSet");
363
363
  function Gs(l) {
364
364
  for (let t = 0; t < l.length; t++)
365
365
  K(l, t) || (l[t] = null);
366
366
  return l;
367
367
  }
368
368
  h(Gs, "cleanArray");
369
- function oe(l) {
369
+ function le(l) {
370
370
  const t = pt(null);
371
371
  for (const [e, n] of Yn(l))
372
- K(l, e) && (Array.isArray(n) ? t[e] = Gs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = oe(n) : t[e] = n);
372
+ K(l, e) && (Array.isArray(n) ? t[e] = Gs(n) : n && typeof n == "object" && n.constructor === Object ? t[e] = le(n) : t[e] = n);
373
373
  return t;
374
374
  }
375
- h(oe, "clone");
375
+ h(le, "clone");
376
376
  function qe(l, t) {
377
377
  for (; l !== null; ) {
378
378
  const n = Ps(l, t);
@@ -382,7 +382,7 @@ function qe(l, t) {
382
382
  if (typeof n.value == "function")
383
383
  return X(n.value);
384
384
  }
385
- l = zs(l);
385
+ l = Ns(l);
386
386
  }
387
387
  function e() {
388
388
  return null;
@@ -390,7 +390,7 @@ function qe(l, t) {
390
390
  return h(e, "fallbackValue"), e;
391
391
  }
392
392
  h(qe, "lookupGetter");
393
- const Ln = Z(["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"]), Bt = Z(["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"]), Ft = Z(["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"]), Ws = Z(["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"]), Ht = Z(["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"]), js = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), On = Z(["#text"]), Nn = Z(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "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", "slot"]), Gt = Z(["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"]), zn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]), ut = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), qs = J(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ys = J(/<%[\w\W]*|[\w\W]*%>/gm), Zs = J(/\$\{[\w\W]*/gm), Xs = J(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vs = J(/^aria-[\-\w]+$/), Zn = J(
393
+ const Ln = Z(["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"]), Bt = Z(["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"]), Ft = Z(["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"]), Ws = Z(["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"]), Ht = Z(["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"]), js = Z(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), On = Z(["#text"]), zn = Z(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "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", "slot"]), Gt = Z(["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"]), Nn = Z(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]), ut = Z(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), qs = J(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ys = J(/<%[\w\W]*|[\w\W]*%>/gm), Zs = J(/\$\{[\w\W]*/gm), Xs = J(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vs = J(/^aria-[\-\w]+$/), Zn = J(
394
394
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
395
395
  // eslint-disable-line no-useless-escape
396
396
  ), Qs = J(/^(?:\w+script|data):/i), Ks = J(
@@ -469,7 +469,7 @@ function Vn() {
469
469
  HTMLFormElement: d,
470
470
  DOMParser: m,
471
471
  trustedTypes: b
472
- } = l, O = c.prototype, C = qe(O, "cloneNode"), H = qe(O, "remove"), _e = qe(O, "nextSibling"), me = qe(O, "childNodes"), ee = qe(O, "parentNode");
472
+ } = l, O = c.prototype, D = qe(O, "cloneNode"), F = qe(O, "remove"), _e = qe(O, "nextSibling"), me = qe(O, "childNodes"), ee = qe(O, "parentNode");
473
473
  if (typeof a == "function") {
474
474
  const k = e.createElement("template");
475
475
  k.content && k.content.ownerDocument && (e = k.content.ownerDocument);
@@ -498,10 +498,10 @@ function Vn() {
498
498
  let {
499
499
  IS_ALLOWED_URI: T
500
500
  } = Pn, x = null;
501
- const L = A({}, [...Ln, ...Bt, ...Ft, ...Ht, ...On]);
502
- let D = null;
503
- const he = A({}, [...Nn, ...Gt, ...zn, ...ut]);
504
- let N = Object.seal(pt(null, {
501
+ const L = S({}, [...Ln, ...Bt, ...Ft, ...Ht, ...On]);
502
+ let C = null;
503
+ const he = S({}, [...zn, ...Gt, ...Nn, ...ut]);
504
+ let z = Object.seal(pt(null, {
505
505
  tagNameCheck: {
506
506
  writable: !0,
507
507
  configurable: !1,
@@ -535,18 +535,18 @@ function Vn() {
535
535
  value: null
536
536
  }
537
537
  }));
538
- let an = !0, St = !0, ln = !1, on = !0, Re = !1, nt = !0, ye = !1, At = !1, Et = !1, Ce = !1, st = !1, rt = !1, cn = !0, un = !1;
538
+ let an = !0, St = !0, ln = !1, on = !0, Re = !1, nt = !0, ye = !1, At = !1, Et = !1, De = !1, st = !1, rt = !1, cn = !0, un = !1;
539
539
  const cs = "user-content-";
540
- let _t = !0, Fe = !1, De = {}, ae = null;
541
- const Rt = A({}, ["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"]);
540
+ let _t = !0, Fe = !1, Ce = {}, ie = null;
541
+ const Rt = S({}, ["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"]);
542
542
  let hn = null;
543
- const pn = A({}, ["audio", "video", "img", "source", "image", "track"]);
544
- let Ct = null;
545
- const fn = A({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), it = "http://www.w3.org/1998/Math/MathML", at = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
546
- let Ie = fe, Dt = !1, It = null;
547
- const us = A({}, [it, at, fe], $t);
548
- let lt = A({}, ["mi", "mo", "mn", "ms", "mtext"]), ot = A({}, ["annotation-xml"]);
549
- const hs = A({}, ["title", "style", "font", "a", "script"]);
543
+ const pn = S({}, ["audio", "video", "img", "source", "image", "track"]);
544
+ let Dt = null;
545
+ const fn = S({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), it = "http://www.w3.org/1998/Math/MathML", at = "http://www.w3.org/2000/svg", fe = "http://www.w3.org/1999/xhtml";
546
+ let Ie = fe, Ct = !1, It = null;
547
+ const us = S({}, [it, at, fe], $t);
548
+ let lt = S({}, ["mi", "mo", "mn", "ms", "mtext"]), ot = S({}, ["annotation-xml"]);
549
+ const hs = S({}, ["title", "style", "font", "a", "script"]);
550
550
  let He = null;
551
551
  const ps = ["application/xhtml+xml", "text/html"], fs = "text/html";
552
552
  let U = null, Me = null;
@@ -555,8 +555,8 @@ function Vn() {
555
555
  }, "isRegexOrFunction"), Mt = /* @__PURE__ */ h(function() {
556
556
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
557
557
  if (!(Me && Me === i)) {
558
- if ((!i || typeof i != "object") && (i = {}), i = oe(i), He = // eslint-disable-next-line unicorn/prefer-includes
559
- ps.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? fs : i.PARSER_MEDIA_TYPE, U = He === "application/xhtml+xml" ? $t : ft, x = K(i, "ALLOWED_TAGS") ? A({}, i.ALLOWED_TAGS, U) : L, D = K(i, "ALLOWED_ATTR") ? A({}, i.ALLOWED_ATTR, U) : he, It = K(i, "ALLOWED_NAMESPACES") ? A({}, i.ALLOWED_NAMESPACES, $t) : us, Ct = K(i, "ADD_URI_SAFE_ATTR") ? A(oe(fn), i.ADD_URI_SAFE_ATTR, U) : fn, hn = K(i, "ADD_DATA_URI_TAGS") ? A(oe(pn), i.ADD_DATA_URI_TAGS, U) : pn, ae = K(i, "FORBID_CONTENTS") ? A({}, i.FORBID_CONTENTS, U) : Rt, pe = K(i, "FORBID_TAGS") ? A({}, i.FORBID_TAGS, U) : oe({}), tt = K(i, "FORBID_ATTR") ? A({}, i.FORBID_ATTR, U) : oe({}), De = K(i, "USE_PROFILES") ? i.USE_PROFILES : !1, an = i.ALLOW_ARIA_ATTR !== !1, St = i.ALLOW_DATA_ATTR !== !1, ln = i.ALLOW_UNKNOWN_PROTOCOLS || !1, on = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Re = i.SAFE_FOR_TEMPLATES || !1, nt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, Ce = i.RETURN_DOM || !1, st = i.RETURN_DOM_FRAGMENT || !1, rt = i.RETURN_TRUSTED_TYPE || !1, Et = i.FORCE_BODY || !1, cn = i.SANITIZE_DOM !== !1, un = i.SANITIZE_NAMED_PROPS || !1, _t = i.KEEP_CONTENT !== !1, Fe = i.IN_PLACE || !1, T = i.ALLOWED_URI_REGEXP || Zn, Ie = i.NAMESPACE || fe, lt = i.MATHML_TEXT_INTEGRATION_POINTS || lt, ot = i.HTML_INTEGRATION_POINTS || ot, N = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (N.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (N.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (N.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Re && (St = !1), st && (Ce = !0), De && (x = A({}, On), D = pt(null), De.html === !0 && (A(x, Ln), A(D, Nn)), De.svg === !0 && (A(x, Bt), A(D, Gt), A(D, ut)), De.svgFilters === !0 && (A(x, Ft), A(D, Gt), A(D, ut)), De.mathMl === !0 && (A(x, Ht), A(D, zn), A(D, ut))), K(i, "ADD_TAGS") || (ke.tagCheck = null), K(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (x === L && (x = oe(x)), A(x, i.ADD_TAGS, U))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (D === he && (D = oe(D)), A(D, i.ADD_ATTR, U))), i.ADD_URI_SAFE_ATTR && A(Ct, i.ADD_URI_SAFE_ATTR, U), i.FORBID_CONTENTS && (ae === Rt && (ae = oe(ae)), A(ae, i.FORBID_CONTENTS, U)), i.ADD_FORBID_CONTENTS && (ae === Rt && (ae = oe(ae)), A(ae, i.ADD_FORBID_CONTENTS, U)), _t && (x["#text"] = !0), ye && A(x, ["html", "head", "body"]), x.table && (A(x, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
558
+ if ((!i || typeof i != "object") && (i = {}), i = le(i), He = // eslint-disable-next-line unicorn/prefer-includes
559
+ ps.indexOf(i.PARSER_MEDIA_TYPE) === -1 ? fs : i.PARSER_MEDIA_TYPE, U = He === "application/xhtml+xml" ? $t : ft, x = K(i, "ALLOWED_TAGS") ? S({}, i.ALLOWED_TAGS, U) : L, C = K(i, "ALLOWED_ATTR") ? S({}, i.ALLOWED_ATTR, U) : he, It = K(i, "ALLOWED_NAMESPACES") ? S({}, i.ALLOWED_NAMESPACES, $t) : us, Dt = K(i, "ADD_URI_SAFE_ATTR") ? S(le(fn), i.ADD_URI_SAFE_ATTR, U) : fn, hn = K(i, "ADD_DATA_URI_TAGS") ? S(le(pn), i.ADD_DATA_URI_TAGS, U) : pn, ie = K(i, "FORBID_CONTENTS") ? S({}, i.FORBID_CONTENTS, U) : Rt, pe = K(i, "FORBID_TAGS") ? S({}, i.FORBID_TAGS, U) : le({}), tt = K(i, "FORBID_ATTR") ? S({}, i.FORBID_ATTR, U) : le({}), Ce = K(i, "USE_PROFILES") ? i.USE_PROFILES : !1, an = i.ALLOW_ARIA_ATTR !== !1, St = i.ALLOW_DATA_ATTR !== !1, ln = i.ALLOW_UNKNOWN_PROTOCOLS || !1, on = i.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Re = i.SAFE_FOR_TEMPLATES || !1, nt = i.SAFE_FOR_XML !== !1, ye = i.WHOLE_DOCUMENT || !1, De = i.RETURN_DOM || !1, st = i.RETURN_DOM_FRAGMENT || !1, rt = i.RETURN_TRUSTED_TYPE || !1, Et = i.FORCE_BODY || !1, cn = i.SANITIZE_DOM !== !1, un = i.SANITIZE_NAMED_PROPS || !1, _t = i.KEEP_CONTENT !== !1, Fe = i.IN_PLACE || !1, T = i.ALLOWED_URI_REGEXP || Zn, Ie = i.NAMESPACE || fe, lt = i.MATHML_TEXT_INTEGRATION_POINTS || lt, ot = i.HTML_INTEGRATION_POINTS || ot, z = i.CUSTOM_ELEMENT_HANDLING || {}, i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = i.CUSTOM_ELEMENT_HANDLING.tagNameCheck), i.CUSTOM_ELEMENT_HANDLING && dn(i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = i.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), i.CUSTOM_ELEMENT_HANDLING && typeof i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = i.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Re && (St = !1), st && (De = !0), Ce && (x = S({}, On), C = pt(null), Ce.html === !0 && (S(x, Ln), S(C, zn)), Ce.svg === !0 && (S(x, Bt), S(C, Gt), S(C, ut)), Ce.svgFilters === !0 && (S(x, Ft), S(C, Gt), S(C, ut)), Ce.mathMl === !0 && (S(x, Ht), S(C, Nn), S(C, ut))), K(i, "ADD_TAGS") || (ke.tagCheck = null), K(i, "ADD_ATTR") || (ke.attributeCheck = null), i.ADD_TAGS && (typeof i.ADD_TAGS == "function" ? ke.tagCheck = i.ADD_TAGS : (x === L && (x = le(x)), S(x, i.ADD_TAGS, U))), i.ADD_ATTR && (typeof i.ADD_ATTR == "function" ? ke.attributeCheck = i.ADD_ATTR : (C === he && (C = le(C)), S(C, i.ADD_ATTR, U))), i.ADD_URI_SAFE_ATTR && S(Dt, i.ADD_URI_SAFE_ATTR, U), i.FORBID_CONTENTS && (ie === Rt && (ie = le(ie)), S(ie, i.FORBID_CONTENTS, U)), i.ADD_FORBID_CONTENTS && (ie === Rt && (ie = le(ie)), S(ie, i.ADD_FORBID_CONTENTS, U)), _t && (x["#text"] = !0), ye && S(x, ["html", "head", "body"]), x.table && (S(x, ["tbody"]), delete pe.tbody), i.TRUSTED_TYPES_POLICY) {
560
560
  if (typeof i.TRUSTED_TYPES_POLICY.createHTML != "function")
561
561
  throw je('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
562
562
  if (typeof i.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -566,22 +566,22 @@ function Vn() {
566
566
  $ === void 0 && ($ = tr(b, s)), $ !== null && typeof W == "string" && (W = $.createHTML(""));
567
567
  Z && Z(i), Me = i;
568
568
  }
569
- }, "_parseConfig"), gn = A({}, [...Bt, ...Ft, ...Ws]), mn = A({}, [...Ht, ...js]), gs = /* @__PURE__ */ h(function(i) {
569
+ }, "_parseConfig"), gn = S({}, [...Bt, ...Ft, ...Ws]), mn = S({}, [...Ht, ...js]), gs = /* @__PURE__ */ h(function(i) {
570
570
  let u = ee(i);
571
571
  (!u || !u.tagName) && (u = {
572
572
  namespaceURI: Ie,
573
573
  tagName: "template"
574
574
  });
575
- const g = ft(i.tagName), z = ft(u.tagName);
576
- return It[i.namespaceURI] ? i.namespaceURI === at ? u.namespaceURI === fe ? g === "svg" : u.namespaceURI === it ? g === "svg" && (z === "annotation-xml" || lt[z]) : !!gn[g] : i.namespaceURI === it ? u.namespaceURI === fe ? g === "math" : u.namespaceURI === at ? g === "math" && ot[z] : !!mn[g] : i.namespaceURI === fe ? u.namespaceURI === at && !ot[z] || u.namespaceURI === it && !lt[z] ? !1 : !mn[g] && (hs[g] || !gn[g]) : !!(He === "application/xhtml+xml" && It[i.namespaceURI]) : !1;
577
- }, "_checkValidNamespace"), le = /* @__PURE__ */ h(function(i) {
575
+ const g = ft(i.tagName), N = ft(u.tagName);
576
+ return It[i.namespaceURI] ? i.namespaceURI === at ? u.namespaceURI === fe ? g === "svg" : u.namespaceURI === it ? g === "svg" && (N === "annotation-xml" || lt[N]) : !!gn[g] : i.namespaceURI === it ? u.namespaceURI === fe ? g === "math" : u.namespaceURI === at ? g === "math" && ot[N] : !!mn[g] : i.namespaceURI === fe ? u.namespaceURI === at && !ot[N] || u.namespaceURI === it && !lt[N] ? !1 : !mn[g] && (hs[g] || !gn[g]) : !!(He === "application/xhtml+xml" && It[i.namespaceURI]) : !1;
577
+ }, "_checkValidNamespace"), ae = /* @__PURE__ */ h(function(i) {
578
578
  Ge(t.removed, {
579
579
  element: i
580
580
  });
581
581
  try {
582
582
  ee(i).removeChild(i);
583
583
  } catch {
584
- H(i);
584
+ F(i);
585
585
  }
586
586
  }, "_forceRemove"), Te = /* @__PURE__ */ h(function(i, u) {
587
587
  try {
@@ -596,9 +596,9 @@ function Vn() {
596
596
  });
597
597
  }
598
598
  if (u.removeAttribute(i), i === "is")
599
- if (Ce || st)
599
+ if (De || st)
600
600
  try {
601
- le(u);
601
+ ae(u);
602
602
  } catch {
603
603
  }
604
604
  else
@@ -615,16 +615,16 @@ function Vn() {
615
615
  g = P && P[0];
616
616
  }
617
617
  He === "application/xhtml+xml" && Ie === fe && (i = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + i + "</body></html>");
618
- const z = $ ? $.createHTML(i) : i;
618
+ const N = $ ? $.createHTML(i) : i;
619
619
  if (Ie === fe)
620
620
  try {
621
- u = new m().parseFromString(z, He);
621
+ u = new m().parseFromString(N, He);
622
622
  } catch {
623
623
  }
624
624
  if (!u || !u.documentElement) {
625
625
  u = te.createDocument(Ie, "template", null);
626
626
  try {
627
- u.documentElement.innerHTML = Dt ? W : z;
627
+ u.documentElement.innerHTML = Ct ? W : N;
628
628
  } catch {
629
629
  }
630
630
  }
@@ -652,30 +652,30 @@ function Vn() {
652
652
  const wn = /* @__PURE__ */ h(function(i) {
653
653
  let u = null;
654
654
  if (de(B.beforeSanitizeElements, i, null), Lt(i))
655
- return le(i), !0;
655
+ return ae(i), !0;
656
656
  const g = U(i.nodeName);
657
657
  if (de(B.uponSanitizeElement, i, {
658
658
  tagName: g,
659
659
  allowedTags: x
660
660
  }), nt && i.hasChildNodes() && !bn(i.firstElementChild) && j(/<[/\w!]/g, i.innerHTML) && j(/<[/\w!]/g, i.textContent) || i.nodeType === Ye.progressingInstruction || nt && i.nodeType === Ye.comment && j(/<[/\w]/g, i.data))
661
- return le(i), !0;
661
+ return ae(i), !0;
662
662
  if (!(ke.tagCheck instanceof Function && ke.tagCheck(g)) && (!x[g] || pe[g])) {
663
- if (!pe[g] && Tn(g) && (N.tagNameCheck instanceof RegExp && j(N.tagNameCheck, g) || N.tagNameCheck instanceof Function && N.tagNameCheck(g)))
663
+ if (!pe[g] && Tn(g) && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, g) || z.tagNameCheck instanceof Function && z.tagNameCheck(g)))
664
664
  return !1;
665
- if (_t && !ae[g]) {
666
- const z = ee(i) || i.parentNode, G = me(i) || i.childNodes;
667
- if (G && z) {
665
+ if (_t && !ie[g]) {
666
+ const N = ee(i) || i.parentNode, G = me(i) || i.childNodes;
667
+ if (G && N) {
668
668
  const P = G.length;
669
669
  for (let V = P - 1; V >= 0; --V) {
670
- const ge = C(G[V], !0);
671
- ge.__removalCount = (i.__removalCount || 0) + 1, z.insertBefore(ge, _e(i));
670
+ const ge = D(G[V], !0);
671
+ ge.__removalCount = (i.__removalCount || 0) + 1, N.insertBefore(ge, _e(i));
672
672
  }
673
673
  }
674
674
  }
675
- return le(i), !0;
675
+ return ae(i), !0;
676
676
  }
677
- return i instanceof c && !gs(i) || (g === "noscript" || g === "noembed" || g === "noframes") && j(/<\/no(script|embed|frames)/i, i.innerHTML) ? (le(i), !0) : (Re && i.nodeType === Ye.text && (u = i.textContent, ct([$e, M, Ue], (z) => {
678
- u = We(u, z, " ");
677
+ return i instanceof c && !gs(i) || (g === "noscript" || g === "noembed" || g === "noframes") && j(/<\/no(script|embed|frames)/i, i.innerHTML) ? (ae(i), !0) : (Re && i.nodeType === Ye.text && (u = i.textContent, ct([$e, M, Ue], (N) => {
678
+ u = We(u, N, " ");
679
679
  }), i.textContent !== u && (Ge(t.removed, {
680
680
  element: i.cloneNode()
681
681
  }), i.textContent = u)), de(B.afterSanitizeElements, i, null), !1);
@@ -685,16 +685,16 @@ function Vn() {
685
685
  if (!(St && !tt[u] && j(Tt, u))) {
686
686
  if (!(an && j(vt, u))) {
687
687
  if (!(ke.attributeCheck instanceof Function && ke.attributeCheck(u, i))) {
688
- if (!D[u] || tt[u]) {
688
+ if (!C[u] || tt[u]) {
689
689
  if (
690
690
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
691
691
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
692
692
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
693
- !(Tn(i) && (N.tagNameCheck instanceof RegExp && j(N.tagNameCheck, i) || N.tagNameCheck instanceof Function && N.tagNameCheck(i)) && (N.attributeNameCheck instanceof RegExp && j(N.attributeNameCheck, u) || N.attributeNameCheck instanceof Function && N.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
693
+ !(Tn(i) && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, i) || z.tagNameCheck instanceof Function && z.tagNameCheck(i)) && (z.attributeNameCheck instanceof RegExp && j(z.attributeNameCheck, u) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(u, i)) || // Alternative, second condition checks if it's an `is`-attribute, AND
694
694
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
695
- u === "is" && N.allowCustomizedBuiltInElements && (N.tagNameCheck instanceof RegExp && j(N.tagNameCheck, g) || N.tagNameCheck instanceof Function && N.tagNameCheck(g)))
695
+ u === "is" && z.allowCustomizedBuiltInElements && (z.tagNameCheck instanceof RegExp && j(z.tagNameCheck, g) || z.tagNameCheck instanceof Function && z.tagNameCheck(g)))
696
696
  ) return !1;
697
- } else if (!Ct[u]) {
697
+ } else if (!Dt[u]) {
698
698
  if (!j(T, We(g, Be, ""))) {
699
699
  if (!((u === "src" || u === "xlink:href" || u === "href") && i !== "script" && Bs(g, "data:") === 0 && hn[i])) {
700
700
  if (!(ln && !j(et, We(g, Be, "")))) {
@@ -721,22 +721,22 @@ function Vn() {
721
721
  attrName: "",
722
722
  attrValue: "",
723
723
  keepAttr: !0,
724
- allowedAttributes: D,
724
+ allowedAttributes: C,
725
725
  forceKeepAttr: void 0
726
726
  };
727
- let z = u.length;
728
- for (; z--; ) {
729
- const G = u[z], {
727
+ let N = u.length;
728
+ for (; N--; ) {
729
+ const G = u[N], {
730
730
  name: P,
731
731
  namespaceURI: V,
732
732
  value: ge
733
733
  } = G, Le = U(P), Ot = ge;
734
- let F = P === "value" ? Ot : Fs(Ot);
735
- if (g.attrName = Le, g.attrValue = F, g.keepAttr = !0, g.forceKeepAttr = void 0, de(B.uponSanitizeAttribute, i, g), F = g.attrValue, un && (Le === "id" || Le === "name") && (Te(P, i), F = cs + F), nt && j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, F)) {
734
+ let H = P === "value" ? Ot : Fs(Ot);
735
+ if (g.attrName = Le, g.attrValue = H, g.keepAttr = !0, g.forceKeepAttr = void 0, de(B.uponSanitizeAttribute, i, g), H = g.attrValue, un && (Le === "id" || Le === "name") && (Te(P, i), H = cs + H), nt && j(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, H)) {
736
736
  Te(P, i);
737
737
  continue;
738
738
  }
739
- if (Le === "attributename" && Ut(F, "href")) {
739
+ if (Le === "attributename" && Ut(H, "href")) {
740
740
  Te(P, i);
741
741
  continue;
742
742
  }
@@ -746,32 +746,32 @@ function Vn() {
746
746
  Te(P, i);
747
747
  continue;
748
748
  }
749
- if (!on && j(/\/>/i, F)) {
749
+ if (!on && j(/\/>/i, H)) {
750
750
  Te(P, i);
751
751
  continue;
752
752
  }
753
753
  Re && ct([$e, M, Ue], (An) => {
754
- F = We(F, An, " ");
754
+ H = We(H, An, " ");
755
755
  });
756
756
  const Sn = U(i.nodeName);
757
- if (!yn(Sn, Le, F)) {
757
+ if (!yn(Sn, Le, H)) {
758
758
  Te(P, i);
759
759
  continue;
760
760
  }
761
761
  if ($ && typeof b == "object" && typeof b.getAttributeType == "function" && !V)
762
762
  switch (b.getAttributeType(Sn, Le)) {
763
763
  case "TrustedHTML": {
764
- F = $.createHTML(F);
764
+ H = $.createHTML(H);
765
765
  break;
766
766
  }
767
767
  case "TrustedScriptURL": {
768
- F = $.createScriptURL(F);
768
+ H = $.createScriptURL(H);
769
769
  break;
770
770
  }
771
771
  }
772
- if (F !== Ot)
772
+ if (H !== Ot)
773
773
  try {
774
- V ? i.setAttributeNS(V, P, F) : i.setAttribute(P, F), Lt(i) ? le(i) : Mn(t.removed);
774
+ V ? i.setAttributeNS(V, P, H) : i.setAttribute(P, H), Lt(i) ? ae(i) : Mn(t.removed);
775
775
  } catch {
776
776
  Te(P, i);
777
777
  }
@@ -785,8 +785,8 @@ function Vn() {
785
785
  de(B.afterSanitizeShadowDOM, i, null);
786
786
  }, "_sanitizeShadowDOM");
787
787
  return t.sanitize = function(k) {
788
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, g = null, z = null, G = null;
789
- if (Dt = !k, Dt && (k = "<!-->"), typeof k != "string" && !bn(k))
788
+ let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = null, g = null, N = null, G = null;
789
+ if (Ct = !k, Ct && (k = "<!-->"), typeof k != "string" && !bn(k))
790
790
  if (typeof k.toString == "function") {
791
791
  if (k = k.toString(), typeof k != "string")
792
792
  throw je("dirty is not a string, aborting");
@@ -803,25 +803,25 @@ function Vn() {
803
803
  } else if (k instanceof o)
804
804
  u = kn("<!---->"), g = u.ownerDocument.importNode(k, !0), g.nodeType === Ye.element && g.nodeName === "BODY" || g.nodeName === "HTML" ? u = g : u.appendChild(g);
805
805
  else {
806
- if (!Ce && !Re && !ye && // eslint-disable-next-line unicorn/prefer-includes
806
+ if (!De && !Re && !ye && // eslint-disable-next-line unicorn/prefer-includes
807
807
  k.indexOf("<") === -1)
808
808
  return $ && rt ? $.createHTML(k) : k;
809
809
  if (u = kn(k), !u)
810
- return Ce ? null : rt ? W : "";
810
+ return De ? null : rt ? W : "";
811
811
  }
812
- u && Et && le(u.firstChild);
812
+ u && Et && ae(u.firstChild);
813
813
  const P = xn(Fe ? k : u);
814
- for (; z = P.nextNode(); )
815
- wn(z), vn(z), z.content instanceof r && ms(z.content);
814
+ for (; N = P.nextNode(); )
815
+ wn(N), vn(N), N.content instanceof r && ms(N.content);
816
816
  if (Fe)
817
817
  return k;
818
- if (Ce) {
818
+ if (De) {
819
819
  if (st)
820
820
  for (G = Ke.call(u.ownerDocument); u.firstChild; )
821
821
  G.appendChild(u.firstChild);
822
822
  else
823
823
  G = u;
824
- return (D.shadowroot || D.shadowrootmode) && (G = yt.call(n, G, !0)), G;
824
+ return (C.shadowroot || C.shadowrootmode) && (G = yt.call(n, G, !0)), G;
825
825
  }
826
826
  let V = ye ? u.outerHTML : u.innerHTML;
827
827
  return ye && x["!doctype"] && u.ownerDocument && u.ownerDocument.doctype && u.ownerDocument.doctype.name && j(Xn, u.ownerDocument.doctype.name) && (V = "<!DOCTYPE " + u.ownerDocument.doctype.name + `>
@@ -835,8 +835,8 @@ function Vn() {
835
835
  Me = null, At = !1;
836
836
  }, t.isValidAttribute = function(k, i, u) {
837
837
  Me || Mt({});
838
- const g = U(k), z = U(i);
839
- return yn(g, z, u);
838
+ const g = U(k), N = U(i);
839
+ return yn(g, N, u);
840
840
  }, t.addHook = function(k, i) {
841
841
  typeof i == "function" && Ge(B[k], i);
842
842
  }, t.removeHook = function(k, i) {
@@ -878,14 +878,14 @@ var sr = (() => {
878
878
  return !1;
879
879
  }
880
880
  })(), Y = { 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__ */ h((l) => new RegExp(`^( {0,3}${l})((?:[ ][^\\n]*)?(?:\\n|$))`), "listItemRegex"), nextBulletRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), "nextBulletRegex"), hrRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), "hrRegex"), fencesBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}(?:\`\`\`|~~~)`), "fencesBeginRegex"), headingBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}#`), "headingBeginRegex"), htmlBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}<(?:[a-z].*>|!--)`, "i"), "htmlBeginRegex"), blockquoteBeginRegex: /* @__PURE__ */ h((l) => new RegExp(`^ {0,${Math.min(3, l - 1)}}>`), "blockquoteBeginRegex") }, rr = /^(?:[ \t]*(?:\n|$))+/, ir = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ar = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Qe = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, lr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Vt = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Kn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Jn = R(Kn).replace(/bull/g, Vt).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(), or = R(Kn).replace(/bull/g, Vt).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(), Qt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, cr = /^[^\n]+/, Kt = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ur = R(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Kt).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hr = R(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Vt).getRegex(), bt = "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", Jt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, pr = R("^ {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", Jt).replace("tag", bt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), es = R(Qt).replace("hr", Qe).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", bt).getRegex(), fr = R(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", es).getRegex(), en = { blockquote: fr, code: ir, def: ur, fences: ar, heading: lr, hr: Qe, html: pr, lheading: Jn, list: hr, newline: rr, paragraph: es, table: Se, text: cr }, Un = R("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Qe).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", bt).getRegex(), dr = { ...en, lheading: or, table: Un, paragraph: R(Qt).replace("hr", Qe).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Un).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", bt).getRegex() }, gr = { ...en, html: R(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Jt).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: Se, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: R(Qt).replace("hr", Qe).replace("heading", ` *#{1,6} *[^
881
- ]`).replace("lheading", Jn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, mr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, kr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ts = /^( {2,}|\\)\n(?!\s*$)/, xr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, wt = /[\p{P}\p{S}]/u, tn = /[\s\p{P}\p{S}]/u, ns = /[^\s\p{P}\p{S}]/u, br = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, tn).getRegex(), ss = /(?!~)[\p{P}\p{S}]/u, wr = /(?!~)[\s\p{P}\p{S}]/u, yr = /(?:[^\s\p{P}\p{S}]|~)/u, rs = /(?![*_])[\p{P}\p{S}]/u, Tr = /(?![*_])[\s\p{P}\p{S}]/u, vr = /(?:[^\s\p{P}\p{S}]|[*_])/u, Sr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", sr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), is = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ar = R(is, "u").replace(/punct/g, wt).getRegex(), Er = R(is, "u").replace(/punct/g, ss).getRegex(), as = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", _r = R(as, "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Rr = R(as, "gu").replace(/notPunctSpace/g, yr).replace(/punctSpace/g, wr).replace(/punct/g, ss).getRegex(), Cr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Dr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, rs).getRegex(), Ir = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Mr = R(Ir, "gu").replace(/notPunctSpace/g, vr).replace(/punctSpace/g, Tr).replace(/punct/g, rs).getRegex(), Lr = R(/\\(punct)/, "gu").replace(/punct/g, wt).getRegex(), Or = R(/^<(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(), Nr = R(Jt).replace("(?:-->|$)", "-->").getRegex(), zr = R("^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", Nr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), gt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Pr = R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", gt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ls = R(/^!?\[(label)\]\[(ref)\]/).replace("label", gt).replace("ref", Kt).getRegex(), os = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", Kt).getRegex(), $r = R("reflink|nolink(?!\\()", "g").replace("reflink", ls).replace("nolink", os).getRegex(), Bn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nn = { _backpedal: Se, anyPunctuation: Lr, autolink: Or, blockSkip: Sr, br: ts, code: kr, del: Se, delLDelim: Se, delRDelim: Se, emStrongLDelim: Ar, emStrongRDelimAst: _r, emStrongRDelimUnd: Cr, escape: mr, link: Pr, nolink: os, punctuation: br, reflink: ls, reflinkSearch: $r, tag: zr, text: xr, url: Se }, Ur = { ...nn, link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", gt).getRegex(), reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", gt).getRegex() }, Zt = { ...nn, emStrongRDelimAst: Rr, emStrongLDelim: Er, delLDelim: Dr, delRDelim: Mr, url: R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Bn).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: R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Bn).getRegex() }, Br = { ...Zt, br: R(ts).replace("{2,}", "*").getRegex(), text: R(Zt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ht = { normal: en, gfm: dr, pedantic: gr }, Ze = { normal: nn, gfm: Zt, breaks: Br, pedantic: Ur }, Fr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Fn = /* @__PURE__ */ h((l) => Fr[l], "de");
882
- function ce(l, t) {
881
+ ]`).replace("lheading", Jn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, mr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, kr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ts = /^( {2,}|\\)\n(?!\s*$)/, xr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, wt = /[\p{P}\p{S}]/u, tn = /[\s\p{P}\p{S}]/u, ns = /[^\s\p{P}\p{S}]/u, br = R(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, tn).getRegex(), ss = /(?!~)[\p{P}\p{S}]/u, wr = /(?!~)[\s\p{P}\p{S}]/u, yr = /(?:[^\s\p{P}\p{S}]|~)/u, rs = /(?![*_])[\p{P}\p{S}]/u, Tr = /(?![*_])[\s\p{P}\p{S}]/u, vr = /(?:[^\s\p{P}\p{S}]|[*_])/u, Sr = R(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", sr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), is = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ar = R(is, "u").replace(/punct/g, wt).getRegex(), Er = R(is, "u").replace(/punct/g, ss).getRegex(), as = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", _r = R(as, "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Rr = R(as, "gu").replace(/notPunctSpace/g, yr).replace(/punctSpace/g, wr).replace(/punct/g, ss).getRegex(), Dr = R("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ns).replace(/punctSpace/g, tn).replace(/punct/g, wt).getRegex(), Cr = R(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, rs).getRegex(), Ir = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Mr = R(Ir, "gu").replace(/notPunctSpace/g, vr).replace(/punctSpace/g, Tr).replace(/punct/g, rs).getRegex(), Lr = R(/\\(punct)/, "gu").replace(/punct/g, wt).getRegex(), Or = R(/^<(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(), zr = R(Jt).replace("(?:-->|$)", "-->").getRegex(), Nr = R("^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", zr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), gt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Pr = R(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", gt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ls = R(/^!?\[(label)\]\[(ref)\]/).replace("label", gt).replace("ref", Kt).getRegex(), os = R(/^!?\[(ref)\](?:\[\])?/).replace("ref", Kt).getRegex(), $r = R("reflink|nolink(?!\\()", "g").replace("reflink", ls).replace("nolink", os).getRegex(), Bn = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nn = { _backpedal: Se, anyPunctuation: Lr, autolink: Or, blockSkip: Sr, br: ts, code: kr, del: Se, delLDelim: Se, delRDelim: Se, emStrongLDelim: Ar, emStrongRDelimAst: _r, emStrongRDelimUnd: Dr, escape: mr, link: Pr, nolink: os, punctuation: br, reflink: ls, reflinkSearch: $r, tag: Nr, text: xr, url: Se }, Ur = { ...nn, link: R(/^!?\[(label)\]\((.*?)\)/).replace("label", gt).getRegex(), reflink: R(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", gt).getRegex() }, Zt = { ...nn, emStrongRDelimAst: Rr, emStrongLDelim: Er, delLDelim: Cr, delRDelim: Mr, url: R(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Bn).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: R(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Bn).getRegex() }, Br = { ...Zt, br: R(ts).replace("{2,}", "*").getRegex(), text: R(Zt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ht = { normal: en, gfm: dr, pedantic: gr }, Ze = { normal: nn, gfm: Zt, breaks: Br, pedantic: Ur }, Fr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Fn = /* @__PURE__ */ h((l) => Fr[l], "de");
882
+ function oe(l, t) {
883
883
  if (t) {
884
884
  if (Y.escapeTest.test(l)) return l.replace(Y.escapeReplace, Fn);
885
885
  } else if (Y.escapeTestNoEncode.test(l)) return l.replace(Y.escapeReplaceNoEncode, Fn);
886
886
  return l;
887
887
  }
888
- h(ce, "O");
888
+ h(oe, "O");
889
889
  function Hn(l) {
890
890
  try {
891
891
  l = encodeURI(l).replace(Y.percentDecode, "%");
@@ -1020,16 +1020,16 @@ ${d}` : d;
1020
1020
  let b = a.at(-1);
1021
1021
  if (b?.type === "code") break;
1022
1022
  if (b?.type === "blockquote") {
1023
- let O = b, C = O.raw + `
1023
+ let O = b, D = O.raw + `
1024
1024
  ` + n.join(`
1025
- `), H = this.blockquote(C);
1026
- a[a.length - 1] = H, s = s.substring(0, s.length - O.raw.length) + H.raw, r = r.substring(0, r.length - O.text.length) + H.text;
1025
+ `), F = this.blockquote(D);
1026
+ a[a.length - 1] = F, s = s.substring(0, s.length - O.raw.length) + F.raw, r = r.substring(0, r.length - O.text.length) + F.text;
1027
1027
  break;
1028
1028
  } else if (b?.type === "list") {
1029
- let O = b, C = O.raw + `
1029
+ let O = b, D = O.raw + `
1030
1030
  ` + n.join(`
1031
- `), H = this.list(C);
1032
- a[a.length - 1] = H, s = s.substring(0, s.length - b.raw.length) + H.raw, r = r.substring(0, r.length - O.raw.length) + H.raw, n = C.substring(a.at(-1).raw.length).split(`
1031
+ `), F = this.list(D);
1032
+ a[a.length - 1] = F, s = s.substring(0, s.length - b.raw.length) + F.raw, r = r.substring(0, r.length - O.raw.length) + F.raw, n = D.substring(a.at(-1).raw.length).split(`
1033
1033
  `);
1034
1034
  continue;
1035
1035
  }
@@ -1049,23 +1049,23 @@ ${d}` : d;
1049
1049
  f = e[0], t = t.substring(f.length);
1050
1050
  let m = Gr(e[2].split(`
1051
1051
  `, 1)[0], e[1].length), b = t.split(`
1052
- `, 1)[0], O = !m.trim(), C = 0;
1053
- if (this.options.pedantic ? (C = 2, d = m.trimStart()) : O ? C = e[1].length + 1 : (C = m.search(this.rules.other.nonSpaceChar), C = C > 4 ? 1 : C, d = m.slice(C), C += e[1].length), O && this.rules.other.blankLine.test(b) && (f += b + `
1052
+ `, 1)[0], O = !m.trim(), D = 0;
1053
+ if (this.options.pedantic ? (D = 2, d = m.trimStart()) : O ? D = e[1].length + 1 : (D = m.search(this.rules.other.nonSpaceChar), D = D > 4 ? 1 : D, d = m.slice(D), D += e[1].length), O && this.rules.other.blankLine.test(b) && (f += b + `
1054
1054
  `, t = t.substring(b.length + 1), p = !0), !p) {
1055
- let H = this.rules.other.nextBulletRegex(C), _e = this.rules.other.hrRegex(C), me = this.rules.other.fencesBeginRegex(C), ee = this.rules.other.headingBeginRegex(C), $ = this.rules.other.htmlBeginRegex(C), W = this.rules.other.blockquoteBeginRegex(C);
1055
+ let F = this.rules.other.nextBulletRegex(D), _e = this.rules.other.hrRegex(D), me = this.rules.other.fencesBeginRegex(D), ee = this.rules.other.headingBeginRegex(D), $ = this.rules.other.htmlBeginRegex(D), W = this.rules.other.blockquoteBeginRegex(D);
1056
1056
  for (; t; ) {
1057
1057
  let te = t.split(`
1058
1058
  `, 1)[0], ue;
1059
- if (b = te, this.options.pedantic ? (b = b.replace(this.rules.other.listReplaceNesting, " "), ue = b) : ue = b.replace(this.rules.other.tabCharGlobal, " "), me.test(b) || ee.test(b) || $.test(b) || W.test(b) || H.test(b) || _e.test(b)) break;
1060
- if (ue.search(this.rules.other.nonSpaceChar) >= C || !b.trim()) d += `
1061
- ` + ue.slice(C);
1059
+ if (b = te, this.options.pedantic ? (b = b.replace(this.rules.other.listReplaceNesting, " "), ue = b) : ue = b.replace(this.rules.other.tabCharGlobal, " "), me.test(b) || ee.test(b) || $.test(b) || W.test(b) || F.test(b) || _e.test(b)) break;
1060
+ if (ue.search(this.rules.other.nonSpaceChar) >= D || !b.trim()) d += `
1061
+ ` + ue.slice(D);
1062
1062
  else {
1063
1063
  if (O || m.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || me.test(m) || ee.test(m) || _e.test(m)) break;
1064
1064
  d += `
1065
1065
  ` + b;
1066
1066
  }
1067
1067
  O = !b.trim(), f += te + `
1068
- `, t = t.substring(te.length + 1), m = ue.slice(C);
1068
+ `, t = t.substring(te.length + 1), m = ue.slice(D);
1069
1069
  }
1070
1070
  }
1071
1071
  r.loose || (o ? r.loose = !0 : this.rules.other.doubleBlankLine.test(f) && (o = !0)), r.items.push({ type: "list_item", raw: f, task: !!this.options.gfm && this.rules.other.listIsTask.test(d), loose: !1, text: d, tokens: [] }), r.raw += f;
@@ -1265,7 +1265,7 @@ ${d}` : d;
1265
1265
  return { type: "text", raw: e[0], text: e[0], escaped: n };
1266
1266
  }
1267
1267
  }
1268
- }, h(Oe, "w"), Oe), be, re = (be = class {
1268
+ }, h(Oe, "w"), Oe), be, se = (be = class {
1269
1269
  constructor(t) {
1270
1270
  _(this, "tokens");
1271
1271
  _(this, "options");
@@ -1472,7 +1472,7 @@ ${d}` : d;
1472
1472
  }
1473
1473
  return e;
1474
1474
  }
1475
- }, h(be, "u"), be), Ne, kt = (Ne = class {
1475
+ }, h(be, "u"), be), ze, kt = (ze = class {
1476
1476
  constructor(t) {
1477
1477
  _(this, "options");
1478
1478
  _(this, "parser");
@@ -1484,8 +1484,8 @@ ${d}` : d;
1484
1484
  code({ text: t, lang: e, escaped: n }) {
1485
1485
  let s = (e || "").match(Y.notSpaceStart)?.[0], r = t.replace(Y.endingNewline, "") + `
1486
1486
  `;
1487
- return s ? '<pre><code class="language-' + ce(s) + '">' + (n ? r : ce(r, !0)) + `</code></pre>
1488
- ` : "<pre><code>" + (n ? r : ce(r, !0)) + `</code></pre>
1487
+ return s ? '<pre><code class="language-' + oe(s) + '">' + (n ? r : oe(r, !0)) + `</code></pre>
1488
+ ` : "<pre><code>" + (n ? r : oe(r, !0)) + `</code></pre>
1489
1489
  `;
1490
1490
  }
1491
1491
  blockquote({ tokens: t }) {
@@ -1563,7 +1563,7 @@ ${t}</tr>
1563
1563
  return `<em>${this.parser.parseInline(t)}</em>`;
1564
1564
  }
1565
1565
  codespan({ text: t }) {
1566
- return `<code>${ce(t, !0)}</code>`;
1566
+ return `<code>${oe(t, !0)}</code>`;
1567
1567
  }
1568
1568
  br(t) {
1569
1569
  return "<br>";
@@ -1576,20 +1576,20 @@ ${t}</tr>
1576
1576
  if (r === null) return s;
1577
1577
  t = r;
1578
1578
  let a = '<a href="' + t + '"';
1579
- return e && (a += ' title="' + ce(e) + '"'), a += ">" + s + "</a>", a;
1579
+ return e && (a += ' title="' + oe(e) + '"'), a += ">" + s + "</a>", a;
1580
1580
  }
1581
1581
  image({ href: t, title: e, text: n, tokens: s }) {
1582
1582
  s && (n = this.parser.parseInline(s, this.parser.textRenderer));
1583
1583
  let r = Hn(t);
1584
- if (r === null) return ce(n);
1584
+ if (r === null) return oe(n);
1585
1585
  t = r;
1586
- let a = `<img src="${t}" alt="${ce(n)}"`;
1587
- return e && (a += ` title="${ce(e)}"`), a += ">", a;
1586
+ let a = `<img src="${t}" alt="${oe(n)}"`;
1587
+ return e && (a += ` title="${oe(e)}"`), a += ">", a;
1588
1588
  }
1589
1589
  text(t) {
1590
- return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : ce(t.text);
1590
+ return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : oe(t.text);
1591
1591
  }
1592
- }, h(Ne, "y"), Ne), ze, sn = (ze = class {
1592
+ }, h(ze, "y"), ze), Ne, sn = (Ne = class {
1593
1593
  strong({ text: t }) {
1594
1594
  return t;
1595
1595
  }
@@ -1620,7 +1620,7 @@ ${t}</tr>
1620
1620
  checkbox({ raw: t }) {
1621
1621
  return t;
1622
1622
  }
1623
- }, h(ze, "$"), ze), we, ie = (we = class {
1623
+ }, h(Ne, "$"), Ne), we, re = (we = class {
1624
1624
  constructor(t) {
1625
1625
  _(this, "options");
1626
1626
  _(this, "renderer");
@@ -1788,10 +1788,10 @@ ${t}</tr>
1788
1788
  return t;
1789
1789
  }
1790
1790
  provideLexer() {
1791
- return this.block ? re.lex : re.lexInline;
1791
+ return this.block ? se.lex : se.lexInline;
1792
1792
  }
1793
1793
  provideParser() {
1794
- return this.block ? ie.parse : ie.parseInline;
1794
+ return this.block ? re.parse : re.parseInline;
1795
1795
  }
1796
1796
  }, h(xe, "P"), _(xe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), _(xe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), xe), Pe, jr = (Pe = class {
1797
1797
  constructor(...t) {
@@ -1799,10 +1799,10 @@ ${t}</tr>
1799
1799
  _(this, "options", this.setOptions);
1800
1800
  _(this, "parse", this.parseMarkdown(!0));
1801
1801
  _(this, "parseInline", this.parseMarkdown(!1));
1802
- _(this, "Parser", ie);
1802
+ _(this, "Parser", re);
1803
1803
  _(this, "Renderer", kt);
1804
1804
  _(this, "TextRenderer", sn);
1805
- _(this, "Lexer", re);
1805
+ _(this, "Lexer", se);
1806
1806
  _(this, "Tokenizer", mt);
1807
1807
  _(this, "Hooks", Ve);
1808
1808
  this.use(...t);
@@ -1914,10 +1914,10 @@ ${t}</tr>
1914
1914
  return this.defaults = { ...this.defaults, ...t }, this;
1915
1915
  }
1916
1916
  lexer(t, e) {
1917
- return re.lex(t, e ?? this.defaults);
1917
+ return se.lex(t, e ?? this.defaults);
1918
1918
  }
1919
1919
  parser(t, e) {
1920
- return ie.parse(t, e ?? this.defaults);
1920
+ return re.parse(t, e ?? this.defaults);
1921
1921
  }
1922
1922
  parseMarkdown(t) {
1923
1923
  return (e, n) => {
@@ -1926,16 +1926,16 @@ ${t}</tr>
1926
1926
  if (typeof e > "u" || e === null) return a(new Error("marked(): input parameter is undefined or null"));
1927
1927
  if (typeof e != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
1928
1928
  if (r.hooks && (r.hooks.options = r, r.hooks.block = t), r.async) return (async () => {
1929
- let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer() : t ? re.lex : re.lexInline)(o, r), p = r.hooks ? await r.hooks.processAllTokens(c) : c;
1929
+ let o = r.hooks ? await r.hooks.preprocess(e) : e, c = await (r.hooks ? await r.hooks.provideLexer() : t ? se.lex : se.lexInline)(o, r), p = r.hooks ? await r.hooks.processAllTokens(c) : c;
1930
1930
  r.walkTokens && await Promise.all(this.walkTokens(p, r.walkTokens));
1931
- let f = await (r.hooks ? await r.hooks.provideParser() : t ? ie.parse : ie.parseInline)(p, r);
1931
+ let f = await (r.hooks ? await r.hooks.provideParser() : t ? re.parse : re.parseInline)(p, r);
1932
1932
  return r.hooks ? await r.hooks.postprocess(f) : f;
1933
1933
  })().catch(a);
1934
1934
  try {
1935
1935
  r.hooks && (e = r.hooks.preprocess(e));
1936
- let o = (r.hooks ? r.hooks.provideLexer() : t ? re.lex : re.lexInline)(e, r);
1936
+ let o = (r.hooks ? r.hooks.provideLexer() : t ? se.lex : se.lexInline)(e, r);
1937
1937
  r.hooks && (o = r.hooks.processAllTokens(o)), r.walkTokens && this.walkTokens(o, r.walkTokens);
1938
- let c = (r.hooks ? r.hooks.provideParser() : t ? ie.parse : ie.parseInline)(o, r);
1938
+ let c = (r.hooks ? r.hooks.provideParser() : t ? re.parse : re.parseInline)(o, r);
1939
1939
  return r.hooks && (c = r.hooks.postprocess(c)), c;
1940
1940
  } catch (o) {
1941
1941
  return a(o);
@@ -1946,7 +1946,7 @@ ${t}</tr>
1946
1946
  return (n) => {
1947
1947
  if (n.message += `
1948
1948
  Please report this to https://github.com/markedjs/marked.`, t) {
1949
- let s = "<p>An error occurred:</p><pre>" + ce(n.message + "", !0) + "</pre>";
1949
+ let s = "<p>An error occurred:</p><pre>" + oe(n.message + "", !0) + "</pre>";
1950
1950
  return e ? Promise.resolve(s) : s;
1951
1951
  }
1952
1952
  if (e) return Promise.reject(n);
@@ -1970,12 +1970,12 @@ I.walkTokens = function(l, t) {
1970
1970
  return Ae.walkTokens(l, t);
1971
1971
  };
1972
1972
  I.parseInline = Ae.parseInline;
1973
- I.Parser = ie;
1974
- I.parser = ie.parse;
1973
+ I.Parser = re;
1974
+ I.parser = re.parse;
1975
1975
  I.Renderer = kt;
1976
1976
  I.TextRenderer = sn;
1977
- I.Lexer = re;
1978
- I.lexer = re.lex;
1977
+ I.Lexer = se;
1978
+ I.lexer = se.lex;
1979
1979
  I.Tokenizer = mt;
1980
1980
  I.Hooks = Ve;
1981
1981
  I.parse = I;
@@ -1984,33 +1984,33 @@ I.setOptions;
1984
1984
  I.use;
1985
1985
  I.walkTokens;
1986
1986
  I.parseInline;
1987
- ie.parse;
1988
- re.lex;
1987
+ re.parse;
1988
+ se.lex;
1989
1989
  const qr = { class: "flex flex-col h-full relative" }, Yr = {
1990
1990
  key: 0,
1991
1991
  class: "pb-4"
1992
1992
  }, Zr = {
1993
1993
  key: 0,
1994
1994
  class: "flex flex-col items-center justify-center pt-12 pb-6 px-4"
1995
- }, Xr = ["src", "alt"], Vr = ["title"], Qr = {
1995
+ }, Xr = { class: "relative mb-3" }, Vr = ["src", "alt"], Qr = ["title"], Kr = {
1996
1996
  key: 0,
1997
1997
  class: "flex items-center gap-3 py-3 px-2"
1998
- }, Kr = ["src", "alt"], Jr = ["src", "alt"], ei = ["src"], ti = ["href"], ni = ["innerHTML"], si = {
1998
+ }, Jr = ["src", "alt"], ei = ["src", "alt"], ti = ["src"], ni = ["href"], si = ["innerHTML"], ri = {
1999
1999
  key: 1,
2000
2000
  class: "flex gap-2 justify-start items-end mb-4"
2001
- }, ri = { class: "flex-shrink-0" }, ii = ["src", "alt"], ai = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, li = {
2001
+ }, ii = { class: "flex-shrink-0" }, ai = ["src", "alt"], li = { class: "flex-shrink-0 pt-4 pb-2 px-3" }, oi = {
2002
2002
  key: 0,
2003
2003
  class: "flex items-center gap-2 px-3 pb-2 overflow-x-auto"
2004
- }, oi = ["src", "alt"], ci = { class: "max-w-20 truncate" }, ui = ["onClick"], hi = {
2004
+ }, ci = ["src", "alt"], ui = { class: "max-w-20 truncate" }, hi = ["onClick"], pi = {
2005
2005
  key: 0,
2006
2006
  class: "shrink-0 flex items-center justify-center size-14"
2007
- }, pi = ["disabled"], fi = {
2007
+ }, fi = ["disabled"], di = {
2008
2008
  key: 0,
2009
2009
  class: "i-svg-spinners-ring-resize size-4"
2010
- }, di = {
2010
+ }, gi = {
2011
2011
  key: 1,
2012
2012
  class: "i-tabler-paperclip size-5"
2013
- }, gi = ["placeholder", "disabled"], mi = ["disabled"], ki = /* @__PURE__ */ xt({
2013
+ }, mi = ["placeholder", "disabled"], ki = ["disabled"], Ei = /* @__PURE__ */ xt({
2014
2014
  __name: "ElAgentChat",
2015
2015
  props: {
2016
2016
  chatController: {},
@@ -2021,8 +2021,7 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2021
2021
  scope: { default: "private" },
2022
2022
  scopeName: {},
2023
2023
  setupHint: {},
2024
- emptyStateMessage: {},
2025
- subtitle: {}
2024
+ emptyStateMessage: {}
2026
2025
  },
2027
2026
  setup(l) {
2028
2027
  const t = new I.Renderer();
@@ -2045,15 +2044,15 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2045
2044
  }, r = Q(() => l.setupHint ?? n[l.scope]), a = Q(() => {
2046
2045
  const y = { ...s[l.scope] };
2047
2046
  return l.scope === "org" && l.scopeName && (y.label = l.scopeName, y.tooltip = `Visible to ${l.scopeName} members`), y;
2048
- }), o = Q(() => l.scale === "lg"), c = se(""), p = se(), f = se(), d = se(), m = se([]), b = se(!1);
2047
+ }), o = Q(() => l.scale === "lg"), c = ne(""), p = ne(), f = ne(), d = ne(), m = ne([]), b = ne(!1);
2049
2048
  function O(y, T) {
2050
2049
  const x = y[T], L = y[T + 1];
2051
2050
  return !L || L.sender !== x.sender;
2052
2051
  }
2053
2052
  h(O, "shouldShowAvatar");
2054
- const C = Q(() => l.chatController?.textState.value), H = Q(() => C.value?.isConnected ?? !1), _e = Q(() => C.value?.isThinking ?? !1), me = Q(() => C.value?.connectionStatus === "disconnected" && !!C.value?.error), ee = Q(() => C.value?.connectionStatus !== "connected" && !C.value?.error), $ = Q(() => C.value?.error), W = Q(() => l.chatController?.sharedMessages.value?.filter((y) => y.sender !== "system") ?? []), te = Q(() => !H.value), ue = Q(() => me.value ? "Agent is offline" : ee.value ? "Connecting..." : "Message"), Ke = Q(() => (c.value.trim() || m.value.length > 0) && !te.value && !b.value);
2053
+ const D = Q(() => l.chatController?.textState.value), F = Q(() => D.value?.isConnected ?? !1), _e = Q(() => D.value?.isThinking ?? !1), me = Q(() => D.value?.connectionStatus === "disconnected" && !!D.value?.error), ee = Q(() => D.value?.connectionStatus !== "connected" && !D.value?.error), $ = Q(() => D.value?.error), W = Q(() => l.chatController?.sharedMessages.value?.filter((y) => y.sender !== "system") ?? []), te = Q(() => !F.value), ue = Q(() => me.value ? "Agent is offline" : ee.value ? "Connecting..." : "Message"), Ke = Q(() => (c.value.trim() || m.value.length > 0) && !te.value && !b.value);
2055
2054
  jn(async () => {
2056
- if (l.chatController && !H.value)
2055
+ if (l.chatController && !F.value)
2057
2056
  try {
2058
2057
  await l.chatController.startTextConversation();
2059
2058
  } catch (y) {
@@ -2062,14 +2061,14 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2062
2061
  });
2063
2062
  async function Je() {
2064
2063
  const y = c.value.trim(), T = m.value.length > 0;
2065
- if (!y && !T || !l.chatController || !H.value || b.value)
2064
+ if (!y && !T || !l.chatController || !F.value || b.value)
2066
2065
  return;
2067
2066
  const x = c.value, L = T ? [...m.value] : void 0;
2068
2067
  c.value = "", m.value = [], f.value && (f.value.style.height = "auto", f.value.focus());
2069
2068
  try {
2070
2069
  await l.chatController.sendChatMessage(x, L), B();
2071
- } catch (D) {
2072
- console.error("Error sending message:", D);
2070
+ } catch (C) {
2071
+ console.error("Error sending message:", C);
2073
2072
  }
2074
2073
  }
2075
2074
  h(Je, "sendMessage");
@@ -2078,7 +2077,7 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2078
2077
  }
2079
2078
  h(yt, "handleKeydown");
2080
2079
  function B() {
2081
- p.value && Nt(() => {
2080
+ p.value && zt(() => {
2082
2081
  p.value.scrollTop = p.value.scrollHeight;
2083
2082
  });
2084
2083
  }
@@ -2086,7 +2085,7 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2086
2085
  function $e() {
2087
2086
  f.value && (f.value.style.height = "auto", f.value.style.height = `${Math.min(f.value.scrollHeight, 150)}px`);
2088
2087
  }
2089
- h($e, "adjustTextareaHeight"), Wt(c, () => Nt(() => $e()));
2088
+ h($e, "adjustTextareaHeight"), Wt(c, () => zt(() => $e()));
2090
2089
  const M = Q(() => l.variant === "light");
2091
2090
  function Ue() {
2092
2091
  d.value?.click();
@@ -2118,53 +2117,53 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2118
2117
  }
2119
2118
  const x = y[T - 1], L = y[T];
2120
2119
  if (!x?.timestamp || !L?.timestamp) return null;
2121
- const D = new Date(x.timestamp).getTime();
2122
- return new Date(L.timestamp).getTime() - D > 36e5 ? Be(new Date(L.timestamp)) : null;
2120
+ const C = new Date(x.timestamp).getTime();
2121
+ return new Date(L.timestamp).getTime() - C > 36e5 ? Be(new Date(L.timestamp)) : null;
2123
2122
  }
2124
2123
  h(et, "shouldShowTimeDivider");
2125
2124
  function Be(y) {
2126
2125
  const T = /* @__PURE__ */ new Date(), x = y.toDateString() === T.toDateString(), L = new Date(T);
2127
2126
  L.setDate(L.getDate() - 1);
2128
- const D = y.toDateString() === L.toDateString(), he = y.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2127
+ const C = y.toDateString() === L.toDateString(), he = y.toLocaleTimeString("en-US", { hour: "numeric", minute: "2-digit" });
2129
2128
  if (x) return he;
2130
- if (D) return `Yesterday, ${he}`;
2131
- const N = y.getFullYear() === T.getFullYear();
2129
+ if (C) return `Yesterday, ${he}`;
2130
+ const z = y.getFullYear() === T.getFullYear();
2132
2131
  return `${y.toLocaleDateString("en-US", {
2133
2132
  weekday: "long",
2134
2133
  month: "short",
2135
2134
  day: "numeric",
2136
- ...N ? {} : { year: "numeric" }
2135
+ ...z ? {} : { year: "numeric" }
2137
2136
  })}, ${he}`;
2138
2137
  }
2139
2138
  return h(Be, "formatTimeDivider"), Wt(W, (y) => {
2140
- y.length > 0 && Nt(() => B());
2141
- }, { immediate: !0, deep: !0 }), (y, T) => (v(), S("div", qr, [
2142
- M.value ? q("", !0) : (v(), S("div", Yr, [
2143
- zt(Os, {
2139
+ y.length > 0 && zt(() => B());
2140
+ }, { immediate: !0, deep: !0 }), (y, T) => (A(), E("div", qr, [
2141
+ M.value ? q("", !0) : (A(), E("div", Yr, [
2142
+ Nt(Os, {
2144
2143
  agent: l.agent,
2145
- "is-online": H.value
2144
+ "is-online": F.value
2146
2145
  }, null, 8, ["agent", "is-online"])
2147
2146
  ])),
2148
- me.value ? (v(), S("div", {
2147
+ me.value ? (A(), E("div", {
2149
2148
  key: 1,
2150
- class: E(["py-16 flex flex-col items-center justify-center gap-3 text-sm", M.value ? "text-theme-400" : "text-white/60"])
2149
+ class: v(["py-16 flex flex-col items-center justify-center gap-3 text-sm", M.value ? "text-theme-400" : "text-white/60"])
2151
2150
  }, [
2152
2151
  w("i", {
2153
- class: E(["i-heroicons-cloud-arrow-down size-8", M.value ? "text-theme-300" : "text-white/40"])
2152
+ class: v(["i-heroicons-cloud-arrow-down size-8", M.value ? "text-theme-300" : "text-white/40"])
2154
2153
  }, null, 2),
2155
- w("span", null, ne($.value), 1)
2156
- ], 2)) : ee.value ? (v(), S("div", {
2154
+ w("span", null, ce($.value), 1)
2155
+ ], 2)) : ee.value ? (A(), E("div", {
2157
2156
  key: 2,
2158
- class: E(["py-16 flex flex-col items-center justify-center gap-2 text-sm", M.value ? "text-theme-400" : "text-theme-600"])
2157
+ class: v(["py-16 flex flex-col items-center justify-center gap-2 text-sm", M.value ? "text-theme-400" : "text-theme-600"])
2159
2158
  }, [
2160
- zt(_n, { class: "size-4" })
2161
- ], 2)) : (v(), S("div", {
2159
+ Nt(_n, { class: "size-4" })
2160
+ ], 2)) : (A(), E("div", {
2162
2161
  key: 3,
2163
- class: E(["flex items-center justify-center gap-1.5 py-2 text-[11px]", M.value ? "text-theme-300" : "text-white/30"])
2162
+ class: v(["flex items-center justify-center gap-1.5 py-2 text-[11px]", M.value ? "text-theme-300" : "text-white/30"])
2164
2163
  }, [
2165
- r.value ? (v(), S(ve, { key: 0 }, [
2164
+ r.value ? (A(), E(ve, { key: 0 }, [
2166
2165
  T[2] || (T[2] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
2167
- w("span", null, ne(r.value), 1)
2166
+ w("span", null, ce(r.value), 1)
2168
2167
  ], 64)) : q("", !0)
2169
2168
  ], 2)),
2170
2169
  w("div", {
@@ -2172,154 +2171,166 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2172
2171
  ref: p,
2173
2172
  class: "flex-1 overflow-y-auto overflow-x-hidden py-4 px-3 space-y-1 min-h-0 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden"
2174
2173
  }, [
2175
- W.value.length === 0 && !ee.value && !me.value ? (v(), S("div", Zr, [
2176
- w("img", {
2177
- src: l.agent.avatarUrl.value,
2178
- alt: l.agent.displayName.value,
2179
- class: E(["rounded-full object-cover mb-3", o.value ? "size-28" : "size-20"])
2180
- }, null, 10, Xr),
2174
+ W.value.length === 0 && !ee.value && !me.value ? (A(), E("div", Zr, [
2175
+ w("div", Xr, [
2176
+ w("img", {
2177
+ src: l.agent.avatarUrl.value,
2178
+ alt: l.agent.displayName.value,
2179
+ class: v(["rounded-full object-cover", o.value ? "size-28" : "size-20"])
2180
+ }, null, 10, Vr),
2181
+ F.value ? (A(), E("span", {
2182
+ key: 0,
2183
+ class: v(["absolute bottom-0.5 right-0.5 flex items-center justify-center", o.value ? "size-6" : "size-5"])
2184
+ }, [
2185
+ w("span", {
2186
+ class: v(["absolute inline-flex rounded-full bg-emerald-400/40 animate-ping", o.value ? "size-4" : "size-3"]),
2187
+ style: { "animation-duration": "2.5s" }
2188
+ }, null, 2),
2189
+ w("span", {
2190
+ class: v(["relative inline-flex rounded-full bg-emerald-500 ring-2", [
2191
+ o.value ? "size-3" : "size-2.5",
2192
+ M.value ? "ring-white" : "ring-theme-900"
2193
+ ]])
2194
+ }, null, 2)
2195
+ ], 2)) : q("", !0)
2196
+ ]),
2181
2197
  w("div", {
2182
- class: E(["font-semibold", [M.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2183
- }, ne(l.agent.displayName.value), 3),
2184
- l.subtitle || l.agent.hasCustomHandle.value ? (v(), S("div", {
2185
- key: 0,
2186
- class: E(["mt-0.5", [M.value ? "text-theme-400" : "text-white/50", o.value ? "text-sm" : "text-xs"]])
2187
- }, ne(l.subtitle || l.agent.displayHandle.value), 3)) : q("", !0),
2188
- l.emptyStateMessage ? (v(), S("p", {
2189
- key: 1,
2190
- class: E(["text-center mt-3 leading-relaxed line-clamp-2", [M.value ? "text-theme-400" : "text-white/50", o.value ? "text-base max-w-[300px]" : "text-sm max-w-[240px]"]])
2191
- }, ne(l.emptyStateMessage), 3)) : (v(), S("div", {
2192
- key: 2,
2193
- class: E(["inline-flex items-center gap-1.5 mt-2 px-2.5 py-1 rounded-full text-[11px]", M.value ? "bg-theme-50 border border-theme-200 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2198
+ class: v(["font-semibold", [M.value ? "text-theme-900" : "text-white", o.value ? "text-lg" : "text-base"]])
2199
+ }, ce(l.agent.displayName.value), 3),
2200
+ w("p", {
2201
+ class: v(["mt-1 text-center", [M.value ? "text-theme-300" : "text-white/30", o.value ? "text-sm" : "text-xs"]])
2202
+ }, ce(l.emptyStateMessage || "Send a message to get started"), 3),
2203
+ w("div", {
2204
+ class: v(["inline-flex items-center gap-1.5 mt-6 px-2.5 py-1 rounded-full text-[11px]", M.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
2194
2205
  title: a.value.tooltip
2195
2206
  }, [
2196
2207
  w("i", {
2197
- class: E([a.value.icon, "size-3"])
2208
+ class: v([a.value.icon, "size-3"])
2198
2209
  }, null, 2),
2199
- w("span", null, ne(a.value.label), 1)
2200
- ], 10, Vr))
2210
+ w("span", null, ce(a.value.label), 1)
2211
+ ], 10, Qr)
2201
2212
  ])) : q("", !0),
2202
- (v(!0), S(ve, null, Pt(W.value, (x, L) => (v(), S(ve, {
2213
+ (A(!0), E(ve, null, Pt(W.value, (x, L) => (A(), E(ve, {
2203
2214
  key: x.id
2204
2215
  }, [
2205
- et(W.value, L) ? (v(), S("div", Qr, [
2216
+ et(W.value, L) ? (A(), E("div", Kr, [
2206
2217
  w("div", {
2207
- class: E(["flex-1 h-px", M.value ? "bg-theme-200" : "bg-white/10"])
2218
+ class: v(["flex-1 h-px", M.value ? "bg-theme-200" : "bg-white/10"])
2208
2219
  }, null, 2),
2209
2220
  w("span", {
2210
- class: E(["font-medium shrink-0", [M.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2211
- }, ne(et(W.value, L)), 3),
2221
+ class: v(["font-medium shrink-0", [M.value ? "text-theme-400" : "text-white/40", o.value ? "text-xs" : "text-[11px]"]])
2222
+ }, ce(et(W.value, L)), 3),
2212
2223
  w("div", {
2213
- class: E(["flex-1 h-px", M.value ? "bg-theme-200" : "bg-white/10"])
2224
+ class: v(["flex-1 h-px", M.value ? "bg-theme-200" : "bg-white/10"])
2214
2225
  }, null, 2)
2215
2226
  ])) : q("", !0),
2216
2227
  w("div", {
2217
- class: E(["flex gap-2 items-end", {
2228
+ class: v(["flex gap-2 items-end", {
2218
2229
  "justify-end": x.sender === "user",
2219
2230
  "justify-start": x.sender === "agent",
2220
2231
  "mb-4": O(W.value, L)
2221
2232
  }])
2222
2233
  }, [
2223
- x.sender === "agent" ? (v(), S("div", {
2234
+ x.sender === "agent" ? (A(), E("div", {
2224
2235
  key: 0,
2225
- class: E(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2236
+ class: v(["flex-shrink-0", o.value ? "size-10" : "size-8"])
2226
2237
  }, [
2227
- O(W.value, L) ? (v(), S("img", {
2238
+ O(W.value, L) ? (A(), E("img", {
2228
2239
  key: 0,
2229
2240
  src: l.agent.avatarUrl.value,
2230
2241
  alt: l.agent.displayName.value,
2231
- class: E(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2232
- }, null, 10, Kr)) : q("", !0)
2242
+ class: v(["rounded-full object-cover", o.value ? "size-10" : "size-7"])
2243
+ }, null, 10, Jr)) : q("", !0)
2233
2244
  ], 2)) : q("", !0),
2234
2245
  w("div", {
2235
- class: E(x.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2246
+ class: v(x.sender === "user" ? "max-w-[75%]" : "max-w-[85%]")
2236
2247
  }, [
2237
- x.attachments?.length ? (v(), S("div", {
2248
+ x.attachments?.length ? (A(), E("div", {
2238
2249
  key: 0,
2239
- class: E(["mb-1 space-y-1", x.sender === "user" ? "flex flex-col items-end" : ""])
2250
+ class: v(["mb-1 space-y-1", x.sender === "user" ? "flex flex-col items-end" : ""])
2240
2251
  }, [
2241
- (v(!0), S(ve, null, Pt(x.attachments, (D, he) => (v(), S(ve, { key: he }, [
2242
- D.type === "image" ? (v(), S("img", {
2252
+ (A(!0), E(ve, null, Pt(x.attachments, (C, he) => (A(), E(ve, { key: he }, [
2253
+ C.type === "image" ? (A(), E("img", {
2243
2254
  key: 0,
2244
- src: D.url,
2245
- alt: D.name,
2246
- class: E(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2247
- }, null, 10, Jr)) : D.type === "audio" ? (v(), S("audio", {
2255
+ src: C.url,
2256
+ alt: C.name,
2257
+ class: v(["rounded-xl object-cover max-h-48", o.value ? "max-w-[320px]" : "max-w-[240px]"])
2258
+ }, null, 10, ei)) : C.type === "audio" ? (A(), E("audio", {
2248
2259
  key: 1,
2249
- src: D.url,
2260
+ src: C.url,
2250
2261
  controls: "",
2251
2262
  class: "max-w-full"
2252
- }, null, 8, ei)) : (v(), S("a", {
2263
+ }, null, 8, ti)) : (A(), E("a", {
2253
2264
  key: 2,
2254
- href: D.url,
2265
+ href: C.url,
2255
2266
  target: "_blank",
2256
2267
  rel: "noopener",
2257
- class: E(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", M.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2268
+ class: v(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", M.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
2258
2269
  }, [
2259
2270
  T[3] || (T[3] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
2260
- xs(" " + ne(D.name), 1)
2261
- ], 10, ti))
2271
+ xs(" " + ce(C.name), 1)
2272
+ ], 10, ni))
2262
2273
  ], 64))), 128))
2263
2274
  ], 2)) : q("", !0),
2264
- x.text ? (v(), S("div", {
2275
+ x.text ? (A(), E("div", {
2265
2276
  key: 1,
2266
- class: E(["rounded-2xl px-3.5 py-2", x.sender === "user" ? "bg-primary-500 text-white" : M.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2277
+ class: v(["rounded-2xl px-3.5 py-2", x.sender === "user" ? "bg-primary-500 text-white" : M.value ? "bg-theme-100 text-theme-800" : "bg-white/15 backdrop-blur-sm text-white/95"])
2267
2278
  }, [
2268
2279
  w("div", {
2269
- class: E(["chat-msg-prose break-words", o.value ? "text-[15px] leading-[1.6]" : "text-[13px] leading-[1.55]"]),
2280
+ class: v(["chat-msg-prose break-words", o.value ? "text-[15px] leading-[1.6]" : "text-[13px] leading-[1.55]"]),
2270
2281
  innerHTML: e(x.text)
2271
- }, null, 10, ni)
2282
+ }, null, 10, si)
2272
2283
  ], 2)) : q("", !0)
2273
2284
  ], 2)
2274
2285
  ], 2)
2275
2286
  ], 64))), 128)),
2276
- _e.value ? (v(), S("div", si, [
2277
- w("div", ri, [
2287
+ _e.value ? (A(), E("div", ri, [
2288
+ w("div", ii, [
2278
2289
  w("img", {
2279
2290
  src: l.agent.avatarUrl.value,
2280
2291
  alt: l.agent.displayName.value,
2281
- class: E(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2282
- }, null, 10, ii)
2292
+ class: v(["rounded-full object-cover", o.value ? "size-10" : "size-8"])
2293
+ }, null, 10, ai)
2283
2294
  ]),
2284
2295
  w("div", {
2285
- class: E(["rounded-2xl px-4 py-2.5 flex items-center", M.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2296
+ class: v(["rounded-2xl px-4 py-2.5 flex items-center", M.value ? "bg-theme-100" : "bg-white/15 backdrop-blur-sm"])
2286
2297
  }, [
2287
2298
  w("i", {
2288
- class: E(["i-svg-spinners-3-dots-fade size-6", M.value ? "text-theme-400" : "text-white/70"])
2299
+ class: v(["i-svg-spinners-3-dots-fade size-6", M.value ? "text-theme-400" : "text-white/70"])
2289
2300
  }, null, 2)
2290
2301
  ], 2)
2291
2302
  ])) : q("", !0)
2292
2303
  ], 512),
2293
- w("div", ai, [
2294
- m.value.length > 0 ? (v(), S("div", li, [
2295
- (v(!0), S(ve, null, Pt(m.value, (x, L) => (v(), S("div", {
2304
+ w("div", li, [
2305
+ m.value.length > 0 ? (A(), E("div", oi, [
2306
+ (A(!0), E(ve, null, Pt(m.value, (x, L) => (A(), E("div", {
2296
2307
  key: L,
2297
2308
  class: "relative shrink-0 group"
2298
2309
  }, [
2299
- x.type === "image" ? (v(), S("img", {
2310
+ x.type === "image" ? (A(), E("img", {
2300
2311
  key: 0,
2301
2312
  src: x.url,
2302
2313
  alt: x.name,
2303
- class: E(["size-14 rounded-lg object-cover border", M.value ? "border-theme-200" : "border-white/20"])
2304
- }, null, 10, oi)) : (v(), S("div", {
2314
+ class: v(["size-14 rounded-lg object-cover border", M.value ? "border-theme-200" : "border-white/20"])
2315
+ }, null, 10, ci)) : (A(), E("div", {
2305
2316
  key: 1,
2306
- class: E(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", M.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2317
+ class: v(["h-14 px-3 rounded-lg flex items-center gap-1.5 text-xs border", M.value ? "border-theme-200 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
2307
2318
  }, [
2308
2319
  T[4] || (T[4] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
2309
- w("span", ci, ne(x.name), 1)
2320
+ w("span", ui, ce(x.name), 1)
2310
2321
  ], 2)),
2311
2322
  w("button", {
2312
2323
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-600 text-white text-xs opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer",
2313
- onClick: /* @__PURE__ */ h((D) => vt(L), "onClick")
2324
+ onClick: /* @__PURE__ */ h((C) => vt(L), "onClick")
2314
2325
  }, [...T[5] || (T[5] = [
2315
2326
  w("i", { class: "i-tabler-x size-3" }, null, -1)
2316
- ])], 8, ui)
2327
+ ])], 8, hi)
2317
2328
  ]))), 128)),
2318
- b.value ? (v(), S("div", hi, [
2319
- zt(_n, { class: "size-5" })
2329
+ b.value ? (A(), E("div", pi, [
2330
+ Nt(_n, { class: "size-5" })
2320
2331
  ])) : q("", !0)
2321
2332
  ])) : q("", !0),
2322
- l.uploadFn ? (v(), S("input", {
2333
+ l.uploadFn ? (A(), E("input", {
2323
2334
  key: 1,
2324
2335
  ref_key: "fileInput",
2325
2336
  ref: d,
@@ -2329,11 +2340,11 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2329
2340
  onChange: Tt
2330
2341
  }, null, 544)) : q("", !0),
2331
2342
  w("div", {
2332
- class: E(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", M.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2343
+ class: v(["flex items-end gap-1 w-full rounded-3xl px-3 py-1.5", M.value ? "bg-theme-50 border border-theme-200 focus-within:border-theme-300" : "bg-white/10 backdrop-blur-sm border border-white/20 focus-within:border-white/40"])
2333
2344
  }, [
2334
- l.uploadFn ? (v(), S("button", {
2345
+ l.uploadFn ? (A(), E("button", {
2335
2346
  key: 0,
2336
- class: E(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
2347
+ class: v(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 cursor-pointer", [
2337
2348
  o.value ? "size-10" : "size-9",
2338
2349
  M.value ? "text-theme-400 hover:text-theme-600" : "text-white/50 hover:text-white/80",
2339
2350
  b.value ? "opacity-50 pointer-events-none" : ""
@@ -2341,8 +2352,8 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2341
2352
  disabled: te.value || b.value,
2342
2353
  onClick: Ue
2343
2354
  }, [
2344
- b.value ? (v(), S("i", fi)) : (v(), S("i", di))
2345
- ], 10, pi)) : q("", !0),
2355
+ b.value ? (A(), E("i", di)) : (A(), E("i", gi))
2356
+ ], 10, fi)) : q("", !0),
2346
2357
  bs(w("textarea", {
2347
2358
  ref_key: "textarea",
2348
2359
  ref: f,
@@ -2352,13 +2363,13 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2352
2363
  placeholder: ue.value,
2353
2364
  disabled: te.value,
2354
2365
  style: ws({ fontSize: (o.value, "16px"), resize: "none" }),
2355
- class: E(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", M.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2366
+ class: v(["flex-1 min-w-0 bg-transparent px-2 py-1.5 focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", M.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
2356
2367
  onKeydown: yt
2357
- }, null, 46, gi), [
2368
+ }, null, 46, mi), [
2358
2369
  [ys, c.value]
2359
2370
  ]),
2360
2371
  w("button", {
2361
- class: E(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2372
+ class: v(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5", [
2362
2373
  o.value ? "size-10" : "size-9",
2363
2374
  Ke.value ? "bg-primary-500 text-white hover:bg-primary-600 cursor-pointer" : M.value ? "bg-theme-100 text-theme-300" : "bg-white/10 text-white/30"
2364
2375
  ]]),
@@ -2366,23 +2377,18 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2366
2377
  onClick: T[1] || (T[1] = (x) => Je())
2367
2378
  }, [...T[6] || (T[6] = [
2368
2379
  w("i", { class: "i-tabler-arrow-up size-5" }, null, -1)
2369
- ])], 10, mi)
2380
+ ])], 10, ki)
2370
2381
  ], 2),
2371
2382
  w("div", {
2372
- class: E(["hidden lg:block text-[10px] text-center mt-2", M.value ? "text-theme-300" : "text-white/40"])
2383
+ class: v(["hidden lg:block text-[10px] text-center mt-2", M.value ? "text-theme-300" : "text-white/40"])
2373
2384
  }, " Press Enter to send, Shift+Enter for new line ", 2)
2374
2385
  ])
2375
2386
  ]));
2376
2387
  }
2377
- }), xi = /* @__PURE__ */ h((l, t) => {
2378
- const e = l.__vccOpts || l;
2379
- for (const [n, s] of t)
2380
- e[n] = s;
2381
- return e;
2382
- }, "_export_sfc"), _i = /* @__PURE__ */ xi(ki, [["__scopeId", "data-v-55402c5d"]]), bi = { class: "agent-wrap" }, wi = {
2388
+ }), xi = { class: "agent-wrap" }, bi = {
2383
2389
  key: 0,
2384
2390
  class: "flex items-center justify-center h-full"
2385
- }, Ri = /* @__PURE__ */ xt({
2391
+ }, _i = /* @__PURE__ */ xt({
2386
2392
  __name: "AgentWrap",
2387
2393
  props: {
2388
2394
  sdk: {},
@@ -2399,7 +2405,7 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2399
2405
  const t = As("AgentWrap"), e = l, n = e.sdk || Es.getInstance({
2400
2406
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
2401
2407
  ...e.apiBase && { apiBase: e.apiBase }
2402
- }), s = se(!e.agent), r = Ts(e.agent ? new dt({ config: e.agent }) : void 0), a = se();
2408
+ }), s = ne(!e.agent), r = Ts(e.agent ? new dt({ config: e.agent }) : void 0), a = ne();
2403
2409
  return jn(async () => {
2404
2410
  if (e.agent) {
2405
2411
  t.debug("Agent provided via props, skipping fetch", {
@@ -2476,8 +2482,8 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2476
2482
  }
2477
2483
  });
2478
2484
  }
2479
- }), (o, c) => (v(), S("div", bi, [
2480
- s.value ? (v(), S("div", wi, [...c[0] || (c[0] = [
2485
+ }), (o, c) => (A(), E("div", xi, [
2486
+ s.value ? (A(), E("div", bi, [...c[0] || (c[0] = [
2481
2487
  w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
2482
2488
  ])])) : r.value ? vs(o.$slots, "default", {
2483
2489
  key: 1,
@@ -2494,13 +2500,12 @@ const qr = { class: "flex flex-col h-full relative" }, Yr = {
2494
2500
  });
2495
2501
  export {
2496
2502
  Rn as A,
2497
- _i as E,
2498
- Ri as _,
2499
- xi as a,
2503
+ _i as _,
2504
+ Ei as a,
2500
2505
  _n as b,
2501
2506
  Os as c,
2502
- Ai as g,
2503
- Dn as h,
2504
- Ei as p
2507
+ Si as g,
2508
+ Cn as h,
2509
+ Ai as p
2505
2510
  };
2506
- //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-B5oPUOJ_.js.map
2511
+ //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang-CvNzBs-l.js.map