@netless/window-manager 1.0.0-canary.65 → 1.0.0-canary.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1130,7 +1130,7 @@ class AppContext {
1130
1130
  const storage = new syncedStore.Storage({
1131
1131
  plugin$,
1132
1132
  isWritable$,
1133
- namespace,
1133
+ namespace: `${this.appId}:${namespace}`,
1134
1134
  defaultState
1135
1135
  });
1136
1136
  this.emitter.on("writableChange", (writable) => {
@@ -9049,30 +9049,30 @@ class G$1 {
9049
9049
  if (w2.thumbnail)
9050
9050
  return w2;
9051
9051
  try {
9052
- const f = new URL(w2.src);
9053
- return f.searchParams.set("x-oss-process", "image/resize,l_50"), { ...w2, thumbnail: f.toString() };
9054
- } catch (f) {
9055
- return console.error(f), w2;
9052
+ const f2 = new URL(w2.src);
9053
+ return f2.searchParams.set("x-oss-process", "image/resize,l_50"), { ...w2, thumbnail: f2.toString() };
9054
+ } catch (f2) {
9055
+ return console.error(f2), w2;
9056
9056
  }
9057
9057
  })
9058
9058
  );
9059
9059
  const o2 = valueEnhancer.derive(s, (d) => {
9060
9060
  const w2 = Array(d.length);
9061
- for (let f = 0; f < d.length; f++)
9062
- w2[f] = f > 0 ? w2[f - 1] + d[f - 1].height : 0;
9061
+ for (let f2 = 0; f2 < d.length; f2++)
9062
+ w2[f2] = f2 > 0 ? w2[f2 - 1] + d[f2 - 1].height : 0;
9063
9063
  return w2;
9064
9064
  }), l = valueEnhancer.derive(s, (d) => {
9065
9065
  let w2 = 1 / 0;
9066
- for (let f = d.length - 1; f >= 0; f--)
9067
- d[f].height <= w2 && (w2 = d[f].height);
9066
+ for (let f2 = d.length - 1; f2 >= 0; f2--)
9067
+ d[f2].height <= w2 && (w2 = d[f2].height);
9068
9068
  return w2;
9069
9069
  }), c = valueEnhancer.combine(
9070
9070
  [e, o2, s],
9071
- ([d, w2, f]) => {
9072
- if (w2.length !== f.length)
9071
+ ([d, w2, f2]) => {
9072
+ if (w2.length !== f2.length)
9073
9073
  return c.value;
9074
9074
  for (let v = 0; v < w2.length; v++)
9075
- if (w2[v] + f[v].height - d >= 1e-3)
9075
+ if (w2[v] + f2[v].height - d >= 1e-3)
9076
9076
  return v;
9077
9077
  return w2.length - 1;
9078
9078
  }
@@ -9081,7 +9081,7 @@ class G$1 {
9081
9081
  ([d, w2]) => d.width / w2.width || 1
9082
9082
  ), a = valueEnhancer.combine(
9083
9083
  [s, t, l, h2],
9084
- ([d, w2, f, v]) => S$1(Math.ceil(w2.height / v / f / 2), 1, d.length)
9084
+ ([d, w2, f2, v]) => S$1(Math.ceil(w2.height / v / f2 / 2), 1, d.length)
9085
9085
  );
9086
9086
  valueEnhancer.withReadonlyValueEnhancer(this, {
9087
9087
  pagesScrollTop: e,
@@ -9101,9 +9101,9 @@ class G$1 {
9101
9101
  this.sideEffect.setTimeout(g2, 1e3, "turn-off-hwa"), p.setValue(true);
9102
9102
  };
9103
9103
  this.sideEffect.addDisposer(
9104
- valueEnhancer.combine([c, a, s]).subscribe(([d, w2, f]) => {
9104
+ valueEnhancer.combine([c, a, s]).subscribe(([d, w2, f2]) => {
9105
9105
  u();
9106
- const v = Math.max(d - w2, 0), C = Math.min(d + w2, f.length - 1);
9106
+ const v = Math.max(d - w2, 0), C = Math.min(d + w2, f2.length - 1);
9107
9107
  for (let $ = 0; $ < this.$pages.children.length; $++) {
9108
9108
  const x = this.$pages.children[$], k2 = Number(x.dataset.index);
9109
9109
  k2 >= v && k2 <= C || (x.remove(), $--);
@@ -9625,10 +9625,10 @@ function ee$1(n, e, t, s, r) {
9625
9625
  const h2 = n.add(() => {
9626
9626
  const a = ({ width: p, height: g2 }) => {
9627
9627
  if (s.length > 0 && t.state !== "maximized") {
9628
- const { width: u, height: d } = s[0], f = d / u * p - g2;
9629
- f !== 0 && e.isWritable && e.emitter.emit("setBoxSize", {
9628
+ const { width: u, height: d } = s[0], f2 = d / u * p - g2;
9629
+ f2 !== 0 && e.isWritable && e.emitter.emit("setBoxSize", {
9630
9630
  width: t.intrinsicWidth,
9631
- height: t.intrinsicHeight + f / t.rootRect.height
9631
+ height: t.intrinsicHeight + f2 / t.rootRect.height
9632
9632
  });
9633
9633
  }
9634
9634
  n.remove(h2);
@@ -9685,7 +9685,7 @@ function Ge(e) {
9685
9685
  function di() {
9686
9686
  return Ge(" ");
9687
9687
  }
9688
- function m(e, i2, t) {
9688
+ function g(e, i2, t) {
9689
9689
  t == null ? e.removeAttribute(i2) : e.getAttribute(i2) !== t && e.setAttribute(i2, t);
9690
9690
  }
9691
9691
  function pi(e) {
@@ -9803,13 +9803,13 @@ function Lt(e, i2, t, r, s, n, a, l = [-1]) {
9803
9803
  };
9804
9804
  a && a(c.root);
9805
9805
  let u = false;
9806
- if (c.ctx = t ? t(e, i2.props || {}, (y, p, ...v) => {
9806
+ if (c.ctx = t ? t(e, i2.props || {}, (m, p, ...v) => {
9807
9807
  const b = v.length ? v[0] : p;
9808
- return c.ctx && s(c.ctx[y], c.ctx[y] = b) && (!c.skip_bound && c.bound[y] && c.bound[y](b), u && xi(e, y)), p;
9808
+ return c.ctx && s(c.ctx[m], c.ctx[m] = b) && (!c.skip_bound && c.bound[m] && c.bound[m](b), u && xi(e, m)), p;
9809
9809
  }) : [], c.update(), u = true, $e(c.before_update), c.fragment = r ? r(c.ctx) : false, i2.target) {
9810
9810
  if (i2.hydrate) {
9811
- const y = pi(i2.target);
9812
- c.fragment && c.fragment.l(y), y.forEach(G);
9811
+ const m = pi(i2.target);
9812
+ c.fragment && c.fragment.l(m), m.forEach(G);
9813
9813
  } else
9814
9814
  c.fragment && c.fragment.c();
9815
9815
  i2.intro && Pt(e.$$.fragment), Mt(e, i2.target, i2.anchor, i2.customElement), Et();
@@ -9993,13 +9993,13 @@ function Ni(e) {
9993
9993
  return Array.isArray(e) ? e[0] : e;
9994
9994
  }
9995
9995
  function Li(e) {
9996
- let i2, t, r, s, n, a, l, d, c, u, y, p, v, b, T2, N2, x, f, C, L2, $, D2, V2, re, F2, ce, Ve, de, qe, pe, De, ue, Re, he, Fe, se, Be, Ue;
9996
+ let i2, t, r, s, n, a, l, d, c, u, m, p, v, b, T2, N2, x, y, C, L2, $, D2, V2, re, F2, ce, Ve, de, qe, pe, De, ue, Re, he, Fe, se, Be, Ue;
9997
9997
  return {
9998
9998
  c() {
9999
- i2 = S("svg"), t = S("symbol"), r = S("path"), s = S("path"), n = S("symbol"), a = S("path"), l = S("symbol"), d = S("path"), c = S("symbol"), u = S("path"), y = S("symbol"), p = S("path"), v = S("symbol"), b = S("path"), T2 = S("symbol"), N2 = S("path"), x = S("symbol"), f = S("path"), C = S("symbol"), L2 = S("path"), $ = S("symbol"), D2 = S("path"), V2 = S("symbol"), re = S("path"), F2 = S("symbol"), ce = S("path"), Ve = S("path"), de = S("symbol"), qe = S("path"), pe = S("symbol"), De = S("path"), ue = S("symbol"), Re = S("path"), he = S("symbol"), Fe = S("path"), se = S("symbol"), Be = S("path"), Ue = S("path"), m(r, "d", "M16 1H2a1 1 0 00-1 1v10a1 1 0 001 1h3v-2H3V3h12v8h-2v2h3a1 1 0 001-1V2a1 1 0 00-1-1z"), m(s, "d", "M4 17h10l-5-6z"), m(t, "id", "plyr-airplay"), m(t, "viewBox", "0 0 18 18"), m(a, "d", "M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z"), m(a, "fill-rule", "evenodd"), m(a, "fill-opacity", ".5"), m(n, "id", "plyr-captions-off"), m(n, "viewBox", "0 0 18 18"), m(d, "d", "M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z"), m(d, "fill-rule", "evenodd"), m(l, "id", "plyr-captions-on"), m(l, "viewBox", "0 0 18 18"), m(u, "d", "M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z"), m(c, "id", "plyr-download"), m(c, "viewBox", "0 0 18 18"), m(p, "d", "M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"), m(y, "id", "plyr-enter-fullscreen"), m(y, "viewBox", "0 0 18 18"), m(b, "d", "M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"), m(v, "id", "plyr-exit-fullscreen"), m(v, "viewBox", "0 0 18 18"), m(N2, "d", "M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"), m(T2, "id", "plyr-fast-forward"), m(T2, "viewBox", "0 0 18 18"), m(f, "d", "M17 5.3c-.1 1.6-1.2 3.7-3.3 6.4-2.2 2.8-4 4.2-5.5 4.2-.9 0-1.7-.9-2.4-2.6C5 10.9 4.4 6 3 6c-.1 0-.5.3-1.2.8l-.8-1c.8-.7 3.5-3.4 4.7-3.5 1.2-.1 2 .7 2.3 2.5.3 2 .8 6.1 1.8 6.1.9 0 2.5-3.4 2.6-4 .1-.9-.3-1.9-2.3-1.1.8-2.6 2.3-3.8 4.5-3.8 1.7.1 2.5 1.2 2.4 3.3z"), m(x, "id", "plyr-logo-vimeo"), m(x, "viewBox", "0 0 18 18"), m(L2, "d", "M16.8 5.8c-.2-1.3-.8-2.2-2.2-2.4C12.4 3 9 3 9 3s-3.4 0-5.6.4C2 3.6 1.3 4.5 1.2 5.8 1 7.1 1 9 1 9s0 1.9.2 3.2c.2 1.3.8 2.2 2.2 2.4C5.6 15 9 15 9 15s3.4 0 5.6-.4c1.4-.3 2-1.1 2.2-2.4.2-1.3.2-3.2.2-3.2s0-1.9-.2-3.2zM7 12V6l5 3-5 3z"), m(C, "id", "plyr-logo-youtube"), m(C, "viewBox", "0 0 18 18"), m(D2, "d", "M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"), m($, "id", "plyr-muted"), m($, "viewBox", "0 0 18 18"), m(re, "d", "M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zm6 0c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"), m(V2, "id", "plyr-pause"), m(V2, "viewBox", "0 0 18 18"), m(ce, "d", "M13.293 3.293L7.022 9.564l1.414 1.414 6.271-6.271L17 7V1h-6z"), m(Ve, "d", "M13 15H3V5h5V3H2a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0 001-1v-6h-2v5z"), m(F2, "id", "plyr-pip"), m(F2, "viewBox", "0 0 18 18"), m(qe, "d", "M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"), m(de, "id", "plyr-play"), m(de, "viewBox", "0 0 18 18"), m(De, "d", "M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"), m(pe, "id", "plyr-restart"), m(pe, "viewBox", "0 0 18 18"), m(Re, "d", "M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"), m(ue, "id", "plyr-rewind"), m(ue, "viewBox", "0 0 18 18"), m(Fe, "d", "M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"), m(he, "id", "plyr-settings"), m(he, "viewBox", "0 0 18 18"), m(Be, "d", "M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"), m(Ue, "d", "M11.282 5.282a.909.909 0 000 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 000 1.316c.145.145.636.262 1.018.156a.725.725 0 00.298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 00-1.316 0zm-7.496.726H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"), m(se, "id", "plyr-volume"), m(se, "viewBox", "0 0 18 18"), m(i2, "xmlns", "http://www.w3.org/2000/svg"), m(i2, "xmlns:xlink", "http://www.w3.org/1999/xlink");
9999
+ i2 = S("svg"), t = S("symbol"), r = S("path"), s = S("path"), n = S("symbol"), a = S("path"), l = S("symbol"), d = S("path"), c = S("symbol"), u = S("path"), m = S("symbol"), p = S("path"), v = S("symbol"), b = S("path"), T2 = S("symbol"), N2 = S("path"), x = S("symbol"), y = S("path"), C = S("symbol"), L2 = S("path"), $ = S("symbol"), D2 = S("path"), V2 = S("symbol"), re = S("path"), F2 = S("symbol"), ce = S("path"), Ve = S("path"), de = S("symbol"), qe = S("path"), pe = S("symbol"), De = S("path"), ue = S("symbol"), Re = S("path"), he = S("symbol"), Fe = S("path"), se = S("symbol"), Be = S("path"), Ue = S("path"), g(r, "d", "M16 1H2a1 1 0 00-1 1v10a1 1 0 001 1h3v-2H3V3h12v8h-2v2h3a1 1 0 001-1V2a1 1 0 00-1-1z"), g(s, "d", "M4 17h10l-5-6z"), g(t, "id", "plyr-airplay"), g(t, "viewBox", "0 0 18 18"), g(a, "d", "M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z"), g(a, "fill-rule", "evenodd"), g(a, "fill-opacity", ".5"), g(n, "id", "plyr-captions-off"), g(n, "viewBox", "0 0 18 18"), g(d, "d", "M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z"), g(d, "fill-rule", "evenodd"), g(l, "id", "plyr-captions-on"), g(l, "viewBox", "0 0 18 18"), g(u, "d", "M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z"), g(c, "id", "plyr-download"), g(c, "viewBox", "0 0 18 18"), g(p, "d", "M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"), g(m, "id", "plyr-enter-fullscreen"), g(m, "viewBox", "0 0 18 18"), g(b, "d", "M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"), g(v, "id", "plyr-exit-fullscreen"), g(v, "viewBox", "0 0 18 18"), g(N2, "d", "M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"), g(T2, "id", "plyr-fast-forward"), g(T2, "viewBox", "0 0 18 18"), g(y, "d", "M17 5.3c-.1 1.6-1.2 3.7-3.3 6.4-2.2 2.8-4 4.2-5.5 4.2-.9 0-1.7-.9-2.4-2.6C5 10.9 4.4 6 3 6c-.1 0-.5.3-1.2.8l-.8-1c.8-.7 3.5-3.4 4.7-3.5 1.2-.1 2 .7 2.3 2.5.3 2 .8 6.1 1.8 6.1.9 0 2.5-3.4 2.6-4 .1-.9-.3-1.9-2.3-1.1.8-2.6 2.3-3.8 4.5-3.8 1.7.1 2.5 1.2 2.4 3.3z"), g(x, "id", "plyr-logo-vimeo"), g(x, "viewBox", "0 0 18 18"), g(L2, "d", "M16.8 5.8c-.2-1.3-.8-2.2-2.2-2.4C12.4 3 9 3 9 3s-3.4 0-5.6.4C2 3.6 1.3 4.5 1.2 5.8 1 7.1 1 9 1 9s0 1.9.2 3.2c.2 1.3.8 2.2 2.2 2.4C5.6 15 9 15 9 15s3.4 0 5.6-.4c1.4-.3 2-1.1 2.2-2.4.2-1.3.2-3.2.2-3.2s0-1.9-.2-3.2zM7 12V6l5 3-5 3z"), g(C, "id", "plyr-logo-youtube"), g(C, "viewBox", "0 0 18 18"), g(D2, "d", "M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"), g($, "id", "plyr-muted"), g($, "viewBox", "0 0 18 18"), g(re, "d", "M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zm6 0c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"), g(V2, "id", "plyr-pause"), g(V2, "viewBox", "0 0 18 18"), g(ce, "d", "M13.293 3.293L7.022 9.564l1.414 1.414 6.271-6.271L17 7V1h-6z"), g(Ve, "d", "M13 15H3V5h5V3H2a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0 001-1v-6h-2v5z"), g(F2, "id", "plyr-pip"), g(F2, "viewBox", "0 0 18 18"), g(qe, "d", "M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"), g(de, "id", "plyr-play"), g(de, "viewBox", "0 0 18 18"), g(De, "d", "M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"), g(pe, "id", "plyr-restart"), g(pe, "viewBox", "0 0 18 18"), g(Re, "d", "M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"), g(ue, "id", "plyr-rewind"), g(ue, "viewBox", "0 0 18 18"), g(Fe, "d", "M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"), g(he, "id", "plyr-settings"), g(he, "viewBox", "0 0 18 18"), g(Be, "d", "M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"), g(Ue, "d", "M11.282 5.282a.909.909 0 000 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 000 1.316c.145.145.636.262 1.018.156a.725.725 0 00.298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 00-1.316 0zm-7.496.726H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"), g(se, "id", "plyr-volume"), g(se, "viewBox", "0 0 18 18"), g(i2, "xmlns", "http://www.w3.org/2000/svg"), g(i2, "xmlns:xlink", "http://www.w3.org/1999/xlink");
10000
10000
  },
10001
10001
  m(We, ni) {
10002
- te(We, i2, ni), k(i2, t), k(t, r), k(t, s), k(i2, n), k(n, a), k(i2, l), k(l, d), k(i2, c), k(c, u), k(i2, y), k(y, p), k(i2, v), k(v, b), k(i2, T2), k(T2, N2), k(i2, x), k(x, f), k(i2, C), k(C, L2), k(i2, $), k($, D2), k(i2, V2), k(V2, re), k(i2, F2), k(F2, ce), k(F2, Ve), k(i2, de), k(de, qe), k(i2, pe), k(pe, De), k(i2, ue), k(ue, Re), k(i2, he), k(he, Fe), k(i2, se), k(se, Be), k(se, Ue);
10002
+ te(We, i2, ni), k(i2, t), k(t, r), k(t, s), k(i2, n), k(n, a), k(i2, l), k(l, d), k(i2, c), k(c, u), k(i2, m), k(m, p), k(i2, v), k(v, b), k(i2, T2), k(T2, N2), k(i2, x), k(x, y), k(i2, C), k(C, L2), k(i2, $), k($, D2), k(i2, V2), k(V2, re), k(i2, F2), k(F2, ce), k(F2, Ve), k(i2, de), k(de, qe), k(i2, pe), k(pe, De), k(i2, ue), k(ue, Re), k(i2, he), k(he, Fe), k(i2, se), k(se, Be), k(se, Ue);
10003
10003
  },
10004
10004
  p: X,
10005
10005
  i: X,
@@ -10014,7 +10014,7 @@ class Ii extends It {
10014
10014
  super(), Lt(this, i2, null, Li, Ct, {});
10015
10015
  }
10016
10016
  }
10017
- function g(e, i2, t) {
10017
+ function f(e, i2, t) {
10018
10018
  return i2 in e ? Object.defineProperty(e, i2, { value: t, enumerable: true, configurable: true, writable: true }) : e[i2] = t, e;
10019
10019
  }
10020
10020
  function zi(e, i2) {
@@ -10475,7 +10475,7 @@ const xt = { pip: "PIP", airplay: "AirPlay", html5: "HTML5", vimeo: "Vimeo", you
10475
10475
  } };
10476
10476
  class we {
10477
10477
  constructor(i2) {
10478
- g(this, "get", (t) => {
10478
+ f(this, "get", (t) => {
10479
10479
  if (!we.supported || !this.enabled)
10480
10480
  return null;
10481
10481
  const r = window.localStorage.getItem(this.key);
@@ -10483,7 +10483,7 @@ class we {
10483
10483
  return null;
10484
10484
  const s = JSON.parse(r);
10485
10485
  return o.string(t) && t.length ? s[t] : s;
10486
- }), g(this, "set", (t) => {
10486
+ }), f(this, "set", (t) => {
10487
10487
  if (!we.supported || !this.enabled || !o.object(t))
10488
10488
  return;
10489
10489
  let r = this.get();
@@ -10863,8 +10863,8 @@ const h = { getIconUrl() {
10863
10863
  const c = _("div", B(this.config.selectors.controls.wrapper));
10864
10864
  this.elements.controls = c;
10865
10865
  const u = { class: "plyr__controls__item" };
10866
- return rt(o.array(this.config.controls) ? this.config.controls : []).forEach((y) => {
10867
- if (y === "restart" && c.appendChild(t.call(this, "restart", u)), y === "rewind" && c.appendChild(t.call(this, "rewind", u)), y === "play" && c.appendChild(t.call(this, "play", u)), y === "fast-forward" && c.appendChild(t.call(this, "fast-forward", u)), y === "progress") {
10866
+ return rt(o.array(this.config.controls) ? this.config.controls : []).forEach((m) => {
10867
+ if (m === "restart" && c.appendChild(t.call(this, "restart", u)), m === "rewind" && c.appendChild(t.call(this, "rewind", u)), m === "play" && c.appendChild(t.call(this, "play", u)), m === "fast-forward" && c.appendChild(t.call(this, "fast-forward", u)), m === "progress") {
10868
10868
  const p = _("div", { class: `${u.class} plyr__progress__container` }), v = _("div", B(this.config.selectors.progress));
10869
10869
  if (v.appendChild(s.call(this, "seek", { id: `plyr-seek-${e.id}` })), v.appendChild(r.call(this, "buffer")), this.config.tooltips.seek) {
10870
10870
  const b = _("span", { class: this.config.classNames.tooltip }, "00:00");
@@ -10872,39 +10872,39 @@ const h = { getIconUrl() {
10872
10872
  }
10873
10873
  this.elements.progress = v, p.appendChild(this.elements.progress), c.appendChild(p);
10874
10874
  }
10875
- if (y === "current-time" && c.appendChild(n.call(this, "currentTime", u)), y === "duration" && c.appendChild(n.call(this, "duration", u)), y === "mute" || y === "volume") {
10875
+ if (m === "current-time" && c.appendChild(n.call(this, "currentTime", u)), m === "duration" && c.appendChild(n.call(this, "duration", u)), m === "mute" || m === "volume") {
10876
10876
  let { volume: p } = this.elements;
10877
- if (o.element(p) && c.contains(p) || (p = _("div", z({}, u, { class: `${u.class} plyr__volume`.trim() })), this.elements.volume = p, c.appendChild(p)), y === "mute" && p.appendChild(t.call(this, "mute")), y === "volume" && !H.isIos) {
10877
+ if (o.element(p) && c.contains(p) || (p = _("div", z({}, u, { class: `${u.class} plyr__volume`.trim() })), this.elements.volume = p, c.appendChild(p)), m === "mute" && p.appendChild(t.call(this, "mute")), m === "volume" && !H.isIos) {
10878
10878
  const v = { max: 1, step: 0.05, value: this.config.volume };
10879
10879
  p.appendChild(s.call(this, "volume", z(v, { id: `plyr-volume-${e.id}` })));
10880
10880
  }
10881
10881
  }
10882
- if (y === "captions" && c.appendChild(t.call(this, "captions", u)), y === "settings" && !o.empty(this.config.settings)) {
10882
+ if (m === "captions" && c.appendChild(t.call(this, "captions", u)), m === "settings" && !o.empty(this.config.settings)) {
10883
10883
  const p = _("div", z({}, u, { class: `${u.class} plyr__menu`.trim(), hidden: "" }));
10884
10884
  p.appendChild(t.call(this, "settings", { "aria-haspopup": true, "aria-controls": `plyr-settings-${e.id}`, "aria-expanded": false }));
10885
10885
  const v = _("div", { class: "plyr__menu__container", id: `plyr-settings-${e.id}`, hidden: "" }), b = _("div"), T2 = _("div", { id: `plyr-settings-${e.id}-home` }), N2 = _("div", { role: "menu" });
10886
10886
  T2.appendChild(N2), b.appendChild(T2), this.elements.settings.panels.home = T2, this.config.settings.forEach((x) => {
10887
- const f = _("button", z(B(this.config.selectors.buttons.settings), { type: "button", class: `${this.config.classNames.control} ${this.config.classNames.control}--forward`, role: "menuitem", "aria-haspopup": true, hidden: "" }));
10888
- i2.call(this, f, x), E.call(this, f, "click", () => {
10887
+ const y = _("button", z(B(this.config.selectors.buttons.settings), { type: "button", class: `${this.config.classNames.control} ${this.config.classNames.control}--forward`, role: "menuitem", "aria-haspopup": true, hidden: "" }));
10888
+ i2.call(this, y, x), E.call(this, y, "click", () => {
10889
10889
  d.call(this, x, false);
10890
10890
  });
10891
10891
  const C = _("span", null, j.get(x, this.config)), L2 = _("span", { class: this.config.classNames.menu.value });
10892
- L2.innerHTML = e[x], C.appendChild(L2), f.appendChild(C), N2.appendChild(f);
10892
+ L2.innerHTML = e[x], C.appendChild(L2), y.appendChild(C), N2.appendChild(y);
10893
10893
  const $ = _("div", { id: `plyr-settings-${e.id}-${x}`, hidden: "" }), D2 = _("button", { type: "button", class: `${this.config.classNames.control} ${this.config.classNames.control}--back` });
10894
10894
  D2.appendChild(_("span", { "aria-hidden": true }, j.get(x, this.config))), D2.appendChild(_("span", { class: this.config.classNames.hidden }, j.get("menuBack", this.config))), E.call(this, $, "keydown", (V2) => {
10895
10895
  V2.key === "ArrowLeft" && (V2.preventDefault(), V2.stopPropagation(), d.call(this, "home", true));
10896
10896
  }, false), E.call(this, D2, "click", () => {
10897
10897
  d.call(this, "home", false);
10898
- }), $.appendChild(D2), $.appendChild(_("div", { role: "menu" })), b.appendChild($), this.elements.settings.buttons[x] = f, this.elements.settings.panels[x] = $;
10898
+ }), $.appendChild(D2), $.appendChild(_("div", { role: "menu" })), b.appendChild($), this.elements.settings.buttons[x] = y, this.elements.settings.panels[x] = $;
10899
10899
  }), v.appendChild(b), p.appendChild(v), c.appendChild(p), this.elements.settings.popup = v, this.elements.settings.menu = p;
10900
10900
  }
10901
- if (y === "pip" && I.pip && c.appendChild(t.call(this, "pip", u)), y === "airplay" && I.airplay && c.appendChild(t.call(this, "airplay", u)), y === "download") {
10901
+ if (m === "pip" && I.pip && c.appendChild(t.call(this, "pip", u)), m === "airplay" && I.airplay && c.appendChild(t.call(this, "airplay", u)), m === "download") {
10902
10902
  const p = z({}, u, { element: "a", href: this.download, target: "_blank" });
10903
10903
  this.isHTML5 && (p.download = "");
10904
10904
  const { download: v } = this.config.urls;
10905
10905
  !o.url(v) && this.isEmbed && z(p, { icon: `logo-${this.provider}`, label: this.provider }), c.appendChild(t.call(this, "download", p));
10906
10906
  }
10907
- y === "fullscreen" && c.appendChild(t.call(this, "fullscreen", u));
10907
+ m === "fullscreen" && c.appendChild(t.call(this, "fullscreen", u));
10908
10908
  }), this.isHTML5 && a.call(this, Q.getQualityOptions.call(this)), l.call(this), c;
10909
10909
  }, inject() {
10910
10910
  if (this.config.loadSprite) {
@@ -11104,14 +11104,14 @@ class _r {
11104
11104
  }
11105
11105
  class U {
11106
11106
  constructor(i2) {
11107
- g(this, "onChange", () => {
11107
+ f(this, "onChange", () => {
11108
11108
  if (!this.enabled)
11109
11109
  return;
11110
11110
  const t = this.player.elements.buttons.fullscreen;
11111
11111
  o.element(t) && (t.pressed = this.active);
11112
11112
  const r = this.target === this.player.media ? this.target : this.player.elements.container;
11113
11113
  w.call(this.player, r, this.active ? "enterfullscreen" : "exitfullscreen", true);
11114
- }), g(this, "toggleFallback", (t = false) => {
11114
+ }), f(this, "toggleFallback", (t = false) => {
11115
11115
  if (t ? this.scrollPosition = { x: window.scrollX || 0, y: window.scrollY || 0 } : window.scrollTo(this.scrollPosition.x, this.scrollPosition.y), document.body.style.overflow = t ? "hidden" : "", A(this.target, this.player.config.classNames.fullscreen.fallback, t), H.isIos) {
11116
11116
  let r = document.head.querySelector('meta[name="viewport"]');
11117
11117
  const s = "viewport-fit=cover";
@@ -11120,21 +11120,21 @@ class U {
11120
11120
  t ? (this.cleanupViewport = !n, n || (r.content += `,${s}`)) : this.cleanupViewport && (r.content = r.content.split(",").filter((a) => a.trim() !== s).join(","));
11121
11121
  }
11122
11122
  this.onChange();
11123
- }), g(this, "trapFocus", (t) => {
11123
+ }), f(this, "trapFocus", (t) => {
11124
11124
  if (H.isIos || !this.active || t.key !== "Tab")
11125
11125
  return;
11126
11126
  const r = document.activeElement, s = ne.call(this.player, "a[href], button:not(:disabled), input:not(:disabled), [tabindex]"), [n] = s, a = s[s.length - 1];
11127
11127
  r !== a || t.shiftKey ? r === n && t.shiftKey && (a.focus(), t.preventDefault()) : (n.focus(), t.preventDefault());
11128
- }), g(this, "update", () => {
11128
+ }), f(this, "update", () => {
11129
11129
  if (this.enabled) {
11130
11130
  let t;
11131
11131
  t = this.forceFallback ? "Fallback (forced)" : U.native ? "Native" : "Fallback", this.player.debug.log(`${t} fullscreen enabled`);
11132
11132
  } else
11133
11133
  this.player.debug.log("Fullscreen not supported and fallback disabled");
11134
11134
  A(this.player.elements.container, this.player.config.classNames.fullscreen.enabled, this.enabled);
11135
- }), g(this, "enter", () => {
11135
+ }), f(this, "enter", () => {
11136
11136
  this.enabled && (H.isIos && this.player.config.fullscreen.iosNative ? this.player.isVimeo ? this.player.embed.requestFullscreen() : this.target.webkitEnterFullscreen() : !U.native || this.forceFallback ? this.toggleFallback(true) : this.prefix ? o.empty(this.prefix) || this.target[`${this.prefix}Request${this.property}`]() : this.target.requestFullscreen({ navigationUI: "hide" }));
11137
- }), g(this, "exit", () => {
11137
+ }), f(this, "exit", () => {
11138
11138
  if (this.enabled)
11139
11139
  if (H.isIos && this.player.config.fullscreen.iosNative)
11140
11140
  this.target.webkitExitFullscreen(), W(this.player.play());
@@ -11147,7 +11147,7 @@ class U {
11147
11147
  }
11148
11148
  } else
11149
11149
  (document.cancelFullScreen || document.exitFullscreen).call(document);
11150
- }), g(this, "toggle", () => {
11150
+ }), f(this, "toggle", () => {
11151
11151
  this.active ? this.exit() : this.enter();
11152
11152
  }), this.player = i2, this.prefix = U.prefix, this.property = U.property, this.scrollPosition = { x: 0, y: 0 }, this.forceFallback = i2.config.fullscreen.fallback === "force", this.player.elements.fullscreen = i2.config.fullscreen.container && or(this.player.elements.container, i2.config.fullscreen.container), E.call(this.player, document, this.prefix === "ms" ? "MSFullscreenChange" : `${this.prefix}fullscreenchange`, () => {
11153
11153
  this.onChange();
@@ -11245,10 +11245,10 @@ const M = { addStyleHook() {
11245
11245
  } };
11246
11246
  class wr {
11247
11247
  constructor(i2) {
11248
- g(this, "firstTouch", () => {
11248
+ f(this, "firstTouch", () => {
11249
11249
  const { player: t } = this, { elements: r } = t;
11250
11250
  t.touch = true, A(r.container, t.config.classNames.isTouch, true);
11251
- }), g(this, "setTabFocus", (t) => {
11251
+ }), f(this, "setTabFocus", (t) => {
11252
11252
  const { player: r } = this, { elements: s } = r, { key: n, type: a, timeStamp: l } = t;
11253
11253
  if (clearTimeout(this.focusTimer), a === "keydown" && n !== "Tab")
11254
11254
  return;
@@ -11261,10 +11261,10 @@ class wr {
11261
11261
  const c = document.activeElement;
11262
11262
  s.container.contains(c) && A(document.activeElement, r.config.classNames.tabFocus, true);
11263
11263
  }, 10)));
11264
- }), g(this, "global", (t = true) => {
11264
+ }), f(this, "global", (t = true) => {
11265
11265
  const { player: r } = this;
11266
11266
  r.config.keyboard.global && ae.call(r, window, "keydown keyup", this.handleKey, t, false), ae.call(r, document.body, "click", this.toggleMenu, t), dt.call(r, document.body, "touchstart", this.firstTouch), ae.call(r, document.body, "keydown focus blur focusout", this.setTabFocus, t, false, true);
11267
- }), g(this, "container", () => {
11267
+ }), f(this, "container", () => {
11268
11268
  const { player: t } = this, { config: r, elements: s, timers: n } = t;
11269
11269
  !r.keyboard.global && r.keyboard.focused && E.call(t, s.container, "keydown keyup", this.handleKey, false), E.call(t, s.container, "mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen", (d) => {
11270
11270
  const { controls: c } = s;
@@ -11275,11 +11275,11 @@ class wr {
11275
11275
  const a = () => {
11276
11276
  if (!t.isVimeo || t.config.vimeo.premium)
11277
11277
  return;
11278
- const d = s.wrapper, { active: c } = t.fullscreen, [u, y] = pt.call(t), p = Kt(`aspect-ratio: ${u} / ${y}`);
11278
+ const d = s.wrapper, { active: c } = t.fullscreen, [u, m] = pt.call(t), p = Kt(`aspect-ratio: ${u} / ${m}`);
11279
11279
  if (!c)
11280
11280
  return void (p ? (d.style.width = null, d.style.height = null) : (d.style.maxWidth = null, d.style.margin = null));
11281
- const [v, b] = pr(), T2 = v / b > u / y;
11282
- p ? (d.style.width = T2 ? "auto" : "100%", d.style.height = T2 ? "100%" : "auto") : (d.style.maxWidth = T2 ? b / y * u + "px" : null, d.style.margin = T2 ? "0 auto" : null);
11281
+ const [v, b] = pr(), T2 = v / b > u / m;
11282
+ p ? (d.style.width = T2 ? "auto" : "100%", d.style.height = T2 ? "100%" : "auto") : (d.style.maxWidth = T2 ? b / m * u + "px" : null, d.style.margin = T2 ? "0 auto" : null);
11283
11283
  }, l = () => {
11284
11284
  clearTimeout(n.resized), n.resized = setTimeout(a, 50);
11285
11285
  };
@@ -11287,7 +11287,7 @@ class wr {
11287
11287
  const { target: c } = t.fullscreen;
11288
11288
  c === s.container && (!t.isEmbed && o.empty(t.config.ratio) || (a(), (d.type === "enterfullscreen" ? E : je).call(t, window, "resize", l)));
11289
11289
  });
11290
- }), g(this, "media", () => {
11290
+ }), f(this, "media", () => {
11291
11291
  const { player: t } = this, { elements: r } = t;
11292
11292
  if (E.call(t, t.media, "timeupdate seeking seeked", (n) => h.timeUpdate.call(t, n)), E.call(t, t.media, "durationchange loadeddata loadedmetadata", (n) => h.durationUpdate.call(t, n)), E.call(t, t.media, "ended", () => {
11293
11293
  t.isHTML5 && t.isVideo && t.config.resetOnEnd && (t.restart(), t.pause());
@@ -11319,14 +11319,14 @@ class wr {
11319
11319
  let { detail: a = {} } = n;
11320
11320
  n.type === "error" && (a = t.media.error), w.call(t, r.container, n.type, true, a);
11321
11321
  });
11322
- }), g(this, "proxy", (t, r, s) => {
11322
+ }), f(this, "proxy", (t, r, s) => {
11323
11323
  const { player: n } = this, a = n.config.listeners[s];
11324
11324
  let l = true;
11325
11325
  o.function(a) && (l = a.call(n, t)), l !== false && o.function(r) && r.call(n, t);
11326
- }), g(this, "bind", (t, r, s, n, a = true) => {
11326
+ }), f(this, "bind", (t, r, s, n, a = true) => {
11327
11327
  const { player: l } = this, d = l.config.listeners[n], c = o.function(d);
11328
11328
  E.call(l, t, r, (u) => this.proxy(u, s, n), a && !c);
11329
- }), g(this, "controls", () => {
11329
+ }), f(this, "controls", () => {
11330
11330
  const { player: t } = this, { elements: r } = t, s = H.isIE ? "change" : "input";
11331
11331
  if (r.buttons.play && Array.from(r.buttons.play).forEach((n) => {
11332
11332
  this.bind(n, "click", () => {
@@ -11402,7 +11402,7 @@ class wr {
11402
11402
  const l = this.touch ? 3e3 : 4e3;
11403
11403
  clearTimeout(a.controls), a.controls = setTimeout(() => M.toggleControls.call(t, false), l);
11404
11404
  }), this.bind(r.inputs.volume, "wheel", (n) => {
11405
- const a = n.webkitDirectionInvertedFromDevice, [l, d] = [n.deltaX, -n.deltaY].map((y) => a ? -y : y), c = Math.sign(Math.abs(l) > Math.abs(d) ? l : d);
11405
+ const a = n.webkitDirectionInvertedFromDevice, [l, d] = [n.deltaX, -n.deltaY].map((m) => a ? -m : m), c = Math.sign(Math.abs(l) > Math.abs(d) ? l : d);
11406
11406
  t.increaseVolume(c / 50);
11407
11407
  const { volume: u } = t.media;
11408
11408
  (c === 1 && u < 1 || c === -1 && u > 0) && n.preventDefault();
@@ -11410,7 +11410,7 @@ class wr {
11410
11410
  }), this.player = i2, this.lastKey = null, this.focusTimer = null, this.lastKeyDown = null, this.handleKey = this.handleKey.bind(this), this.toggleMenu = this.toggleMenu.bind(this), this.setTabFocus = this.setTabFocus.bind(this), this.firstTouch = this.firstTouch.bind(this);
11411
11411
  }
11412
11412
  handleKey(i2) {
11413
- const { player: t } = this, { elements: r } = t, { key: s, type: n, altKey: a, ctrlKey: l, metaKey: d, shiftKey: c } = i2, u = n === "keydown", y = u && s === this.lastKey;
11413
+ const { player: t } = this, { elements: r } = t, { key: s, type: n, altKey: a, ctrlKey: l, metaKey: d, shiftKey: c } = i2, u = n === "keydown", m = u && s === this.lastKey;
11414
11414
  if (!(a || l || d || c) && !!s) {
11415
11415
  if (u) {
11416
11416
  const v = document.activeElement;
@@ -11430,11 +11430,11 @@ class wr {
11430
11430
  case "7":
11431
11431
  case "8":
11432
11432
  case "9":
11433
- y || (p = parseInt(s, 10), t.currentTime = t.duration / 10 * p);
11433
+ m || (p = parseInt(s, 10), t.currentTime = t.duration / 10 * p);
11434
11434
  break;
11435
11435
  case "Space":
11436
11436
  case "k":
11437
- y || W(t.togglePlay());
11437
+ m || W(t.togglePlay());
11438
11438
  break;
11439
11439
  case "ArrowUp":
11440
11440
  t.increaseVolume(0.1);
@@ -11443,7 +11443,7 @@ class wr {
11443
11443
  t.decreaseVolume(0.1);
11444
11444
  break;
11445
11445
  case "m":
11446
- y || (t.muted = !t.muted);
11446
+ m || (t.muted = !t.muted);
11447
11447
  break;
11448
11448
  case "ArrowRight":
11449
11449
  t.forward();
@@ -11455,7 +11455,7 @@ class wr {
11455
11455
  t.fullscreen.toggle();
11456
11456
  break;
11457
11457
  case "c":
11458
- y || t.toggleCaptions();
11458
+ m || t.toggleCaptions();
11459
11459
  break;
11460
11460
  case "l":
11461
11461
  t.loop = !t.loop;
@@ -11479,11 +11479,11 @@ var kr = xr(function(e, i2) {
11479
11479
  }, r = {}, s = {}, n = {};
11480
11480
  function a(p, v) {
11481
11481
  p = p.push ? p : [p];
11482
- var b, T2, N2, x = [], f = p.length, C = f;
11482
+ var b, T2, N2, x = [], y = p.length, C = y;
11483
11483
  for (b = function(L2, $) {
11484
11484
  $.length && x.push(L2), --C || v(x);
11485
- }; f--; )
11486
- T2 = p[f], (N2 = s[T2]) ? b(T2, N2) : (n[T2] = n[T2] || []).push(b);
11485
+ }; y--; )
11486
+ T2 = p[y], (N2 = s[T2]) ? b(T2, N2) : (n[T2] = n[T2] || []).push(b);
11487
11487
  }
11488
11488
  function l(p, v) {
11489
11489
  if (p) {
@@ -11497,8 +11497,8 @@ var kr = xr(function(e, i2) {
11497
11497
  p.call && (p = { success: p }), v.length ? (p.error || t)(v) : (p.success || t)(p);
11498
11498
  }
11499
11499
  function c(p, v, b, T2) {
11500
- var N2, x, f = document, C = b.async, L2 = (b.numRetries || 0) + 1, $ = b.before || t, D2 = p.replace(/[\?|#].*$/, ""), V2 = p.replace(/^(css|img)!/, "");
11501
- T2 = T2 || 0, /(^css!|\.css$)/.test(D2) ? ((x = f.createElement("link")).rel = "stylesheet", x.href = V2, (N2 = "hideFocus" in x) && x.relList && (N2 = 0, x.rel = "preload", x.as = "style")) : /(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D2) ? (x = f.createElement("img")).src = V2 : ((x = f.createElement("script")).src = p, x.async = C === void 0 || C), x.onload = x.onerror = x.onbeforeload = function(re) {
11500
+ var N2, x, y = document, C = b.async, L2 = (b.numRetries || 0) + 1, $ = b.before || t, D2 = p.replace(/[\?|#].*$/, ""), V2 = p.replace(/^(css|img)!/, "");
11501
+ T2 = T2 || 0, /(^css!|\.css$)/.test(D2) ? ((x = y.createElement("link")).rel = "stylesheet", x.href = V2, (N2 = "hideFocus" in x) && x.relList && (N2 = 0, x.rel = "preload", x.as = "style")) : /(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D2) ? (x = y.createElement("img")).src = V2 : ((x = y.createElement("script")).src = p, x.async = C === void 0 || C), x.onload = x.onerror = x.onbeforeload = function(re) {
11502
11502
  var F2 = re.type[0];
11503
11503
  if (N2)
11504
11504
  try {
@@ -11512,10 +11512,10 @@ var kr = xr(function(e, i2) {
11512
11512
  } else if (x.rel == "preload" && x.as == "style")
11513
11513
  return x.rel = "stylesheet";
11514
11514
  v(p, F2, re.defaultPrevented);
11515
- }, $(p, x) !== false && f.head.appendChild(x);
11515
+ }, $(p, x) !== false && y.head.appendChild(x);
11516
11516
  }
11517
11517
  function u(p, v, b) {
11518
- var T2, N2, x = (p = p.push ? p : [p]).length, f = x, C = [];
11518
+ var T2, N2, x = (p = p.push ? p : [p]).length, y = x, C = [];
11519
11519
  for (T2 = function(L2, $, D2) {
11520
11520
  if ($ == "e" && C.push(L2), $ == "b") {
11521
11521
  if (!D2)
@@ -11523,36 +11523,36 @@ var kr = xr(function(e, i2) {
11523
11523
  C.push(L2);
11524
11524
  }
11525
11525
  --x || v(C);
11526
- }, N2 = 0; N2 < f; N2++)
11526
+ }, N2 = 0; N2 < y; N2++)
11527
11527
  c(p[N2], T2, b);
11528
11528
  }
11529
- function y(p, v, b) {
11529
+ function m(p, v, b) {
11530
11530
  var T2, N2;
11531
11531
  if (v && v.trim && (T2 = v), N2 = (T2 ? b : v) || {}, T2) {
11532
11532
  if (T2 in r)
11533
11533
  throw "LoadJS";
11534
11534
  r[T2] = true;
11535
11535
  }
11536
- function x(f, C) {
11536
+ function x(y, C) {
11537
11537
  u(p, function(L2) {
11538
- d(N2, L2), f && d({ success: f, error: C }, L2), l(T2, L2);
11538
+ d(N2, L2), y && d({ success: y, error: C }, L2), l(T2, L2);
11539
11539
  }, N2);
11540
11540
  }
11541
11541
  if (N2.returnPromise)
11542
11542
  return new Promise(x);
11543
11543
  x();
11544
11544
  }
11545
- return y.ready = function(p, v) {
11545
+ return m.ready = function(p, v) {
11546
11546
  return a(p, function(b) {
11547
11547
  d(v, b);
11548
- }), y;
11549
- }, y.done = function(p) {
11548
+ }), m;
11549
+ }, m.done = function(p) {
11550
11550
  l(p, []);
11551
- }, y.reset = function() {
11551
+ }, m.reset = function() {
11552
11552
  r = {}, s = {}, n = {};
11553
- }, y.isDefined = function(p) {
11553
+ }, m.isDefined = function(p) {
11554
11554
  return p in r;
11555
- }, y;
11555
+ }, m;
11556
11556
  }();
11557
11557
  });
11558
11558
  function ut(e) {
@@ -11583,75 +11583,75 @@ const nt = { setup() {
11583
11583
  o.empty(n) ? (n = e.media.getAttribute(e.config.attributes.embed.id), a = e.media.getAttribute(e.config.attributes.embed.hash)) : a = Cr(n);
11584
11584
  const l = a ? { h: a } : {};
11585
11585
  t && Object.assign(s, { controls: false, sidedock: false });
11586
- const d = ti({ loop: e.config.loop.active, autoplay: e.autoplay, muted: e.muted, gesture: "media", playsinline: !this.config.fullscreen.iosNative, ...l, ...s }), c = Tr(n), u = _("iframe"), y = st(e.config.urls.vimeo.iframe, c, d);
11587
- if (u.setAttribute("src", y), u.setAttribute("allowfullscreen", ""), u.setAttribute("allow", ["autoplay", "fullscreen", "picture-in-picture", "encrypted-media", "accelerometer", "gyroscope"].join("; ")), o.empty(r) || u.setAttribute("referrerPolicy", r), t || !i2.customControls)
11586
+ const d = ti({ loop: e.config.loop.active, autoplay: e.autoplay, muted: e.muted, gesture: "media", playsinline: !this.config.fullscreen.iosNative, ...l, ...s }), c = Tr(n), u = _("iframe"), m = st(e.config.urls.vimeo.iframe, c, d);
11587
+ if (u.setAttribute("src", m), u.setAttribute("allowfullscreen", ""), u.setAttribute("allow", ["autoplay", "fullscreen", "picture-in-picture", "encrypted-media", "accelerometer", "gyroscope"].join("; ")), o.empty(r) || u.setAttribute("referrerPolicy", r), t || !i2.customControls)
11588
11588
  u.setAttribute("data-poster", e.poster), e.media = Le(u, e.media);
11589
11589
  else {
11590
- const f = _("div", { class: e.config.classNames.embedContainer, "data-poster": e.poster });
11591
- f.appendChild(u), e.media = Le(f, e.media);
11590
+ const y = _("div", { class: e.config.classNames.embedContainer, "data-poster": e.poster });
11591
+ y.appendChild(u), e.media = Le(y, e.media);
11592
11592
  }
11593
- i2.customControls || Te(st(e.config.urls.vimeo.api, y)).then((f) => {
11594
- !o.empty(f) && f.thumbnail_url && M.setPoster.call(e, f.thumbnail_url).catch(() => {
11593
+ i2.customControls || Te(st(e.config.urls.vimeo.api, m)).then((y) => {
11594
+ !o.empty(y) && y.thumbnail_url && M.setPoster.call(e, y.thumbnail_url).catch(() => {
11595
11595
  });
11596
11596
  }), e.embed = new window.Vimeo.Player(u, { autopause: e.config.autopause, muted: e.muted }), e.media.paused = true, e.media.currentTime = 0, e.supported.ui && e.embed.disableTextTrack(), e.media.play = () => (me.call(e, true), e.embed.play()), e.media.pause = () => (me.call(e, false), e.embed.pause()), e.media.stop = () => {
11597
11597
  e.pause(), e.currentTime = 0;
11598
11598
  };
11599
11599
  let { currentTime: p } = e.media;
11600
- Object.defineProperty(e.media, "currentTime", { get: () => p, set(f) {
11600
+ Object.defineProperty(e.media, "currentTime", { get: () => p, set(y) {
11601
11601
  const { embed: C, media: L2, paused: $, volume: D2 } = e, V2 = $ && !C.hasPlayed;
11602
- L2.seeking = true, w.call(e, L2, "seeking"), Promise.resolve(V2 && C.setVolume(0)).then(() => C.setCurrentTime(f)).then(() => V2 && C.pause()).then(() => V2 && C.setVolume(D2)).catch(() => {
11602
+ L2.seeking = true, w.call(e, L2, "seeking"), Promise.resolve(V2 && C.setVolume(0)).then(() => C.setCurrentTime(y)).then(() => V2 && C.pause()).then(() => V2 && C.setVolume(D2)).catch(() => {
11603
11603
  });
11604
11604
  } });
11605
11605
  let v = e.config.speed.selected;
11606
- Object.defineProperty(e.media, "playbackRate", { get: () => v, set(f) {
11607
- e.embed.setPlaybackRate(f).then(() => {
11608
- v = f, w.call(e, e.media, "ratechange");
11606
+ Object.defineProperty(e.media, "playbackRate", { get: () => v, set(y) {
11607
+ e.embed.setPlaybackRate(y).then(() => {
11608
+ v = y, w.call(e, e.media, "ratechange");
11609
11609
  }).catch(() => {
11610
11610
  e.options.speed = [1];
11611
11611
  });
11612
11612
  } });
11613
11613
  let { volume: b } = e.config;
11614
- Object.defineProperty(e.media, "volume", { get: () => b, set(f) {
11615
- e.embed.setVolume(f).then(() => {
11616
- b = f, w.call(e, e.media, "volumechange");
11614
+ Object.defineProperty(e.media, "volume", { get: () => b, set(y) {
11615
+ e.embed.setVolume(y).then(() => {
11616
+ b = y, w.call(e, e.media, "volumechange");
11617
11617
  });
11618
11618
  } });
11619
11619
  let { muted: T2 } = e.config;
11620
- Object.defineProperty(e.media, "muted", { get: () => T2, set(f) {
11621
- const C = !!o.boolean(f) && f;
11620
+ Object.defineProperty(e.media, "muted", { get: () => T2, set(y) {
11621
+ const C = !!o.boolean(y) && y;
11622
11622
  e.embed.setVolume(C ? 0 : e.config.volume).then(() => {
11623
11623
  T2 = C, w.call(e, e.media, "volumechange");
11624
11624
  });
11625
11625
  } });
11626
11626
  let N2, { loop: x } = e.config;
11627
- Object.defineProperty(e.media, "loop", { get: () => x, set(f) {
11628
- const C = o.boolean(f) ? f : e.config.loop.active;
11627
+ Object.defineProperty(e.media, "loop", { get: () => x, set(y) {
11628
+ const C = o.boolean(y) ? y : e.config.loop.active;
11629
11629
  e.embed.setLoop(C).then(() => {
11630
11630
  x = C;
11631
11631
  });
11632
- } }), e.embed.getVideoUrl().then((f) => {
11633
- N2 = f, h.setDownloadUrl.call(e);
11634
- }).catch((f) => {
11635
- this.debug.warn(f);
11636
- }), Object.defineProperty(e.media, "currentSrc", { get: () => N2 }), Object.defineProperty(e.media, "ended", { get: () => e.currentTime === e.duration }), Promise.all([e.embed.getVideoWidth(), e.embed.getVideoHeight()]).then((f) => {
11637
- const [C, L2] = f;
11632
+ } }), e.embed.getVideoUrl().then((y) => {
11633
+ N2 = y, h.setDownloadUrl.call(e);
11634
+ }).catch((y) => {
11635
+ this.debug.warn(y);
11636
+ }), Object.defineProperty(e.media, "currentSrc", { get: () => N2 }), Object.defineProperty(e.media, "ended", { get: () => e.currentTime === e.duration }), Promise.all([e.embed.getVideoWidth(), e.embed.getVideoHeight()]).then((y) => {
11637
+ const [C, L2] = y;
11638
11638
  e.embed.ratio = Qt(C, L2), oe.call(this);
11639
- }), e.embed.setAutopause(e.config.autopause).then((f) => {
11640
- e.config.autopause = f;
11641
- }), e.embed.getVideoTitle().then((f) => {
11642
- e.config.title = f, M.setTitle.call(this);
11643
- }), e.embed.getCurrentTime().then((f) => {
11644
- p = f, w.call(e, e.media, "timeupdate");
11645
- }), e.embed.getDuration().then((f) => {
11646
- e.media.duration = f, w.call(e, e.media, "durationchange");
11647
- }), e.embed.getTextTracks().then((f) => {
11648
- e.media.textTracks = f, P.setup.call(e);
11649
- }), e.embed.on("cuechange", ({ cues: f = [] }) => {
11650
- const C = f.map((L2) => fr(L2.text));
11639
+ }), e.embed.setAutopause(e.config.autopause).then((y) => {
11640
+ e.config.autopause = y;
11641
+ }), e.embed.getVideoTitle().then((y) => {
11642
+ e.config.title = y, M.setTitle.call(this);
11643
+ }), e.embed.getCurrentTime().then((y) => {
11644
+ p = y, w.call(e, e.media, "timeupdate");
11645
+ }), e.embed.getDuration().then((y) => {
11646
+ e.media.duration = y, w.call(e, e.media, "durationchange");
11647
+ }), e.embed.getTextTracks().then((y) => {
11648
+ e.media.textTracks = y, P.setup.call(e);
11649
+ }), e.embed.on("cuechange", ({ cues: y = [] }) => {
11650
+ const C = y.map((L2) => fr(L2.text));
11651
11651
  P.updateCues.call(e, C);
11652
11652
  }), e.embed.on("loaded", () => {
11653
- e.embed.getPaused().then((f) => {
11654
- me.call(e, !f), f || w.call(e, e.media, "playing");
11653
+ e.embed.getPaused().then((y) => {
11654
+ me.call(e, !y), y || w.call(e, e.media, "playing");
11655
11655
  }), o.element(e.embed.element) && e.supported.ui && e.embed.element.setAttribute("tabindex", -1);
11656
11656
  }), e.embed.on("bufferstart", () => {
11657
11657
  w.call(e, e.media, "waiting");
@@ -11661,18 +11661,18 @@ const nt = { setup() {
11661
11661
  me.call(e, true), w.call(e, e.media, "playing");
11662
11662
  }), e.embed.on("pause", () => {
11663
11663
  me.call(e, false);
11664
- }), e.embed.on("timeupdate", (f) => {
11665
- e.media.seeking = false, p = f.seconds, w.call(e, e.media, "timeupdate");
11666
- }), e.embed.on("progress", (f) => {
11667
- e.media.buffered = f.percent, w.call(e, e.media, "progress"), parseInt(f.percent, 10) === 1 && w.call(e, e.media, "canplaythrough"), e.embed.getDuration().then((C) => {
11664
+ }), e.embed.on("timeupdate", (y) => {
11665
+ e.media.seeking = false, p = y.seconds, w.call(e, e.media, "timeupdate");
11666
+ }), e.embed.on("progress", (y) => {
11667
+ e.media.buffered = y.percent, w.call(e, e.media, "progress"), parseInt(y.percent, 10) === 1 && w.call(e, e.media, "canplaythrough"), e.embed.getDuration().then((C) => {
11668
11668
  C !== e.media.duration && (e.media.duration = C, w.call(e, e.media, "durationchange"));
11669
11669
  });
11670
11670
  }), e.embed.on("seeked", () => {
11671
11671
  e.media.seeking = false, w.call(e, e.media, "seeked");
11672
11672
  }), e.embed.on("ended", () => {
11673
11673
  e.media.paused = true, w.call(e, e.media, "ended");
11674
- }), e.embed.on("error", (f) => {
11675
- e.media.error = f, w.call(e, e.media, "error");
11674
+ }), e.embed.on("error", (y) => {
11675
+ e.media.error = y, w.call(e, e.media, "error");
11676
11676
  }), i2.customControls && setTimeout(() => M.build.call(e), 0);
11677
11677
  } };
11678
11678
  function Sr(e) {
@@ -11737,22 +11737,22 @@ const Ne = { setup() {
11737
11737
  ge.call(e, false), l.pauseVideo();
11738
11738
  }, e.media.stop = () => {
11739
11739
  l.stopVideo();
11740
- }, e.media.duration = l.getDuration(), e.media.paused = true, e.media.currentTime = 0, Object.defineProperty(e.media, "currentTime", { get: () => Number(l.getCurrentTime()), set(y) {
11741
- e.paused && !e.embed.hasPlayed && e.embed.mute(), e.media.seeking = true, w.call(e, e.media, "seeking"), l.seekTo(y);
11742
- } }), Object.defineProperty(e.media, "playbackRate", { get: () => l.getPlaybackRate(), set(y) {
11743
- l.setPlaybackRate(y);
11740
+ }, e.media.duration = l.getDuration(), e.media.paused = true, e.media.currentTime = 0, Object.defineProperty(e.media, "currentTime", { get: () => Number(l.getCurrentTime()), set(m) {
11741
+ e.paused && !e.embed.hasPlayed && e.embed.mute(), e.media.seeking = true, w.call(e, e.media, "seeking"), l.seekTo(m);
11742
+ } }), Object.defineProperty(e.media, "playbackRate", { get: () => l.getPlaybackRate(), set(m) {
11743
+ l.setPlaybackRate(m);
11744
11744
  } });
11745
11745
  let { volume: d } = e.config;
11746
- Object.defineProperty(e.media, "volume", { get: () => d, set(y) {
11747
- d = y, l.setVolume(100 * d), w.call(e, e.media, "volumechange");
11746
+ Object.defineProperty(e.media, "volume", { get: () => d, set(m) {
11747
+ d = m, l.setVolume(100 * d), w.call(e, e.media, "volumechange");
11748
11748
  } });
11749
11749
  let { muted: c } = e.config;
11750
- Object.defineProperty(e.media, "muted", { get: () => c, set(y) {
11751
- const p = o.boolean(y) ? y : c;
11750
+ Object.defineProperty(e.media, "muted", { get: () => c, set(m) {
11751
+ const p = o.boolean(m) ? m : c;
11752
11752
  c = p, l[p ? "mute" : "unMute"](), l.setVolume(100 * d), w.call(e, e.media, "volumechange");
11753
11753
  } }), Object.defineProperty(e.media, "currentSrc", { get: () => l.getVideoUrl() }), Object.defineProperty(e.media, "ended", { get: () => e.currentTime === e.duration });
11754
11754
  const u = l.getAvailablePlaybackRates();
11755
- e.options.speed = u.filter((y) => e.config.speed.options.includes(y)), e.supported.ui && i2.customControls && e.media.setAttribute("tabindex", -1), w.call(e, e.media, "timeupdate"), w.call(e, e.media, "durationchange"), clearInterval(e.timers.buffering), e.timers.buffering = setInterval(() => {
11755
+ e.options.speed = u.filter((m) => e.config.speed.options.includes(m)), e.supported.ui && i2.customControls && e.media.setAttribute("tabindex", -1), w.call(e, e.media, "timeupdate"), w.call(e, e.media, "durationchange"), clearInterval(e.timers.buffering), e.timers.buffering = setInterval(() => {
11756
11756
  e.media.buffered = l.getVideoLoadedFraction(), (e.media.lastBuffered === null || e.media.lastBuffered < e.media.buffered) && w.call(e, e.media, "progress"), e.media.lastBuffered = e.media.buffered, e.media.buffered === 1 && (clearInterval(e.timers.buffering), w.call(e, e.media, "canplaythrough"));
11757
11757
  }, 200), i2.customControls && setTimeout(() => M.build.call(e), 50);
11758
11758
  }, onStateChange(a) {
@@ -11782,20 +11782,20 @@ const Ne = { setup() {
11782
11782
  } };
11783
11783
  class Er {
11784
11784
  constructor(i2) {
11785
- g(this, "load", () => {
11785
+ f(this, "load", () => {
11786
11786
  this.enabled && (o.object(window.google) && o.object(window.google.ima) ? this.ready() : ut(this.player.config.urls.googleIMA.sdk).then(() => {
11787
11787
  this.ready();
11788
11788
  }).catch(() => {
11789
11789
  this.trigger("error", new Error("Google IMA SDK failed to load"));
11790
11790
  }));
11791
- }), g(this, "ready", () => {
11791
+ }), f(this, "ready", () => {
11792
11792
  var t;
11793
11793
  this.enabled || ((t = this).manager && t.manager.destroy(), t.elements.displayContainer && t.elements.displayContainer.destroy(), t.elements.container.remove()), this.startSafetyTimer(12e3, "ready()"), this.managerPromise.then(() => {
11794
11794
  this.clearSafetyTimer("onAdsManagerLoaded()");
11795
11795
  }), this.listeners(), this.setupIMA();
11796
- }), g(this, "setupIMA", () => {
11796
+ }), f(this, "setupIMA", () => {
11797
11797
  this.elements.container = _("div", { class: this.player.config.classNames.ads }), this.player.elements.container.appendChild(this.elements.container), google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED), google.ima.settings.setLocale(this.player.config.ads.language), google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline), this.elements.displayContainer = new google.ima.AdDisplayContainer(this.elements.container, this.player.media), this.loader = new google.ima.AdsLoader(this.elements.displayContainer), this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, (t) => this.onAdsManagerLoaded(t), false), this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, (t) => this.onAdError(t), false), this.requestAds();
11798
- }), g(this, "requestAds", () => {
11798
+ }), f(this, "requestAds", () => {
11799
11799
  const { container: t } = this.player.elements;
11800
11800
  try {
11801
11801
  const r = new google.ima.AdsRequest();
@@ -11803,21 +11803,21 @@ class Er {
11803
11803
  } catch (r) {
11804
11804
  this.onAdError(r);
11805
11805
  }
11806
- }), g(this, "pollCountdown", (t = false) => {
11806
+ }), f(this, "pollCountdown", (t = false) => {
11807
11807
  if (!t)
11808
11808
  return clearInterval(this.countdownTimer), void this.elements.container.removeAttribute("data-badge-text");
11809
11809
  this.countdownTimer = setInterval(() => {
11810
11810
  const r = He(Math.max(this.manager.getRemainingTime(), 0)), s = `${j.get("advertisement", this.player.config)} - ${r}`;
11811
11811
  this.elements.container.setAttribute("data-badge-text", s);
11812
11812
  }, 100);
11813
- }), g(this, "onAdsManagerLoaded", (t) => {
11813
+ }), f(this, "onAdsManagerLoaded", (t) => {
11814
11814
  if (!this.enabled)
11815
11815
  return;
11816
11816
  const r = new google.ima.AdsRenderingSettings();
11817
11817
  r.restoreCustomPlaybackStateOnAdBreakComplete = true, r.enablePreloading = true, this.manager = t.getAdsManager(this.player, r), this.cuePoints = this.manager.getCuePoints(), this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, (s) => this.onAdError(s)), Object.keys(google.ima.AdEvent.Type).forEach((s) => {
11818
11818
  this.manager.addEventListener(google.ima.AdEvent.Type[s], (n) => this.onAdEvent(n));
11819
11819
  }), this.trigger("loaded");
11820
- }), g(this, "addCuePoints", () => {
11820
+ }), f(this, "addCuePoints", () => {
11821
11821
  o.empty(this.cuePoints) || this.cuePoints.forEach((t) => {
11822
11822
  if (t !== 0 && t !== -1 && t < this.player.duration) {
11823
11823
  const r = this.player.elements.progress;
@@ -11827,7 +11827,7 @@ class Er {
11827
11827
  }
11828
11828
  }
11829
11829
  });
11830
- }), g(this, "onAdEvent", (t) => {
11830
+ }), f(this, "onAdEvent", (t) => {
11831
11831
  const { container: r } = this.player.elements, s = t.getAd(), n = t.getAdData();
11832
11832
  switch (((a) => {
11833
11833
  w.call(this.player, this.player.media, `ads${a.replace(/_/g, "").toLowerCase()}`);
@@ -11850,9 +11850,9 @@ class Er {
11850
11850
  case google.ima.AdEvent.Type.LOG:
11851
11851
  n.adError && this.player.debug.warn(`Non-fatal ad error: ${n.adError.getMessage()}`);
11852
11852
  }
11853
- }), g(this, "onAdError", (t) => {
11853
+ }), f(this, "onAdError", (t) => {
11854
11854
  this.cancel(), this.player.debug.warn("Ads error", t);
11855
- }), g(this, "listeners", () => {
11855
+ }), f(this, "listeners", () => {
11856
11856
  const { container: t } = this.player.elements;
11857
11857
  let r;
11858
11858
  this.player.on("canplay", () => {
@@ -11869,7 +11869,7 @@ class Er {
11869
11869
  }), window.addEventListener("resize", () => {
11870
11870
  this.manager && this.manager.resize(t.offsetWidth, t.offsetHeight, google.ima.ViewMode.NORMAL);
11871
11871
  });
11872
- }), g(this, "play", () => {
11872
+ }), f(this, "play", () => {
11873
11873
  const { container: t } = this.player.elements;
11874
11874
  this.managerPromise || this.resumeContent(), this.managerPromise.then(() => {
11875
11875
  this.manager.setVolume(this.player.volume), this.elements.displayContainer.initialize();
@@ -11880,29 +11880,29 @@ class Er {
11880
11880
  }
11881
11881
  }).catch(() => {
11882
11882
  });
11883
- }), g(this, "resumeContent", () => {
11883
+ }), f(this, "resumeContent", () => {
11884
11884
  this.elements.container.style.zIndex = "", this.playing = false, W(this.player.media.play());
11885
- }), g(this, "pauseContent", () => {
11885
+ }), f(this, "pauseContent", () => {
11886
11886
  this.elements.container.style.zIndex = 3, this.playing = true, this.player.media.pause();
11887
- }), g(this, "cancel", () => {
11887
+ }), f(this, "cancel", () => {
11888
11888
  this.initialized && this.resumeContent(), this.trigger("error"), this.loadAds();
11889
- }), g(this, "loadAds", () => {
11889
+ }), f(this, "loadAds", () => {
11890
11890
  this.managerPromise.then(() => {
11891
11891
  this.manager && this.manager.destroy(), this.managerPromise = new Promise((t) => {
11892
11892
  this.on("loaded", t), this.player.debug.log(this.manager);
11893
11893
  }), this.initialized = false, this.requestAds();
11894
11894
  }).catch(() => {
11895
11895
  });
11896
- }), g(this, "trigger", (t, ...r) => {
11896
+ }), f(this, "trigger", (t, ...r) => {
11897
11897
  const s = this.events[t];
11898
11898
  o.array(s) && s.forEach((n) => {
11899
11899
  o.function(n) && n.apply(this, r);
11900
11900
  });
11901
- }), g(this, "on", (t, r) => (o.array(this.events[t]) || (this.events[t] = []), this.events[t].push(r), this)), g(this, "startSafetyTimer", (t, r) => {
11901
+ }), f(this, "on", (t, r) => (o.array(this.events[t]) || (this.events[t] = []), this.events[t].push(r), this)), f(this, "startSafetyTimer", (t, r) => {
11902
11902
  this.player.debug.log(`Safety timer invoked from: ${r}`), this.safetyTimer = setTimeout(() => {
11903
11903
  this.cancel(), this.clearSafetyTimer("startSafetyTimer()");
11904
11904
  }, t);
11905
- }), g(this, "clearSafetyTimer", (t) => {
11905
+ }), f(this, "clearSafetyTimer", (t) => {
11906
11906
  o.nullOrUndefined(this.safetyTimer) || (this.player.debug.log(`Safety timer cleared from: ${t}`), clearTimeout(this.safetyTimer), this.safetyTimer = null);
11907
11907
  }), this.player = i2, this.config = i2.config.ads, this.playing = false, this.initialized = false, this.elements = { container: null, displayContainer: null }, this.manager = null, this.loader = null, this.cuePoints = null, this.events = {}, this.safetyTimer = null, this.countdownTimer = null, this.managerPromise = new Promise((t, r) => {
11908
11908
  this.on("loaded", t), this.on("error", r);
@@ -11942,11 +11942,11 @@ const Pr = (e) => {
11942
11942
  };
11943
11943
  class at {
11944
11944
  constructor(i2) {
11945
- g(this, "load", () => {
11945
+ f(this, "load", () => {
11946
11946
  this.player.elements.display.seekTooltip && (this.player.elements.display.seekTooltip.hidden = this.enabled), this.enabled && this.getThumbnails().then(() => {
11947
11947
  this.enabled && (this.render(), this.determineContainerAutoSizing(), this.loaded = true);
11948
11948
  });
11949
- }), g(this, "getThumbnails", () => new Promise((t) => {
11949
+ }), f(this, "getThumbnails", () => new Promise((t) => {
11950
11950
  const { src: r } = this.player.config.previewThumbnails;
11951
11951
  if (o.empty(r))
11952
11952
  throw new Error("Missing previewThumbnails.src config attribute");
@@ -11961,7 +11961,7 @@ class at {
11961
11961
  const n = (o.string(r) ? [r] : r).map((a) => this.getThumbnail(a));
11962
11962
  Promise.all(n).then(s);
11963
11963
  }
11964
- })), g(this, "getThumbnail", (t) => new Promise((r) => {
11964
+ })), f(this, "getThumbnail", (t) => new Promise((r) => {
11965
11965
  Te(t).then((s) => {
11966
11966
  const n = { frames: Pr(s), height: null, urlPrefix: "" };
11967
11967
  n.frames[0].text.startsWith("/") || n.frames[0].text.startsWith("http://") || n.frames[0].text.startsWith("https://") || (n.urlPrefix = t.substring(0, t.lastIndexOf("/") + 1));
@@ -11970,7 +11970,7 @@ class at {
11970
11970
  n.height = a.naturalHeight, n.width = a.naturalWidth, this.thumbnails.push(n), r();
11971
11971
  }, a.src = n.urlPrefix + n.frames[0].text;
11972
11972
  });
11973
- })), g(this, "startMove", (t) => {
11973
+ })), f(this, "startMove", (t) => {
11974
11974
  if (this.loaded && o.event(t) && ["touchmove", "mousemove"].includes(t.type) && this.player.media.duration) {
11975
11975
  if (t.type === "touchmove")
11976
11976
  this.seekTime = this.player.media.duration * (this.player.elements.inputs.seek.value / 100);
@@ -11983,15 +11983,15 @@ class at {
11983
11983
  }
11984
11984
  this.showImageAtCurrentTime();
11985
11985
  }
11986
- }), g(this, "endMove", () => {
11986
+ }), f(this, "endMove", () => {
11987
11987
  this.toggleThumbContainer(false, true);
11988
- }), g(this, "startScrubbing", (t) => {
11988
+ }), f(this, "startScrubbing", (t) => {
11989
11989
  (o.nullOrUndefined(t.button) || t.button === false || t.button === 0) && (this.mouseDown = true, this.player.media.duration && (this.toggleScrubbingContainer(true), this.toggleThumbContainer(false, true), this.showImageAtCurrentTime()));
11990
- }), g(this, "endScrubbing", () => {
11990
+ }), f(this, "endScrubbing", () => {
11991
11991
  this.mouseDown = false, Math.ceil(this.lastTime) === Math.ceil(this.player.media.currentTime) ? this.toggleScrubbingContainer(false) : dt.call(this.player, this.player.media, "timeupdate", () => {
11992
11992
  this.mouseDown || this.toggleScrubbingContainer(false);
11993
11993
  });
11994
- }), g(this, "listeners", () => {
11994
+ }), f(this, "listeners", () => {
11995
11995
  this.player.on("play", () => {
11996
11996
  this.toggleThumbContainer(false, true);
11997
11997
  }), this.player.on("seeked", () => {
@@ -11999,20 +11999,20 @@ class at {
11999
11999
  }), this.player.on("timeupdate", () => {
12000
12000
  this.lastTime = this.player.media.currentTime;
12001
12001
  });
12002
- }), g(this, "render", () => {
12002
+ }), f(this, "render", () => {
12003
12003
  this.elements.thumb.container = _("div", { class: this.player.config.classNames.previewThumbnails.thumbContainer }), this.elements.thumb.imageContainer = _("div", { class: this.player.config.classNames.previewThumbnails.imageContainer }), this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);
12004
12004
  const t = _("div", { class: this.player.config.classNames.previewThumbnails.timeContainer });
12005
12005
  this.elements.thumb.time = _("span", {}, "00:00"), t.appendChild(this.elements.thumb.time), this.elements.thumb.imageContainer.appendChild(t), o.element(this.player.elements.progress) && this.player.elements.progress.appendChild(this.elements.thumb.container), this.elements.scrubbing.container = _("div", { class: this.player.config.classNames.previewThumbnails.scrubbingContainer }), this.player.elements.wrapper.appendChild(this.elements.scrubbing.container);
12006
- }), g(this, "destroy", () => {
12006
+ }), f(this, "destroy", () => {
12007
12007
  this.elements.thumb.container && this.elements.thumb.container.remove(), this.elements.scrubbing.container && this.elements.scrubbing.container.remove();
12008
- }), g(this, "showImageAtCurrentTime", () => {
12008
+ }), f(this, "showImageAtCurrentTime", () => {
12009
12009
  this.mouseDown ? this.setScrubbingContainerSize() : this.setThumbContainerSizeAndPos();
12010
12010
  const t = this.thumbnails[0].frames.findIndex((n) => this.seekTime >= n.startTime && this.seekTime <= n.endTime), r = t >= 0;
12011
12011
  let s = 0;
12012
12012
  this.mouseDown || this.toggleThumbContainer(r), r && (this.thumbnails.forEach((n, a) => {
12013
12013
  this.loadedImages.includes(n.frames[t].text) && (s = a);
12014
12014
  }), t !== this.showingThumb && (this.showingThumb = t, this.loadImage(s)));
12015
- }), g(this, "loadImage", (t = 0) => {
12015
+ }), f(this, "loadImage", (t = 0) => {
12016
12016
  const r = this.showingThumb, s = this.thumbnails[t], { urlPrefix: n } = s, a = s.frames[r], l = s.frames[r].text, d = n + l;
12017
12017
  if (this.currentImageElement && this.currentImageElement.dataset.filename === l)
12018
12018
  this.showImage(this.currentImageElement, a, t, r, l, false), this.currentImageElement.dataset.index = r, this.removeOldImages(this.currentImageElement);
@@ -12021,9 +12021,9 @@ class at {
12021
12021
  const c = new Image();
12022
12022
  c.src = d, c.dataset.index = r, c.dataset.filename = l, this.showingThumbFilename = l, this.player.debug.log(`Loading image: ${d}`), c.onload = () => this.showImage(c, a, t, r, l, true), this.loadingImage = c, this.removeOldImages(c);
12023
12023
  }
12024
- }), g(this, "showImage", (t, r, s, n, a, l = true) => {
12024
+ }), f(this, "showImage", (t, r, s, n, a, l = true) => {
12025
12025
  this.player.debug.log(`Showing thumb: ${a}. num: ${n}. qual: ${s}. newimg: ${l}`), this.setImageSizeAndOffset(t, r), l && (this.currentImageContainer.appendChild(t), this.currentImageElement = t, this.loadedImages.includes(a) || this.loadedImages.push(a)), this.preloadNearby(n, true).then(this.preloadNearby(n, false)).then(this.getHigherQuality(s, t, r, a));
12026
- }), g(this, "removeOldImages", (t) => {
12026
+ }), f(this, "removeOldImages", (t) => {
12027
12027
  Array.from(this.currentImageContainer.children).forEach((r) => {
12028
12028
  if (r.tagName.toLowerCase() !== "img")
12029
12029
  return;
@@ -12036,7 +12036,7 @@ class at {
12036
12036
  }, s);
12037
12037
  }
12038
12038
  });
12039
- }), g(this, "preloadNearby", (t, r = true) => new Promise((s) => {
12039
+ }), f(this, "preloadNearby", (t, r = true) => new Promise((s) => {
12040
12040
  setTimeout(() => {
12041
12041
  const n = this.thumbnails[0].frames[t].text;
12042
12042
  if (this.showingThumbFilename === n) {
@@ -12047,30 +12047,30 @@ class at {
12047
12047
  const c = d.text;
12048
12048
  if (c !== n && !this.loadedImages.includes(c)) {
12049
12049
  l = true, this.player.debug.log(`Preloading thumb filename: ${c}`);
12050
- const { urlPrefix: u } = this.thumbnails[0], y = u + c, p = new Image();
12051
- p.src = y, p.onload = () => {
12050
+ const { urlPrefix: u } = this.thumbnails[0], m = u + c, p = new Image();
12051
+ p.src = m, p.onload = () => {
12052
12052
  this.player.debug.log(`Preloaded thumb filename: ${c}`), this.loadedImages.includes(c) || this.loadedImages.push(c), s();
12053
12053
  };
12054
12054
  }
12055
12055
  }), l || s();
12056
12056
  }
12057
12057
  }, 300);
12058
- })), g(this, "getHigherQuality", (t, r, s, n) => {
12058
+ })), f(this, "getHigherQuality", (t, r, s, n) => {
12059
12059
  if (t < this.thumbnails.length - 1) {
12060
12060
  let a = r.naturalHeight;
12061
12061
  this.usingSprites && (a = s.h), a < this.thumbContainerHeight && setTimeout(() => {
12062
12062
  this.showingThumbFilename === n && (this.player.debug.log(`Showing higher quality thumb for: ${n}`), this.loadImage(t + 1));
12063
12063
  }, 300);
12064
12064
  }
12065
- }), g(this, "toggleThumbContainer", (t = false, r = false) => {
12065
+ }), f(this, "toggleThumbContainer", (t = false, r = false) => {
12066
12066
  const s = this.player.config.classNames.previewThumbnails.thumbContainerShown;
12067
12067
  this.elements.thumb.container.classList.toggle(s, t), !t && r && (this.showingThumb = null, this.showingThumbFilename = null);
12068
- }), g(this, "toggleScrubbingContainer", (t = false) => {
12068
+ }), f(this, "toggleScrubbingContainer", (t = false) => {
12069
12069
  const r = this.player.config.classNames.previewThumbnails.scrubbingContainerShown;
12070
12070
  this.elements.scrubbing.container.classList.toggle(r, t), t || (this.showingThumb = null, this.showingThumbFilename = null);
12071
- }), g(this, "determineContainerAutoSizing", () => {
12071
+ }), f(this, "determineContainerAutoSizing", () => {
12072
12072
  (this.elements.thumb.imageContainer.clientHeight > 20 || this.elements.thumb.imageContainer.clientWidth > 20) && (this.sizeSpecifiedInCSS = true);
12073
- }), g(this, "setThumbContainerSizeAndPos", () => {
12073
+ }), f(this, "setThumbContainerSizeAndPos", () => {
12074
12074
  const { imageContainer: t } = this.elements.thumb;
12075
12075
  if (this.sizeSpecifiedInCSS) {
12076
12076
  if (t.clientHeight > 20 && t.clientWidth < 20) {
@@ -12085,13 +12085,13 @@ class at {
12085
12085
  t.style.height = `${this.thumbContainerHeight}px`, t.style.width = `${r}px`;
12086
12086
  }
12087
12087
  this.setThumbContainerPos();
12088
- }), g(this, "setThumbContainerPos", () => {
12088
+ }), f(this, "setThumbContainerPos", () => {
12089
12089
  const t = this.player.elements.progress.getBoundingClientRect(), r = this.player.elements.container.getBoundingClientRect(), { container: s } = this.elements.thumb, n = r.left - t.left + 10, a = r.right - t.left - s.clientWidth - 10, l = this.mousePosX - t.left - s.clientWidth / 2, d = si(l, n, a);
12090
12090
  s.style.left = `${d}px`, s.style.setProperty("--preview-arrow-offset", l - d + "px");
12091
- }), g(this, "setScrubbingContainerSize", () => {
12091
+ }), f(this, "setScrubbingContainerSize", () => {
12092
12092
  const { width: t, height: r } = kt(this.thumbAspectRatio, { width: this.player.media.clientWidth, height: this.player.media.clientHeight });
12093
12093
  this.elements.scrubbing.container.style.width = `${t}px`, this.elements.scrubbing.container.style.height = `${r}px`;
12094
- }), g(this, "setImageSizeAndOffset", (t, r) => {
12094
+ }), f(this, "setImageSizeAndOffset", (t, r) => {
12095
12095
  if (!this.usingSprites)
12096
12096
  return;
12097
12097
  const s = this.thumbContainerHeight / r.h;
@@ -12137,38 +12137,38 @@ const ot = { insertElements(e, i2) {
12137
12137
  } };
12138
12138
  class xe {
12139
12139
  constructor(i2, t) {
12140
- if (g(this, "play", () => o.function(this.media.play) ? (this.ads && this.ads.enabled && this.ads.managerPromise.then(() => this.ads.play()).catch(() => W(this.media.play())), this.media.play()) : null), g(this, "pause", () => this.playing && o.function(this.media.pause) ? this.media.pause() : null), g(this, "togglePlay", (l) => (o.boolean(l) ? l : !this.playing) ? this.play() : this.pause()), g(this, "stop", () => {
12140
+ if (f(this, "play", () => o.function(this.media.play) ? (this.ads && this.ads.enabled && this.ads.managerPromise.then(() => this.ads.play()).catch(() => W(this.media.play())), this.media.play()) : null), f(this, "pause", () => this.playing && o.function(this.media.pause) ? this.media.pause() : null), f(this, "togglePlay", (l) => (o.boolean(l) ? l : !this.playing) ? this.play() : this.pause()), f(this, "stop", () => {
12141
12141
  this.isHTML5 ? (this.pause(), this.restart()) : o.function(this.media.stop) && this.media.stop();
12142
- }), g(this, "restart", () => {
12142
+ }), f(this, "restart", () => {
12143
12143
  this.currentTime = 0;
12144
- }), g(this, "rewind", (l) => {
12144
+ }), f(this, "rewind", (l) => {
12145
12145
  this.currentTime -= o.number(l) ? l : this.config.seekTime;
12146
- }), g(this, "forward", (l) => {
12146
+ }), f(this, "forward", (l) => {
12147
12147
  this.currentTime += o.number(l) ? l : this.config.seekTime;
12148
- }), g(this, "increaseVolume", (l) => {
12148
+ }), f(this, "increaseVolume", (l) => {
12149
12149
  const d = this.media.muted ? 0 : this.volume;
12150
12150
  this.volume = d + (o.number(l) ? l : 0);
12151
- }), g(this, "decreaseVolume", (l) => {
12151
+ }), f(this, "decreaseVolume", (l) => {
12152
12152
  this.increaseVolume(-l);
12153
- }), g(this, "airplay", () => {
12153
+ }), f(this, "airplay", () => {
12154
12154
  I.airplay && this.media.webkitShowPlaybackTargetPicker();
12155
- }), g(this, "toggleControls", (l) => {
12155
+ }), f(this, "toggleControls", (l) => {
12156
12156
  if (this.supported.ui && !this.isAudio) {
12157
12157
  const d = Ie(this.elements.container, this.config.classNames.hideControls), c = l === void 0 ? void 0 : !l, u = A(this.elements.container, this.config.classNames.hideControls, c);
12158
12158
  if (u && o.array(this.config.controls) && this.config.controls.includes("settings") && !o.empty(this.config.settings) && h.toggleMenu.call(this, false), u !== d) {
12159
- const y = u ? "controlshidden" : "controlsshown";
12160
- w.call(this, this.media, y);
12159
+ const m = u ? "controlshidden" : "controlsshown";
12160
+ w.call(this, this.media, m);
12161
12161
  }
12162
12162
  return !u;
12163
12163
  }
12164
12164
  return false;
12165
- }), g(this, "on", (l, d) => {
12165
+ }), f(this, "on", (l, d) => {
12166
12166
  E.call(this, this.elements.container, l, d);
12167
- }), g(this, "once", (l, d) => {
12167
+ }), f(this, "once", (l, d) => {
12168
12168
  dt.call(this, this.elements.container, l, d);
12169
- }), g(this, "off", (l, d) => {
12169
+ }), f(this, "off", (l, d) => {
12170
12170
  je(this.elements.container, l, d);
12171
- }), g(this, "destroy", (l, d = false) => {
12171
+ }), f(this, "destroy", (l, d = false) => {
12172
12172
  if (!this.ready)
12173
12173
  return;
12174
12174
  const c = () => {
@@ -12177,7 +12177,7 @@ class xe {
12177
12177
  }, 200));
12178
12178
  };
12179
12179
  this.stop(), clearTimeout(this.timers.loading), clearTimeout(this.timers.controls), clearTimeout(this.timers.resized), this.isHTML5 ? (M.toggleNativeControls.call(this, true), c()) : this.isYouTube ? (clearInterval(this.timers.buffering), clearInterval(this.timers.playing), this.embed !== null && o.function(this.embed.destroy) && this.embed.destroy(), c()) : this.isVimeo && (this.embed !== null && this.embed.unload().then(c), setTimeout(c, 200));
12180
- }), g(this, "supports", (l) => I.mime.call(this, l)), this.timers = {}, this.ready = false, this.loading = false, this.failed = false, this.touch = I.touch, this.media = i2, o.string(this.media) && (this.media = document.querySelectorAll(this.media)), (window.jQuery && this.media instanceof jQuery || o.nodeList(this.media) || o.array(this.media)) && (this.media = this.media[0]), this.config = z({}, ii, xe.defaults, t || {}, (() => {
12180
+ }), f(this, "supports", (l) => I.mime.call(this, l)), this.timers = {}, this.ready = false, this.loading = false, this.failed = false, this.touch = I.touch, this.media = i2, o.string(this.media) && (this.media = document.querySelectorAll(this.media)), (window.jQuery && this.media instanceof jQuery || o.nodeList(this.media) || o.array(this.media)) && (this.media = this.media[0]), this.config = z({}, ii, xe.defaults, t || {}, (() => {
12181
12181
  try {
12182
12182
  return JSON.parse(this.media.getAttribute("data-plyr-config"));
12183
12183
  } catch {
@@ -12403,7 +12403,7 @@ function Mr(e) {
12403
12403
  let i2, t, r;
12404
12404
  return {
12405
12405
  c() {
12406
- i2 = ie("video"), t = ie("source"), St(t.src, r = e[3]) || m(t, "src", r), m(t, "type", e[2]), m(i2, "data-app-kind", "Plyr"), m(i2, "crossorigin", "anonymous"), i2.playsInline = true, m(i2, "data-poster", e[4]);
12406
+ i2 = ie("video"), t = ie("source"), St(t.src, r = e[3]) || g(t, "src", r), g(t, "type", e[2]), g(i2, "data-app-kind", "Plyr"), g(i2, "crossorigin", "anonymous"), i2.playsInline = true, g(i2, "data-poster", e[4]);
12407
12407
  },
12408
12408
  m(s, n) {
12409
12409
  te(s, i2, n), k(i2, t), e[8](i2);
@@ -12418,7 +12418,7 @@ function Nr(e) {
12418
12418
  let i2, t, r;
12419
12419
  return {
12420
12420
  c() {
12421
- i2 = ie("audio"), t = ie("source"), St(t.src, r = e[3]) || m(t, "src", r), m(t, "type", e[2]), m(i2, "data-app-kind", "Plyr"), m(i2, "crossorigin", "anonymous"), m(i2, "data-poster", e[4]);
12421
+ i2 = ie("audio"), t = ie("source"), St(t.src, r = e[3]) || g(t, "src", r), g(t, "type", e[2]), g(i2, "data-app-kind", "Plyr"), g(i2, "crossorigin", "anonymous"), g(i2, "data-poster", e[4]);
12422
12422
  },
12423
12423
  m(s, n) {
12424
12424
  te(s, i2, n), k(i2, t), e[7](i2);
@@ -12437,7 +12437,7 @@ function Lr(e) {
12437
12437
  return {
12438
12438
  c() {
12439
12439
  i2 = ie("div"), t = Ge(`Invalid "src" or "type".
12440
- `), s = Ge(r), m(i2, "data-app-kind", "Plyr"), m(i2, "class", "plyr--audio");
12440
+ `), s = Ge(r), g(i2, "data-app-kind", "Plyr"), g(i2, "class", "plyr--audio");
12441
12441
  },
12442
12442
  m(n, a) {
12443
12443
  te(n, i2, a), k(i2, t), k(i2, s);
@@ -12457,7 +12457,7 @@ function Ir(e) {
12457
12457
  let i2;
12458
12458
  return {
12459
12459
  c() {
12460
- i2 = ie("div"), m(i2, "data-app-kind", "Plyr"), m(i2, "class", "plyr__video-embed"), m(i2, "data-plyr-provider", "youtube"), m(i2, "data-plyr-embed-id", e[3]), m(i2, "data-poster", e[4]);
12460
+ i2 = ie("div"), g(i2, "data-app-kind", "Plyr"), g(i2, "class", "plyr__video-embed"), g(i2, "data-plyr-provider", "youtube"), g(i2, "data-plyr-embed-id", e[3]), g(i2, "data-poster", e[4]);
12461
12461
  },
12462
12462
  m(t, r) {
12463
12463
  te(t, i2, r), e[6](i2);
@@ -12523,7 +12523,7 @@ function $r(e, i2, t) {
12523
12523
  console.warn("[Plyr] destroy plyr error", b);
12524
12524
  }
12525
12525
  });
12526
- function y(b) {
12526
+ function m(b) {
12527
12527
  be[b ? "unshift" : "push"](() => {
12528
12528
  c = b, t(1, c);
12529
12529
  });
@@ -12547,7 +12547,7 @@ function $r(e, i2, t) {
12547
12547
  a,
12548
12548
  l,
12549
12549
  s,
12550
- y,
12550
+ m,
12551
12551
  p,
12552
12552
  v
12553
12553
  ];
@@ -12596,7 +12596,10 @@ class jr {
12596
12596
  if (!t)
12597
12597
  return;
12598
12598
  const { currentTime: n, hostTime: a, muted: l, paused: d, volume: c, owner: u } = s.state;
12599
- i2 === "owner" && u === this.uid && r.isWritable || (d !== t.paused && !this._skip_next_play_pause && (d ? t.pause() : Si(t)), l !== t.muted && (t.muted = l), c !== t.volume && (t.volume = c), !this._buffering && (d ? Math.abs(t.currentTime - n) > 0.5 && (t.currentTime = n) : this.syncCurrentTime(a, n, t)));
12599
+ if (i2 === "owner" && u === this.uid && r.isWritable)
12600
+ return;
12601
+ let m = d;
12602
+ !m && r.isReplay && ["pause", "ended", "stop"].includes(r.displayer.phase) && (m = true), m !== t.paused && !this._skip_next_play_pause && (m ? t.pause() : Si(t)), l !== t.muted && (t.muted = l), c !== t.volume && (t.volume = c), !this._buffering && (d ? Math.abs(t.currentTime - n) > 0.5 && (t.currentTime = n) : this.syncCurrentTime(a, n, t));
12600
12603
  }
12601
12604
  watchUserInputs(i2) {
12602
12605
  const t = i2.elements.controls, r = Ni(i2.elements.buttons.play), s = t == null ? void 0 : t.querySelector('input[data-plyr="seek"]'), n = t == null ? void 0 : t.querySelector('button[data-plyr="mute"]'), a = t == null ? void 0 : t.querySelector('input[data-plyr="volume"]');
@@ -12790,8 +12793,8 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
12790
12793
  const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
12791
12794
  constructor(context) {
12792
12795
  super(context);
12793
- this.version = "1.0.0-canary.65";
12794
- this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.3", "@playwright/test": "^1.23.2", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.49", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.2", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
12796
+ this.version = "1.0.0-canary.67";
12797
+ this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.23.2", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.49", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.2", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
12795
12798
  this.emitter = callbacks;
12796
12799
  this.viewMode$ = new valueEnhancer.Val(whiteWebSdk.ViewMode.Broadcaster);
12797
12800
  this.playground$ = new valueEnhancer.Val(void 0);
@@ -12807,7 +12810,7 @@ const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
12807
12810
  (_b = this.appManager) == null ? void 0 : _b.dispatchInternalEvent(Events.MoveCamera, camera);
12808
12811
  };
12809
12812
  _WindowManager.displayer = context.displayer;
12810
- window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.3", "@playwright/test": "^1.23.2", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.49", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.2", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
12813
+ window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.23.2", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.49", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.2", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
12811
12814
  }
12812
12815
  static mount(params) {
12813
12816
  return __async(this, null, function* () {