@doderasoftware/restify-ai 0.1.0-beta.1 → 0.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  var zs = Object.defineProperty;
2
2
  var Hs = (n, e, t) => e in n ? zs(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
3
  var W = (n, e, t) => Hs(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { ref as q, nextTick as Oe, onUnmounted as yt, computed as O, onMounted as xt, watch as Ue, isRef as Fs, onBeforeUnmount as Bs, defineComponent as he, createElementBlock as v, openBlock as k, normalizeClass as T, renderSlot as me, createElementVNode as p, createCommentVNode as B, Fragment as we, renderList as Ne, toDisplayString as N, createBlock as Me, resolveDynamicComponent as nn, withCtx as Ce, createVNode as ge, normalizeStyle as ss, Transition as mt, withModifiers as Je, unref as D, withDirectives as Us, vModelText as qs, createStaticVNode as On, createTextVNode as js, Teleport as Ws, normalizeProps as Nn, guardReactiveProps as Pn } from "vue";
5
- import { defineStore as Vs } from "pinia";
4
+ import { ref as q, nextTick as Oe, onUnmounted as yt, computed as O, onMounted as xt, watch as Ue, isRef as Fs, onBeforeUnmount as Bs, defineComponent as he, createElementBlock as v, openBlock as k, normalizeClass as T, renderSlot as me, createElementVNode as p, createCommentVNode as B, Fragment as we, renderList as Ne, toDisplayString as N, createBlock as Me, resolveDynamicComponent as nn, withCtx as Ce, createVNode as ge, normalizeStyle as un, Transition as mt, withModifiers as et, unref as D, withDirectives as Us, vModelText as qs, createStaticVNode as Nn, createTextVNode as js, Teleport as Ws, normalizeProps as Pn, guardReactiveProps as zn } from "vue";
5
+ import { defineStore as Ks } from "pinia";
6
6
  let qe = null;
7
- const Gs = q(null), rs = {
7
+ const Vs = q(null), rs = {
8
8
  title: "AI Assistant",
9
9
  aiName: "AI Assistant",
10
10
  you: "You",
@@ -58,8 +58,8 @@ const Gs = q(null), rs = {
58
58
  setupBackendDescription: "Configure your backend endpoint",
59
59
  setupCompleteTitle: "Setup Complete!"
60
60
  };
61
- function Ks(n) {
62
- qe = n, Gs.value = n;
61
+ function Gs(n) {
62
+ qe = n, Vs.value = n;
63
63
  }
64
64
  function ee() {
65
65
  return qe;
@@ -86,7 +86,7 @@ function le(n, e) {
86
86
  o = o.replace(`{${i}}`, String(a));
87
87
  }), o;
88
88
  }
89
- function zn(n) {
89
+ function Hn(n) {
90
90
  return {
91
91
  chatHistoryLimit: 15,
92
92
  maxAttachments: 5,
@@ -98,11 +98,11 @@ function zn(n) {
98
98
  enableSupportMode: !1
99
99
  }[n];
100
100
  }
101
- function et(n) {
101
+ function tt(n) {
102
102
  const e = qe;
103
- return e ? e[n] ?? zn(n) : zn(n);
103
+ return e ? e[n] ?? Hn(n) : Hn(n);
104
104
  }
105
- const tt = {
105
+ const nt = {
106
106
  Assistant: "assistant",
107
107
  User: "user",
108
108
  System: "system"
@@ -141,11 +141,11 @@ function Zs(n) {
141
141
  };
142
142
  }
143
143
  function Ys(n, e, t) {
144
- let s = Hn();
144
+ let s = Fn();
145
145
  const r = new TextDecoder();
146
146
  return function(i, a) {
147
147
  if (i.length === 0)
148
- t == null || t(s), s = Hn();
148
+ t == null || t(s), s = Fn();
149
149
  else if (a > 0) {
150
150
  const c = r.decode(i.subarray(0, a)), u = a + (i[a + 1] === 32 ? 2 : 1), d = r.decode(i.subarray(u));
151
151
  switch (c) {
@@ -160,8 +160,8 @@ function Ys(n, e, t) {
160
160
  n(s.id = d);
161
161
  break;
162
162
  case "retry":
163
- const m = parseInt(d, 10);
164
- isNaN(m) || e(s.retry = m);
163
+ const g = parseInt(d, 10);
164
+ isNaN(g) || e(s.retry = g);
165
165
  break;
166
166
  }
167
167
  }
@@ -171,7 +171,7 @@ function Xs(n, e) {
171
171
  const t = new Uint8Array(n.length + e.length);
172
172
  return t.set(n), t.set(e, n.length), t;
173
173
  }
174
- function Hn() {
174
+ function Fn() {
175
175
  return {
176
176
  data: "",
177
177
  event: "",
@@ -187,10 +187,10 @@ var Js = function(n, e) {
187
187
  e.indexOf(s[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, s[r]) && (t[s[r]] = n[s[r]]);
188
188
  return t;
189
189
  };
190
- const sn = "text/event-stream", er = 1e3, Fn = "last-event-id";
190
+ const sn = "text/event-stream", er = 1e3, Bn = "last-event-id";
191
191
  function tr(n, e) {
192
192
  var { signal: t, headers: s, onopen: r, onmessage: o, onclose: i, onerror: a, openWhenHidden: c, fetch: u } = e, d = Js(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
193
- return new Promise((m, w) => {
193
+ return new Promise((g, w) => {
194
194
  const y = Object.assign({}, s);
195
195
  y.accept || (y.accept = sn);
196
196
  let h;
@@ -198,28 +198,28 @@ function tr(n, e) {
198
198
  h.abort(), document.hidden || z();
199
199
  }
200
200
  c || document.addEventListener("visibilitychange", A);
201
- let g = er, f = 0;
201
+ let m = er, f = 0;
202
202
  function S() {
203
203
  document.removeEventListener("visibilitychange", A), window.clearTimeout(f), h.abort();
204
204
  }
205
205
  t == null || t.addEventListener("abort", () => {
206
- S(), m();
206
+ S(), g();
207
207
  });
208
208
  const C = u ?? window.fetch, b = r ?? nr;
209
209
  async function z() {
210
210
  var F;
211
211
  h = new AbortController();
212
212
  try {
213
- const G = await C(n, Object.assign(Object.assign({}, d), { headers: y, signal: h.signal }));
214
- await b(G), await Qs(G.body, Zs(Ys((E) => {
215
- E ? y[Fn] = E : delete y[Fn];
213
+ const V = await C(n, Object.assign(Object.assign({}, d), { headers: y, signal: h.signal }));
214
+ await b(V), await Qs(V.body, Zs(Ys((E) => {
215
+ E ? y[Bn] = E : delete y[Bn];
216
216
  }, (E) => {
217
- g = E;
218
- }, o))), i == null || i(), S(), m();
219
- } catch (G) {
217
+ m = E;
218
+ }, o))), i == null || i(), S(), g();
219
+ } catch (V) {
220
220
  if (!h.signal.aborted)
221
221
  try {
222
- const E = (F = a == null ? void 0 : a(G)) !== null && F !== void 0 ? F : g;
222
+ const E = (F = a == null ? void 0 : a(V)) !== null && F !== void 0 ? F : m;
223
223
  window.clearTimeout(f), f = window.setTimeout(z, E);
224
224
  } catch (E) {
225
225
  S(), w(E);
@@ -295,7 +295,7 @@ function lr() {
295
295
  if (n) {
296
296
  const e = JSON.parse(n), t = e.filter((o) => {
297
297
  var i;
298
- return !(o.role === tt.Assistant && o.loading || o.role === tt.Assistant && !((i = o.message) != null && i.trim()));
298
+ return !(o.role === nt.Assistant && o.loading || o.role === nt.Assistant && !((i = o.message) != null && i.trim()));
299
299
  }).map((o) => ({
300
300
  ...o,
301
301
  // Reset streaming flag in case page was refreshed mid-stream
@@ -303,7 +303,7 @@ function lr() {
303
303
  loading: !1
304
304
  }));
305
305
  t.length !== e.length && sessionStorage.setItem(Pe("chatHistory"), JSON.stringify(t));
306
- const s = t[t.length - 1], r = (s == null ? void 0 : s.role) === tt.User;
306
+ const s = t[t.length - 1], r = (s == null ? void 0 : s.role) === nt.User;
307
307
  return {
308
308
  history: t,
309
309
  hasOrphanedUserMessage: r,
@@ -349,7 +349,7 @@ function dr() {
349
349
  return !1;
350
350
  }
351
351
  }
352
- function Bn() {
352
+ function Un() {
353
353
  try {
354
354
  localStorage.setItem(Pe("setupComplete"), "true");
355
355
  } catch (n) {
@@ -365,7 +365,7 @@ function pr(n) {
365
365
  });
366
366
  }), e;
367
367
  }
368
- function Un() {
368
+ function qn() {
369
369
  return {
370
370
  isActive: !1,
371
371
  currentStep: "welcome",
@@ -375,7 +375,7 @@ function Un() {
375
375
  lastError: null
376
376
  };
377
377
  }
378
- const nt = Vs("restifyAiStore", {
378
+ const We = Ks("restifyAiStore", {
379
379
  state: () => {
380
380
  const n = lr(), e = ir();
381
381
  let t = {
@@ -398,7 +398,7 @@ const nt = Vs("restifyAiStore", {
398
398
  timestamp: Date.now(),
399
399
  quotaExceeded: !1
400
400
  }), {
401
- chatHistoryLimit: et("chatHistoryLimit") || 15,
401
+ chatHistoryLimit: tt("chatHistoryLimit") || 15,
402
402
  chatHistory: n.history,
403
403
  uploadedFiles: pr(n.history),
404
404
  loading: !1,
@@ -413,7 +413,7 @@ const nt = Vs("restifyAiStore", {
413
413
  },
414
414
  error: t,
415
415
  supportRequestMode: !1,
416
- setupState: !os() && !dr() ? { ...Un(), isActive: !0 } : Un()
416
+ setupState: !os() && !dr() ? { ...qn(), isActive: !0 } : qn()
417
417
  };
418
418
  },
419
419
  getters: {
@@ -439,7 +439,7 @@ const nt = Vs("restifyAiStore", {
439
439
  let o = "", i = !1;
440
440
  const a = r.retry || {}, c = a.maxRetries ?? 0, u = a.retryDelay ?? 1e3;
441
441
  let d = 0;
442
- const m = e.map((h) => ({
442
+ const g = e.map((h) => ({
443
443
  id: h.id,
444
444
  name: h.name,
445
445
  url: h.url,
@@ -449,15 +449,15 @@ const nt = Vs("restifyAiStore", {
449
449
  }));
450
450
  this.chatHistory.push({
451
451
  id: crypto.randomUUID(),
452
- role: tt.User,
452
+ role: nt.User,
453
453
  message: n,
454
454
  loading: !1,
455
- attachments: m,
455
+ attachments: g,
456
456
  mentions: t,
457
457
  timestamp: Date.now()
458
- }), m.forEach((h) => this.registerUploadedFile(h)), $t(this.chatHistory), this.sending = !0, this.chatHistory.length >= this.chatHistoryLimit && ((y = r.onError) == null || y.call(r, new Error("Chat history limit reached")));
458
+ }), g.forEach((h) => this.registerUploadedFile(h)), $t(this.chatHistory), this.sending = !0, this.chatHistory.length >= this.chatHistoryLimit && ((y = r.onError) == null || y.call(r, new Error("Chat history limit reached")));
459
459
  const w = async () => {
460
- var h, A, g;
460
+ var h, A, m;
461
461
  try {
462
462
  const f = this.chatHistory.map((L) => ({
463
463
  role: L.role,
@@ -475,11 +475,11 @@ const nt = Vs("restifyAiStore", {
475
475
  Object.values(this.uploadedFiles).forEach(C), this.chatHistory.forEach((L) => {
476
476
  var ne;
477
477
  (ne = L.attachments) == null || ne.forEach(C);
478
- }), m.forEach(C);
478
+ }), g.forEach(C);
479
479
  const b = Object.values(S), z = this.chatHistory.length;
480
480
  this.chatHistory.push({
481
481
  id: crypto.randomUUID(),
482
- role: tt.Assistant,
482
+ role: nt.Assistant,
483
483
  message: "",
484
484
  loading: !0,
485
485
  timestamp: Date.now()
@@ -515,11 +515,11 @@ const nt = Vs("restifyAiStore", {
515
515
  async onopen(L) {
516
516
  if (!L.ok) {
517
517
  if (L.status === 429) {
518
- const ne = nt();
518
+ const ne = We();
519
519
  throw ne.error = {
520
520
  message: le("noQuota"),
521
521
  failedQuestion: n,
522
- failedAttachments: m,
522
+ failedAttachments: g,
523
523
  timestamp: Date.now(),
524
524
  quotaExceeded: !0
525
525
  }, await ne.fetchQuota(), new Error("Quota exceeded");
@@ -549,13 +549,13 @@ const nt = Vs("restifyAiStore", {
549
549
  return this.chatHistory.splice(S, 1), f.name === "AbortError" ? !0 : d < c && (a.shouldRetry ? a.shouldRetry(f, d) : !0) ? (d++, await rr(u * d), w()) : (this.error = {
550
550
  message: f.message || "Network error occurred. Please try again.",
551
551
  failedQuestion: n,
552
- failedAttachments: m,
552
+ failedAttachments: g,
553
553
  timestamp: Date.now()
554
554
  }, or({
555
555
  message: this.error.message,
556
556
  failedQuestion: this.error.failedQuestion,
557
557
  failedAttachments: this.error.failedAttachments || null
558
- }), (g = r.onError) == null || g.call(r, f), !1);
558
+ }), (m = r.onError) == null || m.call(r, f), !1);
559
559
  } finally {
560
560
  this.sending = !1;
561
561
  }
@@ -578,7 +578,7 @@ const nt = Vs("restifyAiStore", {
578
578
  if (!this.error.failedQuestion)
579
579
  return !1;
580
580
  const n = this.error.failedQuestion, e = this.error.failedAttachments || [], t = this.chatHistory[this.chatHistory.length - 1];
581
- return (t == null ? void 0 : t.role) === tt.User && t.message === n && (this.chatHistory.pop(), $t(this.chatHistory)), this.clearError(), await this.askQuestion(n, e);
581
+ return (t == null ? void 0 : t.role) === nt.User && t.message === n && (this.chatHistory.pop(), $t(this.chatHistory)), this.clearError(), await this.askQuestion(n, e);
582
582
  },
583
583
  clearError() {
584
584
  this.error = {
@@ -631,21 +631,21 @@ const nt = Vs("restifyAiStore", {
631
631
  };
632
632
  (o = e.onFileUploadStart) == null || o.call(e, s);
633
633
  try {
634
- const u = await e.getAuthToken(), d = e.getCustomHeaders ? await e.getCustomHeaders() : {}, m = It(e.endpoints.uploadFile), w = new FormData();
634
+ const u = await e.getAuthToken(), d = e.getCustomHeaders ? await e.getCustomHeaders() : {}, g = It(e.endpoints.uploadFile), w = new FormData();
635
635
  w.append("file", n);
636
636
  const y = await new Promise((h, A) => {
637
- const g = new XMLHttpRequest();
638
- g.upload.addEventListener("progress", (f) => {
637
+ const m = new XMLHttpRequest();
638
+ m.upload.addEventListener("progress", (f) => {
639
639
  var S;
640
640
  if (f.lengthComputable) {
641
641
  const C = Math.round(f.loaded / f.total * 100);
642
642
  s.progress = C, (S = e.onFileUploadProgress) == null || S.call(e, s, C);
643
643
  }
644
- }), g.addEventListener("load", () => {
644
+ }), m.addEventListener("load", () => {
645
645
  var f, S;
646
- if (g.status >= 200 && g.status < 300)
646
+ if (m.status >= 200 && m.status < 300)
647
647
  try {
648
- const C = JSON.parse(g.responseText), b = {
648
+ const C = JSON.parse(m.responseText), b = {
649
649
  ...s,
650
650
  url: C.url || ((f = C.data) == null ? void 0 : f.url),
651
651
  extractedText: C.extracted_text || ((S = C.data) == null ? void 0 : S.extracted_text),
@@ -657,12 +657,12 @@ const nt = Vs("restifyAiStore", {
657
657
  A(new Error("Failed to parse upload response"));
658
658
  }
659
659
  else
660
- A(new Error(`Upload failed: ${g.status}`));
661
- }), g.addEventListener("error", () => {
660
+ A(new Error(`Upload failed: ${m.status}`));
661
+ }), m.addEventListener("error", () => {
662
662
  A(new Error("Upload failed"));
663
- }), g.open("POST", m), u && g.setRequestHeader("Authorization", `Bearer ${u}`), Object.entries(d).forEach(([f, S]) => {
664
- g.setRequestHeader(f, S);
665
- }), g.send(w);
663
+ }), m.open("POST", g), u && m.setRequestHeader("Authorization", `Bearer ${u}`), Object.entries(d).forEach(([f, S]) => {
664
+ m.setRequestHeader(f, S);
665
+ }), m.send(w);
666
666
  });
667
667
  return (i = e.onFileUploadComplete) == null || i.call(e, y), y;
668
668
  } catch (u) {
@@ -736,10 +736,10 @@ const nt = Vs("restifyAiStore", {
736
736
  },
737
737
  completeSetup() {
738
738
  var n, e;
739
- this.setupState.isActive = !1, this.setupState.currentStep = "complete", Bn(), (e = (n = ee()) == null ? void 0 : n.onSetupComplete) == null || e.call(n);
739
+ this.setupState.isActive = !1, this.setupState.currentStep = "complete", Un(), (e = (n = ee()) == null ? void 0 : n.onSetupComplete) == null || e.call(n);
740
740
  },
741
741
  skipSetup() {
742
- this.setupState.isActive = !1, Bn();
742
+ this.setupState.isActive = !1, Un();
743
743
  }
744
744
  }
745
745
  });
@@ -781,7 +781,7 @@ function ls(n, e) {
781
781
  startPos: -1
782
782
  };
783
783
  }
784
- function un(n, e) {
784
+ function cn(n, e) {
785
785
  var t, s;
786
786
  return e != null && e.getDisplayName ? e.getDisplayName(n) : n.name || n.title || ((t = n.attributes) == null ? void 0 : t.name) || ((s = n.attributes) == null ? void 0 : s.title) || "Unknown";
787
787
  }
@@ -790,7 +790,7 @@ function us(n, e) {
790
790
  return e != null && e.getSubtitle ? e.getSubtitle(n) : ((t = n.attributes) == null ? void 0 : t.email) || ((s = n.attributes) == null ? void 0 : s.description) || null;
791
791
  }
792
792
  function fr(n, e) {
793
- return e != null && e.buildMentionText ? e.buildMentionText(n) : `@[${un(n, e)}](${n.type}:${n.id})`;
793
+ return e != null && e.buildMentionText ? e.buildMentionText(n) : `@[${cn(n, e)}](${n.type}:${n.id})`;
794
794
  }
795
795
  function cs(n) {
796
796
  var t;
@@ -820,7 +820,7 @@ function ka() {
820
820
  parseAndCleanMessage: hr,
821
821
  renderMentionsInHtml: as,
822
822
  detectMentionContext: ls,
823
- getMentionDisplayName: un,
823
+ getMentionDisplayName: cn,
824
824
  getMentionSubtitle: us,
825
825
  buildMentionText: fr,
826
826
  getMentionProvider: cs,
@@ -829,7 +829,7 @@ function ka() {
829
829
  groupMentionsByType: mr
830
830
  };
831
831
  }
832
- function cn() {
832
+ function dn() {
833
833
  return {
834
834
  async: !1,
835
835
  breaks: !1,
@@ -843,9 +843,9 @@ function cn() {
843
843
  walkTokens: null
844
844
  };
845
845
  }
846
- let We = cn();
846
+ let Ke = dn();
847
847
  function ps(n) {
848
- We = n;
848
+ Ke = n;
849
849
  }
850
850
  const hs = /[&<>"']/, yr = new RegExp(hs.source, "g"), fs = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, xr = new RegExp(fs.source, "g"), kr = {
851
851
  "&": "&amp;",
@@ -853,13 +853,13 @@ const hs = /[&<>"']/, yr = new RegExp(hs.source, "g"), fs = /[<>"']|&(?!(#\d{1,7
853
853
  ">": "&gt;",
854
854
  '"': "&quot;",
855
855
  "'": "&#39;"
856
- }, qn = (n) => kr[n];
856
+ }, jn = (n) => kr[n];
857
857
  function ye(n, e) {
858
858
  if (e) {
859
859
  if (hs.test(n))
860
- return n.replace(yr, qn);
860
+ return n.replace(yr, jn);
861
861
  } else if (fs.test(n))
862
- return n.replace(xr, qn);
862
+ return n.replace(xr, jn);
863
863
  return n;
864
864
  }
865
865
  const wr = /(^|[^\[])\^/g;
@@ -875,7 +875,7 @@ function j(n, e) {
875
875
  };
876
876
  return s;
877
877
  }
878
- function jn(n) {
878
+ function Wn(n) {
879
879
  try {
880
880
  n = encodeURI(n).replace(/%25/g, "%");
881
881
  } catch {
@@ -884,7 +884,7 @@ function jn(n) {
884
884
  return n;
885
885
  }
886
886
  const ft = { exec: () => null };
887
- function Wn(n, e) {
887
+ function Kn(n, e) {
888
888
  const t = n.replace(/\|/g, (o, i, a) => {
889
889
  let c = !1, u = i;
890
890
  for (; --u >= 0 && a[u] === "\\"; )
@@ -968,7 +968,7 @@ class Pt {
968
968
  W(this, "rules");
969
969
  // set by the lexer
970
970
  W(this, "lexer");
971
- this.options = e || We;
971
+ this.options = e || Ke;
972
972
  }
973
973
  space(e) {
974
974
  const t = this.rules.block.newline.exec(e);
@@ -1049,13 +1049,13 @@ class Pt {
1049
1049
  break;
1050
1050
  s = s.slice(u);
1051
1051
  const d = c.join(`
1052
- `), m = d.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
1052
+ `), g = d.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
1053
1053
  $1`).replace(/^ {0,3}>[ \t]?/gm, "");
1054
1054
  r = r ? `${r}
1055
1055
  ${d}` : d, o = o ? `${o}
1056
- ${m}` : m;
1056
+ ${g}` : g;
1057
1057
  const w = this.lexer.state.top;
1058
- if (this.lexer.state.top = !0, this.lexer.blockTokens(m, i, !0), this.lexer.state.top = w, s.length === 0)
1058
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(g, i, !0), this.lexer.state.top = w, s.length === 0)
1059
1059
  break;
1060
1060
  const y = i[i.length - 1];
1061
1061
  if ((y == null ? void 0 : y.type) === "code")
@@ -1063,14 +1063,14 @@ ${m}` : m;
1063
1063
  if ((y == null ? void 0 : y.type) === "blockquote") {
1064
1064
  const h = y, A = h.raw + `
1065
1065
  ` + s.join(`
1066
- `), g = this.blockquote(A);
1067
- i[i.length - 1] = g, r = r.substring(0, r.length - h.raw.length) + g.raw, o = o.substring(0, o.length - h.text.length) + g.text;
1066
+ `), m = this.blockquote(A);
1067
+ i[i.length - 1] = m, r = r.substring(0, r.length - h.raw.length) + m.raw, o = o.substring(0, o.length - h.text.length) + m.text;
1068
1068
  break;
1069
1069
  } else if ((y == null ? void 0 : y.type) === "list") {
1070
1070
  const h = y, A = h.raw + `
1071
1071
  ` + s.join(`
1072
- `), g = this.list(A);
1073
- i[i.length - 1] = g, r = r.substring(0, r.length - y.raw.length) + g.raw, o = o.substring(0, o.length - h.raw.length) + g.raw, s = A.substring(i[i.length - 1].raw.length).split(`
1072
+ `), m = this.list(A);
1073
+ i[i.length - 1] = m, r = r.substring(0, r.length - y.raw.length) + m.raw, o = o.substring(0, o.length - h.raw.length) + m.raw, s = A.substring(i[i.length - 1].raw.length).split(`
1074
1074
  `);
1075
1075
  continue;
1076
1076
  }
@@ -1103,38 +1103,38 @@ ${m}` : m;
1103
1103
  if (!(t = i.exec(e)) || this.rules.block.hr.test(e))
1104
1104
  break;
1105
1105
  u = t[0], e = e.substring(u.length);
1106
- let m = t[2].split(`
1106
+ let g = t[2].split(`
1107
1107
  `, 1)[0].replace(/^\t+/, (f) => " ".repeat(3 * f.length)), w = e.split(`
1108
- `, 1)[0], y = !m.trim(), h = 0;
1109
- if (this.options.pedantic ? (h = 2, d = m.trimStart()) : y ? h = t[1].length + 1 : (h = t[2].search(/[^ ]/), h = h > 4 ? 1 : h, d = m.slice(h), h += t[1].length), y && /^[ \t]*$/.test(w) && (u += w + `
1108
+ `, 1)[0], y = !g.trim(), h = 0;
1109
+ if (this.options.pedantic ? (h = 2, d = g.trimStart()) : y ? h = t[1].length + 1 : (h = t[2].search(/[^ ]/), h = h > 4 ? 1 : h, d = g.slice(h), h += t[1].length), y && /^[ \t]*$/.test(w) && (u += w + `
1110
1110
  `, e = e.substring(w.length + 1), c = !0), !c) {
1111
1111
  const f = new RegExp(`^ {0,${Math.min(3, h - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), S = new RegExp(`^ {0,${Math.min(3, h - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), C = new RegExp(`^ {0,${Math.min(3, h - 1)}}(?:\`\`\`|~~~)`), b = new RegExp(`^ {0,${Math.min(3, h - 1)}}#`), z = new RegExp(`^ {0,${Math.min(3, h - 1)}}<(?:[a-z].*>|!--)`, "i");
1112
1112
  for (; e; ) {
1113
1113
  const F = e.split(`
1114
1114
  `, 1)[0];
1115
- let G;
1116
- if (w = F, this.options.pedantic ? (w = w.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), G = w) : G = w.replace(/\t/g, " "), C.test(w) || b.test(w) || z.test(w) || f.test(w) || S.test(w))
1115
+ let V;
1116
+ if (w = F, this.options.pedantic ? (w = w.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), V = w) : V = w.replace(/\t/g, " "), C.test(w) || b.test(w) || z.test(w) || f.test(w) || S.test(w))
1117
1117
  break;
1118
- if (G.search(/[^ ]/) >= h || !w.trim())
1118
+ if (V.search(/[^ ]/) >= h || !w.trim())
1119
1119
  d += `
1120
- ` + G.slice(h);
1120
+ ` + V.slice(h);
1121
1121
  else {
1122
- if (y || m.replace(/\t/g, " ").search(/[^ ]/) >= 4 || C.test(m) || b.test(m) || S.test(m))
1122
+ if (y || g.replace(/\t/g, " ").search(/[^ ]/) >= 4 || C.test(g) || b.test(g) || S.test(g))
1123
1123
  break;
1124
1124
  d += `
1125
1125
  ` + w;
1126
1126
  }
1127
1127
  !y && !w.trim() && (y = !0), u += F + `
1128
- `, e = e.substring(F.length + 1), m = G.slice(h);
1128
+ `, e = e.substring(F.length + 1), g = V.slice(h);
1129
1129
  }
1130
1130
  }
1131
1131
  o.loose || (a ? o.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(u) && (a = !0));
1132
- let A = null, g;
1133
- this.options.gfm && (A = /^\[[ xX]\] /.exec(d), A && (g = A[0] !== "[ ] ", d = d.replace(/^\[[ xX]\] +/, ""))), o.items.push({
1132
+ let A = null, m;
1133
+ this.options.gfm && (A = /^\[[ xX]\] /.exec(d), A && (m = A[0] !== "[ ] ", d = d.replace(/^\[[ xX]\] +/, ""))), o.items.push({
1134
1134
  type: "list_item",
1135
1135
  raw: u,
1136
1136
  task: !!A,
1137
- checked: g,
1137
+ checked: m,
1138
1138
  loose: !1,
1139
1139
  text: d,
1140
1140
  tokens: []
@@ -1143,7 +1143,7 @@ ${m}` : m;
1143
1143
  o.items[o.items.length - 1].raw = o.items[o.items.length - 1].raw.trimEnd(), o.items[o.items.length - 1].text = o.items[o.items.length - 1].text.trimEnd(), o.raw = o.raw.trimEnd();
1144
1144
  for (let c = 0; c < o.items.length; c++)
1145
1145
  if (this.lexer.state.top = !1, o.items[c].tokens = this.lexer.blockTokens(o.items[c].text, []), !o.loose) {
1146
- const u = o.items[c].tokens.filter((m) => m.type === "space"), d = u.length > 0 && u.some((m) => /\n.*\n/.test(m.raw));
1146
+ const u = o.items[c].tokens.filter((g) => g.type === "space"), d = u.length > 0 && u.some((g) => /\n.*\n/.test(g.raw));
1147
1147
  o.loose = d;
1148
1148
  }
1149
1149
  if (o.loose)
@@ -1180,7 +1180,7 @@ ${m}` : m;
1180
1180
  const t = this.rules.block.table.exec(e);
1181
1181
  if (!t || !/[:|]/.test(t[2]))
1182
1182
  return;
1183
- const s = Wn(t[1]), r = t[2].replace(/^\||\| *$/g, "").split("|"), o = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
1183
+ const s = Kn(t[1]), r = t[2].replace(/^\||\| *$/g, "").split("|"), o = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
1184
1184
  `) : [], i = {
1185
1185
  type: "table",
1186
1186
  raw: t[0],
@@ -1199,7 +1199,7 @@ ${m}` : m;
1199
1199
  align: i.align[a]
1200
1200
  });
1201
1201
  for (const a of o)
1202
- i.rows.push(Wn(a, i.header.length).map((c, u) => ({
1202
+ i.rows.push(Kn(a, i.header.length).map((c, u) => ({
1203
1203
  text: c,
1204
1204
  tokens: this.lexer.inline(c),
1205
1205
  header: !1,
@@ -1314,8 +1314,8 @@ ${m}` : m;
1314
1314
  if (!(r[1] || r[2] || "") || !s || this.rules.inline.punctuation.exec(s)) {
1315
1315
  const i = [...r[0]].length - 1;
1316
1316
  let a, c, u = i, d = 0;
1317
- const m = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1318
- for (m.lastIndex = 0, t = t.slice(-1 * e.length + i); (r = m.exec(t)) != null; ) {
1317
+ const g = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1318
+ for (g.lastIndex = 0, t = t.slice(-1 * e.length + i); (r = g.exec(t)) != null; ) {
1319
1319
  if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a)
1320
1320
  continue;
1321
1321
  if (c = [...a].length, r[3] || r[4]) {
@@ -1438,7 +1438,7 @@ ${m}` : m;
1438
1438
  }
1439
1439
  }
1440
1440
  }
1441
- const Tr = /^(?:[ \t]*(?:\n|$))+/, Sr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ar = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, kt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Cr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, gs = /(?:[*+-]|\d{1,9}[.)])/, ms = j(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, gs).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/).getRegex(), dn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Er = /^[^\n]+/, pn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Mr = j(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Rr = j(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, gs).getRegex(), Ft = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", hn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Lr = j("^ {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", hn).replace("tag", Ft).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ys = j(dn).replace("hr", kt).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex(), Ir = j(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ys).getRegex(), fn = {
1441
+ const Tr = /^(?:[ \t]*(?:\n|$))+/, Sr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ar = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, kt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Cr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, gs = /(?:[*+-]|\d{1,9}[.)])/, ms = j(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, gs).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/).getRegex(), pn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Er = /^[^\n]+/, hn = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Mr = j(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", hn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Rr = j(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, gs).getRegex(), Ft = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", fn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Lr = j("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", fn).replace("tag", Ft).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ys = j(pn).replace("hr", kt).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex(), Ir = j(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ys).getRegex(), gn = {
1442
1442
  blockquote: Ir,
1443
1443
  code: Sr,
1444
1444
  def: Mr,
@@ -1453,20 +1453,20 @@ const Tr = /^(?:[ \t]*(?:\n|$))+/, Sr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*
1453
1453
  table: ft,
1454
1454
  text: Er
1455
1455
  }, Gn = j("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", kt).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[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex(), $r = {
1456
- ...fn,
1456
+ ...gn,
1457
1457
  table: Gn,
1458
- paragraph: j(dn).replace("hr", kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex()
1458
+ paragraph: j(pn).replace("hr", kt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ft).getRegex()
1459
1459
  }, Dr = {
1460
- ...fn,
1461
- html: j(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", hn).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(),
1460
+ ...gn,
1461
+ html: j(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", fn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
1462
1462
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
1463
1463
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
1464
1464
  fences: ft,
1465
1465
  // fences not supported
1466
1466
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
1467
- paragraph: j(dn).replace("hr", kt).replace("heading", ` *#{1,6} *[^
1467
+ paragraph: j(pn).replace("hr", kt).replace("heading", ` *#{1,6} *[^
1468
1468
  ]`).replace("lheading", ms).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
1469
- }, xs = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, _r = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ks = /^( {2,}|\\)\n(?!\s*$)/, Or = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, wt = "\\p{P}\\p{S}", Nr = j(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, wt).getRegex(), Pr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, zr = j(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, wt).getRegex(), Hr = j("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, wt).getRegex(), Fr = j("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, wt).getRegex(), Br = j(/\\([punct])/, "gu").replace(/punct/g, wt).getRegex(), Ur = j(/^<(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(), qr = j(hn).replace("(?:-->|$)", "-->").getRegex(), jr = j("^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", qr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), zt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Wr = j(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", zt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ws = j(/^!?\[(label)\]\[(ref)\]/).replace("label", zt).replace("ref", pn).getRegex(), bs = j(/^!?\[(ref)\](?:\[\])?/).replace("ref", pn).getRegex(), Vr = j("reflink|nolink(?!\\()", "g").replace("reflink", ws).replace("nolink", bs).getRegex(), gn = {
1469
+ }, xs = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, _r = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ks = /^( {2,}|\\)\n(?!\s*$)/, Or = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, wt = "\\p{P}\\p{S}", Nr = j(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, wt).getRegex(), Pr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, zr = j(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, wt).getRegex(), Hr = j("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, wt).getRegex(), Fr = j("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, wt).getRegex(), Br = j(/\\([punct])/, "gu").replace(/punct/g, wt).getRegex(), Ur = j(/^<(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(), qr = j(fn).replace("(?:-->|$)", "-->").getRegex(), jr = j("^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", qr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), zt = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Wr = j(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", zt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ws = j(/^!?\[(label)\]\[(ref)\]/).replace("label", zt).replace("ref", hn).getRegex(), bs = j(/^!?\[(ref)\](?:\[\])?/).replace("ref", hn).getRegex(), Kr = j("reflink|nolink(?!\\()", "g").replace("reflink", ws).replace("nolink", bs).getRegex(), mn = {
1470
1470
  _backpedal: ft,
1471
1471
  // only used for GFM url
1472
1472
  anyPunctuation: Br,
@@ -1483,34 +1483,34 @@ const Tr = /^(?:[ \t]*(?:\n|$))+/, Sr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*
1483
1483
  nolink: bs,
1484
1484
  punctuation: Nr,
1485
1485
  reflink: ws,
1486
- reflinkSearch: Vr,
1486
+ reflinkSearch: Kr,
1487
1487
  tag: jr,
1488
1488
  text: Or,
1489
1489
  url: ft
1490
- }, Gr = {
1491
- ...gn,
1490
+ }, Vr = {
1491
+ ...mn,
1492
1492
  link: j(/^!?\[(label)\]\((.*?)\)/).replace("label", zt).getRegex(),
1493
1493
  reflink: j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", zt).getRegex()
1494
1494
  }, rn = {
1495
- ...gn,
1495
+ ...mn,
1496
1496
  escape: j(xs).replace("])", "~|])").getRegex(),
1497
1497
  url: j(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
1498
1498
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
1499
1499
  del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
1500
1500
  text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
1501
- }, Kr = {
1501
+ }, Gr = {
1502
1502
  ...rn,
1503
1503
  br: j(ks).replace("{2,}", "*").getRegex(),
1504
1504
  text: j(rn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
1505
1505
  }, Dt = {
1506
- normal: fn,
1506
+ normal: gn,
1507
1507
  gfm: $r,
1508
1508
  pedantic: Dr
1509
1509
  }, lt = {
1510
- normal: gn,
1510
+ normal: mn,
1511
1511
  gfm: rn,
1512
- breaks: Kr,
1513
- pedantic: Gr
1512
+ breaks: Gr,
1513
+ pedantic: Vr
1514
1514
  };
1515
1515
  class xe {
1516
1516
  constructor(e) {
@@ -1519,7 +1519,7 @@ class xe {
1519
1519
  W(this, "state");
1520
1520
  W(this, "tokenizer");
1521
1521
  W(this, "inlineQueue");
1522
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || We, this.options.tokenizer = this.options.tokenizer || new Pt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1522
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Ke, this.options.tokenizer = this.options.tokenizer || new Pt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1523
1523
  inLink: !1,
1524
1524
  inRawBlock: !1,
1525
1525
  top: !0
@@ -1713,10 +1713,10 @@ class xe {
1713
1713
  }
1714
1714
  if (o = e, this.options.extensions && this.options.extensions.startInline) {
1715
1715
  let d = 1 / 0;
1716
- const m = e.slice(1);
1716
+ const g = e.slice(1);
1717
1717
  let w;
1718
1718
  this.options.extensions.startInline.forEach((y) => {
1719
- w = y.call({ lexer: this }, m), typeof w == "number" && w >= 0 && (d = Math.min(d, w));
1719
+ w = y.call({ lexer: this }, g), typeof w == "number" && w >= 0 && (d = Math.min(d, w));
1720
1720
  }), d < 1 / 0 && d >= 0 && (o = e.substring(0, d + 1));
1721
1721
  }
1722
1722
  if (s = this.tokenizer.inlineText(o)) {
@@ -1740,7 +1740,7 @@ class Ht {
1740
1740
  constructor(e) {
1741
1741
  W(this, "options");
1742
1742
  W(this, "parser");
1743
- this.options = e || We;
1743
+ this.options = e || Ke;
1744
1744
  }
1745
1745
  space(e) {
1746
1746
  return "";
@@ -1849,7 +1849,7 @@ ${e}</tr>
1849
1849
  return `<del>${this.parser.parseInline(e)}</del>`;
1850
1850
  }
1851
1851
  link({ href: e, title: t, tokens: s }) {
1852
- const r = this.parser.parseInline(s), o = jn(e);
1852
+ const r = this.parser.parseInline(s), o = Wn(e);
1853
1853
  if (o === null)
1854
1854
  return r;
1855
1855
  e = o;
@@ -1857,7 +1857,7 @@ ${e}</tr>
1857
1857
  return t && (i += ' title="' + t + '"'), i += ">" + r + "</a>", i;
1858
1858
  }
1859
1859
  image({ href: e, title: t, text: s }) {
1860
- const r = jn(e);
1860
+ const r = Wn(e);
1861
1861
  if (r === null)
1862
1862
  return s;
1863
1863
  e = r;
@@ -1868,7 +1868,7 @@ ${e}</tr>
1868
1868
  return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : e.text;
1869
1869
  }
1870
1870
  }
1871
- class mn {
1871
+ class yn {
1872
1872
  // no need for block level renderers
1873
1873
  strong({ text: e }) {
1874
1874
  return e;
@@ -1903,7 +1903,7 @@ class ke {
1903
1903
  W(this, "options");
1904
1904
  W(this, "renderer");
1905
1905
  W(this, "textRenderer");
1906
- this.options = e || We, this.options.renderer = this.options.renderer || new Ht(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new mn();
1906
+ this.options = e || Ke, this.options.renderer = this.options.renderer || new Ht(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new yn();
1907
1907
  }
1908
1908
  /**
1909
1909
  * Static Parse Method
@@ -2064,7 +2064,7 @@ class gt {
2064
2064
  constructor(e) {
2065
2065
  W(this, "options");
2066
2066
  W(this, "block");
2067
- this.options = e || We;
2067
+ this.options = e || Ke;
2068
2068
  }
2069
2069
  /**
2070
2070
  * Process markdown before marked
@@ -2104,13 +2104,13 @@ W(gt, "passThroughHooks", /* @__PURE__ */ new Set([
2104
2104
  ]));
2105
2105
  class Qr {
2106
2106
  constructor(...e) {
2107
- W(this, "defaults", cn());
2107
+ W(this, "defaults", dn());
2108
2108
  W(this, "options", this.setOptions);
2109
2109
  W(this, "parse", this.parseMarkdown(!0));
2110
2110
  W(this, "parseInline", this.parseMarkdown(!1));
2111
2111
  W(this, "Parser", ke);
2112
2112
  W(this, "Renderer", Ht);
2113
- W(this, "TextRenderer", mn);
2113
+ W(this, "TextRenderer", yn);
2114
2114
  W(this, "Lexer", xe);
2115
2115
  W(this, "Tokenizer", Pt);
2116
2116
  W(this, "Hooks", gt);
@@ -2178,8 +2178,8 @@ class Qr {
2178
2178
  continue;
2179
2179
  const a = i, c = s.renderer[a], u = o[a];
2180
2180
  o[a] = (...d) => {
2181
- let m = c.apply(o, d);
2182
- return m === !1 && (m = u.apply(o, d)), m || "";
2181
+ let g = c.apply(o, d);
2182
+ return g === !1 && (g = u.apply(o, d)), g || "";
2183
2183
  };
2184
2184
  }
2185
2185
  r.renderer = o;
@@ -2193,8 +2193,8 @@ class Qr {
2193
2193
  continue;
2194
2194
  const a = i, c = s.tokenizer[a], u = o[a];
2195
2195
  o[a] = (...d) => {
2196
- let m = c.apply(o, d);
2197
- return m === !1 && (m = u.apply(o, d)), m;
2196
+ let g = c.apply(o, d);
2197
+ return g === !1 && (g = u.apply(o, d)), g;
2198
2198
  };
2199
2199
  }
2200
2200
  r.tokenizer = o;
@@ -2210,11 +2210,11 @@ class Qr {
2210
2210
  gt.passThroughHooks.has(i) ? o[a] = (d) => {
2211
2211
  if (this.defaults.async)
2212
2212
  return Promise.resolve(c.call(o, d)).then((w) => u.call(o, w));
2213
- const m = c.call(o, d);
2214
- return u.call(o, m);
2213
+ const g = c.call(o, d);
2214
+ return u.call(o, g);
2215
2215
  } : o[a] = (...d) => {
2216
- let m = c.apply(o, d);
2217
- return m === !1 && (m = u.apply(o, d)), m;
2216
+ let g = c.apply(o, d);
2217
+ return g === !1 && (g = u.apply(o, d)), g;
2218
2218
  };
2219
2219
  }
2220
2220
  r.hooks = o;
@@ -2255,8 +2255,8 @@ class Qr {
2255
2255
  i.hooks && (s = i.hooks.preprocess(s));
2256
2256
  let d = c(s, i);
2257
2257
  i.hooks && (d = i.hooks.processAllTokens(d)), i.walkTokens && this.walkTokens(d, i.walkTokens);
2258
- let m = u(d, i);
2259
- return i.hooks && (m = i.hooks.postprocess(m)), m;
2258
+ let g = u(d, i);
2259
+ return i.hooks && (g = i.hooks.postprocess(g)), g;
2260
2260
  } catch (d) {
2261
2261
  return a(d);
2262
2262
  }
@@ -2282,8 +2282,8 @@ function U(n, e) {
2282
2282
  U.options = U.setOptions = function(n) {
2283
2283
  return je.setOptions(n), U.defaults = je.defaults, ps(U.defaults), U;
2284
2284
  };
2285
- U.getDefaults = cn;
2286
- U.defaults = We;
2285
+ U.getDefaults = dn;
2286
+ U.defaults = Ke;
2287
2287
  U.use = function(...n) {
2288
2288
  return je.use(...n), U.defaults = je.defaults, ps(U.defaults), U;
2289
2289
  };
@@ -2294,7 +2294,7 @@ U.parseInline = je.parseInline;
2294
2294
  U.Parser = ke;
2295
2295
  U.parser = ke.parse;
2296
2296
  U.Renderer = Ht;
2297
- U.TextRenderer = mn;
2297
+ U.TextRenderer = yn;
2298
2298
  U.Lexer = xe;
2299
2299
  U.lexer = xe.lex;
2300
2300
  U.Tokenizer = Pt;
@@ -2310,7 +2310,7 @@ xe.lex;
2310
2310
  /*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
2311
2311
  const {
2312
2312
  entries: vs,
2313
- setPrototypeOf: Kn,
2313
+ setPrototypeOf: Qn,
2314
2314
  isFrozen: Zr,
2315
2315
  getPrototypeOf: Yr,
2316
2316
  getOwnPropertyDescriptor: Xr
@@ -2339,7 +2339,7 @@ ln || (ln = function(e) {
2339
2339
  s[r - 1] = arguments[r];
2340
2340
  return new e(...s);
2341
2341
  });
2342
- const _t = pe(Array.prototype.forEach), Jr = pe(Array.prototype.lastIndexOf), Qn = pe(Array.prototype.pop), ut = pe(Array.prototype.push), eo = pe(Array.prototype.splice), Nt = pe(String.prototype.toLowerCase), Zt = pe(String.prototype.toString), Yt = pe(String.prototype.match), ct = pe(String.prototype.replace), to = pe(String.prototype.indexOf), no = pe(String.prototype.trim), ve = pe(Object.prototype.hasOwnProperty), ce = pe(RegExp.prototype.test), dt = so(TypeError);
2342
+ const _t = pe(Array.prototype.forEach), Jr = pe(Array.prototype.lastIndexOf), Zn = pe(Array.prototype.pop), ut = pe(Array.prototype.push), eo = pe(Array.prototype.splice), Nt = pe(String.prototype.toLowerCase), Zt = pe(String.prototype.toString), Yt = pe(String.prototype.match), ct = pe(String.prototype.replace), to = pe(String.prototype.indexOf), no = pe(String.prototype.trim), ve = pe(Object.prototype.hasOwnProperty), ce = pe(RegExp.prototype.test), dt = so(TypeError);
2343
2343
  function pe(n) {
2344
2344
  return function(e) {
2345
2345
  e instanceof RegExp && (e.lastIndex = 0);
@@ -2357,7 +2357,7 @@ function so(n) {
2357
2357
  }
2358
2358
  function H(n, e) {
2359
2359
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Nt;
2360
- Kn && Kn(n, null);
2360
+ Qn && Qn(n, null);
2361
2361
  let s = e.length;
2362
2362
  for (; s--; ) {
2363
2363
  let r = e[s];
@@ -2396,14 +2396,14 @@ function pt(n, e) {
2396
2396
  }
2397
2397
  return t;
2398
2398
  }
2399
- const Zn = de(["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"]), Xt = de(["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"]), Jt = de(["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"]), oo = de(["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"]), en = de(["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"]), io = de(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Yn = de(["#text"]), Xn = de(["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"]), tn = de(["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"]), Jn = de(["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"]), Ot = de(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ao = be(/\{\{[\w\W]*|[\w\W]*\}\}/gm), lo = be(/<%[\w\W]*|[\w\W]*%>/gm), uo = be(/\$\{[\w\W]*/gm), co = be(/^data-[\-\w.\u00B7-\uFFFF]+$/), po = be(/^aria-[\-\w]+$/), Ts = be(
2399
+ const Yn = de(["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"]), Xt = de(["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"]), Jt = de(["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"]), oo = de(["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"]), en = de(["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"]), io = de(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Xn = de(["#text"]), Jn = de(["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"]), tn = de(["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"]), es = de(["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"]), Ot = de(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ao = be(/\{\{[\w\W]*|[\w\W]*\}\}/gm), lo = be(/<%[\w\W]*|[\w\W]*%>/gm), uo = be(/\$\{[\w\W]*/gm), co = be(/^data-[\-\w.\u00B7-\uFFFF]+$/), po = be(/^aria-[\-\w]+$/), Ts = be(
2400
2400
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
2401
2401
  // eslint-disable-line no-useless-escape
2402
2402
  ), ho = be(/^(?:\w+script|data):/i), fo = be(
2403
2403
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
2404
2404
  // eslint-disable-line no-control-regex
2405
2405
  ), Ss = be(/^html$/i), go = be(/^[a-z][.\w]*(-[.\w]+)+$/i);
2406
- var es = /* @__PURE__ */ Object.freeze({
2406
+ var ts = /* @__PURE__ */ Object.freeze({
2407
2407
  __proto__: null,
2408
2408
  ARIA_ATTR: po,
2409
2409
  ATTR_WHITESPACE: fo,
@@ -2444,7 +2444,7 @@ const ht = {
2444
2444
  } catch {
2445
2445
  return console.warn("TrustedTypes policy " + o + " could not be created."), null;
2446
2446
  }
2447
- }, ts = function() {
2447
+ }, ns = function() {
2448
2448
  return {
2449
2449
  afterSanitizeAttributes: [],
2450
2450
  afterSanitizeElements: [],
@@ -2472,10 +2472,10 @@ function As() {
2472
2472
  Element: c,
2473
2473
  NodeFilter: u,
2474
2474
  NamedNodeMap: d = n.NamedNodeMap || n.MozNamedAttrMap,
2475
- HTMLFormElement: m,
2475
+ HTMLFormElement: g,
2476
2476
  DOMParser: w,
2477
2477
  trustedTypes: y
2478
- } = n, h = c.prototype, A = pt(h, "cloneNode"), g = pt(h, "remove"), f = pt(h, "nextSibling"), S = pt(h, "childNodes"), C = pt(h, "parentNode");
2478
+ } = n, h = c.prototype, A = pt(h, "cloneNode"), m = pt(h, "remove"), f = pt(h, "nextSibling"), S = pt(h, "childNodes"), C = pt(h, "parentNode");
2479
2479
  if (typeof i == "function") {
2480
2480
  const $ = t.createElement("template");
2481
2481
  $.content && $.content.ownerDocument && (t = $.content.ownerDocument);
@@ -2483,13 +2483,13 @@ function As() {
2483
2483
  let b, z = "";
2484
2484
  const {
2485
2485
  implementation: F,
2486
- createNodeIterator: G,
2486
+ createNodeIterator: V,
2487
2487
  createDocumentFragment: E,
2488
2488
  getElementsByTagName: M
2489
2489
  } = t, {
2490
2490
  importNode: I
2491
2491
  } = s;
2492
- let P = ts();
2492
+ let P = ns();
2493
2493
  e.isSupported = typeof vs == "function" && typeof C == "function" && F && F.createHTMLDocument !== void 0;
2494
2494
  const {
2495
2495
  MUSTACHE_EXPR: L,
@@ -2500,13 +2500,13 @@ function As() {
2500
2500
  IS_SCRIPT_OR_DATA: He,
2501
2501
  ATTR_WHITESPACE: bt,
2502
2502
  CUSTOM_ELEMENT: Bt
2503
- } = es;
2503
+ } = ts;
2504
2504
  let {
2505
2505
  IS_ALLOWED_URI: vt
2506
- } = es, Y = null;
2507
- const st = H({}, [...Zn, ...Xt, ...Jt, ...en, ...Yn]);
2506
+ } = ts, Y = null;
2507
+ const st = H({}, [...Yn, ...Xt, ...Jt, ...en, ...Xn]);
2508
2508
  let se = null;
2509
- const Tt = H({}, [...Xn, ...tn, ...Jn, ...Ot]);
2509
+ const Tt = H({}, [...Jn, ...tn, ...es, ...Ot]);
2510
2510
  let Z = Object.seal(on(null, {
2511
2511
  tagNameCheck: {
2512
2512
  writable: !0,
@@ -2541,28 +2541,28 @@ function As() {
2541
2541
  value: null
2542
2542
  }
2543
2543
  }));
2544
- let St = !0, Ge = !0, _ = !1, V = !0, K = !1, te = !0, X = !1, J = !1, ue = !1, Se = !1, At = !1, Ct = !1, yn = !0, xn = !1;
2544
+ let St = !0, Ge = !0, _ = !1, K = !0, G = !1, te = !0, X = !1, J = !1, ue = !1, Se = !1, At = !1, Ct = !1, xn = !0, kn = !1;
2545
2545
  const Ls = "user-content-";
2546
- let Ut = !0, rt = !1, Ke = {}, Qe = null;
2547
- const kn = H({}, ["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"]);
2548
- let wn = null;
2549
- const bn = H({}, ["audio", "video", "img", "source", "image", "track"]);
2546
+ let Ut = !0, rt = !1, Qe = {}, Ze = null;
2547
+ const wn = H({}, ["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"]);
2548
+ let bn = null;
2549
+ const vn = H({}, ["audio", "video", "img", "source", "image", "track"]);
2550
2550
  let qt = null;
2551
- const vn = H({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Et = "http://www.w3.org/1998/Math/MathML", Mt = "http://www.w3.org/2000/svg", Ie = "http://www.w3.org/1999/xhtml";
2552
- let Ze = Ie, jt = !1, Wt = null;
2551
+ const Tn = H({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Et = "http://www.w3.org/1998/Math/MathML", Mt = "http://www.w3.org/2000/svg", Ie = "http://www.w3.org/1999/xhtml";
2552
+ let Ye = Ie, jt = !1, Wt = null;
2553
2553
  const Is = H({}, [Et, Mt, Ie], Zt);
2554
2554
  let Rt = H({}, ["mi", "mo", "mn", "ms", "mtext"]), Lt = H({}, ["annotation-xml"]);
2555
2555
  const $s = H({}, ["title", "style", "font", "a", "script"]);
2556
2556
  let ot = null;
2557
2557
  const Ds = ["application/xhtml+xml", "text/html"], _s = "text/html";
2558
- let oe = null, Ye = null;
2559
- const Os = t.createElement("form"), Tn = function(l) {
2558
+ let oe = null, Xe = null;
2559
+ const Os = t.createElement("form"), Sn = function(l) {
2560
2560
  return l instanceof RegExp || l instanceof Function;
2561
- }, Vt = function() {
2561
+ }, Kt = function() {
2562
2562
  let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2563
- if (!(Ye && Ye === l)) {
2563
+ if (!(Xe && Xe === l)) {
2564
2564
  if ((!l || typeof l != "object") && (l = {}), l = _e(l), ot = // eslint-disable-next-line unicorn/prefer-includes
2565
- Ds.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? _s : l.PARSER_MEDIA_TYPE, oe = ot === "application/xhtml+xml" ? Zt : Nt, Y = ve(l, "ALLOWED_TAGS") ? H({}, l.ALLOWED_TAGS, oe) : st, se = ve(l, "ALLOWED_ATTR") ? H({}, l.ALLOWED_ATTR, oe) : Tt, Wt = ve(l, "ALLOWED_NAMESPACES") ? H({}, l.ALLOWED_NAMESPACES, Zt) : Is, qt = ve(l, "ADD_URI_SAFE_ATTR") ? H(_e(vn), l.ADD_URI_SAFE_ATTR, oe) : vn, wn = ve(l, "ADD_DATA_URI_TAGS") ? H(_e(bn), l.ADD_DATA_URI_TAGS, oe) : bn, Qe = ve(l, "FORBID_CONTENTS") ? H({}, l.FORBID_CONTENTS, oe) : kn, Fe = ve(l, "FORBID_TAGS") ? H({}, l.FORBID_TAGS, oe) : _e({}), Ve = ve(l, "FORBID_ATTR") ? H({}, l.FORBID_ATTR, oe) : _e({}), Ke = ve(l, "USE_PROFILES") ? l.USE_PROFILES : !1, St = l.ALLOW_ARIA_ATTR !== !1, Ge = l.ALLOW_DATA_ATTR !== !1, _ = l.ALLOW_UNKNOWN_PROTOCOLS || !1, V = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, K = l.SAFE_FOR_TEMPLATES || !1, te = l.SAFE_FOR_XML !== !1, X = l.WHOLE_DOCUMENT || !1, Se = l.RETURN_DOM || !1, At = l.RETURN_DOM_FRAGMENT || !1, Ct = l.RETURN_TRUSTED_TYPE || !1, ue = l.FORCE_BODY || !1, yn = l.SANITIZE_DOM !== !1, xn = l.SANITIZE_NAMED_PROPS || !1, Ut = l.KEEP_CONTENT !== !1, rt = l.IN_PLACE || !1, vt = l.ALLOWED_URI_REGEXP || Ts, Ze = l.NAMESPACE || Ie, Rt = l.MATHML_TEXT_INTEGRATION_POINTS || Rt, Lt = l.HTML_INTEGRATION_POINTS || Lt, Z = l.CUSTOM_ELEMENT_HANDLING || {}, l.CUSTOM_ELEMENT_HANDLING && Tn(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Z.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && Tn(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Z.attributeNameCheck = l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Z.allowCustomizedBuiltInElements = l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), K && (Ge = !1), At && (Se = !0), Ke && (Y = H({}, Yn), se = [], Ke.html === !0 && (H(Y, Zn), H(se, Xn)), Ke.svg === !0 && (H(Y, Xt), H(se, tn), H(se, Ot)), Ke.svgFilters === !0 && (H(Y, Jt), H(se, tn), H(se, Ot)), Ke.mathMl === !0 && (H(Y, en), H(se, Jn), H(se, Ot))), l.ADD_TAGS && (typeof l.ADD_TAGS == "function" ? Le.tagCheck = l.ADD_TAGS : (Y === st && (Y = _e(Y)), H(Y, l.ADD_TAGS, oe))), l.ADD_ATTR && (typeof l.ADD_ATTR == "function" ? Le.attributeCheck = l.ADD_ATTR : (se === Tt && (se = _e(se)), H(se, l.ADD_ATTR, oe))), l.ADD_URI_SAFE_ATTR && H(qt, l.ADD_URI_SAFE_ATTR, oe), l.FORBID_CONTENTS && (Qe === kn && (Qe = _e(Qe)), H(Qe, l.FORBID_CONTENTS, oe)), Ut && (Y["#text"] = !0), X && H(Y, ["html", "head", "body"]), Y.table && (H(Y, ["tbody"]), delete Fe.tbody), l.TRUSTED_TYPES_POLICY) {
2565
+ Ds.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? _s : l.PARSER_MEDIA_TYPE, oe = ot === "application/xhtml+xml" ? Zt : Nt, Y = ve(l, "ALLOWED_TAGS") ? H({}, l.ALLOWED_TAGS, oe) : st, se = ve(l, "ALLOWED_ATTR") ? H({}, l.ALLOWED_ATTR, oe) : Tt, Wt = ve(l, "ALLOWED_NAMESPACES") ? H({}, l.ALLOWED_NAMESPACES, Zt) : Is, qt = ve(l, "ADD_URI_SAFE_ATTR") ? H(_e(Tn), l.ADD_URI_SAFE_ATTR, oe) : Tn, bn = ve(l, "ADD_DATA_URI_TAGS") ? H(_e(vn), l.ADD_DATA_URI_TAGS, oe) : vn, Ze = ve(l, "FORBID_CONTENTS") ? H({}, l.FORBID_CONTENTS, oe) : wn, Fe = ve(l, "FORBID_TAGS") ? H({}, l.FORBID_TAGS, oe) : _e({}), Ve = ve(l, "FORBID_ATTR") ? H({}, l.FORBID_ATTR, oe) : _e({}), Qe = ve(l, "USE_PROFILES") ? l.USE_PROFILES : !1, St = l.ALLOW_ARIA_ATTR !== !1, Ge = l.ALLOW_DATA_ATTR !== !1, _ = l.ALLOW_UNKNOWN_PROTOCOLS || !1, K = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, G = l.SAFE_FOR_TEMPLATES || !1, te = l.SAFE_FOR_XML !== !1, X = l.WHOLE_DOCUMENT || !1, Se = l.RETURN_DOM || !1, At = l.RETURN_DOM_FRAGMENT || !1, Ct = l.RETURN_TRUSTED_TYPE || !1, ue = l.FORCE_BODY || !1, xn = l.SANITIZE_DOM !== !1, kn = l.SANITIZE_NAMED_PROPS || !1, Ut = l.KEEP_CONTENT !== !1, rt = l.IN_PLACE || !1, vt = l.ALLOWED_URI_REGEXP || Ts, Ye = l.NAMESPACE || Ie, Rt = l.MATHML_TEXT_INTEGRATION_POINTS || Rt, Lt = l.HTML_INTEGRATION_POINTS || Lt, Z = l.CUSTOM_ELEMENT_HANDLING || {}, l.CUSTOM_ELEMENT_HANDLING && Sn(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (Z.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && Sn(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (Z.attributeNameCheck = l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (Z.allowCustomizedBuiltInElements = l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), G && (Ge = !1), At && (Se = !0), Qe && (Y = H({}, Xn), se = [], Qe.html === !0 && (H(Y, Yn), H(se, Jn)), Qe.svg === !0 && (H(Y, Xt), H(se, tn), H(se, Ot)), Qe.svgFilters === !0 && (H(Y, Jt), H(se, tn), H(se, Ot)), Qe.mathMl === !0 && (H(Y, en), H(se, es), H(se, Ot))), l.ADD_TAGS && (typeof l.ADD_TAGS == "function" ? Le.tagCheck = l.ADD_TAGS : (Y === st && (Y = _e(Y)), H(Y, l.ADD_TAGS, oe))), l.ADD_ATTR && (typeof l.ADD_ATTR == "function" ? Le.attributeCheck = l.ADD_ATTR : (se === Tt && (se = _e(se)), H(se, l.ADD_ATTR, oe))), l.ADD_URI_SAFE_ATTR && H(qt, l.ADD_URI_SAFE_ATTR, oe), l.FORBID_CONTENTS && (Ze === wn && (Ze = _e(Ze)), H(Ze, l.FORBID_CONTENTS, oe)), Ut && (Y["#text"] = !0), X && H(Y, ["html", "head", "body"]), Y.table && (H(Y, ["tbody"]), delete Fe.tbody), l.TRUSTED_TYPES_POLICY) {
2566
2566
  if (typeof l.TRUSTED_TYPES_POLICY.createHTML != "function")
2567
2567
  throw dt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2568
2568
  if (typeof l.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -2570,16 +2570,16 @@ function As() {
2570
2570
  b = l.TRUSTED_TYPES_POLICY, z = b.createHTML("");
2571
2571
  } else
2572
2572
  b === void 0 && (b = yo(y, r)), b !== null && typeof z == "string" && (z = b.createHTML(""));
2573
- de && de(l), Ye = l;
2573
+ de && de(l), Xe = l;
2574
2574
  }
2575
- }, Sn = H({}, [...Xt, ...Jt, ...oo]), An = H({}, [...en, ...io]), Ns = function(l) {
2575
+ }, An = H({}, [...Xt, ...Jt, ...oo]), Cn = H({}, [...en, ...io]), Ns = function(l) {
2576
2576
  let x = C(l);
2577
2577
  (!x || !x.tagName) && (x = {
2578
- namespaceURI: Ze,
2578
+ namespaceURI: Ye,
2579
2579
  tagName: "template"
2580
2580
  });
2581
2581
  const R = Nt(l.tagName), Q = Nt(x.tagName);
2582
- return Wt[l.namespaceURI] ? l.namespaceURI === Mt ? x.namespaceURI === Ie ? R === "svg" : x.namespaceURI === Et ? R === "svg" && (Q === "annotation-xml" || Rt[Q]) : !!Sn[R] : l.namespaceURI === Et ? x.namespaceURI === Ie ? R === "math" : x.namespaceURI === Mt ? R === "math" && Lt[Q] : !!An[R] : l.namespaceURI === Ie ? x.namespaceURI === Mt && !Lt[Q] || x.namespaceURI === Et && !Rt[Q] ? !1 : !An[R] && ($s[R] || !Sn[R]) : !!(ot === "application/xhtml+xml" && Wt[l.namespaceURI]) : !1;
2582
+ return Wt[l.namespaceURI] ? l.namespaceURI === Mt ? x.namespaceURI === Ie ? R === "svg" : x.namespaceURI === Et ? R === "svg" && (Q === "annotation-xml" || Rt[Q]) : !!An[R] : l.namespaceURI === Et ? x.namespaceURI === Ie ? R === "math" : x.namespaceURI === Mt ? R === "math" && Lt[Q] : !!Cn[R] : l.namespaceURI === Ie ? x.namespaceURI === Mt && !Lt[Q] || x.namespaceURI === Et && !Rt[Q] ? !1 : !Cn[R] && ($s[R] || !An[R]) : !!(ot === "application/xhtml+xml" && Wt[l.namespaceURI]) : !1;
2583
2583
  }, Ae = function(l) {
2584
2584
  ut(e.removed, {
2585
2585
  element: l
@@ -2587,7 +2587,7 @@ function As() {
2587
2587
  try {
2588
2588
  C(l).removeChild(l);
2589
2589
  } catch {
2590
- g(l);
2590
+ m(l);
2591
2591
  }
2592
2592
  }, Be = function(l, x) {
2593
2593
  try {
@@ -2612,7 +2612,7 @@ function As() {
2612
2612
  x.setAttribute(l, "");
2613
2613
  } catch {
2614
2614
  }
2615
- }, Cn = function(l) {
2615
+ }, En = function(l) {
2616
2616
  let x = null, R = null;
2617
2617
  if (ue)
2618
2618
  l = "<remove></remove>" + l;
@@ -2620,54 +2620,54 @@ function As() {
2620
2620
  const re = Yt(l, /^[\r\n\t ]+/);
2621
2621
  R = re && re[0];
2622
2622
  }
2623
- ot === "application/xhtml+xml" && Ze === Ie && (l = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + l + "</body></html>");
2623
+ ot === "application/xhtml+xml" && Ye === Ie && (l = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + l + "</body></html>");
2624
2624
  const Q = b ? b.createHTML(l) : l;
2625
- if (Ze === Ie)
2625
+ if (Ye === Ie)
2626
2626
  try {
2627
2627
  x = new w().parseFromString(Q, ot);
2628
2628
  } catch {
2629
2629
  }
2630
2630
  if (!x || !x.documentElement) {
2631
- x = F.createDocument(Ze, "template", null);
2631
+ x = F.createDocument(Ye, "template", null);
2632
2632
  try {
2633
2633
  x.documentElement.innerHTML = jt ? z : Q;
2634
2634
  } catch {
2635
2635
  }
2636
2636
  }
2637
2637
  const ae = x.body || x.documentElement;
2638
- return l && R && ae.insertBefore(t.createTextNode(R), ae.childNodes[0] || null), Ze === Ie ? M.call(x, X ? "html" : "body")[0] : X ? x.documentElement : ae;
2639
- }, En = function(l) {
2640
- return G.call(
2638
+ return l && R && ae.insertBefore(t.createTextNode(R), ae.childNodes[0] || null), Ye === Ie ? M.call(x, X ? "html" : "body")[0] : X ? x.documentElement : ae;
2639
+ }, Mn = function(l) {
2640
+ return V.call(
2641
2641
  l.ownerDocument || l,
2642
2642
  l,
2643
2643
  // eslint-disable-next-line no-bitwise
2644
2644
  u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION,
2645
2645
  null
2646
2646
  );
2647
- }, Gt = function(l) {
2648
- return l instanceof m && (typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || !(l.attributes instanceof d) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function");
2649
- }, Mn = function(l) {
2647
+ }, Vt = function(l) {
2648
+ return l instanceof g && (typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || !(l.attributes instanceof d) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function");
2649
+ }, Rn = function(l) {
2650
2650
  return typeof a == "function" && l instanceof a;
2651
2651
  };
2652
2652
  function $e($, l, x) {
2653
2653
  _t($, (R) => {
2654
- R.call(e, l, x, Ye);
2654
+ R.call(e, l, x, Xe);
2655
2655
  });
2656
2656
  }
2657
- const Rn = function(l) {
2657
+ const Ln = function(l) {
2658
2658
  let x = null;
2659
- if ($e(P.beforeSanitizeElements, l, null), Gt(l))
2659
+ if ($e(P.beforeSanitizeElements, l, null), Vt(l))
2660
2660
  return Ae(l), !0;
2661
2661
  const R = oe(l.nodeName);
2662
2662
  if ($e(P.uponSanitizeElement, l, {
2663
2663
  tagName: R,
2664
2664
  allowedTags: Y
2665
- }), te && l.hasChildNodes() && !Mn(l.firstElementChild) && ce(/<[/\w!]/g, l.innerHTML) && ce(/<[/\w!]/g, l.textContent) || l.nodeType === ht.progressingInstruction || te && l.nodeType === ht.comment && ce(/<[/\w]/g, l.data))
2665
+ }), te && l.hasChildNodes() && !Rn(l.firstElementChild) && ce(/<[/\w!]/g, l.innerHTML) && ce(/<[/\w!]/g, l.textContent) || l.nodeType === ht.progressingInstruction || te && l.nodeType === ht.comment && ce(/<[/\w]/g, l.data))
2666
2666
  return Ae(l), !0;
2667
2667
  if (!(Le.tagCheck instanceof Function && Le.tagCheck(R)) && (!Y[R] || Fe[R])) {
2668
- if (!Fe[R] && In(R) && (Z.tagNameCheck instanceof RegExp && ce(Z.tagNameCheck, R) || Z.tagNameCheck instanceof Function && Z.tagNameCheck(R)))
2668
+ if (!Fe[R] && $n(R) && (Z.tagNameCheck instanceof RegExp && ce(Z.tagNameCheck, R) || Z.tagNameCheck instanceof Function && Z.tagNameCheck(R)))
2669
2669
  return !1;
2670
- if (Ut && !Qe[R]) {
2670
+ if (Ut && !Ze[R]) {
2671
2671
  const Q = C(l) || l.parentNode, ae = S(l) || l.childNodes;
2672
2672
  if (ae && Q) {
2673
2673
  const re = ae.length;
@@ -2679,13 +2679,13 @@ function As() {
2679
2679
  }
2680
2680
  return Ae(l), !0;
2681
2681
  }
2682
- return l instanceof c && !Ns(l) || (R === "noscript" || R === "noembed" || R === "noframes") && ce(/<\/no(script|embed|frames)/i, l.innerHTML) ? (Ae(l), !0) : (K && l.nodeType === ht.text && (x = l.textContent, _t([L, ne, Te], (Q) => {
2682
+ return l instanceof c && !Ns(l) || (R === "noscript" || R === "noembed" || R === "noframes") && ce(/<\/no(script|embed|frames)/i, l.innerHTML) ? (Ae(l), !0) : (G && l.nodeType === ht.text && (x = l.textContent, _t([L, ne, Te], (Q) => {
2683
2683
  x = ct(x, Q, " ");
2684
2684
  }), l.textContent !== x && (ut(e.removed, {
2685
2685
  element: l.cloneNode()
2686
2686
  }), l.textContent = x)), $e(P.afterSanitizeElements, l, null), !1);
2687
- }, Ln = function(l, x, R) {
2688
- if (yn && (x === "id" || x === "name") && (R in t || R in Os))
2687
+ }, In = function(l, x, R) {
2688
+ if (xn && (x === "id" || x === "name") && (R in t || R in Os))
2689
2689
  return !1;
2690
2690
  if (!(Ge && !Ve[x] && ce(ze, x))) {
2691
2691
  if (!(St && ce(Re, x))) {
@@ -2695,13 +2695,13 @@ function As() {
2695
2695
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
2696
2696
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2697
2697
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
2698
- !(In(l) && (Z.tagNameCheck instanceof RegExp && ce(Z.tagNameCheck, l) || Z.tagNameCheck instanceof Function && Z.tagNameCheck(l)) && (Z.attributeNameCheck instanceof RegExp && ce(Z.attributeNameCheck, x) || Z.attributeNameCheck instanceof Function && Z.attributeNameCheck(x, l)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2698
+ !($n(l) && (Z.tagNameCheck instanceof RegExp && ce(Z.tagNameCheck, l) || Z.tagNameCheck instanceof Function && Z.tagNameCheck(l)) && (Z.attributeNameCheck instanceof RegExp && ce(Z.attributeNameCheck, x) || Z.attributeNameCheck instanceof Function && Z.attributeNameCheck(x, l)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2699
2699
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2700
2700
  x === "is" && Z.allowCustomizedBuiltInElements && (Z.tagNameCheck instanceof RegExp && ce(Z.tagNameCheck, R) || Z.tagNameCheck instanceof Function && Z.tagNameCheck(R)))
2701
2701
  ) return !1;
2702
2702
  } else if (!qt[x]) {
2703
2703
  if (!ce(vt, ct(R, bt, ""))) {
2704
- if (!((x === "src" || x === "xlink:href" || x === "href") && l !== "script" && to(R, "data:") === 0 && wn[l])) {
2704
+ if (!((x === "src" || x === "xlink:href" || x === "href") && l !== "script" && to(R, "data:") === 0 && bn[l])) {
2705
2705
  if (!(_ && !ce(He, ct(R, bt, "")))) {
2706
2706
  if (R)
2707
2707
  return !1;
@@ -2713,14 +2713,14 @@ function As() {
2713
2713
  }
2714
2714
  }
2715
2715
  return !0;
2716
- }, In = function(l) {
2717
- return l !== "annotation-xml" && Yt(l, Bt);
2718
2716
  }, $n = function(l) {
2717
+ return l !== "annotation-xml" && Yt(l, Bt);
2718
+ }, Dn = function(l) {
2719
2719
  $e(P.beforeSanitizeAttributes, l, null);
2720
2720
  const {
2721
2721
  attributes: x
2722
2722
  } = l;
2723
- if (!x || Gt(l))
2723
+ if (!x || Vt(l))
2724
2724
  return;
2725
2725
  const R = {
2726
2726
  attrName: "",
@@ -2735,13 +2735,13 @@ function As() {
2735
2735
  name: re,
2736
2736
  namespaceURI: fe,
2737
2737
  value: De
2738
- } = ae, Xe = oe(re), Kt = De;
2739
- let ie = re === "value" ? Kt : no(Kt);
2740
- if (R.attrName = Xe, R.attrValue = ie, R.keepAttr = !0, R.forceKeepAttr = void 0, $e(P.uponSanitizeAttribute, l, R), ie = R.attrValue, xn && (Xe === "id" || Xe === "name") && (Be(re, l), ie = Ls + ie), te && ce(/((--!?|])>)|<\/(style|title|textarea)/i, ie)) {
2738
+ } = ae, Je = oe(re), Gt = De;
2739
+ let ie = re === "value" ? Gt : no(Gt);
2740
+ if (R.attrName = Je, R.attrValue = ie, R.keepAttr = !0, R.forceKeepAttr = void 0, $e(P.uponSanitizeAttribute, l, R), ie = R.attrValue, kn && (Je === "id" || Je === "name") && (Be(re, l), ie = Ls + ie), te && ce(/((--!?|])>)|<\/(style|title|textarea)/i, ie)) {
2741
2741
  Be(re, l);
2742
2742
  continue;
2743
2743
  }
2744
- if (Xe === "attributename" && Yt(ie, "href")) {
2744
+ if (Je === "attributename" && Yt(ie, "href")) {
2745
2745
  Be(re, l);
2746
2746
  continue;
2747
2747
  }
@@ -2751,20 +2751,20 @@ function As() {
2751
2751
  Be(re, l);
2752
2752
  continue;
2753
2753
  }
2754
- if (!V && ce(/\/>/i, ie)) {
2754
+ if (!K && ce(/\/>/i, ie)) {
2755
2755
  Be(re, l);
2756
2756
  continue;
2757
2757
  }
2758
- K && _t([L, ne, Te], (_n) => {
2759
- ie = ct(ie, _n, " ");
2758
+ G && _t([L, ne, Te], (On) => {
2759
+ ie = ct(ie, On, " ");
2760
2760
  });
2761
- const Dn = oe(l.nodeName);
2762
- if (!Ln(Dn, Xe, ie)) {
2761
+ const _n = oe(l.nodeName);
2762
+ if (!In(_n, Je, ie)) {
2763
2763
  Be(re, l);
2764
2764
  continue;
2765
2765
  }
2766
2766
  if (b && typeof y == "object" && typeof y.getAttributeType == "function" && !fe)
2767
- switch (y.getAttributeType(Dn, Xe)) {
2767
+ switch (y.getAttributeType(_n, Je)) {
2768
2768
  case "TrustedHTML": {
2769
2769
  ie = b.createHTML(ie);
2770
2770
  break;
@@ -2774,9 +2774,9 @@ function As() {
2774
2774
  break;
2775
2775
  }
2776
2776
  }
2777
- if (ie !== Kt)
2777
+ if (ie !== Gt)
2778
2778
  try {
2779
- fe ? l.setAttributeNS(fe, re, ie) : l.setAttribute(re, ie), Gt(l) ? Ae(l) : Qn(e.removed);
2779
+ fe ? l.setAttributeNS(fe, re, ie) : l.setAttribute(re, ie), Vt(l) ? Ae(l) : Zn(e.removed);
2780
2780
  } catch {
2781
2781
  Be(re, l);
2782
2782
  }
@@ -2784,14 +2784,14 @@ function As() {
2784
2784
  $e(P.afterSanitizeAttributes, l, null);
2785
2785
  }, Ps = function $(l) {
2786
2786
  let x = null;
2787
- const R = En(l);
2787
+ const R = Mn(l);
2788
2788
  for ($e(P.beforeSanitizeShadowDOM, l, null); x = R.nextNode(); )
2789
- $e(P.uponSanitizeShadowNode, x, null), Rn(x), $n(x), x.content instanceof o && $(x.content);
2789
+ $e(P.uponSanitizeShadowNode, x, null), Ln(x), Dn(x), x.content instanceof o && $(x.content);
2790
2790
  $e(P.afterSanitizeShadowDOM, l, null);
2791
2791
  };
2792
2792
  return e.sanitize = function($) {
2793
2793
  let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, x = null, R = null, Q = null, ae = null;
2794
- if (jt = !$, jt && ($ = "<!-->"), typeof $ != "string" && !Mn($))
2794
+ if (jt = !$, jt && ($ = "<!-->"), typeof $ != "string" && !Rn($))
2795
2795
  if (typeof $.toString == "function") {
2796
2796
  if ($ = $.toString(), typeof $ != "string")
2797
2797
  throw dt("dirty is not a string, aborting");
@@ -2799,25 +2799,25 @@ function As() {
2799
2799
  throw dt("toString is not a function");
2800
2800
  if (!e.isSupported)
2801
2801
  return $;
2802
- if (J || Vt(l), e.removed = [], typeof $ == "string" && (rt = !1), rt) {
2802
+ if (J || Kt(l), e.removed = [], typeof $ == "string" && (rt = !1), rt) {
2803
2803
  if ($.nodeName) {
2804
2804
  const De = oe($.nodeName);
2805
2805
  if (!Y[De] || Fe[De])
2806
2806
  throw dt("root node is forbidden and cannot be sanitized in-place");
2807
2807
  }
2808
2808
  } else if ($ instanceof a)
2809
- x = Cn("<!---->"), R = x.ownerDocument.importNode($, !0), R.nodeType === ht.element && R.nodeName === "BODY" || R.nodeName === "HTML" ? x = R : x.appendChild(R);
2809
+ x = En("<!---->"), R = x.ownerDocument.importNode($, !0), R.nodeType === ht.element && R.nodeName === "BODY" || R.nodeName === "HTML" ? x = R : x.appendChild(R);
2810
2810
  else {
2811
- if (!Se && !K && !X && // eslint-disable-next-line unicorn/prefer-includes
2811
+ if (!Se && !G && !X && // eslint-disable-next-line unicorn/prefer-includes
2812
2812
  $.indexOf("<") === -1)
2813
2813
  return b && Ct ? b.createHTML($) : $;
2814
- if (x = Cn($), !x)
2814
+ if (x = En($), !x)
2815
2815
  return Se ? null : Ct ? z : "";
2816
2816
  }
2817
2817
  x && ue && Ae(x.firstChild);
2818
- const re = En(rt ? $ : x);
2818
+ const re = Mn(rt ? $ : x);
2819
2819
  for (; Q = re.nextNode(); )
2820
- Rn(Q), $n(Q), Q.content instanceof o && Ps(Q.content);
2820
+ Ln(Q), Dn(Q), Q.content instanceof o && Ps(Q.content);
2821
2821
  if (rt)
2822
2822
  return $;
2823
2823
  if (Se) {
@@ -2830,18 +2830,18 @@ function As() {
2830
2830
  }
2831
2831
  let fe = X ? x.outerHTML : x.innerHTML;
2832
2832
  return X && Y["!doctype"] && x.ownerDocument && x.ownerDocument.doctype && x.ownerDocument.doctype.name && ce(Ss, x.ownerDocument.doctype.name) && (fe = "<!DOCTYPE " + x.ownerDocument.doctype.name + `>
2833
- ` + fe), K && _t([L, ne, Te], (De) => {
2833
+ ` + fe), G && _t([L, ne, Te], (De) => {
2834
2834
  fe = ct(fe, De, " ");
2835
2835
  }), b && Ct ? b.createHTML(fe) : fe;
2836
2836
  }, e.setConfig = function() {
2837
2837
  let $ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2838
- Vt($), J = !0;
2838
+ Kt($), J = !0;
2839
2839
  }, e.clearConfig = function() {
2840
- Ye = null, J = !1;
2840
+ Xe = null, J = !1;
2841
2841
  }, e.isValidAttribute = function($, l, x) {
2842
- Ye || Vt({});
2842
+ Xe || Kt({});
2843
2843
  const R = oe($), Q = oe(l);
2844
- return Ln(R, Q, x);
2844
+ return In(R, Q, x);
2845
2845
  }, e.addHook = function($, l) {
2846
2846
  typeof l == "function" && ut(P[$], l);
2847
2847
  }, e.removeHook = function($, l) {
@@ -2849,11 +2849,11 @@ function As() {
2849
2849
  const x = Jr(P[$], l);
2850
2850
  return x === -1 ? void 0 : eo(P[$], x, 1)[0];
2851
2851
  }
2852
- return Qn(P[$]);
2852
+ return Zn(P[$]);
2853
2853
  }, e.removeHooks = function($) {
2854
2854
  P[$] = [];
2855
2855
  }, e.removeAllHooks = function() {
2856
- P = ts();
2856
+ P = ns();
2857
2857
  }, e;
2858
2858
  }
2859
2859
  var xo = As();
@@ -2945,7 +2945,7 @@ function wa() {
2945
2945
  };
2946
2946
  }
2947
2947
  function ba() {
2948
- const n = nt(), e = O(() => n.error), t = O(() => {
2948
+ const n = We(), e = O(() => n.error), t = O(() => {
2949
2949
  var o, i;
2950
2950
  return ((o = e.value) == null ? void 0 : o.message) !== null && ((i = e.value) == null ? void 0 : i.message) !== void 0;
2951
2951
  });
@@ -2959,7 +2959,7 @@ function ba() {
2959
2959
  };
2960
2960
  }
2961
2961
  function Cs() {
2962
- const n = nt(), e = O(() => n.pageContext);
2962
+ const n = We(), e = O(() => n.pageContext);
2963
2963
  function t(o) {
2964
2964
  n.setPageContext(o);
2965
2965
  }
@@ -3027,7 +3027,7 @@ function To(n) {
3027
3027
  }
3028
3028
  const va = To;
3029
3029
  function Ms() {
3030
- const { context: n } = Cs(), e = nt(), t = O(() => {
3030
+ const { context: n } = Cs(), e = We(), t = O(() => {
3031
3031
  var c;
3032
3032
  if (e.quota.remaining === 0) {
3033
3033
  const u = ee();
@@ -3095,23 +3095,30 @@ function So(n) {
3095
3095
  meta: e.includes("cmd") || e.includes("meta") || e.includes("command"),
3096
3096
  ctrl: e.includes("ctrl") || e.includes("control"),
3097
3097
  shift: e.includes("shift"),
3098
- alt: e.includes("alt") || e.includes("option")
3098
+ alt: e.includes("alt") || e.includes("option"),
3099
+ mod: e.includes("mod")
3100
+ // Platform-independent: Cmd on Mac, Ctrl on Windows/Linux
3099
3101
  };
3100
3102
  }
3101
3103
  function Ao(n, e) {
3102
- const t = n.key.toLowerCase(), s = e.meta ? n.metaKey : !n.metaKey, r = e.ctrl ? n.ctrlKey : !n.ctrlKey, o = e.shift ? n.shiftKey : !n.shiftKey, i = e.alt ? n.altKey : !n.altKey;
3104
+ const t = n.key.toLowerCase();
3105
+ if (e.mod) {
3106
+ const u = navigator.platform.toUpperCase().indexOf("MAC") >= 0 || navigator.userAgent.toUpperCase().indexOf("MAC") >= 0 ? n.metaKey : n.ctrlKey, d = e.shift ? n.shiftKey : !n.shiftKey, g = e.alt ? n.altKey : !n.altKey;
3107
+ return t === e.key && u && d && g;
3108
+ }
3109
+ const s = e.meta ? n.metaKey : !n.metaKey, r = e.ctrl ? n.ctrlKey : !n.ctrlKey, o = e.shift ? n.shiftKey : !n.shiftKey, i = e.alt ? n.altKey : !n.altKey;
3103
3110
  let a = s && r && o && i;
3104
3111
  return (e.meta && !e.ctrl || !e.meta && e.ctrl) && (a = (n.metaKey || n.ctrlKey) && o && i), t === e.key && a;
3105
3112
  }
3106
3113
  function Co(n) {
3107
- const { onToggle: e, enabled: t = !0 } = n, s = q(!1), r = n.shortcut !== void 0 ? n.shortcut : et("keyboardShortcut") ?? "cmd+g";
3114
+ const { onToggle: e, enabled: t = !0 } = n, s = q(!1), r = n.shortcut !== void 0 ? n.shortcut : tt("keyboardShortcut") ?? "mod+g";
3108
3115
  if (r === null)
3109
3116
  return { isActive: s };
3110
3117
  const o = So(r);
3111
3118
  function i(a) {
3112
3119
  if (!t) return;
3113
- const c = a.target, u = c.tagName === "INPUT" || c.tagName === "TEXTAREA", d = c.isContentEditable, m = c.closest("[data-ai-input]");
3114
- if (!((u || d) && !m) && Ao(a, o)) {
3120
+ const c = a.target, u = c.tagName === "INPUT" || c.tagName === "TEXTAREA", d = c.isContentEditable, g = c.closest("[data-ai-input]");
3121
+ if (!((u || d) && !g) && Ao(a, o)) {
3115
3122
  a.preventDefault(), a.stopPropagation();
3116
3123
  const w = ee();
3117
3124
  if (w != null && w.canToggle && !w.canToggle())
@@ -3126,9 +3133,10 @@ function Co(n) {
3126
3133
  }), { isActive: s };
3127
3134
  }
3128
3135
  function Sa(n) {
3136
+ const e = We();
3129
3137
  return Co({
3130
3138
  onToggle: () => {
3131
- n.value = !n.value;
3139
+ n ? n.value = !n.value : e.showChat = !e.showChat;
3132
3140
  }
3133
3141
  });
3134
3142
  }
@@ -3155,11 +3163,11 @@ function Eo(n, e) {
3155
3163
  }
3156
3164
  function c() {
3157
3165
  i();
3158
- const u = e == null ? void 0 : e(), d = (u == null ? void 0 : u.messages) ?? r(), m = (u == null ? void 0 : u.intervals) ?? o();
3166
+ const u = e == null ? void 0 : e(), d = (u == null ? void 0 : u.messages) ?? r(), g = (u == null ? void 0 : u.intervals) ?? o();
3159
3167
  t.value = d[0] || le("loadingText");
3160
3168
  let w = 0;
3161
3169
  for (let y = 1; y < d.length; y++) {
3162
- w += m[y] || 2e3;
3170
+ w += g[y] || 2e3;
3163
3171
  const h = y, A = window.setTimeout(() => {
3164
3172
  n() && (t.value = d[h]);
3165
3173
  }, w);
@@ -3193,7 +3201,7 @@ function Mo(n) {
3193
3201
  }), u = O(() => {
3194
3202
  var C;
3195
3203
  return ((C = s()) == null ? void 0 : C.showWarningAt) ?? c.value - 2;
3196
- }), d = O(() => Math.max(0, c.value - e())), m = O(
3204
+ }), d = O(() => Math.max(0, c.value - e())), g = O(
3197
3205
  () => d.value <= c.value - u.value && d.value > 0
3198
3206
  ), w = O(() => d.value === 0), y = O(() => {
3199
3207
  var C, b;
@@ -3205,7 +3213,7 @@ function Mo(n) {
3205
3213
  function A() {
3206
3214
  a.value.showWarning = !1, a.value.isReached = !1, a.value.pendingMessage = null;
3207
3215
  }
3208
- async function g() {
3216
+ async function m() {
3209
3217
  a.value.showWarning = !1;
3210
3218
  const C = s();
3211
3219
  if (C != null && C.onLimitReached && !await C.onLimitReached())
@@ -3217,7 +3225,7 @@ function Mo(n) {
3217
3225
  return null;
3218
3226
  }
3219
3227
  function f() {
3220
- return w.value ? (a.value.isReached = !0, a.value.showWarning = !0, !1) : (m.value && !a.value.showWarning && (a.value.showWarning = !0), !0);
3228
+ return w.value ? (a.value.isReached = !0, a.value.showWarning = !0, !1) : (g.value && !a.value.showWarning && (a.value.showWarning = !0), !0);
3221
3229
  }
3222
3230
  function S(C) {
3223
3231
  a.value.pendingMessage = C;
@@ -3233,17 +3241,17 @@ function Mo(n) {
3233
3241
  historyLimitDialogMessage: h,
3234
3242
  // Actions
3235
3243
  dismissHistoryLimitWarning: A,
3236
- handleHistoryLimitAction: g,
3244
+ handleHistoryLimitAction: m,
3237
3245
  checkHistoryLimit: f,
3238
3246
  setPendingMessage: S
3239
3247
  };
3240
3248
  }
3241
3249
  function Ro() {
3242
- const n = nt(), e = q([]), t = q(!1), s = q(0), r = et("maxAttachments") || 5, o = et("maxFileSize") || 10 * 1024 * 1024, i = et("acceptedFileTypes") || "image/*,.pdf,.txt,.doc,.docx,.xls,.xlsx,.csv", a = O(() => e.value.length > 0), c = O(() => e.value.some((E) => E.uploading)), u = O(() => e.value.length < r);
3250
+ const n = We(), e = q([]), t = q(!1), s = q(0), r = tt("maxAttachments") || 5, o = tt("maxFileSize") || 10 * 1024 * 1024, i = tt("acceptedFileTypes") || "image/*,.pdf,.txt,.doc,.docx,.xls,.xlsx,.csv", a = O(() => e.value.length > 0), c = O(() => e.value.some((E) => E.uploading)), u = O(() => e.value.length < r);
3243
3251
  function d(E) {
3244
3252
  return (E.type || "").startsWith("image/") ? !0 : /(png|jpe?g|gif|webp)$/i.test(E.name);
3245
3253
  }
3246
- function m(E) {
3254
+ function g(E) {
3247
3255
  if (E == null) return "";
3248
3256
  const M = typeof E == "string" ? parseInt(E, 10) : E;
3249
3257
  return Number.isNaN(M) ? "" : M >= 1024 * 1024 ? `${(M / (1024 * 1024)).toFixed(1)} MB` : M >= 1024 ? `${Math.round(M / 1024)} KB` : `${M} B`;
@@ -3293,7 +3301,7 @@ function Ro() {
3293
3301
  E.previewUrl && URL.revokeObjectURL(E.previewUrl);
3294
3302
  }), e.value = [];
3295
3303
  }
3296
- function g() {
3304
+ function m() {
3297
3305
  return e.value.filter((E) => !E.uploading).map((E) => ({
3298
3306
  id: E.id,
3299
3307
  name: E.name,
@@ -3327,7 +3335,7 @@ function Ro() {
3327
3335
  var M;
3328
3336
  S(E) && (s.value = 0, t.value = !1, f(((M = E.dataTransfer) == null ? void 0 : M.files) || null));
3329
3337
  }
3330
- function G(E) {
3338
+ function V(E) {
3331
3339
  const M = E.target, I = M.files;
3332
3340
  I && I.length && f(I), M.value = "";
3333
3341
  }
@@ -3344,13 +3352,13 @@ function Ro() {
3344
3352
  acceptedFileTypes: i,
3345
3353
  // Utils
3346
3354
  isImage: d,
3347
- formatFileSize: m,
3355
+ formatFileSize: g,
3348
3356
  // Actions
3349
3357
  removeAttachment: h,
3350
3358
  clearAttachments: A,
3351
- buildPayload: g,
3359
+ buildPayload: m,
3352
3360
  processFiles: f,
3353
- handleFileSelect: G,
3361
+ handleFileSelect: V,
3354
3362
  // Drag & Drop
3355
3363
  handleDragEnter: C,
3356
3364
  handleDragOver: b,
@@ -3364,19 +3372,19 @@ function Lo(n, e, t) {
3364
3372
  return (A == null ? void 0 : A.mentionProviders) || [];
3365
3373
  });
3366
3374
  function u(A) {
3367
- const g = t();
3368
- if (!g) return;
3369
- const f = g.selectionStart, S = ls(A, f);
3375
+ const m = t();
3376
+ if (!m) return;
3377
+ const f = m.selectionStart, S = ls(A, f);
3370
3378
  i.value = S, S.inMention && S.query.length >= 0 ? d(S.query) : (s.value = !1, r.value = []);
3371
3379
  }
3372
3380
  async function d(A) {
3373
- const g = ds();
3374
- if (g.length === 0) {
3381
+ const m = ds();
3382
+ if (m.length === 0) {
3375
3383
  s.value = !1;
3376
3384
  return;
3377
3385
  }
3378
3386
  const f = [];
3379
- for (const S of g)
3387
+ for (const S of m)
3380
3388
  try {
3381
3389
  const C = await S.search(A);
3382
3390
  f.push(...C.map((b) => ({ ...b, type: S.type })));
@@ -3385,8 +3393,8 @@ function Lo(n, e, t) {
3385
3393
  }
3386
3394
  r.value = f.slice(0, 10), s.value = f.length > 0, o.value = 0;
3387
3395
  }
3388
- function m(A) {
3389
- const { startPos: g } = i.value, f = n(), S = t(), C = f.slice(0, g), b = f.slice((S == null ? void 0 : S.selectionStart) || g), z = A.name || A.label || A.title || A.id;
3396
+ function g(A) {
3397
+ const { startPos: m } = i.value, f = n(), S = t(), C = f.slice(0, m), b = f.slice((S == null ? void 0 : S.selectionStart) || m), z = A.name || A.label || A.title || A.id;
3390
3398
  e(`${C}@${z} ${b}`), a.value.push({
3391
3399
  id: A.id,
3392
3400
  name: z,
@@ -3395,8 +3403,8 @@ function Lo(n, e, t) {
3395
3403
  }), s.value = !1, r.value = [], setTimeout(() => {
3396
3404
  const F = t();
3397
3405
  F == null || F.focus();
3398
- const G = C.length + z.length + 2;
3399
- F == null || F.setSelectionRange(G, G);
3406
+ const V = C.length + z.length + 2;
3407
+ F == null || F.setSelectionRange(V, V);
3400
3408
  }, 0);
3401
3409
  }
3402
3410
  function w(A) {
@@ -3408,8 +3416,8 @@ function Lo(n, e, t) {
3408
3416
  return A.preventDefault(), o.value = Math.max(o.value - 1, 0), !0;
3409
3417
  if (A.key === "Enter" || A.key === "Tab") {
3410
3418
  A.preventDefault();
3411
- const g = r.value[o.value];
3412
- return g && m(g), !0;
3419
+ const m = r.value[o.value];
3420
+ return m && g(m), !0;
3413
3421
  }
3414
3422
  return A.key === "Escape" ? (A.preventDefault(), s.value = !1, !0) : !1;
3415
3423
  }
@@ -3427,7 +3435,7 @@ function Lo(n, e, t) {
3427
3435
  mentionProviders: c,
3428
3436
  // Actions
3429
3437
  checkForMentions: u,
3430
- handleMentionSelect: m,
3438
+ handleMentionSelect: g,
3431
3439
  handleMentionKeyDown: w,
3432
3440
  clearMentions: y,
3433
3441
  getMentions: h
@@ -3461,9 +3469,9 @@ function Io(n, e, t, s, r) {
3461
3469
  function d(y) {
3462
3470
  r(y), o.value = !1, i.value = -1;
3463
3471
  }
3464
- function m() {
3465
- const y = s(), h = e(), A = t(), g = n();
3466
- y && !h && A && g.length > 0 ? o.value = !0 : o.value = !1;
3472
+ function g() {
3473
+ const y = s(), h = e(), A = t(), m = n();
3474
+ y && !h && A && m.length > 0 ? o.value = !0 : o.value = !1;
3467
3475
  }
3468
3476
  function w() {
3469
3477
  o.value = !1, i.value = -1;
@@ -3474,7 +3482,7 @@ function Io(n, e, t, s, r) {
3474
3482
  dropdownRef: a,
3475
3483
  handleSuggestionKeyDown: u,
3476
3484
  handleSuggestionClick: d,
3477
- updateSuggestionsVisibility: m,
3485
+ updateSuggestionsVisibility: g,
3478
3486
  hideSuggestions: w
3479
3487
  };
3480
3488
  }
@@ -3567,50 +3575,50 @@ const Do = /* @__PURE__ */ he({
3567
3575
  emits: ["select", "update:selectedIndex"],
3568
3576
  setup(n, { emit: e }) {
3569
3577
  const t = n, s = O(() => t.ui || {}), r = e, o = q(t.selectedIndex);
3570
- Ue(() => t.selectedIndex, (g) => {
3571
- o.value = g;
3572
- }), Ue(o, (g) => {
3573
- r("update:selectedIndex", g);
3578
+ Ue(() => t.selectedIndex, (m) => {
3579
+ o.value = m;
3580
+ }), Ue(o, (m) => {
3581
+ r("update:selectedIndex", m);
3574
3582
  });
3575
3583
  const i = O(() => {
3576
- const g = {};
3584
+ const m = {};
3577
3585
  return t.items.forEach((f) => {
3578
3586
  const S = f.type || "default";
3579
- g[S] || (g[S] = []), g[S].push(f);
3580
- }), g;
3587
+ m[S] || (m[S] = []), m[S].push(f);
3588
+ }), m;
3581
3589
  });
3582
- function a(g) {
3583
- return t.providers.find((f) => f.type === g) || cs(g);
3590
+ function a(m) {
3591
+ return t.providers.find((f) => f.type === m) || cs(m);
3584
3592
  }
3585
- function c(g) {
3586
- const f = a(g);
3587
- return (f == null ? void 0 : f.label) || g.charAt(0).toUpperCase() + g.slice(1) + "s";
3593
+ function c(m) {
3594
+ const f = a(m);
3595
+ return (f == null ? void 0 : f.label) || m.charAt(0).toUpperCase() + m.slice(1) + "s";
3588
3596
  }
3589
- function u(g, f) {
3597
+ function u(m, f) {
3590
3598
  let S = 0;
3591
3599
  const C = Object.keys(i.value);
3592
3600
  for (const b of C) {
3593
- if (b === g)
3601
+ if (b === m)
3594
3602
  return S + f;
3595
3603
  S += i.value[b].length;
3596
3604
  }
3597
3605
  return S;
3598
3606
  }
3599
- function d(g) {
3600
- r("select", g);
3607
+ function d(m) {
3608
+ r("select", m);
3601
3609
  }
3602
- function m(g) {
3603
- o.value = g, r("update:selectedIndex", g);
3610
+ function g(m) {
3611
+ o.value = m, r("update:selectedIndex", m);
3604
3612
  }
3605
- function w(g) {
3606
- const f = a(g.type);
3607
- return un(g, f);
3613
+ function w(m) {
3614
+ const f = a(m.type);
3615
+ return cn(m, f);
3608
3616
  }
3609
- function y(g) {
3610
- const f = a(g.type);
3611
- return us(g, f);
3617
+ function y(m) {
3618
+ const f = a(m.type);
3619
+ return us(m, f);
3612
3620
  }
3613
- function h(g) {
3621
+ function h(m) {
3614
3622
  const f = {
3615
3623
  employee: "bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400",
3616
3624
  job: "bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400",
@@ -3618,12 +3626,12 @@ const Do = /* @__PURE__ */ he({
3618
3626
  project: "bg-orange-100 dark:bg-orange-900/30 text-orange-600 dark:text-orange-400",
3619
3627
  default: "bg-primary/10 text-primary"
3620
3628
  };
3621
- return f[g] || f.default;
3629
+ return f[m] || f.default;
3622
3630
  }
3623
- function A(g) {
3624
- return g.split(" ").map((f) => f[0]).join("").slice(0, 2).toUpperCase();
3631
+ function A(m) {
3632
+ return m.split(" ").map((f) => f[0]).join("").slice(0, 2).toUpperCase();
3625
3633
  }
3626
- return (g, f) => n.items.length > 0 ? (k(), v("div", {
3634
+ return (m, f) => n.items.length > 0 ? (k(), v("div", {
3627
3635
  key: 0,
3628
3636
  class: T(["absolute bottom-full left-0 right-0 mb-2 bg-white dark:bg-gray-800 rounded-xl border border-gray-200 dark:border-gray-700 shadow-lg max-h-60 overflow-y-auto z-50", s.value.root])
3629
3637
  }, [
@@ -3646,9 +3654,9 @@ const Do = /* @__PURE__ */ he({
3646
3654
  }
3647
3655
  ]]),
3648
3656
  onClick: (F) => d(b),
3649
- onMouseenter: (F) => m(u(C, z))
3657
+ onMouseenter: (F) => g(u(C, z))
3650
3658
  }, [
3651
- me(g.$slots, "item-icon", {
3659
+ me(m.$slots, "item-icon", {
3652
3660
  item: b,
3653
3661
  type: C
3654
3662
  }, () => [
@@ -3745,12 +3753,12 @@ const Do = /* @__PURE__ */ he({
3745
3753
  }, Uo = { class: "flex-1 min-w-0" }, qo = { class: "text-sm font-semibold text-white truncate" }, jo = { class: "text-xs text-white/70" }, Wo = {
3746
3754
  key: 0,
3747
3755
  class: "text-xs font-medium text-white/90"
3748
- }, Vo = ["src"], Go = {
3756
+ }, Ko = ["src"], Vo = {
3749
3757
  key: 1,
3750
3758
  class: "h-4 w-4 text-white",
3751
3759
  viewBox: "0 0 24 24",
3752
3760
  fill: "currentColor"
3753
- }, Ko = { class: "flex-shrink-0 mt-0.5" }, Qo = { class: "text-gray-600 dark:text-gray-400" }, Zo = ["id", "innerHTML"], Yo = { class: "h-12 w-12 flex items-center justify-center rounded-lg bg-white dark:bg-gray-800 overflow-hidden border border-gray-200 dark:border-gray-600" }, Xo = ["src"], Jo = {
3761
+ }, Go = { class: "flex-shrink-0 mt-0.5" }, Qo = { class: "text-gray-600 dark:text-gray-400" }, Zo = ["id", "innerHTML"], Yo = { class: "h-12 w-12 flex items-center justify-center rounded-lg bg-white dark:bg-gray-800 overflow-hidden border border-gray-200 dark:border-gray-600" }, Xo = ["src"], Jo = {
3754
3762
  key: 1,
3755
3763
  class: "w-5 h-5 text-gray-500 dark:text-gray-400",
3756
3764
  fill: "none",
@@ -3785,7 +3793,7 @@ const Do = /* @__PURE__ */ he({
3785
3793
  `).length;
3786
3794
  return f.length > 200 || S > 4;
3787
3795
  });
3788
- function m() {
3796
+ function g() {
3789
3797
  a.value = !a.value;
3790
3798
  }
3791
3799
  function w(f) {
@@ -3808,7 +3816,7 @@ const Do = /* @__PURE__ */ he({
3808
3816
  }
3809
3817
  return t.message.message;
3810
3818
  });
3811
- function g(f) {
3819
+ function m(f) {
3812
3820
  s("copy", f);
3813
3821
  }
3814
3822
  return (f, S) => {
@@ -3836,7 +3844,7 @@ const Do = /* @__PURE__ */ he({
3836
3844
  d.value ? (k(), v("button", {
3837
3845
  key: 1,
3838
3846
  class: T(["mt-2 text-xs text-white/80 hover:text-white underline", o.value.showMoreButton]),
3839
- onClick: m
3847
+ onClick: g
3840
3848
  }, N(a.value ? r("showLess") : r("showMore")), 3)) : B("", !0),
3841
3849
  u.value ? (k(), v("div", {
3842
3850
  key: 2,
@@ -3883,7 +3891,7 @@ const Do = /* @__PURE__ */ he({
3883
3891
  src: y.value,
3884
3892
  alt: "User",
3885
3893
  class: "h-full w-full object-cover"
3886
- }, null, 8, Vo)) : (k(), v("svg", Go, [...S[1] || (S[1] = [
3894
+ }, null, 8, Ko)) : (k(), v("svg", Vo, [...S[1] || (S[1] = [
3887
3895
  p("path", {
3888
3896
  "fill-rule": "evenodd",
3889
3897
  d: "M7.5 6a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0ZM3.751 20.105a8.25 8.25 0 0 1 16.498 0 .75.75 0 0 1-.437.695A18.683 18.683 0 0 1 12 22.5c-2.786 0-5.433-.608-7.812-1.7a.75.75 0 0 1-.437-.695Z",
@@ -3895,7 +3903,7 @@ const Do = /* @__PURE__ */ he({
3895
3903
  key: 1,
3896
3904
  class: T(["flex items-start gap-3", o.value.assistantMessage])
3897
3905
  }, [
3898
- p("div", Ko, [
3906
+ p("div", Go, [
3899
3907
  ge(Do)
3900
3908
  ]),
3901
3909
  p("div", {
@@ -3970,7 +3978,7 @@ const Do = /* @__PURE__ */ he({
3970
3978
  key: 2,
3971
3979
  message: n.message,
3972
3980
  class: T(["absolute -bottom-8 left-14", o.value.actionsContainer]),
3973
- onCopy: g
3981
+ onCopy: m
3974
3982
  }, null, 8, ["message", "class"])) : B("", !0)
3975
3983
  ], 2);
3976
3984
  };
@@ -4037,7 +4045,7 @@ const Do = /* @__PURE__ */ he({
4037
4045
  r.uploading ? (k(), v("div", hi, [
4038
4046
  p("div", {
4039
4047
  class: "h-full bg-primary transition-all",
4040
- style: ss({ width: `${r.progress ?? 10}%` })
4048
+ style: un({ width: `${r.progress ?? 10}%` })
4041
4049
  }, null, 4)
4042
4050
  ])) : B("", !0)
4043
4051
  ]),
@@ -4204,7 +4212,7 @@ const Do = /* @__PURE__ */ he({
4204
4212
  disabled: !n.canSend && !n.sending,
4205
4213
  class: T(["h-9 w-9 rounded-xl flex items-center justify-center transition-all duration-200 flex-shrink-0", t.value]),
4206
4214
  type: "button",
4207
- onClick: r[2] || (r[2] = Je((c) => s.$emit("click"), ["prevent"]))
4215
+ onClick: r[2] || (r[2] = et((c) => s.$emit("click"), ["prevent"]))
4208
4216
  }, [
4209
4217
  n.sending ? (k(), v("svg", Ri, [...r[7] || (r[7] = [
4210
4218
  p("path", {
@@ -4252,7 +4260,7 @@ const Do = /* @__PURE__ */ he({
4252
4260
  o.value = M;
4253
4261
  },
4254
4262
  () => i.value
4255
- ), m = Io(
4263
+ ), g = Io(
4256
4264
  () => t.suggestions,
4257
4265
  () => t.hasHistory,
4258
4266
  () => c.value,
@@ -4263,30 +4271,30 @@ const Do = /* @__PURE__ */ he({
4263
4271
  return (I = i.value) == null ? void 0 : I.focus();
4264
4272
  });
4265
4273
  }
4266
- ), { adjustTextareaHeight: w } = $o(() => i.value), y = O(() => t.supportRequestMode ? t.supportPlaceholder : t.placeholder), h = O(() => t.showSupportModeToggle ? t.supportRequestMode ? "pr-32" : "pr-24" : "pr-14"), A = O(() => {
4274
+ ), { adjustTextareaHeight: w } = $o(() => i.value), y = O(() => t.supportRequestMode ? t.supportPlaceholder : t.placeholder), h = O(() => t.showSupportModeToggle ? t.supportRequestMode ? { paddingLeft: "3rem", paddingRight: "8rem" } : { paddingLeft: "3rem", paddingRight: "6rem" } : { paddingLeft: "3rem", paddingRight: "3.5rem" }), A = O(() => {
4267
4275
  var I;
4268
4276
  return (((I = o.value) == null ? void 0 : I.trim()) ?? "").length >= t.minLength ? !0 : u.hasAttachments.value;
4269
- }), g = O(
4277
+ }), m = O(
4270
4278
  () => !t.disabled && !t.sending && A.value && !u.isUploading.value
4271
4279
  );
4272
4280
  Ue(() => t.modelValue, (M) => {
4273
4281
  o.value = M, Oe(w);
4274
4282
  }), Ue(o, (M) => {
4275
- r("update:modelValue", M), Oe(w), d.checkForMentions(M), m.updateSuggestionsVisibility();
4283
+ r("update:modelValue", M), Oe(w), d.checkForMentions(M), g.updateSuggestionsVisibility();
4276
4284
  }), Ue(() => t.suggestions, () => {
4277
- m.updateSuggestionsVisibility();
4285
+ g.updateSuggestionsVisibility();
4278
4286
  });
4279
4287
  function f() {
4280
4288
  w();
4281
4289
  }
4282
4290
  function S(M) {
4283
- if (!d.handleMentionKeyDown(M) && !m.handleSuggestionKeyDown(M) && M.key === "Enter") {
4291
+ if (!d.handleMentionKeyDown(M) && !g.handleSuggestionKeyDown(M) && M.key === "Enter") {
4284
4292
  if (M.shiftKey) return;
4285
- !t.sending && g.value && (M.preventDefault(), C());
4293
+ !t.sending && m.value && (M.preventDefault(), C());
4286
4294
  }
4287
4295
  }
4288
4296
  function C() {
4289
- if (!g.value) return;
4297
+ if (!m.value) return;
4290
4298
  const M = u.buildPayload(), I = o.value.trim(), P = d.getMentions();
4291
4299
  r("submit", {
4292
4300
  message: I,
@@ -4296,21 +4304,21 @@ const Do = /* @__PURE__ */ he({
4296
4304
  }), o.value = "", u.clearAttachments(), d.clearMentions(), Oe(w);
4297
4305
  }
4298
4306
  function b() {
4299
- t.sending ? r("cancel") : g.value && C();
4307
+ t.sending ? r("cancel") : m.value && C();
4300
4308
  }
4301
4309
  function z() {
4302
4310
  var M;
4303
4311
  t.disabled || t.sending || u.canAddMore.value && ((M = a.value) == null || M.click());
4304
4312
  }
4305
4313
  function F(M) {
4306
- m.handleSuggestionClick(M);
4314
+ g.handleSuggestionClick(M);
4307
4315
  }
4308
- function G() {
4309
- c.value = !0, m.updateSuggestionsVisibility();
4316
+ function V() {
4317
+ c.value = !0, g.updateSuggestionsVisibility();
4310
4318
  }
4311
4319
  function E() {
4312
4320
  c.value = !1, setTimeout(() => {
4313
- m.hideSuggestions(), d.showMentions.value = !1;
4321
+ g.hideSuggestions(), d.showMentions.value = !1;
4314
4322
  }, 200);
4315
4323
  }
4316
4324
  return xt(() => {
@@ -4319,29 +4327,29 @@ const Do = /* @__PURE__ */ he({
4319
4327
  var P;
4320
4328
  return k(), v("div", {
4321
4329
  class: T(["px-4 pb-4 bg-white dark:bg-gray-900 sticky bottom-0", s.value.root]),
4322
- onDragenter: I[6] || (I[6] = Je(
4330
+ onDragenter: I[6] || (I[6] = et(
4323
4331
  //@ts-ignore
4324
4332
  (...L) => D(u).handleDragEnter && D(u).handleDragEnter(...L),
4325
4333
  ["prevent"]
4326
4334
  )),
4327
- onDragover: I[7] || (I[7] = Je(
4335
+ onDragover: I[7] || (I[7] = et(
4328
4336
  //@ts-ignore
4329
4337
  (...L) => D(u).handleDragOver && D(u).handleDragOver(...L),
4330
4338
  ["prevent"]
4331
4339
  )),
4332
- onDragleave: I[8] || (I[8] = Je(
4340
+ onDragleave: I[8] || (I[8] = et(
4333
4341
  //@ts-ignore
4334
4342
  (...L) => D(u).handleDragLeave && D(u).handleDragLeave(...L),
4335
4343
  ["prevent"]
4336
4344
  )),
4337
- onDrop: I[9] || (I[9] = Je(
4345
+ onDrop: I[9] || (I[9] = et(
4338
4346
  //@ts-ignore
4339
4347
  (...L) => D(u).handleDrop && D(u).handleDrop(...L),
4340
4348
  ["prevent"]
4341
4349
  ))
4342
4350
  }, [
4343
4351
  p("form", {
4344
- onSubmit: Je(C, ["prevent"]),
4352
+ onSubmit: et(C, ["prevent"]),
4345
4353
  class: T(s.value.form)
4346
4354
  }, [
4347
4355
  p("div", Ii, [
@@ -4367,14 +4375,14 @@ const Do = /* @__PURE__ */ he({
4367
4375
  p("div", {
4368
4376
  class: T(["relative", s.value.inputContainer])
4369
4377
  }, [
4370
- D(m).showSuggestions.value && n.suggestions.length > 0 ? (k(), Me(Ti, {
4378
+ D(g).showSuggestions.value && n.suggestions.length > 0 ? (k(), Me(Ti, {
4371
4379
  key: 0,
4372
4380
  ref: "suggestionsHandler.dropdownRef.value",
4373
4381
  suggestions: n.suggestions,
4374
- "selected-index": D(m).selectedSuggestionIndex.value,
4382
+ "selected-index": D(g).selectedSuggestionIndex.value,
4375
4383
  ui: s.value,
4376
4384
  onSelect: F,
4377
- onHover: I[1] || (I[1] = (L) => D(m).selectedSuggestionIndex.value = L)
4385
+ onHover: I[1] || (I[1] = (L) => D(g).selectedSuggestionIndex.value = L)
4378
4386
  }, null, 8, ["suggestions", "selected-index", "ui"])) : B("", !0),
4379
4387
  ge(mt, {
4380
4388
  "enter-active-class": "transition ease-out duration-100",
@@ -4434,18 +4442,19 @@ const Do = /* @__PURE__ */ he({
4434
4442
  "data-ai-input": "",
4435
4443
  placeholder: y.value,
4436
4444
  disabled: n.disabled,
4437
- class: T(["block w-full bg-transparent py-3 text-sm leading-5 text-gray-900 dark:text-gray-100 placeholder:text-gray-400 dark:placeholder:text-gray-500 border-0 focus:outline-none focus-visible:outline-none resize-none pl-12", [s.value.textarea, h.value]]),
4445
+ class: T(["block w-full bg-transparent py-3 text-sm leading-5 text-gray-900 dark:text-gray-100 placeholder:text-gray-400 dark:placeholder:text-gray-500 border-0 focus:outline-none focus-visible:outline-none resize-none", s.value.textarea]),
4446
+ style: un(h.value),
4438
4447
  onInput: f,
4439
4448
  onKeydown: S,
4440
- onFocus: G,
4449
+ onFocus: V,
4441
4450
  onBlur: E
4442
- }, null, 42, Oi), [
4451
+ }, null, 46, Oi), [
4443
4452
  [qs, o.value]
4444
4453
  ])
4445
4454
  ]),
4446
4455
  ge(Li, {
4447
4456
  sending: n.sending,
4448
- "can-send": g.value,
4457
+ "can-send": m.value,
4449
4458
  "support-request-mode": n.supportRequestMode,
4450
4459
  "show-support-mode-toggle": n.showSupportModeToggle,
4451
4460
  ui: s.value,
@@ -4505,7 +4514,7 @@ const Do = /* @__PURE__ */ he({
4505
4514
  };
4506
4515
  return h[y] || h.default;
4507
4516
  }
4508
- function m(w) {
4517
+ function g(w) {
4509
4518
  const y = w.category || "default", h = {
4510
4519
  hr: "text-blue-600 dark:text-blue-400",
4511
4520
  finance: "text-green-600 dark:text-green-400",
@@ -4555,17 +4564,17 @@ const Do = /* @__PURE__ */ he({
4555
4564
  (k(!0), v(we, null, Ne(D(i), (h, A) => (k(), v("button", {
4556
4565
  key: h.id || A,
4557
4566
  class: T(["group relative overflow-hidden rounded-xl border border-gray-300 dark:border-gray-600 p-4 text-left transition-all hover:shadow-md hover:scale-[1.02]", [o.value.suggestionCard, u(h)]]),
4558
- onClick: (g) => c(h)
4567
+ onClick: (m) => c(h)
4559
4568
  }, [
4560
4569
  p("div", {
4561
4570
  class: T(["mb-2 inline-flex h-10 w-10 items-center justify-center rounded-lg", [o.value.suggestionIconContainer, d(h)]])
4562
4571
  }, [
4563
4572
  h.icon ? (k(), Me(nn(h.icon), {
4564
4573
  key: 0,
4565
- class: T(["h-5 w-5", [o.value.suggestionIcon, m(h)]])
4574
+ class: T(["h-5 w-5", [o.value.suggestionIcon, g(h)]])
4566
4575
  }, null, 8, ["class"])) : (k(), v("svg", {
4567
4576
  key: 1,
4568
- class: T(["h-5 w-5", [o.value.suggestionIcon, m(h)]]),
4577
+ class: T(["h-5 w-5", [o.value.suggestionIcon, g(h)]]),
4569
4578
  fill: "none",
4570
4579
  viewBox: "0 0 24 24",
4571
4580
  stroke: "currentColor",
@@ -4598,14 +4607,14 @@ const Do = /* @__PURE__ */ he({
4598
4607
  }, qi = {
4599
4608
  key: 0,
4600
4609
  class: "flex items-center gap-2 ml-auto mr-3"
4601
- }, ji = ["title"], Wi = ["title"], Vi = ["title"], Gi = {
4610
+ }, ji = ["title"], Wi = ["title"], Ki = ["title"], Vi = {
4602
4611
  key: 0,
4603
4612
  class: "w-5 h-5 text-gray-600 dark:text-gray-400",
4604
4613
  fill: "none",
4605
4614
  viewBox: "0 0 24 24",
4606
4615
  stroke: "currentColor",
4607
4616
  "stroke-width": "1.5"
4608
- }, Ki = {
4617
+ }, Gi = {
4609
4618
  key: 1,
4610
4619
  class: "w-5 h-5 text-gray-600 dark:text-gray-400",
4611
4620
  fill: "none",
@@ -4728,20 +4737,20 @@ const Do = /* @__PURE__ */ he({
4728
4737
  title: n.isFullscreen ? n.t("exitFullscreen") : n.t("fullscreen"),
4729
4738
  onClick: t[3] || (t[3] = (u) => e.$emit("toggle-fullscreen"))
4730
4739
  }, [
4731
- n.isFullscreen ? (k(), v("svg", Ki, [...t[9] || (t[9] = [
4740
+ n.isFullscreen ? (k(), v("svg", Gi, [...t[9] || (t[9] = [
4732
4741
  p("path", {
4733
4742
  "stroke-linecap": "round",
4734
4743
  "stroke-linejoin": "round",
4735
4744
  d: "M9 9V4.5M9 9H4.5M9 9L3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5l5.25 5.25"
4736
4745
  }, null, -1)
4737
- ])])) : (k(), v("svg", Gi, [...t[8] || (t[8] = [
4746
+ ])])) : (k(), v("svg", Vi, [...t[8] || (t[8] = [
4738
4747
  p("path", {
4739
4748
  "stroke-linecap": "round",
4740
4749
  "stroke-linejoin": "round",
4741
4750
  d: "M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"
4742
4751
  }, null, -1)
4743
4752
  ])]))
4744
- ], 10, Vi)) : B("", !0)
4753
+ ], 10, Ki)) : B("", !0)
4745
4754
  ], 2)
4746
4755
  ], 2);
4747
4756
  };
@@ -4856,7 +4865,7 @@ const Do = /* @__PURE__ */ he({
4856
4865
  emits: ["copy"],
4857
4866
  setup(n) {
4858
4867
  return (e, t) => (k(), v(we, null, [
4859
- t[4] || (t[4] = On('<div class="w-14 h-14 rounded-2xl bg-primary/10 flex items-center justify-center mb-5"><svg class="w-7 h-7 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09Z"></path></svg></div><h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-1"> Almost there! </h2><p class="text-sm text-gray-500 dark:text-gray-400 mb-6 max-w-sm text-center"> Configure the plugin in your app entry file to start using AI. </p>', 3)),
4868
+ t[4] || (t[4] = Nn('<div class="w-14 h-14 rounded-2xl bg-primary/10 flex items-center justify-center mb-5"><svg class="w-7 h-7 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09Z"></path></svg></div><h2 class="text-lg font-semibold text-gray-900 dark:text-white mb-1"> Almost there! </h2><p class="text-sm text-gray-500 dark:text-gray-400 mb-6 max-w-sm text-center"> Configure the plugin in your app entry file to start using AI. </p>', 3)),
4860
4869
  p("div", na, [
4861
4870
  p("div", sa, [
4862
4871
  p("div", ra, [
@@ -4867,7 +4876,7 @@ const Do = /* @__PURE__ */ he({
4867
4876
  onClick: t[0] || (t[0] = (s) => e.$emit("copy"))
4868
4877
  }, N(n.copied ? "✓ Copied" : "Copy"), 1)
4869
4878
  ]),
4870
- t[2] || (t[2] = On(`<pre class="text-xs text-gray-100 p-4 overflow-x-auto leading-relaxed"><code class="language-typescript"><span class="text-purple-400">import</span> { RestifyAiPlugin } <span class="text-purple-400">from</span> <span class="text-green-400">&#39;@doderasoftware/restify-ai&#39;</span>
4879
+ t[2] || (t[2] = Nn(`<pre class="text-xs text-gray-100 p-4 overflow-x-auto leading-relaxed"><code class="language-typescript"><span class="text-purple-400">import</span> { RestifyAiPlugin } <span class="text-purple-400">from</span> <span class="text-green-400">&#39;@doderasoftware/restify-ai&#39;</span>
4871
4880
 
4872
4881
  app.<span class="text-yellow-300">use</span>(RestifyAiPlugin, {
4873
4882
  <span class="text-blue-300">endpoints</span>: {
@@ -4897,7 +4906,7 @@ app.<span class="text-yellow-300">use</span>(RestifyAiPlugin, {
4897
4906
  }, la = { class: "text-lg font-semibold text-gray-900 dark:text-white" }, ua = {
4898
4907
  key: 1,
4899
4908
  class: "text-lg font-semibold text-gray-900 dark:text-white mb-2"
4900
- }, ca = { class: "text-sm text-gray-600 dark:text-gray-400 mb-6" }, da = { class: "flex justify-end gap-3" }, ns = /* @__PURE__ */ he({
4909
+ }, ca = { class: "text-sm text-gray-600 dark:text-gray-400 mb-6" }, da = { class: "flex justify-end gap-3" }, ss = /* @__PURE__ */ he({
4901
4910
  __name: "ConfirmDialog",
4902
4911
  props: {
4903
4912
  show: { type: Boolean },
@@ -5007,24 +5016,24 @@ app.<span class="text-yellow-300">use</span>(RestifyAiPlugin, {
5007
5016
  get: () => t.modelValue,
5008
5017
  set: (_) => s("update:modelValue", _)
5009
5018
  });
5010
- function o(_, V) {
5019
+ function o(_, K) {
5011
5020
  var te;
5012
- const K = (te = t.texts) == null ? void 0 : te[_];
5013
- if (K) {
5014
- let X = K;
5015
- if (V)
5016
- for (const [J, ue] of Object.entries(V))
5021
+ const G = (te = t.texts) == null ? void 0 : te[_];
5022
+ if (G) {
5023
+ let X = G;
5024
+ if (K)
5025
+ for (const [J, ue] of Object.entries(K))
5017
5026
  X = X.replace(`{${J}}`, String(ue));
5018
5027
  return X;
5019
5028
  }
5020
- return le(_, V);
5029
+ return le(_, K);
5021
5030
  }
5022
- const i = nt(), a = q(""), c = q(null), u = q(!1), d = q(!1), m = q(!1), { loadingMessage: w, startLoadingText: y, resetLoadingText: h } = Eo(
5031
+ const i = We(), a = q(""), c = q(null), u = q(!1), d = q(!1), g = q(!1), { loadingMessage: w, startLoadingText: y, resetLoadingText: h } = Eo(
5023
5032
  () => i.sending,
5024
5033
  () => t.loadingText
5025
5034
  ), {
5026
5035
  showHistoryLimitWarning: A,
5027
- historyLimitReached: g,
5036
+ historyLimitReached: m,
5028
5037
  historyLimitDialogTitle: f,
5029
5038
  historyLimitDialogMessage: S,
5030
5039
  dismissHistoryLimitWarning: C,
@@ -5038,18 +5047,18 @@ app.<span class="text-yellow-300">use</span>(RestifyAiPlugin, {
5038
5047
  getTexts: () => t.texts,
5039
5048
  onStartNewChat: () => i.clearChatHistory(),
5040
5049
  onNewChatEmit: () => s("new-chat")
5041
- }), G = O(() => !os()), E = O(() => et("enableSupportMode") ?? !1), { suggestions: M, resolvePrompt: I } = Ms(), P = O(() => {
5042
- if (G.value) return [];
5043
- const _ = a.value.toLowerCase().trim(), V = M.value || [];
5044
- let K = V;
5050
+ }), V = O(() => !os()), E = O(() => tt("enableSupportMode") ?? !1), { suggestions: M, resolvePrompt: I } = Ms(), P = O(() => {
5051
+ if (V.value) return [];
5052
+ const _ = a.value.toLowerCase().trim(), K = M.value || [];
5053
+ let G = K;
5045
5054
  if (_) {
5046
5055
  const te = /* @__PURE__ */ new Set(["a", "an", "the", "and", "or", "but", "in", "on", "at", "to", "for", "of", "with", "by"]), X = _.split(/\s+/).filter((J) => !te.has(J));
5047
- X.length > 0 && (K = V.filter((J) => {
5056
+ X.length > 0 && (G = K.filter((J) => {
5048
5057
  const ue = `${J.title} ${J.description || ""}`.toLowerCase();
5049
5058
  return X.every((Se) => ue.includes(Se));
5050
5059
  }));
5051
5060
  }
5052
- return K.slice(0, 5).map((te) => ({
5061
+ return G.slice(0, 5).map((te) => ({
5053
5062
  id: te.id,
5054
5063
  title: te.title,
5055
5064
  description: te.description || ""
@@ -5070,8 +5079,8 @@ app.<span class="text-yellow-300">use</span>(RestifyAiPlugin, {
5070
5079
  onCancel: () => i.cancelRequest()
5071
5080
  }));
5072
5081
  function Te(_) {
5073
- const V = (M.value || []).find((K) => K.id === _.id);
5074
- V && (a.value = I(V));
5082
+ const K = (M.value || []).find((G) => G.id === _.id);
5083
+ K && (a.value = I(K));
5075
5084
  }
5076
5085
  function ze() {
5077
5086
  u.value = !u.value;
@@ -5080,10 +5089,10 @@ app.<span class="text-yellow-300">use</span>(RestifyAiPlugin, {
5080
5089
  r.value = !1;
5081
5090
  }
5082
5091
  function He() {
5083
- t.confirmClose && !G.value && i.chatHistory.length > 0 ? m.value = !0 : (r.value = !1, s("close"));
5092
+ t.confirmClose && !V.value && i.chatHistory.length > 0 ? g.value = !0 : (r.value = !1, s("close"));
5084
5093
  }
5085
5094
  function bt() {
5086
- m.value = !1, i.clearChatHistory(), r.value = !1, s("close");
5095
+ g.value = !1, i.clearChatHistory(), r.value = !1, s("close");
5087
5096
  }
5088
5097
  function Bt() {
5089
5098
  s("contact-support");
@@ -5121,13 +5130,13 @@ app.use(RestifyAiPlugin, {
5121
5130
  const _ = await b();
5122
5131
  _ && (await Oe(), await Ve(_.message, _.attachments, _.mentions, _.isSupportRequest));
5123
5132
  }
5124
- async function Ve(_, V, K, te) {
5133
+ async function Ve(_, K, G, te) {
5125
5134
  i.clearError(), y(), await Oe(), Y();
5126
- const X = await i.askQuestion(_, V, K, te);
5135
+ const X = await i.askQuestion(_, K, G, te);
5127
5136
  h(), X && Y();
5128
5137
  }
5129
5138
  async function Le(_) {
5130
- const { message: V, attachments: K, mentions: te, isSupportRequest: X } = _;
5139
+ const { message: K, attachments: G, mentions: te, isSupportRequest: X } = _;
5131
5140
  if (i.sending) return;
5132
5141
  const J = te.map((ue) => ({
5133
5142
  id: ue.id,
@@ -5136,10 +5145,10 @@ app.use(RestifyAiPlugin, {
5136
5145
  metadata: ue.metadata
5137
5146
  }));
5138
5147
  if (!z()) {
5139
- F({ message: V, attachments: K, mentions: J, isSupportRequest: X });
5148
+ F({ message: K, attachments: G, mentions: J, isSupportRequest: X });
5140
5149
  return;
5141
5150
  }
5142
- await Ve(V, K, J, X);
5151
+ await Ve(K, G, J, X);
5143
5152
  }
5144
5153
  async function St() {
5145
5154
  y();
@@ -5147,7 +5156,7 @@ app.use(RestifyAiPlugin, {
5147
5156
  h(), _ && Y();
5148
5157
  }
5149
5158
  function Ge(_) {
5150
- t.closeOnEscape && _.key === "Escape" && r.value && (m.value ? m.value = !1 : Re());
5159
+ t.closeOnEscape && _.key === "Escape" && r.value && (g.value ? g.value = !1 : Re());
5151
5160
  }
5152
5161
  return Ue(() => t.modelValue, (_) => {
5153
5162
  _ && t.autoFetchQuota && i.fetchQuota();
@@ -5155,15 +5164,15 @@ app.use(RestifyAiPlugin, {
5155
5164
  window.addEventListener("keydown", Ge);
5156
5165
  }), yt(() => {
5157
5166
  window.removeEventListener("keydown", Ge);
5158
- }), (_, V) => (k(), Me(Ws, { to: "body" }, [
5167
+ }), (_, K) => (k(), Me(Ws, { to: "body" }, [
5159
5168
  ge(mt, { name: "rai-fade" }, {
5160
5169
  default: Ce(() => {
5161
- var K;
5170
+ var G;
5162
5171
  return [
5163
5172
  r.value && n.showBackdrop ? (k(), v("div", {
5164
5173
  key: 0,
5165
- class: T(["fixed inset-0 bg-black/30 z-40", (K = n.ui) == null ? void 0 : K.backdrop]),
5166
- onClick: V[0] || (V[0] = (te) => n.closeOnBackdropClick && Re())
5174
+ class: T(["fixed inset-0 bg-black/30 z-40", (G = n.ui) == null ? void 0 : G.backdrop]),
5175
+ onClick: K[0] || (K[0] = (te) => n.closeOnBackdropClick && Re())
5167
5176
  }, null, 2)) : B("", !0)
5168
5177
  ];
5169
5178
  }),
@@ -5173,23 +5182,23 @@ app.use(RestifyAiPlugin, {
5173
5182
  name: n.position === "left" ? "rai-slide-right" : "rai-slide-left"
5174
5183
  }, {
5175
5184
  default: Ce(() => {
5176
- var K, te, X;
5185
+ var G, te, X;
5177
5186
  return [
5178
5187
  r.value ? (k(), v("aside", {
5179
5188
  key: 0,
5180
5189
  class: T(["fixed bottom-0 z-50 flex-shrink-0 border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 shadow-2xl will-change-transform", [
5181
5190
  n.position === "left" ? "left-0 border-r" : "right-0 border-l",
5182
- (K = n.ui) == null ? void 0 : K.drawer
5191
+ (G = n.ui) == null ? void 0 : G.drawer
5183
5192
  ]]),
5184
- style: ss({ width: u.value ? n.fullscreenWidth : n.width, top: n.topOffset, height: `calc(100vh - ${n.topOffset})` })
5193
+ style: un({ width: u.value ? n.fullscreenWidth : n.width, top: n.topOffset, height: `calc(100vh - ${n.topOffset})` })
5185
5194
  }, [
5186
5195
  p("div", {
5187
5196
  class: T(["h-full flex flex-col relative bg-white dark:bg-gray-900", (te = n.ui) == null ? void 0 : te.panel])
5188
5197
  }, [
5189
- me(_.$slots, "header", Nn(Pn(L.value)), () => [
5198
+ me(_.$slots, "header", Pn(zn(L.value)), () => [
5190
5199
  ge(Qi, {
5191
5200
  ui: n.ui,
5192
- "is-setup-mode": G.value,
5201
+ "is-setup-mode": V.value,
5193
5202
  "show-new-chat-button": n.showNewChatButton,
5194
5203
  "has-history": D(i).chatHistory.length > 0,
5195
5204
  "show-quota": n.showQuota,
@@ -5215,7 +5224,7 @@ app.use(RestifyAiPlugin, {
5215
5224
  p("div", {
5216
5225
  class: T(["h-full flex flex-col mx-auto w-full overflow-hidden", [{ "max-w-5xl": u.value }, (X = n.ui) == null ? void 0 : X.body]])
5217
5226
  }, [
5218
- G.value ? (k(), v("div", pa, [
5227
+ V.value ? (k(), v("div", pa, [
5219
5228
  me(_.$slots, "setup", {}, () => [
5220
5229
  ge(oa, {
5221
5230
  copied: d.value,
@@ -5258,16 +5267,16 @@ app.use(RestifyAiPlugin, {
5258
5267
  _: 3
5259
5268
  }, 8, ["messages", "loading-message", "quota", "error", "ui"])
5260
5269
  ], 512)),
5261
- V[3] || (V[3] = p("div", {
5270
+ K[3] || (K[3] = p("div", {
5262
5271
  id: "rai-chat-bottom",
5263
5272
  class: "h-8"
5264
5273
  }, null, -1)),
5265
- me(_.$slots, "input", Nn(Pn(ne.value)), () => {
5274
+ me(_.$slots, "input", Pn(zn(ne.value)), () => {
5266
5275
  var J, ue;
5267
5276
  return [
5268
5277
  ge(Pi, {
5269
5278
  modelValue: a.value,
5270
- "onUpdate:modelValue": V[1] || (V[1] = (Se) => a.value = Se),
5279
+ "onUpdate:modelValue": K[1] || (K[1] = (Se) => a.value = Se),
5271
5280
  sending: D(i).sending,
5272
5281
  placeholder: ((J = t.texts) == null ? void 0 : J.placeholder) || D(le)("inputPlaceholder"),
5273
5282
  "support-placeholder": ((ue = t.texts) == null ? void 0 : ue.supportPlaceholder) || D(le)("supportPlaceholder"),
@@ -5290,8 +5299,8 @@ app.use(RestifyAiPlugin, {
5290
5299
  ], 64))
5291
5300
  ], 2)
5292
5301
  ], 2),
5293
- ge(ns, {
5294
- show: m.value,
5302
+ ge(ss, {
5303
+ show: g.value,
5295
5304
  title: o("closeConfirmTitle"),
5296
5305
  message: o("closeConfirmMessage"),
5297
5306
  "confirm-text": o("confirmClose"),
@@ -5299,14 +5308,14 @@ app.use(RestifyAiPlugin, {
5299
5308
  ui: n.ui,
5300
5309
  "confirm-variant": "danger",
5301
5310
  onConfirm: bt,
5302
- onCancel: V[2] || (V[2] = (J) => m.value = !1)
5311
+ onCancel: K[2] || (K[2] = (J) => g.value = !1)
5303
5312
  }, null, 8, ["show", "title", "message", "confirm-text", "cancel-text", "ui"]),
5304
- ge(ns, {
5313
+ ge(ss, {
5305
5314
  show: D(A),
5306
5315
  title: D(f),
5307
5316
  message: D(S),
5308
5317
  "confirm-text": o("startNewChat"),
5309
- "cancel-text": D(g) ? o("continueChat") : o("cancel"),
5318
+ "cancel-text": D(m) ? o("continueChat") : o("cancel"),
5310
5319
  ui: n.ui,
5311
5320
  icon: "warning",
5312
5321
  "confirm-variant": "primary",
@@ -5386,7 +5395,7 @@ app.use(RestifyAiPlugin, {
5386
5395
  onFileUploadComplete: e.onFileUploadComplete,
5387
5396
  onFileUploadError: e.onFileUploadError
5388
5397
  };
5389
- Ks(t), n.provide("restify-ai-config", t);
5398
+ Gs(t), n.provide("restify-ai-config", t);
5390
5399
  }
5391
5400
  };
5392
5401
  export {
@@ -5396,14 +5405,14 @@ export {
5396
5405
  Pi as ChatInput,
5397
5406
  oi as ChatMessage,
5398
5407
  zo as ChatMessageActions,
5399
- tt as ChatRoles,
5408
+ nt as ChatRoles,
5400
5409
  Oo as MentionList,
5401
5410
  Ea as RestifyAiPlugin,
5402
5411
  Aa as UserAvatar,
5403
5412
  Ea as default,
5404
5413
  rs as defaultLabels,
5405
5414
  gr as formatMentionsForApi,
5406
- et as getConfigValue,
5415
+ tt as getConfigValue,
5407
5416
  le as getLabel,
5408
5417
  ee as getRestifyAiConfig,
5409
5418
  xa as getRestifyAiConfigOrThrow,
@@ -5411,7 +5420,7 @@ export {
5411
5420
  mr as groupMentionsByType,
5412
5421
  os as isConfigured,
5413
5422
  va as registerSuggestionProvider,
5414
- Ks as setRestifyAiConfig,
5423
+ Gs as setRestifyAiConfig,
5415
5424
  Cs as useAiContext,
5416
5425
  Sa as useAiDrawerShortcut,
5417
5426
  Ms as useAiSuggestions,
@@ -5421,5 +5430,5 @@ export {
5421
5430
  Co as useKeyboardShortcut,
5422
5431
  ka as useMentionParsing,
5423
5432
  Ta as usePageAiContext,
5424
- nt as useRestifyAiStore
5433
+ We as useRestifyAiStore
5425
5434
  };