v-sistec-features 1.31.13 → 1.32.0
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/DataAgenda/VDataAgenda.vue.d.ts +915 -0
- package/dist/DataAgenda/components/AgendaMatrix.vue.d.ts +64 -0
- package/dist/DataAgenda/components/AgendaMatrixBase.vue.d.ts +31 -0
- package/dist/DataAgenda/components/AgendaMatrixUnico.vue.d.ts +72 -0
- package/dist/DataAgenda/components/AgendaTabelaHorario.vue.d.ts +32 -0
- package/dist/DataAgenda/components/AgendaVueCal.vue.d.ts +94 -0
- package/dist/DataAgenda/components/BlocoArrastavel.vue.d.ts +37 -0
- package/dist/DataAgenda/components/HeaderCalendario.vue.d.ts +7 -0
- package/dist/DataAgenda/components/HeaderTabela.vue.d.ts +7 -0
- package/dist/DataAgenda/components/ModalDetalhesReserva.vue.d.ts +38 -0
- package/dist/DataAgenda/components/ModalReserva.vue.d.ts +157 -0
- package/dist/DataAgenda/composables/useAgenda.d.ts +24 -0
- package/dist/DataAgenda/composables/useCoresAgenda.d.ts +7 -0
- package/dist/DataAgenda/composables/useGradeCompartilhada.d.ts +23 -0
- package/dist/DataAgenda/composables/useSelecaoArrasto.d.ts +24 -0
- package/dist/DataAgenda/index.d.ts +2 -0
- package/dist/DataPageVue/components/VDataPage.vue.d.ts +50 -0
- package/dist/DataPageVue/index.d.ts +2 -0
- package/dist/DataPageVue/types/v-data-page.d.ts +53 -0
- package/dist/DatatableVue/components/SearchDatatable.vue.d.ts +28 -0
- package/dist/DatatableVue/components/VColumn.vue.d.ts +82 -0
- package/dist/DatatableVue/components/VColumnManager.vue.d.ts +21 -0
- package/dist/DatatableVue/components/VDataTable.vue.d.ts +57 -0
- package/dist/DatatableVue/components/VDataTableLoading.vue.d.ts +17 -0
- package/dist/DatatableVue/components/VOrderingIcon.vue.d.ts +10 -0
- package/dist/DatatableVue/components/VThDataTable.vue.d.ts +14 -0
- package/dist/DatatableVue/composables/useCheckBox.d.ts +11 -0
- package/dist/DatatableVue/composables/useDataTableConfig.d.ts +4 -0
- package/dist/DatatableVue/composables/useDataTableFetch.d.ts +17 -0
- package/dist/DatatableVue/composables/useExpandedItem.d.ts +6 -0
- package/dist/DatatableVue/composables/useImagePreview.d.ts +9 -0
- package/dist/DatatableVue/config/datatableConfig.d.ts +4 -0
- package/dist/DatatableVue/config/datatableDefaults.d.ts +7 -0
- package/dist/DatatableVue/index.d.ts +3 -0
- package/dist/DatatableVue/keys.d.ts +39 -0
- package/dist/DatatableVue/style/svgs.d.ts +20 -0
- package/dist/DatatableVue/types/v-data-table.d.ts +161 -0
- package/dist/Modals/components/BotaoFechar.vue.d.ts +36 -0
- package/dist/Modals/components/ModalAviso.vue.d.ts +184 -0
- package/dist/Modals/components/ModalBaseDefault.vue.d.ts +244 -0
- package/dist/Modals/components/ModalConfirmacao.vue.d.ts +184 -0
- package/dist/Modals/components/ModalConfirmacaoCheckbox.vue.d.ts +195 -0
- package/dist/Modals/components/ModalConfirmacaoInput.vue.d.ts +238 -0
- package/dist/Modals/components/ModalConfirmacaoSimples.vue.d.ts +187 -0
- package/dist/Modals/components/ModalInformacao.vue.d.ts +184 -0
- package/dist/Modals/components/ModalPerigo.vue.d.ts +175 -0
- package/dist/Modals/components/ModalSucesso.vue.d.ts +175 -0
- package/dist/Modals/components/interno/ModalDialogoInterno.vue.d.ts +205 -0
- package/dist/Modals/index.d.ts +12 -0
- package/dist/Modals.js +1361 -0
- package/dist/Pagination/Pagination.vue.d.ts +19 -0
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/{Pagination-f4FVE5TX.js → Pagination-D96eBRod.js} +25 -25
- package/dist/Pagination.js +1 -1
- package/dist/{ar-Bg_10XBG.js → ar-CtSPmWrk.js} +0 -5
- package/dist/{bg-DyIRbFaU.js → bg-DwW4tkzm.js} +0 -5
- package/dist/{bn-DrKXkRvN.js → bn-Df__ccyH.js} +0 -5
- package/dist/{bs-BF8upphm.js → bs-j17x02qr.js} +0 -5
- package/dist/{ca-CGMnsdII.js → ca-B94lUx7c.js} +0 -5
- package/dist/core/index.d.ts +1 -0
- package/dist/core/plugin.d.ts +11 -0
- package/dist/core.js +1 -1
- package/dist/{cs-B-jeNB5o.js → cs-DeDzN7tG.js} +0 -5
- package/dist/{da-BoHemyXx.js → da-DMpC5y8O.js} +0 -5
- package/dist/datatableConfig-E5_08Ch4.js +4 -0
- package/dist/{de-DNAaiTrc.js → de-CCNUZSup.js} +0 -5
- package/dist/{el-Cpg3pI7i.js → el-C2kkX76k.js} +0 -5
- package/dist/{en-gb-KsKdvLmV.js → en-gb-sbYhvlrM.js} +0 -5
- package/dist/{es-COziTcsp.js → es-mNgFJGue.js} +0 -5
- package/dist/{et-BdTtu9t_.js → et-D0ro6m_Z.js} +0 -5
- package/dist/{fa-B1Ebp36t.js → fa-DYekHC6-.js} +0 -5
- package/dist/{fi-b4XodxNE.js → fi-CNexLCO_.js} +0 -5
- package/dist/{fr-BIx4sO6s.js → fr-CUXtdWLj.js} +0 -5
- package/dist/{he-rf_Y5d64.js → he-D4BblsAD.js} +0 -5
- package/dist/{hr-DOuJJGF3.js → hr-1MNJjxDo.js} +0 -5
- package/dist/{hu-DMc8kv_1.js → hu-BiG8mSvH.js} +0 -5
- package/dist/{id-DclBfDY0.js → id-CABEuSQB.js} +0 -5
- package/dist/iframeCommunicator/index.d.ts +2 -0
- package/dist/iframeCommunicator/useIframeCommunicator.d.ts +8 -0
- package/dist/iframeCommunicator/useThemeFromParent.d.ts +9 -0
- package/dist/index.d.ts +3 -140
- package/dist/index.js +1 -1
- package/dist/{is-hPcr999q.js → is-DBUkoxb1.js} +0 -5
- package/dist/{it-Dfz57Ogc.js → it-Am_Oo5d5.js} +0 -5
- package/dist/{ja-Da6Dbgu8.js → ja-C4aaunra.js} +0 -5
- package/dist/{ka-DK-BKZD4.js → ka-CkzS4fNj.js} +0 -5
- package/dist/{kaa-BVd8dKz3.js → kaa-GTw11GU-.js} +0 -5
- package/dist/{kk-eE3-SI4R.js → kk-BRFq2Ctd.js} +0 -5
- package/dist/{ko-CUMtwCHy.js → ko-BbgS6BMk.js} +0 -5
- package/dist/{ky-CCU0MYbD.js → ky-ClK6HL0m.js} +0 -5
- package/dist/{lt-CpbQmiiW.js → lt-BE0ahgri.js} +0 -5
- package/dist/{mn-YYwo93uK.js → mn-C-Ktk8ht.js} +0 -5
- package/dist/{nl-WqtgByJL.js → nl-BiG9OH1y.js} +0 -5
- package/dist/{no-BOG8-aOm.js → no-DVdX7xTS.js} +0 -5
- package/dist/{pl-BH4AyCMF.js → pl-y_N8wVAF.js} +0 -5
- package/dist/plugin-BZB7f-c3.js +3444 -0
- package/dist/{pt-br-siyrXjdv.js → pt-br-Cx8Akpcu.js} +0 -5
- package/dist/{pt-pt-siyrXjdv.js → pt-pt-Cx8Akpcu.js} +0 -5
- package/dist/{ro-C9fU41Qi.js → ro-FfAZHwo1.js} +0 -5
- package/dist/{ru-_d_rl3a5.js → ru-BCE9k5uo.js} +0 -5
- package/dist/{sk-ZT421l3d.js → sk-D-7bEf3b.js} +0 -5
- package/dist/{sl-Ct8Gi5v1.js → sl-DoVrM4Ht.js} +0 -5
- package/dist/{sq-Cw7PWK-V.js → sq-Du8jVeq7.js} +0 -5
- package/dist/{sr-DO-S1wn3.js → sr-DP3yke6-.js} +0 -5
- package/dist/{sv-NXMCPui2.js → sv-C2iGWFqL.js} +0 -5
- package/dist/toast/components/ToastComponent.vue.d.ts +6 -0
- package/dist/toast/index.d.ts +1 -0
- package/dist/toast/useToastStore.d.ts +11 -0
- package/dist/toast.js +2 -2
- package/dist/{tr-BpieMIth.js → tr-CvlANdCR.js} +0 -5
- package/dist/{uk-CqVU4EoZ.js → uk-CxFb8w2s.js} +0 -5
- package/dist/utils/svgFactory.d.ts +8 -0
- package/dist/{uz-CmcB22-w.js → uz-DmJPqTjK.js} +0 -5
- package/dist/{uz-cryl-C_GBVdXl.js → uz-cryl-Dt065WNc.js} +0 -5
- package/dist/v-sistec-features.css +1 -11
- package/dist/vDataAgenda.js +1877 -1885
- package/dist/vDataPage.js +31 -41
- package/dist/vDataTable.js +43 -43
- package/dist/{vi-C9wTd3fG.js → vi-B8R5Ozvj.js} +0 -5
- package/dist/{zh-cn-DY7nkJwf.js → zh-cn-DnUuIcqx.js} +0 -5
- package/dist/{zh-hk-KkazoDdS.js → zh-hk-mDkIkhi9.js} +0 -5
- package/package.json +5 -1
- package/src/DataAgenda/VDataAgenda.vue +233 -77
- package/src/DataAgenda/components/AgendaMatrix.vue +1 -0
- package/src/DataAgenda/components/AgendaMatrixBase.vue +357 -140
- package/src/DataAgenda/components/AgendaMatrixUnico.vue +1 -0
- package/src/DataAgenda/components/AgendaTabelaHorario.vue +489 -316
- package/src/DataAgenda/components/AgendaVueCal.vue +1 -0
- package/src/DataAgenda/index.ts +2 -1
- package/src/Modals/components/BotaoFechar.vue +74 -0
- package/src/Modals/components/ModalAviso.vue +129 -0
- package/src/Modals/components/ModalBaseDefault.vue +374 -0
- package/src/Modals/components/ModalConfirmacao.vue +129 -0
- package/src/Modals/components/ModalConfirmacaoCheckbox.vue +155 -0
- package/src/Modals/components/ModalConfirmacaoInput.vue +200 -0
- package/src/Modals/components/ModalConfirmacaoSimples.vue +306 -0
- package/src/Modals/components/ModalInformacao.vue +129 -0
- package/src/Modals/components/ModalPerigo.vue +123 -0
- package/src/Modals/components/ModalSucesso.vue +123 -0
- package/src/Modals/components/interno/ModalDialogoInterno.vue +365 -0
- package/src/Modals/index.ts +32 -0
- package/src/core/plugin.ts +34 -41
- package/src/types/global.d.ts +7 -1
- package/dist/Pagination.d.ts +0 -27
- package/dist/core.d.ts +0 -117
- package/dist/datatableConfig-BMFlKtgh.js +0 -4
- package/dist/iframeCommunicator.d.ts +0 -22
- package/dist/plugin-BwqrOSD_.js +0 -2097
- package/dist/toast.d.ts +0 -19
- package/dist/vDataAgenda.d.ts +0 -929
- package/dist/vDataPage.d.ts +0 -117
- package/dist/vDataTable.d.ts +0 -294
|
@@ -0,0 +1,3444 @@
|
|
|
1
|
+
import ph from "v-required";
|
|
2
|
+
import mh from "vue-toastification";
|
|
3
|
+
import { D as _h } from "./datatableConfig-E5_08Ch4.js";
|
|
4
|
+
function gh(j, Ee) {
|
|
5
|
+
for (var w = 0; w < Ee.length; w++) {
|
|
6
|
+
const R = Ee[w];
|
|
7
|
+
if (typeof R != "string" && !Array.isArray(R)) {
|
|
8
|
+
for (const me in R)
|
|
9
|
+
if (me !== "default" && !(me in j)) {
|
|
10
|
+
const V = Object.getOwnPropertyDescriptor(R, me);
|
|
11
|
+
V && Object.defineProperty(j, me, V.get ? V : {
|
|
12
|
+
enumerable: !0,
|
|
13
|
+
get: () => R[me]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return Object.freeze(Object.defineProperty(j, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
+
}
|
|
20
|
+
function bh(j) {
|
|
21
|
+
return j && j.__esModule && Object.prototype.hasOwnProperty.call(j, "default") ? j.default : j;
|
|
22
|
+
}
|
|
23
|
+
var ft = { exports: {} };
|
|
24
|
+
var vh = ft.exports, oo;
|
|
25
|
+
function yh() {
|
|
26
|
+
return oo || (oo = 1, (function(j, Ee) {
|
|
27
|
+
(function(w, R) {
|
|
28
|
+
R(Ee);
|
|
29
|
+
})(vh, function(w) {
|
|
30
|
+
Object.defineProperty(w, Symbol.toStringTag, { value: "Module" });
|
|
31
|
+
var R = Object.defineProperty, me = (t, e) => {
|
|
32
|
+
let i = {};
|
|
33
|
+
for (var n in t) R(i, n, { get: t[n], enumerable: !0 });
|
|
34
|
+
return R(i, Symbol.toStringTag, { value: "Module" }), i;
|
|
35
|
+
}, V = /* @__PURE__ */ new Map(), pt = { set(t, e, i) {
|
|
36
|
+
V.has(t) || V.set(t, /* @__PURE__ */ new Map());
|
|
37
|
+
const n = V.get(t);
|
|
38
|
+
n.has(e) || n.size === 0 ? n.set(e, i) : console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`);
|
|
39
|
+
}, get: (t, e) => V.has(t) && V.get(t).get(e) || null, remove(t, e) {
|
|
40
|
+
if (!V.has(t)) return;
|
|
41
|
+
const i = V.get(t);
|
|
42
|
+
i.delete(e), i.size === 0 && V.delete(t);
|
|
43
|
+
} }, Ut = "transitionend", Gt = (t) => (t && typeof CSS < "u" && typeof CSS.escape == "function" && (t = t.replace(/#([^\s"#']+)/g, (e, i) => `#${CSS.escape(i)}`)), t), bo = (t) => t == null ? `${t}` : Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(), rn = (t) => {
|
|
44
|
+
t.dispatchEvent(new Event(Ut));
|
|
45
|
+
}, Xt = (t) => t && typeof t == "object" && t.jquery !== void 0 ? t[0] : t, te = (t) => !(!(t = Xt(t)) || typeof t != "object") && t.nodeType !== void 0, z = (t) => (t = Xt(t), te(t) ? t : typeof t == "string" && t.length > 0 ? document.querySelector(Gt(t)) : null), on = (t, e) => {
|
|
46
|
+
const i = Xt(t);
|
|
47
|
+
if (te(i) && !e.contains(i)) return i;
|
|
48
|
+
let n = document.activeElement;
|
|
49
|
+
for (; n?.shadowRoot?.activeElement; ) n = n.shadowRoot.activeElement;
|
|
50
|
+
return (n instanceof HTMLElement || n instanceof SVGElement) && n !== document.body && !e.contains(n) ? n : null;
|
|
51
|
+
}, an = (t, e) => {
|
|
52
|
+
if (!t || !Xe(t)) return;
|
|
53
|
+
const { activeElement: i } = document;
|
|
54
|
+
i && i !== document.body && !e.contains(i) || t.focus();
|
|
55
|
+
}, Xe = (t) => {
|
|
56
|
+
if (!te(t) || t.getClientRects().length === 0) return !1;
|
|
57
|
+
const e = getComputedStyle(t).getPropertyValue("visibility") === "visible", i = t.closest("details:not([open])");
|
|
58
|
+
if (!i) return e;
|
|
59
|
+
if (i !== t) {
|
|
60
|
+
const n = t.closest("summary");
|
|
61
|
+
if (n && n.parentNode !== i || n === null) return !1;
|
|
62
|
+
}
|
|
63
|
+
return e;
|
|
64
|
+
}, Z = (t) => !t || t.nodeType !== Node.ELEMENT_NODE || !!t.classList.contains("disabled") || ("disabled" in t && t.disabled !== void 0 ? !!t.disabled : t.hasAttribute("disabled") && t.getAttribute("disabled") !== "false"), ln = (t) => {
|
|
65
|
+
if (!document.documentElement.attachShadow) return null;
|
|
66
|
+
if (typeof t.getRootNode == "function") {
|
|
67
|
+
const e = t.getRootNode();
|
|
68
|
+
return e instanceof ShadowRoot ? e : null;
|
|
69
|
+
}
|
|
70
|
+
return t instanceof ShadowRoot ? t : t.parentNode ? ln(t.parentNode) : null;
|
|
71
|
+
}, mt = () => {
|
|
72
|
+
}, Qe = (t) => {
|
|
73
|
+
t.offsetHeight;
|
|
74
|
+
}, q = () => document.documentElement.dir === "rtl", cn = () => !window.jQuery || document.body.hasAttribute("data-bs-no-jquery") || document.body.hasAttribute("data-tblr-no-jquery") ? null : window.jQuery, Qt = [], _e = (t) => {
|
|
75
|
+
document.readyState === "loading" ? (Qt.length || document.addEventListener("DOMContentLoaded", () => {
|
|
76
|
+
for (const e of Qt) e();
|
|
77
|
+
}), Qt.push(t)) : t();
|
|
78
|
+
}, B = (t) => {
|
|
79
|
+
_e(() => {
|
|
80
|
+
const e = cn();
|
|
81
|
+
if (e) {
|
|
82
|
+
const i = t.NAME, n = e.fn[i];
|
|
83
|
+
e.fn[i] = t.jQueryInterface, e.fn[i].Constructor = t, e.fn[i].noConflict = () => (e.fn[i] = n, t.jQueryInterface);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}, F = (t, e = [], i = t) => typeof t == "function" ? t.call(e[0], ...e.slice(1)) : i, hn = (t, e, i = !0) => {
|
|
87
|
+
if (!i) return void F(t);
|
|
88
|
+
const n = ((o) => {
|
|
89
|
+
if (!o) return 0;
|
|
90
|
+
let { transitionDuration: a, transitionDelay: c } = window.getComputedStyle(o);
|
|
91
|
+
return Number.parseFloat(a) || Number.parseFloat(c) ? (a = a.split(",")[0], c = c.split(",")[0], 1e3 * (Number.parseFloat(a) + Number.parseFloat(c))) : 0;
|
|
92
|
+
})(e) + 5;
|
|
93
|
+
let s = !1;
|
|
94
|
+
const r = ({ target: o }) => {
|
|
95
|
+
o === e && (s = !0, e.removeEventListener(Ut, r), F(t));
|
|
96
|
+
};
|
|
97
|
+
e.addEventListener(Ut, r), setTimeout(() => {
|
|
98
|
+
s || rn(e);
|
|
99
|
+
}, n);
|
|
100
|
+
}, Zt = (t, e, i, n) => {
|
|
101
|
+
const s = t.length;
|
|
102
|
+
let r = t.indexOf(e);
|
|
103
|
+
return r === -1 ? !i && n ? t[s - 1] : t[0] : (r += i ? 1 : -1, n && (r = (r + s) % s), t[Math.max(0, Math.min(r, s - 1))]);
|
|
104
|
+
}, vo = /[^.]*(?=\..*)\.|.*/, yo = /\..*/, wo = /::\d+$/, Jt = {}, un = 1, dn = { mouseenter: "mouseover", mouseleave: "mouseout" }, Ao = /* @__PURE__ */ new Set(["click", "dblclick", "mouseup", "mousedown", "contextmenu", "mousewheel", "DOMMouseScroll", "mouseover", "mouseout", "mousemove", "selectstart", "selectend", "keydown", "keypress", "keyup", "orientationchange", "touchstart", "touchmove", "touchend", "touchcancel", "pointerdown", "pointermove", "pointerup", "pointerleave", "pointercancel", "gesturestart", "gesturechange", "gestureend", "focus", "blur", "change", "reset", "select", "submit", "focusin", "focusout", "load", "unload", "beforeunload", "resize", "move", "DOMContentLoaded", "readystatechange", "error", "abort", "scroll"]);
|
|
105
|
+
function fn(t, e) {
|
|
106
|
+
return e && `${e}::${un++}` || t.uidEvent || un++;
|
|
107
|
+
}
|
|
108
|
+
function pn(t) {
|
|
109
|
+
const e = fn(t);
|
|
110
|
+
return t.uidEvent = e, Jt[e] = Jt[e] || {}, Jt[e];
|
|
111
|
+
}
|
|
112
|
+
function mn(t, e, i = null) {
|
|
113
|
+
return Object.values(t).find((n) => n.callable === e && n.delegationSelector === i);
|
|
114
|
+
}
|
|
115
|
+
function _n(t, e, i) {
|
|
116
|
+
const n = typeof e == "string", s = n ? i : e || i;
|
|
117
|
+
let r = bn(t);
|
|
118
|
+
return Ao.has(r) || (r = t), [n, s, r];
|
|
119
|
+
}
|
|
120
|
+
function gn(t, e, i, n, s) {
|
|
121
|
+
if (typeof e != "string" || !t) return;
|
|
122
|
+
let [r, o, a] = _n(e, i, n);
|
|
123
|
+
e in dn && (o = ((g) => function(b) {
|
|
124
|
+
const _ = b;
|
|
125
|
+
if (!_.relatedTarget || _.relatedTarget !== _.delegateTarget && !_.delegateTarget.contains(_.relatedTarget)) return g.call(this, b);
|
|
126
|
+
})(o));
|
|
127
|
+
const c = pn(t), h = c[a] || (c[a] = {}), u = mn(h, o, r ? i : null);
|
|
128
|
+
if (u) return void (u.oneOff = u.oneOff && s);
|
|
129
|
+
const d = fn(o, e.replace(vo, "")), p = r ? /* @__PURE__ */ (function(m, g, b) {
|
|
130
|
+
return function _(x) {
|
|
131
|
+
const I = m.querySelectorAll(g);
|
|
132
|
+
for (let { target: y } = x; y && y !== this; y = y.parentNode) for (const E of I) if (E === y) return ti(x, { delegateTarget: y }), _.oneOff && l.off(m, x.type, g, b), b.apply(y, [x]);
|
|
133
|
+
};
|
|
134
|
+
})(t, i, o) : /* @__PURE__ */ (function(m, g) {
|
|
135
|
+
return function b(_) {
|
|
136
|
+
return ti(_, { delegateTarget: m }), b.oneOff && l.off(m, _.type, g), g.apply(m, [_]);
|
|
137
|
+
};
|
|
138
|
+
})(t, o);
|
|
139
|
+
p.delegationSelector = r ? i : null, p.callable = o, p.oneOff = s, p.uidEvent = d, h[d] = p, t.addEventListener(a, p, r);
|
|
140
|
+
}
|
|
141
|
+
function ei(t, e, i, n, s) {
|
|
142
|
+
const r = mn(e[i], n, s ?? null);
|
|
143
|
+
r && (t.removeEventListener(i, r, !!s), delete e[i][r.uidEvent]);
|
|
144
|
+
}
|
|
145
|
+
function Eo(t, e, i, n) {
|
|
146
|
+
const s = e[i] || {};
|
|
147
|
+
for (const [r, o] of Object.entries(s)) r.includes(n) && ei(t, e, i, o.callable, o.delegationSelector);
|
|
148
|
+
}
|
|
149
|
+
function bn(t) {
|
|
150
|
+
return t = t.replace(yo, ""), dn[t] || t;
|
|
151
|
+
}
|
|
152
|
+
var l = { on(t, e, i, n) {
|
|
153
|
+
gn(t, e, i, n, !1);
|
|
154
|
+
}, one(t, e, i, n) {
|
|
155
|
+
gn(t, e, i, n, !0);
|
|
156
|
+
}, off(t, e, i, n) {
|
|
157
|
+
if (typeof e != "string" || !t) return;
|
|
158
|
+
const [s, r, o] = _n(e, i, n), a = o !== e, c = pn(t), h = c[o] || {}, u = e.startsWith(".");
|
|
159
|
+
if (r === void 0) {
|
|
160
|
+
if (u) for (const d of Object.keys(c)) Eo(t, c, d, e.slice(1));
|
|
161
|
+
for (const [d, p] of Object.entries(h)) {
|
|
162
|
+
const m = d.replace(wo, "");
|
|
163
|
+
a && !e.includes(m) || ei(t, c, o, p.callable, p.delegationSelector);
|
|
164
|
+
}
|
|
165
|
+
} else {
|
|
166
|
+
if (!Object.keys(h).length) return;
|
|
167
|
+
ei(t, c, o, r, s ? i : null);
|
|
168
|
+
}
|
|
169
|
+
}, trigger(t, e, i) {
|
|
170
|
+
if (typeof e != "string" || !t) return null;
|
|
171
|
+
const n = cn();
|
|
172
|
+
let s = null, r = !0, o = !0, a = !1;
|
|
173
|
+
e !== bn(e) && n && (s = n.Event(e, i), n(t).trigger(s), r = !s.isPropagationStopped(), o = !s.isImmediatePropagationStopped(), a = s.isDefaultPrevented());
|
|
174
|
+
const c = ti(new Event(e, { bubbles: r, cancelable: !0 }), i);
|
|
175
|
+
return a && c.preventDefault(), o && t.dispatchEvent(c), c.defaultPrevented && s && s.preventDefault(), c;
|
|
176
|
+
} };
|
|
177
|
+
function ti(t, e = {}) {
|
|
178
|
+
for (const [i, n] of Object.entries(e)) try {
|
|
179
|
+
t[i] = n;
|
|
180
|
+
} catch {
|
|
181
|
+
Object.defineProperty(t, i, { configurable: !0, get: () => n });
|
|
182
|
+
}
|
|
183
|
+
return t;
|
|
184
|
+
}
|
|
185
|
+
function vn(t) {
|
|
186
|
+
if (t === "true") return !0;
|
|
187
|
+
if (t === "false") return !1;
|
|
188
|
+
if (t === Number(t).toString()) return Number(t);
|
|
189
|
+
if (t === "" || t === "null") return null;
|
|
190
|
+
if (typeof t != "string") return t;
|
|
191
|
+
try {
|
|
192
|
+
return JSON.parse(decodeURIComponent(t));
|
|
193
|
+
} catch {
|
|
194
|
+
return t;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function ii(t) {
|
|
198
|
+
return t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
|
|
199
|
+
}
|
|
200
|
+
var ni = ["tblr", "bs"], L = { setDataAttribute(t, e, i) {
|
|
201
|
+
t.setAttribute(`data-bs-${ii(e)}`, i);
|
|
202
|
+
}, removeDataAttribute(t, e) {
|
|
203
|
+
for (const i of ni) t.removeAttribute(`data-${i}-${ii(e)}`);
|
|
204
|
+
}, getDataAttributes(t) {
|
|
205
|
+
if (!t) return {};
|
|
206
|
+
const e = {};
|
|
207
|
+
for (const i of ni) {
|
|
208
|
+
const n = Object.keys(t.dataset).filter((s) => s.startsWith(i) && !s.startsWith(`${i}Config`));
|
|
209
|
+
for (const s of n) {
|
|
210
|
+
let r = s.replace(new RegExp(`^${i}`), "");
|
|
211
|
+
r = r.charAt(0).toLowerCase() + r.slice(1), r in e || (e[r] = vn(t.dataset[s]));
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return e;
|
|
215
|
+
}, getDataAttribute(t, e) {
|
|
216
|
+
for (const i of ni) {
|
|
217
|
+
const n = t.getAttribute(`data-${i}-${ii(e)}`);
|
|
218
|
+
if (n !== null) return vn(n);
|
|
219
|
+
}
|
|
220
|
+
return null;
|
|
221
|
+
} }, Ze = class {
|
|
222
|
+
static get Default() {
|
|
223
|
+
return {};
|
|
224
|
+
}
|
|
225
|
+
static get DefaultType() {
|
|
226
|
+
return {};
|
|
227
|
+
}
|
|
228
|
+
static get NAME() {
|
|
229
|
+
throw new Error('You have to implement the static method "NAME", for each component!');
|
|
230
|
+
}
|
|
231
|
+
_getConfig(t) {
|
|
232
|
+
return t = this._mergeConfigObj(t), t = this._configAfterMerge(t), this._typeCheckConfig(t), t;
|
|
233
|
+
}
|
|
234
|
+
_configAfterMerge(t) {
|
|
235
|
+
return t;
|
|
236
|
+
}
|
|
237
|
+
_mergeConfigObj(t, e) {
|
|
238
|
+
const i = te(e) ? L.getDataAttribute(e, "config") : {};
|
|
239
|
+
return { ...this.constructor.Default, ...typeof i == "object" ? i : {}, ...te(e) ? L.getDataAttributes(e) : {}, ...typeof t == "object" ? t : {} };
|
|
240
|
+
}
|
|
241
|
+
_typeCheckConfig(t, e) {
|
|
242
|
+
const i = this.constructor, n = e || i.DefaultType;
|
|
243
|
+
for (const [s, r] of Object.entries(n)) {
|
|
244
|
+
const o = t[s], a = te(o) ? "element" : bo(o);
|
|
245
|
+
if (!new RegExp(r).test(a)) throw new TypeError(`${i.NAME.toUpperCase()}: Option "${s}" provided type "${a}" but expected type "${r}".`);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}, O = class extends Ze {
|
|
249
|
+
constructor(t, e) {
|
|
250
|
+
super();
|
|
251
|
+
const i = z(t);
|
|
252
|
+
if (!i) return;
|
|
253
|
+
const n = this.constructor;
|
|
254
|
+
pt.get(i, n.DATA_KEY)?.dispose(), this._element = i, this._config = this._getConfig(e), pt.set(this._element, n.DATA_KEY, this);
|
|
255
|
+
}
|
|
256
|
+
dispose() {
|
|
257
|
+
const t = this.constructor;
|
|
258
|
+
pt.remove(this._element, t.DATA_KEY), l.off(this._element, t.EVENT_KEY);
|
|
259
|
+
for (const e of Object.getOwnPropertyNames(this)) this[e] = null;
|
|
260
|
+
}
|
|
261
|
+
_queueCallback(t, e, i = !0) {
|
|
262
|
+
hn(() => {
|
|
263
|
+
this._element && t();
|
|
264
|
+
}, e, i);
|
|
265
|
+
}
|
|
266
|
+
_getConfig(t) {
|
|
267
|
+
return t = this._mergeConfigObj(t, this._element), t = this._configAfterMerge(t), this._typeCheckConfig(t), t;
|
|
268
|
+
}
|
|
269
|
+
static getInstance(t) {
|
|
270
|
+
return pt.get(z(t), this.DATA_KEY);
|
|
271
|
+
}
|
|
272
|
+
static getOrCreateInstance(t, e = {}) {
|
|
273
|
+
return this.getInstance(t) || new this(t, typeof e == "object" ? e : void 0);
|
|
274
|
+
}
|
|
275
|
+
static get VERSION() {
|
|
276
|
+
return "5.3.8";
|
|
277
|
+
}
|
|
278
|
+
static get DATA_KEY() {
|
|
279
|
+
return `bs.${this.NAME}`;
|
|
280
|
+
}
|
|
281
|
+
static get EVENT_KEY() {
|
|
282
|
+
return `.${this.DATA_KEY}`;
|
|
283
|
+
}
|
|
284
|
+
static eventName(t) {
|
|
285
|
+
return `${t}${this.EVENT_KEY}`;
|
|
286
|
+
}
|
|
287
|
+
}, si = (t) => {
|
|
288
|
+
let e = t.getAttribute("data-tblr-target") || t.getAttribute("data-bs-target");
|
|
289
|
+
if (!e || e === "#") {
|
|
290
|
+
let i = t.getAttribute("href");
|
|
291
|
+
if (!i || !i.includes("#") && !i.startsWith(".")) return null;
|
|
292
|
+
i.includes("#") && !i.startsWith("#") && (i = `#${i.split("#")[1]}`), e = i && i !== "#" ? i.trim() : null;
|
|
293
|
+
}
|
|
294
|
+
return e ? e.split(",").map((i) => Gt(i)).join(",") : null;
|
|
295
|
+
}, f = { find: (t, e = document.documentElement) => Array.from(e.querySelectorAll(t)), findOne: (t, e = document.documentElement) => e.querySelector(t), children: (t, e) => Array.from(t.children).filter((i) => i.matches(e)), parents(t, e) {
|
|
296
|
+
const i = [];
|
|
297
|
+
let n = t.parentNode && t.parentNode.closest(e);
|
|
298
|
+
for (; n; ) i.push(n), n = n.parentNode && n.parentNode.closest(e);
|
|
299
|
+
return i;
|
|
300
|
+
}, prev(t, e) {
|
|
301
|
+
let i = t.previousElementSibling;
|
|
302
|
+
for (; i; ) {
|
|
303
|
+
if (i.matches(e)) return [i];
|
|
304
|
+
i = i.previousElementSibling;
|
|
305
|
+
}
|
|
306
|
+
return [];
|
|
307
|
+
}, next(t, e) {
|
|
308
|
+
let i = t.nextElementSibling;
|
|
309
|
+
for (; i; ) {
|
|
310
|
+
if (i.matches(e)) return [i];
|
|
311
|
+
i = i.nextElementSibling;
|
|
312
|
+
}
|
|
313
|
+
return [];
|
|
314
|
+
}, focusableChildren(t) {
|
|
315
|
+
const e = ["a", "button", "input", "textarea", "select", "details", "[tabindex]", '[contenteditable="true"]'].map((i) => `${i}:not([tabindex^="-"])`).join(",");
|
|
316
|
+
return this.find(e, t).filter((i) => !Z(i) && Xe(i));
|
|
317
|
+
}, getSelectorFromElement(t) {
|
|
318
|
+
const e = si(t);
|
|
319
|
+
return e && f.findOne(e) ? e : null;
|
|
320
|
+
}, getElementFromSelector(t) {
|
|
321
|
+
const e = si(t);
|
|
322
|
+
return e ? f.findOne(e) : null;
|
|
323
|
+
}, getMultipleElementsFromSelector(t) {
|
|
324
|
+
const e = si(t);
|
|
325
|
+
return e ? f.find(e) : [];
|
|
326
|
+
} }, _t = (t, e = "hide") => {
|
|
327
|
+
const i = `click.dismiss${t.EVENT_KEY}`, n = t.NAME;
|
|
328
|
+
l.on(document, i, `[data-bs-dismiss="${n}"], [data-tblr-dismiss="${n}"]`, function(s) {
|
|
329
|
+
if (["A", "AREA"].includes(this.tagName) && s.preventDefault(), Z(this)) return;
|
|
330
|
+
const r = f.getElementFromSelector(this) || this.closest(`.${n}`);
|
|
331
|
+
((o, a) => {
|
|
332
|
+
const c = o[a];
|
|
333
|
+
typeof c == "function" && c.call(o);
|
|
334
|
+
})(t.getOrCreateInstance(r), e);
|
|
335
|
+
});
|
|
336
|
+
}, J = (t, e, i = null) => {
|
|
337
|
+
for (const n of f.find(t)) if (!i || i(n)) try {
|
|
338
|
+
e.getOrCreateInstance(n);
|
|
339
|
+
} catch (s) {
|
|
340
|
+
console.error(s);
|
|
341
|
+
}
|
|
342
|
+
}, gt = "autosize", xo = `resized.bs.${gt}`, To = `[data-bs-toggle="${gt}"], [data-tblr-toggle="${gt}"]`, Co = {}, ko = {}, yn = class extends O {
|
|
343
|
+
constructor(t, e) {
|
|
344
|
+
super(t, e), this._observer = null, this._inlineStyle = "", this._width = 0, this._onInput = () => this.update(), this._element && (this._inlineStyle = this._element.getAttribute("style") ?? "", this._element.style.resize = "none", this._element.style.overflowY = "hidden", this._element.addEventListener("input", this._onInput), typeof ResizeObserver < "u" && (this._observer = new ResizeObserver(() => {
|
|
345
|
+
this._element.offsetWidth !== this._width && (this._width = this._element.offsetWidth, this.update());
|
|
346
|
+
}), this._observer.observe(this._element)), this.update());
|
|
347
|
+
}
|
|
348
|
+
static get Default() {
|
|
349
|
+
return Co;
|
|
350
|
+
}
|
|
351
|
+
static get DefaultType() {
|
|
352
|
+
return ko;
|
|
353
|
+
}
|
|
354
|
+
static get NAME() {
|
|
355
|
+
return gt;
|
|
356
|
+
}
|
|
357
|
+
update() {
|
|
358
|
+
const t = this._element;
|
|
359
|
+
if (!t.isConnected || t.getClientRects().length === 0) return;
|
|
360
|
+
const { scrollTop: e } = document.documentElement, i = getComputedStyle(t), n = i.boxSizing === "border-box" ? Number.parseFloat(i.borderTopWidth) + Number.parseFloat(i.borderBottomWidth) : -(Number.parseFloat(i.paddingTop) + Number.parseFloat(i.paddingBottom)), s = t.style.height;
|
|
361
|
+
t.style.overflowY = "hidden", t.style.height = "auto";
|
|
362
|
+
const r = `${t.scrollHeight + n}px`;
|
|
363
|
+
t.style.height = r, t.style.overflowY = t.scrollHeight > t.clientHeight ? "auto" : "hidden", document.documentElement.scrollTop = e, r !== s && l.trigger(t, xo);
|
|
364
|
+
}
|
|
365
|
+
dispose() {
|
|
366
|
+
this._element.removeEventListener("input", this._onInput), this._observer?.disconnect(), this._inlineStyle ? this._element.setAttribute("style", this._inlineStyle) : this._element.removeAttribute("style"), super.dispose();
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
J(To, yn);
|
|
370
|
+
var Me = "clipboard", ri = `.bs.${Me}`, So = `copied${ri}`, wn = `error${ri}`, Io = `[data-bs-toggle="${Me}"], [data-tblr-toggle="${Me}"]`, Oo = `.${Me}-label`, Do = `.${Me}-feedback`, Mo = { target: null, text: null, delay: 2e3 }, $o = { target: "(string|null)", text: "(string|number|null)", delay: "number" }, oi = (t, e) => {
|
|
371
|
+
e ? t.setAttribute("hidden", "") : t.removeAttribute("hidden");
|
|
372
|
+
}, An = class extends O {
|
|
373
|
+
constructor(t, e) {
|
|
374
|
+
if (super(t, e), this._labels = [], this._feedbacks = [], this._timeout = 0, this._element) {
|
|
375
|
+
this._labels = f.find(Oo, this._element), this._feedbacks = f.find(Do, this._element);
|
|
376
|
+
for (const i of this._feedbacks) oi(i, !0), i.hasAttribute("role") || i.setAttribute("role", "status");
|
|
377
|
+
l.on(this._element, `click${ri}`, (i) => {
|
|
378
|
+
i.preventDefault(), this.copy();
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
static get Default() {
|
|
383
|
+
return Mo;
|
|
384
|
+
}
|
|
385
|
+
static get DefaultType() {
|
|
386
|
+
return $o;
|
|
387
|
+
}
|
|
388
|
+
static get NAME() {
|
|
389
|
+
return Me;
|
|
390
|
+
}
|
|
391
|
+
get text() {
|
|
392
|
+
const { text: t, target: e } = this._config;
|
|
393
|
+
if (t !== null && t !== "") return String(t);
|
|
394
|
+
const i = e ? z(e) : null;
|
|
395
|
+
return i ? i instanceof HTMLInputElement || i instanceof HTMLTextAreaElement ? i.value : (i instanceof HTMLElement ? i.innerText : i.textContent ?? "").trim() : "";
|
|
396
|
+
}
|
|
397
|
+
async copy() {
|
|
398
|
+
const { text: t } = this;
|
|
399
|
+
if (t && navigator.clipboard) {
|
|
400
|
+
try {
|
|
401
|
+
await navigator.clipboard.writeText(t);
|
|
402
|
+
} catch {
|
|
403
|
+
return void l.trigger(this._element, wn);
|
|
404
|
+
}
|
|
405
|
+
this._showCopied(), l.trigger(this._element, So);
|
|
406
|
+
} else l.trigger(this._element, wn);
|
|
407
|
+
}
|
|
408
|
+
reset() {
|
|
409
|
+
window.clearTimeout(this._timeout), this._toggleCopied(!1);
|
|
410
|
+
}
|
|
411
|
+
dispose() {
|
|
412
|
+
window.clearTimeout(this._timeout), super.dispose();
|
|
413
|
+
}
|
|
414
|
+
_mergeConfigObj(t, e) {
|
|
415
|
+
const i = e?.getAttribute("data-bs-text") ?? e?.getAttribute("data-tblr-text"), n = i == null ? {} : { text: i };
|
|
416
|
+
return super._mergeConfigObj({ ...n, ...t }, e);
|
|
417
|
+
}
|
|
418
|
+
_showCopied() {
|
|
419
|
+
window.clearTimeout(this._timeout), this._toggleCopied(!0), this._config.delay > 0 && (this._timeout = window.setTimeout(() => this._toggleCopied(!1), this._config.delay));
|
|
420
|
+
}
|
|
421
|
+
_toggleCopied(t) {
|
|
422
|
+
this._element.classList.toggle("copied", t);
|
|
423
|
+
for (const e of this._labels) oi(e, t);
|
|
424
|
+
for (const e of this._feedbacks) oi(e, !t);
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
J(Io, An);
|
|
428
|
+
var ai = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, Je = "confetti", li = `.bs.${Je}`, Lo = `start${li}`, ci = `end${li}`, No = `click${li}.data-api`, Po = `${Je}-canvas`, jo = `[data-bs-toggle="${Je}"], [data-tblr-toggle="${Je}"]`, Fo = [["blue", "#066fd1"], ["azure", "#4299e1"], ["indigo", "#4263eb"], ["purple", "#ae3ec9"], ["pink", "#d6336c"], ["red", "#d63939"], ["orange", "#f76707"], ["yellow", "#f59f00"], ["lime", "#74b816"], ["green", "#2fb344"], ["teal", "#0ca678"], ["cyan", "#17a2b8"]], zo = 1e3 / 60, Bo = { count: 220, duration: 3500, decay: 3.5, fade: 0.15, speed: 1, colors: null }, Wo = { count: "number", duration: "number", decay: "number", fade: "number", speed: "number", colors: "(array|string|null)" }, En = { canvas: null, context: null, particles: [], emitters: [], frame: 0, lastTick: 0, add(t) {
|
|
429
|
+
return this._mount(), !!this.context && (this.emitters.push(t), this.frame || (this.lastTick = performance.now(), this.frame = requestAnimationFrame((e) => this._tick(e))), !0);
|
|
430
|
+
}, _mount() {
|
|
431
|
+
if (this.canvas) return;
|
|
432
|
+
const t = document.createElement("canvas");
|
|
433
|
+
t.className = Po, t.setAttribute("aria-hidden", "true"), Object.assign(t.style, { position: "fixed", inset: "0", width: "100%", height: "100%", zIndex: "9999", pointerEvents: "none", display: "block" });
|
|
434
|
+
const e = t.getContext("2d");
|
|
435
|
+
e && (document.body.append(t), this.canvas = t, this.context = e, this._resize(), window.addEventListener("resize", this._onResize));
|
|
436
|
+
}, _unmount() {
|
|
437
|
+
cancelAnimationFrame(this.frame), this.frame = 0, window.removeEventListener("resize", this._onResize), this.canvas?.remove(), this.canvas = null, this.context = null, this.particles = [], this.emitters = [];
|
|
438
|
+
}, _onResize: () => {
|
|
439
|
+
En._resize();
|
|
440
|
+
}, _resize() {
|
|
441
|
+
if (!this.canvas || !this.context) return;
|
|
442
|
+
const t = Math.min(window.devicePixelRatio || 1, 2);
|
|
443
|
+
this.canvas.width = document.documentElement.clientWidth * t, this.canvas.height = window.innerHeight * t, this.context.setTransform(t, 0, 0, t, 0, 0);
|
|
444
|
+
}, _spawn(t) {
|
|
445
|
+
const { colors: e, config: i } = t, n = window.innerHeight / 800 * i.speed;
|
|
446
|
+
return { emitter: t, x: Math.random() * window.innerWidth, y: -20 - 30 * Math.random(), w: 6 + 3.6 * Math.random(), h: 10 + 4.4 * Math.random(), color: e[Math.floor(Math.random() * e.length)] ?? "#000", vx: 1.2 * (Math.random() - 0.5), vy: (1.5 + 2.1 * Math.random()) * n, speed: n, angle: Math.random() * Math.PI * 2, spin: 0.25 * (Math.random() - 0.5), flip: Math.random() * Math.PI * 2, flipSpeed: 0.12 + 0.15 * Math.random(), sway: Math.random() * Math.PI * 2, alpha: 1 };
|
|
447
|
+
}, _pour(t, e) {
|
|
448
|
+
const { count: i, duration: n, decay: s } = t.config, r = e - t.startedAt;
|
|
449
|
+
if (t.stopped || r >= n) return;
|
|
450
|
+
const o = r / n, a = Math.round(i * (1 - Math.exp(-s * o)) / (1 - Math.exp(-s)));
|
|
451
|
+
for (; t.emitted < a; ) this.particles.push(this._spawn(t)), t.emitted++;
|
|
452
|
+
}, _tick(t) {
|
|
453
|
+
const e = this.context;
|
|
454
|
+
if (!e) return;
|
|
455
|
+
const i = Math.min((t - this.lastTick) / zo, 3);
|
|
456
|
+
this.lastTick = t;
|
|
457
|
+
const n = window.innerWidth, s = window.innerHeight;
|
|
458
|
+
e.clearRect(0, 0, n, s);
|
|
459
|
+
for (const r of this.emitters) this._pour(r, t);
|
|
460
|
+
for (let r = this.particles.length - 1; r >= 0; r--) {
|
|
461
|
+
const o = this.particles[r], a = s * (1 - o.emitter.config.fade);
|
|
462
|
+
o.sway += 0.05 * i, o.vy = Math.min(o.vy + 0.025 * o.speed * i, 4.2 * o.speed), o.x += (o.vx + 0.7 * Math.sin(o.sway)) * i, o.y += o.vy * i, o.angle += o.spin * i, o.flip += o.flipSpeed * i, o.y > a && (o.alpha = Math.max(0, 1 - (o.y - a) / (s - a))), o.alpha !== 0 ? (e.save(), e.globalAlpha = o.alpha, e.translate(o.x, o.y), e.rotate(o.angle), e.scale(1, Math.cos(o.flip)), e.fillStyle = o.color, e.fillRect(-o.w / 2, -o.h / 2, o.w, o.h), e.restore()) : this.particles.splice(r, 1);
|
|
463
|
+
}
|
|
464
|
+
this._settle(t), this.emitters.length !== 0 ? this.frame = requestAnimationFrame((r) => this._tick(r)) : this._unmount();
|
|
465
|
+
}, _settle(t) {
|
|
466
|
+
for (let e = this.emitters.length - 1; e >= 0; e--) {
|
|
467
|
+
const i = this.emitters[e], n = !i.stopped && t - i.startedAt < i.config.duration, s = this.particles.some((r) => r.emitter === i);
|
|
468
|
+
n || s || (this.emitters.splice(e, 1), i.done = !0, i.detached || l.trigger(i.element, ci));
|
|
469
|
+
}
|
|
470
|
+
} }, xn = class extends O {
|
|
471
|
+
constructor(t, e) {
|
|
472
|
+
super(t, e), this._emitter = null;
|
|
473
|
+
}
|
|
474
|
+
static get Default() {
|
|
475
|
+
return Bo;
|
|
476
|
+
}
|
|
477
|
+
static get DefaultType() {
|
|
478
|
+
return Wo;
|
|
479
|
+
}
|
|
480
|
+
static get NAME() {
|
|
481
|
+
return Je;
|
|
482
|
+
}
|
|
483
|
+
burst() {
|
|
484
|
+
l.trigger(this._element, Lo)?.defaultPrevented || (this.stop(), ai() ? l.trigger(this._element, ci) : (this._emitter = { element: this._element, config: this._config, colors: this._colors(), startedAt: performance.now(), emitted: 0, stopped: !1, done: !1, detached: !1 }, En.add(this._emitter) || (this._emitter = null, l.trigger(this._element, ci))));
|
|
485
|
+
}
|
|
486
|
+
stop() {
|
|
487
|
+
this._emitter && !this._emitter.done && (this._emitter.stopped = !0), this._emitter = null;
|
|
488
|
+
}
|
|
489
|
+
dispose() {
|
|
490
|
+
this._emitter && (this._emitter.detached = !0), this.stop(), super.dispose();
|
|
491
|
+
}
|
|
492
|
+
_configAfterMerge(t) {
|
|
493
|
+
return typeof t.colors == "string" && (t.colors = t.colors.split(",").map((e) => e.trim()).filter(Boolean)), t;
|
|
494
|
+
}
|
|
495
|
+
_colors() {
|
|
496
|
+
const { colors: t } = this._config;
|
|
497
|
+
if (t && t.length > 0) return t;
|
|
498
|
+
const e = getComputedStyle(document.documentElement);
|
|
499
|
+
return Fo.map(([i, n]) => e.getPropertyValue(`--tblr-${i}`).trim() || n);
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
l.on(document, No, jo, function(t) {
|
|
503
|
+
if (["A", "AREA"].includes(this.tagName) && t.preventDefault(), Z(this)) return;
|
|
504
|
+
const e = f.getElementFromSelector(this) || this, i = L.getDataAttributes(this), n = xn.getOrCreateInstance(e, i);
|
|
505
|
+
e !== this && (n._config = n._getConfig(i)), n.burst();
|
|
506
|
+
});
|
|
507
|
+
var bt = "countup", Tn = `.bs.${bt}`, Cn = `data-${bt}`, Ho = `start${Tn}`, Ro = `complete${Tn}`, kn = `data-tblr-${bt}`, Vo = `[${Cn}], [${kn}]`, qo = { autoAnimate: !0, startVal: 0, duration: 2, decimalPlaces: 0, useEasing: !0, useGrouping: !0, separator: ",", decimal: ".", prefix: "", suffix: "", format: "number", formatter: null }, Sn = { autoAnimate: "boolean", startVal: "number", duration: "number", decimalPlaces: "number", useEasing: "boolean", useGrouping: "boolean", separator: "string", decimal: "string", prefix: "string", suffix: "string", format: "string", formatter: "(function|null)" }, Yo = (t) => {
|
|
508
|
+
const e = { ...t };
|
|
509
|
+
for (const [i, n] of Object.entries(t)) {
|
|
510
|
+
const s = Sn[i];
|
|
511
|
+
typeof n != "string" || s !== "number" || n.trim() === "" || Number.isNaN(Number(n)) ? typeof n != "string" || s !== "boolean" || n !== "true" && n !== "false" ? typeof n == "number" && s === "string" && (e[i] = String(n)) : e[i] = n === "true" : e[i] = Number(n);
|
|
512
|
+
}
|
|
513
|
+
return e;
|
|
514
|
+
}, In = (t, e) => {
|
|
515
|
+
if (typeof t == "number") return t;
|
|
516
|
+
if (e === "time") {
|
|
517
|
+
const i = /^\D{0,32}(\d{1,4}):(\d{1,2})/.exec(t);
|
|
518
|
+
return i ? 60 * Number(i[1]) + Number(i[2]) : NaN;
|
|
519
|
+
}
|
|
520
|
+
return Number.parseFloat(t.replace(/[^0-9.-]/g, ""));
|
|
521
|
+
}, On = class extends O {
|
|
522
|
+
constructor(t, e) {
|
|
523
|
+
if (super(t, e), this._endVal = 0, this._value = 0, this._frame = 0, this._observer = null, this._from = 0, this._elapsed = 0, this._running = !1, this._paused = !1, this._started = !1, !this._element) return;
|
|
524
|
+
const i = In(this._element.textContent ?? "", this._config.format);
|
|
525
|
+
Number.isNaN(i) || (this._endVal = i, this._value = this._config.startVal, this._print(this._value), this._config.autoAnimate && typeof IntersectionObserver < "u" ? (this._observer = new IntersectionObserver((n) => this._observerCallback(n)), this._observer.observe(this._element)) : this.start());
|
|
526
|
+
}
|
|
527
|
+
static get Default() {
|
|
528
|
+
return qo;
|
|
529
|
+
}
|
|
530
|
+
static get DefaultType() {
|
|
531
|
+
return Sn;
|
|
532
|
+
}
|
|
533
|
+
static get NAME() {
|
|
534
|
+
return bt;
|
|
535
|
+
}
|
|
536
|
+
start() {
|
|
537
|
+
this._animate(this._value, this._endVal);
|
|
538
|
+
}
|
|
539
|
+
reset() {
|
|
540
|
+
this._stop(), this._started = !1, this._value = this._config.startVal, this._print(this._value);
|
|
541
|
+
}
|
|
542
|
+
update(t) {
|
|
543
|
+
const e = In(t, this._config.format);
|
|
544
|
+
Number.isNaN(e) || (this._endVal = e, this._animate(this._value, this._endVal));
|
|
545
|
+
}
|
|
546
|
+
pauseResume() {
|
|
547
|
+
this._paused ? (this._paused = !1, this._run()) : this._running && (this._paused = !0, cancelAnimationFrame(this._frame));
|
|
548
|
+
}
|
|
549
|
+
dispose() {
|
|
550
|
+
this._stop(), this._observer?.disconnect(), super.dispose();
|
|
551
|
+
}
|
|
552
|
+
_mergeConfigObj(t, e) {
|
|
553
|
+
let i = {};
|
|
554
|
+
const n = e?.getAttribute(Cn) ?? e?.getAttribute(kn);
|
|
555
|
+
if (n) try {
|
|
556
|
+
const s = JSON.parse(n);
|
|
557
|
+
s && typeof s == "object" && !Array.isArray(s) && (i = s);
|
|
558
|
+
} catch {
|
|
559
|
+
}
|
|
560
|
+
return super._mergeConfigObj({ ...Yo(i), ...t }, e);
|
|
561
|
+
}
|
|
562
|
+
_observerCallback(t) {
|
|
563
|
+
t.some((e) => e.isIntersecting) && (this._observer?.disconnect(), this._observer = null, this._started || this.start());
|
|
564
|
+
}
|
|
565
|
+
_animate(t, e) {
|
|
566
|
+
this._stop(), this._started = !0, t === e || this._config.duration <= 0 || ai() ? this._finish(e) : (this._from = t, this._elapsed = 0, this._running = !0, l.trigger(this._element, Ho), this._run());
|
|
567
|
+
}
|
|
568
|
+
_run() {
|
|
569
|
+
const t = 1e3 * this._config.duration;
|
|
570
|
+
let e = performance.now();
|
|
571
|
+
const i = (n) => {
|
|
572
|
+
this._elapsed += n - e, e = n;
|
|
573
|
+
const s = Math.min(1, this._elapsed / t), r = this._config.useEasing ? ((o) => o >= 1 ? 1 : 1024 * (1 - 2 ** (-10 * o)) / 1023)(s) : s;
|
|
574
|
+
this._value = this._from + (this._endVal - this._from) * r, this._print(this._value), s < 1 ? this._frame = requestAnimationFrame(i) : this._finish(this._endVal);
|
|
575
|
+
};
|
|
576
|
+
this._frame = requestAnimationFrame(i);
|
|
577
|
+
}
|
|
578
|
+
_finish(t) {
|
|
579
|
+
this._running = !1, this._paused = !1, this._value = t, this._print(t), l.trigger(this._element, Ro);
|
|
580
|
+
}
|
|
581
|
+
_stop() {
|
|
582
|
+
cancelAnimationFrame(this._frame), this._running = !1, this._paused = !1;
|
|
583
|
+
}
|
|
584
|
+
_print(t) {
|
|
585
|
+
this._element.textContent = this._format(t);
|
|
586
|
+
}
|
|
587
|
+
_format(t) {
|
|
588
|
+
const { decimalPlaces: e, useGrouping: i, separator: n, decimal: s, prefix: r, suffix: o, format: a, formatter: c } = this._config;
|
|
589
|
+
if (c) return c(t);
|
|
590
|
+
if (a === "time") {
|
|
591
|
+
const m = Math.sign(t) * Math.round(Math.abs(t)), g = Math.abs(m);
|
|
592
|
+
return `${m < 0 ? "-" : ""}${r}${Math.floor(g / 60)}:${String(g % 60).padStart(2, "0")}${o}`;
|
|
593
|
+
}
|
|
594
|
+
const h = t.toFixed(e), [u, d] = h.replace("-", "").split("."), p = i ? u.replace(/\B(?=(\d{3})+(?!\d))/g, n) : u;
|
|
595
|
+
return `${Number(h) < 0 ? "-" : ""}${r}${p}${d ? s + d : ""}${o}`;
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
J(Vo, On);
|
|
599
|
+
var Dn = "datepicker", ge = `.bs.${Dn}`, Mn = ".data-api", Ko = `change${ge}`, $n = `show${ge}`, Uo = `shown${ge}`, Ln = `hide${ge}`, Go = `hidden${ge}`, Nn = `focusin${ge}`, Xo = `click${ge}${Mn}`, Qo = `focusin${ge}${Mn}`, hi = '[data-bs-toggle="datepicker"], [data-tblr-toggle="datepicker"]', Pn = 'input[type="hidden"], input[name]', et = /^(\d{4})-(\d{2})-(\d{2})$/, jn = /YYYY|MM|M|DD|D/g, Zo = ["annotations", "months", "motion", "time", "weeks"], Fn = /* @__PURE__ */ new WeakMap(), Jo = { boundInput: null, datepickerTheme: null, dateMin: null, dateMax: null, dateFormat: null, displayElement: null, displayMonthsCount: 1, firstWeekday: 1, inline: !1, locale: "default", positionElement: null, selectedDates: [], selectionMode: "single", placement: "left", weekNumbers: !1, vcpOptions: {} }, ea = { boundInput: "(null|string|element)", datepickerTheme: "(null|string)", dateMin: "(null|string|number|object|date)", dateMax: "(null|string|number|object|date)", dateFormat: "(null|string|object|function)", displayElement: "(null|string|element|boolean)", displayMonthsCount: "number", firstWeekday: "number", inline: "boolean", locale: "string", positionElement: "(null|string|element)", selectedDates: "array", selectionMode: "string", placement: "string", weekNumbers: "boolean", vcpOptions: "object" }, $e = (t, e = 2) => String(t).padStart(e, "0"), zn = (t) => {
|
|
600
|
+
setTimeout(() => setTimeout(t));
|
|
601
|
+
}, vt = class extends O {
|
|
602
|
+
constructor(t, e) {
|
|
603
|
+
super(t, e), this._calendar = null, this._isShown = !1, this._isShowing = !1, this._isHiding = !1, this._isSilent = !1, this._skipPluginShow = !1, this._resolveShown = null, this._hideTimeout = 0, this._isInput = !1, this._isInline = !1, this._boundInput = null, this._boundInputInside = !1, this._positionElement = null, this._displayElement = null, this._themeObserver = null, this._onFocusIn = null, this._onResize = () => this._alignToPositionElement(), this._selectedDates = [], this._element && window.VanillaCalendarPro && this._initCalendar();
|
|
604
|
+
}
|
|
605
|
+
static get Default() {
|
|
606
|
+
return Jo;
|
|
607
|
+
}
|
|
608
|
+
static get DefaultType() {
|
|
609
|
+
return ea;
|
|
610
|
+
}
|
|
611
|
+
static get NAME() {
|
|
612
|
+
return Dn;
|
|
613
|
+
}
|
|
614
|
+
get calendar() {
|
|
615
|
+
return this._calendar;
|
|
616
|
+
}
|
|
617
|
+
toggle() {
|
|
618
|
+
return this._config.inline ? Promise.resolve() : this._isShown ? this.hide() : this.show();
|
|
619
|
+
}
|
|
620
|
+
async show() {
|
|
621
|
+
if (!this._config.inline && this._calendar && !Z(this._element) && !this._isShown && !this._isShowing && !l.trigger(this._element, $n)?.defaultPrevented) {
|
|
622
|
+
this._isShowing = !0, this._skipPluginShow = !1;
|
|
623
|
+
try {
|
|
624
|
+
this._calendar.show(), this._isShown || await new Promise((t) => {
|
|
625
|
+
this._resolveShown = t, zn(t);
|
|
626
|
+
});
|
|
627
|
+
} finally {
|
|
628
|
+
this._resolveShown = null, this._isShowing = !1;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
async hide() {
|
|
633
|
+
if (!this._config.inline && this._calendar && this._isShown && !l.trigger(this._element, Ln)?.defaultPrevented) {
|
|
634
|
+
this._skipPluginShow = !0, zn(() => {
|
|
635
|
+
this._skipPluginShow = !1;
|
|
636
|
+
}), this._isHiding = !0;
|
|
637
|
+
try {
|
|
638
|
+
this._calendar.hide();
|
|
639
|
+
} finally {
|
|
640
|
+
this._isHiding = !1;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
dispose() {
|
|
645
|
+
if (window.clearTimeout(this._hideTimeout), this._themeObserver?.disconnect(), window.removeEventListener("resize", this._onResize), this._onFocusIn && l.off(document, Nn, this._onFocusIn), this._calendar) {
|
|
646
|
+
this._calendar.destroy();
|
|
647
|
+
const t = this._calendar.context.mainElement;
|
|
648
|
+
if (t && t !== this._element && t.isConnected) {
|
|
649
|
+
if (this._isInput) t.replaceWith(this._element);
|
|
650
|
+
else if (this._boundInput && this._boundInputInside) {
|
|
651
|
+
const e = f.findOne(Pn, t);
|
|
652
|
+
e ? e.replaceWith(this._boundInput) : t.append(this._boundInput);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
super.dispose();
|
|
657
|
+
}
|
|
658
|
+
getSelectedDates() {
|
|
659
|
+
const t = this._calendar?.context?.selectedDates;
|
|
660
|
+
return t && t.length > 0 ? [...t] : [...this._selectedDates];
|
|
661
|
+
}
|
|
662
|
+
setSelectedDates(t) {
|
|
663
|
+
this._select(t.map((e) => this._toIsoDate(e))), this._writeSelection(this._selectedDates);
|
|
664
|
+
}
|
|
665
|
+
_initCalendar() {
|
|
666
|
+
this._isInput = this._element.tagName === "INPUT", this._isInline = this._config.inline, this._boundInput = this._resolveBoundInput(), this._boundInputInside = !!(this._boundInput && this._element.contains(this._boundInput)), this._positionElement = this._resolvePositionElement(), this._displayElement = this._resolveDisplayElement(), this._selectedDates = [...this._config.selectedDates], this._calendar = new window.VanillaCalendarPro.Calendar(this._element, this._buildCalendarOptions()), this._calendar.init(), this._boundInput && !this._boundInput.isConnected && this._element.after(this._boundInput), this._setupThemeObserver(), this._setupDismissOnFocus(), this._isInput && this._element.value && this._parseInputValue();
|
|
667
|
+
const t = this._boundInput?.value.split(",").filter((e) => et.test(e));
|
|
668
|
+
this._selectedDates.length === 0 && t?.length && this._select(t), this._updateDisplayWithSelectedDates();
|
|
669
|
+
}
|
|
670
|
+
_updateDisplayWithSelectedDates() {
|
|
671
|
+
this._selectedDates.length !== 0 && this._writeSelection(this._selectedDates);
|
|
672
|
+
}
|
|
673
|
+
_writeSelection(t) {
|
|
674
|
+
const e = this._formatDateForInput(t);
|
|
675
|
+
this._isInput && (this._element.value = e, Fn.set(this._element, { text: e, dates: [...t] })), this._boundInput && (this._boundInput.value = t.join(",")), this._displayElement && (this._displayElement.textContent = e);
|
|
676
|
+
}
|
|
677
|
+
_resolveBoundInput() {
|
|
678
|
+
const { boundInput: t } = this._config;
|
|
679
|
+
return t ? z(t) : this._isInline && !this._isInput ? f.findOne(Pn, this._element) : null;
|
|
680
|
+
}
|
|
681
|
+
_resolvePositionElement() {
|
|
682
|
+
let { positionElement: t } = this._config;
|
|
683
|
+
return typeof t == "string" && (t = z(t)), t || !this._isInput || this._isInline || (t = this._element.closest(".input-icon, .input-group")), t || this._element;
|
|
684
|
+
}
|
|
685
|
+
_resolveDisplayElement() {
|
|
686
|
+
const { displayElement: t } = this._config;
|
|
687
|
+
return typeof t == "string" ? z(t) : t === !0 || t === null && !this._isInput && !this._isInline ? f.findOne("[data-bs-datepicker-display], [data-tblr-datepicker-display]", this._element) || this._element : t;
|
|
688
|
+
}
|
|
689
|
+
_alignToPositionElement() {
|
|
690
|
+
const t = this._calendar?.context?.mainElement;
|
|
691
|
+
if (!t || this._isInline || !this._positionElement || this._positionElement === this._element) return;
|
|
692
|
+
const e = this._positionElement.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
693
|
+
let { placement: n } = this._config;
|
|
694
|
+
n === "auto" && (n = e.left + i.width > document.documentElement.clientWidth ? "right" : "left");
|
|
695
|
+
const s = n === "right" ? e.right - i.width : n === "center" ? e.left + (e.width - i.width) / 2 : e.left;
|
|
696
|
+
t.style.left = `${s + window.scrollX}px`;
|
|
697
|
+
}
|
|
698
|
+
_getThemeAncestor() {
|
|
699
|
+
return this._element.closest("[data-bs-theme]");
|
|
700
|
+
}
|
|
701
|
+
_getEffectiveTheme() {
|
|
702
|
+
const { datepickerTheme: t } = this._config;
|
|
703
|
+
return t || this._getThemeAncestor()?.getAttribute("data-bs-theme") || null;
|
|
704
|
+
}
|
|
705
|
+
_syncThemeAttribute(t) {
|
|
706
|
+
if (!t) return;
|
|
707
|
+
const e = this._getEffectiveTheme();
|
|
708
|
+
e ? t.setAttribute("data-bs-theme", e) : t.removeAttribute("data-bs-theme");
|
|
709
|
+
}
|
|
710
|
+
_setupThemeObserver() {
|
|
711
|
+
const t = this._getThemeAncestor();
|
|
712
|
+
t && !this._config.datepickerTheme && (this._themeObserver = new MutationObserver(() => {
|
|
713
|
+
this._syncThemeAttribute(this._calendar?.context?.mainElement);
|
|
714
|
+
}), this._themeObserver.observe(t, { attributes: !0, attributeFilter: ["data-bs-theme"] }));
|
|
715
|
+
}
|
|
716
|
+
_setupDismissOnFocus() {
|
|
717
|
+
this._isInline || (this._onFocusIn = (t) => {
|
|
718
|
+
if (!this._isShown) return;
|
|
719
|
+
const { target: e } = t, i = this._calendar?.context?.mainElement;
|
|
720
|
+
e instanceof Node && (this._element.contains(e) || i?.contains(e)) || this.hide();
|
|
721
|
+
}, l.on(document, Nn, this._onFocusIn));
|
|
722
|
+
}
|
|
723
|
+
_silently(t) {
|
|
724
|
+
this._isSilent = !0, t(), this._isSilent = !1;
|
|
725
|
+
}
|
|
726
|
+
_handlePluginShow() {
|
|
727
|
+
const t = this._calendar;
|
|
728
|
+
if (!t) return;
|
|
729
|
+
if (!this._isSilent && !this._isShown && (this._skipPluginShow || !this._isShowing && l.trigger(this._element, $n)?.defaultPrevented)) return void this._silently(() => t.hide());
|
|
730
|
+
const e = this._isShown;
|
|
731
|
+
this._isShown = !0, this._syncThemeAttribute(t.context.mainElement), this._alignToPositionElement(), window.removeEventListener("resize", this._onResize), window.addEventListener("resize", this._onResize), e || l.trigger(this._element, Uo), this._resolveShown?.();
|
|
732
|
+
}
|
|
733
|
+
_handlePluginHide() {
|
|
734
|
+
const t = this._calendar;
|
|
735
|
+
t && !this._isSilent && this._isShown && (this._isHiding || !l.trigger(this._element, Ln)?.defaultPrevented ? (this._isShown = !1, window.removeEventListener("resize", this._onResize), l.trigger(this._element, Go)) : this._silently(() => t.show()));
|
|
736
|
+
}
|
|
737
|
+
_calendarExtensions(t = []) {
|
|
738
|
+
const e = window.VanillaCalendarPro, i = [...t];
|
|
739
|
+
for (const n of Zo) {
|
|
740
|
+
const s = e?.[n];
|
|
741
|
+
s && typeof s == "object" && !i.includes(s) && i.push(s);
|
|
742
|
+
}
|
|
743
|
+
return i;
|
|
744
|
+
}
|
|
745
|
+
_buildCalendarOptions() {
|
|
746
|
+
const t = this._getEffectiveTheme(), e = t && t !== "auto" ? t : "system", i = this._config.vcpOptions, n = this._calendarExtensions(i.extensions), s = { ...i, ...n.length > 0 ? { extensions: n } : {}, inputMode: !this._isInline, positionToInput: this._config.placement, firstWeekday: this._config.firstWeekday, locale: this._config.locale, selectionDatesMode: this._config.selectionMode, selectedDates: this._config.selectedDates, displayMonthsCount: this._config.displayMonthsCount, enableWeekNumbers: this._config.weekNumbers || !!i.enableWeekNumbers, type: this._config.displayMonthsCount > 1 ? "multiple" : "default", selectedTheme: e, themeAttrDetect: "[data-bs-theme]", onClickDate: (o, a) => this._handleDateClick(o, a), onInit: (o) => {
|
|
747
|
+
this._syncThemeAttribute(o.context.mainElement);
|
|
748
|
+
}, onShow: () => this._handlePluginShow(), onHide: () => this._handlePluginHide() }, [r] = this._config.selectedDates;
|
|
749
|
+
if (r) {
|
|
750
|
+
const o = this._parseDate(r);
|
|
751
|
+
s.selectedMonth = o.getMonth(), s.selectedYear = o.getFullYear();
|
|
752
|
+
}
|
|
753
|
+
return this._config.dateMin && (s.dateMin = this._config.dateMin), this._config.dateMax && (s.dateMax = this._config.dateMax), s;
|
|
754
|
+
}
|
|
755
|
+
_handleDateClick(t, e) {
|
|
756
|
+
const i = [...t.context.selectedDates];
|
|
757
|
+
this._selectedDates = i, this._writeSelection(i);
|
|
758
|
+
const n = { dates: i, event: e };
|
|
759
|
+
l.trigger(this._element, Ko, n), this._maybeHideAfterSelection(i);
|
|
760
|
+
}
|
|
761
|
+
_maybeHideAfterSelection(t) {
|
|
762
|
+
this._isInline || (this._config.selectionMode === "single" && t.length > 0 || this._config.selectionMode === "multiple-ranged" && t.length >= 2) && (window.clearTimeout(this._hideTimeout), this._hideTimeout = window.setTimeout(() => {
|
|
763
|
+
this.hide();
|
|
764
|
+
}, 100));
|
|
765
|
+
}
|
|
766
|
+
_parseDate(t) {
|
|
767
|
+
const [e = 0, i = 1, n = 1] = t.split("-").map(Number);
|
|
768
|
+
return new Date(e, i - 1, n);
|
|
769
|
+
}
|
|
770
|
+
_formatDate(t) {
|
|
771
|
+
const e = this._parseDate(t), i = this._config.locale === "default" ? void 0 : this._config.locale, { dateFormat: n } = this._config;
|
|
772
|
+
return typeof n == "string" ? ((s, r) => {
|
|
773
|
+
const o = { YYYY: $e(s.getFullYear(), 4), MM: $e(s.getMonth() + 1), M: String(s.getMonth() + 1), DD: $e(s.getDate()), D: String(s.getDate()) };
|
|
774
|
+
return r.replace(jn, (a) => o[a]);
|
|
775
|
+
})(e, this._formatPattern()) : typeof n == "function" ? n(e, i) : n && typeof n == "object" ? new Intl.DateTimeFormat(i, n).format(e) : e.toLocaleDateString(i);
|
|
776
|
+
}
|
|
777
|
+
_formatPattern() {
|
|
778
|
+
const { dateFormat: t } = this._config;
|
|
779
|
+
return typeof t != "string" ? null : t.toLowerCase() === "iso" ? "YYYY-MM-DD" : t;
|
|
780
|
+
}
|
|
781
|
+
_dateSeparator() {
|
|
782
|
+
return this._config.selectionMode === "multiple-ranged" ? " – " : ", ";
|
|
783
|
+
}
|
|
784
|
+
_formatDateForInput(t) {
|
|
785
|
+
return t.length === 0 ? "" : t.length === 1 ? this._formatDate(t[0]) : t.map((e) => this._formatDate(e)).join(this._dateSeparator());
|
|
786
|
+
}
|
|
787
|
+
_parseInputValue() {
|
|
788
|
+
const t = this._element.value.trim();
|
|
789
|
+
if (!t) return;
|
|
790
|
+
const e = Fn.get(this._element);
|
|
791
|
+
if (e && e.text.trim() === t) return void this._select(e.dates);
|
|
792
|
+
const i = this._formatPattern();
|
|
793
|
+
if (i) {
|
|
794
|
+
const s = (this._config.selectionMode === "single" ? [t] : t.split(this._dateSeparator())).map((r) => ((o, a) => {
|
|
795
|
+
const c = [], h = a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(jn, (_) => (c.push(_[0]), _ === "YYYY" ? "(\\d{4})" : _.length === 2 ? "(\\d{2})" : "(\\d{1,2})")), u = new RegExp(`^${h}$`).exec(o);
|
|
796
|
+
if (!u) return null;
|
|
797
|
+
const d = { Y: 0, M: 1, D: 1 };
|
|
798
|
+
c.forEach((_, x) => {
|
|
799
|
+
d[_] = Number(u[x + 1]);
|
|
800
|
+
});
|
|
801
|
+
const { Y: p = 0, M: m = 1, D: g = 1 } = d, b = new Date(p, m - 1, g);
|
|
802
|
+
return b.getMonth() === m - 1 && b.getDate() === g ? `${$e(p, 4)}-${$e(m)}-${$e(g)}` : null;
|
|
803
|
+
})(r.trim(), i));
|
|
804
|
+
if (s.every(Boolean)) return void this._select(s);
|
|
805
|
+
}
|
|
806
|
+
const n = et.test(t) ? this._parseDate(t) : new Date(t);
|
|
807
|
+
Number.isNaN(n.getTime()) || this._select([this._toIsoDate(n)]);
|
|
808
|
+
}
|
|
809
|
+
_select(t) {
|
|
810
|
+
this._selectedDates = [...t], this._calendar?.set({ selectedDates: this._selectedDates, ...this._monthOf(this._selectedDates[0]) });
|
|
811
|
+
}
|
|
812
|
+
_toIsoDate(t) {
|
|
813
|
+
if (typeof t == "string" && et.test(t)) return t;
|
|
814
|
+
const e = t instanceof Date ? t : typeof t == "string" && et.test(t) ? this._parseDate(t) : new Date(t);
|
|
815
|
+
return Number.isNaN(e.getTime()) ? String(t) : `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
816
|
+
}
|
|
817
|
+
_monthOf(t) {
|
|
818
|
+
if (!t || !et.test(t)) return {};
|
|
819
|
+
const e = this._parseDate(t);
|
|
820
|
+
return { selectedMonth: e.getMonth(), selectedYear: e.getFullYear() };
|
|
821
|
+
}
|
|
822
|
+
};
|
|
823
|
+
l.on(document, Xo, hi, function(t) {
|
|
824
|
+
this.tagName !== "INPUT" && this.dataset.bsInline !== "true" && this.dataset.tblrInline !== "true" && (t.preventDefault(), vt.getOrCreateInstance(this).toggle());
|
|
825
|
+
}), l.on(document, Qo, hi, function() {
|
|
826
|
+
this.tagName === "INPUT" && vt.getOrCreateInstance(this).show();
|
|
827
|
+
}), J(hi, vt, (t) => {
|
|
828
|
+
const { dataset: e } = t;
|
|
829
|
+
return e.bsInline === "true" || e.tblrInline === "true" || "bsSelectedDates" in e || "tblrSelectedDates" in e || "bsBoundInput" in e || "tblrBoundInput" in e || !!t.value;
|
|
830
|
+
});
|
|
831
|
+
var Bn = "data-mask", Wn = "data-mask-visible", ta = `[${Bn}]`, ia = { mask: "", lazy: !0 }, na = { mask: "(string|function|regexp|object|array)", lazy: "boolean" }, Hn = class extends O {
|
|
832
|
+
constructor(t, e) {
|
|
833
|
+
super(t, e), this._mask = null, this._element && this._config.mask && window.IMask && (this._mask = new window.IMask(this._element, { ...this._config }));
|
|
834
|
+
}
|
|
835
|
+
static get Default() {
|
|
836
|
+
return ia;
|
|
837
|
+
}
|
|
838
|
+
static get DefaultType() {
|
|
839
|
+
return na;
|
|
840
|
+
}
|
|
841
|
+
static get NAME() {
|
|
842
|
+
return "input-mask";
|
|
843
|
+
}
|
|
844
|
+
get mask() {
|
|
845
|
+
return this._mask;
|
|
846
|
+
}
|
|
847
|
+
update() {
|
|
848
|
+
this._mask?.updateValue();
|
|
849
|
+
}
|
|
850
|
+
dispose() {
|
|
851
|
+
this._mask?.destroy(), super.dispose();
|
|
852
|
+
}
|
|
853
|
+
_mergeConfigObj(t, e) {
|
|
854
|
+
const i = {}, n = e?.getAttribute(Bn);
|
|
855
|
+
return n && (i.mask = n), e?.hasAttribute(Wn) && (i.lazy = e.getAttribute(Wn) === "false"), super._mergeConfigObj({ ...i, ...t }, e);
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
J(ta, Hn);
|
|
859
|
+
var ie = "bottom", ce = "right", ne = "left", Rn = "auto", Le = ["top", ie, ce, ne], tt = "start", Vn = "clippingParents", qn = "viewport", ui = "popper", Yn = "reference", di = Le.reduce(function(t, e) {
|
|
860
|
+
return t.concat([e + "-" + tt, e + "-end"]);
|
|
861
|
+
}, []), fi = [].concat(Le, [Rn]).reduce(function(t, e) {
|
|
862
|
+
return t.concat([e, e + "-" + tt, e + "-end"]);
|
|
863
|
+
}, []), Kn = "beforeRead", Un = "read", Gn = "afterRead", Xn = "beforeMain", Qn = "main", Zn = "afterMain", Jn = "beforeWrite", es = "write", ts = "afterWrite", is = [Kn, Un, Gn, Xn, Qn, Zn, Jn, es, ts];
|
|
864
|
+
function se(t) {
|
|
865
|
+
return t ? (t.nodeName || "").toLowerCase() : null;
|
|
866
|
+
}
|
|
867
|
+
function W(t) {
|
|
868
|
+
if (t == null) return window;
|
|
869
|
+
if (t.toString() !== "[object Window]") {
|
|
870
|
+
var e = t.ownerDocument;
|
|
871
|
+
return e && e.defaultView || window;
|
|
872
|
+
}
|
|
873
|
+
return t;
|
|
874
|
+
}
|
|
875
|
+
function xe(t) {
|
|
876
|
+
return t instanceof W(t).Element || t instanceof Element;
|
|
877
|
+
}
|
|
878
|
+
function Y(t) {
|
|
879
|
+
return t instanceof W(t).HTMLElement || t instanceof HTMLElement;
|
|
880
|
+
}
|
|
881
|
+
function pi(t) {
|
|
882
|
+
return typeof ShadowRoot < "u" && (t instanceof W(t).ShadowRoot || t instanceof ShadowRoot);
|
|
883
|
+
}
|
|
884
|
+
var mi = { name: "applyStyles", enabled: !0, phase: "write", fn: function(t) {
|
|
885
|
+
var e = t.state;
|
|
886
|
+
Object.keys(e.elements).forEach(function(i) {
|
|
887
|
+
var n = e.styles[i] || {}, s = e.attributes[i] || {}, r = e.elements[i];
|
|
888
|
+
Y(r) && se(r) && (Object.assign(r.style, n), Object.keys(s).forEach(function(o) {
|
|
889
|
+
var a = s[o];
|
|
890
|
+
a === !1 ? r.removeAttribute(o) : r.setAttribute(o, a === !0 ? "" : a);
|
|
891
|
+
}));
|
|
892
|
+
});
|
|
893
|
+
}, effect: function(t) {
|
|
894
|
+
var e = t.state, i = { popper: { position: e.options.strategy, left: "0", top: "0", margin: "0" }, arrow: { position: "absolute" }, reference: {} };
|
|
895
|
+
return Object.assign(e.elements.popper.style, i.popper), e.styles = i, e.elements.arrow && Object.assign(e.elements.arrow.style, i.arrow), function() {
|
|
896
|
+
Object.keys(e.elements).forEach(function(n) {
|
|
897
|
+
var s = e.elements[n], r = e.attributes[n] || {}, o = Object.keys(e.styles.hasOwnProperty(n) ? e.styles[n] : i[n]).reduce(function(a, c) {
|
|
898
|
+
return a[c] = "", a;
|
|
899
|
+
}, {});
|
|
900
|
+
Y(s) && se(s) && (Object.assign(s.style, o), Object.keys(r).forEach(function(a) {
|
|
901
|
+
s.removeAttribute(a);
|
|
902
|
+
}));
|
|
903
|
+
});
|
|
904
|
+
};
|
|
905
|
+
}, requires: ["computeStyles"] };
|
|
906
|
+
function re(t) {
|
|
907
|
+
return t.split("-")[0];
|
|
908
|
+
}
|
|
909
|
+
var Te = Math.max, yt = Math.min, Ne = Math.round;
|
|
910
|
+
function _i() {
|
|
911
|
+
var t = navigator.userAgentData;
|
|
912
|
+
return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
|
|
913
|
+
return e.brand + "/" + e.version;
|
|
914
|
+
}).join(" ") : navigator.userAgent;
|
|
915
|
+
}
|
|
916
|
+
function ns() {
|
|
917
|
+
return !/^((?!chrome|android).)*safari/i.test(_i());
|
|
918
|
+
}
|
|
919
|
+
function Pe(t, e, i) {
|
|
920
|
+
e === void 0 && (e = !1), i === void 0 && (i = !1);
|
|
921
|
+
var n = t.getBoundingClientRect(), s = 1, r = 1;
|
|
922
|
+
e && Y(t) && (s = t.offsetWidth > 0 && Ne(n.width) / t.offsetWidth || 1, r = t.offsetHeight > 0 && Ne(n.height) / t.offsetHeight || 1);
|
|
923
|
+
var o = (xe(t) ? W(t) : window).visualViewport, a = !ns() && i, c = (n.left + (a && o ? o.offsetLeft : 0)) / s, h = (n.top + (a && o ? o.offsetTop : 0)) / r, u = n.width / s, d = n.height / r;
|
|
924
|
+
return { width: u, height: d, top: h, right: c + u, bottom: h + d, left: c, x: c, y: h };
|
|
925
|
+
}
|
|
926
|
+
function gi(t) {
|
|
927
|
+
var e = Pe(t), i = t.offsetWidth, n = t.offsetHeight;
|
|
928
|
+
return Math.abs(e.width - i) <= 1 && (i = e.width), Math.abs(e.height - n) <= 1 && (n = e.height), { x: t.offsetLeft, y: t.offsetTop, width: i, height: n };
|
|
929
|
+
}
|
|
930
|
+
function ss(t, e) {
|
|
931
|
+
var i = e.getRootNode && e.getRootNode();
|
|
932
|
+
if (t.contains(e)) return !0;
|
|
933
|
+
if (i && pi(i)) {
|
|
934
|
+
var n = e;
|
|
935
|
+
do {
|
|
936
|
+
if (n && t.isSameNode(n)) return !0;
|
|
937
|
+
n = n.parentNode || n.host;
|
|
938
|
+
} while (n);
|
|
939
|
+
}
|
|
940
|
+
return !1;
|
|
941
|
+
}
|
|
942
|
+
function he(t) {
|
|
943
|
+
return W(t).getComputedStyle(t);
|
|
944
|
+
}
|
|
945
|
+
function sa(t) {
|
|
946
|
+
return ["table", "td", "th"].indexOf(se(t)) >= 0;
|
|
947
|
+
}
|
|
948
|
+
function be(t) {
|
|
949
|
+
return ((xe(t) ? t.ownerDocument : t.document) || window.document).documentElement;
|
|
950
|
+
}
|
|
951
|
+
function wt(t) {
|
|
952
|
+
return se(t) === "html" ? t : t.assignedSlot || t.parentNode || (pi(t) ? t.host : null) || be(t);
|
|
953
|
+
}
|
|
954
|
+
function rs(t) {
|
|
955
|
+
return Y(t) && he(t).position !== "fixed" ? t.offsetParent : null;
|
|
956
|
+
}
|
|
957
|
+
function it(t) {
|
|
958
|
+
for (var e = W(t), i = rs(t); i && sa(i) && he(i).position === "static"; ) i = rs(i);
|
|
959
|
+
return i && (se(i) === "html" || se(i) === "body" && he(i).position === "static") ? e : i || (function(n) {
|
|
960
|
+
var s = /firefox/i.test(_i());
|
|
961
|
+
if (/Trident/i.test(_i()) && Y(n) && he(n).position === "fixed") return null;
|
|
962
|
+
var r = wt(n);
|
|
963
|
+
for (pi(r) && (r = r.host); Y(r) && ["html", "body"].indexOf(se(r)) < 0; ) {
|
|
964
|
+
var o = he(r);
|
|
965
|
+
if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || s && o.willChange === "filter" || s && o.filter && o.filter !== "none") return r;
|
|
966
|
+
r = r.parentNode;
|
|
967
|
+
}
|
|
968
|
+
return null;
|
|
969
|
+
})(t) || e;
|
|
970
|
+
}
|
|
971
|
+
function bi(t) {
|
|
972
|
+
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
|
|
973
|
+
}
|
|
974
|
+
function nt(t, e, i) {
|
|
975
|
+
return Te(t, yt(e, i));
|
|
976
|
+
}
|
|
977
|
+
function os(t) {
|
|
978
|
+
return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, t);
|
|
979
|
+
}
|
|
980
|
+
function as(t, e) {
|
|
981
|
+
return e.reduce(function(i, n) {
|
|
982
|
+
return i[n] = t, i;
|
|
983
|
+
}, {});
|
|
984
|
+
}
|
|
985
|
+
var ls = { name: "arrow", enabled: !0, phase: "main", fn: function(t) {
|
|
986
|
+
var e, i = t.state, n = t.name, s = t.options, r = i.elements.arrow, o = i.modifiersData.popperOffsets, a = re(i.placement), c = bi(a), h = ["left", "right"].indexOf(a) >= 0 ? "height" : "width";
|
|
987
|
+
if (r && o) {
|
|
988
|
+
var u = (function(k, C) {
|
|
989
|
+
return os(typeof (k = typeof k == "function" ? k(Object.assign({}, C.rects, { placement: C.placement })) : k) != "number" ? k : as(k, Le));
|
|
990
|
+
})(s.padding, i), d = gi(r), p = c === "y" ? "top" : ne, m = c === "y" ? ie : ce, g = i.rects.reference[h] + i.rects.reference[c] - o[c] - i.rects.popper[h], b = o[c] - i.rects.reference[c], _ = it(r), x = _ ? c === "y" ? _.clientHeight || 0 : _.clientWidth || 0 : 0, I = g / 2 - b / 2, y = u[p], E = x - d[h] - u[m], v = x / 2 - d[h] / 2 + I, A = nt(y, v, E), T = c;
|
|
991
|
+
i.modifiersData[n] = ((e = {})[T] = A, e.centerOffset = A - v, e);
|
|
992
|
+
}
|
|
993
|
+
}, effect: function(t) {
|
|
994
|
+
var e = t.state, i = t.options.element, n = i === void 0 ? "[data-popper-arrow]" : i;
|
|
995
|
+
n != null && (typeof n != "string" || (n = e.elements.popper.querySelector(n))) && ss(e.elements.popper, n) && (e.elements.arrow = n);
|
|
996
|
+
}, requires: ["popperOffsets"], requiresIfExists: ["preventOverflow"] };
|
|
997
|
+
function je(t) {
|
|
998
|
+
return t.split("-")[1];
|
|
999
|
+
}
|
|
1000
|
+
var ra = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
|
|
1001
|
+
function cs(t) {
|
|
1002
|
+
var e, i = t.popper, n = t.popperRect, s = t.placement, r = t.variation, o = t.offsets, a = t.position, c = t.gpuAcceleration, h = t.adaptive, u = t.roundOffsets, d = t.isFixed, p = o.x, m = p === void 0 ? 0 : p, g = o.y, b = g === void 0 ? 0 : g, _ = typeof u == "function" ? u({ x: m, y: b }) : { x: m, y: b };
|
|
1003
|
+
m = _.x, b = _.y;
|
|
1004
|
+
var x = o.hasOwnProperty("x"), I = o.hasOwnProperty("y"), y = ne, E = "top", v = window;
|
|
1005
|
+
if (h) {
|
|
1006
|
+
var A = it(i), T = "clientHeight", k = "clientWidth";
|
|
1007
|
+
A === W(i) && he(A = be(i)).position !== "static" && a === "absolute" && (T = "scrollHeight", k = "scrollWidth"), (s === "top" || (s === "left" || s === "right") && r === "end") && (E = ie, b -= (d && A === v && v.visualViewport ? v.visualViewport.height : A[T]) - n.height, b *= c ? 1 : -1), s !== "left" && (s !== "top" && s !== "bottom" || r !== "end") || (y = ce, m -= (d && A === v && v.visualViewport ? v.visualViewport.width : A[k]) - n.width, m *= c ? 1 : -1);
|
|
1008
|
+
}
|
|
1009
|
+
var C, M = Object.assign({ position: a }, h && ra), H = u === !0 ? (function(ee, N) {
|
|
1010
|
+
var G = ee.x, X = ee.y, D = N.devicePixelRatio || 1;
|
|
1011
|
+
return { x: Ne(G * D) / D || 0, y: Ne(X * D) / D || 0 };
|
|
1012
|
+
})({ x: m, y: b }, W(i)) : { x: m, y: b };
|
|
1013
|
+
return m = H.x, b = H.y, c ? Object.assign({}, M, ((C = {})[E] = I ? "0" : "", C[y] = x ? "0" : "", C.transform = (v.devicePixelRatio || 1) <= 1 ? "translate(" + m + "px, " + b + "px)" : "translate3d(" + m + "px, " + b + "px, 0)", C)) : Object.assign({}, M, ((e = {})[E] = I ? b + "px" : "", e[y] = x ? m + "px" : "", e.transform = "", e));
|
|
1014
|
+
}
|
|
1015
|
+
var vi = { name: "computeStyles", enabled: !0, phase: "beforeWrite", fn: function(t) {
|
|
1016
|
+
var e = t.state, i = t.options, n = i.gpuAcceleration, s = n === void 0 || n, r = i.adaptive, o = r === void 0 || r, a = i.roundOffsets, c = a === void 0 || a, h = { placement: re(e.placement), variation: je(e.placement), popper: e.elements.popper, popperRect: e.rects.popper, gpuAcceleration: s, isFixed: e.options.strategy === "fixed" };
|
|
1017
|
+
e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, cs(Object.assign({}, h, { offsets: e.modifiersData.popperOffsets, position: e.options.strategy, adaptive: o, roundOffsets: c })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, cs(Object.assign({}, h, { offsets: e.modifiersData.arrow, position: "absolute", adaptive: !1, roundOffsets: c })))), e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-placement": e.placement });
|
|
1018
|
+
}, data: {} }, At = { passive: !0 }, yi = { name: "eventListeners", enabled: !0, phase: "write", fn: function() {
|
|
1019
|
+
}, effect: function(t) {
|
|
1020
|
+
var e = t.state, i = t.instance, n = t.options, s = n.scroll, r = s === void 0 || s, o = n.resize, a = o === void 0 || o, c = W(e.elements.popper), h = [].concat(e.scrollParents.reference, e.scrollParents.popper);
|
|
1021
|
+
return r && h.forEach(function(u) {
|
|
1022
|
+
u.addEventListener("scroll", i.update, At);
|
|
1023
|
+
}), a && c.addEventListener("resize", i.update, At), function() {
|
|
1024
|
+
r && h.forEach(function(u) {
|
|
1025
|
+
u.removeEventListener("scroll", i.update, At);
|
|
1026
|
+
}), a && c.removeEventListener("resize", i.update, At);
|
|
1027
|
+
};
|
|
1028
|
+
}, data: {} }, oa = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
|
1029
|
+
function Et(t) {
|
|
1030
|
+
return t.replace(/left|right|bottom|top/g, function(e) {
|
|
1031
|
+
return oa[e];
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1034
|
+
var aa = { start: "end", end: "start" };
|
|
1035
|
+
function hs(t) {
|
|
1036
|
+
return t.replace(/start|end/g, function(e) {
|
|
1037
|
+
return aa[e];
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
function wi(t) {
|
|
1041
|
+
var e = W(t);
|
|
1042
|
+
return { scrollLeft: e.pageXOffset, scrollTop: e.pageYOffset };
|
|
1043
|
+
}
|
|
1044
|
+
function Ai(t) {
|
|
1045
|
+
return Pe(be(t)).left + wi(t).scrollLeft;
|
|
1046
|
+
}
|
|
1047
|
+
function Ei(t) {
|
|
1048
|
+
var e = he(t), i = e.overflow, n = e.overflowX, s = e.overflowY;
|
|
1049
|
+
return /auto|scroll|overlay|hidden/.test(i + s + n);
|
|
1050
|
+
}
|
|
1051
|
+
function us(t) {
|
|
1052
|
+
return ["html", "body", "#document"].indexOf(se(t)) >= 0 ? t.ownerDocument.body : Y(t) && Ei(t) ? t : us(wt(t));
|
|
1053
|
+
}
|
|
1054
|
+
function st(t, e) {
|
|
1055
|
+
var i;
|
|
1056
|
+
e === void 0 && (e = []);
|
|
1057
|
+
var n = us(t), s = n === ((i = t.ownerDocument) == null ? void 0 : i.body), r = W(n), o = s ? [r].concat(r.visualViewport || [], Ei(n) ? n : []) : n, a = e.concat(o);
|
|
1058
|
+
return s ? a : a.concat(st(wt(o)));
|
|
1059
|
+
}
|
|
1060
|
+
function xi(t) {
|
|
1061
|
+
return Object.assign({}, t, { left: t.x, top: t.y, right: t.x + t.width, bottom: t.y + t.height });
|
|
1062
|
+
}
|
|
1063
|
+
function ds(t, e, i) {
|
|
1064
|
+
return e === "viewport" ? xi((function(n, s) {
|
|
1065
|
+
var r = W(n), o = be(n), a = r.visualViewport, c = o.clientWidth, h = o.clientHeight, u = 0, d = 0;
|
|
1066
|
+
if (a) {
|
|
1067
|
+
c = a.width, h = a.height;
|
|
1068
|
+
var p = ns();
|
|
1069
|
+
(p || !p && s === "fixed") && (u = a.offsetLeft, d = a.offsetTop);
|
|
1070
|
+
}
|
|
1071
|
+
return { width: c, height: h, x: u + Ai(n), y: d };
|
|
1072
|
+
})(t, i)) : xe(e) ? (function(n, s) {
|
|
1073
|
+
var r = Pe(n, !1, s === "fixed");
|
|
1074
|
+
return r.top = r.top + n.clientTop, r.left = r.left + n.clientLeft, r.bottom = r.top + n.clientHeight, r.right = r.left + n.clientWidth, r.width = n.clientWidth, r.height = n.clientHeight, r.x = r.left, r.y = r.top, r;
|
|
1075
|
+
})(e, i) : xi((function(n) {
|
|
1076
|
+
var s, r = be(n), o = wi(n), a = (s = n.ownerDocument) == null ? void 0 : s.body, c = Te(r.scrollWidth, r.clientWidth, a ? a.scrollWidth : 0, a ? a.clientWidth : 0), h = Te(r.scrollHeight, r.clientHeight, a ? a.scrollHeight : 0, a ? a.clientHeight : 0), u = -o.scrollLeft + Ai(n), d = -o.scrollTop;
|
|
1077
|
+
return he(a || r).direction === "rtl" && (u += Te(r.clientWidth, a ? a.clientWidth : 0) - c), { width: c, height: h, x: u, y: d };
|
|
1078
|
+
})(be(t)));
|
|
1079
|
+
}
|
|
1080
|
+
function fs(t) {
|
|
1081
|
+
var e, i = t.reference, n = t.element, s = t.placement, r = s ? re(s) : null, o = s ? je(s) : null, a = i.x + i.width / 2 - n.width / 2, c = i.y + i.height / 2 - n.height / 2;
|
|
1082
|
+
switch (r) {
|
|
1083
|
+
case "top":
|
|
1084
|
+
e = { x: a, y: i.y - n.height };
|
|
1085
|
+
break;
|
|
1086
|
+
case ie:
|
|
1087
|
+
e = { x: a, y: i.y + i.height };
|
|
1088
|
+
break;
|
|
1089
|
+
case ce:
|
|
1090
|
+
e = { x: i.x + i.width, y: c };
|
|
1091
|
+
break;
|
|
1092
|
+
case ne:
|
|
1093
|
+
e = { x: i.x - n.width, y: c };
|
|
1094
|
+
break;
|
|
1095
|
+
default:
|
|
1096
|
+
e = { x: i.x, y: i.y };
|
|
1097
|
+
}
|
|
1098
|
+
var h = r ? bi(r) : null;
|
|
1099
|
+
if (h != null) {
|
|
1100
|
+
var u = h === "y" ? "height" : "width";
|
|
1101
|
+
switch (o) {
|
|
1102
|
+
case tt:
|
|
1103
|
+
e[h] = e[h] - (i[u] / 2 - n[u] / 2);
|
|
1104
|
+
break;
|
|
1105
|
+
case "end":
|
|
1106
|
+
e[h] = e[h] + (i[u] / 2 - n[u] / 2);
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
return e;
|
|
1110
|
+
}
|
|
1111
|
+
function Fe(t, e) {
|
|
1112
|
+
e === void 0 && (e = {});
|
|
1113
|
+
var i = e, n = i.placement, s = n === void 0 ? t.placement : n, r = i.strategy, o = r === void 0 ? t.strategy : r, a = i.boundary, c = a === void 0 ? Vn : a, h = i.rootBoundary, u = h === void 0 ? qn : h, d = i.elementContext, p = d === void 0 ? ui : d, m = i.altBoundary, g = m !== void 0 && m, b = i.padding, _ = b === void 0 ? 0 : b, x = os(typeof _ != "number" ? _ : as(_, Le)), I = p === "popper" ? Yn : ui, y = t.rects.popper, E = t.elements[g ? I : p], v = (function(N, G, X, D) {
|
|
1114
|
+
var ae = G === "clippingParents" ? (function(S) {
|
|
1115
|
+
var P = st(wt(S)), Q = ["absolute", "fixed"].indexOf(he(S).position) >= 0 && Y(S) ? it(S) : S;
|
|
1116
|
+
return xe(Q) ? P.filter(function(Ae) {
|
|
1117
|
+
return xe(Ae) && ss(Ae, Q) && se(Ae) !== "body";
|
|
1118
|
+
}) : [];
|
|
1119
|
+
})(N) : [].concat(G), le = [].concat(ae, [X]), Ge = le[0], $ = le.reduce(function(S, P) {
|
|
1120
|
+
var Q = ds(N, P, D);
|
|
1121
|
+
return S.top = Te(Q.top, S.top), S.right = yt(Q.right, S.right), S.bottom = yt(Q.bottom, S.bottom), S.left = Te(Q.left, S.left), S;
|
|
1122
|
+
}, ds(N, Ge, D));
|
|
1123
|
+
return $.width = $.right - $.left, $.height = $.bottom - $.top, $.x = $.left, $.y = $.top, $;
|
|
1124
|
+
})(xe(E) ? E : E.contextElement || be(t.elements.popper), c, u, o), A = Pe(t.elements.reference), T = fs({ reference: A, element: y, placement: s }), k = xi(Object.assign({}, y, T)), C = p === "popper" ? k : A, M = { top: v.top - C.top + x.top, bottom: C.bottom - v.bottom + x.bottom, left: v.left - C.left + x.left, right: C.right - v.right + x.right }, H = t.modifiersData.offset;
|
|
1125
|
+
if (p === "popper" && H) {
|
|
1126
|
+
var ee = H[s];
|
|
1127
|
+
Object.keys(M).forEach(function(N) {
|
|
1128
|
+
var G = ["right", "bottom"].indexOf(N) >= 0 ? 1 : -1, X = ["top", "bottom"].indexOf(N) >= 0 ? "y" : "x";
|
|
1129
|
+
M[N] += ee[X] * G;
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
return M;
|
|
1133
|
+
}
|
|
1134
|
+
function la(t, e) {
|
|
1135
|
+
e === void 0 && (e = {});
|
|
1136
|
+
var i = e, n = i.placement, s = i.boundary, r = i.rootBoundary, o = i.padding, a = i.flipVariations, c = i.allowedAutoPlacements, h = c === void 0 ? fi : c, u = je(n), d = u ? a ? di : di.filter(function(g) {
|
|
1137
|
+
return je(g) === u;
|
|
1138
|
+
}) : Le, p = d.filter(function(g) {
|
|
1139
|
+
return h.indexOf(g) >= 0;
|
|
1140
|
+
});
|
|
1141
|
+
p.length === 0 && (p = d);
|
|
1142
|
+
var m = p.reduce(function(g, b) {
|
|
1143
|
+
return g[b] = Fe(t, { placement: b, boundary: s, rootBoundary: r, padding: o })[re(b)], g;
|
|
1144
|
+
}, {});
|
|
1145
|
+
return Object.keys(m).sort(function(g, b) {
|
|
1146
|
+
return m[g] - m[b];
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
var ps = { name: "flip", enabled: !0, phase: "main", fn: function(t) {
|
|
1150
|
+
var e = t.state, i = t.options, n = t.name;
|
|
1151
|
+
if (!e.modifiersData[n]._skip) {
|
|
1152
|
+
for (var s = i.mainAxis, r = s === void 0 || s, o = i.altAxis, a = o === void 0 || o, c = i.fallbackPlacements, h = i.padding, u = i.boundary, d = i.rootBoundary, p = i.altBoundary, m = i.flipVariations, g = m === void 0 || m, b = i.allowedAutoPlacements, _ = e.options.placement, x = re(_) === _, I = c || (x || !g ? [Et(_)] : (function(S) {
|
|
1153
|
+
if (re(S) === "auto") return [];
|
|
1154
|
+
var P = Et(S);
|
|
1155
|
+
return [hs(S), P, hs(P)];
|
|
1156
|
+
})(_)), y = [_].concat(I).reduce(function(S, P) {
|
|
1157
|
+
return S.concat(re(P) === "auto" ? la(e, { placement: P, boundary: u, rootBoundary: d, padding: h, flipVariations: g, allowedAutoPlacements: b }) : P);
|
|
1158
|
+
}, []), E = e.rects.reference, v = e.rects.popper, A = /* @__PURE__ */ new Map(), T = !0, k = y[0], C = 0; C < y.length; C++) {
|
|
1159
|
+
var M = y[C], H = re(M), ee = je(M) === tt, N = ["top", ie].indexOf(H) >= 0, G = N ? "width" : "height", X = Fe(e, { placement: M, boundary: u, rootBoundary: d, altBoundary: p, padding: h }), D = N ? ee ? ce : ne : ee ? ie : "top";
|
|
1160
|
+
E[G] > v[G] && (D = Et(D));
|
|
1161
|
+
var ae = Et(D), le = [];
|
|
1162
|
+
if (r && le.push(X[H] <= 0), a && le.push(X[D] <= 0, X[ae] <= 0), le.every(function(S) {
|
|
1163
|
+
return S;
|
|
1164
|
+
})) {
|
|
1165
|
+
k = M, T = !1;
|
|
1166
|
+
break;
|
|
1167
|
+
}
|
|
1168
|
+
A.set(M, le);
|
|
1169
|
+
}
|
|
1170
|
+
if (T) for (var Ge = function(S) {
|
|
1171
|
+
var P = y.find(function(Q) {
|
|
1172
|
+
var Ae = A.get(Q);
|
|
1173
|
+
if (Ae) return Ae.slice(0, S).every(function(Vt) {
|
|
1174
|
+
return Vt;
|
|
1175
|
+
});
|
|
1176
|
+
});
|
|
1177
|
+
if (P) return k = P, "break";
|
|
1178
|
+
}, $ = g ? 3 : 1; $ > 0 && Ge($) !== "break"; $--) ;
|
|
1179
|
+
e.placement !== k && (e.modifiersData[n]._skip = !0, e.placement = k, e.reset = !0);
|
|
1180
|
+
}
|
|
1181
|
+
}, requiresIfExists: ["offset"], data: { _skip: !1 } };
|
|
1182
|
+
function ms(t, e, i) {
|
|
1183
|
+
return i === void 0 && (i = { x: 0, y: 0 }), { top: t.top - e.height - i.y, right: t.right - e.width + i.x, bottom: t.bottom - e.height + i.y, left: t.left - e.width - i.x };
|
|
1184
|
+
}
|
|
1185
|
+
function _s(t) {
|
|
1186
|
+
return ["top", ce, ie, ne].some(function(e) {
|
|
1187
|
+
return t[e] >= 0;
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
var gs = { name: "hide", enabled: !0, phase: "main", requiresIfExists: ["preventOverflow"], fn: function(t) {
|
|
1191
|
+
var e = t.state, i = t.name, n = e.rects.reference, s = e.rects.popper, r = e.modifiersData.preventOverflow, o = Fe(e, { elementContext: "reference" }), a = Fe(e, { altBoundary: !0 }), c = ms(o, n), h = ms(a, s, r), u = _s(c), d = _s(h);
|
|
1192
|
+
e.modifiersData[i] = { referenceClippingOffsets: c, popperEscapeOffsets: h, isReferenceHidden: u, hasPopperEscaped: d }, e.attributes.popper = Object.assign({}, e.attributes.popper, { "data-popper-reference-hidden": u, "data-popper-escaped": d });
|
|
1193
|
+
} }, bs = { name: "offset", enabled: !0, phase: "main", requires: ["popperOffsets"], fn: function(t) {
|
|
1194
|
+
var e = t.state, i = t.options, n = t.name, s = i.offset, r = s === void 0 ? [0, 0] : s, o = fi.reduce(function(u, d) {
|
|
1195
|
+
return u[d] = (function(p, m, g) {
|
|
1196
|
+
var b = re(p), _ = ["left", "top"].indexOf(b) >= 0 ? -1 : 1, x = typeof g == "function" ? g(Object.assign({}, m, { placement: p })) : g, I = x[0], y = x[1];
|
|
1197
|
+
return I = I || 0, y = (y || 0) * _, ["left", "right"].indexOf(b) >= 0 ? { x: y, y: I } : { x: I, y };
|
|
1198
|
+
})(d, e.rects, r), u;
|
|
1199
|
+
}, {}), a = o[e.placement], c = a.x, h = a.y;
|
|
1200
|
+
e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += c, e.modifiersData.popperOffsets.y += h), e.modifiersData[n] = o;
|
|
1201
|
+
} }, Ti = { name: "popperOffsets", enabled: !0, phase: "read", fn: function(t) {
|
|
1202
|
+
var e = t.state, i = t.name;
|
|
1203
|
+
e.modifiersData[i] = fs({ reference: e.rects.reference, element: e.rects.popper, placement: e.placement });
|
|
1204
|
+
}, data: {} }, vs = { name: "preventOverflow", enabled: !0, phase: "main", fn: function(t) {
|
|
1205
|
+
var e = t.state, i = t.options, n = t.name, s = i.mainAxis, r = s === void 0 || s, o = i.altAxis, a = o !== void 0 && o, c = i.boundary, h = i.rootBoundary, u = i.altBoundary, d = i.padding, p = i.tether, m = p === void 0 || p, g = i.tetherOffset, b = g === void 0 ? 0 : g, _ = Fe(e, { boundary: c, rootBoundary: h, padding: d, altBoundary: u }), x = re(e.placement), I = je(e.placement), y = !I, E = bi(x), v = E === "x" ? "y" : "x", A = e.modifiersData.popperOffsets, T = e.rects.reference, k = e.rects.popper, C = typeof b == "function" ? b(Object.assign({}, e.rects, { placement: e.placement })) : b, M = typeof C == "number" ? { mainAxis: C, altAxis: C } : Object.assign({ mainAxis: 0, altAxis: 0 }, C), H = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, ee = { x: 0, y: 0 };
|
|
1206
|
+
if (A) {
|
|
1207
|
+
if (r) {
|
|
1208
|
+
var N, G = E === "y" ? "top" : ne, X = E === "y" ? ie : ce, D = E === "y" ? "height" : "width", ae = A[E], le = ae + _[G], Ge = ae - _[X], $ = m ? -k[D] / 2 : 0, S = I === "start" ? T[D] : k[D], P = I === "start" ? -k[D] : -T[D], Q = e.elements.arrow, Ae = m && Q ? gi(Q) : { width: 0, height: 0 }, Vt = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : { top: 0, right: 0, bottom: 0, left: 0 }, Ur = Vt[G], Gr = Vt[X], qt = nt(0, T[D], Ae[D]), oh = y ? T[D] / 2 - $ - qt - Ur - M.mainAxis : S - qt - Ur - M.mainAxis, ah = y ? -T[D] / 2 + $ + qt + Gr + M.mainAxis : P + qt + Gr + M.mainAxis, Qi = e.elements.arrow && it(e.elements.arrow), lh = Qi ? E === "y" ? Qi.clientTop || 0 : Qi.clientLeft || 0 : 0, Xr = (N = H?.[E]) != null ? N : 0, ch = ae + ah - Xr, Qr = nt(m ? yt(le, ae + oh - Xr - lh) : le, ae, m ? Te(Ge, ch) : Ge);
|
|
1209
|
+
A[E] = Qr, ee[E] = Qr - ae;
|
|
1210
|
+
}
|
|
1211
|
+
if (a) {
|
|
1212
|
+
var Zr, hh = E === "x" ? "top" : ne, uh = E === "x" ? ie : ce, De = A[v], Yt = v === "y" ? "height" : "width", Jr = De + _[hh], eo = De - _[uh], Zi = ["top", ne].indexOf(x) !== -1, to = (Zr = H?.[v]) != null ? Zr : 0, io = Zi ? Jr : De - T[Yt] - k[Yt] - to + M.altAxis, no = Zi ? De + T[Yt] + k[Yt] - to - M.altAxis : eo, so = m && Zi ? (function(dh, fh, Ji) {
|
|
1213
|
+
var ro = nt(dh, fh, Ji);
|
|
1214
|
+
return ro > Ji ? Ji : ro;
|
|
1215
|
+
})(io, De, no) : nt(m ? io : Jr, De, m ? no : eo);
|
|
1216
|
+
A[v] = so, ee[v] = so - De;
|
|
1217
|
+
}
|
|
1218
|
+
e.modifiersData[n] = ee;
|
|
1219
|
+
}
|
|
1220
|
+
}, requiresIfExists: ["offset"] };
|
|
1221
|
+
function ca(t, e, i) {
|
|
1222
|
+
i === void 0 && (i = !1);
|
|
1223
|
+
var n, s, r = Y(e), o = Y(e) && (function(d) {
|
|
1224
|
+
var p = d.getBoundingClientRect(), m = Ne(p.width) / d.offsetWidth || 1, g = Ne(p.height) / d.offsetHeight || 1;
|
|
1225
|
+
return m !== 1 || g !== 1;
|
|
1226
|
+
})(e), a = be(e), c = Pe(t, o, i), h = { scrollLeft: 0, scrollTop: 0 }, u = { x: 0, y: 0 };
|
|
1227
|
+
return (r || !r && !i) && ((se(e) !== "body" || Ei(a)) && (h = (n = e) !== W(n) && Y(n) ? { scrollLeft: (s = n).scrollLeft, scrollTop: s.scrollTop } : wi(n)), Y(e) ? ((u = Pe(e, !0)).x += e.clientLeft, u.y += e.clientTop) : a && (u.x = Ai(a))), { x: c.left + h.scrollLeft - u.x, y: c.top + h.scrollTop - u.y, width: c.width, height: c.height };
|
|
1228
|
+
}
|
|
1229
|
+
function ha(t) {
|
|
1230
|
+
var e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), n = [];
|
|
1231
|
+
function s(r) {
|
|
1232
|
+
i.add(r.name), [].concat(r.requires || [], r.requiresIfExists || []).forEach(function(o) {
|
|
1233
|
+
if (!i.has(o)) {
|
|
1234
|
+
var a = e.get(o);
|
|
1235
|
+
a && s(a);
|
|
1236
|
+
}
|
|
1237
|
+
}), n.push(r);
|
|
1238
|
+
}
|
|
1239
|
+
return t.forEach(function(r) {
|
|
1240
|
+
e.set(r.name, r);
|
|
1241
|
+
}), t.forEach(function(r) {
|
|
1242
|
+
i.has(r.name) || s(r);
|
|
1243
|
+
}), n;
|
|
1244
|
+
}
|
|
1245
|
+
var ys = { placement: "bottom", modifiers: [], strategy: "absolute" };
|
|
1246
|
+
function ws() {
|
|
1247
|
+
for (var t = arguments.length, e = new Array(t), i = 0; i < t; i++) e[i] = arguments[i];
|
|
1248
|
+
return !e.some(function(n) {
|
|
1249
|
+
return !(n && typeof n.getBoundingClientRect == "function");
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
function xt(t) {
|
|
1253
|
+
t === void 0 && (t = {});
|
|
1254
|
+
var e = t, i = e.defaultModifiers, n = i === void 0 ? [] : i, s = e.defaultOptions, r = s === void 0 ? ys : s;
|
|
1255
|
+
return function(o, a, c) {
|
|
1256
|
+
c === void 0 && (c = r);
|
|
1257
|
+
var h, u, d = { placement: "bottom", orderedModifiers: [], options: Object.assign({}, ys, r), modifiersData: {}, elements: { reference: o, popper: a }, attributes: {}, styles: {} }, p = [], m = !1, g = { state: d, setOptions: function(_) {
|
|
1258
|
+
var x = typeof _ == "function" ? _(d.options) : _;
|
|
1259
|
+
b(), d.options = Object.assign({}, r, d.options, x), d.scrollParents = { reference: xe(o) ? st(o) : o.contextElement ? st(o.contextElement) : [], popper: st(a) };
|
|
1260
|
+
var I, y, E = (function(v) {
|
|
1261
|
+
var A = ha(v);
|
|
1262
|
+
return is.reduce(function(T, k) {
|
|
1263
|
+
return T.concat(A.filter(function(C) {
|
|
1264
|
+
return C.phase === k;
|
|
1265
|
+
}));
|
|
1266
|
+
}, []);
|
|
1267
|
+
})((I = [].concat(n, d.options.modifiers), y = I.reduce(function(v, A) {
|
|
1268
|
+
var T = v[A.name];
|
|
1269
|
+
return v[A.name] = T ? Object.assign({}, T, A, { options: Object.assign({}, T.options, A.options), data: Object.assign({}, T.data, A.data) }) : A, v;
|
|
1270
|
+
}, {}), Object.keys(y).map(function(v) {
|
|
1271
|
+
return y[v];
|
|
1272
|
+
})));
|
|
1273
|
+
return d.orderedModifiers = E.filter(function(v) {
|
|
1274
|
+
return v.enabled;
|
|
1275
|
+
}), d.orderedModifiers.forEach(function(v) {
|
|
1276
|
+
var A = v.name, T = v.options, k = T === void 0 ? {} : T, C = v.effect;
|
|
1277
|
+
if (typeof C == "function") {
|
|
1278
|
+
var M = C({ state: d, name: A, instance: g, options: k });
|
|
1279
|
+
p.push(M || function() {
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
}), g.update();
|
|
1283
|
+
}, forceUpdate: function() {
|
|
1284
|
+
if (!m) {
|
|
1285
|
+
var _ = d.elements, x = _.reference, I = _.popper;
|
|
1286
|
+
if (ws(x, I)) {
|
|
1287
|
+
d.rects = { reference: ca(x, it(I), d.options.strategy === "fixed"), popper: gi(I) }, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(C) {
|
|
1288
|
+
return d.modifiersData[C.name] = Object.assign({}, C.data);
|
|
1289
|
+
});
|
|
1290
|
+
for (var y = 0; y < d.orderedModifiers.length; y++) if (d.reset !== !0) {
|
|
1291
|
+
var E = d.orderedModifiers[y], v = E.fn, A = E.options, T = A === void 0 ? {} : A, k = E.name;
|
|
1292
|
+
typeof v == "function" && (d = v({ state: d, options: T, name: k, instance: g }) || d);
|
|
1293
|
+
} else d.reset = !1, y = -1;
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
}, update: (h = function() {
|
|
1297
|
+
return new Promise(function(_) {
|
|
1298
|
+
g.forceUpdate(), _(d);
|
|
1299
|
+
});
|
|
1300
|
+
}, function() {
|
|
1301
|
+
return u || (u = new Promise(function(_) {
|
|
1302
|
+
Promise.resolve().then(function() {
|
|
1303
|
+
u = void 0, _(h());
|
|
1304
|
+
});
|
|
1305
|
+
})), u;
|
|
1306
|
+
}), destroy: function() {
|
|
1307
|
+
b(), m = !0;
|
|
1308
|
+
} };
|
|
1309
|
+
if (!ws(o, a)) return g;
|
|
1310
|
+
function b() {
|
|
1311
|
+
p.forEach(function(_) {
|
|
1312
|
+
return _();
|
|
1313
|
+
}), p = [];
|
|
1314
|
+
}
|
|
1315
|
+
return g.setOptions(c).then(function(_) {
|
|
1316
|
+
!m && c.onFirstUpdate && c.onFirstUpdate(_);
|
|
1317
|
+
}), g;
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
var ua = xt(), da = xt({ defaultModifiers: [yi, Ti, vi, mi] }), Ci = xt({ defaultModifiers: [yi, Ti, vi, mi, bs, ps, vs, ls, gs] }), ki = me({ afterMain: () => Zn, afterRead: () => Gn, afterWrite: () => ts, applyStyles: () => mi, arrow: () => ls, auto: () => Rn, basePlacements: () => Le, beforeMain: () => Xn, beforeRead: () => Kn, beforeWrite: () => Jn, bottom: () => ie, clippingParents: () => Vn, computeStyles: () => vi, createPopper: () => Ci, createPopperBase: () => ua, createPopperLite: () => da, detectOverflow: () => Fe, end: () => "end", eventListeners: () => yi, flip: () => ps, hide: () => gs, left: () => ne, main: () => Qn, modifierPhases: () => is, offset: () => bs, placements: () => fi, popper: () => ui, popperGenerator: () => xt, popperOffsets: () => Ti, preventOverflow: () => vs, read: () => Un, reference: () => Yn, right: () => ce, start: () => tt, top: () => "top", variationPlacements: () => di, viewport: () => qn, write: () => es }), As = ".bs.alert", fa = `close${As}`, pa = `closed${As}`, Tt = class ao extends O {
|
|
1321
|
+
static get NAME() {
|
|
1322
|
+
return "alert";
|
|
1323
|
+
}
|
|
1324
|
+
close() {
|
|
1325
|
+
if (l.trigger(this._element, fa)?.defaultPrevented) return;
|
|
1326
|
+
this._element.classList.remove("show");
|
|
1327
|
+
const e = this._element.classList.contains("fade");
|
|
1328
|
+
this._queueCallback(() => this._destroyElement(), this._element, e);
|
|
1329
|
+
}
|
|
1330
|
+
_destroyElement() {
|
|
1331
|
+
this._element.remove(), l.trigger(this._element, pa), this.dispose();
|
|
1332
|
+
}
|
|
1333
|
+
static jQueryInterface(e) {
|
|
1334
|
+
return this.each(function() {
|
|
1335
|
+
const i = ao.getOrCreateInstance(this);
|
|
1336
|
+
if (typeof e == "string") {
|
|
1337
|
+
if (i[e] === void 0 || e.startsWith("_") || e === "constructor") throw new TypeError(`No method named "${e}"`);
|
|
1338
|
+
i[e](this);
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
};
|
|
1343
|
+
_t(Tt, "close"), B(Tt);
|
|
1344
|
+
var Es = '[data-bs-toggle="button"], [data-tblr-toggle="button"]', Ct = class lo extends O {
|
|
1345
|
+
static get NAME() {
|
|
1346
|
+
return "button";
|
|
1347
|
+
}
|
|
1348
|
+
toggle() {
|
|
1349
|
+
this._element.setAttribute("aria-pressed", String(this._element.classList.toggle("active")));
|
|
1350
|
+
}
|
|
1351
|
+
static jQueryInterface(e) {
|
|
1352
|
+
return this.each(function() {
|
|
1353
|
+
const i = lo.getOrCreateInstance(this);
|
|
1354
|
+
e === "toggle" && i.toggle();
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
};
|
|
1358
|
+
l.on(document, "click.bs.button.data-api", Es, (t) => {
|
|
1359
|
+
t.preventDefault();
|
|
1360
|
+
const e = t.target?.closest(Es);
|
|
1361
|
+
e && Ct.getOrCreateInstance(e).toggle();
|
|
1362
|
+
}), B(Ct);
|
|
1363
|
+
var ze = ".bs.swipe", ma = `touchstart${ze}`, _a = `touchmove${ze}`, ga = `touchend${ze}`, ba = `pointerdown${ze}`, va = `pointerup${ze}`, ya = { endCallback: null, leftCallback: null, rightCallback: null }, wa = { endCallback: "(function|null)", leftCallback: "(function|null)", rightCallback: "(function|null)" }, xs = class co extends Ze {
|
|
1364
|
+
constructor(e, i) {
|
|
1365
|
+
super(), this._element = e, e && co.isSupported() && (this._config = this._getConfig(i), this._deltaX = 0, this._supportPointerEvents = !!window.PointerEvent, this._initEvents());
|
|
1366
|
+
}
|
|
1367
|
+
static get Default() {
|
|
1368
|
+
return ya;
|
|
1369
|
+
}
|
|
1370
|
+
static get DefaultType() {
|
|
1371
|
+
return wa;
|
|
1372
|
+
}
|
|
1373
|
+
static get NAME() {
|
|
1374
|
+
return "swipe";
|
|
1375
|
+
}
|
|
1376
|
+
dispose() {
|
|
1377
|
+
l.off(this._element, ze);
|
|
1378
|
+
}
|
|
1379
|
+
_start(e) {
|
|
1380
|
+
this._supportPointerEvents ? this._eventIsPointerPenTouch(e) && (this._deltaX = e.clientX) : this._deltaX = e.touches[0].clientX;
|
|
1381
|
+
}
|
|
1382
|
+
_end(e) {
|
|
1383
|
+
this._eventIsPointerPenTouch(e) && (this._deltaX = e.clientX - this._deltaX), this._handleSwipe(), F(this._config.endCallback);
|
|
1384
|
+
}
|
|
1385
|
+
_move(e) {
|
|
1386
|
+
this._deltaX = e.touches && e.touches.length > 1 ? 0 : e.touches[0].clientX - this._deltaX;
|
|
1387
|
+
}
|
|
1388
|
+
_handleSwipe() {
|
|
1389
|
+
const e = Math.abs(this._deltaX);
|
|
1390
|
+
if (e <= 40) return;
|
|
1391
|
+
const i = e / this._deltaX;
|
|
1392
|
+
this._deltaX = 0, i && F(i > 0 ? this._config.rightCallback : this._config.leftCallback);
|
|
1393
|
+
}
|
|
1394
|
+
_initEvents() {
|
|
1395
|
+
this._supportPointerEvents ? (l.on(this._element, ba, (e) => this._start(e)), l.on(this._element, va, (e) => this._end(e)), this._element.classList.add("pointer-event")) : (l.on(this._element, ma, (e) => this._start(e)), l.on(this._element, _a, (e) => this._move(e)), l.on(this._element, ga, (e) => this._end(e)));
|
|
1396
|
+
}
|
|
1397
|
+
_eventIsPointerPenTouch(e) {
|
|
1398
|
+
return this._supportPointerEvents && (e.pointerType === "pen" || e.pointerType === "touch");
|
|
1399
|
+
}
|
|
1400
|
+
static isSupported() {
|
|
1401
|
+
return "ontouchstart" in document.documentElement || navigator.maxTouchPoints > 0;
|
|
1402
|
+
}
|
|
1403
|
+
}, ve = ".bs.carousel", Ts = ".data-api", Aa = "ArrowLeft", Ea = "ArrowRight", rt = "next", Be = "prev", We = "left", kt = "right", xa = `slide${ve}`, Si = `slid${ve}`, Ta = `keydown${ve}`, Ca = `mouseenter${ve}`, ka = `mouseleave${ve}`, Sa = `dragstart${ve}`, Ia = `load${ve}${Ts}`, Oa = `click${ve}${Ts}`, Cs = "carousel", St = "active", Da = { [Aa]: kt, [Ea]: We }, Ma = { interval: 5e3, keyboard: !0, pause: "hover", ride: !1, touch: !0, wrap: !0 }, $a = { interval: "(number|boolean)", keyboard: "boolean", pause: "(string|boolean)", ride: "(boolean|string)", touch: "boolean", wrap: "boolean" }, ot = class ho extends O {
|
|
1404
|
+
constructor(e, i) {
|
|
1405
|
+
super(e, i), this._interval = null, this._activeElement = null, this._isSliding = !1, this.touchTimeout = null, this._swipeHelper = null, this._indicatorsElement = f.findOne(".carousel-indicators", this._element), this._addEventListeners(), this._config.ride === Cs && this.cycle();
|
|
1406
|
+
}
|
|
1407
|
+
static get Default() {
|
|
1408
|
+
return Ma;
|
|
1409
|
+
}
|
|
1410
|
+
static get DefaultType() {
|
|
1411
|
+
return $a;
|
|
1412
|
+
}
|
|
1413
|
+
static get NAME() {
|
|
1414
|
+
return "carousel";
|
|
1415
|
+
}
|
|
1416
|
+
next() {
|
|
1417
|
+
this._slide(rt);
|
|
1418
|
+
}
|
|
1419
|
+
nextWhenVisible() {
|
|
1420
|
+
!document.hidden && Xe(this._element) && this.next();
|
|
1421
|
+
}
|
|
1422
|
+
prev() {
|
|
1423
|
+
this._slide(Be);
|
|
1424
|
+
}
|
|
1425
|
+
pause() {
|
|
1426
|
+
this._isSliding && rn(this._element), this._clearInterval();
|
|
1427
|
+
}
|
|
1428
|
+
cycle() {
|
|
1429
|
+
this._clearInterval(), this._updateInterval(), this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);
|
|
1430
|
+
}
|
|
1431
|
+
_maybeEnableCycle() {
|
|
1432
|
+
this._config.ride && (this._isSliding ? l.one(this._element, Si, () => this.cycle()) : this.cycle());
|
|
1433
|
+
}
|
|
1434
|
+
to(e) {
|
|
1435
|
+
const i = this._getItems();
|
|
1436
|
+
if (e > i.length - 1 || e < 0) return;
|
|
1437
|
+
if (this._isSliding) return void l.one(this._element, Si, () => this.to(e));
|
|
1438
|
+
const n = this._getItemIndex(this._getActive());
|
|
1439
|
+
if (n === e) return;
|
|
1440
|
+
const s = e > n ? rt : Be;
|
|
1441
|
+
this._slide(s, i[e]);
|
|
1442
|
+
}
|
|
1443
|
+
dispose() {
|
|
1444
|
+
this._swipeHelper && this._swipeHelper.dispose(), super.dispose();
|
|
1445
|
+
}
|
|
1446
|
+
_configAfterMerge(e) {
|
|
1447
|
+
return e.defaultInterval = e.interval, e;
|
|
1448
|
+
}
|
|
1449
|
+
_addEventListeners() {
|
|
1450
|
+
this._config.keyboard && l.on(this._element, Ta, (e) => this._keydown(e)), this._config.pause === "hover" && (l.on(this._element, Ca, () => this.pause()), l.on(this._element, ka, () => this._maybeEnableCycle())), this._config.touch && xs.isSupported() && this._addTouchEventListeners();
|
|
1451
|
+
}
|
|
1452
|
+
_addTouchEventListeners() {
|
|
1453
|
+
for (const i of f.find(".carousel-item img", this._element)) l.on(i, Sa, (n) => n.preventDefault());
|
|
1454
|
+
const e = { leftCallback: () => this._slide(this._directionToOrder(We)), rightCallback: () => this._slide(this._directionToOrder(kt)), endCallback: () => {
|
|
1455
|
+
this._config.pause === "hover" && (this.pause(), this.touchTimeout && clearTimeout(this.touchTimeout), this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), 500 + this._config.interval));
|
|
1456
|
+
} };
|
|
1457
|
+
this._swipeHelper = new xs(this._element, e);
|
|
1458
|
+
}
|
|
1459
|
+
_keydown(e) {
|
|
1460
|
+
if (/input|textarea/i.test(e.target.tagName)) return;
|
|
1461
|
+
const i = Da[e.key];
|
|
1462
|
+
i && (e.preventDefault(), this._slide(this._directionToOrder(i)));
|
|
1463
|
+
}
|
|
1464
|
+
_getItemIndex(e) {
|
|
1465
|
+
return this._getItems().indexOf(e);
|
|
1466
|
+
}
|
|
1467
|
+
_setActiveIndicatorElement(e) {
|
|
1468
|
+
if (!this._indicatorsElement) return;
|
|
1469
|
+
const i = f.findOne(".active", this._indicatorsElement);
|
|
1470
|
+
i.classList.remove(St), i.removeAttribute("aria-current");
|
|
1471
|
+
const n = f.findOne(`[data-bs-slide-to="${e}"], [data-tblr-slide-to="${e}"]`, this._indicatorsElement);
|
|
1472
|
+
n && (n.classList.add(St), n.setAttribute("aria-current", "true"));
|
|
1473
|
+
}
|
|
1474
|
+
_updateInterval() {
|
|
1475
|
+
const e = this._activeElement || this._getActive();
|
|
1476
|
+
if (!e) return;
|
|
1477
|
+
const i = Number.parseInt(e.getAttribute("data-bs-interval") || e.getAttribute("data-tblr-interval") || "", 10);
|
|
1478
|
+
this._config.interval = i || (this._config.defaultInterval ?? this._config.interval);
|
|
1479
|
+
}
|
|
1480
|
+
_slide(e, i = null) {
|
|
1481
|
+
if (this._isSliding) return;
|
|
1482
|
+
const n = this._getActive(), s = e === rt, r = i || Zt(this._getItems(), n, s, this._config.wrap);
|
|
1483
|
+
if (r === n) return;
|
|
1484
|
+
const o = this._getItemIndex(r), a = (d) => l.trigger(this._element, d, { relatedTarget: r, direction: this._orderToDirection(e), from: this._getItemIndex(n), to: o });
|
|
1485
|
+
if (a(xa)?.defaultPrevented || !n || !r) return;
|
|
1486
|
+
const c = !!this._interval;
|
|
1487
|
+
this.pause(), this._isSliding = !0, this._setActiveIndicatorElement(o), this._activeElement = r;
|
|
1488
|
+
const h = s ? "carousel-item-start" : "carousel-item-end", u = s ? "carousel-item-next" : "carousel-item-prev";
|
|
1489
|
+
r.classList.add(u), Qe(r), n.classList.add(h), r.classList.add(h), this._queueCallback(() => {
|
|
1490
|
+
r.classList.remove(h, u), r.classList.add(St), n.classList.remove(St, u, h), this._isSliding = !1, a(Si);
|
|
1491
|
+
}, n, this._isAnimated()), c && this.cycle();
|
|
1492
|
+
}
|
|
1493
|
+
_isAnimated() {
|
|
1494
|
+
return this._element.classList.contains("slide");
|
|
1495
|
+
}
|
|
1496
|
+
_getActive() {
|
|
1497
|
+
return f.findOne(".active.carousel-item", this._element);
|
|
1498
|
+
}
|
|
1499
|
+
_getItems() {
|
|
1500
|
+
return f.find(".carousel-item", this._element);
|
|
1501
|
+
}
|
|
1502
|
+
_clearInterval() {
|
|
1503
|
+
this._interval && (clearInterval(this._interval), this._interval = null);
|
|
1504
|
+
}
|
|
1505
|
+
_directionToOrder(e) {
|
|
1506
|
+
return q() ? e === We ? Be : rt : e === We ? rt : Be;
|
|
1507
|
+
}
|
|
1508
|
+
_orderToDirection(e) {
|
|
1509
|
+
return q() ? e === Be ? We : kt : e === Be ? kt : We;
|
|
1510
|
+
}
|
|
1511
|
+
static jQueryInterface(e) {
|
|
1512
|
+
return this.each(function() {
|
|
1513
|
+
const i = ho.getOrCreateInstance(this, e);
|
|
1514
|
+
if (typeof e != "number") {
|
|
1515
|
+
if (typeof e == "string") {
|
|
1516
|
+
if (i[e] === void 0 || e.startsWith("_") || e === "constructor") throw new TypeError(`No method named "${e}"`);
|
|
1517
|
+
i[e]();
|
|
1518
|
+
}
|
|
1519
|
+
} else i.to(e);
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
l.on(document, Oa, "[data-bs-slide], [data-bs-slide-to], [data-tblr-slide], [data-tblr-slide-to]", function(t) {
|
|
1524
|
+
const e = f.getElementFromSelector(this);
|
|
1525
|
+
if (!e || !e.classList.contains(Cs)) return;
|
|
1526
|
+
t.preventDefault();
|
|
1527
|
+
const i = ot.getOrCreateInstance(e), n = this.getAttribute("data-bs-slide-to") || this.getAttribute("data-tblr-slide-to");
|
|
1528
|
+
return n ? (i.to(Number(n)), void i._maybeEnableCycle()) : L.getDataAttribute(this, "slide") === "next" ? (i.next(), void i._maybeEnableCycle()) : (i.prev(), void i._maybeEnableCycle());
|
|
1529
|
+
}), l.on(window, Ia, () => {
|
|
1530
|
+
const t = f.find('[data-bs-ride="carousel"], [data-tblr-ride="carousel"]');
|
|
1531
|
+
for (const e of t) ot.getOrCreateInstance(e);
|
|
1532
|
+
}), B(ot);
|
|
1533
|
+
var at = ".bs.collapse", La = `show${at}`, Na = `shown${at}`, Pa = `hide${at}`, ja = `hidden${at}`, Fa = `click${at}.data-api`, Ii = "show", He = "collapse", It = "collapsing", za = `:scope .${He} .${He}`, Oi = '[data-bs-toggle="collapse"], [data-tblr-toggle="collapse"]', Ba = { parent: null, toggle: !0 }, Wa = { parent: "(null|element)", toggle: "boolean" }, Ot = class en extends O {
|
|
1534
|
+
constructor(e, i) {
|
|
1535
|
+
super(e, i), this._isTransitioning = !1, this._triggerArray = [];
|
|
1536
|
+
const n = f.find(Oi);
|
|
1537
|
+
for (const s of n) {
|
|
1538
|
+
const r = f.getSelectorFromElement(s), o = f.find(r).filter((a) => a === this._element);
|
|
1539
|
+
r !== null && o.length && this._triggerArray.push(s);
|
|
1540
|
+
}
|
|
1541
|
+
this._initializeChildren(), this._config.parent || this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()), this._config.toggle && this.toggle();
|
|
1542
|
+
}
|
|
1543
|
+
static get Default() {
|
|
1544
|
+
return Ba;
|
|
1545
|
+
}
|
|
1546
|
+
static get DefaultType() {
|
|
1547
|
+
return Wa;
|
|
1548
|
+
}
|
|
1549
|
+
static get NAME() {
|
|
1550
|
+
return "collapse";
|
|
1551
|
+
}
|
|
1552
|
+
toggle() {
|
|
1553
|
+
this._isShown() ? this.hide() : this.show();
|
|
1554
|
+
}
|
|
1555
|
+
show() {
|
|
1556
|
+
if (this._isTransitioning || this._isShown()) return;
|
|
1557
|
+
let e = [];
|
|
1558
|
+
if (this._config.parent && (e = this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((s) => s !== this._element).map((s) => en.getOrCreateInstance(s, { toggle: !1 }))), e.length && e[0]._isTransitioning || l.trigger(this._element, La)?.defaultPrevented) return;
|
|
1559
|
+
for (const s of e) s.hide();
|
|
1560
|
+
const i = this._getDimension();
|
|
1561
|
+
this._element.classList.remove(He), this._element.classList.add(It), this._element.style[i] = "0", this._addAriaAndCollapsedClass(this._triggerArray, !0), this._isTransitioning = !0;
|
|
1562
|
+
const n = `scroll${i[0].toUpperCase() + i.slice(1)}`;
|
|
1563
|
+
this._queueCallback(() => {
|
|
1564
|
+
this._isTransitioning = !1, this._element.classList.remove(It), this._element.classList.add(He, Ii), this._element.style[i] = "", l.trigger(this._element, Na);
|
|
1565
|
+
}, this._element, !0), this._element.style[i] = `${this._element[n]}px`;
|
|
1566
|
+
}
|
|
1567
|
+
hide() {
|
|
1568
|
+
if (this._isTransitioning || !this._isShown() || l.trigger(this._element, Pa)?.defaultPrevented) return;
|
|
1569
|
+
const e = this._getDimension();
|
|
1570
|
+
this._element.style[e] = `${this._element.getBoundingClientRect()[e]}px`, Qe(this._element), this._element.classList.add(It), this._element.classList.remove(He, Ii);
|
|
1571
|
+
for (const i of this._triggerArray) {
|
|
1572
|
+
const n = f.getElementFromSelector(i);
|
|
1573
|
+
n && !this._isShown(n) && this._addAriaAndCollapsedClass([i], !1);
|
|
1574
|
+
}
|
|
1575
|
+
this._isTransitioning = !0, this._element.style[e] = "", this._queueCallback(() => {
|
|
1576
|
+
this._isTransitioning = !1, this._element.classList.remove(It), this._element.classList.add(He), l.trigger(this._element, ja);
|
|
1577
|
+
}, this._element, !0);
|
|
1578
|
+
}
|
|
1579
|
+
_isShown(e = this._element) {
|
|
1580
|
+
return e.classList.contains(Ii);
|
|
1581
|
+
}
|
|
1582
|
+
_configAfterMerge(e) {
|
|
1583
|
+
return e.toggle = !!e.toggle, e.parent = z(e.parent), e;
|
|
1584
|
+
}
|
|
1585
|
+
_getDimension() {
|
|
1586
|
+
return this._element.classList.contains("collapse-horizontal") ? "width" : "height";
|
|
1587
|
+
}
|
|
1588
|
+
_initializeChildren() {
|
|
1589
|
+
if (!this._config.parent) return;
|
|
1590
|
+
const e = this._getFirstLevelChildren(Oi);
|
|
1591
|
+
for (const i of e) {
|
|
1592
|
+
const n = f.getElementFromSelector(i);
|
|
1593
|
+
n && this._addAriaAndCollapsedClass([i], this._isShown(n));
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
_getFirstLevelChildren(e) {
|
|
1597
|
+
const i = f.find(za, this._config.parent);
|
|
1598
|
+
return f.find(e, this._config.parent).filter((n) => !i.includes(n));
|
|
1599
|
+
}
|
|
1600
|
+
_addAriaAndCollapsedClass(e, i) {
|
|
1601
|
+
if (e.length) for (const n of e) n.classList.toggle("collapsed", !i), n.setAttribute("aria-expanded", String(i));
|
|
1602
|
+
}
|
|
1603
|
+
static jQueryInterface(e) {
|
|
1604
|
+
const i = {};
|
|
1605
|
+
return typeof e == "string" && /show|hide/.test(e) && (i.toggle = !1), this.each(function() {
|
|
1606
|
+
const n = en.getOrCreateInstance(this, i);
|
|
1607
|
+
if (typeof e == "string") {
|
|
1608
|
+
if (n[e] === void 0) throw new TypeError(`No method named "${e}"`);
|
|
1609
|
+
n[e]();
|
|
1610
|
+
}
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1613
|
+
};
|
|
1614
|
+
l.on(document, Fa, Oi, function(t) {
|
|
1615
|
+
const { delegateTarget: e } = t;
|
|
1616
|
+
(t.target.tagName === "A" || e && e.tagName === "A") && t.preventDefault();
|
|
1617
|
+
for (const i of f.getMultipleElementsFromSelector(this)) Ot.getOrCreateInstance(i, { toggle: !1 }).toggle();
|
|
1618
|
+
}), B(Ot);
|
|
1619
|
+
var ks = "dropdown", Ce = ".bs.dropdown", Di = ".data-api", Ha = "ArrowUp", Ss = "ArrowDown", Ra = `hide${Ce}`, Va = `hidden${Ce}`, qa = `show${Ce}`, Ya = `shown${Ce}`, Is = `click${Ce}${Di}`, Os = `keydown${Ce}${Di}`, Ka = `keyup${Ce}${Di}`, Re = "show", ke = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled), [data-tblr-toggle="dropdown"]:not(.disabled):not(:disabled)', Ua = ke.split(", ").map((t) => `${t}.${Re}`).join(", "), Dt = ".dropdown-menu", Ga = q() ? "top-end" : "top-start", Xa = q() ? "top-start" : "top-end", Qa = q() ? "bottom-end" : "bottom-start", Za = q() ? "bottom-start" : "bottom-end", Ja = q() ? "left-start" : "right-start", el = q() ? "right-start" : "left-start", tl = { autoClose: !0, boundary: "clippingParents", display: "dynamic", offset: [0, 2], popperConfig: null, reference: "toggle" }, il = { autoClose: "(boolean|string)", boundary: "(string|element)", display: "string", offset: "(array|string|function)", popperConfig: "(null|object|function)", reference: "(string|element|object)" }, K = class Kt extends O {
|
|
1620
|
+
constructor(e, i) {
|
|
1621
|
+
super(e, i), this._popper = null, this._parent = this._element.parentNode, this._menu = f.next(this._element, Dt)[0] || f.prev(this._element, Dt)[0] || f.findOne(Dt, this._parent), this._inNavbar = this._detectNavbar();
|
|
1622
|
+
}
|
|
1623
|
+
static get Default() {
|
|
1624
|
+
return tl;
|
|
1625
|
+
}
|
|
1626
|
+
static get DefaultType() {
|
|
1627
|
+
return il;
|
|
1628
|
+
}
|
|
1629
|
+
static get NAME() {
|
|
1630
|
+
return ks;
|
|
1631
|
+
}
|
|
1632
|
+
toggle() {
|
|
1633
|
+
this._isShown() ? this.hide() : this.show();
|
|
1634
|
+
}
|
|
1635
|
+
show() {
|
|
1636
|
+
if (Z(this._element) || this._isShown()) return;
|
|
1637
|
+
const e = { relatedTarget: this._element };
|
|
1638
|
+
if (!l.trigger(this._element, qa, e)?.defaultPrevented) {
|
|
1639
|
+
if (this._createPopper(), "ontouchstart" in document.documentElement && !this._parent.closest(".navbar-nav")) for (const i of Array.from(document.body.children)) l.on(i, "mouseover", mt);
|
|
1640
|
+
this._element.focus(), this._element.setAttribute("aria-expanded", "true"), this._menu.classList.add(Re), this._element.classList.add(Re), l.trigger(this._element, Ya, e);
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
hide() {
|
|
1644
|
+
if (Z(this._element) || !this._isShown()) return;
|
|
1645
|
+
const e = { relatedTarget: this._element };
|
|
1646
|
+
this._completeHide(e);
|
|
1647
|
+
}
|
|
1648
|
+
dispose() {
|
|
1649
|
+
this._popper && this._popper.destroy(), super.dispose();
|
|
1650
|
+
}
|
|
1651
|
+
update() {
|
|
1652
|
+
this._inNavbar = this._detectNavbar(), this._popper && this._popper.update();
|
|
1653
|
+
}
|
|
1654
|
+
_completeHide(e) {
|
|
1655
|
+
if (!l.trigger(this._element, Ra, e)?.defaultPrevented) {
|
|
1656
|
+
if ("ontouchstart" in document.documentElement) for (const i of Array.from(document.body.children)) l.off(i, "mouseover", mt);
|
|
1657
|
+
this._popper && this._popper.destroy(), this._menu.classList.remove(Re), this._element.classList.remove(Re), this._element.setAttribute("aria-expanded", "false"), L.removeDataAttribute(this._menu, "popper"), l.trigger(this._element, Va, e);
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
_getConfig(e) {
|
|
1661
|
+
const i = super._getConfig(e);
|
|
1662
|
+
if (typeof i.reference == "object" && !te(i.reference) && typeof i.reference.getBoundingClientRect != "function") throw new TypeError(`${ks.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
|
|
1663
|
+
return i;
|
|
1664
|
+
}
|
|
1665
|
+
_createPopper() {
|
|
1666
|
+
if (ki === void 0) throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");
|
|
1667
|
+
let e = this._element;
|
|
1668
|
+
this._config.reference === "parent" ? e = this._parent : te(this._config.reference) ? e = z(this._config.reference) : typeof this._config.reference == "object" && (e = this._config.reference);
|
|
1669
|
+
const i = this._getPopperConfig();
|
|
1670
|
+
this._popper = Ci(e, this._menu, i);
|
|
1671
|
+
}
|
|
1672
|
+
_isShown() {
|
|
1673
|
+
return this._menu.classList.contains(Re);
|
|
1674
|
+
}
|
|
1675
|
+
_getPlacement() {
|
|
1676
|
+
const e = this._parent;
|
|
1677
|
+
if (e.classList.contains("dropend")) return Ja;
|
|
1678
|
+
if (e.classList.contains("dropstart")) return el;
|
|
1679
|
+
if (e.classList.contains("dropup-center")) return "top";
|
|
1680
|
+
if (e.classList.contains("dropdown-center")) return "bottom";
|
|
1681
|
+
const i = getComputedStyle(this._menu).getPropertyValue("--bs-position").trim() === "end";
|
|
1682
|
+
return e.classList.contains("dropup") ? i ? Xa : Ga : i ? Za : Qa;
|
|
1683
|
+
}
|
|
1684
|
+
_detectNavbar() {
|
|
1685
|
+
return this._element.closest(".navbar") !== null;
|
|
1686
|
+
}
|
|
1687
|
+
_getOffset() {
|
|
1688
|
+
const { offset: e } = this._config;
|
|
1689
|
+
return typeof e == "string" ? e.split(",").map((i) => Number.parseInt(i, 10)) : typeof e == "function" ? (i) => e(i, this._element) : e;
|
|
1690
|
+
}
|
|
1691
|
+
_getPopperConfig() {
|
|
1692
|
+
const e = { placement: this._getPlacement(), modifiers: [{ name: "preventOverflow", options: { boundary: this._config.boundary } }, { name: "offset", options: { offset: this._getOffset() } }] };
|
|
1693
|
+
(this._inNavbar || this._config.display === "static") && (L.setDataAttribute(this._menu, "popper", "static"), e.modifiers = [{ name: "applyStyles", enabled: !1 }]);
|
|
1694
|
+
const i = F(this._config.popperConfig, [void 0, e]);
|
|
1695
|
+
return { ...e, ...typeof i == "object" && i !== null ? i : {} };
|
|
1696
|
+
}
|
|
1697
|
+
_selectMenuItem({ key: e, target: i }) {
|
|
1698
|
+
const n = f.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)", this._menu).filter((r) => Xe(r));
|
|
1699
|
+
if (!n.length) return;
|
|
1700
|
+
const s = i;
|
|
1701
|
+
Zt(n, s, e === Ss, !n.includes(s)).focus();
|
|
1702
|
+
}
|
|
1703
|
+
static clearMenus(e) {
|
|
1704
|
+
if (e.button === 2 || e.type === "keyup" && e.key !== "Tab") return;
|
|
1705
|
+
const i = f.find(Ua);
|
|
1706
|
+
for (const n of i) {
|
|
1707
|
+
const s = Kt.getInstance(n);
|
|
1708
|
+
if (!s || s._config.autoClose === !1) continue;
|
|
1709
|
+
const r = e.composedPath(), o = r.includes(s._menu);
|
|
1710
|
+
if (r.includes(s._element) || s._config.autoClose === "inside" && !o || s._config.autoClose === "outside" && o || s._menu.contains(e.target) && (e.type === "keyup" && e.key === "Tab" || /input|select|option|textarea|form/i.test(e.target.tagName))) continue;
|
|
1711
|
+
const a = { relatedTarget: s._element };
|
|
1712
|
+
e.type === "click" && (a.clickEvent = e), s._completeHide(a);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
static dataApiKeydownHandler(e) {
|
|
1716
|
+
const i = /input|textarea/i.test(e.target.tagName), n = e.key === "Escape", s = [Ha, Ss].includes(e.key);
|
|
1717
|
+
if (!s && !n || i && !n) return;
|
|
1718
|
+
e.preventDefault();
|
|
1719
|
+
const r = this.matches(ke) ? this : f.prev(this, ke)[0] || f.next(this, ke)[0] || f.findOne(ke, e.delegateTarget.parentNode), o = Kt.getOrCreateInstance(r);
|
|
1720
|
+
if (s) return e.stopPropagation(), o.show(), void o._selectMenuItem(e);
|
|
1721
|
+
o._isShown() && (e.stopPropagation(), o.hide(), r.focus());
|
|
1722
|
+
}
|
|
1723
|
+
static jQueryInterface(e) {
|
|
1724
|
+
return this.each(function() {
|
|
1725
|
+
const i = Kt.getOrCreateInstance(this, e);
|
|
1726
|
+
if (typeof e == "string") {
|
|
1727
|
+
if (i[e] === void 0) throw new TypeError(`No method named "${e}"`);
|
|
1728
|
+
i[e]();
|
|
1729
|
+
}
|
|
1730
|
+
});
|
|
1731
|
+
}
|
|
1732
|
+
};
|
|
1733
|
+
l.on(document, Os, ke, K.dataApiKeydownHandler), l.on(document, Os, Dt, K.dataApiKeydownHandler), l.on(document, Is, K.clearMenus), l.on(document, Ka, K.clearMenus), l.on(document, Is, ke, function(t) {
|
|
1734
|
+
t.preventDefault(), K.getOrCreateInstance(this).toggle();
|
|
1735
|
+
}), B(K);
|
|
1736
|
+
var Ds = "backdrop", Ms = "show", $s = `mousedown.bs.${Ds}`, nl = { className: "modal-backdrop", clickCallback: null, isAnimated: !1, isVisible: !0, rootElement: "body" }, sl = { className: "string", clickCallback: "(function|null)", isAnimated: "boolean", isVisible: "boolean", rootElement: "(element|string)" }, Ls = class extends Ze {
|
|
1737
|
+
constructor(t) {
|
|
1738
|
+
super(), this._config = this._getConfig(t), this._isAppended = !1, this._element = null;
|
|
1739
|
+
}
|
|
1740
|
+
static get Default() {
|
|
1741
|
+
return nl;
|
|
1742
|
+
}
|
|
1743
|
+
static get DefaultType() {
|
|
1744
|
+
return sl;
|
|
1745
|
+
}
|
|
1746
|
+
static get NAME() {
|
|
1747
|
+
return Ds;
|
|
1748
|
+
}
|
|
1749
|
+
show(t) {
|
|
1750
|
+
if (!this._config.isVisible) return void F(t);
|
|
1751
|
+
this._append();
|
|
1752
|
+
const e = this._getElement();
|
|
1753
|
+
this._config.isAnimated && Qe(e), e.classList.add(Ms), this._emulateAnimation(() => {
|
|
1754
|
+
F(t);
|
|
1755
|
+
});
|
|
1756
|
+
}
|
|
1757
|
+
hide(t) {
|
|
1758
|
+
this._config.isVisible ? (this._getElement().classList.remove(Ms), this._emulateAnimation(() => {
|
|
1759
|
+
this.dispose(), F(t);
|
|
1760
|
+
})) : F(t);
|
|
1761
|
+
}
|
|
1762
|
+
dispose() {
|
|
1763
|
+
this._isAppended && (l.off(this._element, $s), this._element.remove(), this._isAppended = !1);
|
|
1764
|
+
}
|
|
1765
|
+
_getElement() {
|
|
1766
|
+
if (!this._element) {
|
|
1767
|
+
const t = document.createElement("div");
|
|
1768
|
+
t.className = this._config.className, this._config.isAnimated && t.classList.add("fade"), this._element = t;
|
|
1769
|
+
}
|
|
1770
|
+
return this._element;
|
|
1771
|
+
}
|
|
1772
|
+
_configAfterMerge(t) {
|
|
1773
|
+
return t.rootElement = z(t.rootElement), t;
|
|
1774
|
+
}
|
|
1775
|
+
_append() {
|
|
1776
|
+
if (this._isAppended) return;
|
|
1777
|
+
const t = this._getElement();
|
|
1778
|
+
this._config.rootElement.append(t), l.on(t, $s, () => {
|
|
1779
|
+
F(this._config.clickCallback);
|
|
1780
|
+
}), this._isAppended = !0;
|
|
1781
|
+
}
|
|
1782
|
+
_emulateAnimation(t) {
|
|
1783
|
+
hn(t, this._getElement(), this._config.isAnimated);
|
|
1784
|
+
}
|
|
1785
|
+
}, Mt = ".bs.focustrap", rl = `focusin${Mt}`, ol = `keydown.tab${Mt}`, Ns = "backward", al = { autofocus: !0, trapElement: null }, ll = { autofocus: "boolean", trapElement: "element" }, Ps = class extends Ze {
|
|
1786
|
+
constructor(t) {
|
|
1787
|
+
super(), this._config = this._getConfig(t), this._isActive = !1, this._lastTabNavDirection = null;
|
|
1788
|
+
}
|
|
1789
|
+
static get Default() {
|
|
1790
|
+
return al;
|
|
1791
|
+
}
|
|
1792
|
+
static get DefaultType() {
|
|
1793
|
+
return ll;
|
|
1794
|
+
}
|
|
1795
|
+
static get NAME() {
|
|
1796
|
+
return "focustrap";
|
|
1797
|
+
}
|
|
1798
|
+
activate() {
|
|
1799
|
+
this._isActive || (this._config.autofocus && this._config.trapElement.focus(), l.off(document, Mt), l.on(document, rl, (t) => this._handleFocusin(t)), l.on(document, ol, (t) => this._handleKeydown(t)), this._isActive = !0);
|
|
1800
|
+
}
|
|
1801
|
+
deactivate() {
|
|
1802
|
+
this._isActive && (this._isActive = !1, l.off(document, Mt));
|
|
1803
|
+
}
|
|
1804
|
+
_handleFocusin(t) {
|
|
1805
|
+
const { trapElement: e } = this._config;
|
|
1806
|
+
if (!e || t.target === document || t.target === e || e.contains(t.target)) return;
|
|
1807
|
+
const i = f.focusableChildren(e);
|
|
1808
|
+
i.length === 0 ? e.focus() : this._lastTabNavDirection === Ns ? i[i.length - 1].focus() : i[0].focus();
|
|
1809
|
+
}
|
|
1810
|
+
_handleKeydown(t) {
|
|
1811
|
+
t.key === "Tab" && (this._lastTabNavDirection = t.shiftKey ? Ns : "forward");
|
|
1812
|
+
}
|
|
1813
|
+
}, js = ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", Fs = ".sticky-top", $t = "padding-right", zs = "margin-right", Mi = class {
|
|
1814
|
+
constructor() {
|
|
1815
|
+
this._element = document.body;
|
|
1816
|
+
}
|
|
1817
|
+
getWidth() {
|
|
1818
|
+
const t = document.documentElement.clientWidth;
|
|
1819
|
+
return Math.abs(window.innerWidth - t);
|
|
1820
|
+
}
|
|
1821
|
+
hide() {
|
|
1822
|
+
const t = this.getWidth();
|
|
1823
|
+
this._disableOverFlow(), this._setElementAttributes(this._element, $t, (e) => e + t), this._setElementAttributes(js, $t, (e) => e + t), this._setElementAttributes(Fs, zs, (e) => e - t);
|
|
1824
|
+
}
|
|
1825
|
+
reset() {
|
|
1826
|
+
this._resetElementAttributes(this._element, "overflow"), this._resetElementAttributes(this._element, $t), this._resetElementAttributes(js, $t), this._resetElementAttributes(Fs, zs);
|
|
1827
|
+
}
|
|
1828
|
+
isOverflowing() {
|
|
1829
|
+
return this.getWidth() > 0;
|
|
1830
|
+
}
|
|
1831
|
+
_disableOverFlow() {
|
|
1832
|
+
this._saveInitialAttribute(this._element, "overflow"), this._element.style.overflow = "hidden";
|
|
1833
|
+
}
|
|
1834
|
+
_setElementAttributes(t, e, i) {
|
|
1835
|
+
const n = this.getWidth();
|
|
1836
|
+
this._applyManipulationCallback(t, (s) => {
|
|
1837
|
+
if (s !== this._element && window.innerWidth > s.clientWidth + n) return;
|
|
1838
|
+
this._saveInitialAttribute(s, e);
|
|
1839
|
+
const r = window.getComputedStyle(s).getPropertyValue(e);
|
|
1840
|
+
s.style.setProperty(e, `${i(Number.parseFloat(r))}px`);
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
_saveInitialAttribute(t, e) {
|
|
1844
|
+
const i = t.style.getPropertyValue(e);
|
|
1845
|
+
i && L.setDataAttribute(t, e, i);
|
|
1846
|
+
}
|
|
1847
|
+
_resetElementAttributes(t, e) {
|
|
1848
|
+
this._applyManipulationCallback(t, (i) => {
|
|
1849
|
+
const n = L.getDataAttribute(i, e);
|
|
1850
|
+
n !== null ? (L.removeDataAttribute(i, e), i.style.setProperty(e, String(n))) : i.style.removeProperty(e);
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
_applyManipulationCallback(t, e) {
|
|
1854
|
+
if (te(t)) e(t);
|
|
1855
|
+
else for (const i of f.find(t, this._element)) e(i);
|
|
1856
|
+
}
|
|
1857
|
+
}, U = ".bs.modal", cl = `hide${U}`, hl = `hidePrevented${U}`, ul = `hidden${U}`, dl = `show${U}`, fl = `shown${U}`, pl = `resize${U}`, ml = `click.dismiss${U}`, _l = `mousedown.dismiss${U}`, gl = `keydown.dismiss${U}`, bl = `click${U}.data-api`, Bs = "modal-open", Ws = "show", $i = "modal-static", vl = { backdrop: !0, focus: !0, keyboard: !0 }, yl = { backdrop: "(boolean|string)", focus: "boolean", keyboard: "boolean" }, Ve = class tn extends O {
|
|
1858
|
+
constructor(e, i) {
|
|
1859
|
+
super(e, i), this._dialog = f.findOne(".modal-dialog", this._element), this._backdrop = this._initializeBackDrop(), this._focustrap = this._initializeFocusTrap(), this._isShown = !1, this._isTransitioning = !1, this._returnFocusTarget = null, this._scrollBar = new Mi(), this._addEventListeners();
|
|
1860
|
+
}
|
|
1861
|
+
static get Default() {
|
|
1862
|
+
return vl;
|
|
1863
|
+
}
|
|
1864
|
+
static get DefaultType() {
|
|
1865
|
+
return yl;
|
|
1866
|
+
}
|
|
1867
|
+
static get NAME() {
|
|
1868
|
+
return "modal";
|
|
1869
|
+
}
|
|
1870
|
+
toggle(e) {
|
|
1871
|
+
return this._isShown ? this.hide() : this.show(e);
|
|
1872
|
+
}
|
|
1873
|
+
show(e) {
|
|
1874
|
+
this._isShown || this._isTransitioning || l.trigger(this._element, dl, { relatedTarget: e })?.defaultPrevented || (this._returnFocusTarget = on(e, this._element), this._isShown = !0, this._isTransitioning = !0, this._scrollBar.hide(), document.body.classList.add(Bs), this._adjustDialog(), this._backdrop.show(() => this._showElement(e)));
|
|
1875
|
+
}
|
|
1876
|
+
hide() {
|
|
1877
|
+
if (!this._isShown || this._isTransitioning || l.trigger(this._element, cl)?.defaultPrevented) return;
|
|
1878
|
+
this._isShown = !1, this._isTransitioning = !0, this._focustrap.deactivate(), this._element.classList.remove(Ws);
|
|
1879
|
+
const e = this._returnFocusTarget;
|
|
1880
|
+
this._returnFocusTarget = null, this._queueCallback(() => this._hideModal(e), this._element, this._isAnimated());
|
|
1881
|
+
}
|
|
1882
|
+
dispose() {
|
|
1883
|
+
l.off(window, U), l.off(this._dialog, U), this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose();
|
|
1884
|
+
}
|
|
1885
|
+
handleUpdate() {
|
|
1886
|
+
this._adjustDialog();
|
|
1887
|
+
}
|
|
1888
|
+
_initializeBackDrop() {
|
|
1889
|
+
return new Ls({ isVisible: !!this._config.backdrop, isAnimated: this._isAnimated() });
|
|
1890
|
+
}
|
|
1891
|
+
_initializeFocusTrap() {
|
|
1892
|
+
return new Ps({ trapElement: this._element });
|
|
1893
|
+
}
|
|
1894
|
+
_showElement(e) {
|
|
1895
|
+
document.body.contains(this._element) || document.body.append(this._element), this._element.style.display = "block", this._element.removeAttribute("aria-hidden"), this._element.setAttribute("aria-modal", "true"), this._element.setAttribute("role", "dialog"), this._element.scrollTop = 0;
|
|
1896
|
+
const i = this._dialog ? f.findOne(".modal-body", this._dialog) : null;
|
|
1897
|
+
i && (i.scrollTop = 0), Qe(this._element), this._element.classList.add(Ws), this._queueCallback(() => {
|
|
1898
|
+
this._config.focus && this._focustrap.activate(), this._isTransitioning = !1, l.trigger(this._element, fl, { relatedTarget: e });
|
|
1899
|
+
}, this._dialog, this._isAnimated());
|
|
1900
|
+
}
|
|
1901
|
+
_addEventListeners() {
|
|
1902
|
+
l.on(this._element, gl, (e) => {
|
|
1903
|
+
e.key === "Escape" && (this._config.keyboard ? this.hide() : this._triggerBackdropTransition());
|
|
1904
|
+
}), l.on(window, pl, () => {
|
|
1905
|
+
this._isShown && !this._isTransitioning && this._adjustDialog();
|
|
1906
|
+
}), l.on(this._element, _l, (e) => {
|
|
1907
|
+
l.one(this._element, ml, (i) => {
|
|
1908
|
+
this._element === e.target && this._element === i.target && (this._config.backdrop !== "static" ? this._config.backdrop && this.hide() : this._triggerBackdropTransition());
|
|
1909
|
+
});
|
|
1910
|
+
});
|
|
1911
|
+
}
|
|
1912
|
+
_hideModal(e) {
|
|
1913
|
+
this._element.style.display = "none", this._element.setAttribute("aria-hidden", "true"), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._isTransitioning = !1, this._backdrop.hide(() => {
|
|
1914
|
+
document.body.classList.remove(Bs), this._resetAdjustments(), this._scrollBar.reset();
|
|
1915
|
+
const i = this._element;
|
|
1916
|
+
l.trigger(i, ul), tn.getInstance(i)?._isShown || an(e, i);
|
|
1917
|
+
});
|
|
1918
|
+
}
|
|
1919
|
+
_isAnimated() {
|
|
1920
|
+
return this._element.classList.contains("fade");
|
|
1921
|
+
}
|
|
1922
|
+
_triggerBackdropTransition() {
|
|
1923
|
+
if (l.trigger(this._element, hl)?.defaultPrevented) return;
|
|
1924
|
+
const e = this._element.scrollHeight > document.documentElement.clientHeight, i = this._element.style.overflowY;
|
|
1925
|
+
i === "hidden" || this._element.classList.contains($i) || (e || (this._element.style.overflowY = "hidden"), this._element.classList.add($i), this._queueCallback(() => {
|
|
1926
|
+
this._element.classList.remove($i), this._queueCallback(() => {
|
|
1927
|
+
this._element.style.overflowY = i;
|
|
1928
|
+
}, this._dialog);
|
|
1929
|
+
}, this._dialog), this._element.focus());
|
|
1930
|
+
}
|
|
1931
|
+
_adjustDialog() {
|
|
1932
|
+
const e = this._element.scrollHeight > document.documentElement.clientHeight, i = this._scrollBar.getWidth(), n = i > 0;
|
|
1933
|
+
if (n && !e) {
|
|
1934
|
+
const s = q() ? "paddingLeft" : "paddingRight";
|
|
1935
|
+
this._element.style[s] = `${i}px`;
|
|
1936
|
+
}
|
|
1937
|
+
if (!n && e) {
|
|
1938
|
+
const s = q() ? "paddingRight" : "paddingLeft";
|
|
1939
|
+
this._element.style[s] = `${i}px`;
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
_resetAdjustments() {
|
|
1943
|
+
this._element.style.paddingLeft = "", this._element.style.paddingRight = "";
|
|
1944
|
+
}
|
|
1945
|
+
static jQueryInterface(e, i) {
|
|
1946
|
+
return this.each(function() {
|
|
1947
|
+
const n = tn.getOrCreateInstance(this, e);
|
|
1948
|
+
if (typeof e == "string") {
|
|
1949
|
+
if (n[e] === void 0) throw new TypeError(`No method named "${e}"`);
|
|
1950
|
+
n[e](i);
|
|
1951
|
+
}
|
|
1952
|
+
});
|
|
1953
|
+
}
|
|
1954
|
+
};
|
|
1955
|
+
l.on(document, bl, '[data-bs-toggle="modal"], [data-tblr-toggle="modal"]', function(t) {
|
|
1956
|
+
const e = f.getElementFromSelector(this);
|
|
1957
|
+
if (["A", "AREA"].includes(this.tagName) && t.preventDefault(), !e) return;
|
|
1958
|
+
const i = f.findOne(".modal.show");
|
|
1959
|
+
i && Ve.getInstance(i).hide(), Ve.getOrCreateInstance(e).toggle(this);
|
|
1960
|
+
}), _t(Ve), B(Ve);
|
|
1961
|
+
var Hs = /^aria-[\w-]*$/i, Rs = { "*": ["class", "dir", "id", "lang", "role", Hs], a: ["target", "href", "title", "rel"], area: [], b: [], br: [], col: [], code: [], dd: [], div: [], dl: [], dt: [], em: [], hr: [], h1: [], h2: [], h3: [], h4: [], h5: [], h6: [], i: [], img: ["src", "srcset", "alt", "title", "width", "height"], kbd: [], li: [], ol: [], p: [], pre: [], s: [], small: [], span: [], sub: [], sup: [], strong: [], u: [], ul: [] }, wl = { "*": ["class", "role", Hs], svg: ["xmlns", "width", "height", "viewbox", "fill", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin", "focusable"], path: ["d", "fill", "stroke", "stroke-width", "fill-rule", "clip-rule"], line: ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-linecap"], circle: ["cx", "cy", "r", "fill", "stroke", "stroke-width"], rect: ["x", "y", "width", "height", "rx", "ry", "fill", "stroke", "stroke-width"], polyline: ["points", "fill", "stroke", "stroke-width"], polygon: ["points", "fill", "stroke", "stroke-width"], g: ["fill", "stroke", "stroke-width", "transform"], span: [], i: [] }, Al = /* @__PURE__ */ new Set(["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"]), El = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i, xl = (t, e) => {
|
|
1962
|
+
const i = t.nodeName.toLowerCase();
|
|
1963
|
+
return e.includes(i) ? !Al.has(i) || !!El.test(t.nodeValue) : e.filter((n) => n instanceof RegExp).some((n) => n.test(i));
|
|
1964
|
+
};
|
|
1965
|
+
function Vs(t, e, i) {
|
|
1966
|
+
if (!t.length) return t;
|
|
1967
|
+
if (i && typeof i == "function") return i(t);
|
|
1968
|
+
const n = new window.DOMParser().parseFromString(t, "text/html"), s = Array.from(n.body.querySelectorAll("*"));
|
|
1969
|
+
for (const r of s) {
|
|
1970
|
+
const o = r.nodeName.toLowerCase();
|
|
1971
|
+
if (!Object.keys(e).includes(o)) {
|
|
1972
|
+
r.remove();
|
|
1973
|
+
continue;
|
|
1974
|
+
}
|
|
1975
|
+
const a = Array.from(r.attributes), c = [...e["*"] || [], ...e[o] || []];
|
|
1976
|
+
for (const h of a) xl(h, c) || r.removeAttribute(h.nodeName);
|
|
1977
|
+
}
|
|
1978
|
+
return n.body.innerHTML;
|
|
1979
|
+
}
|
|
1980
|
+
var Se = ".bs.navoverflow", Tl = `update${Se}`, Cl = `overflow${Se}`, qs = `resize${Se}`, kl = `click${Se}`, Li = "nav-overflow", Ni = "nav-overflow-menu", Ys = "d-none", Pi = "nav-overflow-keep", Ks = "nav-overflow-initialized", Us = "dropdown-menu-end", Lt = "show", Nt = "active", Gs = ".nav, .navbar-nav", lt = ".nav-item", Xs = ".nav-link", Qs = ".nav-overflow-toggle", Zs = ".dropdown-menu", ji = '[data-bs-toggle="dropdown"], [data-tblr-toggle="dropdown"]', Js = "More", Sl = { collapseBelow: 0, iconPlacement: "start", menuPlacement: "bottom-end", menuStrategy: "absolute", moreText: Js, moreIcon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /><path d="M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /></svg>', threshold: 0 }, Il = { collapseBelow: "(number|string)", iconPlacement: "string", menuPlacement: "string", menuStrategy: "string", moreText: "(string|boolean)", moreIcon: "string", threshold: "number" }, Pt = class uo extends O {
|
|
1981
|
+
constructor(e, i) {
|
|
1982
|
+
super(e, i);
|
|
1983
|
+
const n = f.findOne(Gs, this._element);
|
|
1984
|
+
if (!n) throw new TypeError(`${this._element.outerHTML} has no child ${Gs} to collapse`);
|
|
1985
|
+
this._nav = n, this._items = [], this._overflowItems = [], this._lastOverflow = [], this._overflowMenu = null, this._overflowToggle = null, this._ownsToggle = !1, this._ownsClass = !1, this._clones = /* @__PURE__ */ new Map(), this._resizeObserver = null, this._resizeHandler = null, this._collapseBelow = 0, this._itemMenus = /* @__PURE__ */ new Map(), this._relocatedMenus = /* @__PURE__ */ new Map(), this._init();
|
|
1986
|
+
}
|
|
1987
|
+
static get Default() {
|
|
1988
|
+
return Sl;
|
|
1989
|
+
}
|
|
1990
|
+
static get DefaultType() {
|
|
1991
|
+
return Il;
|
|
1992
|
+
}
|
|
1993
|
+
static get NAME() {
|
|
1994
|
+
return "navoverflow";
|
|
1995
|
+
}
|
|
1996
|
+
update() {
|
|
1997
|
+
this._calculateOverflow(), l.trigger(this._element, Tl);
|
|
1998
|
+
}
|
|
1999
|
+
dispose() {
|
|
2000
|
+
this._resizeObserver?.disconnect(), this._resizeHandler && l.off(window, qs, this._resizeHandler), l.off(this._element, Se), this._restoreItems(), this._ownsToggle && this._overflowToggle?.closest(lt)?.remove(), this._element.classList.remove(Ks), this._ownsClass && this._element.classList.remove(Li), super.dispose();
|
|
2001
|
+
}
|
|
2002
|
+
_init() {
|
|
2003
|
+
this._ownsClass = !this._element.classList.contains(Li), this._element.classList.add(Li), this._items = f.find(lt, this._nav).filter((e) => e.parentElement === this._nav && !e.querySelector(Qs));
|
|
2004
|
+
for (const e of this._items) {
|
|
2005
|
+
const i = f.findOne(Xs, e);
|
|
2006
|
+
i?.matches(ji) && this._findItemMenu(e, i);
|
|
2007
|
+
}
|
|
2008
|
+
l.on(this._element, `shown.bs.tab${Se}`, () => this._syncStates()), this._collapseBelow = this._resolveCollapseBelow(), this._createOverflowMenu(), this._setupResizeObserver(), this._calculateOverflow(), this._element.classList.add(Ks);
|
|
2009
|
+
}
|
|
2010
|
+
_createOverflowMenu() {
|
|
2011
|
+
if (this._overflowToggle = f.findOne(Qs, this._element), this._overflowToggle) return void (this._overflowMenu = f.findOne(".nav-overflow-menu", this._element));
|
|
2012
|
+
const { moreText: e, menuPlacement: i, iconPlacement: n } = this._config, s = typeof e == "string" ? e : "", r = document.createElement("li");
|
|
2013
|
+
r.className = "nav-item dropdown nav-overflow-item", i.startsWith("top") && r.classList.add("dropup");
|
|
2014
|
+
const o = document.createElement("button");
|
|
2015
|
+
o.type = "button", o.className = "nav-link nav-overflow-toggle", o.setAttribute("data-bs-toggle", "dropdown"), o.setAttribute("aria-expanded", "false"), s === "" && o.setAttribute("aria-label", Js);
|
|
2016
|
+
const a = document.createElement("span");
|
|
2017
|
+
if (a.className = "nav-overflow-icon", a.innerHTML = Vs(this._resolveIcon(), wl), s === "") o.append(a);
|
|
2018
|
+
else {
|
|
2019
|
+
const h = document.createElement("span");
|
|
2020
|
+
h.className = "nav-overflow-text", h.textContent = s, n === "end" ? o.append(h, a) : o.append(a, h);
|
|
2021
|
+
}
|
|
2022
|
+
const c = document.createElement("div");
|
|
2023
|
+
c.className = `dropdown-menu ${Ni}`, i.endsWith("end") && c.classList.add(Us), r.append(o, c), this._nav.append(r), this._overflowToggle = o, this._overflowMenu = c, this._ownsToggle = !0;
|
|
2024
|
+
}
|
|
2025
|
+
_resolveIcon() {
|
|
2026
|
+
const e = f.findOne("[data-bs-overflow-icon], [data-tblr-overflow-icon]", this._element);
|
|
2027
|
+
if (!e) return this._config.moreIcon;
|
|
2028
|
+
const i = e.cloneNode(!0);
|
|
2029
|
+
return i.removeAttribute("data-bs-overflow-icon"), i.removeAttribute("data-tblr-overflow-icon"), e.remove(), i.outerHTML;
|
|
2030
|
+
}
|
|
2031
|
+
_resolveCollapseBelow() {
|
|
2032
|
+
const e = this._config.collapseBelow;
|
|
2033
|
+
if (typeof e == "number") return e;
|
|
2034
|
+
if (e === "") return 0;
|
|
2035
|
+
const i = Number(e);
|
|
2036
|
+
if (!Number.isNaN(i)) return i;
|
|
2037
|
+
const n = getComputedStyle(document.documentElement).getPropertyValue(`--tblr-breakpoint-${e}`);
|
|
2038
|
+
return Number.parseFloat(n) || 0;
|
|
2039
|
+
}
|
|
2040
|
+
_setupResizeObserver() {
|
|
2041
|
+
if (typeof ResizeObserver > "u") return this._resizeHandler = () => this._calculateOverflow(), void l.on(window, qs, this._resizeHandler);
|
|
2042
|
+
this._resizeObserver = new ResizeObserver(() => {
|
|
2043
|
+
this._calculateOverflow();
|
|
2044
|
+
}), this._resizeObserver.observe(this._element);
|
|
2045
|
+
}
|
|
2046
|
+
_availableWidth() {
|
|
2047
|
+
const { paddingInlineStart: e, paddingInlineEnd: i } = getComputedStyle(this._element), n = (Number.parseFloat(e) || 0) + (Number.parseFloat(i) || 0);
|
|
2048
|
+
return this._element.clientWidth - n;
|
|
2049
|
+
}
|
|
2050
|
+
_navGap() {
|
|
2051
|
+
return Number.parseFloat(getComputedStyle(this._nav).columnGap) || 0;
|
|
2052
|
+
}
|
|
2053
|
+
_calculateOverflow() {
|
|
2054
|
+
const e = this._overflowToggle?.closest(lt) ?? null;
|
|
2055
|
+
this._setHidden([], e, !1);
|
|
2056
|
+
const i = this._getItemsToOverflow(e);
|
|
2057
|
+
i.length === this._lastOverflow.length && i.every((n, s) => n === this._lastOverflow[s]) ? this._setHidden(this._overflowItems, e) : (this._restoreItems(), this._lastOverflow = i, this._applyOverflow(i, e));
|
|
2058
|
+
}
|
|
2059
|
+
_getItemsToOverflow(e) {
|
|
2060
|
+
if (getComputedStyle(this._nav).flexDirection.startsWith("column")) return [];
|
|
2061
|
+
const i = this._availableWidth(), n = this._items.filter((u) => !u.classList.contains(Pi));
|
|
2062
|
+
if (this._collapseBelow > 0 && i < this._collapseBelow) return n;
|
|
2063
|
+
const s = this._navGap(), r = this._items.filter((u) => u.classList.contains(Pi)).reduce((u, d) => u + d.offsetWidth + s, 0), o = i - r - (e ? e.offsetWidth + s : 0);
|
|
2064
|
+
let a = 0, c = [];
|
|
2065
|
+
for (const u of n) a += u.offsetWidth + s, a > o + 1 && c.push(u);
|
|
2066
|
+
c.length > 0 && a <= i - r + 1 && (c = []);
|
|
2067
|
+
const { threshold: h } = this._config;
|
|
2068
|
+
return this._items.length - c.length < h && this._items.length > h && (c = this._items.slice(h).filter((u) => !u.classList.contains(Pi))), c;
|
|
2069
|
+
}
|
|
2070
|
+
_setHidden(e, i, n = e.length === 0) {
|
|
2071
|
+
for (const s of this._items) {
|
|
2072
|
+
const r = e.includes(s);
|
|
2073
|
+
s.classList.toggle(Ys, r), r ? s.dataset.bsNavOverflow = "true" : delete s.dataset.bsNavOverflow;
|
|
2074
|
+
}
|
|
2075
|
+
i?.classList.toggle(Ys, n);
|
|
2076
|
+
}
|
|
2077
|
+
_applyOverflow(e, i) {
|
|
2078
|
+
const n = this._moveToOverflow(e);
|
|
2079
|
+
this._setHidden(this._overflowItems, i), this._overflowToggle && this._ownsToggle && K.getOrCreateInstance(this._overflowToggle, { autoClose: !n || "outside", popperConfig: { strategy: this._config.menuStrategy } }), e.length > 0 && l.trigger(this._element, Cl, { overflowCount: e.length, visibleCount: this._items.length - e.length });
|
|
2080
|
+
}
|
|
2081
|
+
_moveToOverflow(e) {
|
|
2082
|
+
let i = !1;
|
|
2083
|
+
if (!this._overflowMenu) return i;
|
|
2084
|
+
this._clearMenu();
|
|
2085
|
+
for (const n of e) {
|
|
2086
|
+
const s = f.findOne(Xs, n);
|
|
2087
|
+
if (!s) continue;
|
|
2088
|
+
const r = this._findItemMenu(n, s);
|
|
2089
|
+
r && s.matches(ji) ? (this._overflowMenu.append(this._relocateAsSubmenu(n, s, r)), i = !0) : this._overflowMenu.append(this._cloneAsProxy(s)), this._overflowItems.push(n);
|
|
2090
|
+
}
|
|
2091
|
+
return i;
|
|
2092
|
+
}
|
|
2093
|
+
_relocateAsSubmenu(e, i, n) {
|
|
2094
|
+
this._resetMenu(i, n), e.classList.remove(Lt), this._relocatedMenus.set(e, { menu: n, parent: n.parentNode, nextSibling: n.nextSibling });
|
|
2095
|
+
const s = document.createElement("div");
|
|
2096
|
+
return s.className = this._overflowMenu?.classList.contains(Us) ? "dropstart" : "dropend", s.append(this._cloneAsMenuItem(i, !0), n), s;
|
|
2097
|
+
}
|
|
2098
|
+
_cloneAsProxy(e) {
|
|
2099
|
+
const i = this._cloneAsMenuItem(e);
|
|
2100
|
+
return e.matches("[data-bs-toggle], [data-tblr-toggle]") && (this._removeDataAttributes(i), l.on(i, kl, (n) => {
|
|
2101
|
+
n.preventDefault(), e.click(), this._syncStates();
|
|
2102
|
+
})), i;
|
|
2103
|
+
}
|
|
2104
|
+
_removeDataAttributes(e) {
|
|
2105
|
+
for (const i of e.getAttributeNames()) !i.startsWith("data-bs-") && !i.startsWith("data-tblr-") || i.endsWith("-theme") || e.removeAttribute(i);
|
|
2106
|
+
}
|
|
2107
|
+
_isActive(e) {
|
|
2108
|
+
return e.classList.contains(Nt) || !!e.closest(lt)?.classList.contains(Nt);
|
|
2109
|
+
}
|
|
2110
|
+
_syncStates() {
|
|
2111
|
+
for (const [e, i] of this._clones) e.classList.toggle(Nt, this._isActive(i));
|
|
2112
|
+
}
|
|
2113
|
+
_cloneAsMenuItem(e, i = !1) {
|
|
2114
|
+
const n = e.cloneNode(!0);
|
|
2115
|
+
return n.className = "dropdown-item", n.removeAttribute("id"), this._clones.set(n, e), this._isActive(e) && n.classList.add(Nt), (e.classList.contains("disabled") || e.hasAttribute("disabled")) && n.classList.add("disabled"), i && (this._removeDataAttributes(n), n.classList.add("dropdown-toggle"), n.removeAttribute("href"), n.setAttribute("data-bs-toggle", "dropdown"), n.setAttribute("data-bs-auto-close", "outside"), n.setAttribute("aria-haspopup", "true"), n.setAttribute("aria-expanded", "false"), n.tagName === "A" && (n.setAttribute("role", "button"), n.hasAttribute("tabindex") || n.setAttribute("tabindex", "0"))), n;
|
|
2116
|
+
}
|
|
2117
|
+
_findItemMenu(e, i) {
|
|
2118
|
+
const n = f.next(i, Zs)[0];
|
|
2119
|
+
if (n && !n.classList.contains(Ni)) return this._itemMenus.set(e, n), n;
|
|
2120
|
+
const s = f.findOne(Zs, e);
|
|
2121
|
+
if (s && !s.classList.contains(Ni)) return this._itemMenus.set(e, s), s;
|
|
2122
|
+
const r = this._itemMenus.get(e);
|
|
2123
|
+
return r?.isConnected ? r : (this._itemMenus.delete(e), null);
|
|
2124
|
+
}
|
|
2125
|
+
_resetMenu(e, i) {
|
|
2126
|
+
K.getInstance(e)?.dispose(), e.classList.remove(Lt), e.setAttribute("aria-expanded", "false"), e.parentElement?.classList.remove(Lt), i.classList.remove(Lt);
|
|
2127
|
+
}
|
|
2128
|
+
_restoreRelocatedMenus() {
|
|
2129
|
+
for (const { menu: e, parent: i, nextSibling: n } of this._relocatedMenus.values()) {
|
|
2130
|
+
const s = e.previousElementSibling;
|
|
2131
|
+
s?.matches(ji) && this._resetMenu(s, e), n ? n.before(e) : i.append(e);
|
|
2132
|
+
}
|
|
2133
|
+
this._relocatedMenus.clear();
|
|
2134
|
+
}
|
|
2135
|
+
_restoreItems() {
|
|
2136
|
+
this._overflowToggle && this._overflowMenu && this._resetMenu(this._overflowToggle, this._overflowMenu), this._restoreRelocatedMenus(), this._setHidden([], this._overflowToggle?.closest(lt) ?? null, !1), this._clearMenu();
|
|
2137
|
+
}
|
|
2138
|
+
_clearMenu() {
|
|
2139
|
+
for (const e of this._clones.keys()) l.off(e, Se);
|
|
2140
|
+
this._clones.clear(), this._overflowMenu?.replaceChildren(), this._overflowItems = [];
|
|
2141
|
+
}
|
|
2142
|
+
static jQueryInterface(e) {
|
|
2143
|
+
return this.each(function() {
|
|
2144
|
+
const i = uo.getOrCreateInstance(this, e);
|
|
2145
|
+
if (typeof e == "string") {
|
|
2146
|
+
if (i[e] === void 0 || e.startsWith("_") || e === "constructor") throw new TypeError(`No method named "${e}"`);
|
|
2147
|
+
i[e]();
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
};
|
|
2152
|
+
_e(() => {
|
|
2153
|
+
for (const t of f.find('[data-bs-toggle="nav-overflow"], [data-tblr-toggle="nav-overflow"]')) Pt.getOrCreateInstance(t);
|
|
2154
|
+
}), B(Pt);
|
|
2155
|
+
var ue = ".bs.offcanvas", er = ".data-api", Ol = `load${ue}${er}`, tr = "show", ir = "showing", nr = "hiding", sr = ".offcanvas.show", Dl = `show${ue}`, Ml = `shown${ue}`, $l = `hide${ue}`, rr = `hidePrevented${ue}`, Ll = `hidden${ue}`, Nl = `resize${ue}`, Pl = `click${ue}${er}`, jl = `keydown.dismiss${ue}`, Fl = { backdrop: !0, keyboard: !0, scroll: !1 }, zl = { backdrop: "(boolean|string)", keyboard: "boolean", scroll: "boolean" }, ye = class nn extends O {
|
|
2156
|
+
constructor(e, i) {
|
|
2157
|
+
super(e, i), this._isShown = !1, this._returnFocusTarget = null, this._backdrop = this._initializeBackDrop(), this._focustrap = this._initializeFocusTrap(), this._addEventListeners();
|
|
2158
|
+
}
|
|
2159
|
+
static get Default() {
|
|
2160
|
+
return Fl;
|
|
2161
|
+
}
|
|
2162
|
+
static get DefaultType() {
|
|
2163
|
+
return zl;
|
|
2164
|
+
}
|
|
2165
|
+
static get NAME() {
|
|
2166
|
+
return "offcanvas";
|
|
2167
|
+
}
|
|
2168
|
+
toggle(e) {
|
|
2169
|
+
return this._isShown ? this.hide() : this.show(e);
|
|
2170
|
+
}
|
|
2171
|
+
show(e) {
|
|
2172
|
+
this._isShown || l.trigger(this._element, Dl, { relatedTarget: e })?.defaultPrevented || (this._returnFocusTarget = on(e, this._element), this._isShown = !0, this._backdrop.show(), this._config.scroll || new Mi().hide(), this._element.setAttribute("aria-modal", "true"), this._element.setAttribute("role", "dialog"), this._element.classList.add(ir), this._queueCallback(() => {
|
|
2173
|
+
this._config.scroll && !this._config.backdrop || this._focustrap.activate(), this._element.classList.add(tr), this._element.classList.remove(ir), l.trigger(this._element, Ml, { relatedTarget: e });
|
|
2174
|
+
}, this._element, !0));
|
|
2175
|
+
}
|
|
2176
|
+
hide() {
|
|
2177
|
+
if (!this._isShown || l.trigger(this._element, $l)?.defaultPrevented) return;
|
|
2178
|
+
this._focustrap.deactivate(), this._element.blur(), this._isShown = !1, this._element.classList.add(nr), this._backdrop.hide();
|
|
2179
|
+
const e = this._element, i = this._returnFocusTarget;
|
|
2180
|
+
this._returnFocusTarget = null, this._queueCallback(() => {
|
|
2181
|
+
this._element.classList.remove(tr, nr), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._config.scroll || new Mi().reset(), l.trigger(e, Ll), nn.getInstance(e)?._isShown || an(i, e);
|
|
2182
|
+
}, this._element, !0);
|
|
2183
|
+
}
|
|
2184
|
+
dispose() {
|
|
2185
|
+
this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose();
|
|
2186
|
+
}
|
|
2187
|
+
_initializeBackDrop() {
|
|
2188
|
+
const e = !!this._config.backdrop;
|
|
2189
|
+
return new Ls({ className: "offcanvas-backdrop", isVisible: e, isAnimated: !0, rootElement: this._element.parentNode, clickCallback: e ? () => {
|
|
2190
|
+
this._config.backdrop !== "static" ? this.hide() : l.trigger(this._element, rr);
|
|
2191
|
+
} : null });
|
|
2192
|
+
}
|
|
2193
|
+
_initializeFocusTrap() {
|
|
2194
|
+
return new Ps({ trapElement: this._element });
|
|
2195
|
+
}
|
|
2196
|
+
_addEventListeners() {
|
|
2197
|
+
l.on(this._element, jl, (e) => {
|
|
2198
|
+
e.key === "Escape" && (this._config.keyboard ? this.hide() : l.trigger(this._element, rr));
|
|
2199
|
+
});
|
|
2200
|
+
}
|
|
2201
|
+
static jQueryInterface(e) {
|
|
2202
|
+
return this.each(function() {
|
|
2203
|
+
const i = nn.getOrCreateInstance(this, e);
|
|
2204
|
+
if (typeof e == "string") {
|
|
2205
|
+
if (i[e] === void 0 || e.startsWith("_") || e === "constructor") throw new TypeError(`No method named "${e}"`);
|
|
2206
|
+
i[e](this);
|
|
2207
|
+
}
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
};
|
|
2211
|
+
l.on(document, Pl, '[data-bs-toggle="offcanvas"], [data-tblr-toggle="offcanvas"]', function(t) {
|
|
2212
|
+
const e = f.getElementFromSelector(this);
|
|
2213
|
+
if (["A", "AREA"].includes(this.tagName) && t.preventDefault(), !e || Z(this)) return;
|
|
2214
|
+
const i = f.findOne(sr);
|
|
2215
|
+
i && i !== e && ye.getInstance(i).hide(), ye.getOrCreateInstance(e).toggle(this);
|
|
2216
|
+
}), l.on(window, Ol, () => {
|
|
2217
|
+
for (const t of f.find(sr)) ye.getOrCreateInstance(t).show();
|
|
2218
|
+
}), l.on(window, Nl, () => {
|
|
2219
|
+
for (const t of f.find("[aria-modal][class*=show][class*=offcanvas-]")) getComputedStyle(t).position !== "fixed" && ye.getOrCreateInstance(t).hide();
|
|
2220
|
+
}), _t(ye), B(ye);
|
|
2221
|
+
var Bl = { allowList: Rs, content: {}, extraClass: "", html: !1, sanitize: !0, sanitizeFn: null, template: "<div></div>" }, Wl = { allowList: "object", content: "object", extraClass: "(string|function)", html: "boolean", sanitize: "boolean", sanitizeFn: "(null|function)", template: "string" }, Hl = { entry: "(string|element|function|null)", selector: "(string|element)" }, Rl = class extends Ze {
|
|
2222
|
+
constructor(t) {
|
|
2223
|
+
super(), this._config = this._getConfig(t);
|
|
2224
|
+
}
|
|
2225
|
+
static get Default() {
|
|
2226
|
+
return Bl;
|
|
2227
|
+
}
|
|
2228
|
+
static get DefaultType() {
|
|
2229
|
+
return Wl;
|
|
2230
|
+
}
|
|
2231
|
+
static get NAME() {
|
|
2232
|
+
return "TemplateFactory";
|
|
2233
|
+
}
|
|
2234
|
+
getContent() {
|
|
2235
|
+
return Object.values(this._config.content).map((t) => this._resolvePossibleFunction(t)).filter(Boolean);
|
|
2236
|
+
}
|
|
2237
|
+
hasContent() {
|
|
2238
|
+
return this.getContent().length > 0;
|
|
2239
|
+
}
|
|
2240
|
+
changeContent(t) {
|
|
2241
|
+
return this._checkContent(t), this._config.content = { ...this._config.content, ...t }, this;
|
|
2242
|
+
}
|
|
2243
|
+
toHtml() {
|
|
2244
|
+
const t = document.createElement("div");
|
|
2245
|
+
t.innerHTML = this._maybeSanitize(this._config.template);
|
|
2246
|
+
for (const [n, s] of Object.entries(this._config.content)) this._setContent(t, s, n);
|
|
2247
|
+
const e = t.children[0], i = this._resolvePossibleFunction(this._config.extraClass);
|
|
2248
|
+
return i && e.classList.add(...i.split(" ")), e;
|
|
2249
|
+
}
|
|
2250
|
+
_typeCheckConfig(t) {
|
|
2251
|
+
super._typeCheckConfig(t), this._checkContent(t.content);
|
|
2252
|
+
}
|
|
2253
|
+
_checkContent(t) {
|
|
2254
|
+
for (const [e, i] of Object.entries(t)) super._typeCheckConfig({ selector: e, entry: i }, Hl);
|
|
2255
|
+
}
|
|
2256
|
+
_setContent(t, e, i) {
|
|
2257
|
+
const n = f.findOne(i, t);
|
|
2258
|
+
n && ((e = this._resolvePossibleFunction(e)) ? te(e) ? this._putElementInTemplate(z(e), n) : this._config.html ? n.innerHTML = this._maybeSanitize(e) : n.textContent = e : n.remove());
|
|
2259
|
+
}
|
|
2260
|
+
_maybeSanitize(t) {
|
|
2261
|
+
return this._config.sanitize ? Vs(t, this._config.allowList, this._config.sanitizeFn) : t;
|
|
2262
|
+
}
|
|
2263
|
+
_resolvePossibleFunction(t) {
|
|
2264
|
+
return F(t, [void 0, this]);
|
|
2265
|
+
}
|
|
2266
|
+
_putElementInTemplate(t, e) {
|
|
2267
|
+
if (this._config.html) return e.innerHTML = "", void e.append(t);
|
|
2268
|
+
e.textContent = t.textContent;
|
|
2269
|
+
}
|
|
2270
|
+
}, Vl = /* @__PURE__ */ new Set(["sanitize", "allowList", "sanitizeFn"]), Fi = "fade", jt = "show", ql = ".tooltip-inner", or = ".modal", ar = "hide.bs.modal", ct = "hover", zi = "focus", Bi = "click", Yl = { AUTO: "auto", TOP: "top", RIGHT: q() ? "left" : "right", BOTTOM: "bottom", LEFT: q() ? "right" : "left" }, Kl = { allowList: Rs, animation: !0, boundary: "clippingParents", container: !1, customClass: "", delay: 0, fallbackPlacements: ["top", "right", "bottom", "left"], html: !1, offset: [0, 6], placement: "top", popperConfig: null, sanitize: !0, sanitizeFn: null, selector: !1, template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', title: "", trigger: "hover focus" }, Ul = { allowList: "object", animation: "boolean", boundary: "(string|element)", container: "(string|element|boolean)", customClass: "(string|function)", delay: "(number|object)", fallbackPlacements: "array", html: "boolean", offset: "(array|string|function)", placement: "(string|function)", popperConfig: "(null|object|function)", sanitize: "boolean", sanitizeFn: "(null|function)", selector: "(string|boolean)", template: "string", title: "(string|element|function)", trigger: "string" }, Ie = class fo extends O {
|
|
2271
|
+
constructor(e, i) {
|
|
2272
|
+
if (ki === void 0) throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");
|
|
2273
|
+
super(e, i), this._isEnabled = !0, this._timeout = 0, this._isHovered = null, this._activeTrigger = {}, this._popper = null, this._templateFactory = null, this._newContent = null, this.tip = null, this._hideModalHandler = () => {
|
|
2274
|
+
this._element && this.hide();
|
|
2275
|
+
}, this._setListeners(), this._config.selector || this._fixTitle();
|
|
2276
|
+
}
|
|
2277
|
+
static get Default() {
|
|
2278
|
+
return Kl;
|
|
2279
|
+
}
|
|
2280
|
+
static get DefaultType() {
|
|
2281
|
+
return Ul;
|
|
2282
|
+
}
|
|
2283
|
+
static get NAME() {
|
|
2284
|
+
return "tooltip";
|
|
2285
|
+
}
|
|
2286
|
+
enable() {
|
|
2287
|
+
this._isEnabled = !0;
|
|
2288
|
+
}
|
|
2289
|
+
disable() {
|
|
2290
|
+
this._isEnabled = !1;
|
|
2291
|
+
}
|
|
2292
|
+
toggleEnabled() {
|
|
2293
|
+
this._isEnabled = !this._isEnabled;
|
|
2294
|
+
}
|
|
2295
|
+
toggle() {
|
|
2296
|
+
this._isEnabled && (this._isShown() ? this._leave() : this._enter());
|
|
2297
|
+
}
|
|
2298
|
+
dispose() {
|
|
2299
|
+
clearTimeout(this._timeout), l.off(this._element.closest(or), ar, this._hideModalHandler), (this._element.getAttribute("data-bs-original-title") || this._element.getAttribute("data-tblr-original-title")) && this._element.setAttribute("title", this._element.getAttribute("data-bs-original-title") || this._element.getAttribute("data-tblr-original-title") || ""), this._disposePopper(), super.dispose();
|
|
2300
|
+
}
|
|
2301
|
+
show() {
|
|
2302
|
+
if (this._element.style.display === "none") throw new Error("Please use show on visible elements");
|
|
2303
|
+
if (!this._isWithContent() || !this._isEnabled) return;
|
|
2304
|
+
const e = l.trigger(this._element, this.constructor.eventName("show")), i = (ln(this._element) || this._element.ownerDocument.documentElement).contains(this._element);
|
|
2305
|
+
if (e?.defaultPrevented || !i) return;
|
|
2306
|
+
this._disposePopper();
|
|
2307
|
+
const n = this._getTipElement();
|
|
2308
|
+
this._element.setAttribute("aria-describedby", n.getAttribute("id"));
|
|
2309
|
+
const { container: s } = this._config;
|
|
2310
|
+
if (this._element.ownerDocument.documentElement.contains(this.tip) || (s.append(n), l.trigger(this._element, this.constructor.eventName("inserted"))), this._popper = this._createPopper(n), n.classList.add(jt), "ontouchstart" in document.documentElement) for (const r of Array.from(document.body.children)) l.on(r, "mouseover", mt);
|
|
2311
|
+
this._queueCallback(() => {
|
|
2312
|
+
l.trigger(this._element, this.constructor.eventName("shown")), this._isHovered === !1 && this._leave(), this._isHovered = !1;
|
|
2313
|
+
}, this.tip, this._isAnimated());
|
|
2314
|
+
}
|
|
2315
|
+
hide() {
|
|
2316
|
+
if (this._isShown() && !l.trigger(this._element, this.constructor.eventName("hide"))?.defaultPrevented) {
|
|
2317
|
+
if (this._getTipElement().classList.remove(jt), "ontouchstart" in document.documentElement) for (const e of Array.from(document.body.children)) l.off(e, "mouseover", mt);
|
|
2318
|
+
this._activeTrigger[Bi] = !1, this._activeTrigger[zi] = !1, this._activeTrigger[ct] = !1, this._isHovered = null, this._queueCallback(() => {
|
|
2319
|
+
this._isWithActiveTrigger() || (this._isHovered || this._disposePopper(), this._element.removeAttribute("aria-describedby"), l.trigger(this._element, this.constructor.eventName("hidden")));
|
|
2320
|
+
}, this.tip, this._isAnimated());
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
update() {
|
|
2324
|
+
this._popper && this._popper.update();
|
|
2325
|
+
}
|
|
2326
|
+
_isWithContent() {
|
|
2327
|
+
return !!this._getTitle();
|
|
2328
|
+
}
|
|
2329
|
+
_getTipElement() {
|
|
2330
|
+
return this.tip || (this.tip = this._createTipElement(this._newContent || this._getContentForTemplate())), this.tip;
|
|
2331
|
+
}
|
|
2332
|
+
_createTipElement(e) {
|
|
2333
|
+
const i = this._getTemplateFactory(e).toHtml();
|
|
2334
|
+
if (!i) return null;
|
|
2335
|
+
i.classList.remove(Fi, jt), i.classList.add(`bs-${this.constructor.NAME}-auto`);
|
|
2336
|
+
const n = ((s) => {
|
|
2337
|
+
do
|
|
2338
|
+
s += Math.floor(1e6 * Math.random());
|
|
2339
|
+
while (document.getElementById(s));
|
|
2340
|
+
return s;
|
|
2341
|
+
})(this.constructor.NAME).toString();
|
|
2342
|
+
return i.setAttribute("id", n), this._isAnimated() && i.classList.add(Fi), i;
|
|
2343
|
+
}
|
|
2344
|
+
setContent(e) {
|
|
2345
|
+
this._newContent = e, this._isShown() && (this._disposePopper(), this.show());
|
|
2346
|
+
}
|
|
2347
|
+
_getTemplateFactory(e) {
|
|
2348
|
+
return this._templateFactory ? this._templateFactory.changeContent(e) : this._templateFactory = new Rl({ ...this._config, content: e, extraClass: this._resolvePossibleFunction(this._config.customClass) }), this._templateFactory;
|
|
2349
|
+
}
|
|
2350
|
+
_getContentForTemplate() {
|
|
2351
|
+
return { [ql]: this._getTitle() };
|
|
2352
|
+
}
|
|
2353
|
+
_getTitle() {
|
|
2354
|
+
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute("data-bs-original-title") || this._element.getAttribute("data-tblr-original-title") || "";
|
|
2355
|
+
}
|
|
2356
|
+
_initializeOnDelegatedTarget(e) {
|
|
2357
|
+
return this.constructor.getOrCreateInstance(e.delegateTarget, this._getDelegateConfig());
|
|
2358
|
+
}
|
|
2359
|
+
_isAnimated() {
|
|
2360
|
+
return this._config.animation || this.tip !== null && this.tip.classList.contains(Fi);
|
|
2361
|
+
}
|
|
2362
|
+
_isShown() {
|
|
2363
|
+
return this.tip !== null && this.tip.classList.contains(jt);
|
|
2364
|
+
}
|
|
2365
|
+
_createPopper(e) {
|
|
2366
|
+
const i = Yl[F(this._config.placement, [this, e, this._element]).toUpperCase()];
|
|
2367
|
+
return Ci(this._element, e, this._getPopperConfig(i));
|
|
2368
|
+
}
|
|
2369
|
+
_getOffset() {
|
|
2370
|
+
const { offset: e } = this._config;
|
|
2371
|
+
return typeof e == "string" ? e.split(",").map((i) => Number.parseInt(i, 10)) : typeof e == "function" ? (i) => e(i, this._element) : e;
|
|
2372
|
+
}
|
|
2373
|
+
_resolvePossibleFunction(e) {
|
|
2374
|
+
return F(e, [this._element, this._element]);
|
|
2375
|
+
}
|
|
2376
|
+
_getPopperConfig(e) {
|
|
2377
|
+
const i = { placement: e, modifiers: [{ name: "flip", options: { fallbackPlacements: this._config.fallbackPlacements } }, { name: "offset", options: { offset: this._getOffset() } }, { name: "preventOverflow", options: { boundary: this._config.boundary } }, { name: "arrow", options: { element: `.${this.constructor.NAME}-arrow` } }, { name: "preSetPlacement", enabled: !0, phase: "beforeMain", fn: (s) => {
|
|
2378
|
+
this._getTipElement().setAttribute("data-popper-placement", s.state.placement);
|
|
2379
|
+
} }] }, n = F(this._config.popperConfig, [void 0, i]);
|
|
2380
|
+
return { ...i, ...typeof n == "object" && n !== null ? n : {} };
|
|
2381
|
+
}
|
|
2382
|
+
_setListeners() {
|
|
2383
|
+
const e = this._config.trigger.split(" ");
|
|
2384
|
+
for (const i of e) if (i === "click") l.on(this._element, this.constructor.eventName("click"), this._config.selector, (n) => {
|
|
2385
|
+
const s = this._initializeOnDelegatedTarget(n);
|
|
2386
|
+
s._activeTrigger[Bi] = !(s._isShown() && s._activeTrigger[Bi]), s.toggle();
|
|
2387
|
+
});
|
|
2388
|
+
else if (i !== "manual") {
|
|
2389
|
+
const n = i === ct ? this.constructor.eventName("mouseenter") : this.constructor.eventName("focusin"), s = i === ct ? this.constructor.eventName("mouseleave") : this.constructor.eventName("focusout");
|
|
2390
|
+
l.on(this._element, n, this._config.selector, (r) => {
|
|
2391
|
+
const o = this._initializeOnDelegatedTarget(r);
|
|
2392
|
+
o._activeTrigger[r.type === "focusin" ? zi : ct] = !0, o._enter();
|
|
2393
|
+
}), l.on(this._element, s, this._config.selector, (r) => {
|
|
2394
|
+
const o = this._initializeOnDelegatedTarget(r);
|
|
2395
|
+
o._activeTrigger[r.type === "focusout" ? zi : ct] = o._element.contains(r.relatedTarget), o._leave();
|
|
2396
|
+
});
|
|
2397
|
+
}
|
|
2398
|
+
l.on(this._element.closest(or), ar, this._hideModalHandler);
|
|
2399
|
+
}
|
|
2400
|
+
_fixTitle() {
|
|
2401
|
+
const e = this._element.getAttribute("title");
|
|
2402
|
+
e && (this._element.getAttribute("aria-label") || this._element.textContent.trim() || this._element.setAttribute("aria-label", e), this._element.setAttribute("data-bs-original-title", e), this._element.removeAttribute("title"));
|
|
2403
|
+
}
|
|
2404
|
+
_enter() {
|
|
2405
|
+
this._isShown() || this._isHovered ? this._isHovered = !0 : (this._isHovered = !0, this._setTimeout(() => {
|
|
2406
|
+
this._isHovered && this.show();
|
|
2407
|
+
}, this._getDelay().show));
|
|
2408
|
+
}
|
|
2409
|
+
_leave() {
|
|
2410
|
+
this._isWithActiveTrigger() || (this._isHovered = !1, this._setTimeout(() => {
|
|
2411
|
+
this._isHovered || this.hide();
|
|
2412
|
+
}, this._getDelay().hide));
|
|
2413
|
+
}
|
|
2414
|
+
_getDelay() {
|
|
2415
|
+
const { delay: e } = this._config;
|
|
2416
|
+
return typeof e == "number" ? { show: e, hide: e } : e;
|
|
2417
|
+
}
|
|
2418
|
+
_setTimeout(e, i) {
|
|
2419
|
+
clearTimeout(this._timeout), this._timeout = setTimeout(e, i);
|
|
2420
|
+
}
|
|
2421
|
+
_isWithActiveTrigger() {
|
|
2422
|
+
return Object.values(this._activeTrigger).includes(!0);
|
|
2423
|
+
}
|
|
2424
|
+
_getConfig(e) {
|
|
2425
|
+
const i = L.getDataAttributes(this._element);
|
|
2426
|
+
for (const s of Object.keys(i)) Vl.has(s) && delete i[s];
|
|
2427
|
+
let n = { ...i, ...typeof e == "object" && e ? e : {} };
|
|
2428
|
+
return n = this._mergeConfigObj(n), n = this._configAfterMerge(n), this._typeCheckConfig(n), n;
|
|
2429
|
+
}
|
|
2430
|
+
_configAfterMerge(e) {
|
|
2431
|
+
e.container = e.container === !1 ? document.body : z(e.container), typeof e.delay == "number" && (e.delay = { show: e.delay, hide: e.delay });
|
|
2432
|
+
const i = e;
|
|
2433
|
+
return typeof i.title == "number" && (i.title = i.title.toString()), typeof i.content == "number" && (i.content = i.content.toString()), e;
|
|
2434
|
+
}
|
|
2435
|
+
_getDelegateConfig() {
|
|
2436
|
+
const e = {}, i = this.constructor.Default;
|
|
2437
|
+
for (const [n, s] of Object.entries(this._config)) i[n] !== s && (e[n] = s);
|
|
2438
|
+
return e.selector = !1, e.trigger = "manual", e;
|
|
2439
|
+
}
|
|
2440
|
+
_disposePopper() {
|
|
2441
|
+
this._popper && (this._popper.destroy(), this._popper = null), this.tip && (this.tip.remove(), this.tip = null);
|
|
2442
|
+
}
|
|
2443
|
+
static jQueryInterface(e) {
|
|
2444
|
+
return this.each(function() {
|
|
2445
|
+
const i = fo.getOrCreateInstance(this, e);
|
|
2446
|
+
if (typeof e == "string") {
|
|
2447
|
+
if (i[e] === void 0) throw new TypeError(`No method named "${e}"`);
|
|
2448
|
+
i[e]();
|
|
2449
|
+
}
|
|
2450
|
+
});
|
|
2451
|
+
}
|
|
2452
|
+
};
|
|
2453
|
+
B(Ie);
|
|
2454
|
+
var Gl = ".popover-header", Xl = ".popover-body", Ql = { ...Ie.Default, content: "", offset: [0, 8], placement: "right", template: '<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>', trigger: "click" }, Zl = { ...Ie.DefaultType, content: "(null|string|element|function)" }, Ft = class po extends Ie {
|
|
2455
|
+
constructor(e, i) {
|
|
2456
|
+
super(e, i);
|
|
2457
|
+
}
|
|
2458
|
+
static get Default() {
|
|
2459
|
+
return Ql;
|
|
2460
|
+
}
|
|
2461
|
+
static get DefaultType() {
|
|
2462
|
+
return Zl;
|
|
2463
|
+
}
|
|
2464
|
+
static get NAME() {
|
|
2465
|
+
return "popover";
|
|
2466
|
+
}
|
|
2467
|
+
_isWithContent() {
|
|
2468
|
+
return !!(this._getTitle() || this._getContent());
|
|
2469
|
+
}
|
|
2470
|
+
_getContentForTemplate() {
|
|
2471
|
+
return { [Gl]: this._getTitle(), [Xl]: this._getContent() };
|
|
2472
|
+
}
|
|
2473
|
+
_getContent() {
|
|
2474
|
+
return this._resolvePossibleFunction(this._config.content);
|
|
2475
|
+
}
|
|
2476
|
+
static jQueryInterface(e) {
|
|
2477
|
+
return this.each(function() {
|
|
2478
|
+
const i = po.getOrCreateInstance(this, e);
|
|
2479
|
+
if (typeof e == "string") {
|
|
2480
|
+
if (i[e] === void 0) throw new TypeError(`No method named "${e}"`);
|
|
2481
|
+
i[e]();
|
|
2482
|
+
}
|
|
2483
|
+
});
|
|
2484
|
+
}
|
|
2485
|
+
};
|
|
2486
|
+
B(Ft);
|
|
2487
|
+
var Wi = ".bs.scrollspy", Jl = `activate${Wi}`, lr = `click${Wi}`, ec = `load${Wi}.data-api`, qe = "active", Hi = "[href]", cr = ".nav-link", tc = `${cr}, .nav-item > ${cr}, .list-group-item`, ic = { offset: null, rootMargin: "0px 0px -25%", smoothScroll: !1, target: null, threshold: [0.1, 0.5, 1] }, nc = { offset: "(number|null)", rootMargin: "string", smoothScroll: "boolean", target: "element", threshold: "array" }, zt = class mo extends O {
|
|
2488
|
+
constructor(e, i) {
|
|
2489
|
+
super(e, i), this._targetLinks = /* @__PURE__ */ new Map(), this._observableSections = /* @__PURE__ */ new Map(), this._rootElement = getComputedStyle(this._element).overflowY === "visible" ? null : this._element, this._activeTarget = null, this._observer = null, this._previousScrollData = { visibleEntryTop: 0, parentScrollTop: 0 }, this.refresh();
|
|
2490
|
+
}
|
|
2491
|
+
static get Default() {
|
|
2492
|
+
return ic;
|
|
2493
|
+
}
|
|
2494
|
+
static get DefaultType() {
|
|
2495
|
+
return nc;
|
|
2496
|
+
}
|
|
2497
|
+
static get NAME() {
|
|
2498
|
+
return "scrollspy";
|
|
2499
|
+
}
|
|
2500
|
+
refresh() {
|
|
2501
|
+
this._initializeTargetsAndObservables(), this._maybeEnableSmoothScroll(), this._observer ? this._observer.disconnect() : this._observer = this._getNewObserver();
|
|
2502
|
+
for (const e of this._observableSections.values()) this._observer.observe(e);
|
|
2503
|
+
}
|
|
2504
|
+
dispose() {
|
|
2505
|
+
this._observer.disconnect(), super.dispose();
|
|
2506
|
+
}
|
|
2507
|
+
_configAfterMerge(e) {
|
|
2508
|
+
e.target = z(e.target) || document.body, e.rootMargin = e.offset ? `${e.offset}px 0px -30%` : e.rootMargin;
|
|
2509
|
+
const i = e.threshold;
|
|
2510
|
+
return typeof i == "string" && (e.threshold = i.split(",").map((n) => Number.parseFloat(n))), e;
|
|
2511
|
+
}
|
|
2512
|
+
_maybeEnableSmoothScroll() {
|
|
2513
|
+
this._config.smoothScroll && (l.off(this._config.target, lr), l.on(this._config.target, lr, Hi, (e) => {
|
|
2514
|
+
const i = this._observableSections.get(e.target.hash);
|
|
2515
|
+
if (i) {
|
|
2516
|
+
e.preventDefault();
|
|
2517
|
+
const n = this._rootElement || window, s = i.offsetTop - this._element.offsetTop;
|
|
2518
|
+
if ("scrollTo" in n) return void n.scrollTo({ top: s, behavior: "smooth" });
|
|
2519
|
+
n.scrollTop = s;
|
|
2520
|
+
}
|
|
2521
|
+
}));
|
|
2522
|
+
}
|
|
2523
|
+
_getNewObserver() {
|
|
2524
|
+
const e = { root: this._rootElement, threshold: this._config.threshold, rootMargin: this._config.rootMargin };
|
|
2525
|
+
return new IntersectionObserver((i) => this._observerCallback(i), e);
|
|
2526
|
+
}
|
|
2527
|
+
_observerCallback(e) {
|
|
2528
|
+
const i = (o) => this._targetLinks.get(`#${o.target.id}`), n = (o) => {
|
|
2529
|
+
this._previousScrollData.visibleEntryTop = o.target.offsetTop, this._process(i(o));
|
|
2530
|
+
}, s = (this._rootElement || document.documentElement).scrollTop, r = s >= this._previousScrollData.parentScrollTop;
|
|
2531
|
+
this._previousScrollData.parentScrollTop = s;
|
|
2532
|
+
for (const o of e) {
|
|
2533
|
+
if (!o.isIntersecting) {
|
|
2534
|
+
this._activeTarget = null, this._clearActiveClass(i(o));
|
|
2535
|
+
continue;
|
|
2536
|
+
}
|
|
2537
|
+
const a = o.target.offsetTop >= this._previousScrollData.visibleEntryTop;
|
|
2538
|
+
if (r && a) {
|
|
2539
|
+
if (n(o), !s) return;
|
|
2540
|
+
} else r || a || n(o);
|
|
2541
|
+
}
|
|
2542
|
+
}
|
|
2543
|
+
_initializeTargetsAndObservables() {
|
|
2544
|
+
this._targetLinks = /* @__PURE__ */ new Map(), this._observableSections = /* @__PURE__ */ new Map();
|
|
2545
|
+
const e = f.find(Hi, this._config.target);
|
|
2546
|
+
for (const i of e) {
|
|
2547
|
+
if (!i.hash || Z(i)) continue;
|
|
2548
|
+
const n = f.findOne(Gt(decodeURI(i.hash)), this._element);
|
|
2549
|
+
Xe(n) && (this._targetLinks.set(decodeURI(i.hash), i), this._observableSections.set(i.hash, n));
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
_process(e) {
|
|
2553
|
+
this._activeTarget !== e && (this._clearActiveClass(this._config.target), this._activeTarget = e, e.classList.add(qe), this._activateParents(e), l.trigger(this._element, Jl, { relatedTarget: e }));
|
|
2554
|
+
}
|
|
2555
|
+
_activateParents(e) {
|
|
2556
|
+
if (e.classList.contains("dropdown-item")) f.findOne(".dropdown-toggle", e.closest(".dropdown")).classList.add(qe);
|
|
2557
|
+
else for (const i of f.parents(e, ".nav, .list-group")) for (const n of f.prev(i, tc)) n.classList.add(qe);
|
|
2558
|
+
}
|
|
2559
|
+
_clearActiveClass(e) {
|
|
2560
|
+
e.classList.remove(qe);
|
|
2561
|
+
const i = f.find(`${Hi}.${qe}`, e);
|
|
2562
|
+
for (const n of i) n.classList.remove(qe);
|
|
2563
|
+
}
|
|
2564
|
+
static jQueryInterface(e) {
|
|
2565
|
+
return this.each(function() {
|
|
2566
|
+
const i = mo.getOrCreateInstance(this, e);
|
|
2567
|
+
if (typeof e == "string") {
|
|
2568
|
+
if (i[e] === void 0 || e.startsWith("_") || e === "constructor") throw new TypeError(`No method named "${e}"`);
|
|
2569
|
+
i[e]();
|
|
2570
|
+
}
|
|
2571
|
+
});
|
|
2572
|
+
}
|
|
2573
|
+
};
|
|
2574
|
+
l.on(window, ec, () => {
|
|
2575
|
+
for (const t of f.find('[data-bs-spy="scroll"], [data-tblr-spy="scroll"]')) zt.getOrCreateInstance(t);
|
|
2576
|
+
}), B(zt);
|
|
2577
|
+
var Oe = ".bs.tab", sc = `hide${Oe}`, rc = `hidden${Oe}`, oc = `show${Oe}`, ac = `shown${Oe}`, lc = `click${Oe}`, cc = `keydown${Oe}`, hc = `load${Oe}`, uc = "ArrowLeft", hr = "ArrowRight", dc = "ArrowUp", ur = "ArrowDown", Ri = "Home", dr = "End", oe = "active", fr = "fade", Vi = "show", pr = ".dropdown-toggle", qi = `:not(${pr})`, mr = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"], [data-tblr-toggle="tab"], [data-tblr-toggle="pill"], [data-tblr-toggle="list"]', Yi = `.nav-link${qi}, .list-group-item${qi}, [role="tab"]${qi}, ${mr}`, fc = `.${oe}[data-bs-toggle="tab"], .${oe}[data-bs-toggle="pill"], .${oe}[data-bs-toggle="list"], .${oe}[data-tblr-toggle="tab"], .${oe}[data-tblr-toggle="pill"], .${oe}[data-tblr-toggle="list"]`, Ye = class sn extends O {
|
|
2578
|
+
constructor(e) {
|
|
2579
|
+
super(e), this._parent = this._element.closest('.list-group, .nav, [role="tablist"]'), this._parent && (this._setInitialAttributes(this._parent, this._getChildren()), l.on(this._element, cc, (i) => this._keydown(i)));
|
|
2580
|
+
}
|
|
2581
|
+
static get NAME() {
|
|
2582
|
+
return "tab";
|
|
2583
|
+
}
|
|
2584
|
+
show() {
|
|
2585
|
+
const e = this._element;
|
|
2586
|
+
if (this._elemIsActive(e)) return;
|
|
2587
|
+
const i = this._getActiveElem(), n = i ? l.trigger(i, sc, { relatedTarget: e }) : null;
|
|
2588
|
+
l.trigger(e, oc, { relatedTarget: i })?.defaultPrevented || n?.defaultPrevented || (this._deactivate(i, e), this._activate(e, i));
|
|
2589
|
+
}
|
|
2590
|
+
_activate(e, i) {
|
|
2591
|
+
e && (e.classList.add(oe), this._activate(f.getElementFromSelector(e)), this._queueCallback(() => {
|
|
2592
|
+
e.getAttribute("role") === "tab" ? (e.removeAttribute("tabindex"), e.setAttribute("aria-selected", "true"), this._toggleDropDown(e, !0), l.trigger(e, ac, { relatedTarget: i })) : e.classList.add(Vi);
|
|
2593
|
+
}, e, e.classList.contains(fr)));
|
|
2594
|
+
}
|
|
2595
|
+
_deactivate(e, i) {
|
|
2596
|
+
e && (e.classList.remove(oe), e.blur(), this._deactivate(f.getElementFromSelector(e)), this._queueCallback(() => {
|
|
2597
|
+
e.getAttribute("role") === "tab" ? (e.setAttribute("aria-selected", "false"), e.setAttribute("tabindex", "-1"), this._toggleDropDown(e, !1), l.trigger(e, rc, { relatedTarget: i })) : e.classList.remove(Vi);
|
|
2598
|
+
}, e, e.classList.contains(fr)));
|
|
2599
|
+
}
|
|
2600
|
+
_keydown(e) {
|
|
2601
|
+
if (![uc, hr, dc, ur, Ri, dr].includes(e.key)) return;
|
|
2602
|
+
e.stopPropagation(), e.preventDefault();
|
|
2603
|
+
const i = this._getChildren().filter((s) => !Z(s));
|
|
2604
|
+
let n;
|
|
2605
|
+
if ([Ri, dr].includes(e.key)) n = i[e.key === Ri ? 0 : i.length - 1];
|
|
2606
|
+
else {
|
|
2607
|
+
const s = [hr, ur].includes(e.key);
|
|
2608
|
+
n = Zt(i, e.target, s, !0);
|
|
2609
|
+
}
|
|
2610
|
+
n && (n.focus({ preventScroll: !0 }), sn.getOrCreateInstance(n).show());
|
|
2611
|
+
}
|
|
2612
|
+
_getChildren() {
|
|
2613
|
+
return f.find(Yi, this._parent);
|
|
2614
|
+
}
|
|
2615
|
+
_getActiveElem() {
|
|
2616
|
+
return this._getChildren().find((e) => this._elemIsActive(e)) || null;
|
|
2617
|
+
}
|
|
2618
|
+
_setInitialAttributes(e, i) {
|
|
2619
|
+
this._setAttributeIfNotExists(e, "role", "tablist");
|
|
2620
|
+
for (const n of i) this._setInitialAttributesOnChild(n);
|
|
2621
|
+
}
|
|
2622
|
+
_setInitialAttributesOnChild(e) {
|
|
2623
|
+
e = this._getInnerElement(e);
|
|
2624
|
+
const i = this._elemIsActive(e), n = this._getOuterElement(e);
|
|
2625
|
+
e.setAttribute("aria-selected", String(i)), n !== e && this._setAttributeIfNotExists(n, "role", "presentation"), i || e.setAttribute("tabindex", "-1"), this._setAttributeIfNotExists(e, "role", "tab"), this._setInitialAttributesOnTargetPanel(e);
|
|
2626
|
+
}
|
|
2627
|
+
_setInitialAttributesOnTargetPanel(e) {
|
|
2628
|
+
const i = f.getElementFromSelector(e);
|
|
2629
|
+
i && (this._setAttributeIfNotExists(i, "role", "tabpanel"), e.id && this._setAttributeIfNotExists(i, "aria-labelledby", `${e.id}`));
|
|
2630
|
+
}
|
|
2631
|
+
_toggleDropDown(e, i) {
|
|
2632
|
+
const n = this._getOuterElement(e);
|
|
2633
|
+
if (!n.classList.contains("dropdown")) return;
|
|
2634
|
+
const s = (r, o) => {
|
|
2635
|
+
const a = f.findOne(r, n);
|
|
2636
|
+
a && a.classList.toggle(o, i);
|
|
2637
|
+
};
|
|
2638
|
+
s(pr, oe), s(".dropdown-menu", Vi), n.setAttribute("aria-expanded", String(i));
|
|
2639
|
+
}
|
|
2640
|
+
_setAttributeIfNotExists(e, i, n) {
|
|
2641
|
+
e.hasAttribute(i) || e.setAttribute(i, n);
|
|
2642
|
+
}
|
|
2643
|
+
_elemIsActive(e) {
|
|
2644
|
+
return e.classList.contains(oe);
|
|
2645
|
+
}
|
|
2646
|
+
_getInnerElement(e) {
|
|
2647
|
+
return e.matches(Yi) ? e : f.findOne(Yi, e);
|
|
2648
|
+
}
|
|
2649
|
+
_getOuterElement(e) {
|
|
2650
|
+
return e.closest(".nav-item, .list-group-item") || e;
|
|
2651
|
+
}
|
|
2652
|
+
static jQueryInterface(e) {
|
|
2653
|
+
return this.each(function() {
|
|
2654
|
+
const i = sn.getOrCreateInstance(this);
|
|
2655
|
+
if (typeof e == "string") {
|
|
2656
|
+
if (i[e] === void 0 || e.startsWith("_") || e === "constructor") throw new TypeError(`No method named "${e}"`);
|
|
2657
|
+
i[e]();
|
|
2658
|
+
}
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
};
|
|
2662
|
+
l.on(document, lc, mr, function(t) {
|
|
2663
|
+
["A", "AREA"].includes(this.tagName) && t.preventDefault(), Z(this) || Ye.getOrCreateInstance(this).show();
|
|
2664
|
+
}), l.on(window, hc, () => {
|
|
2665
|
+
for (const t of f.find(fc)) Ye.getOrCreateInstance(t);
|
|
2666
|
+
}), B(Ye);
|
|
2667
|
+
var we = ".bs.toast", pc = `mouseover${we}`, mc = `mouseout${we}`, _c = `focusin${we}`, gc = `focusout${we}`, bc = `hide${we}`, vc = `hidden${we}`, yc = `show${we}`, wc = `shown${we}`, _r = "hide", Bt = "show", Wt = "showing", Ac = { animation: "boolean", autohide: "boolean", delay: "number" }, Ec = { animation: !0, autohide: !0, delay: 5e3 }, ht = class _o extends O {
|
|
2668
|
+
constructor(e, i) {
|
|
2669
|
+
super(e, i), this._timeout = null, this._hasMouseInteraction = !1, this._hasKeyboardInteraction = !1, this._setListeners();
|
|
2670
|
+
}
|
|
2671
|
+
static get Default() {
|
|
2672
|
+
return Ec;
|
|
2673
|
+
}
|
|
2674
|
+
static get DefaultType() {
|
|
2675
|
+
return Ac;
|
|
2676
|
+
}
|
|
2677
|
+
static get NAME() {
|
|
2678
|
+
return "toast";
|
|
2679
|
+
}
|
|
2680
|
+
show() {
|
|
2681
|
+
l.trigger(this._element, yc)?.defaultPrevented || (this._clearTimeout(), this._config.animation && this._element.classList.add("fade"), this._element.classList.remove(_r), Qe(this._element), this._element.classList.add(Bt, Wt), this._queueCallback(() => {
|
|
2682
|
+
this._element.classList.remove(Wt), l.trigger(this._element, wc), this._maybeScheduleHide();
|
|
2683
|
+
}, this._element, this._config.animation));
|
|
2684
|
+
}
|
|
2685
|
+
hide() {
|
|
2686
|
+
this.isShown() && (l.trigger(this._element, bc)?.defaultPrevented || (this._element.classList.add(Wt), this._queueCallback(() => {
|
|
2687
|
+
this._element.classList.add(_r), this._element.classList.remove(Wt, Bt), l.trigger(this._element, vc);
|
|
2688
|
+
}, this._element, this._config.animation)));
|
|
2689
|
+
}
|
|
2690
|
+
dispose() {
|
|
2691
|
+
this._clearTimeout(), this.isShown() && this._element.classList.remove(Bt), super.dispose();
|
|
2692
|
+
}
|
|
2693
|
+
isShown() {
|
|
2694
|
+
return this._element.classList.contains(Bt);
|
|
2695
|
+
}
|
|
2696
|
+
_maybeScheduleHide() {
|
|
2697
|
+
this._config.autohide && (this._hasMouseInteraction || this._hasKeyboardInteraction || (this._timeout = setTimeout(() => {
|
|
2698
|
+
this.hide();
|
|
2699
|
+
}, this._config.delay)));
|
|
2700
|
+
}
|
|
2701
|
+
_onInteraction(e, i) {
|
|
2702
|
+
switch (e.type) {
|
|
2703
|
+
case "mouseover":
|
|
2704
|
+
case "mouseout":
|
|
2705
|
+
this._hasMouseInteraction = i;
|
|
2706
|
+
break;
|
|
2707
|
+
case "focusin":
|
|
2708
|
+
case "focusout":
|
|
2709
|
+
this._hasKeyboardInteraction = i;
|
|
2710
|
+
}
|
|
2711
|
+
if (i) return void this._clearTimeout();
|
|
2712
|
+
const n = e.relatedTarget;
|
|
2713
|
+
this._element === n || this._element.contains(n) || this._maybeScheduleHide();
|
|
2714
|
+
}
|
|
2715
|
+
_setListeners() {
|
|
2716
|
+
l.on(this._element, pc, (e) => this._onInteraction(e, !0)), l.on(this._element, mc, (e) => this._onInteraction(e, !1)), l.on(this._element, _c, (e) => this._onInteraction(e, !0)), l.on(this._element, gc, (e) => this._onInteraction(e, !1));
|
|
2717
|
+
}
|
|
2718
|
+
_clearTimeout() {
|
|
2719
|
+
clearTimeout(this._timeout), this._timeout = null;
|
|
2720
|
+
}
|
|
2721
|
+
static jQueryInterface(e) {
|
|
2722
|
+
return this.each(function() {
|
|
2723
|
+
const i = _o.getOrCreateInstance(this, e);
|
|
2724
|
+
if (typeof e == "string") {
|
|
2725
|
+
if (i[e] === void 0) throw new TypeError(`No method named "${e}"`);
|
|
2726
|
+
i[e](this);
|
|
2727
|
+
}
|
|
2728
|
+
});
|
|
2729
|
+
}
|
|
2730
|
+
};
|
|
2731
|
+
_t(ht), B(ht);
|
|
2732
|
+
var xc = { Alert: Tt, Button: Ct, Carousel: ot, Collapse: Ot, Dropdown: K, Modal: Ve, NavOverflow: Pt, Offcanvas: ye, Popover: Ft, ScrollSpy: zt, Tab: Ye, Toast: ht, Tooltip: Ie };
|
|
2733
|
+
_e(() => {
|
|
2734
|
+
for (const t of document.querySelectorAll('[data-bs-toggle="dropdown"], [data-tblr-toggle="dropdown"]')) try {
|
|
2735
|
+
const e = { boundary: L.getDataAttribute(t, "boundary") === "viewport" ? document.documentElement : "clippingParents" };
|
|
2736
|
+
K.getOrCreateInstance(t, e);
|
|
2737
|
+
} catch (e) {
|
|
2738
|
+
console.error(e);
|
|
2739
|
+
}
|
|
2740
|
+
});
|
|
2741
|
+
var gr = (t) => {
|
|
2742
|
+
for (const e of document.querySelectorAll('[data-bs-toggle="sidebar-folded"], [data-tblr-toggle="sidebar-folded"]')) e.setAttribute("aria-pressed", String(t));
|
|
2743
|
+
}, Ki = (t) => {
|
|
2744
|
+
for (const e of document.querySelectorAll('.navbar-vertical [data-bs-toggle="dropdown"][aria-expanded="true"]')) e !== t && K.getInstance(e)?.hide();
|
|
2745
|
+
};
|
|
2746
|
+
document.addEventListener("click", (t) => {
|
|
2747
|
+
if (!(document.documentElement.getAttribute("data-bs-sidebar") ?? "").startsWith("folded") && !document.querySelector(".navbar-vertical.navbar-folded, .navbar-vertical.navbar-folded-hover")) return;
|
|
2748
|
+
const e = t.target;
|
|
2749
|
+
e instanceof Element && !e.closest(".navbar-vertical .dropdown-menu") && Ki(e.closest('.navbar-vertical [data-bs-toggle="dropdown"]'));
|
|
2750
|
+
}), document.addEventListener("mouseleave", (t) => {
|
|
2751
|
+
const e = t.target;
|
|
2752
|
+
e instanceof Element && e.matches(".navbar-vertical") && (document.documentElement.getAttribute("data-bs-sidebar") === "folded-hover" || e.classList.contains("navbar-folded-hover")) && Ki();
|
|
2753
|
+
}, !0), _e(() => {
|
|
2754
|
+
const t = (document.documentElement.getAttribute("data-bs-sidebar") ?? "").startsWith("folded");
|
|
2755
|
+
if (gr(t), t) for (const e of document.querySelectorAll(".navbar-vertical .dropdown-menu.show")) e.classList.remove("show"), e.parentElement?.querySelector('[data-bs-toggle="dropdown"]')?.setAttribute("aria-expanded", "false");
|
|
2756
|
+
}), document.addEventListener("click", (t) => {
|
|
2757
|
+
if (!(t.target instanceof Element && t.target.closest('[data-bs-toggle="sidebar-folded"], [data-tblr-toggle="sidebar-folded"]'))) return;
|
|
2758
|
+
const e = document.documentElement, i = !(e.getAttribute("data-bs-sidebar") ?? "").startsWith("folded");
|
|
2759
|
+
i ? e.setAttribute("data-bs-sidebar", "folded-hover") : e.removeAttribute("data-bs-sidebar");
|
|
2760
|
+
try {
|
|
2761
|
+
localStorage.setItem("tabler-sidebar", i ? "folded-hover" : "default");
|
|
2762
|
+
} catch {
|
|
2763
|
+
}
|
|
2764
|
+
gr(i), Ki(), document.dispatchEvent(new CustomEvent("tabler:sidebar-folded", { detail: { folded: i } }));
|
|
2765
|
+
}), _e(() => {
|
|
2766
|
+
for (const t of document.querySelectorAll('[data-bs-toggle="tooltip"], [data-tblr-toggle="tooltip"]')) try {
|
|
2767
|
+
const e = { delay: L.getDataAttribute(t, "delay") ?? { show: 50, hide: 50 }, placement: L.getDataAttribute(t, "placement") ?? "auto" };
|
|
2768
|
+
Ie.getOrCreateInstance(t, e);
|
|
2769
|
+
} catch (e) {
|
|
2770
|
+
console.error(e);
|
|
2771
|
+
}
|
|
2772
|
+
}), _e(() => {
|
|
2773
|
+
for (const t of document.querySelectorAll('[data-bs-toggle="popover"], [data-tblr-toggle="popover"]')) try {
|
|
2774
|
+
const e = { delay: L.getDataAttribute(t, "delay") ?? { show: 50, hide: 50 }, placement: L.getDataAttribute(t, "placement") ?? "auto" };
|
|
2775
|
+
Ft.getOrCreateInstance(t, e);
|
|
2776
|
+
} catch (e) {
|
|
2777
|
+
console.error(e);
|
|
2778
|
+
}
|
|
2779
|
+
});
|
|
2780
|
+
var Ht = "switch-icon", Ui = `.bs.${Ht}`, Tc = `click${Ui}`, Cc = `toggle${Ui}`, kc = `change${Ui}`, br = "active", vr = "switch-icon-loading", yr = ".switch-icon", Sc = `[data-bs-toggle="${Ht}"], [data-tblr-toggle="${Ht}"]`, Ic = {}, Oc = {}, wr = class extends O {
|
|
2781
|
+
#e;
|
|
2782
|
+
constructor(t, e) {
|
|
2783
|
+
super(t, e), this._element && (this.#e = this._element.matches(yr) ? this._element : f.findOne(yr, this._element) ?? this._element, this._element.hasAttribute("aria-pressed") || this._element.setAttribute("aria-pressed", String(this.isActive)), l.on(this._element, Tc, (i) => {
|
|
2784
|
+
i.stopPropagation(), this._element.classList.contains("disabled") || this._element.getAttribute("aria-disabled") === "true" || this.toggle();
|
|
2785
|
+
}));
|
|
2786
|
+
}
|
|
2787
|
+
static get Default() {
|
|
2788
|
+
return Ic;
|
|
2789
|
+
}
|
|
2790
|
+
static get DefaultType() {
|
|
2791
|
+
return Oc;
|
|
2792
|
+
}
|
|
2793
|
+
static get NAME() {
|
|
2794
|
+
return Ht;
|
|
2795
|
+
}
|
|
2796
|
+
get isActive() {
|
|
2797
|
+
return this.#e.classList.contains(br);
|
|
2798
|
+
}
|
|
2799
|
+
get isLoading() {
|
|
2800
|
+
return this.#e.classList.contains(vr);
|
|
2801
|
+
}
|
|
2802
|
+
toggle(t) {
|
|
2803
|
+
if (this.isLoading) return;
|
|
2804
|
+
const e = t ?? !this.isActive;
|
|
2805
|
+
let i;
|
|
2806
|
+
l.trigger(this._element, Cc, { active: e, wait: (n) => {
|
|
2807
|
+
i = n;
|
|
2808
|
+
} })?.defaultPrevented || (i ? (this.#t(!0), i.then(() => this.#i(e), () => {
|
|
2809
|
+
}).finally(() => this.#t(!1))) : this.#i(e));
|
|
2810
|
+
}
|
|
2811
|
+
dispose() {
|
|
2812
|
+
this.#t(!1), super.dispose();
|
|
2813
|
+
}
|
|
2814
|
+
#i(t) {
|
|
2815
|
+
this._element && (this.#e.classList.toggle(br, t), this._element.setAttribute("aria-pressed", String(t)), l.trigger(this._element, kc, { active: t }));
|
|
2816
|
+
}
|
|
2817
|
+
#t(t) {
|
|
2818
|
+
this._element && (this.#e.classList.toggle(vr, t), t ? this._element.setAttribute("aria-busy", "true") : this._element.removeAttribute("aria-busy"));
|
|
2819
|
+
}
|
|
2820
|
+
};
|
|
2821
|
+
J(Sc, wr), _e(() => {
|
|
2822
|
+
const t = window.location.hash;
|
|
2823
|
+
if (t) {
|
|
2824
|
+
for (const e of document.querySelectorAll('[data-bs-toggle="tab"], [data-tblr-toggle="tab"]')) if (e.hash === t) try {
|
|
2825
|
+
Ye.getOrCreateInstance(e).show();
|
|
2826
|
+
} catch (i) {
|
|
2827
|
+
console.error(i);
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
}), _e(() => {
|
|
2831
|
+
for (const t of document.querySelectorAll('[data-bs-toggle="toast"], [data-tblr-toggle="toast"]')) try {
|
|
2832
|
+
const e = f.getElementFromSelector(t);
|
|
2833
|
+
if (!e) continue;
|
|
2834
|
+
const i = ht.getOrCreateInstance(e);
|
|
2835
|
+
t.addEventListener("click", () => {
|
|
2836
|
+
i.show();
|
|
2837
|
+
});
|
|
2838
|
+
} catch (e) {
|
|
2839
|
+
console.error(e);
|
|
2840
|
+
}
|
|
2841
|
+
});
|
|
2842
|
+
var Ar = "sortable", Er = `data-${Ar}`, Dc = `[${Er}]`, Mc = {}, $c = {}, xr = class extends O {
|
|
2843
|
+
constructor(t, e) {
|
|
2844
|
+
super(t, e), this._sortable = null, this._element && window.Sortable && (this._sortable = new window.Sortable(this._element, this._config));
|
|
2845
|
+
}
|
|
2846
|
+
static get Default() {
|
|
2847
|
+
return Mc;
|
|
2848
|
+
}
|
|
2849
|
+
static get DefaultType() {
|
|
2850
|
+
return $c;
|
|
2851
|
+
}
|
|
2852
|
+
static get NAME() {
|
|
2853
|
+
return Ar;
|
|
2854
|
+
}
|
|
2855
|
+
get sortable() {
|
|
2856
|
+
return this._sortable;
|
|
2857
|
+
}
|
|
2858
|
+
toArray() {
|
|
2859
|
+
return this._sortable?.toArray() ?? [];
|
|
2860
|
+
}
|
|
2861
|
+
sort(t, e) {
|
|
2862
|
+
this._sortable?.sort(t, e);
|
|
2863
|
+
}
|
|
2864
|
+
dispose() {
|
|
2865
|
+
this._sortable?.destroy(), super.dispose();
|
|
2866
|
+
}
|
|
2867
|
+
_mergeConfigObj(t, e) {
|
|
2868
|
+
let i = {};
|
|
2869
|
+
const n = e?.getAttribute(Er);
|
|
2870
|
+
if (n) try {
|
|
2871
|
+
const s = JSON.parse(n);
|
|
2872
|
+
s && typeof s == "object" && !Array.isArray(s) && (i = s);
|
|
2873
|
+
} catch {
|
|
2874
|
+
}
|
|
2875
|
+
return super._mergeConfigObj({ ...i, ...t }, e);
|
|
2876
|
+
}
|
|
2877
|
+
};
|
|
2878
|
+
J(Dc, xr);
|
|
2879
|
+
var Tr = "otpInput", Cr = `.bs.${Tr}`, Lc = `input${Cr}`, Nc = `complete${Cr}`, kr = "otp-rendered", Sr = ["blur", "keyup", "select"], Ir = ["click", "pointercancel"], Or = { numeric: { inputmode: "numeric", pattern: "[0-9]*", filter: /[^0-9]/g }, alphanumeric: { inputmode: "text", pattern: "[A-Za-z0-9]*", filter: /[^A-Za-z0-9]/g }, alpha: { inputmode: "text", pattern: "[A-Za-z]*", filter: /[^A-Za-z]/g } }, Pc = { groups: null, length: null, mask: !1, separator: "·", type: "numeric" }, jc = { groups: "(array|null)", length: "(number|null)", mask: "boolean", separator: "string", type: "string" }, Dr = class extends O {
|
|
2880
|
+
constructor(t, e) {
|
|
2881
|
+
if (super(t, e), this._length = 0, this._wasComplete = !1, this._slots = [], this._slotsContainer = null, this._pointerActive = !1, this._pointerIndex = 0, this._composedValue = null, this._onInput = (n) => {
|
|
2882
|
+
if (n.isComposing) return;
|
|
2883
|
+
const s = this._composedValue;
|
|
2884
|
+
this._composedValue = null, s !== null && s === this._input.value || this._handleInput();
|
|
2885
|
+
}, this._onCompositionEnd = () => {
|
|
2886
|
+
this._handleInput(), this._composedValue = this._input.value;
|
|
2887
|
+
}, this._onBeforeInput = (n) => this._handleBeforeInput(n), this._onFocus = () => this._handleFocus(), this._onPointerDown = (n) => this._handlePointerDown(n), this._onPointerEnd = () => {
|
|
2888
|
+
this._pointerActive = !1;
|
|
2889
|
+
}, this._onSync = () => this._render(), this._onSelectionChange = () => {
|
|
2890
|
+
document.activeElement === this._input && this._render();
|
|
2891
|
+
}, !this._element) return;
|
|
2892
|
+
const i = f.findOne("input", this._element);
|
|
2893
|
+
i && (this._input = i, this._type = Or[this._config.type] ?? Or.numeric, this._length = this._resolveLength(), this._setupInput(), this._renderSlots(), this._addEventListeners(), this._render(), this._wasComplete = this._input.value.length === this._length);
|
|
2894
|
+
}
|
|
2895
|
+
static get Default() {
|
|
2896
|
+
return Pc;
|
|
2897
|
+
}
|
|
2898
|
+
static get DefaultType() {
|
|
2899
|
+
return jc;
|
|
2900
|
+
}
|
|
2901
|
+
static get NAME() {
|
|
2902
|
+
return Tr;
|
|
2903
|
+
}
|
|
2904
|
+
getValue() {
|
|
2905
|
+
return this._input.value;
|
|
2906
|
+
}
|
|
2907
|
+
setValue(t) {
|
|
2908
|
+
this._input.value = this._sanitize(String(t)), this._render(), this._checkComplete();
|
|
2909
|
+
}
|
|
2910
|
+
clear() {
|
|
2911
|
+
this._input.value = "", this._render(), this._input.focus();
|
|
2912
|
+
}
|
|
2913
|
+
focus() {
|
|
2914
|
+
this._pointerActive = !1, this._input.focus(), this._selectSlot(this._firstEmptyIndex()), this._render();
|
|
2915
|
+
}
|
|
2916
|
+
dispose() {
|
|
2917
|
+
if (this._input) {
|
|
2918
|
+
this._input.removeEventListener("input", this._onInput), this._input.removeEventListener("beforeinput", this._onBeforeInput), this._input.removeEventListener("focus", this._onFocus), this._input.removeEventListener("pointerdown", this._onPointerDown), this._input.removeEventListener("compositionend", this._onCompositionEnd);
|
|
2919
|
+
for (const t of Ir) this._input.removeEventListener(t, this._onPointerEnd);
|
|
2920
|
+
for (const t of Sr) this._input.removeEventListener(t, this._onSync);
|
|
2921
|
+
document.removeEventListener("selectionchange", this._onSelectionChange), this._slotsContainer?.remove(), this._element.classList.remove(kr), super.dispose();
|
|
2922
|
+
} else super.dispose();
|
|
2923
|
+
}
|
|
2924
|
+
_resolveLength() {
|
|
2925
|
+
const t = [this._config.length, Number.parseInt(this._input.getAttribute("maxlength") ?? "", 10)], { groups: e } = this._config;
|
|
2926
|
+
Array.isArray(e) && e.length > 0 && t.push(e.reduce((i, n) => i + Number(n), 0));
|
|
2927
|
+
for (const i of t) if (typeof i == "number" && Number.isInteger(i) && i > 0) return Math.min(i, 32);
|
|
2928
|
+
return 6;
|
|
2929
|
+
}
|
|
2930
|
+
_setupInput() {
|
|
2931
|
+
const t = this._input;
|
|
2932
|
+
t.type !== "text" && t.type !== "tel" && (t.type = "text"), t.classList.add("otp-input"), t.setAttribute("maxlength", String(this._length)), t.setAttribute("inputmode", this._type.inputmode), t.setAttribute("pattern", this._type.pattern), t.getAttribute("autocomplete") || t.setAttribute("autocomplete", "one-time-code"), t.value && (t.value = this._sanitize(t.value));
|
|
2933
|
+
}
|
|
2934
|
+
_renderSlots() {
|
|
2935
|
+
const t = document.createElement("div");
|
|
2936
|
+
t.className = "otp-slots", t.setAttribute("aria-hidden", "true");
|
|
2937
|
+
const { groups: e, separator: i } = this._config;
|
|
2938
|
+
let n = 0, s = 0;
|
|
2939
|
+
for (let r = 0; r < this._length; r++) {
|
|
2940
|
+
const o = document.createElement("div");
|
|
2941
|
+
if (o.className = "otp-slot", t.append(o), this._slots.push(o), e && e.length > 0 && (s++, s === e[n] && r < this._length - 1)) {
|
|
2942
|
+
const a = document.createElement("div");
|
|
2943
|
+
a.className = "otp-separator", a.textContent = i, t.append(a), n = Math.min(n + 1, e.length - 1), s = 0;
|
|
2944
|
+
}
|
|
2945
|
+
}
|
|
2946
|
+
this._slotsContainer = t, this._element.append(t), this._element.classList.add(kr);
|
|
2947
|
+
}
|
|
2948
|
+
_addEventListeners() {
|
|
2949
|
+
this._input.addEventListener("input", this._onInput), this._input.addEventListener("beforeinput", this._onBeforeInput), this._input.addEventListener("focus", this._onFocus), this._input.addEventListener("pointerdown", this._onPointerDown), this._input.addEventListener("compositionend", this._onCompositionEnd);
|
|
2950
|
+
for (const t of Ir) this._input.addEventListener(t, this._onPointerEnd);
|
|
2951
|
+
document.addEventListener("selectionchange", this._onSelectionChange);
|
|
2952
|
+
for (const t of Sr) this._input.addEventListener(t, this._onSync);
|
|
2953
|
+
}
|
|
2954
|
+
_handleFocus() {
|
|
2955
|
+
if (this._pointerActive) return this._pointerActive = !1, this._selectSlot(this._pointerIndex), void this._render();
|
|
2956
|
+
this._selectSlot(this._firstEmptyIndex()), this._render();
|
|
2957
|
+
}
|
|
2958
|
+
_handleInput() {
|
|
2959
|
+
const t = this._sanitize(this._input.value);
|
|
2960
|
+
t !== this._input.value && (this._input.value = t), document.activeElement === this._input && this._selectSlot(this._firstEmptyIndex()), this._afterValueChange();
|
|
2961
|
+
}
|
|
2962
|
+
_handleBeforeInput(t) {
|
|
2963
|
+
const { inputType: e, data: i } = t;
|
|
2964
|
+
if (e === "insertText" && i && i.length === 1) {
|
|
2965
|
+
t.preventDefault();
|
|
2966
|
+
const n = this._sanitize(i);
|
|
2967
|
+
if (!n) return;
|
|
2968
|
+
const s = Math.min(this._input.selectionStart ?? 0, this._length - 1), r = Math.max(this._input.selectionEnd ?? s, s + 1), o = [...this._input.value];
|
|
2969
|
+
return o.splice(s, r - s, n), this._input.value = o.join("").slice(0, this._length), this._selectSlot(s + 1), void this._afterValueChange();
|
|
2970
|
+
}
|
|
2971
|
+
if (e === "deleteContentBackward") {
|
|
2972
|
+
t.preventDefault();
|
|
2973
|
+
const n = this._input.value, s = this._input.selectionStart ?? 0, r = this._input.selectionEnd ?? s, o = [...this._input.value];
|
|
2974
|
+
return r > s ? (o.splice(s, r - s), this._input.value = o.join(""), this._selectSlot(s)) : s > 0 && (o.splice(s - 1, 1), this._input.value = o.join(""), this._selectSlot(s - 1)), void this._afterValueChange(n);
|
|
2975
|
+
}
|
|
2976
|
+
if (e === "deleteContentForward") {
|
|
2977
|
+
t.preventDefault();
|
|
2978
|
+
const n = this._input.value, s = this._input.selectionStart ?? 0, r = this._input.selectionEnd ?? s, o = [...this._input.value];
|
|
2979
|
+
r > s ? (o.splice(s, r - s), this._input.value = o.join("")) : s < o.length && (o.splice(s, 1), this._input.value = o.join("")), this._selectSlot(s), this._afterValueChange(n);
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
_handlePointerDown(t) {
|
|
2983
|
+
const e = this._slotIndexFromPoint(t.clientX);
|
|
2984
|
+
if (e === null) return;
|
|
2985
|
+
const i = Math.min(e, this._firstEmptyIndex());
|
|
2986
|
+
if (document.activeElement === this._input) return t.preventDefault(), this._selectSlot(i), void this._render();
|
|
2987
|
+
this._pointerActive = !0, this._pointerIndex = i;
|
|
2988
|
+
}
|
|
2989
|
+
_slotIndexFromPoint(t) {
|
|
2990
|
+
const e = getComputedStyle(this._element).direction === "rtl";
|
|
2991
|
+
for (const [i, n] of this._slots.entries()) {
|
|
2992
|
+
const s = n.getBoundingClientRect();
|
|
2993
|
+
if ((e ? t >= s.left : t <= s.right) || i === this._slots.length - 1) return i;
|
|
2994
|
+
}
|
|
2995
|
+
return null;
|
|
2996
|
+
}
|
|
2997
|
+
_afterValueChange(t) {
|
|
2998
|
+
this._render(), t !== void 0 && t === this._input.value || (l.trigger(this._element, Lc, { value: this._input.value }), this._checkComplete());
|
|
2999
|
+
}
|
|
3000
|
+
_firstEmptyIndex() {
|
|
3001
|
+
return Math.min(this._input.value.length, this._length - 1);
|
|
3002
|
+
}
|
|
3003
|
+
_selectSlot(t) {
|
|
3004
|
+
const e = Math.max(0, Math.min(t, this._length - 1)), i = e < this._input.value.length ? e + 1 : e;
|
|
3005
|
+
this._input.setSelectionRange(e, i);
|
|
3006
|
+
}
|
|
3007
|
+
_sanitize(t) {
|
|
3008
|
+
return t.replace(this._type.filter, "").slice(0, this._length);
|
|
3009
|
+
}
|
|
3010
|
+
_render() {
|
|
3011
|
+
const { value: t } = this._input, e = document.activeElement === this._input, i = Math.min(this._input.selectionStart ?? t.length, this._length - 1);
|
|
3012
|
+
for (const [n, s] of this._slots.entries()) {
|
|
3013
|
+
const r = t[n] ?? "";
|
|
3014
|
+
s.textContent = r && this._config.mask ? "•" : r, s.classList.toggle("otp-slot-filled", !!r), s.classList.toggle("otp-slot-active", e && n === i);
|
|
3015
|
+
}
|
|
3016
|
+
}
|
|
3017
|
+
_checkComplete() {
|
|
3018
|
+
const { value: t } = this._input, e = t.length === this._length;
|
|
3019
|
+
e && !this._wasComplete && l.trigger(this._element, Nc, { value: t }), this._wasComplete = e;
|
|
3020
|
+
}
|
|
3021
|
+
};
|
|
3022
|
+
J('[data-bs-toggle="otp"], [data-tblr-toggle="otp"]', Dr);
|
|
3023
|
+
var Rt = "sparkline", Mr = `.bs.${Rt}`, $r = `rendered${Mr}`, Fc = `updated${Mr}`, Gi = "sparkline-label", zc = `[data-bs-toggle="${Rt}"], [data-tblr-toggle="${Rt}"]`, Lr = "--tblr-sparkline", Bc = { type: "line", values: [], width: 80, height: 24, min: null, max: null, fill: "none", spot: "none", pad: 2, barGap: 2, barRadius: 2, label: null, threshold: null, animation: 300 }, Wc = { type: "string", values: "array", width: "number", height: "number", min: "(number|null)", max: "(number|null)", fill: "string", spot: "string", pad: "number", barGap: "number", barRadius: "number", label: "(string|number|boolean|null)", threshold: "(number|null)", animation: "number" }, de = (t) => document.createElementNS("http://www.w3.org/2000/svg", t), fe = (t, e) => {
|
|
3024
|
+
for (const [i, n] of Object.entries(e)) n != null && t.setAttribute(i, String(n));
|
|
3025
|
+
}, pe = (t) => `var(${Lr}-${t})`, Nr = (t, e) => {
|
|
3026
|
+
const i = e - t;
|
|
3027
|
+
return i === 0 ? 1 : i;
|
|
3028
|
+
}, Pr = (t, e, i, ...n) => {
|
|
3029
|
+
const s = e ?? Math.min(...t, ...n), r = i ?? Math.max(...t, ...n);
|
|
3030
|
+
return { min: s, max: r, span: Nr(s, r) };
|
|
3031
|
+
}, ut = /-?\d*\.?\d+(?:e[-+]?\d+)?/g, Hc = (t, e, i) => {
|
|
3032
|
+
const n = t.match(ut), s = e.match(ut);
|
|
3033
|
+
if (!n || !s || n.length !== s.length || t.replace(ut, "#") !== e.replace(ut, "#")) return e;
|
|
3034
|
+
let r = 0;
|
|
3035
|
+
return e.replace(ut, () => {
|
|
3036
|
+
const o = Number(n[r]) + (Number(s[r]) - Number(n[r])) * i;
|
|
3037
|
+
return r++, String(Math.round(1e3 * o) / 1e3);
|
|
3038
|
+
});
|
|
3039
|
+
}, jr = (t, e, i) => {
|
|
3040
|
+
const n = getComputedStyle(t).getPropertyValue(`${Lr}-${e}`).trim(), s = Number.parseFloat(n);
|
|
3041
|
+
return Number.isFinite(s) ? s : i;
|
|
3042
|
+
}, Fr = class extends O {
|
|
3043
|
+
constructor(t, e) {
|
|
3044
|
+
super(t, e), this._userConfig = {}, this._frame = 0, this._element && (this._userConfig = { ...e }, this.render());
|
|
3045
|
+
}
|
|
3046
|
+
static get Default() {
|
|
3047
|
+
return Bc;
|
|
3048
|
+
}
|
|
3049
|
+
static get DefaultType() {
|
|
3050
|
+
return Wc;
|
|
3051
|
+
}
|
|
3052
|
+
static get NAME() {
|
|
3053
|
+
return Rt;
|
|
3054
|
+
}
|
|
3055
|
+
update(t) {
|
|
3056
|
+
const e = Array.isArray(t) ? t.join(",") : String(t), i = this._element.hasAttribute("data-tblr-values") ? "data-tblr-values" : "data-bs-values";
|
|
3057
|
+
this._element.setAttribute(i, e), delete this._userConfig.values, this.render(), l.trigger(this._element, Fc);
|
|
3058
|
+
}
|
|
3059
|
+
render() {
|
|
3060
|
+
this._config = this._getConfig(this._userConfig);
|
|
3061
|
+
const t = this._element.querySelector("svg");
|
|
3062
|
+
if (this._element.querySelector(`.${Gi}`)?.remove(), this._config.values.length === 0) return cancelAnimationFrame(this._frame), t?.remove(), void l.trigger(this._element, $r);
|
|
3063
|
+
let e;
|
|
3064
|
+
switch (this._config.type) {
|
|
3065
|
+
case "bar":
|
|
3066
|
+
e = this._renderBars();
|
|
3067
|
+
break;
|
|
3068
|
+
case "tristate":
|
|
3069
|
+
e = this._renderTristate();
|
|
3070
|
+
break;
|
|
3071
|
+
case "circle":
|
|
3072
|
+
e = this._renderCircle();
|
|
3073
|
+
break;
|
|
3074
|
+
default:
|
|
3075
|
+
e = this._renderLine();
|
|
3076
|
+
}
|
|
3077
|
+
t && this._canAnimate(t, e) ? this._animate(t, e) : (cancelAnimationFrame(this._frame), t?.remove(), this._element.append(e));
|
|
3078
|
+
const i = this._labelText();
|
|
3079
|
+
if (i !== "") {
|
|
3080
|
+
const n = document.createElement("span");
|
|
3081
|
+
n.className = Gi, n.textContent = i, this._element.append(n);
|
|
3082
|
+
}
|
|
3083
|
+
l.trigger(this._element, $r);
|
|
3084
|
+
}
|
|
3085
|
+
dispose() {
|
|
3086
|
+
cancelAnimationFrame(this._frame), this._element.querySelector("svg")?.remove(), this._element.querySelector(`.${Gi}`)?.remove(), super.dispose();
|
|
3087
|
+
}
|
|
3088
|
+
_configAfterMerge(t) {
|
|
3089
|
+
return t.values = (e = t.values, Array.isArray(e) ? e.map(Number).filter(Number.isFinite) : typeof e == "number" ? Number.isFinite(e) ? [e] : [] : ((i) => {
|
|
3090
|
+
const n = typeof i == "string" ? i.trim() : "";
|
|
3091
|
+
if (!n) return [];
|
|
3092
|
+
if (n.startsWith("[")) try {
|
|
3093
|
+
const s = JSON.parse(n);
|
|
3094
|
+
return Array.isArray(s) ? s.map(Number).filter(Number.isFinite) : [];
|
|
3095
|
+
} catch {
|
|
3096
|
+
return [];
|
|
3097
|
+
}
|
|
3098
|
+
return n.split(",").map((s) => Number(s.trim())).filter(Number.isFinite);
|
|
3099
|
+
})(e)), t;
|
|
3100
|
+
var e;
|
|
3101
|
+
}
|
|
3102
|
+
_labelText() {
|
|
3103
|
+
const { label: t, values: e, type: i } = this._config;
|
|
3104
|
+
return t === null || t === !1 || t === "" ? "" : t !== "auto" && t !== !0 ? String(t) : i === "circle" ? `${Math.round(100 * this._circleRatio())}%` : String(e[e.length - 1]);
|
|
3105
|
+
}
|
|
3106
|
+
_circleRatio() {
|
|
3107
|
+
const t = this._config, e = t.values[0] ?? 0, i = t.max ?? (t.values.length > 1 ? t.values[1] : 100), n = t.min ?? 0;
|
|
3108
|
+
return Math.max(0, Math.min(1, (e - n) / Nr(n, i)));
|
|
3109
|
+
}
|
|
3110
|
+
_canAnimate(t, e) {
|
|
3111
|
+
return !(this._config.animation <= 0 || ai()) && t.getAttribute("viewBox") === e.getAttribute("viewBox") && t.children.length === e.children.length && Array.from(t.children).every((i, n) => i.tagName === e.children[n].tagName);
|
|
3112
|
+
}
|
|
3113
|
+
_animate(t, e) {
|
|
3114
|
+
cancelAnimationFrame(this._frame);
|
|
3115
|
+
const i = Array.from(e.children).map((o, a) => {
|
|
3116
|
+
const c = t.children[a], h = [];
|
|
3117
|
+
for (const { name: u } of Array.from(c.attributes)) o.hasAttribute(u) || c.removeAttribute(u);
|
|
3118
|
+
for (const { name: u, value: d } of Array.from(o.attributes)) {
|
|
3119
|
+
const p = c.getAttribute(u);
|
|
3120
|
+
p === null || p === d ? c.setAttribute(u, d) : h.push([u, p, d]);
|
|
3121
|
+
}
|
|
3122
|
+
return { source: c, tweens: h };
|
|
3123
|
+
}), n = this._config.animation, s = performance.now(), r = (o) => {
|
|
3124
|
+
const a = ((c) => 1 - (1 - c) ** 3)(Math.min(1, (o - s) / n));
|
|
3125
|
+
for (const { source: c, tweens: h } of i) for (const [u, d, p] of h) c.setAttribute(u, a >= 1 ? p : Hc(d, p, a));
|
|
3126
|
+
a < 1 && (this._frame = requestAnimationFrame(r));
|
|
3127
|
+
};
|
|
3128
|
+
this._frame = requestAnimationFrame(r);
|
|
3129
|
+
}
|
|
3130
|
+
_hairline(t, e, i, n = !1) {
|
|
3131
|
+
const s = de("line");
|
|
3132
|
+
fe(s, { x1: 0, x2: this._config.width, y1: e, y2: e, stroke: pe(i), "stroke-width": 1, "stroke-dasharray": n ? "3 2" : null, "vector-effect": "non-scaling-stroke" }), t.append(s);
|
|
3133
|
+
}
|
|
3134
|
+
_createSvg() {
|
|
3135
|
+
const { width: t, height: e } = this._config, i = de("svg");
|
|
3136
|
+
return fe(i, { viewBox: `0 0 ${t} ${e}`, preserveAspectRatio: "none", width: t, height: e, class: "sparkline-svg", "aria-hidden": "true" }), i;
|
|
3137
|
+
}
|
|
3138
|
+
_renderLine() {
|
|
3139
|
+
const t = this._config, e = this._createSvg(), { min: i, span: n } = Pr(t.values, t.min, t.max, ...t.threshold === null ? [] : [t.threshold]), s = (h) => t.pad + (1 - (h - i) / n) * (t.height - 2 * t.pad), r = t.values.length === 1 ? [s(t.values[0]), s(t.values[0])] : t.values.map(s), o = t.width / (r.length - 1);
|
|
3140
|
+
if (t.threshold !== null && this._hairline(e, s(t.threshold), "threshold", !0), t.fill === "auto") {
|
|
3141
|
+
const h = de("path");
|
|
3142
|
+
fe(h, { d: this._areaPath(r, o, t.height), fill: pe("fill"), stroke: "none" }), e.append(h);
|
|
3143
|
+
}
|
|
3144
|
+
const a = de("polyline");
|
|
3145
|
+
fe(a, { points: r.map((h, u) => `${u * o},${h}`).join(" "), fill: "none", stroke: pe("stroke"), "stroke-width": pe("stroke-width"), "stroke-linecap": "round", "stroke-linejoin": "round" }), e.append(a);
|
|
3146
|
+
const c = ((h, u) => {
|
|
3147
|
+
if (h.length === 0 || u === "none") return -1;
|
|
3148
|
+
if (u === "last") return h.length - 1;
|
|
3149
|
+
let d = 0;
|
|
3150
|
+
for (let p = 1; p < h.length; p++) (u === "min" ? h[p] < h[d] : h[p] > h[d]) && (d = p);
|
|
3151
|
+
return d;
|
|
3152
|
+
})(t.values, t.spot);
|
|
3153
|
+
if (c >= 0) {
|
|
3154
|
+
const h = de("circle");
|
|
3155
|
+
fe(h, { cx: t.values.length === 1 ? t.width / 2 : c * o, cy: r[c], r: jr(this._element, "spot-size", 2), fill: pe("spot") }), e.append(h);
|
|
3156
|
+
}
|
|
3157
|
+
return e;
|
|
3158
|
+
}
|
|
3159
|
+
_areaPath(t, e, i) {
|
|
3160
|
+
return `${t.map((n, s) => `${s === 0 ? "M" : "L"} ${s * e} ${n}`).join(" ")} L ${(t.length - 1) * e} ${i} L 0 ${i} Z`;
|
|
3161
|
+
}
|
|
3162
|
+
_renderBars() {
|
|
3163
|
+
const t = this._config, e = this._createSvg(), { min: i, span: n } = Pr(t.values, t.min, t.max, 0, ...t.threshold === null ? [] : [t.threshold]), s = (h) => t.height - (h - i) / n * t.height, r = t.values.length, o = (t.width - t.barGap * (r - 1)) / r, a = s(0);
|
|
3164
|
+
i < 0 && this._hairline(e, a, "zero"), t.threshold !== null && this._hairline(e, s(t.threshold), "threshold", !0);
|
|
3165
|
+
const c = (h) => Math.max(0, Math.min(t.height, h));
|
|
3166
|
+
return t.values.forEach((h, u) => {
|
|
3167
|
+
const d = c(s(Math.max(h, 0))), p = c(s(Math.min(h, 0))), m = t.threshold === null ? h < 0 : h < t.threshold, g = de("rect");
|
|
3168
|
+
fe(g, { x: u * (o + t.barGap), y: d, width: o, height: p - d, rx: t.barRadius, fill: pe(m ? "negative" : "stroke") }), e.append(g);
|
|
3169
|
+
}), e;
|
|
3170
|
+
}
|
|
3171
|
+
_renderTristate() {
|
|
3172
|
+
const t = this._config, e = this._createSvg(), i = t.values.length, n = (t.width - t.barGap * (i - 1)) / i, s = t.height / 2, r = Math.min(2, s);
|
|
3173
|
+
return this._hairline(e, s, "zero"), t.values.forEach((o, a) => {
|
|
3174
|
+
const c = de("rect"), h = o > 0 ? { y: 0, height: s, fill: "stroke" } : o < 0 ? { y: s, height: s, fill: "negative" } : { y: s - r / 2, height: r, fill: "track" };
|
|
3175
|
+
fe(c, { x: a * (n + t.barGap), y: h.y, width: n, height: h.height, rx: t.barRadius, fill: pe(h.fill) }), e.append(c);
|
|
3176
|
+
}), e;
|
|
3177
|
+
}
|
|
3178
|
+
_renderCircle() {
|
|
3179
|
+
const t = this._config, e = this._createSvg(), i = jr(this._element, "stroke-width", 2), n = Math.max(0, Math.min(t.width, t.height) / 2 - i / 2), s = t.width / 2, r = t.height / 2, o = this._circleRatio(), a = 2 * Math.PI * n, c = de("circle");
|
|
3180
|
+
fe(c, { cx: s, cy: r, r: n, fill: "none", stroke: pe("track"), "stroke-width": i }), e.append(c);
|
|
3181
|
+
const h = de("circle");
|
|
3182
|
+
return fe(h, { cx: s, cy: r, r: n, fill: "none", stroke: pe("stroke"), "stroke-width": i, "stroke-linecap": "round", "stroke-dasharray": a, "stroke-dashoffset": a * (1 - o), transform: `rotate(-90 ${s} ${r})` }), e.append(h), e;
|
|
3183
|
+
}
|
|
3184
|
+
};
|
|
3185
|
+
J(zc, Fr);
|
|
3186
|
+
var Ke = "strength", Rc = `change.bs.${Ke}`, Vc = `[data-bs-${Ke}], [data-tblr-${Ke}]`, qc = `.${Ke}-segment`, Yc = `.${Ke}-text`, dt = ["weak", "fair", "good", "strong"], Xi = { input: null, minLength: 8, messages: { weak: "Weak", fair: "Fair", good: "Good", strong: "Strong" }, weights: { minLength: 1, extraLength: 1, longPassword: 1, lowercase: 1, uppercase: 1, numbers: 1, special: 1, multipleSpecial: 1 }, thresholds: [2, 4, 6], scorer: null }, Kc = { input: "(string|null)", minLength: "number", messages: "object", weights: "object", thresholds: "array", scorer: "(function|null)" }, zr = class extends O {
|
|
3187
|
+
constructor(t, e) {
|
|
3188
|
+
super(t, e), this._input = null, this._segments = [], this._text = null, this._emptyText = "", this._level = null, this._onInput = () => this.evaluate(), this._element && (this._input = this._getInput(), this._segments = f.find(qc, this._element), this._text = this._getText(), this._emptyText = this._text?.textContent?.trim() ?? "", this._setUpAria(), this._input && (this._input.addEventListener("input", this._onInput), this.evaluate()));
|
|
3189
|
+
}
|
|
3190
|
+
static get Default() {
|
|
3191
|
+
return Xi;
|
|
3192
|
+
}
|
|
3193
|
+
static get DefaultType() {
|
|
3194
|
+
return Kc;
|
|
3195
|
+
}
|
|
3196
|
+
static get NAME() {
|
|
3197
|
+
return Ke;
|
|
3198
|
+
}
|
|
3199
|
+
get level() {
|
|
3200
|
+
return this._level;
|
|
3201
|
+
}
|
|
3202
|
+
evaluate() {
|
|
3203
|
+
if (!this._input) return;
|
|
3204
|
+
const t = this._input.value, e = this._score(t), i = this._level_(e);
|
|
3205
|
+
i !== this._level && (this._level = i, this._render(i), l.trigger(this._element, Rc, { strength: i, score: e }));
|
|
3206
|
+
}
|
|
3207
|
+
dispose() {
|
|
3208
|
+
this._input?.removeEventListener("input", this._onInput), super.dispose();
|
|
3209
|
+
}
|
|
3210
|
+
_configAfterMerge(t) {
|
|
3211
|
+
return { ...t, messages: { ...Xi.messages, ...t.messages }, weights: { ...Xi.weights, ...t.weights } };
|
|
3212
|
+
}
|
|
3213
|
+
_getInput() {
|
|
3214
|
+
const { input: t } = this._config;
|
|
3215
|
+
if (t) return z(t);
|
|
3216
|
+
const e = this._element.parentElement, i = e ? f.find('input[type="password"]', e) : [], n = i.filter((s) => !!(s.compareDocumentPosition(this._element) & Node.DOCUMENT_POSITION_FOLLOWING));
|
|
3217
|
+
return n[n.length - 1] ?? i[0] ?? null;
|
|
3218
|
+
}
|
|
3219
|
+
_getText() {
|
|
3220
|
+
const t = this._element.parentElement;
|
|
3221
|
+
return t ? f.findOne(Yc, t) : null;
|
|
3222
|
+
}
|
|
3223
|
+
_setUpAria() {
|
|
3224
|
+
const t = this._element;
|
|
3225
|
+
t.setAttribute("role", "progressbar"), t.setAttribute("aria-valuemin", "0"), t.setAttribute("aria-valuemax", String(dt.length)), t.setAttribute("aria-valuenow", "0"), t.hasAttribute("aria-label") || t.hasAttribute("aria-labelledby") || t.setAttribute("aria-label", "Password strength");
|
|
3226
|
+
for (const e of this._segments) e.setAttribute("aria-hidden", "true");
|
|
3227
|
+
this._text?.setAttribute("aria-live", "polite");
|
|
3228
|
+
}
|
|
3229
|
+
_score(t) {
|
|
3230
|
+
if (!t) return 0;
|
|
3231
|
+
const { scorer: e, weights: i, minLength: n } = this._config;
|
|
3232
|
+
return typeof e == "function" ? e(t) : [[t.length >= n, i.minLength], [t.length >= n + 4, i.extraLength], [t.length >= 16, i.longPassword], [/[a-z]/.test(t), i.lowercase], [/[A-Z]/.test(t), i.uppercase], [/\d/.test(t), i.numbers], [/[^\dA-Za-z]/.test(t), i.special], [(t.match(/[^\dA-Za-z]/g) ?? []).length > 1, i.multipleSpecial]].reduce((s, [r, o]) => s + (r ? o ?? 0 : 0), 0);
|
|
3233
|
+
}
|
|
3234
|
+
_level_(t) {
|
|
3235
|
+
if (t <= 0) return null;
|
|
3236
|
+
const e = this._config.thresholds.findIndex((i) => t <= i);
|
|
3237
|
+
return dt[e === -1 ? dt.length - 1 : e] ?? null;
|
|
3238
|
+
}
|
|
3239
|
+
_render(t) {
|
|
3240
|
+
const e = this._element, i = t ? dt.indexOf(t) : -1;
|
|
3241
|
+
e.dataset.bsStrength = t ?? "", e.setAttribute("aria-valuenow", String(i + 1)), t ? e.setAttribute("aria-valuetext", this._config.messages[t] ?? t) : e.removeAttribute("aria-valuetext");
|
|
3242
|
+
const n = t ? Math.ceil((i + 1) / dt.length * this._segments.length) : 0;
|
|
3243
|
+
for (const [s, r] of this._segments.entries()) r.classList.toggle("active", s < n);
|
|
3244
|
+
this._text && (this._text.textContent = t ? this._config.messages[t] ?? "" : this._emptyText, this._text.dataset.bsStrength = t ?? "");
|
|
3245
|
+
}
|
|
3246
|
+
};
|
|
3247
|
+
J(Vc, zr);
|
|
3248
|
+
var Br = "numberInput", Ue = "number-input", Uc = `change.bs.${Br}`, Wr = "number-input", Gc = `[data-bs-toggle="${Ue}"], [data-tblr-toggle="${Ue}"]`, Xc = `[data-bs-${Ue}-action], [data-tblr-${Ue}-action]`, Hr = [`data-bs-${Ue}-action`, `data-tblr-${Ue}-action`], Qc = Hr[0], Zc = ["sm", "lg"], Jc = "ArrowUp", eh = "ArrowDown", Rr = "Home", th = "End", Vr = ["pointerup", "pointercancel", "pointerleave"], ih = { min: null, max: null, step: null, repeat: !0, repeatDelay: 400, repeatInterval: 80, decrementLabel: "Decrease", incrementLabel: "Increase" }, nh = { min: "(number|null)", max: "(number|null)", step: "(number|null)", repeat: "boolean", repeatDelay: "number", repeatInterval: "number", decrementLabel: "string", incrementLabel: "string" }, qr = class extends O {
|
|
3249
|
+
constructor(t, e) {
|
|
3250
|
+
if (super(t, e), this._input = null, this._buttons = [], this._wrapper = null, this._min = Number.NEGATIVE_INFINITY, this._max = Number.POSITIVE_INFINITY, this._step = 1, this._precision = 0, this._disallowed = /[^0-9]/g, this._holdTimer = null, this._repeatTimer = null, this._held = !1, this._lastValue = "", this._onClick = (n) => this._handleClick(n), this._onPointerDown = (n) => this._handlePointerDown(n), this._onPointerEnd = () => this._stopRepeat(), this._onKeyDown = (n) => this._handleKeyDown(n), this._onBeforeInput = (n) => this._handleBeforeInput(n), this._onInputChange = () => this._handleInputChange(), !this._element) return;
|
|
3251
|
+
const i = this._element instanceof HTMLInputElement ? this._element : f.findOne("input", this._element);
|
|
3252
|
+
i && (this._input = i, this._element === i ? this._renderWrapper() : this._buttons = f.find(Xc, this._element), this._resolveBounds(), this._setUpInput(), this._addEventListeners(), this._update());
|
|
3253
|
+
}
|
|
3254
|
+
static get Default() {
|
|
3255
|
+
return ih;
|
|
3256
|
+
}
|
|
3257
|
+
static get DefaultType() {
|
|
3258
|
+
return nh;
|
|
3259
|
+
}
|
|
3260
|
+
static get NAME() {
|
|
3261
|
+
return Br;
|
|
3262
|
+
}
|
|
3263
|
+
getValue() {
|
|
3264
|
+
return this._parse(this._input?.value ?? "");
|
|
3265
|
+
}
|
|
3266
|
+
setValue(t) {
|
|
3267
|
+
const e = this._parse(String(t));
|
|
3268
|
+
e !== null && this._commit(e);
|
|
3269
|
+
}
|
|
3270
|
+
increment() {
|
|
3271
|
+
this._stepBy(1);
|
|
3272
|
+
}
|
|
3273
|
+
decrement() {
|
|
3274
|
+
this._stepBy(-1);
|
|
3275
|
+
}
|
|
3276
|
+
dispose() {
|
|
3277
|
+
this._stopRepeat(), this._input && (this._input.removeEventListener("keydown", this._onKeyDown), this._input.removeEventListener("beforeinput", this._onBeforeInput), this._input.removeEventListener("change", this._onInputChange), this._input.removeEventListener("blur", this._onInputChange));
|
|
3278
|
+
for (const t of this._buttons) {
|
|
3279
|
+
t.removeEventListener("click", this._onClick), t.removeEventListener("pointerdown", this._onPointerDown);
|
|
3280
|
+
for (const e of Vr) t.removeEventListener(e, this._onPointerEnd);
|
|
3281
|
+
}
|
|
3282
|
+
this._wrapper && this._input && this._wrapper.replaceWith(this._input), super.dispose();
|
|
3283
|
+
}
|
|
3284
|
+
_renderWrapper() {
|
|
3285
|
+
const t = this._input, e = document.createElement("div");
|
|
3286
|
+
e.className = Wr;
|
|
3287
|
+
for (const r of Zc) t.classList.contains(`form-control-${r}`) && e.classList.add(`${Wr}-${r}`);
|
|
3288
|
+
const i = (r, o) => {
|
|
3289
|
+
const a = document.createElement("button");
|
|
3290
|
+
return a.type = "button", a.className = "btn btn-icon", a.setAttribute(Qc, r), a.setAttribute("aria-label", o), a;
|
|
3291
|
+
}, n = i("decrement", this._config.decrementLabel), s = i("increment", this._config.incrementLabel);
|
|
3292
|
+
t.replaceWith(e), e.append(n, t, s), this._wrapper = e, this._buttons = [n, s];
|
|
3293
|
+
}
|
|
3294
|
+
_resolveBounds() {
|
|
3295
|
+
const t = this._input, e = (r) => {
|
|
3296
|
+
const o = Number.parseFloat(t.getAttribute(r) ?? "");
|
|
3297
|
+
return Number.isFinite(o) ? o : null;
|
|
3298
|
+
};
|
|
3299
|
+
this._min = this._config.min ?? e("min") ?? Number.NEGATIVE_INFINITY, this._max = this._config.max ?? e("max") ?? Number.POSITIVE_INFINITY;
|
|
3300
|
+
const i = this._config.step ?? e("step");
|
|
3301
|
+
this._step = i !== null && i > 0 ? i : 1;
|
|
3302
|
+
const n = String(this._step).split(".")[1];
|
|
3303
|
+
this._precision = n ? n.length : 0;
|
|
3304
|
+
const s = `0-9${this._min < 0 ? "-" : ""}${this._precision > 0 ? ".," : ""}`;
|
|
3305
|
+
this._disallowed = new RegExp(`[^${s}]`, "g");
|
|
3306
|
+
}
|
|
3307
|
+
_setUpInput() {
|
|
3308
|
+
const t = this._input;
|
|
3309
|
+
t.type !== "number" && (t.setAttribute("role", "spinbutton"), t.hasAttribute("inputmode") || t.setAttribute("inputmode", this._precision > 0 ? "decimal" : "numeric"));
|
|
3310
|
+
const e = this._parse(t.value);
|
|
3311
|
+
e !== null && (t.value = this._format(this._clamp(e))), this._lastValue = t.value;
|
|
3312
|
+
}
|
|
3313
|
+
_addEventListeners() {
|
|
3314
|
+
const t = this._input;
|
|
3315
|
+
t.addEventListener("keydown", this._onKeyDown), t.addEventListener("beforeinput", this._onBeforeInput), t.addEventListener("change", this._onInputChange), t.addEventListener("blur", this._onInputChange);
|
|
3316
|
+
for (const e of this._buttons) {
|
|
3317
|
+
e.addEventListener("click", this._onClick), e.addEventListener("pointerdown", this._onPointerDown);
|
|
3318
|
+
for (const i of Vr) e.addEventListener(i, this._onPointerEnd);
|
|
3319
|
+
}
|
|
3320
|
+
}
|
|
3321
|
+
_actionOf(t) {
|
|
3322
|
+
for (const e of Hr) {
|
|
3323
|
+
const i = t.getAttribute(e);
|
|
3324
|
+
if (i === "increment" || i === "decrement") return i;
|
|
3325
|
+
}
|
|
3326
|
+
return null;
|
|
3327
|
+
}
|
|
3328
|
+
_handleClick(t) {
|
|
3329
|
+
const e = t.currentTarget;
|
|
3330
|
+
t.preventDefault(), this._held ? this._held = !1 : this._runAction(this._actionOf(e));
|
|
3331
|
+
}
|
|
3332
|
+
_handlePointerDown(t) {
|
|
3333
|
+
const e = t.currentTarget, i = this._actionOf(e);
|
|
3334
|
+
this._stopRepeat(), this._config.repeat && i && !Z(e) && !this._isLocked() && (t.pointerType === "mouse" && t.preventDefault(), this._holdTimer = setTimeout(() => {
|
|
3335
|
+
this._holdTimer = null, this._held = !0, this._runAction(i), this._repeatTimer = setInterval(() => this._runAction(i), this._config.repeatInterval);
|
|
3336
|
+
}, this._config.repeatDelay));
|
|
3337
|
+
}
|
|
3338
|
+
_stopRepeat() {
|
|
3339
|
+
this._holdTimer !== null && (clearTimeout(this._holdTimer), this._holdTimer = null), this._repeatTimer !== null && (clearInterval(this._repeatTimer), this._repeatTimer = null);
|
|
3340
|
+
}
|
|
3341
|
+
_runAction(t) {
|
|
3342
|
+
t === "increment" ? this.increment() : t === "decrement" && this.decrement();
|
|
3343
|
+
}
|
|
3344
|
+
_handleKeyDown(t) {
|
|
3345
|
+
const e = { [Jc]: () => this.increment(), [eh]: () => this.decrement(), [Rr]: () => this._commit(this._min), [th]: () => this._commit(this._max) }[t.key];
|
|
3346
|
+
e && (t.key === Rr && !Number.isFinite(this._min) || t.key === "End" && !Number.isFinite(this._max) || (t.preventDefault(), e()));
|
|
3347
|
+
}
|
|
3348
|
+
_handleBeforeInput(t) {
|
|
3349
|
+
const { data: e, inputType: i } = t;
|
|
3350
|
+
if (!e || !i.startsWith("insert")) return;
|
|
3351
|
+
const n = e.replace(this._disallowed, "");
|
|
3352
|
+
if (n === e || (t.preventDefault(), n === "")) return;
|
|
3353
|
+
const s = this._input, r = s.selectionStart ?? s.value.length, o = s.selectionEnd ?? r;
|
|
3354
|
+
s.setRangeText(n, r, o, "end"), s.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
3355
|
+
}
|
|
3356
|
+
_handleInputChange() {
|
|
3357
|
+
const t = this._input;
|
|
3358
|
+
if (t.value === this._lastValue) return;
|
|
3359
|
+
const e = this._parse(t.value);
|
|
3360
|
+
if (e === null) return t.value = this._lastValue, void this._update();
|
|
3361
|
+
this._commit(e);
|
|
3362
|
+
}
|
|
3363
|
+
_stepBy(t) {
|
|
3364
|
+
if (this._isLocked()) return;
|
|
3365
|
+
const e = this.getValue() ?? this._fallbackValue();
|
|
3366
|
+
this._commit(e + t * this._step);
|
|
3367
|
+
}
|
|
3368
|
+
_fallbackValue() {
|
|
3369
|
+
return Number.isFinite(this._min) && this._min > 0 ? this._min : Number.isFinite(this._max) && this._max < 0 ? this._max : 0;
|
|
3370
|
+
}
|
|
3371
|
+
_commit(t) {
|
|
3372
|
+
const e = this._input, i = this.getValue(), n = this._clamp(t), s = this._format(n), r = e.value !== s;
|
|
3373
|
+
e.value = s, this._lastValue = s, this._update(), r && (e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 })), l.trigger(this._element, Uc, { value: n, previousValue: i }), n !== this._min && n !== this._max || this._stopRepeat());
|
|
3374
|
+
}
|
|
3375
|
+
_isLocked() {
|
|
3376
|
+
const t = this._input;
|
|
3377
|
+
return t.disabled || t.readOnly;
|
|
3378
|
+
}
|
|
3379
|
+
_clamp(t) {
|
|
3380
|
+
return Math.min(this._max, Math.max(this._min, t));
|
|
3381
|
+
}
|
|
3382
|
+
_parse(t) {
|
|
3383
|
+
const e = t.trim().replace(",", ".");
|
|
3384
|
+
if (e === "") return null;
|
|
3385
|
+
const i = Number(e);
|
|
3386
|
+
return Number.isFinite(i) ? i : null;
|
|
3387
|
+
}
|
|
3388
|
+
_format(t) {
|
|
3389
|
+
return t.toFixed(this._precision);
|
|
3390
|
+
}
|
|
3391
|
+
_update() {
|
|
3392
|
+
const t = this._input, e = this.getValue(), i = this._isLocked();
|
|
3393
|
+
for (const n of this._buttons) {
|
|
3394
|
+
const s = this._actionOf(n), r = e !== null && (s === "increment" && e >= this._max || s === "decrement" && e <= this._min);
|
|
3395
|
+
n.disabled = i || r;
|
|
3396
|
+
}
|
|
3397
|
+
t.getAttribute("role") === "spinbutton" && (Number.isFinite(this._min) && t.setAttribute("aria-valuemin", this._format(this._min)), Number.isFinite(this._max) && t.setAttribute("aria-valuemax", this._format(this._max)), e === null ? t.removeAttribute("aria-valuenow") : t.setAttribute("aria-valuenow", this._format(e)));
|
|
3398
|
+
}
|
|
3399
|
+
};
|
|
3400
|
+
J(Gc, qr);
|
|
3401
|
+
var sh = me({ getColor: () => rh, hexToRgba: () => Kr, prefix: () => Yr }), Yr = "tblr-", Kr = (t, e) => {
|
|
3402
|
+
const i = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
|
|
3403
|
+
return i ? `rgba(${parseInt(i[1], 16)}, ${parseInt(i[2], 16)}, ${parseInt(i[3], 16)}, ${e})` : null;
|
|
3404
|
+
}, rh = (t, e = 1) => {
|
|
3405
|
+
const i = getComputedStyle(document.body).getPropertyValue(`--${Yr}${t}`).trim();
|
|
3406
|
+
return e === 1 ? i : Kr(i, e) ?? (i ? `color-mix(in srgb, ${i} ${100 * e}%, transparent)` : null);
|
|
3407
|
+
};
|
|
3408
|
+
w.Alert = Tt, w.Autosize = yn, w.Button = Ct, w.Carousel = ot, w.Clipboard = An, w.Collapse = Ot, w.Confetti = xn, w.CountUp = On, w.Datepicker = vt, w.Dropdown = K, w.InputMask = Hn, w.Modal = Ve, w.NavOverflow = Pt, w.NumberInput = qr, w.Offcanvas = ye, w.OtpInput = Dr, w.Popover = Ft, Object.defineProperty(w, "Popper", { enumerable: !0, get: function() {
|
|
3409
|
+
return ki;
|
|
3410
|
+
} }), w.ScrollSpy = zt, w.Sortable = xr, w.Sparkline = Fr, w.Strength = zr, w.SwitchIcon = wr, w.Tab = Ye, w.Toast = ht, w.Tooltip = Ie, w.bootstrap = xc, Object.defineProperty(w, "tabler", { enumerable: !0, get: function() {
|
|
3411
|
+
return sh;
|
|
3412
|
+
} });
|
|
3413
|
+
});
|
|
3414
|
+
})(ft, ft.exports)), ft.exports;
|
|
3415
|
+
}
|
|
3416
|
+
var go = yh();
|
|
3417
|
+
const wh = /* @__PURE__ */ bh(go), Ah = /* @__PURE__ */ gh({
|
|
3418
|
+
__proto__: null,
|
|
3419
|
+
default: wh
|
|
3420
|
+
}, [go]), Eh = {
|
|
3421
|
+
transition: "Vue-Toastification__bounce",
|
|
3422
|
+
maxToasts: 20,
|
|
3423
|
+
newestOnTop: !0,
|
|
3424
|
+
toastClassName: "custom-toast-class"
|
|
3425
|
+
}, kh = {
|
|
3426
|
+
/*
|
|
3427
|
+
Função: install
|
|
3428
|
+
Recebe: aplicativo (instância do Vue), opcoes (configurações do usuário)
|
|
3429
|
+
Devolve: Nada
|
|
3430
|
+
Por que é usada: Injeta os plugins, configurações e varre os objetos de
|
|
3431
|
+
componentes e diretivas do Bootstrap para registrá-los um por um no
|
|
3432
|
+
escopo global.
|
|
3433
|
+
*/
|
|
3434
|
+
install: (j, Ee = {}) => {
|
|
3435
|
+
window.bootstrap = Ah, j.directive("required", ph);
|
|
3436
|
+
const w = { ...Eh, ...Ee.toast };
|
|
3437
|
+
j.use(mh, w);
|
|
3438
|
+
const R = Ee.dataTable || {};
|
|
3439
|
+
j.provide(_h, R);
|
|
3440
|
+
}
|
|
3441
|
+
};
|
|
3442
|
+
export {
|
|
3443
|
+
kh as S
|
|
3444
|
+
};
|