index.mjs.map 33 KB

1
  1. {"version":3,"file":"index.mjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.10/node_modules/@thednp/shorty/dist/shorty.mjs","../src/index.ts"],"sourcesContent":["const Ce = \"2.0.10\", Me = \"aria-checked\", De = \"aria-description\", Le = \"aria-describedby\", Oe = \"aria-expanded\", xe = \"aria-haspopup\", X = \"aria-hidden\", ze = \"aria-label\", Ie = \"aria-labelledby\", Pe = \"aria-modal\", Fe = \"aria-pressed\", Be = \"aria-selected\", Ve = \"aria-valuemin\", He = \"aria-valuemax\", Ue = \"aria-valuenow\", We = \"aria-valuetext\", Y = \"abort\", tt = \"beforeunload\", et = \"blur\", nt = \"change\", ot = \"contextmenu\", U = \"DOMContentLoaded\", st = \"DOMMouseScroll\", rt = \"error\", ct = \"focus\", at = \"focusin\", it = \"focusout\", ut = \"gesturechange\", lt = \"gestureend\", dt = \"gesturestart\", ft = \"keydown\", pt = \"keypress\", gt = \"keyup\", mt = \"load\", vt = \"click\", bt = \"dblclick\", Et = \"mousedown\", ht = \"mouseup\", yt = \"hover\", wt = \"mouseenter\", At = \"mouseleave\", St = \"mousein\", kt = \"mouseout\", Nt = \"mouseover\", Tt = \"mousemove\", Ct = \"mousewheel\", Mt = \"move\", Dt = \"orientationchange\", Lt = \"pointercancel\", Ot = \"pointerdown\", xt = \"pointerleave\", zt = \"pointermove\", It = \"pointerup\", Pt = \"readystatechange\", Ft = \"reset\", Bt = \"resize\", Vt = \"select\", Ht = \"selectend\", Ut = \"selectstart\", Wt = \"scroll\", Rt = \"submit\", Qt = \"touchstart\", jt = \"touchmove\", Kt = \"touchcancel\", qt = \"touchend\", Gt = \"unload\", Re = {\n DOMContentLoaded: U,\n DOMMouseScroll: st,\n abort: Y,\n beforeunload: tt,\n blur: et,\n change: nt,\n click: vt,\n contextmenu: ot,\n dblclick: bt,\n error: rt,\n focus: ct,\n focusin: at,\n focusout: it,\n gesturechange: ut,\n gestureend: lt,\n gesturestart: dt,\n hover: yt,\n keydown: ft,\n keypress: pt,\n keyup: gt,\n load: mt,\n mousedown: Et,\n mousemove: Tt,\n mousein: St,\n mouseout: kt,\n mouseenter: wt,\n mouseleave: At,\n mouseover: Nt,\n mouseup: ht,\n mousewheel: Ct,\n move: Mt,\n orientationchange: Dt,\n pointercancel: Lt,\n pointerdown: Ot,\n pointerleave: xt,\n pointermove: zt,\n pointerup: It,\n readystatechange: Pt,\n reset: Ft,\n resize: Bt,\n scroll: Wt,\n select: Vt,\n selectend: Ht,\n selectstart: Ut,\n submit: Rt,\n touchcancel: Kt,\n touchend: qt,\n touchmove: jt,\n touchstart: Qt,\n unload: Gt\n}, Qe = \"drag\", je = \"dragstart\", Ke = \"dragenter\", qe = \"dragleave\", Ge = \"dragover\", Ze = \"dragend\", _e = \"loadstart\", $e = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n}, Je = { down: \"mousedown\", up: \"mouseup\" }, Xe = \"onmouseleave\" in document ? [\"mouseenter\", \"mouseleave\"] : [\"mouseover\", \"mouseout\"], Ye = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n}, tn = { in: \"focusin\", out: \"focusout\" }, Zt = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]', en = {\n Backspace: \"Backspace\",\n Tab: \"Tab\",\n Enter: \"Enter\",\n Shift: \"Shift\",\n Control: \"Control\",\n Alt: \"Alt\",\n Pause: \"Pause\",\n CapsLock: \"CapsLock\",\n Escape: \"Escape\",\n Scape: \"Space\",\n ArrowLeft: \"ArrowLeft\",\n ArrowUp: \"ArrowUp\",\n ArrowRight: \"ArrowRight\",\n ArrowDown: \"ArrowDown\",\n Insert: \"Insert\",\n Delete: \"Delete\",\n Meta: \"Meta\",\n ContextMenu: \"ContextMenu\",\n ScrollLock: \"ScrollLock\"\n}, nn = \"Alt\", on = \"ArrowDown\", sn = \"ArrowUp\", rn = \"ArrowLeft\", cn = \"ArrowRight\", an = \"Backspace\", un = \"CapsLock\", ln = \"Control\", dn = \"Delete\", fn = \"Enter\", pn = \"NumpadEnter\", gn = \"Escape\", mn = \"Insert\", vn = \"Meta\", bn = \"Pause\", En = \"ScrollLock\", hn = \"Shift\", yn = \"Space\", wn = \"Tab\", _t = \"animationDuration\", $t = \"animationDelay\", W = \"animationName\", C = \"animationend\", Jt = \"transitionDuration\", Xt = \"transitionDelay\", M = \"transitionend\", R = \"transitionProperty\", An = \"addEventListener\", Sn = \"removeEventListener\", kn = {\n linear: \"linear\",\n easingSinusoidalIn: \"cubic-bezier(0.47,0,0.745,0.715)\",\n easingSinusoidalOut: \"cubic-bezier(0.39,0.575,0.565,1)\",\n easingSinusoidalInOut: \"cubic-bezier(0.445,0.05,0.55,0.95)\",\n easingQuadraticIn: \"cubic-bezier(0.550,0.085,0.680,0.530)\",\n easingQuadraticOut: \"cubic-bezier(0.250,0.460,0.450,0.940)\",\n easingQuadraticInOut: \"cubic-bezier(0.455,0.030,0.515,0.955)\",\n easingCubicIn: \"cubic-bezier(0.55,0.055,0.675,0.19)\",\n easingCubicOut: \"cubic-bezier(0.215,0.61,0.355,1)\",\n easingCubicInOut: \"cubic-bezier(0.645,0.045,0.355,1)\",\n easingQuarticIn: \"cubic-bezier(0.895,0.03,0.685,0.22)\",\n easingQuarticOut: \"cubic-bezier(0.165,0.84,0.44,1)\",\n easingQuarticInOut: \"cubic-bezier(0.77,0,0.175,1)\",\n easingQuinticIn: \"cubic-bezier(0.755,0.05,0.855,0.06)\",\n easingQuinticOut: \"cubic-bezier(0.23,1,0.32,1)\",\n easingQuinticInOut: \"cubic-bezier(0.86,0,0.07,1)\",\n easingExponentialIn: \"cubic-bezier(0.95,0.05,0.795,0.035)\",\n easingExponentialOut: \"cubic-bezier(0.19,1,0.22,1)\",\n easingExponentialInOut: \"cubic-bezier(1,0,0,1)\",\n easingCircularIn: \"cubic-bezier(0.6,0.04,0.98,0.335)\",\n easingCircularOut: \"cubic-bezier(0.075,0.82,0.165,1)\",\n easingCircularInOut: \"cubic-bezier(0.785,0.135,0.15,0.86)\",\n easingBackIn: \"cubic-bezier(0.6,-0.28,0.735,0.045)\",\n easingBackOut: \"cubic-bezier(0.175,0.885,0.32,1.275)\",\n easingBackInOut: \"cubic-bezier(0.68,-0.55,0.265,1.55)\"\n}, Nn = \"offsetHeight\", Tn = \"offsetWidth\", Cn = \"scrollHeight\", Mn = \"scrollWidth\", Dn = \"tabindex\", Ln = navigator.userAgentData, { userAgent: Yt } = navigator, On = Yt, xn = () => {\n const t = /iPhone|iPad|iPod|Android/i;\n return navigator?.userAgentData?.brands.some(\n (e) => t.test(e.brand)\n ) || t.test(navigator?.userAgent) || !1;\n}, zn = () => {\n const t = /(iPhone|iPod|iPad)/;\n return navigator?.userAgentData?.brands.some(\n (e) => t.test(e.brand)\n ) || t.test(\n navigator?.userAgent\n ) || !1;\n}, In = () => navigator?.userAgent?.includes(\"Firefox\") || !1, te = () => typeof CSS > \"u\" || !CSS.supports ? !1 : CSS.supports(\"-webkit-backdrop-filter\", \"none\"), Pn = () => [\"webkitPerspective\", \"perspective\"].some((t) => t in document.head.style), ee = () => {\n}, Q = (t, e, n, o) => {\n const s = o || !1;\n t.addEventListener(\n e,\n n,\n s\n );\n}, j = (t, e, n, o) => {\n const s = o || !1;\n t.removeEventListener(\n e,\n n,\n s\n );\n}, ne = (t, e, n, o) => {\n const s = (r) => {\n (r.target === t || r.currentTarget === t) && (n.apply(t, [r]), j(t, e, s, o));\n };\n Q(t, e, s, o);\n}, Fn = () => {\n let t = !1;\n try {\n const e = Object.defineProperty({}, \"passive\", {\n get: () => (t = !0, t)\n });\n ne(document, U, ee, e);\n } catch {\n }\n return t;\n}, Bn = () => [\"webkitTransform\", \"transform\"].some((t) => t in document.head.style), Vn = () => \"ontouchstart\" in window || \"msMaxTouchPoints\" in navigator, Hn = () => [\"webkitAnimation\", \"animation\"].some((t) => t in document.head.style), Un = () => [\"webkitTransition\", \"transition\"].some((t) => t in document.head.style), K = (t, e) => t.getAttribute(e), Wn = (t, e, n) => e.getAttributeNS(t, n), oe = (t, e) => t.hasAttribute(e), Rn = (t, e, n) => e.hasAttributeNS(t, n), Qn = (t, e, n) => t.setAttribute(e, n), jn = (t, e, n, o) => e.setAttributeNS(t, n, o), Kn = (t, e) => t.removeAttribute(e), qn = (t, e, n) => e.removeAttributeNS(t, n), Gn = (t, ...e) => {\n t.classList.add(...e);\n}, Zn = (t, ...e) => {\n t.classList.remove(...e);\n}, _n = (t, e) => t.classList.contains(e), { body: $n } = document, { documentElement: Jn } = document, { head: Xn } = document, Yn = (t) => Array.from(t), v = (t) => t != null && typeof t == \"object\" || !1, u = (t) => v(t) && typeof t.nodeType == \"number\" && [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].some(\n (e) => t.nodeType === e\n) || !1, i = (t) => u(t) && t.nodeType === 1 || !1, E = /* @__PURE__ */ new Map(), L = {\n data: E,\n set: (t, e, n) => {\n if (!i(t)) return;\n E.has(e) || E.set(e, /* @__PURE__ */ new Map()), E.get(e).set(t, n);\n },\n getAllFor: (t) => E.get(t) || null,\n get: (t, e) => {\n if (!i(t) || !e) return null;\n const n = L.getAllFor(e);\n return t && n && n.get(t) || null;\n },\n remove: (t, e) => {\n const n = L.getAllFor(e);\n !n || !i(t) || (n.delete(t), n.size === 0 && E.delete(e));\n }\n}, to = (t, e) => L.get(t, e), eo = (t) => t?.charAt(0).toUpperCase() + t?.slice(1), P = (t) => t?.trim().replace(\n /(?:^\\w|[A-Z]|\\b\\w)/g,\n (e, n) => n === 0 ? e.toLowerCase() : e.toUpperCase()\n).replace(/\\s+/g, \"\"), N = (t) => typeof t == \"string\" || !1, q = (t) => v(t) && t.constructor.name === \"Window\" || !1, G = (t) => u(t) && t.nodeType === 9 || !1, d = (t) => G(t) ? t : u(t) ? t.ownerDocument : q(t) ? t.document : globalThis.document, T = (t, ...e) => Object.assign(t, ...e), se = (t) => {\n if (!t) return;\n if (N(t))\n return d().createElement(t);\n const { tagName: e } = t, n = se(e);\n if (!n) return;\n const o = { ...t };\n return delete o.tagName, T(n, o);\n}, re = (t, e) => {\n if (!t || !e) return;\n if (N(e))\n return d().createElementNS(t, e);\n const { tagName: n } = e, o = re(t, n);\n if (!o) return;\n const s = { ...e };\n return delete s.tagName, T(o, s);\n}, Z = (t, e) => t.dispatchEvent(e), no = (t, e, n) => n.indexOf(t) === e, f = (t, e, n) => {\n const o = getComputedStyle(t, n), s = e.replace(\"webkit\", \"Webkit\").replace(/([A-Z])/g, \"-$1\").toLowerCase();\n return o.getPropertyValue(s);\n}, ce = (t) => {\n const e = f(t, W), n = f(t, $t), o = n.includes(\"ms\") ? 1 : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? 0 : s;\n}, ae = (t) => {\n const e = f(t, W), n = f(t, _t), o = n.includes(\"ms\") ? 1 : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? 0 : s;\n}, oo = (t, e) => {\n let n = 0;\n const o = new Event(C), s = ae(t), r = ce(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(C, a), n = 1);\n };\n t.addEventListener(C, a), setTimeout(() => {\n n || Z(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, ie = (t) => {\n const e = f(t, R), n = f(t, Xt), o = n.includes(\"ms\") ? 1 : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? 0 : s;\n}, ue = (t) => {\n const e = f(t, R), n = f(t, Jt), o = n.includes(\"ms\") ? 1 : 1e3, s = e && e !== \"none\" ? parseFloat(n) * o : 0;\n return Number.isNaN(s) ? 0 : s;\n}, so = (t, e) => {\n let n = 0;\n const o = new Event(M), s = ue(t), r = ie(t);\n if (s) {\n const a = (l) => {\n l.target === t && (e.apply(t, [l]), t.removeEventListener(M, a), n = 1);\n };\n t.addEventListener(M, a), setTimeout(() => {\n n || Z(t, o);\n }, s + r + 17);\n } else\n e.apply(t, [o]);\n}, ro = (t) => Float32Array.from(Array.from(t)), co = (t) => Float64Array.from(Array.from(t)), ao = (t, e) => t.focus(e), io = (t) => t?.trim().replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/\\s+/g, \"-\").toLowerCase(), F = (t) => [\"true\", !0].includes(t) ? !0 : [\"false\", !1].includes(t) ? !1 : [\"null\", \"\", null, void 0].includes(t) ? null : t !== \"\" && !Number.isNaN(+t) ? +t : t, S = (t) => Object.entries(t), uo = (t, e, n, o) => {\n if (!i(t)) return e;\n const s = { ...n }, r = { ...t.dataset }, a = { ...e }, l = {}, p = \"title\";\n return S(r).forEach(([c, g]) => {\n const A = o && typeof c == \"string\" && c.includes(o) ? P(c.replace(o, \"\")) : P(c);\n l[A] = F(g);\n }), S(s).forEach(([c, g]) => {\n s[c] = F(g);\n }), S(e).forEach(([c, g]) => {\n c in s ? a[c] = s[c] : c in l ? a[c] = l[c] : a[c] = c === p ? K(t, p) : g;\n }), a;\n}, lo = (t, e) => v(t) && (Object.hasOwn(t, e) || e in t), fo = (t) => Object.keys(t), po = (t) => Object.values(t), go = (t) => Object.fromEntries(t), mo = (t, e) => {\n const n = new CustomEvent(t, {\n cancelable: !0,\n bubbles: !0\n });\n return v(e) && T(n, e), n;\n}, vo = { passive: !0 }, bo = (t) => t.offsetHeight, Eo = (t, e) => {\n S(e).forEach(([n, o]) => {\n if (o && N(n) && n.includes(\"--\"))\n t.style.setProperty(n, o);\n else {\n const s = {};\n s[n] = o, T(t.style, s);\n }\n });\n}, O = (t) => v(t) && t.constructor.name === \"Map\" || !1, le = (t) => typeof t == \"number\" || !1, m = /* @__PURE__ */ new Map(), ho = {\n set: (t, e, n, o) => {\n i(t) && (o && o.length ? (m.has(t) || m.set(t, /* @__PURE__ */ new Map()), m.get(t).set(o, setTimeout(e, n))) : m.set(t, setTimeout(e, n)));\n },\n get: (t, e) => {\n if (!i(t)) return null;\n const n = m.get(t);\n return e && n && O(n) ? n.get(e) || null : le(n) ? n : null;\n },\n clear: (t, e) => {\n if (!i(t)) return;\n const n = m.get(t);\n e && e.length && O(n) ? (clearTimeout(n.get(e)), n.delete(e), n.size === 0 && m.delete(t)) : (clearTimeout(n), m.delete(t));\n }\n}, yo = (t) => t.toLowerCase(), wo = (t) => t.toUpperCase(), de = (t, e) => (u(e) ? e : d()).querySelectorAll(t), z = /* @__PURE__ */ new Map();\nfunction _(t) {\n const { shiftKey: e, code: n } = t, o = d(this), s = [\n ...de(Zt, this)\n ].filter(\n (l) => !oe(l, \"disabled\") && !K(l, X)\n );\n if (!s.length) return;\n const r = s[0], a = s[s.length - 1];\n n === \"Tab\" && (e && o.activeElement === r ? (a.focus(), t.preventDefault()) : !e && o.activeElement === a && (r.focus(), t.preventDefault()));\n}\nconst I = (t) => z.has(t) === !0, fe = (t) => {\n I(t) || (Q(t, \"keydown\", _), z.set(t, !0));\n}, pe = (t) => {\n I(t) && (j(t, \"keydown\", _), z.delete(t));\n}, Ao = (t) => {\n I(t) ? pe(t) : fe(t);\n}, b = (t) => i(t) && \"offsetWidth\" in t || !1, y = (t, e) => {\n const { width: n, height: o, top: s, right: r, bottom: a, left: l } = t.getBoundingClientRect();\n let p = 1, c = 1;\n if (e && b(t)) {\n const { offsetWidth: g, offsetHeight: A } = t;\n p = g > 0 ? Math.round(n) / g : 1, c = A > 0 ? Math.round(o) / A : 1;\n }\n return {\n width: n / p,\n height: o / c,\n top: s / c,\n right: r / p,\n bottom: a / c,\n left: l / p,\n x: l / p,\n y: s / c\n };\n}, So = (t) => d(t).body, w = (t) => d(t).documentElement, ko = (t) => d(t).head, ge = (t) => u(t) ? (t.nodeName || \"\").toLowerCase() : \"#document\", No = (t) => {\n const e = q(t), n = e ? t.scrollX : t.scrollLeft, o = e ? t.scrollY : t.scrollTop;\n return { x: n, y: o };\n}, me = (t) => u(t) && t.constructor.name === \"ShadowRoot\" || !1, k = (t) => t.nodeName === \"HTML\" ? t : i(t) && t.assignedSlot || u(t) && t.parentNode || me(t) && t.host || w(t), ve = (t) => t ? G(t) ? t.defaultView : u(t) ? t?.ownerDocument?.defaultView : t : window, be = (t) => u(t) && [\"TABLE\", \"TD\", \"TH\"].includes(t.nodeName) || !1, Ee = (t, e) => t.matches(e), D = (t) => f(t, \"position\") === \"static\", he = (t) => f(t, \"position\") === \"fixed\", $ = (t) => [\":popover-open\", \":modal\"].some((e) => {\n try {\n return Ee(t, e);\n } catch {\n return !1;\n }\n}), J = (t) => {\n const e = te(), n = i(t) ? getComputedStyle(t) : t;\n return n.transform !== \"none\" || n.perspective !== \"none\" || (n.containerType ? n.containerType !== \"normal\" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== \"none\" : !1) || !e && (n.filter ? n.filter !== \"none\" : !1) || [\"transform\", \"perspective\", \"filter\"].some(\n (o) => (n.willChange || \"\").includes(o)\n ) || [\"paint\", \"layout\", \"strict\", \"content\"].some(\n (o) => (n.contain || \"\").includes(o)\n );\n}, ye = (t) => {\n let e = k(t);\n for (; i(e) && !x(e); ) {\n if (J(e))\n return e;\n if ($(e))\n return null;\n e = k(e);\n }\n return null;\n}, x = (t) => [\"html\", \"body\", \"#document\"].includes(ge(t)), B = (t) => {\n if (!b(t) || he(t))\n return null;\n let e = t.offsetParent;\n return w(t) === e && (e = e.ownerDocument.body), e;\n}, To = (t) => {\n const e = ve(t);\n if (!u(t) || $(t))\n return e;\n if (!b(t)) {\n let o = k(t);\n for (; o && !x(o); ) {\n if (i(o) && !D(o))\n return o;\n o = k(o);\n }\n return e;\n }\n let n = B(t);\n for (; n && be(n) && D(n); )\n n = B(n);\n return n && x(n) && D(n) && !J(n) ? e : n || ye(t) || e;\n}, we = (t) => {\n if (!b(t)) return !1;\n const { width: e, height: n } = y(t), { offsetWidth: o, offsetHeight: s } = t;\n return Math.round(e) !== o || Math.round(n) !== s;\n}, Co = (t, e, n) => {\n const o = b(e), s = y(\n t,\n o && we(e)\n ), r = { x: 0, y: 0 };\n if (o) {\n const a = y(e, !0);\n r.x = a.x + e.clientLeft, r.y = a.y + e.clientTop;\n }\n return {\n x: s.left + n.x - r.x,\n y: s.top + n.y - r.y,\n width: s.width,\n height: s.height\n };\n};\nlet V = 0, H = 0;\nconst h = /* @__PURE__ */ new Map(), Ae = (t, e) => {\n let n = e ? V : H;\n if (e) {\n const o = Ae(t), s = h.get(o) || /* @__PURE__ */ new Map();\n h.has(o) || h.set(o, s), O(s) && !s.has(e) ? (s.set(e, n), V += 1) : n = s.get(e);\n } else {\n const o = t.id || t;\n h.has(o) ? n = h.get(o) : (h.set(o, n), H += 1);\n }\n return n;\n}, Se = (t) => Array.isArray(t) || !1, Mo = (t) => u(t) && t.nodeName === \"CANVAS\" || !1, ke = (t) => b(t) && !!t.shadowRoot || !1, Do = (t) => {\n if (!u(t)) return !1;\n const { top: e, bottom: n } = y(t), { clientHeight: o } = w(t);\n return e <= o && n >= 0;\n}, Lo = (t) => {\n if (!i(t)) return !1;\n const { clientWidth: e, clientHeight: n } = w(t), { top: o, left: s, bottom: r, right: a } = y(t, !0);\n return o >= 0 && s >= 0 && r <= n && a <= e;\n}, Oo = (t) => Se(t) && t.every(i) || !1, xo = (t) => typeof t == \"function\" || !1, zo = (t) => v(t) && t.constructor.name === \"HTMLCollection\" || !1, Io = (t) => b(t) && t.tagName === \"IMG\" || !1, Po = (t) => {\n if (!N(t)) return !1;\n try {\n JSON.parse(t);\n } catch {\n return !1;\n }\n return !0;\n}, Fo = (t) => v(t) && t.constructor.name === \"WeakMap\" || !1, Bo = (t) => u(t) && [\"SVG\", \"Image\", \"Video\", \"Canvas\"].some(\n (e) => t.constructor.name.includes(e)\n) || !1, Vo = (t) => v(t) && t.constructor.name === \"NodeList\" || !1, Ho = (t) => w(t).dir === \"rtl\", Uo = (t) => u(t) && t.constructor.name.includes(\"SVG\") || !1, Ne = (t, e) => !t || !e ? null : t.closest(e) || Ne(t.getRootNode().host, e) || null, Wo = (t, e) => i(t) ? t : (i(e) ? e : d()).querySelector(t), Te = (t, e) => (u(e) ? e : d()).getElementsByTagName(\n t\n), Ro = (t) => [...Te(\"*\", t)].filter(ke), Qo = (t, e) => d(e).getElementById(t), jo = (t, e) => (e && u(e) ? e : d()).getElementsByClassName(\n t\n);\nexport {\n Yn as ArrayFrom,\n U as DOMContentLoadedEvent,\n st as DOMMouseScrollEvent,\n L as Data,\n ro as Float32ArrayFrom,\n co as Float64ArrayFrom,\n T as ObjectAssign,\n S as ObjectEntries,\n go as ObjectFromEntries,\n lo as ObjectHasOwn,\n fo as ObjectKeys,\n po as ObjectValues,\n ho as Timer,\n Y as abortEvent,\n Gn as addClass,\n An as addEventListener,\n fe as addFocusTrap,\n $t as animationDelay,\n _t as animationDuration,\n C as animationEndEvent,\n W as animationName,\n Me as ariaChecked,\n Le as ariaDescribedBy,\n De as ariaDescription,\n Oe as ariaExpanded,\n xe as ariaHasPopup,\n X as ariaHidden,\n ze as ariaLabel,\n Ie as ariaLabelledBy,\n Pe as ariaModal,\n Fe as ariaPressed,\n Be as ariaSelected,\n He as ariaValueMax,\n Ve as ariaValueMin,\n Ue as ariaValueNow,\n We as ariaValueText,\n tt as beforeunloadEvent,\n kn as bezierEasings,\n et as blurEvent,\n P as camelCase,\n eo as capitalize,\n nt as changeEvent,\n Ne as closest,\n ot as contextmenuEvent,\n mo as createCustomEvent,\n se as createElement,\n re as createElementNS,\n Z as dispatchEvent,\n no as distinct,\n $n as documentBody,\n Jn as documentElement,\n Xn as documentHead,\n Qe as dragEvent,\n Ze as dragendEvent,\n Ke as dragenterEvent,\n qe as dragleaveEvent,\n Ge as dragoverEvent,\n je as dragstartEvent,\n oo as emulateAnimationEnd,\n so as emulateTransitionEnd,\n rt as errorEvent,\n ao as focus,\n ct as focusEvent,\n tn as focusEvents,\n Zt as focusableSelector,\n at as focusinEvent,\n it as focusoutEvent,\n ut as gesturechangeEvent,\n lt as gestureendEvent,\n dt as gesturestartEvent,\n K as getAttribute,\n Wn as getAttributeNS,\n y as getBoundingClientRect,\n Ro as getCustomElements,\n d as getDocument,\n So as getDocumentBody,\n w as getDocumentElement,\n ko as getDocumentHead,\n ce as getElementAnimationDelay,\n ae as getElementAnimationDuration,\n Qo as getElementById,\n f as getElementStyle,\n ie as getElementTransitionDelay,\n ue as getElementTransitionDuration,\n jo as getElementsByClassName,\n Te as getElementsByTagName,\n to as getInstance,\n ge as getNodeName,\n No as getNodeScroll,\n To as getOffsetParent,\n k as getParentNode,\n Co as getRectRelativeToOffsetParent,\n Ae as getUID,\n ve as getWindow,\n _ as handleKeyboardNavigation,\n oe as hasAttribute,\n Rn as hasAttributeNS,\n _n as hasClass,\n I as hasFocusTrap,\n zn as isApple,\n Se as isArray,\n Mo as isCanvas,\n ke as isCustomElement,\n G as isDocument,\n i as isElement,\n Do as isElementInScrollRange,\n Lo as isElementInViewport,\n Oo as isElementsArray,\n In as isFirefox,\n xo as isFunction,\n zo as isHTMLCollection,\n b as isHTMLElement,\n Io as isHTMLImageElement,\n Po as isJSON,\n O as isMap,\n Bo as isMedia,\n xn as isMobile,\n u as isNode,\n Vo as isNodeList,\n le as isNumber,\n v as isObject,\n Ho as isRTL,\n Uo as isSVGElement,\n we as isScaledElement,\n me as isShadowRoot,\n N as isString,\n be as isTableElement,\n Fo as isWeakMap,\n te as isWebKit,\n q as isWindow,\n io as kebabCase,\n nn as keyAlt,\n on as keyArrowDown,\n rn as keyArrowLeft,\n cn as keyArrowRight,\n sn as keyArrowUp,\n an as keyBackspace,\n un as keyCapsLock,\n ln as keyControl,\n dn as keyDelete,\n fn as keyEnter,\n gn as keyEscape,\n mn as keyInsert,\n vn as keyMeta,\n pn as keyNumpadEnter,\n bn as keyPause,\n En as keyScrollLock,\n hn as keyShift,\n yn as keySpace,\n wn as keyTab,\n en as keyboardEventKeys,\n ft as keydownEvent,\n pt as keypressEvent,\n gt as keyupEvent,\n mt as loadEvent,\n _e as loadstartEvent,\n Ee as matches,\n Je as mouseClickEvents,\n Xe as mouseHoverEvents,\n $e as mouseSwipeEvents,\n vt as mouseclickEvent,\n bt as mousedblclickEvent,\n Et as mousedownEvent,\n wt as mouseenterEvent,\n yt as mousehoverEvent,\n St as mouseinEvent,\n At as mouseleaveEvent,\n Tt as mousemoveEvent,\n kt as mouseoutEvent,\n Nt as mouseoverEvent,\n ht as mouseupEvent,\n Ct as mousewheelEvent,\n Mt as moveEvent,\n Re as nativeEvents,\n ee as noop,\n uo as normalizeOptions,\n F as normalizeValue,\n j as off,\n Nn as offsetHeight,\n Tn as offsetWidth,\n Q as on,\n ne as one,\n Dt as orientationchangeEvent,\n vo as passiveHandler,\n Lt as pointercancelEvent,\n Ot as pointerdownEvent,\n xt as pointerleaveEvent,\n zt as pointermoveEvent,\n It as pointerupEvent,\n Wo as querySelector,\n de as querySelectorAll,\n Pt as readystatechangeEvent,\n bo as reflow,\n Kn as removeAttribute,\n qn as removeAttributeNS,\n Zn as removeClass,\n Sn as removeEventListener,\n pe as removeFocusTrap,\n Ft as resetEvent,\n Bt as resizeEvent,\n Wt as scrollEvent,\n Cn as scrollHeight,\n Mn as scrollWidth,\n Vt as selectEvent,\n Ht as selectendEvent,\n Ut as selectstartEvent,\n Qn as setAttribute,\n jn as setAttributeNS,\n Eo as setElementStyle,\n Rt as submitEvent,\n Pn as support3DTransform,\n Hn as supportAnimation,\n Fn as supportPassive,\n Vn as supportTouch,\n Bn as supportTransform,\n Un as supportTransition,\n Dn as tabindex,\n yo as toLowerCase,\n wo as toUpperCase,\n Ao as toggleFocusTrap,\n Ye as touchEvents,\n Kt as touchcancelEvent,\n qt as touchendEvent,\n jt as touchmoveEvent,\n Qt as touchstartEvent,\n Xt as transitionDelay,\n Jt as transitionDuration,\n M as transitionEndEvent,\n R as transitionProperty,\n Gt as unloadEvent,\n On as userAgent,\n Ln as userAgentData,\n Ce as version\n};\n//# sourceMappingURL=shorty.mjs.map\n","import { isElement, isFunction } from \"@thednp/shorty\";\nimport { version } from \"../package.json\";\n\nexport type PositionObserverCallback = (\n entries: PositionObserverEntry[],\n observer: PositionObserver,\n) => void;\n\nexport type PositionObserverEntry = {\n target: Element;\n boundingClientRect: DOMRect;\n clientHeight: number;\n clientWidth: number;\n};\n\nexport type PositionObserverOptions = {\n root: HTMLElement;\n};\n\nconst errorString = \"PositionObserver Error\";\n\n/**\n * The PositionObserver class is a utility class that observes the position\n * of DOM elements and triggers a callback when their position changes.\n */\nexport default class PositionObserver {\n public entries: Map<Element, PositionObserverEntry>;\n public static version = version;\n private _tick: number;\n private _root: Element;\n private _callback: PositionObserverCallback;\n\n /**\n * The constructor takes two arguments, a `callback`, which is called\n * whenever the position of an observed element changes and an `options` object.\n * The callback function should take an array of `PositionObserverEntry` objects\n * as its only argument, but it's not required.\n *\n * @param callback the callback that applies to all targets of this observer\n * @param options the options of this observer\n */\n constructor(\n callback: PositionObserverCallback,\n options?: Partial<PositionObserverOptions>,\n ) {\n if (!isFunction(callback)) {\n throw new Error(`${errorString}: ${callback} is not a function.`);\n }\n this.entries = new Map();\n this._callback = callback;\n this._root = isElement(options?.root)\n ? options.root\n /* istanbul ignore next @preserve */\n : document?.documentElement;\n this._tick = 0;\n }\n\n /**\n * Start observing the position of the specified element.\n * If the element is not currently attached to the DOM,\n * it will NOT be added to the entries.\n *\n * @param target an `Element` target\n */\n public observe = (target: Element) => {\n if (!isElement(target)) {\n throw new Error(\n `${errorString}: ${target} is not an instance of Element.`,\n );\n }\n\n /* istanbul ignore else @preserve - a guard must be set */\n if (!this._root.contains(target)) return;\n\n // define a new entry\n // push the entry into the queue\n this._new(target).then(({ boundingClientRect }) => {\n /* istanbul ignore else @preserve - don't allow duplicate entries */\n if (boundingClientRect && !this.getEntry(target)) {\n const { clientWidth, clientHeight } = this._root;\n\n this.entries.set(target, {\n target,\n boundingClientRect,\n clientWidth,\n clientHeight,\n });\n }\n\n /* istanbul ignore else @preserve */\n if (!this._tick) this._tick = requestAnimationFrame(this._runCallback);\n });\n };\n\n /**\n * Stop observing the position of the specified element.\n *\n * @param target an `Element` target\n */\n public unobserve = (target: Element) => {\n /* istanbul ignore else @preserve */\n if (this.entries.has(target)) this.entries.delete(target);\n };\n\n /**\n * Private method responsible for all the heavy duty,\n * the observer's runtime.\n */\n private _runCallback = () => {\n /* istanbul ignore if @preserve - a guard must be set */\n if (!this.entries.size) return;\n const { clientWidth, clientHeight } = this._root;\n\n const queue = new Promise<PositionObserverEntry[]>((resolve) => {\n const updates: PositionObserverEntry[] = [];\n this.entries.forEach(\n (\n {\n target,\n boundingClientRect: oldBoundingBox,\n clientWidth: oldWidth,\n clientHeight: oldHeight,\n },\n ) => {\n /* istanbul ignore if @preserve - a guard must be set when target has been removed */\n if (!this._root.contains(target)) return;\n\n this._new(target).then(({ boundingClientRect, isIntersecting }) => {\n /* istanbul ignore if @preserve - make sure to only count visible entries */\n if (!isIntersecting) return;\n const { left, top } = boundingClientRect;\n\n /* istanbul ignore else @preserve - only schedule entries that changed position */\n if (\n oldBoundingBox.top !== top || oldBoundingBox.left !== left ||\n oldWidth !== clientWidth || oldHeight !== clientHeight\n ) {\n const newEntry = {\n target,\n boundingClientRect,\n clientHeight,\n clientWidth,\n };\n this.entries.set(target, newEntry);\n updates.push(newEntry);\n }\n });\n },\n );\n\n resolve(updates);\n });\n\n this._tick = requestAnimationFrame(async () => {\n // execute the queue\n const updates = await queue;\n\n // only execute the callback if position actually changed\n /* istanbul ignore else @preserve */\n if (updates.length) this._callback(updates, this);\n\n this._runCallback();\n });\n };\n\n /**\n * Check intersection status and resolve it\n * right away.\n *\n * @param target an `Element` target\n */\n private _new = (target: Element) => {\n return new Promise<IntersectionObserverEntry>((resolve) => {\n const intersectionObserver = new IntersectionObserver(\n ([entry], ob) => {\n ob.disconnect();\n\n resolve(entry);\n },\n );\n\n intersectionObserver.observe(target);\n });\n };\n\n /**\n * Find the entry for a given target.\n *\n * @param target an `HTMLElement` target\n */\n public getEntry = (target: Element) => this.entries.get(target);\n\n /**\n * Immediately stop observing all elements.\n */\n public disconnect = () => {\n cancelAnimationFrame(this._tick);\n this.entries.clear();\n this._tick = 0;\n };\n}\n"],"names":["v","t","u","e","i","xo","errorString","PositionObserver","version","callback","options","isFunction","isElement","target","boundingClientRect","clientWidth","clientHeight","queue","resolve","updates","oldBoundingBox","oldWidth","oldHeight","isIntersecting","left","top","newEntry","entry","ob"],"mappings":"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","x_google_ignoreList":[0]}