@qtalo/qt-ui-library 0.1.28 → 0.1.30

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
@@ -326,14 +326,14 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
326
326
  function createDOMPurify() {
327
327
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
328
328
  if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
329
- let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e, Zo = c.prototype, g = lookupGetter(Zo, "cloneNode"), O = lookupGetter(Zo, "remove"), Qo = lookupGetter(Zo, "nextSibling"), $o = lookupGetter(Zo, "childNodes"), es = lookupGetter(Zo, "parentNode");
329
+ let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e, g = c.prototype, O = lookupGetter(g, "cloneNode"), A = lookupGetter(g, "remove"), Zo = lookupGetter(g, "nextSibling"), Qo = lookupGetter(g, "childNodes"), $o = lookupGetter(g, "parentNode");
330
330
  if (typeof o == "function") {
331
331
  let e = n.createElement("template");
332
332
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
333
333
  }
334
- let A, R = "", { implementation: ts, createNodeIterator: ns, createDocumentFragment: rs, getElementsByTagName: is } = n, { importNode: as } = r, B = _createHooksMap();
335
- t.isSupported = typeof entries == "function" && typeof es == "function" && ts && ts.createHTMLDocument !== void 0;
336
- let { MUSTACHE_EXPR: os, ERB_EXPR: ss, TMPLIT_EXPR: cs, DATA_ATTR: ls, ARIA_ATTR: us, IS_SCRIPT_OR_DATA: ds, ATTR_WHITESPACE: fs, CUSTOM_ELEMENT: ps } = EXPRESSIONS, { IS_ALLOWED_URI: ms } = EXPRESSIONS, V = null, hs = addToSet({}, [
334
+ let R, B = "", { implementation: V, createNodeIterator: es, createDocumentFragment: ts, getElementsByTagName: ns } = n, { importNode: rs } = r, is = _createHooksMap();
335
+ t.isSupported = typeof entries == "function" && typeof $o == "function" && V && V.createHTMLDocument !== void 0;
336
+ let { MUSTACHE_EXPR: as, ERB_EXPR: os, TMPLIT_EXPR: ss, DATA_ATTR: cs, ARIA_ATTR: ls, IS_SCRIPT_OR_DATA: us, ATTR_WHITESPACE: ds, CUSTOM_ELEMENT: fs } = EXPRESSIONS, { IS_ALLOWED_URI: ps } = EXPRESSIONS, ms = null, hs = addToSet({}, [
337
337
  ...html$1,
338
338
  ...svg$1,
339
339
  ...svgFilters,
@@ -445,15 +445,15 @@ function createDOMPurify() {
445
445
  }, ac = function() {
446
446
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
447
447
  if (!(nc && nc === e)) {
448
- if ((!e || typeof e != "object") && (e = {}), e = clone(e), ec = tc.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = ec === "application/xhtml+xml" ? stringToString : stringToLowerCase, V = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : hs, gs = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : _s, Ys = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : Xs, Hs = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Us), e.ADD_URI_SAFE_ATTR, Y) : Us, Bs = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Vs), e.ADD_DATA_URI_TAGS, Y) : Vs, Rs = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : zs, vs = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), ys = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Ls = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, xs = e.ALLOW_ARIA_ATTR !== !1, Ss = e.ALLOW_DATA_ATTR !== !1, Cs = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ws = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ts = e.SAFE_FOR_TEMPLATES || !1, Es = e.SAFE_FOR_XML !== !1, Ds = e.WHOLE_DOCUMENT || !1, As = e.RETURN_DOM || !1, js = e.RETURN_DOM_FRAGMENT || !1, Ms = e.RETURN_TRUSTED_TYPE || !1, ks = e.FORCE_BODY || !1, Ns = e.SANITIZE_DOM !== !1, Ps = e.SANITIZE_NAMED_PROPS || !1, Fs = e.KEEP_CONTENT !== !1, Is = e.IN_PLACE || !1, ms = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, qs = e.NAMESPACE || Ks, Zs = e.MATHML_TEXT_INTEGRATION_POINTS || Zs, Qs = e.HTML_INTEGRATION_POINTS || Qs, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && ic(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && ic(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (H.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ts && (Ss = !1), js && (As = !0), Ls && (V = addToSet({}, text), gs = [], Ls.html === !0 && (addToSet(V, html$1), addToSet(gs, html)), Ls.svg === !0 && (addToSet(V, svg$1), addToSet(gs, svg), addToSet(gs, xml)), Ls.svgFilters === !0 && (addToSet(V, svgFilters), addToSet(gs, svg), addToSet(gs, xml)), Ls.mathMl === !0 && (addToSet(V, mathMl$1), addToSet(gs, mathMl), addToSet(gs, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? bs.tagCheck = e.ADD_TAGS : (V === hs && (V = clone(V)), addToSet(V, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? bs.attributeCheck = e.ADD_ATTR : (gs === _s && (gs = clone(gs)), addToSet(gs, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Hs, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Rs === zs && (Rs = clone(Rs)), addToSet(Rs, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Rs === zs && (Rs = clone(Rs)), addToSet(Rs, e.ADD_FORBID_CONTENTS, Y)), Fs && (V["#text"] = !0), Ds && addToSet(V, [
448
+ if ((!e || typeof e != "object") && (e = {}), e = clone(e), ec = tc.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = ec === "application/xhtml+xml" ? stringToString : stringToLowerCase, ms = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : hs, gs = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : _s, Ys = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : Xs, Hs = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Us), e.ADD_URI_SAFE_ATTR, Y) : Us, Bs = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Vs), e.ADD_DATA_URI_TAGS, Y) : Vs, Rs = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : zs, vs = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), ys = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Ls = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, xs = e.ALLOW_ARIA_ATTR !== !1, Ss = e.ALLOW_DATA_ATTR !== !1, Cs = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ws = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ts = e.SAFE_FOR_TEMPLATES || !1, Es = e.SAFE_FOR_XML !== !1, Ds = e.WHOLE_DOCUMENT || !1, As = e.RETURN_DOM || !1, js = e.RETURN_DOM_FRAGMENT || !1, Ms = e.RETURN_TRUSTED_TYPE || !1, ks = e.FORCE_BODY || !1, Ns = e.SANITIZE_DOM !== !1, Ps = e.SANITIZE_NAMED_PROPS || !1, Fs = e.KEEP_CONTENT !== !1, Is = e.IN_PLACE || !1, ps = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, qs = e.NAMESPACE || Ks, Zs = e.MATHML_TEXT_INTEGRATION_POINTS || Zs, Qs = e.HTML_INTEGRATION_POINTS || Qs, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && ic(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && ic(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (H.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ts && (Ss = !1), js && (As = !0), Ls && (ms = addToSet({}, text), gs = [], Ls.html === !0 && (addToSet(ms, html$1), addToSet(gs, html)), Ls.svg === !0 && (addToSet(ms, svg$1), addToSet(gs, svg), addToSet(gs, xml)), Ls.svgFilters === !0 && (addToSet(ms, svgFilters), addToSet(gs, svg), addToSet(gs, xml)), Ls.mathMl === !0 && (addToSet(ms, mathMl$1), addToSet(gs, mathMl), addToSet(gs, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? bs.tagCheck = e.ADD_TAGS : (ms === hs && (ms = clone(ms)), addToSet(ms, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? bs.attributeCheck = e.ADD_ATTR : (gs === _s && (gs = clone(gs)), addToSet(gs, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Hs, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Rs === zs && (Rs = clone(Rs)), addToSet(Rs, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Rs === zs && (Rs = clone(Rs)), addToSet(Rs, e.ADD_FORBID_CONTENTS, Y)), Fs && (ms["#text"] = !0), Ds && addToSet(ms, [
449
449
  "html",
450
450
  "head",
451
451
  "body"
452
- ]), V.table && (addToSet(V, ["tbody"]), delete vs.tbody), e.TRUSTED_TYPES_POLICY) {
452
+ ]), ms.table && (addToSet(ms, ["tbody"]), delete vs.tbody), e.TRUSTED_TYPES_POLICY) {
453
453
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
454
454
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
455
- A = e.TRUSTED_TYPES_POLICY, R = A.createHTML("");
456
- } else A === void 0 && (A = _createTrustedTypesPolicy(h, i)), A !== null && typeof R == "string" && (R = A.createHTML(""));
455
+ R = e.TRUSTED_TYPES_POLICY, B = R.createHTML("");
456
+ } else R === void 0 && (R = _createTrustedTypesPolicy(h, i)), R !== null && typeof B == "string" && (B = R.createHTML(""));
457
457
  freeze && freeze(e), nc = e;
458
458
  }
459
459
  }, oc = addToSet({}, [
@@ -461,7 +461,7 @@ function createDOMPurify() {
461
461
  ...svgFilters,
462
462
  ...svgDisallowed
463
463
  ]), sc = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), cc = function(e) {
464
- let t = es(e);
464
+ let t = $o(e);
465
465
  (!t || !t.tagName) && (t = {
466
466
  namespaceURI: qs,
467
467
  tagName: "template"
@@ -471,9 +471,9 @@ function createDOMPurify() {
471
471
  }, lc = function(e) {
472
472
  arrayPush(t.removed, { element: e });
473
473
  try {
474
- es(e).removeChild(e);
474
+ $o(e).removeChild(e);
475
475
  } catch {
476
- O(e);
476
+ A(e);
477
477
  }
478
478
  }, uc = function(e, n) {
479
479
  try {
@@ -501,20 +501,20 @@ function createDOMPurify() {
501
501
  r = t && t[0];
502
502
  }
503
503
  ec === "application/xhtml+xml" && qs === Ks && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
504
- let i = A ? A.createHTML(e) : e;
504
+ let i = R ? R.createHTML(e) : e;
505
505
  if (qs === Ks) try {
506
506
  t = new p().parseFromString(i, ec);
507
507
  } catch {}
508
508
  if (!t || !t.documentElement) {
509
- t = ts.createDocument(qs, "template", null);
509
+ t = V.createDocument(qs, "template", null);
510
510
  try {
511
- t.documentElement.innerHTML = Js ? R : i;
511
+ t.documentElement.innerHTML = Js ? B : i;
512
512
  } catch {}
513
513
  }
514
514
  let a = t.body || t.documentElement;
515
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), qs === Ks ? is.call(t, Ds ? "html" : "body")[0] : Ds ? t.documentElement : a;
515
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), qs === Ks ? ns.call(t, Ds ? "html" : "body")[0] : Ds ? t.documentElement : a;
516
516
  }, fc = function(e) {
517
- return ns.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
517
+ return es.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
518
518
  }, pc = function(e) {
519
519
  return e instanceof f && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
520
520
  }, mc = function(e) {
@@ -527,45 +527,45 @@ function createDOMPurify() {
527
527
  }
528
528
  let gc = function(e) {
529
529
  let n = null;
530
- if (hc(B.beforeSanitizeElements, e, null), pc(e)) return lc(e), !0;
530
+ if (hc(is.beforeSanitizeElements, e, null), pc(e)) return lc(e), !0;
531
531
  let r = Y(e.nodeName);
532
- if (hc(B.uponSanitizeElement, e, {
532
+ if (hc(is.uponSanitizeElement, e, {
533
533
  tagName: r,
534
- allowedTags: V
534
+ allowedTags: ms
535
535
  }), Es && e.hasChildNodes() && !mc(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Es && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return lc(e), !0;
536
- if (!(bs.tagCheck instanceof Function && bs.tagCheck(r)) && (!V[r] || vs[r])) {
536
+ if (!(bs.tagCheck instanceof Function && bs.tagCheck(r)) && (!ms[r] || vs[r])) {
537
537
  if (!vs[r] && vc(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
538
538
  if (Fs && !Rs[r]) {
539
- let t = es(e) || e.parentNode, n = $o(e) || e.childNodes;
539
+ let t = $o(e) || e.parentNode, n = Qo(e) || e.childNodes;
540
540
  if (n && t) {
541
541
  let r = n.length;
542
542
  for (let i = r - 1; i >= 0; --i) {
543
- let r = g(n[i], !0);
544
- r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, Qo(e));
543
+ let r = O(n[i], !0);
544
+ r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, Zo(e));
545
545
  }
546
546
  }
547
547
  }
548
548
  return lc(e), !0;
549
549
  }
550
550
  return e instanceof c && !cc(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (lc(e), !0) : (Ts && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
551
+ as,
551
552
  os,
552
- ss,
553
- cs
553
+ ss
554
554
  ], (e) => {
555
555
  n = stringReplace(n, e, " ");
556
- }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), hc(B.afterSanitizeElements, e, null), !1);
556
+ }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), hc(is.afterSanitizeElements, e, null), !1);
557
557
  }, _c = function(e, t, r) {
558
558
  if (Ns && (t === "id" || t === "name") && (r in n || r in rc)) return !1;
559
- if (!(Ss && !ys[t] && regExpTest(ls, t)) && !(xs && regExpTest(us, t)) && !(bs.attributeCheck instanceof Function && bs.attributeCheck(t, e))) {
559
+ if (!(Ss && !ys[t] && regExpTest(cs, t)) && !(xs && regExpTest(ls, t)) && !(bs.attributeCheck instanceof Function && bs.attributeCheck(t, e))) {
560
560
  if (!gs[t] || ys[t]) {
561
561
  if (!(vc(e) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, e) || H.tagNameCheck instanceof Function && H.tagNameCheck(e)) && (H.attributeNameCheck instanceof RegExp && regExpTest(H.attributeNameCheck, t) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(t, e)) || t === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r)))) return !1;
562
- } else if (!Hs[t] && !regExpTest(ms, stringReplace(r, fs, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Bs[e]) && !(Cs && !regExpTest(ds, stringReplace(r, fs, ""))) && r) return !1;
562
+ } else if (!Hs[t] && !regExpTest(ps, stringReplace(r, ds, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Bs[e]) && !(Cs && !regExpTest(us, stringReplace(r, ds, ""))) && r) return !1;
563
563
  }
564
564
  return !0;
565
565
  }, vc = function(e) {
566
- return e !== "annotation-xml" && stringMatch(e, ps);
566
+ return e !== "annotation-xml" && stringMatch(e, fs);
567
567
  }, yc = function(e) {
568
- hc(B.beforeSanitizeAttributes, e, null);
568
+ hc(is.beforeSanitizeAttributes, e, null);
569
569
  let { attributes: n } = e;
570
570
  if (!n || pc(e)) return;
571
571
  let r = {
@@ -577,7 +577,7 @@ function createDOMPurify() {
577
577
  }, i = n.length;
578
578
  for (; i--;) {
579
579
  let { name: a, namespaceURI: o, value: s } = n[i], c = Y(a), l = s, u = a === "value" ? l : stringTrim(l);
580
- if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, hc(B.uponSanitizeAttribute, e, r), u = r.attrValue, Ps && (c === "id" || c === "name") && (uc(a, e), u = "user-content-" + u), Es && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
580
+ if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, hc(is.uponSanitizeAttribute, e, r), u = r.attrValue, Ps && (c === "id" || c === "name") && (uc(a, e), u = "user-content-" + u), Es && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
581
581
  uc(a, e);
582
582
  continue;
583
583
  }
@@ -595,9 +595,9 @@ function createDOMPurify() {
595
595
  continue;
596
596
  }
597
597
  Ts && arrayForEach([
598
+ as,
598
599
  os,
599
- ss,
600
- cs
600
+ ss
601
601
  ], (e) => {
602
602
  u = stringReplace(u, e, " ");
603
603
  });
@@ -606,12 +606,12 @@ function createDOMPurify() {
606
606
  uc(a, e);
607
607
  continue;
608
608
  }
609
- if (A && typeof h == "object" && typeof h.getAttributeType == "function" && !o) switch (h.getAttributeType(f, c)) {
609
+ if (R && typeof h == "object" && typeof h.getAttributeType == "function" && !o) switch (h.getAttributeType(f, c)) {
610
610
  case "TrustedHTML":
611
- u = A.createHTML(u);
611
+ u = R.createHTML(u);
612
612
  break;
613
613
  case "TrustedScriptURL":
614
- u = A.createScriptURL(u);
614
+ u = R.createScriptURL(u);
615
615
  break;
616
616
  }
617
617
  if (u !== l) try {
@@ -620,11 +620,11 @@ function createDOMPurify() {
620
620
  uc(a, e);
621
621
  }
622
622
  }
623
- hc(B.afterSanitizeAttributes, e, null);
623
+ hc(is.afterSanitizeAttributes, e, null);
624
624
  }, bc = function e(t) {
625
625
  let n = null, r = fc(t);
626
- for (hc(B.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) hc(B.uponSanitizeShadowNode, n, null), gc(n), yc(n), n.content instanceof a && e(n.content);
627
- hc(B.afterSanitizeShadowDOM, t, null);
626
+ for (hc(is.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) hc(is.uponSanitizeShadowNode, n, null), gc(n), yc(n), n.content instanceof a && e(n.content);
627
+ hc(is.afterSanitizeShadowDOM, t, null);
628
628
  };
629
629
  return t.sanitize = function(e) {
630
630
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
@@ -635,30 +635,30 @@ function createDOMPurify() {
635
635
  if (Os || ac(n), t.removed = [], typeof e == "string" && (Is = !1), Is) {
636
636
  if (e.nodeName) {
637
637
  let t = Y(e.nodeName);
638
- if (!V[t] || vs[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
638
+ if (!ms[t] || vs[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
639
639
  }
640
640
  } else if (e instanceof s) i = dc("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
641
641
  else {
642
- if (!As && !Ts && !Ds && e.indexOf("<") === -1) return A && Ms ? A.createHTML(e) : e;
643
- if (i = dc(e), !i) return As ? null : Ms ? R : "";
642
+ if (!As && !Ts && !Ds && e.indexOf("<") === -1) return R && Ms ? R.createHTML(e) : e;
643
+ if (i = dc(e), !i) return As ? null : Ms ? B : "";
644
644
  }
645
645
  i && ks && lc(i.firstChild);
646
646
  let u = fc(Is ? e : i);
647
647
  for (; c = u.nextNode();) gc(c), yc(c), c.content instanceof a && bc(c.content);
648
648
  if (Is) return e;
649
649
  if (As) {
650
- if (js) for (l = rs.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
650
+ if (js) for (l = ts.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
651
651
  else l = i;
652
- return (gs.shadowroot || gs.shadowrootmode) && (l = as.call(r, l, !0)), l;
652
+ return (gs.shadowroot || gs.shadowrootmode) && (l = rs.call(r, l, !0)), l;
653
653
  }
654
654
  let f = Ds ? i.outerHTML : i.innerHTML;
655
- return Ds && V["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), Ts && arrayForEach([
655
+ return Ds && ms["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), Ts && arrayForEach([
656
+ as,
656
657
  os,
657
- ss,
658
- cs
658
+ ss
659
659
  ], (e) => {
660
660
  f = stringReplace(f, e, " ");
661
- }), A && Ms ? A.createHTML(f) : f;
661
+ }), R && Ms ? R.createHTML(f) : f;
662
662
  }, t.setConfig = function() {
663
663
  ac(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Os = !0;
664
664
  }, t.clearConfig = function() {
@@ -666,17 +666,17 @@ function createDOMPurify() {
666
666
  }, t.isValidAttribute = function(e, t, n) {
667
667
  return nc || ac({}), _c(Y(e), Y(t), n);
668
668
  }, t.addHook = function(e, t) {
669
- typeof t == "function" && arrayPush(B[e], t);
669
+ typeof t == "function" && arrayPush(is[e], t);
670
670
  }, t.removeHook = function(e, t) {
671
671
  if (t !== void 0) {
672
- let n = arrayLastIndexOf(B[e], t);
673
- return n === -1 ? void 0 : arraySplice(B[e], n, 1)[0];
672
+ let n = arrayLastIndexOf(is[e], t);
673
+ return n === -1 ? void 0 : arraySplice(is[e], n, 1)[0];
674
674
  }
675
- return arrayPop(B[e]);
675
+ return arrayPop(is[e]);
676
676
  }, t.removeHooks = function(e) {
677
- B[e] = [];
677
+ is[e] = [];
678
678
  }, t.removeAllHooks = function() {
679
- B = _createHooksMap();
679
+ is = _createHooksMap();
680
680
  }, t;
681
681
  }
682
682
  var purify = createDOMPurify();
@@ -21328,11 +21328,11 @@ function Button({ className: e, children: t, ...n }) {
21328
21328
  });
21329
21329
  }
21330
21330
  function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, indeterminateIcon: i, onChange: a, disabled: o, children: s, className: c }) {
21331
- let u = useRef(null), [f, p] = useState(t ?? !1), g = e ?? f;
21331
+ let u = useRef(null), [f, p] = useState(t ?? !1), O = e ?? f;
21332
21332
  useEffect(() => {
21333
21333
  u.current && (u.current.indeterminate = !!r);
21334
21334
  }, [r]);
21335
- function O(t) {
21335
+ function A(t) {
21336
21336
  let n = t.target.checked;
21337
21337
  e === void 0 && p(n), a?.(n);
21338
21338
  }
@@ -21344,17 +21344,17 @@ function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, in
21344
21344
  type: "checkbox",
21345
21345
  className: cn("p-0 absolute h-px w-px overflow-hidden whitespace-nowrap", "[clip-path:inset(50%)]", "border-0"),
21346
21346
  disabled: o,
21347
- onChange: O,
21347
+ onChange: A,
21348
21348
  ...e === void 0 ? { defaultChecked: t } : { checked: e }
21349
21349
  }),
21350
21350
  /* @__PURE__ */ jsx("span", {
21351
21351
  role: "checkbox",
21352
- "aria-checked": r ? "mixed" : g,
21352
+ "aria-checked": r ? "mixed" : O,
21353
21353
  tabIndex: -1,
21354
- "data-state": r ? "indeterminate" : g ? "checked" : "unchecked",
21354
+ "data-state": r ? "indeterminate" : O ? "checked" : "unchecked",
21355
21355
  className: "checkbox-box inline-flex items-center justify-center",
21356
21356
  children: /* @__PURE__ */ jsx("span", {
21357
- className: cn("checkbox-icon", !(g || r) && "opacity-0"),
21357
+ className: cn("checkbox-icon", !(O || r) && "opacity-0"),
21358
21358
  children: r ? i ?? "—" : n ?? "✓"
21359
21359
  })
21360
21360
  }),
@@ -21372,18 +21372,18 @@ function useDropdown() {
21372
21372
  return e;
21373
21373
  }
21374
21374
  function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1, openOnHover: c = !0, open: u, onOpenChange: p }) {
21375
- let g = u !== void 0, [O, A] = useState(!1), R = g ? u : O, ts = useCallback((e) => {
21376
- e !== R && (g || A(e), p?.(e));
21375
+ let O = u !== void 0, [A, R] = useState(!1), B = O ? u : A, V = useCallback((e) => {
21376
+ e !== B && (O || R(e), p?.(e));
21377
21377
  }, [
21378
- R,
21379
- g,
21378
+ B,
21379
+ O,
21380
21380
  p
21381
- ]), ns = useRef(null), rs = useRef(null), is = useRef(null), [as, B] = useState(null), os = useCallback(() => {
21382
- if (!ns.current || !rs.current) return;
21383
- let e = ns.current.getBoundingClientRect(), t = rs.current.getBoundingClientRect(), o = e.left;
21381
+ ]), es = useRef(null), ts = useRef(null), ns = useRef(null), [rs, is] = useState(null), as = useCallback(() => {
21382
+ if (!es.current || !ts.current) return;
21383
+ let e = es.current.getBoundingClientRect(), t = ts.current.getBoundingClientRect(), o = e.left;
21384
21384
  n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
21385
21385
  let s;
21386
- s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => B({
21386
+ s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => is({
21387
21387
  top: s,
21388
21388
  left: o
21389
21389
  }));
@@ -21394,52 +21394,52 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
21394
21394
  a
21395
21395
  ]);
21396
21396
  useLayoutEffect(() => {
21397
- R && os();
21398
- }, [R, os]), useEffect(() => {
21399
- if (!R) return;
21400
- let e = () => os();
21397
+ B && as();
21398
+ }, [B, as]), useEffect(() => {
21399
+ if (!B) return;
21400
+ let e = () => as();
21401
21401
  return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
21402
21402
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
21403
21403
  };
21404
- }, [R, os]);
21405
- let ss = useCallback(() => {
21406
- is.current &&= (clearTimeout(is.current), null), ts(!0);
21407
- }, [ts]), cs = useCallback(() => {
21408
- is.current = window.setTimeout(() => {
21409
- ts(!1);
21404
+ }, [B, as]);
21405
+ let os = useCallback(() => {
21406
+ ns.current &&= (clearTimeout(ns.current), null), V(!0);
21407
+ }, [V]), ss = useCallback(() => {
21408
+ ns.current = window.setTimeout(() => {
21409
+ V(!1);
21410
21410
  }, 120);
21411
- }, [ts]);
21411
+ }, [V]);
21412
21412
  return useEffect(() => {
21413
21413
  function e(e) {
21414
21414
  let t = e.target;
21415
- ns.current?.contains(t) || rs.current?.contains(t) || ts(!1);
21415
+ es.current?.contains(t) || ts.current?.contains(t) || V(!1);
21416
21416
  }
21417
21417
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
21418
- }, [ts]), useEffect(() => () => {
21419
- is.current && clearTimeout(is.current);
21418
+ }, [V]), useEffect(() => () => {
21419
+ ns.current && clearTimeout(ns.current);
21420
21420
  }, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
21421
21421
  value: {
21422
- close: () => ts(!1),
21423
- open: ss
21422
+ close: () => V(!1),
21423
+ open: os
21424
21424
  },
21425
21425
  children: [/* @__PURE__ */ jsx("div", {
21426
- ref: ns,
21426
+ ref: es,
21427
21427
  className: "inline-flex",
21428
- onMouseEnter: c ? ss : void 0,
21429
- onMouseLeave: c ? cs : void 0,
21430
- onClick: () => ts(!R),
21428
+ onMouseEnter: c ? os : void 0,
21429
+ onMouseLeave: c ? ss : void 0,
21430
+ onClick: () => V(!B),
21431
21431
  "aria-haspopup": "menu",
21432
- "aria-expanded": R,
21432
+ "aria-expanded": B,
21433
21433
  children: e
21434
- }), R && !o && createPortal(/* @__PURE__ */ jsx("div", {
21435
- ref: rs,
21436
- onMouseEnter: c ? ss : void 0,
21437
- onMouseLeave: c ? cs : void 0,
21434
+ }), B && !o && createPortal(/* @__PURE__ */ jsx("div", {
21435
+ ref: ts,
21436
+ onMouseEnter: c ? os : void 0,
21437
+ onMouseLeave: c ? ss : void 0,
21438
21438
  style: {
21439
21439
  position: "fixed",
21440
- top: as?.top ?? 0,
21441
- left: as?.left ?? 0,
21442
- visibility: as ? "visible" : "hidden",
21440
+ top: rs?.top ?? 0,
21441
+ left: rs?.left ?? 0,
21442
+ visibility: rs ? "visible" : "hidden",
21443
21443
  zIndex: 1e3
21444
21444
  },
21445
21445
  children: t
@@ -21452,7 +21452,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
21452
21452
  let t = e.target.value;
21453
21453
  f || u(t), o?.(t);
21454
21454
  }
21455
- function g(e) {
21455
+ function O(e) {
21456
21456
  s?.(e);
21457
21457
  }
21458
21458
  return /* @__PURE__ */ jsx("input", {
@@ -21463,7 +21463,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
21463
21463
  "aria-disabled": r || void 0,
21464
21464
  "aria-invalid": i || void 0,
21465
21465
  onChange: h,
21466
- onKeyDown: g,
21466
+ onKeyDown: O,
21467
21467
  className: cn("bg-transparent outline-none", r && "pointer-events-none", c)
21468
21468
  });
21469
21469
  }
@@ -21501,17 +21501,17 @@ function getVerticalAlign(e, t, n) {
21501
21501
  return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
21502
21502
  }
21503
21503
  function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
21504
- let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, g] = useState(null), A = () => {
21504
+ let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, O] = useState(null), R = () => {
21505
21505
  s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
21506
21506
  u(!0);
21507
21507
  }, r);
21508
- }, R = () => {
21508
+ }, B = () => {
21509
21509
  s.current &&= (clearTimeout(s.current), null), u(!1);
21510
21510
  };
21511
21511
  return useLayoutEffect(() => {
21512
21512
  if (!c || !a.current || !o.current) return;
21513
21513
  let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
21514
- r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), g((e) => e && e.top === l && e.left === u ? e : {
21514
+ r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), O((e) => e && e.top === l && e.left === u ? e : {
21515
21515
  top: l,
21516
21516
  left: u
21517
21517
  });
@@ -21520,10 +21520,10 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
21520
21520
  }, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
21521
21521
  ref: a,
21522
21522
  className: "inline-flex",
21523
- onMouseEnter: A,
21524
- onMouseLeave: R,
21525
- onFocus: A,
21526
- onBlur: R,
21523
+ onMouseEnter: R,
21524
+ onMouseLeave: B,
21525
+ onFocus: R,
21526
+ onBlur: B,
21527
21527
  children: e
21528
21528
  }), c && createPortal(/* @__PURE__ */ jsx("div", {
21529
21529
  ref: o,
@@ -23003,36 +23003,36 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
23003
23003
  e,
23004
23004
  o,
23005
23005
  t
23006
- ]), g = h?.step ?? null, $o = h?.index ?? null, es = useCallback((e) => {
23006
+ ]), O = h?.step ?? null, Qo = h?.index ?? null, $o = useCallback((e) => {
23007
23007
  c((t) => {
23008
23008
  if (t.has(e)) return t;
23009
23009
  let n = new Set(t);
23010
23010
  return n.add(e), n;
23011
23011
  });
23012
- }, []), A = useCallback(() => {
23012
+ }, []), R = useCallback(() => {
23013
23013
  c((n) => {
23014
23014
  let r = findActiveStep(e, n, t);
23015
23015
  if (r == null || n.has(r.step.id)) return n;
23016
23016
  let i = new Set(n);
23017
23017
  return i.add(r.step.id), i;
23018
23018
  });
23019
- }, [e, t]), R = useCallback(() => {
23019
+ }, [e, t]), B = useCallback(() => {
23020
23020
  c(new Set(e.map((e) => e.id)));
23021
23021
  }, [e]);
23022
23022
  return /* @__PURE__ */ jsx(Fragment$1, { children: i({
23023
23023
  context: t,
23024
- currentStep: g,
23025
- currentStepIndex: $o,
23024
+ currentStep: O,
23025
+ currentStepIndex: Qo,
23026
23026
  dismissedStepIds: o,
23027
23027
  actions: useMemo(() => ({
23028
- dismissCurrentStep: A,
23029
- dismissStep: es,
23030
- skipAll: R,
23031
- close: R
23028
+ dismissCurrentStep: R,
23029
+ dismissStep: $o,
23030
+ skipAll: B,
23031
+ close: B
23032
23032
  }), [
23033
- A,
23034
- es,
23035
- R
23033
+ R,
23034
+ $o,
23035
+ B
23036
23036
  ])
23037
23037
  }) });
23038
23038
  }
@@ -23204,7 +23204,7 @@ function useToastTimers(e, t) {
23204
23204
  isPaused: !0
23205
23205
  });
23206
23206
  }), a.current &&= (clearInterval(a.current), null);
23207
- }, []), g = useCallback(() => {
23207
+ }, []), O = useCallback(() => {
23208
23208
  o.current && (o.current = !1, i.current.forEach((t, n) => {
23209
23209
  if (t.isPaused && t.remainingTime > 0) {
23210
23210
  let r = e.find((e) => e.id === n);
@@ -23215,7 +23215,7 @@ function useToastTimers(e, t) {
23215
23215
  e,
23216
23216
  u,
23217
23217
  f
23218
- ]), O = useCallback((e) => {
23218
+ ]), A = useCallback((e) => {
23219
23219
  i.current.delete(e), r((t) => {
23220
23220
  let n = new Map(t);
23221
23221
  return n.delete(e), n;
@@ -23236,22 +23236,22 @@ function useToastTimers(e, t) {
23236
23236
  }, []), {
23237
23237
  remainingTimes: n,
23238
23238
  pauseAll: p,
23239
- resumeAll: g,
23240
- cleanupTimer: O
23239
+ resumeAll: O,
23240
+ cleanupTimer: A
23241
23241
  };
23242
23242
  }
23243
23243
  function Toaster() {
23244
23244
  let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer: p } = useToastTimers(e, a);
23245
23245
  useEffect(() => toastStore.subscribe(t), []);
23246
- let A = useSyncExternalStore(subscribeNoop$1, getClientSnapshot$1, getServerSnapshot$1), R = useCallback((e) => {
23246
+ let R = useSyncExternalStore(subscribeNoop$1, getClientSnapshot$1, getServerSnapshot$1), B = useCallback((e) => {
23247
23247
  e.callbacks?.onOpen?.();
23248
- }, []), ts = useCallback((e, t) => {
23248
+ }, []), V = useCallback((e, t) => {
23249
23249
  t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
23250
23250
  }, []);
23251
23251
  useEffect(() => {
23252
23252
  let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
23253
23253
  o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
23254
- ts(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
23254
+ V(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
23255
23255
  }), r((r) => {
23256
23256
  let i = r.map((e) => {
23257
23257
  let t = n.get(e.id);
@@ -23260,7 +23260,7 @@ function Toaster() {
23260
23260
  content: t.content,
23261
23261
  duration: t.duration
23262
23262
  } : e;
23263
- }).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (R(e), {
23263
+ }).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (B(e), {
23264
23264
  ...e,
23265
23265
  animationState: "entering"
23266
23266
  })), ...i];
@@ -23268,20 +23268,20 @@ function Toaster() {
23268
23268
  }), i.current = t;
23269
23269
  }, [
23270
23270
  e,
23271
- R,
23272
- ts
23271
+ B,
23272
+ V
23273
23273
  ]);
23274
- let ns = useCallback((e) => {
23274
+ let es = useCallback((e) => {
23275
23275
  r((t) => {
23276
23276
  let n = t.filter((t) => t.id !== e);
23277
23277
  return o.current = n, n;
23278
23278
  }), p(e), toastStore.cleanup(e);
23279
- }, [p]), rs = useCallback((e) => {
23279
+ }, [p]), ts = useCallback((e) => {
23280
23280
  a.current.set(e, "manual"), toastStore.remove(e);
23281
23281
  }, []);
23282
- if (!A) return null;
23283
- let is = groupByPosition(n);
23284
- return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(is).map(([e, t]) => {
23282
+ if (!R) return null;
23283
+ let ns = groupByPosition(n);
23284
+ return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(ns).map(([e, t]) => {
23285
23285
  let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
23286
23286
  className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
23287
23287
  children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
@@ -23290,8 +23290,8 @@ function Toaster() {
23290
23290
  children: /* @__PURE__ */ jsx(ToastWrapper, {
23291
23291
  toast: e,
23292
23292
  remainingTime: c.get(e.id) ?? e.duration,
23293
- onExitComplete: ns,
23294
- onClose: rs,
23293
+ onExitComplete: es,
23294
+ onClose: ts,
23295
23295
  onHoverStart: u,
23296
23296
  onHoverEnd: f
23297
23297
  })
@@ -23299,8 +23299,8 @@ function Toaster() {
23299
23299
  }) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
23300
23300
  toast: e,
23301
23301
  remainingTime: c.get(e.id) ?? e.duration,
23302
- onExitComplete: ns,
23303
- onClose: rs,
23302
+ onExitComplete: es,
23303
+ onClose: ts,
23304
23304
  onHoverStart: u,
23305
23305
  onHoverEnd: f
23306
23306
  }, e.id));
@@ -23515,10 +23515,10 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23515
23515
  let s = e > 0, c = s && t === e, l = s && t > 0 && t < e, u = c ? `All (${e})` : l ? `${t}/${e} selected` : `Select all (${e})`, [f, p] = useState(i ?? "normal"), h = () => {
23516
23516
  n(!c);
23517
23517
  };
23518
- function g(e) {
23518
+ function O(e) {
23519
23519
  p(e), a?.(e);
23520
23520
  }
23521
- let es = {
23521
+ let $o = {
23522
23522
  fire: [{
23523
23523
  id: "fire",
23524
23524
  tooltip: "Mark as fire",
@@ -23570,7 +23570,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23570
23570
  }),
23571
23571
  onClick: r.read.off
23572
23572
  }]
23573
- }, A = [{
23573
+ }, R = [{
23574
23574
  value: "normal",
23575
23575
  tooltip: "Normal density",
23576
23576
  icon: /* @__PURE__ */ jsx(NormalDensityIcon, { size: 20 })
@@ -23599,7 +23599,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23599
23599
  }),
23600
23600
  /* @__PURE__ */ jsx("div", {
23601
23601
  className: "flex items-center divide-x divide-neutral-400-variant-1",
23602
- children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(es).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23602
+ children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries($o).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23603
23603
  className: "gap-2 px-1 flex items-center",
23604
23604
  children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
23605
23605
  content: e.tooltip,
@@ -23614,13 +23614,13 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23614
23614
  }),
23615
23615
  /* @__PURE__ */ jsx("div", {
23616
23616
  className: "gap-2 flex items-center",
23617
- children: A.map(({ value: e, tooltip: t, icon: n }) => {
23617
+ children: R.map(({ value: e, tooltip: t, icon: n }) => {
23618
23618
  let r = f === e;
23619
23619
  return /* @__PURE__ */ jsx(InfoTooltip, {
23620
23620
  content: t,
23621
23621
  children: /* @__PURE__ */ jsx(IconButton, {
23622
23622
  className: cn("h-7 w-7 p-0 text-neutral-900", r && "bg-white-variant-4"),
23623
- onClick: () => g(e),
23623
+ onClick: () => O(e),
23624
23624
  icon: n,
23625
23625
  "aria-pressed": r
23626
23626
  })
@@ -23871,20 +23871,20 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
23871
23871
  })
23872
23872
  }), document.body);
23873
23873
  }
23874
- function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...g }) {
23875
- let O = iconCountButtonStyles({
23874
+ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...O }) {
23875
+ let A = iconCountButtonStyles({
23876
23876
  variant: r,
23877
23877
  orientation: i,
23878
23878
  status: a
23879
- }), es = useRef(null), [A, R] = useState(!1), [ts, ns] = useState(!1), [rs, is] = useState(l), [as, B] = useState(null), os = c ?? rs, ss = s && (A || ts || os), cs = typeof n == "number" && n > 0 && (o || a === "active");
23880
- function ls(e) {
23881
- c === void 0 && is(e), u?.(e);
23879
+ }), $o = useRef(null), [R, B] = useState(!1), [V, es] = useState(!1), [ts, ns] = useState(l), [rs, is] = useState(null), as = c ?? ts, os = s && (R || V || as), ss = typeof n == "number" && n > 0 && (o || a === "active");
23880
+ function cs(e) {
23881
+ c === void 0 && ns(e), u?.(e);
23882
23882
  }
23883
23883
  return useLayoutEffect(() => {
23884
- if (!ss || !es.current) return;
23884
+ if (!os || !$o.current) return;
23885
23885
  function e() {
23886
- let e = es.current?.getBoundingClientRect();
23887
- e && B({
23886
+ let e = $o.current?.getBoundingClientRect();
23887
+ e && is({
23888
23888
  top: e.top - 8,
23889
23889
  left: e.right - 12
23890
23890
  });
@@ -23892,30 +23892,30 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
23892
23892
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
23893
23893
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
23894
23894
  };
23895
- }, [ss]), /* @__PURE__ */ jsxs(Button, {
23896
- ...g,
23897
- className: cn(O.root(), p?.root),
23898
- onMouseEnter: () => R(!0),
23899
- onMouseLeave: () => R(!1),
23895
+ }, [os]), /* @__PURE__ */ jsxs(Button, {
23896
+ ...O,
23897
+ className: cn(A.root(), p?.root),
23898
+ onMouseEnter: () => B(!0),
23899
+ onMouseLeave: () => B(!1),
23900
23900
  children: [/* @__PURE__ */ jsxs("div", {
23901
23901
  className: "relative",
23902
23902
  children: [/* @__PURE__ */ jsx("div", {
23903
- ref: es,
23904
- className: cn(O.bubble(), p?.bubble),
23905
- children: renderIcon(e, O.icon())
23906
- }), ss && as && typeof document < "u" && ToggleControlPortal({
23907
- isPressed: os,
23908
- isPortalHovered: ts,
23909
- portalPosition: as,
23910
- onMouseEnter: () => ns(!0),
23911
- onMouseLeave: () => ns(!1),
23912
- onToggle: () => ls(!os)
23903
+ ref: $o,
23904
+ className: cn(A.bubble(), p?.bubble),
23905
+ children: renderIcon(e, A.icon())
23906
+ }), os && rs && typeof document < "u" && ToggleControlPortal({
23907
+ isPressed: as,
23908
+ isPortalHovered: V,
23909
+ portalPosition: rs,
23910
+ onMouseEnter: () => es(!0),
23911
+ onMouseLeave: () => es(!1),
23912
+ onToggle: () => cs(!as)
23913
23913
  })]
23914
23914
  }), /* @__PURE__ */ jsxs("div", {
23915
- className: cn(O.label(), p?.label),
23916
- children: [/* @__PURE__ */ jsx("span", { children: t }), cs && /* @__PURE__ */ jsxs("span", {
23915
+ className: cn(A.label(), p?.label),
23916
+ children: [/* @__PURE__ */ jsx("span", { children: t }), ss && /* @__PURE__ */ jsxs("span", {
23917
23917
  "aria-label": `${n} items`,
23918
- className: cn(O.count(), p?.count),
23918
+ className: cn(A.count(), p?.count),
23919
23919
  children: [
23920
23920
  "(",
23921
23921
  formatCount(n),
@@ -23947,7 +23947,7 @@ function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
23947
23947
  });
23948
23948
  }
23949
23949
  function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
23950
- let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [g, O] = useState(() => {
23950
+ let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [O, A] = useState(() => {
23951
23951
  let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
23952
23952
  return {
23953
23953
  year: r.getFullYear(),
@@ -23956,13 +23956,13 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23956
23956
  });
23957
23957
  useEffect(() => {
23958
23958
  (e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !== f.current.startDate?.getTime() || n.endDate?.getTime() !== f.current.endDate?.getTime())) && queueMicrotask(() => {
23959
- if (e === "single" && t) O({
23959
+ if (e === "single" && t) A({
23960
23960
  year: t.getFullYear(),
23961
23961
  month: t.getMonth()
23962
23962
  });
23963
23963
  else if (e === "range") {
23964
23964
  let e = n.startDate ?? n.endDate;
23965
- e && O({
23965
+ e && A({
23966
23966
  year: e.getFullYear(),
23967
23967
  month: e.getMonth()
23968
23968
  });
@@ -23973,10 +23973,10 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23973
23973
  t,
23974
23974
  n
23975
23975
  ]);
23976
- let es = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
23977
- function A(t) {
23976
+ let $o = useMemo(() => generateCalendarDays(O.year, O.month), [O.year, O.month]);
23977
+ function R(t) {
23978
23978
  let o = t.getMonth(), s = t.getFullYear();
23979
- if ((o !== g.month || s !== g.year) && O({
23979
+ if ((o !== O.month || s !== O.year) && A({
23980
23980
  year: s,
23981
23981
  month: o
23982
23982
  }), e === "single") r(t), a();
@@ -23991,8 +23991,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23991
23991
  }), a());
23992
23992
  }
23993
23993
  }
23994
- function R() {
23995
- O((e) => e.month === 0 ? {
23994
+ function B() {
23995
+ A((e) => e.month === 0 ? {
23996
23996
  year: e.year - 1,
23997
23997
  month: 11
23998
23998
  } : {
@@ -24000,8 +24000,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24000
24000
  month: e.month - 1
24001
24001
  });
24002
24002
  }
24003
- function ts() {
24004
- O((e) => e.month === 11 ? {
24003
+ function V() {
24004
+ A((e) => e.month === 11 ? {
24005
24005
  year: e.year + 1,
24006
24006
  month: 0
24007
24007
  } : {
@@ -24009,7 +24009,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24009
24009
  month: e.month + 1
24010
24010
  });
24011
24011
  }
24012
- let ns = getWeekdays();
24012
+ let es = getWeekdays();
24013
24013
  return /* @__PURE__ */ jsxs("div", {
24014
24014
  className: "mt-1 rounded-lg p-2 shadow-lg w-fit border border-neutral-400 bg-white",
24015
24015
  children: [
@@ -24021,16 +24021,16 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24021
24021
  direction: "left",
24022
24022
  size: 20
24023
24023
  }),
24024
- onClick: R,
24024
+ onClick: B,
24025
24025
  className: "hover:opacity-60",
24026
24026
  "aria-label": "Previous month"
24027
24027
  }),
24028
24028
  /* @__PURE__ */ jsxs("div", {
24029
24029
  className: "font-bold text-[10px] text-neutral-900",
24030
24030
  children: [
24031
- getMonthName(g.month),
24031
+ getMonthName(O.month),
24032
24032
  " ",
24033
- g.year
24033
+ O.year
24034
24034
  ]
24035
24035
  }),
24036
24036
  /* @__PURE__ */ jsx(IconButton, {
@@ -24038,7 +24038,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24038
24038
  direction: "right",
24039
24039
  size: 20
24040
24040
  }),
24041
- onClick: ts,
24041
+ onClick: V,
24042
24042
  className: "hover:opacity-60",
24043
24043
  "aria-label": "Next month"
24044
24044
  })
@@ -24046,20 +24046,20 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24046
24046
  }),
24047
24047
  /* @__PURE__ */ jsx("div", {
24048
24048
  className: "mb-2 grid grid-cols-7",
24049
- children: ns.map((e) => /* @__PURE__ */ jsx("div", {
24049
+ children: es.map((e) => /* @__PURE__ */ jsx("div", {
24050
24050
  className: "p-0.5 font-bold flex items-center justify-center text-[9px] text-neutral-900",
24051
24051
  children: e
24052
24052
  }, e))
24053
24053
  }),
24054
24054
  /* @__PURE__ */ jsx("div", {
24055
24055
  className: "grid grid-cols-7",
24056
- children: es.map(({ day: r, date: i, isCurrentMonth: a }) => {
24057
- let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), Zo = u, g = s;
24058
- e === "range" && u && !f && s && !isDateBefore(s, u) ? (Zo = u, g = s) : (Zo = null, g = null);
24059
- let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, Zo, g)), $o = l || p || h;
24056
+ children: $o.map(({ day: r, date: i, isCurrentMonth: a }) => {
24057
+ let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), g = u, O = s;
24058
+ e === "range" && u && !f && s && !isDateBefore(s, u) ? (g = u, O = s) : (g = null, O = null);
24059
+ let A = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, g, O)), Qo = l || p || h;
24060
24060
  return /* @__PURE__ */ jsx(Button, {
24061
24061
  type: "button",
24062
- onClick: () => A(i),
24062
+ onClick: () => R(i),
24063
24063
  onMouseEnter: () => {
24064
24064
  e === "range" && u && !f && !isDateBefore(i, u) && c(i);
24065
24065
  },
@@ -24068,9 +24068,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24068
24068
  },
24069
24069
  className: "p-0.5",
24070
24070
  "aria-label": `Select ${formatDate(i)}`,
24071
- "aria-selected": $o || void 0,
24071
+ "aria-selected": Qo || void 0,
24072
24072
  children: /* @__PURE__ */ jsx("div", {
24073
- className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", $o && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", O && !$o && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !$o && !O && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !$o && !O && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
24073
+ className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", Qo && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", A && !Qo && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Qo && !A && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Qo && !A && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
24074
24074
  children: r
24075
24075
  })
24076
24076
  }, `${i.getFullYear()}-${i.getMonth()}-${r}`);
@@ -24135,11 +24135,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
24135
24135
  function h(t) {
24136
24136
  e === "single" && (u || s(t), r?.(t));
24137
24137
  }
24138
- function g(t) {
24138
+ function O(t) {
24139
24139
  e === "range" && (u || l(t), r?.(t));
24140
24140
  }
24141
- function $o() {
24142
- e === "single" ? h(null) : g({
24141
+ function Qo() {
24142
+ e === "single" ? h(null) : O({
24143
24143
  startDate: null,
24144
24144
  endDate: null
24145
24145
  });
@@ -24149,7 +24149,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
24149
24149
  displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
24150
24150
  disabled: i,
24151
24151
  className: a,
24152
- onClear: $o
24152
+ onClear: Qo
24153
24153
  }),
24154
24154
  disabled: i,
24155
24155
  children: /* @__PURE__ */ jsx(CalendarPanel, {
@@ -24157,7 +24157,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
24157
24157
  selectedDate: f,
24158
24158
  selectedRange: p,
24159
24159
  onDateSelect: h,
24160
- onRangeSelect: g
24160
+ onRangeSelect: O
24161
24161
  })
24162
24162
  }) });
24163
24163
  }
@@ -24363,18 +24363,18 @@ function EventActionsList({ actions: e, className: t }) {
24363
24363
  }) })
24364
24364
  });
24365
24365
  }
24366
- function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: Zo = {}, density: g = "normal", className: O, style: es, isPriority: A, isDone: R }) {
24366
+ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: g = {}, density: O = "normal", className: A, style: $o, isPriority: R, isDone: B }) {
24367
24367
  return /* @__PURE__ */ jsx(Card, {
24368
24368
  as: Pressable,
24369
24369
  onPress: u,
24370
24370
  className: cn(eventCardStyles({
24371
- tone: A ? "priority" : R ? "done" : "default",
24371
+ tone: R ? "priority" : B ? "done" : "default",
24372
24372
  state: l ? "selected" : c ? "read" : "unread",
24373
- density: g
24374
- }), O),
24375
- style: es,
24373
+ density: O
24374
+ }), A),
24375
+ style: $o,
24376
24376
  "data-service": t,
24377
- children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
24377
+ children: O === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
24378
24378
  className: "gap-x-2 gap-y-1",
24379
24379
  children: [
24380
24380
  /* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(EventCheckbox, {
@@ -24410,7 +24410,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24410
24410
  /* @__PURE__ */ jsxs(CardFooter, {
24411
24411
  className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
24412
24412
  children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
24413
- actions: Zo,
24413
+ actions: g,
24414
24414
  className: "col-start-2 justify-self-end"
24415
24415
  })]
24416
24416
  })
@@ -24429,7 +24429,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24429
24429
  e,
24430
24430
  /* @__PURE__ */ jsx(EventStatusesList, {
24431
24431
  statusBadges: h,
24432
- density: g
24432
+ density: O
24433
24433
  }),
24434
24434
  /* @__PURE__ */ jsxs("div", {
24435
24435
  className: cn("min-w-0 gap-2 text-sm font-bold flex items-center whitespace-nowrap text-neutral-900", c && "font-medium"),
@@ -24449,7 +24449,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24449
24449
  ]
24450
24450
  }),
24451
24451
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
24452
- /* @__PURE__ */ jsx(EventActionsList, { actions: Zo }),
24452
+ /* @__PURE__ */ jsx(EventActionsList, { actions: g }),
24453
24453
  /* @__PURE__ */ jsx(InfoTooltip, {
24454
24454
  content: o,
24455
24455
  children: /* @__PURE__ */ jsx("span", {
@@ -24694,11 +24694,11 @@ function EventSummaryFireButton({ active: e, onClick: t }) {
24694
24694
  }) });
24695
24695
  }
24696
24696
  function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, workspace: o, selected: s = !1, onSelect: c, actions: l, className: u }) {
24697
- let { fire: f, insight: p, link: h } = l, Zo = p?.label ?? null;
24697
+ let { fire: f, insight: p, link: h } = l, g = p?.label ?? null;
24698
24698
  return /* @__PURE__ */ jsxs(Pressable, {
24699
24699
  onPress: c,
24700
24700
  className: cn(eventSummaryCardStyles({
24701
- tone: f.active ? "priority" : insightLabelVisible(Zo) ? "insight" : "default",
24701
+ tone: f.active ? "priority" : insightLabelVisible(g) ? "insight" : "default",
24702
24702
  state: s ? "selected" : "normal"
24703
24703
  }), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
24704
24704
  "data-service": t,
@@ -24722,7 +24722,7 @@ function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i
24722
24722
  className: "text-xs leading-tight font-semibold tracking-wide flex-1 text-right whitespace-nowrap text-neutral-800",
24723
24723
  children: a
24724
24724
  }),
24725
- insightLabelVisible(Zo) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: Zo }),
24725
+ insightLabelVisible(g) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: g }),
24726
24726
  f.onClick && /* @__PURE__ */ jsx(EventSummaryFireButton, {
24727
24727
  active: f.active,
24728
24728
  onClick: f.onClick
@@ -24754,9 +24754,9 @@ function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i
24754
24754
  ]
24755
24755
  });
24756
24756
  }
24757
- function DateSeparator({ timestamp: e }) {
24757
+ function DateSeparator({ timestamp: e, mode: t }) {
24758
24758
  return /* @__PURE__ */ jsxs("div", {
24759
- className: "gap-4 flex items-center",
24759
+ className: cn("gap-4 flex items-center px-4 py-2 -mx-4", t === "insight" && "bg-primary-light border-l-[3px] border-primary-500", t === "fire" && "bg-tertiary-50-alpha-50 border-l-[3px] border-tertiary-500"),
24760
24760
  children: [
24761
24761
  /* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-neutral-300-variant-2" }),
24762
24762
  /* @__PURE__ */ jsx("span", {
@@ -24942,7 +24942,7 @@ function PriorityGroupHeader({ title: e, mode: t, onMarkAsNotFireClick: n }) {
24942
24942
  size: 16,
24943
24943
  className: "shrink-0 text-primary-500"
24944
24944
  }), /* @__PURE__ */ jsx("h4", {
24945
- className: cn("text-xs font-semibold tracking-wide uppercase", t === "fire" ? "text-tertiary-700" : "text-primary-600"),
24945
+ className: cn("text-xs font-semibold tracking-wide", t === "fire" ? "text-tertiary-700" : "text-primary-600"),
24946
24946
  children: e
24947
24947
  })]
24948
24948
  })
@@ -24972,7 +24972,10 @@ function PriorityGroup({ group: e, children: t, onPreviousPriority: n, onNextPri
24972
24972
  function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
24973
24973
  return /* @__PURE__ */ jsxs("div", {
24974
24974
  className: "gap-4 flex flex-col",
24975
- children: [/* @__PURE__ */ jsx(DateSeparator, { timestamp: e.timestamp }), /* @__PURE__ */ jsx(PriorityGroup, {
24975
+ children: [/* @__PURE__ */ jsx(DateSeparator, {
24976
+ timestamp: e.timestamp,
24977
+ mode: e.separatorMode
24978
+ }), /* @__PURE__ */ jsx(PriorityGroup, {
24976
24979
  group: e,
24977
24980
  onPreviousPriority: t,
24978
24981
  onNextPriority: n,
@@ -24985,13 +24988,22 @@ function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
24985
24988
  });
24986
24989
  }
24987
24990
  function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityText: n, followUpTitle: r, followUpSubtitle: i }, className: a }) {
24988
- let o = e.filter((e) => e.isPriority).length, c = e.filter((e) => !e.isPriority && e.isInsight).length, u = useRef(null), f = useRef(null), p = useRef(!1);
24991
+ let o = e.filter((e) => e.isPriority).length, c = e.filter((e) => !e.isPriority && e.isInsight), u = c.reduce((e, t) => {
24992
+ let n = t.insightBadgeId ?? t.id;
24993
+ return e.includes(n) || e.push(n), e;
24994
+ }, []), f = u.length, p = new Map(c.map((e) => {
24995
+ let t = e.insightBadgeId ?? e.id, n = u.indexOf(t);
24996
+ return [e.id, f - n];
24997
+ })), g = /* @__PURE__ */ new Set(), O = new Set(c.reduce((e, t) => {
24998
+ let n = t.insightBadgeId ?? t.id;
24999
+ return g.has(n) || (g.add(n), e.push(t.id)), e;
25000
+ }, [])), A = useRef(null), $o = useRef(null), R = useRef(!1);
24989
25001
  useEffect(() => {
24990
- if (e.length === 0 || p.current) return;
24991
- p.current = !0;
25002
+ if (e.length === 0 || R.current) return;
25003
+ R.current = !0;
24992
25004
  let t = [...e].reverse().find((e) => e.isPriority), n = [...e].reverse().find((e) => !e.isPriority && e.isInsight), r = t ?? n;
24993
- if (r && u.current) {
24994
- let e = u.current.querySelector(`[data-group-id="${r.id}"]`);
25005
+ if (r && A.current) {
25006
+ let e = A.current.querySelector(`[data-group-id="${r.id}"]`);
24995
25007
  if (e) {
24996
25008
  e.scrollIntoView({
24997
25009
  behavior: "smooth",
@@ -25000,11 +25012,11 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
25000
25012
  return;
25001
25013
  }
25002
25014
  }
25003
- f.current?.scrollIntoView({ behavior: "smooth" });
25015
+ $o.current?.scrollIntoView({ behavior: "smooth" });
25004
25016
  }, [e]);
25005
- let Zo = o, g = c, O = useCallback((t, n) => {
25006
- if (!u.current) return;
25007
- let r = Array.from(u.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")), i = n === "fire" ? o : c, a = r.filter((t) => {
25017
+ let B = o, V = useCallback((t, n) => {
25018
+ if (!A.current) return;
25019
+ let r = Array.from(A.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")), i = n === "fire" ? o : f, a = r.filter((t) => {
25008
25020
  let r = t.getAttribute("data-group-id");
25009
25021
  if (!r) return !1;
25010
25022
  let i = e.find((e) => e.id === r);
@@ -25017,7 +25029,7 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
25017
25029
  }, [
25018
25030
  e,
25019
25031
  o,
25020
- c
25032
+ f
25021
25033
  ]);
25022
25034
  return /* @__PURE__ */ jsx(EventDetailContentHeader, {
25023
25035
  summary: t,
@@ -25026,27 +25038,29 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
25026
25038
  followUpSubtitle: i,
25027
25039
  className: a,
25028
25040
  children: /* @__PURE__ */ jsxs("div", {
25029
- ref: u,
25041
+ ref: A,
25030
25042
  className: "gap-4 flex flex-col",
25031
25043
  children: [e.map((e) => {
25032
- let t = e.isPriority ? "fire" : e.isInsight ? "insight" : null, n = e.isPriority ? Zo-- : e.isInsight ? g-- : 0, r = e.isPriority ? o : e.isInsight ? c : 0, i = n && t ? () => {
25044
+ let t = e.isPriority ? "fire" : e.isInsight ? "insight" : null, n = e.isPriority ? B-- : e.isInsight ? p.get(e.id) ?? 0 : 0, r = e.isPriority ? o : e.isInsight ? f : 0, i = n && t ? () => {
25033
25045
  let e = n + 1;
25034
- e <= r && O(e, t);
25046
+ e <= r && V(e, t);
25035
25047
  } : void 0, a = n && t ? () => {
25036
25048
  let e = n - 1;
25037
- e >= 1 && O(e, t);
25038
- } : void 0;
25049
+ e >= 1 && V(e, t);
25050
+ } : void 0, s = e.isInsight && !e.isPriority && !O.has(e.id);
25039
25051
  return /* @__PURE__ */ jsx(MessageGroup, {
25040
25052
  group: {
25041
25053
  ...e,
25042
25054
  priorityIndex: n,
25043
- totalPriorityGroups: r
25055
+ totalPriorityGroups: r,
25056
+ insightText: s ? void 0 : e.insightText,
25057
+ separatorMode: s ? "insight" : void 0
25044
25058
  },
25045
25059
  onPreviousPriority: i,
25046
25060
  onNextPriority: a
25047
25061
  }, e.id);
25048
25062
  }), /* @__PURE__ */ jsx("div", {
25049
- ref: f,
25063
+ ref: $o,
25050
25064
  "aria-hidden": "true"
25051
25065
  })]
25052
25066
  })
@@ -25104,13 +25118,13 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
25104
25118
  ]
25105
25119
  })] });
25106
25120
  }
25107
- function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location: Zo, related: g }, className: O }) {
25121
+ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location: g, related: O }, className: A }) {
25108
25122
  return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
25109
25123
  summary: e,
25110
25124
  priorityText: n,
25111
25125
  followUpTitle: r,
25112
25126
  followUpSubtitle: i,
25113
- className: O,
25127
+ className: A,
25114
25128
  children: [
25115
25129
  /* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
25116
25130
  issue: a,
@@ -25122,8 +25136,8 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
25122
25136
  assignees: f,
25123
25137
  reporter: p,
25124
25138
  team: h,
25125
- location: Zo,
25126
- related: g
25139
+ location: g,
25140
+ related: O
25127
25141
  }),
25128
25142
  /* @__PURE__ */ jsx("h2", {
25129
25143
  className: "px-4 text-sm font-bold text-neutral-900",
@@ -25647,16 +25661,16 @@ function OnboardingCard({ stepLabel: e, title: t, description: n, titleAccessory
25647
25661
  children: [i, a]
25648
25662
  })
25649
25663
  ]
25650
- }), Zo = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
25664
+ }), g = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
25651
25665
  layout: o,
25652
25666
  placement: s
25653
- }), c, l), g = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [Zo, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, Zo] });
25667
+ }), c, l), O = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [g, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, g] });
25654
25668
  return o === "horizontal" ? /* @__PURE__ */ jsx("div", {
25655
25669
  className: cn("flex items-center", u),
25656
- children: g
25670
+ children: O
25657
25671
  }) : /* @__PURE__ */ jsx("div", {
25658
25672
  className: cn("flex flex-col items-center", u),
25659
- children: g
25673
+ children: O
25660
25674
  });
25661
25675
  }
25662
25676
  var subscribeNoop = () => () => {}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, PRIMARY_BTN = "rounded-lg bg-white px-4 py-1.5 text-xs font-semibold text-primary-500 transition-opacity hover:opacity-90", GHOST_BTN = "text-xs font-semibold text-white/70 transition-colors hover:text-white";
@@ -25704,7 +25718,7 @@ function OnboardingPortal({ currentStep: e, currentStepIndex: t, actions: n, ste
25704
25718
  let p = e.layout === "vertical" && o.mode === "vertical" ? {
25705
25719
  marginLeft: o.arrowMarginLeft,
25706
25720
  ...e.arrowWrapperStyle
25707
- } : e.arrowWrapperStyle, O = /* @__PURE__ */ jsx(OnboardingCard, {
25721
+ } : e.arrowWrapperStyle, A = /* @__PURE__ */ jsx(OnboardingCard, {
25708
25722
  stepLabel: e.stepLabel ?? (t == null ? void 0 : `${t + 1} / ${r.length}`),
25709
25723
  title: e.title,
25710
25724
  description: e.description,
@@ -25743,7 +25757,7 @@ function OnboardingPortal({ currentStep: e, currentStepIndex: t, actions: n, ste
25743
25757
  left: o.left
25744
25758
  }
25745
25759
  },
25746
- children: O
25760
+ children: A
25747
25761
  }), document.body);
25748
25762
  }
25749
25763
  function Onboarding({ steps: e, context: t, storageKey: n, onFinish: r, isEnabled: i = !0 }) {
@@ -25764,7 +25778,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
25764
25778
  function h(e) {
25765
25779
  u || l(e), r?.(e);
25766
25780
  }
25767
- function g() {
25781
+ function O() {
25768
25782
  u || l(""), r?.(""), a?.();
25769
25783
  }
25770
25784
  return /* @__PURE__ */ jsxs("fieldset", {
@@ -25790,7 +25804,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
25790
25804
  size: 16,
25791
25805
  className: "text-neutral-700"
25792
25806
  }),
25793
- onClick: g,
25807
+ onClick: O,
25794
25808
  "aria-label": "Clear search",
25795
25809
  className: "rounded p-0 transition-opacity hover:opacity-70"
25796
25810
  })