@qtalo/qt-ui-library 0.1.10 → 0.1.12

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: Xa } = e, h = c.prototype, g = lookupGetter(h, "cloneNode"), Za = lookupGetter(h, "remove"), Qa = lookupGetter(h, "nextSibling"), O = lookupGetter(h, "childNodes"), $a = lookupGetter(h, "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: to } = e, h = c.prototype, g = lookupGetter(h, "cloneNode"), no = lookupGetter(h, "remove"), ro = lookupGetter(h, "nextSibling"), O = lookupGetter(h, "childNodes"), io = lookupGetter(h, "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, eo = "", { implementation: to, createNodeIterator: no, createDocumentFragment: ro, getElementsByTagName: io } = n, { importNode: ao } = r, R = _createHooksMap();
335
- t.isSupported = typeof entries == "function" && typeof $a == "function" && to && to.createHTMLDocument !== void 0;
336
- let { MUSTACHE_EXPR: oo, ERB_EXPR: so, TMPLIT_EXPR: co, DATA_ATTR: lo, ARIA_ATTR: uo, IS_SCRIPT_OR_DATA: fo, ATTR_WHITESPACE: po, CUSTOM_ELEMENT: mo } = EXPRESSIONS, { IS_ALLOWED_URI: ho } = EXPRESSIONS, B = null, go = addToSet({}, [
334
+ let A, ao = "", { implementation: oo, createNodeIterator: so, createDocumentFragment: co, getElementsByTagName: lo } = n, { importNode: uo } = r, R = _createHooksMap();
335
+ t.isSupported = typeof entries == "function" && typeof io == "function" && oo && oo.createHTMLDocument !== void 0;
336
+ let { MUSTACHE_EXPR: fo, ERB_EXPR: po, TMPLIT_EXPR: mo, DATA_ATTR: ho, ARIA_ATTR: go, IS_SCRIPT_OR_DATA: _o, ATTR_WHITESPACE: vo, CUSTOM_ELEMENT: yo } = EXPRESSIONS, { IS_ALLOWED_URI: bo } = EXPRESSIONS, B = null, xo = addToSet({}, [
337
337
  ...html$1,
338
338
  ...svg$1,
339
339
  ...svgFilters,
340
340
  ...mathMl$1,
341
341
  ...text
342
- ]), V = null, _o = addToSet({}, [
342
+ ]), V = null, So = 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
- })), vo = null, yo = null, bo = Object.seal(create(null, {
366
+ })), Co = null, wo = null, To = 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
- })), xo = !0, So = !0, Co = !1, wo = !0, To = !1, Eo = !0, Do = !1, Oo = !1, ko = !1, Ao = !1, jo = !1, Mo = !1, No = !0, Po = !1, Fo = !0, Io = !1, Lo = {}, Ro = null, zo = addToSet({}, [
379
+ })), Eo = !0, Do = !0, Oo = !1, ko = !0, Ao = !1, jo = !0, Mo = !1, No = !1, Po = !1, Fo = !1, Io = !1, Lo = !1, Ro = !0, zo = !1, Bo = !0, Vo = !1, Ho = {}, Uo = null, Wo = 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
- ]), Bo = null, Vo = addToSet({}, [
405
+ ]), Go = null, Ko = addToSet({}, [
406
406
  "audio",
407
407
  "video",
408
408
  "img",
409
409
  "source",
410
410
  "image",
411
411
  "track"
412
- ]), Ho = null, Uo = addToSet({}, [
412
+ ]), qo = null, Jo = 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
- ]), Wo = "http://www.w3.org/1998/Math/MathML", Go = "http://www.w3.org/2000/svg", Ko = "http://www.w3.org/1999/xhtml", qo = Ko, Jo = !1, Yo = null, Xo = addToSet({}, [
428
- Wo,
429
- Go,
430
- Ko
431
- ], stringToString), Zo = addToSet({}, [
427
+ ]), Yo = "http://www.w3.org/1998/Math/MathML", Xo = "http://www.w3.org/2000/svg", Zo = "http://www.w3.org/1999/xhtml", Qo = Zo, $o = !1, es = null, ts = addToSet({}, [
428
+ Yo,
429
+ Xo,
430
+ Zo
431
+ ], stringToString), ns = addToSet({}, [
432
432
  "mi",
433
433
  "mo",
434
434
  "mn",
435
435
  "ms",
436
436
  "mtext"
437
- ]), Qo = addToSet({}, ["annotation-xml"]), $o = addToSet({}, [
437
+ ]), rs = addToSet({}, ["annotation-xml"]), is = addToSet({}, [
438
438
  "title",
439
439
  "style",
440
440
  "font",
441
441
  "a",
442
442
  "script"
443
- ]), es = null, ts = ["application/xhtml+xml", "text/html"], Y = null, ns = null, rs = n.createElement("form"), is = function(e) {
443
+ ]), as = null, os = ["application/xhtml+xml", "text/html"], Y = null, ss = null, cs = n.createElement("form"), ls = function(e) {
444
444
  return e instanceof RegExp || e instanceof Function;
445
- }, as = function() {
445
+ }, us = function() {
446
446
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
447
- if (!(ns && ns === e)) {
448
- if ((!e || typeof e != "object") && (e = {}), e = clone(e), es = ts.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = es === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : go, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : _o, Yo = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : Xo, Ho = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Uo), e.ADD_URI_SAFE_ATTR, Y) : Uo, Bo = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Vo), e.ADD_DATA_URI_TAGS, Y) : Vo, Ro = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : zo, vo = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), yo = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Lo = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, xo = e.ALLOW_ARIA_ATTR !== !1, So = e.ALLOW_DATA_ATTR !== !1, Co = e.ALLOW_UNKNOWN_PROTOCOLS || !1, wo = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, To = e.SAFE_FOR_TEMPLATES || !1, Eo = e.SAFE_FOR_XML !== !1, Do = e.WHOLE_DOCUMENT || !1, Ao = e.RETURN_DOM || !1, jo = e.RETURN_DOM_FRAGMENT || !1, Mo = e.RETURN_TRUSTED_TYPE || !1, ko = e.FORCE_BODY || !1, No = e.SANITIZE_DOM !== !1, Po = e.SANITIZE_NAMED_PROPS || !1, Fo = e.KEEP_CONTENT !== !1, Io = e.IN_PLACE || !1, ho = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, qo = e.NAMESPACE || Ko, Zo = e.MATHML_TEXT_INTEGRATION_POINTS || Zo, Qo = e.HTML_INTEGRATION_POINTS || Qo, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && is(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && is(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), To && (So = !1), jo && (Ao = !0), Lo && (B = addToSet({}, text), V = [], Lo.html === !0 && (addToSet(B, html$1), addToSet(V, html)), Lo.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), Lo.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), Lo.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? bo.tagCheck = e.ADD_TAGS : (B === go && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? bo.attributeCheck = e.ADD_ATTR : (V === _o && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Ho, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Ro === zo && (Ro = clone(Ro)), addToSet(Ro, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Ro === zo && (Ro = clone(Ro)), addToSet(Ro, e.ADD_FORBID_CONTENTS, Y)), Fo && (B["#text"] = !0), Do && addToSet(B, [
447
+ if (!(ss && ss === e)) {
448
+ if ((!e || typeof e != "object") && (e = {}), e = clone(e), as = os.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = as === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : xo, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : So, es = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : ts, qo = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Jo), e.ADD_URI_SAFE_ATTR, Y) : Jo, Go = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Ko), e.ADD_DATA_URI_TAGS, Y) : Ko, Uo = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : Wo, Co = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), wo = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Ho = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Eo = e.ALLOW_ARIA_ATTR !== !1, Do = e.ALLOW_DATA_ATTR !== !1, Oo = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ko = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ao = e.SAFE_FOR_TEMPLATES || !1, jo = e.SAFE_FOR_XML !== !1, Mo = e.WHOLE_DOCUMENT || !1, Fo = e.RETURN_DOM || !1, Io = e.RETURN_DOM_FRAGMENT || !1, Lo = e.RETURN_TRUSTED_TYPE || !1, Po = e.FORCE_BODY || !1, Ro = e.SANITIZE_DOM !== !1, zo = e.SANITIZE_NAMED_PROPS || !1, Bo = e.KEEP_CONTENT !== !1, Vo = e.IN_PLACE || !1, bo = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, Qo = e.NAMESPACE || Zo, ns = e.MATHML_TEXT_INTEGRATION_POINTS || ns, rs = e.HTML_INTEGRATION_POINTS || rs, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && ls(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && ls(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), Ao && (Do = !1), Io && (Fo = !0), Ho && (B = addToSet({}, text), V = [], Ho.html === !0 && (addToSet(B, html$1), addToSet(V, html)), Ho.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), Ho.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), Ho.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? To.tagCheck = e.ADD_TAGS : (B === xo && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? To.attributeCheck = e.ADD_ATTR : (V === So && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(qo, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Uo === Wo && (Uo = clone(Uo)), addToSet(Uo, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Uo === Wo && (Uo = clone(Uo)), addToSet(Uo, e.ADD_FORBID_CONTENTS, Y)), Bo && (B["#text"] = !0), Mo && addToSet(B, [
449
449
  "html",
450
450
  "head",
451
451
  "body"
452
- ]), B.table && (addToSet(B, ["tbody"]), delete vo.tbody), e.TRUSTED_TYPES_POLICY) {
452
+ ]), B.table && (addToSet(B, ["tbody"]), delete Co.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, eo = A.createHTML("");
456
- } else A === void 0 && (A = _createTrustedTypesPolicy(Xa, i)), A !== null && typeof eo == "string" && (eo = A.createHTML(""));
457
- freeze && freeze(e), ns = e;
455
+ A = e.TRUSTED_TYPES_POLICY, ao = A.createHTML("");
456
+ } else A === void 0 && (A = _createTrustedTypesPolicy(to, i)), A !== null && typeof ao == "string" && (ao = A.createHTML(""));
457
+ freeze && freeze(e), ss = e;
458
458
  }
459
- }, os = addToSet({}, [
459
+ }, ds = addToSet({}, [
460
460
  ...svg$1,
461
461
  ...svgFilters,
462
462
  ...svgDisallowed
463
- ]), ss = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), cs = function(e) {
464
- let t = $a(e);
463
+ ]), fs = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), ps = function(e) {
464
+ let t = io(e);
465
465
  (!t || !t.tagName) && (t = {
466
- namespaceURI: qo,
466
+ namespaceURI: Qo,
467
467
  tagName: "template"
468
468
  });
469
469
  let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
470
- return Yo[e.namespaceURI] ? e.namespaceURI === Go ? t.namespaceURI === Ko ? n === "svg" : t.namespaceURI === Wo ? n === "svg" && (r === "annotation-xml" || Zo[r]) : !!os[n] : e.namespaceURI === Wo ? t.namespaceURI === Ko ? n === "math" : t.namespaceURI === Go ? n === "math" && Qo[r] : !!ss[n] : e.namespaceURI === Ko ? t.namespaceURI === Go && !Qo[r] || t.namespaceURI === Wo && !Zo[r] ? !1 : !ss[n] && ($o[n] || !os[n]) : !!(es === "application/xhtml+xml" && Yo[e.namespaceURI]) : !1;
471
- }, ls = function(e) {
470
+ return es[e.namespaceURI] ? e.namespaceURI === Xo ? t.namespaceURI === Zo ? n === "svg" : t.namespaceURI === Yo ? n === "svg" && (r === "annotation-xml" || ns[r]) : !!ds[n] : e.namespaceURI === Yo ? t.namespaceURI === Zo ? n === "math" : t.namespaceURI === Xo ? n === "math" && rs[r] : !!fs[n] : e.namespaceURI === Zo ? t.namespaceURI === Xo && !rs[r] || t.namespaceURI === Yo && !ns[r] ? !1 : !fs[n] && (is[n] || !ds[n]) : !!(as === "application/xhtml+xml" && es[e.namespaceURI]) : !1;
471
+ }, ms = function(e) {
472
472
  arrayPush(t.removed, { element: e });
473
473
  try {
474
- $a(e).removeChild(e);
474
+ io(e).removeChild(e);
475
475
  } catch {
476
- Za(e);
476
+ no(e);
477
477
  }
478
- }, us = function(e, n) {
478
+ }, hs = function(e, n) {
479
479
  try {
480
480
  arrayPush(t.removed, {
481
481
  attribute: n.getAttributeNode(e),
@@ -487,87 +487,87 @@ function createDOMPurify() {
487
487
  from: n
488
488
  });
489
489
  }
490
- if (n.removeAttribute(e), e === "is") if (Ao || jo) try {
491
- ls(n);
490
+ if (n.removeAttribute(e), e === "is") if (Fo || Io) try {
491
+ ms(n);
492
492
  } catch {}
493
493
  else try {
494
494
  n.setAttribute(e, "");
495
495
  } catch {}
496
- }, ds = function(e) {
496
+ }, gs = function(e) {
497
497
  let t = null, r = null;
498
- if (ko) e = "<remove></remove>" + e;
498
+ if (Po) 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
- es === "application/xhtml+xml" && qo === Ko && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
503
+ as === "application/xhtml+xml" && Qo === Zo && (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 (qo === Ko) try {
506
- t = new p().parseFromString(i, es);
505
+ if (Qo === Zo) try {
506
+ t = new p().parseFromString(i, as);
507
507
  } catch {}
508
508
  if (!t || !t.documentElement) {
509
- t = to.createDocument(qo, "template", null);
509
+ t = oo.createDocument(Qo, "template", null);
510
510
  try {
511
- t.documentElement.innerHTML = Jo ? eo : i;
511
+ t.documentElement.innerHTML = $o ? ao : 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), qo === Ko ? io.call(t, Do ? "html" : "body")[0] : Do ? t.documentElement : a;
516
- }, fs = function(e) {
517
- return no.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
518
- }, ps = function(e) {
515
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Qo === Zo ? lo.call(t, Mo ? "html" : "body")[0] : Mo ? t.documentElement : a;
516
+ }, _s = function(e) {
517
+ return so.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
518
+ }, vs = 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
- }, ms = function(e) {
520
+ }, ys = function(e) {
521
521
  return typeof s == "function" && e instanceof s;
522
522
  };
523
- function hs(e, n, r) {
523
+ function bs(e, n, r) {
524
524
  arrayForEach(e, (e) => {
525
- e.call(t, n, r, ns);
525
+ e.call(t, n, r, ss);
526
526
  });
527
527
  }
528
- let gs = function(e) {
528
+ let xs = function(e) {
529
529
  let n = null;
530
- if (hs(R.beforeSanitizeElements, e, null), ps(e)) return ls(e), !0;
530
+ if (bs(R.beforeSanitizeElements, e, null), vs(e)) return ms(e), !0;
531
531
  let r = Y(e.nodeName);
532
- if (hs(R.uponSanitizeElement, e, {
532
+ if (bs(R.uponSanitizeElement, e, {
533
533
  tagName: r,
534
534
  allowedTags: B
535
- }), Eo && e.hasChildNodes() && !ms(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Eo && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return ls(e), !0;
536
- if (!(bo.tagCheck instanceof Function && bo.tagCheck(r)) && (!B[r] || vo[r])) {
537
- if (!vo[r] && vs(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
538
- if (Fo && !Ro[r]) {
539
- let t = $a(e) || e.parentNode, n = O(e) || e.childNodes;
535
+ }), jo && e.hasChildNodes() && !ys(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || jo && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return ms(e), !0;
536
+ if (!(To.tagCheck instanceof Function && To.tagCheck(r)) && (!B[r] || Co[r])) {
537
+ if (!Co[r] && Cs(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
538
+ if (Bo && !Uo[r]) {
539
+ let t = io(e) || e.parentNode, n = O(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, Qa(e));
544
+ r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, ro(e));
545
545
  }
546
546
  }
547
547
  }
548
- return ls(e), !0;
548
+ return ms(e), !0;
549
549
  }
550
- return e instanceof c && !cs(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (ls(e), !0) : (To && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
551
- oo,
552
- so,
553
- co
550
+ return e instanceof c && !ps(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (ms(e), !0) : (Ao && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
551
+ fo,
552
+ po,
553
+ mo
554
554
  ], (e) => {
555
555
  n = stringReplace(n, e, " ");
556
- }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), hs(R.afterSanitizeElements, e, null), !1);
557
- }, _s = function(e, t, r) {
558
- if (No && (t === "id" || t === "name") && (r in n || r in rs)) return !1;
559
- if (!(So && !yo[t] && regExpTest(lo, t)) && !(xo && regExpTest(uo, t)) && !(bo.attributeCheck instanceof Function && bo.attributeCheck(t, e))) {
560
- if (!V[t] || yo[t]) {
561
- if (!(vs(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 (!Ho[t] && !regExpTest(ho, stringReplace(r, po, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Bo[e]) && !(Co && !regExpTest(fo, stringReplace(r, po, ""))) && r) return !1;
556
+ }), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), bs(R.afterSanitizeElements, e, null), !1);
557
+ }, Ss = function(e, t, r) {
558
+ if (Ro && (t === "id" || t === "name") && (r in n || r in cs)) return !1;
559
+ if (!(Do && !wo[t] && regExpTest(ho, t)) && !(Eo && regExpTest(go, t)) && !(To.attributeCheck instanceof Function && To.attributeCheck(t, e))) {
560
+ if (!V[t] || wo[t]) {
561
+ if (!(Cs(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 (!qo[t] && !regExpTest(bo, stringReplace(r, vo, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Go[e]) && !(Oo && !regExpTest(_o, stringReplace(r, vo, ""))) && r) return !1;
563
563
  }
564
564
  return !0;
565
- }, vs = function(e) {
566
- return e !== "annotation-xml" && stringMatch(e, mo);
567
- }, ys = function(e) {
568
- hs(R.beforeSanitizeAttributes, e, null);
565
+ }, Cs = function(e) {
566
+ return e !== "annotation-xml" && stringMatch(e, yo);
567
+ }, ws = function(e) {
568
+ bs(R.beforeSanitizeAttributes, e, null);
569
569
  let { attributes: n } = e;
570
- if (!n || ps(e)) return;
570
+ if (!n || vs(e)) return;
571
571
  let r = {
572
572
  attrName: "",
573
573
  attrValue: "",
@@ -577,36 +577,36 @@ 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, hs(R.uponSanitizeAttribute, e, r), u = r.attrValue, Po && (c === "id" || c === "name") && (us(a, e), u = "user-content-" + u), Eo && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
581
- us(a, e);
580
+ if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, bs(R.uponSanitizeAttribute, e, r), u = r.attrValue, zo && (c === "id" || c === "name") && (hs(a, e), u = "user-content-" + u), jo && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
581
+ hs(a, e);
582
582
  continue;
583
583
  }
584
584
  if (c === "attributename" && stringMatch(u, "href")) {
585
- us(a, e);
585
+ hs(a, e);
586
586
  continue;
587
587
  }
588
588
  if (r.forceKeepAttr) continue;
589
589
  if (!r.keepAttr) {
590
- us(a, e);
590
+ hs(a, e);
591
591
  continue;
592
592
  }
593
- if (!wo && regExpTest(/\/>/i, u)) {
594
- us(a, e);
593
+ if (!ko && regExpTest(/\/>/i, u)) {
594
+ hs(a, e);
595
595
  continue;
596
596
  }
597
- To && arrayForEach([
598
- oo,
599
- so,
600
- co
597
+ Ao && arrayForEach([
598
+ fo,
599
+ po,
600
+ mo
601
601
  ], (e) => {
602
602
  u = stringReplace(u, e, " ");
603
603
  });
604
604
  let f = Y(e.nodeName);
605
- if (!_s(f, c, u)) {
606
- us(a, e);
605
+ if (!Ss(f, c, u)) {
606
+ hs(a, e);
607
607
  continue;
608
608
  }
609
- if (A && typeof Xa == "object" && typeof Xa.getAttributeType == "function" && !o) switch (Xa.getAttributeType(f, c)) {
609
+ if (A && typeof to == "object" && typeof to.getAttributeType == "function" && !o) switch (to.getAttributeType(f, c)) {
610
610
  case "TrustedHTML":
611
611
  u = A.createHTML(u);
612
612
  break;
@@ -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), ps(e) ? ls(e) : arrayPop(t.removed);
618
+ o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), vs(e) ? ms(e) : arrayPop(t.removed);
619
619
  } catch {
620
- us(a, e);
620
+ hs(a, e);
621
621
  }
622
622
  }
623
- hs(R.afterSanitizeAttributes, e, null);
624
- }, bs = function e(t) {
625
- let n = null, r = fs(t);
626
- for (hs(R.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) hs(R.uponSanitizeShadowNode, n, null), gs(n), ys(n), n.content instanceof a && e(n.content);
627
- hs(R.afterSanitizeShadowDOM, t, null);
623
+ bs(R.afterSanitizeAttributes, e, null);
624
+ }, Ts = function e(t) {
625
+ let n = null, r = _s(t);
626
+ for (bs(R.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) bs(R.uponSanitizeShadowNode, n, null), xs(n), ws(n), n.content instanceof a && e(n.content);
627
+ bs(R.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 (Jo = !e, Jo && (e = "<!-->"), typeof e != "string" && !ms(e)) if (typeof e.toString == "function") {
631
+ if ($o = !e, $o && (e = "<!-->"), typeof e != "string" && !ys(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 (Oo || as(n), t.removed = [], typeof e == "string" && (Io = !1), Io) {
635
+ if (No || us(n), t.removed = [], typeof e == "string" && (Vo = !1), Vo) {
636
636
  if (e.nodeName) {
637
637
  let t = Y(e.nodeName);
638
- if (!B[t] || vo[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
638
+ if (!B[t] || Co[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
639
639
  }
640
- } else if (e instanceof s) i = ds("<!---->"), 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 = gs("<!---->"), 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 (!Ao && !To && !Do && e.indexOf("<") === -1) return A && Mo ? A.createHTML(e) : e;
643
- if (i = ds(e), !i) return Ao ? null : Mo ? eo : "";
642
+ if (!Fo && !Ao && !Mo && e.indexOf("<") === -1) return A && Lo ? A.createHTML(e) : e;
643
+ if (i = gs(e), !i) return Fo ? null : Lo ? ao : "";
644
644
  }
645
- i && ko && ls(i.firstChild);
646
- let u = fs(Io ? e : i);
647
- for (; c = u.nextNode();) gs(c), ys(c), c.content instanceof a && bs(c.content);
648
- if (Io) return e;
649
- if (Ao) {
650
- if (jo) for (l = ro.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
645
+ i && Po && ms(i.firstChild);
646
+ let u = _s(Vo ? e : i);
647
+ for (; c = u.nextNode();) xs(c), ws(c), c.content instanceof a && Ts(c.content);
648
+ if (Vo) return e;
649
+ if (Fo) {
650
+ if (Io) for (l = co.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
651
651
  else l = i;
652
- return (V.shadowroot || V.shadowrootmode) && (l = ao.call(r, l, !0)), l;
652
+ return (V.shadowroot || V.shadowrootmode) && (l = uo.call(r, l, !0)), l;
653
653
  }
654
- let f = Do ? i.outerHTML : i.innerHTML;
655
- return Do && B["!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), To && arrayForEach([
656
- oo,
657
- so,
658
- co
654
+ let f = Mo ? i.outerHTML : i.innerHTML;
655
+ return Mo && B["!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), Ao && arrayForEach([
656
+ fo,
657
+ po,
658
+ mo
659
659
  ], (e) => {
660
660
  f = stringReplace(f, e, " ");
661
- }), A && Mo ? A.createHTML(f) : f;
661
+ }), A && Lo ? A.createHTML(f) : f;
662
662
  }, t.setConfig = function() {
663
- as(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Oo = !0;
663
+ us(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), No = !0;
664
664
  }, t.clearConfig = function() {
665
- ns = null, Oo = !1;
665
+ ss = null, No = !1;
666
666
  }, t.isValidAttribute = function(e, t, n) {
667
- return ns || as({}), _s(Y(e), Y(t), n);
667
+ return ss || us({}), Ss(Y(e), Y(t), n);
668
668
  }, t.addHook = function(e, t) {
669
669
  typeof t == "function" && arrayPush(R[e], t);
670
670
  }, t.removeHook = function(e, t) {
@@ -20157,14 +20157,14 @@ ${c}` : c;
20157
20157
  if (this.options.pedantic ? (f = 2, s = c.trimStart()) : u ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, s = c.slice(f), f += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
20158
20158
  let t = this.rules.other.nextBulletRegex(f), n = this.rules.other.hrRegex(f), i = this.rules.other.fencesBeginRegex(f), a = this.rules.other.headingBeginRegex(f), o = this.rules.other.htmlBeginRegex(f);
20159
20159
  for (; e;) {
20160
- let p = e.split("\n", 1)[0], Xa;
20161
- if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), Xa = l) : Xa = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
20162
- if (Xa.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + Xa.slice(f);
20160
+ let p = e.split("\n", 1)[0], to;
20161
+ if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), to = l) : to = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
20162
+ if (to.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + to.slice(f);
20163
20163
  else {
20164
20164
  if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
20165
20165
  s += "\n" + l;
20166
20166
  }
20167
- !u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c = Xa.slice(f);
20167
+ !u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c = to.slice(f);
20168
20168
  }
20169
20169
  }
20170
20170
  i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
@@ -21371,52 +21371,60 @@ function useDropdown() {
21371
21371
  if (!e) throw Error("useDropdown must be used inside Dropdown");
21372
21372
  return e;
21373
21373
  }
21374
- function Dropdown({ trigger: e, children: t, align: n = "start", disabled: r = !1 }) {
21375
- let [i, a] = useState(!1), o = useRef(null), s = useRef(null), c = useRef(null), [f, h] = useState(null);
21374
+ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1 }) {
21375
+ let [s, c] = useState(!1), f = useRef(null), h = useRef(null), g = useRef(null), [io, A] = useState(null);
21376
21376
  useLayoutEffect(() => {
21377
- if (!i || !o.current || !s.current) return;
21378
- let e = o.current.getBoundingClientRect(), t = s.current.getBoundingClientRect(), r = e.left;
21379
- n === "end" && (r = e.right - t.width), h({
21380
- top: e.bottom,
21381
- left: r
21382
- });
21383
- }, [i, n]);
21384
- function g() {
21385
- c.current &&= (clearTimeout(c.current), null), a(!0);
21377
+ if (!s || !f.current || !h.current) return;
21378
+ let e = f.current.getBoundingClientRect(), t = h.current.getBoundingClientRect(), o = e.left;
21379
+ n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
21380
+ let c;
21381
+ c = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => A({
21382
+ top: c,
21383
+ left: o
21384
+ }));
21385
+ }, [
21386
+ s,
21387
+ n,
21388
+ r,
21389
+ i,
21390
+ a
21391
+ ]);
21392
+ function ao() {
21393
+ g.current &&= (clearTimeout(g.current), null), c(!0);
21386
21394
  }
21387
- function $a() {
21388
- c.current = window.setTimeout(() => {
21389
- a(!1);
21395
+ function oo() {
21396
+ g.current = window.setTimeout(() => {
21397
+ c(!1);
21390
21398
  }, 120);
21391
21399
  }
21392
21400
  return useEffect(() => {
21393
21401
  function e(e) {
21394
21402
  let t = e.target;
21395
- o.current?.contains(t) || s.current?.contains(t) || a(!1);
21403
+ f.current?.contains(t) || h.current?.contains(t) || c(!1);
21396
21404
  }
21397
21405
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
21398
21406
  }, []), useEffect(() => () => {
21399
- c.current && clearTimeout(c.current);
21407
+ g.current && clearTimeout(g.current);
21400
21408
  }, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
21401
- value: { close: () => a(!1) },
21409
+ value: { close: () => c(!1) },
21402
21410
  children: [/* @__PURE__ */ jsx("div", {
21403
- ref: o,
21411
+ ref: f,
21404
21412
  className: "inline-flex",
21405
- onMouseEnter: g,
21406
- onMouseLeave: $a,
21407
- onClick: () => a((e) => !e),
21413
+ onMouseEnter: ao,
21414
+ onMouseLeave: oo,
21415
+ onClick: () => c((e) => !e),
21408
21416
  "aria-haspopup": "menu",
21409
- "aria-expanded": i,
21417
+ "aria-expanded": s,
21410
21418
  children: e
21411
- }), i && !r && createPortal(/* @__PURE__ */ jsx("div", {
21412
- ref: s,
21413
- onMouseEnter: g,
21414
- onMouseLeave: $a,
21419
+ }), s && !o && createPortal(/* @__PURE__ */ jsx("div", {
21420
+ ref: h,
21421
+ onMouseEnter: ao,
21422
+ onMouseLeave: oo,
21415
21423
  style: {
21416
21424
  position: "fixed",
21417
- top: f?.top ?? 0,
21418
- left: f?.left ?? 0,
21419
- visibility: f ? "visible" : "hidden",
21425
+ top: io?.top ?? 0,
21426
+ left: io?.left ?? 0,
21427
+ visibility: io ? "visible" : "hidden",
21420
21428
  zIndex: 1e3
21421
21429
  },
21422
21430
  children: t
@@ -21478,17 +21486,17 @@ function getVerticalAlign(e, t, n) {
21478
21486
  return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
21479
21487
  }
21480
21488
  function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
21481
- let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h, $a] = useState(null), A = () => {
21489
+ let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h, io] = useState(null), A = () => {
21482
21490
  s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
21483
21491
  f(!0);
21484
21492
  }, r);
21485
- }, eo = () => {
21493
+ }, ao = () => {
21486
21494
  s.current &&= (clearTimeout(s.current), null), f(!1);
21487
21495
  };
21488
21496
  return useLayoutEffect(() => {
21489
21497
  if (!c || !a.current || !o.current) return;
21490
21498
  let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
21491
- 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)), $a((e) => e && e.top === l && e.left === u ? e : {
21499
+ 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)), io((e) => e && e.top === l && e.left === u ? e : {
21492
21500
  top: l,
21493
21501
  left: u
21494
21502
  });
@@ -21498,9 +21506,9 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
21498
21506
  ref: a,
21499
21507
  className: "inline-flex",
21500
21508
  onMouseEnter: A,
21501
- onMouseLeave: eo,
21509
+ onMouseLeave: ao,
21502
21510
  onFocus: A,
21503
- onBlur: eo,
21511
+ onBlur: ao,
21504
21512
  children: e
21505
21513
  }), c && createPortal(/* @__PURE__ */ jsx("div", {
21506
21514
  ref: o,
@@ -22827,7 +22835,7 @@ function useToastTimers(e, t) {
22827
22835
  e,
22828
22836
  u,
22829
22837
  f
22830
- ]), Za = useCallback((e) => {
22838
+ ]), no = useCallback((e) => {
22831
22839
  i.current.delete(e), r((t) => {
22832
22840
  let n = new Map(t);
22833
22841
  return n.delete(e), n;
@@ -22849,21 +22857,21 @@ function useToastTimers(e, t) {
22849
22857
  remainingTimes: n,
22850
22858
  pauseAll: h,
22851
22859
  resumeAll: g,
22852
- cleanupTimer: Za
22860
+ cleanupTimer: no
22853
22861
  };
22854
22862
  }
22855
22863
  function Toaster() {
22856
- 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: Qa } = useToastTimers(e, a);
22864
+ 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: ro } = useToastTimers(e, a);
22857
22865
  useEffect(() => toastStore.subscribe(t), []);
22858
- let $a = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), A = useCallback((e) => {
22866
+ let io = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), A = useCallback((e) => {
22859
22867
  e.callbacks?.onOpen?.();
22860
- }, []), eo = useCallback((e, t) => {
22868
+ }, []), ao = useCallback((e, t) => {
22861
22869
  t === "manual" ? e.callbacks?.onClose?.() : e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
22862
22870
  }, []);
22863
22871
  useEffect(() => {
22864
22872
  let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
22865
22873
  o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
22866
- eo(e, a.current.get(e.id) ?? "timeout"), a.current.delete(e.id);
22874
+ ao(e, a.current.get(e.id) ?? "timeout"), a.current.delete(e.id);
22867
22875
  }), r((r) => {
22868
22876
  let i = r.map((e) => {
22869
22877
  let t = n.get(e.id);
@@ -22881,25 +22889,25 @@ function Toaster() {
22881
22889
  }, [
22882
22890
  e,
22883
22891
  A,
22884
- eo
22892
+ ao
22885
22893
  ]);
22886
- let to = useCallback((e) => {
22894
+ let oo = useCallback((e) => {
22887
22895
  r((t) => {
22888
22896
  let n = t.filter((t) => t.id !== e);
22889
22897
  return o.current = n, n;
22890
- }), Qa(e), toastStore.cleanup(e);
22891
- }, [Qa]), no = useCallback((e) => {
22898
+ }), ro(e), toastStore.cleanup(e);
22899
+ }, [ro]), so = useCallback((e) => {
22892
22900
  a.current.set(e, "manual"), toastStore.remove(e);
22893
22901
  }, []);
22894
- if (!$a) return null;
22895
- let ro = groupByPosition(n);
22896
- return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(ro).map(([e, t]) => /* @__PURE__ */ jsx("div", {
22902
+ if (!io) return null;
22903
+ let co = groupByPosition(n);
22904
+ return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(co).map(([e, t]) => /* @__PURE__ */ jsx("div", {
22897
22905
  className: cn("pointer-events-none fixed z-1000 flex flex-col items-end gap-2 p-4", POSITION_CLASSES[e]),
22898
22906
  children: t.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
22899
22907
  toast: e,
22900
22908
  remainingTime: c.get(e.id) ?? e.duration,
22901
- onExitComplete: to,
22902
- onClose: no,
22909
+ onExitComplete: oo,
22910
+ onClose: so,
22903
22911
  onHoverStart: u,
22904
22912
  onHoverEnd: f
22905
22913
  }, e.id))
@@ -23113,7 +23121,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23113
23121
  function O(e) {
23114
23122
  p(e), a?.(e);
23115
23123
  }
23116
- let $a = {
23124
+ let io = {
23117
23125
  fire: [{
23118
23126
  id: "fire",
23119
23127
  tooltip: "Mark as fire",
@@ -23194,7 +23202,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23194
23202
  }),
23195
23203
  /* @__PURE__ */ jsx("div", {
23196
23204
  className: "flex items-center divide-x divide-neutral-400-variant-1",
23197
- children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries($a).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23205
+ children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(io).map(([e, t]) => /* @__PURE__ */ jsx("div", {
23198
23206
  className: "flex items-center gap-2 px-1",
23199
23207
  children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
23200
23208
  content: e.tooltip,
@@ -23227,20 +23235,59 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
23227
23235
  }
23228
23236
  var filterButtonStyles = tv({
23229
23237
  slots: {
23230
- root: "inline-flex w-fit items-center gap-1 rounded-full border px-2 py-1 transition-colors",
23238
+ root: "inline-flex w-fit items-center gap-1 rounded-full border-[1.5px] px-2 py-1 transition-colors",
23231
23239
  label: "flex shrink-0 items-center gap-1 text-xs whitespace-nowrap"
23232
23240
  },
23233
- variants: { selected: {
23234
- false: {
23235
- root: "border-neutral-300 bg-white hover:border-neutral-500-variant-4 hover:bg-neutral-100",
23236
- label: "font-semibold text-neutral-800 opacity-80 group-hover:opacity-100"
23241
+ variants: {
23242
+ variant: {
23243
+ custom: {},
23244
+ fire: {},
23245
+ unread: {},
23246
+ insight: {},
23247
+ done: {}
23248
+ },
23249
+ selected: {
23250
+ false: {
23251
+ root: "border-neutral-300 bg-white hover:border-neutral-500-variant-4 hover:bg-neutral-100",
23252
+ label: "font-semibold text-neutral-800 opacity-80 group-hover:opacity-100"
23253
+ },
23254
+ true: {
23255
+ root: "bg-white hover:bg-white",
23256
+ label: "font-semibold text-neutral-900"
23257
+ }
23258
+ }
23259
+ },
23260
+ compoundVariants: [
23261
+ {
23262
+ variant: "custom",
23263
+ selected: !0,
23264
+ class: { root: "border-primary-400 hover:border-primary-400" }
23265
+ },
23266
+ {
23267
+ variant: "fire",
23268
+ selected: !0,
23269
+ class: { root: "border-tertiary-400 hover:border-tertiary-500" }
23237
23270
  },
23238
- true: {
23239
- root: "border-primary-400 bg-primary-light hover:border-primary-400",
23240
- label: "font-semibold text-neutral-900"
23271
+ {
23272
+ variant: "unread",
23273
+ selected: !0,
23274
+ class: { root: "border-primary-400 hover:border-primary-500" }
23275
+ },
23276
+ {
23277
+ variant: "insight",
23278
+ selected: !0,
23279
+ class: { root: "border-brand-primary-100 hover:border-brand-primary-200" }
23280
+ },
23281
+ {
23282
+ variant: "done",
23283
+ selected: !0,
23284
+ class: { root: "border-success-base hover:border-success-base" }
23241
23285
  }
23242
- } },
23243
- defaultVariants: { selected: !1 }
23286
+ ],
23287
+ defaultVariants: {
23288
+ variant: "custom",
23289
+ selected: !1
23290
+ }
23244
23291
  }), FILTER_BUTTON_META = {
23245
23292
  fire: {
23246
23293
  icon: FireIcon,
@@ -23263,7 +23310,7 @@ var filterButtonStyles = tv({
23263
23310
  iconColor: "text-success-base"
23264
23311
  }
23265
23312
  };
23266
- function renderIcon(e, t) {
23313
+ function renderIcon$1(e, t) {
23267
23314
  return typeof e == "function" ? /* @__PURE__ */ jsx(e, {
23268
23315
  size: 20,
23269
23316
  className: t
@@ -23273,7 +23320,10 @@ function renderIcon(e, t) {
23273
23320
  });
23274
23321
  }
23275
23322
  function FilterButton({ variant: e = "custom", label: t, count: n, selected: r = !1, icon: i, classNames: a, disabled: o, ...s }) {
23276
- let c = !!o, l = filterButtonStyles({ selected: !c && r }), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label, Xa = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
23323
+ let c = !!o, l = filterButtonStyles({
23324
+ variant: e,
23325
+ selected: !c && r
23326
+ }), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label, to = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
23277
23327
  return /* @__PURE__ */ jsxs(Button, {
23278
23328
  ...s,
23279
23329
  disabled: o,
@@ -23281,7 +23331,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
23281
23331
  className: cn("group", l.root(), c && "border-neutral-300 bg-white hover:border-neutral-300", a?.root),
23282
23332
  children: [f && /* @__PURE__ */ jsx("span", {
23283
23333
  className: cn("flex items-center", a?.icon),
23284
- children: renderIcon(f, cn("shrink-0", Xa))
23334
+ children: renderIcon$1(f, cn("shrink-0", to))
23285
23335
  }), p && /* @__PURE__ */ jsxs("span", {
23286
23336
  className: cn(l.label(), c && "font-medium text-neutral-400", a?.label),
23287
23337
  children: [/* @__PURE__ */ jsx("span", { children: p }), typeof n == "number" && n > 0 && /* @__PURE__ */ jsxs("span", {
@@ -23380,32 +23430,96 @@ var iconCountButtonStyles = tv({
23380
23430
  status: "active"
23381
23431
  }
23382
23432
  });
23383
- function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: a = "vertical", status: o = "active", alwaysShowCount: s = !1, classNames: c, ...l }) {
23384
- let u = iconCountButtonStyles({
23385
- variant: r,
23386
- orientation: a,
23387
- status: o
23433
+ function formatCount(e, t = 99) {
23434
+ return e > t ? `${t}+` : String(e);
23435
+ }
23436
+ function renderIcon(e, t) {
23437
+ return cloneElement(e, {
23438
+ size: e.props.size ?? 20,
23439
+ className: cn(t, e.props.className)
23388
23440
  });
23389
- function f(e, t = 99) {
23390
- return e > t ? `${t}+` : String(e);
23441
+ }
23442
+ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition: n, onMouseEnter: r, onMouseLeave: i, onToggle: a }) {
23443
+ let o = t && !e, s = e ? "Clear" : "Only", c = e ? "Reset state" : "Activate state";
23444
+ return createPortal(/* @__PURE__ */ jsx("div", {
23445
+ className: "flex",
23446
+ style: {
23447
+ position: "fixed",
23448
+ top: n.top,
23449
+ left: n.left,
23450
+ zIndex: 100
23451
+ },
23452
+ children: /* @__PURE__ */ jsx(InfoTooltip, {
23453
+ content: s,
23454
+ position: "right-end",
23455
+ children: /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx("div", {
23456
+ role: "button",
23457
+ tabIndex: 0,
23458
+ "aria-pressed": e,
23459
+ "aria-label": c,
23460
+ className: "flex size-5 cursor-pointer items-center justify-center rounded-full bg-white",
23461
+ onMouseEnter: r,
23462
+ onMouseLeave: i,
23463
+ onClick: a,
23464
+ children: /* @__PURE__ */ jsxs("div", {
23465
+ className: cn("flex size-4 items-center justify-center rounded-full border", e ? "border-tertiary-500" : "border-neutral-800"),
23466
+ children: [o && /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full bg-neutral-800" }), e && /* @__PURE__ */ jsx(CloseIcon, {
23467
+ size: 12,
23468
+ className: "text-tertiary-500"
23469
+ })]
23470
+ })
23471
+ }) })
23472
+ })
23473
+ }), document.body);
23474
+ }
23475
+ 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: f, classNames: h, ...g }) {
23476
+ let O = iconCountButtonStyles({
23477
+ variant: r,
23478
+ orientation: i,
23479
+ status: a
23480
+ }), io = useRef(null), [A, ao] = useState(!1), [oo, so] = useState(!1), [co, lo] = useState(l), [uo, R] = useState(null), fo = c ?? co, po = s && (A || oo || fo), mo = typeof n == "number" && n > 0 && (o || a === "active");
23481
+ function ho(e) {
23482
+ c === void 0 && lo(e), f?.(e);
23391
23483
  }
23392
- return /* @__PURE__ */ jsxs(Button, {
23393
- ...l,
23394
- className: cn(u.root(), c?.root),
23395
- children: [/* @__PURE__ */ jsx("div", {
23396
- className: cn(u.bubble(), c?.bubble),
23397
- children: cloneElement(e, {
23398
- size: e.props.size ?? 20,
23399
- className: cn(u.icon(), e.props.className)
23400
- })
23484
+ return useLayoutEffect(() => {
23485
+ if (!po || !io.current) return;
23486
+ function e() {
23487
+ let e = io.current?.getBoundingClientRect();
23488
+ e && R({
23489
+ top: e.top - 8,
23490
+ left: e.right - 12
23491
+ });
23492
+ }
23493
+ return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
23494
+ window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
23495
+ };
23496
+ }, [po]), /* @__PURE__ */ jsxs(Button, {
23497
+ ...g,
23498
+ className: cn(O.root(), h?.root),
23499
+ onMouseEnter: () => ao(!0),
23500
+ onMouseLeave: () => ao(!1),
23501
+ children: [/* @__PURE__ */ jsxs("div", {
23502
+ className: "relative",
23503
+ children: [/* @__PURE__ */ jsx("div", {
23504
+ ref: io,
23505
+ className: cn(O.bubble(), h?.bubble),
23506
+ children: renderIcon(e, O.icon())
23507
+ }), po && uo && typeof document < "u" && ToggleControlPortal({
23508
+ isPressed: fo,
23509
+ isPortalHovered: oo,
23510
+ portalPosition: uo,
23511
+ onMouseEnter: () => so(!0),
23512
+ onMouseLeave: () => so(!1),
23513
+ onToggle: () => ho(!fo)
23514
+ })]
23401
23515
  }), /* @__PURE__ */ jsxs("div", {
23402
- className: cn(u.label(), c?.label),
23403
- children: [/* @__PURE__ */ jsx("span", { children: t }), typeof n == "number" && n > 0 && (s || o === "active") && /* @__PURE__ */ jsxs("span", {
23516
+ className: cn(O.label(), h?.label),
23517
+ children: [/* @__PURE__ */ jsx("span", { children: t }), mo && /* @__PURE__ */ jsxs("span", {
23404
23518
  "aria-label": `${n} items`,
23405
- className: cn(u.count(), c?.count),
23519
+ className: cn(O.count(), h?.count),
23406
23520
  children: [
23407
23521
  "(",
23408
- f(n),
23522
+ formatCount(n),
23409
23523
  ")"
23410
23524
  ]
23411
23525
  })]
@@ -23460,7 +23574,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23460
23574
  t,
23461
23575
  n
23462
23576
  ]);
23463
- let $a = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
23577
+ let io = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
23464
23578
  function A(t) {
23465
23579
  let o = t.getMonth(), s = t.getFullYear();
23466
23580
  if ((o !== g.month || s !== g.year) && O({
@@ -23478,7 +23592,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23478
23592
  }), a());
23479
23593
  }
23480
23594
  }
23481
- function eo() {
23595
+ function ao() {
23482
23596
  O((e) => e.month === 0 ? {
23483
23597
  year: e.year - 1,
23484
23598
  month: 11
@@ -23487,7 +23601,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23487
23601
  month: e.month - 1
23488
23602
  });
23489
23603
  }
23490
- function to() {
23604
+ function oo() {
23491
23605
  O((e) => e.month === 11 ? {
23492
23606
  year: e.year + 1,
23493
23607
  month: 0
@@ -23496,7 +23610,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23496
23610
  month: e.month + 1
23497
23611
  });
23498
23612
  }
23499
- let no = getWeekdays();
23613
+ let so = getWeekdays();
23500
23614
  return /* @__PURE__ */ jsxs("div", {
23501
23615
  className: "mt-1 w-fit rounded-lg border border-neutral-400 bg-white p-2 shadow-lg",
23502
23616
  children: [
@@ -23508,7 +23622,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23508
23622
  direction: "left",
23509
23623
  size: 20
23510
23624
  }),
23511
- onClick: eo,
23625
+ onClick: ao,
23512
23626
  className: "hover:opacity-60",
23513
23627
  "aria-label": "Previous month"
23514
23628
  }),
@@ -23525,7 +23639,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23525
23639
  direction: "right",
23526
23640
  size: 20
23527
23641
  }),
23528
- onClick: to,
23642
+ onClick: oo,
23529
23643
  className: "hover:opacity-60",
23530
23644
  "aria-label": "Next month"
23531
23645
  })
@@ -23533,17 +23647,17 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23533
23647
  }),
23534
23648
  /* @__PURE__ */ jsx("div", {
23535
23649
  className: "mb-2 grid grid-cols-7",
23536
- children: no.map((e) => /* @__PURE__ */ jsx("div", {
23650
+ children: so.map((e) => /* @__PURE__ */ jsx("div", {
23537
23651
  className: "flex items-center justify-center p-0.5 text-[9px] font-bold text-neutral-900",
23538
23652
  children: e
23539
23653
  }, e))
23540
23654
  }),
23541
23655
  /* @__PURE__ */ jsx("div", {
23542
23656
  className: "grid grid-cols-7",
23543
- children: $a.map(({ day: r, date: i, isCurrentMonth: a }) => {
23544
- let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), Xa = f && isSameDay(i, f), h = u, g = s;
23657
+ children: io.map(({ day: r, date: i, isCurrentMonth: a }) => {
23658
+ let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), to = f && isSameDay(i, f), h = u, g = s;
23545
23659
  e === "range" && u && !f && s && !isDateBefore(s, u) ? (h = u, g = s) : (h = null, g = null);
23546
- let Qa = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, h, g)), O = l || p || Xa;
23660
+ let ro = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, h, g)), O = l || p || to;
23547
23661
  return /* @__PURE__ */ jsx(Button, {
23548
23662
  type: "button",
23549
23663
  onClick: () => A(i),
@@ -23557,7 +23671,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
23557
23671
  "aria-label": `Select ${formatDate(i)}`,
23558
23672
  "aria-selected": O || void 0,
23559
23673
  children: /* @__PURE__ */ jsx("div", {
23560
- className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", O && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500", Qa && !O && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !O && !Qa && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !O && !Qa && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
23674
+ className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", O && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500", ro && !O && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !O && !ro && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !O && !ro && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
23561
23675
  children: r
23562
23676
  })
23563
23677
  }, `${i.getFullYear()}-${i.getMonth()}-${r}`);
@@ -23622,11 +23736,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
23622
23736
  function h(t) {
23623
23737
  e === "single" && (u || s(t), r?.(t));
23624
23738
  }
23625
- function Qa(t) {
23739
+ function ro(t) {
23626
23740
  e === "range" && (u || l(t), r?.(t));
23627
23741
  }
23628
23742
  function O() {
23629
- e === "single" ? h(null) : Qa({
23743
+ e === "single" ? h(null) : ro({
23630
23744
  startDate: null,
23631
23745
  endDate: null
23632
23746
  });
@@ -23644,7 +23758,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
23644
23758
  selectedDate: f,
23645
23759
  selectedRange: p,
23646
23760
  onDateSelect: h,
23647
- onRangeSelect: Qa
23761
+ onRangeSelect: ro
23648
23762
  })
23649
23763
  }) });
23650
23764
  }
@@ -23744,7 +23858,72 @@ var EVENT_ACTION_CONFIG = {
23744
23858
  className: "text-primary-500"
23745
23859
  })
23746
23860
  }
23747
- };
23861
+ }, eventCardStyles = tv({
23862
+ base: "w-full rounded-lg border-[1.5px] bg-white-variant-5 p-4",
23863
+ variants: {
23864
+ tone: {
23865
+ default: "hover:bg-primary-light",
23866
+ done: "hover:bg-success-base-variant-1",
23867
+ priority: "hover:bg-tertiary-500-variant-4"
23868
+ },
23869
+ state: {
23870
+ unread: "",
23871
+ read: "",
23872
+ selected: ""
23873
+ },
23874
+ density: {
23875
+ normal: EVENT_CARD_HEIGHT_SIZE.normal.style,
23876
+ compact: EVENT_CARD_HEIGHT_SIZE.compact.style
23877
+ }
23878
+ },
23879
+ compoundVariants: [
23880
+ {
23881
+ tone: "default",
23882
+ state: "unread",
23883
+ class: "border-primary-400"
23884
+ },
23885
+ {
23886
+ tone: "default",
23887
+ state: "read",
23888
+ class: "border-neutral-400"
23889
+ },
23890
+ {
23891
+ tone: "default",
23892
+ state: "selected",
23893
+ class: "border-primary-500 bg-primary-light"
23894
+ },
23895
+ {
23896
+ tone: "done",
23897
+ state: "unread",
23898
+ class: "border-primary-400"
23899
+ },
23900
+ {
23901
+ tone: "done",
23902
+ state: "read",
23903
+ class: "border-success-base-variant-2"
23904
+ },
23905
+ {
23906
+ tone: "done",
23907
+ state: "selected",
23908
+ class: "border-success-base bg-success-base-variant-1"
23909
+ },
23910
+ {
23911
+ tone: "priority",
23912
+ state: "unread",
23913
+ class: "border-tertiary-500-variant-2"
23914
+ },
23915
+ {
23916
+ tone: "priority",
23917
+ state: "read",
23918
+ class: "border-tertiary-500-variant-3"
23919
+ },
23920
+ {
23921
+ tone: "priority",
23922
+ state: "selected",
23923
+ class: "border-tertiary-500-variant-2 bg-tertiary-500-variant-4"
23924
+ }
23925
+ ]
23926
+ });
23748
23927
  function EventCheckbox({ checked: e, onCheckedChange: t }) {
23749
23928
  return /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(Checkbox, {
23750
23929
  checked: e,
@@ -23782,12 +23961,16 @@ function EventActionsList({ actions: e, className: t }) {
23782
23961
  }) })
23783
23962
  });
23784
23963
  }
23785
- 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: Xa = {}, actions: h = {}, density: g = "normal", className: O, style: $a }) {
23964
+ 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: to = {}, actions: h = {}, density: g = "normal", className: O, style: io, isPriority: A, isDone: ao }) {
23786
23965
  return /* @__PURE__ */ jsx(Card, {
23787
23966
  as: Pressable,
23788
23967
  onPress: u,
23789
- className: cn("w-full rounded-lg border-[1.5px] border-primary-400 bg-white-variant-5 p-4 hover:bg-primary-light", c && "border-neutral-400", l && "border-primary-500 bg-primary-light", g === "normal" ? `${EVENT_CARD_HEIGHT_SIZE.normal.style}` : `${EVENT_CARD_HEIGHT_SIZE.compact.style}`, O),
23790
- style: $a,
23968
+ className: cn(eventCardStyles({
23969
+ tone: A ? "priority" : ao ? "done" : "default",
23970
+ state: l ? "selected" : c ? "read" : "unread",
23971
+ density: g
23972
+ }), O),
23973
+ style: io,
23791
23974
  "data-service": t,
23792
23975
  children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
23793
23976
  className: "gap-x-2 gap-y-1",
@@ -23824,7 +24007,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
23824
24007
  }),
23825
24008
  /* @__PURE__ */ jsxs(CardFooter, {
23826
24009
  className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1",
23827
- children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: Xa }), /* @__PURE__ */ jsx(EventActionsList, {
24010
+ children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: to }), /* @__PURE__ */ jsx(EventActionsList, {
23828
24011
  actions: h,
23829
24012
  className: "col-start-2 justify-self-end"
23830
24013
  })]
@@ -23843,7 +24026,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
23843
24026
  children: [
23844
24027
  e,
23845
24028
  /* @__PURE__ */ jsx(EventStatusesList, {
23846
- statusBadges: Xa,
24029
+ statusBadges: to,
23847
24030
  density: g
23848
24031
  }),
23849
24032
  /* @__PURE__ */ jsxs("div", {
@@ -23946,13 +24129,17 @@ function EventDetailSummary({ summary: e }) {
23946
24129
  })]
23947
24130
  });
23948
24131
  }
23949
- function EventDetailContentHeader({ summary: e, priorityText: t, children: n, className: r }) {
24132
+ function EventDetailContentHeader({ summary: e, priorityText: t, highlightPriority: n = !1, children: r, className: i }) {
23950
24133
  return /* @__PURE__ */ jsxs("div", {
23951
- className: cn("flex flex-col", r),
23952
- children: [t != null && /* @__PURE__ */ jsx(EventDetailPriority, { priorityText: t }), /* @__PURE__ */ jsxs("div", {
23953
- className: "flex flex-col gap-4 p-4",
23954
- children: [e != null && /* @__PURE__ */ jsx(EventDetailSummary, { summary: e }), n]
23955
- })]
24134
+ className: cn("flex flex-col", n && "relative", i),
24135
+ children: [
24136
+ n && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 h-full w-1 bg-tertiary-500-variant-2 z-10" }),
24137
+ t != null && /* @__PURE__ */ jsx(EventDetailPriority, { priorityText: t }),
24138
+ /* @__PURE__ */ jsxs("div", {
24139
+ className: "flex flex-col gap-4 p-4",
24140
+ children: [e != null && /* @__PURE__ */ jsx(EventDetailSummary, { summary: e }), r]
24141
+ })
24142
+ ]
23956
24143
  });
23957
24144
  }
23958
24145
  function EventDetailContentCalendar({ detail: { summary: e, body: t, priorityText: n, from: r, to: i, link: a, location: o }, className: s }) {
@@ -23995,6 +24182,7 @@ function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText:
23995
24182
  return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
23996
24183
  summary: e,
23997
24184
  priorityText: n,
24185
+ highlightPriority: !!n,
23998
24186
  className: s,
23999
24187
  children: [/* @__PURE__ */ jsx(EventDetailContentEmailDetails, {
24000
24188
  subject: r,
@@ -24336,10 +24524,11 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
24336
24524
  ]
24337
24525
  })] });
24338
24526
  }
24339
- 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: Xa }, className: h }) {
24527
+ 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: to }, className: h }) {
24340
24528
  return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
24341
24529
  summary: e,
24342
24530
  priorityText: n,
24531
+ highlightPriority: !!n,
24343
24532
  className: h,
24344
24533
  children: [
24345
24534
  /* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
@@ -24353,7 +24542,7 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
24353
24542
  reporter: u,
24354
24543
  team: f,
24355
24544
  location: p,
24356
- related: Xa
24545
+ related: to
24357
24546
  }),
24358
24547
  /* @__PURE__ */ jsx("h2", {
24359
24548
  className: "px-4 text-sm font-bold text-neutral-900",
@@ -24367,10 +24556,10 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
24367
24556
  });
24368
24557
  }
24369
24558
  function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, timestamp: a, isPriority: o, isOpen: s, isFirstEvent: c, isSingleEvent: l, className: u }) {
24370
- return /* @__PURE__ */ jsx("div", {
24371
- className: cn("flex h-14 w-full items-center bg-white px-4 py-2", u),
24559
+ return /* @__PURE__ */ jsxs("div", {
24560
+ className: cn("flex h-14 w-full items-center bg-white px-4 py-2", o && "relative", u),
24372
24561
  "data-priority": o,
24373
- children: /* @__PURE__ */ jsxs("div", {
24562
+ children: [o && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 z-10 h-full w-1 bg-tertiary-500-variant-2" }), /* @__PURE__ */ jsxs("div", {
24374
24563
  className: "flex w-full items-center gap-4",
24375
24564
  children: [
24376
24565
  c && /* @__PURE__ */ jsx(IconButton, {
@@ -24432,7 +24621,7 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
24432
24621
  })]
24433
24622
  })
24434
24623
  ]
24435
- })
24624
+ })]
24436
24625
  });
24437
24626
  }
24438
24627
  function EventDetailSkeleton({ className: e }) {
@@ -24558,6 +24747,16 @@ function EventDetail({ events: e, expandedEventIndex: t }) {
24558
24747
  }) })
24559
24748
  });
24560
24749
  }
24750
+ const EventEmptyState = ({ title: e, description: t }) => /* @__PURE__ */ jsxs("div", {
24751
+ className: "flex w-full flex-1 flex-col items-center justify-center gap-2 p-4",
24752
+ children: [/* @__PURE__ */ jsx("h3", {
24753
+ className: "text-sm leading-[1.3] font-medium text-neutral-900",
24754
+ children: e
24755
+ }), /* @__PURE__ */ jsx("p", {
24756
+ className: "w-full text-center text-xs leading-[1.3] font-normal text-neutral-600",
24757
+ children: t
24758
+ })]
24759
+ });
24561
24760
  function FilterBarSkeleton({ itemCount: e = 3, className: t }) {
24562
24761
  return /* @__PURE__ */ jsx("div", {
24563
24762
  className: cn("flex flex-wrap items-center gap-2", t),
@@ -24651,22 +24850,23 @@ function IntegrationBarSkeleton({ orientation: e = "vertical", itemCount: t = 3,
24651
24850
  });
24652
24851
  }
24653
24852
  function IntegrationBar({ orientation: e = "vertical", children: t, onAddMore: n, className: r }) {
24654
- return /* @__PURE__ */ jsx("div", {
24655
- className: cn("size-full", e === "vertical" ? "overflow-x-hidden" : "overflow-y-hidden"),
24656
- children: /* @__PURE__ */ jsxs("div", {
24657
- className: cn("grid h-full w-full place-items-center gap-4", e === "vertical" ? "grid-cols-1" : "auto-cols-max grid-flow-col", r),
24658
- children: [
24659
- t.map((e) => cloneElement(e, {})),
24660
- /* @__PURE__ */ jsx(Divider, { orientation: e === "vertical" ? "horizontal" : "vertical" }),
24661
- /* @__PURE__ */ jsx(IconCountButton, {
24662
- icon: /* @__PURE__ */ jsx(AddIcon, { size: 24 }),
24663
- label: "Add",
24664
- onClick: n,
24665
- variant: "minimal",
24666
- orientation: e
24667
- })
24668
- ]
24669
- })
24853
+ return /* @__PURE__ */ jsxs("div", {
24854
+ className: cn("flex size-full min-h-0 min-w-0", e === "vertical" ? "flex-col items-center" : "flex-row items-center", r),
24855
+ children: [
24856
+ /* @__PURE__ */ jsx("div", {
24857
+ className: cn("grid min-h-0 min-w-0 place-items-center", e === "vertical" ? "w-full flex-1 grid-cols-1 overflow-x-hidden overflow-y-auto" : "h-full flex-1 auto-cols-max grid-flow-col overflow-x-auto overflow-y-hidden"),
24858
+ children: t.map((t) => cloneElement(t, { classNames: { root: e === "vertical" ? "py-2" : "px-2" } }))
24859
+ }),
24860
+ /* @__PURE__ */ jsx(Divider, { orientation: e === "vertical" ? "horizontal" : "vertical" }),
24861
+ /* @__PURE__ */ jsx(IconCountButton, {
24862
+ icon: /* @__PURE__ */ jsx(AddIcon, { size: 24 }),
24863
+ label: "Add",
24864
+ onClick: n,
24865
+ variant: "minimal",
24866
+ orientation: e,
24867
+ classNames: { root: e === "vertical" ? "py-2" : "px-2" }
24868
+ })
24869
+ ]
24670
24870
  });
24671
24871
  }
24672
24872
  function IntegrationItemSkeleton() {
@@ -24964,6 +25164,6 @@ function QtaloImage({ size: e = 40, className: t, ...n }) {
24964
25164
  }) })]
24965
25165
  });
24966
25166
  }
24967
- export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireIcon, GmailIcon, GoogleCalendarIcon, Icon, IconButton, IconCountButton, IconCountButtonSkeleton, InfoTooltip, Input, InsightIcon, IntegrationBar, IntegrationBarSkeleton, IntegrationItem, IntegrationItemSkeleton, IntegrationsCard, JiraIcon, LightIcon, LogoIcon, MinusIcon, MoreIcon, NormalDensityIcon, NotFireIcon, OutlookCalendarIcon, OutlookIcon, Pressable, QtaloImage, ReadIcon, RichContent, SearchIcon, SearchInput, Skeleton, SlackIcon, StatusBadge, StopPropagation, SummaryIcon, SystemIcon, TeamsIcon, Toaster, Tooltip, UnreadIcon, capitalize, cn, colors, formatDate, formatDateRange, formatTimestamp, generateCalendarDays, getDaysInMonth, getFirstDayOfMonth, getInitials, getMonthName, getWeekdays, isDateBefore, isDateInRange, isSameDay, isToday, normalizeContent, parseDate, pickColorFromPalette, stringHash, toMondayBased, toast, toastStore, useAccordion, useDropdown, useLongPress };
25167
+ export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, EventEmptyState, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireIcon, GmailIcon, GoogleCalendarIcon, Icon, IconButton, IconCountButton, IconCountButtonSkeleton, InfoTooltip, Input, InsightIcon, IntegrationBar, IntegrationBarSkeleton, IntegrationItem, IntegrationItemSkeleton, IntegrationsCard, JiraIcon, LightIcon, LogoIcon, MinusIcon, MoreIcon, NormalDensityIcon, NotFireIcon, OutlookCalendarIcon, OutlookIcon, Pressable, QtaloImage, ReadIcon, RichContent, SearchIcon, SearchInput, Skeleton, SlackIcon, StatusBadge, StopPropagation, SummaryIcon, SystemIcon, TeamsIcon, Toaster, Tooltip, UnreadIcon, capitalize, cn, colors, formatDate, formatDateRange, formatTimestamp, generateCalendarDays, getDaysInMonth, getFirstDayOfMonth, getInitials, getMonthName, getWeekdays, isDateBefore, isDateInRange, isSameDay, isToday, normalizeContent, parseDate, pickColorFromPalette, stringHash, toMondayBased, toast, toastStore, useAccordion, useDropdown, useLongPress };
24968
25168
 
24969
25169
  //# sourceMappingURL=index.js.map