@arbor-education/ask-arbor-chat-panel 1.0.2 → 1.1.0

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.
package/dist/index.js CHANGED
@@ -1,11 +1,14 @@
1
+ var Sr = Object.defineProperty;
2
+ var wr = (e, t, r) => t in e ? Sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var Ln = (e, t, r) => wr(e, typeof t != "symbol" ? t + "" : t, r);
1
4
  import { jsxs as S, jsx as i, Fragment as we } from "react/jsx-runtime";
2
- import { Icon as vt, Tag as Tr, Tabs as nn, Table as Er } from "@arbor-education/design-system.components";
3
- import { useRef as x, useMemo as Qn, useEffect as V, useState as M, useContext as Ar, createContext as Sr, forwardRef as Tn, createElement as pn, useImperativeHandle as wr, useLayoutEffect as er, useCallback as Wt } from "react";
4
- import { createPortal as Nr } from "react-dom";
5
- function kr(e) {
5
+ import { Icon as vt, Tag as Nr, Tabs as nn, Table as kr, Slideover as Rr } from "@arbor-education/design-system.components";
6
+ import { useRef as x, useMemo as tr, useEffect as V, useState as M, useContext as Ir, createContext as Cr, forwardRef as Tn, createElement as pn, useImperativeHandle as vr, useLayoutEffect as nr, useCallback as Wt } from "react";
7
+ import { createPortal as rr } from "react-dom";
8
+ function Or(e) {
6
9
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
10
  }
8
- var tr = { exports: {} };
11
+ var or = { exports: {} };
9
12
  /*!
10
13
  Copyright (c) 2018 Jed Watson.
11
14
  Licensed under the MIT License (MIT), see
@@ -13,7 +16,7 @@ var tr = { exports: {} };
13
16
  */
14
17
  (function(e) {
15
18
  (function() {
16
- var n = {}.hasOwnProperty;
19
+ var t = {}.hasOwnProperty;
17
20
  function r() {
18
21
  for (var s = "", u = 0; u < arguments.length; u++) {
19
22
  var m = arguments[u];
@@ -32,7 +35,7 @@ var tr = { exports: {} };
32
35
  return s.toString();
33
36
  var u = "";
34
37
  for (var m in s)
35
- n.call(s, m) && s[m] && (u = l(u, m));
38
+ t.call(s, m) && s[m] && (u = l(u, m));
36
39
  return u;
37
40
  }
38
41
  function l(s, u) {
@@ -40,16 +43,16 @@ var tr = { exports: {} };
40
43
  }
41
44
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
42
45
  })();
43
- })(tr);
44
- var Rr = tr.exports;
45
- const _e = /* @__PURE__ */ kr(Rr);
46
- function Ir(e, n, r, a) {
46
+ })(or);
47
+ var Lr = or.exports;
48
+ const _e = /* @__PURE__ */ Or(Lr);
49
+ function Dr(e, t, r, a) {
47
50
  var l = this, s = x(null), u = x(0), m = x(0), h = x(null), p = x([]), T = x(), A = x(), _ = x(e), E = x(!0), k = x(), O = x();
48
51
  _.current = e;
49
- var w = typeof window < "u", N = !n && n !== 0 && w;
52
+ var w = typeof window < "u", N = !t && t !== 0 && w;
50
53
  if (typeof e != "function") throw new TypeError("Expected a function");
51
- n = +n || 0;
52
- var H = !!(r = r || {}).leading, pe = !("trailing" in r) || !!r.trailing, z = !!r.flushOnExit && pe, K = "maxWait" in r, U = "debounceOnServer" in r && !!r.debounceOnServer, q = K ? Math.max(+r.maxWait || 0, n) : null, me = Qn(function() {
54
+ t = +t || 0;
55
+ var H = !!(r = r || {}).leading, pe = !("trailing" in r) || !!r.trailing, z = !!r.flushOnExit && pe, K = "maxWait" in r, U = "debounceOnServer" in r && !!r.debounceOnServer, q = K ? Math.max(+r.maxWait || 0, t) : null, me = tr(function() {
53
56
  var J = function(D) {
54
57
  var W = p.current, he = T.current;
55
58
  return p.current = T.current = null, u.current = D, m.current = m.current || D, A.current = _.current.apply(he, W);
@@ -58,14 +61,14 @@ function Ir(e, n, r, a) {
58
61
  }, de = function(D) {
59
62
  if (!E.current) return !1;
60
63
  var W = D - s.current;
61
- return !s.current || W >= n || W < 0 || K && D - u.current >= q;
64
+ return !s.current || W >= t || W < 0 || K && D - u.current >= q;
62
65
  }, b = function(D) {
63
66
  return h.current = null, pe && p.current ? J(D) : (p.current = T.current = null, A.current);
64
67
  }, L = function D() {
65
68
  var W = Date.now();
66
69
  if (H && m.current === u.current && B(), de(W)) return b(W);
67
70
  if (E.current) {
68
- var he = n - (W - s.current), Le = K ? Math.min(he, q - (W - u.current)) : he;
71
+ var he = t - (W - s.current), Le = K ? Math.min(he, q - (W - u.current)) : he;
69
72
  G(D, Le);
70
73
  }
71
74
  }, B = function() {
@@ -76,10 +79,10 @@ function Ir(e, n, r, a) {
76
79
  var Le;
77
80
  ((Le = globalThis.document) == null ? void 0 : Le.visibilityState) === "hidden" && O.current.flush();
78
81
  }, (D = globalThis.document) == null || D.addEventListener == null || D.addEventListener("visibilitychange", k.current)), he) {
79
- if (!h.current && E.current) return u.current = s.current, G(L, n), H ? J(s.current) : A.current;
80
- if (K) return G(L, n), J(s.current);
82
+ if (!h.current && E.current) return u.current = s.current, G(L, t), H ? J(s.current) : A.current;
83
+ if (K) return G(L, t), J(s.current);
81
84
  }
82
- return h.current || G(L, n), A.current;
85
+ return h.current || G(L, t), A.current;
83
86
  }
84
87
  };
85
88
  return re.cancel = function() {
@@ -90,7 +93,7 @@ function Ir(e, n, r, a) {
90
93
  }, re.flush = function() {
91
94
  return h.current ? b(Date.now()) : A.current;
92
95
  }, re;
93
- }, [H, K, n, q, pe, z, N, w, U, a]);
96
+ }, [H, K, t, q, pe, z, N, w, U, a]);
94
97
  return O.current = me, V(function() {
95
98
  return E.current = !0, function() {
96
99
  var J;
@@ -98,7 +101,7 @@ function Ir(e, n, r, a) {
98
101
  };
99
102
  }, [z]), me;
100
103
  }
101
- const Cr = () => /* @__PURE__ */ S(
104
+ const Mr = () => /* @__PURE__ */ S(
102
105
  "svg",
103
106
  {
104
107
  width: "32",
@@ -131,13 +134,13 @@ const Cr = () => /* @__PURE__ */ S(
131
134
  )
132
135
  ]
133
136
  }
134
- ), vr = "Enter", Or = " ", Ln = ({
137
+ ), xr = "Enter", Pr = " ", Dn = ({
135
138
  category: e,
136
- isExpanded: n,
139
+ isExpanded: t,
137
140
  onHeaderClick: r
138
141
  }) => {
139
142
  const a = `ask-arbor-prompt-library__body-${e.id}`, l = (s) => {
140
- (s.key === vr || s.key === Or) && (s.preventDefault(), r(e.id));
143
+ (s.key === xr || s.key === Pr) && (s.preventDefault(), r(e.id));
141
144
  };
142
145
  return /* @__PURE__ */ i(
143
146
  "div",
@@ -146,7 +149,7 @@ const Cr = () => /* @__PURE__ */ S(
146
149
  "ask-arbor-prompt-library__category",
147
150
  `ask-arbor-prompt-library__category--${e.theme}`,
148
151
  {
149
- "ask-arbor-prompt-library__category--expanded": n
152
+ "ask-arbor-prompt-library__category--expanded": t
150
153
  }
151
154
  ),
152
155
  children: /* @__PURE__ */ S(
@@ -157,9 +160,9 @@ const Cr = () => /* @__PURE__ */ S(
157
160
  onKeyDown: l,
158
161
  role: "button",
159
162
  tabIndex: 0,
160
- "aria-expanded": n,
163
+ "aria-expanded": t,
161
164
  "aria-controls": a,
162
- "aria-label": `${e.title}, ${n ? "collapse" : "expand"} to ${n ? "hide" : "show"} prompts`,
165
+ "aria-label": `${e.title}, ${t ? "collapse" : "expand"} to ${t ? "hide" : "show"} prompts`,
163
166
  children: [
164
167
  /* @__PURE__ */ i("div", { className: "ask-arbor-prompt-library__icon-circle", children: /* @__PURE__ */ i(
165
168
  vt,
@@ -173,9 +176,9 @@ const Cr = () => /* @__PURE__ */ S(
173
176
  /* @__PURE__ */ i(
174
177
  vt,
175
178
  {
176
- name: n ? "chevron-up" : "chevron-down",
179
+ name: t ? "chevron-up" : "chevron-down",
177
180
  size: 16,
178
- screenReaderText: n ? "Collapse section" : "Expand section",
181
+ screenReaderText: t ? "Collapse section" : "Expand section",
179
182
  className: "ask-arbor-prompt-library__chevron"
180
183
  }
181
184
  ),
@@ -185,9 +188,9 @@ const Cr = () => /* @__PURE__ */ S(
185
188
  )
186
189
  }
187
190
  );
188
- }, Lr = ({
191
+ }, Ur = ({
189
192
  onSelectPrompt: e,
190
- onPromptHover: n,
193
+ onPromptHover: t,
191
194
  categories: r
192
195
  }) => {
193
196
  const [a, l] = M(
@@ -204,7 +207,7 @@ const Cr = () => /* @__PURE__ */ S(
204
207
  className: "ask-arbor-prompt-library__grid-item ask-arbor-prompt-library__grid-item--full-width",
205
208
  children: /* @__PURE__ */ S("div", { className: "ask-arbor-prompt-library__expanded-block", children: [
206
209
  /* @__PURE__ */ i(
207
- Ln,
210
+ Dn,
208
211
  {
209
212
  category: _,
210
213
  isExpanded: !0,
@@ -223,15 +226,15 @@ const Cr = () => /* @__PURE__ */ S(
223
226
  {
224
227
  className: "ask-arbor-prompt-library__prompt-group",
225
228
  children: [
226
- /* @__PURE__ */ i(Tr, { color: _.theme, children: E.tag }),
229
+ /* @__PURE__ */ i(Nr, { color: _.theme, children: E.tag }),
227
230
  /* @__PURE__ */ i("div", { className: "ask-arbor-prompt-library__prompts", children: E.prompts.map((k, O) => /* @__PURE__ */ S(
228
231
  "button",
229
232
  {
230
233
  type: "button",
231
234
  className: "ask-arbor-prompt-library__prompt-row",
232
235
  onClick: (w) => u(w, k),
233
- onMouseEnter: () => n == null ? void 0 : n(k),
234
- onMouseLeave: () => n == null ? void 0 : n(null),
236
+ onMouseEnter: () => t == null ? void 0 : t(k),
237
+ onMouseLeave: () => t == null ? void 0 : t(null),
235
238
  children: [
236
239
  /* @__PURE__ */ i("span", { className: "ask-arbor-prompt-library__prompt-text", children: k }),
237
240
  /* @__PURE__ */ i(
@@ -256,7 +259,7 @@ const Cr = () => /* @__PURE__ */ S(
256
259
  },
257
260
  _.id
258
261
  ), T = (_) => /* @__PURE__ */ i("div", { className: "ask-arbor-prompt-library__grid-item", children: /* @__PURE__ */ i(
259
- Ln,
262
+ Dn,
260
263
  {
261
264
  category: _,
262
265
  isExpanded: !1,
@@ -282,23 +285,23 @@ const Cr = () => /* @__PURE__ */ S(
282
285
  * This source code is licensed under the ISC license.
283
286
  * See the LICENSE file in the root directory of this source tree.
284
287
  */
285
- const nr = (...e) => e.filter((n, r, a) => !!n && n.trim() !== "" && a.indexOf(n) === r).join(" ").trim();
288
+ const ar = (...e) => e.filter((t, r, a) => !!t && t.trim() !== "" && a.indexOf(t) === r).join(" ").trim();
286
289
  /**
287
290
  * @license lucide-react v1.21.0 - ISC
288
291
  *
289
292
  * This source code is licensed under the ISC license.
290
293
  * See the LICENSE file in the root directory of this source tree.
291
294
  */
292
- const Dr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
295
+ const Fr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
293
296
  /**
294
297
  * @license lucide-react v1.21.0 - ISC
295
298
  *
296
299
  * This source code is licensed under the ISC license.
297
300
  * See the LICENSE file in the root directory of this source tree.
298
301
  */
299
- const Mr = (e) => e.replace(
302
+ const Hr = (e) => e.replace(
300
303
  /^([A-Z])|[\s-_]+(\w)/g,
301
- (n, r, a) => a ? a.toUpperCase() : r.toLowerCase()
304
+ (t, r, a) => a ? a.toUpperCase() : r.toLowerCase()
302
305
  );
303
306
  /**
304
307
  * @license lucide-react v1.21.0 - ISC
@@ -306,9 +309,9 @@ const Mr = (e) => e.replace(
306
309
  * This source code is licensed under the ISC license.
307
310
  * See the LICENSE file in the root directory of this source tree.
308
311
  */
309
- const Dn = (e) => {
310
- const n = Mr(e);
311
- return n.charAt(0).toUpperCase() + n.slice(1);
312
+ const Mn = (e) => {
313
+ const t = Hr(e);
314
+ return t.charAt(0).toUpperCase() + t.slice(1);
312
315
  };
313
316
  /**
314
317
  * @license lucide-react v1.21.0 - ISC
@@ -333,31 +336,31 @@ var rn = {
333
336
  * This source code is licensed under the ISC license.
334
337
  * See the LICENSE file in the root directory of this source tree.
335
338
  */
336
- const xr = (e) => {
337
- for (const n in e)
338
- if (n.startsWith("aria-") || n === "role" || n === "title")
339
+ const zr = (e) => {
340
+ for (const t in e)
341
+ if (t.startsWith("aria-") || t === "role" || t === "title")
339
342
  return !0;
340
343
  return !1;
341
- }, Pr = Sr({}), Ur = () => Ar(Pr), Fr = Tn(
342
- ({ color: e, size: n, strokeWidth: r, absoluteStrokeWidth: a, className: l = "", children: s, iconNode: u, ...m }, h) => {
344
+ }, Gr = Cr({}), Br = () => Ir(Gr), Wr = Tn(
345
+ ({ color: e, size: t, strokeWidth: r, absoluteStrokeWidth: a, className: l = "", children: s, iconNode: u, ...m }, h) => {
343
346
  const {
344
347
  size: p = 24,
345
348
  strokeWidth: T = 2,
346
349
  absoluteStrokeWidth: A = !1,
347
350
  color: _ = "currentColor",
348
351
  className: E = ""
349
- } = Ur() ?? {}, k = a ?? A ? Number(r ?? T) * 24 / Number(n ?? p) : r ?? T;
352
+ } = Br() ?? {}, k = a ?? A ? Number(r ?? T) * 24 / Number(t ?? p) : r ?? T;
350
353
  return pn(
351
354
  "svg",
352
355
  {
353
356
  ref: h,
354
357
  ...rn,
355
- width: n ?? p ?? rn.width,
356
- height: n ?? p ?? rn.height,
358
+ width: t ?? p ?? rn.width,
359
+ height: t ?? p ?? rn.height,
357
360
  stroke: e ?? _,
358
361
  strokeWidth: k,
359
- className: nr("lucide", E, l),
360
- ...!s && !xr(m) && { "aria-hidden": "true" },
362
+ className: ar("lucide", E, l),
363
+ ...!s && !zr(m) && { "aria-hidden": "true" },
361
364
  ...m
362
365
  },
363
366
  [
@@ -373,20 +376,20 @@ const xr = (e) => {
373
376
  * This source code is licensed under the ISC license.
374
377
  * See the LICENSE file in the root directory of this source tree.
375
378
  */
376
- const Oe = (e, n) => {
379
+ const Oe = (e, t) => {
377
380
  const r = Tn(
378
- ({ className: a, ...l }, s) => pn(Fr, {
381
+ ({ className: a, ...l }, s) => pn(Wr, {
379
382
  ref: s,
380
- iconNode: n,
381
- className: nr(
382
- `lucide-${Dr(Dn(e))}`,
383
+ iconNode: t,
384
+ className: ar(
385
+ `lucide-${Fr(Mn(e))}`,
383
386
  `lucide-${e}`,
384
387
  a
385
388
  ),
386
389
  ...l
387
390
  })
388
391
  );
389
- return r.displayName = Dn(e), r;
392
+ return r.displayName = Mn(e), r;
390
393
  };
391
394
  /**
392
395
  * @license lucide-react v1.21.0 - ISC
@@ -394,76 +397,76 @@ const Oe = (e, n) => {
394
397
  * This source code is licensed under the ISC license.
395
398
  * See the LICENSE file in the root directory of this source tree.
396
399
  */
397
- const Hr = [
400
+ const $r = [
398
401
  ["path", { d: "M5 12h14", key: "1ays0h" }],
399
402
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
400
- ], zr = Oe("arrow-right", Hr);
403
+ ], Yr = Oe("arrow-right", $r);
401
404
  /**
402
405
  * @license lucide-react v1.21.0 - ISC
403
406
  *
404
407
  * This source code is licensed under the ISC license.
405
408
  * See the LICENSE file in the root directory of this source tree.
406
409
  */
407
- const Gr = [
410
+ const jr = [
408
411
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
409
412
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
410
413
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
411
- ], Br = Oe("circle-alert", Gr);
414
+ ], Kr = Oe("circle-alert", jr);
412
415
  /**
413
416
  * @license lucide-react v1.21.0 - ISC
414
417
  *
415
418
  * This source code is licensed under the ISC license.
416
419
  * See the LICENSE file in the root directory of this source tree.
417
420
  */
418
- const Wr = [
421
+ const Vr = [
419
422
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
420
423
  ["path", { d: "M16 16s-1.5-2-4-2-4 2-4 2", key: "epbg0q" }],
421
424
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
422
425
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
423
- ], $r = Oe("frown", Wr);
426
+ ], qr = Oe("frown", Vr);
424
427
  /**
425
428
  * @license lucide-react v1.21.0 - ISC
426
429
  *
427
430
  * This source code is licensed under the ISC license.
428
431
  * See the LICENSE file in the root directory of this source tree.
429
432
  */
430
- const Yr = [
433
+ const Xr = [
431
434
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
432
435
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
433
436
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
434
- ], jr = Oe("info", Yr);
437
+ ], Zr = Oe("info", Xr);
435
438
  /**
436
439
  * @license lucide-react v1.21.0 - ISC
437
440
  *
438
441
  * This source code is licensed under the ISC license.
439
442
  * See the LICENSE file in the root directory of this source tree.
440
443
  */
441
- const Kr = [
444
+ const Jr = [
442
445
  ["path", { d: "M12 19v3", key: "npa21l" }],
443
446
  ["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
444
447
  ["path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2", key: "cqa7eg" }],
445
448
  ["path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2", key: "16hl24" }],
446
449
  ["path", { d: "m2 2 20 20", key: "1ooewy" }],
447
450
  ["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12", key: "r2i35w" }]
448
- ], Vr = Oe("mic-off", Kr);
451
+ ], Qr = Oe("mic-off", Jr);
449
452
  /**
450
453
  * @license lucide-react v1.21.0 - ISC
451
454
  *
452
455
  * This source code is licensed under the ISC license.
453
456
  * See the LICENSE file in the root directory of this source tree.
454
457
  */
455
- const qr = [
458
+ const eo = [
456
459
  ["path", { d: "M12 19v3", key: "npa21l" }],
457
460
  ["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
458
461
  ["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
459
- ], Xr = Oe("mic", qr);
462
+ ], to = Oe("mic", eo);
460
463
  /**
461
464
  * @license lucide-react v1.21.0 - ISC
462
465
  *
463
466
  * This source code is licensed under the ISC license.
464
467
  * See the LICENSE file in the root directory of this source tree.
465
468
  */
466
- const Zr = [
469
+ const no = [
467
470
  [
468
471
  "path",
469
472
  {
@@ -472,26 +475,26 @@ const Zr = [
472
475
  }
473
476
  ],
474
477
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
475
- ], Jr = Oe("settings", Zr);
478
+ ], ro = Oe("settings", no);
476
479
  /**
477
480
  * @license lucide-react v1.21.0 - ISC
478
481
  *
479
482
  * This source code is licensed under the ISC license.
480
483
  * See the LICENSE file in the root directory of this source tree.
481
484
  */
482
- const Qr = [
485
+ const oo = [
483
486
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
484
487
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
485
488
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
486
489
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
487
- ], eo = Oe("smile", Qr);
490
+ ], ao = Oe("smile", oo);
488
491
  /**
489
492
  * @license lucide-react v1.21.0 - ISC
490
493
  *
491
494
  * This source code is licensed under the ISC license.
492
495
  * See the LICENSE file in the root directory of this source tree.
493
496
  */
494
- const to = [
497
+ const so = [
495
498
  [
496
499
  "path",
497
500
  {
@@ -501,27 +504,27 @@ const to = [
501
504
  ],
502
505
  ["path", { d: "M12 9v4", key: "juzpu7" }],
503
506
  ["path", { d: "M12 17h.01", key: "p32p05" }]
504
- ], no = Oe("triangle-alert", to);
507
+ ], io = Oe("triangle-alert", so);
505
508
  /**
506
509
  * @license lucide-react v1.21.0 - ISC
507
510
  *
508
511
  * This source code is licensed under the ISC license.
509
512
  * See the LICENSE file in the root directory of this source tree.
510
513
  */
511
- const ro = [
514
+ const co = [
512
515
  ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
513
516
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
514
- ], oo = Oe("x", ro);
515
- function ao(e, n) {
516
- if (n) {
517
- n(e);
517
+ ], lo = Oe("x", co);
518
+ function uo(e, t) {
519
+ if (t) {
520
+ t(e);
518
521
  return;
519
522
  }
520
523
  /^https?:\/\//.test(e) ? window.open(e, "_blank", "noopener,noreferrer") : window.location.href = e;
521
524
  }
522
- const rr = ({
525
+ const sr = ({
523
526
  isOpen: e,
524
- onClose: n,
527
+ onClose: t,
525
528
  anchorRef: r,
526
529
  items: a,
527
530
  onNavigate: l,
@@ -531,14 +534,14 @@ const rr = ({
531
534
  return V(() => {
532
535
  if (!e) return;
533
536
  const m = (p) => {
534
- u.current && !u.current.contains(p.target) && r.current && !r.current.contains(p.target) && n();
537
+ u.current && !u.current.contains(p.target) && r.current && !r.current.contains(p.target) && t();
535
538
  }, h = (p) => {
536
- p.key === "Escape" && n();
539
+ p.key === "Escape" && t();
537
540
  };
538
541
  return document.addEventListener("mousedown", m), document.addEventListener("keydown", h), () => {
539
542
  document.removeEventListener("mousedown", m), document.removeEventListener("keydown", h);
540
543
  };
541
- }, [e, n, r]), e ? /* @__PURE__ */ i(
544
+ }, [e, t, r]), e ? /* @__PURE__ */ i(
542
545
  "div",
543
546
  {
544
547
  ref: u,
@@ -552,7 +555,7 @@ const rr = ({
552
555
  className: "ask-arbor-settings__item",
553
556
  role: "menuitem",
554
557
  onClick: (p) => {
555
- p.preventDefault(), n(), ao(m.url, l);
558
+ p.preventDefault(), t(), uo(m.url, l);
556
559
  },
557
560
  children: [
558
561
  m.icon,
@@ -564,15 +567,15 @@ const rr = ({
564
567
  }
565
568
  ) : null;
566
569
  };
567
- rr.displayName = "AskArborSettings";
568
- function so(e) {
569
- const n = Math.floor(e / 60), r = e % 60;
570
- return `${n}:${r.toString().padStart(2, "0")}`;
570
+ sr.displayName = "AskArborSettings";
571
+ function fo(e) {
572
+ const t = Math.floor(e / 60), r = e % 60;
573
+ return `${t}:${r.toString().padStart(2, "0")}`;
571
574
  }
572
- const or = Tn(
575
+ const ir = Tn(
573
576
  ({
574
577
  value: e,
575
- onChange: n,
578
+ onChange: t,
576
579
  onKeyDown: r,
577
580
  placeholder: a = "Explain what you need in your own words...",
578
581
  onSubmit: l,
@@ -599,8 +602,8 @@ const or = Tn(
599
602
  z((de) => de + 1);
600
603
  }, 1e3);
601
604
  return () => clearInterval(G);
602
- }, [A]), wr(w, () => N.current);
603
- const q = !T && !A && e.trim().length > 0, me = A, J = Qn(
605
+ }, [A]), vr(w, () => N.current);
606
+ const q = !T && !A && e.trim().length > 0, me = A, J = tr(
604
607
  () => (h ?? []).map((G) => ({
605
608
  label: G.label,
606
609
  icon: /* @__PURE__ */ i(
@@ -622,7 +625,7 @@ const or = Tn(
622
625
  ref: N,
623
626
  className: "ask-arbor-input__textarea",
624
627
  value: e,
625
- onChange: (G) => n(G.target.value),
628
+ onChange: (G) => t(G.target.value),
626
629
  onKeyDown: r,
627
630
  placeholder: A ? "" : a,
628
631
  "aria-label": E,
@@ -633,7 +636,7 @@ const or = Tn(
633
636
  }
634
637
  ) }),
635
638
  /* @__PURE__ */ i("div", { className: "ask-arbor-input__bottom-actions", children: /* @__PURE__ */ S("div", { className: "ask-arbor-input__actions-right", children: [
636
- A && /* @__PURE__ */ i("span", { className: "ask-arbor-input__timer", children: so(pe) }),
639
+ A && /* @__PURE__ */ i("span", { className: "ask-arbor-input__timer", children: fo(pe) }),
637
640
  J.length > 0 && /* @__PURE__ */ S("div", { className: "ask-arbor-input__settings-wrap", children: [
638
641
  /* @__PURE__ */ i(
639
642
  "button",
@@ -656,7 +659,7 @@ const or = Tn(
656
659
  "aria-expanded": K,
657
660
  "aria-haspopup": "menu",
658
661
  children: /* @__PURE__ */ i(
659
- Jr,
662
+ ro,
660
663
  {
661
664
  size: 12,
662
665
  stroke: "#000000"
@@ -665,7 +668,7 @@ const or = Tn(
665
668
  }
666
669
  ),
667
670
  /* @__PURE__ */ i(
668
- rr,
671
+ sr,
669
672
  {
670
673
  isOpen: K,
671
674
  onClose: () => U(!1),
@@ -686,7 +689,7 @@ const or = Tn(
686
689
  onClick: u,
687
690
  "aria-label": "speak with agent",
688
691
  disabled: A || T,
689
- children: /* @__PURE__ */ i(Xr, { size: 12, stroke: "#3C3735" })
692
+ children: /* @__PURE__ */ i(to, { size: 12, stroke: "#3C3735" })
690
693
  }
691
694
  ),
692
695
  me && m ? /* @__PURE__ */ S(
@@ -697,7 +700,7 @@ const or = Tn(
697
700
  onClick: m,
698
701
  "aria-label": "Stop",
699
702
  children: [
700
- /* @__PURE__ */ i(Vr, { size: 12, stroke: "#FFFFFF" }),
703
+ /* @__PURE__ */ i(Qr, { size: 12, stroke: "#FFFFFF" }),
701
704
  "Stop"
702
705
  ]
703
706
  }
@@ -710,7 +713,7 @@ const or = Tn(
710
713
  disabled: !q,
711
714
  "aria-label": "submit message",
712
715
  children: /* @__PURE__ */ i(
713
- zr,
716
+ Yr,
714
717
  {
715
718
  size: 12,
716
719
  stroke: "#FFFFFF",
@@ -725,10 +728,10 @@ const or = Tn(
725
728
  ] });
726
729
  }
727
730
  );
728
- or.displayName = "AskArborInput";
729
- const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on = "up", Mn = "down", xn = 10, io = ({
731
+ ir.displayName = "AskArborInput";
732
+ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on = "up", xn = "down", Pn = 10, po = ({
730
733
  message: e,
731
- onRate: n,
734
+ onRate: t,
732
735
  upRatingPopupUrl: r,
733
736
  downRatingPopupUrl: a,
734
737
  onRatingPopupOpen: l
@@ -737,7 +740,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
737
740
  const T = p === on ? r : a;
738
741
  T != null && T.trim() && (l ? l(T.trim()) : window.open(T.trim(), "_blank", "noopener,noreferrer"));
739
742
  }, h = (p) => {
740
- u(p), n(p), m(p);
743
+ u(p), t(p), m(p);
741
744
  };
742
745
  return /* @__PURE__ */ S("div", { className: "chat-message__feedback", children: [
743
746
  /* @__PURE__ */ i("span", { className: "chat-message__feedback-question", children: "How did Ask Arbor do?" }),
@@ -758,9 +761,9 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
758
761
  onClick: () => h(on),
759
762
  children: [
760
763
  /* @__PURE__ */ i(
761
- eo,
764
+ ao,
762
765
  {
763
- size: xn,
766
+ size: Pn,
764
767
  strokeWidth: 1.5,
765
768
  className: "chat-message__feedback-button-icon",
766
769
  "aria-hidden": !0
@@ -780,15 +783,15 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
780
783
  "chat-message__feedback-button",
781
784
  "chat-message__feedback-button--down",
782
785
  {
783
- "chat-message__feedback-button--selected": s === Mn
786
+ "chat-message__feedback-button--selected": s === xn
784
787
  }
785
788
  ),
786
- onClick: () => h(Mn),
789
+ onClick: () => h(xn),
787
790
  children: [
788
791
  /* @__PURE__ */ i(
789
- $r,
792
+ qr,
790
793
  {
791
- size: xn,
794
+ size: Pn,
792
795
  strokeWidth: 1.5,
793
796
  className: "chat-message__feedback-button-icon",
794
797
  "aria-hidden": !0
@@ -800,9 +803,9 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
800
803
  )
801
804
  ] })
802
805
  ] });
803
- }, co = ({
806
+ }, mo = ({
804
807
  id: e,
805
- text: n,
808
+ text: t,
806
809
  type: r,
807
810
  onRate: a,
808
811
  ratingPopupUrls: l = {},
@@ -828,7 +831,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
828
831
  }),
829
832
  children: [
830
833
  r === mn && /* @__PURE__ */ i(
831
- jr,
834
+ Zr,
832
835
  {
833
836
  className: "chat-message__icon",
834
837
  "aria-label": "Information",
@@ -836,7 +839,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
836
839
  }
837
840
  ),
838
841
  r === Kt && /* @__PURE__ */ i(
839
- no,
842
+ io,
840
843
  {
841
844
  className: "chat-message__icon",
842
845
  "aria-label": "Warning",
@@ -844,7 +847,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
844
847
  }
845
848
  ),
846
849
  r === ve && /* @__PURE__ */ i(
847
- Br,
850
+ Kr,
848
851
  {
849
852
  className: "chat-message__icon",
850
853
  "aria-label": "Error",
@@ -855,7 +858,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
855
858
  "span",
856
859
  {
857
860
  dangerouslySetInnerHTML: {
858
- __html: p(n)
861
+ __html: p(t)
859
862
  }
860
863
  }
861
864
  )
@@ -864,11 +867,11 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
864
867
  ),
865
868
  E && /* @__PURE__ */ S("div", { className: "chat-message__footer-actions", children: [
866
869
  /* @__PURE__ */ i("div", { className: "chat-message__footer-icons", children: u && a && s && /* @__PURE__ */ i(
867
- io,
870
+ po,
868
871
  {
869
872
  upRatingPopupUrl: l.up,
870
873
  downRatingPopupUrl: l.down,
871
- message: { id: e, type: r, text: n },
874
+ message: { id: e, type: r, text: t },
872
875
  onRate: (O) => a(O, e),
873
876
  onRatingPopupOpen: A
874
877
  }
@@ -904,19 +907,19 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
904
907
  children: E ? /* @__PURE__ */ i("div", { className: "chat-message-container__content", children: k }) : k
905
908
  }
906
909
  );
907
- }, lo = "Not authorised. Your session could have expired or is invalid. Please refresh the page and try again.", uo = "You do not have permission to use this feature. Please contact your administrator if you need access.", fo = "The chat service could not be found. Please check your configuration and try again.", po = "It looks like this request took too long to complete. Please try again.", mo = "Whoops! Too many requests. Please wait a moment and try again.", ho = "The chat service is temporarily unavailable. Please try again later.", _o = "Unable to reach the chat service. Please check your connection and try again.", ar = "Something went wrong. Please try again later.", go = "Something went wrong while trying to get a new agent message. Please try again later.", Pn = "keyboard-shortcut-menu-portal";
908
- function bo() {
909
- let e = document.getElementById(Pn);
910
- return e || (e = document.createElement("div"), e.id = Pn, e.style.cssText = "position:fixed;left:0;top:0;z-index:19950;pointer-events:none;", document.body.appendChild(e)), e;
910
+ }, ho = "Not authorised. Your session could have expired or is invalid. Please refresh the page and try again.", _o = "You do not have permission to use this feature. Please contact your administrator if you need access.", go = "The chat service could not be found. Please check your configuration and try again.", bo = "It looks like this request took too long to complete. Please try again.", yo = "Whoops! Too many requests. Please wait a moment and try again.", To = "The chat service is temporarily unavailable. Please try again later.", Eo = "Unable to reach the chat service. Please check your connection and try again.", cr = "Something went wrong. Please try again later.", Ao = "Something went wrong while trying to get a new agent message. Please try again later.", Un = "keyboard-shortcut-menu-portal";
911
+ function So() {
912
+ let e = document.getElementById(Un);
913
+ return e || (e = document.createElement("div"), e.id = Un, e.style.cssText = "position:fixed;left:0;top:0;z-index:19950;pointer-events:none;", document.body.appendChild(e)), e;
911
914
  }
912
915
  const Vt = 200;
913
- function yo(e) {
914
- const n = window.innerHeight, r = e.top + e.height > n - Vt, a = e.top < Vt;
916
+ function wo(e) {
917
+ const t = window.innerHeight, r = e.top + e.height > t - Vt, a = e.top < Vt;
915
918
  return r ? "above" : a ? "below" : "above";
916
919
  }
917
- function To(e) {
918
- const n = yo(e), r = 8;
919
- return n === "below" ? {
920
+ function No(e) {
921
+ const t = wo(e), r = 8;
922
+ return t === "below" ? {
920
923
  left: e.left,
921
924
  width: e.width,
922
925
  top: e.bottom + r,
@@ -928,26 +931,26 @@ function To(e) {
928
931
  placement: "above"
929
932
  };
930
933
  }
931
- function Un(e, n) {
932
- if (n) {
933
- n(e);
934
+ function Fn(e, t) {
935
+ if (t) {
936
+ t(e);
934
937
  return;
935
938
  }
936
939
  /^https?:\/\//.test(e) ? window.open(e, "_blank", "noopener,noreferrer") : window.location.href = e;
937
940
  }
938
- const Eo = ({
941
+ const ko = ({
939
942
  anchorRef: e,
940
- ...n
943
+ ...t
941
944
  }) => {
942
945
  const [r, a] = M(
943
946
  null
944
947
  );
945
- if (er(() => {
948
+ if (nr(() => {
946
949
  const s = () => {
947
950
  const p = e.current;
948
951
  if (!p) return;
949
952
  const T = p.getBoundingClientRect();
950
- a(To(T));
953
+ a(No(T));
951
954
  };
952
955
  s();
953
956
  const u = requestAnimationFrame(() => s()), m = () => s(), h = () => s();
@@ -961,20 +964,20 @@ const Eo = ({
961
964
  width: r.width,
962
965
  pointerEvents: "auto"
963
966
  };
964
- return r.placement === "below" ? l.top = r.top : l.bottom = r.bottom, Nr(
965
- /* @__PURE__ */ i(sr, { ...n, portalStyle: l }),
966
- bo()
967
+ return r.placement === "below" ? l.top = r.top : l.bottom = r.bottom, rr(
968
+ /* @__PURE__ */ i(lr, { ...t, portalStyle: l }),
969
+ So()
967
970
  );
968
- }, sr = (e) => {
971
+ }, lr = (e) => {
969
972
  const {
970
- menuItems: n = [],
973
+ menuItems: t = [],
971
974
  onSelectItem: r,
972
975
  onClose: a,
973
976
  hideReferenceFromList: l = !1,
974
977
  anchorRef: s,
975
978
  portalStyle: u,
976
979
  onNavigate: m
977
- } = e, [h, p] = M(0), [T, A] = M(""), [_, E] = M(n), k = x(null), O = x(null), w = x(null), [N, H] = M(!1), [pe, z] = M(!1), K = u ? u.top != null : N, U = u ? !0 : pe;
980
+ } = e, [h, p] = M(0), [T, A] = M(""), [_, E] = M(t), k = x(null), O = x(null), w = x(null), [N, H] = M(!1), [pe, z] = M(!1), K = u ? u.top != null : N, U = u ? !0 : pe;
978
981
  V(() => {
979
982
  p(0), A("");
980
983
  }, []), V(() => {
@@ -1003,11 +1006,11 @@ const Eo = ({
1003
1006
  }
1004
1007
  }, [h]), V(() => {
1005
1008
  E(
1006
- T ? n.filter(
1009
+ T ? t.filter(
1007
1010
  (b) => b.reference.toLowerCase().includes(T.toLowerCase()) || b.description.toLowerCase().includes(T.toLowerCase())
1008
- ) : n
1011
+ ) : t
1009
1012
  );
1010
- }, [T, n]);
1013
+ }, [T, t]);
1011
1014
  const q = (b) => {
1012
1015
  var L;
1013
1016
  r && _[b] && !_[b].link && r(_[b]), a && !((L = _[b]) != null && L.link) && a();
@@ -1033,7 +1036,7 @@ const Eo = ({
1033
1036
  b.preventDefault(), p((L) => L > 0 ? L - 1 : 0);
1034
1037
  break;
1035
1038
  case "Enter":
1036
- b.preventDefault(), _[h] && (_[h].link ? Un(
1039
+ b.preventDefault(), _[h] && (_[h].link ? Fn(
1037
1040
  _[h].link.replace(
1038
1041
  /\/\?/g,
1039
1042
  ""
@@ -1076,7 +1079,7 @@ const Eo = ({
1076
1079
  }
1077
1080
  ),
1078
1081
  onClick: (W) => {
1079
- W.preventDefault(), Un(D, m), a == null || a();
1082
+ W.preventDefault(), Fn(D, m), a == null || a();
1080
1083
  },
1081
1084
  children: re
1082
1085
  }
@@ -1131,7 +1134,7 @@ const Eo = ({
1131
1134
  onClick: a,
1132
1135
  "aria-label": "Close menu",
1133
1136
  children: /* @__PURE__ */ i(
1134
- oo,
1137
+ lo,
1135
1138
  {
1136
1139
  size: 12,
1137
1140
  className: "keyboard-shortcut-menu__close-icon"
@@ -1162,10 +1165,10 @@ const Eo = ({
1162
1165
  }
1163
1166
  );
1164
1167
  return s && !u ? /* @__PURE__ */ i(
1165
- Eo,
1168
+ ko,
1166
1169
  {
1167
1170
  anchorRef: s,
1168
- menuItems: n,
1171
+ menuItems: t,
1169
1172
  onSelectItem: r,
1170
1173
  onClose: a,
1171
1174
  hideReferenceFromList: e.hideReferenceFromList,
@@ -1173,7 +1176,7 @@ const Eo = ({
1173
1176
  onNavigate: m
1174
1177
  }
1175
1178
  ) : u ? /* @__PURE__ */ i("div", { style: u, children: de }) : de;
1176
- }, Fn = ({ className: e }) => /* @__PURE__ */ i(
1179
+ }, Hn = ({ className: e }) => /* @__PURE__ */ i(
1177
1180
  "div",
1178
1181
  {
1179
1182
  className: _e("loading-spinner", e),
@@ -1210,7 +1213,7 @@ const Eo = ({
1210
1213
  )
1211
1214
  ] })
1212
1215
  }
1213
- ), Ao = 4e3, So = 500, wo = 8e3, an = [
1216
+ ), Ro = 4e3, Io = 500, Co = 8e3, an = [
1214
1217
  "I'm working on it…",
1215
1218
  "Generating insights…",
1216
1219
  "Piecing things together…",
@@ -1258,9 +1261,9 @@ const Eo = ({
1258
1261
  "Analysing your query…",
1259
1262
  "Analysing results…",
1260
1263
  "Working through the details…"
1261
- ], No = ({
1264
+ ], vo = ({
1262
1265
  loadingPhrase: e,
1263
- showSpinnerAsIcon: n = !0,
1266
+ showSpinnerAsIcon: t = !0,
1264
1267
  showNotifyLaterButton: r = !1,
1265
1268
  onNotifyLater: a,
1266
1269
  onNotificationRegisteredGotIt: l
@@ -1275,7 +1278,7 @@ const Eo = ({
1275
1278
  return;
1276
1279
  const N = setTimeout(() => {
1277
1280
  _(!0);
1278
- }, wo);
1281
+ }, Co);
1279
1282
  return () => {
1280
1283
  clearTimeout(N);
1281
1284
  };
@@ -1296,8 +1299,8 @@ const Eo = ({
1296
1299
  H = s();
1297
1300
  while (H === u.current);
1298
1301
  u.current = H, h(an[H]), T("fade-in");
1299
- }, So);
1300
- }, Ao), () => {
1302
+ }, Io);
1303
+ }, Ro), () => {
1301
1304
  N && clearInterval(N);
1302
1305
  };
1303
1306
  }, [e]), /* @__PURE__ */ S(
@@ -1308,7 +1311,7 @@ const Eo = ({
1308
1311
  "data-testid": "loading-widget",
1309
1312
  children: [
1310
1313
  /* @__PURE__ */ S("div", { className: "chat-panel__loading-content", children: [
1311
- n ? /* @__PURE__ */ i(Fn, { className: "chat-panel__loading-spinner" }) : /* @__PURE__ */ i("span", { className: "chat-panel__loading-spinner-container", children: /* @__PURE__ */ i(Fn, { className: "chat-panel__loading-spinner" }) }),
1314
+ t ? /* @__PURE__ */ i(Hn, { className: "chat-panel__loading-spinner" }) : /* @__PURE__ */ i("span", { className: "chat-panel__loading-spinner-container", children: /* @__PURE__ */ i(Hn, { className: "chat-panel__loading-spinner" }) }),
1312
1315
  /* @__PURE__ */ i("span", { className: `chat-panel__loading-phrase ${p}`, children: m })
1313
1316
  ] }),
1314
1317
  r && a && A && /* @__PURE__ */ i("div", { className: "chat-panel__notify-later", children: E ? /* @__PURE__ */ S(we, { children: [
@@ -1340,45 +1343,45 @@ const Eo = ({
1340
1343
  }
1341
1344
  );
1342
1345
  };
1343
- function ko(e) {
1346
+ function Oo(e) {
1344
1347
  V(e, []);
1345
1348
  }
1346
- function Ro() {
1349
+ function Lo() {
1347
1350
  const e = x(!1);
1348
1351
  return V(() => (e.current = !0, () => {
1349
1352
  e.current = !1;
1350
1353
  }), []), e;
1351
1354
  }
1352
- function Io() {
1355
+ function Do() {
1353
1356
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).substring(2) + Date.now().toString(36);
1354
1357
  }
1355
- function Co(e, n = 0) {
1358
+ function Mo(e, t = 0) {
1356
1359
  if (typeof e == "number" && e > 0) return e;
1357
1360
  if (typeof e == "string") {
1358
1361
  const r = parseInt(e, 10);
1359
1362
  if (!isNaN(r) && r > 0) return r;
1360
1363
  }
1361
- return n;
1364
+ return t;
1362
1365
  }
1363
- const vo = /\*\*(.+?)\*\*/g;
1364
- function Oo(e) {
1365
- return e.replace(vo, "<strong>$1</strong>");
1366
+ const xo = /\*\*(.+?)\*\*/g;
1367
+ function Po(e) {
1368
+ return e.replace(xo, "<strong>$1</strong>");
1366
1369
  }
1367
1370
  /*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
1368
- function Hn(e, n) {
1369
- (n == null || n > e.length) && (n = e.length);
1370
- for (var r = 0, a = Array(n); r < n; r++) a[r] = e[r];
1371
+ function zn(e, t) {
1372
+ (t == null || t > e.length) && (t = e.length);
1373
+ for (var r = 0, a = Array(t); r < t; r++) a[r] = e[r];
1371
1374
  return a;
1372
1375
  }
1373
- function Lo(e) {
1376
+ function Uo(e) {
1374
1377
  if (Array.isArray(e)) return e;
1375
1378
  }
1376
- function Do(e, n) {
1379
+ function Fo(e, t) {
1377
1380
  var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
1378
1381
  if (r != null) {
1379
1382
  var a, l, s, u, m = [], h = !0, p = !1;
1380
1383
  try {
1381
- if (s = (r = r.call(e)).next, n !== 0) for (; !(h = (a = s.call(r)).done) && (m.push(a.value), m.length !== n); h = !0) ;
1384
+ if (s = (r = r.call(e)).next, t !== 0) for (; !(h = (a = s.call(r)).done) && (m.push(a.value), m.length !== t); h = !0) ;
1382
1385
  } catch (T) {
1383
1386
  p = !0, l = T;
1384
1387
  } finally {
@@ -1391,104 +1394,104 @@ function Do(e, n) {
1391
1394
  return m;
1392
1395
  }
1393
1396
  }
1394
- function Mo() {
1397
+ function Ho() {
1395
1398
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1396
1399
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1397
1400
  }
1398
- function xo(e, n) {
1399
- return Lo(e) || Do(e, n) || Po(e, n) || Mo();
1401
+ function zo(e, t) {
1402
+ return Uo(e) || Fo(e, t) || Go(e, t) || Ho();
1400
1403
  }
1401
- function Po(e, n) {
1404
+ function Go(e, t) {
1402
1405
  if (e) {
1403
- if (typeof e == "string") return Hn(e, n);
1406
+ if (typeof e == "string") return zn(e, t);
1404
1407
  var r = {}.toString.call(e).slice(8, -1);
1405
- return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Hn(e, n) : void 0;
1408
+ return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? zn(e, t) : void 0;
1406
1409
  }
1407
1410
  }
1408
- const ir = Object.entries, zn = Object.setPrototypeOf, Uo = Object.isFrozen, Fo = Object.getPrototypeOf, Ho = Object.getOwnPropertyDescriptor;
1409
- let se = Object.freeze, ie = Object.seal, mt = Object.create, cr = typeof Reflect < "u" && Reflect, hn = cr.apply, _n = cr.construct;
1410
- se || (se = function(n) {
1411
- return n;
1411
+ const ur = Object.entries, Gn = Object.setPrototypeOf, Bo = Object.isFrozen, Wo = Object.getPrototypeOf, $o = Object.getOwnPropertyDescriptor;
1412
+ let se = Object.freeze, ie = Object.seal, mt = Object.create, dr = typeof Reflect < "u" && Reflect, hn = dr.apply, _n = dr.construct;
1413
+ se || (se = function(t) {
1414
+ return t;
1412
1415
  });
1413
- ie || (ie = function(n) {
1414
- return n;
1416
+ ie || (ie = function(t) {
1417
+ return t;
1415
1418
  });
1416
- hn || (hn = function(n, r) {
1419
+ hn || (hn = function(t, r) {
1417
1420
  for (var a = arguments.length, l = new Array(a > 2 ? a - 2 : 0), s = 2; s < a; s++)
1418
1421
  l[s - 2] = arguments[s];
1419
- return n.apply(r, l);
1422
+ return t.apply(r, l);
1420
1423
  });
1421
- _n || (_n = function(n) {
1424
+ _n || (_n = function(t) {
1422
1425
  for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
1423
1426
  a[l - 1] = arguments[l];
1424
- return new n(...a);
1427
+ return new t(...a);
1425
1428
  });
1426
- const Nt = Z(Array.prototype.forEach), zo = Z(Array.prototype.lastIndexOf), Gn = Z(Array.prototype.pop), pt = Z(Array.prototype.push), Go = Z(Array.prototype.splice), Be = Array.isArray, Ct = Z(String.prototype.toLowerCase), sn = Z(String.prototype.toString), Bn = Z(String.prototype.match), kt = Z(String.prototype.replace), Wn = Z(String.prototype.indexOf), Bo = Z(String.prototype.trim), Wo = Z(Number.prototype.toString), $o = Z(Boolean.prototype.toString), $n = typeof BigInt > "u" ? null : Z(BigInt.prototype.toString), Yn = typeof Symbol > "u" ? null : Z(Symbol.prototype.toString), ne = Z(Object.prototype.hasOwnProperty), Rt = Z(Object.prototype.toString), ae = Z(RegExp.prototype.test), Qe = Yo(TypeError);
1429
+ const Nt = Z(Array.prototype.forEach), Yo = Z(Array.prototype.lastIndexOf), Bn = Z(Array.prototype.pop), pt = Z(Array.prototype.push), jo = Z(Array.prototype.splice), Be = Array.isArray, Ct = Z(String.prototype.toLowerCase), sn = Z(String.prototype.toString), Wn = Z(String.prototype.match), kt = Z(String.prototype.replace), $n = Z(String.prototype.indexOf), Ko = Z(String.prototype.trim), Vo = Z(Number.prototype.toString), qo = Z(Boolean.prototype.toString), Yn = typeof BigInt > "u" ? null : Z(BigInt.prototype.toString), jn = typeof Symbol > "u" ? null : Z(Symbol.prototype.toString), ne = Z(Object.prototype.hasOwnProperty), Rt = Z(Object.prototype.toString), ae = Z(RegExp.prototype.test), Qe = Xo(TypeError);
1427
1430
  function Z(e) {
1428
- return function(n) {
1429
- n instanceof RegExp && (n.lastIndex = 0);
1431
+ return function(t) {
1432
+ t instanceof RegExp && (t.lastIndex = 0);
1430
1433
  for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
1431
1434
  a[l - 1] = arguments[l];
1432
- return hn(e, n, a);
1435
+ return hn(e, t, a);
1433
1436
  };
1434
1437
  }
1435
- function Yo(e) {
1438
+ function Xo(e) {
1436
1439
  return function() {
1437
- for (var n = arguments.length, r = new Array(n), a = 0; a < n; a++)
1440
+ for (var t = arguments.length, r = new Array(t), a = 0; a < t; a++)
1438
1441
  r[a] = arguments[a];
1439
1442
  return _n(e, r);
1440
1443
  };
1441
1444
  }
1442
- function C(e, n) {
1445
+ function C(e, t) {
1443
1446
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ct;
1444
- if (zn && zn(e, null), !Be(n))
1447
+ if (Gn && Gn(e, null), !Be(t))
1445
1448
  return e;
1446
- let a = n.length;
1449
+ let a = t.length;
1447
1450
  for (; a--; ) {
1448
- let l = n[a];
1451
+ let l = t[a];
1449
1452
  if (typeof l == "string") {
1450
1453
  const s = r(l);
1451
- s !== l && (Uo(n) || (n[a] = s), l = s);
1454
+ s !== l && (Bo(t) || (t[a] = s), l = s);
1452
1455
  }
1453
1456
  e[l] = !0;
1454
1457
  }
1455
1458
  return e;
1456
1459
  }
1457
- function jo(e) {
1458
- for (let n = 0; n < e.length; n++)
1459
- ne(e, n) || (e[n] = null);
1460
+ function Zo(e) {
1461
+ for (let t = 0; t < e.length; t++)
1462
+ ne(e, t) || (e[t] = null);
1460
1463
  return e;
1461
1464
  }
1462
1465
  function ue(e) {
1463
- const n = mt(null);
1464
- for (const a of ir(e)) {
1465
- var r = xo(a, 2);
1466
+ const t = mt(null);
1467
+ for (const a of ur(e)) {
1468
+ var r = zo(a, 2);
1466
1469
  const l = r[0], s = r[1];
1467
- ne(e, l) && (Be(s) ? n[l] = jo(s) : s && typeof s == "object" && s.constructor === Object ? n[l] = ue(s) : n[l] = s);
1470
+ ne(e, l) && (Be(s) ? t[l] = Zo(s) : s && typeof s == "object" && s.constructor === Object ? t[l] = ue(s) : t[l] = s);
1468
1471
  }
1469
- return n;
1472
+ return t;
1470
1473
  }
1471
- function Ko(e) {
1474
+ function Jo(e) {
1472
1475
  switch (typeof e) {
1473
1476
  case "string":
1474
1477
  return e;
1475
1478
  case "number":
1476
- return Wo(e);
1479
+ return Vo(e);
1477
1480
  case "boolean":
1478
- return $o(e);
1481
+ return qo(e);
1479
1482
  case "bigint":
1480
- return $n ? $n(e) : "0";
1483
+ return Yn ? Yn(e) : "0";
1481
1484
  case "symbol":
1482
- return Yn ? Yn(e) : "Symbol()";
1485
+ return jn ? jn(e) : "Symbol()";
1483
1486
  case "undefined":
1484
1487
  return Rt(e);
1485
1488
  case "function":
1486
1489
  case "object": {
1487
1490
  if (e === null)
1488
1491
  return Rt(e);
1489
- const n = e, r = Ce(n, "toString");
1492
+ const t = e, r = Ce(t, "toString");
1490
1493
  if (typeof r == "function") {
1491
- const a = r(n);
1494
+ const a = r(t);
1492
1495
  return typeof a == "string" ? a : Rt(a);
1493
1496
  }
1494
1497
  return Rt(e);
@@ -1497,36 +1500,36 @@ function Ko(e) {
1497
1500
  return Rt(e);
1498
1501
  }
1499
1502
  }
1500
- function Ce(e, n) {
1503
+ function Ce(e, t) {
1501
1504
  for (; e !== null; ) {
1502
- const a = Ho(e, n);
1505
+ const a = $o(e, t);
1503
1506
  if (a) {
1504
1507
  if (a.get)
1505
1508
  return Z(a.get);
1506
1509
  if (typeof a.value == "function")
1507
1510
  return Z(a.value);
1508
1511
  }
1509
- e = Fo(e);
1512
+ e = Wo(e);
1510
1513
  }
1511
1514
  function r() {
1512
1515
  return null;
1513
1516
  }
1514
1517
  return r;
1515
1518
  }
1516
- function Vo(e) {
1519
+ function Qo(e) {
1517
1520
  try {
1518
1521
  return ae(e, ""), !0;
1519
1522
  } catch {
1520
1523
  return !1;
1521
1524
  }
1522
1525
  }
1523
- const jn = se(["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"]), cn = se(["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"]), ln = se(["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"]), qo = se(["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"]), un = se(["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"]), Xo = se(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Kn = se(["#text"]), Vn = se(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), dn = se(["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"]), qn = se(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), $t = se(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Zo = ie(/{{[\w\W]*|^[\w\W]*}}/g), Jo = ie(/<%[\w\W]*|^[\w\W]*%>/g), Qo = ie(/\${[\w\W]*/g), ea = ie(/^data-[\-\w.\u00B7-\uFFFF]+$/), ta = ie(/^aria-[\-\w]+$/), Xn = ie(
1526
+ const Kn = se(["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"]), cn = se(["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"]), ln = se(["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"]), ea = se(["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"]), un = se(["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"]), ta = se(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Vn = se(["#text"]), qn = se(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), dn = se(["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"]), Xn = se(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), $t = se(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), na = ie(/{{[\w\W]*|^[\w\W]*}}/g), ra = ie(/<%[\w\W]*|^[\w\W]*%>/g), oa = ie(/\${[\w\W]*/g), aa = ie(/^data-[\-\w.\u00B7-\uFFFF]+$/), sa = ie(/^aria-[\-\w]+$/), Zn = ie(
1524
1527
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
1525
1528
  // eslint-disable-line no-useless-escape
1526
- ), na = ie(/^(?:\w+script|data):/i), ra = ie(
1529
+ ), ia = ie(/^(?:\w+script|data):/i), ca = ie(
1527
1530
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
1528
1531
  // eslint-disable-line no-control-regex
1529
- ), oa = ie(/^html$/i), aa = ie(/^[a-z][.\w]*(-[.\w]+)+$/i), Zn = ie(/<[/\w!]/g), sa = ie(/<[/\w]/g), ia = ie(/<\/no(script|embed|frames)/i), ca = ie(/\/>/i), Ie = {
1532
+ ), la = ie(/^html$/i), ua = ie(/^[a-z][.\w]*(-[.\w]+)+$/i), Jn = ie(/<[/\w!]/g), da = ie(/<[/\w]/g), fa = ie(/<\/no(script|embed|frames)/i), pa = ie(/\/>/i), Ie = {
1530
1533
  element: 1,
1531
1534
  attribute: 2,
1532
1535
  text: 3,
@@ -1542,17 +1545,17 @@ const jn = se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
1542
1545
  documentFragment: 11,
1543
1546
  notation: 12
1544
1547
  // Deprecated
1545
- }, la = function() {
1548
+ }, ma = function() {
1546
1549
  return typeof window > "u" ? null : window;
1547
- }, ua = function(n, r) {
1548
- if (typeof n != "object" || typeof n.createPolicy != "function")
1550
+ }, ha = function(t, r) {
1551
+ if (typeof t != "object" || typeof t.createPolicy != "function")
1549
1552
  return null;
1550
1553
  let a = null;
1551
1554
  const l = "data-tt-policy-suffix";
1552
1555
  r && r.hasAttribute(l) && (a = r.getAttribute(l));
1553
1556
  const s = "dompurify" + (a ? "#" + a : "");
1554
1557
  try {
1555
- return n.createPolicy(s, {
1558
+ return t.createPolicy(s, {
1556
1559
  createHTML(u) {
1557
1560
  return u;
1558
1561
  },
@@ -1563,7 +1566,7 @@ const jn = se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
1563
1566
  } catch {
1564
1567
  return console.warn("TrustedTypes policy " + s + " could not be created."), null;
1565
1568
  }
1566
- }, Jn = function() {
1569
+ }, Qn = function() {
1567
1570
  return {
1568
1571
  afterSanitizeAttributes: [],
1569
1572
  afterSanitizeElements: [],
@@ -1575,14 +1578,14 @@ const jn = se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
1575
1578
  uponSanitizeElement: [],
1576
1579
  uponSanitizeShadowNode: []
1577
1580
  };
1578
- }, Ge = function(n, r, a, l) {
1579
- return ne(n, r) && Be(n[r]) ? C(l.base ? ue(l.base) : {}, n[r], l.transform) : a;
1581
+ }, Ge = function(t, r, a, l) {
1582
+ return ne(t, r) && Be(t[r]) ? C(l.base ? ue(l.base) : {}, t[r], l.transform) : a;
1580
1583
  };
1581
- function lr() {
1582
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : la();
1583
- const n = (f) => lr(f);
1584
- if (n.version = "3.4.11", n.removed = [], !e || !e.document || e.document.nodeType !== Ie.document || !e.Element)
1585
- return n.isSupported = !1, n;
1584
+ function fr() {
1585
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ma();
1586
+ const t = (f) => fr(f);
1587
+ if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== Ie.document || !e.Element)
1588
+ return t.isSupported = !1, t;
1586
1589
  let r = e.document;
1587
1590
  const a = r, l = a.currentScript;
1588
1591
  e.DocumentFragment;
@@ -1597,30 +1600,30 @@ function lr() {
1597
1600
  const de = function() {
1598
1601
  if (G > 0)
1599
1602
  throw Qe('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
1600
- }, b = function(t) {
1603
+ }, b = function(n) {
1601
1604
  de(), G++;
1602
1605
  try {
1603
- return U.createHTML(t);
1606
+ return U.createHTML(n);
1604
1607
  } finally {
1605
1608
  G--;
1606
1609
  }
1607
- }, L = function(t) {
1610
+ }, L = function(n) {
1608
1611
  de(), G++;
1609
1612
  try {
1610
- return U.createScriptURL(t);
1613
+ return U.createScriptURL(n);
1611
1614
  } finally {
1612
1615
  G--;
1613
1616
  }
1614
1617
  }, B = function() {
1615
- return J || (me = ua(A, l), J = !0), me;
1618
+ return J || (me = ha(A, l), J = !0), me;
1616
1619
  }, re = r, D = re.implementation, W = re.createNodeIterator, he = re.createDocumentFragment, Le = re.getElementsByTagName, xe = a.importNode;
1617
- let F = Jn();
1618
- n.isSupported = typeof ir == "function" && typeof N == "function" && D && D.createHTMLDocument !== void 0;
1619
- const oe = Zo, _t = Jo, Q = Qo, gt = ea, qt = ta, Ot = na, et = ra, We = aa;
1620
- let Pe = Xn, P = null;
1621
- const tt = C({}, [...jn, ...cn, ...ln, ...un, ...Kn]);
1620
+ let F = Qn();
1621
+ t.isSupported = typeof ur == "function" && typeof N == "function" && D && D.createHTMLDocument !== void 0;
1622
+ const oe = na, _t = ra, Q = oa, gt = aa, qt = sa, Ot = ia, et = ca, We = ua;
1623
+ let Pe = Zn, P = null;
1624
+ const tt = C({}, [...Kn, ...cn, ...ln, ...un, ...Vn]);
1622
1625
  let Y = null;
1623
- const nt = C({}, [...Vn, ...dn, ...qn, ...$t]);
1626
+ const nt = C({}, [...qn, ...dn, ...Xn, ...$t]);
1624
1627
  let $ = Object.seal(mt(null, {
1625
1628
  tagNameCheck: {
1626
1629
  writable: !0,
@@ -1708,73 +1711,73 @@ function lr() {
1708
1711
  let Ze = null;
1709
1712
  const Jt = ["application/xhtml+xml", "text/html"], Ut = "text/html";
1710
1713
  let j = null, c = null;
1711
- const y = r.createElement("form"), I = function(t) {
1712
- return t instanceof RegExp || t instanceof Function;
1714
+ const y = r.createElement("form"), I = function(n) {
1715
+ return n instanceof RegExp || n instanceof Function;
1713
1716
  }, ce = function() {
1714
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1715
- if (c && c === t)
1717
+ let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1718
+ if (c && c === n)
1716
1719
  return;
1717
- (!t || typeof t != "object") && (t = {}), t = ue(t), Ze = // eslint-disable-next-line unicorn/prefer-includes
1718
- Jt.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Ut : t.PARSER_MEDIA_TYPE, j = Ze === "application/xhtml+xml" ? sn : Ct, P = Ge(t, "ALLOWED_TAGS", tt, {
1720
+ (!n || typeof n != "object") && (n = {}), n = ue(n), Ze = // eslint-disable-next-line unicorn/prefer-includes
1721
+ Jt.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? Ut : n.PARSER_MEDIA_TYPE, j = Ze === "application/xhtml+xml" ? sn : Ct, P = Ge(n, "ALLOWED_TAGS", tt, {
1719
1722
  transform: j
1720
- }), Y = Ge(t, "ALLOWED_ATTR", nt, {
1723
+ }), Y = Ge(n, "ALLOWED_ATTR", nt, {
1721
1724
  transform: j
1722
- }), dt = Ge(t, "ALLOWED_NAMESPACES", Xt, {
1725
+ }), dt = Ge(n, "ALLOWED_NAMESPACES", Xt, {
1723
1726
  transform: sn
1724
- }), Et = Ge(t, "ADD_URI_SAFE_ATTR", Mt, {
1727
+ }), Et = Ge(n, "ADD_URI_SAFE_ATTR", Mt, {
1725
1728
  transform: j,
1726
1729
  base: Mt
1727
- }), Dt = Ge(t, "ADD_DATA_URI_TAGS", Xe, {
1730
+ }), Dt = Ge(n, "ADD_DATA_URI_TAGS", Xe, {
1728
1731
  transform: j,
1729
1732
  base: Xe
1730
- }), ge = Ge(t, "FORBID_CONTENTS", qe, {
1733
+ }), ge = Ge(n, "FORBID_CONTENTS", qe, {
1731
1734
  transform: j
1732
- }), Ne = Ge(t, "FORBID_TAGS", ue({}), {
1735
+ }), Ne = Ge(n, "FORBID_TAGS", ue({}), {
1733
1736
  transform: j
1734
- }), bt = Ge(t, "FORBID_ATTR", ue({}), {
1737
+ }), bt = Ge(n, "FORBID_ATTR", ue({}), {
1735
1738
  transform: j
1736
- }), He = ne(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? ue(t.USE_PROFILES) : t.USE_PROFILES : !1, Lt = t.ALLOW_ARIA_ATTR !== !1, $e = t.ALLOW_DATA_ATTR !== !1, rt = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Ue = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ae = t.SAFE_FOR_TEMPLATES || !1, Ye = t.SAFE_FOR_XML !== !1, ke = t.WHOLE_DOCUMENT || !1, De = t.RETURN_DOM || !1, Ke = t.RETURN_DOM_FRAGMENT || !1, st = t.RETURN_TRUSTED_TYPE || !1, at = t.FORCE_BODY || !1, yt = t.SANITIZE_DOM !== !1, Ve = t.SANITIZE_NAMED_PROPS || !1, Tt = t.KEEP_CONTENT !== !1, ct = t.IN_PLACE || !1, Pe = Vo(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : Xn, be = typeof t.NAMESPACE == "string" ? t.NAMESPACE : ee, At = ne(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ue(t.MATHML_TEXT_INTEGRATION_POINTS) : C({}, xt), St = ne(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? ue(t.HTML_INTEGRATION_POINTS) : C({}, Pt);
1737
- const o = ne(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? ue(t.CUSTOM_ELEMENT_HANDLING) : mt(null);
1738
- if ($ = mt(null), ne(o, "tagNameCheck") && I(o.tagNameCheck) && ($.tagNameCheck = o.tagNameCheck), ne(o, "attributeNameCheck") && I(o.attributeNameCheck) && ($.attributeNameCheck = o.attributeNameCheck), ne(o, "allowCustomizedBuiltInElements") && typeof o.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = o.allowCustomizedBuiltInElements), ie($), Ae && ($e = !1), Ke && (De = !0), He && (P = C({}, Kn), Y = mt(null), He.html === !0 && (C(P, jn), C(Y, Vn)), He.svg === !0 && (C(P, cn), C(Y, dn), C(Y, $t)), He.svgFilters === !0 && (C(P, ln), C(Y, dn), C(Y, $t)), He.mathMl === !0 && (C(P, un), C(Y, qn), C(Y, $t))), Ee.tagCheck = null, Ee.attributeCheck = null, ne(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? Ee.tagCheck = t.ADD_TAGS : Be(t.ADD_TAGS) && (P === tt && (P = ue(P)), C(P, t.ADD_TAGS, j))), ne(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? Ee.attributeCheck = t.ADD_ATTR : Be(t.ADD_ATTR) && (Y === nt && (Y = ue(Y)), C(Y, t.ADD_ATTR, j))), ne(t, "ADD_URI_SAFE_ATTR") && Be(t.ADD_URI_SAFE_ATTR) && C(Et, t.ADD_URI_SAFE_ATTR, j), ne(t, "FORBID_CONTENTS") && Be(t.FORBID_CONTENTS) && (ge === qe && (ge = ue(ge)), C(ge, t.FORBID_CONTENTS, j)), ne(t, "ADD_FORBID_CONTENTS") && Be(t.ADD_FORBID_CONTENTS) && (ge === qe && (ge = ue(ge)), C(ge, t.ADD_FORBID_CONTENTS, j)), Tt && (P["#text"] = !0), ke && C(P, ["html", "head", "body"]), P.table && (C(P, ["tbody"]), delete Ne.tbody), t.TRUSTED_TYPES_POLICY) {
1739
- if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
1739
+ }), He = ne(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? ue(n.USE_PROFILES) : n.USE_PROFILES : !1, Lt = n.ALLOW_ARIA_ATTR !== !1, $e = n.ALLOW_DATA_ATTR !== !1, rt = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Ue = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ae = n.SAFE_FOR_TEMPLATES || !1, Ye = n.SAFE_FOR_XML !== !1, ke = n.WHOLE_DOCUMENT || !1, De = n.RETURN_DOM || !1, Ke = n.RETURN_DOM_FRAGMENT || !1, st = n.RETURN_TRUSTED_TYPE || !1, at = n.FORCE_BODY || !1, yt = n.SANITIZE_DOM !== !1, Ve = n.SANITIZE_NAMED_PROPS || !1, Tt = n.KEEP_CONTENT !== !1, ct = n.IN_PLACE || !1, Pe = Qo(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : Zn, be = typeof n.NAMESPACE == "string" ? n.NAMESPACE : ee, At = ne(n, "MATHML_TEXT_INTEGRATION_POINTS") && n.MATHML_TEXT_INTEGRATION_POINTS && typeof n.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ue(n.MATHML_TEXT_INTEGRATION_POINTS) : C({}, xt), St = ne(n, "HTML_INTEGRATION_POINTS") && n.HTML_INTEGRATION_POINTS && typeof n.HTML_INTEGRATION_POINTS == "object" ? ue(n.HTML_INTEGRATION_POINTS) : C({}, Pt);
1740
+ const o = ne(n, "CUSTOM_ELEMENT_HANDLING") && n.CUSTOM_ELEMENT_HANDLING && typeof n.CUSTOM_ELEMENT_HANDLING == "object" ? ue(n.CUSTOM_ELEMENT_HANDLING) : mt(null);
1741
+ if ($ = mt(null), ne(o, "tagNameCheck") && I(o.tagNameCheck) && ($.tagNameCheck = o.tagNameCheck), ne(o, "attributeNameCheck") && I(o.attributeNameCheck) && ($.attributeNameCheck = o.attributeNameCheck), ne(o, "allowCustomizedBuiltInElements") && typeof o.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = o.allowCustomizedBuiltInElements), ie($), Ae && ($e = !1), Ke && (De = !0), He && (P = C({}, Vn), Y = mt(null), He.html === !0 && (C(P, Kn), C(Y, qn)), He.svg === !0 && (C(P, cn), C(Y, dn), C(Y, $t)), He.svgFilters === !0 && (C(P, ln), C(Y, dn), C(Y, $t)), He.mathMl === !0 && (C(P, un), C(Y, Xn), C(Y, $t))), Ee.tagCheck = null, Ee.attributeCheck = null, ne(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? Ee.tagCheck = n.ADD_TAGS : Be(n.ADD_TAGS) && (P === tt && (P = ue(P)), C(P, n.ADD_TAGS, j))), ne(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? Ee.attributeCheck = n.ADD_ATTR : Be(n.ADD_ATTR) && (Y === nt && (Y = ue(Y)), C(Y, n.ADD_ATTR, j))), ne(n, "ADD_URI_SAFE_ATTR") && Be(n.ADD_URI_SAFE_ATTR) && C(Et, n.ADD_URI_SAFE_ATTR, j), ne(n, "FORBID_CONTENTS") && Be(n.FORBID_CONTENTS) && (ge === qe && (ge = ue(ge)), C(ge, n.FORBID_CONTENTS, j)), ne(n, "ADD_FORBID_CONTENTS") && Be(n.ADD_FORBID_CONTENTS) && (ge === qe && (ge = ue(ge)), C(ge, n.ADD_FORBID_CONTENTS, j)), Tt && (P["#text"] = !0), ke && C(P, ["html", "head", "body"]), P.table && (C(P, ["tbody"]), delete Ne.tbody), n.TRUSTED_TYPES_POLICY) {
1742
+ if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function")
1740
1743
  throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1741
- if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
1744
+ if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function")
1742
1745
  throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1743
1746
  const d = U;
1744
- U = t.TRUSTED_TYPES_POLICY;
1747
+ U = n.TRUSTED_TYPES_POLICY;
1745
1748
  try {
1746
1749
  q = b("");
1747
1750
  } catch (g) {
1748
1751
  throw U = d, g;
1749
1752
  }
1750
- } else t.TRUSTED_TYPES_POLICY === null ? (U = void 0, q = "") : (U === void 0 && (U = B()), U && typeof q == "string" && (q = b("")));
1751
- se && se(t), c = t;
1752
- }, ye = C({}, [...cn, ...ln, ...qo]), fe = C({}, [...un, ...Xo]), Ft = function(t, o, d) {
1753
- return o.namespaceURI === ee ? t === "svg" : o.namespaceURI === Re ? t === "svg" && (d === "annotation-xml" || At[d]) : !!ye[t];
1754
- }, Sn = function(t, o, d) {
1755
- return o.namespaceURI === ee ? t === "math" : o.namespaceURI === lt ? t === "math" && St[d] : !!fe[t];
1756
- }, wn = function(t, o, d) {
1757
- return o.namespaceURI === lt && !St[d] || o.namespaceURI === Re && !At[d] ? !1 : !fe[t] && (Zt[t] || !ye[t]);
1758
- }, Ht = function(t) {
1759
- let o = N(t);
1753
+ } else n.TRUSTED_TYPES_POLICY === null ? (U = void 0, q = "") : (U === void 0 && (U = B()), U && typeof q == "string" && (q = b("")));
1754
+ se && se(n), c = n;
1755
+ }, ye = C({}, [...cn, ...ln, ...ea]), fe = C({}, [...un, ...ta]), Ft = function(n, o, d) {
1756
+ return o.namespaceURI === ee ? n === "svg" : o.namespaceURI === Re ? n === "svg" && (d === "annotation-xml" || At[d]) : !!ye[n];
1757
+ }, Sn = function(n, o, d) {
1758
+ return o.namespaceURI === ee ? n === "math" : o.namespaceURI === lt ? n === "math" && St[d] : !!fe[n];
1759
+ }, wn = function(n, o, d) {
1760
+ return o.namespaceURI === lt && !St[d] || o.namespaceURI === Re && !At[d] ? !1 : !fe[n] && (Zt[n] || !ye[n]);
1761
+ }, Ht = function(n) {
1762
+ let o = N(n);
1760
1763
  (!o || !o.tagName) && (o = {
1761
1764
  namespaceURI: be,
1762
1765
  tagName: "template"
1763
1766
  });
1764
- const d = Ct(t.tagName), g = Ct(o.tagName);
1765
- return dt[t.namespaceURI] ? t.namespaceURI === lt ? Ft(d, o, g) : t.namespaceURI === Re ? Sn(d, o, g) : t.namespaceURI === ee ? wn(d, o, g) : !!(Ze === "application/xhtml+xml" && dt[t.namespaceURI]) : !1;
1766
- }, ze = function(t) {
1767
- pt(n.removed, {
1768
- element: t
1767
+ const d = Ct(n.tagName), g = Ct(o.tagName);
1768
+ return dt[n.namespaceURI] ? n.namespaceURI === lt ? Ft(d, o, g) : n.namespaceURI === Re ? Sn(d, o, g) : n.namespaceURI === ee ? wn(d, o, g) : !!(Ze === "application/xhtml+xml" && dt[n.namespaceURI]) : !1;
1769
+ }, ze = function(n) {
1770
+ pt(t.removed, {
1771
+ element: n
1769
1772
  });
1770
1773
  try {
1771
- N(t).removeChild(t);
1774
+ N(n).removeChild(n);
1772
1775
  } catch {
1773
- if (k(t), !N(t))
1776
+ if (k(n), !N(n))
1774
1777
  throw Qe("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1775
1778
  }
1776
- }, Nn = function(t) {
1777
- const o = w(t);
1779
+ }, Nn = function(n) {
1780
+ const o = w(n);
1778
1781
  if (o) {
1779
1782
  const g = [];
1780
1783
  Nt(o, (R) => {
@@ -1786,29 +1789,29 @@ function lr() {
1786
1789
  }
1787
1790
  });
1788
1791
  }
1789
- const d = pe(t);
1792
+ const d = pe(n);
1790
1793
  if (d)
1791
1794
  for (let g = d.length - 1; g >= 0; --g) {
1792
1795
  const R = d[g], v = R && R.name;
1793
1796
  if (typeof v == "string")
1794
1797
  try {
1795
- t.removeAttribute(v);
1798
+ n.removeAttribute(v);
1796
1799
  } catch {
1797
1800
  }
1798
1801
  }
1799
- }, Je = function(t, o) {
1802
+ }, Je = function(n, o) {
1800
1803
  try {
1801
- pt(n.removed, {
1802
- attribute: o.getAttributeNode(t),
1804
+ pt(t.removed, {
1805
+ attribute: o.getAttributeNode(n),
1803
1806
  from: o
1804
1807
  });
1805
1808
  } catch {
1806
- pt(n.removed, {
1809
+ pt(t.removed, {
1807
1810
  attribute: null,
1808
1811
  from: o
1809
1812
  });
1810
1813
  }
1811
- if (o.removeAttribute(t), t === "is")
1814
+ if (o.removeAttribute(n), n === "is")
1812
1815
  if (De || Ke)
1813
1816
  try {
1814
1817
  ze(o);
@@ -1816,40 +1819,40 @@ function lr() {
1816
1819
  }
1817
1820
  else
1818
1821
  try {
1819
- o.setAttribute(t, "");
1822
+ o.setAttribute(n, "");
1820
1823
  } catch {
1821
1824
  }
1822
- }, pr = function(t) {
1823
- const o = pe(t);
1825
+ }, _r = function(n) {
1826
+ const o = pe(n);
1824
1827
  if (o)
1825
1828
  for (let d = o.length - 1; d >= 0; --d) {
1826
1829
  const g = o[d], R = g && g.name;
1827
1830
  if (!(typeof R != "string" || Y[j(R)]))
1828
1831
  try {
1829
- t.removeAttribute(R);
1832
+ n.removeAttribute(R);
1830
1833
  } catch {
1831
1834
  }
1832
1835
  }
1833
- }, mr = function(t) {
1834
- const o = [t];
1836
+ }, gr = function(n) {
1837
+ const o = [n];
1835
1838
  for (; o.length > 0; ) {
1836
1839
  const d = o.pop();
1837
- (z ? z(d) : d.nodeType) === Ie.element && pr(d);
1840
+ (z ? z(d) : d.nodeType) === Ie.element && _r(d);
1838
1841
  const R = w(d);
1839
1842
  if (R)
1840
1843
  for (let v = R.length - 1; v >= 0; --v)
1841
1844
  o.push(R[v]);
1842
1845
  }
1843
- }, kn = function(t) {
1846
+ }, kn = function(n) {
1844
1847
  let o = null, d = null;
1845
1848
  if (at)
1846
- t = "<remove></remove>" + t;
1849
+ n = "<remove></remove>" + n;
1847
1850
  else {
1848
- const v = Bn(t, /^[\r\n\t ]+/);
1851
+ const v = Wn(n, /^[\r\n\t ]+/);
1849
1852
  d = v && v[0];
1850
1853
  }
1851
- Ze === "application/xhtml+xml" && be === ee && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
1852
- const g = U ? b(t) : t;
1854
+ Ze === "application/xhtml+xml" && be === ee && (n = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + n + "</body></html>");
1855
+ const g = U ? b(n) : n;
1853
1856
  if (be === ee)
1854
1857
  try {
1855
1858
  o = new T().parseFromString(g, Ze);
@@ -1863,23 +1866,23 @@ function lr() {
1863
1866
  }
1864
1867
  }
1865
1868
  const R = o.body || o.documentElement;
1866
- return t && d && R.insertBefore(r.createTextNode(d), R.childNodes[0] || null), be === ee ? Le.call(o, ke ? "html" : "body")[0] : ke ? o.documentElement : R;
1867
- }, Rn = function(t) {
1869
+ return n && d && R.insertBefore(r.createTextNode(d), R.childNodes[0] || null), be === ee ? Le.call(o, ke ? "html" : "body")[0] : ke ? o.documentElement : R;
1870
+ }, Rn = function(n) {
1868
1871
  return W.call(
1869
- t.ownerDocument || t,
1870
- t,
1872
+ n.ownerDocument || n,
1873
+ n,
1871
1874
  // eslint-disable-next-line no-bitwise
1872
1875
  h.SHOW_ELEMENT | h.SHOW_COMMENT | h.SHOW_TEXT | h.SHOW_PROCESSING_INSTRUCTION | h.SHOW_CDATA_SECTION,
1873
1876
  null
1874
1877
  );
1875
- }, zt = function(t) {
1876
- return t = kt(t, oe, " "), t = kt(t, _t, " "), t = kt(t, Q, " "), t;
1877
- }, Qt = function(t) {
1878
+ }, zt = function(n) {
1879
+ return n = kt(n, oe, " "), n = kt(n, _t, " "), n = kt(n, Q, " "), n;
1880
+ }, Qt = function(n) {
1878
1881
  var o;
1879
- t.normalize();
1882
+ n.normalize();
1880
1883
  const d = W.call(
1881
- t.ownerDocument || t,
1882
- t,
1884
+ n.ownerDocument || n,
1885
+ n,
1883
1886
  // eslint-disable-next-line no-bitwise
1884
1887
  h.SHOW_TEXT | h.SHOW_COMMENT | h.SHOW_CDATA_SECTION | h.SHOW_PROCESSING_INSTRUCTION,
1885
1888
  null
@@ -1887,25 +1890,25 @@ function lr() {
1887
1890
  let g = d.nextNode();
1888
1891
  for (; g; )
1889
1892
  g.data = zt(g.data), g = d.nextNode();
1890
- const R = (o = t.querySelectorAll) === null || o === void 0 ? void 0 : o.call(t, "template");
1893
+ const R = (o = n.querySelectorAll) === null || o === void 0 ? void 0 : o.call(n, "template");
1891
1894
  R && Nt(R, (v) => {
1892
1895
  ft(v.content) && Qt(v.content);
1893
1896
  });
1894
- }, Gt = function(t) {
1895
- const o = K ? K(t) : null;
1896
- return typeof o != "string" || j(o) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
1897
+ }, Gt = function(n) {
1898
+ const o = K ? K(n) : null;
1899
+ return typeof o != "string" || j(o) !== "form" ? !1 : typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
1897
1900
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
1898
1901
  // makes the direct read diverge from the cached read; a clean form
1899
1902
  // (same-realm OR foreign-realm) has both reads pointing at the same
1900
1903
  // canonical NamedNodeMap.
1901
- t.attributes !== pe(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
1904
+ n.attributes !== pe(n) || typeof n.removeAttribute != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
1902
1905
  // returns the integer 1 for any Element regardless of realm; direct
1903
1906
  // read on a clobbered form (e.g. <input name="nodeType">) returns
1904
1907
  // the named child element. Cheap addition — nodeType is read from
1905
1908
  // an internal slot, no serialization cost — and removes a residual
1906
1909
  // clobbering surface used by several mXSS / PI / comment branches
1907
1910
  // in _sanitizeElements that compare currentNode.nodeType directly.
1908
- t.nodeType !== z(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
1911
+ n.nodeType !== z(n) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
1909
1912
  // "childNodes" shadows the prototype getter. Direct reads of
1910
1913
  // form.childNodes from a clobbered form return the named child
1911
1914
  // instead of the real NodeList, so any walk that reads it directly
@@ -1916,75 +1919,75 @@ function lr() {
1916
1919
  // select, etc.) regardless of whether the named child happens to
1917
1920
  // carry a numeric .length, which a typeof-based probe would miss
1918
1921
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
1919
- t.childNodes !== w(t);
1920
- }, ft = function(t) {
1921
- if (!z || typeof t != "object" || t === null)
1922
+ n.childNodes !== w(n);
1923
+ }, ft = function(n) {
1924
+ if (!z || typeof n != "object" || n === null)
1922
1925
  return !1;
1923
1926
  try {
1924
- return z(t) === Ie.documentFragment;
1927
+ return z(n) === Ie.documentFragment;
1925
1928
  } catch {
1926
1929
  return !1;
1927
1930
  }
1928
- }, wt = function(t) {
1929
- if (!z || typeof t != "object" || t === null)
1931
+ }, wt = function(n) {
1932
+ if (!z || typeof n != "object" || n === null)
1930
1933
  return !1;
1931
1934
  try {
1932
- return typeof z(t) == "number";
1935
+ return typeof z(n) == "number";
1933
1936
  } catch {
1934
1937
  return !1;
1935
1938
  }
1936
1939
  };
1937
- function Me(f, t, o) {
1940
+ function Me(f, n, o) {
1938
1941
  f.length !== 0 && Nt(f, (d) => {
1939
- d.call(n, t, o, c);
1942
+ d.call(t, n, o, c);
1940
1943
  });
1941
1944
  }
1942
- const hr = function(t, o) {
1943
- return !!(Ye && t.hasChildNodes() && !wt(t.firstElementChild) && ae(Zn, t.textContent) && ae(Zn, t.innerHTML) || Ye && t.namespaceURI === ee && o === "style" && wt(t.firstElementChild) || t.nodeType === Ie.processingInstruction || Ye && t.nodeType === Ie.comment && ae(sa, t.data));
1944
- }, _r = function(t, o) {
1945
+ const br = function(n, o) {
1946
+ return !!(Ye && n.hasChildNodes() && !wt(n.firstElementChild) && ae(Jn, n.textContent) && ae(Jn, n.innerHTML) || Ye && n.namespaceURI === ee && o === "style" && wt(n.firstElementChild) || n.nodeType === Ie.processingInstruction || Ye && n.nodeType === Ie.comment && ae(da, n.data));
1947
+ }, yr = function(n, o) {
1945
1948
  if (!Ne[o] && vn(o) && ($.tagNameCheck instanceof RegExp && ae($.tagNameCheck, o) || $.tagNameCheck instanceof Function && $.tagNameCheck(o)))
1946
1949
  return !1;
1947
1950
  if (Tt && !ge[o]) {
1948
- const d = N(t), g = w(t);
1951
+ const d = N(n), g = w(n);
1949
1952
  if (g && d) {
1950
1953
  const R = g.length;
1951
1954
  for (let v = R - 1; v >= 0; --v) {
1952
1955
  const te = ct ? g[v] : E(g[v], !0);
1953
- d.insertBefore(te, O(t));
1956
+ d.insertBefore(te, O(n));
1954
1957
  }
1955
1958
  }
1956
1959
  }
1957
- return ze(t), !0;
1958
- }, In = function(t) {
1959
- if (Me(F.beforeSanitizeElements, t, null), Gt(t))
1960
- return ze(t), !0;
1961
- const o = j(K ? K(t) : t.nodeName);
1962
- if (Me(F.uponSanitizeElement, t, {
1960
+ return ze(n), !0;
1961
+ }, In = function(n) {
1962
+ if (Me(F.beforeSanitizeElements, n, null), Gt(n))
1963
+ return ze(n), !0;
1964
+ const o = j(K ? K(n) : n.nodeName);
1965
+ if (Me(F.uponSanitizeElement, n, {
1963
1966
  tagName: o,
1964
1967
  allowedTags: P
1965
- }), hr(t, o))
1966
- return ze(t), !0;
1968
+ }), br(n, o))
1969
+ return ze(n), !0;
1967
1970
  if (Ne[o] || !(Ee.tagCheck instanceof Function && Ee.tagCheck(o)) && !P[o])
1968
- return _r(t, o);
1969
- if ((z ? z(t) : t.nodeType) === Ie.element && !Ht(t) || (o === "noscript" || o === "noembed" || o === "noframes") && ae(ia, t.innerHTML))
1970
- return ze(t), !0;
1971
- if (Ae && t.nodeType === Ie.text) {
1972
- const g = zt(t.textContent);
1973
- t.textContent !== g && (pt(n.removed, {
1974
- element: t.cloneNode()
1975
- }), t.textContent = g);
1971
+ return yr(n, o);
1972
+ if ((z ? z(n) : n.nodeType) === Ie.element && !Ht(n) || (o === "noscript" || o === "noembed" || o === "noframes") && ae(fa, n.innerHTML))
1973
+ return ze(n), !0;
1974
+ if (Ae && n.nodeType === Ie.text) {
1975
+ const g = zt(n.textContent);
1976
+ n.textContent !== g && (pt(t.removed, {
1977
+ element: n.cloneNode()
1978
+ }), n.textContent = g);
1976
1979
  }
1977
- return Me(F.afterSanitizeElements, t, null), !1;
1978
- }, Cn = function(t, o, d) {
1980
+ return Me(F.afterSanitizeElements, n, null), !1;
1981
+ }, Cn = function(n, o, d) {
1979
1982
  if (bt[o] || yt && (o === "id" || o === "name") && (d in r || d in y))
1980
1983
  return !1;
1981
- const g = Y[o] || Ee.attributeCheck instanceof Function && Ee.attributeCheck(o, t);
1984
+ const g = Y[o] || Ee.attributeCheck instanceof Function && Ee.attributeCheck(o, n);
1982
1985
  if (!($e && ae(gt, o))) {
1983
1986
  if (!(Lt && ae(qt, o))) {
1984
1987
  if (g) {
1985
1988
  if (!Et[o]) {
1986
1989
  if (!ae(Pe, kt(d, et, ""))) {
1987
- if (!((o === "src" || o === "xlink:href" || o === "href") && t !== "script" && Wn(d, "data:") === 0 && Dt[t])) {
1990
+ if (!((o === "src" || o === "xlink:href" || o === "href") && n !== "script" && $n(d, "data:") === 0 && Dt[n])) {
1988
1991
  if (!(rt && !ae(Ot, kt(d, et, "")))) {
1989
1992
  if (d)
1990
1993
  return !1;
@@ -1996,34 +1999,34 @@ function lr() {
1996
1999
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1997
2000
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1998
2001
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1999
- !(vn(t) && ($.tagNameCheck instanceof RegExp && ae($.tagNameCheck, t) || $.tagNameCheck instanceof Function && $.tagNameCheck(t)) && ($.attributeNameCheck instanceof RegExp && ae($.attributeNameCheck, o) || $.attributeNameCheck instanceof Function && $.attributeNameCheck(o, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2002
+ !(vn(n) && ($.tagNameCheck instanceof RegExp && ae($.tagNameCheck, n) || $.tagNameCheck instanceof Function && $.tagNameCheck(n)) && ($.attributeNameCheck instanceof RegExp && ae($.attributeNameCheck, o) || $.attributeNameCheck instanceof Function && $.attributeNameCheck(o, n)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2000
2003
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2001
2004
  o === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && ae($.tagNameCheck, d) || $.tagNameCheck instanceof Function && $.tagNameCheck(d)))
2002
2005
  ) return !1;
2003
2006
  }
2004
2007
  }
2005
2008
  return !0;
2006
- }, gr = C({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), vn = function(t) {
2007
- return !gr[Ct(t)] && ae(We, t);
2008
- }, br = function(t, o, d, g) {
2009
+ }, Tr = C({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), vn = function(n) {
2010
+ return !Tr[Ct(n)] && ae(We, n);
2011
+ }, Er = function(n, o, d, g) {
2009
2012
  if (U && typeof A == "object" && typeof A.getAttributeType == "function" && !d)
2010
- switch (A.getAttributeType(t, o)) {
2013
+ switch (A.getAttributeType(n, o)) {
2011
2014
  case "TrustedHTML":
2012
2015
  return b(g);
2013
2016
  case "TrustedScriptURL":
2014
2017
  return L(g);
2015
2018
  }
2016
2019
  return g;
2017
- }, yr = function(t, o, d, g) {
2020
+ }, Ar = function(n, o, d, g) {
2018
2021
  try {
2019
- d ? t.setAttributeNS(d, o, g) : t.setAttribute(o, g), Gt(t) ? ze(t) : Gn(n.removed);
2022
+ d ? n.setAttributeNS(d, o, g) : n.setAttribute(o, g), Gt(n) ? ze(n) : Bn(t.removed);
2020
2023
  } catch {
2021
- Je(o, t);
2024
+ Je(o, n);
2022
2025
  }
2023
- }, On = function(t) {
2024
- Me(F.beforeSanitizeAttributes, t, null);
2025
- const o = t.attributes;
2026
- if (!o || Gt(t))
2026
+ }, On = function(n) {
2027
+ Me(F.beforeSanitizeAttributes, n, null);
2028
+ const o = n.attributes;
2029
+ if (!o || Gt(n))
2027
2030
  return;
2028
2031
  const d = {
2029
2032
  attrName: "",
@@ -2033,47 +2036,47 @@ function lr() {
2033
2036
  forceKeepAttr: void 0
2034
2037
  };
2035
2038
  let g = o.length;
2036
- const R = j(t.nodeName);
2039
+ const R = j(n.nodeName);
2037
2040
  for (; g--; ) {
2038
2041
  const v = o[g], te = v.name, X = v.namespaceURI, Te = v.value, Se = j(te), tn = Te;
2039
- let le = te === "value" ? tn : Bo(tn);
2040
- if (d.attrName = Se, d.attrValue = le, d.keepAttr = !0, d.forceKeepAttr = void 0, Me(F.uponSanitizeAttribute, t, d), le = d.attrValue, Ve && (Se === "id" || Se === "name") && Wn(le, it) !== 0 && (Je(te, t), le = it + le), Ye && ae(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, le)) {
2041
- Je(te, t);
2042
+ let le = te === "value" ? tn : Ko(tn);
2043
+ if (d.attrName = Se, d.attrValue = le, d.keepAttr = !0, d.forceKeepAttr = void 0, Me(F.uponSanitizeAttribute, n, d), le = d.attrValue, Ve && (Se === "id" || Se === "name") && $n(le, it) !== 0 && (Je(te, n), le = it + le), Ye && ae(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, le)) {
2044
+ Je(te, n);
2042
2045
  continue;
2043
2046
  }
2044
- if (Se === "attributename" && Bn(le, "href")) {
2045
- Je(te, t);
2047
+ if (Se === "attributename" && Wn(le, "href")) {
2048
+ Je(te, n);
2046
2049
  continue;
2047
2050
  }
2048
2051
  if (!d.forceKeepAttr) {
2049
2052
  if (!d.keepAttr) {
2050
- Je(te, t);
2053
+ Je(te, n);
2051
2054
  continue;
2052
2055
  }
2053
- if (!Ue && ae(ca, le)) {
2054
- Je(te, t);
2056
+ if (!Ue && ae(pa, le)) {
2057
+ Je(te, n);
2055
2058
  continue;
2056
2059
  }
2057
2060
  if (Ae && (le = zt(le)), !Cn(R, Se, le)) {
2058
- Je(te, t);
2061
+ Je(te, n);
2059
2062
  continue;
2060
2063
  }
2061
- le = br(R, Se, X, le), le !== tn && yr(t, te, X, le);
2064
+ le = Er(R, Se, X, le), le !== tn && Ar(n, te, X, le);
2062
2065
  }
2063
2066
  }
2064
- Me(F.afterSanitizeAttributes, t, null);
2065
- }, Bt = function(t) {
2067
+ Me(F.afterSanitizeAttributes, n, null);
2068
+ }, Bt = function(n) {
2066
2069
  let o = null;
2067
- const d = Rn(t);
2068
- for (Me(F.beforeSanitizeShadowDOM, t, null); o = d.nextNode(); )
2070
+ const d = Rn(n);
2071
+ for (Me(F.beforeSanitizeShadowDOM, n, null); o = d.nextNode(); )
2069
2072
  if (Me(F.uponSanitizeShadowNode, o, null), In(o), On(o), ft(o.content) && Bt(o.content), (z ? z(o) : o.nodeType) === Ie.element) {
2070
2073
  const R = H(o);
2071
2074
  ft(R) && (en(R), Bt(R));
2072
2075
  }
2073
- Me(F.afterSanitizeShadowDOM, t, null);
2074
- }, en = function(t) {
2076
+ Me(F.afterSanitizeShadowDOM, n, null);
2077
+ }, en = function(n) {
2075
2078
  const o = [{
2076
- node: t,
2079
+ node: n,
2077
2080
  shadow: null
2078
2081
  }];
2079
2082
  for (; o.length > 0; ) {
@@ -2111,13 +2114,13 @@ function lr() {
2111
2114
  }
2112
2115
  }
2113
2116
  };
2114
- return n.sanitize = function(f) {
2115
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = null, d = null, g = null, R = null;
2116
- if (ut = !f, ut && (f = "<!-->"), typeof f != "string" && !wt(f) && (f = Ko(f), typeof f != "string"))
2117
+ return t.sanitize = function(f) {
2118
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = null, d = null, g = null, R = null;
2119
+ if (ut = !f, ut && (f = "<!-->"), typeof f != "string" && !wt(f) && (f = Jo(f), typeof f != "string"))
2117
2120
  throw Qe("dirty is not a string, aborting");
2118
- if (!n.isSupported)
2121
+ if (!t.isSupported)
2119
2122
  return f;
2120
- ot ? (P = je, Y = Fe) : ce(t), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (P = ue(P)), F.uponSanitizeAttribute.length > 0 && (Y = ue(Y)), n.removed = [];
2123
+ ot ? (P = je, Y = Fe) : ce(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (P = ue(P)), F.uponSanitizeAttribute.length > 0 && (Y = ue(Y)), t.removed = [];
2121
2124
  const v = ct && typeof f != "string" && wt(f);
2122
2125
  if (v) {
2123
2126
  const Te = K ? K(f) : f.nodeName;
@@ -2151,8 +2154,8 @@ function lr() {
2151
2154
  throw v && Nn(f), Te;
2152
2155
  }
2153
2156
  if (v)
2154
- return Nt(n.removed, (Te) => {
2155
- Te.element && mr(Te.element);
2157
+ return Nt(t.removed, (Te) => {
2158
+ Te.element && gr(Te.element);
2156
2159
  }), Ae && Qt(f), f;
2157
2160
  if (De) {
2158
2161
  if (Ae && Qt(o), Ke)
@@ -2163,35 +2166,35 @@ function lr() {
2163
2166
  return (Y.shadowroot || Y.shadowrootmode) && (R = xe.call(a, R, !0)), R;
2164
2167
  }
2165
2168
  let X = ke ? o.outerHTML : o.innerHTML;
2166
- return ke && P["!doctype"] && o.ownerDocument && o.ownerDocument.doctype && o.ownerDocument.doctype.name && ae(oa, o.ownerDocument.doctype.name) && (X = "<!DOCTYPE " + o.ownerDocument.doctype.name + `>
2169
+ return ke && P["!doctype"] && o.ownerDocument && o.ownerDocument.doctype && o.ownerDocument.doctype.name && ae(la, o.ownerDocument.doctype.name) && (X = "<!DOCTYPE " + o.ownerDocument.doctype.name + `>
2167
2170
  ` + X), Ae && (X = zt(X)), U && st ? b(X) : X;
2168
- }, n.setConfig = function() {
2171
+ }, t.setConfig = function() {
2169
2172
  let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2170
2173
  ce(f), ot = !0, je = P, Fe = Y;
2171
- }, n.clearConfig = function() {
2174
+ }, t.clearConfig = function() {
2172
2175
  c = null, ot = !1, je = null, Fe = null, U = me, q = "";
2173
- }, n.isValidAttribute = function(f, t, o) {
2176
+ }, t.isValidAttribute = function(f, n, o) {
2174
2177
  c || ce({});
2175
- const d = j(f), g = j(t);
2178
+ const d = j(f), g = j(n);
2176
2179
  return Cn(d, g, o);
2177
- }, n.addHook = function(f, t) {
2178
- typeof t == "function" && ne(F, f) && pt(F[f], t);
2179
- }, n.removeHook = function(f, t) {
2180
+ }, t.addHook = function(f, n) {
2181
+ typeof n == "function" && ne(F, f) && pt(F[f], n);
2182
+ }, t.removeHook = function(f, n) {
2180
2183
  if (ne(F, f)) {
2181
- if (t !== void 0) {
2182
- const o = zo(F[f], t);
2183
- return o === -1 ? void 0 : Go(F[f], o, 1)[0];
2184
+ if (n !== void 0) {
2185
+ const o = Yo(F[f], n);
2186
+ return o === -1 ? void 0 : jo(F[f], o, 1)[0];
2184
2187
  }
2185
- return Gn(F[f]);
2188
+ return Bn(F[f]);
2186
2189
  }
2187
- }, n.removeHooks = function(f) {
2190
+ }, t.removeHooks = function(f) {
2188
2191
  ne(F, f) && (F[f] = []);
2189
- }, n.removeAllHooks = function() {
2190
- F = Jn();
2191
- }, n;
2192
+ }, t.removeAllHooks = function() {
2193
+ F = Qn();
2194
+ }, t;
2192
2195
  }
2193
- var Yt = lr();
2194
- const da = [
2196
+ var Yt = fr();
2197
+ const _a = [
2195
2198
  "a",
2196
2199
  "b",
2197
2200
  "br",
@@ -2207,26 +2210,26 @@ const da = [
2207
2210
  "u",
2208
2211
  "ul"
2209
2212
  ];
2210
- function fa(e) {
2213
+ function ga(e) {
2211
2214
  e.hasAttribute("href") && (e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"));
2212
2215
  }
2213
- function pa(e) {
2214
- Yt.addHook("afterSanitizeAttributes", fa);
2215
- const n = Yt.sanitize(e, {
2216
- ALLOWED_TAGS: [...da]
2216
+ function ba(e) {
2217
+ Yt.addHook("afterSanitizeAttributes", ga);
2218
+ const t = Yt.sanitize(e, {
2219
+ ALLOWED_TAGS: [..._a]
2217
2220
  });
2218
- return Yt.removeHook("afterSanitizeAttributes"), n;
2221
+ return Yt.removeHook("afterSanitizeAttributes"), t;
2219
2222
  }
2220
- function ma(e) {
2223
+ function ya(e) {
2221
2224
  return Yt.sanitize(e, { ALLOWED_TAGS: [] });
2222
2225
  }
2223
2226
  class En extends Error {
2224
- constructor(n, r) {
2225
- super(`HTTP ${n}: ${r}`), this.name = "HttpError", this.status = n, this.statusText = r;
2227
+ constructor(t, r) {
2228
+ super(`HTTP ${t}: ${r}`), this.name = "HttpError", this.status = t, this.statusText = r;
2226
2229
  }
2227
2230
  }
2228
- async function ur(e, n, r, a = {}) {
2229
- const { authorizationToken: l, headers: s, ...u } = a, m = await fetch(n, {
2231
+ async function pr(e, t, r, a = {}) {
2232
+ const { authorizationToken: l, headers: s, ...u } = a, m = await fetch(t, {
2230
2233
  method: e,
2231
2234
  headers: {
2232
2235
  "Content-Type": "application/json",
@@ -2240,20 +2243,20 @@ async function ur(e, n, r, a = {}) {
2240
2243
  throw new En(m.status, m.statusText);
2241
2244
  return m.json();
2242
2245
  }
2243
- const dr = (e, n, r, a) => ur("GET", e, void 0, { signal: r, authorizationToken: a }), An = (e, n, r = {}) => ur("POST", e, n, r);
2246
+ const mr = (e, t, r, a) => pr("GET", e, void 0, { signal: r, authorizationToken: a }), An = (e, t, r = {}) => pr("POST", e, t, r);
2244
2247
  function gn(e) {
2245
2248
  if (e === "") return "";
2246
2249
  try {
2247
- const n = JSON.parse(e);
2248
- return typeof n == "string" ? n : String(n ?? "");
2250
+ const t = JSON.parse(e);
2251
+ return typeof t == "string" ? t : String(t ?? "");
2249
2252
  } catch {
2250
2253
  return e;
2251
2254
  }
2252
2255
  }
2253
- function ha(e) {
2256
+ function Ta(e) {
2254
2257
  return e.includes("/chat/agent-completions");
2255
2258
  }
2256
- function fr(e) {
2259
+ function hr(e) {
2257
2260
  return /\/conversations(?:\/|$)/.test(e.replace(/\?.*$/, ""));
2258
2261
  }
2259
2262
  const It = {
@@ -2268,18 +2271,18 @@ const It = {
2268
2271
  { server: "statsapi", tools: ["*"] },
2269
2272
  { server: "arbormis", tools: ["create_pdf", "academic_date_range_finder"] }
2270
2273
  ]
2271
- }, bn = "user", _a = "assistant", ga = "system";
2272
- function ba({
2274
+ }, bn = "user", Ea = "assistant", Aa = "system";
2275
+ function Sa({
2273
2276
  chatId: e,
2274
- userMessage: n,
2277
+ userMessage: t,
2275
2278
  chatHistory: r = [],
2276
2279
  config: a = {}
2277
2280
  }) {
2278
2281
  const l = a.model ?? It.model, s = a.agentName ?? It.agentName, u = a.systemPrompt ?? It.systemPrompt, m = a.modelKwargs ?? It.modelKwargs, h = a.mcps ?? [...It.mcps], p = !e && r.length === 0, A = {
2279
2282
  messages: p ? [
2280
- { role: ga, content: u },
2281
- { role: bn, content: n }
2282
- ] : [{ role: bn, content: n }],
2283
+ { role: Aa, content: u },
2284
+ { role: bn, content: t }
2285
+ ] : [{ role: bn, content: t }],
2283
2286
  model: l,
2284
2287
  model_kwargs: m,
2285
2288
  mcps: h,
@@ -2291,10 +2294,10 @@ function ba({
2291
2294
  };
2292
2295
  return e && (A.chat_id = e), p && (A.auto_title = !1), A;
2293
2296
  }
2294
- function ya(e) {
2295
- const n = e.trim();
2296
- if (!n.startsWith("data:")) return null;
2297
- const r = n.slice(5).trim();
2297
+ function wa(e) {
2298
+ const t = e.trim();
2299
+ if (!t.startsWith("data:")) return null;
2300
+ const r = t.slice(5).trim();
2298
2301
  if (!r) return null;
2299
2302
  try {
2300
2303
  return JSON.parse(r);
@@ -2302,7 +2305,7 @@ function ya(e) {
2302
2305
  return null;
2303
2306
  }
2304
2307
  }
2305
- async function Ta(e) {
2308
+ async function Na(e) {
2306
2309
  var p, T, A;
2307
2310
  if ((e.headers.get("content-type") ?? "").includes("application/json")) {
2308
2311
  const E = (p = (await e.json()).items) == null ? void 0 : p[0];
@@ -2329,7 +2332,7 @@ async function Ta(e) {
2329
2332
  h = !0;
2330
2333
  continue;
2331
2334
  }
2332
- const N = ya(w);
2335
+ const N = wa(w);
2333
2336
  if (!N) continue;
2334
2337
  if (N.error || h)
2335
2338
  throw new Error(
@@ -2342,16 +2345,16 @@ async function Ta(e) {
2342
2345
  }
2343
2346
  return s ? { text: s, chatId: u, messageId: m } : null;
2344
2347
  }
2345
- async function Ea({
2348
+ async function ka({
2346
2349
  chatUrl: e,
2347
- chatId: n,
2350
+ chatId: t,
2348
2351
  userMessage: r,
2349
2352
  chatHistory: a,
2350
2353
  authorizationToken: l,
2351
2354
  config: s
2352
2355
  }) {
2353
- const u = ba({
2354
- chatId: n,
2356
+ const u = Sa({
2357
+ chatId: t,
2355
2358
  userMessage: r,
2356
2359
  chatHistory: a,
2357
2360
  config: s
@@ -2367,58 +2370,58 @@ async function Ea({
2367
2370
  });
2368
2371
  if (!m.ok)
2369
2372
  throw new En(m.status, m.statusText);
2370
- return Ta(m);
2373
+ return Na(m);
2371
2374
  }
2372
- function Aa(e) {
2375
+ function Ra(e) {
2373
2376
  switch (e) {
2374
2377
  case 401:
2375
2378
  return {
2376
- text: lo,
2379
+ text: ho,
2377
2380
  type: ve
2378
2381
  };
2379
2382
  case 403:
2380
2383
  return {
2381
- text: uo,
2384
+ text: _o,
2382
2385
  type: ve
2383
2386
  };
2384
2387
  case 404:
2385
2388
  return {
2386
- text: fo,
2389
+ text: go,
2387
2390
  type: ve
2388
2391
  };
2389
2392
  case 408:
2390
2393
  case 504:
2391
2394
  return {
2392
- text: po,
2395
+ text: bo,
2393
2396
  type: Kt
2394
2397
  };
2395
2398
  case 429:
2396
2399
  return {
2397
- text: mo,
2400
+ text: yo,
2398
2401
  type: Kt
2399
2402
  };
2400
2403
  default:
2401
2404
  return e >= 500 ? {
2402
- text: ho,
2405
+ text: To,
2403
2406
  type: ve
2404
2407
  } : {
2405
- text: ar,
2408
+ text: cr,
2406
2409
  type: ve
2407
2410
  };
2408
2411
  }
2409
2412
  }
2410
- function Sa(e) {
2411
- return e instanceof En ? Aa(e.status) : e instanceof TypeError ? {
2412
- text: _o,
2413
+ function Ia(e) {
2414
+ return e instanceof En ? Ra(e.status) : e instanceof TypeError ? {
2415
+ text: Eo,
2413
2416
  type: ve
2414
2417
  } : {
2415
- text: ar,
2418
+ text: cr,
2416
2419
  type: ve
2417
2420
  };
2418
2421
  }
2419
- const wa = 55e3, yn = "fallback", Na = async ({
2422
+ const Ca = 55e3, yn = "fallback", va = async ({
2420
2423
  chatId: e = void 0,
2421
- chatUrl: n,
2424
+ chatUrl: t,
2422
2425
  userMessage: r,
2423
2426
  userInputDeviceLastUsed: a,
2424
2427
  chatHistory: l,
@@ -2428,9 +2431,9 @@ const wa = 55e3, yn = "fallback", Na = async ({
2428
2431
  }) => {
2429
2432
  let h;
2430
2433
  try {
2431
- if (ha(n)) {
2432
- const w = await Ea({
2433
- chatUrl: n,
2434
+ if (Ta(t)) {
2435
+ const w = await ka({
2436
+ chatUrl: t,
2434
2437
  chatId: e,
2435
2438
  userMessage: r,
2436
2439
  chatHistory: l,
@@ -2451,7 +2454,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2451
2454
  chatHistory: l,
2452
2455
  canvasHistory: s
2453
2456
  }, E = new AbortController(), k = An(
2454
- n,
2457
+ t,
2455
2458
  _,
2456
2459
  { authorizationToken: u, signal: E.signal }
2457
2460
  ), O = new Promise(
@@ -2465,12 +2468,12 @@ const wa = 55e3, yn = "fallback", Na = async ({
2465
2468
  }
2466
2469
  ]
2467
2470
  });
2468
- }, wa)
2471
+ }, Ca)
2469
2472
  );
2470
2473
  h = await Promise.race([k, O]);
2471
2474
  } catch (_) {
2472
2475
  console.error("Error in getNewAgentMessage", _);
2473
- const { text: E, type: k } = Sa(_);
2476
+ const { text: E, type: k } = Ia(_);
2474
2477
  return {
2475
2478
  text: E,
2476
2479
  type: k,
@@ -2492,11 +2495,11 @@ const wa = 55e3, yn = "fallback", Na = async ({
2492
2495
  type: p.type,
2493
2496
  ...p.element != null && { element: p.element }
2494
2497
  };
2495
- }, ka = (e) => new Date(e).toLocaleDateString("en-GB", {
2498
+ }, Oa = (e) => new Date(e).toLocaleDateString("en-GB", {
2496
2499
  day: "numeric",
2497
2500
  month: "short",
2498
2501
  year: "numeric"
2499
- }), Ra = [
2502
+ }), La = [
2500
2503
  {
2501
2504
  field: "title",
2502
2505
  headerName: "Conversation",
@@ -2506,28 +2509,28 @@ const wa = 55e3, yn = "fallback", Na = async ({
2506
2509
  field: "updatedAt",
2507
2510
  headerName: "Last Conversation",
2508
2511
  width: 140,
2509
- valueFormatter: ({ value: e }) => ka(e)
2512
+ valueFormatter: ({ value: e }) => Oa(e)
2510
2513
  }
2511
- ], Ia = {
2514
+ ], Da = {
2512
2515
  sortable: !1,
2513
2516
  filter: !1,
2514
2517
  resizable: !1,
2515
2518
  editable: !1,
2516
2519
  suppressHeaderMenuButton: !0
2517
- }, fn = "NONE", Ca = "KEYBOARD", va = "VOICE", Oa = "MIXED", La = 2e4, Da = 15, Ma = (e, n) => new Promise((r) => {
2518
- if (n != null && n.aborted) {
2520
+ }, fn = "NONE", Ma = "KEYBOARD", xa = "VOICE", Pa = "MIXED", Ua = 2e4, Fa = 15, Ha = (e, t) => new Promise((r) => {
2521
+ if (t != null && t.aborted) {
2519
2522
  r(!1);
2520
2523
  return;
2521
2524
  }
2522
2525
  const a = setTimeout(() => {
2523
- n == null || n.removeEventListener("abort", l), r(!0);
2526
+ t == null || t.removeEventListener("abort", l), r(!0);
2524
2527
  }, e), l = () => {
2525
2528
  clearTimeout(a), r(!1);
2526
2529
  };
2527
- n == null || n.addEventListener("abort", l);
2528
- }), ja = ({
2530
+ t == null || t.addEventListener("abort", l);
2531
+ }), za = ({
2529
2532
  title: e,
2530
- connector: n,
2533
+ connector: t,
2531
2534
  newChatUrl: r,
2532
2535
  lockConversation: a = !1,
2533
2536
  messageLimit: l,
@@ -2564,12 +2567,12 @@ const wa = 55e3, yn = "fallback", Na = async ({
2564
2567
  }
2565
2568
  })(), de = x(!1), b = (c) => {
2566
2569
  de.current = c;
2567
- }, L = Ro(), B = x(null), re = x(null), D = x(null), W = x(null), he = x(null), Le = x(null), [xe, F] = M(
2570
+ }, L = Lo(), B = x(null), re = x(null), D = x(null), W = x(null), he = x(null), Le = x(null), [xe, F] = M(
2568
2571
  () => s ? "" : _ ?? ""
2569
2572
  ), [oe, _t] = M(s), [Q, gt] = M([]), [qt, Ot] = M([]), et = (c) => {
2570
2573
  (!de.current || c.id === "DEEP_THINKING_MESSAGE") && gt((y) => [...y, c]);
2571
- }, [We, Pe] = M(!1), [P, tt] = M(!1), [Y, nt] = M(!1), $ = x(!1), Ne = x(null), bt = x(!1), [Ee, Lt] = M(!1), [$e, rt] = M(fn), [Ue, Ae] = M(!1), [Ye, ke] = M(!0), [ot, je] = M(!1), [Fe, at] = M("getting-started"), [De, Ke] = M([]), [st, yt] = M(!1), Ve = Co(l, 0), it = Ve > 0 && Q.length >= Ve, Tt = We || P;
2572
- ko(() => {
2574
+ }, [We, Pe] = M(!1), [P, tt] = M(!1), [Y, nt] = M(!1), $ = x(!1), Ne = x(null), bt = x(!1), [Ee, Lt] = M(!1), [$e, rt] = M(fn), [Ue, Ae] = M(!1), [Ye, ke] = M(!0), [ot, je] = M(!1), [Fe, at] = M("getting-started"), [De, Ke] = M([]), [st, yt] = M(!1), Ve = Mo(l, 0), it = Ve > 0 && Q.length >= Ve, Tt = We || P;
2575
+ Oo(() => {
2573
2576
  if (!!(_ != null && _.trim()) && !s || J == null && !_) return;
2574
2577
  const y = setTimeout(() => {
2575
2578
  var I;
@@ -2598,9 +2601,9 @@ const wa = 55e3, yn = "fallback", Na = async ({
2598
2601
  p && p.length > 0 && gt(p);
2599
2602
  }, [p]);
2600
2603
  const Xe = async (c = oe) => {
2601
- if (!n.canLoadHistory || !c) return;
2604
+ if (!t.canLoadHistory || !c) return;
2602
2605
  tt(!0);
2603
- const y = await n.loadHistory(c);
2606
+ const y = await t.loadHistory(c);
2604
2607
  if (L.current) {
2605
2608
  if (JSON.stringify(y) === JSON.stringify(Q) || !y) {
2606
2609
  tt(!1);
@@ -2612,15 +2615,15 @@ const wa = 55e3, yn = "fallback", Na = async ({
2612
2615
  V(() => {
2613
2616
  A && !de.current && Xe();
2614
2617
  }, [A]), V(() => {
2615
- L.current && n.canLoadHistory && s && (Ee || Xe(s));
2616
- }, [s, n.canLoadHistory, Ee]), er(() => {
2618
+ L.current && t.canLoadHistory && s && (Ee || Xe(s));
2619
+ }, [s, t.canLoadHistory, Ee]), nr(() => {
2617
2620
  D.current && D.current.scrollTo({
2618
2621
  top: D.current.scrollHeight,
2619
2622
  behavior: "smooth"
2620
2623
  });
2621
2624
  }, [Q]);
2622
2625
  const Et = (c) => {
2623
- const y = Oo(c), I = /\['Canvas_Element_ID'\s*:\s*'([^']+)',\s*'Title'\s*:\s*'([^']+)'\]/g;
2626
+ const y = Po(c), I = /\['Canvas_Element_ID'\s*:\s*'([^']+)',\s*'Title'\s*:\s*'([^']+)'\]/g;
2624
2627
  return y.replace(
2625
2628
  I,
2626
2629
  (ce, ye, fe) => `<span class="chat-panel__message-tag">@${fe}</span>`
@@ -2633,7 +2636,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2633
2636
  const ce = new Set(Q.map(({ id: Ft }) => Ft));
2634
2637
  let ye = 0, fe;
2635
2638
  for (; ye < c; ) {
2636
- if (I != null && I.aborted || !await Ma(La, I) || (fe = await Xe(y), I != null && I.aborted)) return;
2639
+ if (I != null && I.aborted || !await Ha(Ua, I) || (fe = await Xe(y), I != null && I.aborted)) return;
2637
2640
  if (((fe == null ? void 0 : fe.chatItems) || []).some(
2638
2641
  (Ht) => Ht.type !== ht && !ce.has(Ht.id)
2639
2642
  )) break;
@@ -2641,7 +2644,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2641
2644
  }
2642
2645
  if (Number.isFinite(c) && ye >= c) {
2643
2646
  et({
2644
- text: go,
2647
+ text: Ao,
2645
2648
  id: yn,
2646
2649
  type: ve
2647
2650
  });
@@ -2655,7 +2658,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2655
2658
  }, 0);
2656
2659
  }, lt = async (c) => {
2657
2660
  Ot(null), Pe(!0);
2658
- const y = await n.sendMessage({
2661
+ const y = await t.sendMessage({
2659
2662
  chatId: oe,
2660
2663
  userMessage: c,
2661
2664
  userInputDeviceLastUsed: $e,
@@ -2672,7 +2675,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2672
2675
  Ne.current = new AbortController();
2673
2676
  try {
2674
2677
  await Mt({
2675
- maxAttempts: Da,
2678
+ maxAttempts: Fa,
2676
2679
  chatIdToFetch: I,
2677
2680
  signal: Ne.current.signal
2678
2681
  });
@@ -2683,11 +2686,11 @@ const wa = 55e3, yn = "fallback", Na = async ({
2683
2686
  return;
2684
2687
  }
2685
2688
  if (y.hardStopped === !0) {
2686
- !$.current && n.canSendNotification && oe && await n.sendNotification({ chatId: oe }) && ($.current = !0), L.current && (nt(!0), Pe(!1), Re());
2689
+ !$.current && t.canSendNotification && oe && await t.sendNotification({ chatId: oe }) && ($.current = !0), L.current && (nt(!0), Pe(!1), Re());
2687
2690
  return;
2688
2691
  }
2689
2692
  et({
2690
- text: pa(y.text),
2693
+ text: ba(y.text),
2691
2694
  type: y.type,
2692
2695
  id: y.id,
2693
2696
  ...y.element != null && { element: y.element }
@@ -2698,7 +2701,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2698
2701
  } = {}) => {
2699
2702
  var ye;
2700
2703
  let I = null;
2701
- if (c != null && c.trim() !== "" && (I = c.trim()), I === null && (I = ma(xe).trim()), !I || We || P) return;
2704
+ if (c != null && c.trim() !== "" && (I = c.trim()), I === null && (I = ya(xe).trim()), !I || We || P) return;
2702
2705
  const ce = Q.slice().reverse().find((fe) => fe.type === ht);
2703
2706
  if (!y && ce && ce.text === I) {
2704
2707
  console.warn("Duplicate message detected, not adding:", I);
@@ -2707,7 +2710,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2707
2710
  (ye = Le.current) == null || ye.cancel(), be(), nt(!1), $.current = !1, et({
2708
2711
  type: ht,
2709
2712
  text: I,
2710
- id: Io()
2713
+ id: Do()
2711
2714
  }), F(""), Re(), b(!1), await lt(I), rt(fn);
2712
2715
  };
2713
2716
  V(() => {
@@ -2720,7 +2723,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2720
2723
  }, []);
2721
2724
  const be = () => {
2722
2725
  he.current && (he.current.stop(), he.current = null), Ae(!1), W.current && (clearTimeout(W.current), W.current = null);
2723
- }, ut = Ir((c) => {
2726
+ }, ut = Dr((c) => {
2724
2727
  be(), c.trim().length > 0 && Ye && ee();
2725
2728
  }, h);
2726
2729
  Le.current = ut;
@@ -2730,12 +2733,12 @@ const wa = 55e3, yn = "fallback", Na = async ({
2730
2733
  return;
2731
2734
  }
2732
2735
  if ($e !== c) {
2733
- rt(Oa);
2736
+ rt(Pa);
2734
2737
  return;
2735
2738
  }
2736
2739
  }, Xt = () => {
2737
2740
  if (We || P) return;
2738
- dt(va), ke(!0);
2741
+ dt(xa), ke(!0);
2739
2742
  const c = new window.webkitSpeechRecognition();
2740
2743
  he.current = c, c.continuous = !0, c.interimResults = !0, c.lang = m, c.start(), c.onstart = () => {
2741
2744
  Ae(!0);
@@ -2755,9 +2758,9 @@ const wa = 55e3, yn = "fallback", Na = async ({
2755
2758
  },
2756
2759
  []
2757
2760
  ), V(() => {
2758
- if (!n.canListInteractions) return;
2761
+ if (!t.canListInteractions) return;
2759
2762
  let c = !1;
2760
- return yt(!0), n.listInteractions().then((y) => {
2763
+ return yt(!0), t.listInteractions().then((y) => {
2761
2764
  c || Ke(y ?? []);
2762
2765
  }).catch(() => {
2763
2766
  c || Ke([]);
@@ -2766,7 +2769,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2766
2769
  }), () => {
2767
2770
  c = !0;
2768
2771
  };
2769
- }, [n]);
2772
+ }, [t]);
2770
2773
  const Pt = () => E != null && E.length ? E.map((c) => {
2771
2774
  let y = c.url;
2772
2775
  return oe && y.includes("/chat-id/") && (y.match(/\/chat-id\/[^/]+$/) || (y = `${y}${oe}`)), {
@@ -2776,7 +2779,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2776
2779
  icon: c.icon
2777
2780
  };
2778
2781
  }) : [], St = (c) => {
2779
- c.key !== "Enter" && (dt(Ca), Ue && ke(!1), c.key === "/" && xe.length === 0 && (E != null && E.length) && (je(!0), c.preventDefault())), c.key === "Enter" && !c.shiftKey && (c.preventDefault(), At && ee({ allowDoubleMessage: !0 })), c.key === "Escape" && ot && je(!1);
2782
+ c.key !== "Enter" && (dt(Ma), Ue && ke(!1), c.key === "/" && xe.length === 0 && (E != null && E.length) && (je(!0), c.preventDefault())), c.key === "Enter" && !c.shiftKey && (c.preventDefault(), At && ee({ allowDoubleMessage: !0 })), c.key === "Escape" && ot && je(!1);
2780
2783
  }, Zt = () => {
2781
2784
  je(!1), setTimeout(() => {
2782
2785
  var c;
@@ -2786,13 +2789,13 @@ const wa = 55e3, yn = "fallback", Na = async ({
2786
2789
  F(c), setTimeout(() => {
2787
2790
  B.current && (B.current.focus(), B.current.selectionStart = B.current.value.length, B.current.selectionEnd = B.current.value.length);
2788
2791
  }, 0);
2789
- }, []), Jt = Wt(async () => !n.canSendNotification || !oe ? !1 : n.sendNotification({ chatId: oe }), [oe, n]), Ut = Wt(() => {
2792
+ }, []), Jt = Wt(async () => !t.canSendNotification || !oe ? !1 : t.sendNotification({ chatId: oe }), [oe, t]), Ut = Wt(() => {
2790
2793
  nt(!1), U == null || U();
2791
2794
  }, [U]), j = Wt(
2792
2795
  (c, y) => {
2793
- oe && n.rateMessage({ rating: c, messageId: y, chatId: oe });
2796
+ oe && t.rateMessage({ rating: c, messageId: y, chatId: oe });
2794
2797
  },
2795
- [oe, n]
2798
+ [oe, t]
2796
2799
  );
2797
2800
  return /* @__PURE__ */ S("section", { "aria-label": e ? `Chat Panel: ${e}` : "Chat Panel", className: "chat-panel", children: [
2798
2801
  r && Q.length > 0 && /* @__PURE__ */ i("section", { className: "chat-panel__active-chat-header", children: /* @__PURE__ */ i(
@@ -2818,14 +2821,14 @@ const wa = 55e3, yn = "fallback", Na = async ({
2818
2821
  Q.map((c, y) => {
2819
2822
  const I = y === Q.length - 1, ce = I ? qt : void 0, ye = c.id === yn, fe = I;
2820
2823
  return /* @__PURE__ */ i(
2821
- co,
2824
+ mo,
2822
2825
  {
2823
2826
  id: c.id,
2824
2827
  type: c.type,
2825
2828
  text: c.text,
2826
2829
  chatId: oe,
2827
- onRate: n.canRate ? j : void 0,
2828
- ratingPopupUrls: n.ratingPopupUrls,
2830
+ onRate: t.canRate ? j : void 0,
2831
+ ratingPopupUrls: t.ratingPopupUrls,
2829
2832
  showRating: fe,
2830
2833
  followUpPrompts: ce,
2831
2834
  onFollowUpPromptClick: Ze,
@@ -2837,9 +2840,9 @@ const wa = 55e3, yn = "fallback", Na = async ({
2837
2840
  );
2838
2841
  }),
2839
2842
  Tt && /* @__PURE__ */ i(
2840
- No,
2843
+ vo,
2841
2844
  {
2842
- showNotifyLaterButton: n.canSendNotification && !!oe,
2845
+ showNotifyLaterButton: t.canSendNotification && !!oe,
2843
2846
  onNotifyLater: Jt,
2844
2847
  onNotificationRegisteredGotIt: Ut
2845
2848
  }
@@ -2875,14 +2878,14 @@ const wa = 55e3, yn = "fallback", Na = async ({
2875
2878
  !a && !it && /* @__PURE__ */ S(we, { children: [
2876
2879
  Q.length === 0 && !P && /* @__PURE__ */ S("div", { className: "chat-panel__chat-intro", children: [
2877
2880
  /* @__PURE__ */ S("div", { className: "chat-panel__chat-intro-frame", children: [
2878
- /* @__PURE__ */ i("span", { className: "chat-panel__chat-intro-icon", children: /* @__PURE__ */ i(Cr, {}) }),
2881
+ /* @__PURE__ */ i("span", { className: "chat-panel__chat-intro-icon", children: /* @__PURE__ */ i(Mr, {}) }),
2879
2882
  /* @__PURE__ */ i("h3", { className: "chat-panel__chat-intro-heading", children: z })
2880
2883
  ] }),
2881
2884
  /* @__PURE__ */ i("p", { className: "chat-panel__chat-intro-body", children: K })
2882
2885
  ] }),
2883
2886
  /* @__PURE__ */ i("div", { className: "chat-panel__input-container", children: /* @__PURE__ */ S("div", { className: "chat-panel__input-wrapper", ref: re, children: [
2884
2887
  ot && /* @__PURE__ */ i(
2885
- sr,
2888
+ lr,
2886
2889
  {
2887
2890
  anchorRef: re,
2888
2891
  menuItems: Pt(),
@@ -2891,7 +2894,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2891
2894
  }
2892
2895
  ),
2893
2896
  /* @__PURE__ */ i(
2894
- or,
2897
+ ir,
2895
2898
  {
2896
2899
  ref: B,
2897
2900
  value: xe,
@@ -2951,7 +2954,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
2951
2954
  /* @__PURE__ */ S("div", { className: "chat-panel__tab-content", children: [
2952
2955
  Fe === "getting-started" && /* @__PURE__ */ S(we, { children: [
2953
2956
  G.length > 0 && /* @__PURE__ */ i("div", { className: "chat-panel__sample-prompt-container", children: /* @__PURE__ */ i(
2954
- Lr,
2957
+ Ur,
2955
2958
  {
2956
2959
  onSelectPrompt: (c) => {
2957
2960
  ee({
@@ -3001,18 +3004,18 @@ const wa = 55e3, yn = "fallback", Na = async ({
3001
3004
  ] })
3002
3005
  ] }),
3003
3006
  Fe === "recent" && /* @__PURE__ */ i("div", { className: "chat-panel__tab-panel--recent", children: st ? /* @__PURE__ */ i("div", { className: "chat-panel__ai-interactions-loading", children: "Loading..." }) : De.length === 0 ? /* @__PURE__ */ i("div", { className: "chat-panel__ai-interactions-empty", children: "No previous chats found." }) : /* @__PURE__ */ i(
3004
- Er,
3007
+ kr,
3005
3008
  {
3006
3009
  wrapperClassName: "chat-panel__ai-interactions-table",
3007
3010
  hasSearch: !1,
3008
3011
  tableTheme: "tidy",
3009
3012
  domLayout: "autoHeight",
3010
3013
  rowData: De,
3011
- columnDefs: Ra,
3012
- defaultColDef: Ia,
3014
+ columnDefs: La,
3015
+ defaultColDef: Da,
3013
3016
  getRowId: ({ data: c }) => c.id,
3014
3017
  onRowClicked: ({ data: c }) => {
3015
- !c || !n.canLoadHistory || (_t(c.chatId), Xe(c.chatId));
3018
+ !c || !t.canLoadHistory || (_t(c.chatId), Xe(c.chatId));
3016
3019
  }
3017
3020
  }
3018
3021
  ) })
@@ -3021,33 +3024,63 @@ const wa = 55e3, yn = "fallback", Na = async ({
3021
3024
  it && /* @__PURE__ */ i("div", { className: "chat-panel-footer", children: "You've reached the maximum number of messages for this conversation" })
3022
3025
  ] });
3023
3026
  };
3024
- function xa(e) {
3027
+ class Ga {
3028
+ constructor() {
3029
+ Ln(this, "events");
3030
+ this.events = {};
3031
+ }
3032
+ subscribe(t, r) {
3033
+ const a = crypto.randomUUID();
3034
+ return this.events[t] = this.events[t] ?? {}, this.events[t][a] = r, a;
3035
+ }
3036
+ unsubscribe(t, r) {
3037
+ typeof this.events[t] < "u" && delete this.events[t][r];
3038
+ }
3039
+ publish(t, r) {
3040
+ this.events[t] && Object.keys(this.events[t]).forEach((a) => {
3041
+ const l = this.events[t][a];
3042
+ l == null || l(r);
3043
+ });
3044
+ }
3045
+ }
3046
+ const er = new Ga();
3047
+ function es({ isOpen: e, ...t }) {
3048
+ const { onClose: r } = t;
3049
+ return V(() => {
3050
+ const a = er.subscribe("ds-remove-slideover", () => r == null ? void 0 : r());
3051
+ return () => er.unsubscribe("ds-remove-slideover", a);
3052
+ }, [r]), e ? rr(
3053
+ /* @__PURE__ */ i(Rr, { children: /* @__PURE__ */ i("div", { className: "ask-arbor-widget__panel", children: /* @__PURE__ */ i(za, { ...t, focusDelay: 200 }) }) }),
3054
+ document.body
3055
+ ) : null;
3056
+ }
3057
+ function Ba(e) {
3025
3058
  switch (e.toLowerCase()) {
3026
3059
  case bn:
3027
3060
  return ht;
3028
- case _a:
3061
+ case Ea:
3029
3062
  return jt;
3030
3063
  default:
3031
3064
  return null;
3032
3065
  }
3033
3066
  }
3034
- function Pa(e) {
3035
- const n = [];
3067
+ function Wa(e) {
3068
+ const t = [];
3036
3069
  for (const r of e.messages ?? []) {
3037
- const a = xa(r.role);
3038
- !a || !r.content || n.push({
3070
+ const a = Ba(r.role);
3071
+ !a || !r.content || t.push({
3039
3072
  id: r.message_id,
3040
3073
  type: a,
3041
3074
  text: r.content
3042
3075
  });
3043
3076
  }
3044
- return { chatItems: n, followUpPrompts: [] };
3077
+ return { chatItems: t, followUpPrompts: [] };
3045
3078
  }
3046
- const Ua = async (e, n) => {
3079
+ const $a = async (e, t) => {
3047
3080
  try {
3048
- const r = await dr(e, void 0, void 0, n);
3049
- if (fr(e) && Array.isArray(r == null ? void 0 : r.messages))
3050
- return Pa(r);
3081
+ const r = await mr(e, void 0, void 0, t);
3082
+ if (hr(e) && Array.isArray(r == null ? void 0 : r.messages))
3083
+ return Wa(r);
3051
3084
  if (!(r != null && r.items))
3052
3085
  return console.error("Invalid response in getHistoricMessages", e, r), { chatItems: [], followUpPrompts: [] };
3053
3086
  let a = [], l = [];
@@ -3082,43 +3115,43 @@ const Ua = async (e, n) => {
3082
3115
  } catch (r) {
3083
3116
  return console.error("Error in getHistoricMessages", r, e), { chatItems: [], followUpPrompts: [] };
3084
3117
  }
3085
- }, Fa = async ({
3118
+ }, Ya = async ({
3086
3119
  rating: e,
3087
- messageId: n,
3120
+ messageId: t,
3088
3121
  chatId: r,
3089
3122
  ratingUrl: a,
3090
3123
  authorizationToken: l
3091
3124
  }) => {
3092
3125
  try {
3093
- await An(a, { messageId: n, rating: e, chatId: r }, { authorizationToken: l });
3126
+ await An(a, { messageId: t, rating: e, chatId: r }, { authorizationToken: l });
3094
3127
  } catch (s) {
3095
3128
  console.error("Error rating message", s);
3096
3129
  }
3097
- }, Ha = async ({
3130
+ }, ja = async ({
3098
3131
  chatId: e,
3099
- notificationCallbackUrl: n,
3132
+ notificationCallbackUrl: t,
3100
3133
  authorizationToken: r
3101
3134
  }) => {
3102
3135
  try {
3103
- return await An(n, { chatId: e }, { authorizationToken: r }), !0;
3136
+ return await An(t, { chatId: e }, { authorizationToken: r }), !0;
3104
3137
  } catch (a) {
3105
3138
  return console.error("Error sending notification", a), !1;
3106
3139
  }
3107
3140
  };
3108
- function za(e) {
3109
- return (e.conversations ?? []).map((n) => {
3141
+ function Ka(e) {
3142
+ return (e.conversations ?? []).map((t) => {
3110
3143
  var r, a;
3111
3144
  return {
3112
- id: n.session_id,
3113
- chatId: n.session_id,
3114
- title: ((r = n.title) == null ? void 0 : r.trim()) || ((a = n.preview) == null ? void 0 : a.trim()) || "Untitled conversation",
3115
- updatedAt: n.updated_at ?? n.created_at ?? ""
3145
+ id: t.session_id,
3146
+ chatId: t.session_id,
3147
+ title: ((r = t.title) == null ? void 0 : r.trim()) || ((a = t.preview) == null ? void 0 : a.trim()) || "Untitled conversation",
3148
+ updatedAt: t.updated_at ?? t.created_at ?? ""
3116
3149
  };
3117
3150
  });
3118
3151
  }
3119
- class Ga {
3120
- constructor(n) {
3121
- this.config = n;
3152
+ class Va {
3153
+ constructor(t) {
3154
+ this.config = t;
3122
3155
  }
3123
3156
  get canRate() {
3124
3157
  return !!this.config.ratingUrl;
@@ -3138,60 +3171,60 @@ class Ga {
3138
3171
  down: this.config.downRatingPopupUrl
3139
3172
  };
3140
3173
  }
3141
- async sendMessage(n) {
3142
- return Na({
3174
+ async sendMessage(t) {
3175
+ return va({
3143
3176
  chatUrl: this.config.chatUrl,
3144
3177
  authorizationToken: this.config.authorizationToken,
3145
3178
  agentCompletionsConfig: this.config.agentCompletionsConfig,
3146
- ...n
3179
+ ...t
3147
3180
  });
3148
3181
  }
3149
- async loadHistory(n) {
3150
- return this.config.historicChatUrl ? Ua(
3151
- `${this.config.historicChatUrl}/${n}`,
3182
+ async loadHistory(t) {
3183
+ return this.config.historicChatUrl ? $a(
3184
+ `${this.config.historicChatUrl}/${t}`,
3152
3185
  this.config.authorizationToken
3153
3186
  ) : null;
3154
3187
  }
3155
3188
  async listInteractions() {
3156
3189
  if (!this.config.aiInteractionsUrl) return null;
3157
3190
  try {
3158
- const n = await dr(
3191
+ const t = await mr(
3159
3192
  this.config.aiInteractionsUrl,
3160
3193
  void 0,
3161
3194
  void 0,
3162
3195
  this.config.authorizationToken
3163
3196
  );
3164
- return fr(this.config.aiInteractionsUrl) && Array.isArray(n.conversations) ? za(
3165
- n
3166
- ) : Array.isArray(n) ? n : Array.isArray(n.items) ? n.items : [];
3197
+ return hr(this.config.aiInteractionsUrl) && Array.isArray(t.conversations) ? Ka(
3198
+ t
3199
+ ) : Array.isArray(t) ? t : Array.isArray(t.items) ? t.items : [];
3167
3200
  } catch {
3168
3201
  return null;
3169
3202
  }
3170
3203
  }
3171
- async rateMessage(n) {
3172
- this.config.ratingUrl && await Fa({
3204
+ async rateMessage(t) {
3205
+ this.config.ratingUrl && await Ya({
3173
3206
  ratingUrl: this.config.ratingUrl,
3174
3207
  authorizationToken: this.config.authorizationToken,
3175
- ...n
3208
+ ...t
3176
3209
  });
3177
3210
  }
3178
- async sendNotification(n) {
3179
- return this.config.notificationCallbackUrl ? Ha({
3211
+ async sendNotification(t) {
3212
+ return this.config.notificationCallbackUrl ? ja({
3180
3213
  notificationCallbackUrl: this.config.notificationCallbackUrl,
3181
3214
  authorizationToken: this.config.authorizationToken,
3182
- ...n
3215
+ ...t
3183
3216
  }) : !1;
3184
3217
  }
3185
3218
  }
3186
- const Ka = {
3219
+ const ts = {
3187
3220
  create(e) {
3188
- const n = e.model || e.agentName || e.systemPrompt || e.mcps ? {
3221
+ const t = e.model || e.agentName || e.systemPrompt || e.mcps ? {
3189
3222
  ...e.model && { model: e.model },
3190
3223
  ...e.agentName && { agentName: e.agentName },
3191
3224
  ...e.systemPrompt && { systemPrompt: e.systemPrompt },
3192
3225
  ...e.mcps && { mcps: e.mcps }
3193
3226
  } : void 0;
3194
- return new Ga({
3227
+ return new Va({
3195
3228
  chatUrl: e.chatUrl,
3196
3229
  authorizationToken: e.authorizationToken ?? void 0,
3197
3230
  historicChatUrl: e.historicChatUrl ?? void 0,
@@ -3200,17 +3233,19 @@ const Ka = {
3200
3233
  upRatingPopupUrl: e.upRatingPopupUrl ?? void 0,
3201
3234
  downRatingPopupUrl: e.downRatingPopupUrl ?? void 0,
3202
3235
  notificationCallbackUrl: e.notificationCallbackUrl ?? void 0,
3203
- agentCompletionsConfig: n
3236
+ agentCompletionsConfig: t
3204
3237
  });
3205
3238
  }
3206
3239
  };
3207
3240
  export {
3208
- Ka as AIServiceConnectorFactory,
3241
+ ts as AIServiceConnectorFactory,
3242
+ es as AskArborSlideover,
3243
+ za as AskArborWidget,
3209
3244
  jt as CHAT_RESPONSE_TYPE_AGENT,
3210
3245
  ve as CHAT_RESPONSE_TYPE_ERROR,
3211
3246
  mn as CHAT_RESPONSE_TYPE_INFO,
3212
3247
  ht as CHAT_RESPONSE_TYPE_USER,
3213
3248
  Kt as CHAT_RESPONSE_TYPE_WARNING,
3214
- ja as ChatPanel,
3215
- Ga as HttpAIServiceConnector
3249
+ za as ChatPanel,
3250
+ Va as HttpAIServiceConnector
3216
3251
  };