@opencx/widget 3.0.71 → 3.0.72

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/designs.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { Fragment as qi, jsx as b, jsxs as U } from "react/jsx-runtime";
2
2
  import * as Hn from "@radix-ui/react-popover";
3
3
  import * as ge from "react";
4
- import nn, { forwardRef as Yr, useState as Me, useImperativeHandle as Tu, useRef as sn, useCallback as yu, useMemo as jr, useEffect as Nt, memo as Cu, cloneElement as _u } from "react";
5
- import { l as ya, m as Au, a as It, u as St, d as un, g as Un, e as zn, i as ku, c as Vi, h as ln, j as cn, b as Nu, _ as Iu, W as Su, k as Lu } from "./useWidgetTrigger-vh6E1XGL.js";
4
+ import nn, { forwardRef as Yr, useState as Me, useImperativeHandle as Tu, useRef as sn, useCallback as yu, useMemo as jr, useEffect as It, memo as Cu, cloneElement as _u } from "react";
5
+ import { l as ya, m as Au, a as St, u as at, d as un, g as Un, e as zn, i as ku, c as Vi, h as ln, j as cn, b as Nu, _ as Iu, W as Su, k as Lu } from "./useWidgetTrigger-DdX73dQq.js";
6
6
  import * as Fe from "@radix-ui/react-dialog";
7
7
  import { X as Ou, PaperclipIcon as Ru, ImageIcon as Du, CircleDashed as vu, SendHorizontalIcon as Pu, CheckCheckIcon as Mu, XIcon as Wr, AlertCircle as Bu, Loader2 as Fu, FileAudio2Icon as Hu, FileVideo2Icon as Uu, FileIcon as zu, ChevronRight as Yu, Check as ju, Circle as Wu, ChevronLeftIcon as qu, EllipsisVerticalIcon as Vu, MessageCirclePlusIcon as Gu, LoaderIcon as Qu, SendHorizontal as Xu, ChevronRightIcon as Ku, ChevronDownIcon as $u } from "lucide-react";
8
8
  import { clsx as Gi } from "clsx";
9
9
  import { createPortal as Cr } from "react-dom";
10
10
  import { Slot as Ju } from "@radix-ui/react-slot";
11
11
  import * as Lt from "@radix-ui/react-avatar";
12
- import { motion as Tt, AnimatePresence as Ne } from "framer-motion";
12
+ import { motion as yt, AnimatePresence as Ne } from "framer-motion";
13
13
  import * as dn from "@radix-ui/react-tooltip";
14
14
  import Ca from "tinycolor2";
15
15
  import { useDropzone as Zu } from "react-dropzone";
@@ -25,7 +25,7 @@ function _a(e, t) {
25
25
  r++, a = n.indexOf(t, a + t.length);
26
26
  return r;
27
27
  }
28
- const Ce = at(/[A-Za-z]/), we = at(/[\dA-Za-z]/), el = at(/[#-'*+\--9=?A-Z^-~]/);
28
+ const Ce = it(/[A-Za-z]/), we = it(/[\dA-Za-z]/), el = it(/[#-'*+\--9=?A-Z^-~]/);
29
29
  function On(e) {
30
30
  return (
31
31
  // Special whitespace codes (which have negative values), C0 and Control
@@ -33,7 +33,7 @@ function On(e) {
33
33
  e !== null && (e < 32 || e === 127)
34
34
  );
35
35
  }
36
- const _r = at(/\d/), tl = at(/[\dA-Fa-f]/), nl = at(/[!-/:-@[-`{-~]/);
36
+ const _r = it(/\d/), tl = it(/[\dA-Fa-f]/), nl = it(/[!-/:-@[-`{-~]/);
37
37
  function W(e) {
38
38
  return e !== null && e < -2;
39
39
  }
@@ -43,8 +43,8 @@ function ae(e) {
43
43
  function $(e) {
44
44
  return e === -2 || e === -1 || e === 32;
45
45
  }
46
- const Yn = at(new RegExp("\\p{P}|\\p{S}", "u")), ht = at(/\s/);
47
- function at(e) {
46
+ const Yn = it(new RegExp("\\p{P}|\\p{S}", "u")), pt = it(/\s/);
47
+ function it(e) {
48
48
  return t;
49
49
  function t(n) {
50
50
  return n !== null && n > -1 && e.test(String.fromCharCode(n));
@@ -367,7 +367,7 @@ function Nl(e) {
367
367
  }
368
368
  function Ki(e, t) {
369
369
  const n = e.input.charCodeAt(e.index - 1);
370
- return (e.index === 0 || ht(n) || Yn(n)) && // If it’s an email, the previous character should not be a slash.
370
+ return (e.index === 0 || pt(n) || Yn(n)) && // If it’s an email, the previous character should not be a slash.
371
371
  (!t || n !== 47);
372
372
  }
373
373
  function Be(e) {
@@ -1476,9 +1476,9 @@ function Kc() {
1476
1476
  text: Ye
1477
1477
  };
1478
1478
  }
1479
- let ut = 48;
1480
- for (; ut < 123; )
1481
- Ye[ut] = Ke, ut++, ut === 58 ? ut = 65 : ut === 91 && (ut = 97);
1479
+ let lt = 48;
1480
+ for (; lt < 123; )
1481
+ Ye[lt] = Ke, lt++, lt === 58 ? lt = 65 : lt === 91 && (lt = 97);
1482
1482
  Ye[43] = Ke;
1483
1483
  Ye[45] = Ke;
1484
1484
  Ye[46] = Ke;
@@ -1538,7 +1538,7 @@ function Zc(e, t, n) {
1538
1538
  return h === 47 ? (e.consume(h), i ? c : (i = !0, l)) : n(h);
1539
1539
  }
1540
1540
  function c(h) {
1541
- return h === null || On(h) || ae(h) || ht(h) || Yn(h) ? n(h) : e.attempt(mo, e.attempt(go, d), n)(h);
1541
+ return h === null || On(h) || ae(h) || pt(h) || Yn(h) ? n(h) : e.attempt(mo, e.attempt(go, d), n)(h);
1542
1542
  }
1543
1543
  function d(h) {
1544
1544
  return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), t(h);
@@ -1558,7 +1558,7 @@ function td(e, t, n) {
1558
1558
  let r, a, i;
1559
1559
  return o;
1560
1560
  function o(c) {
1561
- return c === 46 || c === 95 ? e.check(bo, l, u)(c) : c === null || ae(c) || ht(c) || c !== 45 && Yn(c) ? l(c) : (i = !0, e.consume(c), o);
1561
+ return c === 46 || c === 95 ? e.check(bo, l, u)(c) : c === null || ae(c) || pt(c) || c !== 45 && Yn(c) ? l(c) : (i = !0, e.consume(c), o);
1562
1562
  }
1563
1563
  function u(c) {
1564
1564
  return c === 95 ? r = !0 : (a = r, r = void 0), e.consume(c), o;
@@ -1571,7 +1571,7 @@ function nd(e, t) {
1571
1571
  let n = 0, r = 0;
1572
1572
  return a;
1573
1573
  function a(o) {
1574
- return o === 40 ? (n++, e.consume(o), a) : o === 41 && r < n ? i(o) : o === 33 || o === 34 || o === 38 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 60 || o === 63 || o === 93 || o === 95 || o === 126 ? e.check(bo, t, i)(o) : o === null || ae(o) || ht(o) ? t(o) : (e.consume(o), a);
1574
+ return o === 40 ? (n++, e.consume(o), a) : o === 41 && r < n ? i(o) : o === 33 || o === 34 || o === 38 || o === 39 || o === 41 || o === 42 || o === 44 || o === 46 || o === 58 || o === 59 || o === 60 || o === 63 || o === 93 || o === 95 || o === 126 ? e.check(bo, t, i)(o) : o === null || ae(o) || pt(o) ? t(o) : (e.consume(o), a);
1575
1575
  }
1576
1576
  function i(o) {
1577
1577
  return o === 41 && r++, e.consume(o), a;
@@ -1583,11 +1583,11 @@ function rd(e, t, n) {
1583
1583
  return u === 33 || u === 34 || u === 39 || u === 41 || u === 42 || u === 44 || u === 46 || u === 58 || u === 59 || u === 63 || u === 95 || u === 126 ? (e.consume(u), r) : u === 38 ? (e.consume(u), i) : u === 93 ? (e.consume(u), a) : (
1584
1584
  // `<` is an end.
1585
1585
  u === 60 || // So is whitespace.
1586
- u === null || ae(u) || ht(u) ? t(u) : n(u)
1586
+ u === null || ae(u) || pt(u) ? t(u) : n(u)
1587
1587
  );
1588
1588
  }
1589
1589
  function a(u) {
1590
- return u === null || u === 40 || u === 91 || ae(u) || ht(u) ? t(u) : r(u);
1590
+ return u === null || u === 40 || u === 91 || ae(u) || pt(u) ? t(u) : r(u);
1591
1591
  }
1592
1592
  function i(u) {
1593
1593
  return Ce(u) ? o(u) : n(u);
@@ -1652,7 +1652,7 @@ function Ot(e) {
1652
1652
  return t.join("") + e.slice(r);
1653
1653
  }
1654
1654
  function Rn(e) {
1655
- if (e === null || ae(e) || ht(e))
1655
+ if (e === null || ae(e) || pt(e))
1656
1656
  return 1;
1657
1657
  if (Yn(e))
1658
1658
  return 2;
@@ -2602,8 +2602,8 @@ function qd(e, t, n) {
2602
2602
  }
2603
2603
  function k(T) {
2604
2604
  if (T === null || T === 47 || T === 62 || ae(T)) {
2605
- const ve = T === 47, ot = o.toLowerCase();
2606
- return !ve && !i && Ba.includes(ot) ? (a = 1, r.interrupt ? t(T) : P(T)) : Ud.includes(o.toLowerCase()) ? (a = 6, ve ? (e.consume(T), _) : r.interrupt ? t(T) : P(T)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(T) : i ? L(T) : O(T));
2605
+ const ve = T === 47, st = o.toLowerCase();
2606
+ return !ve && !i && Ba.includes(st) ? (a = 1, r.interrupt ? t(T) : P(T)) : Ud.includes(o.toLowerCase()) ? (a = 6, ve ? (e.consume(T), _) : r.interrupt ? t(T) : P(T)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(T) : i ? L(T) : O(T));
2607
2607
  }
2608
2608
  return T === 45 || we(T) ? (e.consume(T), o += String.fromCharCode(T), k) : n(T);
2609
2609
  }
@@ -3545,15 +3545,15 @@ function P0(e, t) {
3545
3545
  }
3546
3546
  function Tn(e, t, n, r, a, i) {
3547
3547
  const o = r === 1 ? "tableHeader" : r === 2 ? "tableDelimiter" : "tableData", u = "tableContent";
3548
- n[0] !== 0 && (i.end = Object.assign({}, wt(t.events, n[0])), e.add(n[0], 0, [["exit", i, t]]));
3549
- const l = wt(t.events, n[1]);
3548
+ n[0] !== 0 && (i.end = Object.assign({}, xt(t.events, n[0])), e.add(n[0], 0, [["exit", i, t]]));
3549
+ const l = xt(t.events, n[1]);
3550
3550
  if (i = {
3551
3551
  type: o,
3552
3552
  start: Object.assign({}, l),
3553
3553
  // Note: correct end is set later.
3554
3554
  end: Object.assign({}, l)
3555
3555
  }, e.add(n[1], 0, [["enter", i, t]]), n[2] !== 0) {
3556
- const c = wt(t.events, n[2]), d = wt(t.events, n[3]), h = {
3556
+ const c = xt(t.events, n[2]), d = xt(t.events, n[3]), h = {
3557
3557
  type: u,
3558
3558
  start: Object.assign({}, c),
3559
3559
  end: Object.assign({}, d)
@@ -3567,13 +3567,13 @@ function Tn(e, t, n, r, a, i) {
3567
3567
  }
3568
3568
  e.add(n[3] + 1, 0, [["exit", h, t]]);
3569
3569
  }
3570
- return a !== void 0 && (i.end = Object.assign({}, wt(t.events, a)), e.add(a, 0, [["exit", i, t]]), i = void 0), i;
3570
+ return a !== void 0 && (i.end = Object.assign({}, xt(t.events, a)), e.add(a, 0, [["exit", i, t]]), i = void 0), i;
3571
3571
  }
3572
3572
  function Ha(e, t, n, r, a) {
3573
- const i = [], o = wt(t.events, n);
3573
+ const i = [], o = xt(t.events, n);
3574
3574
  a && (a.end = Object.assign({}, o), i.push(["exit", a, t])), r.end = Object.assign({}, o), i.push(["exit", r, t]), e.add(n + 1, 0, i);
3575
3575
  }
3576
- function wt(e, t) {
3576
+ function xt(e, t) {
3577
3577
  const n = e[t], r = n[0] === "enter" ? "start" : "end";
3578
3578
  return n[1][r];
3579
3579
  }
@@ -3706,8 +3706,8 @@ De.prototype.commaOrSpaceSeparated = !1;
3706
3706
  De.prototype.mustUseProperty = !1;
3707
3707
  De.prototype.defined = !1;
3708
3708
  let G0 = 0;
3709
- const G = pt(), pe = pt(), Do = pt(), v = pt(), ie = pt(), yt = pt(), Se = pt();
3710
- function pt() {
3709
+ const G = ft(), pe = ft(), Do = ft(), v = ft(), ie = ft(), Ct = ft(), Se = ft();
3710
+ function ft() {
3711
3711
  return 2 ** ++G0;
3712
3712
  }
3713
3713
  const Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -3715,7 +3715,7 @@ const Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3715
3715
  boolean: G,
3716
3716
  booleanish: pe,
3717
3717
  commaOrSpaceSeparated: Se,
3718
- commaSeparated: yt,
3718
+ commaSeparated: Ct,
3719
3719
  number: v,
3720
3720
  overloadedBoolean: Do,
3721
3721
  spaceSeparated: ie
@@ -3857,7 +3857,7 @@ const Fo = Rt({
3857
3857
  properties: {
3858
3858
  // Standard Properties.
3859
3859
  abbr: null,
3860
- accept: yt,
3860
+ accept: Ct,
3861
3861
  acceptCharset: ie,
3862
3862
  accessKey: ie,
3863
3863
  action: null,
@@ -3884,7 +3884,7 @@ const Fo = Rt({
3884
3884
  contentEditable: pe,
3885
3885
  controls: G,
3886
3886
  controlsList: ie,
3887
- coords: v | yt,
3887
+ coords: v | Ct,
3888
3888
  crossOrigin: null,
3889
3889
  data: null,
3890
3890
  dateTime: null,
@@ -4466,9 +4466,9 @@ const Fo = Rt({
4466
4466
  from: null,
4467
4467
  fx: null,
4468
4468
  fy: null,
4469
- g1: yt,
4470
- g2: yt,
4471
- glyphName: yt,
4469
+ g1: Ct,
4470
+ g2: Ct,
4471
+ glyphName: Ct,
4472
4472
  glyphOrientationHorizontal: null,
4473
4473
  glyphOrientationVertical: null,
4474
4474
  glyphRef: null,
@@ -4809,7 +4809,7 @@ const th = {
4809
4809
  xLinkTitle: "xlinkTitle",
4810
4810
  xLinkType: "xlinkType",
4811
4811
  xmlnsXLink: "xmlnsXlink"
4812
- }, fn = Ro([Po, vo, Fo, Ho, X0], "html"), it = Ro([Po, vo, Fo, Ho, K0], "svg");
4812
+ }, fn = Ro([Po, vo, Fo, Ho, X0], "html"), ot = Ro([Po, vo, Fo, Ho, K0], "svg");
4813
4813
  function qa(e) {
4814
4814
  const t = String(e || "").trim();
4815
4815
  return t ? t.split(/[ \t\n\r\f]+/g) : [];
@@ -4818,7 +4818,7 @@ function Uo(e) {
4818
4818
  return e.join(" ").trim();
4819
4819
  }
4820
4820
  var zo = {}, Va = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, nh = /\n/g, rh = /^\s*/, ah = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, ih = /^:\s*/, oh = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, sh = /^[;\s]*/, uh = /^\s+|\s+$/g, lh = `
4821
- `, Ga = "/", Qa = "*", lt = "", ch = "comment", dh = "declaration", hh = function(e, t) {
4821
+ `, Ga = "/", Qa = "*", ct = "", ch = "comment", dh = "declaration", hh = function(e, t) {
4822
4822
  if (typeof e != "string")
4823
4823
  throw new TypeError("First argument must be a string");
4824
4824
  if (!e) return [];
@@ -4865,9 +4865,9 @@ var zo = {}, Va = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, nh = /\n/g, rh = /^\s*/, ah
4865
4865
  function h() {
4866
4866
  var E = i();
4867
4867
  if (!(Ga != e.charAt(0) || Qa != e.charAt(1))) {
4868
- for (var y = 2; lt != e.charAt(y) && (Qa != e.charAt(y) || Ga != e.charAt(y + 1)); )
4868
+ for (var y = 2; ct != e.charAt(y) && (Qa != e.charAt(y) || Ga != e.charAt(y + 1)); )
4869
4869
  ++y;
4870
- if (y += 2, lt === e.charAt(y - 1))
4870
+ if (y += 2, ct === e.charAt(y - 1))
4871
4871
  return u("End of comment missing");
4872
4872
  var k = e.slice(2, y - 2);
4873
4873
  return r += 2, a(k), e = e.slice(y), r += 2, E({
@@ -4882,8 +4882,8 @@ var zo = {}, Va = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, nh = /\n/g, rh = /^\s*/, ah
4882
4882
  if (h(), !l(ih)) return u("property missing ':'");
4883
4883
  var k = l(oh), _ = E({
4884
4884
  type: dh,
4885
- property: Xa(y[0].replace(Va, lt)),
4886
- value: k ? Xa(k[0].replace(Va, lt)) : lt
4885
+ property: Xa(y[0].replace(Va, ct)),
4886
+ value: k ? Xa(k[0].replace(Va, ct)) : ct
4887
4887
  });
4888
4888
  return l(sh), _;
4889
4889
  }
@@ -4898,7 +4898,7 @@ var zo = {}, Va = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, nh = /\n/g, rh = /^\s*/, ah
4898
4898
  return c(), p();
4899
4899
  };
4900
4900
  function Xa(e) {
4901
- return e ? e.replace(uh, lt) : lt;
4901
+ return e ? e.replace(uh, ct) : ct;
4902
4902
  }
4903
4903
  var ph = ya && ya.__importDefault || function(e) {
4904
4904
  return e && e.__esModule ? e : { default: e };
@@ -5064,7 +5064,7 @@ function Ch(e, t) {
5064
5064
  ignoreInvalidStyle: t.ignoreInvalidStyle || !1,
5065
5065
  passKeys: t.passKeys !== !1,
5066
5066
  passNode: t.passNode || !1,
5067
- schema: t.space === "svg" ? it : fn,
5067
+ schema: t.space === "svg" ? ot : fn,
5068
5068
  stylePropertyNameCase: t.stylePropertyNameCase || "dom",
5069
5069
  tableCellAlignToStyle: t.tableCellAlignToStyle !== !1
5070
5070
  }, i = Wo(a, e, void 0);
@@ -5092,7 +5092,7 @@ function Wo(e, t, n) {
5092
5092
  function _h(e, t, n) {
5093
5093
  const r = e.schema;
5094
5094
  let a = r;
5095
- t.tagName.toLowerCase() === "svg" && r.space === "html" && (a = it, e.schema = a), e.ancestors.push(t);
5095
+ t.tagName.toLowerCase() === "svg" && r.space === "html" && (a = ot, e.schema = a), e.ancestors.push(t);
5096
5096
  const i = Vo(e, t.tagName, !1), o = Rh(e, t);
5097
5097
  let u = ta(e, t);
5098
5098
  return Th.has(t.tagName) && (u = u.filter(function(l) {
@@ -5118,7 +5118,7 @@ function kh(e, t) {
5118
5118
  function Nh(e, t, n) {
5119
5119
  const r = e.schema;
5120
5120
  let a = r;
5121
- t.name === "svg" && r.space === "html" && (a = it, e.schema = a), e.ancestors.push(t);
5121
+ t.name === "svg" && r.space === "html" && (a = ot, e.schema = a), e.ancestors.push(t);
5122
5122
  const i = t.name === null ? e.Fragment : Vo(e, t.name, !0), o = Dh(e, t), u = ta(e, t);
5123
5123
  return qo(e, o, i, t), ea(o, u), e.ancestors.pop(), e.schema = r, e.create(t, i, o, n);
5124
5124
  }
@@ -5765,11 +5765,11 @@ function $h(e, t, n) {
5765
5765
  function ce(Ee) {
5766
5766
  return Ht;
5767
5767
  function Ht($e) {
5768
- const mt = $e !== null && Ee[$e], gt = $e !== null && Ee.null, xn = [
5768
+ const gt = $e !== null && Ee[$e], bt = $e !== null && Ee.null, xn = [
5769
5769
  // To do: add more extension tests.
5770
5770
  /* c8 ignore next 2 */
5771
- ...Array.isArray(mt) ? mt : mt ? [mt] : [],
5772
- ...Array.isArray(gt) ? gt : gt ? [gt] : []
5771
+ ...Array.isArray(gt) ? gt : gt ? [gt] : [],
5772
+ ...Array.isArray(bt) ? bt : bt ? [bt] : []
5773
5773
  ];
5774
5774
  return We(xn)($e);
5775
5775
  }
@@ -5780,21 +5780,21 @@ function $h(e, t, n) {
5780
5780
  function T(Ee) {
5781
5781
  return Ht;
5782
5782
  function Ht($e) {
5783
- return x = Y(), ye = Ee, Ee.partial || (c.currentConstruct = Ee), Ee.name && c.parser.constructs.disable.null.includes(Ee.name) ? ot() : Ee.tokenize.call(
5783
+ return x = Y(), ye = Ee, Ee.partial || (c.currentConstruct = Ee), Ee.name && c.parser.constructs.disable.null.includes(Ee.name) ? st() : Ee.tokenize.call(
5784
5784
  // If we do have fields, create an object w/ `context` as its
5785
5785
  // prototype.
5786
5786
  // This allows a “live binding”, which is needed for `interrupt`.
5787
5787
  P ? Object.assign(Object.create(c), P) : c,
5788
5788
  l,
5789
5789
  ve,
5790
- ot
5790
+ st
5791
5791
  )($e);
5792
5792
  }
5793
5793
  }
5794
5794
  function ve(Ee) {
5795
5795
  return H(ye, x), X;
5796
5796
  }
5797
- function ot(Ee) {
5797
+ function st(Ee) {
5798
5798
  return x.restore(), ++be < le.length ? T(le[be]) : se;
5799
5799
  }
5800
5800
  }
@@ -6016,7 +6016,7 @@ function fp(e) {
6016
6016
  autolinkProtocol: Y,
6017
6017
  autolinkEmail: Y,
6018
6018
  atxHeading: i(ba),
6019
- blockQuote: i(gt),
6019
+ blockQuote: i(bt),
6020
6020
  characterEscape: Y,
6021
6021
  characterReference: Y,
6022
6022
  codeFenced: i(xn),
@@ -6058,12 +6058,12 @@ function fp(e) {
6058
6058
  atxHeading: l(),
6059
6059
  atxHeadingSequence: F,
6060
6060
  autolink: l(),
6061
- autolinkEmail: mt,
6061
+ autolinkEmail: gt,
6062
6062
  autolinkProtocol: $e,
6063
6063
  blockQuote: l(),
6064
6064
  characterEscapeValue: A,
6065
- characterReferenceMarkerHexadecimal: ot,
6066
- characterReferenceMarkerNumeric: ot,
6065
+ characterReferenceMarkerHexadecimal: st,
6066
+ characterReferenceMarkerNumeric: st,
6067
6067
  characterReferenceValue: Ee,
6068
6068
  characterReference: Ht,
6069
6069
  codeFenced: l(k),
@@ -6159,7 +6159,7 @@ function fp(e) {
6159
6159
  return B;
6160
6160
  }
6161
6161
  function a(S, B, V) {
6162
- let J = B - 1, ne = -1, Pe = !1, st, qe, Ut, zt;
6162
+ let J = B - 1, ne = -1, Pe = !1, ut, qe, Ut, zt;
6163
6163
  for (; ++J <= V; ) {
6164
6164
  const Ie = S[J];
6165
6165
  switch (Ie[1].type) {
@@ -6170,7 +6170,7 @@ function fp(e) {
6170
6170
  break;
6171
6171
  }
6172
6172
  case "lineEndingBlank": {
6173
- Ie[0] === "enter" && (st && !zt && !ne && !Ut && (Ut = J), zt = void 0);
6173
+ Ie[0] === "enter" && (ut && !zt && !ne && !Ut && (Ut = J), zt = void 0);
6174
6174
  break;
6175
6175
  }
6176
6176
  case "linePrefix":
@@ -6183,26 +6183,26 @@ function fp(e) {
6183
6183
  zt = void 0;
6184
6184
  }
6185
6185
  if (!ne && Ie[0] === "enter" && Ie[1].type === "listItemPrefix" || ne === -1 && Ie[0] === "exit" && (Ie[1].type === "listUnordered" || Ie[1].type === "listOrdered")) {
6186
- if (st) {
6187
- let bt = J;
6188
- for (qe = void 0; bt--; ) {
6189
- const Ve = S[bt];
6186
+ if (ut) {
6187
+ let Et = J;
6188
+ for (qe = void 0; Et--; ) {
6189
+ const Ve = S[Et];
6190
6190
  if (Ve[1].type === "lineEnding" || Ve[1].type === "lineEndingBlank") {
6191
6191
  if (Ve[0] === "exit") continue;
6192
- qe && (S[qe][1].type = "lineEndingBlank", Pe = !0), Ve[1].type = "lineEnding", qe = bt;
6192
+ qe && (S[qe][1].type = "lineEndingBlank", Pe = !0), Ve[1].type = "lineEnding", qe = Et;
6193
6193
  } else if (!(Ve[1].type === "linePrefix" || Ve[1].type === "blockQuotePrefix" || Ve[1].type === "blockQuotePrefixWhitespace" || Ve[1].type === "blockQuoteMarker" || Ve[1].type === "listItemIndent")) break;
6194
6194
  }
6195
- Ut && (!qe || Ut < qe) && (st._spread = !0), st.end = Object.assign({}, qe ? S[qe][1].start : Ie[1].end), S.splice(qe || J, 0, ["exit", st, Ie[2]]), J++, V++;
6195
+ Ut && (!qe || Ut < qe) && (ut._spread = !0), ut.end = Object.assign({}, qe ? S[qe][1].start : Ie[1].end), S.splice(qe || J, 0, ["exit", ut, Ie[2]]), J++, V++;
6196
6196
  }
6197
6197
  if (Ie[1].type === "listItemPrefix") {
6198
- const bt = {
6198
+ const Et = {
6199
6199
  type: "listItem",
6200
6200
  _spread: !1,
6201
6201
  start: Object.assign({}, Ie[1].start),
6202
6202
  // @ts-expect-error: we’ll add `end` in a second.
6203
6203
  end: void 0
6204
6204
  };
6205
- st = bt, S.splice(J, 0, ["enter", bt, Ie[2]]), J++, V++, Ut = void 0, zt = !0;
6205
+ ut = Et, S.splice(J, 0, ["enter", Et, Ie[2]]), J++, V++, Ut = void 0, zt = !0;
6206
6206
  }
6207
6207
  }
6208
6208
  }
@@ -6388,7 +6388,7 @@ function fp(e) {
6388
6388
  const B = this.resume(), V = this.stack[this.stack.length - 1];
6389
6389
  V.label = B, V.identifier = Be(this.sliceSerialize(S)).toLowerCase(), this.data.referenceType = "full";
6390
6390
  }
6391
- function ot(S) {
6391
+ function st(S) {
6392
6392
  this.data.characterReferenceType = S.type;
6393
6393
  }
6394
6394
  function Ee(S) {
@@ -6407,12 +6407,12 @@ function fp(e) {
6407
6407
  const B = this.stack[this.stack.length - 1];
6408
6408
  B.url = this.sliceSerialize(S);
6409
6409
  }
6410
- function mt(S) {
6410
+ function gt(S) {
6411
6411
  A.call(this, S);
6412
6412
  const B = this.stack[this.stack.length - 1];
6413
6413
  B.url = "mailto:" + this.sliceSerialize(S);
6414
6414
  }
6415
- function gt() {
6415
+ function bt() {
6416
6416
  return {
6417
6417
  type: "blockquote",
6418
6418
  children: []
@@ -6988,24 +6988,24 @@ const Zo = -1, Xn = 0, Dn = 1, vn = 2, na = 3, ra = 4, aa = 5, ia = 6, es = 7, t
6988
6988
  return n(new ii[i](o), a);
6989
6989
  };
6990
6990
  return r;
6991
- }, oi = (e) => jp(/* @__PURE__ */ new Map(), e)(0), Et = "", { toString: Wp } = {}, { keys: qp } = Object, jt = (e) => {
6991
+ }, oi = (e) => jp(/* @__PURE__ */ new Map(), e)(0), wt = "", { toString: Wp } = {}, { keys: qp } = Object, jt = (e) => {
6992
6992
  const t = typeof e;
6993
6993
  if (t !== "object" || !e)
6994
6994
  return [Xn, t];
6995
6995
  const n = Wp.call(e).slice(8, -1);
6996
6996
  switch (n) {
6997
6997
  case "Array":
6998
- return [Dn, Et];
6998
+ return [Dn, wt];
6999
6999
  case "Object":
7000
- return [vn, Et];
7000
+ return [vn, wt];
7001
7001
  case "Date":
7002
- return [na, Et];
7002
+ return [na, wt];
7003
7003
  case "RegExp":
7004
- return [ra, Et];
7004
+ return [ra, wt];
7005
7005
  case "Map":
7006
- return [aa, Et];
7006
+ return [aa, wt];
7007
7007
  case "Set":
7008
- return [ia, Et];
7008
+ return [ia, wt];
7009
7009
  }
7010
7010
  return n.includes("Array") ? [Dn, n] : n.includes("Error") ? [es, n] : [vn, n];
7011
7011
  }, Cn = ([e, t]) => e === Xn && (t === "function" || t === "symbol"), Vp = (e, t, n, r) => {
@@ -7085,7 +7085,7 @@ const Zo = -1, Xn = 0, Dn = 1, vn = 2, na = 3, ra = 4, aa = 5, ia = 6, es = 7, t
7085
7085
  }, si = (e, { json: t, lossy: n } = {}) => {
7086
7086
  const r = [];
7087
7087
  return Vp(!(t || n), !!t, /* @__PURE__ */ new Map(), r)(e), r;
7088
- }, _t = typeof structuredClone == "function" ? (
7088
+ }, At = typeof structuredClone == "function" ? (
7089
7089
  /* c8 ignore start */
7090
7090
  (e, t) => t && ("json" in t || "lossy" in t) ? oi(si(e, t)) : structuredClone(e)
7091
7091
  ) : (e, t) => oi(si(e, t));
@@ -7154,7 +7154,7 @@ function Xp(e) {
7154
7154
  type: "element",
7155
7155
  tagName: i,
7156
7156
  properties: {
7157
- ..._t(o),
7157
+ ...At(o),
7158
7158
  id: "footnote-label"
7159
7159
  },
7160
7160
  children: [{ type: "text", value: a }]
@@ -7199,10 +7199,10 @@ function $p(e, t) {
7199
7199
  return p(u, d, h);
7200
7200
  if (u.options.passThrough && u.options.passThrough.includes(g)) {
7201
7201
  if ("children" in d) {
7202
- const { children: y, ...k } = d, _ = _t(k);
7202
+ const { children: y, ...k } = d, _ = At(k);
7203
7203
  return _.children = u.all(d), _;
7204
7204
  }
7205
- return _t(d);
7205
+ return At(d);
7206
7206
  }
7207
7207
  return (u.options.unknownHandler || ef)(u, d, h);
7208
7208
  }
@@ -7239,7 +7239,7 @@ function Zp(e, t) {
7239
7239
  const o = "children" in n ? n.children : [n];
7240
7240
  n = { type: "element", tagName: r, properties: {}, children: o };
7241
7241
  }
7242
- n.type === "element" && i && Object.assign(n.properties, _t(i)), "children" in n && n.children && a !== null && a !== void 0 && (n.children = a);
7242
+ n.type === "element" && i && Object.assign(n.properties, At(i)), "children" in n && n.children && a !== null && a !== void 0 && (n.children = a);
7243
7243
  }
7244
7244
  return n;
7245
7245
  }
@@ -8736,7 +8736,7 @@ const vf = [
8736
8736
  "solidColor",
8737
8737
  "textArea",
8738
8738
  "textPath"
8739
- ], Pf = is(fn, "div"), Mf = is(it, "g", vf);
8739
+ ], Pf = is(fn, "div"), Mf = is(ot, "g", vf);
8740
8740
  function Bf(e) {
8741
8741
  const t = String(e), n = [];
8742
8742
  return { toOffset: a, toPoint: r };
@@ -8776,7 +8776,7 @@ function _i(e, t) {
8776
8776
  `, t);
8777
8777
  return r === -1 ? n : n === -1 || n + 1 === r ? r : n < r ? n : r;
8778
8778
  }
8779
- const ct = {
8779
+ const dt = {
8780
8780
  html: "http://www.w3.org/1999/xhtml",
8781
8781
  mathml: "http://www.w3.org/1998/Math/MathML",
8782
8782
  svg: "http://www.w3.org/2000/svg",
@@ -8790,7 +8790,7 @@ function Hf(e, t) {
8790
8790
  {
8791
8791
  file: n.file || void 0,
8792
8792
  location: !1,
8793
- schema: n.space === "svg" ? it : fn,
8793
+ schema: n.space === "svg" ? ot : fn,
8794
8794
  verbose: n.verbose || !1
8795
8795
  },
8796
8796
  e
@@ -8858,7 +8858,7 @@ function ss(e, t) {
8858
8858
  }
8859
8859
  function Uf(e, t) {
8860
8860
  const n = e.schema;
8861
- e.schema = t.namespaceURI === ct.svg ? it : fn;
8861
+ e.schema = t.namespaceURI === dt.svg ? ot : fn;
8862
8862
  let r = -1;
8863
8863
  const a = {};
8864
8864
  for (; ++r < t.attrs.length; ) {
@@ -8870,7 +8870,7 @@ function Uf(e, t) {
8870
8870
  const u = (
8871
8871
  /** @type {DefaultTreeAdapterMap['template']} */
8872
8872
  t
8873
- ), l = u.sourceCodeLocation, c = l && l.startTag && xt(l.startTag), d = l && l.endTag && xt(l.endTag), h = (
8873
+ ), l = u.sourceCodeLocation, c = l && l.startTag && Tt(l.startTag), d = l && l.endTag && Tt(l.endTag), h = (
8874
8874
  /** @type {Root} */
8875
8875
  sa(e, u.content)
8876
8876
  );
@@ -8885,7 +8885,7 @@ function In(e, t, n) {
8885
8885
  }
8886
8886
  }
8887
8887
  function zf(e, t, n) {
8888
- const r = xt(n);
8888
+ const r = Tt(n);
8889
8889
  if (t.type === "element") {
8890
8890
  const a = t.children[t.children.length - 1];
8891
8891
  if (r && !n.endTag && a && a.position && a.position.end && (r.end = Object.assign({}, a.position.end)), e.verbose) {
@@ -8893,17 +8893,17 @@ function zf(e, t, n) {
8893
8893
  let o;
8894
8894
  if (n.attrs)
8895
8895
  for (o in n.attrs)
8896
- os.call(n.attrs, o) && (i[Gn(e.schema, o).property] = xt(
8896
+ os.call(n.attrs, o) && (i[Gn(e.schema, o).property] = Tt(
8897
8897
  n.attrs[o]
8898
8898
  ));
8899
8899
  n.startTag;
8900
- const u = xt(n.startTag), l = n.endTag ? xt(n.endTag) : void 0, c = { opening: u };
8900
+ const u = Tt(n.startTag), l = n.endTag ? Tt(n.endTag) : void 0, c = { opening: u };
8901
8901
  l && (c.closing = l), c.properties = i, t.data = { position: c };
8902
8902
  }
8903
8903
  }
8904
8904
  return r;
8905
8905
  }
8906
- function xt(e) {
8906
+ function Tt(e) {
8907
8907
  const t = Ai({
8908
8908
  line: e.startLine,
8909
8909
  column: e.startCol,
@@ -8921,7 +8921,7 @@ function Ai(e) {
8921
8921
  const Yf = {}, jf = {}.hasOwnProperty, us = Zi("type", { handlers: { root: qf, element: Kf, text: Qf, comment: Xf, doctype: Gf } });
8922
8922
  function Wf(e, t) {
8923
8923
  const r = (t || Yf).space;
8924
- return us(e, r === "svg" ? it : fn);
8924
+ return us(e, r === "svg" ? ot : fn);
8925
8925
  }
8926
8926
  function qf(e, t) {
8927
8927
  const n = {
@@ -8965,7 +8965,7 @@ function Xf(e) {
8965
8965
  function Kf(e, t) {
8966
8966
  const n = t;
8967
8967
  let r = n;
8968
- e.type === "element" && e.tagName.toLowerCase() === "svg" && n.space === "html" && (r = it);
8968
+ e.type === "element" && e.tagName.toLowerCase() === "svg" && n.space === "html" && (r = ot);
8969
8969
  const a = [];
8970
8970
  let i;
8971
8971
  if (e.properties) {
@@ -8984,7 +8984,7 @@ function Kf(e, t) {
8984
8984
  tagName: e.tagName,
8985
8985
  attrs: a,
8986
8986
  // @ts-expect-error: `parse5` types are wrong.
8987
- namespaceURI: ct[o],
8987
+ namespaceURI: dt[o],
8988
8988
  childNodes: [],
8989
8989
  parentNode: null
8990
8990
  };
@@ -9001,7 +9001,7 @@ function $f(e, t, n) {
9001
9001
  };
9002
9002
  if (r.space && r.space !== "html" && r.space !== "svg") {
9003
9003
  const i = a.name.indexOf(":");
9004
- i < 0 ? a.prefix = "" : (a.name = a.name.slice(i + 1), a.prefix = r.attribute.slice(0, i)), a.namespace = ct[r.space];
9004
+ i < 0 ? a.prefix = "" : (a.name = a.name.slice(i + 1), a.prefix = r.attribute.slice(0, i)), a.namespace = dt[r.space];
9005
9005
  }
9006
9006
  return a;
9007
9007
  }
@@ -9520,10 +9520,10 @@ var R;
9520
9520
  (function(e) {
9521
9521
  e.HTML = "http://www.w3.org/1999/xhtml", e.MATHML = "http://www.w3.org/1998/Math/MathML", e.SVG = "http://www.w3.org/2000/svg", e.XLINK = "http://www.w3.org/1999/xlink", e.XML = "http://www.w3.org/XML/1998/namespace", e.XMLNS = "http://www.w3.org/2000/xmlns/";
9522
9522
  })(R || (R = {}));
9523
- var dt;
9523
+ var ht;
9524
9524
  (function(e) {
9525
9525
  e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
9526
- })(dt || (dt = {}));
9526
+ })(ht || (ht = {}));
9527
9527
  var Oe;
9528
9528
  (function(e) {
9529
9529
  e.NO_QUIRKS = "no-quirks", e.QUIRKS = "quirks", e.LIMITED_QUIRKS = "limited-quirks";
@@ -12411,7 +12411,7 @@ const Di = {
12411
12411
  ]);
12412
12412
  function Um(e) {
12413
12413
  const t = e.tagID;
12414
- return t === s.FONT && e.attrs.some(({ name: r }) => r === dt.COLOR || r === dt.SIZE || r === dt.FACE) || Hm.has(t);
12414
+ return t === s.FONT && e.attrs.some(({ name: r }) => r === ht.COLOR || r === ht.SIZE || r === ht.FACE) || Hm.has(t);
12415
12415
  }
12416
12416
  function Ts(e) {
12417
12417
  for (let t = 0; t < e.attrs.length; t++)
@@ -12442,7 +12442,7 @@ function Ym(e, t) {
12442
12442
  function jm(e, t, n) {
12443
12443
  if (t === R.MATHML && e === s.ANNOTATION_XML) {
12444
12444
  for (let r = 0; r < n.length; r++)
12445
- if (n[r].name === dt.ENCODING) {
12445
+ if (n[r].name === ht.ENCODING) {
12446
12446
  const a = n[r].value.toLowerCase();
12447
12447
  return a === Di.TEXT_HTML || a === Di.APPLICATION_XML;
12448
12448
  }
@@ -13104,7 +13104,7 @@ class Pi {
13104
13104
  break;
13105
13105
  }
13106
13106
  case w.IN_TABLE: {
13107
- At(this, t);
13107
+ kt(this, t);
13108
13108
  break;
13109
13109
  }
13110
13110
  case w.IN_TABLE_TEXT: {
@@ -13541,14 +13541,14 @@ function u1(e, t) {
13541
13541
  break;
13542
13542
  }
13543
13543
  case s.TEMPLATE: {
13544
- ft(e, t);
13544
+ mt(e, t);
13545
13545
  break;
13546
13546
  }
13547
13547
  default:
13548
13548
  e._err(t, N.endTagWithoutMatchingOpenElement);
13549
13549
  }
13550
13550
  }
13551
- function ft(e, t) {
13551
+ function mt(e, t) {
13552
13552
  e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== s.TEMPLATE && e._err(t, N.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(s.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, N.endTagWithoutMatchingOpenElement);
13553
13553
  }
13554
13554
  function Zt(e, t) {
@@ -13640,7 +13640,7 @@ function h1(e, t) {
13640
13640
  break;
13641
13641
  }
13642
13642
  case s.TEMPLATE: {
13643
- ft(e, t);
13643
+ mt(e, t);
13644
13644
  break;
13645
13645
  }
13646
13646
  default:
@@ -13748,7 +13748,7 @@ function ks(e, t) {
13748
13748
  e._reconstructActiveFormattingElements(), e._appendElement(t, R.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
13749
13749
  }
13750
13750
  function Ns(e) {
13751
- const t = hs(e, dt.TYPE);
13751
+ const t = hs(e, ht.TYPE);
13752
13752
  return t != null && t.toLowerCase() === qm;
13753
13753
  }
13754
13754
  function I1(e, t) {
@@ -14149,7 +14149,7 @@ function $n(e, t) {
14149
14149
  break;
14150
14150
  }
14151
14151
  case s.TEMPLATE: {
14152
- ft(e, t);
14152
+ mt(e, t);
14153
14153
  break;
14154
14154
  }
14155
14155
  default:
@@ -14205,7 +14205,7 @@ function ig(e, t) {
14205
14205
  function og(e, t) {
14206
14206
  !e.formElement && e.openElements.tmplCount === 0 && (e._insertElement(t, R.HTML), e.formElement = e.openElements.current, e.openElements.pop());
14207
14207
  }
14208
- function At(e, t) {
14208
+ function kt(e, t) {
14209
14209
  switch (t.tagID) {
14210
14210
  case s.TD:
14211
14211
  case s.TH:
@@ -14260,7 +14260,7 @@ function on(e, t) {
14260
14260
  break;
14261
14261
  }
14262
14262
  case s.TEMPLATE: {
14263
- ft(e, t);
14263
+ mt(e, t);
14264
14264
  break;
14265
14265
  }
14266
14266
  case s.BODY:
@@ -14302,7 +14302,7 @@ function qt(e, t) {
14302
14302
  const Rs = /* @__PURE__ */ new Set([s.CAPTION, s.COL, s.COLGROUP, s.TBODY, s.TD, s.TFOOT, s.TH, s.THEAD, s.TR]);
14303
14303
  function sg(e, t) {
14304
14304
  const n = t.tagID;
14305
- Rs.has(n) ? e.openElements.hasInTableScope(s.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = w.IN_TABLE, At(e, t)) : Te(e, t);
14305
+ Rs.has(n) ? e.openElements.hasInTableScope(s.CAPTION) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(s.CAPTION), e.activeFormattingElements.clearToLastMarker(), e.insertionMode = w.IN_TABLE, kt(e, t)) : Te(e, t);
14306
14306
  }
14307
14307
  function ug(e, t) {
14308
14308
  const n = t.tagID;
@@ -14352,7 +14352,7 @@ function lg(e, t) {
14352
14352
  break;
14353
14353
  }
14354
14354
  case s.TEMPLATE: {
14355
- ft(e, t);
14355
+ mt(e, t);
14356
14356
  break;
14357
14357
  }
14358
14358
  case s.COL:
@@ -14381,11 +14381,11 @@ function Jn(e, t) {
14381
14381
  case s.TBODY:
14382
14382
  case s.TFOOT:
14383
14383
  case s.THEAD: {
14384
- e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = w.IN_TABLE, At(e, t));
14384
+ e.openElements.hasTableBodyContextInTableScope() && (e.openElements.clearBackToTableBodyContext(), e.openElements.pop(), e.insertionMode = w.IN_TABLE, kt(e, t));
14385
14385
  break;
14386
14386
  }
14387
14387
  default:
14388
- At(e, t);
14388
+ kt(e, t);
14389
14389
  }
14390
14390
  }
14391
14391
  function Fr(e, t) {
@@ -14432,7 +14432,7 @@ function Zn(e, t) {
14432
14432
  break;
14433
14433
  }
14434
14434
  default:
14435
- At(e, t);
14435
+ kt(e, t);
14436
14436
  }
14437
14437
  }
14438
14438
  function Ds(e, t) {
@@ -14540,7 +14540,7 @@ function Ps(e, t) {
14540
14540
  break;
14541
14541
  }
14542
14542
  case s.TEMPLATE: {
14543
- ft(e, t);
14543
+ mt(e, t);
14544
14544
  break;
14545
14545
  }
14546
14546
  }
@@ -14573,7 +14573,7 @@ function fg(e, t) {
14573
14573
  case s.TBODY:
14574
14574
  case s.TFOOT:
14575
14575
  case s.THEAD: {
14576
- e.tmplInsertionModeStack[0] = w.IN_TABLE, e.insertionMode = w.IN_TABLE, At(e, t);
14576
+ e.tmplInsertionModeStack[0] = w.IN_TABLE, e.insertionMode = w.IN_TABLE, kt(e, t);
14577
14577
  break;
14578
14578
  }
14579
14579
  case s.COL: {
@@ -14594,7 +14594,7 @@ function fg(e, t) {
14594
14594
  }
14595
14595
  }
14596
14596
  function mg(e, t) {
14597
- t.tagID === s.TEMPLATE && ft(e, t);
14597
+ t.tagID === s.TEMPLATE && mt(e, t);
14598
14598
  }
14599
14599
  function Ms(e, t) {
14600
14600
  e.openElements.tmplCount > 0 ? (e.openElements.popUntilTagNamePopped(s.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode(), e.onEof(t)) : da(e, t);
@@ -14843,12 +14843,12 @@ function Mg(e, t) {
14843
14843
  if (t.parser.tokenizer.state === de.PLAINTEXT) return;
14844
14844
  Pt(t, je(e));
14845
14845
  const r = t.parser.openElements.current;
14846
- let a = "namespaceURI" in r ? r.namespaceURI : ct.html;
14847
- a === ct.html && n === "svg" && (a = ct.svg);
14846
+ let a = "namespaceURI" in r ? r.namespaceURI : dt.html;
14847
+ a === dt.html && n === "svg" && (a = dt.svg);
14848
14848
  const i = Wf(
14849
14849
  // Shallow clone to not delve into `children`: we only need the attributes.
14850
14850
  { ...e, children: [] },
14851
- { space: a === ct.svg ? "svg" : "html" }
14851
+ { space: a === dt.svg ? "svg" : "html" }
14852
14852
  ), o = {
14853
14853
  type: K.START_TAG,
14854
14854
  tagName: n,
@@ -14906,7 +14906,7 @@ function bn(e) {
14906
14906
  };
14907
14907
  }
14908
14908
  function Hg(e) {
14909
- return "children" in e ? _t({ ...e, children: [] }) : _t(e);
14909
+ return "children" in e ? At({ ...e, children: [] }) : At(e);
14910
14910
  }
14911
14911
  function js(e) {
14912
14912
  return function(t, n) {
@@ -15136,7 +15136,7 @@ function Jg(e, ...t) {
15136
15136
  const oe = (e) => {
15137
15137
  const t = (n) => n[e] || [];
15138
15138
  return t.isThemeGetter = !0, t;
15139
- }, Gs = /^\[(?:([a-z-]+):)?(.+)\]$/i, Zg = /^\d+\/\d+$/, eb = /* @__PURE__ */ new Set(["px", "full", "screen"]), tb = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, nb = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, rb = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, ab = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ib = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Ge = (e) => Ct(e) || eb.has(e) || Zg.test(e), Ze = (e) => Mt(e, "length", pb), Ct = (e) => !!e && !Number.isNaN(Number(e)), yr = (e) => Mt(e, "number", Ct), Vt = (e) => !!e && Number.isInteger(Number(e)), ob = (e) => e.endsWith("%") && Ct(e.slice(0, -1)), Q = (e) => Gs.test(e), et = (e) => tb.test(e), sb = /* @__PURE__ */ new Set(["length", "size", "percentage"]), ub = (e) => Mt(e, sb, Qs), lb = (e) => Mt(e, "position", Qs), cb = /* @__PURE__ */ new Set(["image", "url"]), db = (e) => Mt(e, cb, mb), hb = (e) => Mt(e, "", fb), Gt = () => !0, Mt = (e, t, n) => {
15139
+ }, Gs = /^\[(?:([a-z-]+):)?(.+)\]$/i, Zg = /^\d+\/\d+$/, eb = /* @__PURE__ */ new Set(["px", "full", "screen"]), tb = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, nb = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, rb = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, ab = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, ib = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Ge = (e) => _t(e) || eb.has(e) || Zg.test(e), Ze = (e) => Mt(e, "length", pb), _t = (e) => !!e && !Number.isNaN(Number(e)), yr = (e) => Mt(e, "number", _t), Vt = (e) => !!e && Number.isInteger(Number(e)), ob = (e) => e.endsWith("%") && _t(e.slice(0, -1)), Q = (e) => Gs.test(e), et = (e) => tb.test(e), sb = /* @__PURE__ */ new Set(["length", "size", "percentage"]), ub = (e) => Mt(e, sb, Qs), lb = (e) => Mt(e, "position", Qs), cb = /* @__PURE__ */ new Set(["image", "url"]), db = (e) => Mt(e, cb, mb), hb = (e) => Mt(e, "", fb), Gt = () => !0, Mt = (e, t, n) => {
15140
15140
  const r = Gs.exec(e);
15141
15141
  return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1;
15142
15142
  }, pb = (e) => (
@@ -15145,7 +15145,7 @@ const oe = (e) => {
15145
15145
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
15146
15146
  nb.test(e) && !rb.test(e)
15147
15147
  ), Qs = () => !1, fb = (e) => ab.test(e), mb = (e) => ib.test(e), gb = () => {
15148
- const e = oe("colors"), t = oe("spacing"), n = oe("blur"), r = oe("brightness"), a = oe("borderColor"), i = oe("borderRadius"), o = oe("borderSpacing"), u = oe("borderWidth"), l = oe("contrast"), c = oe("grayscale"), d = oe("hueRotate"), h = oe("invert"), g = oe("gap"), p = oe("gradientColorStops"), E = oe("gradientColorStopPositions"), y = oe("inset"), k = oe("margin"), _ = oe("opacity"), L = oe("padding"), O = oe("saturate"), M = oe("scale"), F = oe("sepia"), I = oe("skew"), j = oe("space"), z = oe("translate"), Y = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], H = () => ["auto", Q, t], P = () => [Q, t], ee = () => ["", Ge, Ze], te = () => ["auto", Ct, Q], X = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], se = () => ["solid", "dashed", "dotted", "double", "none"], le = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], be = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], ye = () => ["", "0", Q], x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], ce = () => [Ct, Q];
15148
+ const e = oe("colors"), t = oe("spacing"), n = oe("blur"), r = oe("brightness"), a = oe("borderColor"), i = oe("borderRadius"), o = oe("borderSpacing"), u = oe("borderWidth"), l = oe("contrast"), c = oe("grayscale"), d = oe("hueRotate"), h = oe("invert"), g = oe("gap"), p = oe("gradientColorStops"), E = oe("gradientColorStopPositions"), y = oe("inset"), k = oe("margin"), _ = oe("opacity"), L = oe("padding"), O = oe("saturate"), M = oe("scale"), F = oe("sepia"), I = oe("skew"), j = oe("space"), z = oe("translate"), Y = () => ["auto", "contain", "none"], A = () => ["auto", "hidden", "clip", "visible", "scroll"], H = () => ["auto", Q, t], P = () => [Q, t], ee = () => ["", Ge, Ze], te = () => ["auto", _t, Q], X = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], se = () => ["solid", "dashed", "dotted", "double", "none"], le = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], be = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], ye = () => ["", "0", Q], x = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], ce = () => [_t, Q];
15149
15149
  return {
15150
15150
  cacheSize: 500,
15151
15151
  separator: ":",
@@ -15884,7 +15884,7 @@ const oe = (e) => {
15884
15884
  * @see https://tailwindcss.com/docs/line-clamp
15885
15885
  */
15886
15886
  "line-clamp": [{
15887
- "line-clamp": ["none", Ct, yr]
15887
+ "line-clamp": ["none", _t, yr]
15888
15888
  }],
15889
15889
  /**
15890
15890
  * Line Height
@@ -17222,7 +17222,7 @@ var $s = /* @__PURE__ */ nn.createContext({
17222
17222
  }, [l]);
17223
17223
  jr(() => {
17224
17224
  !i && u.onLoad && l && u.onLoad(k.current);
17225
- }, [l]), Nt(() => {
17225
+ }, [l]), It(() => {
17226
17226
  if (d && !i) {
17227
17227
  var M;
17228
17228
  (M = d.contentWindow) == null || M.addEventListener("DOMContentLoaded", _);
@@ -17297,7 +17297,7 @@ const zi = (e) => typeof e == "boolean" ? "".concat(e) : e === 0 ? "0" : e, Yi =
17297
17297
  ] : c;
17298
17298
  }, []);
17299
17299
  return Yi(e, o, l, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
17300
- }, kt = {
17300
+ }, Nt = {
17301
17301
  x: 2,
17302
17302
  y: 2
17303
17303
  }, _b = {
@@ -17320,7 +17320,7 @@ const zi = (e) => typeof e == "boolean" ? "".concat(e) : e === 0 ? "0" : e, Yi =
17320
17320
  ), F = Math.max(
17321
17321
  -1,
17322
17322
  Math.min(1, O / (_.height / 2))
17323
- ), I = M * kt.x, j = F * kt.y;
17323
+ ), I = M * Nt.x, j = F * Nt.y;
17324
17324
  l({ x: I, y: j }), (Y = (z = e.props).onMouseMove) == null || Y.call(z, E);
17325
17325
  }, h = () => {
17326
17326
  var E, y;
@@ -17515,7 +17515,7 @@ function zr({
17515
17515
  type: n,
17516
17516
  attachments: r
17517
17517
  }) {
17518
- const { anchorTarget: a } = It(), { message: i, variant: o = "default" } = e;
17518
+ const { anchorTarget: a } = St(), { message: i, variant: o = "default" } = e;
17519
17519
  return o === "error" ? /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b("div", { className: "flex flex-row flex-wrap items-center justify-start", children: /* @__PURE__ */ b("div", { className: "leading-snug text-sm text-destructive", children: i }) }) }) : /* @__PURE__ */ U("div", { className: "w-5/6 flex flex-col items-start gap-1", children: [
17520
17520
  /* @__PURE__ */ b("div", { className: "w-full gap-1 flex flex-row flex-wrap items-center justify-start", children: r == null ? void 0 : r.map((u) => /* @__PURE__ */ b(nu, { attachment: u }, u.id)) }),
17521
17521
  i.length > 0 && /* @__PURE__ */ b(
@@ -17615,7 +17615,7 @@ const Lb = 10, Ob = (e, t) => ({
17615
17615
  ...i
17616
17616
  }, o) => {
17617
17617
  const u = e ? Pb[e](t, a) : {};
17618
- return r && u.exit && typeof u.exit == "object" && !Array.isArray(u.exit) && (u.exit.transition = { duration: 0 }), /* @__PURE__ */ b(Tt.div, { ref: o, ...i, ...u, children: n });
17618
+ return r && u.exit && typeof u.exit == "object" && !Array.isArray(u.exit) && (u.exit.transition = { duration: 0 }), /* @__PURE__ */ b(yt.div, { ref: o, ...i, ...u, children: n });
17619
17619
  }
17620
17620
  );
17621
17621
  re.displayName = "MotionDiv";
@@ -17623,9 +17623,9 @@ function Mb() {
17623
17623
  return /* @__PURE__ */ b(Ne, { children: /* @__PURE__ */ U(re, { className: "flex flex-row items-end w-full gap-1 animate-pulse", children: [
17624
17624
  /* @__PURE__ */ b("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ b(En, { children: /* @__PURE__ */ b(nr, {}) }) }),
17625
17625
  /* @__PURE__ */ U("div", { className: "flex items-center [&_span]:bg-secondary-foreground [&_span]:size-1 gap-1 p-2 rounded-xl bg-secondary border", children: [
17626
- /* @__PURE__ */ b(Tt.span, { className: "rounded-full animate-bounce [animation-delay:-0.3s]" }),
17627
- /* @__PURE__ */ b(Tt.span, { className: "rounded-full animate-bounce [animation-delay:-0.15s]" }),
17628
- /* @__PURE__ */ b(Tt.span, { className: "rounded-full animate-bounce" })
17626
+ /* @__PURE__ */ b(yt.span, { className: "rounded-full animate-bounce [animation-delay:-0.3s]" }),
17627
+ /* @__PURE__ */ b(yt.span, { className: "rounded-full animate-bounce [animation-delay:-0.15s]" }),
17628
+ /* @__PURE__ */ b(yt.span, { className: "rounded-full animate-bounce" })
17629
17629
  ] })
17630
17630
  ] }) });
17631
17631
  }
@@ -17676,7 +17676,7 @@ function Bt() {
17676
17676
  }
17677
17677
  function wn() {
17678
17678
  var o, u, l, c, d, h, g, p, E, y, k, _, L, O, M, F, I, j, z, Y, A, H, P, ee, te, X, se;
17679
- const { isSmallScreen: e } = Bt(), { theme: t } = St(), n = (le, be) => e ? `100dv${le}` : be, r = {
17679
+ const { isSmallScreen: e } = Bt(), { theme: t } = at(), n = (le, be) => e ? `100dv${le}` : be, r = {
17680
17680
  zIndex: ((o = t == null ? void 0 : t.widgetTrigger) == null ? void 0 : o.zIndex) ?? 1e7,
17681
17681
  offset: {
17682
17682
  bottom: ((l = (u = t == null ? void 0 : t.widgetTrigger) == null ? void 0 : u.offset) == null ? void 0 : l.bottom) ?? 20,
@@ -17693,7 +17693,7 @@ function wn() {
17693
17693
  borderRadius: e ? "0px" : ((y = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : y.borderRadius) ?? "32px",
17694
17694
  zIndex: ((k = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : k.zIndex) ?? r.zIndex + 1,
17695
17695
  offset: {
17696
- side: e ? 0 : r.offset.bottom + r.size.button + kt.y * 2 + (((L = (_ = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : _.offset) == null ? void 0 : L.side) ?? 10),
17696
+ side: e ? 0 : r.offset.bottom + r.size.button + Nt.y * 2 + (((L = (_ = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : _.offset) == null ? void 0 : L.side) ?? 10),
17697
17697
  align: e ? 0 : r.offset.right + (((M = (O = t == null ? void 0 : t.widgetContentContainer) == null ? void 0 : O.offset) == null ? void 0 : M.align) ?? 0)
17698
17698
  }
17699
17699
  },
@@ -17740,7 +17740,7 @@ function wn() {
17740
17740
  100vh
17741
17741
  - ${a.widgetTrigger.offset.bottom}px
17742
17742
  - ${a.widgetContentContainer.offset.side}px
17743
- - ${kt.y * 2}px
17743
+ - ${Nt.y * 2}px
17744
17744
  )`
17745
17745
  ),
17746
17746
  // Subtract the offset.right twice so that it adds a bit of padding to the left
@@ -18151,7 +18151,7 @@ function Xb(e, t) {
18151
18151
  function Ft() {
18152
18152
  const {
18153
18153
  widgetCtx: { config: e }
18154
- } = St();
18154
+ } = at();
18155
18155
  return jr(() => {
18156
18156
  const n = Qb(e.language) ? e.language : "en";
18157
18157
  return {
@@ -18162,7 +18162,7 @@ function Ft() {
18162
18162
  }
18163
18163
  const ma = () => {
18164
18164
  const [e, t] = Me("ltr");
18165
- return Nt(() => {
18165
+ return It(() => {
18166
18166
  const n = () => {
18167
18167
  typeof document > "u" || t(window.getComputedStyle(document.body).direction);
18168
18168
  };
@@ -18205,7 +18205,7 @@ function $b({
18205
18205
  const [a, i] = Me(
18206
18206
  null
18207
18207
  );
18208
- Nt(() => {
18208
+ It(() => {
18209
18209
  if (!t.type.startsWith("image/")) return;
18210
18210
  const l = new FileReader();
18211
18211
  return l.onload = () => i(l.result), l.onerror = () => console.error("Error reading file"), l.readAsDataURL(t), () => l.abort();
@@ -18404,7 +18404,7 @@ function Jb() {
18404
18404
  ] });
18405
18405
  }
18406
18406
  function Zb() {
18407
- const { widgetCtx: e } = St(), t = Ft();
18407
+ const { widgetCtx: e } = at(), t = Ft();
18408
18408
  return /* @__PURE__ */ b("div", { className: "p-2", children: /* @__PURE__ */ U("div", { className: "p-2 bg-background rounded-3xl border shadow-2xl space-y-2", children: [
18409
18409
  /* @__PURE__ */ U("div", { className: "flex items-center gap-1", children: [
18410
18410
  /* @__PURE__ */ b(Mu, { className: "size-4 text-emerald-500" }),
@@ -18593,7 +18593,7 @@ function c2() {
18593
18593
  },
18594
18594
  children: [
18595
18595
  /* @__PURE__ */ b(
18596
- Tt.div,
18596
+ yt.div,
18597
18597
  {
18598
18598
  initial: { opacity: 0, x: -4, rotate: 360 },
18599
18599
  animate: { opacity: 1, x: 0, rotate: 0 },
@@ -18669,7 +18669,7 @@ function m2(e) {
18669
18669
  return ((t = e == null ? void 0 : e[0]) == null ? void 0 : t.type) === "FROM_AGENT";
18670
18670
  }
18671
18671
  function lu(e) {
18672
- const { componentStore: t } = St();
18672
+ const { componentStore: t } = at();
18673
18673
  if (e.data.action) {
18674
18674
  const r = t.getComponent(e.data.action.name);
18675
18675
  if (r)
@@ -18701,7 +18701,7 @@ function b2({
18701
18701
  messages: e
18702
18702
  }) {
18703
18703
  var n, r, a, i, o, u;
18704
- const { user: t } = It();
18704
+ const { user: t } = St();
18705
18705
  return /* @__PURE__ */ U("div", { className: q("group", "flex flex-col gap-2 justify-end items-end"), children: [
18706
18706
  /* @__PURE__ */ U(En, { className: "bg-primary text-primary-foreground", children: [
18707
18707
  /* @__PURE__ */ b(
@@ -18732,7 +18732,7 @@ function E2({
18732
18732
  function w2() {
18733
18733
  const {
18734
18734
  messagesState: { messages: e }
18735
- } = un(), { isAwaitingBotReply: t } = Vi(), { componentStore: n } = St(), r = It(), a = jr(
18735
+ } = un(), { isAwaitingBotReply: t } = Vi(), { componentStore: n } = at(), r = St(), a = jr(
18736
18736
  () => h2(e),
18737
18737
  [e]
18738
18738
  ), i = !r.initialMessages || r.initialMessages.length === 0 ? ["Hello, how can I help you?"] : r.initialMessages, o = n.getComponent(
@@ -18744,7 +18744,7 @@ function w2() {
18744
18744
  c && (c.scrollTop = c.scrollHeight);
18745
18745
  }, 0);
18746
18746
  }
18747
- return Nt(() => {
18747
+ return It(() => {
18748
18748
  l();
18749
18749
  }, [e]), /* @__PURE__ */ U(
18750
18750
  "div",
@@ -18796,18 +18796,23 @@ function w2() {
18796
18796
  function cu({ className: e }) {
18797
18797
  return /* @__PURE__ */ b(Qu, { className: q("size-4 animate-spin", e) });
18798
18798
  }
18799
- const x2 = "[data-opencx-widget-content-root]";
18800
18799
  function ga({
18801
18800
  width: e,
18802
18801
  height: t
18803
18802
  }) {
18804
- const { isSmallScreen: n } = Bt();
18805
- Nt(() => {
18806
- const r = document.querySelector(x2);
18807
- e && (r == null || r.style.setProperty("--opencx-widget-width", e)), t && (r == null || r.style.setProperty("--opencx-widget-height", t));
18808
- }, [n, t, e]);
18803
+ const { isSmallScreen: n } = Bt(), { contentIframeRef: r } = at();
18804
+ It(() => {
18805
+ var a, i;
18806
+ e && ((a = r == null ? void 0 : r.current) == null || a.style.setProperty(
18807
+ "--opencx-widget-width",
18808
+ e
18809
+ )), t && ((i = r == null ? void 0 : r.current) == null || i.style.setProperty(
18810
+ "--opencx-widget-height",
18811
+ t
18812
+ ));
18813
+ }, [n, t, e, r]);
18809
18814
  }
18810
- function T2() {
18815
+ function x2() {
18811
18816
  const {
18812
18817
  messagesState: { isInitialFetchLoading: e }
18813
18818
  } = un(), {
@@ -18878,8 +18883,8 @@ const Ln = ge.forwardRef(
18878
18883
  }
18879
18884
  );
18880
18885
  Ln.displayName = "Input";
18881
- function y2({ className: e }) {
18882
- return /* @__PURE__ */ U(
18886
+ function T2({ className: e }) {
18887
+ return /* @__PURE__ */ b(
18883
18888
  "svg",
18884
18889
  {
18885
18890
  width: "26",
@@ -18888,21 +18893,18 @@ function y2({ className: e }) {
18888
18893
  fill: "none",
18889
18894
  xmlns: "http://www.w3.org/2000/svg",
18890
18895
  className: q("text-primary-foreground", e),
18891
- children: [
18892
- /* @__PURE__ */ b("title", { children: "Open Logo" }),
18893
- /* @__PURE__ */ b(
18894
- "path",
18895
- {
18896
- d: "M1.34103 25.6132H5.44245C5.74203 25.6228 6.02673 25.7462 6.23867 25.9582C6.45062 26.1703 6.5739 26.4551 6.58348 26.7548V30.8584C6.59305 31.1581 6.71634 31.443 6.92828 31.655C7.14023 31.8671 7.42492 31.9904 7.7245 32H18.2894C18.589 31.9904 18.8737 31.8671 19.0856 31.655C19.2976 31.443 19.4209 31.1581 19.4304 30.8584V26.7548C19.4401 26.4545 19.5638 26.1692 19.7765 25.957C19.9892 25.7449 20.2748 25.6219 20.5749 25.6132H24.659C24.9586 25.6036 25.2433 25.4803 25.4552 25.2682C25.6671 25.0562 25.7904 24.7713 25.8 24.4716V7.52839C25.7904 7.22865 25.6671 6.94381 25.4552 6.73176C25.2433 6.5197 24.9586 6.39635 24.659 6.38677H20.561C20.2603 6.37802 19.9742 6.25457 19.7614 6.04169C19.5487 5.82881 19.4253 5.54261 19.4165 5.24168V1.14161C19.4072 0.84419 19.2858 0.561291 19.0768 0.349589C18.8678 0.137887 18.5865 0.0130193 18.2894 0L7.7245 0C7.42492 0.00957792 7.14023 0.132929 6.92828 0.344983C6.71634 0.557036 6.59305 0.841878 6.58348 1.14161V5.24168C6.57477 5.54203 6.45187 5.82773 6.23983 6.04052C6.0278 6.25331 5.74262 6.37715 5.44245 6.38677H1.34103C1.04144 6.39635 0.756749 6.5197 0.544805 6.73176C0.332861 6.94381 0.209574 7.22865 0.200001 7.52839V24.4716C0.209574 24.7713 0.332861 25.0562 0.544805 25.2682C0.756749 25.4803 1.04144 25.6036 1.34103 25.6132ZM6.58348 24.4716V7.52839C6.59305 7.22865 6.71634 6.94381 6.92828 6.73176C7.14023 6.5197 7.42492 6.39635 7.7245 6.38677H18.2894C18.589 6.39635 18.8737 6.5197 19.0856 6.73176C19.2976 6.94381 19.4209 7.22865 19.4304 7.52839V24.4716C19.4209 24.7713 19.2976 25.0562 19.0856 25.2682C18.8737 25.4803 18.589 25.6036 18.2894 25.6132H7.7245C7.42492 25.6036 7.14023 25.4803 6.92828 25.2682C6.71634 25.0562 6.59305 24.7713 6.58348 24.4716Z",
18897
- fill: "currentColor"
18898
- }
18899
- )
18900
- ]
18896
+ children: /* @__PURE__ */ b(
18897
+ "path",
18898
+ {
18899
+ d: "M1.34103 25.6132H5.44245C5.74203 25.6228 6.02673 25.7462 6.23867 25.9582C6.45062 26.1703 6.5739 26.4551 6.58348 26.7548V30.8584C6.59305 31.1581 6.71634 31.443 6.92828 31.655C7.14023 31.8671 7.42492 31.9904 7.7245 32H18.2894C18.589 31.9904 18.8737 31.8671 19.0856 31.655C19.2976 31.443 19.4209 31.1581 19.4304 30.8584V26.7548C19.4401 26.4545 19.5638 26.1692 19.7765 25.957C19.9892 25.7449 20.2748 25.6219 20.5749 25.6132H24.659C24.9586 25.6036 25.2433 25.4803 25.4552 25.2682C25.6671 25.0562 25.7904 24.7713 25.8 24.4716V7.52839C25.7904 7.22865 25.6671 6.94381 25.4552 6.73176C25.2433 6.5197 24.9586 6.39635 24.659 6.38677H20.561C20.2603 6.37802 19.9742 6.25457 19.7614 6.04169C19.5487 5.82881 19.4253 5.54261 19.4165 5.24168V1.14161C19.4072 0.84419 19.2858 0.561291 19.0768 0.349589C18.8678 0.137887 18.5865 0.0130193 18.2894 0L7.7245 0C7.42492 0.00957792 7.14023 0.132929 6.92828 0.344983C6.71634 0.557036 6.59305 0.841878 6.58348 1.14161V5.24168C6.57477 5.54203 6.45187 5.82773 6.23983 6.04052C6.0278 6.25331 5.74262 6.37715 5.44245 6.38677H1.34103C1.04144 6.39635 0.756749 6.5197 0.544805 6.73176C0.332861 6.94381 0.209574 7.22865 0.200001 7.52839V24.4716C0.209574 24.7713 0.332861 25.0562 0.544805 25.2682C0.756749 25.4803 1.04144 25.6036 1.34103 25.6132ZM6.58348 24.4716V7.52839C6.59305 7.22865 6.71634 6.94381 6.92828 6.73176C7.14023 6.5197 7.42492 6.39635 7.7245 6.38677H18.2894C18.589 6.39635 18.8737 6.5197 19.0856 6.73176C19.2976 6.94381 19.4209 7.22865 19.4304 7.52839V24.4716C19.4209 24.7713 19.2976 25.0562 19.0856 25.2682C18.8737 25.4803 18.589 25.6036 18.2894 25.6132H7.7245C7.42492 25.6036 7.14023 25.4803 6.92828 25.2682C6.71634 25.0562 6.59305 24.7713 6.58348 24.4716Z",
18900
+ fill: "currentColor"
18901
+ }
18902
+ )
18901
18903
  }
18902
18904
  );
18903
18905
  }
18904
18906
  function du({ className: e }) {
18905
- const { token: t } = It();
18907
+ const { token: t } = St();
18906
18908
  return /* @__PURE__ */ b(
18907
18909
  "div",
18908
18910
  {
@@ -18921,7 +18923,7 @@ function du({ className: e }) {
18921
18923
  /* @__PURE__ */ b("span", { children: "Powered by" }),
18922
18924
  /* @__PURE__ */ b("span", { children: " " }),
18923
18925
  /* @__PURE__ */ U("span", { className: "flex items-center gap-[1px]", children: [
18924
- /* @__PURE__ */ b("span", { children: /* @__PURE__ */ b(y2, { className: "size-3 inline-block" }) }),
18926
+ /* @__PURE__ */ b("span", { children: /* @__PURE__ */ b(T2, { className: "size-3 inline-block" }) }),
18925
18927
  /* @__PURE__ */ b("span", { className: "font-semibold", children: "open" })
18926
18928
  ] })
18927
18929
  ]
@@ -18930,36 +18932,35 @@ function du({ className: e }) {
18930
18932
  }
18931
18933
  );
18932
18934
  }
18933
- const C2 = "[data-opencx-widget-content-root]";
18934
- function _2() {
18935
- const e = sn(null);
18936
- return Nt(() => {
18937
- const t = document.querySelector(C2);
18938
- if (t && e.current) {
18939
- const n = e.current;
18940
- let r;
18941
- const a = new ResizeObserver(() => {
18942
- r = requestAnimationFrame(() => {
18943
- const i = n.offsetHeight;
18944
- t.style.setProperty(
18935
+ function y2() {
18936
+ const { contentIframeRef: e } = at(), t = sn(null);
18937
+ return It(() => {
18938
+ const n = e == null ? void 0 : e.current;
18939
+ if (n && t.current) {
18940
+ const r = t.current;
18941
+ let a;
18942
+ const i = new ResizeObserver(() => {
18943
+ a = requestAnimationFrame(() => {
18944
+ const o = r.offsetHeight;
18945
+ n.style.setProperty(
18945
18946
  "--opencx-widget-height",
18946
- `${i.toFixed(1)}px`
18947
+ `${o.toFixed(1)}px`
18947
18948
  );
18948
18949
  });
18949
18950
  });
18950
- return a.observe(n), () => {
18951
- cancelAnimationFrame(r), a.unobserve(n);
18951
+ return i.observe(r), () => {
18952
+ cancelAnimationFrame(a), i.unobserve(r);
18952
18953
  };
18953
18954
  }
18954
- }, []), { observedElementRef: e };
18955
+ }, [e]), { observedElementRef: t };
18955
18956
  }
18956
- const A2 = rr.object({
18957
+ const C2 = rr.object({
18957
18958
  name: rr.string().min(2),
18958
18959
  email: rr.string().email()
18959
18960
  });
18960
- function k2() {
18961
+ function _2() {
18961
18962
  var _, L, O, M, F, I, j, z, Y;
18962
- const { setIsOpen: e } = cn(), { createUnverifiedContact: t } = Nu(), { isSmallScreen: n } = Bt(), r = It(), { theme: a } = wn(), i = Ft(), { data: o } = zn(), { observedElementRef: u } = _2();
18963
+ const { setIsOpen: e } = cn(), { createUnverifiedContact: t } = Nu(), { isSmallScreen: n } = Bt(), r = St(), { theme: a } = wn(), i = Ft(), { data: o } = zn(), { observedElementRef: u } = y2();
18963
18964
  ga({
18964
18965
  height: void 0,
18965
18966
  width: a.screens.welcome.width
@@ -18969,7 +18970,7 @@ function k2() {
18969
18970
  ), [p, E] = Me({}), [y, k] = Iu(
18970
18971
  async (A) => {
18971
18972
  A.preventDefault();
18972
- const H = A2.safeParse({ name: l, email: d });
18973
+ const H = C2.safeParse({ name: l, email: d });
18973
18974
  H.success && await t(
18974
18975
  {
18975
18976
  email: H.data.email,
@@ -19114,8 +19115,8 @@ function k2() {
19114
19115
  }
19115
19116
  );
19116
19117
  }
19117
- function N2({ session: e }) {
19118
- const { bot: t } = It(), { toChatScreen: n } = ln(), r = e.assignee.kind === "human" ? e.assignee.name || "Support Agent" : (t == null ? void 0 : t.name) || "AI Support Agent", a = e.assignee.kind === "human" ? e.assignee.avatarUrl || "" : (t == null ? void 0 : t.avatar) || "";
19118
+ function A2({ session: e }) {
19119
+ const { bot: t } = St(), { toChatScreen: n } = ln(), r = e.assignee.kind === "human" ? e.assignee.name || "Support Agent" : (t == null ? void 0 : t.name) || "AI Support Agent", a = e.assignee.kind === "human" ? e.assignee.avatarUrl || "" : (t == null ? void 0 : t.avatar) || "";
19119
19120
  return /* @__PURE__ */ U(
19120
19121
  _e,
19121
19122
  {
@@ -19144,7 +19145,7 @@ function N2({ session: e }) {
19144
19145
  }
19145
19146
  );
19146
19147
  }
19147
- function I2() {
19148
+ function k2() {
19148
19149
  const e = Ft(), { toChatScreen: t } = ln(), {
19149
19150
  sessionsState: { data: n, isInitialFetchLoading: r }
19150
19151
  } = Un();
@@ -19160,7 +19161,7 @@ function I2() {
19160
19161
  {
19161
19162
  className: "flex-1 flex flex-col gap-2 relative",
19162
19163
  children: n.length ? /* @__PURE__ */ U(qi, { children: [
19163
- /* @__PURE__ */ b(Ne, { children: n.map((a, i) => /* @__PURE__ */ b(re, { snapExit: !0, children: /* @__PURE__ */ b(N2, { session: a }) }, `${a.id}-${i}`)) }),
19164
+ /* @__PURE__ */ b(Ne, { children: n.map((a, i) => /* @__PURE__ */ b(re, { snapExit: !0, children: /* @__PURE__ */ b(A2, { session: a }) }, `${a.id}-${i}`)) }),
19164
19165
  /* @__PURE__ */ b("div", { className: "mt-auto w-full rounded-3xl sticky bottom-0 outline outline-8 outline-background", children: /* @__PURE__ */ b(
19165
19166
  _e,
19166
19167
  {
@@ -19188,7 +19189,7 @@ function I2() {
19188
19189
  "sessions"
19189
19190
  ) }) });
19190
19191
  }
19191
- function S2() {
19192
+ function N2() {
19192
19193
  const { theme: e } = wn();
19193
19194
  return ga({
19194
19195
  width: e.screens.sessions.width,
@@ -19210,14 +19211,14 @@ function S2() {
19210
19211
  children: [
19211
19212
  /* @__PURE__ */ U("div", { className: "size-full flex flex-col", children: [
19212
19213
  /* @__PURE__ */ b(uu, {}),
19213
- /* @__PURE__ */ b(I2, {})
19214
+ /* @__PURE__ */ b(k2, {})
19214
19215
  ] }),
19215
19216
  /* @__PURE__ */ b(du, {})
19216
19217
  ]
19217
19218
  }
19218
19219
  );
19219
19220
  }
19220
- function L2() {
19221
+ function I2() {
19221
19222
  zn();
19222
19223
  const {
19223
19224
  routerState: { screen: e }
@@ -19233,7 +19234,7 @@ function L2() {
19233
19234
  fadeIn: "right",
19234
19235
  className: "size-full",
19235
19236
  snapExit: !0,
19236
- children: /* @__PURE__ */ b(k2, {})
19237
+ children: /* @__PURE__ */ b(_2, {})
19237
19238
  },
19238
19239
  e
19239
19240
  );
@@ -19244,7 +19245,7 @@ function L2() {
19244
19245
  fadeIn: "right",
19245
19246
  className: "size-full",
19246
19247
  snapExit: !0,
19247
- children: /* @__PURE__ */ b(S2, {})
19248
+ children: /* @__PURE__ */ b(N2, {})
19248
19249
  },
19249
19250
  e
19250
19251
  );
@@ -19255,7 +19256,7 @@ function L2() {
19255
19256
  fadeIn: "right",
19256
19257
  className: "size-full",
19257
19258
  snapExit: !0,
19258
- children: /* @__PURE__ */ b(T2, {})
19259
+ children: /* @__PURE__ */ b(x2, {})
19259
19260
  },
19260
19261
  e
19261
19262
  );
@@ -19265,7 +19266,7 @@ function L2() {
19265
19266
  })() })
19266
19267
  ] });
19267
19268
  }
19268
- const O2 = `<!DOCTYPE html>
19269
+ const S2 = `<!DOCTYPE html>
19269
19270
  <html>
19270
19271
  <head>
19271
19272
  <style>
@@ -19283,30 +19284,26 @@ html, body {
19283
19284
  <body>
19284
19285
  </body>
19285
19286
  </html>`;
19286
- function R2() {
19287
- const { isOpen: e } = cn(), t = St(), { theme: n, cssVars: r, computed: a } = wn();
19287
+ function L2() {
19288
+ const { isOpen: e } = cn(), { version: t, contentIframeRef: n } = at(), { theme: r, cssVars: a, computed: i } = wn();
19288
19289
  return /* @__PURE__ */ b(
19289
19290
  Hn.Content,
19290
19291
  {
19291
- onInteractOutside: (i) => i.preventDefault(),
19292
+ onInteractOutside: (o) => o.preventDefault(),
19292
19293
  forceMount: !0,
19293
19294
  style: {
19294
- zIndex: n.widgetContentContainer.zIndex,
19295
- fontSize: "16px",
19296
- // @ts-expect-error this is a valid css variable
19297
- "--opencx-widget-width": a.minWidth,
19298
- "--opencx-widget-height": a.minHeight
19295
+ zIndex: r.widgetContentContainer.zIndex,
19296
+ fontSize: "16px"
19299
19297
  },
19300
19298
  side: "top",
19301
19299
  align: "end",
19302
- sideOffset: n.widgetContentContainer.offset.side,
19303
- alignOffset: n.widgetContentContainer.offset.align,
19300
+ sideOffset: r.widgetContentContainer.offset.side,
19301
+ alignOffset: r.widgetContentContainer.offset.align,
19304
19302
  avoidCollisions: !1,
19305
19303
  "data-opencx-widget": !0,
19306
- "data-opencx-widget-content-root": !0,
19307
19304
  asChild: !0,
19308
19305
  children: /* @__PURE__ */ b(
19309
- Tt.div,
19306
+ yt.div,
19310
19307
  {
19311
19308
  animate: e ? "visible" : "hidden",
19312
19309
  initial: "hidden",
@@ -19326,24 +19323,28 @@ function R2() {
19326
19323
  children: /* @__PURE__ */ b(
19327
19324
  fa,
19328
19325
  {
19329
- initialContent: O2,
19326
+ ref: n,
19327
+ initialContent: S2,
19330
19328
  allowFullScreen: !0,
19331
19329
  title: "OpenCX Live Chat",
19332
19330
  "data-opencx-widget": !0,
19333
19331
  style: {
19334
- minWidth: a.minWidth,
19332
+ // @ts-expect-error this is a valid css variable
19333
+ "--opencx-widget-width": i.minWidth,
19334
+ "--opencx-widget-height": i.minHeight,
19335
+ minWidth: i.minWidth,
19335
19336
  width: "var(--opencx-widget-width)",
19336
- maxWidth: a.maxWidth,
19337
+ maxWidth: i.maxWidth,
19337
19338
  // Relative to the viewport
19338
- minHeight: a.minHeight,
19339
+ minHeight: i.minHeight,
19339
19340
  height: "var(--opencx-widget-height)",
19340
- maxHeight: a.maxHeight,
19341
+ maxHeight: i.maxHeight,
19341
19342
  // Relative to the viewport
19342
19343
  overflow: "hidden",
19343
19344
  /** outline is better than border because of box sizing; the outline wouldn't affect the content inside... the border will mess up how the children's border radius sits with the parent */
19344
19345
  outline: "1px solid",
19345
19346
  outlineColor: "hsl(0 0% 50% / .5)",
19346
- borderRadius: n.widgetContentContainer.borderRadius,
19347
+ borderRadius: r.widgetContentContainer.borderRadius,
19347
19348
  boxShadow: "0 25px 50px -12px rgb(0 0 0 / 0.25)",
19348
19349
  transitionProperty: "all",
19349
19350
  transitionTimingFunction: "cubic-bezier(0.16, 1, 0.3, 1)",
@@ -19365,14 +19366,14 @@ function R2() {
19365
19366
  "div",
19366
19367
  {
19367
19368
  style: {
19368
- ...r
19369
+ ...a
19369
19370
  },
19370
- "data-version": t.version,
19371
+ "data-version": t,
19371
19372
  "data-opencx-widget": !0,
19372
19373
  className: q(
19373
19374
  "antialiased font-inter bg-primary size-full overflow-hidden isolate relative text-secondary-foreground"
19374
19375
  ),
19375
- children: /* @__PURE__ */ b(L2, {})
19376
+ children: /* @__PURE__ */ b(I2, {})
19376
19377
  }
19377
19378
  )
19378
19379
  }
@@ -19386,7 +19387,7 @@ function R2() {
19386
19387
  }
19387
19388
  );
19388
19389
  }
19389
- function D2({
19390
+ function O2({
19390
19391
  className: e,
19391
19392
  style: t
19392
19393
  }) {
@@ -19401,7 +19402,6 @@ function D2({
19401
19402
  className: q("text-primary-foreground", e),
19402
19403
  style: t,
19403
19404
  children: [
19404
- /* @__PURE__ */ b("title", { children: "Chat Bubble" }),
19405
19405
  /* @__PURE__ */ b(
19406
19406
  "path",
19407
19407
  {
@@ -19422,7 +19422,7 @@ function D2({
19422
19422
  }
19423
19423
  );
19424
19424
  }
19425
- function v2({
19425
+ function R2({
19426
19426
  className: e,
19427
19427
  style: t
19428
19428
  }) {
@@ -19437,7 +19437,6 @@ function v2({
19437
19437
  className: q("text-primary-foreground", e),
19438
19438
  style: t,
19439
19439
  children: [
19440
- /* @__PURE__ */ b("title", { children: "Open Logo Pattern" }),
19441
19440
  /* @__PURE__ */ b(
19442
19441
  "path",
19443
19442
  {
@@ -19470,7 +19469,7 @@ function v2({
19470
19469
  }
19471
19470
  );
19472
19471
  }
19473
- const P2 = `<!DOCTYPE html>
19472
+ const D2 = `<!DOCTYPE html>
19474
19473
  <html>
19475
19474
  <head>
19476
19475
  <style>
@@ -19487,15 +19486,15 @@ html, body {
19487
19486
  <body>
19488
19487
  </body>
19489
19488
  </html>`;
19490
- function M2() {
19489
+ function v2() {
19491
19490
  const { isOpen: e } = cn(), { theme: t, cssVars: n } = wn();
19492
19491
  return /* @__PURE__ */ b(
19493
19492
  fa,
19494
19493
  {
19495
- initialContent: P2,
19494
+ initialContent: D2,
19496
19495
  style: {
19497
- height: `calc(${t.widgetTrigger.size.button}px + ${kt.x * 2}px)`,
19498
- width: `calc(${t.widgetTrigger.size.button}px + ${kt.y * 2}px)`,
19496
+ height: `calc(${t.widgetTrigger.size.button}px + ${Nt.x * 2}px)`,
19497
+ width: `calc(${t.widgetTrigger.size.button}px + ${Nt.y * 2}px)`,
19499
19498
  fontSize: "16px",
19500
19499
  position: "fixed",
19501
19500
  zIndex: t.widgetTrigger.zIndex,
@@ -19564,7 +19563,7 @@ function M2() {
19564
19563
  animate: { rotate: 0 }
19565
19564
  },
19566
19565
  children: /* @__PURE__ */ b(
19567
- D2,
19566
+ O2,
19568
19567
  {
19569
19568
  style: {
19570
19569
  width: t.widgetTrigger.size.icon,
@@ -19577,7 +19576,7 @@ function M2() {
19577
19576
  "message-icon"
19578
19577
  ) }),
19579
19578
  /* @__PURE__ */ b(
19580
- v2,
19579
+ R2,
19581
19580
  {
19582
19581
  className: "absolute inset-0 opacity-5",
19583
19582
  style: {
@@ -19596,7 +19595,7 @@ function M2() {
19596
19595
  }
19597
19596
  );
19598
19597
  }
19599
- function B2() {
19598
+ function P2() {
19600
19599
  return /* @__PURE__ */ b(
19601
19600
  Hn.Anchor,
19602
19601
  {
@@ -19604,16 +19603,16 @@ function B2() {
19604
19603
  }
19605
19604
  );
19606
19605
  }
19607
- function F2() {
19606
+ function M2() {
19608
19607
  const { isOpen: e, setIsOpen: t } = cn();
19609
19608
  return /* @__PURE__ */ U(Hn.Root, { open: e, onOpenChange: t, children: [
19610
19609
  /* @__PURE__ */ b("style", { children: qr }),
19611
- /* @__PURE__ */ b(B2, {}),
19612
- /* @__PURE__ */ b(M2, {}),
19613
- /* @__PURE__ */ b(R2, {})
19610
+ /* @__PURE__ */ b(P2, {}),
19611
+ /* @__PURE__ */ b(v2, {}),
19612
+ /* @__PURE__ */ b(L2, {})
19614
19613
  ] });
19615
19614
  }
19616
- const H2 = [
19615
+ const B2 = [
19617
19616
  {
19618
19617
  key: "loading",
19619
19618
  component: Mb
@@ -19630,7 +19629,7 @@ const H2 = [
19630
19629
  key: "agent_message",
19631
19630
  component: zr
19632
19631
  }
19633
- ], U2 = {
19632
+ ], F2 = {
19634
19633
  get: async (e) => localStorage.getItem(e),
19635
19634
  set: async (e, t) => {
19636
19635
  localStorage.setItem(e, t);
@@ -19639,21 +19638,21 @@ const H2 = [
19639
19638
  localStorage.removeItem(e);
19640
19639
  }
19641
19640
  };
19642
- function J2({
19641
+ function K2({
19643
19642
  options: e,
19644
19643
  components: t = []
19645
19644
  }) {
19646
19645
  return /* @__PURE__ */ b(
19647
19646
  Su,
19648
19647
  {
19649
- components: [...H2, ...t],
19648
+ components: [...B2, ...t],
19650
19649
  options: e,
19651
- storage: U2,
19652
- children: /* @__PURE__ */ b(Lu, { children: /* @__PURE__ */ b(F2, {}) })
19650
+ storage: F2,
19651
+ children: /* @__PURE__ */ b(Lu, { children: /* @__PURE__ */ b(M2, {}) })
19653
19652
  }
19654
19653
  );
19655
19654
  }
19656
19655
  export {
19657
- J2 as Widget
19656
+ K2 as Widget
19658
19657
  };
19659
19658
  //# sourceMappingURL=designs.js.map