@qtalo/qt-ui-library 0.1.14 → 0.1.16
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.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +21 -4
- package/dist/index.js +278 -237
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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:
|
|
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: lo } = e, h = c.prototype, g = lookupGetter(h, "cloneNode"), uo = lookupGetter(h, "remove"), fo = lookupGetter(h, "nextSibling"), O = lookupGetter(h, "childNodes"), A = 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
|
|
335
|
-
t.isSupported = typeof entries == "function" && typeof
|
|
336
|
-
let { MUSTACHE_EXPR:
|
|
334
|
+
let R, po = "", { implementation: mo, createNodeIterator: ho, createDocumentFragment: go, getElementsByTagName: _o } = n, { importNode: vo } = r, yo = _createHooksMap();
|
|
335
|
+
t.isSupported = typeof entries == "function" && typeof A == "function" && mo && mo.createHTMLDocument !== void 0;
|
|
336
|
+
let { MUSTACHE_EXPR: bo, ERB_EXPR: xo, TMPLIT_EXPR: So, DATA_ATTR: Co, ARIA_ATTR: wo, IS_SCRIPT_OR_DATA: To, ATTR_WHITESPACE: Eo, CUSTOM_ELEMENT: Do } = EXPRESSIONS, { IS_ALLOWED_URI: Oo } = EXPRESSIONS, B = null, ko = addToSet({}, [
|
|
337
337
|
...html$1,
|
|
338
338
|
...svg$1,
|
|
339
339
|
...svgFilters,
|
|
340
340
|
...mathMl$1,
|
|
341
341
|
...text
|
|
342
|
-
]), V = null,
|
|
342
|
+
]), V = null, Ao = 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
|
-
})),
|
|
366
|
+
})), jo = null, Mo = null, No = 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
|
-
})),
|
|
379
|
+
})), Po = !0, Fo = !0, Io = !1, Lo = !0, Ro = !1, zo = !0, Bo = !1, Vo = !1, Ho = !1, Uo = !1, Wo = !1, Go = !1, Ko = !0, qo = !1, Jo = !0, Yo = !1, Xo = {}, Zo = null, Qo = 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
|
-
]),
|
|
405
|
+
]), $o = null, es = addToSet({}, [
|
|
406
406
|
"audio",
|
|
407
407
|
"video",
|
|
408
408
|
"img",
|
|
409
409
|
"source",
|
|
410
410
|
"image",
|
|
411
411
|
"track"
|
|
412
|
-
]),
|
|
412
|
+
]), ts = null, ns = 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
|
-
]),
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
], stringToString),
|
|
427
|
+
]), rs = "http://www.w3.org/1998/Math/MathML", is = "http://www.w3.org/2000/svg", as = "http://www.w3.org/1999/xhtml", os = as, ss = !1, cs = null, ls = addToSet({}, [
|
|
428
|
+
rs,
|
|
429
|
+
is,
|
|
430
|
+
as
|
|
431
|
+
], stringToString), us = addToSet({}, [
|
|
432
432
|
"mi",
|
|
433
433
|
"mo",
|
|
434
434
|
"mn",
|
|
435
435
|
"ms",
|
|
436
436
|
"mtext"
|
|
437
|
-
]),
|
|
437
|
+
]), ds = addToSet({}, ["annotation-xml"]), fs = addToSet({}, [
|
|
438
438
|
"title",
|
|
439
439
|
"style",
|
|
440
440
|
"font",
|
|
441
441
|
"a",
|
|
442
442
|
"script"
|
|
443
|
-
]),
|
|
443
|
+
]), ps = null, ms = ["application/xhtml+xml", "text/html"], Y = null, hs = null, gs = n.createElement("form"), _s = function(e) {
|
|
444
444
|
return e instanceof RegExp || e instanceof Function;
|
|
445
|
-
},
|
|
445
|
+
}, vs = function() {
|
|
446
446
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
447
|
-
if (!(
|
|
448
|
-
if ((!e || typeof e != "object") && (e = {}), e = clone(e),
|
|
447
|
+
if (!(hs && hs === e)) {
|
|
448
|
+
if ((!e || typeof e != "object") && (e = {}), e = clone(e), ps = ms.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = ps === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : ko, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : Ao, cs = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : ls, ts = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(ns), e.ADD_URI_SAFE_ATTR, Y) : ns, $o = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(es), e.ADD_DATA_URI_TAGS, Y) : es, Zo = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : Qo, jo = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), Mo = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Xo = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Po = e.ALLOW_ARIA_ATTR !== !1, Fo = e.ALLOW_DATA_ATTR !== !1, Io = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Lo = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ro = e.SAFE_FOR_TEMPLATES || !1, zo = e.SAFE_FOR_XML !== !1, Bo = e.WHOLE_DOCUMENT || !1, Uo = e.RETURN_DOM || !1, Wo = e.RETURN_DOM_FRAGMENT || !1, Go = e.RETURN_TRUSTED_TYPE || !1, Ho = e.FORCE_BODY || !1, Ko = e.SANITIZE_DOM !== !1, qo = e.SANITIZE_NAMED_PROPS || !1, Jo = e.KEEP_CONTENT !== !1, Yo = e.IN_PLACE || !1, Oo = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, os = e.NAMESPACE || as, us = e.MATHML_TEXT_INTEGRATION_POINTS || us, ds = e.HTML_INTEGRATION_POINTS || ds, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && _s(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && _s(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), Ro && (Fo = !1), Wo && (Uo = !0), Xo && (B = addToSet({}, text), V = [], Xo.html === !0 && (addToSet(B, html$1), addToSet(V, html)), Xo.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), Xo.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), Xo.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? No.tagCheck = e.ADD_TAGS : (B === ko && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? No.attributeCheck = e.ADD_ATTR : (V === Ao && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(ts, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Zo === Qo && (Zo = clone(Zo)), addToSet(Zo, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Zo === Qo && (Zo = clone(Zo)), addToSet(Zo, e.ADD_FORBID_CONTENTS, Y)), Jo && (B["#text"] = !0), Bo && addToSet(B, [
|
|
449
449
|
"html",
|
|
450
450
|
"head",
|
|
451
451
|
"body"
|
|
452
|
-
]), B.table && (addToSet(B, ["tbody"]), delete
|
|
452
|
+
]), B.table && (addToSet(B, ["tbody"]), delete jo.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
|
-
|
|
456
|
-
} else
|
|
457
|
-
freeze && freeze(e),
|
|
455
|
+
R = e.TRUSTED_TYPES_POLICY, po = R.createHTML("");
|
|
456
|
+
} else R === void 0 && (R = _createTrustedTypesPolicy(lo, i)), R !== null && typeof po == "string" && (po = R.createHTML(""));
|
|
457
|
+
freeze && freeze(e), hs = e;
|
|
458
458
|
}
|
|
459
|
-
},
|
|
459
|
+
}, ys = addToSet({}, [
|
|
460
460
|
...svg$1,
|
|
461
461
|
...svgFilters,
|
|
462
462
|
...svgDisallowed
|
|
463
|
-
]),
|
|
464
|
-
let t =
|
|
463
|
+
]), bs = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), xs = function(e) {
|
|
464
|
+
let t = A(e);
|
|
465
465
|
(!t || !t.tagName) && (t = {
|
|
466
|
-
namespaceURI:
|
|
466
|
+
namespaceURI: os,
|
|
467
467
|
tagName: "template"
|
|
468
468
|
});
|
|
469
469
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
470
|
-
return
|
|
471
|
-
},
|
|
470
|
+
return cs[e.namespaceURI] ? e.namespaceURI === is ? t.namespaceURI === as ? n === "svg" : t.namespaceURI === rs ? n === "svg" && (r === "annotation-xml" || us[r]) : !!ys[n] : e.namespaceURI === rs ? t.namespaceURI === as ? n === "math" : t.namespaceURI === is ? n === "math" && ds[r] : !!bs[n] : e.namespaceURI === as ? t.namespaceURI === is && !ds[r] || t.namespaceURI === rs && !us[r] ? !1 : !bs[n] && (fs[n] || !ys[n]) : !!(ps === "application/xhtml+xml" && cs[e.namespaceURI]) : !1;
|
|
471
|
+
}, Ss = function(e) {
|
|
472
472
|
arrayPush(t.removed, { element: e });
|
|
473
473
|
try {
|
|
474
|
-
|
|
474
|
+
A(e).removeChild(e);
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
uo(e);
|
|
477
477
|
}
|
|
478
|
-
},
|
|
478
|
+
}, Cs = 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 (
|
|
491
|
-
|
|
490
|
+
if (n.removeAttribute(e), e === "is") if (Uo || Wo) try {
|
|
491
|
+
Ss(n);
|
|
492
492
|
} catch {}
|
|
493
493
|
else try {
|
|
494
494
|
n.setAttribute(e, "");
|
|
495
495
|
} catch {}
|
|
496
|
-
},
|
|
496
|
+
}, ws = function(e) {
|
|
497
497
|
let t = null, r = null;
|
|
498
|
-
if (
|
|
498
|
+
if (Ho) 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
|
-
|
|
504
|
-
let i =
|
|
505
|
-
if (
|
|
506
|
-
t = new p().parseFromString(i,
|
|
503
|
+
ps === "application/xhtml+xml" && os === as && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
504
|
+
let i = R ? R.createHTML(e) : e;
|
|
505
|
+
if (os === as) try {
|
|
506
|
+
t = new p().parseFromString(i, ps);
|
|
507
507
|
} catch {}
|
|
508
508
|
if (!t || !t.documentElement) {
|
|
509
|
-
t =
|
|
509
|
+
t = mo.createDocument(os, "template", null);
|
|
510
510
|
try {
|
|
511
|
-
t.documentElement.innerHTML =
|
|
511
|
+
t.documentElement.innerHTML = ss ? po : 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),
|
|
516
|
-
},
|
|
517
|
-
return
|
|
518
|
-
},
|
|
515
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), os === as ? _o.call(t, Bo ? "html" : "body")[0] : Bo ? t.documentElement : a;
|
|
516
|
+
}, Ts = function(e) {
|
|
517
|
+
return ho.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
518
|
+
}, Es = function(e) {
|
|
519
519
|
return e instanceof f && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
520
|
-
},
|
|
520
|
+
}, Ds = function(e) {
|
|
521
521
|
return typeof s == "function" && e instanceof s;
|
|
522
522
|
};
|
|
523
|
-
function
|
|
523
|
+
function Os(e, n, r) {
|
|
524
524
|
arrayForEach(e, (e) => {
|
|
525
|
-
e.call(t, n, r,
|
|
525
|
+
e.call(t, n, r, hs);
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
let
|
|
528
|
+
let ks = function(e) {
|
|
529
529
|
let n = null;
|
|
530
|
-
if (
|
|
530
|
+
if (Os(yo.beforeSanitizeElements, e, null), Es(e)) return Ss(e), !0;
|
|
531
531
|
let r = Y(e.nodeName);
|
|
532
|
-
if (
|
|
532
|
+
if (Os(yo.uponSanitizeElement, e, {
|
|
533
533
|
tagName: r,
|
|
534
534
|
allowedTags: B
|
|
535
|
-
}),
|
|
536
|
-
if (!(
|
|
537
|
-
if (!
|
|
538
|
-
if (
|
|
539
|
-
let t =
|
|
535
|
+
}), zo && e.hasChildNodes() && !Ds(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || zo && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return Ss(e), !0;
|
|
536
|
+
if (!(No.tagCheck instanceof Function && No.tagCheck(r)) && (!B[r] || jo[r])) {
|
|
537
|
+
if (!jo[r] && js(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
|
|
538
|
+
if (Jo && !Zo[r]) {
|
|
539
|
+
let t = A(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,
|
|
544
|
+
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, fo(e));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
return
|
|
548
|
+
return Ss(e), !0;
|
|
549
549
|
}
|
|
550
|
-
return e instanceof c && !
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
return e instanceof c && !xs(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Ss(e), !0) : (Ro && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
|
|
551
|
+
bo,
|
|
552
|
+
xo,
|
|
553
|
+
So
|
|
554
554
|
], (e) => {
|
|
555
555
|
n = stringReplace(n, e, " ");
|
|
556
|
-
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)),
|
|
557
|
-
},
|
|
558
|
-
if (
|
|
559
|
-
if (!(
|
|
560
|
-
if (!V[t] ||
|
|
561
|
-
if (!(
|
|
562
|
-
} else if (!
|
|
556
|
+
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), Os(yo.afterSanitizeElements, e, null), !1);
|
|
557
|
+
}, As = function(e, t, r) {
|
|
558
|
+
if (Ko && (t === "id" || t === "name") && (r in n || r in gs)) return !1;
|
|
559
|
+
if (!(Fo && !Mo[t] && regExpTest(Co, t)) && !(Po && regExpTest(wo, t)) && !(No.attributeCheck instanceof Function && No.attributeCheck(t, e))) {
|
|
560
|
+
if (!V[t] || Mo[t]) {
|
|
561
|
+
if (!(js(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 (!ts[t] && !regExpTest(Oo, stringReplace(r, Eo, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && $o[e]) && !(Io && !regExpTest(To, stringReplace(r, Eo, ""))) && r) return !1;
|
|
563
563
|
}
|
|
564
564
|
return !0;
|
|
565
|
-
},
|
|
566
|
-
return e !== "annotation-xml" && stringMatch(e,
|
|
567
|
-
},
|
|
568
|
-
|
|
565
|
+
}, js = function(e) {
|
|
566
|
+
return e !== "annotation-xml" && stringMatch(e, Do);
|
|
567
|
+
}, Ms = function(e) {
|
|
568
|
+
Os(yo.beforeSanitizeAttributes, e, null);
|
|
569
569
|
let { attributes: n } = e;
|
|
570
|
-
if (!n ||
|
|
570
|
+
if (!n || Es(e)) return;
|
|
571
571
|
let r = {
|
|
572
572
|
attrName: "",
|
|
573
573
|
attrValue: "",
|
|
@@ -577,106 +577,106 @@ 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,
|
|
581
|
-
|
|
580
|
+
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, Os(yo.uponSanitizeAttribute, e, r), u = r.attrValue, qo && (c === "id" || c === "name") && (Cs(a, e), u = "user-content-" + u), zo && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
581
|
+
Cs(a, e);
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
584
584
|
if (c === "attributename" && stringMatch(u, "href")) {
|
|
585
|
-
|
|
585
|
+
Cs(a, e);
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
588
|
if (r.forceKeepAttr) continue;
|
|
589
589
|
if (!r.keepAttr) {
|
|
590
|
-
|
|
590
|
+
Cs(a, e);
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
|
-
if (!
|
|
594
|
-
|
|
593
|
+
if (!Lo && regExpTest(/\/>/i, u)) {
|
|
594
|
+
Cs(a, e);
|
|
595
595
|
continue;
|
|
596
596
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
Ro && arrayForEach([
|
|
598
|
+
bo,
|
|
599
|
+
xo,
|
|
600
|
+
So
|
|
601
601
|
], (e) => {
|
|
602
602
|
u = stringReplace(u, e, " ");
|
|
603
603
|
});
|
|
604
604
|
let f = Y(e.nodeName);
|
|
605
|
-
if (!
|
|
606
|
-
|
|
605
|
+
if (!As(f, c, u)) {
|
|
606
|
+
Cs(a, e);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
|
-
if (
|
|
609
|
+
if (R && typeof lo == "object" && typeof lo.getAttributeType == "function" && !o) switch (lo.getAttributeType(f, c)) {
|
|
610
610
|
case "TrustedHTML":
|
|
611
|
-
u =
|
|
611
|
+
u = R.createHTML(u);
|
|
612
612
|
break;
|
|
613
613
|
case "TrustedScriptURL":
|
|
614
|
-
u =
|
|
614
|
+
u = R.createScriptURL(u);
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
if (u !== l) try {
|
|
618
|
-
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u),
|
|
618
|
+
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), Es(e) ? Ss(e) : arrayPop(t.removed);
|
|
619
619
|
} catch {
|
|
620
|
-
|
|
620
|
+
Cs(a, e);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
|
|
624
|
-
},
|
|
625
|
-
let n = null, r =
|
|
626
|
-
for (
|
|
627
|
-
|
|
623
|
+
Os(yo.afterSanitizeAttributes, e, null);
|
|
624
|
+
}, Ns = function e(t) {
|
|
625
|
+
let n = null, r = Ts(t);
|
|
626
|
+
for (Os(yo.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) Os(yo.uponSanitizeShadowNode, n, null), ks(n), Ms(n), n.content instanceof a && e(n.content);
|
|
627
|
+
Os(yo.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 (
|
|
631
|
+
if (ss = !e, ss && (e = "<!-->"), typeof e != "string" && !Ds(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 (
|
|
635
|
+
if (Vo || vs(n), t.removed = [], typeof e == "string" && (Yo = !1), Yo) {
|
|
636
636
|
if (e.nodeName) {
|
|
637
637
|
let t = Y(e.nodeName);
|
|
638
|
-
if (!B[t] ||
|
|
638
|
+
if (!B[t] || jo[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
639
639
|
}
|
|
640
|
-
} else if (e instanceof s) i =
|
|
640
|
+
} else if (e instanceof s) i = ws("<!---->"), 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 (!
|
|
643
|
-
if (i =
|
|
642
|
+
if (!Uo && !Ro && !Bo && e.indexOf("<") === -1) return R && Go ? R.createHTML(e) : e;
|
|
643
|
+
if (i = ws(e), !i) return Uo ? null : Go ? po : "";
|
|
644
644
|
}
|
|
645
|
-
i &&
|
|
646
|
-
let u =
|
|
647
|
-
for (; c = u.nextNode();)
|
|
648
|
-
if (
|
|
649
|
-
if (
|
|
650
|
-
if (
|
|
645
|
+
i && Ho && Ss(i.firstChild);
|
|
646
|
+
let u = Ts(Yo ? e : i);
|
|
647
|
+
for (; c = u.nextNode();) ks(c), Ms(c), c.content instanceof a && Ns(c.content);
|
|
648
|
+
if (Yo) return e;
|
|
649
|
+
if (Uo) {
|
|
650
|
+
if (Wo) for (l = go.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
651
651
|
else l = i;
|
|
652
|
-
return (V.shadowroot || V.shadowrootmode) && (l =
|
|
652
|
+
return (V.shadowroot || V.shadowrootmode) && (l = vo.call(r, l, !0)), l;
|
|
653
653
|
}
|
|
654
|
-
let f =
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
654
|
+
let f = Bo ? i.outerHTML : i.innerHTML;
|
|
655
|
+
return Bo && 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), Ro && arrayForEach([
|
|
656
|
+
bo,
|
|
657
|
+
xo,
|
|
658
|
+
So
|
|
659
659
|
], (e) => {
|
|
660
660
|
f = stringReplace(f, e, " ");
|
|
661
|
-
}),
|
|
661
|
+
}), R && Go ? R.createHTML(f) : f;
|
|
662
662
|
}, t.setConfig = function() {
|
|
663
|
-
|
|
663
|
+
vs(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Vo = !0;
|
|
664
664
|
}, t.clearConfig = function() {
|
|
665
|
-
|
|
665
|
+
hs = null, Vo = !1;
|
|
666
666
|
}, t.isValidAttribute = function(e, t, n) {
|
|
667
|
-
return
|
|
667
|
+
return hs || vs({}), As(Y(e), Y(t), n);
|
|
668
668
|
}, t.addHook = function(e, t) {
|
|
669
|
-
typeof t == "function" && arrayPush(
|
|
669
|
+
typeof t == "function" && arrayPush(yo[e], t);
|
|
670
670
|
}, t.removeHook = function(e, t) {
|
|
671
671
|
if (t !== void 0) {
|
|
672
|
-
let n = arrayLastIndexOf(
|
|
673
|
-
return n === -1 ? void 0 : arraySplice(
|
|
672
|
+
let n = arrayLastIndexOf(yo[e], t);
|
|
673
|
+
return n === -1 ? void 0 : arraySplice(yo[e], n, 1)[0];
|
|
674
674
|
}
|
|
675
|
-
return arrayPop(
|
|
675
|
+
return arrayPop(yo[e]);
|
|
676
676
|
}, t.removeHooks = function(e) {
|
|
677
|
-
|
|
677
|
+
yo[e] = [];
|
|
678
678
|
}, t.removeAllHooks = function() {
|
|
679
|
-
|
|
679
|
+
yo = _createHooksMap();
|
|
680
680
|
}, t;
|
|
681
681
|
}
|
|
682
682
|
var purify = createDOMPurify();
|
|
@@ -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],
|
|
20161
|
-
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "),
|
|
20162
|
-
if (
|
|
20160
|
+
let p = e.split("\n", 1)[0], lo;
|
|
20161
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), lo = l) : lo = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
|
|
20162
|
+
if (lo.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + lo.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 =
|
|
20167
|
+
!u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c = lo.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({
|
|
@@ -21372,13 +21372,13 @@ 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 }) {
|
|
21375
|
-
let [s, c] = useState(!1), f = useRef(null), h = useRef(null), g = useRef(null), [
|
|
21375
|
+
let [s, c] = useState(!1), f = useRef(null), h = useRef(null), g = useRef(null), [A, R] = useState(null);
|
|
21376
21376
|
useLayoutEffect(() => {
|
|
21377
21377
|
if (!s || !f.current || !h.current) return;
|
|
21378
21378
|
let e = f.current.getBoundingClientRect(), t = h.current.getBoundingClientRect(), o = e.left;
|
|
21379
21379
|
n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
|
|
21380
21380
|
let c;
|
|
21381
|
-
c = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() =>
|
|
21381
|
+
c = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => R({
|
|
21382
21382
|
top: c,
|
|
21383
21383
|
left: o
|
|
21384
21384
|
}));
|
|
@@ -21389,10 +21389,10 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21389
21389
|
i,
|
|
21390
21390
|
a
|
|
21391
21391
|
]);
|
|
21392
|
-
function
|
|
21392
|
+
function po() {
|
|
21393
21393
|
g.current &&= (clearTimeout(g.current), null), c(!0);
|
|
21394
21394
|
}
|
|
21395
|
-
function
|
|
21395
|
+
function mo() {
|
|
21396
21396
|
g.current = window.setTimeout(() => {
|
|
21397
21397
|
c(!1);
|
|
21398
21398
|
}, 120);
|
|
@@ -21410,21 +21410,21 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21410
21410
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21411
21411
|
ref: f,
|
|
21412
21412
|
className: "inline-flex",
|
|
21413
|
-
onMouseEnter:
|
|
21414
|
-
onMouseLeave:
|
|
21413
|
+
onMouseEnter: po,
|
|
21414
|
+
onMouseLeave: mo,
|
|
21415
21415
|
onClick: () => c((e) => !e),
|
|
21416
21416
|
"aria-haspopup": "menu",
|
|
21417
21417
|
"aria-expanded": s,
|
|
21418
21418
|
children: e
|
|
21419
21419
|
}), s && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21420
21420
|
ref: h,
|
|
21421
|
-
onMouseEnter:
|
|
21422
|
-
onMouseLeave:
|
|
21421
|
+
onMouseEnter: po,
|
|
21422
|
+
onMouseLeave: mo,
|
|
21423
21423
|
style: {
|
|
21424
21424
|
position: "fixed",
|
|
21425
|
-
top:
|
|
21426
|
-
left:
|
|
21427
|
-
visibility:
|
|
21425
|
+
top: A?.top ?? 0,
|
|
21426
|
+
left: A?.left ?? 0,
|
|
21427
|
+
visibility: A ? "visible" : "hidden",
|
|
21428
21428
|
zIndex: 1e3
|
|
21429
21429
|
},
|
|
21430
21430
|
children: t
|
|
@@ -21486,17 +21486,17 @@ function getVerticalAlign(e, t, n) {
|
|
|
21486
21486
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21487
21487
|
}
|
|
21488
21488
|
function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
|
|
21489
|
-
let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h,
|
|
21489
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h, A] = useState(null), R = () => {
|
|
21490
21490
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21491
21491
|
f(!0);
|
|
21492
21492
|
}, r);
|
|
21493
|
-
},
|
|
21493
|
+
}, po = () => {
|
|
21494
21494
|
s.current &&= (clearTimeout(s.current), null), f(!1);
|
|
21495
21495
|
};
|
|
21496
21496
|
return useLayoutEffect(() => {
|
|
21497
21497
|
if (!c || !a.current || !o.current) return;
|
|
21498
21498
|
let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
|
|
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)),
|
|
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)), A((e) => e && e.top === l && e.left === u ? e : {
|
|
21500
21500
|
top: l,
|
|
21501
21501
|
left: u
|
|
21502
21502
|
});
|
|
@@ -21505,10 +21505,10 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
|
|
|
21505
21505
|
}, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
21506
21506
|
ref: a,
|
|
21507
21507
|
className: "inline-flex",
|
|
21508
|
-
onMouseEnter:
|
|
21509
|
-
onMouseLeave:
|
|
21510
|
-
onFocus:
|
|
21511
|
-
onBlur:
|
|
21508
|
+
onMouseEnter: R,
|
|
21509
|
+
onMouseLeave: po,
|
|
21510
|
+
onFocus: R,
|
|
21511
|
+
onBlur: po,
|
|
21512
21512
|
children: e
|
|
21513
21513
|
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21514
21514
|
ref: o,
|
|
@@ -22757,7 +22757,11 @@ function RichContent({ content: e, className: t }) {
|
|
|
22757
22757
|
function Skeleton({ className: e }) {
|
|
22758
22758
|
return /* @__PURE__ */ jsx("div", { className: cn("skeleton rounded-md", e) });
|
|
22759
22759
|
}
|
|
22760
|
-
var toasts = [], listeners = /* @__PURE__ */ new Set(),
|
|
22760
|
+
var toasts = [], listeners = /* @__PURE__ */ new Set(), pendingDismissReasons = /* @__PURE__ */ new Map();
|
|
22761
|
+
function removeToast(e, t) {
|
|
22762
|
+
t && pendingDismissReasons.set(e, t), toasts = toasts.filter((t) => t.id !== e), notify();
|
|
22763
|
+
}
|
|
22764
|
+
var activeKeys = /* @__PURE__ */ new Map();
|
|
22761
22765
|
function notify() {
|
|
22762
22766
|
listeners.forEach((e) => e(toasts));
|
|
22763
22767
|
}
|
|
@@ -22770,8 +22774,16 @@ const toastStore = {
|
|
|
22770
22774
|
add(e) {
|
|
22771
22775
|
e.key && activeKeys.set(e.key, e.id), toasts = [e, ...toasts], notify();
|
|
22772
22776
|
},
|
|
22773
|
-
remove(e) {
|
|
22774
|
-
|
|
22777
|
+
remove(e, t) {
|
|
22778
|
+
removeToast(e, t);
|
|
22779
|
+
},
|
|
22780
|
+
removeAllAtPosition(e, t = "replaced") {
|
|
22781
|
+
let n = toasts.filter((t) => t.position === e).map((e) => e.id);
|
|
22782
|
+
for (let e of n) removeToast(e, t);
|
|
22783
|
+
},
|
|
22784
|
+
consumePendingDismissReason(e) {
|
|
22785
|
+
let t = pendingDismissReasons.get(e);
|
|
22786
|
+
return t !== void 0 && pendingDismissReasons.delete(e), t;
|
|
22775
22787
|
},
|
|
22776
22788
|
cleanup(e) {
|
|
22777
22789
|
for (let [t, n] of activeKeys) if (n === e) {
|
|
@@ -22804,7 +22816,17 @@ var ANIMATION_DURATION_MS = 200, COUNTDOWN_INTERVAL_MS = 100, POSITION_CLASSES =
|
|
|
22804
22816
|
"bottom-left": "-translate-x-full",
|
|
22805
22817
|
"bottom-center": "translate-y-full",
|
|
22806
22818
|
"bottom-right": "translate-x-full"
|
|
22819
|
+
}, SINGLE_SLOT_PLACE = {
|
|
22820
|
+
"top-left": "place-items-start",
|
|
22821
|
+
"top-center": "items-start justify-items-center",
|
|
22822
|
+
"top-right": "items-start justify-items-end",
|
|
22823
|
+
"bottom-left": "items-end justify-items-start",
|
|
22824
|
+
"bottom-center": "items-end justify-items-center",
|
|
22825
|
+
"bottom-right": "items-end justify-items-end"
|
|
22807
22826
|
};
|
|
22827
|
+
function isTopPosition(e) {
|
|
22828
|
+
return e.startsWith("top");
|
|
22829
|
+
}
|
|
22808
22830
|
function isRenderFn(e) {
|
|
22809
22831
|
return typeof e == "function";
|
|
22810
22832
|
}
|
|
@@ -22904,7 +22926,7 @@ function useToastTimers(e, t) {
|
|
|
22904
22926
|
e,
|
|
22905
22927
|
u,
|
|
22906
22928
|
f
|
|
22907
|
-
]),
|
|
22929
|
+
]), uo = useCallback((e) => {
|
|
22908
22930
|
i.current.delete(e), r((t) => {
|
|
22909
22931
|
let n = new Map(t);
|
|
22910
22932
|
return n.delete(e), n;
|
|
@@ -22926,21 +22948,21 @@ function useToastTimers(e, t) {
|
|
|
22926
22948
|
remainingTimes: n,
|
|
22927
22949
|
pauseAll: h,
|
|
22928
22950
|
resumeAll: g,
|
|
22929
|
-
cleanupTimer:
|
|
22951
|
+
cleanupTimer: uo
|
|
22930
22952
|
};
|
|
22931
22953
|
}
|
|
22932
22954
|
function Toaster() {
|
|
22933
|
-
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:
|
|
22955
|
+
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: A } = useToastTimers(e, a);
|
|
22934
22956
|
useEffect(() => toastStore.subscribe(t), []);
|
|
22935
|
-
let
|
|
22957
|
+
let R = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), po = useCallback((e) => {
|
|
22936
22958
|
e.callbacks?.onOpen?.();
|
|
22937
|
-
}, []),
|
|
22938
|
-
t === "manual" ? e.callbacks?.onClose?.() : e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
22959
|
+
}, []), mo = useCallback((e, t) => {
|
|
22960
|
+
t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
22939
22961
|
}, []);
|
|
22940
22962
|
useEffect(() => {
|
|
22941
22963
|
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
22942
22964
|
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
22943
|
-
|
|
22965
|
+
mo(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
22944
22966
|
}), r((r) => {
|
|
22945
22967
|
let i = r.map((e) => {
|
|
22946
22968
|
let t = n.get(e.id);
|
|
@@ -22949,7 +22971,7 @@ function Toaster() {
|
|
|
22949
22971
|
content: t.content,
|
|
22950
22972
|
duration: t.duration
|
|
22951
22973
|
} : e;
|
|
22952
|
-
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (
|
|
22974
|
+
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (po(e), {
|
|
22953
22975
|
...e,
|
|
22954
22976
|
animationState: "entering"
|
|
22955
22977
|
})), ...i];
|
|
@@ -22957,30 +22979,47 @@ function Toaster() {
|
|
|
22957
22979
|
}), i.current = t;
|
|
22958
22980
|
}, [
|
|
22959
22981
|
e,
|
|
22960
|
-
|
|
22961
|
-
|
|
22982
|
+
po,
|
|
22983
|
+
mo
|
|
22962
22984
|
]);
|
|
22963
|
-
let
|
|
22985
|
+
let ho = useCallback((e) => {
|
|
22964
22986
|
r((t) => {
|
|
22965
22987
|
let n = t.filter((t) => t.id !== e);
|
|
22966
22988
|
return o.current = n, n;
|
|
22967
|
-
}),
|
|
22968
|
-
}, [
|
|
22989
|
+
}), A(e), toastStore.cleanup(e);
|
|
22990
|
+
}, [A]), go = useCallback((e) => {
|
|
22969
22991
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
22970
22992
|
}, []);
|
|
22971
|
-
if (!
|
|
22972
|
-
let
|
|
22973
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
22974
|
-
|
|
22975
|
-
|
|
22993
|
+
if (!R) return null;
|
|
22994
|
+
let _o = groupByPosition(n);
|
|
22995
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(_o).map(([e, t]) => {
|
|
22996
|
+
let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
22997
|
+
className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
|
|
22998
|
+
children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
|
|
22999
|
+
className: "col-span-full row-span-full col-start-1 row-start-1",
|
|
23000
|
+
style: { zIndex: n.length - t },
|
|
23001
|
+
children: /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23002
|
+
toast: e,
|
|
23003
|
+
remainingTime: c.get(e.id) ?? e.duration,
|
|
23004
|
+
onExitComplete: ho,
|
|
23005
|
+
onClose: go,
|
|
23006
|
+
onHoverStart: u,
|
|
23007
|
+
onHoverEnd: f
|
|
23008
|
+
})
|
|
23009
|
+
}, e.id))
|
|
23010
|
+
}) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
22976
23011
|
toast: e,
|
|
22977
23012
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
22978
|
-
onExitComplete:
|
|
22979
|
-
onClose:
|
|
23013
|
+
onExitComplete: ho,
|
|
23014
|
+
onClose: go,
|
|
22980
23015
|
onHoverStart: u,
|
|
22981
23016
|
onHoverEnd: f
|
|
22982
|
-
}, e.id))
|
|
22983
|
-
|
|
23017
|
+
}, e.id));
|
|
23018
|
+
return /* @__PURE__ */ jsx("div", {
|
|
23019
|
+
className: cn("pointer-events-none fixed z-1000 flex flex-col items-end gap-2 p-4", POSITION_CLASSES[e]),
|
|
23020
|
+
children: isTopPosition(e) ? /* @__PURE__ */ jsxs(Fragment$1, { children: [i, a] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [a, i] })
|
|
23021
|
+
}, e);
|
|
23022
|
+
}) }), document.body);
|
|
22984
23023
|
}
|
|
22985
23024
|
function AccountInfo({ title: e, value: t }) {
|
|
22986
23025
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -23190,7 +23229,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23190
23229
|
function O(e) {
|
|
23191
23230
|
p(e), a?.(e);
|
|
23192
23231
|
}
|
|
23193
|
-
let
|
|
23232
|
+
let A = {
|
|
23194
23233
|
fire: [{
|
|
23195
23234
|
id: "fire",
|
|
23196
23235
|
tooltip: "Mark as fire",
|
|
@@ -23242,7 +23281,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23242
23281
|
}),
|
|
23243
23282
|
onClick: r.read.off
|
|
23244
23283
|
}]
|
|
23245
|
-
},
|
|
23284
|
+
}, R = [{
|
|
23246
23285
|
value: "normal",
|
|
23247
23286
|
tooltip: "Normal density",
|
|
23248
23287
|
icon: /* @__PURE__ */ jsx(NormalDensityIcon, { size: 20 })
|
|
@@ -23271,7 +23310,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23271
23310
|
}),
|
|
23272
23311
|
/* @__PURE__ */ jsx("div", {
|
|
23273
23312
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23274
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23313
|
+
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(A).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
23275
23314
|
className: "flex items-center gap-2 px-1",
|
|
23276
23315
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23277
23316
|
content: e.tooltip,
|
|
@@ -23286,7 +23325,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23286
23325
|
}),
|
|
23287
23326
|
/* @__PURE__ */ jsx("div", {
|
|
23288
23327
|
className: "flex items-center gap-2",
|
|
23289
|
-
children:
|
|
23328
|
+
children: R.map(({ value: e, tooltip: t, icon: n }) => {
|
|
23290
23329
|
let r = f === e;
|
|
23291
23330
|
return /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23292
23331
|
content: t,
|
|
@@ -23392,7 +23431,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23392
23431
|
let c = !!o, l = filterButtonStyles({
|
|
23393
23432
|
variant: e,
|
|
23394
23433
|
selected: !c && r
|
|
23395
|
-
}), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label,
|
|
23434
|
+
}), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label, lo = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
|
|
23396
23435
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23397
23436
|
...s,
|
|
23398
23437
|
disabled: o,
|
|
@@ -23400,7 +23439,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23400
23439
|
className: cn("group", l.root(), c && "border-neutral-300 bg-white hover:border-neutral-300", a?.root),
|
|
23401
23440
|
children: [f && /* @__PURE__ */ jsx("span", {
|
|
23402
23441
|
className: cn("flex items-center", a?.icon),
|
|
23403
|
-
children: renderIcon$1(f, cn("shrink-0",
|
|
23442
|
+
children: renderIcon$1(f, cn("shrink-0", lo))
|
|
23404
23443
|
}), p && /* @__PURE__ */ jsxs("span", {
|
|
23405
23444
|
className: cn(l.label(), c && "font-medium text-neutral-400", a?.label),
|
|
23406
23445
|
children: [/* @__PURE__ */ jsx("span", { children: p }), typeof n == "number" && n > 0 && /* @__PURE__ */ jsxs("span", {
|
|
@@ -23516,7 +23555,7 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
|
|
|
23516
23555
|
position: "fixed",
|
|
23517
23556
|
top: n.top,
|
|
23518
23557
|
left: n.left,
|
|
23519
|
-
zIndex:
|
|
23558
|
+
zIndex: 10
|
|
23520
23559
|
},
|
|
23521
23560
|
children: /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23522
23561
|
content: s,
|
|
@@ -23546,15 +23585,15 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23546
23585
|
variant: r,
|
|
23547
23586
|
orientation: i,
|
|
23548
23587
|
status: a
|
|
23549
|
-
}),
|
|
23550
|
-
function
|
|
23551
|
-
c === void 0 &&
|
|
23588
|
+
}), A = useRef(null), [R, po] = useState(!1), [mo, ho] = useState(!1), [go, _o] = useState(l), [vo, yo] = useState(null), bo = c ?? go, xo = s && (R || mo || bo), So = typeof n == "number" && n > 0 && (o || a === "active");
|
|
23589
|
+
function Co(e) {
|
|
23590
|
+
c === void 0 && _o(e), f?.(e);
|
|
23552
23591
|
}
|
|
23553
23592
|
return useLayoutEffect(() => {
|
|
23554
|
-
if (!
|
|
23593
|
+
if (!xo || !A.current) return;
|
|
23555
23594
|
function e() {
|
|
23556
|
-
let e =
|
|
23557
|
-
e &&
|
|
23595
|
+
let e = A.current?.getBoundingClientRect();
|
|
23596
|
+
e && yo({
|
|
23558
23597
|
top: e.top - 8,
|
|
23559
23598
|
left: e.right - 12
|
|
23560
23599
|
});
|
|
@@ -23562,28 +23601,28 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23562
23601
|
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
23563
23602
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
23564
23603
|
};
|
|
23565
|
-
}, [
|
|
23604
|
+
}, [xo]), /* @__PURE__ */ jsxs(Button, {
|
|
23566
23605
|
...g,
|
|
23567
23606
|
className: cn(O.root(), h?.root),
|
|
23568
|
-
onMouseEnter: () =>
|
|
23569
|
-
onMouseLeave: () =>
|
|
23607
|
+
onMouseEnter: () => po(!0),
|
|
23608
|
+
onMouseLeave: () => po(!1),
|
|
23570
23609
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23571
23610
|
className: "relative",
|
|
23572
23611
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23573
|
-
ref:
|
|
23612
|
+
ref: A,
|
|
23574
23613
|
className: cn(O.bubble(), h?.bubble),
|
|
23575
23614
|
children: renderIcon(e, O.icon())
|
|
23576
|
-
}),
|
|
23577
|
-
isPressed:
|
|
23578
|
-
isPortalHovered:
|
|
23579
|
-
portalPosition:
|
|
23580
|
-
onMouseEnter: () =>
|
|
23581
|
-
onMouseLeave: () =>
|
|
23582
|
-
onToggle: () =>
|
|
23615
|
+
}), xo && vo && typeof document < "u" && ToggleControlPortal({
|
|
23616
|
+
isPressed: bo,
|
|
23617
|
+
isPortalHovered: mo,
|
|
23618
|
+
portalPosition: vo,
|
|
23619
|
+
onMouseEnter: () => ho(!0),
|
|
23620
|
+
onMouseLeave: () => ho(!1),
|
|
23621
|
+
onToggle: () => Co(!bo)
|
|
23583
23622
|
})]
|
|
23584
23623
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23585
23624
|
className: cn(O.label(), h?.label),
|
|
23586
|
-
children: [/* @__PURE__ */ jsx("span", { children: t }),
|
|
23625
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), So && /* @__PURE__ */ jsxs("span", {
|
|
23587
23626
|
"aria-label": `${n} items`,
|
|
23588
23627
|
className: cn(O.count(), h?.count),
|
|
23589
23628
|
children: [
|
|
@@ -23643,8 +23682,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23643
23682
|
t,
|
|
23644
23683
|
n
|
|
23645
23684
|
]);
|
|
23646
|
-
let
|
|
23647
|
-
function
|
|
23685
|
+
let A = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
|
|
23686
|
+
function R(t) {
|
|
23648
23687
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23649
23688
|
if ((o !== g.month || s !== g.year) && O({
|
|
23650
23689
|
year: s,
|
|
@@ -23661,7 +23700,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23661
23700
|
}), a());
|
|
23662
23701
|
}
|
|
23663
23702
|
}
|
|
23664
|
-
function
|
|
23703
|
+
function po() {
|
|
23665
23704
|
O((e) => e.month === 0 ? {
|
|
23666
23705
|
year: e.year - 1,
|
|
23667
23706
|
month: 11
|
|
@@ -23670,7 +23709,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23670
23709
|
month: e.month - 1
|
|
23671
23710
|
});
|
|
23672
23711
|
}
|
|
23673
|
-
function
|
|
23712
|
+
function mo() {
|
|
23674
23713
|
O((e) => e.month === 11 ? {
|
|
23675
23714
|
year: e.year + 1,
|
|
23676
23715
|
month: 0
|
|
@@ -23679,7 +23718,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23679
23718
|
month: e.month + 1
|
|
23680
23719
|
});
|
|
23681
23720
|
}
|
|
23682
|
-
let
|
|
23721
|
+
let ho = getWeekdays();
|
|
23683
23722
|
return /* @__PURE__ */ jsxs("div", {
|
|
23684
23723
|
className: "mt-1 w-fit rounded-lg border border-neutral-400 bg-white p-2 shadow-lg",
|
|
23685
23724
|
children: [
|
|
@@ -23691,7 +23730,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23691
23730
|
direction: "left",
|
|
23692
23731
|
size: 20
|
|
23693
23732
|
}),
|
|
23694
|
-
onClick:
|
|
23733
|
+
onClick: po,
|
|
23695
23734
|
className: "hover:opacity-60",
|
|
23696
23735
|
"aria-label": "Previous month"
|
|
23697
23736
|
}),
|
|
@@ -23708,7 +23747,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23708
23747
|
direction: "right",
|
|
23709
23748
|
size: 20
|
|
23710
23749
|
}),
|
|
23711
|
-
onClick:
|
|
23750
|
+
onClick: mo,
|
|
23712
23751
|
className: "hover:opacity-60",
|
|
23713
23752
|
"aria-label": "Next month"
|
|
23714
23753
|
})
|
|
@@ -23716,20 +23755,20 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23716
23755
|
}),
|
|
23717
23756
|
/* @__PURE__ */ jsx("div", {
|
|
23718
23757
|
className: "mb-2 grid grid-cols-7",
|
|
23719
|
-
children:
|
|
23758
|
+
children: ho.map((e) => /* @__PURE__ */ jsx("div", {
|
|
23720
23759
|
className: "flex items-center justify-center p-0.5 text-[9px] font-bold text-neutral-900",
|
|
23721
23760
|
children: e
|
|
23722
23761
|
}, e))
|
|
23723
23762
|
}),
|
|
23724
23763
|
/* @__PURE__ */ jsx("div", {
|
|
23725
23764
|
className: "grid grid-cols-7",
|
|
23726
|
-
children:
|
|
23727
|
-
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u),
|
|
23765
|
+
children: A.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
23766
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), lo = f && isSameDay(i, f), h = u, g = s;
|
|
23728
23767
|
e === "range" && u && !f && s && !isDateBefore(s, u) ? (h = u, g = s) : (h = null, g = null);
|
|
23729
|
-
let
|
|
23768
|
+
let fo = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, h, g)), O = l || p || lo;
|
|
23730
23769
|
return /* @__PURE__ */ jsx(Button, {
|
|
23731
23770
|
type: "button",
|
|
23732
|
-
onClick: () =>
|
|
23771
|
+
onClick: () => R(i),
|
|
23733
23772
|
onMouseEnter: () => {
|
|
23734
23773
|
e === "range" && u && !f && !isDateBefore(i, u) && c(i);
|
|
23735
23774
|
},
|
|
@@ -23740,7 +23779,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23740
23779
|
"aria-label": `Select ${formatDate(i)}`,
|
|
23741
23780
|
"aria-selected": O || void 0,
|
|
23742
23781
|
children: /* @__PURE__ */ jsx("div", {
|
|
23743
|
-
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",
|
|
23782
|
+
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", fo && !O && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !O && !fo && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !O && !fo && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
23744
23783
|
children: r
|
|
23745
23784
|
})
|
|
23746
23785
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -23805,11 +23844,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23805
23844
|
function h(t) {
|
|
23806
23845
|
e === "single" && (u || s(t), r?.(t));
|
|
23807
23846
|
}
|
|
23808
|
-
function
|
|
23847
|
+
function fo(t) {
|
|
23809
23848
|
e === "range" && (u || l(t), r?.(t));
|
|
23810
23849
|
}
|
|
23811
23850
|
function O() {
|
|
23812
|
-
e === "single" ? h(null) :
|
|
23851
|
+
e === "single" ? h(null) : fo({
|
|
23813
23852
|
startDate: null,
|
|
23814
23853
|
endDate: null
|
|
23815
23854
|
});
|
|
@@ -23827,7 +23866,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23827
23866
|
selectedDate: f,
|
|
23828
23867
|
selectedRange: p,
|
|
23829
23868
|
onDateSelect: h,
|
|
23830
|
-
onRangeSelect:
|
|
23869
|
+
onRangeSelect: fo
|
|
23831
23870
|
})
|
|
23832
23871
|
}) });
|
|
23833
23872
|
}
|
|
@@ -24030,16 +24069,16 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
24030
24069
|
}) })
|
|
24031
24070
|
});
|
|
24032
24071
|
}
|
|
24033
|
-
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:
|
|
24072
|
+
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: lo = {}, actions: h = {}, density: g = "normal", className: O, style: A, isPriority: R, isDone: po }) {
|
|
24034
24073
|
return /* @__PURE__ */ jsx(Card, {
|
|
24035
24074
|
as: Pressable,
|
|
24036
24075
|
onPress: u,
|
|
24037
24076
|
className: cn(eventCardStyles({
|
|
24038
|
-
tone:
|
|
24077
|
+
tone: R ? "priority" : po ? "done" : "default",
|
|
24039
24078
|
state: l ? "selected" : c ? "read" : "unread",
|
|
24040
24079
|
density: g
|
|
24041
24080
|
}), O),
|
|
24042
|
-
style:
|
|
24081
|
+
style: A,
|
|
24043
24082
|
"data-service": t,
|
|
24044
24083
|
children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
24045
24084
|
className: "gap-x-2 gap-y-1",
|
|
@@ -24076,7 +24115,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24076
24115
|
}),
|
|
24077
24116
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
24078
24117
|
className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1",
|
|
24079
|
-
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges:
|
|
24118
|
+
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: lo }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
24080
24119
|
actions: h,
|
|
24081
24120
|
className: "col-start-2 justify-self-end"
|
|
24082
24121
|
})]
|
|
@@ -24095,7 +24134,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24095
24134
|
children: [
|
|
24096
24135
|
e,
|
|
24097
24136
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
24098
|
-
statusBadges:
|
|
24137
|
+
statusBadges: lo,
|
|
24099
24138
|
density: g
|
|
24100
24139
|
}),
|
|
24101
24140
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -24173,7 +24212,7 @@ function EventDetailContentCalendarDetails({ from: e, to: t, link: n, location:
|
|
|
24173
24212
|
}
|
|
24174
24213
|
function EventDetailPriority({ priorityText: e }) {
|
|
24175
24214
|
return /* @__PURE__ */ jsxs("div", {
|
|
24176
|
-
className: "sticky top-14 z-5 flex
|
|
24215
|
+
className: "sticky top-14 z-5 flex min-h-14 shrink-0 items-center gap-4 bg-tertiary-50 px-4 py-2",
|
|
24177
24216
|
children: [/* @__PURE__ */ jsx(FireIcon, {
|
|
24178
24217
|
size: 32,
|
|
24179
24218
|
className: "text-tertiary-500-variant-2"
|
|
@@ -24593,7 +24632,7 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
|
|
|
24593
24632
|
]
|
|
24594
24633
|
})] });
|
|
24595
24634
|
}
|
|
24596
|
-
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:
|
|
24635
|
+
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: lo }, className: h }) {
|
|
24597
24636
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24598
24637
|
summary: e,
|
|
24599
24638
|
priorityText: n,
|
|
@@ -24611,7 +24650,7 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
24611
24650
|
reporter: u,
|
|
24612
24651
|
team: f,
|
|
24613
24652
|
location: p,
|
|
24614
|
-
related:
|
|
24653
|
+
related: lo
|
|
24615
24654
|
}),
|
|
24616
24655
|
/* @__PURE__ */ jsx("h2", {
|
|
24617
24656
|
className: "px-4 text-sm font-bold text-neutral-900",
|
|
@@ -24626,10 +24665,10 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
24626
24665
|
}
|
|
24627
24666
|
function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, timestamp: a, isPriority: o, isOpen: s, isFirstEvent: c, isSingleEvent: l, className: u }) {
|
|
24628
24667
|
return /* @__PURE__ */ jsxs("div", {
|
|
24629
|
-
className: cn("flex h-14 w-full items-center bg-white px-4 py-2", o && "relative", u),
|
|
24668
|
+
className: cn("flex h-14 w-full min-w-0 items-center overflow-hidden bg-white px-4 py-2", o && "relative", u),
|
|
24630
24669
|
"data-priority": o,
|
|
24631
|
-
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", {
|
|
24632
|
-
className: "flex w-full items-center gap-4",
|
|
24670
|
+
children: [o && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 z-10 h-full w-1 shrink-0 bg-tertiary-500-variant-2" }), /* @__PURE__ */ jsxs("div", {
|
|
24671
|
+
className: "flex w-full min-w-0 items-center gap-4 overflow-hidden",
|
|
24633
24672
|
children: [
|
|
24634
24673
|
c && /* @__PURE__ */ jsx(IconButton, {
|
|
24635
24674
|
icon: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
@@ -24651,27 +24690,27 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
|
|
|
24651
24690
|
})
|
|
24652
24691
|
}),
|
|
24653
24692
|
/* @__PURE__ */ jsxs("div", {
|
|
24654
|
-
className: "min-w-0 flex-1",
|
|
24693
|
+
className: "w-0 min-w-0 flex-1 overflow-hidden",
|
|
24655
24694
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
24656
|
-
className: "
|
|
24695
|
+
className: "block truncate text-sm leading-[1.3] font-bold text-neutral-900",
|
|
24657
24696
|
children: n
|
|
24658
24697
|
}), /* @__PURE__ */ jsx("div", {
|
|
24659
|
-
className: "
|
|
24698
|
+
className: "block truncate text-sm leading-[1.3] font-normal text-neutral-900",
|
|
24660
24699
|
children: t
|
|
24661
24700
|
})]
|
|
24662
24701
|
}),
|
|
24663
24702
|
/* @__PURE__ */ jsxs("div", {
|
|
24664
|
-
className: "
|
|
24703
|
+
className: "flex max-w-[180px] min-w-0 shrink items-center gap-1 text-right text-xs leading-[1.2] tracking-[0.12px]",
|
|
24665
24704
|
children: [r != null && /* @__PURE__ */ jsx("span", {
|
|
24666
|
-
className: "font-normal text-neutral-600",
|
|
24705
|
+
className: "min-w-0 truncate font-normal text-neutral-600",
|
|
24667
24706
|
children: r
|
|
24668
24707
|
}), /* @__PURE__ */ jsx("span", {
|
|
24669
|
-
className: "font-semibold text-neutral-800",
|
|
24708
|
+
className: "shrink-0 font-semibold whitespace-nowrap text-neutral-800",
|
|
24670
24709
|
children: a
|
|
24671
24710
|
})]
|
|
24672
24711
|
}),
|
|
24673
24712
|
/* @__PURE__ */ jsxs("div", {
|
|
24674
|
-
className: "flex items-center gap-2",
|
|
24713
|
+
className: "flex shrink-0 items-center gap-2",
|
|
24675
24714
|
children: [!l && /* @__PURE__ */ jsx(IconButton, {
|
|
24676
24715
|
icon: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
24677
24716
|
size: 24,
|
|
@@ -25070,7 +25109,7 @@ function buildCallbacks({ onOpen: e, onClose: t, onAutoClose: n, onDismiss: r })
|
|
|
25070
25109
|
onDismiss: r
|
|
25071
25110
|
} : void 0;
|
|
25072
25111
|
}
|
|
25073
|
-
function showToast({ content: e, duration: t = DEFAULT_DURATION, position: n = DEFAULT_POSITION, persistent: r, onOpen: i, onClose: a, onAutoClose: o, onDismiss: s, key: c, refresh: l = !1 }) {
|
|
25112
|
+
function showToast({ content: e, duration: t = DEFAULT_DURATION, position: n = DEFAULT_POSITION, persistent: r, onOpen: i, onClose: a, onAutoClose: o, onDismiss: s, key: c, refresh: l = !1, dismissPrevious: u = !1 }) {
|
|
25074
25113
|
if (c) {
|
|
25075
25114
|
let n = toastStore.getActiveToastIdByKey(c);
|
|
25076
25115
|
if (n) return l && toastStore.update(n, {
|
|
@@ -25082,9 +25121,10 @@ function showToast({ content: e, duration: t = DEFAULT_DURATION, position: n = D
|
|
|
25082
25121
|
deduplicated: !0
|
|
25083
25122
|
};
|
|
25084
25123
|
}
|
|
25085
|
-
|
|
25124
|
+
u && toastStore.removeAllAtPosition(n);
|
|
25125
|
+
let f = crypto.randomUUID();
|
|
25086
25126
|
return toastStore.add({
|
|
25087
|
-
id:
|
|
25127
|
+
id: f,
|
|
25088
25128
|
content: e,
|
|
25089
25129
|
duration: t,
|
|
25090
25130
|
position: n,
|
|
@@ -25095,10 +25135,11 @@ function showToast({ content: e, duration: t = DEFAULT_DURATION, position: n = D
|
|
|
25095
25135
|
onAutoClose: o,
|
|
25096
25136
|
onDismiss: s
|
|
25097
25137
|
}),
|
|
25098
|
-
key: c
|
|
25138
|
+
key: c,
|
|
25139
|
+
singleSlot: u
|
|
25099
25140
|
}), {
|
|
25100
|
-
id:
|
|
25101
|
-
dismiss: () => toastStore.remove(
|
|
25141
|
+
id: f,
|
|
25142
|
+
dismiss: () => toastStore.remove(f),
|
|
25102
25143
|
deduplicated: !1
|
|
25103
25144
|
};
|
|
25104
25145
|
}
|