@waveform-playlist/browser 9.3.1 → 9.3.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.d.ts +25 -0
- package/dist/index.js +63 -63
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +541 -501
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import * as nh from "tone";
|
|
|
2
2
|
import { now as Va, Context as rh, setContext as oh, Volume as Qo, getDestination as ea, getTransport as Wt, start as ah, getContext as Lt, Panner as Ds, Gain as Rs, PolySynth as io, Synth as sh, MembraneSynth as lo, NoiseSynth as ih, MetalSynth as bl, Part as wc, Analyser as _c, StereoWidener as lh, Gate as ch, Limiter as uh, Compressor as dh, Chebyshev as fh, BitCrusher as hh, Distortion as ph, EQ3 as mh, AutoWah as gh, AutoFilter as vh, AutoPanner as yh, Vibrato as bh, Tremolo as wh, Phaser as _h, Chorus as Sh, PingPongDelay as kh, FeedbackDelay as Ch, JCReverb as xh, Freeverb as Eh, Reverb as Ih } from "tone";
|
|
3
3
|
import { jsx as k, jsxs as me, Fragment as zt } from "react/jsx-runtime";
|
|
4
4
|
import * as P from "react";
|
|
5
|
-
import at, { useEffect as K, useLayoutEffect as Nr, useRef as T, useMemo as Ce, useState as z, useCallback as $, useContext as
|
|
5
|
+
import at, { useEffect as K, useLayoutEffect as Nr, useRef as T, useMemo as Ce, useState as z, useCallback as $, useContext as Fe, createContext as Ve, memo as Sc, forwardRef as kc, startTransition as Ps, useImperativeHandle as Cc, useSyncExternalStore as Ah, Fragment as Mh, useInsertionEffect as Th } from "react";
|
|
6
6
|
import O, { ThemeContext as $h, withTheme as xc, useTheme as Dh, ThemeProvider as Ec } from "styled-components";
|
|
7
7
|
import { flushSync as Rh, createPortal as Ic } from "react-dom";
|
|
8
8
|
var ka = { exports: {} }, wl;
|
|
@@ -837,8 +837,8 @@ function Ph() {
|
|
|
837
837
|
var Q = !0, q = !1, oe = void 0;
|
|
838
838
|
try {
|
|
839
839
|
for (var X, ee = H[Symbol.iterator](); !(Q = (X = ee.next()).done); Q = !0) {
|
|
840
|
-
var ie = X.value, fe = ie.sample, he = u({}, F.generators, ie.generators),
|
|
841
|
-
return { keyNumber: b, preset: E, instrument: L, sample: fe, generators: he, modulators:
|
|
840
|
+
var ie = X.value, fe = ie.sample, he = u({}, F.generators, ie.generators), Re = u({}, F.modulators, ie.modulators);
|
|
841
|
+
return { keyNumber: b, preset: E, instrument: L, sample: fe, generators: he, modulators: Re };
|
|
842
842
|
}
|
|
843
843
|
} catch (Z) {
|
|
844
844
|
q = !0, oe = Z;
|
|
@@ -3196,7 +3196,7 @@ function ge({ get: e }, t) {
|
|
|
3196
3196
|
}
|
|
3197
3197
|
};
|
|
3198
3198
|
}
|
|
3199
|
-
function
|
|
3199
|
+
function Pe(e, t) {
|
|
3200
3200
|
const n = /* @__PURE__ */ new WeakMap();
|
|
3201
3201
|
return function() {
|
|
3202
3202
|
let r = n.get(this);
|
|
@@ -3408,7 +3408,7 @@ function Mp(e, t) {
|
|
|
3408
3408
|
const n = Math.max(t.top, e.top), r = Math.max(t.left, e.left), o = Math.min(t.left + t.width, e.left + e.width), a = Math.min(t.top + t.height, e.top + e.height), s = o - r, i = a - n;
|
|
3409
3409
|
return r < o && n < a ? s * i : 0;
|
|
3410
3410
|
}
|
|
3411
|
-
var ru, ou, es, wo, Gr, oa = class extends (es = un, ou = [
|
|
3411
|
+
var ru, ou, es, wo, Gr, oa = class extends (es = un, ou = [Pe], ru = [Pe], es) {
|
|
3412
3412
|
constructor(t) {
|
|
3413
3413
|
const n = Nt.from(t);
|
|
3414
3414
|
super(n, (r, o) => Nt.equals(r, o)), xp(Gr, 5, this), Ip(this, wo, 0), this.velocity = { x: 0, y: 0 };
|
|
@@ -3861,7 +3861,7 @@ var Np = class extends Ur {
|
|
|
3861
3861
|
);
|
|
3862
3862
|
}
|
|
3863
3863
|
}, Us = /* @__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))(Us || {}), Xs = /* @__PURE__ */ ((e) => (e[e.Collision = 0] = "Collision", e[e.ShapeIntersection = 1] = "ShapeIntersection", e[e.PointerIntersection = 2] = "PointerIntersection", e))(Xs || {}), gu, vu, yu, bu, wu, _u, Su, Mt, Ys;
|
|
3864
|
-
Su = [ge], _u = [
|
|
3864
|
+
Su = [ge], _u = [Pe], wu = [Pe], bu = [Pe], yu = [Pe], vu = [Pe], gu = [Pe];
|
|
3865
3865
|
var Kt = class {
|
|
3866
3866
|
constructor() {
|
|
3867
3867
|
se(Mt, 5, this), Se(this, Ys, se(
|
|
@@ -4208,7 +4208,7 @@ var Ll = class {
|
|
|
4208
4208
|
}
|
|
4209
4209
|
this.map.value = /* @__PURE__ */ new Map();
|
|
4210
4210
|
}
|
|
4211
|
-
}, Iu, Au, Mu, Tu, $u, Du, rs, ct, Qs, ei, ti, Zt = class extends (rs = dn, Du = [ge], $u = [ge], Tu = [ge], Mu = [
|
|
4211
|
+
}, Iu, Au, Mu, Tu, $u, Du, rs, ct, Qs, ei, ti, Zt = class extends (rs = dn, Du = [ge], $u = [ge], Tu = [ge], Mu = [Pe], Au = [Pe], Iu = [Pe], rs) {
|
|
4212
4212
|
constructor(t, n) {
|
|
4213
4213
|
var r = t, { modifiers: o, type: a, sensors: s } = r, i = fu(r, ["modifiers", "type", "sensors"]);
|
|
4214
4214
|
super(i, n), se(ct, 5, this), Se(this, Qs, se(ct, 8, this)), se(ct, 11, this), Se(this, ei, se(ct, 12, this)), se(ct, 15, this), Se(this, ti, se(ct, 16, this, this.isDragSource ? "dragging" : "idle")), se(ct, 19, this), this.type = a, this.sensors = s, this.modifiers = o, this.alignment = i.alignment;
|
|
@@ -4235,7 +4235,7 @@ de(ct, 2, "isDropping", Mu, Zt);
|
|
|
4235
4235
|
de(ct, 2, "isDragging", Au, Zt);
|
|
4236
4236
|
de(ct, 2, "isDragSource", Iu, Zt);
|
|
4237
4237
|
In(ct, Zt);
|
|
4238
|
-
var Ru, Pu, Fu, Ou, Lu, Bu, os, Ye, ni, ri, oi, ai, si, Ht = class extends (os = dn, Bu = [ge], Lu = [ge], Ou = [ge], Fu = [ge], Pu = [ge], Ru = [
|
|
4238
|
+
var Ru, Pu, Fu, Ou, Lu, Bu, os, Ye, ni, ri, oi, ai, si, Ht = class extends (os = dn, Bu = [ge], Lu = [ge], Ou = [ge], Fu = [ge], Pu = [ge], Ru = [Pe], os) {
|
|
4239
4239
|
constructor(t, n) {
|
|
4240
4240
|
var r = t, { accept: o, collisionDetector: a, collisionPriority: s, type: i } = r, l = fu(r, ["accept", "collisionDetector", "collisionPriority", "type"]);
|
|
4241
4241
|
super(l, n), se(Ye, 5, this), Se(this, ni, se(Ye, 8, this)), se(Ye, 11, this), Se(this, ri, se(Ye, 12, this)), se(Ye, 15, this), Se(this, oi, se(Ye, 16, this)), se(Ye, 19, this), Se(this, ai, se(Ye, 20, this)), se(Ye, 23, this), Se(this, si, se(Ye, 24, this)), se(Ye, 27, this), this.accept = o, this.collisionDetector = a, this.collisionPriority = s, this.type = i;
|
|
@@ -4385,7 +4385,7 @@ var jn = class extends mt {
|
|
|
4385
4385
|
this.draggables.destroy(), this.droppables.destroy(), this.plugins.destroy(), this.sensors.destroy(), this.modifiers.destroy();
|
|
4386
4386
|
}
|
|
4387
4387
|
}, Vu, Nu, zu, Zu, Hu, Gu, Uu, Xu, Yu, vr, xo, Nn, Be, ii, li, ci, ui, di, yr;
|
|
4388
|
-
Yu = [
|
|
4388
|
+
Yu = [Pe], Xu = [ge], Uu = [ge], Gu = [ge], Hu = [ge], Zu = [ge], zu = [Pe], Nu = [Pe], Vu = [Pe];
|
|
4389
4389
|
var Bt = class {
|
|
4390
4390
|
/**
|
|
4391
4391
|
* Creates a new drag operation instance.
|
|
@@ -4573,7 +4573,7 @@ var Up = class {
|
|
|
4573
4573
|
}
|
|
4574
4574
|
}, ju = (e) => {
|
|
4575
4575
|
throw TypeError(e);
|
|
4576
|
-
}, fi = (e, t, n) => t.has(e) || ju("Cannot " + n), ce = (e, t, n) => (fi(e, t, "read from private field"), t.get(e)), ht = (e, t, n) => t.has(e) ? ju("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n),
|
|
4576
|
+
}, fi = (e, t, n) => t.has(e) || ju("Cannot " + n), ce = (e, t, n) => (fi(e, t, "read from private field"), t.get(e)), ht = (e, t, n) => t.has(e) ? ju("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), St = (e, t, n, r) => (fi(e, t, "write to private field"), t.set(e, n), n), Ku = (e, t, n) => (fi(e, t, "access private method"), n);
|
|
4577
4577
|
function aa(e) {
|
|
4578
4578
|
return e ? e instanceof KeyframeEffect ? !0 : "getKeyframes" in e && typeof e.getKeyframes == "function" : !1;
|
|
4579
4579
|
}
|
|
@@ -4850,7 +4850,7 @@ var om = Ju ? ResizeObserver : class {
|
|
|
4850
4850
|
constructor(e) {
|
|
4851
4851
|
super((t) => {
|
|
4852
4852
|
if (!ce(this, Eo)) {
|
|
4853
|
-
|
|
4853
|
+
St(this, Eo, !0);
|
|
4854
4854
|
return;
|
|
4855
4855
|
}
|
|
4856
4856
|
e(t, this);
|
|
@@ -4865,14 +4865,14 @@ var Nl = Array.from({ length: 100 }, (e, t) => t / 100), od = 75, yn, Bo, tn, bn
|
|
|
4865
4865
|
}) {
|
|
4866
4866
|
this.element = e, this.callback = t, ht(this, Wo), this.disconnect = () => {
|
|
4867
4867
|
var a, s, i;
|
|
4868
|
-
|
|
4868
|
+
St(this, Ir, !0), (a = ce(this, tn)) == null || a.disconnect(), (s = ce(this, bn)) == null || s.disconnect(), ce(this, br).disconnect(), (i = ce(this, et)) == null || i.remove();
|
|
4869
4869
|
}, ht(this, yn, !0), ht(this, Bo), ht(this, tn), ht(this, bn), ht(this, br), ht(this, et), ht(this, Ir, !1), ht(this, wr, rd(() => {
|
|
4870
4870
|
var a, s, i;
|
|
4871
4871
|
const { element: l } = this;
|
|
4872
4872
|
if ((a = ce(this, bn)) == null || a.disconnect(), ce(this, Ir) || !ce(this, yn) || !l.isConnected)
|
|
4873
4873
|
return;
|
|
4874
4874
|
const c = (s = l.ownerDocument) != null ? s : document, { innerHeight: u, innerWidth: f } = (i = c.defaultView) != null ? i : window, p = l.getBoundingClientRect(), d = Oo(l, p), { top: h, left: g, bottom: v, right: m } = d, y = -Math.floor(h), w = -Math.floor(g), b = -Math.floor(f - m), _ = -Math.floor(u - v), S = `${y}px ${b}px ${_}px ${w}px`;
|
|
4875
|
-
this.boundingClientRect = p,
|
|
4875
|
+
this.boundingClientRect = p, St(this, bn, new IntersectionObserver(
|
|
4876
4876
|
(C) => {
|
|
4877
4877
|
const [E] = C, { intersectionRect: x } = E;
|
|
4878
4878
|
(E.intersectionRatio !== 1 ? E.intersectionRatio : Hr.intersectionRatio(
|
|
@@ -4886,17 +4886,17 @@ var Nl = Array.from({ length: 100 }, (e, t) => t / 100), od = 75, yn, Bo, tn, bn
|
|
|
4886
4886
|
root: c
|
|
4887
4887
|
}
|
|
4888
4888
|
)), ce(this, bn).observe(l), Ku(this, Wo, ad).call(this);
|
|
4889
|
-
}, od)), this.boundingClientRect = e.getBoundingClientRect(),
|
|
4889
|
+
}, od)), this.boundingClientRect = e.getBoundingClientRect(), St(this, yn, rm(e, this.boundingClientRect));
|
|
4890
4890
|
let r = !0;
|
|
4891
4891
|
this.callback = (a) => {
|
|
4892
4892
|
r && (r = !1, n.skipInitial) || t(a);
|
|
4893
4893
|
};
|
|
4894
4894
|
const o = e.ownerDocument;
|
|
4895
|
-
n?.debug && (
|
|
4895
|
+
n?.debug && (St(this, et, document.createElement("div")), ce(this, et).style.background = "rgba(0,0,0,0.15)", ce(this, et).style.position = "fixed", ce(this, et).style.pointerEvents = "none", o.body.appendChild(ce(this, et))), St(this, br, new IntersectionObserver(
|
|
4896
4896
|
(a) => {
|
|
4897
4897
|
var s, i;
|
|
4898
4898
|
const l = a[a.length - 1], { boundingClientRect: c, isIntersecting: u } = l, { width: f, height: p } = c, d = ce(this, yn);
|
|
4899
|
-
|
|
4899
|
+
St(this, yn, u), !(!f && !p) && (d && !u ? ((s = ce(this, bn)) == null || s.disconnect(), this.callback(null), (i = ce(this, tn)) == null || i.disconnect(), St(this, tn, void 0), ce(this, et) && (ce(this, et).style.visibility = "hidden")) : ce(this, wr).call(this), u && !ce(this, tn) && (St(this, tn, new am(ce(this, wr))), ce(this, tn).observe(e)));
|
|
4900
4900
|
},
|
|
4901
4901
|
{
|
|
4902
4902
|
threshold: Nl,
|
|
@@ -4915,7 +4915,7 @@ Ir = /* @__PURE__ */ new WeakMap();
|
|
|
4915
4915
|
wr = /* @__PURE__ */ new WeakMap();
|
|
4916
4916
|
Wo = /* @__PURE__ */ new WeakSet();
|
|
4917
4917
|
ad = function() {
|
|
4918
|
-
ce(this, Ir) || (Ku(this, Wo, sd).call(this), !nm(this.boundingClientRect, ce(this, Bo)) && (this.callback(this.boundingClientRect),
|
|
4918
|
+
ce(this, Ir) || (Ku(this, Wo, sd).call(this), !nm(this.boundingClientRect, ce(this, Bo)) && (this.callback(this.boundingClientRect), St(this, Bo, this.boundingClientRect)));
|
|
4919
4919
|
};
|
|
4920
4920
|
sd = function() {
|
|
4921
4921
|
if (ce(this, et)) {
|
|
@@ -4980,8 +4980,8 @@ var _r, Sr, Io, ss, cm = class {
|
|
|
4980
4980
|
}
|
|
4981
4981
|
}, od));
|
|
4982
4982
|
const r = em(e), o = im(r, t), a = lm(e, ce(this, ss));
|
|
4983
|
-
|
|
4984
|
-
ce(this, Sr) || (
|
|
4983
|
+
St(this, Io, r), St(this, _r, new id(e, t, n)), this.disconnect = () => {
|
|
4984
|
+
ce(this, Sr) || (St(this, Sr, !0), o(), a(), ce(this, _r).disconnect());
|
|
4985
4985
|
};
|
|
4986
4986
|
}
|
|
4987
4987
|
};
|
|
@@ -5501,7 +5501,7 @@ var Lm = ({
|
|
|
5501
5501
|
}, hd = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], kr = (e) => e !== void 0 && typeof e != "function" ? sr("Function expected") : e, Hm = (e, t, n, r, o) => ({ kind: hd[e], name: t, metadata: r, addInitializer: (a) => n._ ? sr("Already initialized") : o.push(kr(a || null)) }), Tn = (e, t) => us(t, dd("metadata"), e[3]), He = (e, t, n, r) => {
|
|
5502
5502
|
for (var o = 0, a = e[t >> 1], s = a && a.length; o < s; o++) t & 1 ? a[o].call(n) : r = a[o].call(n, r);
|
|
5503
5503
|
return r;
|
|
5504
|
-
},
|
|
5504
|
+
}, Ct = (e, t, n, r, o, a) => {
|
|
5505
5505
|
var s, i, l, c, u, f = t & 7, p = !!(t & 8), d = !!(t & 16), h = f > 3 ? e.length + 1 : f ? p ? 1 : 2 : 0, g = hd[f + 5], v = f > 3 && (e[h - 1] = []), m = e[h] || (e[h] = []), y = f && (!d && !p && (o = o.prototype), f < 5 && (f > 3 || !d) && zm(f < 4 ? o : { get [n]() {
|
|
5506
5506
|
return Ie(this, a);
|
|
5507
5507
|
}, set [n](b) {
|
|
@@ -5639,7 +5639,7 @@ var ng = class extends mt {
|
|
|
5639
5639
|
}
|
|
5640
5640
|
});
|
|
5641
5641
|
}
|
|
5642
|
-
}, Zo = /* @__PURE__ */ new Map(), pd, md, gd, vd, ds, Tr, jt, Ci, Qn, yd, bd, wd, _d, $n = class extends (ds = Ur, vd = [ge], gd = [
|
|
5642
|
+
}, Zo = /* @__PURE__ */ new Map(), pd, md, gd, vd, ds, Tr, jt, Ci, Qn, yd, bd, wd, _d, $n = class extends (ds = Ur, vd = [ge], gd = [Pe], md = [Pe], pd = [Pe], ds) {
|
|
5643
5643
|
constructor(e) {
|
|
5644
5644
|
super(e), He(jt, 5, this), We(this, Qn), We(this, Tr, /* @__PURE__ */ new Set()), We(this, Ci, He(jt, 8, this, /* @__PURE__ */ new Set())), He(jt, 11, this), this.registerEffect(xn(this, Qn, yd));
|
|
5645
5645
|
}
|
|
@@ -5762,10 +5762,10 @@ _d = function(e, t, n) {
|
|
|
5762
5762
|
}
|
|
5763
5763
|
};
|
|
5764
5764
|
};
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5765
|
+
Ct(jt, 4, "additionalRoots", vd, $n, Ci);
|
|
5766
|
+
Ct(jt, 2, "sourceRoot", gd, $n);
|
|
5767
|
+
Ct(jt, 2, "targetRoot", md, $n);
|
|
5768
|
+
Ct(jt, 2, "roots", pd, $n);
|
|
5769
5769
|
Tn(jt, $n);
|
|
5770
5770
|
var Yr = "data-dnd-", fs = `${Yr}dropping`, ot = "--dnd-", Vt = `${Yr}dragging`, Ho = `${Yr}placeholder`, rg = [
|
|
5771
5771
|
Vt,
|
|
@@ -6101,10 +6101,10 @@ xd = function() {
|
|
|
6101
6101
|
y: (le.y - _ * h.scaleY - h.y) / (b * h.scaleY)
|
|
6102
6102
|
};
|
|
6103
6103
|
}
|
|
6104
|
-
const { transformOrigin: he } = p,
|
|
6104
|
+
const { transformOrigin: he } = p, Re = _ * h.scaleY + h.y, Z = S * h.scaleX + h.x;
|
|
6105
6105
|
if (!p.coordinates && (p.coordinates = {
|
|
6106
6106
|
x: Z,
|
|
6107
|
-
y:
|
|
6107
|
+
y: Re
|
|
6108
6108
|
}, y.x !== 1 || y.y !== 1)) {
|
|
6109
6109
|
const { scaleX: le, scaleY: pe } = g, { x: Ke, y: Rt } = he;
|
|
6110
6110
|
p.coordinates.x += (w * le - w) * Ke, p.coordinates.y += (b * pe - b) * Rt;
|
|
@@ -6112,7 +6112,7 @@ xd = function() {
|
|
|
6112
6112
|
p.dimensions || (p.dimensions = { width: w, height: b }), p.frameTransform || (p.frameTransform = h);
|
|
6113
6113
|
const Y = {
|
|
6114
6114
|
x: p.coordinates.x - Z,
|
|
6115
|
-
y: p.coordinates.y -
|
|
6115
|
+
y: p.coordinates.y - Re
|
|
6116
6116
|
}, _e = {
|
|
6117
6117
|
width: (p.dimensions.width * p.frameTransform.scaleX - w * h.scaleX) * he.x,
|
|
6118
6118
|
height: (p.dimensions.height * p.frameTransform.scaleY - b * h.scaleY) * he.y
|
|
@@ -6200,7 +6200,7 @@ xd = function() {
|
|
|
6200
6200
|
const Rt = (le = p.translate) != null ? le : { x: 0, y: 0 }, Pt = {
|
|
6201
6201
|
x: pe.x / h.scaleX + Rt.x,
|
|
6202
6202
|
y: pe.y / h.scaleY + Rt.y
|
|
6203
|
-
}, Rn = r.current.translate,
|
|
6203
|
+
}, Rn = r.current.translate, yt = ke(() => s.modifiers), V = ke(() => {
|
|
6204
6204
|
var ne;
|
|
6205
6205
|
return (ne = s.shape) == null ? void 0 : ne.current;
|
|
6206
6206
|
}), J = fe && !tt ? "250ms cubic-bezier(0.25, 1, 0.5, 1)" : "0ms linear";
|
|
@@ -6210,7 +6210,7 @@ xd = function() {
|
|
|
6210
6210
|
translate: `${Pt.x}px ${Pt.y}px 0`
|
|
6211
6211
|
},
|
|
6212
6212
|
ot
|
|
6213
|
-
), ve?.takeRecords(), V && V !== xe && Rn && !
|
|
6213
|
+
), ve?.takeRecords(), V && V !== xe && Rn && !yt.length) {
|
|
6214
6214
|
const ne = Nt.delta(Pt, Rn);
|
|
6215
6215
|
s.shape = Hr.from(
|
|
6216
6216
|
V.boundingRectangle
|
|
@@ -6257,7 +6257,7 @@ xd = function() {
|
|
|
6257
6257
|
j(), ze();
|
|
6258
6258
|
};
|
|
6259
6259
|
};
|
|
6260
|
-
|
|
6260
|
+
Ct(Lr, 4, "overlay", kd, Br, xi);
|
|
6261
6261
|
Tn(Lr, Br);
|
|
6262
6262
|
Br.configure = An(Br);
|
|
6263
6263
|
var ms = Br, ur = !0, gg = !1, Ed, Id, Ad, Md, on, Ei, Ii;
|
|
@@ -6276,8 +6276,8 @@ var Wr = class {
|
|
|
6276
6276
|
on = ir(null);
|
|
6277
6277
|
Ei = /* @__PURE__ */ new WeakMap();
|
|
6278
6278
|
Ii = /* @__PURE__ */ new WeakMap();
|
|
6279
|
-
|
|
6280
|
-
|
|
6279
|
+
Ct(on, 4, Md, Ad, Wr, Ei);
|
|
6280
|
+
Ct(on, 4, Id, Ed, Wr, Ii);
|
|
6281
6281
|
Tn(on, Wr);
|
|
6282
6282
|
var vg = [At.Forward, At.Reverse], Xl = class {
|
|
6283
6283
|
constructor() {
|
|
@@ -6411,7 +6411,7 @@ Vr = ir(gs);
|
|
|
6411
6411
|
Ai = /* @__PURE__ */ new WeakMap();
|
|
6412
6412
|
nn = /* @__PURE__ */ new WeakMap();
|
|
6413
6413
|
vs = /* @__PURE__ */ new WeakMap();
|
|
6414
|
-
|
|
6414
|
+
Ct(Vr, 4, "autoScrolling", Td, ia, Ai);
|
|
6415
6415
|
Tn(Vr, ia);
|
|
6416
6416
|
function jl(e) {
|
|
6417
6417
|
return e > 0 ? At.Forward : e < 0 ? At.Reverse : At.Idle;
|
|
@@ -6941,9 +6941,9 @@ Ot = ir(ws);
|
|
|
6941
6941
|
Ti = /* @__PURE__ */ new WeakMap();
|
|
6942
6942
|
$i = /* @__PURE__ */ new WeakMap();
|
|
6943
6943
|
Di = /* @__PURE__ */ new WeakMap();
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6944
|
+
Ct(Ot, 4, "handle", Pd, jr, Ti);
|
|
6945
|
+
Ct(Ot, 4, "element", Rd, jr, $i);
|
|
6946
|
+
Ct(Ot, 4, "feedback", Dd, jr, Di);
|
|
6947
6947
|
Tn(Ot, jr);
|
|
6948
6948
|
var Fd, Od, _s, an, Ri, Ra, Ld, Bd, $r, Pi, Wd = class extends (_s = Ht, Od = [ge], Fd = [ge], _s) {
|
|
6949
6949
|
constructor(e, t) {
|
|
@@ -7005,8 +7005,8 @@ an = ir(_s);
|
|
|
7005
7005
|
Ri = /* @__PURE__ */ new WeakMap();
|
|
7006
7006
|
$r = /* @__PURE__ */ new WeakSet();
|
|
7007
7007
|
Pi = /* @__PURE__ */ new WeakMap();
|
|
7008
|
-
Ra =
|
|
7009
|
-
|
|
7008
|
+
Ra = Ct(an, 20, "#element", Od, $r, Ri), Ld = Ra.get, Bd = Ra.set;
|
|
7009
|
+
Ct(an, 4, "proxy", Fd, Wd, Pi);
|
|
7010
7010
|
Tn(an, Wd);
|
|
7011
7011
|
function Tg(e) {
|
|
7012
7012
|
return e != null && typeof e == "object" && "current" in e;
|
|
@@ -7100,7 +7100,7 @@ Sc(
|
|
|
7100
7100
|
})
|
|
7101
7101
|
);
|
|
7102
7102
|
function Zg() {
|
|
7103
|
-
return
|
|
7103
|
+
return Fe(zg);
|
|
7104
7104
|
}
|
|
7105
7105
|
function Hg(e) {
|
|
7106
7106
|
var t;
|
|
@@ -7173,7 +7173,7 @@ var Ug = Object.create, Vd = Object.defineProperty, Xg = Object.getOwnPropertyDe
|
|
|
7173
7173
|
for (var s, i, l, c, u = t & 7, f = !1, p = !1, d = 2, h = zd[u + 5], g = e[d] || (e[d] = []), v = (o = o.prototype, Xg(o, n)), m = r.length - 1; m >= 0; m--)
|
|
7174
7174
|
l = Kg(u, n, i = {}, e[3], g), l.static = f, l.private = p, c = l.access = { has: (y) => n in y }, c.get = (y) => y[n], s = (0, r[m])(v[h], l), i._ = 1, Zd(s) && (v[h] = s);
|
|
7175
7175
|
return v && Vd(o, n, v), o;
|
|
7176
|
-
}, Gd = (e, t, n) => t.has(e) || ca("Cannot " + n), Qg = (e, t, n) => (Gd(e, t, "read from private field"), t.get(e)),
|
|
7176
|
+
}, Gd = (e, t, n) => t.has(e) || ca("Cannot " + n), Qg = (e, t, n) => (Gd(e, t, "read from private field"), t.get(e)), ev = (e, t, n) => t.has(e) ? ca("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), tv = (e, t, n, r) => (Gd(e, t, "write to private field"), t.set(e, n), n), dr = class Ss {
|
|
7177
7177
|
/**
|
|
7178
7178
|
* @param {number} Coordinate of the point on the horizontal axis
|
|
7179
7179
|
* @param {number} Coordinate of the point on the vertical axis
|
|
@@ -7211,10 +7211,10 @@ var Ug = Object.create, Vd = Object.defineProperty, Xg = Object.getOwnPropertyDe
|
|
|
7211
7211
|
static from({ x: t, y: n }) {
|
|
7212
7212
|
return new Ss(t, n);
|
|
7213
7213
|
}
|
|
7214
|
-
}, Ud, Xd, ks, Mo, Kr, Fi = class extends (ks = un, Xd = [
|
|
7214
|
+
}, Ud, Xd, ks, Mo, Kr, Fi = class extends (ks = un, Xd = [Pe], Ud = [Pe], ks) {
|
|
7215
7215
|
constructor(t) {
|
|
7216
7216
|
const n = dr.from(t);
|
|
7217
|
-
super(n, (r, o) => dr.equals(r, o)), Jg(Kr, 5, this),
|
|
7217
|
+
super(n, (r, o) => dr.equals(r, o)), Jg(Kr, 5, this), ev(this, Mo, 0), this.velocity = { x: 0, y: 0 };
|
|
7218
7218
|
}
|
|
7219
7219
|
get delta() {
|
|
7220
7220
|
return dr.delta(this.current, this.initial);
|
|
@@ -7237,7 +7237,7 @@ var Ug = Object.create, Vd = Object.defineProperty, Xg = Object.getOwnPropertyDe
|
|
|
7237
7237
|
y: r.y - n.y
|
|
7238
7238
|
}, a = Date.now(), s = a - Qg(this, Mo), i = (l) => Math.round(l / s * 100);
|
|
7239
7239
|
ln(() => {
|
|
7240
|
-
|
|
7240
|
+
tv(this, Mo, a), this.velocity = {
|
|
7241
7241
|
x: i(o.x),
|
|
7242
7242
|
y: i(o.y)
|
|
7243
7243
|
}, super.current = r;
|
|
@@ -7254,7 +7254,7 @@ Hd(Kr, 2, "direction", Ud, Fi);
|
|
|
7254
7254
|
qg(Kr, Fi);
|
|
7255
7255
|
var Yd = /* @__PURE__ */ ((e) => (e.Horizontal = "x", e.Vertical = "y", e))(Yd || {});
|
|
7256
7256
|
Object.values(Yd);
|
|
7257
|
-
const
|
|
7257
|
+
const nv = /* @__PURE__ */ new Map([
|
|
7258
7258
|
[
|
|
7259
7259
|
"bold",
|
|
7260
7260
|
/* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("path", { d: "M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z" }))
|
|
@@ -7285,7 +7285,7 @@ const n0 = /* @__PURE__ */ new Map([
|
|
|
7285
7285
|
"thin",
|
|
7286
7286
|
/* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("path", { d: "M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z" }))
|
|
7287
7287
|
]
|
|
7288
|
-
]),
|
|
7288
|
+
]), rv = /* @__PURE__ */ new Map([
|
|
7289
7289
|
[
|
|
7290
7290
|
"bold",
|
|
7291
7291
|
/* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("path", { d: "M157.27,21.22a12,12,0,0,0-12.64,1.31L75.88,76H32A20,20,0,0,0,12,96v64a20,20,0,0,0,20,20H75.88l68.75,53.47A12,12,0,0,0,164,224V32A12,12,0,0,0,157.27,21.22ZM36,100H68v56H36Zm104,99.46L92,162.13V93.87l48-37.33ZM212,128a44,44,0,0,1-11,29.11,12,12,0,1,1-18-15.88,20,20,0,0,0,0-26.43,12,12,0,0,1,18-15.86A43.94,43.94,0,0,1,212,128Zm40,0a83.87,83.87,0,0,1-21.39,56,12,12,0,0,1-17.89-16,60,60,0,0,0,0-80,12,12,0,1,1,17.88-16A83.87,83.87,0,0,1,252,128Z" }))
|
|
@@ -7310,7 +7310,7 @@ const n0 = /* @__PURE__ */ new Map([
|
|
|
7310
7310
|
"thin",
|
|
7311
7311
|
/* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("path", { d: "M153.76,28.41a4,4,0,0,0-4.22.43L78.63,84H32A12,12,0,0,0,20,96v64a12,12,0,0,0,12,12H78.63l70.91,55.16A4.07,4.07,0,0,0,152,228a3.92,3.92,0,0,0,1.76-.41A4,4,0,0,0,156,224V32A4,4,0,0,0,153.76,28.41ZM28,160V96a4,4,0,0,1,4-4H76v72H32A4,4,0,0,1,28,160Zm120,55.82L84,166V90l64-49.78Zm47-111.61a36,36,0,0,1,0,47.59,4,4,0,1,1-6-5.3,28,28,0,0,0,0-37,4,4,0,0,1,6-5.28ZM244,128a75.88,75.88,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,68,68,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.88,75.88,0,0,1,244,128Z" }))
|
|
7312
7312
|
]
|
|
7313
|
-
]),
|
|
7313
|
+
]), ov = /* @__PURE__ */ new Map([
|
|
7314
7314
|
[
|
|
7315
7315
|
"bold",
|
|
7316
7316
|
/* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("path", { d: "M157.27,21.22a12,12,0,0,0-12.64,1.31L75.88,76H32A20,20,0,0,0,12,96v64a20,20,0,0,0,20,20H75.88l68.75,53.47A12,12,0,0,0,164,224V32A12,12,0,0,0,157.27,21.22ZM36,100H68v56H36Zm104,99.46L92,162.13V93.87l48-37.33ZM212,128a44,44,0,0,1-11,29.11,12,12,0,0,1-18-15.88,20,20,0,0,0,0-26.44,12,12,0,0,1,18-15.85A43.94,43.94,0,0,1,212,128Z" }))
|
|
@@ -7335,7 +7335,7 @@ const n0 = /* @__PURE__ */ new Map([
|
|
|
7335
7335
|
"thin",
|
|
7336
7336
|
/* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("path", { d: "M153.76,28.41a4,4,0,0,0-4.22.43L78.63,84H32A12,12,0,0,0,20,96v64a12,12,0,0,0,12,12H78.63l70.91,55.16A4.07,4.07,0,0,0,152,228a3.92,3.92,0,0,0,1.76-.41A4,4,0,0,0,156,224V32A4,4,0,0,0,153.76,28.41ZM28,160V96a4,4,0,0,1,4-4H76v72H32A4,4,0,0,1,28,160Zm120,55.82L84,166V90l64-49.78ZM204,128a36,36,0,0,1-9,23.82,4,4,0,1,1-6-5.3,28,28,0,0,0,0-37,4,4,0,0,1,6-5.28A36,36,0,0,1,204,128Z" }))
|
|
7337
7337
|
]
|
|
7338
|
-
]),
|
|
7338
|
+
]), av = /* @__PURE__ */ new Map([
|
|
7339
7339
|
[
|
|
7340
7340
|
"bold",
|
|
7341
7341
|
/* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" }))
|
|
@@ -7366,7 +7366,7 @@ const n0 = /* @__PURE__ */ new Map([
|
|
|
7366
7366
|
"thin",
|
|
7367
7367
|
/* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("path", { d: "M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z" }))
|
|
7368
7368
|
]
|
|
7369
|
-
]),
|
|
7369
|
+
]), sv = Ve({
|
|
7370
7370
|
color: "currentColor",
|
|
7371
7371
|
size: "1em",
|
|
7372
7372
|
weight: "regular",
|
|
@@ -7388,7 +7388,7 @@ const n0 = /* @__PURE__ */ new Map([
|
|
|
7388
7388
|
weight: p = "regular",
|
|
7389
7389
|
mirrored: d = !1,
|
|
7390
7390
|
...h
|
|
7391
|
-
} = P.useContext(
|
|
7391
|
+
} = P.useContext(sv);
|
|
7392
7392
|
return /* @__PURE__ */ P.createElement(
|
|
7393
7393
|
"svg",
|
|
7394
7394
|
{
|
|
@@ -7409,15 +7409,15 @@ const n0 = /* @__PURE__ */ new Map([
|
|
|
7409
7409
|
}
|
|
7410
7410
|
);
|
|
7411
7411
|
qr.displayName = "IconBase";
|
|
7412
|
-
const jd = P.forwardRef((e, t) => /* @__PURE__ */ P.createElement(qr, { ref: t, ...e, weights:
|
|
7412
|
+
const jd = P.forwardRef((e, t) => /* @__PURE__ */ P.createElement(qr, { ref: t, ...e, weights: nv }));
|
|
7413
7413
|
jd.displayName = "DotsThreeIcon";
|
|
7414
|
-
const Kd = P.forwardRef((e, t) => /* @__PURE__ */ P.createElement(qr, { ref: t, ...e, weights:
|
|
7414
|
+
const Kd = P.forwardRef((e, t) => /* @__PURE__ */ P.createElement(qr, { ref: t, ...e, weights: rv }));
|
|
7415
7415
|
Kd.displayName = "SpeakerHighIcon";
|
|
7416
|
-
const qd = P.forwardRef((e, t) => /* @__PURE__ */ P.createElement(qr, { ref: t, ...e, weights:
|
|
7416
|
+
const qd = P.forwardRef((e, t) => /* @__PURE__ */ P.createElement(qr, { ref: t, ...e, weights: ov }));
|
|
7417
7417
|
qd.displayName = "SpeakerLowIcon";
|
|
7418
|
-
const Jd = P.forwardRef((e, t) => /* @__PURE__ */ P.createElement(qr, { ref: t, ...e, weights:
|
|
7418
|
+
const Jd = P.forwardRef((e, t) => /* @__PURE__ */ P.createElement(qr, { ref: t, ...e, weights: av }));
|
|
7419
7419
|
Jd.displayName = "XIcon";
|
|
7420
|
-
const
|
|
7420
|
+
const iv = Jd;
|
|
7421
7421
|
O.span`
|
|
7422
7422
|
font-family: 'Courier New', Monaco, monospace;
|
|
7423
7423
|
font-size: 1rem;
|
|
@@ -7472,25 +7472,25 @@ O(Oi)`
|
|
|
7472
7472
|
min-height: 1.75rem;
|
|
7473
7473
|
font-size: ${(e) => e.theme.fontSizeSmall};
|
|
7474
7474
|
`;
|
|
7475
|
-
var
|
|
7475
|
+
var lv = O.div`
|
|
7476
7476
|
display: inline-flex;
|
|
7477
7477
|
align-items: center;
|
|
7478
7478
|
gap: 0.5rem;
|
|
7479
|
-
`,
|
|
7479
|
+
`, cv = O.input`
|
|
7480
7480
|
cursor: pointer;
|
|
7481
7481
|
accent-color: ${(e) => e.theme.inputFocusBorder};
|
|
7482
7482
|
|
|
7483
7483
|
&:disabled {
|
|
7484
7484
|
cursor: not-allowed;
|
|
7485
7485
|
}
|
|
7486
|
-
`,
|
|
7486
|
+
`, uv = O.label`
|
|
7487
7487
|
margin: 0;
|
|
7488
7488
|
cursor: pointer;
|
|
7489
7489
|
user-select: none;
|
|
7490
7490
|
font-family: ${(e) => e.theme.fontFamily};
|
|
7491
7491
|
font-size: ${(e) => e.theme.fontSize};
|
|
7492
7492
|
color: ${(e) => e.theme.textColor};
|
|
7493
|
-
`,
|
|
7493
|
+
`, xt = O.button`
|
|
7494
7494
|
padding: 0.5rem 1rem;
|
|
7495
7495
|
background: ${(e) => e.theme.buttonBackground || "#007bff"};
|
|
7496
7496
|
color: ${(e) => e.theme.buttonText || "white"};
|
|
@@ -7547,7 +7547,7 @@ O(Qd)`
|
|
|
7547
7547
|
padding: 0.25rem 0.5rem;
|
|
7548
7548
|
font-size: ${(e) => e.theme.fontSizeSmall};
|
|
7549
7549
|
`;
|
|
7550
|
-
var
|
|
7550
|
+
var dv = O.label`
|
|
7551
7551
|
font-family: ${(e) => e.theme.fontFamily};
|
|
7552
7552
|
font-size: ${(e) => e.theme.fontSizeSmall};
|
|
7553
7553
|
font-weight: 500;
|
|
@@ -7564,7 +7564,7 @@ O.label`
|
|
|
7564
7564
|
gap: 0.5rem;
|
|
7565
7565
|
cursor: pointer;
|
|
7566
7566
|
`;
|
|
7567
|
-
var
|
|
7567
|
+
var fv = O.span`
|
|
7568
7568
|
position: absolute;
|
|
7569
7569
|
width: 1px;
|
|
7570
7570
|
height: 1px;
|
|
@@ -7692,14 +7692,14 @@ var tf = O.input.attrs({ type: "range" })`
|
|
|
7692
7692
|
&:disabled::-moz-range-thumb {
|
|
7693
7693
|
cursor: not-allowed;
|
|
7694
7694
|
}
|
|
7695
|
-
`,
|
|
7695
|
+
`, hv = ({
|
|
7696
7696
|
checked: e,
|
|
7697
7697
|
onChange: t,
|
|
7698
7698
|
disabled: n = !1,
|
|
7699
7699
|
className: r
|
|
7700
|
-
}) => /* @__PURE__ */ me(
|
|
7700
|
+
}) => /* @__PURE__ */ me(lv, { className: r, children: [
|
|
7701
7701
|
/* @__PURE__ */ k(
|
|
7702
|
-
|
|
7702
|
+
cv,
|
|
7703
7703
|
{
|
|
7704
7704
|
type: "checkbox",
|
|
7705
7705
|
id: "automatic-scroll",
|
|
@@ -7711,7 +7711,7 @@ var tf = O.input.attrs({ type: "range" })`
|
|
|
7711
7711
|
disabled: n
|
|
7712
7712
|
}
|
|
7713
7713
|
),
|
|
7714
|
-
/* @__PURE__ */ k(
|
|
7714
|
+
/* @__PURE__ */ k(uv, { htmlFor: "automatic-scroll", children: "Automatic Scroll" })
|
|
7715
7715
|
] });
|
|
7716
7716
|
function nf(e) {
|
|
7717
7717
|
return typeof e == "object" && e !== null && "type" in e;
|
|
@@ -7792,7 +7792,7 @@ var rf = {
|
|
|
7792
7792
|
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif',
|
|
7793
7793
|
fontSize: "14px",
|
|
7794
7794
|
fontSizeSmall: "12px"
|
|
7795
|
-
},
|
|
7795
|
+
}, pv = class {
|
|
7796
7796
|
constructor(e) {
|
|
7797
7797
|
this._listeners = /* @__PURE__ */ new Set(), this._notifyRafId = null, this.subscribe = (r) => (this._listeners.add(r), () => this._listeners.delete(r)), this.getSnapshot = () => this._state;
|
|
7798
7798
|
const t = e?.clientWidth ?? (typeof window < "u" ? window.innerWidth : 1024), n = t * 1.5;
|
|
@@ -7824,10 +7824,10 @@ var rf = {
|
|
|
7824
7824
|
cancelPendingNotification() {
|
|
7825
7825
|
this._notifyRafId !== null && (cancelAnimationFrame(this._notifyRafId), this._notifyRafId = null);
|
|
7826
7826
|
}
|
|
7827
|
-
}, of = Ve(null),
|
|
7828
|
-
},
|
|
7827
|
+
}, of = Ve(null), mv = () => () => {
|
|
7828
|
+
}, gv = ({ containerRef: e, children: t }) => {
|
|
7829
7829
|
const n = T(null);
|
|
7830
|
-
n.current === null && (n.current = new
|
|
7830
|
+
n.current === null && (n.current = new pv(e.current));
|
|
7831
7831
|
const r = n.current, o = T(null), a = $(() => {
|
|
7832
7832
|
const i = e.current;
|
|
7833
7833
|
i && r.update(i.scrollLeft, i.clientWidth);
|
|
@@ -7850,16 +7850,16 @@ var rf = {
|
|
|
7850
7850
|
};
|
|
7851
7851
|
}, [e, s, r]), /* @__PURE__ */ k(of.Provider, { value: r, children: t });
|
|
7852
7852
|
};
|
|
7853
|
-
function
|
|
7854
|
-
const t =
|
|
7853
|
+
function vv(e) {
|
|
7854
|
+
const t = Fe(of);
|
|
7855
7855
|
return Ah(
|
|
7856
|
-
t ? t.subscribe :
|
|
7856
|
+
t ? t.subscribe : mv,
|
|
7857
7857
|
() => e(t ? t.getSnapshot() : null),
|
|
7858
7858
|
() => e(null)
|
|
7859
7859
|
);
|
|
7860
7860
|
}
|
|
7861
7861
|
function ua(e, t, n = 0) {
|
|
7862
|
-
const r =
|
|
7862
|
+
const r = vv((o) => {
|
|
7863
7863
|
const a = Math.ceil(e / t), s = [];
|
|
7864
7864
|
for (let i = 0; i < a; i++) {
|
|
7865
7865
|
const l = i * t, c = Math.min(e - l, t);
|
|
@@ -7877,10 +7877,10 @@ function ua(e, t, n = 0) {
|
|
|
7877
7877
|
[r]
|
|
7878
7878
|
);
|
|
7879
7879
|
}
|
|
7880
|
-
var af = Ve(0),
|
|
7880
|
+
var af = Ve(0), yv = ({
|
|
7881
7881
|
originX: e,
|
|
7882
7882
|
children: t
|
|
7883
|
-
}) => /* @__PURE__ */ k(af.Provider, { value: e, children: t }), Li = () =>
|
|
7883
|
+
}) => /* @__PURE__ */ k(af.Provider, { value: e, children: t }), Li = () => Fe(af);
|
|
7884
7884
|
function da() {
|
|
7885
7885
|
const e = T(/* @__PURE__ */ new Map()), t = $((n) => {
|
|
7886
7886
|
if (n !== null) {
|
|
@@ -7894,7 +7894,7 @@ function da() {
|
|
|
7894
7894
|
o.isConnected || n.delete(r);
|
|
7895
7895
|
}), { canvasRef: t, canvasMapRef: e };
|
|
7896
7896
|
}
|
|
7897
|
-
function
|
|
7897
|
+
function bv(e, t, n, r) {
|
|
7898
7898
|
if (n * 2 + 1 >= e.length)
|
|
7899
7899
|
return null;
|
|
7900
7900
|
const o = 2 ** (t - 1);
|
|
@@ -7905,17 +7905,17 @@ function b0(e, t, n, r) {
|
|
|
7905
7905
|
}
|
|
7906
7906
|
return { min: a, max: s };
|
|
7907
7907
|
}
|
|
7908
|
-
function
|
|
7908
|
+
function wv(e, t, n, r, o, a) {
|
|
7909
7909
|
const s = Math.abs(r * n), i = Math.abs(o * n);
|
|
7910
7910
|
return a === "normal" ? [{ x: e, y: n - i, width: t, height: i + s }] : [
|
|
7911
7911
|
{ x: e, y: 0, width: t, height: n - i },
|
|
7912
7912
|
{ x: e, y: n + s, width: t, height: n - s }
|
|
7913
7913
|
];
|
|
7914
7914
|
}
|
|
7915
|
-
function
|
|
7915
|
+
function _v(e, t, n) {
|
|
7916
7916
|
return Math.floor((e - t + n) / n) * n;
|
|
7917
7917
|
}
|
|
7918
|
-
function
|
|
7918
|
+
function Sv(e, t, n, r) {
|
|
7919
7919
|
if (!nf(t))
|
|
7920
7920
|
return t;
|
|
7921
7921
|
let o;
|
|
@@ -7924,7 +7924,7 @@ function S0(e, t, n, r) {
|
|
|
7924
7924
|
o.addColorStop(a.offset, a.color);
|
|
7925
7925
|
return o;
|
|
7926
7926
|
}
|
|
7927
|
-
var
|
|
7927
|
+
var kv = O.canvas.attrs((e) => ({
|
|
7928
7928
|
style: {
|
|
7929
7929
|
width: `${e.$cssWidth}px`,
|
|
7930
7930
|
height: `${e.$waveHeight}px`,
|
|
@@ -7936,7 +7936,7 @@ var k0 = O.canvas.attrs((e) => ({
|
|
|
7936
7936
|
/* Disable image rendering interpolation */
|
|
7937
7937
|
image-rendering: pixelated;
|
|
7938
7938
|
image-rendering: crisp-edges;
|
|
7939
|
-
`,
|
|
7939
|
+
`, Cv = O.div.attrs((e) => ({
|
|
7940
7940
|
style: {
|
|
7941
7941
|
top: `${e.$waveHeight * e.$index}px`,
|
|
7942
7942
|
width: `${e.$cssWidth}px`,
|
|
@@ -7972,14 +7972,14 @@ var k0 = O.canvas.attrs((e) => ({
|
|
|
7972
7972
|
x.resetTransform(), x.clearRect(0, 0, C.width, C.height), x.imageSmoothingEnabled = !1, x.scale(s, s);
|
|
7973
7973
|
const R = C.width / s;
|
|
7974
7974
|
let A;
|
|
7975
|
-
d === "normal" ? A = c : A = l, x.fillStyle =
|
|
7976
|
-
const I = E, D = E + R, F =
|
|
7975
|
+
d === "normal" ? A = c : A = l, x.fillStyle = Sv(x, A, R, i);
|
|
7976
|
+
const I = E, D = E + R, F = _v(I, u, _);
|
|
7977
7977
|
for (let L = Math.max(0, F); L < D; L += _) {
|
|
7978
7978
|
const H = L - I;
|
|
7979
7979
|
if (H + u <= 0) continue;
|
|
7980
|
-
const Q = Math.min(L + _, r), q =
|
|
7980
|
+
const Q = Math.min(L + _, r), q = bv(t, n, L, Q);
|
|
7981
7981
|
if (q) {
|
|
7982
|
-
const oe =
|
|
7982
|
+
const oe = wv(H, u, M, q.min, q.max, d);
|
|
7983
7983
|
for (const X of oe)
|
|
7984
7984
|
x.fillRect(X.x, X.y, X.width, X.height);
|
|
7985
7985
|
}
|
|
@@ -8004,7 +8004,7 @@ var k0 = O.canvas.attrs((e) => ({
|
|
|
8004
8004
|
const y = m.map((_) => {
|
|
8005
8005
|
const S = _ * Ze, C = Math.min(r - S, Ze);
|
|
8006
8006
|
return /* @__PURE__ */ k(
|
|
8007
|
-
|
|
8007
|
+
kv,
|
|
8008
8008
|
{
|
|
8009
8009
|
$cssWidth: C,
|
|
8010
8010
|
$left: S,
|
|
@@ -8018,7 +8018,7 @@ var k0 = O.canvas.attrs((e) => ({
|
|
|
8018
8018
|
);
|
|
8019
8019
|
}), b = p ? "transparent" : cn(c);
|
|
8020
8020
|
return /* @__PURE__ */ k(
|
|
8021
|
-
|
|
8021
|
+
Cv,
|
|
8022
8022
|
{
|
|
8023
8023
|
$index: o,
|
|
8024
8024
|
$cssWidth: r,
|
|
@@ -8028,7 +8028,7 @@ var k0 = O.canvas.attrs((e) => ({
|
|
|
8028
8028
|
children: y
|
|
8029
8029
|
}
|
|
8030
8030
|
);
|
|
8031
|
-
},
|
|
8031
|
+
}, xv = {
|
|
8032
8032
|
padding: "16px",
|
|
8033
8033
|
background: "#1a1a2e",
|
|
8034
8034
|
color: "#e0e0e0",
|
|
@@ -8052,7 +8052,7 @@ var k0 = O.canvas.attrs((e) => ({
|
|
|
8052
8052
|
console.error("[waveform-playlist] Render error:", e, t.componentStack);
|
|
8053
8053
|
}
|
|
8054
8054
|
render() {
|
|
8055
|
-
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ k("div", { style:
|
|
8055
|
+
return this.state.hasError ? this.props.fallback ? this.props.fallback : /* @__PURE__ */ k("div", { style: xv, children: "Waveform playlist encountered an error. Check console for details." }) : this.props.children;
|
|
8056
8056
|
}
|
|
8057
8057
|
});
|
|
8058
8058
|
var Bi = 22, sf = O.div`
|
|
@@ -8087,10 +8087,10 @@ var Bi = 22, sf = O.div`
|
|
|
8087
8087
|
white-space: nowrap;
|
|
8088
8088
|
overflow: hidden;
|
|
8089
8089
|
text-overflow: ellipsis;
|
|
8090
|
-
`,
|
|
8090
|
+
`, Ev = ({
|
|
8091
8091
|
trackName: e,
|
|
8092
8092
|
isSelected: t = !1
|
|
8093
|
-
}) => /* @__PURE__ */ k(sf, { $interactive: !1, $isSelected: t, children: /* @__PURE__ */ k(lf, { title: e, children: e }) }),
|
|
8093
|
+
}) => /* @__PURE__ */ k(sf, { $interactive: !1, $isSelected: t, children: /* @__PURE__ */ k(lf, { title: e, children: e }) }), Iv = ({
|
|
8094
8094
|
clipId: e,
|
|
8095
8095
|
trackIndex: t,
|
|
8096
8096
|
clipIndex: n,
|
|
@@ -8100,7 +8100,7 @@ var Bi = 22, sf = O.div`
|
|
|
8100
8100
|
dragHandleProps: s
|
|
8101
8101
|
}) => {
|
|
8102
8102
|
if (a || !s)
|
|
8103
|
-
return /* @__PURE__ */ k(
|
|
8103
|
+
return /* @__PURE__ */ k(Ev, { trackName: r, isSelected: o });
|
|
8104
8104
|
const { handleRef: i } = s;
|
|
8105
8105
|
return /* @__PURE__ */ k(
|
|
8106
8106
|
sf,
|
|
@@ -8112,12 +8112,12 @@ var Bi = 22, sf = O.div`
|
|
|
8112
8112
|
children: /* @__PURE__ */ k(lf, { title: r, children: r })
|
|
8113
8113
|
}
|
|
8114
8114
|
);
|
|
8115
|
-
},
|
|
8115
|
+
}, Av = 8, Mv = 24, Tv = O.div`
|
|
8116
8116
|
position: absolute;
|
|
8117
8117
|
${(e) => e.$edge === "left" ? "left: 0;" : "right: 0;"}
|
|
8118
8118
|
top: 0;
|
|
8119
8119
|
bottom: 0;
|
|
8120
|
-
width: ${(e) => e.$touchOptimized ?
|
|
8120
|
+
width: ${(e) => e.$touchOptimized ? Mv : Av}px;
|
|
8121
8121
|
cursor: col-resize;
|
|
8122
8122
|
user-select: none;
|
|
8123
8123
|
z-index: 105; /* Above waveform, below header */
|
|
@@ -8153,7 +8153,7 @@ var Bi = 22, sf = O.div`
|
|
|
8153
8153
|
return null;
|
|
8154
8154
|
const { ref: l, isDragging: c } = o;
|
|
8155
8155
|
return /* @__PURE__ */ k(
|
|
8156
|
-
|
|
8156
|
+
Tv,
|
|
8157
8157
|
{
|
|
8158
8158
|
ref: l,
|
|
8159
8159
|
"data-clip-id": e,
|
|
@@ -8166,7 +8166,7 @@ var Bi = 22, sf = O.div`
|
|
|
8166
8166
|
onMouseLeave: () => i(!1)
|
|
8167
8167
|
}
|
|
8168
8168
|
);
|
|
8169
|
-
}, $
|
|
8169
|
+
}, $v = O.div.attrs((e) => ({
|
|
8170
8170
|
style: {
|
|
8171
8171
|
left: `${e.$left}px`,
|
|
8172
8172
|
width: `${e.$width}px`
|
|
@@ -8177,14 +8177,14 @@ var Bi = 22, sf = O.div`
|
|
|
8177
8177
|
bottom: 0;
|
|
8178
8178
|
pointer-events: none;
|
|
8179
8179
|
z-index: 50;
|
|
8180
|
-
`,
|
|
8180
|
+
`, Dv = O.svg`
|
|
8181
8181
|
width: 100%;
|
|
8182
8182
|
height: 100%;
|
|
8183
8183
|
display: block;
|
|
8184
8184
|
/* Flip horizontally for fadeOut - makes it mirror of fadeIn */
|
|
8185
8185
|
transform: ${(e) => e.$type === "fadeOut" ? "scaleX(-1)" : "none"};
|
|
8186
8186
|
`;
|
|
8187
|
-
function
|
|
8187
|
+
function Rv(e, t, n = "logarithmic") {
|
|
8188
8188
|
const r = [], o = Math.max(20, Math.min(e, 100));
|
|
8189
8189
|
for (let a = 0; a <= o; a++) {
|
|
8190
8190
|
const s = a / o * e, i = a / o;
|
|
@@ -8219,8 +8219,8 @@ var rc = ({
|
|
|
8219
8219
|
const a = Dh();
|
|
8220
8220
|
if (t < 1) return null;
|
|
8221
8221
|
const s = o || a?.fadeOverlayColor || "rgba(0, 0, 0, 0.4)";
|
|
8222
|
-
return /* @__PURE__ */ k($
|
|
8223
|
-
},
|
|
8222
|
+
return /* @__PURE__ */ k($v, { $left: e, $width: t, $type: n, children: /* @__PURE__ */ k(Dv, { $type: n, viewBox: `0 0 ${t} 100`, preserveAspectRatio: "none", children: /* @__PURE__ */ k("path", { d: Rv(t, 100, r), fill: s }) }) });
|
|
8223
|
+
}, Pv = O.div.attrs((e) => ({
|
|
8224
8224
|
style: e.$isOverlay ? {} : {
|
|
8225
8225
|
left: `${e.$left}px`,
|
|
8226
8226
|
width: `${e.$width}px`
|
|
@@ -8234,7 +8234,7 @@ var rc = ({
|
|
|
8234
8234
|
flex-direction: column;
|
|
8235
8235
|
z-index: 10; /* Above progress overlay (z-index: 2) but below controls/playhead */
|
|
8236
8236
|
pointer-events: none; /* Let clicks pass through to ClickOverlay for playhead positioning */
|
|
8237
|
-
`,
|
|
8237
|
+
`, Fv = O.div`
|
|
8238
8238
|
flex: 1;
|
|
8239
8239
|
position: relative;
|
|
8240
8240
|
overflow: ${(e) => e.$isOverlay ? "visible" : "hidden"};
|
|
@@ -8280,7 +8280,7 @@ var rc = ({
|
|
|
8280
8280
|
feedback: "none"
|
|
8281
8281
|
});
|
|
8282
8282
|
return /* @__PURE__ */ me(
|
|
8283
|
-
|
|
8283
|
+
Pv,
|
|
8284
8284
|
{
|
|
8285
8285
|
ref: E,
|
|
8286
8286
|
style: M ? { zIndex: 100 } : void 0,
|
|
@@ -8294,7 +8294,7 @@ var rc = ({
|
|
|
8294
8294
|
tabIndex: -1,
|
|
8295
8295
|
children: [
|
|
8296
8296
|
c && /* @__PURE__ */ k(
|
|
8297
|
-
|
|
8297
|
+
Iv,
|
|
8298
8298
|
{
|
|
8299
8299
|
clipId: n,
|
|
8300
8300
|
trackIndex: r,
|
|
@@ -8305,7 +8305,7 @@ var rc = ({
|
|
|
8305
8305
|
dragHandleProps: S ? { handleRef: x } : void 0
|
|
8306
8306
|
}
|
|
8307
8307
|
),
|
|
8308
|
-
/* @__PURE__ */ k(
|
|
8308
|
+
/* @__PURE__ */ k(yv, { originX: b, children: /* @__PURE__ */ me(Fv, { $isOverlay: f, children: [
|
|
8309
8309
|
e,
|
|
8310
8310
|
y && g && g.duration > 0 && /* @__PURE__ */ k(
|
|
8311
8311
|
rc,
|
|
@@ -8359,16 +8359,16 @@ var rc = ({
|
|
|
8359
8359
|
]
|
|
8360
8360
|
}
|
|
8361
8361
|
);
|
|
8362
|
-
},
|
|
8362
|
+
}, Ov = O.div`
|
|
8363
8363
|
display: inline-flex;
|
|
8364
8364
|
align-items: center;
|
|
8365
8365
|
gap: 0.5rem;
|
|
8366
|
-
`,
|
|
8366
|
+
`, Lv = O(dv)`
|
|
8367
8367
|
margin: 0;
|
|
8368
8368
|
white-space: nowrap;
|
|
8369
|
-
`,
|
|
8369
|
+
`, Bv = O(tf)`
|
|
8370
8370
|
width: 120px;
|
|
8371
|
-
`,
|
|
8371
|
+
`, Wv = ({
|
|
8372
8372
|
volume: e,
|
|
8373
8373
|
onChange: t,
|
|
8374
8374
|
disabled: n = !1,
|
|
@@ -8377,10 +8377,10 @@ var rc = ({
|
|
|
8377
8377
|
const o = (a) => {
|
|
8378
8378
|
t(parseFloat(a.target.value) / 100);
|
|
8379
8379
|
};
|
|
8380
|
-
return /* @__PURE__ */ me(
|
|
8381
|
-
/* @__PURE__ */ k(
|
|
8380
|
+
return /* @__PURE__ */ me(Ov, { className: r, children: [
|
|
8381
|
+
/* @__PURE__ */ k(Lv, { htmlFor: "master-gain", children: "Master Volume" }),
|
|
8382
8382
|
/* @__PURE__ */ k(
|
|
8383
|
-
|
|
8383
|
+
Bv,
|
|
8384
8384
|
{
|
|
8385
8385
|
min: "0",
|
|
8386
8386
|
max: "100",
|
|
@@ -8391,7 +8391,7 @@ var rc = ({
|
|
|
8391
8391
|
}
|
|
8392
8392
|
)
|
|
8393
8393
|
] });
|
|
8394
|
-
},
|
|
8394
|
+
}, Vv = O.canvas.attrs((e) => ({
|
|
8395
8395
|
style: {
|
|
8396
8396
|
width: `${e.$cssWidth}px`,
|
|
8397
8397
|
height: `${e.$waveHeight}px`,
|
|
@@ -8402,7 +8402,7 @@ var rc = ({
|
|
|
8402
8402
|
top: 0;
|
|
8403
8403
|
image-rendering: pixelated;
|
|
8404
8404
|
image-rendering: crisp-edges;
|
|
8405
|
-
`,
|
|
8405
|
+
`, Nv = O.div.attrs((e) => ({
|
|
8406
8406
|
style: {
|
|
8407
8407
|
top: `${e.$waveHeight * e.$index}px`,
|
|
8408
8408
|
width: `${e.$cssWidth}px`,
|
|
@@ -8413,7 +8413,7 @@ var rc = ({
|
|
|
8413
8413
|
background: ${(e) => e.$backgroundColor};
|
|
8414
8414
|
transform: translateZ(0);
|
|
8415
8415
|
backface-visibility: hidden;
|
|
8416
|
-
`,
|
|
8416
|
+
`, zv = ({
|
|
8417
8417
|
index: e,
|
|
8418
8418
|
midiNotes: t,
|
|
8419
8419
|
length: n,
|
|
@@ -8470,7 +8470,7 @@ var rc = ({
|
|
|
8470
8470
|
const b = v.map((S) => {
|
|
8471
8471
|
const C = S * Ze, E = Math.min(n - C, Ze);
|
|
8472
8472
|
return /* @__PURE__ */ k(
|
|
8473
|
-
|
|
8473
|
+
Vv,
|
|
8474
8474
|
{
|
|
8475
8475
|
$cssWidth: E,
|
|
8476
8476
|
$left: C,
|
|
@@ -8483,7 +8483,7 @@ var rc = ({
|
|
|
8483
8483
|
`${n}-${S}`
|
|
8484
8484
|
);
|
|
8485
8485
|
});
|
|
8486
|
-
return /* @__PURE__ */ k(
|
|
8486
|
+
return /* @__PURE__ */ k(Nv, { $index: e, $cssWidth: n, $waveHeight: r, $backgroundColor: f ? "transparent" : p, children: b });
|
|
8487
8487
|
};
|
|
8488
8488
|
O.div.attrs((e) => ({
|
|
8489
8489
|
style: {
|
|
@@ -8527,42 +8527,42 @@ O.div`
|
|
|
8527
8527
|
height: 100%;
|
|
8528
8528
|
background: ${(e) => e.$color};
|
|
8529
8529
|
`;
|
|
8530
|
-
var
|
|
8530
|
+
var Zv = O.div`
|
|
8531
8531
|
display: flex;
|
|
8532
8532
|
overflow-y: hidden;
|
|
8533
8533
|
position: relative;
|
|
8534
|
-
`,
|
|
8534
|
+
`, Hv = O.div.attrs((e) => ({
|
|
8535
8535
|
style: { width: `${e.$width}px` }
|
|
8536
8536
|
}))`
|
|
8537
8537
|
flex-shrink: 0;
|
|
8538
8538
|
overflow: hidden;
|
|
8539
|
-
`,
|
|
8539
|
+
`, Gv = O.div.attrs((e) => ({
|
|
8540
8540
|
style: { height: `${e.$height}px` }
|
|
8541
|
-
}))``,
|
|
8541
|
+
}))``, Uv = O.div`
|
|
8542
8542
|
overflow-x: auto;
|
|
8543
8543
|
overflow-y: hidden;
|
|
8544
8544
|
overflow-anchor: none;
|
|
8545
8545
|
flex: 1;
|
|
8546
8546
|
position: relative;
|
|
8547
|
-
`,
|
|
8547
|
+
`, Xv = O.div.attrs((e) => ({
|
|
8548
8548
|
style: e.$width !== void 0 ? { width: `${e.$width}px` } : {}
|
|
8549
8549
|
}))`
|
|
8550
8550
|
position: relative;
|
|
8551
8551
|
background: ${(e) => e.$backgroundColor || "transparent"};
|
|
8552
|
-
`,
|
|
8552
|
+
`, Yv = O.div.attrs((e) => ({
|
|
8553
8553
|
style: e.$width ? { minWidth: `${e.$width}px` } : {}
|
|
8554
8554
|
}))`
|
|
8555
8555
|
background: ${(e) => e.$backgroundColor || "white"};
|
|
8556
8556
|
width: 100%;
|
|
8557
8557
|
position: relative;
|
|
8558
8558
|
overflow: hidden; /* Constrain loop region to timescale area */
|
|
8559
|
-
`,
|
|
8559
|
+
`, jv = O.div.attrs((e) => ({
|
|
8560
8560
|
style: e.$width !== void 0 ? { minWidth: `${e.$width}px` } : {}
|
|
8561
8561
|
}))`
|
|
8562
8562
|
position: relative;
|
|
8563
8563
|
background: ${(e) => e.$backgroundColor || "transparent"};
|
|
8564
8564
|
width: 100%;
|
|
8565
|
-
`,
|
|
8565
|
+
`, Kv = O.div`
|
|
8566
8566
|
position: absolute;
|
|
8567
8567
|
top: 0;
|
|
8568
8568
|
left: 0;
|
|
@@ -8595,17 +8595,17 @@ var Z0 = O.div`
|
|
|
8595
8595
|
},
|
|
8596
8596
|
[f]
|
|
8597
8597
|
), y = s !== void 0 && s > 0;
|
|
8598
|
-
return /* @__PURE__ */ me(
|
|
8599
|
-
y && /* @__PURE__ */ me(
|
|
8600
|
-
g > 0 && /* @__PURE__ */ k(
|
|
8598
|
+
return /* @__PURE__ */ me(Zv, { "data-playlist-state": d, children: [
|
|
8599
|
+
y && /* @__PURE__ */ me(Hv, { $width: s, children: [
|
|
8600
|
+
g > 0 && /* @__PURE__ */ k(Gv, { $height: g }),
|
|
8601
8601
|
h
|
|
8602
8602
|
] }),
|
|
8603
|
-
/* @__PURE__ */ k(
|
|
8604
|
-
r && /* @__PURE__ */ k(
|
|
8605
|
-
/* @__PURE__ */ me(
|
|
8603
|
+
/* @__PURE__ */ k(Uv, { "data-scroll-container": "true", ref: m, children: /* @__PURE__ */ k(gv, { containerRef: v, children: /* @__PURE__ */ me(Xv, { $backgroundColor: t, $width: a, children: [
|
|
8604
|
+
r && /* @__PURE__ */ k(Yv, { $width: o, $backgroundColor: n, children: r }),
|
|
8605
|
+
/* @__PURE__ */ me(jv, { $width: a, $backgroundColor: t, children: [
|
|
8606
8606
|
e,
|
|
8607
8607
|
(i || l) && /* @__PURE__ */ k(
|
|
8608
|
-
|
|
8608
|
+
Kv,
|
|
8609
8609
|
{
|
|
8610
8610
|
$isSelecting: p,
|
|
8611
8611
|
onClick: i,
|
|
@@ -8619,7 +8619,7 @@ var Z0 = O.div`
|
|
|
8619
8619
|
] });
|
|
8620
8620
|
};
|
|
8621
8621
|
xc(Wi);
|
|
8622
|
-
var
|
|
8622
|
+
var qv = O.div.attrs((e) => ({
|
|
8623
8623
|
style: {
|
|
8624
8624
|
left: `${e.$left}px`,
|
|
8625
8625
|
width: `${e.$width}px`
|
|
@@ -8638,7 +8638,7 @@ var q0 = O.div.attrs((e) => ({
|
|
|
8638
8638
|
color: n = "#00ff00"
|
|
8639
8639
|
}) => {
|
|
8640
8640
|
const r = Math.max(0, t - e);
|
|
8641
|
-
return r <= 0 ? null : /* @__PURE__ */ k(
|
|
8641
|
+
return r <= 0 ? null : /* @__PURE__ */ k(qv, { $left: e, $width: r, $color: n, "data-selection": !0 });
|
|
8642
8642
|
};
|
|
8643
8643
|
O.div.attrs((e) => ({
|
|
8644
8644
|
style: {
|
|
@@ -8719,7 +8719,7 @@ var oc = O.div.attrs((e) => ({
|
|
|
8719
8719
|
&:hover::before {
|
|
8720
8720
|
opacity: 1;
|
|
8721
8721
|
}
|
|
8722
|
-
`,
|
|
8722
|
+
`, Jv = O.div.attrs((e) => ({
|
|
8723
8723
|
style: {
|
|
8724
8724
|
left: `${e.$left}px`,
|
|
8725
8725
|
width: `${e.$width}px`
|
|
@@ -8735,7 +8735,7 @@ var oc = O.div.attrs((e) => ({
|
|
|
8735
8735
|
&:active {
|
|
8736
8736
|
cursor: grabbing;
|
|
8737
8737
|
}
|
|
8738
|
-
`,
|
|
8738
|
+
`, Qv = ({
|
|
8739
8739
|
startPosition: e,
|
|
8740
8740
|
endPosition: t,
|
|
8741
8741
|
markerColor: n = "#3b82f6",
|
|
@@ -8780,7 +8780,7 @@ var oc = O.div.attrs((e) => ({
|
|
|
8780
8780
|
);
|
|
8781
8781
|
return h <= 0 ? null : /* @__PURE__ */ me(zt, { children: [
|
|
8782
8782
|
/* @__PURE__ */ k(
|
|
8783
|
-
|
|
8783
|
+
Jv,
|
|
8784
8784
|
{
|
|
8785
8785
|
$left: e,
|
|
8786
8786
|
$width: h,
|
|
@@ -8813,7 +8813,7 @@ var oc = O.div.attrs((e) => ({
|
|
|
8813
8813
|
}
|
|
8814
8814
|
)
|
|
8815
8815
|
] });
|
|
8816
|
-
},
|
|
8816
|
+
}, e0 = O.div`
|
|
8817
8817
|
position: absolute;
|
|
8818
8818
|
top: 0;
|
|
8819
8819
|
left: 0;
|
|
@@ -8821,7 +8821,7 @@ var oc = O.div.attrs((e) => ({
|
|
|
8821
8821
|
height: 100%; /* Stay within timescale bounds, don't extend into tracks */
|
|
8822
8822
|
cursor: crosshair;
|
|
8823
8823
|
z-index: 40; /* Below markers and shading */
|
|
8824
|
-
`,
|
|
8824
|
+
`, t0 = ({
|
|
8825
8825
|
startPosition: e,
|
|
8826
8826
|
endPosition: t,
|
|
8827
8827
|
markerColor: n = "#3b82f6",
|
|
@@ -8851,13 +8851,13 @@ var oc = O.div.attrs((e) => ({
|
|
|
8851
8851
|
[a, s, o]
|
|
8852
8852
|
);
|
|
8853
8853
|
return /* @__PURE__ */ k(
|
|
8854
|
-
|
|
8854
|
+
e0,
|
|
8855
8855
|
{
|
|
8856
8856
|
ref: c,
|
|
8857
8857
|
onMouseDown: f,
|
|
8858
8858
|
"data-timescale-loop-creator": !0,
|
|
8859
8859
|
children: u && /* @__PURE__ */ k(
|
|
8860
|
-
|
|
8860
|
+
Qv,
|
|
8861
8861
|
{
|
|
8862
8862
|
startPosition: e,
|
|
8863
8863
|
endPosition: t,
|
|
@@ -8928,7 +8928,7 @@ var ac = ({
|
|
|
8928
8928
|
const p = Xn(n, r);
|
|
8929
8929
|
l(p);
|
|
8930
8930
|
}, [n, r, e]), /* @__PURE__ */ me(zt, { children: [
|
|
8931
|
-
/* @__PURE__ */ k(
|
|
8931
|
+
/* @__PURE__ */ k(fv, { as: "label", htmlFor: e, children: t }),
|
|
8932
8932
|
/* @__PURE__ */ k(
|
|
8933
8933
|
Qd,
|
|
8934
8934
|
{
|
|
@@ -8954,7 +8954,7 @@ var ac = ({
|
|
|
8954
8954
|
}
|
|
8955
8955
|
)
|
|
8956
8956
|
] });
|
|
8957
|
-
},
|
|
8957
|
+
}, n0 = ({
|
|
8958
8958
|
selectionStart: e,
|
|
8959
8959
|
selectionEnd: t,
|
|
8960
8960
|
onSelectionChange: n,
|
|
@@ -8996,9 +8996,9 @@ var ac = ({
|
|
|
8996
8996
|
}
|
|
8997
8997
|
)
|
|
8998
8998
|
] });
|
|
8999
|
-
},
|
|
8999
|
+
}, r0 = Ve(null);
|
|
9000
9000
|
function df() {
|
|
9001
|
-
return
|
|
9001
|
+
return Fe(r0);
|
|
9002
9002
|
}
|
|
9003
9003
|
function To() {
|
|
9004
9004
|
return window.devicePixelRatio;
|
|
@@ -9012,7 +9012,7 @@ var ff = Ve(To()), hf = ({ children: e }) => {
|
|
|
9012
9012
|
},
|
|
9013
9013
|
{ once: !0 }
|
|
9014
9014
|
), /* @__PURE__ */ k(ff.Provider, { value: Math.ceil(t), children: e });
|
|
9015
|
-
}, Vi = () =>
|
|
9015
|
+
}, Vi = () => Fe(ff), Jr = Ve({
|
|
9016
9016
|
sampleRate: 48e3,
|
|
9017
9017
|
samplesPerPixel: 1e3,
|
|
9018
9018
|
zoomLevels: [1e3, 1500, 2e3, 2500],
|
|
@@ -9025,15 +9025,15 @@ var ff = Ve(To()), hf = ({ children: e }) => {
|
|
|
9025
9025
|
duration: 3e4,
|
|
9026
9026
|
barWidth: 1,
|
|
9027
9027
|
barGap: 0
|
|
9028
|
-
}), fa = () =>
|
|
9028
|
+
}), fa = () => Fe(Jr), Qr = () => Fe($h);
|
|
9029
9029
|
Ve(/* @__PURE__ */ k(Mh, {}));
|
|
9030
|
-
var
|
|
9031
|
-
progress:
|
|
9032
|
-
isPlaying:
|
|
9033
|
-
selectionStart:
|
|
9034
|
-
selectionEnd:
|
|
9030
|
+
var o0 = 0, a0 = !1, s0 = 0, i0 = 0, l0 = {
|
|
9031
|
+
progress: o0,
|
|
9032
|
+
isPlaying: a0,
|
|
9033
|
+
selectionStart: s0,
|
|
9034
|
+
selectionEnd: i0
|
|
9035
9035
|
};
|
|
9036
|
-
Ve(
|
|
9036
|
+
Ve(l0);
|
|
9037
9037
|
Ve({
|
|
9038
9038
|
setIsPlaying: () => {
|
|
9039
9039
|
},
|
|
@@ -9042,7 +9042,7 @@ Ve({
|
|
|
9042
9042
|
setSelection: () => {
|
|
9043
9043
|
}
|
|
9044
9044
|
});
|
|
9045
|
-
var
|
|
9045
|
+
var c0 = (e, t, n) => (e - t) / (n - t), u0 = O.div.attrs((e) => ({
|
|
9046
9046
|
style: {
|
|
9047
9047
|
top: `${e.$waveHeight * e.$index}px`,
|
|
9048
9048
|
width: `${e.$cssWidth}px`,
|
|
@@ -9053,7 +9053,7 @@ var cv = (e, t, n) => (e - t) / (n - t), uv = O.div.attrs((e) => ({
|
|
|
9053
9053
|
background: #000;
|
|
9054
9054
|
transform: translateZ(0);
|
|
9055
9055
|
backface-visibility: hidden;
|
|
9056
|
-
`,
|
|
9056
|
+
`, d0 = O.canvas.attrs((e) => ({
|
|
9057
9057
|
style: {
|
|
9058
9058
|
width: `${e.$cssWidth}px`,
|
|
9059
9059
|
height: `${e.$waveHeight}px`,
|
|
@@ -9065,13 +9065,13 @@ var cv = (e, t, n) => (e - t) / (n - t), uv = O.div.attrs((e) => ({
|
|
|
9065
9065
|
image-rendering: pixelated;
|
|
9066
9066
|
image-rendering: crisp-edges;
|
|
9067
9067
|
`;
|
|
9068
|
-
function
|
|
9068
|
+
function f0() {
|
|
9069
9069
|
const e = new Uint8Array(768);
|
|
9070
9070
|
for (let t = 0; t < 256; t++)
|
|
9071
9071
|
e[t * 3] = e[t * 3 + 1] = e[t * 3 + 2] = t;
|
|
9072
9072
|
return e;
|
|
9073
9073
|
}
|
|
9074
|
-
var
|
|
9074
|
+
var h0 = f0(), sc = ({
|
|
9075
9075
|
index: e,
|
|
9076
9076
|
channelIndex: t,
|
|
9077
9077
|
data: n,
|
|
@@ -9087,7 +9087,7 @@ var hv = fv(), sc = ({
|
|
|
9087
9087
|
clipId: p,
|
|
9088
9088
|
onCanvasesReady: d
|
|
9089
9089
|
}) => {
|
|
9090
|
-
const h = t ?? e, { canvasRef: g, canvasMapRef: v } = da(), m = T([]), y = T(/* @__PURE__ */ new WeakSet()), w = T(f), b = T(d), _ = !!(f && p), S = Li(), C = ua(r, Ze, S), E = i ??
|
|
9090
|
+
const h = t ?? e, { canvasRef: g, canvasMapRef: v } = da(), m = T([]), y = T(/* @__PURE__ */ new WeakSet()), w = T(f), b = T(d), _ = !!(f && p), S = Li(), C = ua(r, Ze, S), E = i ?? h0, x = u ?? (n ? n.sampleRate / 2 : 22050), M = l ?? c0, R = !!l;
|
|
9091
9091
|
K(() => {
|
|
9092
9092
|
w.current = f;
|
|
9093
9093
|
}, [f]), K(() => {
|
|
@@ -9167,15 +9167,15 @@ var hv = fv(), sc = ({
|
|
|
9167
9167
|
for (const [X, ee] of v.current.entries()) {
|
|
9168
9168
|
const ie = X * Ze, fe = ee.getContext("2d");
|
|
9169
9169
|
if (!fe) continue;
|
|
9170
|
-
const he = ee.width / a,
|
|
9170
|
+
const he = ee.width / a, Re = o;
|
|
9171
9171
|
fe.resetTransform(), fe.clearRect(0, 0, ee.width, ee.height), fe.imageSmoothingEnabled = !1, fe.scale(a, a);
|
|
9172
|
-
const Z = fe.createImageData(he,
|
|
9172
|
+
const Z = fe.createImageData(he, Re), Y = Z.data;
|
|
9173
9173
|
for (let _e = 0; _e < he; _e++) {
|
|
9174
9174
|
const te = (ie + _e) * s, Me = Math.floor(te / F);
|
|
9175
9175
|
if (Me < 0 || Me >= D) continue;
|
|
9176
9176
|
const B = Me * I;
|
|
9177
|
-
for (let Oe = 0; Oe <
|
|
9178
|
-
const st = 1 - Oe /
|
|
9177
|
+
for (let Oe = 0; Oe < Re; Oe++) {
|
|
9178
|
+
const st = 1 - Oe / Re;
|
|
9179
9179
|
let Ge = Math.floor(st * I);
|
|
9180
9180
|
if (R) {
|
|
9181
9181
|
let xe = 0, Ne = I - 1;
|
|
@@ -9192,7 +9192,7 @@ var hv = fv(), sc = ({
|
|
|
9192
9192
|
}
|
|
9193
9193
|
if (fe.resetTransform(), fe.putImageData(Z, 0, 0), a !== 1) {
|
|
9194
9194
|
const _e = document.createElement("canvas");
|
|
9195
|
-
_e.width = he, _e.height =
|
|
9195
|
+
_e.width = he, _e.height = Re;
|
|
9196
9196
|
const G = _e.getContext("2d");
|
|
9197
9197
|
if (!G) continue;
|
|
9198
9198
|
G.putImageData(Z, 0, 0), fe.clearRect(0, 0, ee.width, ee.height), fe.imageSmoothingEnabled = !1, fe.drawImage(_e, 0, 0, ee.width, ee.height);
|
|
@@ -9216,7 +9216,7 @@ var hv = fv(), sc = ({
|
|
|
9216
9216
|
const A = C.map((I) => {
|
|
9217
9217
|
const D = I * Ze, F = Math.min(r - D, Ze);
|
|
9218
9218
|
return /* @__PURE__ */ k(
|
|
9219
|
-
|
|
9219
|
+
d0,
|
|
9220
9220
|
{
|
|
9221
9221
|
$cssWidth: F,
|
|
9222
9222
|
$left: D,
|
|
@@ -9229,7 +9229,7 @@ var hv = fv(), sc = ({
|
|
|
9229
9229
|
`${r}-${I}`
|
|
9230
9230
|
);
|
|
9231
9231
|
});
|
|
9232
|
-
return /* @__PURE__ */ k(
|
|
9232
|
+
return /* @__PURE__ */ k(u0, { $index: e, $cssWidth: r, $waveHeight: o, children: A });
|
|
9233
9233
|
}, pf = ({
|
|
9234
9234
|
isSelected: e,
|
|
9235
9235
|
transparentBackground: t,
|
|
@@ -9325,7 +9325,7 @@ var hv = fv(), sc = ({
|
|
|
9325
9325
|
] });
|
|
9326
9326
|
}
|
|
9327
9327
|
return n === "piano-roll" ? /* @__PURE__ */ k(
|
|
9328
|
-
|
|
9328
|
+
zv,
|
|
9329
9329
|
{
|
|
9330
9330
|
index: g.index,
|
|
9331
9331
|
midiNotes: p ?? [],
|
|
@@ -9355,7 +9355,7 @@ var hv = fv(), sc = ({
|
|
|
9355
9355
|
drawMode: M
|
|
9356
9356
|
}
|
|
9357
9357
|
);
|
|
9358
|
-
}, ic = 72,
|
|
9358
|
+
}, ic = 72, p0 = O.div`
|
|
9359
9359
|
position: sticky;
|
|
9360
9360
|
left: 0;
|
|
9361
9361
|
z-index: 101;
|
|
@@ -9364,7 +9364,7 @@ var hv = fv(), sc = ({
|
|
|
9364
9364
|
width: 0;
|
|
9365
9365
|
overflow: visible;
|
|
9366
9366
|
`;
|
|
9367
|
-
function
|
|
9367
|
+
function m0(e, t, n) {
|
|
9368
9368
|
const o = [
|
|
9369
9369
|
20,
|
|
9370
9370
|
50,
|
|
@@ -9388,7 +9388,7 @@ function mv(e, t, n) {
|
|
|
9388
9388
|
i.push(o[Math.round(l * s)]);
|
|
9389
9389
|
return i;
|
|
9390
9390
|
}
|
|
9391
|
-
var
|
|
9391
|
+
var g0 = ({
|
|
9392
9392
|
waveHeight: e,
|
|
9393
9393
|
numChannels: t,
|
|
9394
9394
|
frequencyScaleFn: n,
|
|
@@ -9406,7 +9406,7 @@ var gv = ({
|
|
|
9406
9406
|
const g = h.getContext("2d");
|
|
9407
9407
|
if (!g) return;
|
|
9408
9408
|
g.resetTransform(), g.clearRect(0, 0, h.width, h.height), g.scale(u, u);
|
|
9409
|
-
const v =
|
|
9409
|
+
const v = m0(r, o, f);
|
|
9410
9410
|
for (let m = 0; m < t; m++) {
|
|
9411
9411
|
const y = m * e + d;
|
|
9412
9412
|
g.font = "11px monospace", g.textBaseline = "middle";
|
|
@@ -9428,7 +9428,7 @@ var gv = ({
|
|
|
9428
9428
|
u,
|
|
9429
9429
|
f,
|
|
9430
9430
|
d
|
|
9431
|
-
]), /* @__PURE__ */ k(
|
|
9431
|
+
]), /* @__PURE__ */ k(p0, { $height: p + d, children: /* @__PURE__ */ k(
|
|
9432
9432
|
"canvas",
|
|
9433
9433
|
{
|
|
9434
9434
|
ref: c,
|
|
@@ -9441,7 +9441,7 @@ var gv = ({
|
|
|
9441
9441
|
}
|
|
9442
9442
|
}
|
|
9443
9443
|
) });
|
|
9444
|
-
},
|
|
9444
|
+
}, v0 = O.div.attrs((e) => ({
|
|
9445
9445
|
style: {
|
|
9446
9446
|
width: `${e.$cssWidth}px`,
|
|
9447
9447
|
height: `${e.$timeScaleHeight}px`
|
|
@@ -9451,7 +9451,7 @@ var gv = ({
|
|
|
9451
9451
|
overflow: visible; /* Allow time labels to render above the container */
|
|
9452
9452
|
border-bottom: 1px solid ${(e) => e.theme.timeColor};
|
|
9453
9453
|
box-sizing: border-box;
|
|
9454
|
-
`,
|
|
9454
|
+
`, y0 = O.canvas.attrs((e) => ({
|
|
9455
9455
|
style: {
|
|
9456
9456
|
width: `${e.$cssWidth}px`,
|
|
9457
9457
|
height: `${e.$timeScaleHeight}px`,
|
|
@@ -9460,14 +9460,14 @@ var gv = ({
|
|
|
9460
9460
|
}))`
|
|
9461
9461
|
position: absolute;
|
|
9462
9462
|
bottom: 0;
|
|
9463
|
-
`,
|
|
9463
|
+
`, b0 = (e) => {
|
|
9464
9464
|
const {
|
|
9465
9465
|
theme: { timeColor: t },
|
|
9466
9466
|
tickData: n
|
|
9467
|
-
} = e, { canvasRef: r, canvasMapRef: o } = da(), { timeScaleHeight: a } =
|
|
9467
|
+
} = e, { canvasRef: r, canvasMapRef: o } = da(), { timeScaleHeight: a } = Fe(Jr), s = Vi(), { widthX: i, canvasInfo: l, timeMarkersWithPositions: c } = n, u = ua(i, Ze), f = u.map((g) => {
|
|
9468
9468
|
const v = g * Ze, m = Math.min(i - v, Ze);
|
|
9469
9469
|
return /* @__PURE__ */ k(
|
|
9470
|
-
|
|
9470
|
+
y0,
|
|
9471
9471
|
{
|
|
9472
9472
|
$cssWidth: m,
|
|
9473
9473
|
$left: v,
|
|
@@ -9492,11 +9492,11 @@ var gv = ({
|
|
|
9492
9492
|
m.fillRect(S, C, 1, _);
|
|
9493
9493
|
}
|
|
9494
9494
|
}
|
|
9495
|
-
}, [o, s, t, a, l, u]), /* @__PURE__ */ me(
|
|
9495
|
+
}, [o, s, t, a, l, u]), /* @__PURE__ */ me(v0, { $cssWidth: i, $timeScaleHeight: a, children: [
|
|
9496
9496
|
h,
|
|
9497
9497
|
f
|
|
9498
9498
|
] });
|
|
9499
|
-
},
|
|
9499
|
+
}, w0 = xc(b0), lc = /* @__PURE__ */ new Map([
|
|
9500
9500
|
[700, { marker: 1e3, bigStep: 500, smallStep: 100 }],
|
|
9501
9501
|
[1500, { marker: 2e3, bigStep: 1e3, smallStep: 200 }],
|
|
9502
9502
|
[2500, { marker: 2e3, bigStep: 1e3, smallStep: 500 }],
|
|
@@ -9515,11 +9515,11 @@ function xs(e) {
|
|
|
9515
9515
|
}
|
|
9516
9516
|
return n === void 0 && (n = { marker: 3e4, bigStep: 1e4, smallStep: 5e3 }), n;
|
|
9517
9517
|
}
|
|
9518
|
-
function
|
|
9518
|
+
function _0(e) {
|
|
9519
9519
|
const t = Math.floor(e / 1e3), n = t % 60;
|
|
9520
9520
|
return `${(t - n) / 60}:${String(n).padStart(2, "0")}`;
|
|
9521
9521
|
}
|
|
9522
|
-
var
|
|
9522
|
+
var S0 = O.div.attrs((e) => ({
|
|
9523
9523
|
style: {
|
|
9524
9524
|
left: `${e.$left + 4}px`
|
|
9525
9525
|
// Offset 4px to the right of the tick
|
|
@@ -9530,7 +9530,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9530
9530
|
white-space: nowrap; /* Prevent text wrapping */
|
|
9531
9531
|
color: ${(e) => e.theme.timeColor}; /* Use theme color instead of inheriting */
|
|
9532
9532
|
`, mf = ({ renderTick: e }) => {
|
|
9533
|
-
const { samplesPerPixel: t, sampleRate: n, duration: r, timeScaleHeight: o } =
|
|
9533
|
+
const { samplesPerPixel: t, sampleRate: n, duration: r, timeScaleHeight: o } = Fe(Jr), a = df(), s = Ce(() => {
|
|
9534
9534
|
const i = Oh(r / 1e3, t, n);
|
|
9535
9535
|
if (a && a.scaleMode === "beats") {
|
|
9536
9536
|
const { bpm: v, timeSignature: m, ticksPerBar: y, ticksPerBeat: w } = a, b = /* @__PURE__ */ new Map(), _ = [], S = r / 1e3, C = Math.ceil(S * v * er / 60), E = Gn(w, v, n) / t, x = Gn(y, v, n) / t, M = 10, R = 30;
|
|
@@ -9580,31 +9580,31 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9580
9580
|
for (let v = 0; v < i; v += h * f / 1e3) {
|
|
9581
9581
|
const m = Math.floor(v);
|
|
9582
9582
|
if (g % c === 0) {
|
|
9583
|
-
const y =
|
|
9583
|
+
const y = _0(g), w = e ? /* @__PURE__ */ k(at.Fragment, { children: e(y, m) }, `timestamp-${g}`) : /* @__PURE__ */ k(S0, { $left: m, children: y }, y);
|
|
9584
9584
|
d.push({ pix: m, element: w }), p.set(m, o);
|
|
9585
9585
|
} else g % u === 0 ? p.set(m, Math.floor(o / 2)) : g % f === 0 && p.set(m, Math.floor(o / 5));
|
|
9586
9586
|
g += f;
|
|
9587
9587
|
}
|
|
9588
9588
|
return { widthX: i, canvasInfo: p, timeMarkersWithPositions: d };
|
|
9589
9589
|
}, [a, r, t, n, o, e]);
|
|
9590
|
-
return /* @__PURE__ */ k(
|
|
9591
|
-
},
|
|
9590
|
+
return /* @__PURE__ */ k(w0, { tickData: s });
|
|
9591
|
+
}, k0 = O.div`
|
|
9592
9592
|
display: inline-flex;
|
|
9593
9593
|
align-items: center;
|
|
9594
9594
|
gap: 0.5rem;
|
|
9595
|
-
`,
|
|
9595
|
+
`, C0 = [
|
|
9596
9596
|
{ value: "seconds", label: "seconds" },
|
|
9597
9597
|
{ value: "thousandths", label: "thousandths" },
|
|
9598
9598
|
{ value: "hh:mm:ss", label: "hh:mm:ss" },
|
|
9599
9599
|
{ value: "hh:mm:ss.u", label: "hh:mm:ss + tenths" },
|
|
9600
9600
|
{ value: "hh:mm:ss.uu", label: "hh:mm:ss + hundredths" },
|
|
9601
9601
|
{ value: "hh:mm:ss.uuu", label: "hh:mm:ss + milliseconds" }
|
|
9602
|
-
],
|
|
9602
|
+
], x0 = ({
|
|
9603
9603
|
value: e,
|
|
9604
9604
|
onChange: t,
|
|
9605
9605
|
disabled: n = !1,
|
|
9606
9606
|
className: r
|
|
9607
|
-
}) => /* @__PURE__ */ k(
|
|
9607
|
+
}) => /* @__PURE__ */ k(k0, { className: r, children: /* @__PURE__ */ k(
|
|
9608
9608
|
ef,
|
|
9609
9609
|
{
|
|
9610
9610
|
className: "time-format",
|
|
@@ -9614,16 +9614,16 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9614
9614
|
},
|
|
9615
9615
|
disabled: n,
|
|
9616
9616
|
"aria-label": "Time format selection",
|
|
9617
|
-
children:
|
|
9617
|
+
children: C0.map((a) => /* @__PURE__ */ k("option", { value: a.value, children: a.label }, a.value))
|
|
9618
9618
|
}
|
|
9619
|
-
) }),
|
|
9619
|
+
) }), E0 = O.div.attrs((e) => ({
|
|
9620
9620
|
style: {
|
|
9621
9621
|
height: `${e.$waveHeight * e.$numChannels + (e.$hasClipHeaders ? Bi : 0)}px`
|
|
9622
9622
|
}
|
|
9623
9623
|
}))`
|
|
9624
9624
|
position: relative;
|
|
9625
9625
|
${(e) => e.$width !== void 0 && `width: ${e.$width}px;`}
|
|
9626
|
-
`,
|
|
9626
|
+
`, I0 = O.div.attrs((e) => ({
|
|
9627
9627
|
style: {
|
|
9628
9628
|
paddingLeft: `${e.$offset || 0}px`
|
|
9629
9629
|
}
|
|
@@ -9645,7 +9645,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9645
9645
|
}) => {
|
|
9646
9646
|
const { waveHeight: u } = fa();
|
|
9647
9647
|
return /* @__PURE__ */ k(
|
|
9648
|
-
|
|
9648
|
+
E0,
|
|
9649
9649
|
{
|
|
9650
9650
|
$numChannels: e,
|
|
9651
9651
|
className: n,
|
|
@@ -9653,7 +9653,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9653
9653
|
$width: a,
|
|
9654
9654
|
$hasClipHeaders: s,
|
|
9655
9655
|
children: /* @__PURE__ */ k(
|
|
9656
|
-
|
|
9656
|
+
I0,
|
|
9657
9657
|
{
|
|
9658
9658
|
$backgroundColor: r,
|
|
9659
9659
|
$offset: o,
|
|
@@ -9728,7 +9728,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9728
9728
|
box-shadow: 0 0 0 0.2rem ${e.theme.inputFocusBorder}33;
|
|
9729
9729
|
}
|
|
9730
9730
|
`}
|
|
9731
|
-
`,
|
|
9731
|
+
`, A0 = O.div`
|
|
9732
9732
|
margin-bottom: 0.3rem;
|
|
9733
9733
|
|
|
9734
9734
|
button:not(:first-child) {
|
|
@@ -9740,7 +9740,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9740
9740
|
border-top-right-radius: 0;
|
|
9741
9741
|
border-bottom-right-radius: 0;
|
|
9742
9742
|
}
|
|
9743
|
-
`,
|
|
9743
|
+
`, M0 = O.button`
|
|
9744
9744
|
position: absolute;
|
|
9745
9745
|
left: 0;
|
|
9746
9746
|
top: 0;
|
|
@@ -9762,7 +9762,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9762
9762
|
opacity: 1;
|
|
9763
9763
|
color: #dc3545;
|
|
9764
9764
|
}
|
|
9765
|
-
`,
|
|
9765
|
+
`, T0 = ({ onClick: e, title: t = "Remove track" }) => /* @__PURE__ */ k(M0, { onClick: e, title: t, children: /* @__PURE__ */ k(iv, { size: 12, weight: "bold" }) }), $0 = O.div`
|
|
9766
9766
|
background: transparent;
|
|
9767
9767
|
width: 100%;
|
|
9768
9768
|
height: 100%;
|
|
@@ -9775,7 +9775,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9775
9775
|
text-align: center;
|
|
9776
9776
|
border: 1px solid ${(e) => e.theme.borderColor};
|
|
9777
9777
|
border-radius: ${(e) => e.theme.borderRadius};
|
|
9778
|
-
`,
|
|
9778
|
+
`, D0 = O.header`
|
|
9779
9779
|
overflow: hidden;
|
|
9780
9780
|
height: 26px;
|
|
9781
9781
|
width: 100%;
|
|
@@ -9786,7 +9786,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9786
9786
|
font-size: ${(e) => e.theme.fontSizeSmall};
|
|
9787
9787
|
color: ${(e) => e.theme.textColor};
|
|
9788
9788
|
background-color: transparent;
|
|
9789
|
-
`,
|
|
9789
|
+
`, R0 = (e) => /* @__PURE__ */ k(qd, { weight: "light", ...e }), P0 = (e) => /* @__PURE__ */ k(Kd, { weight: "light", ...e }), F0 = (e) => /* @__PURE__ */ k(jd, { weight: "bold", ...e }), uc = O(tf)`
|
|
9790
9790
|
width: 75%;
|
|
9791
9791
|
height: 5px;
|
|
9792
9792
|
background: ${(e) => e.theme.sliderTrackColor};
|
|
@@ -9843,10 +9843,10 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9843
9843
|
padding: 0 1rem;
|
|
9844
9844
|
margin-bottom: 0.2rem;
|
|
9845
9845
|
font-size: 14px;
|
|
9846
|
-
`,
|
|
9846
|
+
`, O0 = O.div`
|
|
9847
9847
|
position: relative;
|
|
9848
9848
|
display: inline-block;
|
|
9849
|
-
`,
|
|
9849
|
+
`, L0 = O.button`
|
|
9850
9850
|
background: none;
|
|
9851
9851
|
border: none;
|
|
9852
9852
|
cursor: pointer;
|
|
@@ -9860,7 +9860,7 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9860
9860
|
&:hover {
|
|
9861
9861
|
opacity: 1;
|
|
9862
9862
|
}
|
|
9863
|
-
`, $o = 180,
|
|
9863
|
+
`, $o = 180, B0 = O.div`
|
|
9864
9864
|
position: fixed;
|
|
9865
9865
|
top: ${(e) => e.$top}px;
|
|
9866
9866
|
left: ${(e) => e.$left}px;
|
|
@@ -9872,11 +9872,11 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9872
9872
|
padding: 0.5rem 0;
|
|
9873
9873
|
min-width: ${$o}px;
|
|
9874
9874
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
9875
|
-
`,
|
|
9875
|
+
`, W0 = O.hr`
|
|
9876
9876
|
border: none;
|
|
9877
9877
|
border-top: 1px solid rgba(128, 128, 128, 0.3);
|
|
9878
9878
|
margin: 0.35rem 0;
|
|
9879
|
-
`,
|
|
9879
|
+
`, V0 = ({ items: e }) => {
|
|
9880
9880
|
const [t, n] = z(!1), r = $(() => n(!1), []), o = typeof e == "function" ? e(r) : e, [a, s] = z({ top: 0, left: 0 }), i = T(null), l = T(null), c = $(() => {
|
|
9881
9881
|
if (!i.current) return;
|
|
9882
9882
|
const u = i.current.getBoundingClientRect(), f = window.innerWidth, p = window.innerHeight, d = l.current?.offsetHeight ?? 160;
|
|
@@ -9903,9 +9903,9 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9903
9903
|
return document.addEventListener("mousedown", u), document.addEventListener("keydown", f), () => {
|
|
9904
9904
|
document.removeEventListener("mousedown", u), document.removeEventListener("keydown", f);
|
|
9905
9905
|
};
|
|
9906
|
-
}, [t]), /* @__PURE__ */ me(
|
|
9906
|
+
}, [t]), /* @__PURE__ */ me(O0, { children: [
|
|
9907
9907
|
/* @__PURE__ */ k(
|
|
9908
|
-
|
|
9908
|
+
L0,
|
|
9909
9909
|
{
|
|
9910
9910
|
ref: i,
|
|
9911
9911
|
onClick: (u) => {
|
|
@@ -9914,19 +9914,19 @@ var Sv = O.div.attrs((e) => ({
|
|
|
9914
9914
|
onMouseDown: (u) => u.stopPropagation(),
|
|
9915
9915
|
title: "Track menu",
|
|
9916
9916
|
"aria-label": "Track menu",
|
|
9917
|
-
children: /* @__PURE__ */ k(
|
|
9917
|
+
children: /* @__PURE__ */ k(F0, { size: 16 })
|
|
9918
9918
|
}
|
|
9919
9919
|
),
|
|
9920
9920
|
t && typeof document < "u" && Ic(
|
|
9921
9921
|
/* @__PURE__ */ k(
|
|
9922
|
-
|
|
9922
|
+
B0,
|
|
9923
9923
|
{
|
|
9924
9924
|
ref: l,
|
|
9925
9925
|
$top: a.top,
|
|
9926
9926
|
$left: a.left,
|
|
9927
9927
|
onMouseDown: (u) => u.stopPropagation(),
|
|
9928
9928
|
children: o.map((u, f) => /* @__PURE__ */ me(at.Fragment, { children: [
|
|
9929
|
-
f > 0 && /* @__PURE__ */ k(
|
|
9929
|
+
f > 0 && /* @__PURE__ */ k(W0, {}),
|
|
9930
9930
|
u.content
|
|
9931
9931
|
] }, u.id))
|
|
9932
9932
|
}
|
|
@@ -9964,17 +9964,17 @@ Dn.prototype.max_array = function() {
|
|
|
9964
9964
|
t.push(this.max_sample(n));
|
|
9965
9965
|
return t;
|
|
9966
9966
|
};
|
|
9967
|
-
var
|
|
9968
|
-
function
|
|
9967
|
+
var N0 = 127, z0 = -128, Z0 = 32767, H0 = -32768;
|
|
9968
|
+
function G0(e, t) {
|
|
9969
9969
|
var n = Math.floor(e / t), r = e - n * t;
|
|
9970
9970
|
return r > 0 && n++, n;
|
|
9971
9971
|
}
|
|
9972
|
-
function
|
|
9972
|
+
function U0(e) {
|
|
9973
9973
|
for (var t = e.scale, n = e.amplitude_scale, r = e.split_channels, o = e.length, a = e.sample_rate, s = e.channels.map(function(R) {
|
|
9974
9974
|
return new Float32Array(R);
|
|
9975
|
-
}), i = r ? s.length : 1, l = 24, c =
|
|
9975
|
+
}), i = r ? s.length : 1, l = 24, c = G0(o, t), u = e.bits === 8 ? 1 : 2, f = l + c * 2 * u * i, p = new ArrayBuffer(f), d = new DataView(p), h = 0, g = l, v = new Array(i), m = new Array(i), y = 0; y < i; y++)
|
|
9976
9976
|
v[y] = 1 / 0, m[y] = -1 / 0;
|
|
9977
|
-
var w = e.bits === 8 ?
|
|
9977
|
+
var w = e.bits === 8 ? z0 : H0, b = e.bits === 8 ? N0 : Z0;
|
|
9978
9978
|
d.setInt32(0, 2, !0), d.setUint32(4, e.bits === 8, !0), d.setInt32(8, a, !0), d.setInt32(12, t, !0), d.setInt32(16, c, !0), d.setInt32(20, i, !0);
|
|
9979
9979
|
for (var _ = 0; _ < o; _++) {
|
|
9980
9980
|
var S = 0;
|
|
@@ -10004,10 +10004,10 @@ function Yo(e) {
|
|
|
10004
10004
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
10005
10005
|
}, Yo(e);
|
|
10006
10006
|
}
|
|
10007
|
-
function
|
|
10007
|
+
function X0(e) {
|
|
10008
10008
|
return e && Yo(e) === "object" && "sample_rate" in e && "samples_per_pixel" in e && "bits" in e && "length" in e && "data" in e;
|
|
10009
10009
|
}
|
|
10010
|
-
function
|
|
10010
|
+
function Y0(e) {
|
|
10011
10011
|
var t = e && Yo(e) === "object" && "byteLength" in e;
|
|
10012
10012
|
if (t) {
|
|
10013
10013
|
var n = new DataView(e), r = n.getInt32(0, !0);
|
|
@@ -10016,7 +10016,7 @@ function Yv(e) {
|
|
|
10016
10016
|
}
|
|
10017
10017
|
return t;
|
|
10018
10018
|
}
|
|
10019
|
-
function
|
|
10019
|
+
function j0(e) {
|
|
10020
10020
|
var t = e.data, n = e.channels || 1, r = 24, o = e.bits === 8 ? 1 : 2, a = e.length * 2 * n;
|
|
10021
10021
|
if (t.length !== a)
|
|
10022
10022
|
throw new Error("WaveformData.create(): Length mismatch in JSON waveform data");
|
|
@@ -10034,24 +10034,24 @@ function jv(e) {
|
|
|
10034
10034
|
function Ln(e) {
|
|
10035
10035
|
return e == null;
|
|
10036
10036
|
}
|
|
10037
|
-
function
|
|
10037
|
+
function K0(e, t) {
|
|
10038
10038
|
var n = atob(e);
|
|
10039
10039
|
return n;
|
|
10040
10040
|
}
|
|
10041
|
-
function
|
|
10042
|
-
var r =
|
|
10041
|
+
function q0(e, t, n) {
|
|
10042
|
+
var r = K0(e), o = r.indexOf(`
|
|
10043
10043
|
`, 10) + 1, a = r.substring(o) + "", s = new Blob([a], { type: "application/javascript" });
|
|
10044
10044
|
return URL.createObjectURL(s);
|
|
10045
10045
|
}
|
|
10046
|
-
function
|
|
10046
|
+
function J0(e, t, n) {
|
|
10047
10047
|
var r;
|
|
10048
10048
|
return function(a) {
|
|
10049
|
-
return r = r ||
|
|
10049
|
+
return r = r || q0(e), new Worker(r, a);
|
|
10050
10050
|
};
|
|
10051
10051
|
}
|
|
10052
|
-
var
|
|
10053
|
-
function
|
|
10054
|
-
if (
|
|
10052
|
+
var Q0 = /* @__PURE__ */ J0("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICd1c2Ugc3RyaWN0JzsKCiAgLyoqCiAgICogQXVkaW9CdWZmZXItYmFzZWQgV2F2ZWZvcm1EYXRhIGdlbmVyYXRvcgogICAqCiAgICogQWRhcHRlZCBmcm9tIEJsb2NrRmlsZTo6Q2FsY1N1bW1hcnkgaW4gQXVkYWNpdHksIHdpdGggcGVybWlzc2lvbi4KICAgKiBTZWUgaHR0cHM6Ly9naXRodWIuY29tL2F1ZGFjaXR5L2F1ZGFjaXR5L2Jsb2IvCiAgICogICAxMTA4YzEzNzZjMDkxNjYxNjIzMzVmYWI0NzQzMDA4Y2JhNTdjNGVlL3NyYy9CbG9ja0ZpbGUuY3BwI0wxOTgKICAgKi8KCiAgdmFyIElOVDhfTUFYID0gMTI3OwogIHZhciBJTlQ4X01JTiA9IC0xMjg7CiAgdmFyIElOVDE2X01BWCA9IDMyNzY3OwogIHZhciBJTlQxNl9NSU4gPSAtMzI3Njg7CiAgZnVuY3Rpb24gY2FsY3VsYXRlV2F2ZWZvcm1EYXRhTGVuZ3RoKGF1ZGlvX3NhbXBsZV9jb3VudCwgc2NhbGUpIHsKICAgIHZhciBkYXRhX2xlbmd0aCA9IE1hdGguZmxvb3IoYXVkaW9fc2FtcGxlX2NvdW50IC8gc2NhbGUpOwogICAgdmFyIHNhbXBsZXNfcmVtYWluaW5nID0gYXVkaW9fc2FtcGxlX2NvdW50IC0gZGF0YV9sZW5ndGggKiBzY2FsZTsKICAgIGlmIChzYW1wbGVzX3JlbWFpbmluZyA+IDApIHsKICAgICAgZGF0YV9sZW5ndGgrKzsKICAgIH0KICAgIHJldHVybiBkYXRhX2xlbmd0aDsKICB9CiAgZnVuY3Rpb24gZ2VuZXJhdGVXYXZlZm9ybURhdGEob3B0aW9ucykgewogICAgdmFyIHNjYWxlID0gb3B0aW9ucy5zY2FsZTsKICAgIHZhciBhbXBsaXR1ZGVfc2NhbGUgPSBvcHRpb25zLmFtcGxpdHVkZV9zY2FsZTsKICAgIHZhciBzcGxpdF9jaGFubmVscyA9IG9wdGlvbnMuc3BsaXRfY2hhbm5lbHM7CiAgICB2YXIgbGVuZ3RoID0gb3B0aW9ucy5sZW5ndGg7CiAgICB2YXIgc2FtcGxlX3JhdGUgPSBvcHRpb25zLnNhbXBsZV9yYXRlOwogICAgdmFyIGNoYW5uZWxzID0gb3B0aW9ucy5jaGFubmVscy5tYXAoZnVuY3Rpb24gKGNoYW5uZWwpIHsKICAgICAgcmV0dXJuIG5ldyBGbG9hdDMyQXJyYXkoY2hhbm5lbCk7CiAgICB9KTsKICAgIHZhciBvdXRwdXRfY2hhbm5lbHMgPSBzcGxpdF9jaGFubmVscyA/IGNoYW5uZWxzLmxlbmd0aCA6IDE7CiAgICB2YXIgaGVhZGVyX3NpemUgPSAyNDsKICAgIHZhciBkYXRhX2xlbmd0aCA9IGNhbGN1bGF0ZVdhdmVmb3JtRGF0YUxlbmd0aChsZW5ndGgsIHNjYWxlKTsKICAgIHZhciBieXRlc19wZXJfc2FtcGxlID0gb3B0aW9ucy5iaXRzID09PSA4ID8gMSA6IDI7CiAgICB2YXIgdG90YWxfc2l6ZSA9IGhlYWRlcl9zaXplICsgZGF0YV9sZW5ndGggKiAyICogYnl0ZXNfcGVyX3NhbXBsZSAqIG91dHB1dF9jaGFubmVsczsKICAgIHZhciBidWZmZXIgPSBuZXcgQXJyYXlCdWZmZXIodG90YWxfc2l6ZSk7CiAgICB2YXIgZGF0YV92aWV3ID0gbmV3IERhdGFWaWV3KGJ1ZmZlcik7CiAgICB2YXIgc2NhbGVfY291bnRlciA9IDA7CiAgICB2YXIgb2Zmc2V0ID0gaGVhZGVyX3NpemU7CiAgICB2YXIgbWluX3ZhbHVlID0gbmV3IEFycmF5KG91dHB1dF9jaGFubmVscyk7CiAgICB2YXIgbWF4X3ZhbHVlID0gbmV3IEFycmF5KG91dHB1dF9jaGFubmVscyk7CiAgICBmb3IgKHZhciBjaGFubmVsID0gMDsgY2hhbm5lbCA8IG91dHB1dF9jaGFubmVsczsgY2hhbm5lbCsrKSB7CiAgICAgIG1pbl92YWx1ZVtjaGFubmVsXSA9IEluZmluaXR5OwogICAgICBtYXhfdmFsdWVbY2hhbm5lbF0gPSAtSW5maW5pdHk7CiAgICB9CiAgICB2YXIgcmFuZ2VfbWluID0gb3B0aW9ucy5iaXRzID09PSA4ID8gSU5UOF9NSU4gOiBJTlQxNl9NSU47CiAgICB2YXIgcmFuZ2VfbWF4ID0gb3B0aW9ucy5iaXRzID09PSA4ID8gSU5UOF9NQVggOiBJTlQxNl9NQVg7CiAgICBkYXRhX3ZpZXcuc2V0SW50MzIoMCwgMiwgdHJ1ZSk7IC8vIFZlcnNpb24KICAgIGRhdGFfdmlldy5zZXRVaW50MzIoNCwgb3B0aW9ucy5iaXRzID09PSA4LCB0cnVlKTsgLy8gSXMgOCBiaXQ/CiAgICBkYXRhX3ZpZXcuc2V0SW50MzIoOCwgc2FtcGxlX3JhdGUsIHRydWUpOyAvLyBTYW1wbGUgcmF0ZQogICAgZGF0YV92aWV3LnNldEludDMyKDEyLCBzY2FsZSwgdHJ1ZSk7IC8vIFNjYWxlCiAgICBkYXRhX3ZpZXcuc2V0SW50MzIoMTYsIGRhdGFfbGVuZ3RoLCB0cnVlKTsgLy8gTGVuZ3RoCiAgICBkYXRhX3ZpZXcuc2V0SW50MzIoMjAsIG91dHB1dF9jaGFubmVscywgdHJ1ZSk7CiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7CiAgICAgIHZhciBzYW1wbGUgPSAwOwogICAgICBpZiAob3V0cHV0X2NoYW5uZWxzID09PSAxKSB7CiAgICAgICAgZm9yICh2YXIgX2NoYW5uZWwgPSAwOyBfY2hhbm5lbCA8IGNoYW5uZWxzLmxlbmd0aDsgKytfY2hhbm5lbCkgewogICAgICAgICAgc2FtcGxlICs9IGNoYW5uZWxzW19jaGFubmVsXVtpXTsKICAgICAgICB9CiAgICAgICAgc2FtcGxlID0gTWF0aC5mbG9vcihyYW5nZV9tYXggKiBzYW1wbGUgKiBhbXBsaXR1ZGVfc2NhbGUgLyBjaGFubmVscy5sZW5ndGgpOwogICAgICAgIGlmIChzYW1wbGUgPCBtaW5fdmFsdWVbMF0pIHsKICAgICAgICAgIG1pbl92YWx1ZVswXSA9IHNhbXBsZTsKICAgICAgICAgIGlmIChtaW5fdmFsdWVbMF0gPCByYW5nZV9taW4pIHsKICAgICAgICAgICAgbWluX3ZhbHVlWzBdID0gcmFuZ2VfbWluOwogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAoc2FtcGxlID4gbWF4X3ZhbHVlWzBdKSB7CiAgICAgICAgICBtYXhfdmFsdWVbMF0gPSBzYW1wbGU7CiAgICAgICAgICBpZiAobWF4X3ZhbHVlWzBdID4gcmFuZ2VfbWF4KSB7CiAgICAgICAgICAgIG1heF92YWx1ZVswXSA9IHJhbmdlX21heDsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yICh2YXIgX2NoYW5uZWwyID0gMDsgX2NoYW5uZWwyIDwgb3V0cHV0X2NoYW5uZWxzOyArK19jaGFubmVsMikgewogICAgICAgICAgc2FtcGxlID0gTWF0aC5mbG9vcihyYW5nZV9tYXggKiBjaGFubmVsc1tfY2hhbm5lbDJdW2ldICogYW1wbGl0dWRlX3NjYWxlKTsKICAgICAgICAgIGlmIChzYW1wbGUgPCBtaW5fdmFsdWVbX2NoYW5uZWwyXSkgewogICAgICAgICAgICBtaW5fdmFsdWVbX2NoYW5uZWwyXSA9IHNhbXBsZTsKICAgICAgICAgICAgaWYgKG1pbl92YWx1ZVtfY2hhbm5lbDJdIDwgcmFuZ2VfbWluKSB7CiAgICAgICAgICAgICAgbWluX3ZhbHVlW19jaGFubmVsMl0gPSByYW5nZV9taW47CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIGlmIChzYW1wbGUgPiBtYXhfdmFsdWVbX2NoYW5uZWwyXSkgewogICAgICAgICAgICBtYXhfdmFsdWVbX2NoYW5uZWwyXSA9IHNhbXBsZTsKICAgICAgICAgICAgaWYgKG1heF92YWx1ZVtfY2hhbm5lbDJdID4gcmFuZ2VfbWF4KSB7CiAgICAgICAgICAgICAgbWF4X3ZhbHVlW19jaGFubmVsMl0gPSByYW5nZV9tYXg7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KICAgICAgaWYgKCsrc2NhbGVfY291bnRlciA9PT0gc2NhbGUpIHsKICAgICAgICBmb3IgKHZhciBfY2hhbm5lbDMgPSAwOyBfY2hhbm5lbDMgPCBvdXRwdXRfY2hhbm5lbHM7IF9jaGFubmVsMysrKSB7CiAgICAgICAgICBpZiAob3B0aW9ucy5iaXRzID09PSA4KSB7CiAgICAgICAgICAgIGRhdGFfdmlldy5zZXRJbnQ4KG9mZnNldCsrLCBtaW5fdmFsdWVbX2NoYW5uZWwzXSk7CiAgICAgICAgICAgIGRhdGFfdmlldy5zZXRJbnQ4KG9mZnNldCsrLCBtYXhfdmFsdWVbX2NoYW5uZWwzXSk7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBkYXRhX3ZpZXcuc2V0SW50MTYob2Zmc2V0LCBtaW5fdmFsdWVbX2NoYW5uZWwzXSwgdHJ1ZSk7CiAgICAgICAgICAgIGRhdGFfdmlldy5zZXRJbnQxNihvZmZzZXQgKyAyLCBtYXhfdmFsdWVbX2NoYW5uZWwzXSwgdHJ1ZSk7CiAgICAgICAgICAgIG9mZnNldCArPSA0OwogICAgICAgICAgfQogICAgICAgICAgbWluX3ZhbHVlW19jaGFubmVsM10gPSBJbmZpbml0eTsKICAgICAgICAgIG1heF92YWx1ZVtfY2hhbm5lbDNdID0gLUluZmluaXR5OwogICAgICAgIH0KICAgICAgICBzY2FsZV9jb3VudGVyID0gMDsKICAgICAgfQogICAgfQogICAgaWYgKHNjYWxlX2NvdW50ZXIgPiAwKSB7CiAgICAgIGZvciAodmFyIF9jaGFubmVsNCA9IDA7IF9jaGFubmVsNCA8IG91dHB1dF9jaGFubmVsczsgX2NoYW5uZWw0KyspIHsKICAgICAgICBpZiAob3B0aW9ucy5iaXRzID09PSA4KSB7CiAgICAgICAgICBkYXRhX3ZpZXcuc2V0SW50OChvZmZzZXQrKywgbWluX3ZhbHVlW19jaGFubmVsNF0pOwogICAgICAgICAgZGF0YV92aWV3LnNldEludDgob2Zmc2V0KyssIG1heF92YWx1ZVtfY2hhbm5lbDRdKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZGF0YV92aWV3LnNldEludDE2KG9mZnNldCwgbWluX3ZhbHVlW19jaGFubmVsNF0sIHRydWUpOwogICAgICAgICAgZGF0YV92aWV3LnNldEludDE2KG9mZnNldCArIDIsIG1heF92YWx1ZVtfY2hhbm5lbDRdLCB0cnVlKTsKICAgICAgICB9CiAgICAgIH0KICAgIH0KICAgIHJldHVybiBidWZmZXI7CiAgfQoKICBvbm1lc3NhZ2UgPSBmdW5jdGlvbiBvbm1lc3NhZ2UoZXZ0KSB7CiAgICB2YXIgYnVmZmVyID0gZ2VuZXJhdGVXYXZlZm9ybURhdGEoZXZ0LmRhdGEpOwoKICAgIC8vIFRyYW5zZmVyIGJ1ZmZlciB0byB0aGUgY2FsbGluZyB0aHJlYWQKICAgIHRoaXMucG9zdE1lc3NhZ2UoYnVmZmVyLCBbYnVmZmVyXSk7CiAgICB0aGlzLmNsb3NlKCk7CiAgfTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPXdhdmVmb3JtLWRhdGEtd29ya2VyLmpzLm1hcAoK");
|
|
10053
|
+
function kt(e) {
|
|
10054
|
+
if (X0(e) && (e = j0(e)), Y0(e)) {
|
|
10055
10055
|
this._data = new DataView(e), this._offset = this._version() === 2 ? 24 : 20, this._channels = [];
|
|
10056
10056
|
for (var t = 0; t < this.channels; t++)
|
|
10057
10057
|
this._channels[t] = new Dn(this, t);
|
|
@@ -10083,7 +10083,7 @@ function ty(e) {
|
|
|
10083
10083
|
function vf(e, t, n) {
|
|
10084
10084
|
var r = ty(e);
|
|
10085
10085
|
if (t.disable_worker) {
|
|
10086
|
-
var o =
|
|
10086
|
+
var o = U0({
|
|
10087
10087
|
scale: t.scale,
|
|
10088
10088
|
bits: t.bits,
|
|
10089
10089
|
amplitude_scale: t.amplitude_scale,
|
|
@@ -10092,11 +10092,11 @@ function vf(e, t, n) {
|
|
|
10092
10092
|
sample_rate: e.sampleRate,
|
|
10093
10093
|
channels: r
|
|
10094
10094
|
});
|
|
10095
|
-
n(void 0, new
|
|
10095
|
+
n(void 0, new kt(o), e);
|
|
10096
10096
|
} else {
|
|
10097
|
-
var a = new
|
|
10097
|
+
var a = new Q0();
|
|
10098
10098
|
a.onmessage = function(s) {
|
|
10099
|
-
n(void 0, new
|
|
10099
|
+
n(void 0, new kt(s.data), e);
|
|
10100
10100
|
}, a.postMessage({
|
|
10101
10101
|
scale: t.scale,
|
|
10102
10102
|
bits: t.bits,
|
|
@@ -10118,10 +10118,10 @@ function ny(e, t, n, r) {
|
|
|
10118
10118
|
}, o);
|
|
10119
10119
|
a && a.catch(o);
|
|
10120
10120
|
}
|
|
10121
|
-
|
|
10122
|
-
return new
|
|
10121
|
+
kt.create = function(t) {
|
|
10122
|
+
return new kt(t);
|
|
10123
10123
|
};
|
|
10124
|
-
|
|
10124
|
+
kt.createFromAudio = function(e, t) {
|
|
10125
10125
|
var n = ey(e);
|
|
10126
10126
|
if (e.audio_context && e.array_buffer)
|
|
10127
10127
|
return ny(e.audio_context, e.array_buffer, n, t);
|
|
@@ -10135,7 +10135,7 @@ _t.createFromAudio = function(e, t) {
|
|
|
10135
10135
|
function ha(e) {
|
|
10136
10136
|
this._inputData = e.waveformData, this._output_samples_per_pixel = e.scale, this._scale = this._inputData.scale, this._input_buffer_size = this._inputData.length;
|
|
10137
10137
|
var t = this._input_buffer_size * this._inputData.scale, n = Math.ceil(t / this._output_samples_per_pixel), r = 24, o = this._inputData.bits === 8 ? 1 : 2, a = r + n * 2 * this._inputData.channels * o;
|
|
10138
|
-
this._output_data = new ArrayBuffer(a), this.output_dataview = new DataView(this._output_data), this.output_dataview.setInt32(0, 2, !0), this.output_dataview.setUint32(4, this._inputData.bits === 8, !0), this.output_dataview.setInt32(8, this._inputData.sample_rate, !0), this.output_dataview.setInt32(12, this._output_samples_per_pixel, !0), this.output_dataview.setInt32(16, n, !0), this.output_dataview.setInt32(20, this._inputData.channels, !0), this._outputWaveformData = new
|
|
10138
|
+
this._output_data = new ArrayBuffer(a), this.output_dataview = new DataView(this._output_data), this.output_dataview.setInt32(0, 2, !0), this.output_dataview.setUint32(4, this._inputData.bits === 8, !0), this.output_dataview.setInt32(8, this._inputData.sample_rate, !0), this.output_dataview.setInt32(12, this._output_samples_per_pixel, !0), this.output_dataview.setInt32(16, n, !0), this.output_dataview.setInt32(20, this._inputData.channels, !0), this._outputWaveformData = new kt(this._output_data), this._input_index = 0, this._output_index = 0;
|
|
10139
10139
|
var s = this._inputData.channels;
|
|
10140
10140
|
this._min = new Array(s), this._max = new Array(s);
|
|
10141
10141
|
for (var i = 0; i < s; ++i)
|
|
@@ -10175,7 +10175,7 @@ ha.prototype.next = function() {
|
|
|
10175
10175
|
ha.prototype.getOutputData = function() {
|
|
10176
10176
|
return this._output_data;
|
|
10177
10177
|
};
|
|
10178
|
-
|
|
10178
|
+
kt.prototype = {
|
|
10179
10179
|
_getResampleOptions: function(t) {
|
|
10180
10180
|
var n = {};
|
|
10181
10181
|
if (n.scale = t.scale, n.width = t.width, !Ln(n.width) && (typeof n.width != "number" || n.width <= 0))
|
|
@@ -10192,7 +10192,7 @@ _t.prototype = {
|
|
|
10192
10192
|
t = this._getResampleOptions(t), t.waveformData = this;
|
|
10193
10193
|
for (var n = new ha(t); !n.next(); )
|
|
10194
10194
|
;
|
|
10195
|
-
return new
|
|
10195
|
+
return new kt(n.getOutputData());
|
|
10196
10196
|
},
|
|
10197
10197
|
/**
|
|
10198
10198
|
* Concatenates with one or more other waveforms, returning a new WaveformData object.
|
|
@@ -10204,7 +10204,7 @@ _t.prototype = {
|
|
|
10204
10204
|
throw new Error("WaveformData.concat(): Waveforms are incompatible");
|
|
10205
10205
|
});
|
|
10206
10206
|
var r = this._concatBuffers.apply(this, n);
|
|
10207
|
-
return
|
|
10207
|
+
return kt.create(r);
|
|
10208
10208
|
},
|
|
10209
10209
|
/**
|
|
10210
10210
|
* Returns a new ArrayBuffer with the concatenated waveform.
|
|
@@ -10239,7 +10239,7 @@ _t.prototype = {
|
|
|
10239
10239
|
var f = this._at(n * this.channels * 2 + u);
|
|
10240
10240
|
this.bits === 8 ? c.setInt8(a + u, f) : c.setInt16(a + u * 2, f, !0);
|
|
10241
10241
|
}
|
|
10242
|
-
return new
|
|
10242
|
+
return new kt(l);
|
|
10243
10243
|
},
|
|
10244
10244
|
/**
|
|
10245
10245
|
* Returns the data format version number.
|
|
@@ -10358,10 +10358,10 @@ async function yf(e) {
|
|
|
10358
10358
|
throw new Error(`Failed to fetch waveform data: ${t.statusText}`);
|
|
10359
10359
|
if (e.endsWith(".dat")) {
|
|
10360
10360
|
const r = await t.arrayBuffer();
|
|
10361
|
-
return
|
|
10361
|
+
return kt.create(r);
|
|
10362
10362
|
} else {
|
|
10363
10363
|
const r = await t.json();
|
|
10364
|
-
return
|
|
10364
|
+
return kt.create(r);
|
|
10365
10365
|
}
|
|
10366
10366
|
}
|
|
10367
10367
|
function ry(e, t = 0) {
|
|
@@ -10375,11 +10375,11 @@ function ry(e, t = 0) {
|
|
|
10375
10375
|
sampleRate: e.sample_rate
|
|
10376
10376
|
};
|
|
10377
10377
|
}
|
|
10378
|
-
async function
|
|
10378
|
+
async function Zb(e, t = 0) {
|
|
10379
10379
|
const n = await yf(e);
|
|
10380
10380
|
return ry(n, t);
|
|
10381
10381
|
}
|
|
10382
|
-
async function
|
|
10382
|
+
async function Hb(e) {
|
|
10383
10383
|
const t = await yf(e);
|
|
10384
10384
|
return {
|
|
10385
10385
|
sampleRate: t.sample_rate,
|
|
@@ -10575,7 +10575,7 @@ function uy({ engineRef: e }) {
|
|
|
10575
10575
|
selectedTrackIdRef: r
|
|
10576
10576
|
};
|
|
10577
10577
|
}
|
|
10578
|
-
const
|
|
10578
|
+
const Gb = (e = 256) => {
|
|
10579
10579
|
const t = T(null), n = $(
|
|
10580
10580
|
(r, o, a) => {
|
|
10581
10581
|
const s = new _c("fft", e);
|
|
@@ -10626,7 +10626,7 @@ function vo(e, t, n, r) {
|
|
|
10626
10626
|
}, c = r.get(t);
|
|
10627
10627
|
return c ? (l.id = c.trackId, l.clips[0] = { ...l.clips[0], id: c.clipId }) : r.set(t, { trackId: l.id, clipId: l.clips[0].id }), l;
|
|
10628
10628
|
}
|
|
10629
|
-
function
|
|
10629
|
+
function Ub(e, t = {}) {
|
|
10630
10630
|
const { immediate: n = !1, progressive: r = !1 } = t, o = n || r, [a, s] = z(!0), [i, l] = z(null), [c, u] = z(0), f = e.length, [p, d] = z(/* @__PURE__ */ new Map()), h = T(/* @__PURE__ */ new Map()), g = Ce(() => {
|
|
10631
10631
|
if (!o) return null;
|
|
10632
10632
|
const w = [];
|
|
@@ -11009,8 +11009,8 @@ function gy(e = {}) {
|
|
|
11009
11009
|
})
|
|
11010
11010
|
], [t, n, r, o]);
|
|
11011
11011
|
}
|
|
11012
|
-
const
|
|
11013
|
-
const { tracks: t, sampleRate: n, engineRef: r } = e, { currentTimeRef: o } =
|
|
11012
|
+
const vy = (e) => {
|
|
11013
|
+
const { tracks: t, sampleRate: n, engineRef: r } = e, { currentTimeRef: o } = Et(), { selectedTrackId: a } = gt(), s = $(
|
|
11014
11014
|
(l, c, u) => {
|
|
11015
11015
|
const { samplesPerPixel: f } = e, p = t[l];
|
|
11016
11016
|
if (!p) return !1;
|
|
@@ -11062,11 +11062,11 @@ const Hb = (e) => {
|
|
|
11062
11062
|
window.removeEventListener("keydown", r);
|
|
11063
11063
|
};
|
|
11064
11064
|
}, [r, n]);
|
|
11065
|
-
},
|
|
11065
|
+
}, Xb = (e) => {
|
|
11066
11066
|
const t = [], n = typeof navigator < "u" && navigator.platform.includes("Mac");
|
|
11067
11067
|
return e.metaKey && t.push(n ? "Cmd" : "Ctrl"), e.ctrlKey && !e.metaKey && t.push("Ctrl"), e.altKey && t.push(n ? "Option" : "Alt"), e.shiftKey && t.push("Shift"), t.push(e.key.toUpperCase()), t.join("+");
|
|
11068
|
-
},
|
|
11069
|
-
const { enabled: t = !0, additionalShortcuts: n = [], shortcuts: r } = e, { isPlaying: o } =
|
|
11068
|
+
}, yy = (e = {}) => {
|
|
11069
|
+
const { enabled: t = !0, additionalShortcuts: n = [], shortcuts: r } = e, { isPlaying: o } = Et(), { setCurrentTime: a, play: s, pause: i, stop: l } = De(), c = $(() => {
|
|
11070
11070
|
o ? i() : s();
|
|
11071
11071
|
}, [o, s, i]), u = $(() => {
|
|
11072
11072
|
l();
|
|
@@ -11102,7 +11102,7 @@ const Hb = (e) => {
|
|
|
11102
11102
|
shortcuts: d
|
|
11103
11103
|
};
|
|
11104
11104
|
}, Oa = 0.01, yo = 0.01;
|
|
11105
|
-
function
|
|
11105
|
+
function by({
|
|
11106
11106
|
annotations: e,
|
|
11107
11107
|
activeAnnotationId: t,
|
|
11108
11108
|
onAnnotationsChange: n,
|
|
@@ -11864,7 +11864,7 @@ const pa = [
|
|
|
11864
11864
|
{ id: "dynamics", name: "Dynamics" },
|
|
11865
11865
|
{ id: "spatial", name: "Spatial" }
|
|
11866
11866
|
];
|
|
11867
|
-
const
|
|
11867
|
+
const wy = {
|
|
11868
11868
|
reverb: Ih,
|
|
11869
11869
|
freeverb: Eh,
|
|
11870
11870
|
jcReverb: xh,
|
|
@@ -11886,10 +11886,10 @@ const vy = {
|
|
|
11886
11886
|
gate: ch,
|
|
11887
11887
|
stereoWidener: lh
|
|
11888
11888
|
};
|
|
11889
|
-
let
|
|
11890
|
-
const
|
|
11889
|
+
let _y = 0;
|
|
11890
|
+
const Sy = () => `effect_${Date.now()}_${++_y}`;
|
|
11891
11891
|
function jo(e, t) {
|
|
11892
|
-
const n =
|
|
11892
|
+
const n = wy[e.id];
|
|
11893
11893
|
if (!n)
|
|
11894
11894
|
throw new Error(`Unknown effect type: ${e.id}`);
|
|
11895
11895
|
const r = {};
|
|
@@ -11897,7 +11897,7 @@ function jo(e, t) {
|
|
|
11897
11897
|
const l = t?.[i.name] ?? i.default;
|
|
11898
11898
|
r[i.name] = l;
|
|
11899
11899
|
});
|
|
11900
|
-
const o = new n(r), a =
|
|
11900
|
+
const o = new n(r), a = Sy(), s = o;
|
|
11901
11901
|
return {
|
|
11902
11902
|
effect: o,
|
|
11903
11903
|
id: e.id,
|
|
@@ -12277,7 +12277,7 @@ function Jb() {
|
|
|
12277
12277
|
availableEffects: pa
|
|
12278
12278
|
};
|
|
12279
12279
|
}
|
|
12280
|
-
function
|
|
12280
|
+
function ky(e, t = {}) {
|
|
12281
12281
|
const { bitDepth: n = 16 } = t, r = e.numberOfChannels, o = e.sampleRate, a = e.length, s = n / 8, i = r * s, l = o * i, c = a * i, u = 44, f = u + c, p = new ArrayBuffer(f), d = new DataView(p);
|
|
12282
12282
|
bo(d, 0, "RIFF"), d.setUint32(4, f - 8, !0), bo(d, 8, "WAVE"), bo(d, 12, "fmt "), d.setUint32(16, 16, !0), d.setUint16(20, n === 32 ? 3 : 1, !0), d.setUint16(22, r, !0), d.setUint32(24, o, !0), d.setUint32(28, l, !0), d.setUint16(32, i, !0), d.setUint16(34, n, !0), bo(d, 36, "data"), d.setUint32(40, c, !0);
|
|
12283
12283
|
const h = [];
|
|
@@ -12300,11 +12300,11 @@ function bo(e, t, n) {
|
|
|
12300
12300
|
for (let r = 0; r < n.length; r++)
|
|
12301
12301
|
e.setUint8(t + r, n.charCodeAt(r));
|
|
12302
12302
|
}
|
|
12303
|
-
function
|
|
12303
|
+
function Cy(e, t) {
|
|
12304
12304
|
const n = URL.createObjectURL(e), r = document.createElement("a");
|
|
12305
12305
|
r.href = n, r.download = t, r.style.display = "none", document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
|
|
12306
12306
|
}
|
|
12307
|
-
function
|
|
12307
|
+
function xy() {
|
|
12308
12308
|
const [e, t] = z(!1), [n, r] = z(0), [o, a] = z(null);
|
|
12309
12309
|
return {
|
|
12310
12310
|
exportWav: $(
|
|
@@ -12337,7 +12337,7 @@ function Sy() {
|
|
|
12337
12337
|
const _ = b / w, S = f === "individual" ? [{ track: i[p], state: l[p], index: p }] : i.map((R, A) => ({ track: R, state: l[A], index: A })), C = l.some((R) => R.soloed), E = !!v;
|
|
12338
12338
|
let x;
|
|
12339
12339
|
if ((g || E) && h)
|
|
12340
|
-
x = await
|
|
12340
|
+
x = await Ey(
|
|
12341
12341
|
S,
|
|
12342
12342
|
l,
|
|
12343
12343
|
C,
|
|
@@ -12356,17 +12356,17 @@ function Sy() {
|
|
|
12356
12356
|
for (const { track: D, state: F } of S)
|
|
12357
12357
|
if (!(F.muted && !F.soloed) && !(C && !F.soloed))
|
|
12358
12358
|
for (const L of D.clips) {
|
|
12359
|
-
await
|
|
12359
|
+
await Ay(R, L, F, w, h), A++;
|
|
12360
12360
|
const H = A / I * 0.5;
|
|
12361
12361
|
r(H), y?.(H);
|
|
12362
12362
|
}
|
|
12363
12363
|
r(0.5), y?.(0.5), x = await R.startRendering();
|
|
12364
12364
|
}
|
|
12365
12365
|
r(0.9), y?.(0.9);
|
|
12366
|
-
const M =
|
|
12366
|
+
const M = ky(x, { bitDepth: m });
|
|
12367
12367
|
if (r(1), y?.(1), d) {
|
|
12368
12368
|
const R = f === "individual" ? `${u}_${i[p].name}` : u;
|
|
12369
|
-
|
|
12369
|
+
Cy(M, `${R}.wav`);
|
|
12370
12370
|
}
|
|
12371
12371
|
return {
|
|
12372
12372
|
audioBuffer: x,
|
|
@@ -12387,7 +12387,7 @@ function Sy() {
|
|
|
12387
12387
|
error: o
|
|
12388
12388
|
};
|
|
12389
12389
|
}
|
|
12390
|
-
async function
|
|
12390
|
+
async function Ey(e, t, n, r, o, a, s, i) {
|
|
12391
12391
|
const { Offline: l, Volume: c, Gain: u, Panner: f, Player: p, ToneAudioBuffer: d } = await import("tone");
|
|
12392
12392
|
i(0.1);
|
|
12393
12393
|
let h;
|
|
@@ -12399,7 +12399,7 @@ async function ky(e, t, n, r, o, a, s, i) {
|
|
|
12399
12399
|
a ? y = a(m, v, !0) : m.connect(v);
|
|
12400
12400
|
for (const { track: w, state: b } of e) {
|
|
12401
12401
|
if (b.muted && !b.soloed || n && !b.soloed) continue;
|
|
12402
|
-
const _ = new c(
|
|
12402
|
+
const _ = new c(Iy(b.volume)), S = new f(b.pan), C = new u(b.muted ? 0 : 1), E = s?.(w.id);
|
|
12403
12403
|
E ? E(C, m, !0) : C.connect(m), S.connect(C), _.connect(S);
|
|
12404
12404
|
for (const x of w.clips) {
|
|
12405
12405
|
const {
|
|
@@ -12434,10 +12434,10 @@ async function ky(e, t, n, r, o, a, s, i) {
|
|
|
12434
12434
|
}
|
|
12435
12435
|
return i(0.9), h.get();
|
|
12436
12436
|
}
|
|
12437
|
-
function
|
|
12437
|
+
function Iy(e) {
|
|
12438
12438
|
return 20 * Math.log10(Math.max(e, 1e-4));
|
|
12439
12439
|
}
|
|
12440
|
-
async function
|
|
12440
|
+
async function Ay(e, t, n, r, o) {
|
|
12441
12441
|
const {
|
|
12442
12442
|
audioBuffer: a,
|
|
12443
12443
|
startSample: s,
|
|
@@ -12532,7 +12532,7 @@ const _f = () => {
|
|
|
12532
12532
|
startAnimationFrameLoop: n,
|
|
12533
12533
|
stopAnimationFrameLoop: t
|
|
12534
12534
|
};
|
|
12535
|
-
},
|
|
12535
|
+
}, My = `
|
|
12536
12536
|
"use strict";
|
|
12537
12537
|
|
|
12538
12538
|
var INT8_MAX = 127;
|
|
@@ -12680,11 +12680,11 @@ self.onmessage = function(e) {
|
|
|
12680
12680
|
}
|
|
12681
12681
|
};
|
|
12682
12682
|
`;
|
|
12683
|
-
let
|
|
12684
|
-
function
|
|
12683
|
+
let Ty = 0;
|
|
12684
|
+
function $y() {
|
|
12685
12685
|
let e;
|
|
12686
12686
|
try {
|
|
12687
|
-
const r = new Blob([
|
|
12687
|
+
const r = new Blob([My], { type: "application/javascript" }), o = URL.createObjectURL(r);
|
|
12688
12688
|
e = new Worker(o), URL.revokeObjectURL(o);
|
|
12689
12689
|
} catch (r) {
|
|
12690
12690
|
return console.warn("[waveform-playlist] Failed to create peaks worker (CSP restriction?):", r), {
|
|
@@ -12704,7 +12704,7 @@ function Ay() {
|
|
|
12704
12704
|
a.reject(new Error(o.error));
|
|
12705
12705
|
else
|
|
12706
12706
|
try {
|
|
12707
|
-
const s =
|
|
12707
|
+
const s = kt.create(o.buffer);
|
|
12708
12708
|
a.resolve(s);
|
|
12709
12709
|
} catch (s) {
|
|
12710
12710
|
a.reject(s);
|
|
@@ -12717,7 +12717,7 @@ function Ay() {
|
|
|
12717
12717
|
}, {
|
|
12718
12718
|
generate(r) {
|
|
12719
12719
|
if (n) return Promise.reject(new Error("Worker terminated"));
|
|
12720
|
-
const o = String(++
|
|
12720
|
+
const o = String(++Ty);
|
|
12721
12721
|
return new Promise((a, s) => {
|
|
12722
12722
|
t.set(o, { resolve: a, reject: s }), e.postMessage(
|
|
12723
12723
|
{
|
|
@@ -12743,8 +12743,8 @@ function Ay() {
|
|
|
12743
12743
|
}
|
|
12744
12744
|
};
|
|
12745
12745
|
}
|
|
12746
|
-
function
|
|
12747
|
-
const [n, r] = z(() => /* @__PURE__ */ new Map()), [o, a] = z(!1), s = T(null), i = T(/* @__PURE__ */ new WeakMap()), l = T(/* @__PURE__ */ new WeakMap()), c = T(/* @__PURE__ */ new WeakMap()), u = T(0), f = $(() => (s.current || (s.current =
|
|
12746
|
+
function Dy(e, t) {
|
|
12747
|
+
const [n, r] = z(() => /* @__PURE__ */ new Map()), [o, a] = z(!1), s = T(null), i = T(/* @__PURE__ */ new WeakMap()), l = T(/* @__PURE__ */ new WeakMap()), c = T(/* @__PURE__ */ new WeakMap()), u = T(0), f = $(() => (s.current || (s.current = $y()), s.current), []);
|
|
12748
12748
|
return K(() => {
|
|
12749
12749
|
let p = !1;
|
|
12750
12750
|
const d = i.current, h = l.current, g = c.current, v = [], m = /* @__PURE__ */ new Map();
|
|
@@ -12813,7 +12813,7 @@ function My(e, t) {
|
|
|
12813
12813
|
function Is(e) {
|
|
12814
12814
|
return e instanceof File ? e.name.replace(/\.[^/.]+$/, "") : e instanceof Blob ? "Untitled" : typeof e == "string" ? e.split("/").pop()?.replace(/\.[^/.]+$/, "") ?? "Untitled" : e.name ?? e.src.split("/").pop()?.replace(/\.[^/.]+$/, "") ?? "Untitled";
|
|
12815
12815
|
}
|
|
12816
|
-
async function
|
|
12816
|
+
async function Ry(e, t, n) {
|
|
12817
12817
|
const r = Is(e);
|
|
12818
12818
|
if (e instanceof Blob) {
|
|
12819
12819
|
const l = await e.arrayBuffer();
|
|
@@ -12847,7 +12847,7 @@ function Qb() {
|
|
|
12847
12847
|
const v = new AbortController();
|
|
12848
12848
|
l.current.set(h.id, v), (async () => {
|
|
12849
12849
|
try {
|
|
12850
|
-
const { audioBuffer: m, name: y } = await
|
|
12850
|
+
const { audioBuffer: m, name: y } = await Ry(g, p, v.signal), w = Ac({
|
|
12851
12851
|
audioBuffer: m,
|
|
12852
12852
|
startTime: 0,
|
|
12853
12853
|
duration: m.duration,
|
|
@@ -12924,13 +12924,13 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
12924
12924
|
return c.annotations;
|
|
12925
12925
|
}, [c?.annotations]), E = T(C);
|
|
12926
12926
|
E.current = C;
|
|
12927
|
-
const [x, M] = z(null), [R, A] = z(!1), [I, D] = z(0), [F, L] = z(0), [H, Q] = z([]), [q, oe] = z([]), [X, ee] = z([]), [ie, fe] = z(s), [he,
|
|
12927
|
+
const [x, M] = z(null), [R, A] = z(!1), [I, D] = z(0), [F, L] = z(0), [H, Q] = z([]), [q, oe] = z([]), [X, ee] = z([]), [ie, fe] = z(s), [he, Re] = z(
|
|
12928
12928
|
c?.isContinuousPlay ?? !1
|
|
12929
12929
|
), [Z, Y] = z(c?.linkEndpoints ?? !1), [_e, G] = z(c?.editable ?? !1), [te, Me] = z(!1), B = T(null), Oe = T(!1), st = T(!1);
|
|
12930
12930
|
st.current = R;
|
|
12931
12931
|
const Ge = T(0), ve = T(0), re = T(e), Qe = T(y);
|
|
12932
12932
|
Qe.current = y;
|
|
12933
|
-
const ft = T(X), xe = T(0), Ne = T(0), Ue = T(null), tt = T(null), Dt = T(!1), Jt = T(c?.isContinuousPlay ?? !1), j = T(null), ye = T(null), je = T(0), ze = T(!1), le = T(!1), pe = T(o), Ke = T(44100), { timeFormat: Rt, setTimeFormat: Pt, formatTime: Rn } = ay(),
|
|
12933
|
+
const ft = T(X), xe = T(0), Ne = T(0), Ue = T(null), tt = T(null), Dt = T(!1), Jt = T(c?.isContinuousPlay ?? !1), j = T(null), ye = T(null), je = T(0), ze = T(!1), le = T(!1), pe = T(o), Ke = T(44100), { timeFormat: Rt, setTimeFormat: Pt, formatTime: Rn } = ay(), yt = sy({ engineRef: B, initialSamplesPerPixel: o }), { samplesPerPixel: V, onEngineState: J } = yt, ne = iy({ engineRef: B, initialVolume: 1 }), {
|
|
12934
12934
|
masterVolume: ue,
|
|
12935
12935
|
setMasterVolume: Le,
|
|
12936
12936
|
masterVolumeRef: qe,
|
|
@@ -12939,7 +12939,7 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
12939
12939
|
selectionStart: nt,
|
|
12940
12940
|
selectionEnd: it,
|
|
12941
12941
|
setSelection: Xe,
|
|
12942
|
-
selectionStartRef:
|
|
12942
|
+
selectionStartRef: bt,
|
|
12943
12943
|
selectionEndRef: Ft,
|
|
12944
12944
|
onEngineState: fn
|
|
12945
12945
|
} = ly({ engineRef: B }), {
|
|
@@ -12961,14 +12961,14 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
12961
12961
|
} = uy({ engineRef: B }), { animationFrameRef: tl, startAnimationFrameLoop: va, stopAnimationFrameLoop: no } = _f(), Yf = Ce(
|
|
12962
12962
|
() => Math.min(...S ?? [256, 512, 1024, 2048, 4096, 8192]),
|
|
12963
12963
|
[S]
|
|
12964
|
-
), { cache: nl } =
|
|
12965
|
-
Jt.current = N,
|
|
12964
|
+
), { cache: nl } = Dy(e, Yf), rl = $((N) => {
|
|
12965
|
+
Jt.current = N, Re(N);
|
|
12966
12966
|
}, []), Gt = $((N) => {
|
|
12967
12967
|
j.current = N, M(N);
|
|
12968
12968
|
}, []), ol = $(() => {
|
|
12969
|
-
const N =
|
|
12969
|
+
const N = bt.current ?? 0, U = Ft.current ?? 0;
|
|
12970
12970
|
N !== U && U > N && Pn(N, U);
|
|
12971
|
-
}, [Pn,
|
|
12971
|
+
}, [Pn, bt, Ft]);
|
|
12972
12972
|
K(() => {
|
|
12973
12973
|
Dt.current = ie;
|
|
12974
12974
|
}, [ie]), K(() => {
|
|
@@ -13018,28 +13018,28 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13018
13018
|
});
|
|
13019
13019
|
let Ee = 0;
|
|
13020
13020
|
e.forEach(($e) => {
|
|
13021
|
-
$e.clips.forEach((
|
|
13022
|
-
const en =
|
|
13021
|
+
$e.clips.forEach((_t) => {
|
|
13022
|
+
const en = _t.sampleRate, th = (_t.startSample + _t.durationSamples) / en;
|
|
13023
13023
|
Ee = Math.max(Ee, th);
|
|
13024
13024
|
});
|
|
13025
|
-
}), Q(W), L(Ee), ee(($e) => $e.length === e.length ? $e.map((
|
|
13026
|
-
...
|
|
13025
|
+
}), Q(W), L(Ee), ee(($e) => $e.length === e.length ? $e.map((_t, en) => ({
|
|
13026
|
+
..._t,
|
|
13027
13027
|
name: e[en].name
|
|
13028
|
-
})) : e.map((
|
|
13029
|
-
name:
|
|
13030
|
-
muted:
|
|
13031
|
-
soloed:
|
|
13032
|
-
volume:
|
|
13033
|
-
pan:
|
|
13028
|
+
})) : e.map((_t) => ({
|
|
13029
|
+
name: _t.name,
|
|
13030
|
+
muted: _t.muted,
|
|
13031
|
+
soloed: _t.soloed,
|
|
13032
|
+
volume: _t.volume,
|
|
13033
|
+
pan: _t.pan
|
|
13034
13034
|
}))), B.current && B.current.dispose(), je.current = 0, ye.current = null, Oe.current = !1;
|
|
13035
13035
|
const Te = Yh({ effects: u, soundFontCache: Qe.current }), Ae = new tp({
|
|
13036
13036
|
adapter: Te,
|
|
13037
13037
|
samplesPerPixel: pe.current,
|
|
13038
13038
|
zoomLevels: S
|
|
13039
13039
|
});
|
|
13040
|
-
Ae.setSelection(
|
|
13041
|
-
const ao = ft.current, Sa = e.map(($e,
|
|
13042
|
-
const en = ao[
|
|
13040
|
+
Ae.setSelection(bt.current ?? 0, Ft.current ?? 0), Ae.setLoopRegion(Yi.current ?? 0, ji.current ?? 0), Xi.current && Ae.setLoopEnabled(!0), Ae.setMasterVolume(qe.current ?? 1), el.current && Ae.selectTrack(el.current);
|
|
13041
|
+
const ao = ft.current, Sa = e.map(($e, _t) => {
|
|
13042
|
+
const en = ao[_t];
|
|
13043
13043
|
return {
|
|
13044
13044
|
...$e,
|
|
13045
13045
|
volume: en?.volume ?? $e.volume,
|
|
@@ -13089,7 +13089,7 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13089
13089
|
ae,
|
|
13090
13090
|
m,
|
|
13091
13091
|
qe,
|
|
13092
|
-
|
|
13092
|
+
bt,
|
|
13093
13093
|
Ft,
|
|
13094
13094
|
Yi,
|
|
13095
13095
|
ji,
|
|
@@ -13199,21 +13199,21 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13199
13199
|
va(N);
|
|
13200
13200
|
};
|
|
13201
13201
|
va(N);
|
|
13202
|
-
}, [F, Gt, va, Fn]),
|
|
13202
|
+
}, [F, Gt, va, Fn]), wt = no;
|
|
13203
13203
|
K(() => {
|
|
13204
13204
|
(async () => {
|
|
13205
13205
|
if (R && tl.current && B.current)
|
|
13206
13206
|
if (he) {
|
|
13207
13207
|
const U = ve.current;
|
|
13208
|
-
B.current.stop(),
|
|
13208
|
+
B.current.stop(), wt();
|
|
13209
13209
|
const W = Lt().currentTime;
|
|
13210
13210
|
xe.current = W, Ne.current = U, B.current.play(U), pn();
|
|
13211
13211
|
} else
|
|
13212
|
-
|
|
13212
|
+
wt(), pn();
|
|
13213
13213
|
})().catch((U) => {
|
|
13214
|
-
console.warn("[waveform-playlist] Failed to reschedule playback:", U), A(!1),
|
|
13214
|
+
console.warn("[waveform-playlist] Failed to reschedule playback:", U), A(!1), wt();
|
|
13215
13215
|
});
|
|
13216
|
-
}, [he, R, pn,
|
|
13216
|
+
}, [he, R, pn, wt, tl]), K(() => {
|
|
13217
13217
|
(async () => {
|
|
13218
13218
|
if (ro.current && B.current) {
|
|
13219
13219
|
const { position: U } = ro.current;
|
|
@@ -13222,33 +13222,33 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13222
13222
|
xe.current = W, Ne.current = U, Oe.current || (await B.current.init(), Oe.current = !0), B.current.play(U), A(!0), pn();
|
|
13223
13223
|
}
|
|
13224
13224
|
})().catch((U) => {
|
|
13225
|
-
console.warn("[waveform-playlist] Failed to resume playback after track change:", U), A(!1),
|
|
13225
|
+
console.warn("[waveform-playlist] Failed to resume playback after track change:", U), A(!1), wt();
|
|
13226
13226
|
});
|
|
13227
|
-
}, [e, pn,
|
|
13227
|
+
}, [e, pn, wt]);
|
|
13228
13228
|
const oo = $(
|
|
13229
13229
|
async (N, U) => {
|
|
13230
13230
|
if (!B.current || F === 0) return;
|
|
13231
13231
|
const be = N ?? ve.current;
|
|
13232
|
-
Ge.current = be, ve.current = be, B.current.stop(), B.current.seek(be),
|
|
13232
|
+
Ge.current = be, ve.current = be, B.current.stop(), B.current.seek(be), wt();
|
|
13233
13233
|
const Ee = Lt().currentTime;
|
|
13234
13234
|
xe.current = Ee, Ne.current = be, Ue.current = U !== void 0 ? be + U : null, Oe.current || (await B.current.init(), Oe.current = !0);
|
|
13235
13235
|
const Te = U !== void 0 ? be + U : void 0;
|
|
13236
13236
|
try {
|
|
13237
13237
|
B.current.play(be, Te);
|
|
13238
13238
|
} catch (Ae) {
|
|
13239
|
-
console.warn("[waveform-playlist] Playback failed to start:", Ae),
|
|
13239
|
+
console.warn("[waveform-playlist] Playback failed to start:", Ae), wt();
|
|
13240
13240
|
return;
|
|
13241
13241
|
}
|
|
13242
13242
|
A(!0), pn();
|
|
13243
13243
|
},
|
|
13244
|
-
[F, pn,
|
|
13244
|
+
[F, pn, wt]
|
|
13245
13245
|
), sl = $(() => {
|
|
13246
13246
|
if (!B.current) return;
|
|
13247
13247
|
const N = Fn();
|
|
13248
|
-
B.current.pause(), A(!1),
|
|
13249
|
-
}, [
|
|
13250
|
-
B.current && (B.current.stop(), A(!1),
|
|
13251
|
-
}, [
|
|
13248
|
+
B.current.pause(), A(!1), wt(), ve.current = N, D(N);
|
|
13249
|
+
}, [wt, Fn]), il = $(() => {
|
|
13250
|
+
B.current && (B.current.stop(), A(!1), wt(), ve.current = Ge.current, D(Ge.current), Gt(null));
|
|
13251
|
+
}, [wt, Gt]), ll = $(
|
|
13252
13252
|
(N) => {
|
|
13253
13253
|
const U = Math.max(0, Math.min(N, F));
|
|
13254
13254
|
ve.current = U, D(U), R && B.current && oo(U);
|
|
@@ -13382,8 +13382,8 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13382
13382
|
setTimeFormat: Pt,
|
|
13383
13383
|
formatTime: Rn,
|
|
13384
13384
|
// Zoom
|
|
13385
|
-
zoomIn:
|
|
13386
|
-
zoomOut:
|
|
13385
|
+
zoomIn: yt.zoomIn,
|
|
13386
|
+
zoomOut: yt.zoomOut,
|
|
13387
13387
|
// Master volume
|
|
13388
13388
|
setMasterVolume: Le,
|
|
13389
13389
|
// Automatic scroll
|
|
@@ -13416,8 +13416,8 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13416
13416
|
Ji,
|
|
13417
13417
|
Pt,
|
|
13418
13418
|
Rn,
|
|
13419
|
-
|
|
13420
|
-
|
|
13419
|
+
yt.zoomIn,
|
|
13420
|
+
yt.zoomOut,
|
|
13421
13421
|
Le,
|
|
13422
13422
|
yl,
|
|
13423
13423
|
pl,
|
|
@@ -13448,8 +13448,8 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13448
13448
|
samplesPerPixel: V,
|
|
13449
13449
|
timeFormat: Rt,
|
|
13450
13450
|
masterVolume: ue,
|
|
13451
|
-
canZoomIn:
|
|
13452
|
-
canZoomOut:
|
|
13451
|
+
canZoomIn: yt.canZoomIn,
|
|
13452
|
+
canZoomOut: yt.canZoomOut,
|
|
13453
13453
|
barWidth: h,
|
|
13454
13454
|
barGap: g,
|
|
13455
13455
|
progressBarWidth: _,
|
|
@@ -13473,8 +13473,8 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13473
13473
|
V,
|
|
13474
13474
|
Rt,
|
|
13475
13475
|
ue,
|
|
13476
|
-
|
|
13477
|
-
|
|
13476
|
+
yt.canZoomIn,
|
|
13477
|
+
yt.canZoomOut,
|
|
13478
13478
|
h,
|
|
13479
13479
|
g,
|
|
13480
13480
|
_,
|
|
@@ -13485,28 +13485,28 @@ const Sf = Ve(null), kf = Ve(null), Cf = Ve(null), xf = Ve(null), e1 = ({
|
|
|
13485
13485
|
]
|
|
13486
13486
|
), Qf = { ...rf, ...i };
|
|
13487
13487
|
return /* @__PURE__ */ k(Ec, { theme: Qf, children: /* @__PURE__ */ k(Sf.Provider, { value: jf, children: /* @__PURE__ */ k(kf.Provider, { value: Kf, children: /* @__PURE__ */ k(Cf.Provider, { value: qf, children: /* @__PURE__ */ k(xf.Provider, { value: Jf, children: b }) }) }) }) });
|
|
13488
|
-
},
|
|
13489
|
-
const e =
|
|
13488
|
+
}, Et = () => {
|
|
13489
|
+
const e = Fe(Sf);
|
|
13490
13490
|
if (!e)
|
|
13491
13491
|
throw new Error("usePlaybackAnimation must be used within WaveformPlaylistProvider");
|
|
13492
13492
|
return e;
|
|
13493
|
-
},
|
|
13494
|
-
const e =
|
|
13493
|
+
}, gt = () => {
|
|
13494
|
+
const e = Fe(kf);
|
|
13495
13495
|
if (!e)
|
|
13496
13496
|
throw new Error("usePlaylistState must be used within WaveformPlaylistProvider");
|
|
13497
13497
|
return e;
|
|
13498
|
-
},
|
|
13499
|
-
const e =
|
|
13498
|
+
}, De = () => {
|
|
13499
|
+
const e = Fe(Cf);
|
|
13500
13500
|
if (!e)
|
|
13501
13501
|
throw new Error("usePlaylistControls must be used within WaveformPlaylistProvider");
|
|
13502
13502
|
return e;
|
|
13503
|
-
},
|
|
13504
|
-
const e =
|
|
13503
|
+
}, vt = () => {
|
|
13504
|
+
const e = Fe(xf);
|
|
13505
13505
|
if (!e)
|
|
13506
13506
|
throw new Error("usePlaylistData must be used within WaveformPlaylistProvider");
|
|
13507
13507
|
return e;
|
|
13508
13508
|
};
|
|
13509
|
-
var
|
|
13509
|
+
var Py = class {
|
|
13510
13510
|
constructor(e) {
|
|
13511
13511
|
this._playbackRate = 1, this.handleEnded = () => {
|
|
13512
13512
|
this.onStopCallback && this.onStopCallback();
|
|
@@ -13613,7 +13613,7 @@ var $y = class {
|
|
|
13613
13613
|
get element() {
|
|
13614
13614
|
return this.audioElement;
|
|
13615
13615
|
}
|
|
13616
|
-
},
|
|
13616
|
+
}, Fy = class {
|
|
13617
13617
|
constructor(e = {}) {
|
|
13618
13618
|
this.track = null, this._isPlaying = !1, this._masterVolume = e.masterVolume ?? 1, this._playbackRate = e.playbackRate ?? 1;
|
|
13619
13619
|
}
|
|
@@ -13630,7 +13630,7 @@ var $y = class {
|
|
|
13630
13630
|
addTrack(e) {
|
|
13631
13631
|
return this.track && (console.warn(
|
|
13632
13632
|
"MediaElementPlayout: Only one track is supported. Disposing previous track. For multi-track, use TonePlayout."
|
|
13633
|
-
), this.track.dispose()), this.track = new
|
|
13633
|
+
), this.track.dispose()), this.track = new Py({
|
|
13634
13634
|
...e,
|
|
13635
13635
|
volume: this._masterVolume * (e.volume ?? 1),
|
|
13636
13636
|
playbackRate: this._playbackRate
|
|
@@ -13780,7 +13780,7 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
13780
13780
|
R.current = M;
|
|
13781
13781
|
const [A, I] = z(null), [D, F] = z(
|
|
13782
13782
|
l?.isContinuousPlay ?? !1
|
|
13783
|
-
), [L] = z(t), [H, Q] = z(a), q = T(null), oe = T(0), X = T(D), ee = T(null), ie = T(null), fe = T(a), he = T(t), { startAnimationFrameLoop:
|
|
13783
|
+
), [L] = z(t), [H, Q] = z(a), q = T(null), oe = T(0), X = T(D), ee = T(null), ie = T(null), fe = T(a), he = T(t), { startAnimationFrameLoop: Re, stopAnimationFrameLoop: Z } = _f();
|
|
13784
13784
|
K(() => {
|
|
13785
13785
|
X.current = D;
|
|
13786
13786
|
}, [D]), K(() => {
|
|
@@ -13794,7 +13794,7 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
13794
13794
|
ie.current = j;
|
|
13795
13795
|
}, []), te = e.waveformData.sample_rate;
|
|
13796
13796
|
K(() => {
|
|
13797
|
-
const j = new
|
|
13797
|
+
const j = new Fy({
|
|
13798
13798
|
playbackRate: o
|
|
13799
13799
|
});
|
|
13800
13800
|
j.addTrack({
|
|
@@ -13870,10 +13870,10 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
13870
13870
|
const ze = ie.current, le = ye * te / he.current, pe = ze.clientWidth, Ke = Math.max(0, le - pe / 2);
|
|
13871
13871
|
ze.scrollLeft = Ke;
|
|
13872
13872
|
}
|
|
13873
|
-
|
|
13873
|
+
Re(j);
|
|
13874
13874
|
};
|
|
13875
|
-
|
|
13876
|
-
}, [Y, te,
|
|
13875
|
+
Re(j);
|
|
13876
|
+
}, [Y, te, Re]), B = Z, Oe = $(
|
|
13877
13877
|
(j) => {
|
|
13878
13878
|
if (!q.current) return;
|
|
13879
13879
|
const ye = j ?? oe.current;
|
|
@@ -13979,28 +13979,28 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
13979
13979
|
), Jt = { ...rf, ...s };
|
|
13980
13980
|
return /* @__PURE__ */ k(Ec, { theme: Jt, children: /* @__PURE__ */ k(Ef.Provider, { value: ft, children: /* @__PURE__ */ k(If.Provider, { value: xe, children: /* @__PURE__ */ k(Af.Provider, { value: tt, children: /* @__PURE__ */ k(Mf.Provider, { value: Dt, children: h }) }) }) }) });
|
|
13981
13981
|
}, Ni = () => {
|
|
13982
|
-
const e =
|
|
13982
|
+
const e = Fe(Ef);
|
|
13983
13983
|
if (!e)
|
|
13984
13984
|
throw new Error("useMediaElementAnimation must be used within MediaElementPlaylistProvider");
|
|
13985
13985
|
return e;
|
|
13986
13986
|
}, zi = () => {
|
|
13987
|
-
const e =
|
|
13987
|
+
const e = Fe(If);
|
|
13988
13988
|
if (!e)
|
|
13989
13989
|
throw new Error("useMediaElementState must be used within MediaElementPlaylistProvider");
|
|
13990
13990
|
return e;
|
|
13991
13991
|
}, Tf = () => {
|
|
13992
|
-
const e =
|
|
13992
|
+
const e = Fe(Af);
|
|
13993
13993
|
if (!e)
|
|
13994
13994
|
throw new Error("useMediaElementControls must be used within MediaElementPlaylistProvider");
|
|
13995
13995
|
return e;
|
|
13996
13996
|
}, Zi = () => {
|
|
13997
|
-
const e =
|
|
13997
|
+
const e = Fe(Mf);
|
|
13998
13998
|
if (!e)
|
|
13999
13999
|
throw new Error("useMediaElementData must be used within MediaElementPlaylistProvider");
|
|
14000
14000
|
return e;
|
|
14001
14001
|
}, n1 = ({ className: e }) => {
|
|
14002
|
-
const { isPlaying: t, currentTimeRef: n } =
|
|
14003
|
-
return /* @__PURE__ */ k(
|
|
14002
|
+
const { isPlaying: t, currentTimeRef: n } = Et(), { selectionStart: r, selectionEnd: o, isLoopEnabled: a } = gt(), { play: s } = De();
|
|
14003
|
+
return /* @__PURE__ */ k(xt, { onClick: async () => {
|
|
14004
14004
|
if (r !== o && o > r && !a) {
|
|
14005
14005
|
const c = o - r;
|
|
14006
14006
|
await s(r, c);
|
|
@@ -14008,27 +14008,27 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
14008
14008
|
await s(n.current ?? 0);
|
|
14009
14009
|
}, disabled: t, className: e, children: "Play" });
|
|
14010
14010
|
}, r1 = ({ className: e }) => {
|
|
14011
|
-
const { isPlaying: t } =
|
|
14012
|
-
return /* @__PURE__ */ k(
|
|
14011
|
+
const { isPlaying: t } = Et(), { pause: n } = De();
|
|
14012
|
+
return /* @__PURE__ */ k(xt, { onClick: n, disabled: !t, className: e, children: "Pause" });
|
|
14013
14013
|
}, o1 = ({ className: e }) => {
|
|
14014
|
-
const { isPlaying: t } =
|
|
14015
|
-
return /* @__PURE__ */ k(
|
|
14014
|
+
const { isPlaying: t } = Et(), { stop: n } = De();
|
|
14015
|
+
return /* @__PURE__ */ k(xt, { onClick: n, disabled: !t, className: e, children: "Stop" });
|
|
14016
14016
|
}, a1 = ({ className: e }) => {
|
|
14017
|
-
const { isPlaying: t } =
|
|
14018
|
-
return /* @__PURE__ */ k(
|
|
14017
|
+
const { isPlaying: t } = Et(), { play: n, setCurrentTime: r } = De();
|
|
14018
|
+
return /* @__PURE__ */ k(xt, { onClick: () => {
|
|
14019
14019
|
r(0), t && n(0);
|
|
14020
14020
|
}, className: e, children: "Rewind" });
|
|
14021
14021
|
}, s1 = ({ className: e }) => {
|
|
14022
|
-
const { isPlaying: t } =
|
|
14023
|
-
return /* @__PURE__ */ k(
|
|
14022
|
+
const { isPlaying: t } = Et(), { play: n, setCurrentTime: r } = De(), { duration: o } = vt();
|
|
14023
|
+
return /* @__PURE__ */ k(xt, { onClick: () => {
|
|
14024
14024
|
r(o), t && n(o);
|
|
14025
14025
|
}, className: e, children: "Fast Forward" });
|
|
14026
14026
|
}, i1 = ({
|
|
14027
14027
|
skipAmount: e = 5,
|
|
14028
14028
|
className: t
|
|
14029
14029
|
}) => {
|
|
14030
|
-
const { currentTimeRef: n, isPlaying: r } =
|
|
14031
|
-
return /* @__PURE__ */ k(
|
|
14030
|
+
const { currentTimeRef: n, isPlaying: r } = Et(), { play: o, setCurrentTime: a } = De();
|
|
14031
|
+
return /* @__PURE__ */ k(xt, { onClick: () => {
|
|
14032
14032
|
const i = Math.max(0, (n.current ?? 0) - e);
|
|
14033
14033
|
a(i), r && o(i);
|
|
14034
14034
|
}, className: t, children: "Skip Backward" });
|
|
@@ -14036,15 +14036,15 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
14036
14036
|
skipAmount: e = 5,
|
|
14037
14037
|
className: t
|
|
14038
14038
|
}) => {
|
|
14039
|
-
const { currentTimeRef: n, isPlaying: r } =
|
|
14040
|
-
return /* @__PURE__ */ k(
|
|
14039
|
+
const { currentTimeRef: n, isPlaying: r } = Et(), { play: o, setCurrentTime: a } = De(), { duration: s } = vt();
|
|
14040
|
+
return /* @__PURE__ */ k(xt, { onClick: () => {
|
|
14041
14041
|
const l = Math.min(s, (n.current ?? 0) + e);
|
|
14042
14042
|
a(l), r && o(l);
|
|
14043
14043
|
}, className: t, children: "Skip Forward" });
|
|
14044
14044
|
}, c1 = ({ className: e }) => {
|
|
14045
|
-
const { isLoopEnabled: t, loopStart: n, loopEnd: r } =
|
|
14045
|
+
const { isLoopEnabled: t, loopStart: n, loopEnd: r } = gt(), { setLoopEnabled: o, setLoopRegion: a } = De(), { duration: s } = vt(), i = n !== r && r > n;
|
|
14046
14046
|
return /* @__PURE__ */ k(
|
|
14047
|
-
|
|
14047
|
+
xt,
|
|
14048
14048
|
{
|
|
14049
14049
|
onClick: () => {
|
|
14050
14050
|
if (!t && !i) {
|
|
@@ -14059,9 +14059,9 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
14059
14059
|
}
|
|
14060
14060
|
);
|
|
14061
14061
|
}, u1 = ({ className: e }) => {
|
|
14062
|
-
const { selectionStart: t, selectionEnd: n, loopStart: r, loopEnd: o } =
|
|
14062
|
+
const { selectionStart: t, selectionEnd: n, loopStart: r, loopEnd: o } = gt(), { setLoopRegionFromSelection: a, clearLoopRegion: s } = De(), i = t !== n && n > t, l = r !== o && o > r;
|
|
14063
14063
|
return /* @__PURE__ */ k(
|
|
14064
|
-
|
|
14064
|
+
xt,
|
|
14065
14065
|
{
|
|
14066
14066
|
onClick: () => {
|
|
14067
14067
|
l ? s() : a();
|
|
@@ -14077,26 +14077,26 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
14077
14077
|
label: t = "Clear All",
|
|
14078
14078
|
className: n
|
|
14079
14079
|
}) => {
|
|
14080
|
-
const { stop: r } =
|
|
14080
|
+
const { stop: r } = De(), o = $(() => {
|
|
14081
14081
|
r(), e();
|
|
14082
14082
|
}, [r, e]);
|
|
14083
|
-
return /* @__PURE__ */ k(
|
|
14083
|
+
return /* @__PURE__ */ k(xt, { onClick: o, className: n, title: "Remove all tracks", children: t });
|
|
14084
14084
|
}, f1 = ({
|
|
14085
14085
|
className: e,
|
|
14086
14086
|
disabled: t
|
|
14087
14087
|
}) => {
|
|
14088
|
-
const { zoomIn: n } =
|
|
14089
|
-
return /* @__PURE__ */ k(
|
|
14088
|
+
const { zoomIn: n } = De(), { canZoomIn: r } = vt();
|
|
14089
|
+
return /* @__PURE__ */ k(xt, { onClick: n, disabled: t || !r, className: e, children: "Zoom In" });
|
|
14090
14090
|
}, h1 = ({
|
|
14091
14091
|
className: e,
|
|
14092
14092
|
disabled: t
|
|
14093
14093
|
}) => {
|
|
14094
|
-
const { zoomOut: n } =
|
|
14095
|
-
return /* @__PURE__ */ k(
|
|
14094
|
+
const { zoomOut: n } = De(), { canZoomOut: r } = vt();
|
|
14095
|
+
return /* @__PURE__ */ k(xt, { onClick: n, disabled: t || !r, className: e, children: "Zoom Out" });
|
|
14096
14096
|
}, p1 = ({ className: e }) => {
|
|
14097
|
-
const { masterVolume: t } =
|
|
14097
|
+
const { masterVolume: t } = vt(), { setMasterVolume: n } = De();
|
|
14098
14098
|
return /* @__PURE__ */ k(
|
|
14099
|
-
|
|
14099
|
+
Wv,
|
|
14100
14100
|
{
|
|
14101
14101
|
volume: t,
|
|
14102
14102
|
onChange: n,
|
|
@@ -14104,16 +14104,16 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
14104
14104
|
}
|
|
14105
14105
|
);
|
|
14106
14106
|
}, m1 = ({ className: e }) => {
|
|
14107
|
-
const { timeFormat: t } =
|
|
14108
|
-
return /* @__PURE__ */ k(
|
|
14109
|
-
},
|
|
14107
|
+
const { timeFormat: t } = vt(), { setTimeFormat: n } = De();
|
|
14108
|
+
return /* @__PURE__ */ k(x0, { value: t, onChange: n, className: e });
|
|
14109
|
+
}, Oy = O.span`
|
|
14110
14110
|
font-family: 'Courier New', Monaco, monospace;
|
|
14111
14111
|
font-size: 1rem;
|
|
14112
14112
|
font-weight: 600;
|
|
14113
14113
|
color: ${(e) => e.theme?.textColor || "#333"};
|
|
14114
14114
|
user-select: none;
|
|
14115
14115
|
`, g1 = ({ className: e }) => {
|
|
14116
|
-
const t = T(null), n = T(null), { isPlaying: r, currentTimeRef: o, getPlaybackTime: a } =
|
|
14116
|
+
const t = T(null), n = T(null), { isPlaying: r, currentTimeRef: o, getPlaybackTime: a } = Et(), { timeFormat: s } = vt();
|
|
14117
14117
|
return K(() => {
|
|
14118
14118
|
const i = () => {
|
|
14119
14119
|
if (t.current) {
|
|
@@ -14127,11 +14127,11 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
14127
14127
|
};
|
|
14128
14128
|
}, [r, s, o, a]), K(() => {
|
|
14129
14129
|
!r && t.current && (t.current.textContent = Xn(o.current ?? 0, s));
|
|
14130
|
-
}), /* @__PURE__ */ k(
|
|
14130
|
+
}), /* @__PURE__ */ k(Oy, { ref: t, className: e, "aria-label": "Audio position", children: Xn(o.current ?? 0, s) });
|
|
14131
14131
|
}, v1 = ({ className: e }) => {
|
|
14132
|
-
const { selectionStart: t, selectionEnd: n } =
|
|
14132
|
+
const { selectionStart: t, selectionEnd: n } = gt(), { setSelection: r } = De();
|
|
14133
14133
|
return /* @__PURE__ */ k(
|
|
14134
|
-
|
|
14134
|
+
n0,
|
|
14135
14135
|
{
|
|
14136
14136
|
selectionStart: t,
|
|
14137
14137
|
selectionEnd: n,
|
|
@@ -14140,9 +14140,9 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
14140
14140
|
}
|
|
14141
14141
|
);
|
|
14142
14142
|
}, y1 = ({ className: e }) => {
|
|
14143
|
-
const { isAutomaticScroll: t } =
|
|
14143
|
+
const { isAutomaticScroll: t } = gt(), { setAutomaticScroll: n } = De();
|
|
14144
14144
|
return /* @__PURE__ */ k(
|
|
14145
|
-
|
|
14145
|
+
hv,
|
|
14146
14146
|
{
|
|
14147
14147
|
checked: t,
|
|
14148
14148
|
onChange: n,
|
|
@@ -14151,7 +14151,7 @@ const Ef = Ve(null), If = Ve(null), Af = Ve(null), Mf = Ve(null), t1 = ({
|
|
|
14151
14151
|
);
|
|
14152
14152
|
}, ma = Ve(null), b1 = ma.Provider;
|
|
14153
14153
|
function lr() {
|
|
14154
|
-
const e =
|
|
14154
|
+
const e = Fe(ma);
|
|
14155
14155
|
if (!e)
|
|
14156
14156
|
throw new Error(
|
|
14157
14157
|
"useAnnotationIntegration must be used within <AnnotationProvider>. Install @waveform-playlist/annotations and wrap your app with <AnnotationProvider>. See: https://waveform-playlist.naomiaro.com/docs/guides/annotations"
|
|
@@ -14159,19 +14159,19 @@ function lr() {
|
|
|
14159
14159
|
return e;
|
|
14160
14160
|
}
|
|
14161
14161
|
const w1 = ({ className: e }) => {
|
|
14162
|
-
const { ContinuousPlayCheckbox: t } = lr(), { continuousPlay: n } =
|
|
14162
|
+
const { ContinuousPlayCheckbox: t } = lr(), { continuousPlay: n } = gt(), { setContinuousPlay: r } = De();
|
|
14163
14163
|
return /* @__PURE__ */ k(t, { checked: n, onChange: r, className: e });
|
|
14164
14164
|
}, _1 = ({ className: e }) => {
|
|
14165
|
-
const { LinkEndpointsCheckbox: t } = lr(), { linkEndpoints: n } =
|
|
14165
|
+
const { LinkEndpointsCheckbox: t } = lr(), { linkEndpoints: n } = gt(), { setLinkEndpoints: r } = De();
|
|
14166
14166
|
return /* @__PURE__ */ k(t, { checked: n, onChange: r, className: e });
|
|
14167
14167
|
}, S1 = ({ className: e }) => {
|
|
14168
|
-
const { EditableCheckbox: t } = lr(), { annotationsEditable: n } =
|
|
14168
|
+
const { EditableCheckbox: t } = lr(), { annotationsEditable: n } = gt(), { setAnnotationsEditable: r } = De();
|
|
14169
14169
|
return /* @__PURE__ */ k(t, { checked: n, onChange: r, className: e });
|
|
14170
14170
|
}, k1 = ({
|
|
14171
14171
|
filename: e,
|
|
14172
14172
|
className: t
|
|
14173
14173
|
}) => {
|
|
14174
|
-
const { DownloadAnnotationsButton: n } = lr(), { annotations: r } =
|
|
14174
|
+
const { DownloadAnnotationsButton: n } = lr(), { annotations: r } = gt();
|
|
14175
14175
|
return /* @__PURE__ */ k(n, { annotations: r, filename: e, className: t });
|
|
14176
14176
|
}, C1 = ({
|
|
14177
14177
|
label: e = "Export WAV",
|
|
@@ -14186,7 +14186,7 @@ const w1 = ({ className: e }) => {
|
|
|
14186
14186
|
onExportComplete: c,
|
|
14187
14187
|
onExportError: u
|
|
14188
14188
|
}) => {
|
|
14189
|
-
const { tracks: f, trackStates: p } =
|
|
14189
|
+
const { tracks: f, trackStates: p } = vt(), { exportWav: d, isExporting: h, progress: g } = xy(), v = async () => {
|
|
14190
14190
|
try {
|
|
14191
14191
|
const y = await d(f, p, {
|
|
14192
14192
|
filename: t,
|
|
@@ -14204,7 +14204,7 @@ const w1 = ({ className: e }) => {
|
|
|
14204
14204
|
}
|
|
14205
14205
|
}, m = h ? `Exporting ${Math.round(g * 100)}%` : e;
|
|
14206
14206
|
return /* @__PURE__ */ k(
|
|
14207
|
-
|
|
14207
|
+
xt,
|
|
14208
14208
|
{
|
|
14209
14209
|
onClick: v,
|
|
14210
14210
|
disabled: h || f.length === 0,
|
|
@@ -14212,11 +14212,11 @@ const w1 = ({ className: e }) => {
|
|
|
14212
14212
|
children: m
|
|
14213
14213
|
}
|
|
14214
14214
|
);
|
|
14215
|
-
}, $f = Ve(!1),
|
|
14216
|
-
function
|
|
14217
|
-
return
|
|
14215
|
+
}, $f = Ve(!1), Ly = $f.Provider;
|
|
14216
|
+
function By() {
|
|
14217
|
+
return Fe($f);
|
|
14218
14218
|
}
|
|
14219
|
-
const
|
|
14219
|
+
const Wy = O.div.attrs((e) => ({
|
|
14220
14220
|
style: {
|
|
14221
14221
|
width: `${e.$width}px`,
|
|
14222
14222
|
background: e.$color
|
|
@@ -14229,8 +14229,8 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14229
14229
|
z-index: 100; /* Below sticky controls (z-index: 101) so playhead is hidden when scrolled behind controls */
|
|
14230
14230
|
pointer-events: none;
|
|
14231
14231
|
will-change: transform;
|
|
14232
|
-
`,
|
|
14233
|
-
const t = T(null), n = T(null), { isPlaying: r, currentTimeRef: o, getPlaybackTime: a } =
|
|
14232
|
+
`, Vy = ({ color: e = "#ff0000" }) => {
|
|
14233
|
+
const t = T(null), n = T(null), { isPlaying: r, currentTimeRef: o, getPlaybackTime: a } = Et(), { samplesPerPixel: s, sampleRate: i, progressBarWidth: l } = vt();
|
|
14234
14234
|
return K(() => {
|
|
14235
14235
|
const c = () => {
|
|
14236
14236
|
if (t.current) {
|
|
@@ -14247,8 +14247,8 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14247
14247
|
const u = (o.current ?? 0) * i / s;
|
|
14248
14248
|
t.current.style.transform = `translate3d(${u}px, 0, 0)`;
|
|
14249
14249
|
}
|
|
14250
|
-
}), /* @__PURE__ */ k(
|
|
14251
|
-
},
|
|
14250
|
+
}), /* @__PURE__ */ k(Wy, { ref: t, $color: e, $width: l, "data-playhead": !0 });
|
|
14251
|
+
}, Ny = O.div`
|
|
14252
14252
|
position: relative;
|
|
14253
14253
|
`, La = O.div.attrs((e) => ({
|
|
14254
14254
|
style: {
|
|
@@ -14264,7 +14264,7 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14264
14264
|
/* Force GPU compositing layer to prevent gradient flickering during scroll */
|
|
14265
14265
|
transform: translateZ(0);
|
|
14266
14266
|
backface-visibility: hidden;
|
|
14267
|
-
`,
|
|
14267
|
+
`, zy = O.div.attrs((e) => ({
|
|
14268
14268
|
style: {
|
|
14269
14269
|
top: `${e.$top}px`,
|
|
14270
14270
|
height: `${e.$height}px`,
|
|
@@ -14280,7 +14280,7 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14280
14280
|
transform-origin: left;
|
|
14281
14281
|
/* scaleX changes are composite-only (GPU) — no layout reflow per frame */
|
|
14282
14282
|
will-change: transform;
|
|
14283
|
-
`,
|
|
14283
|
+
`, Zy = O.div`
|
|
14284
14284
|
position: relative;
|
|
14285
14285
|
z-index: 2;
|
|
14286
14286
|
`, mc = ({
|
|
@@ -14291,7 +14291,7 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14291
14291
|
clipOffsetSeconds: o,
|
|
14292
14292
|
...a
|
|
14293
14293
|
}) => {
|
|
14294
|
-
const s = T(null), i = T(null), l = Qr(), { waveHeight: c } = fa(), { isPlaying: u, currentTimeRef: f, getPlaybackTime: p } =
|
|
14294
|
+
const s = T(null), i = T(null), l = Qr(), { waveHeight: c } = fa(), { isPlaying: u, currentTimeRef: f, getPlaybackTime: p } = Et(), { samplesPerPixel: d, sampleRate: h } = vt(), g = l?.waveProgressColor || "rgba(0, 0, 0, 0.1)", v = $c(
|
|
14295
14295
|
e,
|
|
14296
14296
|
t,
|
|
14297
14297
|
d
|
|
@@ -14327,7 +14327,7 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14327
14327
|
let y;
|
|
14328
14328
|
m === "inverted" ? y = a.isSelected && l ? l.selectedWaveFillColor : l?.waveFillColor || "white" : y = a.isSelected && l ? l.selectedWaveOutlineColor : l?.waveOutlineColor || "grey";
|
|
14329
14329
|
const w = a.renderMode === "spectrogram" || a.renderMode === "both", b = a.renderMode === "piano-roll", _ = a.renderMode === "both", S = w ? "#000" : b ? l?.pianoRollBackgroundColor || "#1a1a2e" : cn(y), C = Math.floor(c / 2), E = c, x = a.index * c, M = cn(y);
|
|
14330
|
-
return /* @__PURE__ */ me(
|
|
14330
|
+
return /* @__PURE__ */ me(Ny, { children: [
|
|
14331
14331
|
_ ? /* @__PURE__ */ me(zt, { children: [
|
|
14332
14332
|
/* @__PURE__ */ k(
|
|
14333
14333
|
La,
|
|
@@ -14357,7 +14357,7 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14357
14357
|
}
|
|
14358
14358
|
),
|
|
14359
14359
|
!b && /* @__PURE__ */ k(
|
|
14360
|
-
|
|
14360
|
+
zy,
|
|
14361
14361
|
{
|
|
14362
14362
|
ref: s,
|
|
14363
14363
|
$color: g,
|
|
@@ -14366,7 +14366,7 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14366
14366
|
$width: v
|
|
14367
14367
|
}
|
|
14368
14368
|
),
|
|
14369
|
-
/* @__PURE__ */ k(
|
|
14369
|
+
/* @__PURE__ */ k(Zy, { children: /* @__PURE__ */ k(
|
|
14370
14370
|
pf,
|
|
14371
14371
|
{
|
|
14372
14372
|
...a,
|
|
@@ -14379,14 +14379,14 @@ const Oy = O.div.attrs((e) => ({
|
|
|
14379
14379
|
] });
|
|
14380
14380
|
}, Hi = Ve(null), x1 = Hi.Provider;
|
|
14381
14381
|
function E1() {
|
|
14382
|
-
const e =
|
|
14382
|
+
const e = Fe(Hi);
|
|
14383
14383
|
if (!e)
|
|
14384
14384
|
throw new Error(
|
|
14385
14385
|
"useSpectrogramIntegration must be used within <SpectrogramProvider>. Install @waveform-playlist/spectrogram and wrap your app with <SpectrogramProvider>."
|
|
14386
14386
|
);
|
|
14387
14387
|
return e;
|
|
14388
14388
|
}
|
|
14389
|
-
const
|
|
14389
|
+
const Hy = 60, Gy = O.div.attrs((e) => ({
|
|
14390
14390
|
style: { height: `${e.$height}px` }
|
|
14391
14391
|
}))`
|
|
14392
14392
|
overflow: hidden;
|
|
@@ -14394,7 +14394,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14394
14394
|
background: ${(e) => e.theme.surfaceColor};
|
|
14395
14395
|
transition: background 0.15s ease-in-out;
|
|
14396
14396
|
${(e) => e.$isSelected && `background: ${e.theme.selectedTrackControlsBackground};`}
|
|
14397
|
-
`,
|
|
14397
|
+
`, Uy = ({
|
|
14398
14398
|
renderTrackControls: e,
|
|
14399
14399
|
renderTick: t,
|
|
14400
14400
|
renderPlayhead: n,
|
|
@@ -14414,7 +14414,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14414
14414
|
playbackStartTimeRef: g,
|
|
14415
14415
|
audioStartPositionRef: v,
|
|
14416
14416
|
getPlaybackTime: m
|
|
14417
|
-
} =
|
|
14417
|
+
} = Et(), {
|
|
14418
14418
|
selectionStart: y,
|
|
14419
14419
|
selectionEnd: w,
|
|
14420
14420
|
annotations: b,
|
|
@@ -14426,7 +14426,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14426
14426
|
loopStart: M,
|
|
14427
14427
|
loopEnd: R,
|
|
14428
14428
|
isLoopEnabled: A
|
|
14429
|
-
} =
|
|
14429
|
+
} = gt(), I = Fe(ma), {
|
|
14430
14430
|
setAnnotations: D,
|
|
14431
14431
|
setActiveAnnotationId: F,
|
|
14432
14432
|
setTrackMute: L,
|
|
@@ -14439,8 +14439,8 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14439
14439
|
setSelectedTrackId: ie,
|
|
14440
14440
|
setCurrentTime: fe,
|
|
14441
14441
|
setLoopRegion: he
|
|
14442
|
-
} =
|
|
14443
|
-
peaksDataArray:
|
|
14442
|
+
} = De(), {
|
|
14443
|
+
peaksDataArray: Re,
|
|
14444
14444
|
trackStates: Z,
|
|
14445
14445
|
tracks: Y,
|
|
14446
14446
|
duration: _e,
|
|
@@ -14452,7 +14452,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14452
14452
|
barWidth: st,
|
|
14453
14453
|
barGap: Ge,
|
|
14454
14454
|
isReady: ve
|
|
14455
|
-
} =
|
|
14455
|
+
} = vt(), re = Fe(Hi), Qe = Ce(() => {
|
|
14456
14456
|
if (!re)
|
|
14457
14457
|
return /* @__PURE__ */ new Map();
|
|
14458
14458
|
const V = /* @__PURE__ */ new Map();
|
|
@@ -14484,7 +14484,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14484
14484
|
const Le = (ue.startSample + ue.durationSamples) / ue.sampleRate;
|
|
14485
14485
|
return Math.max(ne, Le);
|
|
14486
14486
|
}, V), 0);
|
|
14487
|
-
let je = ye > 0 ? ye : _e > 0 ? _e :
|
|
14487
|
+
let je = ye > 0 ? ye : _e > 0 ? _e : Hy;
|
|
14488
14488
|
if (f?.isRecording) {
|
|
14489
14489
|
const J = (f.startSample + f.durationSamples) / te;
|
|
14490
14490
|
je = Math.max(je, J + 10);
|
|
@@ -14512,8 +14512,8 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14512
14512
|
), Ke = (V) => {
|
|
14513
14513
|
const J = V.currentTarget.getBoundingClientRect(), ue = (V.clientX - J.left) * G / te, qe = V.clientY - J.top;
|
|
14514
14514
|
let ae = 0, nt = -1;
|
|
14515
|
-
for (let it = 0; it <
|
|
14516
|
-
const Xe =
|
|
14515
|
+
for (let it = 0; it < Re.length; it++) {
|
|
14516
|
+
const Xe = Re[it], bt = Xe.length > 0 ? Math.max(1, ...Xe.map((Qt) => Qt.peaks.data.length)) : 1, hn = ((re?.trackSpectrogramOverrides.get(Y[it]?.id)?.renderMode ?? Y[it]?.renderMode ?? "waveform") === "both" ? bt * 2 : bt) * Me + (s ? 22 : 0);
|
|
14517
14517
|
if (qe >= ae && qe < ae + hn) {
|
|
14518
14518
|
nt = it;
|
|
14519
14519
|
break;
|
|
@@ -14535,9 +14535,9 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14535
14535
|
const J = V.currentTarget.getBoundingClientRect(), ue = (V.clientX - J.left) * G / te, Le = Math.min(y, ue), qe = Math.max(y, ue);
|
|
14536
14536
|
Math.abs(qe - Le) < 0.1 ? fe(Le) : oe(Le, qe);
|
|
14537
14537
|
};
|
|
14538
|
-
if (Y.some((V) => V.clips.length > 0) &&
|
|
14538
|
+
if (Y.some((V) => V.clips.length > 0) && Re.length === 0)
|
|
14539
14539
|
return /* @__PURE__ */ k("div", { className: a, children: "Loading waveform..." });
|
|
14540
|
-
const
|
|
14540
|
+
const yt = Oe.show ? Re.map((V, J) => {
|
|
14541
14541
|
const ne = Y[J];
|
|
14542
14542
|
if (!ne) return null;
|
|
14543
14543
|
const ue = Z[J] || {
|
|
@@ -14546,10 +14546,10 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14546
14546
|
soloed: !1,
|
|
14547
14547
|
volume: 1,
|
|
14548
14548
|
pan: 0
|
|
14549
|
-
}, Le = ne.clips.some((Xe) => Xe.midiNotes && Xe.midiNotes.length > 0), qe = re?.trackSpectrogramOverrides.get(ne.id)?.renderMode ?? ne.renderMode ?? (Le ? "piano-roll" : "waveform"), ae = V.length > 0 ? Math.max(1, ...V.map((Xe) => Xe.peaks.data.length)) : 1, nt = Me * ae + (s ? Bi : 0), it = e ? e(J) : /* @__PURE__ */ me($
|
|
14550
|
-
/* @__PURE__ */ me(
|
|
14549
|
+
}, Le = ne.clips.some((Xe) => Xe.midiNotes && Xe.midiNotes.length > 0), qe = re?.trackSpectrogramOverrides.get(ne.id)?.renderMode ?? ne.renderMode ?? (Le ? "piano-roll" : "waveform"), ae = V.length > 0 ? Math.max(1, ...V.map((Xe) => Xe.peaks.data.length)) : 1, nt = Me * ae + (s ? Bi : 0), it = e ? e(J) : /* @__PURE__ */ me($0, { onClick: () => pe(J), children: [
|
|
14550
|
+
/* @__PURE__ */ me(D0, { style: { justifyContent: "center", position: "relative" }, children: [
|
|
14551
14551
|
u && /* @__PURE__ */ k(
|
|
14552
|
-
|
|
14552
|
+
T0,
|
|
14553
14553
|
{
|
|
14554
14554
|
onClick: (Xe) => {
|
|
14555
14555
|
Xe.stopPropagation(), u(J);
|
|
@@ -14570,18 +14570,18 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14570
14570
|
}
|
|
14571
14571
|
),
|
|
14572
14572
|
re?.renderMenuItems && /* @__PURE__ */ k("span", { style: { position: "absolute", right: 0, top: 0 }, children: /* @__PURE__ */ k(
|
|
14573
|
-
|
|
14573
|
+
V0,
|
|
14574
14574
|
{
|
|
14575
14575
|
items: (Xe) => re.renderMenuItems({
|
|
14576
14576
|
renderMode: qe,
|
|
14577
|
-
onRenderModeChange: (
|
|
14577
|
+
onRenderModeChange: (bt) => re.setTrackRenderMode(ne.id, bt),
|
|
14578
14578
|
onOpenSettings: () => Ne(ne.id),
|
|
14579
14579
|
onClose: Xe
|
|
14580
14580
|
})
|
|
14581
14581
|
}
|
|
14582
14582
|
) })
|
|
14583
14583
|
] }),
|
|
14584
|
-
/* @__PURE__ */ me(
|
|
14584
|
+
/* @__PURE__ */ me(A0, { children: [
|
|
14585
14585
|
/* @__PURE__ */ k(
|
|
14586
14586
|
cc,
|
|
14587
14587
|
{
|
|
@@ -14600,7 +14600,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14600
14600
|
)
|
|
14601
14601
|
] }),
|
|
14602
14602
|
/* @__PURE__ */ me(dc, { children: [
|
|
14603
|
-
/* @__PURE__ */ k(
|
|
14603
|
+
/* @__PURE__ */ k(R0, {}),
|
|
14604
14604
|
/* @__PURE__ */ k(
|
|
14605
14605
|
uc,
|
|
14606
14606
|
{
|
|
@@ -14611,7 +14611,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14611
14611
|
onChange: (Xe) => Q(J, parseFloat(Xe.target.value))
|
|
14612
14612
|
}
|
|
14613
14613
|
),
|
|
14614
|
-
/* @__PURE__ */ k(
|
|
14614
|
+
/* @__PURE__ */ k(P0, {})
|
|
14615
14615
|
] }),
|
|
14616
14616
|
/* @__PURE__ */ me(dc, { children: [
|
|
14617
14617
|
/* @__PURE__ */ k("span", { children: "L" }),
|
|
@@ -14629,7 +14629,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14629
14629
|
] })
|
|
14630
14630
|
] });
|
|
14631
14631
|
return /* @__PURE__ */ k(
|
|
14632
|
-
|
|
14632
|
+
Gy,
|
|
14633
14633
|
{
|
|
14634
14634
|
$height: nt,
|
|
14635
14635
|
$isSelected: ne.id === x,
|
|
@@ -14668,12 +14668,12 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14668
14668
|
scrollContainerRef: j,
|
|
14669
14669
|
isSelecting: Ue,
|
|
14670
14670
|
"data-playlist-state": ve ? "ready" : "loading",
|
|
14671
|
-
trackControlsSlots:
|
|
14671
|
+
trackControlsSlots: yt,
|
|
14672
14672
|
timescaleGapHeight: B > 0 ? B + 1 : 0,
|
|
14673
14673
|
timescale: B > 0 ? /* @__PURE__ */ me(zt, { children: [
|
|
14674
14674
|
/* @__PURE__ */ k(mf, { renderTick: t }),
|
|
14675
14675
|
A && /* @__PURE__ */ k(
|
|
14676
|
-
|
|
14676
|
+
t0,
|
|
14677
14677
|
{
|
|
14678
14678
|
startPosition: Math.min(M, R) * te / G,
|
|
14679
14679
|
endPosition: Math.max(M, R) * te / G,
|
|
@@ -14689,7 +14689,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14689
14689
|
)
|
|
14690
14690
|
] }) : void 0,
|
|
14691
14691
|
children: /* @__PURE__ */ me(zt, { children: [
|
|
14692
|
-
|
|
14692
|
+
Re.map((V, J) => {
|
|
14693
14693
|
const ne = Y[J];
|
|
14694
14694
|
if (!ne) return null;
|
|
14695
14695
|
const ue = ne.clips.some((ae) => ae.midiNotes && ae.midiNotes.length > 0), Le = re?.trackSpectrogramOverrides.get(ne.id)?.renderMode ?? ne.renderMode ?? (ue ? "piano-roll" : "waveform"), qe = V.length > 0 ? Math.max(1, ...V.map((ae) => ae.peaks.data.length)) : 1;
|
|
@@ -14707,7 +14707,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14707
14707
|
Le !== "waveform" && (() => {
|
|
14708
14708
|
const ae = Qe.get(ne.id), nt = ae?.config;
|
|
14709
14709
|
return !nt?.labels || !ae ? null : /* @__PURE__ */ k(
|
|
14710
|
-
|
|
14710
|
+
g0,
|
|
14711
14711
|
{
|
|
14712
14712
|
waveHeight: Me,
|
|
14713
14713
|
numChannels: qe,
|
|
@@ -14742,18 +14742,18 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14742
14742
|
sampleRate: te,
|
|
14743
14743
|
showFades: l,
|
|
14744
14744
|
touchOptimized: c,
|
|
14745
|
-
onMouseDown: (
|
|
14746
|
-
|
|
14745
|
+
onMouseDown: (bt) => {
|
|
14746
|
+
bt.target.closest(
|
|
14747
14747
|
'[role="button"][aria-roledescription="draggable"]'
|
|
14748
14748
|
) || pe(J);
|
|
14749
14749
|
},
|
|
14750
|
-
children: it.data.map((
|
|
14750
|
+
children: it.data.map((bt, Ft) => {
|
|
14751
14751
|
const fn = re?.spectrogramDataMap.get(ae.clipId), hn = fn?.[Ft] ?? fn?.[0], Qt = Qe.get(ne.id), cr = Qt?.config;
|
|
14752
14752
|
return /* @__PURE__ */ k(
|
|
14753
14753
|
mc,
|
|
14754
14754
|
{
|
|
14755
14755
|
index: Ft,
|
|
14756
|
-
data:
|
|
14756
|
+
data: bt,
|
|
14757
14757
|
bits: it.bits,
|
|
14758
14758
|
length: Xe,
|
|
14759
14759
|
isSelected: ne.id === x,
|
|
@@ -14860,7 +14860,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14860
14860
|
controlsOffset: 0,
|
|
14861
14861
|
getAudioContextTime: () => Lt().currentTime,
|
|
14862
14862
|
getPlaybackTime: m
|
|
14863
|
-
}) : /* @__PURE__ */ k(
|
|
14863
|
+
}) : /* @__PURE__ */ k(Vy, { color: p.playheadColor }))
|
|
14864
14864
|
] })
|
|
14865
14865
|
}
|
|
14866
14866
|
)
|
|
@@ -14882,7 +14882,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14882
14882
|
document.body
|
|
14883
14883
|
)
|
|
14884
14884
|
] });
|
|
14885
|
-
},
|
|
14885
|
+
}, Xy = ({
|
|
14886
14886
|
height: e,
|
|
14887
14887
|
renderAnnotationItem: t,
|
|
14888
14888
|
onAnnotationUpdate: n,
|
|
@@ -14891,7 +14891,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14891
14891
|
scrollActivePosition: a = "center",
|
|
14892
14892
|
scrollActiveContainer: s = "nearest"
|
|
14893
14893
|
}) => {
|
|
14894
|
-
const { annotations: i, activeAnnotationId: l, annotationsEditable: c, linkEndpoints: u, continuousPlay: f } =
|
|
14894
|
+
const { annotations: i, activeAnnotationId: l, annotationsEditable: c, linkEndpoints: u, continuousPlay: f } = gt(), p = lr(), { setAnnotations: d } = De(), h = o ?? { linkEndpoints: u, continuousPlay: f }, g = $(
|
|
14895
14895
|
(m) => {
|
|
14896
14896
|
d(m), n?.(m);
|
|
14897
14897
|
},
|
|
@@ -14933,10 +14933,10 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14933
14933
|
onRemoveTrack: v,
|
|
14934
14934
|
recordingState: m
|
|
14935
14935
|
}) => {
|
|
14936
|
-
const { annotations: y } =
|
|
14936
|
+
const { annotations: y } = gt(), w = By();
|
|
14937
14937
|
return /* @__PURE__ */ me(zt, { children: [
|
|
14938
14938
|
/* @__PURE__ */ k(
|
|
14939
|
-
|
|
14939
|
+
Uy,
|
|
14940
14940
|
{
|
|
14941
14941
|
renderTrackControls: e,
|
|
14942
14942
|
renderTick: t ?? (n ? (_, S) => n(parseFloat(_) || 0, S) : void 0),
|
|
@@ -14953,7 +14953,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14953
14953
|
}
|
|
14954
14954
|
),
|
|
14955
14955
|
y.length > 0 && /* @__PURE__ */ k(
|
|
14956
|
-
|
|
14956
|
+
Xy,
|
|
14957
14957
|
{
|
|
14958
14958
|
height: s,
|
|
14959
14959
|
renderAnnotationItem: i,
|
|
@@ -14965,7 +14965,7 @@ const Ny = 60, zy = O.div.attrs((e) => ({
|
|
|
14965
14965
|
)
|
|
14966
14966
|
] });
|
|
14967
14967
|
};
|
|
14968
|
-
var
|
|
14968
|
+
var Yy = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Df = Yy ? Nr : K;
|
|
14969
14969
|
function Bn(e) {
|
|
14970
14970
|
const t = T(e);
|
|
14971
14971
|
return Df(() => {
|
|
@@ -14979,17 +14979,17 @@ function Ba(e, t, n = K, r = Object.is) {
|
|
|
14979
14979
|
r(e, a) || (o.current = e, t(e, a));
|
|
14980
14980
|
}, [t, e]);
|
|
14981
14981
|
}
|
|
14982
|
-
var gc = Object.getOwnPropertySymbols,
|
|
14982
|
+
var gc = Object.getOwnPropertySymbols, jy = Object.prototype.hasOwnProperty, Ky = Object.prototype.propertyIsEnumerable, qy = (e, t) => {
|
|
14983
14983
|
var n = {};
|
|
14984
14984
|
for (var r in e)
|
|
14985
|
-
|
|
14985
|
+
jy.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
14986
14986
|
if (e != null && gc)
|
|
14987
14987
|
for (var r of gc(e))
|
|
14988
|
-
t.indexOf(r) < 0 &&
|
|
14988
|
+
t.indexOf(r) < 0 && Ky.call(e, r) && (n[r] = e[r]);
|
|
14989
14989
|
return n;
|
|
14990
|
-
},
|
|
14991
|
-
|
|
14992
|
-
),
|
|
14990
|
+
}, Jy = new Mi(), Qy = Ve(
|
|
14991
|
+
Jy
|
|
14992
|
+
), eb = Sc(
|
|
14993
14993
|
kc(({ children: e }, t) => {
|
|
14994
14994
|
const [n, r] = z(0), o = T(null), a = T(null), s = Ce(
|
|
14995
14995
|
() => ({
|
|
@@ -15024,7 +15024,7 @@ function Rf(e) {
|
|
|
15024
15024
|
onDragMove: s,
|
|
15025
15025
|
onDragOver: i,
|
|
15026
15026
|
onDragEnd: l
|
|
15027
|
-
} = t, c =
|
|
15027
|
+
} = t, c = qy(t, [
|
|
15028
15028
|
"children",
|
|
15029
15029
|
"onCollision",
|
|
15030
15030
|
"onBeforeDragStart",
|
|
@@ -15033,7 +15033,7 @@ function Rf(e) {
|
|
|
15033
15033
|
"onDragOver",
|
|
15034
15034
|
"onDragEnd"
|
|
15035
15035
|
]);
|
|
15036
|
-
const u = T(null), { plugins: f, modifiers: p, sensors: d } = c, h = Xt(f, Un.plugins), g = Xt(d, Un.sensors), v = Xt(p, Un.modifiers), m = Bn(o), y = Bn(a), w = Bn(i), b = Bn(s), _ = Bn(l), S = Bn(r), C =
|
|
15036
|
+
const u = T(null), { plugins: f, modifiers: p, sensors: d } = c, h = Xt(f, Un.plugins), g = Xt(d, Un.sensors), v = Xt(p, Un.modifiers), m = Bn(o), y = Bn(a), w = Bn(i), b = Bn(s), _ = Bn(l), S = Bn(r), C = tb(() => {
|
|
15037
15037
|
var E;
|
|
15038
15038
|
return (E = c.manager) != null ? E : new Mi(c);
|
|
15039
15039
|
});
|
|
@@ -15086,31 +15086,31 @@ function Rf(e) {
|
|
|
15086
15086
|
v,
|
|
15087
15087
|
() => C && (C.modifiers = v),
|
|
15088
15088
|
...Wa
|
|
15089
|
-
), /* @__PURE__ */ me(
|
|
15090
|
-
/* @__PURE__ */ k(
|
|
15089
|
+
), /* @__PURE__ */ me(Qy.Provider, { value: C, children: [
|
|
15090
|
+
/* @__PURE__ */ k(eb, { ref: u, children: n }),
|
|
15091
15091
|
n
|
|
15092
15092
|
] });
|
|
15093
15093
|
}
|
|
15094
|
-
function
|
|
15094
|
+
function tb(e) {
|
|
15095
15095
|
const t = T(null);
|
|
15096
15096
|
return t.current || (t.current = e()), Th(() => () => {
|
|
15097
15097
|
var n;
|
|
15098
15098
|
return (n = t.current) == null ? void 0 : n.destroy();
|
|
15099
15099
|
}, []), t.current;
|
|
15100
15100
|
}
|
|
15101
|
-
var
|
|
15101
|
+
var nb = Object.create, Pf = Object.defineProperty, rb = Object.getOwnPropertyDescriptor, Ff = (e, t) => (t = Symbol[e]) ? t : Symbol.for("Symbol." + e), ga = (e) => {
|
|
15102
15102
|
throw TypeError(e);
|
|
15103
|
-
},
|
|
15103
|
+
}, ob = (e, t, n) => t in e ? Pf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ab = (e) => {
|
|
15104
15104
|
var t;
|
|
15105
|
-
return [, , ,
|
|
15106
|
-
}, Of = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Lf = (e) => e !== void 0 && typeof e != "function" ? ga("Function expected") : e,
|
|
15105
|
+
return [, , , nb((t = e?.[Ff("metadata")]) != null ? t : null)];
|
|
15106
|
+
}, Of = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"], Lf = (e) => e !== void 0 && typeof e != "function" ? ga("Function expected") : e, sb = (e, t, n, r, o) => ({ kind: Of[e], name: t, metadata: r, addInitializer: (a) => n._ ? ga("Already initialized") : o.push(Lf(a || null)) }), ib = (e, t) => ob(t, Ff("metadata"), e[3]), lb = (e, t, n, r) => {
|
|
15107
15107
|
for (var o = 0, a = e[t >> 1], s = a && a.length; o < s; o++) a[o].call(n);
|
|
15108
15108
|
return r;
|
|
15109
15109
|
}, Bf = (e, t, n, r, o, a) => {
|
|
15110
|
-
for (var s, i, l, c, u = t & 7, f = !1, p = !1, d = 2, h = Of[u + 5], g = e[d] || (e[d] = []), v = (o = o.prototype,
|
|
15111
|
-
l =
|
|
15110
|
+
for (var s, i, l, c, u = t & 7, f = !1, p = !1, d = 2, h = Of[u + 5], g = e[d] || (e[d] = []), v = (o = o.prototype, rb(o, n)), m = r.length - 1; m >= 0; m--)
|
|
15111
|
+
l = sb(u, n, i = {}, e[3], g), l.static = f, l.private = p, c = l.access = { has: (y) => n in y }, c.get = (y) => y[n], s = (0, r[m])(v[h], l), i._ = 1, Lf(s) && (v[h] = s);
|
|
15112
15112
|
return v && Pf(o, n, v), o;
|
|
15113
|
-
}, Wf = (e, t, n) => t.has(e) || ga("Cannot " + n),
|
|
15113
|
+
}, Wf = (e, t, n) => t.has(e) || ga("Cannot " + n), cb = (e, t, n) => (Wf(e, t, "read from private field"), t.get(e)), ub = (e, t, n) => t.has(e) ? ga("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), db = (e, t, n, r) => (Wf(e, t, "write to private field"), t.set(e, n), n), pr = class As {
|
|
15114
15114
|
/**
|
|
15115
15115
|
* @param {number} Coordinate of the point on the horizontal axis
|
|
15116
15116
|
* @param {number} Coordinate of the point on the vertical axis
|
|
@@ -15148,10 +15148,10 @@ var Qy = Object.create, Pf = Object.defineProperty, eb = Object.getOwnPropertyDe
|
|
|
15148
15148
|
static from({ x: t, y: n }) {
|
|
15149
15149
|
return new As(t, n);
|
|
15150
15150
|
}
|
|
15151
|
-
}, Vf, Nf, Ms, Do, eo, Gi = class extends (Ms = un, Nf = [
|
|
15151
|
+
}, Vf, Nf, Ms, Do, eo, Gi = class extends (Ms = un, Nf = [Pe], Vf = [Pe], Ms) {
|
|
15152
15152
|
constructor(e) {
|
|
15153
15153
|
const t = pr.from(e);
|
|
15154
|
-
super(t, (n, r) => pr.equals(n, r)),
|
|
15154
|
+
super(t, (n, r) => pr.equals(n, r)), lb(eo, 5, this), ub(this, Do, 0), this.velocity = { x: 0, y: 0 };
|
|
15155
15155
|
}
|
|
15156
15156
|
get delta() {
|
|
15157
15157
|
return pr.delta(this.current, this.initial);
|
|
@@ -15172,9 +15172,9 @@ var Qy = Object.create, Pf = Object.defineProperty, eb = Object.getOwnPropertyDe
|
|
|
15172
15172
|
const { current: t } = this, n = pr.from(e), r = {
|
|
15173
15173
|
x: n.x - t.x,
|
|
15174
15174
|
y: n.y - t.y
|
|
15175
|
-
}, o = Date.now(), a = o -
|
|
15175
|
+
}, o = Date.now(), a = o - cb(this, Do), s = (i) => Math.round(i / a * 100);
|
|
15176
15176
|
ln(() => {
|
|
15177
|
-
|
|
15177
|
+
db(this, Do, o), this.velocity = {
|
|
15178
15178
|
x: s(r.x),
|
|
15179
15179
|
y: s(r.y)
|
|
15180
15180
|
}, super.current = n;
|
|
@@ -15184,21 +15184,21 @@ var Qy = Object.create, Pf = Object.defineProperty, eb = Object.getOwnPropertyDe
|
|
|
15184
15184
|
super.reset(pr.from(e)), this.velocity = { x: 0, y: 0 };
|
|
15185
15185
|
}
|
|
15186
15186
|
};
|
|
15187
|
-
eo =
|
|
15187
|
+
eo = ab(Ms);
|
|
15188
15188
|
Do = /* @__PURE__ */ new WeakMap();
|
|
15189
15189
|
Bf(eo, 2, "delta", Nf, Gi);
|
|
15190
15190
|
Bf(eo, 2, "direction", Vf, Gi);
|
|
15191
|
-
|
|
15191
|
+
ib(eo, Gi);
|
|
15192
15192
|
var zf = /* @__PURE__ */ ((e) => (e.Horizontal = "x", e.Vertical = "y", e))(zf || {});
|
|
15193
15193
|
Object.values(zf);
|
|
15194
|
-
var
|
|
15194
|
+
var fb = Object.defineProperty, hb = Object.defineProperties, pb = Object.getOwnPropertyDescriptors, vc = Object.getOwnPropertySymbols, mb = Object.prototype.hasOwnProperty, gb = Object.prototype.propertyIsEnumerable, yc = (e, t, n) => t in e ? fb(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Zf = (e, t) => {
|
|
15195
15195
|
for (var n in t || (t = {}))
|
|
15196
|
-
|
|
15196
|
+
mb.call(t, n) && yc(e, n, t[n]);
|
|
15197
15197
|
if (vc)
|
|
15198
15198
|
for (var n of vc(t))
|
|
15199
|
-
|
|
15199
|
+
gb.call(t, n) && yc(e, n, t[n]);
|
|
15200
15200
|
return e;
|
|
15201
|
-
}, Hf = (e, t) =>
|
|
15201
|
+
}, Hf = (e, t) => hb(e, pb(t)), Ts = class extends jn {
|
|
15202
15202
|
/**
|
|
15203
15203
|
* Applies the axis restriction to the drag operation.
|
|
15204
15204
|
*
|
|
@@ -15246,7 +15246,7 @@ const Xf = (e) => {
|
|
|
15246
15246
|
return t || console.warn(
|
|
15247
15247
|
"[waveform-playlist] noDropAnimationPlugins: Feedback plugin not found in defaults — drop animation may not be disabled. Check @dnd-kit/dom version."
|
|
15248
15248
|
), n;
|
|
15249
|
-
},
|
|
15249
|
+
}, vb = O.div`
|
|
15250
15250
|
position: absolute;
|
|
15251
15251
|
top: 0;
|
|
15252
15252
|
left: 0;
|
|
@@ -15256,7 +15256,7 @@ const Xf = (e) => {
|
|
|
15256
15256
|
z-index: 100;
|
|
15257
15257
|
pointer-events: none;
|
|
15258
15258
|
will-change: transform;
|
|
15259
|
-
`,
|
|
15259
|
+
`, yb = ({
|
|
15260
15260
|
color: e = "#ff0000"
|
|
15261
15261
|
}) => {
|
|
15262
15262
|
const t = T(null), n = T(null), { isPlaying: r, currentTimeRef: o } = Ni(), { samplesPerPixel: a, sampleRate: s, progressBarWidth: i } = Zi();
|
|
@@ -15276,10 +15276,10 @@ const Xf = (e) => {
|
|
|
15276
15276
|
const c = (o.current ?? 0) * s / a;
|
|
15277
15277
|
t.current.style.transform = `translate3d(${c}px, 0, 0)`;
|
|
15278
15278
|
}
|
|
15279
|
-
}), /* @__PURE__ */ k(
|
|
15280
|
-
},
|
|
15279
|
+
}), /* @__PURE__ */ k(vb, { ref: t, $color: e, $width: i, "data-playhead": !0 });
|
|
15280
|
+
}, bb = O.div`
|
|
15281
15281
|
position: relative;
|
|
15282
|
-
`,
|
|
15282
|
+
`, wb = O.div`
|
|
15283
15283
|
position: absolute;
|
|
15284
15284
|
top: ${(e) => e.$top}px;
|
|
15285
15285
|
left: 0;
|
|
@@ -15289,7 +15289,7 @@ const Xf = (e) => {
|
|
|
15289
15289
|
z-index: 0;
|
|
15290
15290
|
transform: translateZ(0);
|
|
15291
15291
|
backface-visibility: hidden;
|
|
15292
|
-
`,
|
|
15292
|
+
`, _b = O.div`
|
|
15293
15293
|
position: absolute;
|
|
15294
15294
|
top: ${(e) => e.$top}px;
|
|
15295
15295
|
left: 0;
|
|
@@ -15298,10 +15298,10 @@ const Xf = (e) => {
|
|
|
15298
15298
|
pointer-events: none;
|
|
15299
15299
|
z-index: 1;
|
|
15300
15300
|
will-change: width;
|
|
15301
|
-
`,
|
|
15301
|
+
`, Sb = O.div`
|
|
15302
15302
|
position: relative;
|
|
15303
15303
|
z-index: 2;
|
|
15304
|
-
`,
|
|
15304
|
+
`, kb = ({
|
|
15305
15305
|
clipStartSample: e,
|
|
15306
15306
|
clipDurationSamples: t,
|
|
15307
15307
|
...n
|
|
@@ -15354,9 +15354,9 @@ const Xf = (e) => {
|
|
|
15354
15354
|
let d;
|
|
15355
15355
|
p === "inverted" ? d = a?.selectedWaveFillColor || a?.waveFillColor || "white" : d = a?.selectedWaveOutlineColor || a?.waveOutlineColor || "grey";
|
|
15356
15356
|
const h = cn(d);
|
|
15357
|
-
return /* @__PURE__ */ me(
|
|
15357
|
+
return /* @__PURE__ */ me(bb, { children: [
|
|
15358
15358
|
/* @__PURE__ */ k(
|
|
15359
|
-
|
|
15359
|
+
wb,
|
|
15360
15360
|
{
|
|
15361
15361
|
$color: h,
|
|
15362
15362
|
$height: s,
|
|
@@ -15365,7 +15365,7 @@ const Xf = (e) => {
|
|
|
15365
15365
|
}
|
|
15366
15366
|
),
|
|
15367
15367
|
/* @__PURE__ */ k(
|
|
15368
|
-
|
|
15368
|
+
_b,
|
|
15369
15369
|
{
|
|
15370
15370
|
ref: r,
|
|
15371
15371
|
$color: f,
|
|
@@ -15373,16 +15373,16 @@ const Xf = (e) => {
|
|
|
15373
15373
|
$top: n.index * s
|
|
15374
15374
|
}
|
|
15375
15375
|
),
|
|
15376
|
-
/* @__PURE__ */ k(
|
|
15376
|
+
/* @__PURE__ */ k(Sb, { children: /* @__PURE__ */ k(pf, { ...n, isSelected: !0, transparentBackground: !0 }) })
|
|
15377
15377
|
] });
|
|
15378
|
-
},
|
|
15378
|
+
}, Cb = ({
|
|
15379
15379
|
getAnnotationBoxLabel: e,
|
|
15380
15380
|
editable: t = !1,
|
|
15381
15381
|
linkEndpoints: n = !1,
|
|
15382
15382
|
onAnnotationUpdate: r,
|
|
15383
15383
|
className: o
|
|
15384
15384
|
}) => {
|
|
15385
|
-
const a = Qr(), { isPlaying: s } = Ni(), { annotations: i, activeAnnotationId: l } = zi(), c =
|
|
15385
|
+
const a = Qr(), { isPlaying: s } = Ni(), { annotations: i, activeAnnotationId: l } = zi(), c = Fe(ma), { play: u, seekTo: f, setActiveAnnotationId: p, setAnnotations: d, setScrollContainer: h } = Tf(), {
|
|
15386
15386
|
duration: g,
|
|
15387
15387
|
peaksDataArray: v,
|
|
15388
15388
|
sampleRate: m,
|
|
@@ -15437,7 +15437,7 @@ const Xf = (e) => {
|
|
|
15437
15437
|
A(G);
|
|
15438
15438
|
},
|
|
15439
15439
|
[I, b, m]
|
|
15440
|
-
),
|
|
15440
|
+
), Re = $(
|
|
15441
15441
|
(Z) => {
|
|
15442
15442
|
if (!I) return;
|
|
15443
15443
|
if (D(!1), s && S.current) {
|
|
@@ -15475,7 +15475,7 @@ const Xf = (e) => {
|
|
|
15475
15475
|
controlsWidth: _.show ? _.width : 0,
|
|
15476
15476
|
onTracksMouseDown: fe,
|
|
15477
15477
|
onTracksMouseMove: he,
|
|
15478
|
-
onTracksMouseUp:
|
|
15478
|
+
onTracksMouseUp: Re,
|
|
15479
15479
|
scrollContainerRef: L,
|
|
15480
15480
|
isSelecting: I,
|
|
15481
15481
|
timescale: w > 0 ? /* @__PURE__ */ k(mf, {}) : void 0,
|
|
@@ -15509,7 +15509,7 @@ const Xf = (e) => {
|
|
|
15509
15509
|
isSelected: !0,
|
|
15510
15510
|
trackId: `media-element-track-${Y}`,
|
|
15511
15511
|
children: Me.data.map((Oe, st) => /* @__PURE__ */ k(
|
|
15512
|
-
|
|
15512
|
+
kb,
|
|
15513
15513
|
{
|
|
15514
15514
|
index: st,
|
|
15515
15515
|
data: Oe,
|
|
@@ -15564,13 +15564,13 @@ const Xf = (e) => {
|
|
|
15564
15564
|
color: a.selectionColor
|
|
15565
15565
|
}
|
|
15566
15566
|
),
|
|
15567
|
-
/* @__PURE__ */ k(
|
|
15567
|
+
/* @__PURE__ */ k(yb, { color: a.playheadColor })
|
|
15568
15568
|
] })
|
|
15569
15569
|
}
|
|
15570
15570
|
)
|
|
15571
15571
|
}
|
|
15572
15572
|
) });
|
|
15573
|
-
},
|
|
15573
|
+
}, xb = ({
|
|
15574
15574
|
height: e,
|
|
15575
15575
|
renderAnnotationItem: t,
|
|
15576
15576
|
onAnnotationUpdate: n,
|
|
@@ -15616,7 +15616,7 @@ const Xf = (e) => {
|
|
|
15616
15616
|
const { annotations: c } = zi();
|
|
15617
15617
|
return /* @__PURE__ */ me(zt, { children: [
|
|
15618
15618
|
/* @__PURE__ */ k(
|
|
15619
|
-
|
|
15619
|
+
Cb,
|
|
15620
15620
|
{
|
|
15621
15621
|
getAnnotationBoxLabel: t,
|
|
15622
15622
|
editable: r,
|
|
@@ -15626,7 +15626,7 @@ const Xf = (e) => {
|
|
|
15626
15626
|
}
|
|
15627
15627
|
),
|
|
15628
15628
|
c.length > 0 && /* @__PURE__ */ k(
|
|
15629
|
-
|
|
15629
|
+
xb,
|
|
15630
15630
|
{
|
|
15631
15631
|
height: e,
|
|
15632
15632
|
renderAnnotationItem: n,
|
|
@@ -15638,6 +15638,45 @@ const Xf = (e) => {
|
|
|
15638
15638
|
}
|
|
15639
15639
|
)
|
|
15640
15640
|
] });
|
|
15641
|
+
}, $1 = ({
|
|
15642
|
+
playback: e = !1,
|
|
15643
|
+
clipSplitting: t = !1,
|
|
15644
|
+
annotations: n = !1,
|
|
15645
|
+
additionalShortcuts: r = []
|
|
15646
|
+
}) => {
|
|
15647
|
+
const { tracks: o, samplesPerPixel: a, sampleRate: s, playoutRef: i, duration: l } = vt(), {
|
|
15648
|
+
annotations: c,
|
|
15649
|
+
linkEndpoints: u,
|
|
15650
|
+
activeAnnotationId: f,
|
|
15651
|
+
continuousPlay: p
|
|
15652
|
+
} = gt(), { setAnnotations: d, setActiveAnnotationId: h, scrollContainerRef: g, play: v } = De(), { splitClipAtPlayhead: m } = vy({
|
|
15653
|
+
tracks: o,
|
|
15654
|
+
sampleRate: s,
|
|
15655
|
+
samplesPerPixel: a,
|
|
15656
|
+
engineRef: i
|
|
15657
|
+
}), y = [];
|
|
15658
|
+
return t && y.push({
|
|
15659
|
+
key: "s",
|
|
15660
|
+
action: m,
|
|
15661
|
+
description: "Split clip at playhead",
|
|
15662
|
+
preventDefault: !0
|
|
15663
|
+
}), r.length > 0 && y.push(...r), yy({
|
|
15664
|
+
enabled: e || y.length > 0,
|
|
15665
|
+
...e ? { additionalShortcuts: y } : { shortcuts: y }
|
|
15666
|
+
}), by({
|
|
15667
|
+
annotations: c,
|
|
15668
|
+
activeAnnotationId: f,
|
|
15669
|
+
onAnnotationsChange: d,
|
|
15670
|
+
onActiveAnnotationChange: h,
|
|
15671
|
+
duration: l,
|
|
15672
|
+
linkEndpoints: u,
|
|
15673
|
+
continuousPlay: p,
|
|
15674
|
+
scrollContainerRef: g,
|
|
15675
|
+
samplesPerPixel: a,
|
|
15676
|
+
sampleRate: s,
|
|
15677
|
+
onPlay: v,
|
|
15678
|
+
enabled: n && c.length > 0
|
|
15679
|
+
}), null;
|
|
15641
15680
|
}, qo = class qo extends jn {
|
|
15642
15681
|
apply(t) {
|
|
15643
15682
|
const { transform: n, source: r } = t;
|
|
@@ -15683,13 +15722,13 @@ const Jo = class Jo extends jn {
|
|
|
15683
15722
|
};
|
|
15684
15723
|
Jo.configure = An(Jo);
|
|
15685
15724
|
let Ko = Jo;
|
|
15686
|
-
const
|
|
15687
|
-
},
|
|
15725
|
+
const Eb = () => {
|
|
15726
|
+
}, D1 = ({
|
|
15688
15727
|
snap: e = !1,
|
|
15689
15728
|
touchOptimized: t = !1,
|
|
15690
15729
|
children: n
|
|
15691
15730
|
}) => {
|
|
15692
|
-
const { tracks: r, samplesPerPixel: o, sampleRate: a, playoutRef: s, isDraggingRef: i, onTracksChange: l } =
|
|
15731
|
+
const { tracks: r, samplesPerPixel: o, sampleRate: a, playoutRef: s, isDraggingRef: i, onTracksChange: l } = vt(), { setSelectedTrackId: c } = De(), u = df(), f = e && u != null && u.scaleMode === "beats" && u.snapTo !== "off", p = e && !f;
|
|
15693
15732
|
K(() => {
|
|
15694
15733
|
l == null && console.warn(
|
|
15695
15734
|
"[waveform-playlist] ClipInteractionProvider: onTracksChange is not set on WaveformPlaylistProvider. Drag and trim edits will not be persisted."
|
|
@@ -15713,7 +15752,7 @@ const kb = () => {
|
|
|
15713
15752
|
onDragEnd: m
|
|
15714
15753
|
} = hy({
|
|
15715
15754
|
tracks: r,
|
|
15716
|
-
onTracksChange: l ??
|
|
15755
|
+
onTracksChange: l ?? Eb,
|
|
15717
15756
|
samplesPerPixel: o,
|
|
15718
15757
|
sampleRate: a,
|
|
15719
15758
|
engineRef: s,
|
|
@@ -15744,7 +15783,7 @@ const kb = () => {
|
|
|
15744
15783
|
})
|
|
15745
15784
|
), b.push($s.configure({ tracks: r, samplesPerPixel: o })), b;
|
|
15746
15785
|
}, [f, p, u, r, o, a]);
|
|
15747
|
-
return /* @__PURE__ */ k(
|
|
15786
|
+
return /* @__PURE__ */ k(Ly, { value: !0, children: /* @__PURE__ */ k(
|
|
15748
15787
|
Rf,
|
|
15749
15788
|
{
|
|
15750
15789
|
sensors: h,
|
|
@@ -15763,23 +15802,24 @@ export {
|
|
|
15763
15802
|
y1 as AutomaticScrollCheckbox,
|
|
15764
15803
|
d1 as ClearAllButton,
|
|
15765
15804
|
$s as ClipCollisionModifier,
|
|
15766
|
-
|
|
15805
|
+
D1 as ClipInteractionProvider,
|
|
15767
15806
|
w1 as ContinuousPlayCheckbox,
|
|
15768
15807
|
k1 as DownloadAnnotationsButton,
|
|
15769
15808
|
S1 as EditableCheckbox,
|
|
15770
15809
|
C1 as ExportWavButton,
|
|
15771
15810
|
s1 as FastForwardButton,
|
|
15811
|
+
$1 as KeyboardShortcuts,
|
|
15772
15812
|
_1 as LinkEndpointsCheckbox,
|
|
15773
15813
|
c1 as LoopButton,
|
|
15774
15814
|
p1 as MasterVolumeControl,
|
|
15775
|
-
|
|
15776
|
-
|
|
15815
|
+
xb as MediaElementAnnotationList,
|
|
15816
|
+
Cb as MediaElementPlaylist,
|
|
15777
15817
|
t1 as MediaElementPlaylistProvider,
|
|
15778
15818
|
T1 as MediaElementWaveform,
|
|
15779
15819
|
r1 as PauseButton,
|
|
15780
15820
|
n1 as PlayButton,
|
|
15781
|
-
|
|
15782
|
-
|
|
15821
|
+
Xy as PlaylistAnnotationList,
|
|
15822
|
+
Uy as PlaylistVisualization,
|
|
15783
15823
|
a1 as RewindButton,
|
|
15784
15824
|
v1 as SelectionTimeInputs,
|
|
15785
15825
|
u1 as SetLoopRegionButton,
|
|
@@ -15800,34 +15840,34 @@ export {
|
|
|
15800
15840
|
pa as effectDefinitions,
|
|
15801
15841
|
wf as getEffectDefinition,
|
|
15802
15842
|
Yb as getEffectsByCategory,
|
|
15803
|
-
|
|
15804
|
-
|
|
15805
|
-
|
|
15843
|
+
Xb as getShortcutLabel,
|
|
15844
|
+
Hb as getWaveformDataMetadata,
|
|
15845
|
+
Zb as loadPeaksFromWaveformData,
|
|
15806
15846
|
yf as loadWaveformData,
|
|
15807
15847
|
Xf as noDropAnimationPlugins,
|
|
15808
15848
|
py as useAnnotationDragHandlers,
|
|
15809
15849
|
lr as useAnnotationIntegration,
|
|
15810
|
-
|
|
15811
|
-
|
|
15850
|
+
by as useAnnotationKeyboardControls,
|
|
15851
|
+
Ub as useAudioTracks,
|
|
15812
15852
|
hy as useClipDragHandlers,
|
|
15813
|
-
|
|
15814
|
-
|
|
15853
|
+
By as useClipInteractionEnabled,
|
|
15854
|
+
vy as useClipSplitting,
|
|
15815
15855
|
gy as useDragSensors,
|
|
15816
15856
|
qb as useDynamicEffects,
|
|
15817
15857
|
Qb as useDynamicTracks,
|
|
15818
|
-
|
|
15858
|
+
xy as useExportWav,
|
|
15819
15859
|
Es as useKeyboardShortcuts,
|
|
15820
|
-
|
|
15860
|
+
Gb as useMasterAnalyser,
|
|
15821
15861
|
iy as useMasterVolume,
|
|
15822
15862
|
Ni as useMediaElementAnimation,
|
|
15823
15863
|
Tf as useMediaElementControls,
|
|
15824
15864
|
Zi as useMediaElementData,
|
|
15825
15865
|
zi as useMediaElementState,
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15866
|
+
Et as usePlaybackAnimation,
|
|
15867
|
+
yy as usePlaybackShortcuts,
|
|
15868
|
+
De as usePlaylistControls,
|
|
15869
|
+
vt as usePlaylistData,
|
|
15870
|
+
gt as usePlaylistState,
|
|
15831
15871
|
E1 as useSpectrogramIntegration,
|
|
15832
15872
|
ay as useTimeFormat,
|
|
15833
15873
|
Jb as useTrackDynamicEffects,
|