@waveform-playlist/browser 9.0.2 → 9.0.3

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as Sf from "tone";
2
- import { now as Co, Context as kf, setContext as If, Volume as Ul, getDestination as Kl, getTransport as Ot, start as Af, getContext as Gt, Panner as Ef, Gain as Mf, Analyser as jl, StereoWidener as $f, Gate as Tf, Limiter as Df, Compressor as Pf, Chebyshev as Rf, BitCrusher as Wf, Distortion as Ff, EQ3 as Of, AutoWah as Bf, AutoFilter as Vf, AutoPanner as Lf, Vibrato as zf, Tremolo as Zf, Phaser as Hf, Chorus as Nf, PingPongDelay as Xf, FeedbackDelay as Gf, JCReverb as Yf, Freeverb as Uf, Reverb as Kf } from "tone";
2
+ import { now as Co, Context as kf, setContext as If, Volume as Ul, getDestination as Kl, getTransport as Ot, start as Ef, getContext as Gt, Panner as Af, Gain as Mf, Analyser as jl, StereoWidener as $f, Gate as Tf, Limiter as Df, Compressor as Pf, Chebyshev as Rf, BitCrusher as Wf, Distortion as Ff, EQ3 as Of, AutoWah as Bf, AutoFilter as Vf, AutoPanner as Lf, Vibrato as zf, Tremolo as Zf, Phaser as Hf, Chorus as Nf, PingPongDelay as Xf, FeedbackDelay as Gf, JCReverb as Yf, Freeverb as Uf, Reverb as Kf } from "tone";
3
3
  import { jsx as x, jsxs as me, Fragment as Lt } from "react/jsx-runtime";
4
4
  import * as P from "react";
5
5
  import bt, { useEffect as j, useLayoutEffect as qn, useRef as T, useMemo as Te, useState as V, useCallback as M, useContext as We, createContext as Ze, memo as ql, forwardRef as Jl, startTransition as fs, useImperativeHandle as Ql, Fragment as jf, useSyncExternalStore as qf, useInsertionEffect as Jf } from "react";
@@ -210,7 +210,7 @@ function el(e, t, n, r = "linear", a = 1, o = 0) {
210
210
  }
211
211
  var lh = class {
212
212
  constructor(e) {
213
- this.activeSources = /* @__PURE__ */ new Set(), this._scheduleGuardOffset = 0, this.track = e.track, this.volumeNode = new Ul(this.gainToDb(e.track.gain)), this.panNode = new Ef(e.track.stereoPan), this.muteGain = new Mf(e.track.muted ? 0 : 1), this.volumeNode.chain(this.panNode, this.muteGain);
213
+ this.activeSources = /* @__PURE__ */ new Set(), this._scheduleGuardOffset = 0, this.track = e.track, this.volumeNode = new Ul(this.gainToDb(e.track.gain)), this.panNode = new Af(e.track.stereoPan), this.muteGain = new Mf(e.track.muted ? 0 : 1), this.volumeNode.chain(this.panNode, this.muteGain);
214
214
  const t = e.destination || Kl();
215
215
  if (e.effects) {
216
216
  const s = e.effects(this.muteGain, t, !1);
@@ -488,7 +488,7 @@ var lh = class {
488
488
  }
489
489
  }
490
490
  async init() {
491
- this.isInitialized || (await Af(), this.isInitialized = !0);
491
+ this.isInitialized || (await Ef(), this.isInitialized = !0);
492
492
  }
493
493
  addTrack(e) {
494
494
  const t = {
@@ -554,6 +554,14 @@ var lh = class {
554
554
  } catch (t) {
555
555
  console.warn("[waveform-playlist] Transport.stop() failed:", t);
556
556
  }
557
+ if (this._loopHandler) {
558
+ try {
559
+ e.off("loop", this._loopHandler);
560
+ } catch (t) {
561
+ console.warn("[waveform-playlist] Error removing loop handler:", t);
562
+ }
563
+ this._loopHandler = null;
564
+ }
557
565
  this.tracks.forEach((t) => t.stopAllSources()), this.tracks.forEach((t) => t.cancelFades()), this.clearCompletionEvent();
558
566
  }
559
567
  setMasterGain(e) {
@@ -1002,7 +1010,7 @@ var mh = 44100, gh = 1e3, vh = [256, 512, 1024, 2048, 4096, 8192], rl = 0.1, yh
1002
1010
  if (t !== void 0)
1003
1011
  this._adapter.setLoop(!1, this._loopStart, this._loopEnd);
1004
1012
  else if (this._isLoopEnabled) {
1005
- const a = this._currentTime >= this._loopStart && this._currentTime < this._loopEnd;
1013
+ const a = this._currentTime < this._loopEnd;
1006
1014
  this._adapter.setLoop(a, this._loopStart, this._loopEnd);
1007
1015
  }
1008
1016
  try {
@@ -1039,14 +1047,14 @@ var mh = 44100, gh = 1e3, vh = [256, 512, 1024, 2048, 4096, 8192], rl = 0.1, yh
1039
1047
  setLoopRegion(e, t) {
1040
1048
  const n = Math.min(e, t), r = Math.max(e, t);
1041
1049
  n === this._loopStart && r === this._loopEnd || (this._loopStart = n, this._loopEnd = r, this._adapter?.setLoop(
1042
- this._isLoopEnabled && this._shouldActivateTransportLoop(),
1050
+ this._isLoopEnabled && this._isBeforeLoopEnd(),
1043
1051
  this._loopStart,
1044
1052
  this._loopEnd
1045
1053
  ), this._emitStateChange());
1046
1054
  }
1047
1055
  setLoopEnabled(e) {
1048
1056
  e !== this._isLoopEnabled && (this._isLoopEnabled = e, this._adapter?.setLoop(
1049
- e && this._shouldActivateTransportLoop(),
1057
+ e && this._isBeforeLoopEnd(),
1050
1058
  this._loopStart,
1051
1059
  this._loopEnd
1052
1060
  ), this._emitStateChange());
@@ -1119,20 +1127,19 @@ var mh = 44100, gh = 1e3, vh = [256, 512, 1024, 2048, 4096, 8192], rl = 0.1, yh
1119
1127
  console.warn("[waveform-playlist/engine] Error in event listener:", a);
1120
1128
  }
1121
1129
  }
1122
- _emitStateChange() {
1123
- this._emit("statechange", this.getState());
1124
- }
1125
1130
  /**
1126
- * Returns whether Transport loop should be active right now.
1127
- * When not playing, returns true unconditionally the intent to loop
1128
- * should be honored when playback starts (play() has its own position
1129
- * check). During playback, checks if the live position is within the
1130
- * loop region [loopStart, loopEnd).
1131
+ * Returns whether the current playback position is before loopEnd.
1132
+ * Used by setLoopEnabled/setLoopRegion during playbackif past loopEnd,
1133
+ * Transport loop stays off so playback continues to the end.
1134
+ * Note: play() uses an inline check instead _isPlaying is still false
1135
+ * when play() runs, and this method returns true unconditionally when
1136
+ * not playing.
1131
1137
  */
1132
- _shouldActivateTransportLoop() {
1133
- if (!this._isPlaying) return !0;
1134
- const e = this._adapter?.getCurrentTime() ?? this._currentTime;
1135
- return e >= this._loopStart && e < this._loopEnd;
1138
+ _isBeforeLoopEnd() {
1139
+ return this._isPlaying ? (this._adapter?.getCurrentTime() ?? this._currentTime) < this._loopEnd : !0;
1140
+ }
1141
+ _emitStateChange() {
1142
+ this._emit("statechange", this.getState());
1136
1143
  }
1137
1144
  _startTimeUpdateLoop() {
1138
1145
  if (typeof requestAnimationFrame > "u") return;
@@ -1152,7 +1159,7 @@ function Za() {
1152
1159
  else {
1153
1160
  for (var e, t = !1; Sr !== void 0; ) {
1154
1161
  var n = Sr;
1155
- for (Sr = void 0, Ao++; n !== void 0; ) {
1162
+ for (Sr = void 0, Eo++; n !== void 0; ) {
1156
1163
  var r = n.o;
1157
1164
  if (n.o = void 0, n.f &= -3, !(8 & n.f) && uc(n)) try {
1158
1165
  n.c();
@@ -1162,7 +1169,7 @@ function Za() {
1162
1169
  n = r;
1163
1170
  }
1164
1171
  }
1165
- if (Ao = 0, on--, t) throw e;
1172
+ if (Eo = 0, on--, t) throw e;
1166
1173
  }
1167
1174
  }
1168
1175
  function sn(e) {
@@ -1184,7 +1191,7 @@ function Se(e) {
1184
1191
  ve = t;
1185
1192
  }
1186
1193
  }
1187
- var Sr = void 0, on = 0, Ao = 0, Sa = 0;
1194
+ var Sr = void 0, on = 0, Eo = 0, Sa = 0;
1188
1195
  function cc(e) {
1189
1196
  if (ve !== void 0) {
1190
1197
  var t = e.n;
@@ -1253,7 +1260,7 @@ Object.defineProperty(ut.prototype, "value", { get: function() {
1253
1260
  return e !== void 0 && (e.i = this.i), this.v;
1254
1261
  }, set: function(e) {
1255
1262
  if (e !== this.v) {
1256
- if (Ao > 100) throw new Error("Cycle detected");
1263
+ if (Eo > 100) throw new Error("Cycle detected");
1257
1264
  this.v = e, this.i++, Sa++, on++;
1258
1265
  try {
1259
1266
  for (var t = this.t; t !== void 0; t = t.x) t.t.N();
@@ -1393,19 +1400,19 @@ function Mt(e, t) {
1393
1400
  var r = n.d.bind(n);
1394
1401
  return r[Symbol.dispose] = r, r;
1395
1402
  }
1396
- var _h = Object.create, ps = Object.defineProperty, xh = Object.defineProperties, Ch = Object.getOwnPropertyDescriptor, Sh = Object.getOwnPropertyDescriptors, ol = Object.getOwnPropertySymbols, kh = Object.prototype.hasOwnProperty, Ih = Object.prototype.propertyIsEnumerable, Ah = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), Qn = (e) => {
1403
+ var _h = Object.create, ps = Object.defineProperty, xh = Object.defineProperties, Ch = Object.getOwnPropertyDescriptor, Sh = Object.getOwnPropertyDescriptors, ol = Object.getOwnPropertySymbols, kh = Object.prototype.hasOwnProperty, Ih = Object.prototype.propertyIsEnumerable, Eh = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), Qn = (e) => {
1397
1404
  throw TypeError(e);
1398
- }, Eo = (e, t, n) => t in e ? ps(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Eh = (e, t) => {
1405
+ }, Ao = (e, t, n) => t in e ? ps(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ah = (e, t) => {
1399
1406
  for (var n in t || (t = {}))
1400
- kh.call(t, n) && Eo(e, n, t[n]);
1407
+ kh.call(t, n) && Ao(e, n, t[n]);
1401
1408
  if (ol)
1402
1409
  for (var n of ol(t))
1403
- Ih.call(t, n) && Eo(e, n, t[n]);
1410
+ Ih.call(t, n) && Ao(e, n, t[n]);
1404
1411
  return e;
1405
1412
  }, Mh = (e, t) => xh(e, Sh(t)), sl = (e, t) => ps(e, "name", { value: t, configurable: !0 }), $h = (e) => {
1406
1413
  var t;
1407
1414
  return [, , , _h((t = void 0) != null ? t : null)];
1408
- }, pc = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], hr = (e) => e !== void 0 && typeof e != "function" ? Qn("Function expected") : e, Th = (e, t, n, r, a) => ({ kind: pc[e], name: t, metadata: r, addInitializer: (o) => n._ ? Qn("Already initialized") : a.push(hr(o || null)) }), mc = (e, t) => Eo(t, Ah("metadata"), e[3]), mn = (e, t, n, r) => {
1415
+ }, pc = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], hr = (e) => e !== void 0 && typeof e != "function" ? Qn("Function expected") : e, Th = (e, t, n, r, a) => ({ kind: pc[e], name: t, metadata: r, addInitializer: (o) => n._ ? Qn("Already initialized") : a.push(hr(o || null)) }), mc = (e, t) => Ao(t, Eh("metadata"), e[3]), mn = (e, t, n, r) => {
1409
1416
  for (var a = 0, o = e[t >> 1], s = o && o.length; a < s; a++) t & 1 ? o[a].call(n) : r = o[a].call(n, r);
1410
1417
  return r;
1411
1418
  }, er = (e, t, n, r, a, o) => {
@@ -1480,7 +1487,7 @@ function io(e = !0) {
1480
1487
  return function(t, n) {
1481
1488
  n.addInitializer(function() {
1482
1489
  const r = n.kind === "field" ? this : n.static ? this : Object.getPrototypeOf(this), a = Object.getOwnPropertyDescriptor(r, n.name);
1483
- a && Object.defineProperty(r, n.name, Mh(Eh({}, a), { enumerable: e }));
1490
+ a && Object.defineProperty(r, n.name, Mh(Ah({}, a), { enumerable: e }));
1484
1491
  });
1485
1492
  };
1486
1493
  }
@@ -1552,11 +1559,11 @@ var Rh = Object.create, Cc = Object.defineProperty, Wh = Object.getOwnPropertyDe
1552
1559
  }, kc = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Ic = (e) => e !== void 0 && typeof e != "function" ? Ha("Function expected") : e, Lh = (e, t, n, r, a) => ({ kind: kc[e], name: t, metadata: r, addInitializer: (o) => n._ ? Ha("Already initialized") : a.push(Ic(o || null)) }), zh = (e, t) => Ro(t, Sc("metadata"), e[3]), Zh = (e, t, n, r) => {
1553
1560
  for (var a = 0, o = e[t >> 1], s = o && o.length; a < s; a++) o[a].call(n);
1554
1561
  return r;
1555
- }, Ac = (e, t, n, r, a, o) => {
1562
+ }, Ec = (e, t, n, r, a, o) => {
1556
1563
  for (var s, i, l, c, u = t & 7, d = !1, h = !1, f = 2, m = kc[u + 5], y = e[f] || (e[f] = []), v = (a = a.prototype, Wh(a, n)), p = r.length - 1; p >= 0; p--)
1557
1564
  l = Lh(u, n, i = {}, e[3], y), l.static = d, l.private = h, c = l.access = { has: (b) => n in b }, c.get = (b) => b[n], s = (0, r[p])(v[m], l), i._ = 1, Ic(s) && (v[m] = s);
1558
1565
  return v && Cc(a, n, v), a;
1559
- }, Ec = (e, t, n) => t.has(e) || Ha("Cannot " + n), Hh = (e, t, n) => (Ec(e, t, "read from private field"), t.get(e)), Nh = (e, t, n) => t.has(e) ? Ha("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Xh = (e, t, n, r) => (Ec(e, t, "write to private field"), t.set(e, n), n), Vt = class Wo {
1566
+ }, Ac = (e, t, n) => t.has(e) || Ha("Cannot " + n), Hh = (e, t, n) => (Ac(e, t, "read from private field"), t.get(e)), Nh = (e, t, n) => t.has(e) ? Ha("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Xh = (e, t, n, r) => (Ac(e, t, "write to private field"), t.set(e, n), n), Vt = class Wo {
1560
1567
  /**
1561
1568
  * @param {number} Coordinate of the point on the horizontal axis
1562
1569
  * @param {number} Coordinate of the point on the vertical axis
@@ -1719,8 +1726,8 @@ var Mc, $c, Fo, fa, Zr, Na = class extends (Fo = cn, $c = [De], Mc = [De], Fo) {
1719
1726
  };
1720
1727
  Zr = Vh(Fo);
1721
1728
  fa = /* @__PURE__ */ new WeakMap();
1722
- Ac(Zr, 2, "delta", $c, Na);
1723
- Ac(Zr, 2, "direction", Mc, Na);
1729
+ Ec(Zr, 2, "delta", $c, Na);
1730
+ Ec(Zr, 2, "direction", Mc, Na);
1724
1731
  zh(Zr, Na);
1725
1732
  function Oo({ x: e, y: t }, n) {
1726
1733
  const r = Math.abs(e), a = Math.abs(t);
@@ -1746,7 +1753,7 @@ var Tc = /* @__PURE__ */ ((e) => (e.Horizontal = "x", e.Vertical = "y", e))(Tc |
1746
1753
  }, nr = (e) => {
1747
1754
  var t;
1748
1755
  return [, , , Yh((t = e?.[Wc("metadata")]) != null ? t : null)];
1749
- }, Vc = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], pr = (e) => e !== void 0 && typeof e != "function" ? tr("Function expected") : e, qh = (e, t, n, r, a) => ({ kind: Vc[e], name: t, metadata: r, addInitializer: (o) => n._ ? tr("Already initialized") : a.push(pr(o || null)) }), An = (e, t) => Bo(t, Wc("metadata"), e[3]), ee = (e, t, n, r) => {
1756
+ }, Vc = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], pr = (e) => e !== void 0 && typeof e != "function" ? tr("Function expected") : e, qh = (e, t, n, r, a) => ({ kind: Vc[e], name: t, metadata: r, addInitializer: (o) => n._ ? tr("Already initialized") : a.push(pr(o || null)) }), En = (e, t) => Bo(t, Wc("metadata"), e[3]), ee = (e, t, n, r) => {
1750
1757
  for (var a = 0, o = e[t >> 1], s = o && o.length; a < s; a++) t & 1 ? o[a].call(n) : r = o[a].call(n, r);
1751
1758
  return r;
1752
1759
  }, de = (e, t, n, r, a, o) => {
@@ -1758,7 +1765,7 @@ var Tc = /* @__PURE__ */ ((e) => (e.Horizontal = "x", e.Vertical = "y", e))(Tc |
1758
1765
  d ? f && d < 4 && cl(o, (d > 2 ? "set " : d > 1 ? "get " : "") + n) : cl(a, n);
1759
1766
  for (var w = r.length - 1; w >= 0; w--)
1760
1767
  c = qh(d, n, l = {}, e[3], p), d && (c.static = h, c.private = f, u = c.access = { has: f ? (g) => Jh(a, g) : (g) => n in g }, d ^ 3 && (u.get = f ? (g) => (d ^ 1 ? je : Qh)(g, a, d ^ 4 ? o : b.get) : (g) => g[n]), d > 2 && (u.set = f ? (g, _) => It(g, a, _, d ^ 4 ? o : b.set) : (g, _) => g[n] = _)), i = (0, r[w])(d ? d < 4 ? f ? o : b[y] : d > 4 ? void 0 : { get: b.get, set: b.set } : a, c), l._ = 1, d ^ 4 || i === void 0 ? pr(i) && (d > 4 ? v.unshift(i) : d ? f ? o = i : b[y] = i : a = i) : typeof i != "object" || i === null ? tr("Object expected") : (pr(s = i.get) && (b.get = s), pr(s = i.set) && (b.set = s), pr(s = i.init) && v.unshift(s));
1761
- return d || An(e, a), b && bs(a, n, b), f ? d ^ 4 ? o : b : a;
1768
+ return d || En(e, a), b && bs(a, n, b), f ? d ^ 4 ? o : b : a;
1762
1769
  }, ws = (e, t, n) => t.has(e) || tr("Cannot " + n), Jh = (e, t) => Object(t) !== t ? tr('Cannot use the "in" operator on this value') : e.has(t), je = (e, t, n) => (ws(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Ce = (e, t, n) => t.has(e) ? tr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), It = (e, t, n, r) => (ws(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), Qh = (e, t, n) => (ws(e, t, "access private method"), n);
1763
1770
  function Lc(e, t) {
1764
1771
  return {
@@ -1862,7 +1869,7 @@ Tr = nr(null);
1862
1869
  xs = /* @__PURE__ */ new WeakMap();
1863
1870
  ha = /* @__PURE__ */ new WeakMap();
1864
1871
  de(Tr, 4, "disabled", zc, pt, xs);
1865
- An(Tr, pt);
1872
+ En(Tr, pt);
1866
1873
  var Hr = class extends pt {
1867
1874
  }, pa, ho = class {
1868
1875
  /**
@@ -2133,17 +2140,17 @@ var ap = class extends Hr {
2133
2140
  }
2134
2141
  );
2135
2142
  }
2136
- }, Cs = /* @__PURE__ */ ((e) => (e[e.Lowest = 0] = "Lowest", e[e.Low = 1] = "Low", e[e.Normal = 2] = "Normal", e[e.High = 3] = "High", e[e.Highest = 4] = "Highest", e))(Cs || {}), Ss = /* @__PURE__ */ ((e) => (e[e.Collision = 0] = "Collision", e[e.ShapeIntersection = 1] = "ShapeIntersection", e[e.PointerIntersection = 2] = "PointerIntersection", e))(Ss || {}), Zc, Hc, Nc, Xc, Gc, Yc, Uc, Et, ks;
2143
+ }, Cs = /* @__PURE__ */ ((e) => (e[e.Lowest = 0] = "Lowest", e[e.Low = 1] = "Low", e[e.Normal = 2] = "Normal", e[e.High = 3] = "High", e[e.Highest = 4] = "Highest", e))(Cs || {}), Ss = /* @__PURE__ */ ((e) => (e[e.Collision = 0] = "Collision", e[e.ShapeIntersection = 1] = "ShapeIntersection", e[e.PointerIntersection = 2] = "PointerIntersection", e))(Ss || {}), Zc, Hc, Nc, Xc, Gc, Yc, Uc, At, ks;
2137
2144
  Uc = [fe], Yc = [De], Gc = [De], Xc = [De], Nc = [De], Hc = [De], Zc = [De];
2138
2145
  var qt = class {
2139
2146
  constructor() {
2140
- ee(Et, 5, this), Ce(this, ks, ee(
2141
- Et,
2147
+ ee(At, 5, this), Ce(this, ks, ee(
2148
+ At,
2142
2149
  8,
2143
2150
  this,
2144
2151
  "idle"
2145
2152
  /* Idle */
2146
- )), ee(Et, 11, this);
2153
+ )), ee(At, 11, this);
2147
2154
  }
2148
2155
  get current() {
2149
2156
  return this.value;
@@ -2173,16 +2180,16 @@ var qt = class {
2173
2180
  this.value = e;
2174
2181
  }
2175
2182
  };
2176
- Et = nr(null);
2183
+ At = nr(null);
2177
2184
  ks = /* @__PURE__ */ new WeakMap();
2178
- de(Et, 4, "value", Uc, qt, ks);
2179
- de(Et, 2, "current", Yc, qt);
2180
- de(Et, 2, "idle", Gc, qt);
2181
- de(Et, 2, "initializing", Xc, qt);
2182
- de(Et, 2, "initialized", Nc, qt);
2183
- de(Et, 2, "dragging", Hc, qt);
2184
- de(Et, 2, "dropped", Zc, qt);
2185
- An(Et, qt);
2185
+ de(At, 4, "value", Uc, qt, ks);
2186
+ de(At, 2, "current", Yc, qt);
2187
+ de(At, 2, "idle", Gc, qt);
2188
+ de(At, 2, "initializing", Xc, qt);
2189
+ de(At, 2, "initialized", Nc, qt);
2190
+ de(At, 2, "dragging", Hc, qt);
2191
+ de(At, 2, "dropped", Zc, qt);
2192
+ En(At, qt);
2186
2193
  var op = class {
2187
2194
  /**
2188
2195
  * Creates a new instance of drag actions.
@@ -2362,7 +2369,7 @@ var op = class {
2362
2369
  }), o ? o.then(i).catch(() => r.reset()) : i();
2363
2370
  });
2364
2371
  }
2365
- }, Kc, jc, qc, Jc, ht, Is, As, Es, Ms;
2372
+ }, Kc, jc, qc, Jc, ht, Is, Es, As, Ms;
2366
2373
  Jc = [fe], qc = [fe], jc = [fe], Kc = [fe];
2367
2374
  var un = class {
2368
2375
  /**
@@ -2372,7 +2379,7 @@ var un = class {
2372
2379
  * @param manager - The manager that controls the drag and drop operations.
2373
2380
  */
2374
2381
  constructor(e, t) {
2375
- Ce(this, Is, ee(ht, 8, this)), ee(ht, 11, this), Ce(this, As, ee(ht, 12, this)), ee(ht, 15, this), Ce(this, Es, ee(ht, 16, this)), ee(ht, 19, this), Ce(this, Ms, ee(ht, 20, this)), ee(ht, 23, this);
2382
+ Ce(this, Is, ee(ht, 8, this)), ee(ht, 11, this), Ce(this, Es, ee(ht, 12, this)), ee(ht, 15, this), Ce(this, As, ee(ht, 16, this)), ee(ht, 19, this), Ce(this, Ms, ee(ht, 20, this)), ee(ht, 23, this);
2376
2383
  const { effects: n, id: r, data: a = {}, disabled: o = !1, register: s = !0 } = e;
2377
2384
  let i = r;
2378
2385
  this.manager = t, this.id = r, this.data = a, this.disabled = o, this.effects = () => {
@@ -2414,14 +2421,14 @@ var un = class {
2414
2421
  };
2415
2422
  ht = nr(null);
2416
2423
  Is = /* @__PURE__ */ new WeakMap();
2417
- As = /* @__PURE__ */ new WeakMap();
2418
2424
  Es = /* @__PURE__ */ new WeakMap();
2425
+ As = /* @__PURE__ */ new WeakMap();
2419
2426
  Ms = /* @__PURE__ */ new WeakMap();
2420
2427
  de(ht, 4, "manager", Jc, un, Is);
2421
- de(ht, 4, "id", qc, un, As);
2422
- de(ht, 4, "data", jc, un, Es);
2428
+ de(ht, 4, "id", qc, un, Es);
2429
+ de(ht, 4, "data", jc, un, As);
2423
2430
  de(ht, 4, "disabled", Kc, un, Ms);
2424
- An(ht, un);
2431
+ En(ht, un);
2425
2432
  var ul = class {
2426
2433
  constructor() {
2427
2434
  this.map = Vr(/* @__PURE__ */ new Map()), this.cleanupFunctions = /* @__PURE__ */ new WeakMap(), this.register = (e, t) => {
@@ -2507,7 +2514,7 @@ de(lt, 4, "status", nu, zt, Ds);
2507
2514
  de(lt, 2, "isDropping", tu, zt);
2508
2515
  de(lt, 2, "isDragging", eu, zt);
2509
2516
  de(lt, 2, "isDragSource", Qc, zt);
2510
- An(lt, zt);
2517
+ En(lt, zt);
2511
2518
  var ou, su, iu, lu, cu, uu, Lo, Xe, Ps, Rs, Ws, Fs, Os, Zt = class extends (Lo = un, uu = [fe], cu = [fe], lu = [fe], iu = [fe], su = [fe], ou = [De], Lo) {
2512
2519
  constructor(t, n) {
2513
2520
  var r = t, { accept: a, collisionDetector: o, collisionPriority: s, type: i } = r, l = Bc(r, ["accept", "collisionDetector", "collisionPriority", "type"]);
@@ -2540,7 +2547,7 @@ de(Xe, 4, "collisionDetector", lu, Zt, Ws);
2540
2547
  de(Xe, 4, "collisionPriority", iu, Zt, Fs);
2541
2548
  de(Xe, 4, "shape", su, Zt, Os);
2542
2549
  de(Xe, 2, "isDropTarget", ou, Zt);
2543
- An(Xe, Zt);
2550
+ En(Xe, Zt);
2544
2551
  var Gn = class extends pt {
2545
2552
  /**
2546
2553
  * Creates a new sensor instance.
@@ -2760,7 +2767,7 @@ de(Pe, 4, "modifiers", mu, Rt, Zs);
2760
2767
  de(Pe, 2, "source", pu, Rt);
2761
2768
  de(Pe, 2, "target", hu, Rt);
2762
2769
  de(Pe, 2, "transform", fu, Rt);
2763
- An(Pe, Rt);
2770
+ En(Pe, Rt);
2764
2771
  var lp = {
2765
2772
  get rendering() {
2766
2773
  return Promise.resolve();
@@ -2887,12 +2894,12 @@ function Cn(e) {
2887
2894
  function Cu(e) {
2888
2895
  return e instanceof $t(e).SVGElement || "namespaceURI" in e && typeof e.namespaceURI == "string" && e.namespaceURI.endsWith("svg");
2889
2896
  }
2890
- function En(e) {
2897
+ function An(e) {
2891
2898
  return e ? Ns(e) ? e.document : Nr(e) ? Xs(e) ? e : Cn(e) || Cu(e) ? e.ownerDocument : document : document : document;
2892
2899
  }
2893
2900
  function dp(e) {
2894
2901
  var t, n, r, a;
2895
- const { documentElement: o } = En(e), s = $t(e).visualViewport, i = (t = s?.width) != null ? t : o.clientWidth, l = (n = s?.height) != null ? n : o.clientHeight, c = (r = s?.offsetTop) != null ? r : 0, u = (a = s?.offsetLeft) != null ? a : 0;
2902
+ const { documentElement: o } = An(e), s = $t(e).visualViewport, i = (t = s?.width) != null ? t : o.clientWidth, l = (n = s?.height) != null ? n : o.clientHeight, c = (r = s?.offsetTop) != null ? r : 0, u = (a = s?.offsetLeft) != null ? a : 0;
2896
2903
  return {
2897
2904
  top: c,
2898
2905
  left: u,
@@ -2911,7 +2918,7 @@ function fp(e, t) {
2911
2918
  function hp(e) {
2912
2919
  return e.tagName === "DETAILS";
2913
2920
  }
2914
- function Aa(e, t = e.getBoundingClientRect(), n = 0) {
2921
+ function Ea(e, t = e.getBoundingClientRect(), n = 0) {
2915
2922
  var r, a, o, s, i;
2916
2923
  let l = t;
2917
2924
  const { ownerDocument: c } = e, u = (r = c.defaultView) != null ? r : window;
@@ -2993,7 +3000,7 @@ function ku() {
2993
3000
  function Ys(e) {
2994
3001
  return !e || !Nr(e) ? !1 : e instanceof $t(e).ShadowRoot;
2995
3002
  }
2996
- function Ea(e) {
3003
+ function Aa(e) {
2997
3004
  if (e && Nr(e)) {
2998
3005
  let t = e.getRootNode();
2999
3006
  if (Ys(t))
@@ -3001,7 +3008,7 @@ function Ea(e) {
3001
3008
  if (t instanceof Document)
3002
3009
  return t;
3003
3010
  }
3004
- return En(e);
3011
+ return An(e);
3005
3012
  }
3006
3013
  function Iu(e) {
3007
3014
  return e.matchMedia("(prefers-reduced-motion: reduce)").matches;
@@ -3022,13 +3029,13 @@ function dl(e) {
3022
3029
  function fl(e) {
3023
3030
  return e.tagName === "CANVAS";
3024
3031
  }
3025
- function Au(e, { x: t, y: n }) {
3032
+ function Eu(e, { x: t, y: n }) {
3026
3033
  const r = e.elementFromPoint(t, n);
3027
3034
  if (mp(r)) {
3028
3035
  const { contentDocument: a } = r;
3029
3036
  if (a) {
3030
3037
  const { left: o, top: s } = r.getBoundingClientRect();
3031
- return Au(a, {
3038
+ return Eu(a, {
3032
3039
  x: t - o,
3033
3040
  y: n - s
3034
3041
  });
@@ -3050,7 +3057,7 @@ function gp(e) {
3050
3057
  [contenteditable]:not([contenteditable="false"])
3051
3058
  `);
3052
3059
  }
3053
- var Eu = class {
3060
+ var Au = class {
3054
3061
  constructor() {
3055
3062
  this.entries = /* @__PURE__ */ new Set(), this.clear = () => {
3056
3063
  for (const e of this.entries) {
@@ -3106,7 +3113,7 @@ function bp(e, t) {
3106
3113
  return e === t ? !0 : !e || !t ? !1 : e.top == t.top && e.left == t.left && e.right == t.right && e.bottom == t.bottom;
3107
3114
  }
3108
3115
  function wp(e, t = e.getBoundingClientRect()) {
3109
- const { width: n, height: r } = Aa(
3116
+ const { width: n, height: r } = Ea(
3110
3117
  e,
3111
3118
  t
3112
3119
  );
@@ -3144,13 +3151,13 @@ var pl = Array.from({ length: 100 }, (e, t) => t / 100), $u = 75, yn, Ma, en, bn
3144
3151
  const { element: l } = this;
3145
3152
  if ((o = re(this, bn)) == null || o.disconnect(), re(this, kr) || !re(this, yn) || !l.isConnected)
3146
3153
  return;
3147
- const c = (s = l.ownerDocument) != null ? s : document, { innerHeight: u, innerWidth: d } = (i = c.defaultView) != null ? i : window, h = l.getBoundingClientRect(), f = Aa(l, h), { top: m, left: y, bottom: v, right: p } = f, b = -Math.floor(m), w = -Math.floor(y), g = -Math.floor(d - p), _ = -Math.floor(u - v), C = `${b}px ${g}px ${_}px ${w}px`;
3154
+ const c = (s = l.ownerDocument) != null ? s : document, { innerHeight: u, innerWidth: d } = (i = c.defaultView) != null ? i : window, h = l.getBoundingClientRect(), f = Ea(l, h), { top: m, left: y, bottom: v, right: p } = f, b = -Math.floor(m), w = -Math.floor(y), g = -Math.floor(d - p), _ = -Math.floor(u - v), C = `${b}px ${g}px ${_}px ${w}px`;
3148
3155
  this.boundingClientRect = h, yt(this, bn, new IntersectionObserver(
3149
3156
  (S) => {
3150
3157
  const [k] = S, { intersectionRect: I } = k;
3151
3158
  (k.intersectionRatio !== 1 ? k.intersectionRatio : zr.intersectionRatio(
3152
3159
  I,
3153
- Aa(l)
3160
+ Ea(l)
3154
3161
  )) !== 1 && re(this, yr).call(this);
3155
3162
  },
3156
3163
  {
@@ -3192,7 +3199,7 @@ Tu = function() {
3192
3199
  };
3193
3200
  Du = function() {
3194
3201
  if (re(this, Qe)) {
3195
- const { top: e, left: t, width: n, height: r } = Aa(
3202
+ const { top: e, left: t, width: n, height: r } = Ea(
3196
3203
  this.element
3197
3204
  );
3198
3205
  re(this, Qe).style.overflow = "hidden", re(this, Qe).style.visibility = "visible", re(this, Qe).style.top = `${Math.floor(e)}px`, re(this, Qe).style.left = `${Math.floor(t)}px`, re(this, Qe).style.width = `${Math.floor(n)}px`, re(this, Qe).style.height = `${Math.floor(r)}px`;
@@ -3273,7 +3280,7 @@ function Pr(e) {
3273
3280
  }
3274
3281
  }
3275
3282
  function ml(e) {
3276
- return !Su || !e ? !1 : e === En(e).scrollingElement;
3283
+ return !Su || !e ? !1 : e === An(e).scrollingElement;
3277
3284
  }
3278
3285
  function Ru(e) {
3279
3286
  var t, n;
@@ -3302,7 +3309,7 @@ function Ru(e) {
3302
3309
  isRight: d
3303
3310
  };
3304
3311
  }
3305
- function Ap(e, t) {
3312
+ function Ep(e, t) {
3306
3313
  const { isTop: n, isBottom: r, isLeft: a, isRight: o, position: s } = Ru(e), { x: i, y: l } = t ?? { x: 0, y: 0 }, c = !n && s.current.y + l > 0, u = !r && s.current.y + l < s.max.y, d = !a && s.current.x + i > 0, h = !o && s.current.x + i < s.max.x;
3307
3314
  return {
3308
3315
  top: c,
@@ -3329,11 +3336,11 @@ var Us = class {
3329
3336
  }
3330
3337
  }, Ta = new Us((e) => {
3331
3338
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(e) : e();
3332
- }), Ep = new Us((e) => setTimeout(e, 50)), Da = /* @__PURE__ */ new Map(), Mp = Da.clear.bind(Da);
3339
+ }), Ap = new Us((e) => setTimeout(e, 50)), Da = /* @__PURE__ */ new Map(), Mp = Da.clear.bind(Da);
3333
3340
  function Jt(e, t = !1) {
3334
3341
  if (!t) return gl(e);
3335
3342
  let n = Da.get(e);
3336
- return n || (n = gl(e), Da.set(e, n), Ep.schedule(Mp), n);
3343
+ return n || (n = gl(e), Da.set(e, n), Ap.schedule(Mp), n);
3337
3344
  }
3338
3345
  function gl(e) {
3339
3346
  return $t(e).getComputedStyle(e);
@@ -3472,7 +3479,7 @@ function Fp(e) {
3472
3479
  }
3473
3480
  return null;
3474
3481
  }
3475
- var At = /* @__PURE__ */ ((e) => (e[e.Idle = 0] = "Idle", e[e.Forward = 1] = "Forward", e[e.Reverse = -1] = "Reverse", e))(At || {}), Op = {
3482
+ var Et = /* @__PURE__ */ ((e) => (e[e.Idle = 0] = "Idle", e[e.Forward = 1] = "Forward", e[e.Reverse = -1] = "Reverse", e))(Et || {}), Op = {
3476
3483
  x: 0.2,
3477
3484
  y: 0.2
3478
3485
  }, Bp = {
@@ -3649,7 +3656,7 @@ function Kp(e, t) {
3649
3656
  }
3650
3657
  return a;
3651
3658
  }
3652
- function Ar(e) {
3659
+ function Er(e) {
3653
3660
  return "style" in e && typeof e.style == "object" && e.style !== null && "setProperty" in e.style && "removeProperty" in e.style && typeof e.style.setProperty == "function" && typeof e.style.removeProperty == "function";
3654
3661
  }
3655
3662
  var jp = class {
@@ -3658,7 +3665,7 @@ var jp = class {
3658
3665
  }
3659
3666
  set(e, t = "") {
3660
3667
  const { element: n } = this;
3661
- if (Ar(n))
3668
+ if (Er(n))
3662
3669
  for (const [r, a] of Object.entries(e)) {
3663
3670
  const o = `${t}${r}`;
3664
3671
  this.initial.has(o) || this.initial.set(o, n.style.getPropertyValue(o)), n.style.setProperty(
@@ -3669,7 +3676,7 @@ var jp = class {
3669
3676
  }
3670
3677
  remove(e, t = "") {
3671
3678
  const { element: n } = this;
3672
- if (Ar(n))
3679
+ if (Er(n))
3673
3680
  for (const r of e) {
3674
3681
  const a = `${t}${r}`;
3675
3682
  n.style.removeProperty(a);
@@ -3677,7 +3684,7 @@ var jp = class {
3677
3684
  }
3678
3685
  reset() {
3679
3686
  const { element: e } = this;
3680
- if (Ar(e)) {
3687
+ if (Er(e)) {
3681
3688
  for (const [t, n] of this.initial)
3682
3689
  e.style.setProperty(t, n);
3683
3690
  e.getAttribute("style") === "" && e.removeAttribute("style");
@@ -3776,15 +3783,15 @@ var em = ({
3776
3783
  return r;
3777
3784
  }, _t = (e, t, n, r, a, o) => {
3778
3785
  var s, i, l, c, u, d = t & 7, h = !!(t & 8), f = !!(t & 16), m = d > 3 ? e.length + 1 : d ? h ? 1 : 2 : 0, y = Vu[d + 5], v = d > 3 && (e[m - 1] = []), p = e[m] || (e[m] = []), b = d && (!f && !h && (a = a.prototype), d < 5 && (d > 3 || !f) && om(d < 4 ? a : { get [n]() {
3779
- return Ee(this, o);
3786
+ return Ae(this, o);
3780
3787
  }, set [n](g) {
3781
3788
  return ct(this, o, g);
3782
3789
  } }, n));
3783
3790
  d ? f && d < 4 && vl(o, (d > 2 ? "set " : d > 1 ? "get " : "") + n) : vl(a, n);
3784
3791
  for (var w = r.length - 1; w >= 0; w--)
3785
- c = im(d, n, l = {}, e[3], p), d && (c.static = h, c.private = f, u = c.access = { has: f ? (g) => lm(a, g) : (g) => n in g }, d ^ 3 && (u.get = f ? (g) => (d ^ 1 ? Ee : kn)(g, a, d ^ 4 ? o : b.get) : (g) => g[n]), d > 2 && (u.set = f ? (g, _) => ct(g, a, _, d ^ 4 ? o : b.set) : (g, _) => g[n] = _)), i = (0, r[w])(d ? d < 4 ? f ? o : b[y] : d > 4 ? void 0 : { get: b.get, set: b.set } : a, c), l._ = 1, d ^ 4 || i === void 0 ? _r(i) && (d > 4 ? v.unshift(i) : d ? f ? o = i : b[y] = i : a = i) : typeof i != "object" || i === null ? ar("Object expected") : (_r(s = i.get) && (b.get = s), _r(s = i.set) && (b.set = s), _r(s = i.init) && v.unshift(s));
3792
+ c = im(d, n, l = {}, e[3], p), d && (c.static = h, c.private = f, u = c.access = { has: f ? (g) => lm(a, g) : (g) => n in g }, d ^ 3 && (u.get = f ? (g) => (d ^ 1 ? Ae : kn)(g, a, d ^ 4 ? o : b.get) : (g) => g[n]), d > 2 && (u.set = f ? (g, _) => ct(g, a, _, d ^ 4 ? o : b.set) : (g, _) => g[n] = _)), i = (0, r[w])(d ? d < 4 ? f ? o : b[y] : d > 4 ? void 0 : { get: b.get, set: b.set } : a, c), l._ = 1, d ^ 4 || i === void 0 ? _r(i) && (d > 4 ? v.unshift(i) : d ? f ? o = i : b[y] = i : a = i) : typeof i != "object" || i === null ? ar("Object expected") : (_r(s = i.get) && (b.get = s), _r(s = i.set) && (b.set = s), _r(s = i.init) && v.unshift(s));
3786
3793
  return d || Mn(e, a), b && Js(a, n, b), f ? d ^ 4 ? o : b : a;
3787
- }, ei = (e, t, n) => t.has(e) || ar("Cannot " + n), lm = (e, t) => Object(t) !== t ? ar('Cannot use the "in" operator on this value') : e.has(t), Ee = (e, t, n) => (ei(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Re = (e, t, n) => t.has(e) ? ar("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ct = (e, t, n, r) => (ei(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), kn = (e, t, n) => (ei(e, t, "access private method"), n), yl = {
3794
+ }, ei = (e, t, n) => t.has(e) || ar("Cannot " + n), lm = (e, t) => Object(t) !== t ? ar('Cannot use the "in" operator on this value') : e.has(t), Ae = (e, t, n) => (ei(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Re = (e, t, n) => t.has(e) ? ar("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ct = (e, t, n, r) => (ei(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), kn = (e, t, n) => (ei(e, t, "access private method"), n), yl = {
3788
3795
  role: "button",
3789
3796
  roleDescription: "draggable"
3790
3797
  }, cm = "dnd-kit-description", um = "dnd-kit-announcement", dm = {
@@ -3840,8 +3847,8 @@ var gm = ["dragover", "dragmove"], vm = class extends pt {
3840
3847
  (S, k) => {
3841
3848
  const I = h;
3842
3849
  if (!I) return;
3843
- const A = C?.(S, k);
3844
- A && I.nodeValue !== A && (f = A, gm.includes(_) ? v() : (y(), v.cancel()));
3850
+ const E = C?.(S, k);
3851
+ E && I.nodeValue !== E && (f = E, gm.includes(_) ? v() : (y(), v.cancel()));
3845
3852
  }
3846
3853
  )
3847
3854
  ), b = () => {
@@ -3872,8 +3879,8 @@ var gm = ["dragover", "dragmove"], vm = class extends pt {
3872
3879
  () => S.setAttribute("aria-describedby", l)
3873
3880
  );
3874
3881
  for (const I of ["aria-pressed", "aria-grabbed"]) {
3875
- const A = String(C.isDragging);
3876
- S.getAttribute(I) !== A && w.add(() => S.setAttribute(I, A));
3882
+ const E = String(C.isDragging);
3883
+ S.getAttribute(I) !== E && w.add(() => S.setAttribute(I, E));
3877
3884
  }
3878
3885
  const k = String(C.disabled);
3879
3886
  S.getAttribute("aria-disabled") !== k && w.add(
@@ -3900,7 +3907,7 @@ var bm = class extends pt {
3900
3907
  const n = ka(
3901
3908
  () => {
3902
3909
  var r;
3903
- return En((r = this.manager.dragOperation.source) == null ? void 0 : r.element);
3910
+ return An((r = this.manager.dragOperation.source) == null ? void 0 : r.element);
3904
3911
  }
3905
3912
  );
3906
3913
  this.destroy = Mt(() => {
@@ -3912,9 +3919,9 @@ var bm = class extends pt {
3912
3919
  }
3913
3920
  });
3914
3921
  }
3915
- }, Ra = /* @__PURE__ */ new Map(), Lu, zu, Zu, Hu, Yo, Er, jt, ti, jn, Nu, Xu, Gu, Yu, $n = class extends (Yo = Hr, Hu = [fe], Zu = [De], zu = [De], Lu = [De], Yo) {
3922
+ }, Ra = /* @__PURE__ */ new Map(), Lu, zu, Zu, Hu, Yo, Ar, jt, ti, jn, Nu, Xu, Gu, Yu, $n = class extends (Yo = Hr, Hu = [fe], Zu = [De], zu = [De], Lu = [De], Yo) {
3916
3923
  constructor(e) {
3917
- super(e), Be(jt, 5, this), Re(this, jn), Re(this, Er, /* @__PURE__ */ new Set()), Re(this, ti, Be(jt, 8, this, /* @__PURE__ */ new Set())), Be(jt, 11, this), this.registerEffect(kn(this, jn, Nu));
3924
+ super(e), Be(jt, 5, this), Re(this, jn), Re(this, Ar, /* @__PURE__ */ new Set()), Re(this, ti, Be(jt, 8, this, /* @__PURE__ */ new Set())), Be(jt, 11, this), this.registerEffect(kn(this, jn, Nu));
3918
3925
  }
3919
3926
  /**
3920
3927
  * Registers CSS rules to be injected into the active drag operation's
@@ -3924,8 +3931,8 @@ var bm = class extends pt {
3924
3931
  * Returns a cleanup function that unregisters the rules.
3925
3932
  */
3926
3933
  register(e) {
3927
- return Ee(this, Er).add(e), () => {
3928
- Ee(this, Er).delete(e);
3934
+ return Ae(this, Ar).add(e), () => {
3935
+ Ae(this, Ar).delete(e);
3929
3936
  };
3930
3937
  }
3931
3938
  /**
@@ -3946,12 +3953,12 @@ var bm = class extends pt {
3946
3953
  get sourceRoot() {
3947
3954
  var e;
3948
3955
  const { source: t } = this.manager.dragOperation;
3949
- return Ea((e = t?.element) != null ? e : null);
3956
+ return Aa((e = t?.element) != null ? e : null);
3950
3957
  }
3951
3958
  get targetRoot() {
3952
3959
  var e;
3953
3960
  const { target: t } = this.manager.dragOperation;
3954
- return Ea((e = t?.element) != null ? e : null);
3961
+ return Aa((e = t?.element) != null ? e : null);
3955
3962
  }
3956
3963
  get roots() {
3957
3964
  const { status: e } = this.manager.dragOperation;
@@ -3965,13 +3972,13 @@ var bm = class extends pt {
3965
3972
  }
3966
3973
  };
3967
3974
  jt = or(Yo);
3968
- Er = /* @__PURE__ */ new WeakMap();
3975
+ Ar = /* @__PURE__ */ new WeakMap();
3969
3976
  ti = /* @__PURE__ */ new WeakMap();
3970
3977
  jn = /* @__PURE__ */ new WeakSet();
3971
3978
  Nu = function() {
3972
3979
  const { roots: e } = this, t = [];
3973
3980
  for (const n of e)
3974
- for (const r of Ee(this, Er))
3981
+ for (const r of Ae(this, Ar))
3975
3982
  t.push(kn(this, jn, Xu).call(this, n, r));
3976
3983
  return () => {
3977
3984
  for (const n of t)
@@ -4151,7 +4158,7 @@ function bl(e) {
4151
4158
  function Ko(e) {
4152
4159
  return e.tagName === "TR";
4153
4160
  }
4154
- function Am(e, t, n) {
4161
+ function Em(e, t, n) {
4155
4162
  const r = new MutationObserver((a) => {
4156
4163
  let o = !1;
4157
4164
  for (const s of a) {
@@ -4166,7 +4173,7 @@ function Am(e, t, n) {
4166
4173
  continue;
4167
4174
  const l = e.getAttribute(i);
4168
4175
  if (i === "style") {
4169
- if (Ar(e) && Ar(t)) {
4176
+ if (Er(e) && Er(t)) {
4170
4177
  const c = e.style;
4171
4178
  for (const u of Array.from(t.style))
4172
4179
  c.getPropertyValue(u) === "" && t.style.removeProperty(u);
@@ -4187,7 +4194,7 @@ function Am(e, t, n) {
4187
4194
  childList: !0
4188
4195
  }), r;
4189
4196
  }
4190
- function Em(e, t, n) {
4197
+ function Am(e, t, n) {
4191
4198
  const r = new MutationObserver((a) => {
4192
4199
  for (const o of a)
4193
4200
  if (o.addedNodes.length !== 0)
@@ -4324,7 +4331,7 @@ wa = /* @__PURE__ */ new WeakSet();
4324
4331
  ju = function(e) {
4325
4332
  const { overlay: t } = this;
4326
4333
  if (!t || !e) return;
4327
- const n = Ea(t);
4334
+ const n = Aa(t);
4328
4335
  if (n)
4329
4336
  return e.addRoot(n);
4330
4337
  };
@@ -4351,16 +4358,16 @@ qu = function() {
4351
4358
  const S = new jp(f), {
4352
4359
  transition: k,
4353
4360
  translate: I,
4354
- boxSizing: A,
4361
+ boxSizing: E,
4355
4362
  paddingBlockStart: D,
4356
4363
  paddingBlockEnd: R,
4357
- paddingInlineStart: E,
4364
+ paddingInlineStart: A,
4358
4365
  paddingInlineEnd: O,
4359
4366
  borderInlineStartWidth: B,
4360
4367
  borderInlineEndWidth: X,
4361
4368
  borderBlockStartWidth: J,
4362
4369
  borderBlockEndWidth: oe
4363
- } = Jt(u), L = d === "clone", ae = A === "content-box", se = ae ? parseInt(E) + parseInt(O) + parseInt(B) + parseInt(X) : 0, ie = ae ? parseInt(D) + parseInt(R) + parseInt(J) + parseInt(oe) : 0, ce = d !== "move" && !this.overlay ? Cm(l, L ? "clone" : "hidden") : null, ye = Se(
4370
+ } = Jt(u), L = d === "clone", ae = E === "content-box", se = ae ? parseInt(A) + parseInt(O) + parseInt(B) + parseInt(X) : 0, ie = ae ? parseInt(D) + parseInt(R) + parseInt(J) + parseInt(oe) : 0, ce = d !== "move" && !this.overlay ? Cm(l, L ? "clone" : "hidden") : null, ye = Se(
4364
4371
  () => qs(a.dragOperation.activatorEvent)
4365
4372
  );
4366
4373
  if (I !== "none") {
@@ -4437,11 +4444,11 @@ qu = function() {
4437
4444
  const Je = $t(f), tt = (ne) => {
4438
4445
  this.manager.actions.stop({ event: ne });
4439
4446
  }, dt = Iu(Je);
4440
- ye && Je.addEventListener("resize", tt), Se(() => l.status) === "idle" && requestAnimationFrame(() => l.status = "dragging"), ce && (Ye.observe(ce), qe = Am(
4447
+ ye && Je.addEventListener("resize", tt), Se(() => l.status) === "idle" && requestAnimationFrame(() => l.status = "dragging"), ce && (Ye.observe(ce), qe = Em(
4441
4448
  u,
4442
4449
  ce,
4443
4450
  L
4444
- ), q = Em(
4451
+ ), q = Am(
4445
4452
  u,
4446
4453
  ce,
4447
4454
  f
@@ -4534,16 +4541,16 @@ _t(Wr, 4, "overlay", Ku, Fr, ni);
4534
4541
  Mn(Wr, Fr);
4535
4542
  Fr.configure = rr(Fr);
4536
4543
  var qo = Fr, lr = !0, Pm = !1, Ju, Qu, ed, td, rn, ri, ai;
4537
- td = (ed = [fe], At.Forward), Qu = (Ju = [fe], At.Reverse);
4544
+ td = (ed = [fe], Et.Forward), Qu = (Ju = [fe], Et.Reverse);
4538
4545
  var Or = class {
4539
4546
  constructor() {
4540
4547
  Re(this, ri, Be(rn, 8, this, lr)), Be(rn, 11, this), Re(this, ai, Be(rn, 12, this, lr)), Be(rn, 15, this);
4541
4548
  }
4542
4549
  isLocked(e) {
4543
- return e === At.Idle ? !1 : e == null ? this[At.Forward] === lr && this[At.Reverse] === lr : this[e] === lr;
4550
+ return e === Et.Idle ? !1 : e == null ? this[Et.Forward] === lr && this[Et.Reverse] === lr : this[e] === lr;
4544
4551
  }
4545
4552
  unlock(e) {
4546
- e !== At.Idle && (this[e] = Pm);
4553
+ e !== Et.Idle && (this[e] = Pm);
4547
4554
  }
4548
4555
  };
4549
4556
  rn = or(null);
@@ -4552,7 +4559,7 @@ ai = /* @__PURE__ */ new WeakMap();
4552
4559
  _t(rn, 4, td, ed, Or, ri);
4553
4560
  _t(rn, 4, Qu, Ju, Or, ai);
4554
4561
  Mn(rn, Or);
4555
- var Rm = [At.Forward, At.Reverse], wl = class {
4562
+ var Rm = [Et.Forward, Et.Reverse], wl = class {
4556
4563
  constructor() {
4557
4564
  this.x = new Or(), this.y = new Or();
4558
4565
  }
@@ -4596,9 +4603,9 @@ function _l(e, t) {
4596
4603
  var nd, Jo, Br, oi, tn, Qo, Ya = class extends (Jo = Hr, nd = [fe], Jo) {
4597
4604
  constructor(e) {
4598
4605
  super(e), Re(this, oi, Be(Br, 8, this, !1)), Be(Br, 11, this), Re(this, tn), Re(this, Qo, () => {
4599
- if (!Ee(this, tn))
4606
+ if (!Ae(this, tn))
4600
4607
  return;
4601
- const { element: o, by: s } = Ee(this, tn);
4608
+ const { element: o, by: s } = Ae(this, tn);
4602
4609
  s.y && (o.scrollTop += s.y), s.x && (o.scrollLeft += s.x);
4603
4610
  }), this.scroll = (o) => {
4604
4611
  var s;
@@ -4616,7 +4623,7 @@ var nd, Jo, Br, oi, tn, Qo, Ya = class extends (Jo = Hr, nd = [fe], Jo) {
4616
4623
  if (h?.isLocked())
4617
4624
  return !1;
4618
4625
  for (const f of i) {
4619
- const m = Ap(f, u);
4626
+ const m = Ep(f, u);
4620
4627
  if (m.x || m.y) {
4621
4628
  const { speed: y, direction: v } = Vp(
4622
4629
  f,
@@ -4629,7 +4636,7 @@ var nd, Jo, Br, oi, tn, Qo, Ya = class extends (Jo = Hr, nd = [fe], Jo) {
4629
4636
  if (v.x || v.y) {
4630
4637
  const { x: p, y: b } = u ?? v, w = p * y.x, g = b * y.y;
4631
4638
  if (w || g) {
4632
- const _ = (s = Ee(this, tn)) == null ? void 0 : s.by;
4639
+ const _ = (s = Ae(this, tn)) == null ? void 0 : s.by;
4633
4640
  if (this.autoScrolling && _ && (_.x && !w || _.y && !g))
4634
4641
  continue;
4635
4642
  return ct(this, tn, {
@@ -4638,7 +4645,7 @@ var nd, Jo, Br, oi, tn, Qo, Ya = class extends (Jo = Hr, nd = [fe], Jo) {
4638
4645
  x: w,
4639
4646
  y: g
4640
4647
  }
4641
- }), Ta.schedule(Ee(this, Qo)), !0;
4648
+ }), Ta.schedule(Ae(this, Qo)), !0;
4642
4649
  }
4643
4650
  }
4644
4651
  }
@@ -4651,13 +4658,13 @@ var nd, Jo, Br, oi, tn, Qo, Ya = class extends (Jo = Hr, nd = [fe], Jo) {
4651
4658
  const { position: o, source: s } = e.dragOperation;
4652
4659
  if (!o)
4653
4660
  return null;
4654
- const i = Au(
4655
- Ea(s?.element),
4661
+ const i = Eu(
4662
+ Aa(s?.element),
4656
4663
  o.current
4657
4664
  );
4658
4665
  return i && (t = i), i ?? t;
4659
4666
  }), a = ka(() => {
4660
- const o = r.value, { documentElement: s } = En(o);
4667
+ const o = r.value, { documentElement: s } = An(o);
4661
4668
  if (!o || o === s) {
4662
4669
  const { target: i } = e.dragOperation, l = i?.element;
4663
4670
  if (l) {
@@ -4687,7 +4694,7 @@ Qo = /* @__PURE__ */ new WeakMap();
4687
4694
  _t(Br, 4, "autoScrolling", nd, Ya, oi);
4688
4695
  Mn(Br, Ya);
4689
4696
  function xl(e) {
4690
- return e > 0 ? At.Forward : e < 0 ? At.Reverse : At.Idle;
4697
+ return e > 0 ? Et.Forward : e < 0 ? Et.Reverse : Et.Idle;
4691
4698
  }
4692
4699
  var Fm = class {
4693
4700
  constructor(e) {
@@ -4735,7 +4742,7 @@ var Fm = class {
4735
4742
  }, xr, Vm = class extends Hr {
4736
4743
  constructor(e) {
4737
4744
  super(e), Re(this, xr), this.handleScroll = () => {
4738
- Ee(this, xr) == null && ct(this, xr, setTimeout(() => {
4745
+ Ae(this, xr) == null && ct(this, xr, setTimeout(() => {
4739
4746
  this.manager.collisionObserver.forceUpdate(!1), ct(this, xr, void 0);
4740
4747
  }, 50));
4741
4748
  };
@@ -4796,7 +4803,7 @@ var Cr = Object.freeze({
4796
4803
  }
4797
4804
  }), zn, Fa = class extends Gn {
4798
4805
  constructor(t, n) {
4799
- super(t), this.manager = t, this.options = n, Re(this, zn, []), this.listeners = new Eu(), this.handleSourceKeyDown = (r, a, o) => {
4806
+ super(t), this.manager = t, this.options = n, Re(this, zn, []), this.listeners = new Au(), this.handleSourceKeyDown = (r, a, o) => {
4800
4807
  if (this.disabled || r.defaultPrevented || !Sn(r.target) || a.disabled)
4801
4808
  return;
4802
4809
  const {
@@ -4833,7 +4840,7 @@ var Cr = Object.freeze({
4833
4840
  source: n
4834
4841
  }).signal.aborted) return this.cleanup();
4835
4842
  this.sideEffects();
4836
- const i = En(a), l = [
4843
+ const i = An(a), l = [
4837
4844
  this.listeners.bind(i, [
4838
4845
  {
4839
4846
  type: "keydown",
@@ -4842,7 +4849,7 @@ var Cr = Object.freeze({
4842
4849
  }
4843
4850
  ])
4844
4851
  ];
4845
- Ee(this, zn).push(...l);
4852
+ Ae(this, zn).push(...l);
4846
4853
  }
4847
4854
  handleKeyDown(t, n, r) {
4848
4855
  const { keyboardCodes: a = Cr.keyboardCodes } = r ?? {};
@@ -4890,12 +4897,12 @@ var Cr = Object.freeze({
4890
4897
  }
4891
4898
  sideEffects() {
4892
4899
  const t = this.manager.registry.plugins.get(rd);
4893
- t?.disabled === !1 && (t.disable(), Ee(this, zn).push(() => {
4900
+ t?.disabled === !1 && (t.disable(), Ae(this, zn).push(() => {
4894
4901
  t.enable();
4895
4902
  }));
4896
4903
  }
4897
4904
  cleanup() {
4898
- Ee(this, zn).forEach((t) => t()), ct(this, zn, []);
4905
+ Ae(this, zn).forEach((t) => t()), ct(this, zn, []);
4899
4906
  }
4900
4907
  destroy() {
4901
4908
  this.cleanup(), this.listeners.clear();
@@ -4918,10 +4925,10 @@ var wn, Zm = class extends du {
4918
4925
  ct(this, wn, Yn(e));
4919
4926
  break;
4920
4927
  case "pointermove":
4921
- if (!Ee(this, wn)) return;
4928
+ if (!Ae(this, wn)) return;
4922
4929
  const { x: t, y: n } = Yn(e), r = {
4923
- x: t - Ee(this, wn).x,
4924
- y: n - Ee(this, wn).y
4930
+ x: t - Ae(this, wn).x,
4931
+ y: n - Ae(this, wn).y
4925
4932
  }, { tolerance: a } = this.options;
4926
4933
  if (a && Oo(r, a)) {
4927
4934
  this.abort();
@@ -4952,10 +4959,10 @@ var Zn, _n, Hm = class extends du {
4952
4959
  ));
4953
4960
  break;
4954
4961
  case "pointermove":
4955
- if (!Ee(this, _n)) return;
4962
+ if (!Ae(this, _n)) return;
4956
4963
  const { x: t, y: n } = Yn(e), r = {
4957
- x: t - Ee(this, _n).x,
4958
- y: n - Ee(this, _n).y
4964
+ x: t - Ae(this, _n).x,
4965
+ y: n - Ae(this, _n).y
4959
4966
  };
4960
4967
  Oo(r, this.options.tolerance) && this.abort();
4961
4968
  break;
@@ -4965,7 +4972,7 @@ var Zn, _n, Hm = class extends du {
4965
4972
  }
4966
4973
  }
4967
4974
  abort() {
4968
- Ee(this, Zn) && (clearTimeout(Ee(this, Zn)), ct(this, _n, void 0), ct(this, Zn, void 0));
4975
+ Ae(this, Zn) && (clearTimeout(Ae(this, Zn)), ct(this, _n, void 0), ct(this, Zn, void 0));
4969
4976
  }
4970
4977
  };
4971
4978
  Zn = /* @__PURE__ */ new WeakMap();
@@ -4995,7 +5002,7 @@ var es = Object.freeze({
4995
5002
  }
4996
5003
  }), Hn, Oa = class extends Gn {
4997
5004
  constructor(t, n) {
4998
- super(t), this.manager = t, this.options = n, Re(this, Hn, /* @__PURE__ */ new Set()), this.listeners = new Eu(), this.latest = {
5005
+ super(t), this.manager = t, this.options = n, Re(this, Hn, /* @__PURE__ */ new Set()), this.listeners = new Au(), this.latest = {
4999
5006
  event: void 0,
5000
5007
  coordinates: void 0
5001
5008
  }, this.handleMove = () => {
@@ -5065,7 +5072,7 @@ var es = Object.freeze({
5065
5072
  ]), m = () => {
5066
5073
  f(), this.initialCoordinates = void 0;
5067
5074
  };
5068
- Ee(this, Hn).add(m);
5075
+ Ae(this, Hn).add(m);
5069
5076
  }
5070
5077
  handlePointerMove(t, n) {
5071
5078
  var r, a;
@@ -5100,7 +5107,7 @@ var es = Object.freeze({
5100
5107
  source: t
5101
5108
  }).signal.aborted) return this.cleanup();
5102
5109
  n.preventDefault();
5103
- const i = En(n.target).body;
5110
+ const i = An(n.target).body;
5104
5111
  i.setPointerCapture(n.pointerId);
5105
5112
  const l = Sn(n.target) ? [n.target, i] : i, c = this.listeners.bind(l, [
5106
5113
  {
@@ -5125,7 +5132,7 @@ var es = Object.freeze({
5125
5132
  listener: this.handleKeyDown
5126
5133
  }
5127
5134
  ]);
5128
- Ee(this, Hn).add(c);
5135
+ Ae(this, Hn).add(c);
5129
5136
  }
5130
5137
  handleCancel(t) {
5131
5138
  const { dragOperation: n } = this.manager;
@@ -5135,7 +5142,7 @@ var es = Object.freeze({
5135
5142
  this.latest = {
5136
5143
  event: void 0,
5137
5144
  coordinates: void 0
5138
- }, Ee(this, Hn).forEach((t) => t()), Ee(this, Hn).clear();
5145
+ }, Ae(this, Hn).forEach((t) => t()), Ae(this, Hn).clear();
5139
5146
  }
5140
5147
  destroy() {
5141
5148
  this.cleanup(), this.listeners.clear();
@@ -5271,7 +5278,7 @@ var id, ld, rs, an, ui, go, cd, ud, Mr, di, dd = class extends (rs = Zt, ld = [f
5271
5278
  }
5272
5279
  get element() {
5273
5280
  var e;
5274
- return (e = this.proxy) != null ? e : Ee(this, Mr, cd);
5281
+ return (e = this.proxy) != null ? e : Ae(this, Mr, cd);
5275
5282
  }
5276
5283
  };
5277
5284
  an = or(rs);
@@ -5336,12 +5343,12 @@ function kl(e, t) {
5336
5343
  r !== n.current && (n.current = r, t(r));
5337
5344
  });
5338
5345
  }
5339
- var qm = Object.defineProperty, Jm = Object.defineProperties, Qm = Object.getOwnPropertyDescriptors, Il = Object.getOwnPropertySymbols, eg = Object.prototype.hasOwnProperty, tg = Object.prototype.propertyIsEnumerable, Al = (e, t, n) => t in e ? qm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ng = (e, t) => {
5346
+ var qm = Object.defineProperty, Jm = Object.defineProperties, Qm = Object.getOwnPropertyDescriptors, Il = Object.getOwnPropertySymbols, eg = Object.prototype.hasOwnProperty, tg = Object.prototype.propertyIsEnumerable, El = (e, t, n) => t in e ? qm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ng = (e, t) => {
5340
5347
  for (var n in t || (t = {}))
5341
- eg.call(t, n) && Al(e, n, t[n]);
5348
+ eg.call(t, n) && El(e, n, t[n]);
5342
5349
  if (Il)
5343
5350
  for (var n of Il(t))
5344
- tg.call(t, n) && Al(e, n, t[n]);
5351
+ tg.call(t, n) && El(e, n, t[n]);
5345
5352
  return e;
5346
5353
  }, rg = (e, t) => Jm(e, Qm(t)), ag = new si(), og = Ze(
5347
5354
  ag
@@ -5756,7 +5763,7 @@ var kg = W.div`
5756
5763
  &:disabled {
5757
5764
  cursor: not-allowed;
5758
5765
  }
5759
- `, Ag = W.label`
5766
+ `, Eg = W.label`
5760
5767
  margin: 0;
5761
5768
  cursor: pointer;
5762
5769
  user-select: none;
@@ -5820,7 +5827,7 @@ W(kd)`
5820
5827
  padding: 0.25rem 0.5rem;
5821
5828
  font-size: ${(e) => e.theme.fontSizeSmall};
5822
5829
  `;
5823
- var Eg = W.label`
5830
+ var Ag = W.label`
5824
5831
  font-family: ${(e) => e.theme.fontFamily};
5825
5832
  font-size: ${(e) => e.theme.fontSizeSmall};
5826
5833
  font-weight: 500;
@@ -5885,7 +5892,7 @@ W(Id)`
5885
5892
  padding: 0.25rem 1.75rem 0.25rem 0.5rem;
5886
5893
  font-size: ${(e) => e.theme.fontSizeSmall};
5887
5894
  `;
5888
- var Ad = W.input.attrs({ type: "range" })`
5895
+ var Ed = W.input.attrs({ type: "range" })`
5889
5896
  -webkit-appearance: none;
5890
5897
  appearance: none;
5891
5898
  width: 100%;
@@ -5984,13 +5991,13 @@ var Ad = W.input.attrs({ type: "range" })`
5984
5991
  disabled: n
5985
5992
  }
5986
5993
  ),
5987
- /* @__PURE__ */ x(Ag, { htmlFor: "automatic-scroll", children: "Automatic Scroll" })
5994
+ /* @__PURE__ */ x(Eg, { htmlFor: "automatic-scroll", children: "Automatic Scroll" })
5988
5995
  ] });
5989
- function Ed(e) {
5996
+ function Ad(e) {
5990
5997
  return typeof e == "object" && e !== null && "type" in e;
5991
5998
  }
5992
5999
  function ln(e) {
5993
- if (!Ed(e))
6000
+ if (!Ad(e))
5994
6001
  return e;
5995
6002
  const t = e.direction === "vertical" ? "to bottom" : "to right", n = e.stops.map((r) => `${r.color} ${r.offset * 100}%`).join(", ");
5996
6003
  return `linear-gradient(${t}, ${n})`;
@@ -6168,7 +6175,7 @@ function Bg(e, t, n) {
6168
6175
  return Math.floor((e - t + n) / n) * n;
6169
6176
  }
6170
6177
  function Vg(e, t, n, r) {
6171
- if (!Ed(t))
6178
+ if (!Ad(t))
6172
6179
  return t;
6173
6180
  let a;
6174
6181
  t.direction === "vertical" ? a = e.createLinearGradient(0, 0, 0, r) : a = e.createLinearGradient(0, 0, n, 0);
@@ -6202,7 +6209,7 @@ var Lg = W.canvas.attrs((e) => ({
6202
6209
  /* Force GPU compositing layer to reduce scroll flickering */
6203
6210
  transform: translateZ(0);
6204
6211
  backface-visibility: hidden;
6205
- `, El = (e) => {
6212
+ `, Al = (e) => {
6206
6213
  const {
6207
6214
  data: t,
6208
6215
  bits: n,
@@ -6221,19 +6228,19 @@ var Lg = W.canvas.attrs((e) => ({
6221
6228
  qn(() => {
6222
6229
  const _ = u + d;
6223
6230
  for (const [C, S] of y.current.entries()) {
6224
- const k = C * et, I = S.getContext("2d"), A = Math.floor(i / 2);
6231
+ const k = C * et, I = S.getContext("2d"), E = Math.floor(i / 2);
6225
6232
  if (I) {
6226
6233
  I.resetTransform(), I.clearRect(0, 0, S.width, S.height), I.imageSmoothingEnabled = !1, I.scale(s, s);
6227
6234
  const D = S.width / s;
6228
6235
  let R;
6229
6236
  f === "normal" ? R = c : R = l, I.fillStyle = Vg(I, R, D, i);
6230
- const E = k, O = k + D, B = Bg(E, u, _);
6237
+ const A = k, O = k + D, B = Bg(A, u, _);
6231
6238
  for (let X = Math.max(0, B); X < O; X += _) {
6232
- const J = X - E;
6239
+ const J = X - A;
6233
6240
  if (J + u <= 0) continue;
6234
6241
  const oe = Math.min(X + _, r), L = Fg(t, n, X, oe);
6235
6242
  if (L) {
6236
- const ae = Og(J, u, A, L.min, L.max, f);
6243
+ const ae = Og(J, u, E, L.min, L.max, f);
6237
6244
  for (const se of ae)
6238
6245
  I.fillRect(se.x, se.y, se.width, se.height);
6239
6246
  }
@@ -6520,13 +6527,13 @@ var $l = ({
6520
6527
  }) => {
6521
6528
  const g = Math.floor(s / l), C = Math.floor((s + i) / l) - g, S = c && !u && !d, k = `clip-${r}-${a}`, {
6522
6529
  ref: I,
6523
- handleRef: A,
6530
+ handleRef: E,
6524
6531
  isDragSource: D
6525
6532
  } = vo({
6526
6533
  id: k,
6527
6534
  data: { clipId: n, trackIndex: r, clipIndex: a },
6528
6535
  disabled: !S
6529
- }), R = `clip-boundary-left-${r}-${a}`, { ref: E, isDragSource: O } = vo({
6536
+ }), R = `clip-boundary-left-${r}-${a}`, { ref: A, isDragSource: O } = vo({
6530
6537
  id: R,
6531
6538
  data: { clipId: n, trackIndex: r, clipIndex: a, boundary: "left" },
6532
6539
  disabled: !S,
@@ -6559,7 +6566,7 @@ var $l = ({
6559
6566
  trackName: o,
6560
6567
  isSelected: h,
6561
6568
  disableDrag: u,
6562
- dragHandleProps: S ? { handleRef: A } : void 0
6569
+ dragHandleProps: S ? { handleRef: E } : void 0
6563
6570
  }
6564
6571
  ),
6565
6572
  /* @__PURE__ */ x(Wg, { originX: g, children: /* @__PURE__ */ me(Jg, { $isOverlay: d, children: [
@@ -6593,7 +6600,7 @@ var $l = ({
6593
6600
  edge: "left",
6594
6601
  touchOptimized: w,
6595
6602
  dragHandleProps: {
6596
- ref: E,
6603
+ ref: A,
6597
6604
  isDragging: O
6598
6605
  }
6599
6606
  }
@@ -6620,10 +6627,10 @@ var $l = ({
6620
6627
  display: inline-flex;
6621
6628
  align-items: center;
6622
6629
  gap: 0.5rem;
6623
- `, e0 = W(Eg)`
6630
+ `, e0 = W(Ag)`
6624
6631
  margin: 0;
6625
6632
  white-space: nowrap;
6626
- `, t0 = W(Ad)`
6633
+ `, t0 = W(Ed)`
6627
6634
  width: 120px;
6628
6635
  `, n0 = ({
6629
6636
  volume: e,
@@ -7234,15 +7241,15 @@ var S0 = C0(), Pl = ({
7234
7241
  clipId: h,
7235
7242
  onCanvasesReady: f
7236
7243
  }) => {
7237
- const m = t ?? e, { canvasRef: y, canvasMapRef: v } = mi(), p = T([]), b = T(/* @__PURE__ */ new WeakSet()), w = T(d), g = T(f), _ = !!(d && h), C = Dd(), S = pi(r, et, C), k = i ?? S0, I = u ?? (n ? n.sampleRate / 2 : 22050), A = l ?? w0, D = !!l;
7244
+ const m = t ?? e, { canvasRef: y, canvasMapRef: v } = mi(), p = T([]), b = T(/* @__PURE__ */ new WeakSet()), w = T(d), g = T(f), _ = !!(d && h), C = Dd(), S = pi(r, et, C), k = i ?? S0, I = u ?? (n ? n.sampleRate / 2 : 22050), E = l ?? w0, D = !!l;
7238
7245
  j(() => {
7239
7246
  w.current = d;
7240
7247
  }, [d]), j(() => {
7241
7248
  g.current = f;
7242
7249
  }, [f]), j(() => {
7243
7250
  if (!_) return;
7244
- const E = w.current;
7245
- if (!E || !h) return;
7251
+ const A = w.current;
7252
+ if (!A || !h) return;
7246
7253
  const O = p.current.length, B = [];
7247
7254
  for (const oe of p.current) {
7248
7255
  const L = oe.match(/chunk(\d+)$/);
@@ -7255,7 +7262,7 @@ var S0 = C0(), Pl = ({
7255
7262
  B.push(oe);
7256
7263
  else
7257
7264
  try {
7258
- E.unregisterCanvas(oe);
7265
+ A.unregisterCanvas(oe);
7259
7266
  } catch (ie) {
7260
7267
  console.warn(`[spectrogram] unregisterCanvas failed for ${oe}:`, ie);
7261
7268
  }
@@ -7274,7 +7281,7 @@ var S0 = C0(), Pl = ({
7274
7281
  }
7275
7282
  b.current.add(L);
7276
7283
  try {
7277
- E.registerCanvas(ae, se), X.push(ae);
7284
+ A.registerCanvas(ae, se), X.push(ae);
7278
7285
  } catch (ie) {
7279
7286
  console.warn(`[spectrogram] registerCanvas failed for ${ae}:`, ie);
7280
7287
  continue;
@@ -7291,11 +7298,11 @@ var S0 = C0(), Pl = ({
7291
7298
  g.current?.(oe, L);
7292
7299
  }
7293
7300
  }, [v, _, h, m, r, S]), j(() => () => {
7294
- const E = w.current;
7295
- if (E) {
7301
+ const A = w.current;
7302
+ if (A) {
7296
7303
  for (const O of p.current)
7297
7304
  try {
7298
- E.unregisterCanvas(O);
7305
+ A.unregisterCanvas(O);
7299
7306
  } catch (B) {
7300
7307
  console.warn(`[spectrogram] unregisterCanvas failed for ${O}:`, B);
7301
7308
  }
@@ -7304,13 +7311,13 @@ var S0 = C0(), Pl = ({
7304
7311
  }, []), qn(() => {
7305
7312
  if (_ || !n) return;
7306
7313
  const {
7307
- frequencyBinCount: E,
7314
+ frequencyBinCount: A,
7308
7315
  frameCount: O,
7309
7316
  hopSize: B,
7310
7317
  sampleRate: X,
7311
7318
  gainDb: J,
7312
7319
  rangeDb: oe
7313
- } = n, L = oe === 0 ? 1 : oe, ae = (se) => se / E * (X / 2);
7320
+ } = n, L = oe === 0 ? 1 : oe, ae = (se) => se / A * (X / 2);
7314
7321
  for (const [se, ie] of v.current.entries()) {
7315
7322
  const ce = se * et, ye = ie.getContext("2d");
7316
7323
  if (!ye) continue;
@@ -7320,19 +7327,19 @@ var S0 = C0(), Pl = ({
7320
7327
  for (let he = 0; he < _e; he++) {
7321
7328
  const $ = (ce + he) * s, ge = Math.floor($ / B);
7322
7329
  if (ge < 0 || ge >= O) continue;
7323
- const Le = ge * E;
7330
+ const Le = ge * A;
7324
7331
  for (let Q = 0; Q < Fe; Q++) {
7325
7332
  const be = 1 - Q / Fe;
7326
- let Ge = Math.floor(be * E);
7333
+ let Ge = Math.floor(be * A);
7327
7334
  if (D) {
7328
- let ke = 0, Je = E - 1;
7335
+ let ke = 0, Je = A - 1;
7329
7336
  for (; ke < Je; ) {
7330
7337
  const tt = ke + Je >> 1, dt = ae(tt);
7331
- A(dt, c, I) < be ? ke = tt + 1 : Je = tt;
7338
+ E(dt, c, I) < be ? ke = tt + 1 : Je = tt;
7332
7339
  }
7333
7340
  Ge = ke;
7334
7341
  }
7335
- if (Ge < 0 || Ge >= E) continue;
7342
+ if (Ge < 0 || Ge >= A) continue;
7336
7343
  const qe = n.data[Le + Ge], q = Math.max(0, Math.min(1, (qe + L + J) / L)), Oe = Math.floor(q * 255), Ye = (Q * _e + he) * 4;
7337
7344
  N[Ye] = k[Oe * 3], N[Ye + 1] = k[Oe * 3 + 1], N[Ye + 2] = k[Oe * 3 + 2], N[Ye + 3] = 255;
7338
7345
  }
@@ -7356,12 +7363,12 @@ var S0 = C0(), Pl = ({
7356
7363
  k,
7357
7364
  c,
7358
7365
  I,
7359
- A,
7366
+ E,
7360
7367
  D,
7361
7368
  S
7362
7369
  ]);
7363
- const R = S.map((E) => {
7364
- const O = E * et, B = Math.min(r - O, et);
7370
+ const R = S.map((A) => {
7371
+ const O = A * et, B = Math.min(r - O, et);
7365
7372
  return /* @__PURE__ */ x(
7366
7373
  x0,
7367
7374
  {
@@ -7370,10 +7377,10 @@ var S0 = C0(), Pl = ({
7370
7377
  width: B * o,
7371
7378
  height: a * o,
7372
7379
  $waveHeight: a,
7373
- "data-index": E,
7380
+ "data-index": A,
7374
7381
  ref: y
7375
7382
  },
7376
- `${r}-${E}`
7383
+ `${r}-${A}`
7377
7384
  );
7378
7385
  });
7379
7386
  return /* @__PURE__ */ x(_0, { $index: e, $cssWidth: r, $waveHeight: a, children: R });
@@ -7444,7 +7451,7 @@ var S0 = C0(), Pl = ({
7444
7451
  height: k
7445
7452
  },
7446
7453
  children: /* @__PURE__ */ x(
7447
- El,
7454
+ Al,
7448
7455
  {
7449
7456
  ...h,
7450
7457
  index: 0,
@@ -7463,7 +7470,7 @@ var S0 = C0(), Pl = ({
7463
7470
  ] });
7464
7471
  }
7465
7472
  return /* @__PURE__ */ x(
7466
- El,
7473
+ Al,
7467
7474
  {
7468
7475
  ...h,
7469
7476
  waveOutlineColor: g,
@@ -7509,7 +7516,7 @@ function I0(e, t, n) {
7509
7516
  i.push(a[Math.round(l * s)]);
7510
7517
  return i;
7511
7518
  }
7512
- var A0 = ({
7519
+ var E0 = ({
7513
7520
  waveHeight: e,
7514
7521
  numChannels: t,
7515
7522
  frequencyScaleFn: n,
@@ -7563,7 +7570,7 @@ var A0 = ({
7563
7570
  }
7564
7571
  ) });
7565
7572
  };
7566
- function E0(e, t, n) {
7573
+ function A0(e, t, n) {
7567
7574
  return Math.ceil(e * n / t);
7568
7575
  }
7569
7576
  function M0(e) {
@@ -7616,14 +7623,14 @@ var $0 = W.div.attrs((e) => ({
7616
7623
  timeScaleHeight: d,
7617
7624
  controls: { show: h, width: f }
7618
7625
  } = We(Kr), m = vi(), { widthX: y, canvasInfo: v, timeMarkersWithPositions: p } = Te(() => {
7619
- const S = /* @__PURE__ */ new Map(), k = [], I = E0(n / 1e3, u, c), A = c / u;
7626
+ const S = /* @__PURE__ */ new Map(), k = [], I = A0(n / 1e3, u, c), E = c / u;
7620
7627
  let D = 0;
7621
- for (let R = 0; R < I; R += A * o / 1e3) {
7622
- const E = Math.floor(R);
7628
+ for (let R = 0; R < I; R += E * o / 1e3) {
7629
+ const A = Math.floor(R);
7623
7630
  if (D % r === 0) {
7624
- const O = D, B = M0(O), X = s ? /* @__PURE__ */ x(bt.Fragment, { children: s(O, E) }, `timestamp-${D}`) : /* @__PURE__ */ x(D0, { $left: E, children: B }, B);
7625
- k.push({ pix: E, element: X }), S.set(E, d);
7626
- } else D % a === 0 ? S.set(E, Math.floor(d / 2)) : D % o === 0 && S.set(E, Math.floor(d / 5));
7631
+ const O = D, B = M0(O), X = s ? /* @__PURE__ */ x(bt.Fragment, { children: s(O, A) }, `timestamp-${D}`) : /* @__PURE__ */ x(D0, { $left: A, children: B }, B);
7632
+ k.push({ pix: A, element: X }), S.set(A, d);
7633
+ } else D % a === 0 ? S.set(A, Math.floor(d / 2)) : D % o === 0 && S.set(A, Math.floor(d / 5));
7627
7634
  D += o;
7628
7635
  }
7629
7636
  return {
@@ -7660,12 +7667,12 @@ var $0 = W.div.attrs((e) => ({
7660
7667
  for (const [S, k] of l.current.entries()) {
7661
7668
  const I = k.getContext("2d");
7662
7669
  if (!I) continue;
7663
- const A = S * et, D = k.width / m;
7670
+ const E = S * et, D = k.width / m;
7664
7671
  I.resetTransform(), I.clearRect(0, 0, k.width, k.height), I.imageSmoothingEnabled = !1, I.fillStyle = t, I.scale(m, m);
7665
- for (const [R, E] of v.entries()) {
7666
- if (R < A || R >= A + D) continue;
7667
- const O = R - A, B = d - E;
7668
- I.fillRect(O, B, 1, E);
7672
+ for (const [R, A] of v.entries()) {
7673
+ if (R < E || R >= E + D) continue;
7674
+ const O = R - E, B = d - A;
7675
+ I.fillRect(O, B, 1, A);
7669
7676
  }
7670
7677
  }
7671
7678
  }, [
@@ -7995,7 +8002,7 @@ var zd = ({ renderTimestamp: e }) => {
7995
8002
  font-size: ${(e) => e.theme.fontSizeSmall};
7996
8003
  color: ${(e) => e.theme.textColor};
7997
8004
  background-color: transparent;
7998
- `, Y0 = (e) => /* @__PURE__ */ x(Cd, { weight: "light", ...e }), U0 = (e) => /* @__PURE__ */ x(xd, { weight: "light", ...e }), K0 = (e) => /* @__PURE__ */ x(_d, { weight: "bold", ...e }), Ol = W(Ad)`
8005
+ `, Y0 = (e) => /* @__PURE__ */ x(Cd, { weight: "light", ...e }), U0 = (e) => /* @__PURE__ */ x(xd, { weight: "light", ...e }), K0 = (e) => /* @__PURE__ */ x(_d, { weight: "bold", ...e }), Ol = W(Ed)`
7999
8006
  width: 75%;
8000
8007
  height: 5px;
8001
8008
  background: ${(e) => e.theme.sliderTrackColor};
@@ -8191,8 +8198,8 @@ function sv(e) {
8191
8198
  }
8192
8199
  }
8193
8200
  if (m > 0)
8194
- for (var A = 0; A < i; A++)
8195
- e.bits === 8 ? (f.setInt8(y++, v[A]), f.setInt8(y++, p[A])) : (f.setInt16(y, v[A], !0), f.setInt16(y + 2, p[A], !0));
8201
+ for (var E = 0; E < i; E++)
8202
+ e.bits === 8 ? (f.setInt8(y++, v[E]), f.setInt8(y++, p[E])) : (f.setInt16(y, v[E], !0), f.setInt16(y + 2, p[E], !0));
8196
8203
  return h;
8197
8204
  }
8198
8205
  function Va(e) {
@@ -8831,20 +8838,20 @@ function Jy(e, t = {}) {
8831
8838
  s(!0), l(null), u(0);
8832
8839
  const p = Sf.getContext().rawContext, b = e.map(async (g, _) => {
8833
8840
  if (g.audioBuffer) {
8834
- const A = y(g, _, g.audioBuffer);
8835
- return n && !h && (m.set(_, A), u((D) => D + 1), a(
8841
+ const E = y(g, _, g.audioBuffer);
8842
+ return n && !h && (m.set(_, E), u((D) => D + 1), a(
8836
8843
  Array.from({ length: e.length }, (D, R) => m.get(R)).filter(
8837
8844
  (D) => D !== void 0
8838
8845
  )
8839
- )), A;
8846
+ )), E;
8840
8847
  }
8841
8848
  if (!g.src && g.waveformData) {
8842
- const A = y(g, _);
8843
- return n && !h && (m.set(_, A), u((D) => D + 1), a(
8849
+ const E = y(g, _);
8850
+ return n && !h && (m.set(_, E), u((D) => D + 1), a(
8844
8851
  Array.from({ length: e.length }, (D, R) => m.get(R)).filter(
8845
8852
  (D) => D !== void 0
8846
8853
  )
8847
- )), A;
8854
+ )), E;
8848
8855
  }
8849
8856
  if (!g.src)
8850
8857
  throw new Error(`Track ${_ + 1}: Must provide src, audioBuffer, or waveformData`);
@@ -8855,9 +8862,9 @@ function Jy(e, t = {}) {
8855
8862
  if (!k || !k.sampleRate || !k.duration)
8856
8863
  throw new Error(`Invalid audio buffer for ${g.src}`);
8857
8864
  const I = y(g, _, k);
8858
- return n && !h && (m.set(_, I), u((A) => A + 1), a(
8859
- Array.from({ length: e.length }, (A, D) => m.get(D)).filter(
8860
- (A) => A !== void 0
8865
+ return n && !h && (m.set(_, I), u((E) => E + 1), a(
8866
+ Array.from({ length: e.length }, (E, D) => m.get(D)).filter(
8867
+ (E) => E !== void 0
8861
8868
  )
8862
8869
  )), I;
8863
8870
  }), w = await Promise.all(b);
@@ -8903,16 +8910,16 @@ function Qy({
8903
8910
  if (!h || !h.boundary || !s.current) return;
8904
8911
  const { boundary: f, trackIndex: m, clipIndex: y } = h, b = ((d.to?.x ?? d.operation.position.current.x) - d.operation.position.initial.x) * n, w = Math.floor(0.1 * r), g = s.current, _ = e.map((C, S) => {
8905
8912
  if (S !== m) return C;
8906
- const k = [...C.clips].sort((D, R) => D.startSample - R.startSample), I = k.findIndex((D) => D === C.clips[y]), A = C.clips.map((D, R) => {
8913
+ const k = [...C.clips].sort((D, R) => D.startSample - R.startSample), I = k.findIndex((D) => D === C.clips[y]), E = C.clips.map((D, R) => {
8907
8914
  if (R !== y) return D;
8908
8915
  if (f === "left") {
8909
- const E = {
8916
+ const A = {
8910
8917
  ...D,
8911
8918
  startSample: g.startSample,
8912
8919
  offsetSamples: g.offsetSamples,
8913
8920
  durationSamples: g.durationSamples
8914
8921
  }, O = Io(
8915
- E,
8922
+ A,
8916
8923
  Math.floor(b),
8917
8924
  "left",
8918
8925
  k,
@@ -8926,13 +8933,13 @@ function Qy({
8926
8933
  startSample: J
8927
8934
  };
8928
8935
  } else {
8929
- const E = {
8936
+ const A = {
8930
8937
  ...D,
8931
8938
  startSample: g.startSample,
8932
8939
  offsetSamples: g.offsetSamples,
8933
8940
  durationSamples: g.durationSamples
8934
8941
  }, O = Io(
8935
- E,
8942
+ A,
8936
8943
  Math.floor(b),
8937
8944
  "right",
8938
8945
  k,
@@ -8942,7 +8949,7 @@ function Qy({
8942
8949
  return { ...D, durationSamples: B };
8943
8950
  }
8944
8951
  });
8945
- return { ...C, clips: A };
8952
+ return { ...C, clips: E };
8946
8953
  });
8947
8954
  i.current = b, t(_);
8948
8955
  },
@@ -8955,8 +8962,8 @@ function Qy({
8955
8962
  if (b) {
8956
8963
  const { trackIndex: w, clipIndex: g } = b, _ = s.current, C = e.map((S, k) => {
8957
8964
  if (k !== w) return S;
8958
- const I = S.clips.map((A, D) => D !== g ? A : {
8959
- ...A,
8965
+ const I = S.clips.map((E, D) => D !== g ? E : {
8966
+ ...E,
8960
8967
  offsetSamples: _.offsetSamples,
8961
8968
  durationSamples: _.durationSamples,
8962
8969
  startSample: _.startSample
@@ -9261,10 +9268,10 @@ function a1({
9261
9268
  const f = Te(() => t ? e.findIndex((I) => I.id === t) : -1, [e, t]), m = M(
9262
9269
  (I) => {
9263
9270
  if (!l?.current || !c || !u) return;
9264
- const A = e.find((L) => L.id === I);
9265
- if (!A) return;
9266
- const D = l.current, R = D.clientWidth, E = A.start * u / c + d, O = A.end * u / c + d, B = (E + O) / 2, X = D.scrollLeft, J = X, oe = X + R;
9267
- if (E < J || O > oe) {
9271
+ const E = e.find((L) => L.id === I);
9272
+ if (!E) return;
9273
+ const D = l.current, R = D.clientWidth, A = E.start * u / c + d, O = E.end * u / c + d, B = (A + O) / 2, X = D.scrollLeft, J = X, oe = X + R;
9274
+ if (A < J || O > oe) {
9268
9275
  const L = Math.max(0, B - R / 2);
9269
9276
  D.scrollTo({
9270
9277
  left: L,
@@ -9280,50 +9287,50 @@ function a1({
9280
9287
  const y = M(
9281
9288
  (I) => {
9282
9289
  if (f < 0) return;
9283
- const A = e[f], D = Math.max(0, Math.min(A.end - 0.1, A.start + I)), R = D - A.start, E = [...e];
9284
- if (E[f] = {
9285
- ...A,
9290
+ const E = e[f], D = Math.max(0, Math.min(E.end - 0.1, E.start + I)), R = D - E.start, A = [...e];
9291
+ if (A[f] = {
9292
+ ...E,
9286
9293
  start: D
9287
9294
  }, o && f > 0) {
9288
- const O = E[f - 1];
9289
- Math.abs(O.end - A.start) < bo && (E[f - 1] = {
9295
+ const O = A[f - 1];
9296
+ Math.abs(O.end - E.start) < bo && (A[f - 1] = {
9290
9297
  ...O,
9291
9298
  end: Math.max(O.start + 0.1, O.end + R)
9292
9299
  });
9293
9300
  } else if (!o && f > 0) {
9294
- const O = E[f - 1];
9295
- D < O.end && (E[f - 1] = {
9301
+ const O = A[f - 1];
9302
+ D < O.end && (A[f - 1] = {
9296
9303
  ...O,
9297
9304
  end: D
9298
9305
  });
9299
9306
  }
9300
- n(E);
9307
+ n(A);
9301
9308
  },
9302
9309
  [e, f, o, n]
9303
9310
  ), v = M(
9304
9311
  (I) => {
9305
9312
  if (f < 0) return;
9306
- const A = e[f], D = Math.max(A.start + 0.1, Math.min(a, A.end + I)), R = D - A.end, E = [...e];
9307
- if (E[f] = {
9308
- ...A,
9313
+ const E = e[f], D = Math.max(E.start + 0.1, Math.min(a, E.end + I)), R = D - E.end, A = [...e];
9314
+ if (A[f] = {
9315
+ ...E,
9309
9316
  end: D
9310
9317
  }, o && f < e.length - 1) {
9311
- const O = E[f + 1];
9312
- if (Math.abs(O.start - A.end) < bo) {
9318
+ const O = A[f + 1];
9319
+ if (Math.abs(O.start - E.end) < bo) {
9313
9320
  const B = Math.min(
9314
9321
  O.end - 0.1,
9315
9322
  O.start + R
9316
9323
  );
9317
- E[f + 1] = {
9324
+ A[f + 1] = {
9318
9325
  ...O,
9319
9326
  start: B
9320
9327
  };
9321
9328
  let X = f + 1;
9322
- for (; X < E.length - 1; ) {
9323
- const J = E[X], oe = E[X + 1];
9329
+ for (; X < A.length - 1; ) {
9330
+ const J = A[X], oe = A[X + 1];
9324
9331
  if (Math.abs(oe.start - e[X].end) < bo) {
9325
9332
  const L = J.end - e[X].end;
9326
- E[X + 1] = {
9333
+ A[X + 1] = {
9327
9334
  ...oe,
9328
9335
  start: Math.min(oe.end - 0.1, oe.start + L)
9329
9336
  }, X++;
@@ -9332,17 +9339,17 @@ function a1({
9332
9339
  }
9333
9340
  }
9334
9341
  } else if (!o && f < e.length - 1) {
9335
- const O = E[f + 1];
9342
+ const O = A[f + 1];
9336
9343
  if (D > O.start) {
9337
- E[f + 1] = {
9344
+ A[f + 1] = {
9338
9345
  ...O,
9339
9346
  start: D
9340
9347
  };
9341
9348
  let B = f + 1;
9342
- for (; B < E.length - 1; ) {
9343
- const X = E[B], J = E[B + 1];
9349
+ for (; B < A.length - 1; ) {
9350
+ const X = A[B], J = A[B + 1];
9344
9351
  if (X.end > J.start)
9345
- E[B + 1] = {
9352
+ A[B + 1] = {
9346
9353
  ...J,
9347
9354
  start: X.end
9348
9355
  }, B++;
@@ -9351,7 +9358,7 @@ function a1({
9351
9358
  }
9352
9359
  }
9353
9360
  }
9354
- n(E);
9361
+ n(A);
9355
9362
  },
9356
9363
  [e, f, a, o, n]
9357
9364
  ), p = M(() => {
@@ -9366,8 +9373,8 @@ function a1({
9366
9373
  r && r(null);
9367
9374
  }, [r]), C = M(() => {
9368
9375
  if (f < 0 || !h) return;
9369
- const I = e[f], A = s ? void 0 : I.end - I.start;
9370
- h(I.start, A);
9376
+ const I = e[f], E = s ? void 0 : I.end - I.start;
9377
+ h(I.start, E);
9371
9378
  }, [e, f, s, h]), S = Te(
9372
9379
  () => [
9373
9380
  {
@@ -10006,7 +10013,7 @@ const Ja = [
10006
10013
  { id: "dynamics", name: "Dynamics" },
10007
10014
  { id: "spatial", name: "Spatial" }
10008
10015
  ];
10009
- const Av = {
10016
+ const Ev = {
10010
10017
  reverb: Kf,
10011
10018
  freeverb: Uf,
10012
10019
  jcReverb: Yf,
@@ -10028,10 +10035,10 @@ const Av = {
10028
10035
  gate: Tf,
10029
10036
  stereoWidener: $f
10030
10037
  };
10031
- let Ev = 0;
10032
- const Mv = () => `effect_${Date.now()}_${++Ev}`;
10038
+ let Av = 0;
10039
+ const Mv = () => `effect_${Date.now()}_${++Av}`;
10033
10040
  function La(e, t) {
10034
- const n = Av[e.id];
10041
+ const n = Ev[e.id];
10035
10042
  if (!n)
10036
10043
  throw new Error(`Unknown effect type: ${e.id}`);
10037
10044
  const r = {};
@@ -10472,8 +10479,8 @@ function Dv() {
10472
10479
  let g = 0;
10473
10480
  for (const D of i)
10474
10481
  for (const R of D.clips) {
10475
- const E = R.startSample + R.durationSamples;
10476
- g = Math.max(g, E);
10482
+ const A = R.startSample + R.durationSamples;
10483
+ g = Math.max(g, A);
10477
10484
  }
10478
10485
  g += Math.round(w * 0.1);
10479
10486
  const _ = g / w, C = d === "individual" ? [{ track: i[h], state: l[h], index: h }] : i.map((D, R) => ({ track: D, state: l[R], index: R })), S = l.some((D) => D.soloed), k = !!v;
@@ -10494,25 +10501,25 @@ function Dv() {
10494
10501
  else {
10495
10502
  const D = new OfflineAudioContext(2, g, w);
10496
10503
  let R = 0;
10497
- const E = C.reduce((O, { track: B }) => O + B.clips.length, 0);
10504
+ const A = C.reduce((O, { track: B }) => O + B.clips.length, 0);
10498
10505
  for (const { track: O, state: B } of C)
10499
10506
  if (!(B.muted && !B.soloed) && !(S && !B.soloed))
10500
10507
  for (const X of O.clips) {
10501
10508
  await Wv(D, X, B, w, m), R++;
10502
- const J = R / E * 0.5;
10509
+ const J = R / A * 0.5;
10503
10510
  r(J), b?.(J);
10504
10511
  }
10505
10512
  r(0.5), b?.(0.5), I = await D.startRendering();
10506
10513
  }
10507
10514
  r(0.9), b?.(0.9);
10508
- const A = $v(I, { bitDepth: p });
10515
+ const E = $v(I, { bitDepth: p });
10509
10516
  if (r(1), b?.(1), f) {
10510
10517
  const D = d === "individual" ? `${u}_${i[h].name}` : u;
10511
- Tv(A, `${D}.wav`);
10518
+ Tv(E, `${D}.wav`);
10512
10519
  }
10513
10520
  return {
10514
10521
  audioBuffer: I,
10515
- blob: A,
10522
+ blob: E,
10516
10523
  duration: _
10517
10524
  };
10518
10525
  } catch (w) {
@@ -10545,14 +10552,14 @@ async function Pv(e, t, n, r, a, o, s, i) {
10545
10552
  k ? k(S, p, !0) : S.connect(p), C.connect(S), _.connect(C);
10546
10553
  for (const I of w.clips) {
10547
10554
  const {
10548
- audioBuffer: A,
10555
+ audioBuffer: E,
10549
10556
  startSample: D,
10550
10557
  durationSamples: R,
10551
- offsetSamples: E,
10558
+ offsetSamples: A,
10552
10559
  gain: O,
10553
10560
  fadeIn: B,
10554
10561
  fadeOut: X
10555
- } = I, J = D / a, oe = R / a, L = E / a, ae = new f(A), se = new h(ae), ie = new u(O);
10562
+ } = I, J = D / a, oe = R / a, L = A / a, ae = new f(E), se = new h(ae), ie = new u(O);
10556
10563
  if (se.connect(ie), ie.connect(_), B) {
10557
10564
  const ce = J, ye = J + B.duration, _e = ko(ie.gain);
10558
10565
  _e && (_e.setValueAtTime(0, ce), _e.linearRampToValueAtTime(O, ye));
@@ -10934,8 +10941,8 @@ function Vv(e, t) {
10934
10941
  }).then((k) => {
10935
10942
  f.set(w, k);
10936
10943
  const I = y.get(w) ?? /* @__PURE__ */ new Set();
10937
- y.delete(w), m.delete(w), !h && (r((A) => {
10938
- const D = new Map(A);
10944
+ y.delete(w), m.delete(w), !h && (r((E) => {
10945
+ const D = new Map(E);
10939
10946
  for (const R of I)
10940
10947
  D.set(R, k);
10941
10948
  return D;
@@ -11064,7 +11071,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11064
11071
  return c.annotations;
11065
11072
  }, [c?.annotations]), C = T(_);
11066
11073
  C.current = _;
11067
- const [S, k] = V(null), [I, A] = V(!1), [D, R] = V(0), [E, O] = V(0), [B, X] = V([]), [J, oe] = V([]), [L, ae] = V([]), [se, ie] = V(s), [ce, ye] = V(
11074
+ const [S, k] = V(null), [I, E] = V(!1), [D, R] = V(0), [A, O] = V(0), [B, X] = V([]), [J, oe] = V([]), [L, ae] = V([]), [se, ie] = V(s), [ce, ye] = V(
11068
11075
  c?.isContinuousPlay ?? !1
11069
11076
  ), [_e, Fe] = V(c?.linkEndpoints ?? !1), [Y, N] = V(c?.editable ?? !1), [he, U] = V(!1), $ = T(null), ge = T(!1), Le = T(!1);
11070
11077
  Le.current = I;
@@ -11093,8 +11100,8 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11093
11100
  onEngineState: ki
11094
11101
  } = Cv({ engineRef: $ }), {
11095
11102
  selectedTrackId: Ii,
11096
- setSelectedTrackId: Ai,
11097
- onEngineState: Ei,
11103
+ setSelectedTrackId: Ei,
11104
+ onEngineState: Ai,
11098
11105
  selectedTrackIdRef: Mi
11099
11106
  } = Sv({ engineRef: $ }), { animationFrameRef: $i, startAnimationFrameLoop: to, stopAnimationFrameLoop: ea } = Yd(), vf = Te(
11100
11107
  () => Math.min(...g ?? [256, 512, 1024, 2048, 4096, 8192]),
@@ -11117,7 +11124,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11117
11124
  if (!ke.current || !B.length) return;
11118
11125
  const F = ke.current, H = ze.current, pe = Ue;
11119
11126
  if (H === pe) return;
11120
- const z = l.show ? l.width : 0, Ae = F.clientWidth, Ne = F.scrollLeft + Ae / 2 - z, Pn = B[0].sampleRate, Rn = Ne * H / Pn * Pn / pe, oo = Math.max(0, Rn + z - Ae / 2);
11127
+ const z = l.show ? l.width : 0, Ee = F.clientWidth, Ne = F.scrollLeft + Ee / 2 - z, Pn = B[0].sampleRate, Rn = Ne * H / Pn * Pn / pe, oo = Math.max(0, Rn + z - Ee / 2);
11121
11128
  F.scrollLeft = oo, ze.current = pe;
11122
11129
  }, [Ue, B, l]);
11123
11130
  const ta = T(null);
@@ -11125,8 +11132,8 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11125
11132
  if (no || ue.current) {
11126
11133
  no && (St.current = null);
11127
11134
  let z = 0;
11128
- e.forEach((Ae) => {
11129
- Ae.clips.forEach((He) => {
11135
+ e.forEach((Ee) => {
11136
+ Ee.clips.forEach((He) => {
11130
11137
  const Ne = (He.startSample + He.durationSamples) / He.sampleRate;
11131
11138
  z = Math.max(z, Ne);
11132
11139
  });
@@ -11144,13 +11151,13 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11144
11151
  e.forEach(($e) => {
11145
11152
  $e.clips.length > 0 && $e.clips[0].audioBuffer && z.push($e.clips[0].audioBuffer);
11146
11153
  });
11147
- let Ae = 0;
11154
+ let Ee = 0;
11148
11155
  e.forEach(($e) => {
11149
11156
  $e.clips.forEach((vt) => {
11150
11157
  const Qt = vt.sampleRate, Cf = (vt.startSample + vt.durationSamples) / Qt;
11151
- Ae = Math.max(Ae, Cf);
11158
+ Ee = Math.max(Ee, Cf);
11152
11159
  });
11153
- }), X(z), O(Ae), ae(($e) => $e.length === e.length ? $e.map((vt, Qt) => ({
11160
+ }), X(z), O(Ee), ae(($e) => $e.length === e.length ? $e.map((vt, Qt) => ({
11154
11161
  ...vt,
11155
11162
  name: e[Qt].name
11156
11163
  })) : e.map((vt) => ({
@@ -11178,14 +11185,14 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11178
11185
  });
11179
11186
  let Rn = !0;
11180
11187
  Ne.on("statechange", ($e) => {
11181
- dn($e), ki($e), Ei($e), kt($e), we($e), !Rn && $e.tracksVersion !== Wt.current && (Wt.current = $e.tracksVersion, St.current = $e.tracks, p ? p($e.tracks) : console.warn(
11188
+ dn($e), ki($e), Ai($e), kt($e), we($e), !Rn && $e.tracksVersion !== Wt.current && (Wt.current = $e.tracksVersion, St.current = $e.tracks, p ? p($e.tracks) : console.warn(
11182
11189
  "[waveform-playlist] Engine tracks changed but onTracksChange prop is not set — UI will revert on next render. Pass onTracksChange to WaveformPlaylistProvider."
11183
11190
  ));
11184
11191
  }), Ne.setTracks(ra), Rn = !1, Wt.current = Ne.getState().tracksVersion, $.current = Ne, U(!0);
11185
11192
  const oo = new CustomEvent("waveform-playlist:ready", {
11186
11193
  detail: {
11187
11194
  trackCount: e.length,
11188
- duration: Ae
11195
+ duration: Ee
11189
11196
  }
11190
11197
  });
11191
11198
  window.dispatchEvent(oo), d?.();
@@ -11212,7 +11219,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11212
11219
  ea,
11213
11220
  dn,
11214
11221
  ki,
11215
- Ei,
11222
+ Ai,
11216
11223
  kt,
11217
11224
  we,
11218
11225
  p,
@@ -11226,10 +11233,10 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11226
11233
  ]), j(() => {
11227
11234
  if (e.length === 0) return;
11228
11235
  const F = e.map((H) => H.clips.map((z) => {
11229
- let Ae;
11236
+ let Ee;
11230
11237
  if (z.waveformData)
11231
11238
  try {
11232
- Ae = Vl(
11239
+ Ee = Vl(
11233
11240
  z.waveformData,
11234
11241
  Ue,
11235
11242
  n,
@@ -11239,11 +11246,11 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11239
11246
  } catch (He) {
11240
11247
  console.warn("[waveform-playlist] Failed to extract peaks from waveformData:", He);
11241
11248
  }
11242
- if (!Ae) {
11249
+ if (!Ee) {
11243
11250
  const He = Ti.get(z.id);
11244
11251
  if (He)
11245
11252
  try {
11246
- Ae = Vl(
11253
+ Ee = Vl(
11247
11254
  He,
11248
11255
  Ue,
11249
11256
  n,
@@ -11254,12 +11261,12 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11254
11261
  console.warn("[waveform-playlist] Failed to extract peaks from cache:", Ne);
11255
11262
  }
11256
11263
  }
11257
- if (!Ae) {
11264
+ if (!Ee) {
11258
11265
  !z.audioBuffer && !z.waveformData && console.warn(
11259
11266
  `[waveform-playlist] Clip "${z.id}" has no audio data or waveform data`
11260
11267
  );
11261
11268
  const He = n ? 1 : z.audioBuffer?.numberOfChannels ?? 1;
11262
- Ae = {
11269
+ Ee = {
11263
11270
  length: 0,
11264
11271
  data: Array.from({ length: He }, () => new Int16Array(0)),
11265
11272
  bits: 16
@@ -11268,7 +11275,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11268
11275
  return {
11269
11276
  clipId: z.id,
11270
11277
  trackName: H.name,
11271
- peaks: Ae,
11278
+ peaks: Ee,
11272
11279
  startSample: z.startSample,
11273
11280
  durationSamples: z.durationSamples,
11274
11281
  fadeIn: z.fadeIn,
@@ -11292,38 +11299,38 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11292
11299
  const pe = C.current;
11293
11300
  if (pe.length > 0) {
11294
11301
  const z = pe.find(
11295
- (Ae) => H >= Ae.start && H < Ae.end
11302
+ (Ee) => H >= Ee.start && H < Ee.end
11296
11303
  );
11297
11304
  if (tt.current)
11298
11305
  z && z.id !== dt.current ? Xt(z.id) : !z && dt.current !== null && Xt(null);
11299
11306
  else if (dt.current) {
11300
- const Ae = pe.find(
11307
+ const Ee = pe.find(
11301
11308
  (He) => He.id === dt.current
11302
11309
  );
11303
- if (Ae && H >= Ae.end) {
11304
- $.current && $.current.stop(), A(!1), be.current = Q.current, R(Q.current);
11310
+ if (Ee && H >= Ee.end) {
11311
+ $.current && $.current.stop(), E(!1), be.current = Q.current, R(Q.current);
11305
11312
  return;
11306
11313
  }
11307
11314
  } else
11308
11315
  z && Xt(z.id);
11309
11316
  }
11310
11317
  if (Je.current && ke.current && B.length > 0) {
11311
- const z = ke.current, Ae = B[0].sampleRate, He = H * Ae / ze.current, Ne = z.clientWidth, Pn = l.show ? l.width : 0, ra = He + Pn, Rn = Math.max(0, ra - Ne / 2);
11318
+ const z = ke.current, Ee = B[0].sampleRate, He = H * Ee / ze.current, Ne = z.clientWidth, Pn = l.show ? l.width : 0, ra = He + Pn, Rn = Math.max(0, ra - Ne / 2);
11312
11319
  z.scrollLeft = Rn;
11313
11320
  }
11314
11321
  if (Ye.current !== null && H >= Ye.current) {
11315
- $.current && $.current.stop(), A(!1), be.current = Ye.current, R(Ye.current), Ye.current = null;
11322
+ $.current && $.current.stop(), E(!1), be.current = Ye.current, R(Ye.current), Ye.current = null;
11316
11323
  return;
11317
11324
  }
11318
- if (H >= E) {
11319
- $.current && $.current.stop(), A(!1), be.current = Q.current, R(Q.current), Xt(null);
11325
+ if (H >= A) {
11326
+ $.current && $.current.stop(), E(!1), be.current = Q.current, R(Q.current), Xt(null);
11320
11327
  return;
11321
11328
  }
11322
11329
  to(F);
11323
11330
  };
11324
11331
  to(F);
11325
11332
  }, [
11326
- E,
11333
+ A,
11327
11334
  B,
11328
11335
  l.show,
11329
11336
  l.width,
@@ -11342,7 +11349,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11342
11349
  } else
11343
11350
  gt(), pn();
11344
11351
  })().catch((H) => {
11345
- console.warn("[waveform-playlist] Failed to reschedule playback:", H), A(!1), gt();
11352
+ console.warn("[waveform-playlist] Failed to reschedule playback:", H), E(!1), gt();
11346
11353
  });
11347
11354
  }, [ce, I, pn, gt, $i]), j(() => {
11348
11355
  (async () => {
@@ -11350,10 +11357,10 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11350
11357
  const { position: H } = ta.current;
11351
11358
  ta.current = null;
11352
11359
  const z = Gt().currentTime;
11353
- q.current = z, Oe.current = H, ge.current || (await $.current.init(), ge.current = !0), $.current.play(H), A(!0), pn();
11360
+ q.current = z, Oe.current = H, ge.current || (await $.current.init(), ge.current = !0), $.current.play(H), E(!0), pn();
11354
11361
  }
11355
11362
  })().catch((H) => {
11356
- console.warn("[waveform-playlist] Failed to resume playback after track change:", H), A(!1), gt();
11363
+ console.warn("[waveform-playlist] Failed to resume playback after track change:", H), E(!1), gt();
11357
11364
  });
11358
11365
  }, [e, pn, gt]);
11359
11366
  const na = M(
@@ -11361,8 +11368,8 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11361
11368
  if (!$.current || B.length === 0) return;
11362
11369
  const pe = F ?? be.current;
11363
11370
  Q.current = pe, be.current = pe, $.current.stop(), $.current.seek(pe), gt();
11364
- const Ae = Gt().currentTime;
11365
- q.current = Ae, Oe.current = pe, Ye.current = H !== void 0 ? pe + H : null, ge.current || (await $.current.init(), ge.current = !0);
11371
+ const Ee = Gt().currentTime;
11372
+ q.current = Ee, Oe.current = pe, Ye.current = H !== void 0 ? pe + H : null, ge.current || (await $.current.init(), ge.current = !0);
11366
11373
  const He = H !== void 0 ? pe + H : void 0;
11367
11374
  try {
11368
11375
  $.current.play(pe, He);
@@ -11370,21 +11377,21 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11370
11377
  console.warn("[waveform-playlist] Playback failed to start:", Ne), gt();
11371
11378
  return;
11372
11379
  }
11373
- A(!0), pn();
11380
+ E(!0), pn();
11374
11381
  },
11375
11382
  [B.length, pn, gt]
11376
11383
  ), Wi = M(() => {
11377
11384
  if (!$.current) return;
11378
11385
  const F = Dn();
11379
- $.current.pause(), A(!1), gt(), be.current = F, R(F);
11386
+ $.current.pause(), E(!1), gt(), be.current = F, R(F);
11380
11387
  }, [gt, Dn]), Fi = M(() => {
11381
- $.current && ($.current.stop(), A(!1), gt(), be.current = Q.current, R(Q.current), Xt(null));
11388
+ $.current && ($.current.stop(), E(!1), gt(), be.current = Q.current, R(Q.current), Xt(null));
11382
11389
  }, [gt, Xt]), Oi = M(
11383
11390
  (F) => {
11384
- const H = Math.max(0, Math.min(F, E));
11391
+ const H = Math.max(0, Math.min(F, A));
11385
11392
  be.current = H, R(H), I && $.current && na(H);
11386
11393
  },
11387
- [E, I, na]
11394
+ [A, I, na]
11388
11395
  ), Bi = M(
11389
11396
  (F, H) => {
11390
11397
  const pe = Ge.current[F]?.id;
@@ -11506,7 +11513,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11506
11513
  setTrackPan: zi,
11507
11514
  // Selection
11508
11515
  setSelection: Zi,
11509
- setSelectedTrackId: Ai,
11516
+ setSelectedTrackId: Ei,
11510
11517
  // Time format
11511
11518
  setTimeFormat: ne,
11512
11519
  formatTime: xe,
@@ -11542,7 +11549,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11542
11549
  Li,
11543
11550
  zi,
11544
11551
  Zi,
11545
- Ai,
11552
+ Ei,
11546
11553
  ne,
11547
11554
  xe,
11548
11555
  Me.zoomIn,
@@ -11563,7 +11570,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11563
11570
  ]
11564
11571
  ), _f = Te(
11565
11572
  () => ({
11566
- duration: E,
11573
+ duration: A,
11567
11574
  audioBuffers: B,
11568
11575
  peaksDataArray: J,
11569
11576
  trackStates: L,
@@ -11587,7 +11594,7 @@ const Ud = Ze(null), Kd = Ze(null), jd = Ze(null), qd = Ze(null), d1 = ({
11587
11594
  isDraggingRef: ue
11588
11595
  }),
11589
11596
  [
11590
- E,
11597
+ A,
11591
11598
  B,
11592
11599
  J,
11593
11600
  L,
@@ -11893,7 +11900,7 @@ const Jd = Ze(null), Qd = Ze(null), ef = Ze(null), tf = Ze(null), f1 = ({
11893
11900
  onReady: f,
11894
11901
  children: m
11895
11902
  }) => {
11896
- const y = d ?? c + u, [v, p] = V(!1), [b, w] = V(0), [g, _] = V(0), [C, S] = V([]), [k, I] = V(a), A = Te(() => {
11903
+ const y = d ?? c + u, [v, p] = V(!1), [b, w] = V(0), [g, _] = V(0), [C, S] = V([]), [k, I] = V(a), E = Te(() => {
11897
11904
  if (!l?.annotations) return [];
11898
11905
  if (process.env.NODE_ENV !== "production" && l.annotations.length > 0) {
11899
11906
  const G = l.annotations[0];
@@ -11903,9 +11910,9 @@ const Jd = Ze(null), Qd = Ze(null), ef = Ze(null), tf = Ze(null), f1 = ({
11903
11910
  ), [];
11904
11911
  }
11905
11912
  return l.annotations;
11906
- }, [l?.annotations]), D = T(A);
11907
- D.current = A;
11908
- const [R, E] = V(null), [O, B] = V(
11913
+ }, [l?.annotations]), D = T(E);
11914
+ D.current = E;
11915
+ const [R, A] = V(null), [O, B] = V(
11909
11916
  l?.isContinuousPlay ?? !1
11910
11917
  ), [X] = V(t), [J, oe] = V(o), L = T(null), ae = T(0), se = T(O), ie = T(null), ce = T(null), ye = T(o), _e = T(t), { startAnimationFrameLoop: Fe, stopAnimationFrameLoop: Y } = Yd();
11911
11918
  j(() => {
@@ -11914,7 +11921,7 @@ const Jd = Ze(null), Qd = Ze(null), ef = Ze(null), tf = Ze(null), f1 = ({
11914
11921
  ye.current = J;
11915
11922
  }, [J]);
11916
11923
  const N = M((G) => {
11917
- ie.current = G, E(G);
11924
+ ie.current = G, A(G);
11918
11925
  }, []), he = M((G) => {
11919
11926
  se.current = G, B(G);
11920
11927
  }, []), U = M((G) => {
@@ -12030,12 +12037,12 @@ const Jd = Ze(null), Qd = Ze(null), ef = Ze(null), tf = Ze(null), f1 = ({
12030
12037
  ), ke = Te(
12031
12038
  () => ({
12032
12039
  continuousPlay: O,
12033
- annotations: A,
12040
+ annotations: E,
12034
12041
  activeAnnotationId: R,
12035
12042
  playbackRate: k,
12036
12043
  isAutomaticScroll: J
12037
12044
  }),
12038
- [O, A, R, k, J]
12045
+ [O, E, R, k, J]
12039
12046
  ), Je = T(h);
12040
12047
  Je.current = h;
12041
12048
  const tt = M(
@@ -12246,7 +12253,7 @@ const Jd = Ze(null), Qd = Ze(null), ef = Ze(null), tf = Ze(null), f1 = ({
12246
12253
  }, [r, s, a, o]), j(() => {
12247
12254
  !r && t.current && (t.current.textContent = Xn(a.current ?? 0, s));
12248
12255
  }), /* @__PURE__ */ x(Hv, { ref: t, className: e, "aria-label": "Audio position", children: Xn(a.current ?? 0, s) });
12249
- }, A1 = ({ className: e }) => {
12256
+ }, E1 = ({ className: e }) => {
12250
12257
  const { selectionStart: t, selectionEnd: n } = Ct(), { setSelection: r } = Ve();
12251
12258
  return /* @__PURE__ */ x(
12252
12259
  h0,
@@ -12257,7 +12264,7 @@ const Jd = Ze(null), Qd = Ze(null), ef = Ze(null), tf = Ze(null), f1 = ({
12257
12264
  className: e
12258
12265
  }
12259
12266
  );
12260
- }, E1 = ({ className: e }) => {
12267
+ }, A1 = ({ className: e }) => {
12261
12268
  const { isAutomaticScroll: t } = Ct(), { setAutomaticScroll: n } = Ve();
12262
12269
  return /* @__PURE__ */ x(
12263
12270
  $g,
@@ -12411,8 +12418,8 @@ const $1 = ({ className: e }) => {
12411
12418
  const C = () => {
12412
12419
  if (r.current) {
12413
12420
  const k = (i ? c() : l.current ?? 0) * d, I = e + t;
12414
- let A = 0;
12415
- k <= e ? A = 0 : k >= I ? A = 1 : A = (k - e) / t, r.current.style.transform = `scaleX(${A})`;
12421
+ let E = 0;
12422
+ k <= e ? E = 0 : k >= I ? E = 1 : E = (k - e) / t, r.current.style.transform = `scaleX(${E})`;
12416
12423
  }
12417
12424
  i && (a.current = requestAnimationFrame(C));
12418
12425
  };
@@ -12518,10 +12525,10 @@ const Kv = 60, jv = ({
12518
12525
  linkEndpoints: S,
12519
12526
  continuousPlay: k,
12520
12527
  selectedTrackId: I,
12521
- loopStart: A,
12528
+ loopStart: E,
12522
12529
  loopEnd: D,
12523
12530
  isLoopEnabled: R
12524
- } = Ct(), E = We(Qa), {
12531
+ } = Ct(), A = We(Qa), {
12525
12532
  setAnnotations: O,
12526
12533
  setActiveAnnotationId: B,
12527
12534
  setTrackMute: X,
@@ -12662,8 +12669,8 @@ const Kv = 60, jv = ({
12662
12669
  R && /* @__PURE__ */ x(
12663
12670
  f0,
12664
12671
  {
12665
- startPosition: Math.min(A, D) * $ / U,
12666
- endPosition: Math.max(A, D) * $ / U,
12672
+ startPosition: Math.min(E, D) * $ / U,
12673
+ endPosition: Math.max(E, D) * $ / U,
12667
12674
  markerColor: h.loopMarkerColor,
12668
12675
  regionColor: h.loopRegionColor,
12669
12676
  minPosition: 0,
@@ -12782,7 +12789,7 @@ const Kv = 60, jv = ({
12782
12789
  we !== "waveform" && (() => {
12783
12790
  const le = Oe.get(te.id), Ke = le?.config;
12784
12791
  return !Ke?.labels || !le ? null : /* @__PURE__ */ x(
12785
- A0,
12792
+ E0,
12786
12793
  {
12787
12794
  waveHeight: ge,
12788
12795
  numChannels: mt,
@@ -12895,10 +12902,10 @@ const Kv = 60, jv = ({
12895
12902
  }
12896
12903
  ) }, te.id);
12897
12904
  }),
12898
- g.length > 0 && E && /* @__PURE__ */ x(E.AnnotationBoxesWrapper, { height: 30, width: ze, children: g.map((Z, K) => {
12905
+ g.length > 0 && A && /* @__PURE__ */ x(A.AnnotationBoxesWrapper, { height: 30, width: ze, children: g.map((Z, K) => {
12899
12906
  const te = Z.start * $ / U, Ie = Z.end * $ / U, we = a ? a(Z, K) : Z.id;
12900
12907
  return /* @__PURE__ */ x(
12901
- E.AnnotationBox,
12908
+ A.AnnotationBox,
12902
12909
  {
12903
12910
  annotationId: Z.id,
12904
12911
  annotationIndex: K,
@@ -13117,37 +13124,37 @@ function oy(e) {
13117
13124
  });
13118
13125
  return j(() => {
13119
13126
  if (!u.current) throw new Error("Renderer not found");
13120
- const { renderer: k, trackRendering: I } = u.current, { monitor: A } = S;
13127
+ const { renderer: k, trackRendering: I } = u.current, { monitor: E } = S;
13121
13128
  S.renderer = k;
13122
13129
  const D = [
13123
- A.addEventListener("beforedragstart", (R) => {
13124
- const E = p.current;
13125
- E && I(() => E(R, S));
13130
+ E.addEventListener("beforedragstart", (R) => {
13131
+ const A = p.current;
13132
+ A && I(() => A(R, S));
13126
13133
  }),
13127
- A.addEventListener(
13134
+ E.addEventListener(
13128
13135
  "dragstart",
13129
13136
  (R) => {
13130
- var E;
13131
- return (E = b.current) == null ? void 0 : E.call(b, R, S);
13137
+ var A;
13138
+ return (A = b.current) == null ? void 0 : A.call(b, R, S);
13132
13139
  }
13133
13140
  ),
13134
- A.addEventListener("dragover", (R) => {
13135
- const E = w.current;
13136
- E && I(() => E(R, S));
13141
+ E.addEventListener("dragover", (R) => {
13142
+ const A = w.current;
13143
+ A && I(() => A(R, S));
13137
13144
  }),
13138
- A.addEventListener("dragmove", (R) => {
13139
- const E = g.current;
13140
- E && I(() => E(R, S));
13145
+ E.addEventListener("dragmove", (R) => {
13146
+ const A = g.current;
13147
+ A && I(() => A(R, S));
13141
13148
  }),
13142
- A.addEventListener("dragend", (R) => {
13143
- const E = _.current;
13144
- E && I(() => E(R, S));
13149
+ E.addEventListener("dragend", (R) => {
13150
+ const A = _.current;
13151
+ A && I(() => A(R, S));
13145
13152
  }),
13146
- A.addEventListener(
13153
+ E.addEventListener(
13147
13154
  "collision",
13148
13155
  (R) => {
13149
- var E;
13150
- return (E = C.current) == null ? void 0 : E.call(C, R, S);
13156
+ var A;
13157
+ return (A = C.current) == null ? void 0 : A.call(C, R, S);
13151
13158
  }
13152
13159
  )
13153
13160
  ];
@@ -13358,7 +13365,7 @@ const Cy = (e) => {
13358
13365
  }), /* @__PURE__ */ x(Sy, { ref: n, $color: e, $width: l, "data-playhead": !0 });
13359
13366
  }, Iy = W.div`
13360
13367
  position: relative;
13361
- `, Ay = W.div`
13368
+ `, Ey = W.div`
13362
13369
  position: absolute;
13363
13370
  top: ${(e) => e.$top}px;
13364
13371
  left: 0;
@@ -13369,7 +13376,7 @@ const Cy = (e) => {
13369
13376
  transform: translateZ(0);
13370
13377
  backface-visibility: hidden;
13371
13378
  will-change: transform;
13372
- `, Ey = W.div`
13379
+ `, Ay = W.div`
13373
13380
  position: absolute;
13374
13381
  top: ${(e) => e.$top}px;
13375
13382
  left: 0;
@@ -13436,7 +13443,7 @@ const Cy = (e) => {
13436
13443
  const m = ln(f);
13437
13444
  return /* @__PURE__ */ me(Iy, { children: [
13438
13445
  /* @__PURE__ */ x(
13439
- Ay,
13446
+ Ey,
13440
13447
  {
13441
13448
  $color: m,
13442
13449
  $height: s,
@@ -13445,7 +13452,7 @@ const Cy = (e) => {
13445
13452
  }
13446
13453
  ),
13447
13454
  /* @__PURE__ */ x(
13448
- Ey,
13455
+ Ay,
13449
13456
  {
13450
13457
  ref: r,
13451
13458
  $color: d,
@@ -13473,7 +13480,7 @@ const Cy = (e) => {
13473
13480
  playoutRef: C,
13474
13481
  barWidth: S,
13475
13482
  barGap: k
13476
- } = _i(), [I, A] = V(0), [D, R] = V(0), [E, O] = V(!1), B = T(null), X = M(
13483
+ } = _i(), [I, E] = V(0), [D, R] = V(0), [A, O] = V(!1), B = T(null), X = M(
13477
13484
  (Y) => {
13478
13485
  B.current = Y, m(Y);
13479
13486
  },
@@ -13507,25 +13514,25 @@ const Cy = (e) => {
13507
13514
  }), ce = M(
13508
13515
  (Y) => {
13509
13516
  const N = Y.currentTarget.getBoundingClientRect(), he = _.show ? _.width : 0, $ = (Y.clientX - N.left - he) * g / p;
13510
- O(!0), A($), R($);
13517
+ O(!0), E($), R($);
13511
13518
  },
13512
13519
  [_, g, p]
13513
13520
  ), ye = M(
13514
13521
  (Y) => {
13515
- if (!E) return;
13522
+ if (!A) return;
13516
13523
  const N = Y.currentTarget.getBoundingClientRect(), he = _.show ? _.width : 0, $ = (Y.clientX - N.left - he) * g / p;
13517
13524
  R($);
13518
13525
  },
13519
- [E, _, g, p]
13526
+ [A, _, g, p]
13520
13527
  ), _e = M(
13521
13528
  (Y) => {
13522
- if (!E) return;
13529
+ if (!A) return;
13523
13530
  O(!1);
13524
13531
  const N = Y.currentTarget.getBoundingClientRect(), he = _.show ? _.width : 0, $ = (Y.clientX - N.left - he) * g / p, ge = Math.min(I, $), Le = Math.max(I, $);
13525
- Math.abs(Le - ge) < 0.1 ? (d(ge), A(ge), R(ge), s && C.current && (C.current.stop(), u(ge))) : (A(ge), R(Le));
13532
+ Math.abs(Le - ge) < 0.1 ? (d(ge), E(ge), R(ge), s && C.current && (C.current.stop(), u(ge))) : (E(ge), R(Le));
13526
13533
  },
13527
13534
  [
13528
- E,
13535
+ A,
13529
13536
  I,
13530
13537
  g,
13531
13538
  p,
@@ -13567,7 +13574,7 @@ const Cy = (e) => {
13567
13574
  onTracksMouseMove: ye,
13568
13575
  onTracksMouseUp: _e,
13569
13576
  scrollContainerRef: X,
13570
- isSelecting: E,
13577
+ isSelecting: A,
13571
13578
  timescale: w > 0 ? /* @__PURE__ */ x(zd, {}) : void 0,
13572
13579
  children: /* @__PURE__ */ me(Lt, { children: [
13573
13580
  v.map((Y, N) => {
@@ -13752,7 +13759,7 @@ let Yl = za;
13752
13759
  export {
13753
13760
  M1 as AnnotationIntegrationProvider,
13754
13761
  I1 as AudioPosition,
13755
- E1 as AutomaticScrollCheckbox,
13762
+ A1 as AutomaticScrollCheckbox,
13756
13763
  Yl as ClipCollisionModifier,
13757
13764
  $1 as ContinuousPlayCheckbox,
13758
13765
  P1 as DownloadAnnotationsButton,
@@ -13771,7 +13778,7 @@ export {
13771
13778
  qv as PlaylistAnnotationList,
13772
13779
  jv as PlaylistVisualization,
13773
13780
  g1 as RewindButton,
13774
- A1 as SelectionTimeInputs,
13781
+ E1 as SelectionTimeInputs,
13775
13782
  _1 as SetLoopRegionButton,
13776
13783
  y1 as SkipBackwardButton,
13777
13784
  b1 as SkipForwardButton,