import { defineComponent as Ee, createElementBlock as Ct, openBlock as kt, Fragment as Ce, createElementVNode as Yt, createTextVNode as ke, toRef as Ot, computed as Tt } from "vue";
import { _ as Oe } from "./install-BuMO14Rb.js";
const Te = { class: "time-group" }, Ae = {
  key: 0,
  type: "current",
  remainder: ""
}, Pe = /* @__PURE__ */ Ee({
  __name: "time-group",
  props: {
    countdown: { type: Boolean, default: !1 }
  },
  setup(t) {
    const e = t;
    return (n, r) => (kt(), Ct("div", Te, [
      e.countdown ? (kt(), Ct("media-time", Ae)) : (kt(), Ct(Ce, { key: 1 }, [
        r[0] || (r[0] = Yt("media-time", { type: "current" }, null, -1)),
        r[1] || (r[1] = ke(" / ", -1)),
        r[2] || (r[2] = Yt("media-time", { type: "duration" }, null, -1))
      ], 64))
    ]));
  }
}), Dn = /* @__PURE__ */ Oe(Pe, [["__scopeId", "data-v-c80a48e6"]]), S = /* @__PURE__ */ Symbol(0);
let ht = !1, xt = !1, b = null, M = null, $ = null, h = 0, _ = [], Mt = {};
const xe = () => {
}, H = 0, se = 1, dt = 2, pt = 3;
function Ne() {
  ht = !0, queueMicrotask(ie);
}
function ie() {
  if (!_.length) {
    ht = !1;
    return;
  }
  xt = !0;
  for (let t = 0; t < _.length; t++)
    _[t].$st !== H && Ie(_[t]);
  _ = [], ht = !1, xt = !1;
}
function Ie(t) {
  let e = [t];
  for (; t = t[S]; )
    t.$e && t.$st !== H && e.push(t);
  for (let n = e.length - 1; n >= 0; n--)
    jt(e[n]);
}
function _e(t) {
  const e = Nt();
  return X(e, t.length ? t.bind(null, F.bind(e)) : t, null);
}
function Rn(t) {
  return X(b, t, null);
}
function Me(t) {
  return X(null, t, null);
}
function jn() {
  xt || ie();
}
function oe() {
  return b;
}
function w(t, e) {
  try {
    return X(e, t, null);
  } catch (n) {
    Ft(e, n);
    return;
  }
}
function le(t, e = b) {
  return e?.$cx[t];
}
function Fe(t, e, n = b) {
  n && (n.$cx = { ...n.$cx, [t]: e });
}
function $t(t) {
  if (!t || !b)
    return t || xe;
  const e = b;
  return e.$d ? Array.isArray(e.$d) ? e.$d.push(t) : e.$d = [e.$d, t] : e.$d = t, function() {
    e.$st !== pt && (t.call(null), mt(e.$d) ? e.$d = null : Array.isArray(e.$d) && e.$d.splice(e.$d.indexOf(t), 1));
  };
}
function F(t = !0) {
  if (this.$st !== pt) {
    if (this.$h)
      if (Array.isArray(this.$h))
        for (let e = this.$h.length - 1; e >= 0; e--)
          F.call(this.$h[e]);
      else
        F.call(this.$h);
    if (t) {
      const e = this[S];
      e && (Array.isArray(e.$h) ? e.$h.splice(e.$h.indexOf(this), 1) : e.$h = null), He(this);
    }
  }
}
function He(t) {
  t.$st = pt, t.$d && ce(t), t.$s && It(t, 0), t[S] = null, t.$s = null, t.$o = null, t.$h = null, t.$cx = Mt, t.$eh = null;
}
function ce(t) {
  try {
    if (Array.isArray(t.$d))
      for (let e = t.$d.length - 1; e >= 0; e--) {
        const n = t.$d[e];
        n.call(n);
      }
    else
      t.$d.call(t.$d);
    t.$d = null;
  } catch (e) {
    Ft(t, e);
  }
}
function X(t, e, n) {
  const r = b, s = M;
  b = t, M = n;
  try {
    return e.call(t);
  } finally {
    b = r, M = s;
  }
}
function Ft(t, e) {
  if (!t || !t.$eh)
    throw e;
  let n = 0, r = t.$eh.length, s = e;
  for (n = 0; n < r; n++)
    try {
      t.$eh[n](s);
      break;
    } catch (i) {
      s = i;
    }
  if (n === r)
    throw s;
}
function Ht() {
  return this.$st === pt ? this.$v : (M && !this.$e && (!$ && M.$s && M.$s[h] == this ? h++ : $ ? $.push(this) : $ = [this]), this.$c && jt(this), this.$v);
}
function ae(t) {
  const e = mt(t) ? t(this.$v) : t;
  if (this.$ch(this.$v, e) && (this.$v = e, this.$o))
    for (let n = 0; n < this.$o.length; n++)
      he(this.$o[n], dt);
  return this.$v;
}
const Lt = function() {
  this[S] = null, this.$h = null, b && b.append(this);
}, I = Lt.prototype;
I.$cx = Mt;
I.$eh = null;
I.$c = null;
I.$d = null;
I.append = function(t) {
  t[S] = this, this.$h ? Array.isArray(this.$h) ? this.$h.push(t) : this.$h = [this.$h, t] : this.$h = t, t.$cx = t.$cx === Mt ? this.$cx : { ...this.$cx, ...t.$cx }, this.$eh && (t.$eh = t.$eh ? [...t.$eh, ...this.$eh] : this.$eh);
};
I.dispose = function() {
  F.call(this);
};
function Nt() {
  return new Lt();
}
const ue = function(e, n, r) {
  Lt.call(this), this.$st = n ? dt : H, this.$i = !1, this.$e = !1, this.$s = null, this.$o = null, this.$v = e, n && (this.$c = n), r && r.dirty && (this.$ch = r.dirty);
}, Dt = ue.prototype;
Object.setPrototypeOf(Dt, I);
Dt.$ch = Le;
Dt.call = Ht;
function Rt(t, e, n) {
  return new ue(t, e, n);
}
function Le(t, e) {
  return t !== e;
}
function mt(t) {
  return typeof t == "function";
}
function jt(t) {
  if (t.$st === se)
    for (let e = 0; e < t.$s.length && (jt(t.$s[e]), t.$st !== dt); e++)
      ;
  t.$st === dt ? fe(t) : t.$st = H;
}
function De(t) {
  t.$h && F.call(t, !1), t.$d && ce(t), t.$eh = t[S] ? t[S].$eh : null;
}
function fe(t) {
  let e = $, n = h;
  $ = null, h = 0;
  try {
    De(t);
    const r = X(t, t.$c, t);
    Xt(t), !t.$e && t.$i ? ae.call(t, r) : (t.$v = r, t.$i = !0);
  } catch (r) {
    Xt(t), Ft(t, r);
  } finally {
    $ = e, h = n, t.$st = H;
  }
}
function Xt(t) {
  if ($) {
    if (t.$s && It(t, h), t.$s && h > 0) {
      t.$s.length = h + $.length;
      for (let n = 0; n < $.length; n++)
        t.$s[h + n] = $[n];
    } else
      t.$s = $;
    let e;
    for (let n = h; n < t.$s.length; n++)
      e = t.$s[n], e.$o ? e.$o.push(t) : e.$o = [t];
  } else t.$s && h < t.$s.length && (It(t, h), t.$s.length = h);
}
function he(t, e) {
  if (!(t.$st >= e) && (t.$e && t.$st === H && (_.push(t), ht || Ne()), t.$st = e, t.$o))
    for (let n = 0; n < t.$o.length; n++)
      he(t.$o[n], se);
}
function It(t, e) {
  let n, r;
  for (let s = e; s < t.$s.length; s++)
    n = t.$s[s], n.$o && (r = n.$o.indexOf(t), n.$o[r] = n.$o[n.$o.length - 1], n.$o.pop());
}
function de(...t) {
}
function Re(t) {
  return t === null;
}
function T(t) {
  return typeof t > "u";
}
function Vn(t) {
  return Re(t) || T(t);
}
function Wn(t) {
  return t?.constructor === Object;
}
function Bn(t) {
  return typeof t == "number" && !Number.isNaN(t);
}
function N(t) {
  return typeof t == "string";
}
function qn(t) {
  return typeof t == "boolean";
}
function A(t) {
  return typeof t == "function";
}
function pe(t) {
  return Array.isArray(t);
}
const je = Event, $e = /* @__PURE__ */ Symbol("DOM_EVENT");
class Zt extends je {
  [$e] = !0;
  /**
   * The event detail.
   */
  detail;
  /**
   * The event trigger chain.
   */
  triggers = new Ve();
  /**
   * The preceding event that was responsible for this event being fired.
   */
  get trigger() {
    return this.triggers.source;
  }
  /**
   * The origin event that lead to this event being fired.
   */
  get originEvent() {
    return this.triggers.origin;
  }
  /**
   * Whether the origin event was triggered by the user.
   *
   * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted}
   */
  get isOriginTrusted() {
    return this.triggers.origin?.isTrusted ?? !1;
  }
  constructor(e, ...n) {
    super(e, n[0]), this.detail = n[0]?.detail;
    const r = n[0]?.trigger;
    r && this.triggers.add(r);
  }
}
class Ve {
  chain = [];
  get source() {
    return this.chain[0];
  }
  get origin() {
    return this.chain[this.chain.length - 1];
  }
  /**
   * Appends the event to the end of the chain.
   */
  add(e) {
    this.chain.push(e), We(e) && this.chain.push(...e.triggers);
  }
  /**
   * Removes the event from the chain and returns it (if found).
   */
  remove(e) {
    return this.chain.splice(this.chain.indexOf(e), 1)[0];
  }
  /**
   * Returns whether the chain contains the given `event`.
   */
  has(e) {
    return this.chain.some((n) => n === e);
  }
  /**
   * Returns whether the chain contains the given event type.
   */
  hasType(e) {
    return !!this.findType(e);
  }
  /**
   * Returns the first event with the given `type` found in the chain.
   */
  findType(e) {
    return this.chain.find((n) => n.type === e);
  }
  /**
   * Walks an event chain on a given `event`, and invokes the given `callback` for each trigger event.
   */
  walk(e) {
    for (const n of this.chain) {
      const r = e(n);
      if (r) return [n, r];
    }
  }
  [Symbol.iterator]() {
    return this.chain.values();
  }
}
function We(t) {
  return !!t?.[$e];
}
class zn extends EventTarget {
  /** @internal type only */
  $ts__events;
  addEventListener(e, n, r) {
    return super.addEventListener(e, n, r);
  }
  removeEventListener(e, n, r) {
    return super.removeEventListener(e, n, r);
  }
}
function Be(t, e, n, r) {
  return t.addEventListener(e, n, r), $t(() => t.removeEventListener(e, n, r));
}
class Un {
  #t;
  #e;
  get signal() {
    return this.#e.signal;
  }
  constructor(e) {
    this.#t = e, this.#e = new AbortController(), $t(this.abort.bind(this));
  }
  add(e, n, r) {
    if (this.signal.aborted) throw Error("aborted");
    return this.#t.addEventListener(e, n, {
      ...r,
      signal: r?.signal ? qe(this.signal, r.signal) : this.signal
    }), this;
  }
  remove(e, n) {
    return this.#t.removeEventListener(e, n), this;
  }
  abort(e) {
    this.#e.abort(e);
  }
}
function qe(...t) {
  const e = new AbortController(), n = { signal: e.signal };
  function r(s) {
    e.abort(s.target.reason);
  }
  for (const s of t) {
    if (s.aborted) {
      e.abort(s.reason);
      break;
    }
    s.addEventListener("abort", r, n);
  }
  return e.signal;
}
function Kn(t) {
  return !!t?.type.startsWith("pointer");
}
function Yn(t) {
  return !!t?.type.startsWith("touch");
}
function Xn(t) {
  return /^(click|mouse)/.test(t?.type ?? "");
}
function me(t) {
  return !!t?.type.startsWith("key");
}
function Zn(t) {
  return me(t) && t.key === "Enter";
}
function Gn(t) {
  return me(t) && (t.key === "Enter" || t.key === " ");
}
function Jn(t) {
  return t instanceof Node;
}
function Gt(t, e, n) {
  if (t) if (!n && n !== "" && n !== 0)
    t.removeAttribute(e);
  else {
    const r = n === !0 ? "" : n + "";
    t.getAttribute(e) !== r && t.setAttribute(e, r);
  }
  else return;
}
function Jt(t, e, n) {
  if (t) !n && n !== 0 ? t.style.removeProperty(e) : t.style.setProperty(e, n + "");
  else return;
}
function Vt(t, e) {
  const n = Rt(t, null, e), r = Ht.bind(n);
  return r[S] = !0, r.set = ae.bind(n), r;
}
function ze(t) {
  return mt(t) && S in t;
}
function Ue(t, e) {
  const n = Rt(
    e?.initial,
    t,
    e
  ), r = Ht.bind(n);
  return r[S] = !0, r;
}
function Ke(t, e) {
  const n = Rt(
    null,
    function() {
      let s = t();
      return mt(s) && $t(s), null;
    },
    void 0
  );
  return n.$e = !0, fe(n), F.bind(n, !0);
}
function Qn(t) {
  return ze(t) && "set" in t;
}
const _t = Ke;
function tr(t) {
  return { id: /* @__PURE__ */ Symbol(), provide: t };
}
function Ye(t, e, n = oe()) {
  const r = !T(e);
  Fe(t.id, r ? e : t.provide?.(), n);
}
function Xe(t) {
  return le(t.id);
}
function er(t) {
  return !T(le(t.id));
}
const U = /* @__PURE__ */ Symbol(0), K = /* @__PURE__ */ Symbol(0), ge = /* @__PURE__ */ Symbol(0), At = {};
class Ze {
  /** @internal type only */
  $ts__events;
  /** @internal type only */
  $ts__vars;
  /* @internal */
  [ge] = null;
  $el = Vt(null);
  el = null;
  scope = null;
  attachScope = null;
  connectScope = null;
  component = null;
  destroyed = !1;
  props = At;
  attrs = null;
  styles = null;
  state;
  $state;
  #t = [];
  #e = [];
  #n = [];
  #r = [];
  constructor(e, n, r) {
    this.scope = n, r?.scope && r.scope.append(n);
    let s = e.state, i = e.props;
    if (s && (this.$state = s.create(), this.state = new Proxy(this.$state, {
      get: (l, o) => this.$state[o]()
    }), Ye(s, this.$state)), i && (this.props = Ge(i), r?.props))
      for (const l of Object.keys(r.props))
        this.props[l]?.set(r.props[l]);
    $t(this.destroy.bind(this));
  }
  setup() {
    w(() => {
      for (const e of this.#t) e();
    }, this.scope);
  }
  attach(e) {
    this.el || (this.el = e, this.$el.set(e), w(() => {
      this.attachScope = Nt(), w(() => {
        for (const n of this.#e) n(this.el);
        this.#s(), this.#i();
      }, this.attachScope);
    }, this.scope), e.dispatchEvent(new Event("attached")));
  }
  detach() {
    this.attachScope?.dispose(), this.attachScope = null, this.connectScope = null, this.el = null, this.$el.set(null);
  }
  connect() {
    !this.el || !this.attachScope || !this.#n.length || w(() => {
      this.connectScope = Nt(), w(() => {
        for (const e of this.#n) e(this.el);
      }, this.connectScope);
    }, this.attachScope);
  }
  disconnect() {
    this.connectScope?.dispose(), this.connectScope = null;
  }
  destroy() {
    if (this.destroyed) return;
    this.destroyed = !0, w(() => {
      for (const n of this.#r) n(this.el);
    }, this.scope);
    const e = this.el;
    this.detach(), this.scope.dispose(), this.#t.length = 0, this.#e.length = 0, this.#n.length = 0, this.#r.length = 0, this.component = null, this.attrs = null, this.styles = null, this.props = At, this.scope = null, this.state = At, this.$state = null, e && delete e.$;
  }
  addHooks(e) {
    e.onSetup && this.#t.push(e.onSetup.bind(e)), e.onAttach && this.#e.push(e.onAttach.bind(e)), e.onConnect && this.#n.push(e.onConnect.bind(e)), e.onDestroy && this.#r.push(e.onDestroy.bind(e));
  }
  #s() {
    if (this.attrs)
      for (const e of Object.keys(this.attrs))
        A(this.attrs[e]) ? _t(this.#o.bind(this, e)) : Gt(this.el, e, this.attrs[e]);
  }
  #i() {
    if (this.styles)
      for (const e of Object.keys(this.styles))
        A(this.styles[e]) ? _t(this.#l.bind(this, e)) : Jt(this.el, e, this.styles[e]);
  }
  #o(e) {
    Gt(this.el, e, this.attrs[e].call(this.component));
  }
  #l(e) {
    Jt(this.el, e, this.styles[e].call(this.component));
  }
}
function Ge(t) {
  const e = {};
  for (const n of Object.keys(t)) {
    const r = t[n];
    e[n] = Vt(r, r);
  }
  return e;
}
let Y = { $$: null };
function Je(t, e) {
  return _e(() => {
    Y.$$ = new Ze(t, oe(), e);
    const n = new t();
    return Y.$$.component = n, Y.$$ = null, n;
  });
}
class Qe extends EventTarget {
  /** @internal */
  $$;
  get el() {
    return this.$$.el;
  }
  get $el() {
    return this.$$.$el();
  }
  get scope() {
    return this.$$.scope;
  }
  get attachScope() {
    return this.$$.attachScope;
  }
  get connectScope() {
    return this.$$.connectScope;
  }
  /** @internal */
  get $props() {
    return this.$$.props;
  }
  /** @internal */
  get $state() {
    return this.$$.$state;
  }
  get state() {
    return this.$$.state;
  }
  constructor() {
    super(), Y.$$ && this.attach(Y);
  }
  attach({ $$: e }) {
    return this.$$ = e, e.addHooks(this), this;
  }
  addEventListener(e, n, r) {
    this.listen(e, n, r);
  }
  removeEventListener(e, n, r) {
    this.el?.removeEventListener(e, n, r);
  }
  /**
   * The given callback is invoked when the component is ready to be set up.
   *
   * - This hook will run once.
   * - This hook is called both client-side and server-side.
   * - It's safe to use context inside this hook.
   * - The host element has not attached yet - wait for `onAttach`.
   */
  /**
   * This method can be used to specify attributes that should be set on the host element. Any
   * attributes that are assigned to a function will be considered a signal and updated accordingly.
   */
  setAttributes(e) {
    this.$$.attrs || (this.$$.attrs = {}), Object.assign(this.$$.attrs, e);
  }
  /**
   * This method can be used to specify styles that should set be set on the host element. Any
   * styles that are assigned to a function will be considered a signal and updated accordingly.
   */
  setStyles(e) {
    this.$$.styles || (this.$$.styles = {}), Object.assign(this.$$.styles, e);
  }
  /**
   * This method is used to satisfy the CSS variables contract specified on the current
   * component. Other CSS variables can be set via the `setStyles` method.
   */
  setCSSVars(e) {
    this.setStyles(e);
  }
  /**
   * Type-safe utility for creating component DOM events.
   */
  createEvent(e, ...n) {
    return new Zt(e, n[0]);
  }
  /**
   * Creates a `DOMEvent` and dispatches it from the host element. This method is typed to
   * match all component events.
   */
  dispatch(e, ...n) {
    if (!this.el) return !1;
    const r = e instanceof Event ? e : new Zt(e, n[0]);
    return Object.defineProperty(r, "target", {
      get: () => this.$$.component
    }), Me(() => (this.$$[ge]?.(r), this.el.dispatchEvent(r)));
  }
  dispatchEvent(e) {
    return this.dispatch(e);
  }
  /**
   * Adds an event listener for the given `type` and returns a function which can be invoked to
   * remove the event listener.
   *
   * - The listener is removed if the current scope is disposed.
   * - This method is safe to use on the server (noop).
   */
  listen(e, n, r) {
    return this.el ? Be(this.el, e, n, r) : de;
  }
}
class nr extends Qe {
  subscribe(e) {
    return w(() => _t(() => e(this.state)), this.$$.scope);
  }
  destroy() {
    this.$$.destroy();
  }
}
function rr(t, e, n) {
  t[U] || (t[U] = /* @__PURE__ */ new Set()), t[U].add(e);
}
function sr(t, e, n) {
  t[K] || (t[K] = /* @__PURE__ */ new Set()), t[K].add(e);
}
class ir {
  id = /* @__PURE__ */ Symbol(0);
  record;
  #t;
  constructor(e) {
    this.record = e, this.#t = Object.getOwnPropertyDescriptors(e);
  }
  create() {
    const e = {}, n = new Proxy(e, { get: (r, s) => e[s]() });
    for (const r of Object.keys(this.record)) {
      const s = this.#t[r].get;
      e[r] = s ? Ue(s.bind(n)) : Vt(this.record[r]);
    }
    return e;
  }
  reset(e, n) {
    for (const r of Object.keys(e))
      !this.#t[r].get && (!n || n(r)) && e[r].set(this.record[r]);
  }
}
function or(t) {
  return Xe(t);
}
function tn(t, e) {
  for (const n of t) n(e);
}
function en(t) {
  return t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
}
function lr(t) {
  return t.replace(/-./g, (e) => e[1].toUpperCase());
}
function cr(t) {
  return t.charAt(0).toUpperCase() + t.slice(1);
}
function ar(t) {
  return t ? "true" : "false";
}
function ur(t) {
  return Object.keys(t);
}
function fr() {
  let t, e;
  return { promise: new Promise((r, s) => {
    t = r, e = s;
  }), resolve: t, reject: e };
}
function nn(t) {
  return new Promise((e) => setTimeout(e, t));
}
function hr(t) {
  let e = -1, n;
  function r(...s) {
    n = s, !(e >= 0) && (e = window.requestAnimationFrame(() => {
      t.apply(this, n), e = -1, n = void 0;
    }));
  }
  return r;
}
const rn = typeof window < "u" ? "requestIdleCallback" in window ? window.requestIdleCallback : (t) => window.setTimeout(t, 1) : de;
function dr(t, e) {
  return new Promise((n) => {
    rn((r) => {
      t?.(r), n();
    }, e);
  });
}
var f = {
  fullscreenEnabled: 0,
  fullscreenElement: 1,
  requestFullscreen: 2,
  exitFullscreen: 3,
  fullscreenchange: 4,
  fullscreenerror: 5,
  fullscreen: 6
}, Qt = [
  "webkitFullscreenEnabled",
  "webkitFullscreenElement",
  "webkitRequestFullscreen",
  "webkitExitFullscreen",
  "webkitfullscreenchange",
  "webkitfullscreenerror",
  "-webkit-full-screen"
], te = [
  "mozFullScreenEnabled",
  "mozFullScreenElement",
  "mozRequestFullScreen",
  "mozCancelFullScreen",
  "mozfullscreenchange",
  "mozfullscreenerror",
  "-moz-full-screen"
], ee = [
  "msFullscreenEnabled",
  "msFullscreenElement",
  "msRequestFullscreen",
  "msExitFullscreen",
  "MSFullscreenChange",
  "MSFullscreenError",
  "-ms-fullscreen"
], u = typeof window < "u" && typeof window.document < "u" ? window.document : {}, p = "fullscreenEnabled" in u && Object.keys(f) || Qt[0] in u && Qt || te[0] in u && te || ee[0] in u && ee || [], pr = {
  requestFullscreen: function(t) {
    return t[p[f.requestFullscreen]]();
  },
  requestFullscreenFunction: function(t) {
    return t[p[f.requestFullscreen]];
  },
  get exitFullscreen() {
    return u[p[f.exitFullscreen]].bind(u);
  },
  get fullscreenPseudoClass() {
    return ":" + p[f.fullscreen];
  },
  addEventListener: function(t, e, n) {
    return u.addEventListener(p[f[t]], e, n);
  },
  removeEventListener: function(t, e, n) {
    return u.removeEventListener(p[f[t]], e, n);
  },
  get fullscreenEnabled() {
    return !!u[p[f.fullscreenEnabled]];
  },
  set fullscreenEnabled(t) {
  },
  get fullscreenElement() {
    return u[p[f.fullscreenElement]];
  },
  set fullscreenElement(t) {
  },
  get onfullscreenchange() {
    return u[("on" + p[f.fullscreenchange]).toLowerCase()];
  },
  set onfullscreenchange(t) {
    return u[("on" + p[f.fullscreenchange]).toLowerCase()] = t;
  },
  get onfullscreenerror() {
    return u[("on" + p[f.fullscreenerror]).toLowerCase()];
  },
  set onfullscreenerror(t) {
    return u[("on" + p[f.fullscreenerror]).toLowerCase()] = t;
  }
}, $r = sn;
function sn(t, e, n) {
  var r = null, s = null, i = n && n.leading, l = n && n.trailing;
  i == null && (i = !0), l == null && (l = !i), i == !0 && (l = !1);
  var o = function() {
    r && (clearTimeout(r), r = null);
  }, a = function() {
    var v = s;
    o(), v && v();
  }, y = function() {
    var v = i && !r, L = this, D = arguments;
    if (s = function() {
      return t.apply(L, D);
    }, r || (r = setTimeout(function() {
      if (r = null, l)
        return s();
    }, e)), v)
      return v = !1, s();
  };
  return y.cancel = o, y.flush = a, y;
}
var mr = on;
function on(t, e, n) {
  var r = null, s = null, i = function() {
    r && (clearTimeout(r), s = null, r = null);
  }, l = function() {
    var a = s;
    i(), a && a();
  }, o = function() {
    if (!e)
      return t.apply(this, arguments);
    var a = this, y = arguments, v = n && !r;
    if (i(), s = function() {
      t.apply(a, y);
    }, r = setTimeout(function() {
      if (r = null, !v) {
        var L = s;
        return s = null, L();
      }
    }, e), v)
      return s();
  };
  return o.cancel = i, o.flush = l, o;
}
const ne = (t) => typeof t == "object" && t != null && t.nodeType === 1, re = (t, e) => (!e || t !== "hidden") && t !== "visible" && t !== "clip", ut = (t, e) => {
  if (t.clientHeight < t.scrollHeight || t.clientWidth < t.scrollWidth) {
    const n = getComputedStyle(t, null);
    return re(n.overflowY, e) || re(n.overflowX, e) || ((r) => {
      const s = ((i) => {
        if (!i.ownerDocument || !i.ownerDocument.defaultView) return null;
        try {
          return i.ownerDocument.defaultView.frameElement;
        } catch {
          return null;
        }
      })(r);
      return !!s && (s.clientHeight < r.scrollHeight || s.clientWidth < r.scrollWidth);
    })(t);
  }
  return !1;
}, ft = (t, e, n, r, s, i, l, o) => i < t && l > e || i > t && l < e ? 0 : i <= t && o <= n || l >= e && o >= n ? i - t - r : l > e && o < n || i < t && o > n ? l - e + s : 0, ln = (t) => {
  const e = t.parentElement;
  return e ?? (t.getRootNode().host || null);
}, gr = (t, e) => {
  var n, r, s, i;
  if (typeof document > "u") return [];
  const { scrollMode: l, block: o, inline: a, boundary: y, skipOverflowHiddenElements: v } = e, L = typeof y == "function" ? y : (P) => P !== y;
  if (!ne(t)) throw new TypeError("Invalid target");
  const D = document.scrollingElement || document.documentElement, Z = [];
  let d = t;
  for (; ne(d) && L(d); ) {
    if (d = ln(d), d === D) {
      Z.push(d);
      break;
    }
    d != null && d === document.body && ut(d) && !ut(document.documentElement) || d != null && ut(d, v) && Z.push(d);
  }
  const R = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, j = (i = (s = window.visualViewport) == null ? void 0 : s.height) != null ? i : innerHeight, { scrollX: V, scrollY: W } = window, { height: B, width: q, top: G, right: gt, bottom: bt, left: J } = t.getBoundingClientRect(), { top: Wt, right: Bt, bottom: qt, left: zt } = ((P) => {
    const c = window.getComputedStyle(P);
    return { top: parseFloat(c.scrollMarginTop) || 0, right: parseFloat(c.scrollMarginRight) || 0, bottom: parseFloat(c.scrollMarginBottom) || 0, left: parseFloat(c.scrollMarginLeft) || 0 };
  })(t);
  let m = o === "start" || o === "nearest" ? G - Wt : o === "end" ? bt + qt : G + B / 2 - Wt + qt, g = a === "center" ? J + q / 2 - zt + Bt : a === "end" ? gt + Bt : J - zt;
  const yt = [];
  for (let P = 0; P < Z.length; P++) {
    const c = Z[P], { height: Q, width: tt, top: et, right: vt, bottom: St, left: nt } = c.getBoundingClientRect();
    if (l === "if-needed" && G >= 0 && J >= 0 && bt <= j && gt <= R && (c === D && !ut(c) || G >= et && bt <= St && J >= nt && gt <= vt)) return yt;
    const rt = getComputedStyle(c), st = parseInt(rt.borderLeftWidth, 10), it = parseInt(rt.borderTopWidth, 10), ot = parseInt(rt.borderRightWidth, 10), lt = parseInt(rt.borderBottomWidth, 10);
    let C = 0, k = 0;
    const ct = "offsetWidth" in c ? c.offsetWidth - c.clientWidth - st - ot : 0, at = "offsetHeight" in c ? c.offsetHeight - c.clientHeight - it - lt : 0, wt = "offsetWidth" in c ? c.offsetWidth === 0 ? 0 : tt / c.offsetWidth : 0, Et = "offsetHeight" in c ? c.offsetHeight === 0 ? 0 : Q / c.offsetHeight : 0;
    if (D === c) C = o === "start" ? m : o === "end" ? m - j : o === "nearest" ? ft(W, W + j, j, it, lt, W + m, W + m + B, B) : m - j / 2, k = a === "start" ? g : a === "center" ? g - R / 2 : a === "end" ? g - R : ft(V, V + R, R, st, ot, V + g, V + g + q, q), C = Math.max(0, C + W), k = Math.max(0, k + V);
    else {
      C = o === "start" ? m - et - it : o === "end" ? m - St + lt + at : o === "nearest" ? ft(et, St, Q, it, lt + at, m, m + B, B) : m - (et + Q / 2) + at / 2, k = a === "start" ? g - nt - st : a === "center" ? g - (nt + tt / 2) + ct / 2 : a === "end" ? g - vt + ot + ct : ft(nt, vt, tt, st, ot + ct, g, g + q, q);
      const { scrollLeft: Ut, scrollTop: Kt } = c;
      C = Et === 0 ? 0 : Math.max(0, Math.min(Kt + C / Et, c.scrollHeight - Q / Et + at)), k = wt === 0 ? 0 : Math.max(0, Math.min(Ut + k / wt, c.scrollWidth - tt / wt + ct)), m += Kt - C, g += Ut - k;
    }
    yt.push({ el: c, top: C, left: k });
  }
  return yt;
}, Pt = (t) => t === null ? "" : t + "", cn = (t) => t === null ? null : t + "", an = (t) => t === null ? 0 : Number(t), un = (t) => t !== null, fn = () => null, hn = (t) => t === null ? [] : JSON.parse(t), dn = (t) => t === null ? {} : JSON.parse(t);
function pn(t) {
  if (t === null) return cn;
  switch (typeof t) {
    case "undefined":
      return Pt;
    case "string":
      return Pt;
    case "boolean":
      return un;
    case "number":
      return an;
    case "function":
      return fn;
    case "object":
      return pe(t) ? hn : dn;
    default:
      return Pt;
  }
}
const O = /* @__PURE__ */ Symbol(0), be = /* @__PURE__ */ Symbol(0), x = /* @__PURE__ */ Symbol(0), z = /* @__PURE__ */ Symbol(0);
var E;
(function(t) {
  t[t.Idle = 0] = "Idle";
  const n = 1;
  t[t.Pending = n] = "Pending";
  const r = 2;
  t[t.Ready = r] = "Ready";
})(E || (E = {}));
function br(t, e) {
  class n extends t {
    static attrs;
    static [O] = null;
    static get observedAttributes() {
      if (!this[O] && e.props) {
        const s = /* @__PURE__ */ new Map();
        for (const i of Object.keys(e.props)) {
          let l = this.attrs?.[i], o = N(l) ? l : l && l?.attr;
          o !== !1 && (o || (o = en(i)), s.set(o, {
            prop: i,
            converter: l && !N(l) && l?.converter || pn(e.props[i])
          }));
        }
        this[O] = s;
      }
      return this[O] ? Array.from(this[O].keys()) : [];
    }
    $;
    [x] = E.Idle;
    [z] = null;
    keepAlive = !1;
    forwardKeepAlive = !0;
    get scope() {
      return this.$.$$.scope;
    }
    get attachScope() {
      return this.$.$$.attachScope;
    }
    get connectScope() {
      return this.$.$$.connectScope;
    }
    get $props() {
      return this.$.$$.props;
    }
    get $state() {
      return this.$.$$.$state;
    }
    get state() {
      return this.$.state;
    }
    constructor(...s) {
      if (super(...s), this.$ = w(() => Je(e), null), this.$.$$.addHooks(this), e.props) {
        const i = this.$props, l = Object.getOwnPropertyDescriptors(this);
        for (const o of Object.keys(l))
          o in e.props && (i[o].set(this[o]), delete this[o]);
      }
    }
    attributeChangedCallback(s, i, l) {
      const o = this.constructor;
      if (!o[O]) {
        super.attributeChangedCallback?.(s, i, l);
        return;
      }
      const a = o[O].get(s);
      a && (this[a.prop] = a.converter(l));
    }
    connectedCallback() {
      const s = this.$?.$$;
      if (!s || s.destroyed) return;
      if (this[x] !== E.Ready) {
        mn.call(this);
        return;
      }
      if (!this.isConnected) return;
      this.hasAttribute("keep-alive") && (this.keepAlive = !0), s.connect(), pe(this[z]) && tn(this[z], this), this[z] = null;
      const i = super.connectedCallback;
      i && w(() => i.call(this), this.connectScope);
    }
    disconnectedCallback() {
      const s = this.$?.$$;
      if (!s || s.destroyed) return;
      s.disconnect();
      const i = super.disconnectedCallback;
      i && i.call(this), !this.keepAlive && !this.hasAttribute("keep-alive") && setTimeout(() => {
        requestAnimationFrame(() => {
          this.isConnected || s.destroy();
        });
      }, 0);
    }
    [be]() {
      const s = this.$.$$, i = this.constructor;
      if (s.destroyed) return;
      const l = i[O];
      if (l)
        for (const o of this.attributes) {
          let a = l.get(o.name);
          a && a.converter && s.props[a.prop].set(a.converter(this.getAttribute(o.name)));
        }
      s.setup(), s.attach(this), this[x] = E.Ready, this.connectedCallback();
    }
    // @ts-expect-error
    subscribe(s) {
      return this.$.subscribe(s);
    }
    destroy() {
      this.disconnectedCallback(), this.$.destroy();
    }
  }
  return $n(n, e), n;
}
function $n(t, e) {
  const n = t.prototype, r = e.prototype;
  if (e.props)
    for (const s of Object.keys(e.props))
      Object.defineProperty(n, s, {
        enumerable: !0,
        configurable: !0,
        get() {
          return this.$props[s]();
        },
        set(i) {
          this.$props[s].set(i);
        }
      });
  if (r[U])
    for (const s of r[U])
      Object.defineProperty(n, s, {
        enumerable: !0,
        configurable: !0,
        get() {
          return this.$[s];
        },
        set(i) {
          this.$[s] = i;
        }
      });
  if (r[K])
    for (const s of r[K])
      n[s] = function(...i) {
        return this.$[s](...i);
      };
}
function mn() {
  if (this[x] !== E.Idle) return;
  this[x] = E.Pending;
  const t = bn(this), e = t && window.customElements.get(t.localName), n = t && t[x] === E.Ready;
  if (t && (!e || !n)) {
    gn.call(this, t);
    return;
  }
  ye.call(this, t);
}
async function gn(t) {
  await window.customElements.whenDefined(t.localName), t[x] !== E.Ready && await new Promise((e) => (t[z] ??= []).push(e)), ye.call(this, t);
}
function ye(t) {
  if (this.isConnected) {
    if (t) {
      t.keepAlive && t.forwardKeepAlive && (this.keepAlive = !0, this.setAttribute("keep-alive", ""));
      const e = this.$.$$.scope;
      e && t.$.$$.attachScope.append(e);
    }
    this[be]();
  }
}
function bn(t) {
  let e = t.parentNode, n = t.localName.split("-", 1)[0] + "-";
  for (; e; ) {
    if (e.nodeType === 1 && e.localName.startsWith(n))
      return e;
    e = e.parentNode;
  }
  return null;
}
function yr(t, e = !1) {
  (e || !window.customElements.get(t.tagName)) && window.customElements.define(t.tagName, t);
}
var vr = '<path fill-rule="evenodd" clip-rule="evenodd" d="M6 7C5.63181 7 5.33333 7.29848 5.33333 7.66667V14.8667C5.33333 14.9403 5.39361 14.9999 5.46724 15.0009C10.8844 15.0719 15.2614 19.449 15.3325 24.8661C15.3334 24.9397 15.393 25 15.4667 25H26C26.3682 25 26.6667 24.7015 26.6667 24.3333V7.66667C26.6667 7.29848 26.3682 7 26 7H6ZM17.0119 22.2294C17.0263 22.29 17.0802 22.3333 17.1425 22.3333H23.3333C23.7015 22.3333 24 22.0349 24 21.6667V10.3333C24 9.96514 23.7015 9.66667 23.3333 9.66667H8.66667C8.29848 9.66667 8 9.96514 8 10.3333V13.1909C8 13.2531 8.04332 13.3071 8.10392 13.3214C12.5063 14.3618 15.9715 17.827 17.0119 22.2294Z" fill="currentColor"/> <path d="M13.2 25C13.2736 25 13.3334 24.9398 13.3322 24.8661C13.2615 20.5544 9.77889 17.0718 5.46718 17.0011C5.39356 16.9999 5.33333 17.0597 5.33333 17.1333V18.8667C5.33333 18.9403 5.39348 18.9999 5.4671 19.0015C8.67465 19.0716 11.2617 21.6587 11.3319 24.8662C11.3335 24.9399 11.393 25 11.4667 25H13.2Z" fill="currentColor"/> <path d="M5.33333 21.1333C5.33333 21.0597 5.39332 20.9998 5.46692 21.0022C7.57033 21.0712 9.26217 22.763 9.33114 24.8664C9.33356 24.94 9.27364 25 9.2 25H6C5.63181 25 5.33333 24.7015 5.33333 24.3333V21.1333Z" fill="currentColor"/>';
const yn = navigator?.userAgent.toLowerCase() || "", vn = /iphone|ipad|ipod|ios|crios|fxios/i.test(yn), Sr = /(iphone|ipod)/gi.test(navigator?.platform || ""), wr = !!window.chrome, Er = !!window.safari || vn;
function Cr() {
  return Sn() && A(screen.orientation.unlock);
}
function Sn() {
  return !T(window.screen.orientation) && !T(window.screen.orientation.lock);
}
function kr(t, e) {
  return t || (t = document.createElement("audio")), t.canPlayType(e).length > 0;
}
function Or(t, e) {
  return t || (t = document.createElement("video")), t.canPlayType(e).length > 0;
}
function wn(t) {
  return t || (t = document.createElement("video")), t.canPlayType("application/vnd.apple.mpegurl").length > 0;
}
function Tr(t) {
  return !!document.pictureInPictureEnabled && !t?.disablePictureInPicture;
}
function Ar(t) {
  return A(t?.webkitSupportsPresentationMode) && A(t?.webkitSetPresentationMode);
}
async function Pr() {
  const t = document.createElement("video");
  return t.volume = 0.5, await nn(0), t.volume === 0.5;
}
function En() {
  return window?.ManagedMediaSource ?? window?.MediaSource ?? window?.WebKitMediaSource;
}
function Cn() {
  return window?.SourceBuffer ?? window?.WebKitSourceBuffer;
}
function kn() {
  const t = En();
  if (T(t)) return !1;
  const e = t && A(t.isTypeSupported) && t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'), n = Cn(), r = T(n) || !T(n.prototype) && A(n.prototype.appendBuffer) && A(n.prototype.remove);
  return !!e && !!r;
}
function xr() {
  return kn();
}
const On = /\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx|flac)($|\?)/i, Tn = /* @__PURE__ */ new Set([
  "audio/mpeg",
  "audio/ogg",
  "audio/3gp",
  "audio/mp3",
  "audio/webm",
  "audio/flac",
  "audio/m4a",
  "audio/m4b",
  "audio/mp4a",
  "audio/mp4"
]), An = /\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i, Pn = /* @__PURE__ */ new Set([
  "video/mp4",
  "video/webm",
  "video/3gp",
  "video/ogg",
  "video/avi",
  "video/mpeg"
]), xn = /\.(m3u8)($|\?)/i, Nn = /\.(mpd)($|\?)/i, In = /* @__PURE__ */ new Set([
  // Apple sanctioned
  "application/vnd.apple.mpegurl",
  // Apple sanctioned for backwards compatibility
  "audio/mpegurl",
  // Very common
  "audio/x-mpegurl",
  // Very common
  "application/x-mpegurl",
  // Included for completeness
  "video/x-mpegurl",
  "video/mpegurl",
  "application/mpegurl"
]), _n = /* @__PURE__ */ new Set(["application/dash+xml"]);
function ve({ src: t, type: e }) {
  return N(t) ? On.test(t) || Tn.has(e) || t.startsWith("blob:") && e === "audio/object" : e === "audio/object";
}
function Se(t) {
  return N(t.src) ? An.test(t.src) || Pn.has(t.type) || t.src.startsWith("blob:") && t.type === "video/object" || we(t) && wn() : t.type === "video/object";
}
function we({ src: t, type: e }) {
  return N(t) && xn.test(t) || In.has(e);
}
function Nr({ src: t, type: e }) {
  return N(t) && Nn.test(t) || _n.has(e);
}
function Ir(t) {
  return N(t.src) && (ve(t) || Se(t) || we(t));
}
function _r(t) {
  return typeof window.MediaStream < "u" && t instanceof window.MediaStream;
}
const Mr = ({ src: t, type: e, stream: n }) => {
  const r = Ot(t), s = Ot(e), i = Ot(n), l = Tt(() => i.value ? "video/object" : s.value || r.value?.type), o = Tt(() => i.value ? i.value : (typeof r.value == "string" ? r.value : r.value?.src)?.replace("/download", "/stream"));
  return {
    normalizedSrcObject: Tt(() => Mn({
      src: o.value,
      type: l.value
    }))
  };
};
function Mn({
  src: t,
  type: e
}) {
  return ve({
    src: t,
    type: e
  }) || Se({
    src: t,
    type: e
  }) ? {
    src: t,
    type: e
  } : Fn({
    type: e
  }) ? {
    src: t,
    type: e
  } : e?.includes("audio") ? {
    src: t,
    type: "audio/mp3"
  } : e?.includes("video") ? {
    src: t,
    type: "video/mp4"
  } : {
    src: t,
    type: e
  };
}
function Fn({ type: t }) {
  return t?.includes("/object");
}
export {
  kr as $,
  cr as A,
  en as B,
  nr as C,
  Zt as D,
  zn as E,
  Ue as F,
  we as G,
  kn as H,
  Sr as I,
  de as J,
  Nr as K,
  Cr as L,
  pr as M,
  mr as N,
  Me as O,
  Pr as P,
  $r as Q,
  wr as R,
  ir as S,
  Dn as T,
  vn as U,
  Qe as V,
  Ir as W,
  dr as X,
  Se as Y,
  Or as Z,
  ve as _,
  Xe as a,
  xr as a0,
  me as a1,
  rr as a2,
  sr as a3,
  ar as a4,
  Qn as a5,
  or as a6,
  er as a7,
  Zn as a8,
  gr as a9,
  Wn as aa,
  Nt as ab,
  Kn as ac,
  Xn as ad,
  lr as ae,
  br as af,
  yr as ag,
  un as ah,
  qn as ai,
  vr as aj,
  _r as ak,
  Er as al,
  Vn as am,
  Ar as an,
  Tr as ao,
  wn as ap,
  ur as aq,
  T as b,
  tr as c,
  N as d,
  Re as e,
  fr as f,
  oe as g,
  Bn as h,
  pe as i,
  A as j,
  Gt as k,
  Be as l,
  _t as m,
  Un as n,
  $t as o,
  Gn as p,
  Jn as q,
  Yn as r,
  w as s,
  Jt as t,
  Mr as u,
  Vt as v,
  hr as w,
  Rn as x,
  jn as y,
  Ye as z
};
