{"version":3,"file":"dll.mjs","sources":["../node_modules/.pnpm/@thednp+shorty@2.0.11/node_modules/@thednp/shorty/dist/shorty.mjs","../src/dataSRC.ts","../src/utils.ts","../src/loadMedia.ts","../src/getMediaElements.ts","../src/index.ts"],"sourcesContent":["const Ce = \"2.0.11\", 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","/** Global namespace for the `data-src` attribute. */\nconst dataSRC = \"data-src\";\nexport default dataSRC;\n","import { isHTMLElement } from \"@thednp/shorty\";\n\nexport const isVideo = (target: unknown): target is HTMLVideoElement =>\n  isHTMLElement(target) && target.tagName === \"VIDEO\";\nexport const isSource = (target: unknown): target is HTMLSourceElement =>\n  isHTMLElement(target) && target.tagName === \"SOURCE\";\nexport const isImage = (target: unknown): target is HTMLImageElement =>\n  isHTMLElement(target) && target.tagName === \"IMG\";\n","import {\n  createElement,\n  getAttribute,\n  isFunction,\n  loadEvent,\n  loadstartEvent,\n  off,\n  on,\n  removeAttribute,\n  setElementStyle,\n} from \"@thednp/shorty\";\nimport dataSRC from \"./dataSRC\";\nimport type { CallbackFunction, LoadMediaTarget } from \"./types\";\nimport { isImage, isSource, isVideo } from \"./utils\";\n\n/**\n * Load media for single target.\n *\n * @param mediaElement\n * @param imageCallback callback function\n */\nconst loadMedia = (\n  mediaElement: LoadMediaTarget,\n  imageCallback?: CallbackFunction,\n) => {\n  const isSOURCE = isSource(mediaElement);\n  const loadEv = isSOURCE ? loadstartEvent : loadEvent;\n  const newVideo = isSOURCE ? createElement(\"VIDEO\") : null;\n  const mediaObject = createElement(isSOURCE ? \"SOURCE\" : \"IMG\");\n  const loadTarget = isSOURCE ? newVideo : mediaObject;\n  const src = getAttribute(mediaElement, dataSRC);\n\n  if (!loadTarget || !src) return;\n\n  const loadWrapper = () => {\n    // 'HTMLImageElement' | 'HTMLSourceElement'\n    if (isImage(mediaElement) || isSource(mediaElement)) {\n      mediaElement.src = src;\n      if (isSource(mediaElement)) {\n        if (isVideo(mediaElement.parentElement)) {\n          mediaElement.parentElement.load();\n        }\n      }\n      // `HTMLElement` background-image\n    } else {\n      setElementStyle(mediaElement, { backgroundImage: `url(\"${src}\")` });\n    }\n    removeAttribute(mediaElement, dataSRC);\n    if (isFunction(imageCallback)) imageCallback();\n    off(loadTarget, loadEv, loadWrapper);\n  };\n\n  on(loadTarget, loadEv, loadWrapper);\n\n  if (isImage(mediaObject) || isSource(mediaObject)) {\n    mediaObject.src = src;\n    if (newVideo) newVideo.append(mediaObject);\n  }\n};\n\nexport default loadMedia;\n","import { getAttribute, querySelectorAll } from \"@thednp/shorty\";\n\nimport dataSRC from \"./dataSRC\";\n\n/**\n * Returns an `Array` with all `<img>`, `<video>` or HTMLElement\n * with `data-src` attribute.\n *\n * @param source\n */\nconst getMediaElements = (\n  source?: Element,\n) => {\n  // element chidlren with data-src attribute\n  const matchedSelectors = querySelectorAll<HTMLElement>(\n    `[${dataSRC}]`,\n    source,\n  );\n  // element has own data-src attribute\n  const elementSRC = source && getAttribute(source, dataSRC);\n\n  if (elementSRC && !matchedSelectors) {\n    return [source];\n  }\n  if (!elementSRC && matchedSelectors) {\n    return [...matchedSelectors];\n  }\n  if (elementSRC && matchedSelectors) {\n    return [source, ...matchedSelectors];\n  }\n  if (!elementSRC && !matchedSelectors) {\n    return [...querySelectorAll<HTMLElement>(`[${dataSRC}]`)];\n  }\n\n  return null;\n};\n\nexport default getMediaElements;\n","import { isFunction, querySelector } from \"@thednp/shorty\";\n\nimport loadMedia from \"./loadMedia\";\nimport getMediaElements from \"./getMediaElements\";\nimport type { CallbackFunction } from \"./types\";\n\n// import version from './version';\n\n// DLL DEFINITION\n// ==============\n/**\n * Lazy load one or more items with `data-src` attribute.\n * * target can be  `<img>` | `<video>` | `Element`\n * * or any `Element` that contains the above elements\n * * or `Element` that has the `data-src` attribute\n *\n * @param target target\n * @param callback\n */\nconst DLL = (target: Element | string, callback?: CallbackFunction) => {\n  // element\n  const element = querySelector(target);\n  if (!element) return;\n\n  // callback\n  const callbackFn = isFunction(callback) ? callback : null;\n  const mediaTargets = getMediaElements(element);\n  // console.log(mediaTargets,callbackFn)\n\n  if (mediaTargets && mediaTargets.length) {\n    mediaTargets.forEach((x, i) => {\n      if (i === mediaTargets.length - 1 && callbackFn) {\n        loadMedia(x, callbackFn);\n      } else {\n        loadMedia(x);\n      }\n    });\n  }\n};\n\n// ObjectAssign(DLL, { version, getMediaElements, loadMedia });\nexport default DLL;\n"],"names":["mt","_e","Q","t","e","n","o","j","K","Kn","v","u","i","N","q","G","d","T","se","S","Eo","s","de","b","xo","Wo","dataSRC","isVideo","target","isHTMLElement","isSource","isImage","loadMedia","mediaElement","imageCallback","isSOURCE","loadEv","loadstartEvent","loadEvent","newVideo","createElement","mediaObject","loadTarget","src","getAttribute","loadWrapper","setElementStyle","removeAttribute","isFunction","off","on","getMediaElements","source","matchedSelectors","querySelectorAll","elementSRC","DLL","callback","element","querySelector","callbackFn","mediaTargets","x"],"mappings":"AAAK,MAAmoBA,IAAK,QAmDtiBC,IAAK,aAqEzGC,IAAI,CAACC,GAAGC,GAAGC,GAAGC,MAAM;AAErB,EAAAH,EAAE;AAAA,IACAC;AAAA,IACAC;AAAA,IACA;AAAA,EACD;AACH,GAAGE,IAAI,CAACJ,GAAGC,GAAGC,GAAGC,MAAM;AAErB,EAAAH,EAAE;AAAA,IACAC;AAAA,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