@qtalo/qt-ui-library 0.1.22 → 0.1.23

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,20 +326,20 @@ 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, Yo = c.prototype, g = lookupGetter(Yo, "cloneNode"), O = lookupGetter(Yo, "remove"), Xo = lookupGetter(Yo, "nextSibling"), Zo = lookupGetter(Yo, "childNodes"), Qo = lookupGetter(Yo, "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, Xo = c.prototype, g = lookupGetter(Xo, "cloneNode"), O = lookupGetter(Xo, "remove"), Zo = lookupGetter(Xo, "nextSibling"), Qo = lookupGetter(Xo, "childNodes"), $o = lookupGetter(Xo, "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: $o, createNodeIterator: es, createDocumentFragment: ts, getElementsByTagName: ns } = n, { importNode: rs } = r, B = _createHooksMap();
335
- t.isSupported = typeof entries == "function" && typeof Qo == "function" && $o && $o.createHTMLDocument !== void 0;
336
- let { MUSTACHE_EXPR: is, ERB_EXPR: as, TMPLIT_EXPR: os, DATA_ATTR: ss, ARIA_ATTR: cs, IS_SCRIPT_OR_DATA: ls, ATTR_WHITESPACE: us, CUSTOM_ELEMENT: ds } = EXPRESSIONS, { IS_ALLOWED_URI: fs } = EXPRESSIONS, V = null, ps = addToSet({}, [
334
+ let A, R = "", { implementation: es, createNodeIterator: ts, createDocumentFragment: ns, getElementsByTagName: rs } = n, { importNode: is } = r, B = _createHooksMap();
335
+ t.isSupported = typeof entries == "function" && typeof $o == "function" && es && es.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, V = null, ms = addToSet({}, [
337
337
  ...html$1,
338
338
  ...svg$1,
339
339
  ...svgFilters,
340
340
  ...mathMl$1,
341
341
  ...text
342
- ]), ms = null, hs = addToSet({}, [
342
+ ]), hs = null, gs = addToSet({}, [
343
343
  ...html,
344
344
  ...svg,
345
345
  ...mathMl,
@@ -363,7 +363,7 @@ function createDOMPurify() {
363
363
  enumerable: !0,
364
364
  value: !1
365
365
  }
366
- })), gs = null, _s = null, vs = Object.seal(create(null, {
366
+ })), _s = null, vs = null, ys = Object.seal(create(null, {
367
367
  tagCheck: {
368
368
  writable: !0,
369
369
  configurable: !1,
@@ -376,7 +376,7 @@ function createDOMPurify() {
376
376
  enumerable: !0,
377
377
  value: null
378
378
  }
379
- })), ys = !0, bs = !0, xs = !1, Ss = !0, Cs = !1, ws = !0, Ts = !1, Es = !1, Ds = !1, Os = !1, ks = !1, As = !1, js = !0, Ms = !1, Ns = !0, Ps = !1, Fs = {}, Is = null, Ls = addToSet({}, [
379
+ })), bs = !0, xs = !0, Ss = !1, Cs = !0, ws = !1, Ts = !0, Es = !1, Ds = !1, Os = !1, ks = !1, As = !1, js = !1, Ms = !0, Ns = !1, Ps = !0, Fs = !1, Is = {}, Ls = null, Rs = addToSet({}, [
380
380
  "annotation-xml",
381
381
  "audio",
382
382
  "colgroup",
@@ -402,14 +402,14 @@ function createDOMPurify() {
402
402
  "title",
403
403
  "video",
404
404
  "xmp"
405
- ]), Rs = null, zs = addToSet({}, [
405
+ ]), zs = null, Bs = addToSet({}, [
406
406
  "audio",
407
407
  "video",
408
408
  "img",
409
409
  "source",
410
410
  "image",
411
411
  "track"
412
- ]), Bs = null, Vs = addToSet({}, [
412
+ ]), Vs = null, Hs = addToSet({}, [
413
413
  "alt",
414
414
  "class",
415
415
  "for",
@@ -424,58 +424,58 @@ function createDOMPurify() {
424
424
  "value",
425
425
  "style",
426
426
  "xmlns"
427
- ]), Hs = "http://www.w3.org/1998/Math/MathML", Us = "http://www.w3.org/2000/svg", Ws = "http://www.w3.org/1999/xhtml", Gs = Ws, Ks = !1, qs = null, Js = addToSet({}, [
428
- Hs,
427
+ ]), Us = "http://www.w3.org/1998/Math/MathML", Ws = "http://www.w3.org/2000/svg", Gs = "http://www.w3.org/1999/xhtml", Ks = Gs, qs = !1, Js = null, Ys = addToSet({}, [
429
428
  Us,
430
- Ws
431
- ], stringToString), Ys = addToSet({}, [
429
+ Ws,
430
+ Gs
431
+ ], stringToString), Xs = addToSet({}, [
432
432
  "mi",
433
433
  "mo",
434
434
  "mn",
435
435
  "ms",
436
436
  "mtext"
437
- ]), Xs = addToSet({}, ["annotation-xml"]), Zs = addToSet({}, [
437
+ ]), Zs = addToSet({}, ["annotation-xml"]), Qs = addToSet({}, [
438
438
  "title",
439
439
  "style",
440
440
  "font",
441
441
  "a",
442
442
  "script"
443
- ]), Qs = null, $s = ["application/xhtml+xml", "text/html"], Y = null, ec = null, tc = n.createElement("form"), nc = function(e) {
443
+ ]), $s = null, ec = ["application/xhtml+xml", "text/html"], Y = null, tc = null, nc = n.createElement("form"), rc = function(e) {
444
444
  return e instanceof RegExp || e instanceof Function;
445
- }, rc = function() {
445
+ }, ic = function() {
446
446
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
447
- if (!(ec && ec === e)) {
448
- if ((!e || typeof e != "object") && (e = {}), e = clone(e), Qs = $s.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = Qs === "application/xhtml+xml" ? stringToString : stringToLowerCase, V = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : ps, ms = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : hs, qs = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : Js, Bs = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Vs), e.ADD_URI_SAFE_ATTR, Y) : Vs, Rs = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(zs), e.ADD_DATA_URI_TAGS, Y) : zs, Is = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : Ls, gs = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), _s = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Fs = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, ys = e.ALLOW_ARIA_ATTR !== !1, bs = e.ALLOW_DATA_ATTR !== !1, xs = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ss = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Cs = e.SAFE_FOR_TEMPLATES || !1, ws = e.SAFE_FOR_XML !== !1, Ts = e.WHOLE_DOCUMENT || !1, Os = e.RETURN_DOM || !1, ks = e.RETURN_DOM_FRAGMENT || !1, As = e.RETURN_TRUSTED_TYPE || !1, Ds = e.FORCE_BODY || !1, js = e.SANITIZE_DOM !== !1, Ms = e.SANITIZE_NAMED_PROPS || !1, Ns = e.KEEP_CONTENT !== !1, Ps = e.IN_PLACE || !1, fs = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, Gs = e.NAMESPACE || Ws, Ys = e.MATHML_TEXT_INTEGRATION_POINTS || Ys, Xs = e.HTML_INTEGRATION_POINTS || Xs, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && nc(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && nc(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), Cs && (bs = !1), ks && (Os = !0), Fs && (V = addToSet({}, text), ms = [], Fs.html === !0 && (addToSet(V, html$1), addToSet(ms, html)), Fs.svg === !0 && (addToSet(V, svg$1), addToSet(ms, svg), addToSet(ms, xml)), Fs.svgFilters === !0 && (addToSet(V, svgFilters), addToSet(ms, svg), addToSet(ms, xml)), Fs.mathMl === !0 && (addToSet(V, mathMl$1), addToSet(ms, mathMl), addToSet(ms, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? vs.tagCheck = e.ADD_TAGS : (V === ps && (V = clone(V)), addToSet(V, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? vs.attributeCheck = e.ADD_ATTR : (ms === hs && (ms = clone(ms)), addToSet(ms, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Bs, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Is === Ls && (Is = clone(Is)), addToSet(Is, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Is === Ls && (Is = clone(Is)), addToSet(Is, e.ADD_FORBID_CONTENTS, Y)), Ns && (V["#text"] = !0), Ts && addToSet(V, [
447
+ if (!(tc && tc === e)) {
448
+ if ((!e || typeof e != "object") && (e = {}), e = clone(e), $s = ec.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = $s === "application/xhtml+xml" ? stringToString : stringToLowerCase, V = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : ms, hs = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : gs, Js = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : Ys, Vs = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Hs), e.ADD_URI_SAFE_ATTR, Y) : Hs, zs = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Bs), e.ADD_DATA_URI_TAGS, Y) : Bs, Ls = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : Rs, _s = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), vs = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Is = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, bs = e.ALLOW_ARIA_ATTR !== !1, xs = e.ALLOW_DATA_ATTR !== !1, Ss = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Cs = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ws = e.SAFE_FOR_TEMPLATES || !1, Ts = e.SAFE_FOR_XML !== !1, Es = e.WHOLE_DOCUMENT || !1, ks = e.RETURN_DOM || !1, As = e.RETURN_DOM_FRAGMENT || !1, js = e.RETURN_TRUSTED_TYPE || !1, Os = e.FORCE_BODY || !1, Ms = e.SANITIZE_DOM !== !1, Ns = e.SANITIZE_NAMED_PROPS || !1, Ps = e.KEEP_CONTENT !== !1, Fs = e.IN_PLACE || !1, ps = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, Ks = e.NAMESPACE || Gs, Xs = e.MATHML_TEXT_INTEGRATION_POINTS || Xs, Zs = e.HTML_INTEGRATION_POINTS || Zs, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && rc(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && rc(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), ws && (xs = !1), As && (ks = !0), Is && (V = addToSet({}, text), hs = [], Is.html === !0 && (addToSet(V, html$1), addToSet(hs, html)), Is.svg === !0 && (addToSet(V, svg$1), addToSet(hs, svg), addToSet(hs, xml)), Is.svgFilters === !0 && (addToSet(V, svgFilters), addToSet(hs, svg), addToSet(hs, xml)), Is.mathMl === !0 && (addToSet(V, mathMl$1), addToSet(hs, mathMl), addToSet(hs, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? ys.tagCheck = e.ADD_TAGS : (V === ms && (V = clone(V)), addToSet(V, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? ys.attributeCheck = e.ADD_ATTR : (hs === gs && (hs = clone(hs)), addToSet(hs, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Vs, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Ls === Rs && (Ls = clone(Ls)), addToSet(Ls, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Ls === Rs && (Ls = clone(Ls)), addToSet(Ls, e.ADD_FORBID_CONTENTS, Y)), Ps && (V["#text"] = !0), Es && addToSet(V, [
449
449
  "html",
450
450
  "head",
451
451
  "body"
452
- ]), V.table && (addToSet(V, ["tbody"]), delete gs.tbody), e.TRUSTED_TYPES_POLICY) {
452
+ ]), V.table && (addToSet(V, ["tbody"]), delete _s.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
455
  A = e.TRUSTED_TYPES_POLICY, R = A.createHTML("");
456
456
  } else A === void 0 && (A = _createTrustedTypesPolicy(h, i)), A !== null && typeof R == "string" && (R = A.createHTML(""));
457
- freeze && freeze(e), ec = e;
457
+ freeze && freeze(e), tc = e;
458
458
  }
459
- }, ic = addToSet({}, [
459
+ }, ac = addToSet({}, [
460
460
  ...svg$1,
461
461
  ...svgFilters,
462
462
  ...svgDisallowed
463
- ]), ac = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), oc = function(e) {
464
- let t = Qo(e);
463
+ ]), oc = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), sc = function(e) {
464
+ let t = $o(e);
465
465
  (!t || !t.tagName) && (t = {
466
- namespaceURI: Gs,
466
+ namespaceURI: Ks,
467
467
  tagName: "template"
468
468
  });
469
469
  let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
470
- return qs[e.namespaceURI] ? e.namespaceURI === Us ? t.namespaceURI === Ws ? n === "svg" : t.namespaceURI === Hs ? n === "svg" && (r === "annotation-xml" || Ys[r]) : !!ic[n] : e.namespaceURI === Hs ? t.namespaceURI === Ws ? n === "math" : t.namespaceURI === Us ? n === "math" && Xs[r] : !!ac[n] : e.namespaceURI === Ws ? t.namespaceURI === Us && !Xs[r] || t.namespaceURI === Hs && !Ys[r] ? !1 : !ac[n] && (Zs[n] || !ic[n]) : !!(Qs === "application/xhtml+xml" && qs[e.namespaceURI]) : !1;
471
- }, sc = function(e) {
470
+ return Js[e.namespaceURI] ? e.namespaceURI === Ws ? t.namespaceURI === Gs ? n === "svg" : t.namespaceURI === Us ? n === "svg" && (r === "annotation-xml" || Xs[r]) : !!ac[n] : e.namespaceURI === Us ? t.namespaceURI === Gs ? n === "math" : t.namespaceURI === Ws ? n === "math" && Zs[r] : !!oc[n] : e.namespaceURI === Gs ? t.namespaceURI === Ws && !Zs[r] || t.namespaceURI === Us && !Xs[r] ? !1 : !oc[n] && (Qs[n] || !ac[n]) : !!($s === "application/xhtml+xml" && Js[e.namespaceURI]) : !1;
471
+ }, cc = function(e) {
472
472
  arrayPush(t.removed, { element: e });
473
473
  try {
474
- Qo(e).removeChild(e);
474
+ $o(e).removeChild(e);
475
475
  } catch {
476
476
  O(e);
477
477
  }
478
- }, cc = function(e, n) {
478
+ }, lc = function(e, n) {
479
479
  try {
480
480
  arrayPush(t.removed, {
481
481
  attribute: n.getAttributeNode(e),
@@ -487,123 +487,123 @@ function createDOMPurify() {
487
487
  from: n
488
488
  });
489
489
  }
490
- if (n.removeAttribute(e), e === "is") if (Os || ks) try {
491
- sc(n);
490
+ if (n.removeAttribute(e), e === "is") if (ks || As) try {
491
+ cc(n);
492
492
  } catch {}
493
493
  else try {
494
494
  n.setAttribute(e, "");
495
495
  } catch {}
496
- }, lc = function(e) {
496
+ }, uc = function(e) {
497
497
  let t = null, r = null;
498
- if (Ds) e = "<remove></remove>" + e;
498
+ if (Os) e = "<remove></remove>" + e;
499
499
  else {
500
500
  let t = stringMatch(e, /^[\r\n\t ]+/);
501
501
  r = t && t[0];
502
502
  }
503
- Qs === "application/xhtml+xml" && Gs === Ws && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
503
+ $s === "application/xhtml+xml" && Ks === Gs && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
504
504
  let i = A ? A.createHTML(e) : e;
505
- if (Gs === Ws) try {
506
- t = new p().parseFromString(i, Qs);
505
+ if (Ks === Gs) try {
506
+ t = new p().parseFromString(i, $s);
507
507
  } catch {}
508
508
  if (!t || !t.documentElement) {
509
- t = $o.createDocument(Gs, "template", null);
509
+ t = es.createDocument(Ks, "template", null);
510
510
  try {
511
- t.documentElement.innerHTML = Ks ? R : i;
511
+ t.documentElement.innerHTML = qs ? R : 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), Gs === Ws ? ns.call(t, Ts ? "html" : "body")[0] : Ts ? t.documentElement : a;
516
- }, uc = function(e) {
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);
515
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Ks === Gs ? rs.call(t, Es ? "html" : "body")[0] : Es ? t.documentElement : a;
518
516
  }, dc = function(e) {
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");
517
+ return ts.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
520
518
  }, fc = function(e) {
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
+ }, pc = function(e) {
521
521
  return typeof s == "function" && e instanceof s;
522
522
  };
523
- function pc(e, n, r) {
523
+ function mc(e, n, r) {
524
524
  arrayForEach(e, (e) => {
525
- e.call(t, n, r, ec);
525
+ e.call(t, n, r, tc);
526
526
  });
527
527
  }
528
- let mc = function(e) {
528
+ let hc = function(e) {
529
529
  let n = null;
530
- if (pc(B.beforeSanitizeElements, e, null), dc(e)) return sc(e), !0;
530
+ if (mc(B.beforeSanitizeElements, e, null), fc(e)) return cc(e), !0;
531
531
  let r = Y(e.nodeName);
532
- if (pc(B.uponSanitizeElement, e, {
532
+ if (mc(B.uponSanitizeElement, e, {
533
533
  tagName: r,
534
534
  allowedTags: V
535
- }), ws && e.hasChildNodes() && !fc(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || ws && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return sc(e), !0;
536
- if (!(vs.tagCheck instanceof Function && vs.tagCheck(r)) && (!V[r] || gs[r])) {
537
- if (!gs[r] && gc(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
538
- if (Ns && !Is[r]) {
539
- let t = Qo(e) || e.parentNode, n = Zo(e) || e.childNodes;
535
+ }), Ts && e.hasChildNodes() && !pc(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Ts && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return cc(e), !0;
536
+ if (!(ys.tagCheck instanceof Function && ys.tagCheck(r)) && (!V[r] || _s[r])) {
537
+ if (!_s[r] && _c(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
538
+ if (Ps && !Ls[r]) {
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
543
  let r = g(n[i], !0);
544
- r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, Xo(e));
544
+ r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, Zo(e));
545
545
  }
546
546
  }
547
547
  }
548
- return sc(e), !0;
548
+ return cc(e), !0;
549
549
  }
550
- return e instanceof c && !oc(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (sc(e), !0) : (Cs && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
551
- is,
550
+ return e instanceof c && !sc(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (cc(e), !0) : (ws && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
552
551
  as,
553
- os
552
+ os,
553
+ ss
554
554
  ], (e) => {
555
555
  n = stringReplace(n, e, " ");
556
- }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), pc(B.afterSanitizeElements, e, null), !1);
557
- }, hc = function(e, t, r) {
558
- if (js && (t === "id" || t === "name") && (r in n || r in tc)) return !1;
559
- if (!(bs && !_s[t] && regExpTest(ss, t)) && !(ys && regExpTest(cs, t)) && !(vs.attributeCheck instanceof Function && vs.attributeCheck(t, e))) {
560
- if (!ms[t] || _s[t]) {
561
- if (!(gc(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 (!Bs[t] && !regExpTest(fs, stringReplace(r, us, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Rs[e]) && !(xs && !regExpTest(ls, stringReplace(r, us, ""))) && r) return !1;
556
+ }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), mc(B.afterSanitizeElements, e, null), !1);
557
+ }, gc = function(e, t, r) {
558
+ if (Ms && (t === "id" || t === "name") && (r in n || r in nc)) return !1;
559
+ if (!(xs && !vs[t] && regExpTest(cs, t)) && !(bs && regExpTest(ls, t)) && !(ys.attributeCheck instanceof Function && ys.attributeCheck(t, e))) {
560
+ if (!hs[t] || vs[t]) {
561
+ if (!(_c(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 (!Vs[t] && !regExpTest(ps, stringReplace(r, ds, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && zs[e]) && !(Ss && !regExpTest(us, stringReplace(r, ds, ""))) && r) return !1;
563
563
  }
564
564
  return !0;
565
- }, gc = function(e) {
566
- return e !== "annotation-xml" && stringMatch(e, ds);
567
565
  }, _c = function(e) {
568
- pc(B.beforeSanitizeAttributes, e, null);
566
+ return e !== "annotation-xml" && stringMatch(e, fs);
567
+ }, vc = function(e) {
568
+ mc(B.beforeSanitizeAttributes, e, null);
569
569
  let { attributes: n } = e;
570
- if (!n || dc(e)) return;
570
+ if (!n || fc(e)) return;
571
571
  let r = {
572
572
  attrName: "",
573
573
  attrValue: "",
574
574
  keepAttr: !0,
575
- allowedAttributes: ms,
575
+ allowedAttributes: hs,
576
576
  forceKeepAttr: void 0
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, pc(B.uponSanitizeAttribute, e, r), u = r.attrValue, Ms && (c === "id" || c === "name") && (cc(a, e), u = "user-content-" + u), ws && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
581
- cc(a, e);
580
+ if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, mc(B.uponSanitizeAttribute, e, r), u = r.attrValue, Ns && (c === "id" || c === "name") && (lc(a, e), u = "user-content-" + u), Ts && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
581
+ lc(a, e);
582
582
  continue;
583
583
  }
584
584
  if (c === "attributename" && stringMatch(u, "href")) {
585
- cc(a, e);
585
+ lc(a, e);
586
586
  continue;
587
587
  }
588
588
  if (r.forceKeepAttr) continue;
589
589
  if (!r.keepAttr) {
590
- cc(a, e);
590
+ lc(a, e);
591
591
  continue;
592
592
  }
593
- if (!Ss && regExpTest(/\/>/i, u)) {
594
- cc(a, e);
593
+ if (!Cs && regExpTest(/\/>/i, u)) {
594
+ lc(a, e);
595
595
  continue;
596
596
  }
597
- Cs && arrayForEach([
598
- is,
597
+ ws && arrayForEach([
599
598
  as,
600
- os
599
+ os,
600
+ ss
601
601
  ], (e) => {
602
602
  u = stringReplace(u, e, " ");
603
603
  });
604
604
  let f = Y(e.nodeName);
605
- if (!hc(f, c, u)) {
606
- cc(a, e);
605
+ if (!gc(f, c, u)) {
606
+ lc(a, e);
607
607
  continue;
608
608
  }
609
609
  if (A && typeof h == "object" && typeof h.getAttributeType == "function" && !o) switch (h.getAttributeType(f, c)) {
@@ -615,56 +615,56 @@ function createDOMPurify() {
615
615
  break;
616
616
  }
617
617
  if (u !== l) try {
618
- o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), dc(e) ? sc(e) : arrayPop(t.removed);
618
+ o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), fc(e) ? cc(e) : arrayPop(t.removed);
619
619
  } catch {
620
- cc(a, e);
620
+ lc(a, e);
621
621
  }
622
622
  }
623
- pc(B.afterSanitizeAttributes, e, null);
624
- }, vc = function e(t) {
625
- let n = null, r = uc(t);
626
- for (pc(B.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) pc(B.uponSanitizeShadowNode, n, null), mc(n), _c(n), n.content instanceof a && e(n.content);
627
- pc(B.afterSanitizeShadowDOM, t, null);
623
+ mc(B.afterSanitizeAttributes, e, null);
624
+ }, yc = function e(t) {
625
+ let n = null, r = dc(t);
626
+ for (mc(B.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) mc(B.uponSanitizeShadowNode, n, null), hc(n), vc(n), n.content instanceof a && e(n.content);
627
+ mc(B.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;
631
- if (Ks = !e, Ks && (e = "<!-->"), typeof e != "string" && !fc(e)) if (typeof e.toString == "function") {
631
+ if (qs = !e, qs && (e = "<!-->"), typeof e != "string" && !pc(e)) if (typeof e.toString == "function") {
632
632
  if (e = e.toString(), typeof e != "string") throw typeErrorCreate("dirty is not a string, aborting");
633
633
  } else throw typeErrorCreate("toString is not a function");
634
634
  if (!t.isSupported) return e;
635
- if (Es || rc(n), t.removed = [], typeof e == "string" && (Ps = !1), Ps) {
635
+ if (Ds || ic(n), t.removed = [], typeof e == "string" && (Fs = !1), Fs) {
636
636
  if (e.nodeName) {
637
637
  let t = Y(e.nodeName);
638
- if (!V[t] || gs[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
638
+ if (!V[t] || _s[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
639
639
  }
640
- } else if (e instanceof s) i = lc("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
640
+ } else if (e instanceof s) i = uc("<!---->"), 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 (!Os && !Cs && !Ts && e.indexOf("<") === -1) return A && As ? A.createHTML(e) : e;
643
- if (i = lc(e), !i) return Os ? null : As ? R : "";
642
+ if (!ks && !ws && !Es && e.indexOf("<") === -1) return A && js ? A.createHTML(e) : e;
643
+ if (i = uc(e), !i) return ks ? null : js ? R : "";
644
644
  }
645
- i && Ds && sc(i.firstChild);
646
- let u = uc(Ps ? e : i);
647
- for (; c = u.nextNode();) mc(c), _c(c), c.content instanceof a && vc(c.content);
648
- if (Ps) return e;
649
- if (Os) {
650
- if (ks) for (l = ts.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
645
+ i && Os && cc(i.firstChild);
646
+ let u = dc(Fs ? e : i);
647
+ for (; c = u.nextNode();) hc(c), vc(c), c.content instanceof a && yc(c.content);
648
+ if (Fs) return e;
649
+ if (ks) {
650
+ if (As) for (l = ns.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
651
651
  else l = i;
652
- return (ms.shadowroot || ms.shadowrootmode) && (l = rs.call(r, l, !0)), l;
652
+ return (hs.shadowroot || hs.shadowrootmode) && (l = is.call(r, l, !0)), l;
653
653
  }
654
- let f = Ts ? i.outerHTML : i.innerHTML;
655
- return Ts && 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), Cs && arrayForEach([
656
- is,
654
+ let f = Es ? i.outerHTML : i.innerHTML;
655
+ return Es && 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), ws && arrayForEach([
657
656
  as,
658
- os
657
+ os,
658
+ ss
659
659
  ], (e) => {
660
660
  f = stringReplace(f, e, " ");
661
- }), A && As ? A.createHTML(f) : f;
661
+ }), A && js ? A.createHTML(f) : f;
662
662
  }, t.setConfig = function() {
663
- rc(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Es = !0;
663
+ ic(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Ds = !0;
664
664
  }, t.clearConfig = function() {
665
- ec = null, Es = !1;
665
+ tc = null, Ds = !1;
666
666
  }, t.isValidAttribute = function(e, t, n) {
667
- return ec || rc({}), hc(Y(e), Y(t), n);
667
+ return tc || ic({}), gc(Y(e), Y(t), n);
668
668
  }, t.addHook = function(e, t) {
669
669
  typeof t == "function" && arrayPush(B[e], t);
670
670
  }, t.removeHook = function(e, t) {
@@ -21372,15 +21372,15 @@ 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, $o = useCallback((e) => {
21375
+ let g = u !== void 0, [O, A] = useState(!1), R = g ? u : O, es = useCallback((e) => {
21376
21376
  e !== R && (g || A(e), p?.(e));
21377
21377
  }, [
21378
21378
  R,
21379
21379
  g,
21380
21380
  p
21381
- ]), es = useRef(null), ts = useRef(null), ns = useRef(null), [rs, B] = useState(null), is = useCallback(() => {
21382
- if (!es.current || !ts.current) return;
21383
- let e = es.current.getBoundingClientRect(), t = ts.current.getBoundingClientRect(), o = e.left;
21381
+ ]), ts = useRef(null), ns = useRef(null), rs = useRef(null), [is, B] = useState(null), as = useCallback(() => {
21382
+ if (!ts.current || !ns.current) return;
21383
+ let e = ts.current.getBoundingClientRect(), t = ns.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
21386
  s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => B({
@@ -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 && is();
21398
- }, [R, is]), useEffect(() => {
21397
+ R && as();
21398
+ }, [R, as]), useEffect(() => {
21399
21399
  if (!R) return;
21400
- let e = () => is();
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, is]);
21405
- let as = useCallback(() => {
21406
- ns.current &&= (clearTimeout(ns.current), null), $o(!0);
21407
- }, [$o]), os = useCallback(() => {
21408
- ns.current = window.setTimeout(() => {
21409
- $o(!1);
21404
+ }, [R, as]);
21405
+ let os = useCallback(() => {
21406
+ rs.current &&= (clearTimeout(rs.current), null), es(!0);
21407
+ }, [es]), ss = useCallback(() => {
21408
+ rs.current = window.setTimeout(() => {
21409
+ es(!1);
21410
21410
  }, 120);
21411
- }, [$o]);
21411
+ }, [es]);
21412
21412
  return useEffect(() => {
21413
21413
  function e(e) {
21414
21414
  let t = e.target;
21415
- es.current?.contains(t) || ts.current?.contains(t) || $o(!1);
21415
+ ts.current?.contains(t) || ns.current?.contains(t) || es(!1);
21416
21416
  }
21417
21417
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
21418
- }, [$o]), useEffect(() => () => {
21419
- ns.current && clearTimeout(ns.current);
21418
+ }, [es]), useEffect(() => () => {
21419
+ rs.current && clearTimeout(rs.current);
21420
21420
  }, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
21421
21421
  value: {
21422
- close: () => $o(!1),
21423
- open: as
21422
+ close: () => es(!1),
21423
+ open: os
21424
21424
  },
21425
21425
  children: [/* @__PURE__ */ jsx("div", {
21426
- ref: es,
21426
+ ref: ts,
21427
21427
  className: "inline-flex",
21428
- onMouseEnter: c ? as : void 0,
21429
- onMouseLeave: c ? os : void 0,
21430
- onClick: () => $o(!R),
21428
+ onMouseEnter: c ? os : void 0,
21429
+ onMouseLeave: c ? ss : void 0,
21430
+ onClick: () => es(!R),
21431
21431
  "aria-haspopup": "menu",
21432
21432
  "aria-expanded": R,
21433
21433
  children: e
21434
21434
  }), R && !o && createPortal(/* @__PURE__ */ jsx("div", {
21435
- ref: ts,
21436
- onMouseEnter: c ? as : void 0,
21437
- onMouseLeave: c ? os : void 0,
21435
+ ref: ns,
21436
+ onMouseEnter: c ? os : void 0,
21437
+ onMouseLeave: c ? ss : void 0,
21438
21438
  style: {
21439
21439
  position: "fixed",
21440
- top: rs?.top ?? 0,
21441
- left: rs?.left ?? 0,
21442
- visibility: rs ? "visible" : "hidden",
21440
+ top: is?.top ?? 0,
21441
+ left: is?.left ?? 0,
21442
+ visibility: is ? "visible" : "hidden",
21443
21443
  zIndex: 1e3
21444
21444
  },
21445
21445
  children: t
@@ -23005,13 +23005,13 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
23005
23005
  e,
23006
23006
  o,
23007
23007
  t
23008
- ]), h = u?.step ?? null, g = u?.index ?? null, Zo = useCallback((e) => {
23008
+ ]), h = u?.step ?? null, g = u?.index ?? null, Qo = useCallback((e) => {
23009
23009
  c((t) => {
23010
23010
  if (t.has(e)) return t;
23011
23011
  let n = new Set(t);
23012
23012
  return n.add(e), n;
23013
23013
  });
23014
- }, []), Qo = useCallback(() => {
23014
+ }, []), $o = useCallback(() => {
23015
23015
  c((n) => {
23016
23016
  let r = findActiveStep(e, n, t);
23017
23017
  if (r == null || n.has(r.step.id)) return n;
@@ -23027,13 +23027,13 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
23027
23027
  currentStepIndex: g,
23028
23028
  dismissedStepIds: o,
23029
23029
  actions: useMemo(() => ({
23030
- dismissCurrentStep: Qo,
23031
- dismissStep: Zo,
23030
+ dismissCurrentStep: $o,
23031
+ dismissStep: Qo,
23032
23032
  skipAll: A,
23033
23033
  close: A
23034
23034
  }), [
23035
+ $o,
23035
23036
  Qo,
23036
- Zo,
23037
23037
  A
23038
23038
  ])
23039
23039
  }) });
@@ -23247,13 +23247,13 @@ function Toaster() {
23247
23247
  useEffect(() => toastStore.subscribe(t), []);
23248
23248
  let A = useSyncExternalStore(subscribeNoop$1, getClientSnapshot$1, getServerSnapshot$1), R = useCallback((e) => {
23249
23249
  e.callbacks?.onOpen?.();
23250
- }, []), $o = useCallback((e, t) => {
23250
+ }, []), es = useCallback((e, t) => {
23251
23251
  t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
23252
23252
  }, []);
23253
23253
  useEffect(() => {
23254
23254
  let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
23255
23255
  o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
23256
- $o(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
23256
+ es(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
23257
23257
  }), r((r) => {
23258
23258
  let i = r.map((e) => {
23259
23259
  let t = n.get(e.id);
@@ -23271,19 +23271,19 @@ function Toaster() {
23271
23271
  }, [
23272
23272
  e,
23273
23273
  R,
23274
- $o
23274
+ es
23275
23275
  ]);
23276
- let es = useCallback((e) => {
23276
+ let ts = useCallback((e) => {
23277
23277
  r((t) => {
23278
23278
  let n = t.filter((t) => t.id !== e);
23279
23279
  return o.current = n, n;
23280
23280
  }), p(e), toastStore.cleanup(e);
23281
- }, [p]), ts = useCallback((e) => {
23281
+ }, [p]), ns = useCallback((e) => {
23282
23282
  a.current.set(e, "manual"), toastStore.remove(e);
23283
23283
  }, []);
23284
23284
  if (!A) return null;
23285
- let ns = groupByPosition(n);
23286
- return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(ns).map(([e, t]) => {
23285
+ let rs = groupByPosition(n);
23286
+ return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(rs).map(([e, t]) => {
23287
23287
  let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
23288
23288
  className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
23289
23289
  children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
@@ -23292,8 +23292,8 @@ function Toaster() {
23292
23292
  children: /* @__PURE__ */ jsx(ToastWrapper, {
23293
23293
  toast: e,
23294
23294
  remainingTime: c.get(e.id) ?? e.duration,
23295
- onExitComplete: es,
23296
- onClose: ts,
23295
+ onExitComplete: ts,
23296
+ onClose: ns,
23297
23297
  onHoverStart: u,
23298
23298
  onHoverEnd: f
23299
23299
  })
@@ -23301,8 +23301,8 @@ function Toaster() {
23301
23301
  }) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
23302
23302
  toast: e,
23303
23303
  remainingTime: c.get(e.id) ?? e.duration,
23304
- onExitComplete: es,
23305
- onClose: ts,
23304
+ onExitComplete: ts,
23305
+ onClose: ns,
23306
23306
  onHoverStart: u,
23307
23307
  onHoverEnd: f
23308
23308
  }, e.id));
@@ -23520,7 +23520,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23520
23520
  function g(e) {
23521
23521
  p(e), a?.(e);
23522
23522
  }
23523
- let Qo = {
23523
+ let $o = {
23524
23524
  fire: [{
23525
23525
  id: "fire",
23526
23526
  tooltip: "Mark as fire",
@@ -23601,7 +23601,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23601
23601
  }),
23602
23602
  /* @__PURE__ */ jsx("div", {
23603
23603
  className: "flex items-center divide-x divide-neutral-400-variant-1",
23604
- children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Qo).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23604
+ children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries($o).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23605
23605
  className: "gap-2 px-1 flex items-center",
23606
23606
  children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
23607
23607
  content: e.tooltip,
@@ -23878,14 +23878,14 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
23878
23878
  variant: r,
23879
23879
  orientation: i,
23880
23880
  status: a
23881
- }), Qo = useRef(null), [A, R] = useState(!1), [$o, es] = useState(!1), [ts, ns] = useState(l), [rs, B] = useState(null), is = c ?? ts, as = s && (A || $o || is), os = typeof n == "number" && n > 0 && (o || a === "active");
23882
- function ss(e) {
23883
- c === void 0 && ns(e), u?.(e);
23881
+ }), $o = useRef(null), [A, R] = useState(!1), [es, ts] = useState(!1), [ns, rs] = useState(l), [is, B] = useState(null), as = c ?? ns, os = s && (A || es || as), ss = typeof n == "number" && n > 0 && (o || a === "active");
23882
+ function cs(e) {
23883
+ c === void 0 && rs(e), u?.(e);
23884
23884
  }
23885
23885
  return useLayoutEffect(() => {
23886
- if (!as || !Qo.current) return;
23886
+ if (!os || !$o.current) return;
23887
23887
  function e() {
23888
- let e = Qo.current?.getBoundingClientRect();
23888
+ let e = $o.current?.getBoundingClientRect();
23889
23889
  e && B({
23890
23890
  top: e.top - 8,
23891
23891
  left: e.right - 12
@@ -23894,7 +23894,7 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
23894
23894
  return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
23895
23895
  window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
23896
23896
  };
23897
- }, [as]), /* @__PURE__ */ jsxs(Button, {
23897
+ }, [os]), /* @__PURE__ */ jsxs(Button, {
23898
23898
  ...g,
23899
23899
  className: cn(O.root(), p?.root),
23900
23900
  onMouseEnter: () => R(!0),
@@ -23902,20 +23902,20 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
23902
23902
  children: [/* @__PURE__ */ jsxs("div", {
23903
23903
  className: "relative",
23904
23904
  children: [/* @__PURE__ */ jsx("div", {
23905
- ref: Qo,
23905
+ ref: $o,
23906
23906
  className: cn(O.bubble(), p?.bubble),
23907
23907
  children: renderIcon(e, O.icon())
23908
- }), as && rs && typeof document < "u" && ToggleControlPortal({
23909
- isPressed: is,
23910
- isPortalHovered: $o,
23911
- portalPosition: rs,
23912
- onMouseEnter: () => es(!0),
23913
- onMouseLeave: () => es(!1),
23914
- onToggle: () => ss(!is)
23908
+ }), os && is && typeof document < "u" && ToggleControlPortal({
23909
+ isPressed: as,
23910
+ isPortalHovered: es,
23911
+ portalPosition: is,
23912
+ onMouseEnter: () => ts(!0),
23913
+ onMouseLeave: () => ts(!1),
23914
+ onToggle: () => cs(!as)
23915
23915
  })]
23916
23916
  }), /* @__PURE__ */ jsxs("div", {
23917
23917
  className: cn(O.label(), p?.label),
23918
- children: [/* @__PURE__ */ jsx("span", { children: t }), os && /* @__PURE__ */ jsxs("span", {
23918
+ children: [/* @__PURE__ */ jsx("span", { children: t }), ss && /* @__PURE__ */ jsxs("span", {
23919
23919
  "aria-label": `${n} items`,
23920
23920
  className: cn(O.count(), p?.count),
23921
23921
  children: [
@@ -23975,7 +23975,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23975
23975
  t,
23976
23976
  n
23977
23977
  ]);
23978
- let Qo = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
23978
+ let $o = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
23979
23979
  function A(t) {
23980
23980
  let o = t.getMonth(), s = t.getFullYear();
23981
23981
  if ((o !== g.month || s !== g.year) && O({
@@ -24002,7 +24002,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24002
24002
  month: e.month - 1
24003
24003
  });
24004
24004
  }
24005
- function $o() {
24005
+ function es() {
24006
24006
  O((e) => e.month === 11 ? {
24007
24007
  year: e.year + 1,
24008
24008
  month: 0
@@ -24011,7 +24011,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24011
24011
  month: e.month + 1
24012
24012
  });
24013
24013
  }
24014
- let es = getWeekdays();
24014
+ let ts = getWeekdays();
24015
24015
  return /* @__PURE__ */ jsxs("div", {
24016
24016
  className: "mt-1 rounded-lg p-2 shadow-lg w-fit border border-neutral-400 bg-white",
24017
24017
  children: [
@@ -24040,7 +24040,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24040
24040
  direction: "right",
24041
24041
  size: 20
24042
24042
  }),
24043
- onClick: $o,
24043
+ onClick: es,
24044
24044
  className: "hover:opacity-60",
24045
24045
  "aria-label": "Next month"
24046
24046
  })
@@ -24048,17 +24048,17 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24048
24048
  }),
24049
24049
  /* @__PURE__ */ jsx("div", {
24050
24050
  className: "mb-2 grid grid-cols-7",
24051
- children: es.map((e) => /* @__PURE__ */ jsx("div", {
24051
+ children: ts.map((e) => /* @__PURE__ */ jsx("div", {
24052
24052
  className: "p-0.5 font-bold flex items-center justify-center text-[9px] text-neutral-900",
24053
24053
  children: e
24054
24054
  }, e))
24055
24055
  }),
24056
24056
  /* @__PURE__ */ jsx("div", {
24057
24057
  className: "grid grid-cols-7",
24058
- children: Qo.map(({ day: r, date: i, isCurrentMonth: a }) => {
24059
- 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), Yo = u, g = s;
24060
- e === "range" && u && !f && s && !isDateBefore(s, u) ? (Yo = u, g = s) : (Yo = null, g = null);
24061
- let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, Yo, g)), Zo = l || p || h;
24058
+ children: $o.map(({ day: r, date: i, isCurrentMonth: a }) => {
24059
+ 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), Xo = u, g = s;
24060
+ e === "range" && u && !f && s && !isDateBefore(s, u) ? (Xo = u, g = s) : (Xo = null, g = null);
24061
+ let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, Xo, g)), Qo = l || p || h;
24062
24062
  return /* @__PURE__ */ jsx(Button, {
24063
24063
  type: "button",
24064
24064
  onClick: () => A(i),
@@ -24070,9 +24070,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
24070
24070
  },
24071
24071
  className: "p-0.5",
24072
24072
  "aria-label": `Select ${formatDate(i)}`,
24073
- "aria-selected": Zo || void 0,
24073
+ "aria-selected": Qo || void 0,
24074
24074
  children: /* @__PURE__ */ jsx("div", {
24075
- className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", Zo && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", O && !Zo && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Zo && !O && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Zo && !O && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
24075
+ 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", O && !Qo && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Qo && !O && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Qo && !O && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
24076
24076
  children: r
24077
24077
  })
24078
24078
  }, `${i.getFullYear()}-${i.getMonth()}-${r}`);
@@ -24140,7 +24140,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
24140
24140
  function g(t) {
24141
24141
  e === "range" && (u || l(t), r?.(t));
24142
24142
  }
24143
- function Zo() {
24143
+ function Qo() {
24144
24144
  e === "single" ? h(null) : g({
24145
24145
  startDate: null,
24146
24146
  endDate: null
@@ -24151,7 +24151,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
24151
24151
  displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
24152
24152
  disabled: i,
24153
24153
  className: a,
24154
- onClear: Zo
24154
+ onClear: Qo
24155
24155
  }),
24156
24156
  disabled: i,
24157
24157
  children: /* @__PURE__ */ jsx(CalendarPanel, {
@@ -24365,7 +24365,7 @@ function EventActionsList({ actions: e, className: t }) {
24365
24365
  }) })
24366
24366
  });
24367
24367
  }
24368
- 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: Yo = {}, density: g = "normal", className: O, style: Qo, isPriority: A, isDone: R }) {
24368
+ 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: Xo = {}, density: g = "normal", className: O, style: $o, isPriority: A, isDone: R }) {
24369
24369
  return /* @__PURE__ */ jsx(Card, {
24370
24370
  as: Pressable,
24371
24371
  onPress: u,
@@ -24374,7 +24374,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24374
24374
  state: l ? "selected" : c ? "read" : "unread",
24375
24375
  density: g
24376
24376
  }), O),
24377
- style: Qo,
24377
+ style: $o,
24378
24378
  "data-service": t,
24379
24379
  children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
24380
24380
  className: "gap-x-2 gap-y-1",
@@ -24412,7 +24412,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24412
24412
  /* @__PURE__ */ jsxs(CardFooter, {
24413
24413
  className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
24414
24414
  children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
24415
- actions: Yo,
24415
+ actions: Xo,
24416
24416
  className: "col-start-2 justify-self-end"
24417
24417
  })]
24418
24418
  })
@@ -24451,7 +24451,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
24451
24451
  ]
24452
24452
  }),
24453
24453
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
24454
- /* @__PURE__ */ jsx(EventActionsList, { actions: Yo }),
24454
+ /* @__PURE__ */ jsx(EventActionsList, { actions: Xo }),
24455
24455
  /* @__PURE__ */ jsx(InfoTooltip, {
24456
24456
  content: o,
24457
24457
  children: /* @__PURE__ */ jsx("span", {
@@ -24591,6 +24591,138 @@ function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText:
24591
24591
  })]
24592
24592
  });
24593
24593
  }
24594
+ var eventSummaryCardStyles = tv({
24595
+ base: "gap-1 rounded-lg p-4 flex w-full flex-col justify-between border-[1.5px] bg-white-variant-5",
24596
+ variants: {
24597
+ tone: {
24598
+ default: "hover:bg-primary-light",
24599
+ priority: "hover:bg-tertiary-500-variant-4"
24600
+ },
24601
+ state: {
24602
+ normal: "",
24603
+ selected: ""
24604
+ }
24605
+ },
24606
+ compoundVariants: [
24607
+ {
24608
+ tone: "default",
24609
+ state: "normal",
24610
+ class: "border-neutral-400"
24611
+ },
24612
+ {
24613
+ tone: "default",
24614
+ state: "selected",
24615
+ class: "border-primary-500 bg-primary-light"
24616
+ },
24617
+ {
24618
+ tone: "priority",
24619
+ state: "normal",
24620
+ class: "border-tertiary-500-variant-3"
24621
+ },
24622
+ {
24623
+ tone: "priority",
24624
+ state: "selected",
24625
+ class: "border-tertiary-500-variant-2 bg-tertiary-500-variant-4"
24626
+ }
24627
+ ]
24628
+ });
24629
+ function insightLabelVisible(e) {
24630
+ return e != null && e !== "";
24631
+ }
24632
+ function EventSummaryInsightChip({ label: e }) {
24633
+ return /* @__PURE__ */ jsxs("div", {
24634
+ className: "h-5 gap-1 px-1.5 inline-flex shrink-0 items-center rounded-full border border-primary-400 bg-primary-light",
24635
+ children: [/* @__PURE__ */ jsx(InsightIcon, {
24636
+ size: 13,
24637
+ className: "text-primary-500"
24638
+ }), /* @__PURE__ */ jsx("span", {
24639
+ className: "font-semibold text-[10px] leading-none whitespace-nowrap text-primary-500",
24640
+ children: e
24641
+ })]
24642
+ });
24643
+ }
24644
+ function EventSummaryFireButton({ active: e, onClick: t }) {
24645
+ return /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
24646
+ className: cn("group h-5 w-5 rounded-full border border-neutral-300 hover:border-tertiary-400 hover:bg-tertiary-50", e && "border-tertiary-400 bg-tertiary-50"),
24647
+ icon: e ? /* @__PURE__ */ jsxs("span", {
24648
+ className: "contents",
24649
+ children: [/* @__PURE__ */ jsx(FireFillIcon, {
24650
+ size: 16,
24651
+ className: "block text-tertiary-500-variant-2 opacity-100 group-hover:hidden group-hover:opacity-0"
24652
+ }), /* @__PURE__ */ jsx(CloseIcon, {
24653
+ size: 12,
24654
+ className: "hidden text-neutral-500 opacity-0 group-hover:block group-hover:text-tertiary-500-variant-2 group-hover:opacity-100",
24655
+ strokeWidth: 2
24656
+ })]
24657
+ }) : /* @__PURE__ */ jsx(FireIcon, {
24658
+ size: 16,
24659
+ className: "text-neutral-500 group-hover:text-tertiary-500-variant-2"
24660
+ }),
24661
+ onClick: t,
24662
+ "aria-pressed": e
24663
+ }) });
24664
+ }
24665
+ 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 }) {
24666
+ let { fire: f, insight: p, link: h } = l, Xo = p?.label ?? null;
24667
+ return /* @__PURE__ */ jsxs(Pressable, {
24668
+ onPress: c,
24669
+ className: cn(eventSummaryCardStyles({
24670
+ tone: f.active ? "priority" : "default",
24671
+ state: s ? "selected" : "normal"
24672
+ }), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
24673
+ "data-service": t,
24674
+ children: [
24675
+ /* @__PURE__ */ jsxs("div", {
24676
+ className: "gap-1.5 flex items-center justify-between",
24677
+ children: [
24678
+ e,
24679
+ /* @__PURE__ */ jsx("span", {
24680
+ className: "min-w-0 -translate-x-0.5 text-sm font-medium truncate text-neutral-900",
24681
+ children: n
24682
+ }),
24683
+ /* @__PURE__ */ jsx(InfoTooltip, {
24684
+ content: o,
24685
+ children: /* @__PURE__ */ jsx(Avatar, {
24686
+ name: o,
24687
+ size: "xs"
24688
+ })
24689
+ }),
24690
+ /* @__PURE__ */ jsx("span", {
24691
+ className: "text-xs leading-tight font-semibold tracking-wide flex-1 text-right whitespace-nowrap text-neutral-800",
24692
+ children: a
24693
+ }),
24694
+ insightLabelVisible(Xo) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: Xo }),
24695
+ /* @__PURE__ */ jsx(EventSummaryFireButton, {
24696
+ active: f.active,
24697
+ onClick: f.onClick
24698
+ })
24699
+ ]
24700
+ }),
24701
+ /* @__PURE__ */ jsx("div", {
24702
+ className: "text-sm font-medium line-clamp-1 text-neutral-900",
24703
+ children: r
24704
+ }),
24705
+ /* @__PURE__ */ jsxs("div", {
24706
+ className: "gap-2 flex",
24707
+ children: [/* @__PURE__ */ jsx("div", {
24708
+ className: "min-w-0 text-sm font-normal line-clamp-1 flex-1 text-neutral-700",
24709
+ children: i
24710
+ }), /* @__PURE__ */ jsx(InfoTooltip, {
24711
+ content: h.tooltip,
24712
+ children: /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
24713
+ type: "button",
24714
+ icon: /* @__PURE__ */ jsx(ExternalLinkIcon, {
24715
+ size: 16,
24716
+ className: "text-neutral-800"
24717
+ }),
24718
+ className: "text-primary-500",
24719
+ onClick: h.onClick
24720
+ }) })
24721
+ })]
24722
+ })
24723
+ ]
24724
+ });
24725
+ }
24594
24726
  function DateSeparator({ timestamp: e }) {
24595
24727
  return /* @__PURE__ */ jsxs("div", {
24596
24728
  className: "gap-4 flex items-center",
@@ -24770,13 +24902,8 @@ function PriorityGroupHeader({ title: e, onMarkAsNotFireClick: t }) {
24770
24902
  className: "pb-3 border-b border-neutral-200",
24771
24903
  children: /* @__PURE__ */ jsxs("div", {
24772
24904
  className: "gap-2 flex items-center",
24773
- children: [/* @__PURE__ */ jsx(IconButton, {
24774
- icon: /* @__PURE__ */ jsx(FireIcon, {
24775
- size: 16,
24776
- className: "text-tertiary-500"
24777
- }),
24778
- className: "h-6 w-6 relative flex shrink-0 items-center justify-center rounded-full border border-tertiary-400 bg-tertiary-50 transition-opacity hover:opacity-70",
24779
- "aria-label": "Priority",
24905
+ children: [/* @__PURE__ */ jsx(EventSummaryFireButton, {
24906
+ active: !0,
24780
24907
  onClick: t
24781
24908
  }), /* @__PURE__ */ jsx("h4", {
24782
24909
  className: "text-tertiary-700 text-xs font-semibold tracking-wide uppercase",
@@ -24819,11 +24946,11 @@ function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
24819
24946
  });
24820
24947
  }
24821
24948
  function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityText: n }, className: r }) {
24822
- let i = e.filter((e) => e.isPriority).length, a = useRef(null), o = useRef(null);
24949
+ let i = e.filter((e) => e.isPriority).length, a = useRef(null), o = useRef(null), c = useRef(!1);
24823
24950
  useEffect(() => {
24824
- e.length > 0 && o.current?.scrollIntoView({ behavior: "smooth" });
24951
+ e.length > 0 && !c.current && (c.current = !0, o.current?.scrollIntoView({ behavior: "smooth" }));
24825
24952
  }, [e]);
24826
- let c = i, u = useCallback((t) => {
24953
+ let u = i, f = useCallback((t) => {
24827
24954
  if (!a.current) return;
24828
24955
  let n = Array.from(a.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")).filter((t) => {
24829
24956
  let n = t.getAttribute("data-group-id");
@@ -24845,12 +24972,12 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
24845
24972
  ref: a,
24846
24973
  className: "gap-4 flex flex-col",
24847
24974
  children: [e.map((e) => {
24848
- let t = e.isPriority ? c-- : 0, n = t ? () => {
24975
+ let t = e.isPriority ? u-- : 0, n = t ? () => {
24849
24976
  let e = t + 1;
24850
- e <= i && u(e);
24977
+ e <= i && f(e);
24851
24978
  } : void 0, r = t ? () => {
24852
24979
  let e = t - 1;
24853
- e >= 1 && u(e);
24980
+ e >= 1 && f(e);
24854
24981
  } : void 0;
24855
24982
  return /* @__PURE__ */ jsx(MessageGroup, {
24856
24983
  group: {
@@ -24920,11 +25047,11 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
24920
25047
  ]
24921
25048
  })] });
24922
25049
  }
24923
- function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related: h }, className: Yo }) {
25050
+ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related: h }, className: Xo }) {
24924
25051
  return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
24925
25052
  summary: e,
24926
25053
  priorityText: n,
24927
- className: Yo,
25054
+ className: Xo,
24928
25055
  children: [
24929
25056
  /* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
24930
25057
  issue: r,
@@ -24950,138 +25077,6 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
24950
25077
  ]
24951
25078
  });
24952
25079
  }
24953
- var eventSummaryCardStyles = tv({
24954
- base: "gap-1 rounded-lg p-4 flex w-full flex-col justify-between border-[1.5px] bg-white-variant-5",
24955
- variants: {
24956
- tone: {
24957
- default: "hover:bg-primary-light",
24958
- priority: "hover:bg-tertiary-500-variant-4"
24959
- },
24960
- state: {
24961
- normal: "",
24962
- selected: ""
24963
- }
24964
- },
24965
- compoundVariants: [
24966
- {
24967
- tone: "default",
24968
- state: "normal",
24969
- class: "border-neutral-400"
24970
- },
24971
- {
24972
- tone: "default",
24973
- state: "selected",
24974
- class: "border-primary-500 bg-primary-light"
24975
- },
24976
- {
24977
- tone: "priority",
24978
- state: "normal",
24979
- class: "border-tertiary-500-variant-3"
24980
- },
24981
- {
24982
- tone: "priority",
24983
- state: "selected",
24984
- class: "border-tertiary-500-variant-2 bg-tertiary-500-variant-4"
24985
- }
24986
- ]
24987
- });
24988
- function insightLabelVisible(e) {
24989
- return e != null && e !== "";
24990
- }
24991
- function EventSummaryInsightChip({ label: e }) {
24992
- return /* @__PURE__ */ jsxs("div", {
24993
- className: "h-5 gap-1 px-1.5 inline-flex shrink-0 items-center rounded-full border border-primary-400 bg-primary-light",
24994
- children: [/* @__PURE__ */ jsx(InsightIcon, {
24995
- size: 13,
24996
- className: "text-primary-500"
24997
- }), /* @__PURE__ */ jsx("span", {
24998
- className: "font-semibold text-[10px] leading-none whitespace-nowrap text-primary-500",
24999
- children: e
25000
- })]
25001
- });
25002
- }
25003
- function EventSummaryFireButton({ active: e, onClick: t }) {
25004
- return /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
25005
- className: cn("group h-5 w-5 rounded-full border border-neutral-300 hover:border-tertiary-400 hover:bg-tertiary-50", e && "border-tertiary-400 bg-tertiary-50"),
25006
- icon: e ? /* @__PURE__ */ jsxs("span", {
25007
- className: "contents",
25008
- children: [/* @__PURE__ */ jsx(FireFillIcon, {
25009
- size: 16,
25010
- className: "block text-tertiary-500-variant-2 opacity-100 group-hover:hidden group-hover:opacity-0"
25011
- }), /* @__PURE__ */ jsx(CloseIcon, {
25012
- size: 12,
25013
- className: "hidden text-neutral-500 opacity-0 group-hover:block group-hover:text-tertiary-500-variant-2 group-hover:opacity-100",
25014
- strokeWidth: 2
25015
- })]
25016
- }) : /* @__PURE__ */ jsx(FireIcon, {
25017
- size: 16,
25018
- className: "text-neutral-500 group-hover:text-tertiary-500-variant-2"
25019
- }),
25020
- onClick: t,
25021
- "aria-pressed": e
25022
- }) });
25023
- }
25024
- 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 }) {
25025
- let { fire: f, insight: p, link: h } = l, Yo = p?.label ?? null;
25026
- return /* @__PURE__ */ jsxs(Pressable, {
25027
- onPress: c,
25028
- className: cn(eventSummaryCardStyles({
25029
- tone: f.active ? "priority" : "default",
25030
- state: s ? "selected" : "normal"
25031
- }), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
25032
- "data-service": t,
25033
- children: [
25034
- /* @__PURE__ */ jsxs("div", {
25035
- className: "gap-1.5 flex items-center justify-between",
25036
- children: [
25037
- e,
25038
- /* @__PURE__ */ jsx("span", {
25039
- className: "min-w-0 -translate-x-0.5 text-sm font-medium truncate text-neutral-900",
25040
- children: n
25041
- }),
25042
- /* @__PURE__ */ jsx(InfoTooltip, {
25043
- content: o,
25044
- children: /* @__PURE__ */ jsx(Avatar, {
25045
- name: o,
25046
- size: "xs"
25047
- })
25048
- }),
25049
- /* @__PURE__ */ jsx("span", {
25050
- className: "text-xs leading-tight font-semibold tracking-wide flex-1 text-right whitespace-nowrap text-neutral-800",
25051
- children: a
25052
- }),
25053
- insightLabelVisible(Yo) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: Yo }),
25054
- /* @__PURE__ */ jsx(EventSummaryFireButton, {
25055
- active: f.active,
25056
- onClick: f.onClick
25057
- })
25058
- ]
25059
- }),
25060
- /* @__PURE__ */ jsx("div", {
25061
- className: "text-sm font-medium line-clamp-1 text-neutral-900",
25062
- children: r
25063
- }),
25064
- /* @__PURE__ */ jsxs("div", {
25065
- className: "gap-2 flex",
25066
- children: [/* @__PURE__ */ jsx("div", {
25067
- className: "min-w-0 text-sm font-normal line-clamp-1 flex-1 text-neutral-700",
25068
- children: i
25069
- }), /* @__PURE__ */ jsx(InfoTooltip, {
25070
- content: h.tooltip,
25071
- children: /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
25072
- type: "button",
25073
- icon: /* @__PURE__ */ jsx(ExternalLinkIcon, {
25074
- size: 16,
25075
- className: "text-neutral-800"
25076
- }),
25077
- className: "text-primary-500",
25078
- onClick: h.onClick
25079
- }) })
25080
- })]
25081
- })
25082
- ]
25083
- });
25084
- }
25085
25080
  function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, timestamp: a, isPriority: o, isOpen: s, isFirstEvent: c, isSingleEvent: l, className: u, onFireClick: f }) {
25086
25081
  return /* @__PURE__ */ jsx("div", {
25087
25082
  className: cn("h-14 min-w-0 px-4 py-2 flex w-full items-center overflow-hidden bg-white", u),
@@ -25118,7 +25113,7 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
25118
25113
  children: a
25119
25114
  })]
25120
25115
  }),
25121
- /* @__PURE__ */ jsx(EventSummaryFireButton, {
25116
+ f != null && /* @__PURE__ */ jsx(EventSummaryFireButton, {
25122
25117
  active: o,
25123
25118
  onClick: f
25124
25119
  }),
@@ -25221,7 +25216,10 @@ function renderEventContent(e) {
25221
25216
  function getEventValue(e, t) {
25222
25217
  return e.id ?? `${e.type}-${e.timestamp}-${t}`;
25223
25218
  }
25224
- function EventDetail({ events: e, expandedEventIndex: t, onFireClick: n }) {
25219
+ function headerOnFireClick(e) {
25220
+ return e.type === "message" ? void 0 : e.onFireClick;
25221
+ }
25222
+ function EventDetail({ events: e, expandedEventIndex: t }) {
25225
25223
  if (e.length === 0) return null;
25226
25224
  if (e.length === 1) {
25227
25225
  let t = e[0];
@@ -25238,39 +25236,39 @@ function EventDetail({ events: e, expandedEventIndex: t, onFireClick: n }) {
25238
25236
  isFirstEvent: !0,
25239
25237
  isSingleEvent: !0,
25240
25238
  className: "top-0 sticky z-10 border-b border-neutral-400",
25241
- onFireClick: n
25239
+ onFireClick: headerOnFireClick(t)
25242
25240
  }), renderEventContent(t)]
25243
25241
  });
25244
25242
  }
25245
25243
  return /* @__PURE__ */ jsx(Accordion, {
25246
25244
  className: "w-full",
25247
25245
  defaultValue: t === void 0 ? getEventValue(e[0], 0) : getEventValue(e[t], t),
25248
- children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment$1, { children: e.map((r, i) => {
25249
- let a = getEventValue(r, i), o = t.has(a);
25246
+ children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment$1, { children: e.map((n, r) => {
25247
+ let i = getEventValue(n, r), a = t.has(i);
25250
25248
  return /* @__PURE__ */ jsxs(AccordionItem, {
25251
- value: a,
25249
+ value: i,
25252
25250
  children: [/* @__PURE__ */ jsx(AccordionTrigger, {
25253
- value: a,
25251
+ value: i,
25254
25252
  className: "top-0 sticky z-10",
25255
25253
  children: /* @__PURE__ */ jsx(EventDetailHeader, {
25256
- icon: r.icon,
25257
- subject: r.subject,
25258
- from: r.from,
25259
- prefixTimestamp: r.prefixTimestamp,
25260
- timestamp: r.timestamp,
25261
- isPriority: r.isPriority,
25262
- isFirstEvent: i === 0,
25254
+ icon: n.icon,
25255
+ subject: n.subject,
25256
+ from: n.from,
25257
+ prefixTimestamp: n.prefixTimestamp,
25258
+ timestamp: n.timestamp,
25259
+ isPriority: n.isPriority,
25260
+ isFirstEvent: r === 0,
25263
25261
  isSingleEvent: !1,
25264
- isOpen: o,
25262
+ isOpen: a,
25265
25263
  className: "border-b border-neutral-400",
25266
- onFireClick: n
25264
+ onFireClick: headerOnFireClick(n)
25267
25265
  })
25268
25266
  }), /* @__PURE__ */ jsx(AccordionContent, {
25269
- value: a,
25270
- className: cn(i < e.length - 1 && o && "border-b border-neutral-400"),
25271
- children: renderEventContent(r)
25267
+ value: i,
25268
+ className: cn(r < e.length - 1 && a && "border-b border-neutral-400"),
25269
+ children: renderEventContent(n)
25272
25270
  })]
25273
- }, a);
25271
+ }, i);
25274
25272
  }) })
25275
25273
  });
25276
25274
  }
@@ -25584,10 +25582,10 @@ function OnboardingCard({ stepLabel: e, title: t, description: n, titleAccessory
25584
25582
  children: [i, a]
25585
25583
  })
25586
25584
  ]
25587
- }), Yo = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
25585
+ }), Xo = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
25588
25586
  layout: o,
25589
25587
  placement: s
25590
- }), c, l), g = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [Yo, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, Yo] });
25588
+ }), c, l), g = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [Xo, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, Xo] });
25591
25589
  return o === "horizontal" ? /* @__PURE__ */ jsx("div", {
25592
25590
  className: cn("flex items-center", u),
25593
25591
  children: g