@shotstack/shotstack-studio 2.14.0 → 2.14.2
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 +19 -0
- package/dist/shotstack-studio.es.js +611 -589
- package/dist/shotstack-studio.umd.js +122 -122
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ import "pixi.js/text-html";
|
|
|
11
11
|
import "pixi.js/sprite-tiling";
|
|
12
12
|
import "pixi.js/filters";
|
|
13
13
|
import "pixi.js/mesh";
|
|
14
|
-
const bA = "2.
|
|
14
|
+
const bA = "2.14.1", vA = {
|
|
15
15
|
version: bA
|
|
16
16
|
};
|
|
17
17
|
function M1(e, t, i) {
|
|
@@ -13112,7 +13112,7 @@ function vr(e, t) {
|
|
|
13112
13112
|
}
|
|
13113
13113
|
var AM = "https://unpkg.com/@resvg/resvg-wasm@2.6.2/index_bg.wasm", TM = new Uint8Array([0, 97, 115, 109]), Kc = null, vy = !1;
|
|
13114
13114
|
async function IM(e) {
|
|
13115
|
-
Kc || (Kc = await Promise.resolve().then(() =>
|
|
13115
|
+
Kc || (Kc = await Promise.resolve().then(() => Ott));
|
|
13116
13116
|
const t = await WebAssembly.compile(e);
|
|
13117
13117
|
try {
|
|
13118
13118
|
await Kc.initWasm(t);
|
|
@@ -13707,7 +13707,7 @@ async function lz(e) {
|
|
|
13707
13707
|
if (Mb() ? t = await sz() : t = await az(e), !t)
|
|
13708
13708
|
throw new Error("Failed to load WASM binary from any source");
|
|
13709
13709
|
Mb() || (oz(t), window.Module = { wasmBinary: t, locateFile: (l) => l });
|
|
13710
|
-
const i = await Promise.resolve().then(() =>
|
|
13710
|
+
const i = await Promise.resolve().then(() => Ltt), n = await (i.default || i)({ wasmBinary: t }), s = await Promise.resolve().then(() => Ztt), o = (s.default || s)(n);
|
|
13711
13711
|
if (!o || typeof o.createBuffer != "function" || typeof o.createFont != "function")
|
|
13712
13712
|
throw new Error("Failed to initialize HarfBuzz: unexpected export shape from 'harfbuzzjs'.");
|
|
13713
13713
|
return Ec = o, Ec;
|
|
@@ -45951,7 +45951,14 @@ function Bq(e, t) {
|
|
|
45951
45951
|
const l = document.createElement("p");
|
|
45952
45952
|
return l.className = "ss-webgl-error-message", l.textContent = r, s.appendChild(a), s.appendChild(o), s.appendChild(l), n.appendChild(s), e.appendChild(n), n;
|
|
45953
45953
|
}
|
|
45954
|
-
|
|
45954
|
+
class Nq extends Error {
|
|
45955
|
+
constructor(t) {
|
|
45956
|
+
super(
|
|
45957
|
+
t === "webgl-error" ? "WebGL initialisation failed. The editor cannot render in this browser." : "WebGL is not available in this browser. Enable hardware acceleration or use a browser that supports WebGL."
|
|
45958
|
+
), this.name = "WebGLUnsupportedError";
|
|
45959
|
+
}
|
|
45960
|
+
}
|
|
45961
|
+
function Mq() {
|
|
45955
45962
|
try {
|
|
45956
45963
|
const e = document.createElement("canvas");
|
|
45957
45964
|
return e.getContext("webgl2") || e.getContext("webgl") ? { supported: !0 } : { supported: !1, reason: "webgl-unavailable" };
|
|
@@ -46002,10 +46009,9 @@ class _n {
|
|
|
46002
46009
|
const t = document.querySelector(_n.CanvasSelector);
|
|
46003
46010
|
if (!t)
|
|
46004
46011
|
throw new Error(`Shotstack canvas root element '${_n.CanvasSelector}' not found.`);
|
|
46005
|
-
|
|
46006
|
-
|
|
46007
|
-
|
|
46008
|
-
}
|
|
46012
|
+
const i = Mq();
|
|
46013
|
+
if (!i.supported)
|
|
46014
|
+
throw Bq(t), new Nq(i.reason);
|
|
46009
46015
|
const r = t.getBoundingClientRect();
|
|
46010
46016
|
this.viewportSize = r.width > 0 && r.height > 0 ? { width: r.width, height: r.height } : { width: this.edit.size.width, height: this.edit.size.height }, this.registerExtensions(), this.container = new K.Container(), this.background = new K.Graphics(), this.background.fillStyle = { color: "#F0F1F5" }, this.background.rect(0, 0, this.viewportSize.width, this.viewportSize.height), this.background.fill(), this.viewportContainer = new K.Container(), this.viewportContainer.sortableChildren = !0, this.editBackground = new K.Graphics(), this.editBackground.fillStyle = { color: this.edit.getTimelineBackground() }, this.editBackground.rect(0, 0, this.edit.size.width, this.edit.size.height), this.editBackground.fill(), this.viewportContainer.addChild(this.editBackground), this.viewportMask = new K.Graphics(), this.viewportMask.rect(0, 0, this.edit.size.width, this.edit.size.height), this.viewportMask.fill(16777215), this.viewportContainer.addChild(this.viewportMask), this.viewportContainer.setMask({ mask: this.viewportMask }), this.alignmentGuides = new Dq(this.viewportContainer, this.edit.size.width, this.edit.size.height), this.subscribeToEditEvents(), await this.configureApplication(), this.configureStage();
|
|
46011
46017
|
const n = this.edit.getTracks();
|
|
@@ -46059,6 +46065,7 @@ class _n {
|
|
|
46059
46065
|
this.currentZoom = Math.min(Math.max(a, this.minZoom), this.maxZoom), this.viewportContainer.scale.x = this.currentZoom, this.viewportContainer.scale.y = this.currentZoom, this.centerEdit();
|
|
46060
46066
|
}
|
|
46061
46067
|
resize() {
|
|
46068
|
+
if (!this.application.renderer) return;
|
|
46062
46069
|
const t = document.querySelector(_n.CanvasSelector);
|
|
46063
46070
|
if (!t) return;
|
|
46064
46071
|
const i = t.getBoundingClientRect();
|
|
@@ -46284,7 +46291,7 @@ class _n {
|
|
|
46284
46291
|
i && i.contains(this.application.canvas) && i.removeChild(this.application.canvas), this.application.ticker.remove(this.onTickBound), this.background?.off("pointerdown", this.onBackgroundClickBound), this.canvasRoot?.removeEventListener("wheel", this.onWheelBound, { capture: !0 }), this.canvasRoot?.removeEventListener("pointerdown", this.onPanPointerDown), document.removeEventListener("pointermove", this.onPanPointerMove), document.removeEventListener("pointerup", this.onPanPointerUp), this.canvasRoot = null, this.alignmentGuides?.dispose(), this.alignmentGuides = null, this.editBackground?.destroy(), this.viewportMask?.destroy(), this.viewportContainer?.destroy(), this.background?.destroy(), this.overlayContainer.destroy(), this.container?.destroy(), this.uiController = null, this.application.destroy(!0, { children: !0, texture: !0 });
|
|
46285
46292
|
}
|
|
46286
46293
|
}
|
|
46287
|
-
class
|
|
46294
|
+
class set {
|
|
46288
46295
|
edit;
|
|
46289
46296
|
seekDistance = 0.05;
|
|
46290
46297
|
// 50ms in seconds
|
|
@@ -46466,7 +46473,7 @@ class net {
|
|
|
46466
46473
|
}
|
|
46467
46474
|
};
|
|
46468
46475
|
}
|
|
46469
|
-
class
|
|
46476
|
+
class zq {
|
|
46470
46477
|
name = "export";
|
|
46471
46478
|
clips = [];
|
|
46472
46479
|
tracks = [];
|
|
@@ -46544,7 +46551,7 @@ const jy = (e) => {
|
|
|
46544
46551
|
// SMPTE 170M
|
|
46545
46552
|
"bt2020-ncl": 9
|
|
46546
46553
|
// ITU-R BT.2020-2 (non-constant luminance)
|
|
46547
|
-
}, O5 = /* @__PURE__ */ Wy(il),
|
|
46554
|
+
}, O5 = /* @__PURE__ */ Wy(il), Oq = (e) => !!e && !!e.primaries && !!e.transfer && !!e.matrix && e.fullRange !== void 0, gh = (e) => e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer || ArrayBuffer.isView(e);
|
|
46548
46555
|
class R5 {
|
|
46549
46556
|
constructor() {
|
|
46550
46557
|
this.currentPromise = Promise.resolve(), this.pending = 0;
|
|
@@ -46560,7 +46567,7 @@ class R5 {
|
|
|
46560
46567
|
return this.currentPromise = i, this.pending++, await r, t;
|
|
46561
46568
|
}
|
|
46562
46569
|
}
|
|
46563
|
-
const
|
|
46570
|
+
const Rq = /^[0-9a-fA-F]+$/, vu = (e) => [...e].map((t) => t.toString(16).padStart(2, "0")).join(""), Vq = (e) => {
|
|
46564
46571
|
N(e.length % 2 === 0);
|
|
46565
46572
|
const t = new Uint8Array(e.length / 2);
|
|
46566
46573
|
for (let i = 0; i < e.length; i += 2)
|
|
@@ -46596,9 +46603,9 @@ const Oq = /^[0-9a-fA-F]+$/, vu = (e) => [...e].map((t) => t.toString(16).padSta
|
|
|
46596
46603
|
if (t(e[i]))
|
|
46597
46604
|
return i;
|
|
46598
46605
|
return -1;
|
|
46599
|
-
},
|
|
46606
|
+
}, Lq = async function* (e) {
|
|
46600
46607
|
Symbol.iterator in e ? yield* e[Symbol.iterator]() : yield* e[Symbol.asyncIterator]();
|
|
46601
|
-
},
|
|
46608
|
+
}, $q = (e) => {
|
|
46602
46609
|
if (!(Symbol.iterator in e) && !(Symbol.asyncIterator in e))
|
|
46603
46610
|
throw new TypeError("Argument must be an iterable or async iterable.");
|
|
46604
46611
|
}, Ha = (e) => {
|
|
@@ -46608,7 +46615,7 @@ const Oq = /^[0-9a-fA-F]+$/, vu = (e) => [...e].map((t) => t.toString(16).padSta
|
|
|
46608
46615
|
return r << 16 | n << 8 | s;
|
|
46609
46616
|
}, Hy = (e, t, i, r) => {
|
|
46610
46617
|
i = i >>> 0, i = i & 16777215, r ? (e.setUint8(t, i & 255), e.setUint8(t + 1, i >>> 8 & 255), e.setUint8(t + 2, i >>> 16 & 255)) : (e.setUint8(t, i >>> 16 & 255), e.setUint8(t + 1, i >>> 8 & 255), e.setUint8(t + 2, i & 255));
|
|
46611
|
-
},
|
|
46618
|
+
}, Uq = (e, t, i, r) => {
|
|
46612
46619
|
i = mi(i, -8388608, 8388607), i < 0 && (i = i + 16777216 & 16777215), Hy(e, t, i, r);
|
|
46613
46620
|
}, Cw = (e, t) => ({
|
|
46614
46621
|
async next() {
|
|
@@ -46627,7 +46634,7 @@ const Oq = /^[0-9a-fA-F]+$/, vu = (e) => [...e].map((t) => t.toString(16).padSta
|
|
|
46627
46634
|
}), mi = (e, t, i) => Math.max(t, Math.min(i, e)), wu = "und", U5 = (e) => {
|
|
46628
46635
|
const t = Math.round(e);
|
|
46629
46636
|
return Math.abs(e / t - 1) < 10 * Number.EPSILON ? t : e;
|
|
46630
|
-
}, jp = (e, t) => Math.round(e / t) * t, Wp = (e, t) => Math.round(e * t) / t, kw = (e, t) => Math.floor(e * t) / t,
|
|
46637
|
+
}, jp = (e, t) => Math.round(e / t) * t, Wp = (e, t) => Math.round(e * t) / t, kw = (e, t) => Math.floor(e * t) / t, Zq = /^[a-z]{3}$/, Gy = (e) => Zq.test(e), Os = 1e6 * (1 + Number.EPSILON), jq = (e, t) => {
|
|
46631
46638
|
const i = { ...e, ...t };
|
|
46632
46639
|
if (e.headers || t.headers) {
|
|
46633
46640
|
const r = e.headers ? Hp(e.headers) : {}, n = t.headers ? Hp(t.headers) : {}, s = { ...r };
|
|
@@ -46651,7 +46658,7 @@ const Oq = /^[0-9a-fA-F]+$/, vu = (e) => [...e].map((t) => t.toString(16).padSta
|
|
|
46651
46658
|
}), t;
|
|
46652
46659
|
}
|
|
46653
46660
|
return e;
|
|
46654
|
-
},
|
|
46661
|
+
}, Wq = async (e, t, i, r, n) => {
|
|
46655
46662
|
let s = 0;
|
|
46656
46663
|
for (; ; )
|
|
46657
46664
|
try {
|
|
@@ -46668,7 +46675,7 @@ const Oq = /^[0-9a-fA-F]+$/, vu = (e) => [...e].map((t) => t.toString(16).padSta
|
|
|
46668
46675
|
if (o > 0 && await Xy(1e3 * o), n())
|
|
46669
46676
|
throw a;
|
|
46670
46677
|
}
|
|
46671
|
-
},
|
|
46678
|
+
}, Hq = (e, t) => {
|
|
46672
46679
|
const i = e < 0 ? -1 : 1;
|
|
46673
46680
|
e = Math.abs(e);
|
|
46674
46681
|
let r = 0, n = 1, s = 1, a = 0, o = e;
|
|
@@ -46703,7 +46710,7 @@ const Gp = () => k0 !== null ? k0 : k0 = typeof navigator < "u" && navigator.use
|
|
|
46703
46710
|
let _0 = null;
|
|
46704
46711
|
const qp = () => _0 !== null ? _0 : _0 = !!(typeof navigator < "u" && (navigator.vendor?.includes("Google Inc") || /Chrome/.test(navigator.userAgent)));
|
|
46705
46712
|
let S0 = null;
|
|
46706
|
-
const
|
|
46713
|
+
const Gq = () => {
|
|
46707
46714
|
if (S0 !== null)
|
|
46708
46715
|
return S0;
|
|
46709
46716
|
if (typeof navigator > "u")
|
|
@@ -46715,7 +46722,7 @@ const Hq = () => {
|
|
|
46715
46722
|
const i = e[t];
|
|
46716
46723
|
i !== void 0 && (yield { key: t, value: i });
|
|
46717
46724
|
}
|
|
46718
|
-
},
|
|
46725
|
+
}, qq = (e, t) => {
|
|
46719
46726
|
if (e.length !== t.length)
|
|
46720
46727
|
return !1;
|
|
46721
46728
|
for (let i = 0; i < e.length; i++)
|
|
@@ -46724,7 +46731,7 @@ const Hq = () => {
|
|
|
46724
46731
|
return !0;
|
|
46725
46732
|
}, Yy = () => {
|
|
46726
46733
|
Symbol.dispose ??= Symbol("Symbol.dispose");
|
|
46727
|
-
}, j5 = (e) => typeof e == "number" && !Number.isNaN(e),
|
|
46734
|
+
}, j5 = (e) => typeof e == "number" && !Number.isNaN(e), Yq = (e, t) => {
|
|
46728
46735
|
let i = 0;
|
|
46729
46736
|
for (let r = 0; r < e.length; r++)
|
|
46730
46737
|
t(e[r]) && i++;
|
|
@@ -46786,7 +46793,7 @@ class oc {
|
|
|
46786
46793
|
}
|
|
46787
46794
|
}
|
|
46788
46795
|
}
|
|
46789
|
-
const
|
|
46796
|
+
const Xq = (e) => e !== null && typeof e == "object" && Object.getPrototypeOf(e) === Object.prototype && Object.values(e).every((t) => typeof t == "string");
|
|
46790
46797
|
/*!
|
|
46791
46798
|
* Copyright (c) 2026-present, Vanilagy and contributors
|
|
46792
46799
|
*
|
|
@@ -46862,7 +46869,7 @@ class H5 {
|
|
|
46862
46869
|
throw new TypeError("description, when provided, must be a string.");
|
|
46863
46870
|
}
|
|
46864
46871
|
}
|
|
46865
|
-
const
|
|
46872
|
+
const Kq = (e) => {
|
|
46866
46873
|
if (!e || typeof e != "object")
|
|
46867
46874
|
throw new TypeError("tags must be an object.");
|
|
46868
46875
|
if (e.title !== void 0 && typeof e.title != "string")
|
|
@@ -46909,7 +46916,7 @@ const Xq = (e) => {
|
|
|
46909
46916
|
if (!e.raw || typeof e.raw != "object")
|
|
46910
46917
|
throw new TypeError("tags.raw, when provided, must be an object.");
|
|
46911
46918
|
for (const t of Object.values(e.raw))
|
|
46912
|
-
if (t !== null && typeof t != "string" && !(t instanceof Uint8Array) && !(t instanceof To) && !(t instanceof H5) && !
|
|
46919
|
+
if (t !== null && typeof t != "string" && !(t instanceof Uint8Array) && !(t instanceof To) && !(t instanceof H5) && !Xq(t))
|
|
46913
46920
|
throw new TypeError("Each value in tags.raw must be a string, Uint8Array, RichImageData, AttachedFile, Record<string, string>, or null.");
|
|
46914
46921
|
}
|
|
46915
46922
|
}, G5 = {
|
|
@@ -46920,7 +46927,7 @@ const Xq = (e) => {
|
|
|
46920
46927
|
commentary: !1,
|
|
46921
46928
|
hearingImpaired: !1,
|
|
46922
46929
|
visuallyImpaired: !1
|
|
46923
|
-
},
|
|
46930
|
+
}, Jq = (e) => {
|
|
46924
46931
|
if (!e || typeof e != "object")
|
|
46925
46932
|
throw new TypeError("disposition must be an object.");
|
|
46926
46933
|
if (e.default !== void 0 && typeof e.default != "boolean")
|
|
@@ -47257,7 +47264,7 @@ const qs = [
|
|
|
47257
47264
|
// ProRes 422 LT
|
|
47258
47265
|
"apco"
|
|
47259
47266
|
// ProRes 422 Proxy
|
|
47260
|
-
],
|
|
47267
|
+
], Qq = [
|
|
47261
47268
|
{ fourCc: "apco", bitrate: 45e6, alpha: !1 },
|
|
47262
47269
|
// 422 Proxy
|
|
47263
47270
|
{ fourCc: "apcs", bitrate: 102e6, alpha: !1 },
|
|
@@ -47270,7 +47277,7 @@ const qs = [
|
|
|
47270
47277
|
// 4444
|
|
47271
47278
|
{ fourCc: "ap4x", bitrate: 5e8, alpha: !0 }
|
|
47272
47279
|
// 4444 XQ
|
|
47273
|
-
],
|
|
47280
|
+
], tY = (e, t, i, r, n) => {
|
|
47274
47281
|
if (e === "avc") {
|
|
47275
47282
|
const a = Math.ceil(t / 16) * Math.ceil(i / 16), o = qf.find((d) => a <= d.maxMacroblocks && r <= d.maxBitrate) ?? yi(qf), l = o ? o.level : 0, u = "64".padStart(2, "0"), c = "00", f = l.toString(16).padStart(2, "0");
|
|
47276
47283
|
return `avc1.${u}${c}${f}`;
|
|
@@ -47287,7 +47294,7 @@ const qs = [
|
|
|
47287
47294
|
const a = t * i, o = Aw.find((c) => a <= c.maxPictureSize && r <= c.maxBitrate) ?? yi(Aw);
|
|
47288
47295
|
return `av01.0.${o.level.toString().padStart(2, "0")}${o.tier}.08`;
|
|
47289
47296
|
} else if (e === "prores") {
|
|
47290
|
-
const a = Math.pow(t * i / 2073600, 0.95), o =
|
|
47297
|
+
const a = Math.pow(t * i / 2073600, 0.95), o = Qq.filter((c) => c.alpha === n);
|
|
47291
47298
|
let l = o[0].fourCc, u = 1 / 0;
|
|
47292
47299
|
for (const { fourCc: c, bitrate: f } of o) {
|
|
47293
47300
|
const d = Math.abs(f * a - r);
|
|
@@ -47298,7 +47305,7 @@ const qs = [
|
|
|
47298
47305
|
Ha(e);
|
|
47299
47306
|
}
|
|
47300
47307
|
throw new TypeError(`Unhandled codec '${String(e)}'.`);
|
|
47301
|
-
},
|
|
47308
|
+
}, eY = (e) => {
|
|
47302
47309
|
const t = e.split("."), n = (1 << 7) + 1, s = Number(t[1]), a = t[2], o = Number(a.slice(0, -1)), l = (s << 5) + o, u = a.slice(-1) === "H" ? 1 : 0, f = Number(t[3]) === 8 ? 0 : 1, d = 0, h = t[4] ? Number(t[4]) : 0, m = t[5] ? Number(t[5][0]) : 1, v = t[5] ? Number(t[5][1]) : 1, g = t[5] ? Number(t[5][2]) : 0, w = (u << 7) + (f << 6) + (d << 5) + (h << 4) + (m << 3) + (v << 2) + g;
|
|
47303
47310
|
return [n, l, w, 0];
|
|
47304
47311
|
}, Y5 = (e) => {
|
|
@@ -47369,7 +47376,7 @@ const qs = [
|
|
|
47369
47376
|
}
|
|
47370
47377
|
}
|
|
47371
47378
|
throw new TypeError(`Unhandled codec '${t}'.`);
|
|
47372
|
-
},
|
|
47379
|
+
}, iY = (e, t, i) => {
|
|
47373
47380
|
if (e === "aac")
|
|
47374
47381
|
return t >= 2 && i <= 24e3 ? "mp4a.40.29" : i <= 24e3 ? "mp4a.40.5" : "mp4a.40.2";
|
|
47375
47382
|
if (e === "mp3")
|
|
@@ -47426,7 +47433,7 @@ const qs = [
|
|
|
47426
47433
|
t[1] === "u" ? i = "unsigned" : t[1] === "s" ? i = "signed" : i = "float";
|
|
47427
47434
|
const r = Number(t[2]) / 8, n = t[3] !== "be", s = e === "pcm-u8" ? 2 ** 7 : 0;
|
|
47428
47435
|
return { dataType: i, sampleSize: r, littleEndian: n, silentValue: s };
|
|
47429
|
-
}, Q5 = (e) => e.startsWith("avc1") || e.startsWith("avc3") ? "avc" : e.startsWith("hev1") || e.startsWith("hvc1") ? "hevc" : e === "vp8" ? "vp8" : e.startsWith("vp09") ? "vp9" : e.startsWith("av01") ? "av1" : Fa.includes(e) ? "prores" : e === "mp3" || e === "mp4a.69" || e === "mp4a.6B" || e === "mp4a.6b" || e === "mp4a.40.34" ? "mp3" : e.startsWith("mp4a.40.") || e === "mp4a.67" ? "aac" : e === "opus" ? "opus" : e === "vorbis" ? "vorbis" : e === "flac" ? "flac" : e === "ac-3" || e === "ac3" ? "ac3" : e === "ec-3" || e === "eac3" ? "eac3" : e === "ulaw" ? "ulaw" : e === "alaw" ? "alaw" : J5.test(e) ? e : e === "webvtt" ? "webvtt" : null,
|
|
47436
|
+
}, Q5 = (e) => e.startsWith("avc1") || e.startsWith("avc3") ? "avc" : e.startsWith("hev1") || e.startsWith("hvc1") ? "hevc" : e === "vp8" ? "vp8" : e.startsWith("vp09") ? "vp9" : e.startsWith("av01") ? "av1" : Fa.includes(e) ? "prores" : e === "mp3" || e === "mp4a.69" || e === "mp4a.6B" || e === "mp4a.6b" || e === "mp4a.40.34" ? "mp3" : e.startsWith("mp4a.40.") || e === "mp4a.67" ? "aac" : e === "opus" ? "opus" : e === "vorbis" ? "vorbis" : e === "flac" ? "flac" : e === "ac-3" || e === "ac3" ? "ac3" : e === "ec-3" || e === "eac3" ? "eac3" : e === "ulaw" ? "ulaw" : e === "alaw" ? "alaw" : J5.test(e) ? e : e === "webvtt" ? "webvtt" : null, rY = (e) => e === "avc" ? {
|
|
47430
47437
|
avc: {
|
|
47431
47438
|
format: "avc"
|
|
47432
47439
|
// Ensure the format is not Annex B
|
|
@@ -47436,7 +47443,7 @@ const qs = [
|
|
|
47436
47443
|
format: "hevc"
|
|
47437
47444
|
// Ensure the format is not Annex B
|
|
47438
47445
|
}
|
|
47439
|
-
} : {},
|
|
47446
|
+
} : {}, nY = (e) => e === "aac" ? {
|
|
47440
47447
|
aac: {
|
|
47441
47448
|
format: "aac"
|
|
47442
47449
|
// Ensure the format is not ADTS
|
|
@@ -47445,7 +47452,7 @@ const qs = [
|
|
|
47445
47452
|
opus: {
|
|
47446
47453
|
format: "opus"
|
|
47447
47454
|
}
|
|
47448
|
-
} : {},
|
|
47455
|
+
} : {}, sY = ["avc1", "avc3", "hev1", "hvc1", "vp8", "vp09", "av01", ...Fa], aY = /^(avc1|avc3)\.[0-9a-fA-F]{6}$/, oY = /^(hev1|hvc1)\.(?:[ABC]?\d+)\.[0-9a-fA-F]{1,8}\.[LH]\d+(?:\.[0-9a-fA-F]{1,2}){0,6}$/, lY = /^vp09(?:\.\d{2}){3}(?:(?:\.\d{2}){5})?$/, uY = /^av01\.\d\.\d{2}[MH]\.\d{2}(?:\.\d\.\d{3}\.\d{2}\.\d{2}\.\d{2}\.\d)?$/, cY = (e) => {
|
|
47449
47456
|
if (!e)
|
|
47450
47457
|
throw new TypeError("Video chunk metadata must be provided.");
|
|
47451
47458
|
if (typeof e != "object")
|
|
@@ -47456,7 +47463,7 @@ const qs = [
|
|
|
47456
47463
|
throw new TypeError("Video chunk metadata decoder configuration must be an object.");
|
|
47457
47464
|
if (typeof e.decoderConfig.codec != "string")
|
|
47458
47465
|
throw new TypeError("Video chunk metadata decoder configuration must specify a codec string.");
|
|
47459
|
-
if (!
|
|
47466
|
+
if (!sY.some((t) => e.decoderConfig.codec.startsWith(t)))
|
|
47460
47467
|
throw new TypeError("Video chunk metadata decoder configuration codec string must be a valid video codec string as specified in the Mediabunny Codec Registry.");
|
|
47461
47468
|
if (!Number.isInteger(e.decoderConfig.codedWidth) || e.decoderConfig.codedWidth <= 0)
|
|
47462
47469
|
throw new TypeError("Video chunk metadata decoder configuration must specify a valid codedWidth (positive integer).");
|
|
@@ -47487,23 +47494,23 @@ const qs = [
|
|
|
47487
47494
|
throw new TypeError("Video chunk metadata decoder configuration colorSpace fullRange, when defined, must be a boolean.");
|
|
47488
47495
|
}
|
|
47489
47496
|
if (e.decoderConfig.codec.startsWith("avc1") || e.decoderConfig.codec.startsWith("avc3")) {
|
|
47490
|
-
if (!
|
|
47497
|
+
if (!aY.test(e.decoderConfig.codec))
|
|
47491
47498
|
throw new TypeError("Video chunk metadata decoder configuration codec string for AVC must be a valid AVC codec string as specified in Section 3.4 of RFC 6381.");
|
|
47492
47499
|
} else if (e.decoderConfig.codec.startsWith("hev1") || e.decoderConfig.codec.startsWith("hvc1")) {
|
|
47493
|
-
if (!
|
|
47500
|
+
if (!oY.test(e.decoderConfig.codec))
|
|
47494
47501
|
throw new TypeError("Video chunk metadata decoder configuration codec string for HEVC must be a valid HEVC codec string as specified in Section E.3 of ISO 14496-15.");
|
|
47495
47502
|
} else if (e.decoderConfig.codec.startsWith("vp8")) {
|
|
47496
47503
|
if (e.decoderConfig.codec !== "vp8")
|
|
47497
47504
|
throw new TypeError('Video chunk metadata decoder configuration codec string for VP8 must be "vp8".');
|
|
47498
47505
|
} else if (e.decoderConfig.codec.startsWith("vp09")) {
|
|
47499
|
-
if (!
|
|
47506
|
+
if (!lY.test(e.decoderConfig.codec))
|
|
47500
47507
|
throw new TypeError('Video chunk metadata decoder configuration codec string for VP9 must be a valid VP9 codec string as specified in Section "Codecs Parameter String" of https://www.webmproject.org/vp9/mp4/.');
|
|
47501
47508
|
} else if (e.decoderConfig.codec.startsWith("av01")) {
|
|
47502
|
-
if (!
|
|
47509
|
+
if (!uY.test(e.decoderConfig.codec))
|
|
47503
47510
|
throw new TypeError('Video chunk metadata decoder configuration codec string for AV1 must be a valid AV1 codec string as specified in Section "Codecs Parameter String" of https://aomediacodec.github.io/av1-isobmff/.');
|
|
47504
47511
|
} else if (Fa.some((t) => e.decoderConfig.codec.startsWith(t)) && !Fa.some((t) => e.decoderConfig.codec === t))
|
|
47505
47512
|
throw new TypeError(`Video chunk metadata decoder configuration codec string for ProRes must be one of the valid ProRes four-character codes: ${Fa.join(", ")}.`);
|
|
47506
|
-
},
|
|
47513
|
+
}, fY = [
|
|
47507
47514
|
"mp4a",
|
|
47508
47515
|
"mp3",
|
|
47509
47516
|
"opus",
|
|
@@ -47514,7 +47521,7 @@ const qs = [
|
|
|
47514
47521
|
"pcm",
|
|
47515
47522
|
"ac-3",
|
|
47516
47523
|
"ec-3"
|
|
47517
|
-
],
|
|
47524
|
+
], dY = (e) => {
|
|
47518
47525
|
if (!e)
|
|
47519
47526
|
throw new TypeError("Audio chunk metadata must be provided.");
|
|
47520
47527
|
if (typeof e != "object")
|
|
@@ -47525,7 +47532,7 @@ const qs = [
|
|
|
47525
47532
|
throw new TypeError("Audio chunk metadata decoder configuration must be an object.");
|
|
47526
47533
|
if (typeof e.decoderConfig.codec != "string")
|
|
47527
47534
|
throw new TypeError("Audio chunk metadata decoder configuration must specify a codec string.");
|
|
47528
|
-
if (!
|
|
47535
|
+
if (!fY.some((t) => e.decoderConfig.codec.startsWith(t)))
|
|
47529
47536
|
throw new TypeError("Audio chunk metadata decoder configuration codec string must be a valid audio codec string as specified in the Mediabunny Codec Registry.");
|
|
47530
47537
|
if (!Number.isInteger(e.decoderConfig.sampleRate) || e.decoderConfig.sampleRate <= 0)
|
|
47531
47538
|
throw new TypeError("Audio chunk metadata decoder configuration must specify a valid sampleRate (positive integer).");
|
|
@@ -47562,7 +47569,7 @@ const qs = [
|
|
|
47562
47569
|
throw new TypeError('Audio chunk metadata decoder configuration codec string for EC-3 must be "ec-3".');
|
|
47563
47570
|
} else if ((e.decoderConfig.codec.startsWith("pcm") || e.decoderConfig.codec.startsWith("ulaw") || e.decoderConfig.codec.startsWith("alaw")) && !$r.includes(e.decoderConfig.codec))
|
|
47564
47571
|
throw new TypeError(`Audio chunk metadata decoder configuration codec string for PCM must be one of the supported PCM codecs (${$r.join(", ")}).`);
|
|
47565
|
-
},
|
|
47572
|
+
}, hY = (e) => {
|
|
47566
47573
|
if (!e)
|
|
47567
47574
|
throw new TypeError("Subtitle metadata must be provided.");
|
|
47568
47575
|
if (typeof e != "object")
|
|
@@ -47667,7 +47674,7 @@ const lc = function* (e) {
|
|
|
47667
47674
|
n += t, r.set(s, n), n += s.byteLength;
|
|
47668
47675
|
}
|
|
47669
47676
|
return r;
|
|
47670
|
-
},
|
|
47677
|
+
}, pY = (e, t) => {
|
|
47671
47678
|
if (t.description) {
|
|
47672
47679
|
const n = (Ki(t.description)[4] & 3) + 1;
|
|
47673
47680
|
return i1(e, n);
|
|
@@ -47702,7 +47709,7 @@ const lc = function* (e) {
|
|
|
47702
47709
|
} catch (t) {
|
|
47703
47710
|
return Qt._error("Error building AVC Decoder Configuration Record:", t), null;
|
|
47704
47711
|
}
|
|
47705
|
-
},
|
|
47712
|
+
}, mY = (e) => {
|
|
47706
47713
|
const t = [];
|
|
47707
47714
|
t.push(e.configurationVersion), t.push(e.avcProfileIndication), t.push(e.profileCompatibility), t.push(e.avcLevelIndication), t.push(252 | e.lengthSizeMinusOne & 3), t.push(224 | e.sequenceParameterSets.length & 31);
|
|
47708
47715
|
for (const i of e.sequenceParameterSets) {
|
|
@@ -47728,7 +47735,7 @@ const lc = function* (e) {
|
|
|
47728
47735
|
}
|
|
47729
47736
|
}
|
|
47730
47737
|
return new Uint8Array(t);
|
|
47731
|
-
},
|
|
47738
|
+
}, gY = (e) => {
|
|
47732
47739
|
try {
|
|
47733
47740
|
const t = ui(e);
|
|
47734
47741
|
let i = 0;
|
|
@@ -47892,7 +47899,7 @@ const lc = function* (e) {
|
|
|
47892
47899
|
for (let i = 0; i <= t; i++)
|
|
47893
47900
|
gt(e), gt(e), e.skipBits(1);
|
|
47894
47901
|
e.skipBits(5), e.skipBits(5), e.skipBits(5), e.skipBits(5);
|
|
47895
|
-
},
|
|
47902
|
+
}, yY = (e, t) => {
|
|
47896
47903
|
if (t.description) {
|
|
47897
47904
|
const n = (Ki(t.description)[21] & 3) + 1;
|
|
47898
47905
|
return i1(e, n);
|
|
@@ -47904,11 +47911,11 @@ const lc = function* (e) {
|
|
|
47904
47911
|
return eE(e, n);
|
|
47905
47912
|
} else
|
|
47906
47913
|
return lc(e);
|
|
47907
|
-
}, Cu = (e) => e >> 1 & 63,
|
|
47914
|
+
}, Cu = (e) => e >> 1 & 63, bY = (e) => {
|
|
47908
47915
|
try {
|
|
47909
47916
|
const t = new ai(yh(e));
|
|
47910
47917
|
t.skipBits(16), t.readBits(4);
|
|
47911
|
-
const i = t.readBits(3), r = t.readBits(1), { general_profile_space: n, general_tier_flag: s, general_profile_idc: a, general_profile_compatibility_flags: o, general_constraint_indicator_flags: l, general_level_idc: u } =
|
|
47918
|
+
const i = t.readBits(3), r = t.readBits(1), { general_profile_space: n, general_tier_flag: s, general_profile_idc: a, general_profile_compatibility_flags: o, general_constraint_indicator_flags: l, general_level_idc: u } = vY(t, i);
|
|
47912
47919
|
gt(t);
|
|
47913
47920
|
const c = gt(t);
|
|
47914
47921
|
let f = 0;
|
|
@@ -47927,9 +47934,9 @@ const lc = function* (e) {
|
|
|
47927
47934
|
let _ = 0;
|
|
47928
47935
|
for (let M = x; M <= i; M++)
|
|
47929
47936
|
gt(t), _ = gt(t), gt(t);
|
|
47930
|
-
gt(t), gt(t), gt(t), gt(t), gt(t), gt(t), t.readBits(1) && t.readBits(1) &&
|
|
47937
|
+
gt(t), gt(t), gt(t), gt(t), gt(t), gt(t), t.readBits(1) && t.readBits(1) && wY(t), t.skipBits(1), t.skipBits(1), t.readBits(1) && (t.skipBits(4), t.skipBits(4), gt(t), gt(t), t.skipBits(1));
|
|
47931
47938
|
const S = gt(t);
|
|
47932
|
-
if (
|
|
47939
|
+
if (xY(t, S), t.readBits(1)) {
|
|
47933
47940
|
const M = gt(t);
|
|
47934
47941
|
for (let rt = 0; rt < M; rt++)
|
|
47935
47942
|
gt(t), t.skipBits(1);
|
|
@@ -47937,7 +47944,7 @@ const lc = function* (e) {
|
|
|
47937
47944
|
t.skipBits(1), t.skipBits(1);
|
|
47938
47945
|
let k = 2, z = 2, T = 2, B = 0, D = 0, $ = { num: 1, den: 1 };
|
|
47939
47946
|
if (t.readBits(1)) {
|
|
47940
|
-
const M =
|
|
47947
|
+
const M = kY(t, i);
|
|
47941
47948
|
$ = M.pixelAspectRatio, k = M.colourPrimaries, z = M.transferCharacteristics, T = M.matrixCoefficients, B = M.fullRangeFlag, D = M.minSpatialSegmentationIdc;
|
|
47942
47949
|
}
|
|
47943
47950
|
return {
|
|
@@ -47974,7 +47981,7 @@ const lc = function* (e) {
|
|
|
47974
47981
|
}
|
|
47975
47982
|
if (i.length === 0 || r.length === 0)
|
|
47976
47983
|
return null;
|
|
47977
|
-
const s =
|
|
47984
|
+
const s = bY(i[0]);
|
|
47978
47985
|
if (!s)
|
|
47979
47986
|
return null;
|
|
47980
47987
|
let a = 0;
|
|
@@ -48037,7 +48044,7 @@ const lc = function* (e) {
|
|
|
48037
48044
|
} catch (t) {
|
|
48038
48045
|
return Qt._error("Error building HEVC Decoder Configuration Record:", t), null;
|
|
48039
48046
|
}
|
|
48040
|
-
},
|
|
48047
|
+
}, vY = (e, t) => {
|
|
48041
48048
|
const i = e.readBits(2), r = e.readBits(1), n = e.readBits(5);
|
|
48042
48049
|
let s = 0;
|
|
48043
48050
|
for (let c = 0; c < 32; c++)
|
|
@@ -48061,7 +48068,7 @@ const lc = function* (e) {
|
|
|
48061
48068
|
general_constraint_indicator_flags: a,
|
|
48062
48069
|
general_level_idc: o
|
|
48063
48070
|
};
|
|
48064
|
-
},
|
|
48071
|
+
}, wY = (e) => {
|
|
48065
48072
|
for (let t = 0; t < 4; t++)
|
|
48066
48073
|
for (let i = 0; i < (t === 3 ? 2 : 6); i++)
|
|
48067
48074
|
if (!e.readBits(1))
|
|
@@ -48072,11 +48079,11 @@ const lc = function* (e) {
|
|
|
48072
48079
|
for (let s = 0; s < n; s++)
|
|
48073
48080
|
as(e);
|
|
48074
48081
|
}
|
|
48075
|
-
},
|
|
48082
|
+
}, xY = (e, t) => {
|
|
48076
48083
|
const i = [];
|
|
48077
48084
|
for (let r = 0; r < t; r++)
|
|
48078
|
-
i[r] =
|
|
48079
|
-
},
|
|
48085
|
+
i[r] = CY(e, r, t, i);
|
|
48086
|
+
}, CY = (e, t, i, r) => {
|
|
48080
48087
|
let n = 0, s = 0, a = 0;
|
|
48081
48088
|
if (t !== 0 && (s = e.readBits(1)), s) {
|
|
48082
48089
|
if (t === i) {
|
|
@@ -48098,7 +48105,7 @@ const lc = function* (e) {
|
|
|
48098
48105
|
n = o + l;
|
|
48099
48106
|
}
|
|
48100
48107
|
return n;
|
|
48101
|
-
},
|
|
48108
|
+
}, kY = (e, t) => {
|
|
48102
48109
|
let i = 2, r = 2, n = 2, s = 0, a = 0, o = { num: 1, den: 1 };
|
|
48103
48110
|
if (e.readBits(1)) {
|
|
48104
48111
|
const l = e.readBits(8);
|
|
@@ -48112,7 +48119,7 @@ const lc = function* (e) {
|
|
|
48112
48119
|
u && (o = u);
|
|
48113
48120
|
}
|
|
48114
48121
|
}
|
|
48115
|
-
return e.readBits(1) && e.readBits(1), e.readBits(1) && (e.readBits(3), s = e.readBits(1), e.readBits(1) && (i = e.readBits(8), r = e.readBits(8), n = e.readBits(8))), e.readBits(1) && (gt(e), gt(e)), e.readBits(1), e.readBits(1), e.readBits(1), e.readBits(1) && (gt(e), gt(e), gt(e), gt(e)), e.readBits(1) && (e.readBits(32), e.readBits(32), e.readBits(1) && gt(e), e.readBits(1) &&
|
|
48122
|
+
return e.readBits(1) && e.readBits(1), e.readBits(1) && (e.readBits(3), s = e.readBits(1), e.readBits(1) && (i = e.readBits(8), r = e.readBits(8), n = e.readBits(8))), e.readBits(1) && (gt(e), gt(e)), e.readBits(1), e.readBits(1), e.readBits(1), e.readBits(1) && (gt(e), gt(e), gt(e), gt(e)), e.readBits(1) && (e.readBits(32), e.readBits(32), e.readBits(1) && gt(e), e.readBits(1) && _Y(e, !0, t)), e.readBits(1) && (e.readBits(1), e.readBits(1), e.readBits(1), a = gt(e), gt(e), gt(e), gt(e), gt(e)), {
|
|
48116
48123
|
pixelAspectRatio: o,
|
|
48117
48124
|
colourPrimaries: i,
|
|
48118
48125
|
transferCharacteristics: r,
|
|
@@ -48120,7 +48127,7 @@ const lc = function* (e) {
|
|
|
48120
48127
|
fullRangeFlag: s,
|
|
48121
48128
|
minSpatialSegmentationIdc: a
|
|
48122
48129
|
};
|
|
48123
|
-
},
|
|
48130
|
+
}, _Y = (e, t, i) => {
|
|
48124
48131
|
let r = !1, n = !1, s = !1;
|
|
48125
48132
|
r = e.readBits(1) === 1, n = e.readBits(1) === 1, (r || n) && (s = e.readBits(1) === 1, s && (e.readBits(8), e.readBits(5), e.readBits(1), e.readBits(5)), e.readBits(4), e.readBits(4), s && e.readBits(4), e.readBits(5), e.readBits(5), e.readBits(5));
|
|
48126
48133
|
for (let a = 0; a <= i; a++) {
|
|
@@ -48135,7 +48142,7 @@ const lc = function* (e) {
|
|
|
48135
48142
|
}, Pw = (e, t, i) => {
|
|
48136
48143
|
for (let r = 0; r < t; r++)
|
|
48137
48144
|
gt(e), gt(e), i && (gt(e), gt(e)), e.readBits(1);
|
|
48138
|
-
},
|
|
48145
|
+
}, SY = (e) => {
|
|
48139
48146
|
const t = [];
|
|
48140
48147
|
t.push(e.configurationVersion), t.push((e.generalProfileSpace & 3) << 6 | (e.generalTierFlag & 1) << 5 | e.generalProfileIdc & 31), t.push(e.generalProfileCompatibilityFlags >>> 24 & 255), t.push(e.generalProfileCompatibilityFlags >>> 16 & 255), t.push(e.generalProfileCompatibilityFlags >>> 8 & 255), t.push(e.generalProfileCompatibilityFlags & 255), t.push(...e.generalConstraintIndicatorFlags), t.push(e.generalLevelIdc & 255), t.push(240 | e.minSpatialSegmentationIdc >> 8 & 15), t.push(e.minSpatialSegmentationIdc & 255), t.push(252 | e.parallelismType & 3), t.push(252 | e.chromaFormatIdc & 3), t.push(248 | e.bitDepthLumaMinus8 & 7), t.push(248 | e.bitDepthChromaMinus8 & 7), t.push(e.avgFrameRate >> 8 & 255), t.push(e.avgFrameRate & 255), t.push((e.constantFrameRate & 3) << 6 | (e.numTemporalLayers & 7) << 3 | (e.temporalIdNested & 1) << 2 | e.lengthSizeMinusOne & 3), t.push(e.arrays.length & 255);
|
|
48141
48148
|
for (const i of e.arrays) {
|
|
@@ -48152,7 +48159,7 @@ var Li;
|
|
|
48152
48159
|
(function(e) {
|
|
48153
48160
|
e[e.audAllowed = 0] = "audAllowed", e[e.beforeFirstVcl = 1] = "beforeFirstVcl", e[e.afterFirstVcl = 2] = "afterFirstVcl", e[e.eoBitstreamAllowed = 3] = "eoBitstreamAllowed", e[e.noMoreDataAllowed = 4] = "noMoreDataAllowed";
|
|
48154
48161
|
})(Li || (Li = {}));
|
|
48155
|
-
const
|
|
48162
|
+
const EY = (e, t) => {
|
|
48156
48163
|
const i = /* @__PURE__ */ new Set();
|
|
48157
48164
|
let r = Li.audAllowed;
|
|
48158
48165
|
for (const s of Yf(e, t)) {
|
|
@@ -48173,7 +48180,7 @@ const SY = (e, t) => {
|
|
|
48173
48180
|
const n = [];
|
|
48174
48181
|
for (const s of Yf(e, t))
|
|
48175
48182
|
i.has(s.offset) || n.push(e.subarray(s.offset, s.offset + s.length));
|
|
48176
|
-
return
|
|
48183
|
+
return yY(n, t);
|
|
48177
48184
|
}, lE = (e) => {
|
|
48178
48185
|
const t = new ai(e);
|
|
48179
48186
|
if (t.readBits(2) !== 2)
|
|
@@ -48301,7 +48308,7 @@ const SY = (e, t) => {
|
|
|
48301
48308
|
};
|
|
48302
48309
|
}
|
|
48303
48310
|
return null;
|
|
48304
|
-
},
|
|
48311
|
+
}, AY = (e) => {
|
|
48305
48312
|
const t = ui(e), i = t.getUint8(9), r = t.getUint16(10, !0), n = t.getUint32(12, !0), s = t.getInt16(16, !0), a = t.getUint8(18);
|
|
48306
48313
|
let o = null;
|
|
48307
48314
|
return a && (o = e.subarray(19, 21 + i)), {
|
|
@@ -48321,7 +48328,7 @@ const SY = (e, t) => {
|
|
|
48321
48328
|
return "delta";
|
|
48322
48329
|
if (s === Dn.IDR)
|
|
48323
48330
|
return "key";
|
|
48324
|
-
if (s === Dn.SEI && (!qp() ||
|
|
48331
|
+
if (s === Dn.SEI && (!qp() || Gq() >= 144)) {
|
|
48325
48332
|
const a = i.subarray(r.offset, r.offset + r.length), o = yh(a);
|
|
48326
48333
|
let l = 1;
|
|
48327
48334
|
do {
|
|
@@ -48393,7 +48400,7 @@ var Xp;
|
|
|
48393
48400
|
(function(e) {
|
|
48394
48401
|
e[e.STREAMINFO = 0] = "STREAMINFO", e[e.VORBIS_COMMENT = 4] = "VORBIS_COMMENT", e[e.PICTURE = 6] = "PICTURE";
|
|
48395
48402
|
})(Xp || (Xp = {}));
|
|
48396
|
-
const fE = [2, 1, 2, 3, 3, 4, 4, 5],
|
|
48403
|
+
const fE = [2, 1, 2, 3, 3, 4, 4, 5], TY = (e) => {
|
|
48397
48404
|
if (e.length < 7 || e[0] !== 11 || e[1] !== 119)
|
|
48398
48405
|
return null;
|
|
48399
48406
|
const t = new ai(e);
|
|
@@ -48408,7 +48415,7 @@ const fE = [2, 1, 2, 3, 3, 4, 4, 5], AY = (e) => {
|
|
|
48408
48415
|
a & 1 && a !== 1 && t.skipBits(2), a & 4 && t.skipBits(2), a === 2 && t.skipBits(2);
|
|
48409
48416
|
const o = t.readBits(1), l = Math.floor(r / 2);
|
|
48410
48417
|
return { fscod: i, bsid: n, bsmod: s, acmod: a, lfeon: o, bitRateCode: l };
|
|
48411
|
-
},
|
|
48418
|
+
}, IY = [1, 2, 3, 6], DY = (e) => {
|
|
48412
48419
|
if (e.length < 6 || e[0] !== 11 || e[1] !== 119)
|
|
48413
48420
|
return null;
|
|
48414
48421
|
const t = new ai(e);
|
|
@@ -48422,7 +48429,7 @@ const fE = [2, 1, 2, 3, 3, 4, 4, 5], AY = (e) => {
|
|
|
48422
48429
|
const o = t.readBits(3), l = t.readBits(1), u = t.readBits(5);
|
|
48423
48430
|
if (u < 11 || u > 16)
|
|
48424
48431
|
return null;
|
|
48425
|
-
const c =
|
|
48432
|
+
const c = IY[a];
|
|
48426
48433
|
let f;
|
|
48427
48434
|
return n < 3 ? f = t1[n] / 1e3 : f = tE[s] / 1e3, {
|
|
48428
48435
|
dataRate: Math.round((r + 1) * f / (c * 16)),
|
|
@@ -48437,7 +48444,7 @@ const fE = [2, 1, 2, 3, 3, 4, 4, 5], AY = (e) => {
|
|
|
48437
48444
|
chanLoc: 0
|
|
48438
48445
|
}]
|
|
48439
48446
|
};
|
|
48440
|
-
},
|
|
48447
|
+
}, PY = (e) => {
|
|
48441
48448
|
if (e.length < 2)
|
|
48442
48449
|
return null;
|
|
48443
48450
|
const t = new ai(e), i = t.readBits(13), r = t.readBits(3), n = [];
|
|
@@ -48460,10 +48467,10 @@ const fE = [2, 1, 2, 3, 3, 4, 4, 5], AY = (e) => {
|
|
|
48460
48467
|
});
|
|
48461
48468
|
}
|
|
48462
48469
|
return n.length === 0 ? null : { dataRate: i, substreams: n };
|
|
48463
|
-
},
|
|
48470
|
+
}, FY = (e) => {
|
|
48464
48471
|
const t = e.substreams[0];
|
|
48465
48472
|
return N(t), t.fscod < 3 ? t1[t.fscod] : t.fscod2 !== null && t.fscod2 < 3 ? tE[t.fscod2] : null;
|
|
48466
|
-
},
|
|
48473
|
+
}, BY = (e) => {
|
|
48467
48474
|
const t = e.substreams[0];
|
|
48468
48475
|
N(t);
|
|
48469
48476
|
let i = fE[t.acmod] + t.lfeon;
|
|
@@ -48630,7 +48637,7 @@ const hE = (e) => {
|
|
|
48630
48637
|
i += `; codecs="${r.join(", ")}"`;
|
|
48631
48638
|
}
|
|
48632
48639
|
return i;
|
|
48633
|
-
},
|
|
48640
|
+
}, NY = (e) => {
|
|
48634
48641
|
const t = ui(e);
|
|
48635
48642
|
let i = 0;
|
|
48636
48643
|
const r = t.getUint8(i);
|
|
@@ -48652,7 +48659,7 @@ const hE = (e) => {
|
|
|
48652
48659
|
keyIds: s,
|
|
48653
48660
|
data: e.slice(i, i + a)
|
|
48654
48661
|
};
|
|
48655
|
-
},
|
|
48662
|
+
}, MY = (e, t) => e.systemId === t.systemId && qq(e.data, t.data);
|
|
48656
48663
|
/*!
|
|
48657
48664
|
* Copyright (c) 2026-present, Vanilagy and contributors
|
|
48658
48665
|
*
|
|
@@ -48679,7 +48686,7 @@ const es = 8, Sa = 16, Bs = (e) => {
|
|
|
48679
48686
|
}, bn = (e) => {
|
|
48680
48687
|
let t = Ii(e);
|
|
48681
48688
|
return e.skip(2), t = Math.min(t, e.remainingLength), Ho.decode(Se(e, t));
|
|
48682
|
-
},
|
|
48689
|
+
}, zY = (e) => {
|
|
48683
48690
|
const t = Bs(e);
|
|
48684
48691
|
if (!t || t.name !== "data" || e.remainingLength < 8)
|
|
48685
48692
|
return null;
|
|
@@ -48710,7 +48717,7 @@ const es = 8, Sa = 16, Bs = (e) => {
|
|
|
48710
48717
|
*/
|
|
48711
48718
|
const I0 = 16, qn = new Uint32Array(256), uo = new Uint32Array(256), co = new Uint32Array(256), fo = new Uint32Array(256), ho = new Uint32Array(256), Ei = new Uint32Array(256), pE = new Uint32Array(10);
|
|
48712
48719
|
let mE = !1;
|
|
48713
|
-
const
|
|
48720
|
+
const OY = () => {
|
|
48714
48721
|
const e = new Uint8Array(256), t = new Uint8Array(256), i = new Uint8Array(256);
|
|
48715
48722
|
for (let s = 0, a = 1; s < 256; s++)
|
|
48716
48723
|
i[s] = a, t[a] = s, a = a ^ a << 1 ^ (a & 128 ? 283 : 0);
|
|
@@ -48732,12 +48739,12 @@ const zY = () => {
|
|
|
48732
48739
|
pE[s] = n << 24, n = n << 1 ^ (n & 128 ? 283 : 0);
|
|
48733
48740
|
mE = !0;
|
|
48734
48741
|
};
|
|
48735
|
-
class
|
|
48742
|
+
class RY {
|
|
48736
48743
|
constructor() {
|
|
48737
48744
|
this.roundkey = new Uint32Array(44), this.iv = new Uint32Array(I0 / Uint32Array.BYTES_PER_ELEMENT), this.in = new Uint8Array(I0), this.out = new Uint8Array(I0), this.inView = new DataView(this.in.buffer), this.outView = new DataView(this.out.buffer);
|
|
48738
48745
|
}
|
|
48739
48746
|
init({ key: t, iv: i }) {
|
|
48740
|
-
N(t.byteLength === 16), N(i.byteLength === 16), mE ||
|
|
48747
|
+
N(t.byteLength === 16), N(i.byteLength === 16), mE || OY();
|
|
48741
48748
|
const r = new DataView(t.buffer, t.byteOffset, t.byteLength), n = new DataView(i.buffer, i.byteOffset, i.byteLength);
|
|
48742
48749
|
this.roundkey[0] = r.getUint32(0, !1), this.roundkey[1] = r.getUint32(4, !1), this.roundkey[2] = r.getUint32(8, !1), this.roundkey[3] = r.getUint32(12, !1), this.iv[0] = n.getUint32(0, !1), this.iv[1] = n.getUint32(4, !1), this.iv[2] = n.getUint32(8, !1), this.iv[3] = n.getUint32(12, !1);
|
|
48743
48750
|
for (let s = 4; s < 44; s += 4) {
|
|
@@ -49080,7 +49087,7 @@ class n1 extends dE {
|
|
|
49080
49087
|
ha(t),
|
|
49081
49088
|
ha(t),
|
|
49082
49089
|
A0(t)
|
|
49083
|
-
], f = jy(jp(
|
|
49090
|
+
], f = jy(jp(UY(c), 90));
|
|
49084
49091
|
N(f === 0 || f === 90 || f === 180 || f === 270), a.rotation = f;
|
|
49085
49092
|
}
|
|
49086
49093
|
break;
|
|
@@ -49094,7 +49101,7 @@ class n1 extends dE {
|
|
|
49094
49101
|
let l = !1, u = 0;
|
|
49095
49102
|
const c = bt(t);
|
|
49096
49103
|
for (let f = 0; f < c; f++) {
|
|
49097
|
-
const d = o === 1 ? Br(t) : bt(t), h = o === 1 ?
|
|
49104
|
+
const d = o === 1 ? Br(t) : bt(t), h = o === 1 ? HX(t) : Ea(t), m = ha(t);
|
|
49098
49105
|
if (d !== 0) {
|
|
49099
49106
|
if (l) {
|
|
49100
49107
|
Qt._warn("Unsupported edit list: multiple edits are not currently supported. Only using first edit.");
|
|
@@ -49470,13 +49477,13 @@ class n1 extends dE {
|
|
|
49470
49477
|
if (!a)
|
|
49471
49478
|
break;
|
|
49472
49479
|
N(a.info?.type === "audio");
|
|
49473
|
-
const o = Se(t, r.contentSize), l =
|
|
49480
|
+
const o = Se(t, r.contentSize), l = PY(o);
|
|
49474
49481
|
if (!l) {
|
|
49475
49482
|
Qt._warn("Invalid dec3 box contents, ignoring.");
|
|
49476
49483
|
break;
|
|
49477
49484
|
}
|
|
49478
|
-
const u =
|
|
49479
|
-
u !== null && (a.info.sampleRate = u), a.info.numberOfChannels =
|
|
49485
|
+
const u = FY(l);
|
|
49486
|
+
u !== null && (a.info.sampleRate = u), a.info.numberOfChannels = BY(l);
|
|
49480
49487
|
}
|
|
49481
49488
|
break;
|
|
49482
49489
|
case "stts":
|
|
@@ -49692,7 +49699,7 @@ class n1 extends dE {
|
|
|
49692
49699
|
{
|
|
49693
49700
|
if (this.input._formatOptions.isobmff?._suppressPsshParsing)
|
|
49694
49701
|
break;
|
|
49695
|
-
const a =
|
|
49702
|
+
const a = NY(Se(t, r.contentSize));
|
|
49696
49703
|
this.currentFragment ? this.currentFragment.psshBoxes.push(a) : this.currentTrack || this.psshBoxes.push(a);
|
|
49697
49704
|
}
|
|
49698
49705
|
break;
|
|
@@ -49917,7 +49924,7 @@ class n1 extends dE {
|
|
|
49917
49924
|
let u = o.name;
|
|
49918
49925
|
const c = (u.charCodeAt(0) << 24) + (u.charCodeAt(1) << 16) + (u.charCodeAt(2) << 8) + u.charCodeAt(3);
|
|
49919
49926
|
this.currentMetadataKeys.has(c) && (u = this.currentMetadataKeys.get(c));
|
|
49920
|
-
const f =
|
|
49927
|
+
const f = zY(l);
|
|
49921
49928
|
switch (this.metadataTags.raw ??= {}, this.metadataTags.raw[u] ??= f, u) {
|
|
49922
49929
|
case "©nam":
|
|
49923
49930
|
case "titl":
|
|
@@ -50129,7 +50136,7 @@ class gE {
|
|
|
50129
50136
|
);
|
|
50130
50137
|
}
|
|
50131
50138
|
async getKeyPacket(t, i) {
|
|
50132
|
-
const r = this.mapTimestampIntoTimescale(t), n = this.internalTrack.demuxer.getSampleTableForTrack(this.internalTrack), s =
|
|
50139
|
+
const r = this.mapTimestampIntoTimescale(t), n = this.internalTrack.demuxer.getSampleTableForTrack(this.internalTrack), s = VY(n, r), a = await this.fetchPacketForSampleIndex(s, i);
|
|
50133
50140
|
return !Nw(n) || !this.internalTrack.demuxer.isFragmented ? a : this.performFragmentedLookup(null, (o) => {
|
|
50134
50141
|
const l = o.trackData.get(this.internalTrack.id);
|
|
50135
50142
|
if (!l)
|
|
@@ -50141,7 +50148,7 @@ class gE {
|
|
|
50141
50148
|
async getNextKeyPacket(t, i) {
|
|
50142
50149
|
const r = this.packetToSampleIndex.get(t);
|
|
50143
50150
|
if (r !== void 0) {
|
|
50144
|
-
const s = this.internalTrack.demuxer.getSampleTableForTrack(this.internalTrack), a =
|
|
50151
|
+
const s = this.internalTrack.demuxer.getSampleTableForTrack(this.internalTrack), a = $Y(s, r);
|
|
50145
50152
|
return this.fetchPacketForSampleIndex(a, i);
|
|
50146
50153
|
}
|
|
50147
50154
|
const n = this.packetToFragmentLocation.get(t);
|
|
@@ -50181,7 +50188,7 @@ class gE {
|
|
|
50181
50188
|
async fetchPacketForSampleIndex(t, i) {
|
|
50182
50189
|
if (t === -1)
|
|
50183
50190
|
return null;
|
|
50184
|
-
const r = this.internalTrack.demuxer.getSampleTableForTrack(this.internalTrack), n =
|
|
50191
|
+
const r = this.internalTrack.demuxer.getSampleTableForTrack(this.internalTrack), n = LY(r, t);
|
|
50185
50192
|
if (!n)
|
|
50186
50193
|
return null;
|
|
50187
50194
|
let s;
|
|
@@ -50351,7 +50358,7 @@ const Kp = (e, t) => {
|
|
|
50351
50358
|
const r = e.sampleTimingEntries[i];
|
|
50352
50359
|
return r.startIndex + Math.min(Math.floor((t - r.startDecodeTimestamp) / r.delta), r.count - 1);
|
|
50353
50360
|
}
|
|
50354
|
-
},
|
|
50361
|
+
}, VY = (e, t) => {
|
|
50355
50362
|
if (!e.keySampleIndices)
|
|
50356
50363
|
return Kp(e, t);
|
|
50357
50364
|
if (e.presentationTimestamps) {
|
|
@@ -50368,7 +50375,7 @@ const Kp = (e, t) => {
|
|
|
50368
50375
|
const i = Kp(e, t), r = Ue(e.keySampleIndices, i, (n) => n);
|
|
50369
50376
|
return e.keySampleIndices[r] ?? -1;
|
|
50370
50377
|
}
|
|
50371
|
-
},
|
|
50378
|
+
}, LY = (e, t) => {
|
|
50372
50379
|
const i = Ue(e.sampleTimingEntries, t, (w) => w.startIndex), r = e.sampleTimingEntries[i];
|
|
50373
50380
|
if (!r || r.startIndex + r.count <= t)
|
|
50374
50381
|
return null;
|
|
@@ -50400,7 +50407,7 @@ const Kp = (e, t) => {
|
|
|
50400
50407
|
chunkSize: m,
|
|
50401
50408
|
isKeyFrame: e.keySampleIndices ? V5(e.keySampleIndices, t, (w) => w) !== -1 : !0
|
|
50402
50409
|
};
|
|
50403
|
-
},
|
|
50410
|
+
}, $Y = (e, t) => {
|
|
50404
50411
|
if (!e.keySampleIndices)
|
|
50405
50412
|
return t + 1;
|
|
50406
50413
|
const i = Ue(e.keySampleIndices, t, (r) => r);
|
|
@@ -50411,7 +50418,7 @@ const Kp = (e, t) => {
|
|
|
50411
50418
|
i.presentationTimestamp += t;
|
|
50412
50419
|
for (const i of e.presentationTimestamps)
|
|
50413
50420
|
i.presentationTimestamp += t;
|
|
50414
|
-
},
|
|
50421
|
+
}, UY = (e) => {
|
|
50415
50422
|
const [t, i] = e, r = Math.atan2(i, t);
|
|
50416
50423
|
return Number.isFinite(r) ? r * (180 / Math.PI) : 0;
|
|
50417
50424
|
}, Nw = (e) => e.sampleSizes.length === 0, Mw = (e) => e.currentFragmentState ? e.currentFragmentState.encryptionAuxInfo ??= {
|
|
@@ -50481,17 +50488,17 @@ const Kp = (e, t) => {
|
|
|
50481
50488
|
].filter((f) => f.keyIds === null || f.keyIds.includes(s));
|
|
50482
50489
|
for (let f = 0; f < u.length - 1; f++)
|
|
50483
50490
|
for (let d = f + 1; d < u.length; d++)
|
|
50484
|
-
|
|
50491
|
+
MY(u[f], u[d]) && (u.splice(d, 1), d--);
|
|
50485
50492
|
}
|
|
50486
50493
|
const c = await e.demuxer.input._formatOptions.isobmff.resolveKeyId({ keyId: s, psshBoxes: u });
|
|
50487
|
-
if (!(typeof c == "string" && c.length === 32 &&
|
|
50494
|
+
if (!(typeof c == "string" && c.length === 32 && Rq.test(c) || c instanceof Uint8Array && c.byteLength === 16))
|
|
50488
50495
|
throw new TypeError("resolveKeyId must return a 32-character hex string or a 16-byte Uint8Array containing the decryption key.");
|
|
50489
|
-
return c instanceof Uint8Array ? c :
|
|
50496
|
+
return c instanceof Uint8Array ? c : Vq(c);
|
|
50490
50497
|
})();
|
|
50491
50498
|
e.demuxer.decryptionKeyCache.set(s, l), a = await l;
|
|
50492
50499
|
}
|
|
50493
|
-
return n.scheme === "cenc" || n.scheme === "cens" ?
|
|
50494
|
-
},
|
|
50500
|
+
return n.scheme === "cenc" || n.scheme === "cens" ? ZY(a, n, t, i) : jY(a, n, t, i);
|
|
50501
|
+
}, ZY = async (e, t, i, r) => {
|
|
50495
50502
|
const n = new Uint8Array(16);
|
|
50496
50503
|
n.set(i.iv, 0);
|
|
50497
50504
|
const s = await crypto.subtle.importKey("raw", e, { name: "AES-CTR" }, !1, ["decrypt"]), a = async (m) => {
|
|
@@ -50517,8 +50524,8 @@ const Kp = (e, t) => {
|
|
|
50517
50524
|
for (const v of m.perSubsample)
|
|
50518
50525
|
d.set(f.subarray(h, h + v.length), v.offset), h += v.length;
|
|
50519
50526
|
return d;
|
|
50520
|
-
},
|
|
50521
|
-
const n = new
|
|
50527
|
+
}, jY = (e, t, i, r) => {
|
|
50528
|
+
const n = new RY();
|
|
50522
50529
|
n.init({ key: e, iv: i.iv });
|
|
50523
50530
|
const s = t.defaultCryptByteBlock, a = t.defaultSkipByteBlock;
|
|
50524
50531
|
if (N(s !== null && a !== null), !i.subsamples) {
|
|
@@ -50576,7 +50583,7 @@ var et;
|
|
|
50576
50583
|
(function(e) {
|
|
50577
50584
|
e[e.EBML = 440786851] = "EBML", e[e.EBMLVersion = 17030] = "EBMLVersion", e[e.EBMLReadVersion = 17143] = "EBMLReadVersion", e[e.EBMLMaxIDLength = 17138] = "EBMLMaxIDLength", e[e.EBMLMaxSizeLength = 17139] = "EBMLMaxSizeLength", e[e.DocType = 17026] = "DocType", e[e.DocTypeVersion = 17031] = "DocTypeVersion", e[e.DocTypeReadVersion = 17029] = "DocTypeReadVersion", e[e.Void = 236] = "Void", e[e.Segment = 408125543] = "Segment", e[e.SeekHead = 290298740] = "SeekHead", e[e.Seek = 19899] = "Seek", e[e.SeekID = 21419] = "SeekID", e[e.SeekPosition = 21420] = "SeekPosition", e[e.Duration = 17545] = "Duration", e[e.Info = 357149030] = "Info", e[e.TimestampScale = 2807729] = "TimestampScale", e[e.MuxingApp = 19840] = "MuxingApp", e[e.WritingApp = 22337] = "WritingApp", e[e.Tracks = 374648427] = "Tracks", e[e.TrackEntry = 174] = "TrackEntry", e[e.TrackNumber = 215] = "TrackNumber", e[e.TrackUID = 29637] = "TrackUID", e[e.TrackType = 131] = "TrackType", e[e.FlagEnabled = 185] = "FlagEnabled", e[e.FlagDefault = 136] = "FlagDefault", e[e.FlagForced = 21930] = "FlagForced", e[e.FlagOriginal = 21934] = "FlagOriginal", e[e.FlagHearingImpaired = 21931] = "FlagHearingImpaired", e[e.FlagVisualImpaired = 21932] = "FlagVisualImpaired", e[e.FlagCommentary = 21935] = "FlagCommentary", e[e.FlagLacing = 156] = "FlagLacing", e[e.Name = 21358] = "Name", e[e.Language = 2274716] = "Language", e[e.LanguageBCP47 = 2274717] = "LanguageBCP47", e[e.CodecID = 134] = "CodecID", e[e.CodecPrivate = 25506] = "CodecPrivate", e[e.CodecDelay = 22186] = "CodecDelay", e[e.SeekPreRoll = 22203] = "SeekPreRoll", e[e.DefaultDuration = 2352003] = "DefaultDuration", e[e.Video = 224] = "Video", e[e.PixelWidth = 176] = "PixelWidth", e[e.PixelHeight = 186] = "PixelHeight", e[e.DisplayWidth = 21680] = "DisplayWidth", e[e.DisplayHeight = 21690] = "DisplayHeight", e[e.DisplayUnit = 21682] = "DisplayUnit", e[e.AlphaMode = 21440] = "AlphaMode", e[e.Audio = 225] = "Audio", e[e.SamplingFrequency = 181] = "SamplingFrequency", e[e.Channels = 159] = "Channels", e[e.BitDepth = 25188] = "BitDepth", e[e.SimpleBlock = 163] = "SimpleBlock", e[e.BlockGroup = 160] = "BlockGroup", e[e.Block = 161] = "Block", e[e.BlockAdditions = 30113] = "BlockAdditions", e[e.BlockMore = 166] = "BlockMore", e[e.BlockAdditional = 165] = "BlockAdditional", e[e.BlockAddID = 238] = "BlockAddID", e[e.BlockDuration = 155] = "BlockDuration", e[e.ReferenceBlock = 251] = "ReferenceBlock", e[e.Cluster = 524531317] = "Cluster", e[e.Timestamp = 231] = "Timestamp", e[e.Cues = 475249515] = "Cues", e[e.CuePoint = 187] = "CuePoint", e[e.CueTime = 179] = "CueTime", e[e.CueTrackPositions = 183] = "CueTrackPositions", e[e.CueTrack = 247] = "CueTrack", e[e.CueClusterPosition = 241] = "CueClusterPosition", e[e.Colour = 21936] = "Colour", e[e.MatrixCoefficients = 21937] = "MatrixCoefficients", e[e.TransferCharacteristics = 21946] = "TransferCharacteristics", e[e.Primaries = 21947] = "Primaries", e[e.Range = 21945] = "Range", e[e.Projection = 30320] = "Projection", e[e.ProjectionType = 30321] = "ProjectionType", e[e.ProjectionPoseRoll = 30325] = "ProjectionPoseRoll", e[e.Attachments = 423732329] = "Attachments", e[e.AttachedFile = 24999] = "AttachedFile", e[e.FileDescription = 18046] = "FileDescription", e[e.FileName = 18030] = "FileName", e[e.FileMediaType = 18016] = "FileMediaType", e[e.FileData = 18012] = "FileData", e[e.FileUID = 18094] = "FileUID", e[e.Chapters = 272869232] = "Chapters", e[e.Tags = 307544935] = "Tags", e[e.Tag = 29555] = "Tag", e[e.Targets = 25536] = "Targets", e[e.TargetTypeValue = 26826] = "TargetTypeValue", e[e.TargetType = 25546] = "TargetType", e[e.TagTrackUID = 25541] = "TagTrackUID", e[e.TagEditionUID = 25545] = "TagEditionUID", e[e.TagChapterUID = 25540] = "TagChapterUID", e[e.TagAttachmentUID = 25542] = "TagAttachmentUID", e[e.SimpleTag = 26568] = "SimpleTag", e[e.TagName = 17827] = "TagName", e[e.TagLanguage = 17530] = "TagLanguage", e[e.TagString = 17543] = "TagString", e[e.TagBinary = 17541] = "TagBinary", e[e.ContentEncodings = 28032] = "ContentEncodings", e[e.ContentEncoding = 25152] = "ContentEncoding", e[e.ContentEncodingOrder = 20529] = "ContentEncodingOrder", e[e.ContentEncodingScope = 20530] = "ContentEncodingScope", e[e.ContentCompression = 20532] = "ContentCompression", e[e.ContentCompAlgo = 16980] = "ContentCompAlgo", e[e.ContentCompSettings = 16981] = "ContentCompSettings", e[e.ContentEncryption = 20533] = "ContentEncryption";
|
|
50578
50585
|
})(et || (et = {}));
|
|
50579
|
-
const
|
|
50586
|
+
const WY = [
|
|
50580
50587
|
et.EBML,
|
|
50581
50588
|
et.Segment
|
|
50582
50589
|
], ku = [
|
|
@@ -50589,7 +50596,7 @@ const jY = [
|
|
|
50589
50596
|
et.Chapters,
|
|
50590
50597
|
et.Tags
|
|
50591
50598
|
], sf = [
|
|
50592
|
-
...
|
|
50599
|
+
...WY,
|
|
50593
50600
|
...ku
|
|
50594
50601
|
], Jp = 8, Mr = 2, is = 2 * Jp, vE = (e) => {
|
|
50595
50602
|
if (e.remainingLength < 1)
|
|
@@ -50623,7 +50630,7 @@ const jY = [
|
|
|
50623
50630
|
for (let r = 0; r < t; r++)
|
|
50624
50631
|
i *= 256, i += Jt(e);
|
|
50625
50632
|
return i;
|
|
50626
|
-
},
|
|
50633
|
+
}, HY = (e, t) => {
|
|
50627
50634
|
if (t < 1)
|
|
50628
50635
|
throw new Error("Bad unsigned int size " + t);
|
|
50629
50636
|
let i = 0n;
|
|
@@ -50668,7 +50675,7 @@ const jY = [
|
|
|
50668
50675
|
return 0;
|
|
50669
50676
|
if (t !== 4 && t !== 8)
|
|
50670
50677
|
throw new Error("Bad float size " + t);
|
|
50671
|
-
return t === 4 ?
|
|
50678
|
+
return t === 4 ? GX(e) : BE(e);
|
|
50672
50679
|
}, Qp = async (e, t, i, r) => {
|
|
50673
50680
|
const n = new Set(i);
|
|
50674
50681
|
let s = t;
|
|
@@ -50726,7 +50733,7 @@ function Fs(e) {
|
|
|
50726
50733
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
50727
50734
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
50728
50735
|
*/
|
|
50729
|
-
const
|
|
50736
|
+
const GY = (e) => {
|
|
50730
50737
|
let i = (e.hasVideo ? "video/" : e.hasAudio ? "audio/" : "application/") + (e.isWebM ? "webm" : "x-matroska");
|
|
50731
50738
|
if (e.codecStrings.length > 0) {
|
|
50732
50739
|
const r = [...new Set(e.codecStrings.filter(Boolean))];
|
|
@@ -50759,7 +50766,7 @@ const F0 = [
|
|
|
50759
50766
|
{ id: et.Tracks, flag: "tracksSeen" },
|
|
50760
50767
|
{ id: et.Cues, flag: "cuesSeen" }
|
|
50761
50768
|
], CE = 10 * 2 ** 20;
|
|
50762
|
-
class
|
|
50769
|
+
class qY extends dE {
|
|
50763
50770
|
constructor(t) {
|
|
50764
50771
|
super(t), this.readMetadataPromise = null, this.segments = [], this.currentSegment = null, this.currentTrack = null, this.currentCluster = null, this.currentBlock = null, this.currentBlockAdditional = null, this.currentCueTime = null, this.currentDecodingInstruction = null, this.currentTagTargetIsMovie = !0, this.currentSimpleTagName = null, this.currentAttachedFile = null, this.isWebM = !1, this.reader = t._reader;
|
|
50765
50772
|
}
|
|
@@ -50769,7 +50776,7 @@ class GY extends dE {
|
|
|
50769
50776
|
async getMimeType() {
|
|
50770
50777
|
await this.readMetadata();
|
|
50771
50778
|
const t = await this.getTrackBackings(), i = await Promise.all(t.map((r) => r.getDecoderConfig().then((n) => n?.codec ?? null)));
|
|
50772
|
-
return
|
|
50779
|
+
return GY({
|
|
50773
50780
|
isWebM: this.isWebM,
|
|
50774
50781
|
hasVideo: this.segments.some((r) => r.tracks.some((n) => n.info?.type === "video")),
|
|
50775
50782
|
hasAudio: this.segments.some((r) => r.tracks.some((n) => n.info?.type === "audio")),
|
|
@@ -51168,14 +51175,14 @@ class GY extends dE {
|
|
|
51168
51175
|
Fa.includes(c) && (this.currentTrack.info.codec = "prores", this.currentTrack.info.proresFormat = c);
|
|
51169
51176
|
}
|
|
51170
51177
|
const u = this.currentTrack;
|
|
51171
|
-
this.currentTrack.trackBacking = new
|
|
51178
|
+
this.currentTrack.trackBacking = new YY(u), this.currentSegment.tracks.push(this.currentTrack);
|
|
51172
51179
|
} else if (this.currentTrack.info.type === "audio") {
|
|
51173
51180
|
l === yr.aac ? (this.currentTrack.info.codec = "aac", this.currentTrack.info.aacCodecInfo = {
|
|
51174
51181
|
isMpeg2: this.currentTrack.codecId.includes("MPEG2"),
|
|
51175
51182
|
objectType: null
|
|
51176
51183
|
}, this.currentTrack.info.codecDescription = this.currentTrack.codecPrivate) : this.currentTrack.codecId === yr.mp3 ? this.currentTrack.info.codec = "mp3" : l === yr.opus ? (this.currentTrack.info.codec = "opus", this.currentTrack.info.codecDescription = this.currentTrack.codecPrivate, this.currentTrack.info.sampleRate = K5) : l === yr.vorbis ? (this.currentTrack.info.codec = "vorbis", this.currentTrack.info.codecDescription = this.currentTrack.codecPrivate) : l === yr.flac ? (this.currentTrack.info.codec = "flac", this.currentTrack.info.codecDescription = this.currentTrack.codecPrivate) : l === yr.ac3 ? (this.currentTrack.info.codec = "ac3", this.currentTrack.info.codecDescription = this.currentTrack.codecPrivate) : l === yr.eac3 ? (this.currentTrack.info.codec = "eac3", this.currentTrack.info.codecDescription = this.currentTrack.codecPrivate) : this.currentTrack.codecId === "A_PCM/INT/LIT" ? this.currentTrack.info.bitDepth === 8 ? this.currentTrack.info.codec = "pcm-u8" : this.currentTrack.info.bitDepth === 16 ? this.currentTrack.info.codec = "pcm-s16" : this.currentTrack.info.bitDepth === 24 ? this.currentTrack.info.codec = "pcm-s24" : this.currentTrack.info.bitDepth === 32 && (this.currentTrack.info.codec = "pcm-s32") : this.currentTrack.codecId === "A_PCM/INT/BIG" ? this.currentTrack.info.bitDepth === 8 ? this.currentTrack.info.codec = "pcm-u8" : this.currentTrack.info.bitDepth === 16 ? this.currentTrack.info.codec = "pcm-s16be" : this.currentTrack.info.bitDepth === 24 ? this.currentTrack.info.codec = "pcm-s24be" : this.currentTrack.info.bitDepth === 32 && (this.currentTrack.info.codec = "pcm-s32be") : this.currentTrack.codecId === "A_PCM/FLOAT/IEEE" && (this.currentTrack.info.bitDepth === 32 ? this.currentTrack.info.codec = "pcm-f32" : this.currentTrack.info.bitDepth === 64 && (this.currentTrack.info.codec = "pcm-f64"));
|
|
51177
51184
|
const u = this.currentTrack;
|
|
51178
|
-
this.currentTrack.trackBacking = new
|
|
51185
|
+
this.currentTrack.trackBacking = new XY(u), this.currentSegment.tracks.push(this.currentTrack);
|
|
51179
51186
|
}
|
|
51180
51187
|
}
|
|
51181
51188
|
this.currentTrack = null;
|
|
@@ -51664,7 +51671,7 @@ class GY extends dE {
|
|
|
51664
51671
|
{
|
|
51665
51672
|
if (!this.currentAttachedFile)
|
|
51666
51673
|
break;
|
|
51667
|
-
this.currentAttachedFile.fileUid =
|
|
51674
|
+
this.currentAttachedFile.fileUid = HY(t, s);
|
|
51668
51675
|
}
|
|
51669
51676
|
break;
|
|
51670
51677
|
case et.FileName:
|
|
@@ -52073,7 +52080,7 @@ class kE {
|
|
|
52073
52080
|
return u ? this.fetchPacketInCluster(u, c, s) : null;
|
|
52074
52081
|
}
|
|
52075
52082
|
}
|
|
52076
|
-
class
|
|
52083
|
+
class YY extends kE {
|
|
52077
52084
|
constructor(t) {
|
|
52078
52085
|
super(t), this.decoderConfigPromise = null, this.internalTrack = t;
|
|
52079
52086
|
}
|
|
@@ -52137,7 +52144,7 @@ class qY extends kE {
|
|
|
52137
52144
|
})() : null;
|
|
52138
52145
|
}
|
|
52139
52146
|
}
|
|
52140
|
-
class
|
|
52147
|
+
class XY extends kE {
|
|
52141
52148
|
constructor(t) {
|
|
52142
52149
|
super(t), this.decoderConfig = null, this.internalTrack = t;
|
|
52143
52150
|
}
|
|
@@ -52173,7 +52180,7 @@ class YY extends kE {
|
|
|
52173
52180
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
52174
52181
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
52175
52182
|
*/
|
|
52176
|
-
const
|
|
52183
|
+
const KY = 7, JY = 9, Ow = (e) => {
|
|
52177
52184
|
const t = e.filePos, i = Se(e, 9), r = new ai(i);
|
|
52178
52185
|
if (r.readBits(12) !== 4095 || (r.skipBits(1), r.readBits(2) !== 0))
|
|
52179
52186
|
return null;
|
|
@@ -52200,9 +52207,9 @@ const XY = 7, KY = 9, Ow = (e) => {
|
|
|
52200
52207
|
crcCheck: d,
|
|
52201
52208
|
startPos: t
|
|
52202
52209
|
};
|
|
52203
|
-
},
|
|
52210
|
+
}, QY = {}, Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
52204
52211
|
__proto__: null,
|
|
52205
|
-
default:
|
|
52212
|
+
default: QY
|
|
52206
52213
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
52207
52214
|
/*!
|
|
52208
52215
|
* Copyright (c) 2026-present, Vanilagy and contributors
|
|
@@ -52261,7 +52268,7 @@ class Ba extends oc {
|
|
|
52261
52268
|
throw new TypeError("offset must be a non-negative integer.");
|
|
52262
52269
|
if (i !== void 0 && (!Number.isInteger(i) || i < 0))
|
|
52263
52270
|
throw new TypeError("length, when provided, must be a non-negative integer.");
|
|
52264
|
-
return new
|
|
52271
|
+
return new aX(this, t, i);
|
|
52265
52272
|
}
|
|
52266
52273
|
/** @internal */
|
|
52267
52274
|
_dispatchRead(t, i) {
|
|
@@ -52336,7 +52343,7 @@ class EE extends Ba {
|
|
|
52336
52343
|
return i instanceof Promise ? i.then(r) : r(i);
|
|
52337
52344
|
}
|
|
52338
52345
|
}
|
|
52339
|
-
const Rw = (e, t) => e.path === t.path,
|
|
52346
|
+
const Rw = (e, t) => e.path === t.path, tX = 0.5 * 2 ** 20, eX = (e, t, i) => {
|
|
52340
52347
|
if (t instanceof Error && (t.message.includes("Failed to fetch") || t.message.includes("Load failed") || t.message.includes("NetworkError when attempting to fetch resource")) && typeof window < "u") {
|
|
52341
52348
|
let n = null;
|
|
52342
52349
|
try {
|
|
@@ -52371,7 +52378,7 @@ class o1 extends EE {
|
|
|
52371
52378
|
if (i.fetchFn !== void 0 && typeof i.fetchFn != "function")
|
|
52372
52379
|
throw new TypeError("options.fetchFn, when provided, must be a function.");
|
|
52373
52380
|
const r = t instanceof Request ? t.url : t instanceof URL ? t.href : t;
|
|
52374
|
-
super(r, (a) => new o1(a.path, this._options)), this._offset = 0, this._length = null, this._fileSizeDetermined = !1, this._url = t, this._options = i, this._getRetryDelay = i.getRetryDelay ??
|
|
52381
|
+
super(r, (a) => new o1(a.path, this._options)), this._offset = 0, this._length = null, this._fileSizeDetermined = !1, this._url = t, this._options = i, this._getRetryDelay = i.getRetryDelay ?? eX, this._requestInit = { ...i.requestInit };
|
|
52375
52382
|
let n = null;
|
|
52376
52383
|
if (i.requestInit?.headers) {
|
|
52377
52384
|
const a = { ...Hp(i.requestInit.headers) }, o = Object.keys(a).find((l) => l.toLowerCase() === "range");
|
|
@@ -52386,15 +52393,15 @@ class o1 extends EE {
|
|
|
52386
52393
|
}
|
|
52387
52394
|
}
|
|
52388
52395
|
if (n !== null) {
|
|
52389
|
-
const a =
|
|
52396
|
+
const a = rX(n);
|
|
52390
52397
|
a && (this._offset = a.offset, this._length = a.length);
|
|
52391
52398
|
}
|
|
52392
52399
|
const s = 2;
|
|
52393
|
-
this._orchestrator = new
|
|
52400
|
+
this._orchestrator = new sX({
|
|
52394
52401
|
maxCacheSize: i.maxCacheSize ?? 64 * 2 ** 20,
|
|
52395
52402
|
maxWorkerCount: i.parallelism ?? s,
|
|
52396
52403
|
runWorker: this._runWorker.bind(this),
|
|
52397
|
-
prefetchProfile:
|
|
52404
|
+
prefetchProfile: nX.network
|
|
52398
52405
|
});
|
|
52399
52406
|
}
|
|
52400
52407
|
/** @internal */
|
|
@@ -52414,7 +52421,7 @@ class o1 extends EE {
|
|
|
52414
52421
|
/** @internal */
|
|
52415
52422
|
async _runWorker(t) {
|
|
52416
52423
|
for (; ; ) {
|
|
52417
|
-
const i = new AbortController(), r = await
|
|
52424
|
+
const i = new AbortController(), r = await Wq(this._options.fetchFn ?? fetch, this._url, jq(this._requestInit, {
|
|
52418
52425
|
headers: {
|
|
52419
52426
|
// Always sending a range request is a good way to probe if the server supports them
|
|
52420
52427
|
Range: `bytes=${t.currentPos}-`
|
|
@@ -52486,8 +52493,8 @@ class o1 extends EE {
|
|
|
52486
52493
|
this._orchestrator.dispose();
|
|
52487
52494
|
}
|
|
52488
52495
|
}
|
|
52489
|
-
const
|
|
52490
|
-
const t =
|
|
52496
|
+
const iX = /^bytes=(\d+)-(\d*)$/, rX = (e) => {
|
|
52497
|
+
const t = iX.exec(e.trim());
|
|
52491
52498
|
if (!t)
|
|
52492
52499
|
return null;
|
|
52493
52500
|
const i = Number(t[1]), r = t[2] === "" ? null : Number(t[2]);
|
|
@@ -52495,7 +52502,7 @@ const eX = /^bytes=(\d+)-(\d*)$/, iX = (e) => {
|
|
|
52495
52502
|
offset: i,
|
|
52496
52503
|
length: r !== null ? r - i + 1 : null
|
|
52497
52504
|
};
|
|
52498
|
-
},
|
|
52505
|
+
}, nX = {
|
|
52499
52506
|
network: (e, t, i) => {
|
|
52500
52507
|
e = Math.max(0, Math.floor((e - 65536) / 65536) * 65536);
|
|
52501
52508
|
for (const n of i) {
|
|
@@ -52505,13 +52512,13 @@ const eX = /^bytes=(\d+)-(\d*)$/, iX = (e) => {
|
|
|
52505
52512
|
t = Math.max(t, n.startPos + c);
|
|
52506
52513
|
}
|
|
52507
52514
|
}
|
|
52508
|
-
return t = Math.max(t, e +
|
|
52515
|
+
return t = Math.max(t, e + tX), {
|
|
52509
52516
|
start: e,
|
|
52510
52517
|
end: t
|
|
52511
52518
|
};
|
|
52512
52519
|
}
|
|
52513
52520
|
};
|
|
52514
|
-
class
|
|
52521
|
+
class sX {
|
|
52515
52522
|
constructor(t) {
|
|
52516
52523
|
this.options = t, this.fileSize = null, this.nextAge = 0, this.workers = [], this.cache = [], this.currentCacheSize = 0, this.disposed = !1, this.queuedReads = [];
|
|
52517
52524
|
}
|
|
@@ -52794,7 +52801,7 @@ class nX {
|
|
|
52794
52801
|
this.workers.length = 0, this.cache.length = 0, this.disposed = !0;
|
|
52795
52802
|
}
|
|
52796
52803
|
}
|
|
52797
|
-
class
|
|
52804
|
+
class aX extends Ba {
|
|
52798
52805
|
/** @internal */
|
|
52799
52806
|
constructor(t, i, r) {
|
|
52800
52807
|
if (super(), this._ref = null, t._disposed)
|
|
@@ -52833,7 +52840,7 @@ class l1 {
|
|
|
52833
52840
|
this._isIsobmff = !1;
|
|
52834
52841
|
}
|
|
52835
52842
|
}
|
|
52836
|
-
class
|
|
52843
|
+
class oX extends l1 {
|
|
52837
52844
|
constructor() {
|
|
52838
52845
|
super(...arguments), this._isIsobmff = !0;
|
|
52839
52846
|
}
|
|
@@ -52851,7 +52858,7 @@ class aX extends l1 {
|
|
|
52851
52858
|
return new n1(t);
|
|
52852
52859
|
}
|
|
52853
52860
|
}
|
|
52854
|
-
class
|
|
52861
|
+
class lX extends oX {
|
|
52855
52862
|
/** @internal */
|
|
52856
52863
|
async _canReadInput(t) {
|
|
52857
52864
|
const i = await this._getMajorBrand(t);
|
|
@@ -52870,7 +52877,7 @@ class oX extends aX {
|
|
|
52870
52877
|
return "video/mp4";
|
|
52871
52878
|
}
|
|
52872
52879
|
}
|
|
52873
|
-
class
|
|
52880
|
+
class uX extends l1 {
|
|
52874
52881
|
/** @internal */
|
|
52875
52882
|
async isSupportedEBMLOfDocType(t, i) {
|
|
52876
52883
|
let r = t._reader.requestSlice(0, is);
|
|
@@ -52921,7 +52928,7 @@ class lX extends l1 {
|
|
|
52921
52928
|
}
|
|
52922
52929
|
/** @internal */
|
|
52923
52930
|
_createDemuxer(t) {
|
|
52924
|
-
return new
|
|
52931
|
+
return new qY(t);
|
|
52925
52932
|
}
|
|
52926
52933
|
get name() {
|
|
52927
52934
|
return "Matroska";
|
|
@@ -52930,7 +52937,7 @@ class lX extends l1 {
|
|
|
52930
52937
|
return "video/x-matroska";
|
|
52931
52938
|
}
|
|
52932
52939
|
}
|
|
52933
|
-
class
|
|
52940
|
+
class cX extends uX {
|
|
52934
52941
|
/** @internal */
|
|
52935
52942
|
_canReadInput(t) {
|
|
52936
52943
|
return this.isSupportedEBMLOfDocType(t, "webm");
|
|
@@ -52942,7 +52949,7 @@ class uX extends lX {
|
|
|
52942
52949
|
return "video/webm";
|
|
52943
52950
|
}
|
|
52944
52951
|
}
|
|
52945
|
-
const
|
|
52952
|
+
const fX = /* @__PURE__ */ new lX(), dX = /* @__PURE__ */ new cX(), hX = (e, t) => {
|
|
52946
52953
|
if (!e || typeof e != "object")
|
|
52947
52954
|
throw new TypeError(`${t}, when provided, must be an object.`);
|
|
52948
52955
|
if (e.isobmff !== void 0) {
|
|
@@ -52965,7 +52972,7 @@ const cX = /* @__PURE__ */ new oX(), fX = /* @__PURE__ */ new uX(), dX = (e, t)
|
|
|
52965
52972
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
52966
52973
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
52967
52974
|
*/
|
|
52968
|
-
var
|
|
52975
|
+
var pX = function(e, t, i) {
|
|
52969
52976
|
if (t != null) {
|
|
52970
52977
|
if (typeof t != "object" && typeof t != "function") throw new TypeError("Object expected.");
|
|
52971
52978
|
var r, n;
|
|
@@ -52987,7 +52994,7 @@ var hX = function(e, t, i) {
|
|
|
52987
52994
|
}), e.stack.push({ value: t, dispose: r, async: i });
|
|
52988
52995
|
} else i && e.stack.push({ async: !0 });
|
|
52989
52996
|
return t;
|
|
52990
|
-
},
|
|
52997
|
+
}, mX = /* @__PURE__ */ function(e) {
|
|
52991
52998
|
return function(t) {
|
|
52992
52999
|
function i(a) {
|
|
52993
53000
|
t.error = t.hasError ? new e(a, t.error, "An error was suppressed during disposal.") : a, t.hasError = !0;
|
|
@@ -53061,7 +53068,7 @@ const tm = [
|
|
|
53061
53068
|
"BGRA",
|
|
53062
53069
|
// 4:4:4 BGRX (opaque)
|
|
53063
53070
|
"BGRX"
|
|
53064
|
-
],
|
|
53071
|
+
], gX = new Set(tm);
|
|
53065
53072
|
class Xi {
|
|
53066
53073
|
/** The width of the frame in pixels. */
|
|
53067
53074
|
get codedWidth() {
|
|
@@ -53098,7 +53105,7 @@ class Xi {
|
|
|
53098
53105
|
if (this._closed = !1, t instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && t instanceof SharedArrayBuffer || ArrayBuffer.isView(t)) {
|
|
53099
53106
|
if (!i || typeof i != "object")
|
|
53100
53107
|
throw new TypeError("init must be an object.");
|
|
53101
|
-
if (i.format === void 0 || !
|
|
53108
|
+
if (i.format === void 0 || !gX.has(i.format))
|
|
53102
53109
|
throw new TypeError("init.format must be one of: " + tm.join(", "));
|
|
53103
53110
|
if (!Number.isInteger(i.codedWidth) || i.codedWidth <= 0)
|
|
53104
53111
|
throw new TypeError("init.codedWidth must be a positive integer.");
|
|
@@ -53129,7 +53136,7 @@ class Xi {
|
|
|
53129
53136
|
if (i.displayWidth !== void 0 != (i.displayHeight !== void 0))
|
|
53130
53137
|
throw new TypeError("init.displayWidth and init.displayHeight must be either both provided or both omitted.");
|
|
53131
53138
|
this.format = i.format, this.rotation = i.rotation ?? 0, this.timestamp = i.timestamp, this.duration = i.duration ?? 0;
|
|
53132
|
-
const r = i.layout ??
|
|
53139
|
+
const r = i.layout ?? vX(i.format, i.codedWidth, i.codedHeight);
|
|
53133
53140
|
let n = i.colorSpace ?? null;
|
|
53134
53141
|
n === null && (this.format === "RGBA" || this.format === "RGBX" || this.format === "BGRA" || this.format === "BGRX" ? n = {
|
|
53135
53142
|
primaries: "bt709",
|
|
@@ -53300,7 +53307,7 @@ class Xi {
|
|
|
53300
53307
|
if (this._data instanceof pa) {
|
|
53301
53308
|
const u = { stack: [], error: void 0, hasError: !1 };
|
|
53302
53309
|
try {
|
|
53303
|
-
const c =
|
|
53310
|
+
const c = pX(u, await this._data.toRgbSample({
|
|
53304
53311
|
timestamp: this.timestamp,
|
|
53305
53312
|
duration: this.duration,
|
|
53306
53313
|
rotation: this.rotation
|
|
@@ -53313,7 +53320,7 @@ class Xi {
|
|
|
53313
53320
|
} catch (c) {
|
|
53314
53321
|
u.error = c, u.hasError = !0;
|
|
53315
53322
|
} finally {
|
|
53316
|
-
|
|
53323
|
+
mX(u);
|
|
53317
53324
|
}
|
|
53318
53325
|
} else {
|
|
53319
53326
|
if (typeof VideoFrame > "u")
|
|
@@ -53574,7 +53581,7 @@ class Xi {
|
|
|
53574
53581
|
},
|
|
53575
53582
|
alpha: t.alpha ?? "keep"
|
|
53576
53583
|
};
|
|
53577
|
-
for (const v of
|
|
53584
|
+
for (const v of yX) {
|
|
53578
53585
|
let g = v(this, f);
|
|
53579
53586
|
if (g instanceof Promise && (g = await g), g !== null)
|
|
53580
53587
|
return g;
|
|
@@ -53593,7 +53600,7 @@ class Xi {
|
|
|
53593
53600
|
throw new Error("Cannot transform VideoSamples in this environment. Either run in an environment with OffscreenCanvas or HTMLCanvasElement, or supply a custom VideoSample transformer using registerVideoSampleTransformer().");
|
|
53594
53601
|
d = document.createElement("canvas"), d.width = f.width, d.height = f.height;
|
|
53595
53602
|
}
|
|
53596
|
-
h = !0, Tl.length >=
|
|
53603
|
+
h = !0, Tl.length >= bX && Tl.splice(W5(Tl, (v) => v.age), 1), Tl.push({
|
|
53597
53604
|
canvas: d,
|
|
53598
53605
|
age: Uw++
|
|
53599
53606
|
});
|
|
@@ -53643,7 +53650,7 @@ class Xi {
|
|
|
53643
53650
|
this.close();
|
|
53644
53651
|
}
|
|
53645
53652
|
}
|
|
53646
|
-
const
|
|
53653
|
+
const yX = [], bX = 3, Tl = [];
|
|
53647
53654
|
let Uw = 0;
|
|
53648
53655
|
class B0 {
|
|
53649
53656
|
/** Creates a new VideoSampleColorSpace. */
|
|
@@ -53720,7 +53727,7 @@ const Il = (e) => typeof VideoFrame < "u" && e instanceof VideoFrame, em = (e, t
|
|
|
53720
53727
|
if (e.rect.height !== void 0 && (!Number.isInteger(e.rect.height) || e.rect.height < 0))
|
|
53721
53728
|
throw new TypeError("options.rect.height, when provided, must be a non-negative integer.");
|
|
53722
53729
|
}
|
|
53723
|
-
},
|
|
53730
|
+
}, vX = (e, t, i) => {
|
|
53724
53731
|
const r = bh(e), n = [];
|
|
53725
53732
|
let s = 0;
|
|
53726
53733
|
for (const a of r) {
|
|
@@ -53793,7 +53800,7 @@ const Il = (e) => typeof VideoFrame < "u" && e instanceof VideoFrame, em = (e, t
|
|
|
53793
53800
|
top: 0,
|
|
53794
53801
|
width: e.codedWidth,
|
|
53795
53802
|
height: e.codedHeight
|
|
53796
|
-
}, r = t.rect, n =
|
|
53803
|
+
}, r = t.rect, n = wX(i, r, e.codedWidth, e.codedHeight, e.format), s = t.layout;
|
|
53797
53804
|
let a;
|
|
53798
53805
|
if (!t.format || t.format === e.format)
|
|
53799
53806
|
a = e.format;
|
|
@@ -53801,8 +53808,8 @@ const Il = (e) => typeof VideoFrame < "u" && e instanceof VideoFrame, em = (e, t
|
|
|
53801
53808
|
a = t.format;
|
|
53802
53809
|
else
|
|
53803
53810
|
throw new Error("NotSupportedError: Invalid destination format.");
|
|
53804
|
-
return
|
|
53805
|
-
},
|
|
53811
|
+
return CX(n, a, s);
|
|
53812
|
+
}, wX = (e, t, i, r, n) => {
|
|
53806
53813
|
const s = { ...e };
|
|
53807
53814
|
if (t !== void 0) {
|
|
53808
53815
|
if (t.width === 0 || t.height === 0)
|
|
@@ -53813,10 +53820,10 @@ const Il = (e) => typeof VideoFrame < "u" && e instanceof VideoFrame, em = (e, t
|
|
|
53813
53820
|
throw new TypeError("visibleRect exceeds codedHeight.");
|
|
53814
53821
|
s.x = t.x || 0, s.y = t.y || 0, s.width = t.width || 0, s.height = t.height || 0;
|
|
53815
53822
|
}
|
|
53816
|
-
if (!
|
|
53823
|
+
if (!xX(n, s))
|
|
53817
53824
|
throw new TypeError("visibleRect alignment is invalid for the format.");
|
|
53818
53825
|
return s;
|
|
53819
|
-
},
|
|
53826
|
+
}, xX = (e, t) => {
|
|
53820
53827
|
if (e === null)
|
|
53821
53828
|
return !0;
|
|
53822
53829
|
const i = bh(e);
|
|
@@ -53826,7 +53833,7 @@ const Il = (e) => typeof VideoFrame < "u" && e instanceof VideoFrame, em = (e, t
|
|
|
53826
53833
|
return !1;
|
|
53827
53834
|
}
|
|
53828
53835
|
return !0;
|
|
53829
|
-
},
|
|
53836
|
+
}, CX = (e, t, i) => {
|
|
53830
53837
|
const r = bh(t), n = r.length;
|
|
53831
53838
|
if (i !== void 0 && i.length !== n)
|
|
53832
53839
|
throw new TypeError(`Layout must have ${n} planes.`);
|
|
@@ -53988,7 +53995,7 @@ class zr {
|
|
|
53988
53995
|
throw new RangeError("Destination buffer is too small");
|
|
53989
53996
|
const w = ui(t), C = TE(l);
|
|
53990
53997
|
if (Pl(this._data))
|
|
53991
|
-
nf() && c > 2 && l !== o ?
|
|
53998
|
+
nf() && c > 2 && l !== o ? _X(this._data, w, o, l, c, a, f, d) : this._data.copyTo(t, {
|
|
53992
53999
|
planeIndex: a,
|
|
53993
54000
|
frameOffset: f,
|
|
53994
54001
|
frameCount: d,
|
|
@@ -54281,7 +54288,7 @@ const Ns = (e) => {
|
|
|
54281
54288
|
case "f32-planar":
|
|
54282
54289
|
return (t, i, r) => t.setFloat32(i, r, !0);
|
|
54283
54290
|
}
|
|
54284
|
-
}, Pl = (e) => typeof AudioData < "u" && e instanceof AudioData,
|
|
54291
|
+
}, Pl = (e) => typeof AudioData < "u" && e instanceof AudioData, kX = (e) => {
|
|
54285
54292
|
switch (e) {
|
|
54286
54293
|
case "u8-planar":
|
|
54287
54294
|
return "u8";
|
|
@@ -54294,7 +54301,7 @@ const Ns = (e) => {
|
|
|
54294
54301
|
default:
|
|
54295
54302
|
return e;
|
|
54296
54303
|
}
|
|
54297
|
-
},
|
|
54304
|
+
}, _X = (e, t, i, r, n, s, a, o) => {
|
|
54298
54305
|
const l = AE(i), u = TE(r), c = Ns(i), f = Ns(r), d = ba(i);
|
|
54299
54306
|
if (ba(r))
|
|
54300
54307
|
if (d) {
|
|
@@ -54350,7 +54357,7 @@ const Ns = (e) => {
|
|
|
54350
54357
|
u(t, _, S);
|
|
54351
54358
|
}
|
|
54352
54359
|
}
|
|
54353
|
-
},
|
|
54360
|
+
}, SX = (e, t) => {
|
|
54354
54361
|
const i = e.allocationSize({ format: t, planeIndex: 0 }), r = new ArrayBuffer(i);
|
|
54355
54362
|
return e.copyTo(r, { format: t, planeIndex: 0 }), new zr({
|
|
54356
54363
|
data: r,
|
|
@@ -54368,7 +54375,7 @@ const Ns = (e) => {
|
|
|
54368
54375
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
54369
54376
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
54370
54377
|
*/
|
|
54371
|
-
const
|
|
54378
|
+
const EX = (e) => {
|
|
54372
54379
|
if (!e || typeof e != "object")
|
|
54373
54380
|
throw new TypeError("Encoding config must be an object.");
|
|
54374
54381
|
if (!qs.includes(e.codec))
|
|
@@ -54407,8 +54414,8 @@ const SX = (e) => {
|
|
|
54407
54414
|
throw new TypeError("config.onEncoderConfig, when provided, must be a function.");
|
|
54408
54415
|
if (e.onEncodedSample !== void 0 && typeof e.onEncodedSample != "function")
|
|
54409
54416
|
throw new TypeError("config.onEncodedSample, when provided, must be a function.");
|
|
54410
|
-
|
|
54411
|
-
},
|
|
54417
|
+
AX(e.codec, e);
|
|
54418
|
+
}, AX = (e, t) => {
|
|
54412
54419
|
if (!t || typeof t != "object")
|
|
54413
54420
|
throw new TypeError("Encoding options must be an object.");
|
|
54414
54421
|
if (t.alpha !== void 0 && !["discard", "keep"].includes(t.alpha))
|
|
@@ -54427,10 +54434,10 @@ const SX = (e) => {
|
|
|
54427
54434
|
throw new TypeError("scalabilityMode, when provided, must be a string.");
|
|
54428
54435
|
if (t.contentHint !== void 0 && typeof t.contentHint != "string")
|
|
54429
54436
|
throw new TypeError("contentHint, when provided, must be a string.");
|
|
54430
|
-
},
|
|
54437
|
+
}, TX = (e) => {
|
|
54431
54438
|
const t = e.bitrate instanceof vh ? e.bitrate._toVideoBitrate(e.codec, e.width, e.height) : e.bitrate;
|
|
54432
54439
|
return {
|
|
54433
|
-
codec: e.fullCodecString ??
|
|
54440
|
+
codec: e.fullCodecString ?? tY(e.codec, e.width, e.height, t, e.alpha === "keep"),
|
|
54434
54441
|
width: e.width,
|
|
54435
54442
|
height: e.height,
|
|
54436
54443
|
displayWidth: e.squarePixelWidth,
|
|
@@ -54443,9 +54450,9 @@ const SX = (e) => {
|
|
|
54443
54450
|
hardwareAcceleration: e.hardwareAcceleration,
|
|
54444
54451
|
scalabilityMode: e.scalabilityMode,
|
|
54445
54452
|
contentHint: e.contentHint,
|
|
54446
|
-
...
|
|
54453
|
+
...rY(e.codec)
|
|
54447
54454
|
};
|
|
54448
|
-
},
|
|
54455
|
+
}, IX = (e) => {
|
|
54449
54456
|
if (!e || typeof e != "object")
|
|
54450
54457
|
throw new TypeError("Encoding config must be an object.");
|
|
54451
54458
|
if (!Go.includes(e.codec))
|
|
@@ -54472,8 +54479,8 @@ const SX = (e) => {
|
|
|
54472
54479
|
throw new TypeError("config.onEncoderConfig, when provided, must be a function.");
|
|
54473
54480
|
if (e.onEncodedSample !== void 0 && typeof e.onEncodedSample != "function")
|
|
54474
54481
|
throw new TypeError("config.onEncodedSample, when provided, must be a function.");
|
|
54475
|
-
|
|
54476
|
-
},
|
|
54482
|
+
DX(e.codec, e);
|
|
54483
|
+
}, DX = (e, t) => {
|
|
54477
54484
|
if (!t || typeof t != "object")
|
|
54478
54485
|
throw new TypeError("Encoding options must be an object.");
|
|
54479
54486
|
if (t.bitrateMode !== void 0 && !["constant", "variable"].includes(t.bitrateMode))
|
|
@@ -54482,15 +54489,15 @@ const SX = (e) => {
|
|
|
54482
54489
|
throw new TypeError("fullCodecString, when provided, must be a string.");
|
|
54483
54490
|
if (t.fullCodecString !== void 0 && Q5(t.fullCodecString) !== e)
|
|
54484
54491
|
throw new TypeError(`fullCodecString, when provided, must be a string that matches the specified codec (${e}).`);
|
|
54485
|
-
},
|
|
54492
|
+
}, PX = (e) => {
|
|
54486
54493
|
const t = e.bitrate instanceof vh ? e.bitrate._toAudioBitrate(e.codec) : e.bitrate;
|
|
54487
54494
|
return {
|
|
54488
|
-
codec: e.fullCodecString ??
|
|
54495
|
+
codec: e.fullCodecString ?? iY(e.codec, e.numberOfChannels, e.sampleRate),
|
|
54489
54496
|
numberOfChannels: e.numberOfChannels,
|
|
54490
54497
|
sampleRate: e.sampleRate,
|
|
54491
54498
|
bitrate: t,
|
|
54492
54499
|
bitrateMode: e.bitrateMode,
|
|
54493
|
-
...
|
|
54500
|
+
...nY(e.codec)
|
|
54494
54501
|
};
|
|
54495
54502
|
};
|
|
54496
54503
|
class vh {
|
|
@@ -54564,7 +54571,7 @@ class vh {
|
|
|
54564
54571
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
54565
54572
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
54566
54573
|
*/
|
|
54567
|
-
const IE = [],
|
|
54574
|
+
const IE = [], FX = [], BX = [], NX = [];
|
|
54568
54575
|
/*!
|
|
54569
54576
|
* Copyright (c) 2026-present, Vanilagy and contributors
|
|
54570
54577
|
*
|
|
@@ -54572,12 +54579,12 @@ const IE = [], PX = [], FX = [], BX = [];
|
|
|
54572
54579
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
54573
54580
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
54574
54581
|
*/
|
|
54575
|
-
const
|
|
54582
|
+
const MX = (e) => {
|
|
54576
54583
|
let r = e, n = 4096, s = 0, a = 12, o = 0;
|
|
54577
54584
|
for (r < 0 && (r = -r, s = 128), r += 33, r > 8191 && (r = 8191); (r & n) !== n && a >= 5; )
|
|
54578
54585
|
n >>= 1, a--;
|
|
54579
54586
|
return o = r >> a - 4 & 15, ~(s | a - 5 << 4 | o) & 255;
|
|
54580
|
-
},
|
|
54587
|
+
}, zX = (e) => {
|
|
54581
54588
|
let i = 2048, r = 0, n = 11, s = 0, a = e;
|
|
54582
54589
|
for (a < 0 && (a = -a, r = 128), a > 4095 && (a = 4095); (a & i) !== i && n >= 5; )
|
|
54583
54590
|
i >>= 1, n--;
|
|
@@ -54757,12 +54764,12 @@ class DE {
|
|
|
54757
54764
|
};
|
|
54758
54765
|
}
|
|
54759
54766
|
}
|
|
54760
|
-
class
|
|
54767
|
+
class OX {
|
|
54761
54768
|
constructor(t, i) {
|
|
54762
54769
|
this.onSample = t, this.onError = i;
|
|
54763
54770
|
}
|
|
54764
54771
|
}
|
|
54765
|
-
class
|
|
54772
|
+
class RX {
|
|
54766
54773
|
/** @internal */
|
|
54767
54774
|
mediaSamplesInRange(t = -1 / 0, i = 1 / 0, r) {
|
|
54768
54775
|
Na(t), Na(i);
|
|
@@ -54837,8 +54844,8 @@ class OX {
|
|
|
54837
54844
|
}
|
|
54838
54845
|
/** @internal */
|
|
54839
54846
|
mediaSamplesAtTimestamps(t, i) {
|
|
54840
|
-
|
|
54841
|
-
const r =
|
|
54847
|
+
$q(t);
|
|
54848
|
+
const r = Lq(t), n = [], s = [];
|
|
54842
54849
|
let { promise: a, resolve: o } = Di(), { promise: l, resolve: u } = Di(), c = !1, f = !1, d = null, h = !1;
|
|
54843
54850
|
const m = (C) => {
|
|
54844
54851
|
s.push(C), o(), { promise: a, resolve: o } = Di();
|
|
@@ -54933,7 +54940,7 @@ class OX {
|
|
|
54933
54940
|
}
|
|
54934
54941
|
}
|
|
54935
54942
|
const Ww = (e) => e === 0 ? 40 : 8;
|
|
54936
|
-
class
|
|
54943
|
+
class VX extends OX {
|
|
54937
54944
|
constructor(t, i, r, n, s, a) {
|
|
54938
54945
|
super(t, i), this.codec = r, this.decoderConfig = n, this.rotation = s, this.timeResolution = a, this.decoder = null, this.customDecoder = null, this.customDecoderCallSerializer = new qy(), this.customDecoderQueueSize = 0, this.inputTimestamps = [], this.sampleQueue = [], this.currentPacketIndex = 0, this.raslSkipped = !1, this.alphaDecoder = null, this.alphaHadKeyframe = !1, this.colorQueue = [], this.alphaQueue = [], this.merger = null, this.decodedAlphaChunkCount = 0, this.alphaDecoderQueueSize = 0, this.nullAlphaFrameQueue = [], this.currentAlphaPacketIndex = 0, this.alphaRaslSkipped = !1, this.finalSamples = [], this.mergeAlphaPromises = [];
|
|
54939
54946
|
const o = IE.find((l) => l.supports(r, n));
|
|
@@ -54954,7 +54961,7 @@ class RX extends zX {
|
|
|
54954
54961
|
this.colorQueue.push(c);
|
|
54955
54962
|
};
|
|
54956
54963
|
if (r === "avc" && this.decoderConfig.description && qp()) {
|
|
54957
|
-
const c =
|
|
54964
|
+
const c = gY(Ki(this.decoderConfig.description));
|
|
54958
54965
|
if (c && c.sequenceParameterSets.length > 0) {
|
|
54959
54966
|
const f = aE(c.sequenceParameterSets[0]);
|
|
54960
54967
|
f && f.frameMbsOnlyFlag === 0 && (this.decoderConfig = {
|
|
@@ -55003,10 +55010,10 @@ class RX extends zX {
|
|
|
55003
55010
|
}
|
|
55004
55011
|
a >= 20 && a <= 31 || i.push(t.data.subarray(s.offset, s.offset + s.length));
|
|
55005
55012
|
}
|
|
55006
|
-
const n =
|
|
55013
|
+
const n = pY(i, this.decoderConfig);
|
|
55007
55014
|
t = new bi(n, t.type, t.timestamp, t.duration);
|
|
55008
55015
|
} else if (this.codec === "hevc") {
|
|
55009
|
-
const i =
|
|
55016
|
+
const i = EY(t.data, this.decoderConfig);
|
|
55010
55017
|
i && (t = new bi(i, t.type, t.timestamp, t.duration));
|
|
55011
55018
|
}
|
|
55012
55019
|
}
|
|
@@ -55019,7 +55026,7 @@ class RX extends zX {
|
|
|
55019
55026
|
this.pushNullAlphaFrame();
|
|
55020
55027
|
return;
|
|
55021
55028
|
}
|
|
55022
|
-
if (this.merger || (this.merger = new
|
|
55029
|
+
if (this.merger || (this.merger = new LX()), !this.alphaDecoder) {
|
|
55023
55030
|
const r = (s) => {
|
|
55024
55031
|
if (this.colorQueue.length > 0) {
|
|
55025
55032
|
const a = this.colorQueue.shift();
|
|
@@ -55136,14 +55143,14 @@ class RX extends zX {
|
|
|
55136
55143
|
}
|
|
55137
55144
|
}
|
|
55138
55145
|
let M0 = null;
|
|
55139
|
-
class
|
|
55146
|
+
class LX {
|
|
55140
55147
|
constructor() {
|
|
55141
55148
|
this.workers = [], this.nextWorkerIndex = 0, this.pendingRequests = /* @__PURE__ */ new Map(), this.nextRequestId = 0;
|
|
55142
55149
|
}
|
|
55143
55150
|
merge(t, i) {
|
|
55144
55151
|
if (this.workers.length === 0) {
|
|
55145
55152
|
if (!M0) {
|
|
55146
|
-
const o = new Blob([`(${
|
|
55153
|
+
const o = new Blob([`(${$X.toString()})()`], { type: "application/javascript" });
|
|
55147
55154
|
M0 = URL.createObjectURL(o);
|
|
55148
55155
|
}
|
|
55149
55156
|
const a = mi(navigator.hardwareConcurrency, 1, 4);
|
|
@@ -55175,7 +55182,7 @@ class VX {
|
|
|
55175
55182
|
this.pendingRequests.clear();
|
|
55176
55183
|
}
|
|
55177
55184
|
}
|
|
55178
|
-
const
|
|
55185
|
+
const $X = () => {
|
|
55179
55186
|
let e = null, t = null, i = Promise.resolve();
|
|
55180
55187
|
self.addEventListener("message", (l) => {
|
|
55181
55188
|
const { id: u, color: c, alpha: f } = l.data;
|
|
@@ -55275,7 +55282,7 @@ const LX = () => {
|
|
|
55275
55282
|
if (e.optimizeForLatency !== void 0 && typeof e.optimizeForLatency != "boolean")
|
|
55276
55283
|
throw new TypeError("decoderOptions.optimizeForLatency, when provided, must be a boolean.");
|
|
55277
55284
|
};
|
|
55278
|
-
class
|
|
55285
|
+
class UX extends RX {
|
|
55279
55286
|
/** Creates a new {@link VideoSampleSink} for the given {@link InputVideoTrack}. */
|
|
55280
55287
|
constructor(t, i = {}) {
|
|
55281
55288
|
if (!(t instanceof wh))
|
|
@@ -55293,7 +55300,7 @@ class $X extends OX {
|
|
|
55293
55300
|
...s,
|
|
55294
55301
|
hardwareAcceleration: this._decoderOptions.hardwareAcceleration,
|
|
55295
55302
|
optimizeForLatency: this._decoderOptions.optimizeForLatency
|
|
55296
|
-
}, new
|
|
55303
|
+
}, new VX(t, i, r, s, n, a);
|
|
55297
55304
|
}
|
|
55298
55305
|
/** @internal */
|
|
55299
55306
|
_createPacketSink() {
|
|
@@ -55340,7 +55347,7 @@ class $X extends OX {
|
|
|
55340
55347
|
return this.mediaSamplesAtTimestamps(t, i);
|
|
55341
55348
|
}
|
|
55342
55349
|
}
|
|
55343
|
-
class
|
|
55350
|
+
class ZX {
|
|
55344
55351
|
/** Creates a new {@link CanvasSink} for the given {@link InputVideoTrack}. */
|
|
55345
55352
|
constructor(t, i = {}) {
|
|
55346
55353
|
if (this._rotation = 0, this._initPromise = null, this._nextCanvasIndex = 0, !(t instanceof wh))
|
|
@@ -55361,7 +55368,7 @@ class UX {
|
|
|
55361
55368
|
throw new TypeError("options.rotation, when provided, must be 0, 90, 180 or 270.");
|
|
55362
55369
|
if (i.crop !== void 0 && Kf(i.crop, "options."), i.poolSize !== void 0 && (typeof i.poolSize != "number" || !Number.isInteger(i.poolSize) || i.poolSize < 0))
|
|
55363
55370
|
throw new TypeError("poolSize must be a non-negative integer.");
|
|
55364
|
-
i.decoderOptions !== void 0 && PE(i.decoderOptions), this._videoTrack = t, this._alpha = i.alpha ?? !1, this._options = i, this._fit = i.fit ?? "fill", this._videoSampleSink = new
|
|
55371
|
+
i.decoderOptions !== void 0 && PE(i.decoderOptions), this._videoTrack = t, this._alpha = i.alpha ?? !1, this._options = i, this._fit = i.fit ?? "fill", this._videoSampleSink = new UX(t, i.decoderOptions), this._canvasPool = Array.from({ length: i.poolSize ?? 0 }, () => null);
|
|
55365
55372
|
}
|
|
55366
55373
|
/** @internal */
|
|
55367
55374
|
_ensureInit() {
|
|
@@ -55991,7 +55998,7 @@ class FE extends uc {
|
|
|
55991
55998
|
if (!t)
|
|
55992
55999
|
return !1;
|
|
55993
56000
|
const i = await this._backing.getCodec();
|
|
55994
|
-
return N(i !== null),
|
|
56001
|
+
return N(i !== null), FX.some((r) => r.supports(i, t)) || t.codec.startsWith("pcm-") ? !0 : typeof AudioDecoder > "u" ? !1 : (await AudioDecoder.isConfigSupported(t)).supported === !0;
|
|
55995
56002
|
} catch (t) {
|
|
55996
56003
|
return Qt._error("Error during decodability check:", t), !1;
|
|
55997
56004
|
}
|
|
@@ -56070,7 +56077,7 @@ const Hw = (e) => -(e ?? -1 / 0), Fl = (e) => -e, Bl = (e) => {
|
|
|
56070
56077
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
56071
56078
|
*/
|
|
56072
56079
|
Yy();
|
|
56073
|
-
const
|
|
56080
|
+
const jX = 1;
|
|
56074
56081
|
class u1 extends oc {
|
|
56075
56082
|
/** True if the input has been disposed. */
|
|
56076
56083
|
get disposed() {
|
|
@@ -56091,7 +56098,7 @@ class u1 extends oc {
|
|
|
56091
56098
|
throw new TypeError("options.source must not be a disposed Source.");
|
|
56092
56099
|
if (t.initInput !== void 0 && !(t.initInput instanceof u1))
|
|
56093
56100
|
throw new TypeError("options.initInput, when provided, must be an Input.");
|
|
56094
|
-
t.formatOptions !== void 0 &&
|
|
56101
|
+
t.formatOptions !== void 0 && hX(t.formatOptions, "formatOptions"), this._formats = t.formats, this._initInput = t.initInput ?? null, this._formatOptions = t.formatOptions ?? {}, t.source instanceof Ba ? this._rootRef = t.source.ref() : this._rootRef = t.source, this._sourceRefs.push(this._rootRef);
|
|
56095
56102
|
}
|
|
56096
56103
|
/** @internal */
|
|
56097
56104
|
get _rootSource() {
|
|
@@ -56104,7 +56111,7 @@ class u1 extends oc {
|
|
|
56104
56111
|
return this._emit("source", { source: i.source, request: t, isRoot: t.isRoot }), i;
|
|
56105
56112
|
}
|
|
56106
56113
|
/** @internal */
|
|
56107
|
-
_getSourceCached(t, i =
|
|
56114
|
+
_getSourceCached(t, i = jX) {
|
|
56108
56115
|
const r = this._sourceCache.find((a) => a.cacheGroup === i && Rw(a.request, t));
|
|
56109
56116
|
if (r)
|
|
56110
56117
|
return r.age++, Promise.resolve(r.sourceRef.source.ref());
|
|
@@ -56113,7 +56120,7 @@ class u1 extends oc {
|
|
|
56113
56120
|
return n.promise.then((a) => a.sourceRef.source.ref());
|
|
56114
56121
|
const s = (async () => {
|
|
56115
56122
|
const a = await this._getSourceUncached(t);
|
|
56116
|
-
if (
|
|
56123
|
+
if (Yq(this._sourceCache, (f) => f.cacheGroup === i && f.sourceRef.source._refCount === 1) >= 4) {
|
|
56117
56124
|
const f = W5(this._sourceCache, (h) => h.cacheGroup === i && h.sourceRef.source._refCount === 1 ? h.age : 1 / 0);
|
|
56118
56125
|
N(f !== -1);
|
|
56119
56126
|
const d = this._sourceCache[f];
|
|
@@ -56140,7 +56147,7 @@ class u1 extends oc {
|
|
|
56140
56147
|
/** @internal */
|
|
56141
56148
|
_getDemuxer() {
|
|
56142
56149
|
return this._demuxerPromise ??= (async () => {
|
|
56143
|
-
this._reader = new
|
|
56150
|
+
this._reader = new WX(this._rootSource), this._emit("source", { source: this._rootSource, request: null, isRoot: !0 });
|
|
56144
56151
|
for (const t of this._formats)
|
|
56145
56152
|
if (await t._canReadInput(this))
|
|
56146
56153
|
return this._format = t, this._onFormatDetermined?.(t), t._createDemuxer(this);
|
|
@@ -56351,7 +56358,7 @@ class wr extends Error {
|
|
|
56351
56358
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
56352
56359
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
56353
56360
|
*/
|
|
56354
|
-
class
|
|
56361
|
+
class WX {
|
|
56355
56362
|
constructor(t) {
|
|
56356
56363
|
this.source = t;
|
|
56357
56364
|
}
|
|
@@ -56472,10 +56479,10 @@ const Rn = (e, t) => {
|
|
|
56472
56479
|
}, Br = (e) => {
|
|
56473
56480
|
const t = bt(e), i = bt(e);
|
|
56474
56481
|
return t * 4294967296 + i;
|
|
56475
|
-
},
|
|
56482
|
+
}, HX = (e) => {
|
|
56476
56483
|
const t = Ea(e), i = bt(e);
|
|
56477
56484
|
return t * 4294967296 + i;
|
|
56478
|
-
},
|
|
56485
|
+
}, GX = (e) => {
|
|
56479
56486
|
Rn(e, 4);
|
|
56480
56487
|
const t = e.view.getFloat32(e.bufferPos, !1);
|
|
56481
56488
|
return e.bufferPos += 4, t;
|
|
@@ -56497,7 +56504,7 @@ const Rn = (e, t) => {
|
|
|
56497
56504
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
56498
56505
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
56499
56506
|
*/
|
|
56500
|
-
class
|
|
56507
|
+
class qX {
|
|
56501
56508
|
constructor(t) {
|
|
56502
56509
|
this.mutex = new R5(), this.trackTimestampInfo = /* @__PURE__ */ new WeakMap(), this.output = t;
|
|
56503
56510
|
}
|
|
@@ -56529,7 +56536,7 @@ class GX {
|
|
|
56529
56536
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
56530
56537
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
56531
56538
|
*/
|
|
56532
|
-
const qw = /<(?:(\d{2}):)?(\d{2}):(\d{2}).(\d{3})>/g,
|
|
56539
|
+
const qw = /<(?:(\d{2}):)?(\d{2}):(\d{2}).(\d{3})>/g, YX = (e) => {
|
|
56533
56540
|
const t = Math.floor(e / 36e5), i = Math.floor(e % (60 * 60 * 1e3) / (60 * 1e3)), r = Math.floor(e % (60 * 1e3) / 1e3), n = e % 1e3;
|
|
56534
56541
|
return t.toString().padStart(2, "0") + ":" + i.toString().padStart(2, "0") + ":" + r.toString().padStart(2, "0") + "." + n.toString().padStart(3, "0");
|
|
56535
56542
|
};
|
|
@@ -56591,7 +56598,7 @@ class Uc {
|
|
|
56591
56598
|
}
|
|
56592
56599
|
}
|
|
56593
56600
|
}
|
|
56594
|
-
const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(ne.buffer), ni = (e) => [(e % 256 + 256) % 256], $t = (e) => (Ur.setUint16(0, e, !1), [ne[0], ne[1]]), c1 = (e) => (Ur.setInt16(0, e, !1), [ne[0], ne[1]]), NE = (e) => (Ur.setUint32(0, e, !1), [ne[1], ne[2], ne[3]]), ft = (e) => (Ur.setUint32(0, e, !1), [ne[0], ne[1], ne[2], ne[3]]), rs = (e) => (Ur.setInt32(0, e, !1), [ne[0], ne[1], ne[2], ne[3]]), On = (e) => (Ur.setUint32(0, Math.floor(e / 2 ** 32), !1), Ur.setUint32(4, e, !1), [ne[0], ne[1], ne[2], ne[3], ne[4], ne[5], ne[6], ne[7]]),
|
|
56601
|
+
const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(ne.buffer), ni = (e) => [(e % 256 + 256) % 256], $t = (e) => (Ur.setUint16(0, e, !1), [ne[0], ne[1]]), c1 = (e) => (Ur.setInt16(0, e, !1), [ne[0], ne[1]]), NE = (e) => (Ur.setUint32(0, e, !1), [ne[1], ne[2], ne[3]]), ft = (e) => (Ur.setUint32(0, e, !1), [ne[0], ne[1], ne[2], ne[3]]), rs = (e) => (Ur.setInt32(0, e, !1), [ne[0], ne[1], ne[2], ne[3]]), On = (e) => (Ur.setUint32(0, Math.floor(e / 2 ** 32), !1), Ur.setUint32(4, e, !1), [ne[0], ne[1], ne[2], ne[3], ne[4], ne[5], ne[6], ne[7]]), XX = (e) => (Ur.setInt32(0, Math.floor(e / 2 ** 32), !1), Ur.setUint32(4, e, !1), [ne[0], ne[1], ne[2], ne[3], ne[4], ne[5], ne[6], ne[7]]), ME = (e) => (Ur.setInt16(0, 2 ** 8 * e, !1), [ne[0], ne[1]]), tn = (e) => (Ur.setInt32(0, 2 ** 16 * e, !1), [ne[0], ne[1], ne[2], ne[3]]), R0 = (e) => (Ur.setInt32(0, 2 ** 30 * e, !1), [ne[0], ne[1], ne[2], ne[3]]), V0 = (e, t) => {
|
|
56595
56602
|
const i = [];
|
|
56596
56603
|
let r = e;
|
|
56597
56604
|
do {
|
|
@@ -56629,7 +56636,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56629
56636
|
type: e,
|
|
56630
56637
|
contents: t && new Uint8Array(t.flat(10)),
|
|
56631
56638
|
children: i
|
|
56632
|
-
}), _e = (e, t, i, r, n) => zt(e, [ni(t), NE(i), r ?? []], n),
|
|
56639
|
+
}), _e = (e, t, i, r, n) => zt(e, [ni(t), NE(i), r ?? []], n), KX = (e) => e.isQuickTime ? zt("ftyp", [
|
|
56633
56640
|
Me("qt "),
|
|
56634
56641
|
// Major brand
|
|
56635
56642
|
ft(512),
|
|
@@ -56698,12 +56705,12 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56698
56705
|
ft(0)
|
|
56699
56706
|
// Starts with SAP + SAP type + SAP delta time (no information provided)
|
|
56700
56707
|
]);
|
|
56701
|
-
}, Zc = (e) => ({ type: "mdat", largeSize: e }),
|
|
56702
|
-
|
|
56703
|
-
...e.trackDatas.map((t) =>
|
|
56704
|
-
e.isFragmented ?
|
|
56705
|
-
|
|
56706
|
-
]),
|
|
56708
|
+
}, Zc = (e) => ({ type: "mdat", largeSize: e }), JX = (e) => ({ type: "free", size: e }), Nl = (e) => zt("moov", void 0, [
|
|
56709
|
+
QX(e.creationTime, e.trackDatas),
|
|
56710
|
+
...e.trackDatas.map((t) => tK(t, e.creationTime)),
|
|
56711
|
+
e.isFragmented ? VK(e.trackDatas) : null,
|
|
56712
|
+
JK(e)
|
|
56713
|
+
]), QX = (e, t) => {
|
|
56707
56714
|
const i = Math.max(0, ...t.map((a) => Ye(xh(a), sn) + Ye(a.startTimestampOffset ?? 0, sn))), r = Math.max(0, ...t.map((a) => a.track.id)) + 1, n = !Gs(e) || !Gs(i), s = n ? On : ft;
|
|
56708
56715
|
return _e("mvhd", +n, 0, [
|
|
56709
56716
|
s(e),
|
|
@@ -56736,19 +56743,19 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56736
56743
|
n.timestamp < t && (t = n.timestamp), n.timestamp + n.duration > i && (i = n.timestamp + n.duration);
|
|
56737
56744
|
}
|
|
56738
56745
|
return t === 1 / 0 ? 0 : i - t;
|
|
56739
|
-
},
|
|
56740
|
-
const i =
|
|
56746
|
+
}, tK = (e, t) => {
|
|
56747
|
+
const i = uJ(e), r = e.startTimestampOffset !== null && e.startTimestampOffset > 0;
|
|
56741
56748
|
return zt("trak", void 0, [
|
|
56742
|
-
|
|
56743
|
-
r ?
|
|
56744
|
-
|
|
56749
|
+
eK(e, t),
|
|
56750
|
+
r ? iK(e, e.startTimestampOffset) : null,
|
|
56751
|
+
rK(e, t),
|
|
56745
56752
|
i.name !== void 0 ? zt("udta", void 0, [
|
|
56746
56753
|
zt("name", [
|
|
56747
56754
|
...In.encode(i.name)
|
|
56748
56755
|
])
|
|
56749
56756
|
]) : null
|
|
56750
56757
|
]);
|
|
56751
|
-
},
|
|
56758
|
+
}, eK = (e, t) => {
|
|
56752
56759
|
const i = Ye(xh(e), sn) + Ye(e.startTimestampOffset ?? 0, sn), r = !Gs(t) || !Gs(i), n = r ? On : ft;
|
|
56753
56760
|
let s;
|
|
56754
56761
|
if (e.type === "video") {
|
|
@@ -56785,8 +56792,8 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56785
56792
|
tn(e.type === "video" ? e.info.height : 0)
|
|
56786
56793
|
// Track height
|
|
56787
56794
|
]);
|
|
56788
|
-
},
|
|
56789
|
-
const i = Ye(t, sn), r = Ye(xh(e), sn), n = !Gs(i) || !Gs(r), s = n ? On : ft, a = n ?
|
|
56795
|
+
}, iK = (e, t) => {
|
|
56796
|
+
const i = Ye(t, sn), r = Ye(xh(e), sn), n = !Gs(i) || !Gs(r), s = n ? On : ft, a = n ? XX : rs;
|
|
56790
56797
|
return zt("edts", void 0, [
|
|
56791
56798
|
_e("elst", n ? 1 : 0, 0, [
|
|
56792
56799
|
ft(2),
|
|
@@ -56807,11 +56814,11 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56807
56814
|
// Media rate
|
|
56808
56815
|
])
|
|
56809
56816
|
]);
|
|
56810
|
-
},
|
|
56811
|
-
|
|
56812
|
-
f1(!0,
|
|
56813
|
-
|
|
56814
|
-
]),
|
|
56817
|
+
}, rK = (e, t) => zt("mdia", void 0, [
|
|
56818
|
+
nK(e, t),
|
|
56819
|
+
f1(!0, sK[e.type], aK[e.type]),
|
|
56820
|
+
oK(e)
|
|
56821
|
+
]), nK = (e, t) => {
|
|
56815
56822
|
const i = Ye(xh(e), e.timescale), r = !Gs(t) || !Gs(i), n = r ? On : ft;
|
|
56816
56823
|
return _e("mdhd", +r, 0, [
|
|
56817
56824
|
n(t),
|
|
@@ -56827,11 +56834,11 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56827
56834
|
$t(0)
|
|
56828
56835
|
// Quality
|
|
56829
56836
|
]);
|
|
56830
|
-
},
|
|
56837
|
+
}, sK = {
|
|
56831
56838
|
video: "vide",
|
|
56832
56839
|
audio: "soun",
|
|
56833
56840
|
subtitle: "text"
|
|
56834
|
-
},
|
|
56841
|
+
}, aK = {
|
|
56835
56842
|
video: "MediabunnyVideoHandler",
|
|
56836
56843
|
audio: "MediabunnySoundHandler",
|
|
56837
56844
|
subtitle: "MediabunnyTextHandler"
|
|
@@ -56848,11 +56855,11 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56848
56855
|
// Component flags mask
|
|
56849
56856
|
Me(i, !0)
|
|
56850
56857
|
// Component name
|
|
56851
|
-
]),
|
|
56852
|
-
|
|
56853
|
-
|
|
56854
|
-
|
|
56855
|
-
]),
|
|
56858
|
+
]), oK = (e) => zt("minf", void 0, [
|
|
56859
|
+
fK[e.type](),
|
|
56860
|
+
dK(),
|
|
56861
|
+
mK(e)
|
|
56862
|
+
]), lK = () => _e("vmhd", 0, 1, [
|
|
56856
56863
|
$t(0),
|
|
56857
56864
|
// Graphics mode
|
|
56858
56865
|
$t(0),
|
|
@@ -56861,49 +56868,49 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56861
56868
|
// Opcolor G
|
|
56862
56869
|
$t(0)
|
|
56863
56870
|
// Opcolor B
|
|
56864
|
-
]),
|
|
56871
|
+
]), uK = () => _e("smhd", 0, 0, [
|
|
56865
56872
|
$t(0),
|
|
56866
56873
|
// Balance
|
|
56867
56874
|
$t(0)
|
|
56868
56875
|
// Reserved
|
|
56869
|
-
]),
|
|
56870
|
-
video:
|
|
56871
|
-
audio:
|
|
56872
|
-
subtitle:
|
|
56873
|
-
},
|
|
56874
|
-
|
|
56875
|
-
]),
|
|
56876
|
+
]), cK = () => _e("nmhd", 0, 0), fK = {
|
|
56877
|
+
video: lK,
|
|
56878
|
+
audio: uK,
|
|
56879
|
+
subtitle: cK
|
|
56880
|
+
}, dK = () => zt("dinf", void 0, [
|
|
56881
|
+
hK()
|
|
56882
|
+
]), hK = () => _e("dref", 0, 0, [
|
|
56876
56883
|
ft(1)
|
|
56877
56884
|
// Entry count
|
|
56878
56885
|
], [
|
|
56879
|
-
|
|
56880
|
-
]),
|
|
56886
|
+
pK()
|
|
56887
|
+
]), pK = () => _e("url ", 0, 1), mK = (e) => {
|
|
56881
56888
|
const t = e.compositionTimeOffsetTable.length > 1 || e.compositionTimeOffsetTable.some((i) => i.sampleCompositionTimeOffset !== 0);
|
|
56882
56889
|
return zt("stbl", void 0, [
|
|
56883
|
-
|
|
56884
|
-
|
|
56885
|
-
t ? zK(e) : null,
|
|
56890
|
+
gK(e),
|
|
56891
|
+
FK(e),
|
|
56886
56892
|
t ? OK(e) : null,
|
|
56887
|
-
|
|
56893
|
+
t ? RK(e) : null,
|
|
56888
56894
|
NK(e),
|
|
56889
56895
|
MK(e),
|
|
56890
|
-
|
|
56896
|
+
zK(e),
|
|
56897
|
+
BK(e)
|
|
56891
56898
|
]);
|
|
56892
|
-
},
|
|
56899
|
+
}, gK = (e) => {
|
|
56893
56900
|
let t;
|
|
56894
56901
|
if (e.type === "video")
|
|
56895
|
-
t =
|
|
56902
|
+
t = yK(iJ(e.track.source._codec, e.info.decoderConfig.codec), e);
|
|
56896
56903
|
else if (e.type === "audio") {
|
|
56897
56904
|
const i = $E(e.track.source._codec, e.muxer.isQuickTime);
|
|
56898
|
-
N(i), t =
|
|
56899
|
-
} else e.type === "subtitle" && (t =
|
|
56905
|
+
N(i), t = kK(i, e);
|
|
56906
|
+
} else e.type === "subtitle" && (t = DK(sJ[e.track.source._codec], e));
|
|
56900
56907
|
return N(t), _e("stsd", 0, 0, [
|
|
56901
56908
|
ft(1)
|
|
56902
56909
|
// Entry count
|
|
56903
56910
|
], [
|
|
56904
56911
|
t
|
|
56905
56912
|
]);
|
|
56906
|
-
},
|
|
56913
|
+
}, yK = (e, t) => zt(e, [
|
|
56907
56914
|
Array(6).fill(0),
|
|
56908
56915
|
// Reserved
|
|
56909
56916
|
$t(1),
|
|
@@ -56933,13 +56940,13 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56933
56940
|
c1(65535)
|
|
56934
56941
|
// Pre-defined
|
|
56935
56942
|
], [
|
|
56936
|
-
|
|
56937
|
-
|
|
56938
|
-
|
|
56939
|
-
]),
|
|
56943
|
+
rJ[t.track.source._codec]?.(t) ?? null,
|
|
56944
|
+
bK(t),
|
|
56945
|
+
Oq(t.info.decoderConfig.colorSpace) ? vK(t) : null
|
|
56946
|
+
]), bK = (e) => e.info.pixelAspectRatio.num === e.info.pixelAspectRatio.den ? null : zt("pasp", [
|
|
56940
56947
|
ft(e.info.pixelAspectRatio.num),
|
|
56941
56948
|
ft(e.info.pixelAspectRatio.den)
|
|
56942
|
-
]),
|
|
56949
|
+
]), vK = (e) => zt("colr", [
|
|
56943
56950
|
Me(e.muxer.isQuickTime ? "nclc" : "nclx"),
|
|
56944
56951
|
// Colour type
|
|
56945
56952
|
$t(tl[e.info.decoderConfig.colorSpace.primaries]),
|
|
@@ -56950,10 +56957,10 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56950
56957
|
// Matrix coefficients
|
|
56951
56958
|
e.muxer.isQuickTime ? [] : ni((e.info.decoderConfig.colorSpace.fullRange ? 1 : 0) << 7)
|
|
56952
56959
|
// Full range flag
|
|
56953
|
-
]),
|
|
56960
|
+
]), wK = (e) => e.info.decoderConfig && zt("avcC", [
|
|
56954
56961
|
// For AVC, description is an AVCDecoderConfigurationRecord, so nothing else to do here
|
|
56955
56962
|
...Ki(e.info.decoderConfig.description)
|
|
56956
|
-
]),
|
|
56963
|
+
]), xK = (e) => e.info.decoderConfig && zt("hvcC", [
|
|
56957
56964
|
// For HEVC, description is an HEVCDecoderConfigurationRecord, so nothing else to do here
|
|
56958
56965
|
...Ki(e.info.decoderConfig.description)
|
|
56959
56966
|
]), Kw = (e) => {
|
|
@@ -56976,7 +56983,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
56976
56983
|
$t(0)
|
|
56977
56984
|
// Codec initialization data size
|
|
56978
56985
|
]);
|
|
56979
|
-
},
|
|
56986
|
+
}, CK = (e) => zt("av1C", eY(e.info.decoderConfig.codec)), kK = (e, t) => {
|
|
56980
56987
|
let i = 0, r, n = 16;
|
|
56981
56988
|
const s = $r.includes(t.track.source._codec);
|
|
56982
56989
|
if (s) {
|
|
@@ -57053,7 +57060,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57053
57060
|
];
|
|
57054
57061
|
}
|
|
57055
57062
|
return zt(e, r, [
|
|
57056
|
-
|
|
57063
|
+
nJ(t.track.source._codec, t.muxer.isQuickTime)?.(t) ?? null
|
|
57057
57064
|
]);
|
|
57058
57065
|
}, L0 = (e) => {
|
|
57059
57066
|
let t;
|
|
@@ -57114,23 +57121,23 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57114
57121
|
...i
|
|
57115
57122
|
], _e("esds", 0, 0, i);
|
|
57116
57123
|
}, Ds = (e) => zt("wave", void 0, [
|
|
57117
|
-
kK(e),
|
|
57118
57124
|
_K(e),
|
|
57125
|
+
SK(e),
|
|
57119
57126
|
zt("\0\0\0\0")
|
|
57120
57127
|
// NULL tag at the end
|
|
57121
|
-
]),
|
|
57128
|
+
]), _K = (e) => zt("frma", [
|
|
57122
57129
|
Me($E(e.track.source._codec, e.muxer.isQuickTime))
|
|
57123
|
-
]),
|
|
57130
|
+
]), SK = (e) => {
|
|
57124
57131
|
const { littleEndian: t } = Ys(e.track.source._codec);
|
|
57125
57132
|
return zt("enda", [
|
|
57126
57133
|
$t(+t)
|
|
57127
57134
|
]);
|
|
57128
|
-
},
|
|
57135
|
+
}, EK = (e) => {
|
|
57129
57136
|
let t = e.info.numberOfChannels, i = 3840, r = e.info.sampleRate, n = 0, s = 0, a = new Uint8Array(0);
|
|
57130
57137
|
const o = e.info.decoderConfig?.description;
|
|
57131
57138
|
if (o) {
|
|
57132
57139
|
N(o.byteLength >= 18);
|
|
57133
|
-
const l = Ki(o), u =
|
|
57140
|
+
const l = Ki(o), u = AY(l);
|
|
57134
57141
|
t = u.outputChannelCount, i = u.preSkip, r = u.inputSampleRate, n = u.outputGain, s = u.channelMappingFamily, u.channelMappingTable && (a = u.channelMappingTable);
|
|
57135
57142
|
}
|
|
57136
57143
|
return zt("dOps", [
|
|
@@ -57148,7 +57155,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57148
57155
|
// ChannelMappingFamily
|
|
57149
57156
|
...a
|
|
57150
57157
|
]);
|
|
57151
|
-
},
|
|
57158
|
+
}, AK = (e) => {
|
|
57152
57159
|
const t = e.info.decoderConfig?.description;
|
|
57153
57160
|
N(t);
|
|
57154
57161
|
const i = Ki(t);
|
|
@@ -57161,14 +57168,14 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57161
57168
|
ni(r),
|
|
57162
57169
|
ni(8 * i)
|
|
57163
57170
|
]);
|
|
57164
|
-
},
|
|
57165
|
-
const t =
|
|
57171
|
+
}, TK = (e) => {
|
|
57172
|
+
const t = TY(e.info.firstPacket.data);
|
|
57166
57173
|
if (!t)
|
|
57167
57174
|
throw new Error("Couldn't extract AC-3 frame info from the audio packet. Ensure the packets contain valid AC-3 sync frames (as specified in ETSI TS 102 366).");
|
|
57168
57175
|
const i = new Uint8Array(3), r = new ai(i);
|
|
57169
57176
|
return r.writeBits(2, t.fscod), r.writeBits(5, t.bsid), r.writeBits(3, t.bsmod), r.writeBits(3, t.acmod), r.writeBits(1, t.lfeon), r.writeBits(5, t.bitRateCode), r.writeBits(5, 0), zt("dac3", [...i]);
|
|
57170
|
-
},
|
|
57171
|
-
const t =
|
|
57177
|
+
}, IK = (e) => {
|
|
57178
|
+
const t = DY(e.info.firstPacket.data);
|
|
57172
57179
|
if (!t)
|
|
57173
57180
|
throw new Error("Couldn't extract E-AC-3 frame info from the audio packet. Ensure the packets contain valid E-AC-3 sync frames (as specified in ETSI TS 102 366).");
|
|
57174
57181
|
let i = 16;
|
|
@@ -57179,16 +57186,16 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57179
57186
|
for (const a of t.substreams)
|
|
57180
57187
|
s.writeBits(2, a.fscod), s.writeBits(5, a.bsid), s.writeBits(1, 0), s.writeBits(1, 0), s.writeBits(3, a.bsmod), s.writeBits(3, a.acmod), s.writeBits(1, a.lfeon), s.writeBits(3, 0), s.writeBits(4, a.numDepSub), a.numDepSub > 0 ? s.writeBits(9, a.chanLoc) : s.writeBits(1, 0);
|
|
57181
57188
|
return zt("dec3", [...n]);
|
|
57182
|
-
},
|
|
57189
|
+
}, DK = (e, t) => zt(e, [
|
|
57183
57190
|
Array(6).fill(0),
|
|
57184
57191
|
// Reserved
|
|
57185
57192
|
$t(1)
|
|
57186
57193
|
// Data reference index
|
|
57187
57194
|
], [
|
|
57188
|
-
|
|
57189
|
-
]),
|
|
57195
|
+
aJ[t.track.source._codec](t)
|
|
57196
|
+
]), PK = (e) => zt("vttC", [
|
|
57190
57197
|
...In.encode(e.info.config.description)
|
|
57191
|
-
]),
|
|
57198
|
+
]), FK = (e) => _e("stts", 0, 0, [
|
|
57192
57199
|
ft(e.timeToSampleTable.length),
|
|
57193
57200
|
// Number of entries
|
|
57194
57201
|
e.timeToSampleTable.map((t) => [
|
|
@@ -57197,7 +57204,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57197
57204
|
ft(t.sampleDelta)
|
|
57198
57205
|
// Sample duration
|
|
57199
57206
|
])
|
|
57200
|
-
]),
|
|
57207
|
+
]), BK = (e) => {
|
|
57201
57208
|
if (e.samples.every((i) => i.type === "key"))
|
|
57202
57209
|
return null;
|
|
57203
57210
|
const t = [...e.samples.entries()].filter(([, i]) => i.type === "key");
|
|
@@ -57207,7 +57214,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57207
57214
|
t.map(([i]) => ft(i + 1))
|
|
57208
57215
|
// Sync sample table
|
|
57209
57216
|
]);
|
|
57210
|
-
},
|
|
57217
|
+
}, NK = (e) => _e("stsc", 0, 0, [
|
|
57211
57218
|
ft(e.compactlyCodedChunkTable.length),
|
|
57212
57219
|
// Number of entries
|
|
57213
57220
|
e.compactlyCodedChunkTable.map((t) => [
|
|
@@ -57218,7 +57225,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57218
57225
|
ft(1)
|
|
57219
57226
|
// Sample description index
|
|
57220
57227
|
])
|
|
57221
|
-
]),
|
|
57228
|
+
]), MK = (e) => {
|
|
57222
57229
|
if (e.type === "audio" && e.info.requiresPcmTransformation) {
|
|
57223
57230
|
const { sampleSize: t } = Ys(e.track.source._codec);
|
|
57224
57231
|
return _e("stsz", 0, 0, [
|
|
@@ -57235,7 +57242,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57235
57242
|
e.samples.map((t) => ft(t.size))
|
|
57236
57243
|
// Sample size table
|
|
57237
57244
|
]);
|
|
57238
|
-
},
|
|
57245
|
+
}, zK = (e) => e.finalizedChunks.length > 0 && yi(e.finalizedChunks).offset >= 2 ** 32 ? _e("co64", 0, 0, [
|
|
57239
57246
|
ft(e.finalizedChunks.length),
|
|
57240
57247
|
// Number of entries
|
|
57241
57248
|
e.finalizedChunks.map((t) => On(t.offset))
|
|
@@ -57245,7 +57252,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57245
57252
|
// Number of entries
|
|
57246
57253
|
e.finalizedChunks.map((t) => ft(t.offset))
|
|
57247
57254
|
// Chunk offset table
|
|
57248
|
-
]),
|
|
57255
|
+
]), OK = (e) => _e("ctts", 1, 0, [
|
|
57249
57256
|
ft(e.compositionTimeOffsetTable.length),
|
|
57250
57257
|
// Number of entries
|
|
57251
57258
|
e.compositionTimeOffsetTable.map((t) => [
|
|
@@ -57254,7 +57261,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57254
57261
|
rs(t.sampleCompositionTimeOffset)
|
|
57255
57262
|
// Sample offset
|
|
57256
57263
|
])
|
|
57257
|
-
]),
|
|
57264
|
+
]), RK = (e) => {
|
|
57258
57265
|
let t = 1 / 0, i = -1 / 0, r = 1 / 0, n = -1 / 0;
|
|
57259
57266
|
N(e.compositionTimeOffsetTable.length > 0), N(e.samples.length > 0);
|
|
57260
57267
|
for (let a = 0; a < e.compositionTimeOffsetTable.length; a++) {
|
|
@@ -57278,7 +57285,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57278
57285
|
rs(n)
|
|
57279
57286
|
// Composition end time
|
|
57280
57287
|
]);
|
|
57281
|
-
},
|
|
57288
|
+
}, VK = (e) => zt("mvex", void 0, e.map(LK)), LK = (e) => _e("trex", 0, 0, [
|
|
57282
57289
|
ft(e.track.id),
|
|
57283
57290
|
// Track ID
|
|
57284
57291
|
ft(1),
|
|
@@ -57290,20 +57297,20 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57290
57297
|
ft(0)
|
|
57291
57298
|
// Default sample flags
|
|
57292
57299
|
]), Jw = (e, t) => zt("moof", void 0, [
|
|
57293
|
-
|
|
57294
|
-
...t.map(
|
|
57295
|
-
]),
|
|
57300
|
+
$K(e),
|
|
57301
|
+
...t.map(UK)
|
|
57302
|
+
]), $K = (e) => _e("mfhd", 0, 0, [
|
|
57296
57303
|
ft(e)
|
|
57297
57304
|
// Sequence number
|
|
57298
57305
|
]), VE = (e) => {
|
|
57299
57306
|
let t = 0, i = 0;
|
|
57300
57307
|
const r = 0, n = 0, s = e.type === "delta";
|
|
57301
57308
|
return i |= +s, s ? t |= 1 : t |= 2, t << 24 | i << 16 | r << 8 | n;
|
|
57302
|
-
},
|
|
57303
|
-
UK(e),
|
|
57309
|
+
}, UK = (e) => zt("traf", void 0, [
|
|
57304
57310
|
ZK(e),
|
|
57305
|
-
jK(e)
|
|
57306
|
-
|
|
57311
|
+
jK(e),
|
|
57312
|
+
WK(e)
|
|
57313
|
+
]), ZK = (e) => {
|
|
57307
57314
|
N(e.currentChunk);
|
|
57308
57315
|
let t = 0;
|
|
57309
57316
|
t |= 8, t |= 16, t |= 32, t |= 131072;
|
|
@@ -57322,10 +57329,10 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57322
57329
|
ft(r.flags)
|
|
57323
57330
|
// Default sample flags
|
|
57324
57331
|
]);
|
|
57325
|
-
},
|
|
57332
|
+
}, jK = (e) => (N(e.currentChunk), _e("tfdt", 1, 0, [
|
|
57326
57333
|
On(Ye(e.currentChunk.startTimestamp, e.timescale))
|
|
57327
57334
|
// Base Media Decode Time
|
|
57328
|
-
])),
|
|
57335
|
+
])), WK = (e) => {
|
|
57329
57336
|
N(e.currentChunk);
|
|
57330
57337
|
const t = e.currentChunk.samples.map((v) => v.timescaleUnitsToNextSample), i = e.currentChunk.samples.map((v) => v.size), r = e.currentChunk.samples.map(VE), n = e.currentChunk.samples.map((v) => Ye(v.timestamp - v.decodeTimestamp, e.timescale)), s = new Set(t), a = new Set(i), o = new Set(r), l = new Set(n), u = o.size === 2 && r[0] !== r[1], c = s.size > 1, f = a.size > 1, d = !u && o.size > 1, h = l.size > 1 || [...l].some((v) => v !== 0);
|
|
57331
57338
|
let m = 0;
|
|
@@ -57346,10 +57353,10 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57346
57353
|
h ? rs(n[g]) : []
|
|
57347
57354
|
])
|
|
57348
57355
|
]);
|
|
57349
|
-
},
|
|
57350
|
-
...e.map(
|
|
57351
|
-
|
|
57352
|
-
]),
|
|
57356
|
+
}, HK = (e) => zt("mfra", void 0, [
|
|
57357
|
+
...e.map(GK),
|
|
57358
|
+
qK()
|
|
57359
|
+
]), GK = (e, t) => _e("tfra", 1, 0, [
|
|
57353
57360
|
ft(e.track.id),
|
|
57354
57361
|
// Track ID
|
|
57355
57362
|
ft(63),
|
|
@@ -57368,28 +57375,28 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57368
57375
|
ft(1)
|
|
57369
57376
|
// Sample number
|
|
57370
57377
|
])
|
|
57371
|
-
]),
|
|
57378
|
+
]), qK = () => _e("mfro", 0, 0, [
|
|
57372
57379
|
// This value needs to be overwritten manually from the outside, where the actual size of the enclosing mfra box
|
|
57373
57380
|
// is known
|
|
57374
57381
|
ft(0)
|
|
57375
57382
|
// Size
|
|
57376
|
-
]),
|
|
57383
|
+
]), YK = () => zt("vtte"), XK = (e, t, i, r, n) => zt("vttc", void 0, [
|
|
57377
57384
|
n !== null ? zt("vsid", [rs(n)]) : null,
|
|
57378
57385
|
i !== null ? zt("iden", [...In.encode(i)]) : null,
|
|
57379
|
-
t !== null ? zt("ctim", [...In.encode(
|
|
57386
|
+
t !== null ? zt("ctim", [...In.encode(YX(t))]) : null,
|
|
57380
57387
|
r !== null ? zt("sttg", [...In.encode(r)]) : null,
|
|
57381
57388
|
zt("payl", [...In.encode(e)])
|
|
57382
|
-
]),
|
|
57389
|
+
]), KK = (e) => zt("vtta", [...In.encode(e)]), JK = (e) => {
|
|
57383
57390
|
const t = [], i = e.format._options.metadataFormat ?? "auto", r = e.output._metadataTags;
|
|
57384
57391
|
if (i === "mdir" || i === "auto" && !e.isQuickTime) {
|
|
57385
|
-
const n =
|
|
57392
|
+
const n = tJ(r);
|
|
57386
57393
|
n && t.push(n);
|
|
57387
57394
|
} else if (i === "mdta") {
|
|
57388
|
-
const n =
|
|
57395
|
+
const n = eJ(r);
|
|
57389
57396
|
n && t.push(n);
|
|
57390
|
-
} else (i === "udta" || i === "auto" && e.isQuickTime) &&
|
|
57397
|
+
} else (i === "udta" || i === "auto" && e.isQuickTime) && QK(t, e.output._metadataTags);
|
|
57391
57398
|
return t.length === 0 ? null : zt("udta", void 0, t);
|
|
57392
|
-
},
|
|
57399
|
+
}, QK = (e, t) => {
|
|
57393
57400
|
for (const { key: i, value: r } of Z5(t))
|
|
57394
57401
|
switch (i) {
|
|
57395
57402
|
case "title":
|
|
@@ -57548,7 +57555,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57548
57555
|
]) }));
|
|
57549
57556
|
}
|
|
57550
57557
|
return i;
|
|
57551
|
-
},
|
|
57558
|
+
}, tJ = (e) => {
|
|
57552
57559
|
const t = LE(e, !1);
|
|
57553
57560
|
return t.length === 0 ? null : _e("meta", 0, 0, void 0, [
|
|
57554
57561
|
f1(!1, "mdir", "", "appl"),
|
|
@@ -57556,7 +57563,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57556
57563
|
zt("ilst", void 0, t.map((i) => zt(i.key, void 0, [i.value])))
|
|
57557
57564
|
// Item list without keys box
|
|
57558
57565
|
]);
|
|
57559
|
-
},
|
|
57566
|
+
}, eJ = (e) => {
|
|
57560
57567
|
const t = LE(e, !0);
|
|
57561
57568
|
return t.length === 0 ? null : zt("meta", void 0, [
|
|
57562
57569
|
f1(!1, "mdta", ""),
|
|
@@ -57577,7 +57584,7 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57577
57584
|
ft(0),
|
|
57578
57585
|
// Locale indicator
|
|
57579
57586
|
...In.encode(e)
|
|
57580
|
-
]),
|
|
57587
|
+
]), iJ = (e, t) => {
|
|
57581
57588
|
switch (e) {
|
|
57582
57589
|
case "avc":
|
|
57583
57590
|
return t.startsWith("avc3") ? "avc3" : "avc1";
|
|
@@ -57592,12 +57599,12 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57592
57599
|
case "prores":
|
|
57593
57600
|
return t;
|
|
57594
57601
|
}
|
|
57595
|
-
},
|
|
57596
|
-
avc:
|
|
57597
|
-
hevc:
|
|
57602
|
+
}, rJ = {
|
|
57603
|
+
avc: wK,
|
|
57604
|
+
hevc: xK,
|
|
57598
57605
|
vp8: Kw,
|
|
57599
57606
|
vp9: Kw,
|
|
57600
|
-
av1:
|
|
57607
|
+
av1: CK,
|
|
57601
57608
|
prores: null
|
|
57602
57609
|
}, $E = (e, t) => {
|
|
57603
57610
|
switch (e) {
|
|
@@ -57670,22 +57677,22 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57670
57677
|
case "pcm-f64be":
|
|
57671
57678
|
return "fpcm";
|
|
57672
57679
|
}
|
|
57673
|
-
},
|
|
57680
|
+
}, nJ = (e, t) => {
|
|
57674
57681
|
switch (e) {
|
|
57675
57682
|
case "aac":
|
|
57676
57683
|
return L0;
|
|
57677
57684
|
case "mp3":
|
|
57678
57685
|
return L0;
|
|
57679
57686
|
case "opus":
|
|
57680
|
-
return
|
|
57687
|
+
return EK;
|
|
57681
57688
|
case "vorbis":
|
|
57682
57689
|
return L0;
|
|
57683
57690
|
case "flac":
|
|
57684
|
-
return EK;
|
|
57685
|
-
case "ac3":
|
|
57686
57691
|
return AK;
|
|
57687
|
-
case "
|
|
57692
|
+
case "ac3":
|
|
57688
57693
|
return TK;
|
|
57694
|
+
case "eac3":
|
|
57695
|
+
return IK;
|
|
57689
57696
|
}
|
|
57690
57697
|
if (t)
|
|
57691
57698
|
switch (e) {
|
|
@@ -57730,10 +57737,10 @@ const ne = /* @__PURE__ */ new Uint8Array(8), Ur = /* @__PURE__ */ new DataView(
|
|
|
57730
57737
|
return vn;
|
|
57731
57738
|
}
|
|
57732
57739
|
return null;
|
|
57733
|
-
}, nJ = {
|
|
57734
|
-
webvtt: "wvtt"
|
|
57735
57740
|
}, sJ = {
|
|
57736
|
-
webvtt:
|
|
57741
|
+
webvtt: "wvtt"
|
|
57742
|
+
}, aJ = {
|
|
57743
|
+
webvtt: PK
|
|
57737
57744
|
}, UE = (e) => {
|
|
57738
57745
|
N(e.length === 3);
|
|
57739
57746
|
let t = 0;
|
|
@@ -57837,7 +57844,7 @@ class Kn extends oc {
|
|
|
57837
57844
|
slice(t) {
|
|
57838
57845
|
if (!Number.isInteger(t) || t < 0)
|
|
57839
57846
|
throw new TypeError("offset must be a non-negative integer.");
|
|
57840
|
-
return new
|
|
57847
|
+
return new oJ(this, t);
|
|
57841
57848
|
}
|
|
57842
57849
|
}
|
|
57843
57850
|
const $0 = 2 ** 16, U0 = 2 ** 32;
|
|
@@ -57896,7 +57903,7 @@ class af extends Kn {
|
|
|
57896
57903
|
return this._bytes.slice(t, i);
|
|
57897
57904
|
}
|
|
57898
57905
|
}
|
|
57899
|
-
class
|
|
57906
|
+
class oJ extends Kn {
|
|
57900
57907
|
/** @internal */
|
|
57901
57908
|
constructor(t, i) {
|
|
57902
57909
|
super(), this._baseTarget = t, this._offset = i;
|
|
@@ -57940,16 +57947,16 @@ class Z0 {
|
|
|
57940
57947
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
57941
57948
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
57942
57949
|
*/
|
|
57943
|
-
const sn = 57600,
|
|
57950
|
+
const sn = 57600, lJ = 2082844800, uJ = (e) => {
|
|
57944
57951
|
const t = {}, i = e.track;
|
|
57945
57952
|
return i.metadata.name !== void 0 && (t.name = i.metadata.name), t;
|
|
57946
57953
|
}, Ye = (e, t, i = !0) => {
|
|
57947
57954
|
const r = e * t;
|
|
57948
57955
|
return i ? Math.round(r) : r;
|
|
57949
57956
|
};
|
|
57950
|
-
class
|
|
57957
|
+
class cJ extends qX {
|
|
57951
57958
|
constructor(t, i) {
|
|
57952
|
-
super(t), this.writer = null, this.boxWriter = null, this.initWriter = null, this.initBoxWriter = null, this.auxTarget = new af(), this.auxWriter = new rm(this.auxTarget, !1), this.auxBoxWriter = new Uc(this.auxWriter), this.mdat = null, this.ftypSize = null, this.trackDatas = [], this.allTracksKnown = Di(), this.creationTime = Math.floor(Date.now() / 1e3) +
|
|
57959
|
+
super(t), this.writer = null, this.boxWriter = null, this.initWriter = null, this.initBoxWriter = null, this.auxTarget = new af(), this.auxWriter = new rm(this.auxTarget, !1), this.auxBoxWriter = new Uc(this.auxWriter), this.mdat = null, this.ftypSize = null, this.trackDatas = [], this.allTracksKnown = Di(), this.creationTime = Math.floor(Date.now() / 1e3) + lJ, this.finalizedChunks = [], this.nextFragmentNumber = 1, this.maxWrittenTimestamp = -1 / 0, this.minWrittenTimestamp = 1 / 0, this.maxWrittenEndTimestamp = -1 / 0, this.segmentHeaderSize = null, this.format = i, this.isQuickTime = i instanceof GE, this.isCmaf = i instanceof e4, this.minimumFragmentDuration = i._options.minimumFragmentDuration ?? (i instanceof e4 ? 1 / 0 : 1);
|
|
57953
57960
|
}
|
|
57954
57961
|
async start() {
|
|
57955
57962
|
const t = await this.mutex.acquire();
|
|
@@ -57962,7 +57969,7 @@ class uJ extends GX {
|
|
|
57962
57969
|
const i = this.output._tracks.some((r) => r.isVideoTrack() && r.source._codec === "avc");
|
|
57963
57970
|
{
|
|
57964
57971
|
const r = this.initBoxWriter ?? this.boxWriter;
|
|
57965
|
-
if (N(r), this.format._options.onFtyp && r.writer.startTrackingWrites(), r.writeBox(
|
|
57972
|
+
if (N(r), this.format._options.onFtyp && r.writer.startTrackingWrites(), r.writeBox(KX({
|
|
57966
57973
|
isQuickTime: this.isQuickTime,
|
|
57967
57974
|
holdsAvc: i,
|
|
57968
57975
|
fragmented: this.isFragmented,
|
|
@@ -58002,7 +58009,7 @@ class uJ extends GX {
|
|
|
58002
58009
|
const n = this.trackDatas.find((d) => d.track === t);
|
|
58003
58010
|
if (n)
|
|
58004
58011
|
return n;
|
|
58005
|
-
|
|
58012
|
+
cY(r), N(r), N(r.decoderConfig);
|
|
58006
58013
|
const s = { ...r.decoderConfig };
|
|
58007
58014
|
N(s.codedWidth !== void 0), N(s.codedHeight !== void 0);
|
|
58008
58015
|
let a = !1;
|
|
@@ -58010,14 +58017,14 @@ class uJ extends GX {
|
|
|
58010
58017
|
const d = nE(i.data);
|
|
58011
58018
|
if (!d)
|
|
58012
58019
|
throw new Error("Couldn't extract an AVCDecoderConfigurationRecord from the AVC packet. Make sure the packets are in Annex B format (as specified in ITU-T-REC-H.264) when not providing a description, or provide a description (must be an AVCDecoderConfigurationRecord as specified in ISO 14496-15) and ensure the packets are in AVCC format.");
|
|
58013
|
-
s.description =
|
|
58020
|
+
s.description = mY(d), a = !0;
|
|
58014
58021
|
} else if (t.source._codec === "hevc" && !s.description) {
|
|
58015
58022
|
const d = oE(i.data);
|
|
58016
58023
|
if (!d)
|
|
58017
58024
|
throw new Error("Couldn't extract an HEVCDecoderConfigurationRecord from the HEVC packet. Make sure the packets are in Annex B format (as specified in ITU-T-REC-H.265) when not providing a description, or provide a description (must be an HEVCDecoderConfigurationRecord as specified in ISO 14496-15) and ensure the packets are in HEVC format.");
|
|
58018
|
-
s.description =
|
|
58025
|
+
s.description = SY(d), a = !0;
|
|
58019
58026
|
}
|
|
58020
|
-
const o =
|
|
58027
|
+
const o = Hq(1 / (t.metadata.frameRate ?? sn), 1e6).den, l = s.displayAspectWidth, u = s.displayAspectHeight, c = l === void 0 || u === void 0 ? { num: 1, den: 1 } : Hf({
|
|
58021
58028
|
num: l * s.codedHeight,
|
|
58022
58029
|
den: u * s.codedWidth
|
|
58023
58030
|
}), f = {
|
|
@@ -58051,7 +58058,7 @@ class uJ extends GX {
|
|
|
58051
58058
|
const n = this.trackDatas.find((l) => l.track === t);
|
|
58052
58059
|
if (n)
|
|
58053
58060
|
return n;
|
|
58054
|
-
|
|
58061
|
+
dY(r), N(r), N(r.decoderConfig);
|
|
58055
58062
|
const s = { ...r.decoderConfig };
|
|
58056
58063
|
let a = !1;
|
|
58057
58064
|
if (t.source._codec === "aac" && !s.description) {
|
|
@@ -58100,7 +58107,7 @@ class uJ extends GX {
|
|
|
58100
58107
|
const r = this.trackDatas.find((s) => s.track === t);
|
|
58101
58108
|
if (r)
|
|
58102
58109
|
return r;
|
|
58103
|
-
|
|
58110
|
+
hY(i), N(i), N(i.config);
|
|
58104
58111
|
const n = {
|
|
58105
58112
|
muxer: this,
|
|
58106
58113
|
track: t,
|
|
@@ -58156,7 +58163,7 @@ class uJ extends GX {
|
|
|
58156
58163
|
const c = Ow(Pn.tempFromBytes(a));
|
|
58157
58164
|
if (!c)
|
|
58158
58165
|
throw new Error("Expected ADTS frame, didn't get one.");
|
|
58159
|
-
const f = c.crcCheck === null ?
|
|
58166
|
+
const f = c.crcCheck === null ? KY : JY;
|
|
58160
58167
|
a = a.subarray(f);
|
|
58161
58168
|
}
|
|
58162
58169
|
this.validateTimestamp(s.track, i.timestamp, i.type === "key");
|
|
@@ -58207,7 +58214,7 @@ class uJ extends GX {
|
|
|
58207
58214
|
break;
|
|
58208
58215
|
if (t.lastCueEndTimestamp < s) {
|
|
58209
58216
|
this.auxWriter.seek(0);
|
|
58210
|
-
const u =
|
|
58217
|
+
const u = YK();
|
|
58211
58218
|
this.auxBoxWriter.writeBox(u);
|
|
58212
58219
|
const c = this.auxTarget._getSlice(0, this.auxWriter.getPos()), f = this.createSampleForTrack(t, c, t.lastCueEndTimestamp, s - t.lastCueEndTimestamp, "key");
|
|
58213
58220
|
await this.registerSample(t, f), t.lastCueEndTimestamp = s;
|
|
@@ -58221,10 +58228,10 @@ class uJ extends GX {
|
|
|
58221
58228
|
const f = qw.test(c.text), d = c.timestamp + c.duration;
|
|
58222
58229
|
let h = t.cueToSourceId.get(c);
|
|
58223
58230
|
if (h === void 0 && a < d && (h = t.nextSourceId++, t.cueToSourceId.set(c, h)), c.notes) {
|
|
58224
|
-
const v =
|
|
58231
|
+
const v = KK(c.notes);
|
|
58225
58232
|
this.auxBoxWriter.writeBox(v);
|
|
58226
58233
|
}
|
|
58227
|
-
const m =
|
|
58234
|
+
const m = XK(c.text, f ? s : null, c.identifier ?? null, c.settings ?? null, h ?? null);
|
|
58228
58235
|
this.auxBoxWriter.writeBox(m), d === a && t.cueQueue.splice(u--, 1);
|
|
58229
58236
|
}
|
|
58230
58237
|
const o = this.auxTarget._getSlice(0, this.auxWriter.getPos()), l = this.createSampleForTrack(t, o, s, a - s, "key");
|
|
@@ -58522,7 +58529,7 @@ class uJ extends GX {
|
|
|
58522
58529
|
const i = this.segmentHeaderSize !== null ? this.writer.getPos() - this.segmentHeaderSize : 0;
|
|
58523
58530
|
this.writer.seek(0), this.boxWriter.writeBox(Yw()), this.boxWriter.writeBox(Xw(this, i));
|
|
58524
58531
|
} else {
|
|
58525
|
-
const i = this.writer.getPos(), r =
|
|
58532
|
+
const i = this.writer.getPos(), r = HK(this.trackDatas);
|
|
58526
58533
|
this.boxWriter.writeBox(r);
|
|
58527
58534
|
const n = this.writer.getPos() - i;
|
|
58528
58535
|
this.writer.seek(this.writer.getPos() - 4), this.boxWriter.writeU32(n);
|
|
@@ -58540,7 +58547,7 @@ class uJ extends GX {
|
|
|
58540
58547
|
if (this.fastStart === "reserve") {
|
|
58541
58548
|
N(this.ftypSize !== null), this.writer.seek(this.ftypSize), this.format._options.onMoov && this.writer.startTrackingWrites(), this.boxWriter.writeBox(n);
|
|
58542
58549
|
const s = this.boxWriter.offsets.get(this.mdat) - this.writer.getPos();
|
|
58543
|
-
this.boxWriter.writeBox(
|
|
58550
|
+
this.boxWriter.writeBox(JX(s));
|
|
58544
58551
|
} else
|
|
58545
58552
|
this.format._options.onMoov && this.writer.startTrackingWrites(), this.boxWriter.writeBox(n);
|
|
58546
58553
|
if (this.format._options.onMoov) {
|
|
@@ -58558,7 +58565,7 @@ class uJ extends GX {
|
|
|
58558
58565
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
58559
58566
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
58560
58567
|
*/
|
|
58561
|
-
class
|
|
58568
|
+
class fJ {
|
|
58562
58569
|
constructor(t) {
|
|
58563
58570
|
this.sourceSampleRate = null, this.sourceNumberOfChannels = null, this.startTime = null, this.bufferStartFrame = 0, this.maxWrittenFrame = null, this.targetSampleRate = t.targetSampleRate, this.targetNumberOfChannels = t.targetNumberOfChannels, this.onSample = t.onSample, this.bufferSizeInFrames = Math.floor(this.targetSampleRate * 5), this.bufferSizeInSamples = this.bufferSizeInFrames * this.targetNumberOfChannels, this.outputBuffer = new Float32Array(this.bufferSizeInSamples);
|
|
58564
58571
|
}
|
|
@@ -58710,7 +58717,7 @@ const t4 = (e, t) => {
|
|
|
58710
58717
|
if (e.metadata.hasOnlyKeyPackets && t.type !== "key")
|
|
58711
58718
|
throw new Error("Cannot add non-key packets to a hasOnlyKeyPackets video track.");
|
|
58712
58719
|
};
|
|
58713
|
-
class
|
|
58720
|
+
class dJ {
|
|
58714
58721
|
setError(t) {
|
|
58715
58722
|
this.errorSet || (this.error = t, this.errorSet = !0);
|
|
58716
58723
|
}
|
|
@@ -58803,7 +58810,7 @@ class fJ {
|
|
|
58803
58810
|
else if (!!c.format && !c.format.includes("A") || this.splitterCreationFailed)
|
|
58804
58811
|
this.alphaFrameQueue.push(null), this.encoder.encode(c, u), c.close();
|
|
58805
58812
|
else {
|
|
58806
|
-
this.splitter || (this.splitter = new
|
|
58813
|
+
this.splitter || (this.splitter = new hJ());
|
|
58807
58814
|
const { colorFrame: m, alphaFrame: v } = await this.splitter.split(c);
|
|
58808
58815
|
this.alphaFrameQueue.push(v), this.encoder.encode(m, u), m.close();
|
|
58809
58816
|
}
|
|
@@ -58828,7 +58835,7 @@ class fJ {
|
|
|
58828
58835
|
}
|
|
58829
58836
|
ensureEncoder(t) {
|
|
58830
58837
|
this.ensureEncoderPromise = (async () => {
|
|
58831
|
-
const i =
|
|
58838
|
+
const i = TX({
|
|
58832
58839
|
...this.encodingConfig,
|
|
58833
58840
|
width: t.codedWidth,
|
|
58834
58841
|
height: t.codedHeight,
|
|
@@ -58837,7 +58844,7 @@ class fJ {
|
|
|
58837
58844
|
framerate: this.source._connectedTrack?.metadata.frameRate
|
|
58838
58845
|
});
|
|
58839
58846
|
this.encodingConfig.onEncoderConfig?.(i);
|
|
58840
|
-
const r =
|
|
58847
|
+
const r = BX.find((n) => n.supports(this.encodingConfig.codec, i));
|
|
58841
58848
|
if (r)
|
|
58842
58849
|
this.customEncoder = new r(), this.customEncoder.codec = this.encodingConfig.codec, this.customEncoder.config = i, this.customEncoder.onPacket = (n, s) => {
|
|
58843
58850
|
if (!(n instanceof bi))
|
|
@@ -58932,14 +58939,14 @@ class fJ {
|
|
|
58932
58939
|
}
|
|
58933
58940
|
}
|
|
58934
58941
|
let j0 = null;
|
|
58935
|
-
class
|
|
58942
|
+
class hJ {
|
|
58936
58943
|
constructor() {
|
|
58937
58944
|
this.worker = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.nextRequestId = 0;
|
|
58938
58945
|
}
|
|
58939
58946
|
split(t) {
|
|
58940
58947
|
if (!this.worker) {
|
|
58941
58948
|
if (!j0) {
|
|
58942
|
-
const n = new Blob([`(${
|
|
58949
|
+
const n = new Blob([`(${pJ.toString()})()`], { type: "application/javascript" });
|
|
58943
58950
|
j0 = URL.createObjectURL(n);
|
|
58944
58951
|
}
|
|
58945
58952
|
this.worker = new Worker(j0), this.worker.addEventListener("message", (n) => {
|
|
@@ -58963,7 +58970,7 @@ class dJ {
|
|
|
58963
58970
|
this.pendingRequests.clear();
|
|
58964
58971
|
}
|
|
58965
58972
|
}
|
|
58966
|
-
const
|
|
58973
|
+
const pJ = () => {
|
|
58967
58974
|
let e = null, t = Promise.resolve();
|
|
58968
58975
|
self.addEventListener("message", (s) => {
|
|
58969
58976
|
const { id: a, sourceFrame: o } = s.data;
|
|
@@ -59034,7 +59041,7 @@ const hJ = () => {
|
|
|
59034
59041
|
return { colorFrame: dt, alphaFrame: W };
|
|
59035
59042
|
};
|
|
59036
59043
|
};
|
|
59037
|
-
class
|
|
59044
|
+
class mJ extends ZE {
|
|
59038
59045
|
/**
|
|
59039
59046
|
* Creates a new {@link CanvasSource} from a canvas element or `OffscreenCanvas` whose samples are encoded
|
|
59040
59047
|
* according to the specified {@link VideoEncodingConfig}.
|
|
@@ -59042,7 +59049,7 @@ class pJ extends ZE {
|
|
|
59042
59049
|
constructor(t, i) {
|
|
59043
59050
|
if (!(typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement) && !(typeof OffscreenCanvas < "u" && t instanceof OffscreenCanvas))
|
|
59044
59051
|
throw new TypeError("canvas must be an HTMLCanvasElement or OffscreenCanvas.");
|
|
59045
|
-
|
|
59052
|
+
EX(i), super(i.codec), this._encoder = new dJ(this, i), this._canvas = t;
|
|
59046
59053
|
}
|
|
59047
59054
|
/**
|
|
59048
59055
|
* Captures the current canvas state as a video sample (frame), encodes it and adds it to the output.
|
|
@@ -59074,7 +59081,7 @@ class jE extends d1 {
|
|
|
59074
59081
|
this._codec = t;
|
|
59075
59082
|
}
|
|
59076
59083
|
}
|
|
59077
|
-
class
|
|
59084
|
+
class gJ {
|
|
59078
59085
|
setError(t) {
|
|
59079
59086
|
this.errorSet || (this.error = t, this.errorSet = !0);
|
|
59080
59087
|
}
|
|
@@ -59089,7 +59096,7 @@ class mJ {
|
|
|
59089
59096
|
} else
|
|
59090
59097
|
this.lastNumberOfChannels = t.numberOfChannels, this.lastSampleRate = t.sampleRate;
|
|
59091
59098
|
const r = this.encodingConfig;
|
|
59092
|
-
r.transform?.numberOfChannels !== void 0 || r.transform?.sampleRate !== void 0 ? (this.resampler || (this.resampler = new
|
|
59099
|
+
r.transform?.numberOfChannels !== void 0 || r.transform?.sampleRate !== void 0 ? (this.resampler || (this.resampler = new fJ({
|
|
59093
59100
|
targetNumberOfChannels: r.transform.numberOfChannels ?? t.numberOfChannels,
|
|
59094
59101
|
targetSampleRate: r.transform.sampleRate ?? t.sampleRate,
|
|
59095
59102
|
onSample: async (s) => {
|
|
@@ -59105,8 +59112,8 @@ class mJ {
|
|
|
59105
59112
|
*/
|
|
59106
59113
|
async processAndEncode(t, i) {
|
|
59107
59114
|
const r = this.encodingConfig;
|
|
59108
|
-
if (r.transform?.sampleFormat !== void 0 &&
|
|
59109
|
-
const n =
|
|
59115
|
+
if (r.transform?.sampleFormat !== void 0 && kX(t.format) !== r.transform.sampleFormat) {
|
|
59116
|
+
const n = SX(t, r.transform.sampleFormat);
|
|
59110
59117
|
i && t.close(), t = n, i = !0;
|
|
59111
59118
|
}
|
|
59112
59119
|
if (r.transform?.process) {
|
|
@@ -59198,13 +59205,13 @@ class mJ {
|
|
|
59198
59205
|
}
|
|
59199
59206
|
ensureEncoder(t) {
|
|
59200
59207
|
this.ensureEncoderPromise = (async () => {
|
|
59201
|
-
const { numberOfChannels: i, sampleRate: r } = t, n =
|
|
59208
|
+
const { numberOfChannels: i, sampleRate: r } = t, n = PX({
|
|
59202
59209
|
numberOfChannels: i,
|
|
59203
59210
|
sampleRate: r,
|
|
59204
59211
|
...this.encodingConfig
|
|
59205
59212
|
});
|
|
59206
59213
|
this.encodingConfig.onEncoderConfig?.(n);
|
|
59207
|
-
const s =
|
|
59214
|
+
const s = NX.find((a) => a.supports(this.encodingConfig.codec, n));
|
|
59208
59215
|
if (s)
|
|
59209
59216
|
this.customEncoder = new s(), this.customEncoder.codec = this.encodingConfig.codec, this.customEncoder.config = n, this.customEncoder.onPacket = (a, o) => {
|
|
59210
59217
|
if (!(a instanceof bi))
|
|
@@ -59263,17 +59270,17 @@ class mJ {
|
|
|
59263
59270
|
s.setInt8(a, mi(Math.round(o * 128), -128, 127));
|
|
59264
59271
|
} : i === "ulaw" ? this.writeOutputValue = (s, a, o) => {
|
|
59265
59272
|
const l = mi(Math.floor(o * 32767), -32768, 32767);
|
|
59266
|
-
s.setUint8(a,
|
|
59273
|
+
s.setUint8(a, MX(l));
|
|
59267
59274
|
} : i === "alaw" ? this.writeOutputValue = (s, a, o) => {
|
|
59268
59275
|
const l = mi(Math.floor(o * 32767), -32768, 32767);
|
|
59269
|
-
s.setUint8(a,
|
|
59276
|
+
s.setUint8(a, zX(l));
|
|
59270
59277
|
} : N(!1);
|
|
59271
59278
|
break;
|
|
59272
59279
|
case 2:
|
|
59273
59280
|
i === "unsigned" ? this.writeOutputValue = (s, a, o) => s.setUint16(a, mi((o + 1) * 32767.5, 0, 65535), n) : i === "signed" ? this.writeOutputValue = (s, a, o) => s.setInt16(a, mi(Math.round(o * 32767), -32768, 32767), n) : N(!1);
|
|
59274
59281
|
break;
|
|
59275
59282
|
case 3:
|
|
59276
|
-
i === "unsigned" ? this.writeOutputValue = (s, a, o) => Hy(s, a, mi((o + 1) * 83886075e-1, 0, 16777215), n) : i === "signed" ? this.writeOutputValue = (s, a, o) =>
|
|
59283
|
+
i === "unsigned" ? this.writeOutputValue = (s, a, o) => Hy(s, a, mi((o + 1) * 83886075e-1, 0, 16777215), n) : i === "signed" ? this.writeOutputValue = (s, a, o) => Uq(s, a, mi(Math.round(o * 8388607), -8388608, 8388607), n) : N(!1);
|
|
59277
59284
|
break;
|
|
59278
59285
|
case 4:
|
|
59279
59286
|
i === "unsigned" ? this.writeOutputValue = (s, a, o) => s.setUint32(a, mi((o + 1) * 21474836475e-1, 0, 4294967295), n) : i === "signed" ? this.writeOutputValue = (s, a, o) => s.setInt32(a, mi(Math.round(o * 2147483647), -2147483648, 2147483647), n) : i === "float" ? this.writeOutputValue = (s, a, o) => s.setFloat32(a, o, n) : N(!1);
|
|
@@ -59296,13 +59303,13 @@ class mJ {
|
|
|
59296
59303
|
throw this.error;
|
|
59297
59304
|
}
|
|
59298
59305
|
}
|
|
59299
|
-
class
|
|
59306
|
+
class yJ extends jE {
|
|
59300
59307
|
/**
|
|
59301
59308
|
* Creates a new {@link AudioBufferSource} whose `AudioBuffer` instances are encoded according to the specified
|
|
59302
59309
|
* {@link AudioEncodingConfig}.
|
|
59303
59310
|
*/
|
|
59304
59311
|
constructor(t) {
|
|
59305
|
-
|
|
59312
|
+
IX(t), super(t.codec), this._accumulatedTime = 0, this._encoder = new gJ(this, t);
|
|
59306
59313
|
}
|
|
59307
59314
|
/**
|
|
59308
59315
|
* Converts an AudioBuffer to audio samples, encodes them and adds them to the output. The first AudioBuffer will
|
|
@@ -59325,7 +59332,7 @@ class gJ extends jE {
|
|
|
59325
59332
|
return this._encoder.flushAndClose(t);
|
|
59326
59333
|
}
|
|
59327
59334
|
}
|
|
59328
|
-
class
|
|
59335
|
+
class bJ extends d1 {
|
|
59329
59336
|
/** Internal constructor. */
|
|
59330
59337
|
constructor(t) {
|
|
59331
59338
|
if (super(), this._connectedTrack = null, !xu.includes(t))
|
|
@@ -59396,7 +59403,7 @@ class h1 extends WE {
|
|
|
59396
59403
|
}
|
|
59397
59404
|
/** @internal */
|
|
59398
59405
|
_createMuxer(t) {
|
|
59399
|
-
return new
|
|
59406
|
+
return new cJ(t, this);
|
|
59400
59407
|
}
|
|
59401
59408
|
}
|
|
59402
59409
|
class HE extends h1 {
|
|
@@ -59504,7 +59511,7 @@ class GE extends h1 {
|
|
|
59504
59511
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
59505
59512
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
59506
59513
|
*/
|
|
59507
|
-
const
|
|
59514
|
+
const vJ = ["video", "audio", "subtitle"];
|
|
59508
59515
|
class cc {
|
|
59509
59516
|
/** @internal */
|
|
59510
59517
|
constructor(t, i, r, n, s) {
|
|
@@ -59538,19 +59545,19 @@ class cc {
|
|
|
59538
59545
|
return !1;
|
|
59539
59546
|
}
|
|
59540
59547
|
}
|
|
59541
|
-
class
|
|
59548
|
+
class wJ extends cc {
|
|
59542
59549
|
/** @internal */
|
|
59543
59550
|
constructor(t, i, r, n) {
|
|
59544
59551
|
super(t, i, "video", r, n);
|
|
59545
59552
|
}
|
|
59546
59553
|
}
|
|
59547
|
-
class
|
|
59554
|
+
class xJ extends cc {
|
|
59548
59555
|
/** @internal */
|
|
59549
59556
|
constructor(t, i, r, n) {
|
|
59550
59557
|
super(t, i, "audio", r, n);
|
|
59551
59558
|
}
|
|
59552
59559
|
}
|
|
59553
|
-
class
|
|
59560
|
+
class CJ extends cc {
|
|
59554
59561
|
/** @internal */
|
|
59555
59562
|
constructor(t, i, r, n) {
|
|
59556
59563
|
super(t, i, "subtitle", r, n);
|
|
@@ -59582,12 +59589,12 @@ const W0 = (e) => {
|
|
|
59582
59589
|
throw new TypeError("metadata.languageCode, when provided, must be a three-letter, ISO 639-2/T language code.");
|
|
59583
59590
|
if (e.name !== void 0 && typeof e.name != "string")
|
|
59584
59591
|
throw new TypeError("metadata.name, when provided, must be a string.");
|
|
59585
|
-
if (e.disposition !== void 0 &&
|
|
59592
|
+
if (e.disposition !== void 0 && Jq(e.disposition), e.maximumPacketCount !== void 0 && (!Number.isInteger(e.maximumPacketCount) || e.maximumPacketCount < 0))
|
|
59586
59593
|
throw new TypeError("metadata.maximumPacketCount, when provided, must be a non-negative integer.");
|
|
59587
59594
|
if (e.group !== void 0 && !(e.group instanceof Su) && (!Array.isArray(e.group) || e.group.some((t) => !(t instanceof Su))))
|
|
59588
59595
|
throw new TypeError("metadata.group, when provided, must be an OutputTrackGroup instance or an array of OutputTrackGroup instances.");
|
|
59589
59596
|
};
|
|
59590
|
-
class
|
|
59597
|
+
class kJ extends oc {
|
|
59591
59598
|
/**
|
|
59592
59599
|
* The target to which the root file will be written. Throws when using {@link PathedTarget} with an async callback;
|
|
59593
59600
|
* prefer the `'target'` event for those cases.
|
|
@@ -59682,7 +59689,7 @@ class CJ extends oc {
|
|
|
59682
59689
|
if (i.frameRate !== void 0 && (!Number.isFinite(i.frameRate) || i.frameRate <= 0))
|
|
59683
59690
|
throw new TypeError(`Invalid video frame rate: ${i.frameRate}. Must be a positive number.`);
|
|
59684
59691
|
const r = { ...i };
|
|
59685
|
-
return r.group ??= this.defaultTrackGroup, this._addTrack(new
|
|
59692
|
+
return r.group ??= this.defaultTrackGroup, this._addTrack(new wJ(this._tracks.length + 1, this, t, r));
|
|
59686
59693
|
}
|
|
59687
59694
|
/** Adds an audio track to the output with the given source. Can only be called before the output is started. */
|
|
59688
59695
|
addAudioTrack(t, i = {}) {
|
|
@@ -59690,15 +59697,15 @@ class CJ extends oc {
|
|
|
59690
59697
|
throw new TypeError("source must be an AudioSource.");
|
|
59691
59698
|
W0(i);
|
|
59692
59699
|
const r = { ...i };
|
|
59693
|
-
return r.group ??= this.defaultTrackGroup, this._addTrack(new
|
|
59700
|
+
return r.group ??= this.defaultTrackGroup, this._addTrack(new xJ(this._tracks.length + 1, this, t, r));
|
|
59694
59701
|
}
|
|
59695
59702
|
/** Adds a subtitle track to the output with the given source. Can only be called before the output is started. */
|
|
59696
59703
|
addSubtitleTrack(t, i = {}) {
|
|
59697
|
-
if (!(t instanceof
|
|
59704
|
+
if (!(t instanceof bJ))
|
|
59698
59705
|
throw new TypeError("source must be a SubtitleSource.");
|
|
59699
59706
|
W0(i);
|
|
59700
59707
|
const r = { ...i };
|
|
59701
|
-
return r.group ??= this.defaultTrackGroup, this._addTrack(new
|
|
59708
|
+
return r.group ??= this.defaultTrackGroup, this._addTrack(new CJ(this._tracks.length + 1, this, t, r));
|
|
59702
59709
|
}
|
|
59703
59710
|
/**
|
|
59704
59711
|
* Sets descriptive metadata tags about the media file, such as title, author, date, or cover art. When called
|
|
@@ -59707,7 +59714,7 @@ class CJ extends oc {
|
|
|
59707
59714
|
* Can only be called before the output is started.
|
|
59708
59715
|
*/
|
|
59709
59716
|
setMetadataTags(t) {
|
|
59710
|
-
if (
|
|
59717
|
+
if (Kq(t), this.state !== "pending")
|
|
59711
59718
|
throw new Error("Cannot set metadata tags after output has been started or canceled.");
|
|
59712
59719
|
this._metadataTags = t;
|
|
59713
59720
|
}
|
|
@@ -59752,7 +59759,7 @@ class CJ extends oc {
|
|
|
59752
59759
|
*/
|
|
59753
59760
|
async start() {
|
|
59754
59761
|
const t = this.format.getSupportedTrackCounts();
|
|
59755
|
-
for (const r of
|
|
59762
|
+
for (const r of vJ) {
|
|
59756
59763
|
const n = this._tracks.reduce((a, o) => a + (o.type === r ? 1 : 0), 0), s = t[r].min;
|
|
59757
59764
|
if (n < s)
|
|
59758
59765
|
throw new Error(s === t[r].max ? `${this.format._name} requires exactly ${s} ${r} track${s === 1 ? "" : "s"}.` : `${this.format._name} requires at least ${s} ${r} track${s === 1 ? "" : "s"}.`);
|
|
@@ -59831,10 +59838,10 @@ class CJ extends oc {
|
|
|
59831
59838
|
})();
|
|
59832
59839
|
}
|
|
59833
59840
|
}
|
|
59834
|
-
function
|
|
59841
|
+
function _J(e, t, i) {
|
|
59835
59842
|
return e - t + i;
|
|
59836
59843
|
}
|
|
59837
|
-
function
|
|
59844
|
+
function SJ(e, t, i) {
|
|
59838
59845
|
const r = (a) => Math.min(i, Math.max(0, a));
|
|
59839
59846
|
if (Array.isArray(e)) {
|
|
59840
59847
|
const a = [];
|
|
@@ -59860,13 +59867,13 @@ function _J(e, t, i) {
|
|
|
59860
59867
|
{ time: i, value: 0 }
|
|
59861
59868
|
] : [{ time: 0, value: n }];
|
|
59862
59869
|
}
|
|
59863
|
-
const i4 = 48e3,
|
|
59864
|
-
class
|
|
59870
|
+
const i4 = 48e3, EJ = 2, AJ = /* @__PURE__ */ new Set([ze.Audio, ze.Video, ze.TextToSpeech]);
|
|
59871
|
+
class TJ {
|
|
59865
59872
|
/** Decode and mix all audio-bearing clips into one buffer; null when there is no audio. */
|
|
59866
59873
|
async renderMix(t, i) {
|
|
59867
59874
|
const r = this.collectClips(t);
|
|
59868
59875
|
if (!r.length || i <= 0) return null;
|
|
59869
|
-
const n = Math.max(1, Math.ceil(i * i4)), s = new OfflineAudioContext(
|
|
59876
|
+
const n = Math.max(1, Math.ceil(i * i4)), s = new OfflineAudioContext(EJ, n, i4), a = /* @__PURE__ */ new Map();
|
|
59870
59877
|
let o = 0;
|
|
59871
59878
|
for (const l of r) {
|
|
59872
59879
|
const u = await this.decode(l.src, s, a);
|
|
@@ -59885,7 +59892,7 @@ class AJ {
|
|
|
59885
59892
|
return o ? s.startRendering() : null;
|
|
59886
59893
|
}
|
|
59887
59894
|
applyVolume(t, i) {
|
|
59888
|
-
const r =
|
|
59895
|
+
const r = SJ(i.volume, i.effect, i.length), n = Math.max(0, i.start);
|
|
59889
59896
|
t.setValueAtTime(r[0].value, n + r[0].time);
|
|
59890
59897
|
for (let s = 1; s < r.length; s += 1)
|
|
59891
59898
|
t.linearRampToValueAtTime(r[s].value, n + r[s].time);
|
|
@@ -59911,7 +59918,7 @@ class AJ {
|
|
|
59911
59918
|
return i;
|
|
59912
59919
|
}
|
|
59913
59920
|
asAudioClip(t) {
|
|
59914
|
-
if (!
|
|
59921
|
+
if (!AJ.has(t.playerType)) return null;
|
|
59915
59922
|
const i = t.clipConfiguration?.asset;
|
|
59916
59923
|
return typeof i?.src != "string" || !i.src ? null : {
|
|
59917
59924
|
src: i.src,
|
|
@@ -59923,7 +59930,7 @@ class AJ {
|
|
|
59923
59930
|
};
|
|
59924
59931
|
}
|
|
59925
59932
|
}
|
|
59926
|
-
class
|
|
59933
|
+
class IJ {
|
|
59927
59934
|
overlay = null;
|
|
59928
59935
|
bar = null;
|
|
59929
59936
|
percent = null;
|
|
@@ -59974,7 +59981,7 @@ function r4(e) {
|
|
|
59974
59981
|
const r = t.texture;
|
|
59975
59982
|
return i === "VideoPlayer" || r?.source?.resource instanceof HTMLVideoElement;
|
|
59976
59983
|
}
|
|
59977
|
-
class
|
|
59984
|
+
class DJ {
|
|
59978
59985
|
decoders = /* @__PURE__ */ new Map();
|
|
59979
59986
|
/** Open a decoder per video clip; throws if the browser cannot decode a source. */
|
|
59980
59987
|
async initialize(t) {
|
|
@@ -59983,14 +59990,14 @@ class IJ {
|
|
|
59983
59990
|
i.map(async (r) => {
|
|
59984
59991
|
const n = this.getVideoKey(r);
|
|
59985
59992
|
if (n) {
|
|
59986
|
-
const s = new u1({ source: new o1(n), formats: [
|
|
59993
|
+
const s = new u1({ source: new o1(n), formats: [fX, dX] }), a = await s.getPrimaryVideoTrack();
|
|
59987
59994
|
if (a) {
|
|
59988
59995
|
if (!await a.canDecode())
|
|
59989
59996
|
throw new qE(`Cannot decode video source: ${n}`, ["VideoDecoder"]);
|
|
59990
59997
|
this.decoders.set(r, {
|
|
59991
59998
|
input: s,
|
|
59992
59999
|
track: a,
|
|
59993
|
-
sink: new
|
|
60000
|
+
sink: new ZX(a, { poolSize: 2 }),
|
|
59994
60001
|
trim: r.clipConfiguration?.asset?.trim ?? 0,
|
|
59995
60002
|
start: r.getStart?.() ?? 0,
|
|
59996
60003
|
originalTexture: r.texture
|
|
@@ -60004,7 +60011,7 @@ class IJ {
|
|
|
60004
60011
|
async replaceVideoTexture(t, i) {
|
|
60005
60012
|
const r = this.decoders.get(t);
|
|
60006
60013
|
if (!r) return;
|
|
60007
|
-
const n = Math.max(0,
|
|
60014
|
+
const n = Math.max(0, _J(i, r.start, r.trim)), s = await r.sink.getCanvas(n);
|
|
60008
60015
|
if (s) {
|
|
60009
60016
|
if (!r.texture) {
|
|
60010
60017
|
const a = document.createElement("canvas");
|
|
@@ -60035,15 +60042,15 @@ class IJ {
|
|
|
60035
60042
|
this.restore();
|
|
60036
60043
|
}
|
|
60037
60044
|
}
|
|
60038
|
-
class
|
|
60045
|
+
class aet {
|
|
60039
60046
|
edit;
|
|
60040
60047
|
canvas;
|
|
60041
60048
|
app;
|
|
60042
60049
|
isExporting = !1;
|
|
60043
|
-
videoProcessor = new
|
|
60044
|
-
audioProcessor = new
|
|
60045
|
-
progressUI = new
|
|
60046
|
-
exportCommand = new
|
|
60050
|
+
videoProcessor = new DJ();
|
|
60051
|
+
audioProcessor = new TJ();
|
|
60052
|
+
progressUI = new IJ();
|
|
60053
|
+
exportCommand = new zq();
|
|
60047
60054
|
constructor(t, i) {
|
|
60048
60055
|
this.edit = t, this.canvas = i, this.app = i.application, document.addEventListener("keydown", this.handleKeyDown);
|
|
60049
60056
|
}
|
|
@@ -60058,15 +60065,15 @@ class set {
|
|
|
60058
60065
|
this.progressUI.create(), this.canvas.pauseTicker(), this.edit.executeEditCommand(this.exportCommand);
|
|
60059
60066
|
const n = this.prepareConfig(i ?? this.edit.getEdit().output?.fps ?? 30);
|
|
60060
60067
|
this.progressUI.update(0, 100, "Preparing..."), await this.videoProcessor.initialize(this.exportCommand.getClips()), this.progressUI.update(10, 100, "Video ready");
|
|
60061
|
-
const s = new
|
|
60068
|
+
const s = new kJ({ format: new HE(), target: new af() }), a = document.createElement("canvas");
|
|
60062
60069
|
a.width = n.size.width, a.height = n.size.height;
|
|
60063
60070
|
const o = a.getContext("2d");
|
|
60064
60071
|
if (!o) throw new Error("No 2D context");
|
|
60065
|
-
const l = new
|
|
60072
|
+
const l = new mJ(a, { codec: "avc", bitrate: 5e6 });
|
|
60066
60073
|
s.addVideoTrack(l), this.progressUI.update(15, 100, "Mixing audio...");
|
|
60067
60074
|
const u = await this.audioProcessor.renderMix(this.exportCommand.getTracks(), this.edit.totalDuration);
|
|
60068
60075
|
let c = null;
|
|
60069
|
-
u && (c = new
|
|
60076
|
+
u && (c = new yJ({ codec: "aac", bitrate: 192e3 }), s.addAudioTrack(c)), await s.start(), c && u && (this.progressUI.update(20, 100, "Encoding audio..."), await c.add(u)), this.progressUI.update(25, 100, "Exporting..."), await this.processFrames(n, l, a, o), await s.finalize();
|
|
60070
60077
|
const f = s.target.buffer;
|
|
60071
60078
|
if (!f) throw new Error("No video data");
|
|
60072
60079
|
const d = new Blob([f], { type: "video/mp4" }), h = URL.createObjectURL(d), m = document.createElement("a");
|
|
@@ -60269,7 +60276,7 @@ class KE {
|
|
|
60269
60276
|
this.transformCommand.dispose?.(), this.storedContentClipId = null;
|
|
60270
60277
|
}
|
|
60271
60278
|
}
|
|
60272
|
-
class
|
|
60279
|
+
class PJ {
|
|
60273
60280
|
constructor(t, i, r, n, s) {
|
|
60274
60281
|
this.insertionIndex = t, this.fromTrackIndex = i, this.fromClipIndex = r, this.newStart = n, this.targetAssetType = s, this.createTrackAndMoveCommand = new YE(t, i, r, n), this.detachCommand = new KE(t, 0, s);
|
|
60275
60282
|
}
|
|
@@ -60307,7 +60314,7 @@ function JE(e) {
|
|
|
60307
60314
|
const t = e.toLowerCase().split("?")[0];
|
|
60308
60315
|
return [".mp4", ".webm", ".mov", ".m4v", ".avi", ".mkv", ".ogv", ".ogg"].some((r) => t.endsWith(r)) ? "video" : "image";
|
|
60309
60316
|
}
|
|
60310
|
-
const PJ = '.ss-toolbar-drag-handle{display:flex;align-items:center;justify-content:center;cursor:grab;touch-action:none;padding:4px 2px;border-radius:4px;color:#00000026;transition:color .15s ease;flex-shrink:0;user-select:none;-webkit-user-select:none}.ss-toolbar-drag-handle:hover{color:#0006}.ss-toolbar-drag-handle--dark{color:#fff3}.ss-toolbar-drag-handle--dark:hover{color:#ffffff80}.ss-toolbar--dragging{box-shadow:0 8px 32px #00000026,0 0 0 1px #00000014;z-index:9999!important;user-select:none;-webkit-user-select:none}.ss-toolbar-drag-handle:active,.ss-toolbar--dragging .ss-toolbar-drag-handle{cursor:grabbing}body.ss-dragging-toolbar,body.ss-dragging-toolbar *{cursor:grabbing!important;user-select:none!important;-webkit-user-select:none!important}.ss-toolbar-delete-wrap{display:flex;align-items:center;margin-left:auto}.ss-toolbar-delete-divider{width:1px;height:20px;background:#ffffff1a;margin:0 6px 0 4px}.ss-toolbar-delete-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:transparent;border:none;border-radius:6px;color:#ffffffa6;cursor:pointer;transition:all .15s ease;position:relative}.ss-toolbar-delete-btn:hover{background:#ffffff1a;color:#fffffff2}.ss-toolbar-delete-btn:active{background:#ffffff26}.ss-toolbar-delete-btn:disabled,.ss-toolbar-delete-btn[disabled]{cursor:not-allowed;color:#ffffff40;background:transparent}.ss-toolbar-delete-btn svg{width:16px;height:16px;flex-shrink:0}.ss-clip-context-menu{position:fixed;min-width:160px;padding:4px;background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 4px 16px #0000001f;z-index:1000;color:#1f2937;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:12px;user-select:none}.ss-clip-context-menu-item{display:flex;align-items:center;gap:8px;width:100%;padding:6px 10px;background:transparent;border:none;border-radius:4px;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background .1s ease}.ss-clip-context-menu-item:hover,.ss-clip-context-menu-item:focus-visible{background:#f3f4f6;outline:none}.ss-clip-context-menu-item:disabled,.ss-clip-context-menu-item[disabled]{color:#9ca3af;cursor:not-allowed;background:transparent}.ss-clip-context-menu-item:disabled:hover,.ss-clip-context-menu-item[disabled]:hover{background:transparent}.ss-clip-context-menu-item:disabled .ss-clip-context-menu-icon,.ss-clip-context-menu-item[disabled] .ss-clip-context-menu-icon{color:#d1d5db}.ss-clip-context-menu-icon{flex-shrink:0;color:#6b7280}.ss-clip-context-menu-label{flex:1}.ss-clip-context-menu-shortcut{font-size:10px;color:#9ca3af;padding:2px 5px;border-radius:3px;background:#f3f4f6;font-family:-apple-system,BlinkMacSystemFont,monospace}.ss-scrollable-list{display:flex;flex-direction:column;overflow:hidden}.ss-scrollable-list-body{flex:1;min-height:0;overflow:hidden}.ss-scrollable-list-viewport{height:100%;overflow-y:auto;overflow-x:hidden}.ss-scrollable-list-viewport::-webkit-scrollbar{width:6px}.ss-scrollable-list-viewport::-webkit-scrollbar-track{background:transparent}.ss-scrollable-list-viewport::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:3px}.ss-scrollable-list-viewport::-webkit-scrollbar-thumb:hover{background:#ffffff40}.ss-scrollable-list-group{padding:4px 0}.ss-scrollable-list-group+.ss-scrollable-list-group{border-top:1px solid rgba(255,255,255,.06)}.ss-scrollable-list-group-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px 4px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#fff6}.ss-scrollable-list-group-detail{font-weight:400;text-transform:none;letter-spacing:normal;color:#ffffff40}.ss-scrollable-list-item{padding:8px 12px;font-size:13px;font-weight:400;color:#ffffffbf;cursor:pointer;border-radius:6px;margin:0 4px;transition:background .12s ease}.ss-scrollable-list-item:hover{background:#ffffff14;color:#fffffff2}.ss-scrollable-list-item--selected{background:#ffffff1f;color:#fff;font-weight:500}.ss-scrollable-list-item--selected:hover{background:#ffffff29}.ss-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 8px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-toolbar.visible{display:flex}.ss-toolbar-group{display:flex;align-items:center;gap:1px}.ss-toolbar-group--bordered{background:#ffffff0a;border-radius:6px;padding:2px}.ss-toolbar-divider{width:1px;height:20px;background:#ffffff1a;margin:0 6px}.ss-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:6px;color:#ffffffa6;cursor:pointer;transition:all .15s ease;position:relative}.ss-toolbar-btn:hover{background:#ffffff1a;color:#fffffff2}.ss-toolbar-btn.active{background:#ffffff26;color:#fff}.ss-toolbar-btn--text{font-size:13px;font-weight:600;letter-spacing:-.01em}.ss-toolbar-btn--underline{text-decoration:underline;text-underline-offset:2px}.ss-toolbar-value{min-width:32px;text-align:center;font-size:12px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums;letter-spacing:-.02em}.ss-toolbar-color-wrap{position:relative;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.ss-toolbar-color{width:22px;height:22px;padding:0;border:none;border-radius:50%;cursor:pointer;background:transparent}.ss-toolbar-color::-webkit-color-swatch-wrapper{padding:0}.ss-toolbar-color::-webkit-color-swatch{border:2px solid rgba(255,255,255,.2);border-radius:50%;box-shadow:0 0 0 1px #0000004d}.ss-toolbar-color::-moz-color-swatch{border:2px solid rgba(255,255,255,.2);border-radius:50%}.ss-toolbar-color-btn{width:22px;height:22px;padding:0;border:2px solid rgba(255,255,255,.2);border-radius:50%;cursor:pointer;box-shadow:0 0 0 1px #0000004d}.ss-toolbar-dropdown{position:relative}.ss-toolbar-popup{display:none;position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);background:#202024fa;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:14px 16px;min-width:200px;z-index:13;box-shadow:0 8px 32px #00000080,0 0 0 1px #0003}.ss-toolbar-popup.visible{display:block}.ss-toolbar-popup:before{content:"";position:absolute;top:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:10px;height:10px;background:#202024fa;border-left:1px solid rgba(255,255,255,.1);border-top:1px solid rgba(255,255,255,.1)}.ss-toolbar-popup-header{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:12px}.ss-toolbar-popup-row{display:flex;align-items:center;gap:12px}.ss-toolbar-popup-row--buttons{gap:6px}.ss-toolbar-popup-value{min-width:44px;max-width:52px;text-align:right;font-size:13px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums;background:transparent;border:1px solid transparent;border-radius:4px;padding:2px 4px;outline:none;font-family:inherit;transition:border-color .15s ease,background-color .15s ease}.ss-toolbar-popup-value:hover{border-color:#fff3}.ss-toolbar-popup-value:focus{border-color:#fff6;background:#ffffff1a}.ss-toolbar-popup-value:disabled{opacity:.5;cursor:not-allowed}.ss-toolbar-popup--wide{min-width:240px}.ss-toolbar-popup-section{margin-bottom:16px}.ss-toolbar-popup-section:last-child{margin-bottom:0}.ss-toolbar-popup-label{font-size:13px;font-weight:500;color:#ffffffe6;margin-bottom:8px}.ss-toolbar-popup-divider{height:1px;background:#ffffff1a;margin:16px 0}.ss-toolbar-slider{-webkit-appearance:none;appearance:none;flex:1;height:4px;background:transparent;border-radius:2px;cursor:pointer}.ss-toolbar-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#fff;border-radius:50%;cursor:pointer;box-shadow:0 2px 6px #0000004d;transition:transform .15s ease;margin-top:-6px}.ss-toolbar-slider::-webkit-slider-thumb:hover{transform:scale(1.1)}.ss-toolbar-slider::-moz-range-thumb{width:16px;height:16px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 2px 6px #0000004d}.ss-toolbar-slider::-webkit-slider-runnable-track{height:4px;background:#ffffff26;border-radius:2px}.ss-toolbar-slider::-moz-range-track{height:4px;background:#ffffff26;border-radius:2px}.ss-toolbar-anchor-btn{flex:1;height:36px;display:flex;align-items:center;justify-content:center;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff9;cursor:pointer;transition:all .15s ease}.ss-toolbar-anchor-btn:hover{background:#ffffff1f;color:#ffffffe6}.ss-toolbar-anchor-btn.active{background:#ffffff2e;border-color:#fff3;color:#fff}.ss-toolbar-font-btn{display:flex;align-items:center;height:32px;padding:0 8px;gap:4px;background:transparent;border:none;border-radius:6px;color:#ffffffa6;cursor:pointer;font-size:13px;font-weight:500}.ss-toolbar-font-btn:hover{background:#ffffff1a;color:#fffffff2}.ss-toolbar-popup--font{min-width:320px;padding:0;overflow:visible}.ss-toolbar-font-section{margin-bottom:8px}.ss-toolbar-font-section:last-child{margin-bottom:0}.ss-toolbar-font-section-header{font-size:10px;font-weight:600;color:#fff6;text-transform:uppercase;letter-spacing:.08em;padding:6px 10px 8px}.ss-toolbar-font-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;cursor:pointer;transition:all .12s ease;color:#ffffffd9;font-size:14px}.ss-toolbar-font-item:hover{background:#ffffff14}.ss-toolbar-font-item.active{background:#ffffff1f}.ss-toolbar-font-item.active:after{content:"";width:6px;height:6px;background:#fff;border-radius:50%;flex-shrink:0;margin-left:8px}.ss-toolbar-font-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ss-toolbar-dropdown--size{position:relative}.ss-toolbar-size-input{width:36px;text-align:center;font-size:12px;font-weight:500;color:#ffffffe6;background:transparent;border:none;outline:none;font-variant-numeric:tabular-nums;cursor:pointer;padding:4px 2px;border-radius:4px}.ss-toolbar-size-input:hover{background:#ffffff14}.ss-toolbar-size-input:focus{background:#ffffff1a;cursor:text}.ss-toolbar-popup--size{min-width:80px;max-height:280px;overflow-y:auto;padding:6px}.ss-toolbar-size-item{padding:8px 12px;text-align:center;font-size:13px;color:#ffffffd9;border-radius:6px;cursor:pointer;transition:background .12s ease}.ss-toolbar-size-item:hover{background:#ffffff14}.ss-toolbar-size-item.active{background:#ffffff1f}.ss-toolbar-dropdown--weight{position:relative}.ss-toolbar-font-btn--weight{min-width:64px;justify-content:space-between}.ss-toolbar-popup--weight{min-width:120px;max-height:280px;overflow-y:auto;padding:6px}.ss-toolbar-weight-item{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;font-size:13px;color:#ffffffd9;border-radius:6px;cursor:pointer;transition:background .12s ease}.ss-toolbar-weight-item:hover{background:#ffffff14}.ss-toolbar-weight-item.active{background:#ffffff1f}.ss-toolbar-weight-name{flex:1}.ss-toolbar-weight-check-slot{flex-shrink:0;width:12px;height:12px;margin-left:8px}.ss-toolbar-weight-check{color:#ffffffb3}.ss-toolbar-btn.ss-toolbar-btn--text-edit{width:auto;min-width:auto;padding:0 10px;gap:6px;font-size:12px;font-weight:500;white-space:nowrap}.ss-toolbar-btn.ss-toolbar-btn--primary{padding:0 16px;font-size:13px;font-weight:600;letter-spacing:-.01em;color:#fffffff2;background:#ffffff14}.ss-toolbar-btn.ss-toolbar-btn--primary:hover{background:#ffffff29;color:#fff}.ss-toolbar-btn.ss-toolbar-btn--primary.active{background:#ffffff38;color:#fff}.ss-toolbar-popup--text-edit{min-width:280px;padding:14px 16px}.ss-toolbar-text-area-wrapper{position:relative}.ss-toolbar-text-area{width:100%;min-height:80px;max-height:200px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:10px 12px;color:#ffffffe6;font-size:14px;font-family:inherit;line-height:1.5;resize:vertical;outline:none;box-sizing:border-box}.ss-toolbar-text-area:focus{border-color:#fff3;background:#ffffff14}.ss-toolbar-text-area::placeholder{color:#fff6}.ss-autocomplete-popup{display:none;position:absolute;bottom:calc(100% + 4px);left:0;right:0;background:#202024fa;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.1);border-radius:8px;max-height:160px;overflow-y:auto;z-index:15;box-shadow:0 4px 16px #0000004d}.ss-autocomplete-popup.visible{display:block}.ss-autocomplete-item{padding:8px 12px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:background .1s ease}.ss-autocomplete-item:hover,.ss-autocomplete-item.selected{background:#ffffff1a}.ss-autocomplete-var{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;color:#6366f1e6;font-size:13px;font-weight:500}.ss-autocomplete-preview{color:#fff6;font-size:12px;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ss-toolbar-checkbox{width:18px;height:18px;cursor:pointer;accent-color:#007aff}.ss-toolbar-popup--animation{min-width:240px}.ss-animation-presets{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.ss-animation-preset{padding:10px 6px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#ffffffb3;cursor:pointer;transition:all .15s ease;font-size:11px;font-weight:500;text-align:center;white-space:nowrap}.ss-animation-preset:hover{background:#ffffff1a;border-color:#ffffff26;color:#ffffffe6}.ss-animation-preset.active{background:#ffffff26;border-color:#ffffff40;color:#fff}.ss-toolbar-popup--transition{min-width:220px;padding:12px}.ss-toolbar-popup--effect{min-width:200px;padding:12px}.ss-toolbar-popup--style{min-width:260px;padding:12px}.ss-style-tabs{display:flex;background:#ffffff0f;border-radius:6px;padding:2px;margin-bottom:12px}.ss-style-tab{flex:1;padding:6px 8px;background:transparent;border:none;border-radius:4px;color:#ffffff80;font-size:10px;font-weight:600;cursor:pointer;transition:all .15s ease;text-transform:uppercase;letter-spacing:.03em}.ss-style-tab:hover{color:#ffffffb3}.ss-style-tab.active{background:#ffffff1f;color:#fff}.ss-style-panel{animation:fadeSlideIn .15s ease}.ss-style-color-picker-mount{min-height:180px}.ss-merge-label{display:flex;align-items:center;gap:4px;position:relative;font-size:13px;font-weight:500;color:#ffffffe6}.ss-merge-label__text{flex:1}.ss-merge-label__icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:none;color:#fff6;cursor:pointer;border-radius:4px;padding:0;transition:color .15s,background .15s}.ss-merge-label__icon:hover{color:#ffffffe6;background:#ffffff1a}.ss-merge-label--bound .ss-merge-label__icon{color:#4ecdc4}.ss-merge-label--bound .ss-merge-label__icon:hover{color:#5df5eb;background:#4ecdc426}.ss-merge-label__bound-name{color:#4ecdc4;font-weight:400;font-size:11px;margin-left:2px}.ss-merge-label__dropdown{position:absolute;top:100%;right:0;min-width:200px;z-index:100;margin-top:4px;padding:8px 0;background:#202024fa;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.1);border-radius:10px;box-shadow:0 8px 32px #00000080,0 0 0 1px #0003}.ss-merge-label__header{font-size:10px;font-weight:600;letter-spacing:.05em;color:#fff6;padding:4px 12px 8px;text-transform:uppercase}.ss-merge-label__create{display:block;width:100%;text-align:left;background:none;border:none;color:#ffffffe6;font-size:13px;padding:6px 12px;cursor:pointer}.ss-merge-label__create:hover{background:#ffffff14}.ss-merge-label__field{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:none;border:none;color:#fffc;font-size:13px;padding:6px 12px;cursor:pointer}.ss-merge-label__field:hover{background:#ffffff14}.ss-merge-label__field--active{background:#4ecdc4;color:#1a1a2e}.ss-merge-label__field--active:hover{background:#5df5eb}.ss-merge-label__field--disabled{opacity:.35;cursor:default;pointer-events:none}.ss-merge-label__field-name{font-weight:500;flex:1}.ss-merge-label__field-value{font-size:11px;opacity:.6;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ss-merge-label__field--active .ss-merge-label__field-value{opacity:.7}.ss-merge-label__clear{display:block;width:100%;text-align:left;background:none;border:none;border-top:1px solid rgba(255,255,255,.1);color:#fff9;font-size:13px;padding:8px 12px 4px;margin-top:4px;cursor:pointer}.ss-merge-label__clear:hover{color:#ffffffe6}.ss-active-word-header{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.1)}.ss-toolbar-popup-row--disabled{opacity:.3;pointer-events:none}.ss-toolbar-slider:disabled{opacity:.3;pointer-events:none}.ss-toolbar-color:disabled{opacity:.3;pointer-events:none}.ss-toolbar-popup-value:disabled,input.ss-toolbar-popup-value:disabled{opacity:.3;pointer-events:none}.ss-source-dot{width:6px;height:6px;border-radius:50%;background:#ffffff40;flex-shrink:0;transition:background .15s ease}.ss-source-dot.linked{background:#4ecdc4}.ss-source-list{display:flex;flex-direction:column;gap:4px}.ss-source-item{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;color:#ffffffb3;cursor:pointer;transition:all .15s ease;font-size:13px;font-weight:500;text-align:left}.ss-source-item:hover{background:#ffffff1a;border-color:#ffffff26;color:#ffffffe6}.ss-source-item.active{background:#ffffff26;border-color:#ffffff40;color:#fff}.ss-source-item-check{width:6px;height:6px;border-radius:50%;flex-shrink:0}.ss-source-item.active .ss-source-item-check{background:#fff}.ss-source-divider{height:1px;background:#ffffff14;margin:4px 0}.ss-source-empty{padding:12px;text-align:center;color:#fff6;font-size:12px}.ss-svg-toolbar{display:none}.ss-svg-toolbar.visible{display:flex;align-items:center;gap:8px}.ss-toolbar-color-input{width:32px;height:32px;border-radius:4px;border:1px solid rgba(255,255,255,.1);cursor:pointer;background:transparent;padding:0}.ss-toolbar-color-input:hover{border-color:#fff3}.ss-toolbar-slider-group--inline{display:flex;align-items:center;gap:6px}.ss-toolbar-slider-group--inline label{font-size:11px;color:#fff9;text-transform:uppercase;letter-spacing:.5px;min-width:32px}.ss-toolbar-inline-icon{width:16px;height:16px;color:#fff9;flex-shrink:0}.ss-toolbar-slider-group--inline .ss-toolbar-slider{width:80px}.ss-toolbar-slider-group--inline .ss-toolbar-value{font-size:11px;color:#fffc;min-width:36px;text-align:right}.ss-toolbar-number-input{width:60px;height:28px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;color:#ffffffe6;font-size:12px;padding:0 8px;text-align:center}.ss-toolbar-number-input:hover{background:#ffffff14;border-color:#fff3}.ss-toolbar-number-input:focus{outline:none;background:#ffffff1a;border-color:#ffffff4d}.ss-conditional-control,.ss-conditional-divider{display:none}.ss-media-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 8px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-media-toolbar.visible{display:flex}.ss-media-toolbar-visual{display:flex;align-items:center}.ss-media-toolbar-visual.hidden{display:none}.ss-media-toolbar-group{display:flex;align-items:center;gap:1px}.ss-media-toolbar-group--bordered{background:#ffffff0a;border-radius:6px;padding:2px}.ss-media-toolbar-divider{width:1px;height:20px;background:#ffffff1a;margin:0 6px}.ss-media-toolbar-btn{display:flex;align-items:center;justify-content:center;gap:6px;min-width:32px;height:32px;padding:0 10px;background:transparent;border:none;border-radius:6px;color:#ffffffa6;font-size:12px;font-weight:500;cursor:pointer;transition:all .15s ease;position:relative;white-space:nowrap}.ss-media-toolbar-btn:hover{background:#ffffff1a;color:#fffffff2}.ss-media-toolbar-btn.active{background:#ffffff26;color:#fff}.ss-media-toolbar-btn svg{width:16px;height:16px;flex-shrink:0}.ss-media-toolbar-btn .chevron{width:10px;height:10px;opacity:.5;margin-left:-2px}.ss-media-toolbar-value{min-width:36px;text-align:center;font-size:12px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums}.ss-media-toolbar-dropdown{position:relative}.ss-media-toolbar-popup{display:none;position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);background:#202024fa;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:8px;min-width:180px;z-index:13;box-shadow:0 8px 32px #00000080,0 0 0 1px #0003}.ss-media-toolbar-popup.visible{display:block}.ss-media-toolbar-popup:before{content:"";position:absolute;top:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:10px;height:10px;background:#202024fa;border-left:1px solid rgba(255,255,255,.1);border-top:1px solid rgba(255,255,255,.1)}.ss-media-toolbar-popup-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;cursor:pointer;transition:background .12s ease;font-size:13px;font-weight:500;color:#ffffffd9}.ss-media-toolbar-popup-item:hover{background:#ffffff14}.ss-media-toolbar-popup-item.active{background:#ffffff1f}.ss-media-toolbar-popup-item .checkmark{width:14px;height:14px;opacity:0;color:#fff}.ss-media-toolbar-popup-item.active .checkmark{opacity:1}.ss-media-toolbar-popup-item-label{display:flex;flex-direction:column;gap:2px}.ss-media-toolbar-popup-item-sublabel{font-size:11px;font-weight:400;color:#fff6}.ss-media-toolbar-popup--slider{min-width:200px;padding:14px 16px}.ss-media-toolbar-popup-header{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:12px}.ss-media-toolbar-slider-row{display:flex;align-items:center;gap:12px}.ss-media-toolbar-slider{-webkit-appearance:none;appearance:none;flex:1;height:4px;background:#ffffff26;border-radius:2px;cursor:pointer}.ss-media-toolbar-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#fff;border-radius:50%;cursor:pointer;box-shadow:0 2px 6px #0000004d;transition:transform .15s ease;margin-top:-6px}.ss-media-toolbar-slider::-webkit-slider-thumb:hover{transform:scale(1.1)}.ss-media-toolbar-slider::-moz-range-thumb{width:16px;height:16px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 2px 6px #0000004d}.ss-media-toolbar-slider::-webkit-slider-runnable-track{height:4px;background:#ffffff26;border-radius:2px}.ss-media-toolbar-slider::-moz-range-track{height:4px;background:#ffffff26;border-radius:2px}.ss-media-toolbar-slider-value{min-width:44px;max-width:52px;text-align:right;font-size:13px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums;background:transparent;border:1px solid transparent;border-radius:4px;padding:2px 4px;outline:none;font-family:inherit;transition:border-color .15s ease,background-color .15s ease}.ss-media-toolbar-slider-value:hover{border-color:#fff3}.ss-media-toolbar-slider-value:focus{border-color:#fff6;background:#ffffff1a}.ss-media-toolbar-slider-value:disabled{opacity:.5;cursor:not-allowed}.ss-media-toolbar-presets{display:flex;gap:6px;margin-top:12px}.ss-media-toolbar-preset{flex:1;padding:8px 6px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#ffffffb3;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s ease;text-align:center}.ss-media-toolbar-preset:hover{background:#ffffff1a;border-color:#ffffff26;color:#ffffffe6}.ss-media-toolbar-preset.active{background:#ffffff26;border-color:#ffffff40;color:#fff}[data-volume-icon],.ss-media-toolbar-volume{display:flex;align-items:center}.ss-media-toolbar-volume.hidden{display:none}.ss-media-toolbar-popup--transition{min-width:220px;padding:12px}.ss-transition-tabs{display:flex;background:#ffffff0f;border-radius:6px;padding:2px;margin-bottom:12px}.ss-transition-tab{flex:1;padding:6px 12px;background:transparent;border:none;border-radius:4px;color:#ffffff80;font-size:11px;font-weight:600;cursor:pointer;transition:all .15s ease;text-transform:uppercase;letter-spacing:.03em}.ss-transition-tab:hover{color:#ffffffb3}.ss-transition-tab.active{background:#ffffff1f;color:#fff}.ss-transition-effects{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.ss-transition-effect{padding:8px 4px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;color:#fff9;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s ease;text-align:center}.ss-transition-effect:hover{background:#ffffff14;color:#ffffffe6}.ss-transition-effect.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-transition-direction-row{display:none;align-items:center;gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.06)}.ss-transition-direction-row.visible{display:flex}.ss-transition-label{font-size:10px;font-weight:500;color:#fff6;min-width:52px}.ss-transition-directions{display:flex;gap:4px;flex:1}.ss-transition-dir{flex:1;padding:6px 8px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:5px;color:#ffffff80;font-size:12px;cursor:pointer;transition:all .15s ease;text-align:center}.ss-transition-dir:hover{background:#ffffff14;color:#ffffffe6}.ss-transition-dir.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-transition-dir.hidden{display:none}.ss-transition-speed-row{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.06)}.ss-transition-speed-stepper{display:flex;align-items:center;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;overflow:hidden}.ss-transition-speed-btn{width:28px;height:26px;background:transparent;border:none;color:#ffffff80;font-size:14px;font-weight:500;cursor:pointer;transition:all .15s ease;display:flex;align-items:center;justify-content:center}.ss-transition-speed-btn:hover{background:#ffffff14;color:#ffffffe6}.ss-transition-speed-btn:active{background:#ffffff1f}.ss-transition-speed-btn:disabled{opacity:.3;cursor:not-allowed}.ss-transition-speed-value{min-width:42px;padding:0 4px;text-align:center;font-size:11px;font-weight:500;color:#ffffffd9;font-variant-numeric:tabular-nums;border-left:1px solid rgba(255,255,255,.06);border-right:1px solid rgba(255,255,255,.06)}.ss-media-toolbar-btn--icon{min-width:32px;padding:0 8px}.ss-media-toolbar-popup--advanced{min-width:200px;padding:12px}.ss-advanced-option{display:flex;align-items:center;justify-content:space-between;gap:12px}.ss-advanced-label{font-size:12px;font-weight:500;color:#ffffffd9}.ss-toggle{position:relative;display:inline-block;width:36px;height:20px;flex-shrink:0}.ss-toggle input{opacity:0;width:0;height:0}.ss-toggle-slider{position:absolute;cursor:pointer;inset:0;background:#ffffff1a;border-radius:10px;transition:.2s ease}.ss-toggle-slider:before{content:"";position:absolute;width:16px;height:16px;left:2px;top:2px;background:#ffffffe6;border-radius:50%;transition:.2s ease}.ss-toggle input:checked+.ss-toggle-slider{background:#6366f1cc}.ss-toggle input:checked+.ss-toggle-slider:before{transform:translate(16px)}.ss-dynamic-panel{display:none;padding-top:12px;margin-top:12px;border-top:1px solid rgba(255,255,255,.08)}.ss-dynamic-input-wrapper{position:relative}.ss-dynamic-input{width:100%;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:6px;padding:8px 12px;color:#ffffffe6;font-size:12px;font-family:inherit;outline:none;box-sizing:border-box}.ss-dynamic-input:focus{border-color:#fff3;background:#ffffff14}.ss-dynamic-input::placeholder{color:#fff6}.ss-dynamic-input.error{border-color:#ef444499;background:#ef44441a}.ss-dynamic-input.error:focus{border-color:#ef4444cc}.ss-dynamic-dropdown{display:none;position:absolute;top:calc(100% + 4px);left:0;right:0;background:#202024fa;backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.1);border-radius:6px;max-height:160px;overflow-y:auto;z-index:13}.ss-dynamic-dropdown.visible{display:block}.ss-dynamic-item{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;cursor:pointer;transition:background .1s ease}.ss-dynamic-item:hover,.ss-dynamic-item.selected{background:#ffffff1a}.ss-dynamic-item-name{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:12px;color:#6366f1e6}.ss-dynamic-item-preview{font-size:11px;color:#fff6;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ss-dynamic-item--create{border-top:1px solid rgba(255,255,255,.06)}.ss-dynamic-item--create .ss-dynamic-item-name{color:#34d399e6}.ss-dynamic-empty{padding:12px;text-align:center;font-size:11px;color:#fff6}.ss-media-toolbar-popup--effect{min-width:200px;padding:12px}.ss-effect-types{display:flex;gap:6px}.ss-effect-type{flex:1;padding:10px 8px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:8px;color:#fff9;font-size:12px;font-weight:500;cursor:pointer;transition:all .15s ease;text-align:center}.ss-effect-type:hover{background:#ffffff14;color:#ffffffe6}.ss-effect-type.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-effect-variant-row{display:none;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.06);animation:fadeSlideIn .15s ease}.ss-effect-variant-row.visible{display:flex}.ss-effect-variants{display:flex;gap:4px;flex:1}.ss-effect-variant{flex:1;padding:6px 12px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;color:#ffffff80;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s ease;text-align:center}.ss-effect-variant:hover{background:#ffffff14;color:#ffffffe6}.ss-effect-variant.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-effect-direction-row{display:none;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.06);animation:fadeSlideIn .15s ease}.ss-effect-direction-row.visible{display:flex}.ss-effect-directions{display:flex;gap:4px;flex:1}.ss-effect-dir{flex:1;padding:6px 8px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;color:#ffffff80;font-size:13px;cursor:pointer;transition:all .15s ease;text-align:center}.ss-effect-dir:hover{background:#ffffff14;color:#ffffffe6}.ss-effect-dir.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-effect-speed-row{display:none;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.06);animation:fadeSlideIn .15s ease}.ss-effect-speed-row.visible{display:flex}.ss-effect-label{font-size:10px;font-weight:500;color:#fff6;text-transform:uppercase;letter-spacing:.03em;min-width:52px}.ss-effect-speed-stepper{display:flex;align-items:center;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;overflow:hidden}.ss-effect-speed-btn{width:28px;height:26px;background:transparent;border:none;color:#ffffff80;font-size:14px;font-weight:500;cursor:pointer;transition:all .15s ease;display:flex;align-items:center;justify-content:center}.ss-effect-speed-btn:hover{background:#ffffff14;color:#ffffffe6}.ss-effect-speed-btn:active{background:#ffffff1f}.ss-effect-speed-btn:disabled{opacity:.3;cursor:not-allowed}.ss-effect-speed-value{min-width:42px;padding:0 4px;text-align:center;font-size:11px;font-weight:500;color:#ffffffd9;font-variant-numeric:tabular-nums;border-left:1px solid rgba(255,255,255,.06);border-right:1px solid rgba(255,255,255,.06)}@keyframes fadeSlideIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.ss-media-toolbar-audio{display:flex;align-items:center}.ss-media-toolbar-audio.hidden{display:none}.ss-media-toolbar-popup--audio-fade{min-width:180px;padding:8px}.ss-audio-fade-options{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.ss-audio-fade-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 8px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:8px;cursor:pointer;transition:all .15s ease}.ss-audio-fade-btn:hover{background:#ffffff14;border-color:#ffffff1f}.ss-audio-fade-btn.active{background:#ffffff1f;border-color:#fff3}.ss-audio-fade-icon{display:flex;align-items:center;justify-content:center;width:32px;height:16px;color:#ffffff80;transition:color .15s ease}.ss-audio-fade-icon svg{width:32px;height:16px}.ss-audio-fade-btn:hover .ss-audio-fade-icon,.ss-audio-fade-btn.active .ss-audio-fade-icon{color:#ffffffe6}.ss-audio-fade-label{font-size:10px;font-weight:500;color:#ffffff80;text-transform:uppercase;letter-spacing:.02em;transition:color .15s ease}.ss-audio-fade-btn:hover .ss-audio-fade-label,.ss-audio-fade-btn.active .ss-audio-fade-label{color:#ffffffe6}.ss-tti-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 8px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-tti-toolbar.visible{display:flex}.ss-tti-prompt-section{display:flex;align-items:center}.ss-tti-prompt-btn{max-width:180px;overflow:hidden;text-overflow:ellipsis}.ss-tti-prompt-btn .ss-tti-prompt-text{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:middle}.ss-tti-prompt-popup{min-width:320px;padding:12px}.ss-tti-prompt-popup .ss-media-toolbar-popup-header{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.ss-tti-prompt-textarea{width:100%;min-height:80px;max-height:200px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:10px 12px;color:#ffffffe6;font-size:13px;font-family:inherit;line-height:1.5;outline:none;resize:vertical;box-sizing:border-box}.ss-tti-prompt-textarea:focus{border-color:#ffffff40;background:#ffffff14}.ss-tti-prompt-textarea::placeholder{color:#ffffff4d}.ss-tti-prompt-hint{margin-top:6px;font-size:11px;color:#ffffff4d}.ss-tti-dimensions-section{display:flex;align-items:center}.ss-tti-dim-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:#fff6;margin-right:4px;flex-shrink:0;cursor:default}.ss-tti-dim-icon svg{width:16px;height:16px}.ss-tti-dim-separator{font-size:11px;color:#ffffff4d;margin:0 2px}.ss-tti-dim-btn{min-width:48px;font-variant-numeric:tabular-nums}.ss-tti-dim-description{font-size:11px;font-weight:400;color:#ffffff59;margin-bottom:8px}.ss-tti-visual-section{display:flex;align-items:center}.ss-tts-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 8px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-tts-toolbar.visible{display:flex}.ss-tts-voice-popup{padding:0;min-width:240px}.ss-tts-voice-popup .ss-media-toolbar-popup-header{padding:12px 12px 8px}.ss-tts-text-btn{max-width:140px}.ss-tts-text-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100px}.ss-tts-text-popup{min-width:280px;padding:14px 16px}.ss-tts-textarea{width:100%;min-height:80px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:10px 12px;color:#ffffffe6;font-size:13px;font-family:inherit;line-height:1.5;resize:vertical;outline:none;box-sizing:border-box}.ss-tts-textarea:focus{border-color:#fff3;background:#ffffff14}.ss-tts-textarea::placeholder{color:#fff6}.ss-clip-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);width:fit-content;background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 12px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-clip-toolbar.visible{display:flex}.ss-clip-toolbar-section{display:flex;align-items:center;flex:0 0 auto}.ss-clip-toolbar-divider{width:1px;height:16px;background:#ffffff0f;margin:0 6px}.ss-timing-control{position:relative;display:inline-flex;align-items:center;height:26px;padding:0 6px 0 5px;background:#ffffff0a;border:1px solid rgba(255,255,255,.06);border-radius:6px;gap:4px;cursor:ew-resize;transition:all .15s ease;flex-shrink:0;width:fit-content}.ss-timing-label{display:inline-flex;align-items:center;justify-content:center;padding:2px 3px;background:#ffffff0f;border-radius:3px;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;flex-shrink:0;user-select:none;cursor:pointer;transition:color .15s ease,background .15s ease}.ss-timing-control[data-type=start] .ss-timing-label{background:#22c55e1f;color:#22c55ebf}.ss-timing-control[data-type=length] .ss-timing-label{background:#6366f11f;color:#818cf8bf}.ss-timing-control:hover{background:#ffffff14;border-color:#ffffff1a}.ss-timing-control.dragging{background:#6366f11f;border-color:#6366f14d}.ss-timing-control.editing{background:#0000004d;border-color:#6366f166;cursor:text}.ss-timing-mode{display:flex;align-items:center;gap:4px;padding:0;background:transparent;border:none;cursor:pointer;color:#ffffff73;transition:color .15s ease;flex-shrink:0}.ss-timing-mode:hover{color:#ffffffd9}.ss-timing-mode:hover .ss-timing-label{color:#ffffffb3}.ss-timing-mode svg{width:12px;height:12px;flex-shrink:0}.ss-timing-value{width:6ch;height:100%;padding:0;background:transparent;border:none;color:#ffffffd9;font-size:11px;font-family:SF Mono,Monaco,Consolas,monospace;font-weight:500;text-align:left;cursor:inherit;user-select:none;transition:color .15s ease}.ss-timing-value:focus{outline:none}.ss-timing-control.editing .ss-timing-value{cursor:text;user-select:text;color:#fffffff2}.ss-timing-value.auto-mode{color:#fff6;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;font-style:italic;font-weight:400}.ss-timing-tooltip{position:absolute;top:calc(100% + 8px);left:0;padding:5px 8px;background:#000000e6;border-radius:4px;color:#ffffffe6;font-size:10px;font-weight:500;letter-spacing:.2px;white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease;pointer-events:none;z-index:14}.ss-timing-tooltip.visible{opacity:1;visibility:visible}.ss-timing-control.dragging,.ss-timing-control.dragging *{cursor:ew-resize!important}.ss-timing-merge-mount{display:inline-flex;align-items:center;position:relative;flex-shrink:0}.ss-timing-merge-mount:empty{display:none}.ss-timing-merge-mount .ss-merge-label{font-size:0;gap:0}.ss-timing-merge-mount .ss-merge-label__text,.ss-timing-merge-mount .ss-merge-label__bound-name{display:none}.ss-timing-merge-mount .ss-merge-label__icon{width:16px;height:16px}.ss-timing-merge-mount .ss-merge-label__icon svg{width:12px;height:12px}.ss-timing-merge-mount .ss-merge-label__dropdown{top:calc(100% + 8px);right:auto;left:50%;transform:translate(-50%)}.ss-timing-control[data-merge-bound]{cursor:default}.ss-timing-control[data-merge-bound] .ss-timing-label{background:#4ecdc41f;color:#4ecdc4bf}.ss-timing-control[data-merge-bound] .ss-timing-mode{color:#4ecdc4;cursor:default}.ss-timing-control[data-merge-bound] .ss-timing-mode:hover{color:#5df5eb}.ss-timing-control[data-merge-bound] .ss-timing-mode:hover .ss-timing-label{color:#4ecdc4d9}.ss-timing-control[data-merge-bound] .ss-timing-value{color:#ffffff73;cursor:default}.ss-toolbar-mode-toggle{position:relative;display:flex;gap:2px;padding:2px;background:#00000040;border-radius:6px;margin-right:4px}.ss-toolbar-mode-btn{position:relative;width:28px;height:24px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:4px;cursor:pointer;color:#fff6;transition:color .15s ease;z-index:1}.ss-toolbar-mode-btn:hover{color:#ffffffb3}.ss-toolbar-mode-btn.active{color:#fffffff2}.ss-toolbar-mode-btn svg{width:14px;height:14px}.ss-toolbar-mode-indicator{position:absolute;top:2px;left:2px;width:28px;height:24px;background:#ffffff1a;border-radius:4px;transition:transform .2s cubic-bezier(.4,0,.2,1);pointer-events:none}.ss-toolbar-mode-toggle[data-mode=clip] .ss-toolbar-mode-indicator{transform:translate(calc(100% + 2px))}.ss-toolbar-mode-divider{width:1px;height:20px;background:#ffffff1a;margin:0 8px 0 4px;flex-shrink:0}.ss-toolbar-mode-container{display:none!important}.ss-canvas-toolbar{position:absolute;width:fit-content;transform:translateY(-50%);display:flex;flex-direction:column;align-items:stretch;gap:2px;padding:6px;background:#fffffffa;border:1px solid rgba(0,0,0,.06);border-radius:14px;box-shadow:0 2px 8px #0000000f,0 8px 24px #00000014;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;z-index:9;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.ss-canvas-toolbar-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:8px;color:#000000a6;cursor:pointer;transition:all .15s ease;position:relative}.ss-canvas-toolbar-btn:hover{background:#0000000f;color:#000000e6}.ss-canvas-toolbar-btn:active{background:#0000001a;transform:scale(.95)}.ss-canvas-toolbar-btn.active{background:#0000000f}.ss-canvas-toolbar-btn svg{width:18px;height:18px;flex-shrink:0}.ss-canvas-toolbar-btn:after{content:attr(data-tooltip);position:absolute;right:calc(100% + 10px);top:50%;transform:translateY(-50%);padding:6px 10px;background:#18181bf2;color:#fff;font-size:12px;font-weight:500;white-space:nowrap;border-radius:6px;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease;pointer-events:none;box-shadow:0 4px 12px #00000026}.ss-canvas-toolbar-btn:before{content:"";position:absolute;right:calc(100% + 4px);top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:#18181bf2;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease}.ss-canvas-toolbar-btn:hover:after,.ss-canvas-toolbar-btn:hover:before{opacity:1;visibility:visible}.ss-canvas-toolbar-btn.active:after,.ss-canvas-toolbar-btn.active:before{opacity:0;visibility:hidden}.ss-canvas-toolbar-fps-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.01em}.ss-canvas-toolbar-color-dot{width:18px;height:18px;border-radius:50%;border:1.5px solid rgba(0,0,0,.15);flex-shrink:0}.ss-canvas-toolbar-divider{width:24px;height:1px;background:#00000014;margin:4px auto;flex-shrink:0}.ss-canvas-toolbar-dropdown{position:relative}.ss-canvas-toolbar-popup{display:none;position:absolute;right:calc(100% + 10px);top:50%;transform:translateY(-50%);background:#fff;border-radius:14px;padding:8px;min-width:180px;z-index:13;filter:drop-shadow(0 4px 12px rgba(0,0,0,.15))}.ss-canvas-toolbar-popup.visible{display:block}.ss-canvas-toolbar-popup:after{content:"";position:absolute;right:-6px;top:50%;transform:translateY(-50%) rotate(45deg);width:12px;height:12px;background:#fff}.ss-canvas-toolbar-popup-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;cursor:pointer;transition:background .12s ease;font-size:13px;font-weight:500;color:#1a1a1a}.ss-canvas-toolbar-popup-item:hover{background:#0000000a}.ss-canvas-toolbar-popup-item.active{background:#0000000f}.ss-canvas-toolbar-popup-item-label{display:flex;flex-direction:column;gap:2px}.ss-canvas-toolbar-popup-item-sublabel{font-size:11px;font-weight:400;color:#00000073}.ss-canvas-toolbar-popup-item .checkmark{width:16px;height:16px;opacity:0}.ss-canvas-toolbar-popup-item.active .checkmark{opacity:1}.ss-canvas-toolbar-popup-header{font-size:11px;font-weight:600;color:#0006;text-transform:uppercase;letter-spacing:.04em;padding:8px 12px 6px}.ss-canvas-toolbar-popup-divider{height:1px;background:#0000000f;margin:6px 0}.ss-canvas-toolbar-custom-size{display:flex;align-items:center;gap:8px;padding:10px 12px}.ss-canvas-toolbar-custom-input{width:70px;padding:8px 10px;background:#0000000a;border:1px solid rgba(0,0,0,.08);border-radius:8px;font-size:13px;font-weight:500;color:#1a1a1a;text-align:center;outline:none;-moz-appearance:textfield}.ss-canvas-toolbar-custom-input::-webkit-outer-spin-button,.ss-canvas-toolbar-custom-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.ss-canvas-toolbar-custom-input:focus{border-color:#0003;background:#00000005}.ss-canvas-toolbar-custom-input.warning{border-color:#d9770680;background:#d977060f;color:#b45309}.ss-canvas-toolbar-custom-input.warning:focus{border-color:#d97706b3;box-shadow:0 0 0 3px #d977061a}.ss-canvas-toolbar-custom-input.error{border-color:#ef444480;background:#ef44440f;color:#dc2626}.ss-canvas-toolbar-custom-input.error:focus{border-color:#ef4444b3;box-shadow:0 0 0 3px #ef44441a}.ss-canvas-toolbar-custom-separator{color:#0000004d;font-size:13px;font-weight:500}.ss-canvas-toolbar-color-picker{padding:4px}.ss-canvas-toolbar-color-input{width:100%;height:120px;border:1px solid rgba(0,0,0,.1);border-radius:10px;cursor:pointer;padding:0}.ss-canvas-toolbar-color-input::-webkit-color-swatch-wrapper{padding:0}.ss-canvas-toolbar-color-input::-webkit-color-swatch{border:none;border-radius:9px}.ss-canvas-toolbar-color-input::-moz-color-swatch{border:none;border-radius:9px}.ss-canvas-toolbar-color-swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;padding:8px 4px}.ss-canvas-toolbar-color-swatch{width:28px;height:28px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:transform .15s ease,border-color .15s ease}.ss-canvas-toolbar-color-swatch:hover{transform:scale(1.1)}.ss-canvas-toolbar-color-swatch.active{border-color:#0000004d}.ss-canvas-toolbar-popup--variables{width:300px;max-height:400px;flex-direction:column;overflow:visible}.ss-canvas-toolbar-popup--variables.visible{display:flex}.ss-variables-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:10px 12px 8px}.ss-variables-add-btn{width:26px;height:26px;display:flex;align-items:center;justify-content:center;background:#0000000d;border:none;border-radius:8px;color:#00000080;font-size:18px;font-weight:400;cursor:pointer;transition:all .15s ease}.ss-variables-add-btn:hover{background:#0000001a;color:#000c}.ss-variables-list{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:6px;padding:4px 8px 8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-radius:0 0 10px 10px}.ss-variables-list::-webkit-scrollbar{width:5px}.ss-variables-list::-webkit-scrollbar-track{background:transparent;margin:4px 0}.ss-variables-list::-webkit-scrollbar-thumb{background:#0000001f;border-radius:3px}.ss-variables-list::-webkit-scrollbar-thumb:hover{background:#0003}.ss-variables-empty{padding:20px 12px;text-align:center;font-size:13px;color:#00000059}.ss-variable-item{flex-shrink:0;display:flex;flex-direction:column;gap:6px;padding:10px;background:#00000006;border-radius:10px;border:1px solid rgba(0,0,0,.04)}.ss-variable-item-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.ss-variable-name{font-size:11px;font-weight:600;color:#6366f1d9;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;letter-spacing:.02em}.ss-variable-value{width:100%;padding:8px 10px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:8px;font-size:13px;color:#1a1a1a;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.ss-variable-value:focus{border-color:#6366f180;box-shadow:0 0 0 3px #6366f114}.ss-variable-value::placeholder{color:#0000004d}.ss-variable-value.error{border-color:#ef444480;background:#ef444408}.ss-variable-value.error:focus{border-color:#ef4444b3;box-shadow:0 0 0 3px #ef444414}.ss-variable-delete{width:22px;height:22px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:6px;color:#00000040;font-size:14px;cursor:pointer;transition:all .15s ease;flex-shrink:0}.ss-variable-delete:hover{background:#ef44441a;color:#ef4444}.ss-asset-toolbar{position:absolute;width:fit-content;transform:translateY(-50%);display:flex;flex-direction:column;gap:2px;padding:6px;background:#fffffffa;border:1px solid rgba(0,0,0,.06);border-radius:14px;box-shadow:0 2px 8px #0000000f,0 8px 24px #00000014;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;z-index:9;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.ss-asset-toolbar-buttons{display:flex;flex-direction:column;gap:2px}.ss-asset-toolbar-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:8px;color:#000000a6;cursor:pointer;transition:all .15s ease;position:relative}.ss-asset-toolbar-btn:hover{background:#0000000f;color:#000000e6}.ss-asset-toolbar-btn:active{background:#0000001a;transform:scale(.95)}.ss-asset-toolbar-btn svg{width:18px;height:18px;flex-shrink:0}.ss-asset-toolbar-divider{width:24px;height:1px;background:#00000014;margin:4px auto}.ss-asset-toolbar-btn:after{content:attr(data-tooltip);position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);padding:6px 10px;background:#18181bf2;color:#fff;font-size:12px;font-weight:500;white-space:nowrap;border-radius:6px;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease;pointer-events:none;box-shadow:0 4px 12px #00000026}.ss-asset-toolbar-btn:before{content:"";position:absolute;left:calc(100% + 4px);top:50%;transform:translateY(-50%);border:5px solid transparent;border-right-color:#18181bf2;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease}.ss-asset-toolbar-btn:hover:after,.ss-asset-toolbar-btn:hover:before{opacity:1;visibility:visible}.ss-font-color-picker{padding:16px;min-width:260px}.ss-font-color-tabs{display:flex;gap:4px;margin-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.ss-font-color-tab{flex:1;padding:8px 12px;background:transparent;border:none;border-bottom:2px solid transparent;color:#fff9;font-size:12px;cursor:pointer;transition:all .2s}.ss-font-color-tab.active{color:#fff;border-bottom-color:#007aff}.ss-font-color-tab-content{display:none}.ss-font-color-tab-content.active{display:block}.ss-font-color-section{margin-bottom:16px}.ss-font-color-section:last-child{margin-bottom:0}.ss-font-color-label{font-size:13px;font-weight:500;color:#ffffffe6;margin-bottom:8px}.ss-font-color-input{width:100%;height:40px;padding:0;border:1px solid rgba(255,255,255,.1);border-radius:6px;cursor:pointer;background:transparent}.ss-font-color-input::-webkit-color-swatch-wrapper{padding:4px}.ss-font-color-input::-webkit-color-swatch{border:none;border-radius:4px}.ss-font-color-input::-moz-color-swatch{border:none;border-radius:4px}.ss-font-color-opacity-row{display:flex;align-items:center;gap:12px}.ss-font-color-opacity{-webkit-appearance:none;appearance:none;flex:1;height:4px;background:linear-gradient(90deg,#fff0,#fff);border-radius:2px;cursor:pointer;outline:none}.ss-font-color-opacity::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;background:#fff;border-radius:50%;cursor:pointer;box-shadow:0 1px 4px #0000004d}.ss-font-color-opacity::-moz-range-thumb{width:14px;height:14px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 1px 4px #0000004d}.ss-font-color-opacity-value{min-width:42px;text-align:right;font-size:13px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums}.ss-gradient-category{margin-bottom:16px}.ss-gradient-category:last-child{margin-bottom:0}.ss-gradient-category-name{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.ss-gradient-swatches{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.ss-gradient-swatch{aspect-ratio:1;border:none;border-radius:6px;cursor:pointer;transition:transform .15s,box-shadow .15s;box-shadow:0 1px 3px #0000004d}.ss-gradient-swatch:hover{transform:translateY(-2px);box-shadow:0 4px 8px #0006}.ss-color-picker{padding:16px}.ss-color-picker-header{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:14px}.ss-color-picker-enable-row{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.1)}.ss-color-picker-enable-label{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;font-weight:500;color:#ffffffe6;user-select:none}.ss-color-picker-enable-checkbox{width:16px;height:16px;cursor:pointer;accent-color:#007aff}.ss-color-picker-controls{transition:opacity .2s ease}.ss-color-picker-controls.disabled{opacity:.4;pointer-events:none}.ss-color-picker-color-section,.ss-color-picker-opacity-section{margin-bottom:16px}.ss-color-picker-color-section:last-child,.ss-color-picker-opacity-section:last-child{margin-bottom:0}.ss-color-picker-label{font-size:13px;font-weight:500;color:#ffffffe6;margin-bottom:8px}.ss-color-picker-color-wrap{display:flex;align-items:center;gap:12px}.ss-color-picker-color{width:100%;height:40px;padding:0;border:1px solid rgba(255,255,255,.1);border-radius:6px;cursor:pointer;background:transparent}.ss-color-picker-color::-webkit-color-swatch-wrapper{padding:4px}.ss-color-picker-color::-webkit-color-swatch{border:none;border-radius:4px}.ss-color-picker-color::-moz-color-swatch{border:none;border-radius:4px}.ss-color-picker-opacity-row{display:flex;align-items:center;gap:12px}.ss-color-picker-opacity{flex:1}.ss-color-picker-opacity-value{min-width:42px;text-align:right;font-size:13px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums}.ss-font-picker{display:flex;flex-direction:column;width:320px;height:480px;background:#fafafa;border-radius:12px;box-shadow:0 8px 32px #0000001f,0 2px 8px #00000014,0 0 0 1px #0000000a;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;font-size:13px;color:#1a1a1a}.ss-font-picker-header{flex-shrink:0;padding:12px;background:#fff;border-bottom:1px solid rgba(0,0,0,.06)}.ss-font-picker-search{position:relative;margin-bottom:10px}.ss-font-picker-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#999;pointer-events:none}.ss-font-picker-search-input{width:100%;height:36px;padding:0 12px 0 36px;background:#f0f0f0;border:none;border-radius:8px;font-family:inherit;font-size:13px;color:#1a1a1a;outline:none;transition:background .15s ease,box-shadow .15s ease}.ss-font-picker-search-input::placeholder{color:#999}.ss-font-picker-search-input:focus{background:#fff;box-shadow:0 0 0 2px #3b82f64d,0 1px 2px #0000000d}.ss-font-picker-categories{display:flex;gap:4px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding-bottom:2px;scrollbar-width:none}.ss-font-picker-categories::-webkit-scrollbar{display:none}.ss-font-picker-category{flex-shrink:0;padding:5px 10px;background:transparent;border:none;border-radius:6px;font-family:inherit;font-size:12px;font-weight:500;color:#666;cursor:pointer;white-space:nowrap;transition:background .15s ease,color .15s ease}.ss-font-picker-category:hover{background:#0000000d;color:#333}.ss-font-picker-category--active{background:#1a1a1a;color:#fff}.ss-font-picker-category--active:hover{background:#333;color:#fff}.ss-font-picker-recent{flex-shrink:0;padding:10px 12px;background:#fff}.ss-font-picker-recent-label{margin-bottom:8px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#999}.ss-font-picker-recent-list{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;overflow-y:hidden;padding-bottom:4px;scrollbar-width:thin}.ss-font-picker-recent-list::-webkit-scrollbar{height:4px}.ss-font-picker-recent-list::-webkit-scrollbar-thumb{background:#00000026;border-radius:2px}.ss-font-picker-recent-chip{flex-shrink:0;padding:6px 12px;background:#f5f5f5;border:none;border-radius:16px;font-size:13px;color:#555;cursor:pointer;opacity:.7;white-space:nowrap;transition:background .15s ease,opacity .2s ease,transform .1s ease}.ss-font-picker-recent-chip--loaded{opacity:1}.ss-font-picker-recent-chip:hover{background:#eee;transform:translateY(-1px)}.ss-font-picker-recent-chip--selected{background:#1a1a1a;color:#fff;opacity:1}.ss-font-picker-recent-chip--selected:hover{background:#333}.ss-font-picker-custom{flex-shrink:0;padding:12px;background:linear-gradient(to bottom,#fefdfb,#fafafa)}.ss-font-picker-custom-label{display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#777}.ss-font-picker-custom-label:before{content:"";width:3px;height:12px;background:#d4a574;border-radius:1.5px}.ss-font-picker-custom-list{display:flex;flex-direction:column;gap:1px}.ss-font-picker-custom-item{display:flex;align-items:center;justify-content:space-between;height:44px;padding:0 12px;margin:0 -12px;border-radius:8px;cursor:pointer;opacity:.6;transition:background .15s ease,opacity .3s ease,transform .15s ease}.ss-font-picker-custom-item--loaded{opacity:1}.ss-font-picker-custom-item:hover{background:#d4a57414;transform:translate(2px)}.ss-font-picker-custom-item:active{transform:translate(2px) scale(.995)}.ss-font-picker-custom-item--selected{background:#2563eb14}.ss-font-picker-custom-item--selected:hover{background:#2563eb1f}.ss-font-picker-custom-item-name{flex:1;font-size:16px;color:#1a1a1a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ss-font-picker-custom-item--selected .ss-font-picker-custom-item-name{color:#2563eb;font-weight:500}.ss-font-picker-custom-item-badge{flex-shrink:0;margin-left:10px;padding:3px 7px;background:#d4a57426;border:1px solid rgba(212,165,116,.25);border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#a67c4a}.ss-font-picker-custom-item--selected .ss-font-picker-custom-item-badge{background:#2563eb1a;border-color:#2563eb33;color:#2563eb}.ss-font-picker-custom-divider{height:1px;margin:0 12px;background:linear-gradient(to right,transparent 0%,rgba(0,0,0,.06) 20%,rgba(0,0,0,.06) 80%,transparent 100%)}.ss-font-picker-divider{height:1px;background:#0000000f}.ss-font-picker-list{flex:1;min-height:0;overflow:hidden}.ss-font-list-viewport{height:100%;overflow-y:auto;overflow-x:hidden}.ss-font-list-viewport::-webkit-scrollbar{width:8px}.ss-font-list-viewport::-webkit-scrollbar-track{background:transparent}.ss-font-list-viewport::-webkit-scrollbar-thumb{background:#00000026;border-radius:4px;border:2px solid transparent;background-clip:padding-box}.ss-font-list-viewport::-webkit-scrollbar-thumb:hover{background:#00000040;background-clip:padding-box}.ss-font-list-content{position:relative;width:100%}.ss-font-item{position:absolute;left:0;right:0;height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;cursor:pointer;opacity:.5;transition:background .1s ease,opacity .25s ease}.ss-font-item--loaded{opacity:1}.ss-font-item:hover{background:#0000000a}.ss-font-item--selected{background:#3b82f614}.ss-font-item--selected:hover{background:#3b82f61f}.ss-font-item-name{flex:1;font-size:15px;color:#1a1a1a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ss-font-item--selected .ss-font-item-name{color:#2563eb;font-weight:500}.ss-font-item-category{flex-shrink:0;margin-left:8px;padding:2px 6px;background:#0000000a;border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:.02em;color:#999}.ss-font-picker-footer{flex-shrink:0;padding:8px 12px;background:#fff;border-top:1px solid rgba(0,0,0,.06)}.ss-font-picker-count{font-size:11px;color:#999}@keyframes ss-font-shimmer{0%{background-position:-100% 0}to{background-position:100% 0}}.ss-font-item:not(.ss-font-item--loaded) .ss-font-item-name{background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0,#e0e0e0 75%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:ss-font-shimmer 1.5s infinite linear}.ss-webgl-error-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#18181b;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;z-index:19}.ss-webgl-error-content{max-width:340px;padding:32px 36px;background:#fffffffa;border-radius:16px;box-shadow:0 4px 24px #00000026,0 0 0 1px #ffffff1a;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);text-align:center}.ss-webgl-error-icon{width:48px;height:48px;margin:0 auto 20px;color:#a1a1aa}.ss-webgl-error-icon svg{width:100%;height:100%}.ss-webgl-error-title{margin:0 0 8px;font-size:17px;font-weight:600;color:#18181b;letter-spacing:-.01em}.ss-webgl-error-message{margin:0;font-size:14px;line-height:1.5;color:#71717a}.ss-canvas-panning,.ss-canvas-panning *{cursor:grabbing!important}.ss-timeline-divider{position:absolute;top:0;left:0;right:0;height:6px;cursor:ns-resize;z-index:10;background:transparent;transition:background-color .15s ease}.ss-timeline-divider:hover,.ss-timeline-divider--active{background-color:#3b82f680}body.ss-resizing-timeline{cursor:ns-resize!important;user-select:none!important;-webkit-user-select:none!important}body.ss-resizing-timeline .ss-html-timeline *{cursor:ns-resize!important}.ss-html-timeline{--ss-timeline-pixels-per-second: 50;position:relative;display:flex;flex-direction:column;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:12px;color:#1f2937;overflow:hidden;user-select:none;-webkit-user-select:none}.ss-timeline-toolbar{display:flex;align-items:center;justify-content:center;height:64px;padding:12px;background:#fff;border-bottom:1px solid #e5e7eb;flex-shrink:0;position:relative}.ss-toolbar-section{display:flex;align-items:center;gap:8px}.ss-toolbar-section:first-child{position:absolute;left:12px}.ss-toolbar-section:last-child{position:absolute;right:12px}.ss-playback-controls{gap:8px}.ss-toolbar-btn.ss-play-btn{width:40px;height:40px;background:#374151;border-radius:50%;color:#fff}.ss-toolbar-btn.ss-play-btn:hover{background:#4b5563;color:#fff}.ss-toolbar-btn.ss-play-btn svg{width:20px;height:20px}.ss-toolbar-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:6px;color:#6b7280;cursor:pointer;transition:background .1s ease,color .1s ease}.ss-toolbar-btn:hover{background:#e5e7eb;color:#1f2937}.ss-toolbar-btn:active,.ss-toolbar-btn.active{background:#d1d5db}.ss-toolbar-btn svg{width:16px;height:16px}.ss-time-display{font-variant-numeric:tabular-nums;font-size:11px;color:#6b7280;min-width:120px;text-align:center}.ss-zoom-slider{width:80px;height:4px;-webkit-appearance:none;appearance:none;background:#e5e7eb;border-radius:2px;cursor:pointer}.ss-zoom-slider::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;background:#3b82f6;border-radius:50%;cursor:grab}.ss-ruler-tracks-wrapper{position:relative;display:flex;flex-direction:column;flex:1;overflow:hidden}.ss-timeline-ruler{position:relative;height:32px;background:#fff;border-bottom:1px solid #e5e7eb;overflow:hidden;flex-shrink:0}.ss-ruler-content{position:relative;height:100%;margin-left:var(--ss-timeline-padding);margin-right:var(--ss-timeline-padding)}.ss-ruler-marker{position:absolute;bottom:0;display:flex;flex-direction:column;align-items:center;transform:translate(-50%)}.ss-ruler-marker-line{width:1px;height:8px;background:#d1d5db}.ss-ruler-marker-label{font-size:10px;color:#6b7280;white-space:nowrap;margin-bottom:2px}.ss-ruler-marker.minor .ss-ruler-marker-line{height:4px}.ss-ruler-marker.minor .ss-ruler-marker-label{display:none}.ss-timeline-tracks{position:relative;flex:1;overflow:auto;outline:none;background:#fff}.ss-tracks-content{position:relative;min-height:100%;margin-left:var(--ss-timeline-padding);margin-right:var(--ss-timeline-padding)}.ss-track{position:relative;border-bottom:1px solid #f3f4f6;transition:background .15s ease,height .2s ease;background:#fff}.ss-track.ss-track--resizing{transition:none}.ss-track-resize-handle{position:absolute;bottom:0;left:0;right:0;height:6px;cursor:ns-resize;z-index:2}.ss-track-resize-handle:hover,.ss-track-resize-handle:active{background:#3b82f666}.ss-track[data-asset-type=video]{background:#e8def84d}.ss-track[data-asset-type=image]{background:#d1e8ff4d}.ss-track[data-asset-type=audio]{background:#b8e6d44d}.ss-track[data-asset-type=text],.ss-track[data-asset-type=rich-text]{background:#ffe4c94d}.ss-track[data-asset-type=shape]{background:#fff3b84d}.ss-track[data-asset-type=caption]{background:#fce4ec4d}.ss-track[data-asset-type=svg]{background:#fbe9e74d}.ss-track[data-asset-type=html]{background:#b3e5fc4d}.ss-track[data-asset-type=luma]{background:#cfd8dc4d}.ss-track[data-asset-type=text-to-image]{background:#e8eaf64d}.ss-track[data-asset-type=image-to-video]{background:#ede7f64d}.ss-track[data-asset-type=text-to-speech]{background:#f3e5f54d}.ss-track[data-asset-type=empty]{background:#f9fafb}.ss-track.drop-target{background:#3b82f626}.ss-clip{position:absolute;top:4px;bottom:4px;left:calc(var(--clip-start, 0) * var(--ss-timeline-pixels-per-second) * 1px);width:calc(var(--clip-length, 1) * var(--ss-timeline-pixels-per-second) * 1px);min-width:20px;background:var(--clip-bg, #71717a);border-left:3px solid var(--clip-border, #555);border-radius:4px;cursor:grab;overflow:hidden;touch-action:none;transition:box-shadow .15s ease,transform .1s ease}.ss-clip:hover{box-shadow:0 2px 8px #00000040}.ss-clip.selected{outline:2px solid var(--clip-border, #3b82f6);outline-offset:0px;box-shadow:0 0 0 1px #ffffff4d inset,0 2px 8px #0003,0 0 0 3px color-mix(in srgb,var(--clip-border, #3b82f6) 25%,transparent)}.ss-clip.focused{outline:2px solid rgba(255,171,0,.8);outline-offset:1px;box-shadow:0 0 8px 3px #ffab0080;z-index:1}.ss-clip.dragging{opacity:.6;cursor:grabbing;transform:scale(1.02)}.ss-clip.resizing{cursor:ew-resize}.ss-clip[data-asset-type=video]{--clip-bg: #e8def8;--clip-fg: #4a148c;--clip-border: #7c4dff}.ss-clip[data-asset-type=image]{--clip-bg: #d1e8ff;--clip-fg: #0d47a1;--clip-border: #2196f3}.ss-clip[data-asset-type=audio]{--clip-bg: #b8e6d4;--clip-fg: #004d40;--clip-border: #00897b}.ss-clip[data-asset-type=text],.ss-clip[data-asset-type=rich-text]{--clip-bg: #ffe4c9;--clip-fg: #bf360c;--clip-border: #e65100}.ss-clip[data-asset-type=shape]{--clip-bg: #fff3b8;--clip-fg: #f57f17;--clip-border: #f9a825}.ss-clip[data-asset-type=caption]{--clip-bg: #fce4ec;--clip-fg: #880e4f;--clip-border: #c2185b}.ss-clip[data-asset-type=svg]{--clip-bg: #fbe9e7;--clip-fg: #bf360c;--clip-border: #e64a19}.ss-clip[data-asset-type=html]{--clip-bg: #b3e5fc;--clip-fg: #006064;--clip-border: #0097a7}.ss-clip[data-asset-type=luma]{--clip-bg: #cfd8dc;--clip-fg: #37474f;--clip-border: #546e7a}.ss-clip[data-asset-type=text-to-image]{--clip-bg: #e8eaf6;--clip-fg: #1a237e;--clip-border: #5c6bc0}.ss-clip[data-asset-type=image-to-video]{--clip-bg: #ede7f6;--clip-fg: #311b92;--clip-border: #7e57c2}.ss-clip[data-asset-type=text-to-speech]{--clip-bg: #f3e5f5;--clip-fg: #4a148c;--clip-border: #ab47bc}.ss-clip.ss-clip--thumbnails{background-color:#0d0d0d}.ss-clip.ss-clip--thumbnails:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.4) 0%,transparent 8%,transparent 92%,rgba(0,0,0,.4) 100%);pointer-events:none;z-index:1;border-radius:inherit}.ss-clip.ss-clip--thumbnails .ss-clip-content{background:linear-gradient(to right,#0009,#00000026 20% 80%,#0009);z-index:1}.ss-clip.ss-clip--thumbnails .ss-clip-icon,.ss-clip.ss-clip--thumbnails .ss-clip-label{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.8)}.ss-clip.ss-clip--thumbnails .ss-clip-badge{background:#00000080;color:#fff}.ss-clip.ss-clip--loading-thumbnails{background:linear-gradient(90deg,var(--clip-bg) 0%,color-mix(in srgb,var(--clip-bg) 70%,white) 50%,var(--clip-bg) 100%);background-size:200% 100%;animation:ss-thumbnail-loading 1.5s ease-in-out infinite}@keyframes ss-thumbnail-loading{0%{background-position:200% 0}to{background-position:-200% 0}}.ss-clip-content{display:flex;align-items:center;padding:0 8px;height:100%;gap:6px}.ss-clip-icon{font-size:12px;color:var(--clip-fg, #333);opacity:.7;flex-shrink:0;font-weight:600}.ss-clip-icon svg{width:12px;height:12px;fill:currentColor;vertical-align:middle}.ss-clip-label{font-size:11px;font-weight:500;color:var(--clip-fg, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ss-clip-badge{position:absolute;top:4px;right:4px;width:16px;height:16px;display:flex;align-items:center;justify-content:center;background:#00000026;border-radius:3px;font-size:10px;color:var(--clip-fg, #333);opacity:.6;transition:opacity .1s ease}.ss-clip:hover .ss-clip-badge{opacity:1}.ss-clip-badge[data-intent=fixed]{display:none}.ss-clip-mask-badge{position:absolute;top:4px;left:4px;width:18px;height:18px;display:flex;align-items:center;justify-content:center;background:#0006;border-radius:3px;font-size:11px;color:#fff;cursor:pointer;z-index:2;transition:background .1s ease}.ss-clip-mask-badge:hover{background:#0009}.ss-clip-resize-handle{position:absolute;top:0;bottom:0;width:12px;cursor:ew-resize;z-index:2}.ss-clip-resize-handle.left{left:0;border-radius:4px 0 0 4px}.ss-clip-resize-handle.right{right:0;border-radius:0 4px 4px 0}.ss-clip-resize-handle:hover{background:#00000014}.ss-clip.selected .ss-clip-resize-handle{background:#0000000f}.ss-clip.selected .ss-clip-resize-handle:hover{background:#0000001f}.ss-clip-menu-trigger{position:absolute;top:4px;right:4px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;background:#0000000f;border:none;border-radius:3px;color:var(--clip-fg, #333);cursor:pointer;opacity:0;transition:opacity .1s ease,background .1s ease;z-index:3}.ss-clip-menu-trigger svg{width:12px;height:3px;display:block}.ss-clip:hover .ss-clip-menu-trigger~.ss-clip-badge,.ss-clip.selected .ss-clip-menu-trigger~.ss-clip-badge,.ss-clip:hover .ss-clip-badge,.ss-clip.selected .ss-clip-badge{opacity:0;pointer-events:none}.ss-clip:hover .ss-clip-menu-trigger,.ss-clip.selected .ss-clip-menu-trigger{opacity:1}.ss-clip-menu-trigger:hover{background:#00000026}.ss-clip.ss-clip--thumbnails .ss-clip-menu-trigger{background:#0006;color:#fffffff2}.ss-clip.ss-clip--thumbnails .ss-clip-menu-trigger:hover{background:#0009}.ss-clip{container-type:inline-size}@container (max-width: 90px){.ss-clip-menu-trigger{display:none}}.ss-playhead{position:absolute;top:0;bottom:0;left:calc(var(--playhead-time, 0) * var(--ss-timeline-pixels-per-second) * 1px);width:2px;pointer-events:none;z-index:4}.ss-playhead-line{position:absolute;top:0;bottom:0;left:0;width:2px;background:#3b82f6}.ss-playhead-handle{position:absolute;top:0;left:50%;transform:translate(-50%);width:12px;height:12px;background:#3b82f6;border-radius:2px 2px 50% 50%;cursor:grab;pointer-events:auto}.ss-playhead-handle:hover{transform:translate(-50%) scale(1.15)}.ss-playhead-handle:active{cursor:grabbing}.ss-playhead-ghost{position:absolute;top:0;bottom:0;width:1px;background:#3b82f666;pointer-events:none;z-index:3;opacity:0;transition:opacity .15s}.ss-ruler-tracks-wrapper:hover .ss-playhead-ghost{opacity:1}.ss-feedback-layer{position:absolute;inset:0;pointer-events:none;z-index:5}.ss-snap-line{position:absolute;top:0;bottom:0;width:2px;background:#22c55e;box-shadow:0 0 4px #22c55e}.ss-drop-zone{position:absolute;left:0;right:0;height:4px;background:#3b82f6;box-shadow:0 0 8px #3b82f6;animation:ss-pulse .8s ease-in-out infinite;z-index:2}@keyframes ss-pulse{0%,to{opacity:.6}50%{opacity:1}}.ss-drag-ghost{position:absolute;pointer-events:none;opacity:.4;background:transparent!important;border:2px dashed var(--clip-border, #6b7280);border-left-width:2px;box-shadow:none;z-index:7}.ss-drag-time-tooltip{position:absolute;background:#1a1a2e;color:#fff;padding:4px 8px;border-radius:4px;font-size:12px;font-weight:500;font-family:monospace;white-space:nowrap;pointer-events:none;z-index:8;transform:translate(-50%);box-shadow:0 2px 8px #0000004d}.ss-selection-box{position:absolute;border:1px solid #3b82f6;background:#3b82f626;pointer-events:none;z-index:6}.ss-timeline-empty{display:flex;align-items:center;justify-content:center;flex:1;color:#9ca3af;font-size:13px}.ss-clip-error-badge{position:absolute;top:50%;left:6px;transform:translateY(-50%);width:20px;height:20px;display:flex;align-items:center;justify-content:center;background:#dc2626;border-radius:4px;font-size:12px;color:#fff;z-index:10;cursor:help;box-shadow:0 1px 3px #0000004d}.ss-clip.ss-clip--error{--clip-bg: #fef2f2;--clip-fg: #991b1b;--clip-border: #fca5a5;border-color:var(--clip-border)!important;border-left-width:3px;border-left-color:#dc2626!important}.ss-clip.ss-clip--error:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(-45deg,transparent,transparent 8px,rgba(220,38,38,.06) 8px,rgba(220,38,38,.06) 16px);border-radius:inherit;pointer-events:none;z-index:1}.ss-clip.ss-clip--error .ss-clip-content{opacity:.6;padding-left:28px}.ss-clip.ss-clip--error .ss-clip-icon{color:var(--clip-fg);opacity:.5}.ss-clip.ss-clip--error .ss-clip-label{color:var(--clip-fg)}.ss-clip.ss-clip--error.ss-clip--thumbnails{background-image:none!important}:root{--luma-accent: #00d4aa;--luma-accent-dim: rgba(0, 212, 170, .15);--luma-accent-glow: rgba(0, 212, 170, .4);--luma-badge-bg: linear-gradient(135deg, rgba(0, 212, 170, .9) 0%, rgba(0, 180, 150, .95) 100%);--luma-badge-shadow: 0 2px 8px rgba(0, 212, 170, .3), 0 0 1px rgba(0, 0, 0, .5);--luma-ease-out: cubic-bezier(.16, 1, .3, 1);--luma-ease-snap: cubic-bezier(.34, 1.56, .64, 1)}.ss-clip.ss-clip-luma-target{box-shadow:0 0 0 3px var(--luma-accent),0 0 12px var(--luma-accent-glow);animation:luma-target-breathe 1.5s ease-in-out infinite}@keyframes luma-target-breathe{0%,to{box-shadow:0 0 0 3px var(--luma-accent),0 0 12px var(--luma-accent-glow)}50%{box-shadow:0 0 0 3px var(--luma-accent),0 0 20px var(--luma-accent-glow)}}.ss-clip.ss-clip-luma-has-target:after{content:"◐";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:4px 10px;background:#00d4aae6;border-radius:12px;font-size:14px;color:#0a1a15;font-weight:600;box-shadow:0 2px 8px #0000004d;pointer-events:none;z-index:10}.ss-clip.ss-clip-luma-attaching{animation:luma-attach-snap .4s var(--luma-ease-snap) forwards}@keyframes luma-attach-snap{0%{transform:scale(1.02);box-shadow:0 0 0 2px var(--luma-accent),0 0 30px var(--luma-accent-glow)}40%{transform:scale(.98)}to{transform:scale(1);box-shadow:none}}.ss-clip.ss-clip-luma-attached{animation:luma-attached-success .6s var(--luma-ease-snap) forwards}@keyframes luma-attached-success{0%{box-shadow:0 0 0 3px var(--luma-accent),0 0 40px var(--luma-accent-glow)}30%{transform:scale(1.02)}60%{transform:scale(.99);box-shadow:0 0 0 1px var(--luma-accent),0 0 15px var(--luma-accent-glow)}to{transform:scale(1);box-shadow:none}}.ss-clip-mask-badge{position:absolute;top:4px;left:4px;width:20px;height:20px;border-radius:5px;background:var(--luma-badge-bg);box-shadow:var(--luma-badge-shadow);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#0a1a15;font-family:system-ui,-apple-system,sans-serif;cursor:pointer;transition:transform .15s var(--luma-ease-out),box-shadow .15s var(--luma-ease-out),background .15s ease;border:1px solid rgba(255,255,255,.15);z-index:2}.ss-clip-mask-badge:hover{transform:scale(1.1);box-shadow:var(--luma-badge-shadow),0 0 12px var(--luma-accent-glow)}.ss-clip-mask-badge:active{transform:scale(.95);background:linear-gradient(135deg,#00b496,#00a082)}.ss-clip-mask-badge.ss-badge-entering{animation:badge-enter .35s var(--luma-ease-snap) forwards}@keyframes badge-enter{0%{opacity:0;transform:scale(0) rotate(-90deg)}to{opacity:1;transform:scale(1) rotate(0)}}.ss-clip-mask-badge:after{content:"";position:absolute;inset:-2px;border-radius:7px;border:1px solid var(--luma-accent-dim);opacity:0;animation:badge-breathe 3s ease-in-out infinite;pointer-events:none}@keyframes badge-breathe{0%,to{opacity:0}50%{opacity:.5}}.ss-clip.ss-clip-luma-dragging{opacity:.85;box-shadow:0 0 0 1px var(--luma-accent),0 8px 32px #0006,0 0 24px var(--luma-accent-dim);animation:luma-drag-float .8s ease-in-out infinite}@keyframes luma-drag-float{0%,to{transform:translateY(0)}50%{transform:translateY(-2px)}}.ss-clip.ss-clip-luma-snapping{transition:transform .2s var(--luma-ease-magnetic),left .2s var(--luma-ease-magnetic),top .2s var(--luma-ease-magnetic)}.ss-luma-connection-line{position:absolute;pointer-events:none;z-index:2;height:2px;background:linear-gradient(90deg,var(--luma-accent) 0%,var(--luma-accent-glow) 50%,var(--luma-accent) 100%);border-radius:1px;box-shadow:0 0 8px var(--luma-accent-glow);background-size:200% 100%;animation:luma-line-flow 1s linear infinite;opacity:0;transform-origin:left center;transition:opacity .2s ease}.ss-luma-connection-line.active{opacity:1}@keyframes luma-line-flow{0%{background-position:200% 0}to{background-position:0% 0}}.ss-clip-mask-badge.ss-badge-removing{background:linear-gradient(135deg,#ff5a5ae6,#c83c3cf2);animation:badge-shake .4s ease}@keyframes badge-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-2px)}40%,80%{transform:translate(2px)}}';
|
|
60317
|
+
const FJ = '.ss-toolbar-drag-handle{display:flex;align-items:center;justify-content:center;cursor:grab;touch-action:none;padding:4px 2px;border-radius:4px;color:#00000026;transition:color .15s ease;flex-shrink:0;user-select:none;-webkit-user-select:none}.ss-toolbar-drag-handle:hover{color:#0006}.ss-toolbar-drag-handle--dark{color:#fff3}.ss-toolbar-drag-handle--dark:hover{color:#ffffff80}.ss-toolbar--dragging{box-shadow:0 8px 32px #00000026,0 0 0 1px #00000014;z-index:9999!important;user-select:none;-webkit-user-select:none}.ss-toolbar-drag-handle:active,.ss-toolbar--dragging .ss-toolbar-drag-handle{cursor:grabbing}body.ss-dragging-toolbar,body.ss-dragging-toolbar *{cursor:grabbing!important;user-select:none!important;-webkit-user-select:none!important}.ss-toolbar-delete-wrap{display:flex;align-items:center;margin-left:auto}.ss-toolbar-delete-divider{width:1px;height:20px;background:#ffffff1a;margin:0 6px 0 4px}.ss-toolbar-delete-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:transparent;border:none;border-radius:6px;color:#ffffffa6;cursor:pointer;transition:all .15s ease;position:relative}.ss-toolbar-delete-btn:hover{background:#ffffff1a;color:#fffffff2}.ss-toolbar-delete-btn:active{background:#ffffff26}.ss-toolbar-delete-btn:disabled,.ss-toolbar-delete-btn[disabled]{cursor:not-allowed;color:#ffffff40;background:transparent}.ss-toolbar-delete-btn svg{width:16px;height:16px;flex-shrink:0}.ss-clip-context-menu{position:fixed;min-width:160px;padding:4px;background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 4px 16px #0000001f;z-index:1000;color:#1f2937;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:12px;user-select:none}.ss-clip-context-menu-item{display:flex;align-items:center;gap:8px;width:100%;padding:6px 10px;background:transparent;border:none;border-radius:4px;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background .1s ease}.ss-clip-context-menu-item:hover,.ss-clip-context-menu-item:focus-visible{background:#f3f4f6;outline:none}.ss-clip-context-menu-item:disabled,.ss-clip-context-menu-item[disabled]{color:#9ca3af;cursor:not-allowed;background:transparent}.ss-clip-context-menu-item:disabled:hover,.ss-clip-context-menu-item[disabled]:hover{background:transparent}.ss-clip-context-menu-item:disabled .ss-clip-context-menu-icon,.ss-clip-context-menu-item[disabled] .ss-clip-context-menu-icon{color:#d1d5db}.ss-clip-context-menu-icon{flex-shrink:0;color:#6b7280}.ss-clip-context-menu-label{flex:1}.ss-clip-context-menu-shortcut{font-size:10px;color:#9ca3af;padding:2px 5px;border-radius:3px;background:#f3f4f6;font-family:-apple-system,BlinkMacSystemFont,monospace}.ss-scrollable-list{display:flex;flex-direction:column;overflow:hidden}.ss-scrollable-list-body{flex:1;min-height:0;overflow:hidden}.ss-scrollable-list-viewport{height:100%;overflow-y:auto;overflow-x:hidden}.ss-scrollable-list-viewport::-webkit-scrollbar{width:6px}.ss-scrollable-list-viewport::-webkit-scrollbar-track{background:transparent}.ss-scrollable-list-viewport::-webkit-scrollbar-thumb{background:#ffffff26;border-radius:3px}.ss-scrollable-list-viewport::-webkit-scrollbar-thumb:hover{background:#ffffff40}.ss-scrollable-list-group{padding:4px 0}.ss-scrollable-list-group+.ss-scrollable-list-group{border-top:1px solid rgba(255,255,255,.06)}.ss-scrollable-list-group-header{display:flex;align-items:center;justify-content:space-between;padding:8px 12px 4px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#fff6}.ss-scrollable-list-group-detail{font-weight:400;text-transform:none;letter-spacing:normal;color:#ffffff40}.ss-scrollable-list-item{padding:8px 12px;font-size:13px;font-weight:400;color:#ffffffbf;cursor:pointer;border-radius:6px;margin:0 4px;transition:background .12s ease}.ss-scrollable-list-item:hover{background:#ffffff14;color:#fffffff2}.ss-scrollable-list-item--selected{background:#ffffff1f;color:#fff;font-weight:500}.ss-scrollable-list-item--selected:hover{background:#ffffff29}.ss-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 8px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-toolbar.visible{display:flex}.ss-toolbar-group{display:flex;align-items:center;gap:1px}.ss-toolbar-group--bordered{background:#ffffff0a;border-radius:6px;padding:2px}.ss-toolbar-divider{width:1px;height:20px;background:#ffffff1a;margin:0 6px}.ss-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:6px;color:#ffffffa6;cursor:pointer;transition:all .15s ease;position:relative}.ss-toolbar-btn:hover{background:#ffffff1a;color:#fffffff2}.ss-toolbar-btn.active{background:#ffffff26;color:#fff}.ss-toolbar-btn--text{font-size:13px;font-weight:600;letter-spacing:-.01em}.ss-toolbar-btn--underline{text-decoration:underline;text-underline-offset:2px}.ss-toolbar-value{min-width:32px;text-align:center;font-size:12px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums;letter-spacing:-.02em}.ss-toolbar-color-wrap{position:relative;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.ss-toolbar-color{width:22px;height:22px;padding:0;border:none;border-radius:50%;cursor:pointer;background:transparent}.ss-toolbar-color::-webkit-color-swatch-wrapper{padding:0}.ss-toolbar-color::-webkit-color-swatch{border:2px solid rgba(255,255,255,.2);border-radius:50%;box-shadow:0 0 0 1px #0000004d}.ss-toolbar-color::-moz-color-swatch{border:2px solid rgba(255,255,255,.2);border-radius:50%}.ss-toolbar-color-btn{width:22px;height:22px;padding:0;border:2px solid rgba(255,255,255,.2);border-radius:50%;cursor:pointer;box-shadow:0 0 0 1px #0000004d}.ss-toolbar-dropdown{position:relative}.ss-toolbar-popup{display:none;position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);background:#202024fa;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:14px 16px;min-width:200px;z-index:13;box-shadow:0 8px 32px #00000080,0 0 0 1px #0003}.ss-toolbar-popup.visible{display:block}.ss-toolbar-popup:before{content:"";position:absolute;top:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:10px;height:10px;background:#202024fa;border-left:1px solid rgba(255,255,255,.1);border-top:1px solid rgba(255,255,255,.1)}.ss-toolbar-popup-header{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:12px}.ss-toolbar-popup-row{display:flex;align-items:center;gap:12px}.ss-toolbar-popup-row--buttons{gap:6px}.ss-toolbar-popup-value{min-width:44px;max-width:52px;text-align:right;font-size:13px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums;background:transparent;border:1px solid transparent;border-radius:4px;padding:2px 4px;outline:none;font-family:inherit;transition:border-color .15s ease,background-color .15s ease}.ss-toolbar-popup-value:hover{border-color:#fff3}.ss-toolbar-popup-value:focus{border-color:#fff6;background:#ffffff1a}.ss-toolbar-popup-value:disabled{opacity:.5;cursor:not-allowed}.ss-toolbar-popup--wide{min-width:240px}.ss-toolbar-popup-section{margin-bottom:16px}.ss-toolbar-popup-section:last-child{margin-bottom:0}.ss-toolbar-popup-label{font-size:13px;font-weight:500;color:#ffffffe6;margin-bottom:8px}.ss-toolbar-popup-divider{height:1px;background:#ffffff1a;margin:16px 0}.ss-toolbar-slider{-webkit-appearance:none;appearance:none;flex:1;height:4px;background:transparent;border-radius:2px;cursor:pointer}.ss-toolbar-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#fff;border-radius:50%;cursor:pointer;box-shadow:0 2px 6px #0000004d;transition:transform .15s ease;margin-top:-6px}.ss-toolbar-slider::-webkit-slider-thumb:hover{transform:scale(1.1)}.ss-toolbar-slider::-moz-range-thumb{width:16px;height:16px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 2px 6px #0000004d}.ss-toolbar-slider::-webkit-slider-runnable-track{height:4px;background:#ffffff26;border-radius:2px}.ss-toolbar-slider::-moz-range-track{height:4px;background:#ffffff26;border-radius:2px}.ss-toolbar-anchor-btn{flex:1;height:36px;display:flex;align-items:center;justify-content:center;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#fff9;cursor:pointer;transition:all .15s ease}.ss-toolbar-anchor-btn:hover{background:#ffffff1f;color:#ffffffe6}.ss-toolbar-anchor-btn.active{background:#ffffff2e;border-color:#fff3;color:#fff}.ss-toolbar-font-btn{display:flex;align-items:center;height:32px;padding:0 8px;gap:4px;background:transparent;border:none;border-radius:6px;color:#ffffffa6;cursor:pointer;font-size:13px;font-weight:500}.ss-toolbar-font-btn:hover{background:#ffffff1a;color:#fffffff2}.ss-toolbar-popup--font{min-width:320px;padding:0;overflow:visible}.ss-toolbar-font-section{margin-bottom:8px}.ss-toolbar-font-section:last-child{margin-bottom:0}.ss-toolbar-font-section-header{font-size:10px;font-weight:600;color:#fff6;text-transform:uppercase;letter-spacing:.08em;padding:6px 10px 8px}.ss-toolbar-font-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;cursor:pointer;transition:all .12s ease;color:#ffffffd9;font-size:14px}.ss-toolbar-font-item:hover{background:#ffffff14}.ss-toolbar-font-item.active{background:#ffffff1f}.ss-toolbar-font-item.active:after{content:"";width:6px;height:6px;background:#fff;border-radius:50%;flex-shrink:0;margin-left:8px}.ss-toolbar-font-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ss-toolbar-dropdown--size{position:relative}.ss-toolbar-size-input{width:36px;text-align:center;font-size:12px;font-weight:500;color:#ffffffe6;background:transparent;border:none;outline:none;font-variant-numeric:tabular-nums;cursor:pointer;padding:4px 2px;border-radius:4px}.ss-toolbar-size-input:hover{background:#ffffff14}.ss-toolbar-size-input:focus{background:#ffffff1a;cursor:text}.ss-toolbar-popup--size{min-width:80px;max-height:280px;overflow-y:auto;padding:6px}.ss-toolbar-size-item{padding:8px 12px;text-align:center;font-size:13px;color:#ffffffd9;border-radius:6px;cursor:pointer;transition:background .12s ease}.ss-toolbar-size-item:hover{background:#ffffff14}.ss-toolbar-size-item.active{background:#ffffff1f}.ss-toolbar-dropdown--weight{position:relative}.ss-toolbar-font-btn--weight{min-width:64px;justify-content:space-between}.ss-toolbar-popup--weight{min-width:120px;max-height:280px;overflow-y:auto;padding:6px}.ss-toolbar-weight-item{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;font-size:13px;color:#ffffffd9;border-radius:6px;cursor:pointer;transition:background .12s ease}.ss-toolbar-weight-item:hover{background:#ffffff14}.ss-toolbar-weight-item.active{background:#ffffff1f}.ss-toolbar-weight-name{flex:1}.ss-toolbar-weight-check-slot{flex-shrink:0;width:12px;height:12px;margin-left:8px}.ss-toolbar-weight-check{color:#ffffffb3}.ss-toolbar-btn.ss-toolbar-btn--text-edit{width:auto;min-width:auto;padding:0 10px;gap:6px;font-size:12px;font-weight:500;white-space:nowrap}.ss-toolbar-btn.ss-toolbar-btn--primary{padding:0 16px;font-size:13px;font-weight:600;letter-spacing:-.01em;color:#fffffff2;background:#ffffff14}.ss-toolbar-btn.ss-toolbar-btn--primary:hover{background:#ffffff29;color:#fff}.ss-toolbar-btn.ss-toolbar-btn--primary.active{background:#ffffff38;color:#fff}.ss-toolbar-popup--text-edit{min-width:280px;padding:14px 16px}.ss-toolbar-text-area-wrapper{position:relative}.ss-toolbar-text-area{width:100%;min-height:80px;max-height:200px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:10px 12px;color:#ffffffe6;font-size:14px;font-family:inherit;line-height:1.5;resize:vertical;outline:none;box-sizing:border-box}.ss-toolbar-text-area:focus{border-color:#fff3;background:#ffffff14}.ss-toolbar-text-area::placeholder{color:#fff6}.ss-autocomplete-popup{display:none;position:absolute;bottom:calc(100% + 4px);left:0;right:0;background:#202024fa;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.1);border-radius:8px;max-height:160px;overflow-y:auto;z-index:15;box-shadow:0 4px 16px #0000004d}.ss-autocomplete-popup.visible{display:block}.ss-autocomplete-item{padding:8px 12px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;transition:background .1s ease}.ss-autocomplete-item:hover,.ss-autocomplete-item.selected{background:#ffffff1a}.ss-autocomplete-var{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;color:#6366f1e6;font-size:13px;font-weight:500}.ss-autocomplete-preview{color:#fff6;font-size:12px;max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ss-toolbar-checkbox{width:18px;height:18px;cursor:pointer;accent-color:#007aff}.ss-toolbar-popup--animation{min-width:240px}.ss-animation-presets{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.ss-animation-preset{padding:10px 6px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#ffffffb3;cursor:pointer;transition:all .15s ease;font-size:11px;font-weight:500;text-align:center;white-space:nowrap}.ss-animation-preset:hover{background:#ffffff1a;border-color:#ffffff26;color:#ffffffe6}.ss-animation-preset.active{background:#ffffff26;border-color:#ffffff40;color:#fff}.ss-toolbar-popup--transition{min-width:220px;padding:12px}.ss-toolbar-popup--effect{min-width:200px;padding:12px}.ss-toolbar-popup--style{min-width:260px;padding:12px}.ss-style-tabs{display:flex;background:#ffffff0f;border-radius:6px;padding:2px;margin-bottom:12px}.ss-style-tab{flex:1;padding:6px 8px;background:transparent;border:none;border-radius:4px;color:#ffffff80;font-size:10px;font-weight:600;cursor:pointer;transition:all .15s ease;text-transform:uppercase;letter-spacing:.03em}.ss-style-tab:hover{color:#ffffffb3}.ss-style-tab.active{background:#ffffff1f;color:#fff}.ss-style-panel{animation:fadeSlideIn .15s ease}.ss-style-color-picker-mount{min-height:180px}.ss-merge-label{display:flex;align-items:center;gap:4px;position:relative;font-size:13px;font-weight:500;color:#ffffffe6}.ss-merge-label__text{flex:1}.ss-merge-label__icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:none;color:#fff6;cursor:pointer;border-radius:4px;padding:0;transition:color .15s,background .15s}.ss-merge-label__icon:hover{color:#ffffffe6;background:#ffffff1a}.ss-merge-label--bound .ss-merge-label__icon{color:#4ecdc4}.ss-merge-label--bound .ss-merge-label__icon:hover{color:#5df5eb;background:#4ecdc426}.ss-merge-label__bound-name{color:#4ecdc4;font-weight:400;font-size:11px;margin-left:2px}.ss-merge-label__dropdown{position:absolute;top:100%;right:0;min-width:200px;z-index:100;margin-top:4px;padding:8px 0;background:#202024fa;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.1);border-radius:10px;box-shadow:0 8px 32px #00000080,0 0 0 1px #0003}.ss-merge-label__header{font-size:10px;font-weight:600;letter-spacing:.05em;color:#fff6;padding:4px 12px 8px;text-transform:uppercase}.ss-merge-label__create{display:block;width:100%;text-align:left;background:none;border:none;color:#ffffffe6;font-size:13px;padding:6px 12px;cursor:pointer}.ss-merge-label__create:hover{background:#ffffff14}.ss-merge-label__field{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:none;border:none;color:#fffc;font-size:13px;padding:6px 12px;cursor:pointer}.ss-merge-label__field:hover{background:#ffffff14}.ss-merge-label__field--active{background:#4ecdc4;color:#1a1a2e}.ss-merge-label__field--active:hover{background:#5df5eb}.ss-merge-label__field--disabled{opacity:.35;cursor:default;pointer-events:none}.ss-merge-label__field-name{font-weight:500;flex:1}.ss-merge-label__field-value{font-size:11px;opacity:.6;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ss-merge-label__field--active .ss-merge-label__field-value{opacity:.7}.ss-merge-label__clear{display:block;width:100%;text-align:left;background:none;border:none;border-top:1px solid rgba(255,255,255,.1);color:#fff9;font-size:13px;padding:8px 12px 4px;margin-top:4px;cursor:pointer}.ss-merge-label__clear:hover{color:#ffffffe6}.ss-active-word-header{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.1)}.ss-toolbar-popup-row--disabled{opacity:.3;pointer-events:none}.ss-toolbar-slider:disabled{opacity:.3;pointer-events:none}.ss-toolbar-color:disabled{opacity:.3;pointer-events:none}.ss-toolbar-popup-value:disabled,input.ss-toolbar-popup-value:disabled{opacity:.3;pointer-events:none}.ss-source-dot{width:6px;height:6px;border-radius:50%;background:#ffffff40;flex-shrink:0;transition:background .15s ease}.ss-source-dot.linked{background:#4ecdc4}.ss-source-list{display:flex;flex-direction:column;gap:4px}.ss-source-item{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;color:#ffffffb3;cursor:pointer;transition:all .15s ease;font-size:13px;font-weight:500;text-align:left}.ss-source-item:hover{background:#ffffff1a;border-color:#ffffff26;color:#ffffffe6}.ss-source-item.active{background:#ffffff26;border-color:#ffffff40;color:#fff}.ss-source-item-check{width:6px;height:6px;border-radius:50%;flex-shrink:0}.ss-source-item.active .ss-source-item-check{background:#fff}.ss-source-divider{height:1px;background:#ffffff14;margin:4px 0}.ss-source-empty{padding:12px;text-align:center;color:#fff6;font-size:12px}.ss-svg-toolbar{display:none}.ss-svg-toolbar.visible{display:flex;align-items:center;gap:8px}.ss-toolbar-color-input{width:32px;height:32px;border-radius:4px;border:1px solid rgba(255,255,255,.1);cursor:pointer;background:transparent;padding:0}.ss-toolbar-color-input:hover{border-color:#fff3}.ss-toolbar-slider-group--inline{display:flex;align-items:center;gap:6px}.ss-toolbar-slider-group--inline label{font-size:11px;color:#fff9;text-transform:uppercase;letter-spacing:.5px;min-width:32px}.ss-toolbar-inline-icon{width:16px;height:16px;color:#fff9;flex-shrink:0}.ss-toolbar-slider-group--inline .ss-toolbar-slider{width:80px}.ss-toolbar-slider-group--inline .ss-toolbar-value{font-size:11px;color:#fffc;min-width:36px;text-align:right}.ss-toolbar-number-input{width:60px;height:28px;background:#ffffff0d;border:1px solid rgba(255,255,255,.1);border-radius:4px;color:#ffffffe6;font-size:12px;padding:0 8px;text-align:center}.ss-toolbar-number-input:hover{background:#ffffff14;border-color:#fff3}.ss-toolbar-number-input:focus{outline:none;background:#ffffff1a;border-color:#ffffff4d}.ss-conditional-control,.ss-conditional-divider{display:none}.ss-media-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 8px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-media-toolbar.visible{display:flex}.ss-media-toolbar-visual{display:flex;align-items:center}.ss-media-toolbar-visual.hidden{display:none}.ss-media-toolbar-group{display:flex;align-items:center;gap:1px}.ss-media-toolbar-group--bordered{background:#ffffff0a;border-radius:6px;padding:2px}.ss-media-toolbar-divider{width:1px;height:20px;background:#ffffff1a;margin:0 6px}.ss-media-toolbar-btn{display:flex;align-items:center;justify-content:center;gap:6px;min-width:32px;height:32px;padding:0 10px;background:transparent;border:none;border-radius:6px;color:#ffffffa6;font-size:12px;font-weight:500;cursor:pointer;transition:all .15s ease;position:relative;white-space:nowrap}.ss-media-toolbar-btn:hover{background:#ffffff1a;color:#fffffff2}.ss-media-toolbar-btn.active{background:#ffffff26;color:#fff}.ss-media-toolbar-btn svg{width:16px;height:16px;flex-shrink:0}.ss-media-toolbar-btn .chevron{width:10px;height:10px;opacity:.5;margin-left:-2px}.ss-media-toolbar-value{min-width:36px;text-align:center;font-size:12px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums}.ss-media-toolbar-dropdown{position:relative}.ss-media-toolbar-popup{display:none;position:absolute;top:calc(100% + 8px);left:50%;transform:translate(-50%);background:#202024fa;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:8px;min-width:180px;z-index:13;box-shadow:0 8px 32px #00000080,0 0 0 1px #0003}.ss-media-toolbar-popup.visible{display:block}.ss-media-toolbar-popup:before{content:"";position:absolute;top:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:10px;height:10px;background:#202024fa;border-left:1px solid rgba(255,255,255,.1);border-top:1px solid rgba(255,255,255,.1)}.ss-media-toolbar-popup-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;cursor:pointer;transition:background .12s ease;font-size:13px;font-weight:500;color:#ffffffd9}.ss-media-toolbar-popup-item:hover{background:#ffffff14}.ss-media-toolbar-popup-item.active{background:#ffffff1f}.ss-media-toolbar-popup-item .checkmark{width:14px;height:14px;opacity:0;color:#fff}.ss-media-toolbar-popup-item.active .checkmark{opacity:1}.ss-media-toolbar-popup-item-label{display:flex;flex-direction:column;gap:2px}.ss-media-toolbar-popup-item-sublabel{font-size:11px;font-weight:400;color:#fff6}.ss-media-toolbar-popup--slider{min-width:200px;padding:14px 16px}.ss-media-toolbar-popup-header{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:12px}.ss-media-toolbar-slider-row{display:flex;align-items:center;gap:12px}.ss-media-toolbar-slider{-webkit-appearance:none;appearance:none;flex:1;height:4px;background:#ffffff26;border-radius:2px;cursor:pointer}.ss-media-toolbar-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;background:#fff;border-radius:50%;cursor:pointer;box-shadow:0 2px 6px #0000004d;transition:transform .15s ease;margin-top:-6px}.ss-media-toolbar-slider::-webkit-slider-thumb:hover{transform:scale(1.1)}.ss-media-toolbar-slider::-moz-range-thumb{width:16px;height:16px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 2px 6px #0000004d}.ss-media-toolbar-slider::-webkit-slider-runnable-track{height:4px;background:#ffffff26;border-radius:2px}.ss-media-toolbar-slider::-moz-range-track{height:4px;background:#ffffff26;border-radius:2px}.ss-media-toolbar-slider-value{min-width:44px;max-width:52px;text-align:right;font-size:13px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums;background:transparent;border:1px solid transparent;border-radius:4px;padding:2px 4px;outline:none;font-family:inherit;transition:border-color .15s ease,background-color .15s ease}.ss-media-toolbar-slider-value:hover{border-color:#fff3}.ss-media-toolbar-slider-value:focus{border-color:#fff6;background:#ffffff1a}.ss-media-toolbar-slider-value:disabled{opacity:.5;cursor:not-allowed}.ss-media-toolbar-presets{display:flex;gap:6px;margin-top:12px}.ss-media-toolbar-preset{flex:1;padding:8px 6px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:6px;color:#ffffffb3;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s ease;text-align:center}.ss-media-toolbar-preset:hover{background:#ffffff1a;border-color:#ffffff26;color:#ffffffe6}.ss-media-toolbar-preset.active{background:#ffffff26;border-color:#ffffff40;color:#fff}[data-volume-icon],.ss-media-toolbar-volume{display:flex;align-items:center}.ss-media-toolbar-volume.hidden{display:none}.ss-media-toolbar-popup--transition{min-width:220px;padding:12px}.ss-transition-tabs{display:flex;background:#ffffff0f;border-radius:6px;padding:2px;margin-bottom:12px}.ss-transition-tab{flex:1;padding:6px 12px;background:transparent;border:none;border-radius:4px;color:#ffffff80;font-size:11px;font-weight:600;cursor:pointer;transition:all .15s ease;text-transform:uppercase;letter-spacing:.03em}.ss-transition-tab:hover{color:#ffffffb3}.ss-transition-tab.active{background:#ffffff1f;color:#fff}.ss-transition-effects{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.ss-transition-effect{padding:8px 4px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;color:#fff9;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s ease;text-align:center}.ss-transition-effect:hover{background:#ffffff14;color:#ffffffe6}.ss-transition-effect.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-transition-direction-row{display:none;align-items:center;gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.06)}.ss-transition-direction-row.visible{display:flex}.ss-transition-label{font-size:10px;font-weight:500;color:#fff6;min-width:52px}.ss-transition-directions{display:flex;gap:4px;flex:1}.ss-transition-dir{flex:1;padding:6px 8px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:5px;color:#ffffff80;font-size:12px;cursor:pointer;transition:all .15s ease;text-align:center}.ss-transition-dir:hover{background:#ffffff14;color:#ffffffe6}.ss-transition-dir.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-transition-dir.hidden{display:none}.ss-transition-speed-row{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid rgba(255,255,255,.06)}.ss-transition-speed-stepper{display:flex;align-items:center;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;overflow:hidden}.ss-transition-speed-btn{width:28px;height:26px;background:transparent;border:none;color:#ffffff80;font-size:14px;font-weight:500;cursor:pointer;transition:all .15s ease;display:flex;align-items:center;justify-content:center}.ss-transition-speed-btn:hover{background:#ffffff14;color:#ffffffe6}.ss-transition-speed-btn:active{background:#ffffff1f}.ss-transition-speed-btn:disabled{opacity:.3;cursor:not-allowed}.ss-transition-speed-value{min-width:42px;padding:0 4px;text-align:center;font-size:11px;font-weight:500;color:#ffffffd9;font-variant-numeric:tabular-nums;border-left:1px solid rgba(255,255,255,.06);border-right:1px solid rgba(255,255,255,.06)}.ss-media-toolbar-btn--icon{min-width:32px;padding:0 8px}.ss-media-toolbar-popup--advanced{min-width:200px;padding:12px}.ss-advanced-option{display:flex;align-items:center;justify-content:space-between;gap:12px}.ss-advanced-label{font-size:12px;font-weight:500;color:#ffffffd9}.ss-toggle{position:relative;display:inline-block;width:36px;height:20px;flex-shrink:0}.ss-toggle input{opacity:0;width:0;height:0}.ss-toggle-slider{position:absolute;cursor:pointer;inset:0;background:#ffffff1a;border-radius:10px;transition:.2s ease}.ss-toggle-slider:before{content:"";position:absolute;width:16px;height:16px;left:2px;top:2px;background:#ffffffe6;border-radius:50%;transition:.2s ease}.ss-toggle input:checked+.ss-toggle-slider{background:#6366f1cc}.ss-toggle input:checked+.ss-toggle-slider:before{transform:translate(16px)}.ss-dynamic-panel{display:none;padding-top:12px;margin-top:12px;border-top:1px solid rgba(255,255,255,.08)}.ss-dynamic-input-wrapper{position:relative}.ss-dynamic-input{width:100%;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:6px;padding:8px 12px;color:#ffffffe6;font-size:12px;font-family:inherit;outline:none;box-sizing:border-box}.ss-dynamic-input:focus{border-color:#fff3;background:#ffffff14}.ss-dynamic-input::placeholder{color:#fff6}.ss-dynamic-input.error{border-color:#ef444499;background:#ef44441a}.ss-dynamic-input.error:focus{border-color:#ef4444cc}.ss-dynamic-dropdown{display:none;position:absolute;top:calc(100% + 4px);left:0;right:0;background:#202024fa;backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.1);border-radius:6px;max-height:160px;overflow-y:auto;z-index:13}.ss-dynamic-dropdown.visible{display:block}.ss-dynamic-item{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;cursor:pointer;transition:background .1s ease}.ss-dynamic-item:hover,.ss-dynamic-item.selected{background:#ffffff1a}.ss-dynamic-item-name{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;font-size:12px;color:#6366f1e6}.ss-dynamic-item-preview{font-size:11px;color:#fff6;max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ss-dynamic-item--create{border-top:1px solid rgba(255,255,255,.06)}.ss-dynamic-item--create .ss-dynamic-item-name{color:#34d399e6}.ss-dynamic-empty{padding:12px;text-align:center;font-size:11px;color:#fff6}.ss-media-toolbar-popup--effect{min-width:200px;padding:12px}.ss-effect-types{display:flex;gap:6px}.ss-effect-type{flex:1;padding:10px 8px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:8px;color:#fff9;font-size:12px;font-weight:500;cursor:pointer;transition:all .15s ease;text-align:center}.ss-effect-type:hover{background:#ffffff14;color:#ffffffe6}.ss-effect-type.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-effect-variant-row{display:none;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.06);animation:fadeSlideIn .15s ease}.ss-effect-variant-row.visible{display:flex}.ss-effect-variants{display:flex;gap:4px;flex:1}.ss-effect-variant{flex:1;padding:6px 12px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;color:#ffffff80;font-size:11px;font-weight:500;cursor:pointer;transition:all .15s ease;text-align:center}.ss-effect-variant:hover{background:#ffffff14;color:#ffffffe6}.ss-effect-variant.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-effect-direction-row{display:none;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.06);animation:fadeSlideIn .15s ease}.ss-effect-direction-row.visible{display:flex}.ss-effect-directions{display:flex;gap:4px;flex:1}.ss-effect-dir{flex:1;padding:6px 8px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;color:#ffffff80;font-size:13px;cursor:pointer;transition:all .15s ease;text-align:center}.ss-effect-dir:hover{background:#ffffff14;color:#ffffffe6}.ss-effect-dir.active{background:#ffffff1f;border-color:#fff3;color:#fff}.ss-effect-speed-row{display:none;align-items:center;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.06);animation:fadeSlideIn .15s ease}.ss-effect-speed-row.visible{display:flex}.ss-effect-label{font-size:10px;font-weight:500;color:#fff6;text-transform:uppercase;letter-spacing:.03em;min-width:52px}.ss-effect-speed-stepper{display:flex;align-items:center;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:6px;overflow:hidden}.ss-effect-speed-btn{width:28px;height:26px;background:transparent;border:none;color:#ffffff80;font-size:14px;font-weight:500;cursor:pointer;transition:all .15s ease;display:flex;align-items:center;justify-content:center}.ss-effect-speed-btn:hover{background:#ffffff14;color:#ffffffe6}.ss-effect-speed-btn:active{background:#ffffff1f}.ss-effect-speed-btn:disabled{opacity:.3;cursor:not-allowed}.ss-effect-speed-value{min-width:42px;padding:0 4px;text-align:center;font-size:11px;font-weight:500;color:#ffffffd9;font-variant-numeric:tabular-nums;border-left:1px solid rgba(255,255,255,.06);border-right:1px solid rgba(255,255,255,.06)}@keyframes fadeSlideIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.ss-media-toolbar-audio{display:flex;align-items:center}.ss-media-toolbar-audio.hidden{display:none}.ss-media-toolbar-popup--audio-fade{min-width:180px;padding:8px}.ss-audio-fade-options{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.ss-audio-fade-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 8px;background:#ffffff0a;border:1px solid rgba(255,255,255,.08);border-radius:8px;cursor:pointer;transition:all .15s ease}.ss-audio-fade-btn:hover{background:#ffffff14;border-color:#ffffff1f}.ss-audio-fade-btn.active{background:#ffffff1f;border-color:#fff3}.ss-audio-fade-icon{display:flex;align-items:center;justify-content:center;width:32px;height:16px;color:#ffffff80;transition:color .15s ease}.ss-audio-fade-icon svg{width:32px;height:16px}.ss-audio-fade-btn:hover .ss-audio-fade-icon,.ss-audio-fade-btn.active .ss-audio-fade-icon{color:#ffffffe6}.ss-audio-fade-label{font-size:10px;font-weight:500;color:#ffffff80;text-transform:uppercase;letter-spacing:.02em;transition:color .15s ease}.ss-audio-fade-btn:hover .ss-audio-fade-label,.ss-audio-fade-btn.active .ss-audio-fade-label{color:#ffffffe6}.ss-tti-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 8px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-tti-toolbar.visible{display:flex}.ss-tti-prompt-section{display:flex;align-items:center}.ss-tti-prompt-btn{max-width:180px;overflow:hidden;text-overflow:ellipsis}.ss-tti-prompt-btn .ss-tti-prompt-text{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:middle}.ss-tti-prompt-popup{min-width:320px;padding:12px}.ss-tti-prompt-popup .ss-media-toolbar-popup-header{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.ss-tti-prompt-textarea{width:100%;min-height:80px;max-height:200px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:10px 12px;color:#ffffffe6;font-size:13px;font-family:inherit;line-height:1.5;outline:none;resize:vertical;box-sizing:border-box}.ss-tti-prompt-textarea:focus{border-color:#ffffff40;background:#ffffff14}.ss-tti-prompt-textarea::placeholder{color:#ffffff4d}.ss-tti-prompt-hint{margin-top:6px;font-size:11px;color:#ffffff4d}.ss-tti-dimensions-section{display:flex;align-items:center}.ss-tti-dim-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;color:#fff6;margin-right:4px;flex-shrink:0;cursor:default}.ss-tti-dim-icon svg{width:16px;height:16px}.ss-tti-dim-separator{font-size:11px;color:#ffffff4d;margin:0 2px}.ss-tti-dim-btn{min-width:48px;font-variant-numeric:tabular-nums}.ss-tti-dim-description{font-size:11px;font-weight:400;color:#ffffff59;margin-bottom:8px}.ss-tti-visual-section{display:flex;align-items:center}.ss-tts-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 8px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-tts-toolbar.visible{display:flex}.ss-tts-voice-popup{padding:0;min-width:240px}.ss-tts-voice-popup .ss-media-toolbar-popup-header{padding:12px 12px 8px}.ss-tts-text-btn{max-width:140px}.ss-tts-text-preview{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100px}.ss-tts-text-popup{min-width:280px;padding:14px 16px}.ss-tts-textarea{width:100%;min-height:80px;background:#ffffff0f;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:10px 12px;color:#ffffffe6;font-size:13px;font-family:inherit;line-height:1.5;resize:vertical;outline:none;box-sizing:border-box}.ss-tts-textarea:focus{border-color:#fff3;background:#ffffff14}.ss-tts-textarea::placeholder{color:#fff6}.ss-clip-toolbar{display:none;position:absolute;top:12px;left:50%;transform:translate(-50%);width:fit-content;background:#18181bf2;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:6px 12px;gap:2px;z-index:10;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;align-items:center;box-shadow:0 4px 24px #0006,0 0 0 1px #0003,inset 0 1px #ffffff0d}.ss-clip-toolbar.visible{display:flex}.ss-clip-toolbar-section{display:flex;align-items:center;flex:0 0 auto}.ss-clip-toolbar-divider{width:1px;height:16px;background:#ffffff0f;margin:0 6px}.ss-timing-control{position:relative;display:inline-flex;align-items:center;height:26px;padding:0 6px 0 5px;background:#ffffff0a;border:1px solid rgba(255,255,255,.06);border-radius:6px;gap:4px;cursor:ew-resize;transition:all .15s ease;flex-shrink:0;width:fit-content}.ss-timing-label{display:inline-flex;align-items:center;justify-content:center;padding:2px 3px;background:#ffffff0f;border-radius:3px;font-size:8px;font-weight:700;text-transform:uppercase;letter-spacing:.3px;flex-shrink:0;user-select:none;cursor:pointer;transition:color .15s ease,background .15s ease}.ss-timing-control[data-type=start] .ss-timing-label{background:#22c55e1f;color:#22c55ebf}.ss-timing-control[data-type=length] .ss-timing-label{background:#6366f11f;color:#818cf8bf}.ss-timing-control:hover{background:#ffffff14;border-color:#ffffff1a}.ss-timing-control.dragging{background:#6366f11f;border-color:#6366f14d}.ss-timing-control.editing{background:#0000004d;border-color:#6366f166;cursor:text}.ss-timing-mode{display:flex;align-items:center;gap:4px;padding:0;background:transparent;border:none;cursor:pointer;color:#ffffff73;transition:color .15s ease;flex-shrink:0}.ss-timing-mode:hover{color:#ffffffd9}.ss-timing-mode:hover .ss-timing-label{color:#ffffffb3}.ss-timing-mode svg{width:12px;height:12px;flex-shrink:0}.ss-timing-value{width:6ch;height:100%;padding:0;background:transparent;border:none;color:#ffffffd9;font-size:11px;font-family:SF Mono,Monaco,Consolas,monospace;font-weight:500;text-align:left;cursor:inherit;user-select:none;transition:color .15s ease}.ss-timing-value:focus{outline:none}.ss-timing-control.editing .ss-timing-value{cursor:text;user-select:text;color:#fffffff2}.ss-timing-value.auto-mode{color:#fff6;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;font-style:italic;font-weight:400}.ss-timing-tooltip{position:absolute;top:calc(100% + 8px);left:0;padding:5px 8px;background:#000000e6;border-radius:4px;color:#ffffffe6;font-size:10px;font-weight:500;letter-spacing:.2px;white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease;pointer-events:none;z-index:14}.ss-timing-tooltip.visible{opacity:1;visibility:visible}.ss-timing-control.dragging,.ss-timing-control.dragging *{cursor:ew-resize!important}.ss-timing-merge-mount{display:inline-flex;align-items:center;position:relative;flex-shrink:0}.ss-timing-merge-mount:empty{display:none}.ss-timing-merge-mount .ss-merge-label{font-size:0;gap:0}.ss-timing-merge-mount .ss-merge-label__text,.ss-timing-merge-mount .ss-merge-label__bound-name{display:none}.ss-timing-merge-mount .ss-merge-label__icon{width:16px;height:16px}.ss-timing-merge-mount .ss-merge-label__icon svg{width:12px;height:12px}.ss-timing-merge-mount .ss-merge-label__dropdown{top:calc(100% + 8px);right:auto;left:50%;transform:translate(-50%)}.ss-timing-control[data-merge-bound]{cursor:default}.ss-timing-control[data-merge-bound] .ss-timing-label{background:#4ecdc41f;color:#4ecdc4bf}.ss-timing-control[data-merge-bound] .ss-timing-mode{color:#4ecdc4;cursor:default}.ss-timing-control[data-merge-bound] .ss-timing-mode:hover{color:#5df5eb}.ss-timing-control[data-merge-bound] .ss-timing-mode:hover .ss-timing-label{color:#4ecdc4d9}.ss-timing-control[data-merge-bound] .ss-timing-value{color:#ffffff73;cursor:default}.ss-toolbar-mode-toggle{position:relative;display:flex;gap:2px;padding:2px;background:#00000040;border-radius:6px;margin-right:4px}.ss-toolbar-mode-btn{position:relative;width:28px;height:24px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:4px;cursor:pointer;color:#fff6;transition:color .15s ease;z-index:1}.ss-toolbar-mode-btn:hover{color:#ffffffb3}.ss-toolbar-mode-btn.active{color:#fffffff2}.ss-toolbar-mode-btn svg{width:14px;height:14px}.ss-toolbar-mode-indicator{position:absolute;top:2px;left:2px;width:28px;height:24px;background:#ffffff1a;border-radius:4px;transition:transform .2s cubic-bezier(.4,0,.2,1);pointer-events:none}.ss-toolbar-mode-toggle[data-mode=clip] .ss-toolbar-mode-indicator{transform:translate(calc(100% + 2px))}.ss-toolbar-mode-divider{width:1px;height:20px;background:#ffffff1a;margin:0 8px 0 4px;flex-shrink:0}.ss-toolbar-mode-container{display:none!important}.ss-canvas-toolbar{position:absolute;width:fit-content;transform:translateY(-50%);display:flex;flex-direction:column;align-items:stretch;gap:2px;padding:6px;background:#fffffffa;border:1px solid rgba(0,0,0,.06);border-radius:14px;box-shadow:0 2px 8px #0000000f,0 8px 24px #00000014;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;z-index:9;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.ss-canvas-toolbar-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:8px;color:#000000a6;cursor:pointer;transition:all .15s ease;position:relative}.ss-canvas-toolbar-btn:hover{background:#0000000f;color:#000000e6}.ss-canvas-toolbar-btn:active{background:#0000001a;transform:scale(.95)}.ss-canvas-toolbar-btn.active{background:#0000000f}.ss-canvas-toolbar-btn svg{width:18px;height:18px;flex-shrink:0}.ss-canvas-toolbar-btn:after{content:attr(data-tooltip);position:absolute;right:calc(100% + 10px);top:50%;transform:translateY(-50%);padding:6px 10px;background:#18181bf2;color:#fff;font-size:12px;font-weight:500;white-space:nowrap;border-radius:6px;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease;pointer-events:none;box-shadow:0 4px 12px #00000026}.ss-canvas-toolbar-btn:before{content:"";position:absolute;right:calc(100% + 4px);top:50%;transform:translateY(-50%);border:5px solid transparent;border-left-color:#18181bf2;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease}.ss-canvas-toolbar-btn:hover:after,.ss-canvas-toolbar-btn:hover:before{opacity:1;visibility:visible}.ss-canvas-toolbar-btn.active:after,.ss-canvas-toolbar-btn.active:before{opacity:0;visibility:hidden}.ss-canvas-toolbar-fps-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.01em}.ss-canvas-toolbar-color-dot{width:18px;height:18px;border-radius:50%;border:1.5px solid rgba(0,0,0,.15);flex-shrink:0}.ss-canvas-toolbar-divider{width:24px;height:1px;background:#00000014;margin:4px auto;flex-shrink:0}.ss-canvas-toolbar-dropdown{position:relative}.ss-canvas-toolbar-popup{display:none;position:absolute;right:calc(100% + 10px);top:50%;transform:translateY(-50%);background:#fff;border-radius:14px;padding:8px;min-width:180px;z-index:13;filter:drop-shadow(0 4px 12px rgba(0,0,0,.15))}.ss-canvas-toolbar-popup.visible{display:block}.ss-canvas-toolbar-popup:after{content:"";position:absolute;right:-6px;top:50%;transform:translateY(-50%) rotate(45deg);width:12px;height:12px;background:#fff}.ss-canvas-toolbar-popup-item{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;cursor:pointer;transition:background .12s ease;font-size:13px;font-weight:500;color:#1a1a1a}.ss-canvas-toolbar-popup-item:hover{background:#0000000a}.ss-canvas-toolbar-popup-item.active{background:#0000000f}.ss-canvas-toolbar-popup-item-label{display:flex;flex-direction:column;gap:2px}.ss-canvas-toolbar-popup-item-sublabel{font-size:11px;font-weight:400;color:#00000073}.ss-canvas-toolbar-popup-item .checkmark{width:16px;height:16px;opacity:0}.ss-canvas-toolbar-popup-item.active .checkmark{opacity:1}.ss-canvas-toolbar-popup-header{font-size:11px;font-weight:600;color:#0006;text-transform:uppercase;letter-spacing:.04em;padding:8px 12px 6px}.ss-canvas-toolbar-popup-divider{height:1px;background:#0000000f;margin:6px 0}.ss-canvas-toolbar-custom-size{display:flex;align-items:center;gap:8px;padding:10px 12px}.ss-canvas-toolbar-custom-input{width:70px;padding:8px 10px;background:#0000000a;border:1px solid rgba(0,0,0,.08);border-radius:8px;font-size:13px;font-weight:500;color:#1a1a1a;text-align:center;outline:none;-moz-appearance:textfield}.ss-canvas-toolbar-custom-input::-webkit-outer-spin-button,.ss-canvas-toolbar-custom-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.ss-canvas-toolbar-custom-input:focus{border-color:#0003;background:#00000005}.ss-canvas-toolbar-custom-input.warning{border-color:#d9770680;background:#d977060f;color:#b45309}.ss-canvas-toolbar-custom-input.warning:focus{border-color:#d97706b3;box-shadow:0 0 0 3px #d977061a}.ss-canvas-toolbar-custom-input.error{border-color:#ef444480;background:#ef44440f;color:#dc2626}.ss-canvas-toolbar-custom-input.error:focus{border-color:#ef4444b3;box-shadow:0 0 0 3px #ef44441a}.ss-canvas-toolbar-custom-separator{color:#0000004d;font-size:13px;font-weight:500}.ss-canvas-toolbar-color-picker{padding:4px}.ss-canvas-toolbar-color-input{width:100%;height:120px;border:1px solid rgba(0,0,0,.1);border-radius:10px;cursor:pointer;padding:0}.ss-canvas-toolbar-color-input::-webkit-color-swatch-wrapper{padding:0}.ss-canvas-toolbar-color-input::-webkit-color-swatch{border:none;border-radius:9px}.ss-canvas-toolbar-color-input::-moz-color-swatch{border:none;border-radius:9px}.ss-canvas-toolbar-color-swatches{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;padding:8px 4px}.ss-canvas-toolbar-color-swatch{width:28px;height:28px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:transform .15s ease,border-color .15s ease}.ss-canvas-toolbar-color-swatch:hover{transform:scale(1.1)}.ss-canvas-toolbar-color-swatch.active{border-color:#0000004d}.ss-canvas-toolbar-popup--variables{width:300px;max-height:400px;flex-direction:column;overflow:visible}.ss-canvas-toolbar-popup--variables.visible{display:flex}.ss-variables-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:10px 12px 8px}.ss-variables-add-btn{width:26px;height:26px;display:flex;align-items:center;justify-content:center;background:#0000000d;border:none;border-radius:8px;color:#00000080;font-size:18px;font-weight:400;cursor:pointer;transition:all .15s ease}.ss-variables-add-btn:hover{background:#0000001a;color:#000c}.ss-variables-list{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:6px;padding:4px 8px 8px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-radius:0 0 10px 10px}.ss-variables-list::-webkit-scrollbar{width:5px}.ss-variables-list::-webkit-scrollbar-track{background:transparent;margin:4px 0}.ss-variables-list::-webkit-scrollbar-thumb{background:#0000001f;border-radius:3px}.ss-variables-list::-webkit-scrollbar-thumb:hover{background:#0003}.ss-variables-empty{padding:20px 12px;text-align:center;font-size:13px;color:#00000059}.ss-variable-item{flex-shrink:0;display:flex;flex-direction:column;gap:6px;padding:10px;background:#00000006;border-radius:10px;border:1px solid rgba(0,0,0,.04)}.ss-variable-item-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.ss-variable-name{font-size:11px;font-weight:600;color:#6366f1d9;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,monospace;letter-spacing:.02em}.ss-variable-value{width:100%;padding:8px 10px;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:8px;font-size:13px;color:#1a1a1a;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.ss-variable-value:focus{border-color:#6366f180;box-shadow:0 0 0 3px #6366f114}.ss-variable-value::placeholder{color:#0000004d}.ss-variable-value.error{border-color:#ef444480;background:#ef444408}.ss-variable-value.error:focus{border-color:#ef4444b3;box-shadow:0 0 0 3px #ef444414}.ss-variable-delete{width:22px;height:22px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:6px;color:#00000040;font-size:14px;cursor:pointer;transition:all .15s ease;flex-shrink:0}.ss-variable-delete:hover{background:#ef44441a;color:#ef4444}.ss-asset-toolbar{position:absolute;width:fit-content;transform:translateY(-50%);display:flex;flex-direction:column;gap:2px;padding:6px;background:#fffffffa;border:1px solid rgba(0,0,0,.06);border-radius:14px;box-shadow:0 2px 8px #0000000f,0 8px 24px #00000014;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;z-index:9;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}.ss-asset-toolbar-buttons{display:flex;flex-direction:column;gap:2px}.ss-asset-toolbar-btn{width:36px;height:36px;display:flex;align-items:center;justify-content:center;background:transparent;border:none;border-radius:8px;color:#000000a6;cursor:pointer;transition:all .15s ease;position:relative}.ss-asset-toolbar-btn:hover{background:#0000000f;color:#000000e6}.ss-asset-toolbar-btn:active{background:#0000001a;transform:scale(.95)}.ss-asset-toolbar-btn svg{width:18px;height:18px;flex-shrink:0}.ss-asset-toolbar-divider{width:24px;height:1px;background:#00000014;margin:4px auto}.ss-asset-toolbar-btn:after{content:attr(data-tooltip);position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);padding:6px 10px;background:#18181bf2;color:#fff;font-size:12px;font-weight:500;white-space:nowrap;border-radius:6px;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease;pointer-events:none;box-shadow:0 4px 12px #00000026}.ss-asset-toolbar-btn:before{content:"";position:absolute;left:calc(100% + 4px);top:50%;transform:translateY(-50%);border:5px solid transparent;border-right-color:#18181bf2;opacity:0;visibility:hidden;transition:opacity .15s ease,visibility .15s ease}.ss-asset-toolbar-btn:hover:after,.ss-asset-toolbar-btn:hover:before{opacity:1;visibility:visible}.ss-font-color-picker{padding:16px;min-width:260px}.ss-font-color-tabs{display:flex;gap:4px;margin-bottom:16px;border-bottom:1px solid rgba(255,255,255,.1)}.ss-font-color-tab{flex:1;padding:8px 12px;background:transparent;border:none;border-bottom:2px solid transparent;color:#fff9;font-size:12px;cursor:pointer;transition:all .2s}.ss-font-color-tab.active{color:#fff;border-bottom-color:#007aff}.ss-font-color-tab-content{display:none}.ss-font-color-tab-content.active{display:block}.ss-font-color-section{margin-bottom:16px}.ss-font-color-section:last-child{margin-bottom:0}.ss-font-color-label{font-size:13px;font-weight:500;color:#ffffffe6;margin-bottom:8px}.ss-font-color-input{width:100%;height:40px;padding:0;border:1px solid rgba(255,255,255,.1);border-radius:6px;cursor:pointer;background:transparent}.ss-font-color-input::-webkit-color-swatch-wrapper{padding:4px}.ss-font-color-input::-webkit-color-swatch{border:none;border-radius:4px}.ss-font-color-input::-moz-color-swatch{border:none;border-radius:4px}.ss-font-color-opacity-row{display:flex;align-items:center;gap:12px}.ss-font-color-opacity{-webkit-appearance:none;appearance:none;flex:1;height:4px;background:linear-gradient(90deg,#fff0,#fff);border-radius:2px;cursor:pointer;outline:none}.ss-font-color-opacity::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:14px;height:14px;background:#fff;border-radius:50%;cursor:pointer;box-shadow:0 1px 4px #0000004d}.ss-font-color-opacity::-moz-range-thumb{width:14px;height:14px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 1px 4px #0000004d}.ss-font-color-opacity-value{min-width:42px;text-align:right;font-size:13px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums}.ss-gradient-category{margin-bottom:16px}.ss-gradient-category:last-child{margin-bottom:0}.ss-gradient-category-name{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.ss-gradient-swatches{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.ss-gradient-swatch{aspect-ratio:1;border:none;border-radius:6px;cursor:pointer;transition:transform .15s,box-shadow .15s;box-shadow:0 1px 3px #0000004d}.ss-gradient-swatch:hover{transform:translateY(-2px);box-shadow:0 4px 8px #0006}.ss-color-picker{padding:16px}.ss-color-picker-header{font-size:11px;font-weight:600;color:#ffffff80;text-transform:uppercase;letter-spacing:.05em;margin-bottom:14px}.ss-color-picker-enable-row{margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.1)}.ss-color-picker-enable-label{display:flex;align-items:center;gap:8px;cursor:pointer;font-size:13px;font-weight:500;color:#ffffffe6;user-select:none}.ss-color-picker-enable-checkbox{width:16px;height:16px;cursor:pointer;accent-color:#007aff}.ss-color-picker-controls{transition:opacity .2s ease}.ss-color-picker-controls.disabled{opacity:.4;pointer-events:none}.ss-color-picker-color-section,.ss-color-picker-opacity-section{margin-bottom:16px}.ss-color-picker-color-section:last-child,.ss-color-picker-opacity-section:last-child{margin-bottom:0}.ss-color-picker-label{font-size:13px;font-weight:500;color:#ffffffe6;margin-bottom:8px}.ss-color-picker-color-wrap{display:flex;align-items:center;gap:12px}.ss-color-picker-color{width:100%;height:40px;padding:0;border:1px solid rgba(255,255,255,.1);border-radius:6px;cursor:pointer;background:transparent}.ss-color-picker-color::-webkit-color-swatch-wrapper{padding:4px}.ss-color-picker-color::-webkit-color-swatch{border:none;border-radius:4px}.ss-color-picker-color::-moz-color-swatch{border:none;border-radius:4px}.ss-color-picker-opacity-row{display:flex;align-items:center;gap:12px}.ss-color-picker-opacity{flex:1}.ss-color-picker-opacity-value{min-width:42px;text-align:right;font-size:13px;font-weight:500;color:#ffffffe6;font-variant-numeric:tabular-nums}.ss-font-picker{display:flex;flex-direction:column;width:320px;height:480px;background:#fafafa;border-radius:12px;box-shadow:0 8px 32px #0000001f,0 2px 8px #00000014,0 0 0 1px #0000000a;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;font-size:13px;color:#1a1a1a}.ss-font-picker-header{flex-shrink:0;padding:12px;background:#fff;border-bottom:1px solid rgba(0,0,0,.06)}.ss-font-picker-search{position:relative;margin-bottom:10px}.ss-font-picker-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#999;pointer-events:none}.ss-font-picker-search-input{width:100%;height:36px;padding:0 12px 0 36px;background:#f0f0f0;border:none;border-radius:8px;font-family:inherit;font-size:13px;color:#1a1a1a;outline:none;transition:background .15s ease,box-shadow .15s ease}.ss-font-picker-search-input::placeholder{color:#999}.ss-font-picker-search-input:focus{background:#fff;box-shadow:0 0 0 2px #3b82f64d,0 1px 2px #0000000d}.ss-font-picker-categories{display:flex;gap:4px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding-bottom:2px;scrollbar-width:none}.ss-font-picker-categories::-webkit-scrollbar{display:none}.ss-font-picker-category{flex-shrink:0;padding:5px 10px;background:transparent;border:none;border-radius:6px;font-family:inherit;font-size:12px;font-weight:500;color:#666;cursor:pointer;white-space:nowrap;transition:background .15s ease,color .15s ease}.ss-font-picker-category:hover{background:#0000000d;color:#333}.ss-font-picker-category--active{background:#1a1a1a;color:#fff}.ss-font-picker-category--active:hover{background:#333;color:#fff}.ss-font-picker-recent{flex-shrink:0;padding:10px 12px;background:#fff}.ss-font-picker-recent-label{margin-bottom:8px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#999}.ss-font-picker-recent-list{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;overflow-y:hidden;padding-bottom:4px;scrollbar-width:thin}.ss-font-picker-recent-list::-webkit-scrollbar{height:4px}.ss-font-picker-recent-list::-webkit-scrollbar-thumb{background:#00000026;border-radius:2px}.ss-font-picker-recent-chip{flex-shrink:0;padding:6px 12px;background:#f5f5f5;border:none;border-radius:16px;font-size:13px;color:#555;cursor:pointer;opacity:.7;white-space:nowrap;transition:background .15s ease,opacity .2s ease,transform .1s ease}.ss-font-picker-recent-chip--loaded{opacity:1}.ss-font-picker-recent-chip:hover{background:#eee;transform:translateY(-1px)}.ss-font-picker-recent-chip--selected{background:#1a1a1a;color:#fff;opacity:1}.ss-font-picker-recent-chip--selected:hover{background:#333}.ss-font-picker-custom{flex-shrink:0;padding:12px;background:linear-gradient(to bottom,#fefdfb,#fafafa)}.ss-font-picker-custom-label{display:flex;align-items:center;gap:8px;margin-bottom:10px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#777}.ss-font-picker-custom-label:before{content:"";width:3px;height:12px;background:#d4a574;border-radius:1.5px}.ss-font-picker-custom-list{display:flex;flex-direction:column;gap:1px}.ss-font-picker-custom-item{display:flex;align-items:center;justify-content:space-between;height:44px;padding:0 12px;margin:0 -12px;border-radius:8px;cursor:pointer;opacity:.6;transition:background .15s ease,opacity .3s ease,transform .15s ease}.ss-font-picker-custom-item--loaded{opacity:1}.ss-font-picker-custom-item:hover{background:#d4a57414;transform:translate(2px)}.ss-font-picker-custom-item:active{transform:translate(2px) scale(.995)}.ss-font-picker-custom-item--selected{background:#2563eb14}.ss-font-picker-custom-item--selected:hover{background:#2563eb1f}.ss-font-picker-custom-item-name{flex:1;font-size:16px;color:#1a1a1a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ss-font-picker-custom-item--selected .ss-font-picker-custom-item-name{color:#2563eb;font-weight:500}.ss-font-picker-custom-item-badge{flex-shrink:0;margin-left:10px;padding:3px 7px;background:#d4a57426;border:1px solid rgba(212,165,116,.25);border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#a67c4a}.ss-font-picker-custom-item--selected .ss-font-picker-custom-item-badge{background:#2563eb1a;border-color:#2563eb33;color:#2563eb}.ss-font-picker-custom-divider{height:1px;margin:0 12px;background:linear-gradient(to right,transparent 0%,rgba(0,0,0,.06) 20%,rgba(0,0,0,.06) 80%,transparent 100%)}.ss-font-picker-divider{height:1px;background:#0000000f}.ss-font-picker-list{flex:1;min-height:0;overflow:hidden}.ss-font-list-viewport{height:100%;overflow-y:auto;overflow-x:hidden}.ss-font-list-viewport::-webkit-scrollbar{width:8px}.ss-font-list-viewport::-webkit-scrollbar-track{background:transparent}.ss-font-list-viewport::-webkit-scrollbar-thumb{background:#00000026;border-radius:4px;border:2px solid transparent;background-clip:padding-box}.ss-font-list-viewport::-webkit-scrollbar-thumb:hover{background:#00000040;background-clip:padding-box}.ss-font-list-content{position:relative;width:100%}.ss-font-item{position:absolute;left:0;right:0;height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;cursor:pointer;opacity:.5;transition:background .1s ease,opacity .25s ease}.ss-font-item--loaded{opacity:1}.ss-font-item:hover{background:#0000000a}.ss-font-item--selected{background:#3b82f614}.ss-font-item--selected:hover{background:#3b82f61f}.ss-font-item-name{flex:1;font-size:15px;color:#1a1a1a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ss-font-item--selected .ss-font-item-name{color:#2563eb;font-weight:500}.ss-font-item-category{flex-shrink:0;margin-left:8px;padding:2px 6px;background:#0000000a;border-radius:4px;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:.02em;color:#999}.ss-font-picker-footer{flex-shrink:0;padding:8px 12px;background:#fff;border-top:1px solid rgba(0,0,0,.06)}.ss-font-picker-count{font-size:11px;color:#999}@keyframes ss-font-shimmer{0%{background-position:-100% 0}to{background-position:100% 0}}.ss-font-item:not(.ss-font-item--loaded) .ss-font-item-name{background:linear-gradient(90deg,#e0e0e0 25%,#f0f0f0,#e0e0e0 75%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:ss-font-shimmer 1.5s infinite linear}.ss-webgl-error-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#18181b;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;z-index:19}.ss-webgl-error-content{max-width:340px;padding:32px 36px;background:#fffffffa;border-radius:16px;box-shadow:0 4px 24px #00000026,0 0 0 1px #ffffff1a;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);text-align:center}.ss-webgl-error-icon{width:48px;height:48px;margin:0 auto 20px;color:#a1a1aa}.ss-webgl-error-icon svg{width:100%;height:100%}.ss-webgl-error-title{margin:0 0 8px;font-size:17px;font-weight:600;color:#18181b;letter-spacing:-.01em}.ss-webgl-error-message{margin:0;font-size:14px;line-height:1.5;color:#71717a}.ss-canvas-panning,.ss-canvas-panning *{cursor:grabbing!important}.ss-timeline-divider{position:absolute;top:0;left:0;right:0;height:6px;cursor:ns-resize;z-index:10;background:transparent;transition:background-color .15s ease}.ss-timeline-divider:hover,.ss-timeline-divider--active{background-color:#3b82f680}body.ss-resizing-timeline{cursor:ns-resize!important;user-select:none!important;-webkit-user-select:none!important}body.ss-resizing-timeline .ss-html-timeline *{cursor:ns-resize!important}.ss-html-timeline{--ss-timeline-pixels-per-second: 50;position:relative;display:flex;flex-direction:column;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:12px;color:#1f2937;overflow:hidden;user-select:none;-webkit-user-select:none}.ss-timeline-toolbar{display:flex;align-items:center;justify-content:center;height:64px;padding:12px;background:#fff;border-bottom:1px solid #e5e7eb;flex-shrink:0;position:relative}.ss-toolbar-section{display:flex;align-items:center;gap:8px}.ss-toolbar-section:first-child{position:absolute;left:12px}.ss-toolbar-section:last-child{position:absolute;right:12px}.ss-playback-controls{gap:8px}.ss-toolbar-btn.ss-play-btn{width:40px;height:40px;background:#374151;border-radius:50%;color:#fff}.ss-toolbar-btn.ss-play-btn:hover{background:#4b5563;color:#fff}.ss-toolbar-btn.ss-play-btn svg{width:20px;height:20px}.ss-toolbar-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:6px;color:#6b7280;cursor:pointer;transition:background .1s ease,color .1s ease}.ss-toolbar-btn:hover{background:#e5e7eb;color:#1f2937}.ss-toolbar-btn:active,.ss-toolbar-btn.active{background:#d1d5db}.ss-toolbar-btn svg{width:16px;height:16px}.ss-time-display{font-variant-numeric:tabular-nums;font-size:11px;color:#6b7280;min-width:120px;text-align:center}.ss-zoom-slider{width:80px;height:4px;-webkit-appearance:none;appearance:none;background:#e5e7eb;border-radius:2px;cursor:pointer}.ss-zoom-slider::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;background:#3b82f6;border-radius:50%;cursor:grab}.ss-ruler-tracks-wrapper{position:relative;display:flex;flex-direction:column;flex:1;overflow:hidden}.ss-timeline-ruler{position:relative;height:32px;background:#fff;border-bottom:1px solid #e5e7eb;overflow:hidden;flex-shrink:0}.ss-ruler-content{position:relative;height:100%;margin-left:var(--ss-timeline-padding);margin-right:var(--ss-timeline-padding)}.ss-ruler-marker{position:absolute;bottom:0;display:flex;flex-direction:column;align-items:center;transform:translate(-50%)}.ss-ruler-marker-line{width:1px;height:8px;background:#d1d5db}.ss-ruler-marker-label{font-size:10px;color:#6b7280;white-space:nowrap;margin-bottom:2px}.ss-ruler-marker.minor .ss-ruler-marker-line{height:4px}.ss-ruler-marker.minor .ss-ruler-marker-label{display:none}.ss-timeline-tracks{position:relative;flex:1;overflow:auto;outline:none;background:#fff}.ss-tracks-content{position:relative;min-height:100%;margin-left:var(--ss-timeline-padding);margin-right:var(--ss-timeline-padding)}.ss-track{position:relative;border-bottom:1px solid #f3f4f6;transition:background .15s ease,height .2s ease;background:#fff}.ss-track.ss-track--resizing{transition:none}.ss-track-resize-handle{position:absolute;bottom:0;left:0;right:0;height:6px;cursor:ns-resize;z-index:2}.ss-track-resize-handle:hover,.ss-track-resize-handle:active{background:#3b82f666}.ss-track[data-asset-type=video]{background:#e8def84d}.ss-track[data-asset-type=image]{background:#d1e8ff4d}.ss-track[data-asset-type=audio]{background:#b8e6d44d}.ss-track[data-asset-type=text],.ss-track[data-asset-type=rich-text]{background:#ffe4c94d}.ss-track[data-asset-type=shape]{background:#fff3b84d}.ss-track[data-asset-type=caption]{background:#fce4ec4d}.ss-track[data-asset-type=svg]{background:#fbe9e74d}.ss-track[data-asset-type=html]{background:#b3e5fc4d}.ss-track[data-asset-type=luma]{background:#cfd8dc4d}.ss-track[data-asset-type=text-to-image]{background:#e8eaf64d}.ss-track[data-asset-type=image-to-video]{background:#ede7f64d}.ss-track[data-asset-type=text-to-speech]{background:#f3e5f54d}.ss-track[data-asset-type=empty]{background:#f9fafb}.ss-track.drop-target{background:#3b82f626}.ss-clip{position:absolute;top:4px;bottom:4px;left:calc(var(--clip-start, 0) * var(--ss-timeline-pixels-per-second) * 1px);width:calc(var(--clip-length, 1) * var(--ss-timeline-pixels-per-second) * 1px);min-width:20px;background:var(--clip-bg, #71717a);border-left:3px solid var(--clip-border, #555);border-radius:4px;cursor:grab;overflow:hidden;touch-action:none;transition:box-shadow .15s ease,transform .1s ease}.ss-clip:hover{box-shadow:0 2px 8px #00000040}.ss-clip.selected{outline:2px solid var(--clip-border, #3b82f6);outline-offset:0px;box-shadow:0 0 0 1px #ffffff4d inset,0 2px 8px #0003,0 0 0 3px color-mix(in srgb,var(--clip-border, #3b82f6) 25%,transparent)}.ss-clip.focused{outline:2px solid rgba(255,171,0,.8);outline-offset:1px;box-shadow:0 0 8px 3px #ffab0080;z-index:1}.ss-clip.dragging{opacity:.6;cursor:grabbing;transform:scale(1.02)}.ss-clip.resizing{cursor:ew-resize}.ss-clip[data-asset-type=video]{--clip-bg: #e8def8;--clip-fg: #4a148c;--clip-border: #7c4dff}.ss-clip[data-asset-type=image]{--clip-bg: #d1e8ff;--clip-fg: #0d47a1;--clip-border: #2196f3}.ss-clip[data-asset-type=audio]{--clip-bg: #b8e6d4;--clip-fg: #004d40;--clip-border: #00897b}.ss-clip[data-asset-type=text],.ss-clip[data-asset-type=rich-text]{--clip-bg: #ffe4c9;--clip-fg: #bf360c;--clip-border: #e65100}.ss-clip[data-asset-type=shape]{--clip-bg: #fff3b8;--clip-fg: #f57f17;--clip-border: #f9a825}.ss-clip[data-asset-type=caption]{--clip-bg: #fce4ec;--clip-fg: #880e4f;--clip-border: #c2185b}.ss-clip[data-asset-type=svg]{--clip-bg: #fbe9e7;--clip-fg: #bf360c;--clip-border: #e64a19}.ss-clip[data-asset-type=html]{--clip-bg: #b3e5fc;--clip-fg: #006064;--clip-border: #0097a7}.ss-clip[data-asset-type=luma]{--clip-bg: #cfd8dc;--clip-fg: #37474f;--clip-border: #546e7a}.ss-clip[data-asset-type=text-to-image]{--clip-bg: #e8eaf6;--clip-fg: #1a237e;--clip-border: #5c6bc0}.ss-clip[data-asset-type=image-to-video]{--clip-bg: #ede7f6;--clip-fg: #311b92;--clip-border: #7e57c2}.ss-clip[data-asset-type=text-to-speech]{--clip-bg: #f3e5f5;--clip-fg: #4a148c;--clip-border: #ab47bc}.ss-clip.ss-clip--thumbnails{background-color:#0d0d0d}.ss-clip.ss-clip--thumbnails:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(0,0,0,.4) 0%,transparent 8%,transparent 92%,rgba(0,0,0,.4) 100%);pointer-events:none;z-index:1;border-radius:inherit}.ss-clip.ss-clip--thumbnails .ss-clip-content{background:linear-gradient(to right,#0009,#00000026 20% 80%,#0009);z-index:1}.ss-clip.ss-clip--thumbnails .ss-clip-icon,.ss-clip.ss-clip--thumbnails .ss-clip-label{color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.8)}.ss-clip.ss-clip--thumbnails .ss-clip-badge{background:#00000080;color:#fff}.ss-clip.ss-clip--loading-thumbnails{background:linear-gradient(90deg,var(--clip-bg) 0%,color-mix(in srgb,var(--clip-bg) 70%,white) 50%,var(--clip-bg) 100%);background-size:200% 100%;animation:ss-thumbnail-loading 1.5s ease-in-out infinite}@keyframes ss-thumbnail-loading{0%{background-position:200% 0}to{background-position:-200% 0}}.ss-clip-content{display:flex;align-items:center;padding:0 8px;height:100%;gap:6px}.ss-clip-icon{font-size:12px;color:var(--clip-fg, #333);opacity:.7;flex-shrink:0;font-weight:600}.ss-clip-icon svg{width:12px;height:12px;fill:currentColor;vertical-align:middle}.ss-clip-label{font-size:11px;font-weight:500;color:var(--clip-fg, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ss-clip-badge{position:absolute;top:4px;right:4px;width:16px;height:16px;display:flex;align-items:center;justify-content:center;background:#00000026;border-radius:3px;font-size:10px;color:var(--clip-fg, #333);opacity:.6;transition:opacity .1s ease}.ss-clip:hover .ss-clip-badge{opacity:1}.ss-clip-badge[data-intent=fixed]{display:none}.ss-clip-mask-badge{position:absolute;top:4px;left:4px;width:18px;height:18px;display:flex;align-items:center;justify-content:center;background:#0006;border-radius:3px;font-size:11px;color:#fff;cursor:pointer;z-index:2;transition:background .1s ease}.ss-clip-mask-badge:hover{background:#0009}.ss-clip-resize-handle{position:absolute;top:0;bottom:0;width:12px;cursor:ew-resize;z-index:2}.ss-clip-resize-handle.left{left:0;border-radius:4px 0 0 4px}.ss-clip-resize-handle.right{right:0;border-radius:0 4px 4px 0}.ss-clip-resize-handle:hover{background:#00000014}.ss-clip.selected .ss-clip-resize-handle{background:#0000000f}.ss-clip.selected .ss-clip-resize-handle:hover{background:#0000001f}.ss-clip-menu-trigger{position:absolute;top:4px;right:4px;display:flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;background:#0000000f;border:none;border-radius:3px;color:var(--clip-fg, #333);cursor:pointer;opacity:0;transition:opacity .1s ease,background .1s ease;z-index:3}.ss-clip-menu-trigger svg{width:12px;height:3px;display:block}.ss-clip:hover .ss-clip-menu-trigger~.ss-clip-badge,.ss-clip.selected .ss-clip-menu-trigger~.ss-clip-badge,.ss-clip:hover .ss-clip-badge,.ss-clip.selected .ss-clip-badge{opacity:0;pointer-events:none}.ss-clip:hover .ss-clip-menu-trigger,.ss-clip.selected .ss-clip-menu-trigger{opacity:1}.ss-clip-menu-trigger:hover{background:#00000026}.ss-clip.ss-clip--thumbnails .ss-clip-menu-trigger{background:#0006;color:#fffffff2}.ss-clip.ss-clip--thumbnails .ss-clip-menu-trigger:hover{background:#0009}.ss-clip{container-type:inline-size}@container (max-width: 90px){.ss-clip-menu-trigger{display:none}}.ss-playhead{position:absolute;top:0;bottom:0;left:calc(var(--playhead-time, 0) * var(--ss-timeline-pixels-per-second) * 1px);width:2px;pointer-events:none;z-index:4}.ss-playhead-line{position:absolute;top:0;bottom:0;left:0;width:2px;background:#3b82f6}.ss-playhead-handle{position:absolute;top:0;left:50%;transform:translate(-50%);width:12px;height:12px;background:#3b82f6;border-radius:2px 2px 50% 50%;cursor:grab;pointer-events:auto}.ss-playhead-handle:hover{transform:translate(-50%) scale(1.15)}.ss-playhead-handle:active{cursor:grabbing}.ss-playhead-ghost{position:absolute;top:0;bottom:0;width:1px;background:#3b82f666;pointer-events:none;z-index:3;opacity:0;transition:opacity .15s}.ss-ruler-tracks-wrapper:hover .ss-playhead-ghost{opacity:1}.ss-feedback-layer{position:absolute;inset:0;pointer-events:none;z-index:5}.ss-snap-line{position:absolute;top:0;bottom:0;width:2px;background:#22c55e;box-shadow:0 0 4px #22c55e}.ss-drop-zone{position:absolute;left:0;right:0;height:4px;background:#3b82f6;box-shadow:0 0 8px #3b82f6;animation:ss-pulse .8s ease-in-out infinite;z-index:2}@keyframes ss-pulse{0%,to{opacity:.6}50%{opacity:1}}.ss-drag-ghost{position:absolute;pointer-events:none;opacity:.4;background:transparent!important;border:2px dashed var(--clip-border, #6b7280);border-left-width:2px;box-shadow:none;z-index:7}.ss-drag-time-tooltip{position:absolute;background:#1a1a2e;color:#fff;padding:4px 8px;border-radius:4px;font-size:12px;font-weight:500;font-family:monospace;white-space:nowrap;pointer-events:none;z-index:8;transform:translate(-50%);box-shadow:0 2px 8px #0000004d}.ss-selection-box{position:absolute;border:1px solid #3b82f6;background:#3b82f626;pointer-events:none;z-index:6}.ss-timeline-empty{display:flex;align-items:center;justify-content:center;flex:1;color:#9ca3af;font-size:13px}.ss-clip-error-badge{position:absolute;top:50%;left:6px;transform:translateY(-50%);width:20px;height:20px;display:flex;align-items:center;justify-content:center;background:#dc2626;border-radius:4px;font-size:12px;color:#fff;z-index:10;cursor:help;box-shadow:0 1px 3px #0000004d}.ss-clip.ss-clip--error{--clip-bg: #fef2f2;--clip-fg: #991b1b;--clip-border: #fca5a5;border-color:var(--clip-border)!important;border-left-width:3px;border-left-color:#dc2626!important}.ss-clip.ss-clip--error:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(-45deg,transparent,transparent 8px,rgba(220,38,38,.06) 8px,rgba(220,38,38,.06) 16px);border-radius:inherit;pointer-events:none;z-index:1}.ss-clip.ss-clip--error .ss-clip-content{opacity:.6;padding-left:28px}.ss-clip.ss-clip--error .ss-clip-icon{color:var(--clip-fg);opacity:.5}.ss-clip.ss-clip--error .ss-clip-label{color:var(--clip-fg)}.ss-clip.ss-clip--error.ss-clip--thumbnails{background-image:none!important}:root{--luma-accent: #00d4aa;--luma-accent-dim: rgba(0, 212, 170, .15);--luma-accent-glow: rgba(0, 212, 170, .4);--luma-badge-bg: linear-gradient(135deg, rgba(0, 212, 170, .9) 0%, rgba(0, 180, 150, .95) 100%);--luma-badge-shadow: 0 2px 8px rgba(0, 212, 170, .3), 0 0 1px rgba(0, 0, 0, .5);--luma-ease-out: cubic-bezier(.16, 1, .3, 1);--luma-ease-snap: cubic-bezier(.34, 1.56, .64, 1)}.ss-clip.ss-clip-luma-target{box-shadow:0 0 0 3px var(--luma-accent),0 0 12px var(--luma-accent-glow);animation:luma-target-breathe 1.5s ease-in-out infinite}@keyframes luma-target-breathe{0%,to{box-shadow:0 0 0 3px var(--luma-accent),0 0 12px var(--luma-accent-glow)}50%{box-shadow:0 0 0 3px var(--luma-accent),0 0 20px var(--luma-accent-glow)}}.ss-clip.ss-clip-luma-has-target:after{content:"◐";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);padding:4px 10px;background:#00d4aae6;border-radius:12px;font-size:14px;color:#0a1a15;font-weight:600;box-shadow:0 2px 8px #0000004d;pointer-events:none;z-index:10}.ss-clip.ss-clip-luma-attaching{animation:luma-attach-snap .4s var(--luma-ease-snap) forwards}@keyframes luma-attach-snap{0%{transform:scale(1.02);box-shadow:0 0 0 2px var(--luma-accent),0 0 30px var(--luma-accent-glow)}40%{transform:scale(.98)}to{transform:scale(1);box-shadow:none}}.ss-clip.ss-clip-luma-attached{animation:luma-attached-success .6s var(--luma-ease-snap) forwards}@keyframes luma-attached-success{0%{box-shadow:0 0 0 3px var(--luma-accent),0 0 40px var(--luma-accent-glow)}30%{transform:scale(1.02)}60%{transform:scale(.99);box-shadow:0 0 0 1px var(--luma-accent),0 0 15px var(--luma-accent-glow)}to{transform:scale(1);box-shadow:none}}.ss-clip-mask-badge{position:absolute;top:4px;left:4px;width:20px;height:20px;border-radius:5px;background:var(--luma-badge-bg);box-shadow:var(--luma-badge-shadow);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:600;color:#0a1a15;font-family:system-ui,-apple-system,sans-serif;cursor:pointer;transition:transform .15s var(--luma-ease-out),box-shadow .15s var(--luma-ease-out),background .15s ease;border:1px solid rgba(255,255,255,.15);z-index:2}.ss-clip-mask-badge:hover{transform:scale(1.1);box-shadow:var(--luma-badge-shadow),0 0 12px var(--luma-accent-glow)}.ss-clip-mask-badge:active{transform:scale(.95);background:linear-gradient(135deg,#00b496,#00a082)}.ss-clip-mask-badge.ss-badge-entering{animation:badge-enter .35s var(--luma-ease-snap) forwards}@keyframes badge-enter{0%{opacity:0;transform:scale(0) rotate(-90deg)}to{opacity:1;transform:scale(1) rotate(0)}}.ss-clip-mask-badge:after{content:"";position:absolute;inset:-2px;border-radius:7px;border:1px solid var(--luma-accent-dim);opacity:0;animation:badge-breathe 3s ease-in-out infinite;pointer-events:none}@keyframes badge-breathe{0%,to{opacity:0}50%{opacity:.5}}.ss-clip.ss-clip-luma-dragging{opacity:.85;box-shadow:0 0 0 1px var(--luma-accent),0 8px 32px #0006,0 0 24px var(--luma-accent-dim);animation:luma-drag-float .8s ease-in-out infinite}@keyframes luma-drag-float{0%,to{transform:translateY(0)}50%{transform:translateY(-2px)}}.ss-clip.ss-clip-luma-snapping{transition:transform .2s var(--luma-ease-magnetic),left .2s var(--luma-ease-magnetic),top .2s var(--luma-ease-magnetic)}.ss-luma-connection-line{position:absolute;pointer-events:none;z-index:2;height:2px;background:linear-gradient(90deg,var(--luma-accent) 0%,var(--luma-accent-glow) 50%,var(--luma-accent) 100%);border-radius:1px;box-shadow:0 0 8px var(--luma-accent-glow);background-size:200% 100%;animation:luma-line-flow 1s linear infinite;opacity:0;transform-origin:left center;transition:opacity .2s ease}.ss-luma-connection-line.active{opacity:1}@keyframes luma-line-flow{0%{background-position:200% 0}to{background-position:0% 0}}.ss-clip-mask-badge.ss-badge-removing{background:linear-gradient(135deg,#ff5a5ae6,#c83c3cf2);animation:badge-shake .4s ease}@keyframes badge-shake{0%,to{transform:translate(0)}20%,60%{transform:translate(-2px)}40%,80%{transform:translate(2px)}}';
|
|
60311
60318
|
let H0 = !1;
|
|
60312
60319
|
function Wr() {
|
|
60313
60320
|
if (H0 || typeof document > "u") return;
|
|
@@ -60316,22 +60323,22 @@ function Wr() {
|
|
|
60316
60323
|
return;
|
|
60317
60324
|
}
|
|
60318
60325
|
const t = document.createElement("style");
|
|
60319
|
-
t.id = "shotstack-studio-styles", t.textContent =
|
|
60326
|
+
t.id = "shotstack-studio-styles", t.textContent = FJ, document.head.appendChild(t), H0 = !0;
|
|
60320
60327
|
}
|
|
60321
|
-
const
|
|
60328
|
+
const BJ = `<svg width="8" height="12" viewBox="0 0 8 12" fill="currentColor">
|
|
60322
60329
|
<circle cx="2" cy="2" r="1.2"/><circle cx="6" cy="2" r="1.2"/>
|
|
60323
60330
|
<circle cx="2" cy="6" r="1.2"/><circle cx="6" cy="6" r="1.2"/>
|
|
60324
60331
|
<circle cx="2" cy="10" r="1.2"/><circle cx="6" cy="10" r="1.2"/>
|
|
60325
|
-
</svg>`,
|
|
60332
|
+
</svg>`, NJ = `<svg width="12" height="8" viewBox="0 0 12 8" fill="currentColor">
|
|
60326
60333
|
<circle cx="2" cy="2" r="1.2"/><circle cx="6" cy="2" r="1.2"/><circle cx="10" cy="2" r="1.2"/>
|
|
60327
60334
|
<circle cx="2" cy="6" r="1.2"/><circle cx="6" cy="6" r="1.2"/><circle cx="10" cy="6" r="1.2"/>
|
|
60328
60335
|
</svg>`;
|
|
60329
|
-
function
|
|
60336
|
+
function MJ(e = "ss-toolbar-drag-handle", t = "horizontal") {
|
|
60330
60337
|
const i = document.createElement("div");
|
|
60331
|
-
return i.className = e, i.innerHTML = t === "vertical" ?
|
|
60338
|
+
return i.className = e, i.innerHTML = t === "vertical" ? BJ : NJ, i;
|
|
60332
60339
|
}
|
|
60333
60340
|
function p1(e) {
|
|
60334
|
-
const { container: t, handleClassName: i, handleOrientation: r, boundsPadding: n = 12 } = e, s =
|
|
60341
|
+
const { container: t, handleClassName: i, handleOrientation: r, boundsPadding: n = 12 } = e, s = MJ(i, r);
|
|
60335
60342
|
t.insertBefore(s, t.firstChild);
|
|
60336
60343
|
let a = !1, o = 0, l = 0, u = !1, c = !1, f = 0, d = 0, h = 0, m = 0;
|
|
60337
60344
|
function v(S, k) {
|
|
@@ -60371,7 +60378,7 @@ function p1(e) {
|
|
|
60371
60378
|
}
|
|
60372
60379
|
};
|
|
60373
60380
|
}
|
|
60374
|
-
const
|
|
60381
|
+
const zJ = "12px", QE = "Can't delete the only clip on the timeline", mo = [6, 8, 10, 12, 14, 16, 18, 21, 24, 28, 32, 36, 42, 48, 56, 64, 72, 96, 128], OJ = [
|
|
60375
60382
|
"Arapey",
|
|
60376
60383
|
"Clear Sans",
|
|
60377
60384
|
"Didact Gothic",
|
|
@@ -60455,7 +60462,7 @@ class Ga {
|
|
|
60455
60462
|
handleClassName: "ss-toolbar-drag-handle ss-toolbar-drag-handle--dark",
|
|
60456
60463
|
handleOrientation: "vertical",
|
|
60457
60464
|
onReset: () => {
|
|
60458
|
-
this.container && (this.container.style.left = "50%", this.container.style.top =
|
|
60465
|
+
this.container && (this.container.style.left = "50%", this.container.style.top = zJ, this.container.style.transform = "translateX(-50%)");
|
|
60459
60466
|
}
|
|
60460
60467
|
}));
|
|
60461
60468
|
}
|
|
@@ -60530,7 +60537,7 @@ class Ga {
|
|
|
60530
60537
|
t?.classList.toggle("active", i);
|
|
60531
60538
|
}
|
|
60532
60539
|
}
|
|
60533
|
-
class
|
|
60540
|
+
class RJ {
|
|
60534
60541
|
constructor(t, i) {
|
|
60535
60542
|
this.edit = t, this.tracksContainer = i, this.handleContextMenu = this.onContextMenu.bind(this), this.handleDocumentPointerDown = this.onDocumentPointerDown.bind(this), this.handleKeyDown = this.onKeyDown.bind(this), this.handleScroll = () => this.hide(), this.handleResize = () => this.hide();
|
|
60536
60543
|
}
|
|
@@ -60594,7 +60601,7 @@ class OJ {
|
|
|
60594
60601
|
r.style.left = `${u}px`, r.style.top = `${c}px`, r.style.visibility = "";
|
|
60595
60602
|
}
|
|
60596
60603
|
}
|
|
60597
|
-
class
|
|
60604
|
+
class VJ {
|
|
60598
60605
|
element;
|
|
60599
60606
|
options;
|
|
60600
60607
|
currentTime = 0;
|
|
@@ -60651,7 +60658,7 @@ class RJ {
|
|
|
60651
60658
|
this.currentScrollX = t;
|
|
60652
60659
|
}
|
|
60653
60660
|
}
|
|
60654
|
-
class
|
|
60661
|
+
class LJ {
|
|
60655
60662
|
element;
|
|
60656
60663
|
contentElement;
|
|
60657
60664
|
options;
|
|
@@ -60718,7 +60725,7 @@ class VJ {
|
|
|
60718
60725
|
this.element.remove();
|
|
60719
60726
|
}
|
|
60720
60727
|
}
|
|
60721
|
-
class
|
|
60728
|
+
class $J {
|
|
60722
60729
|
element;
|
|
60723
60730
|
options;
|
|
60724
60731
|
timeDisplayElement = null;
|
|
@@ -60805,12 +60812,12 @@ class LJ {
|
|
|
60805
60812
|
}
|
|
60806
60813
|
}
|
|
60807
60814
|
const n4 = ["mp4", "mov", "webm", "avi", "mkv", "m4v"], s4 = ["jpg", "jpeg", "png", "gif", "webp", "bmp", "svg"], G0 = ["mp3", "wav", "aac", "ogg", "m4a", "flac"];
|
|
60808
|
-
function
|
|
60815
|
+
function UJ(e) {
|
|
60809
60816
|
const t = e.match(/['"]?(https?:\/\/[^'"]+)['"]?/);
|
|
60810
60817
|
return t && t[1].split("/").pop()?.split("?")[0] || null;
|
|
60811
60818
|
}
|
|
60812
|
-
function
|
|
60813
|
-
const i =
|
|
60819
|
+
function ZJ(e, t) {
|
|
60820
|
+
const i = UJ(e), r = i?.split(".").pop()?.toLowerCase();
|
|
60814
60821
|
if (e.toLowerCase().includes("invalid") && e.toLowerCase().includes("source")) {
|
|
60815
60822
|
if (t === "image") {
|
|
60816
60823
|
if (r && n4.includes(r))
|
|
@@ -60933,7 +60940,7 @@ class a4 {
|
|
|
60933
60940
|
/** Show/hide error state based on clip error */
|
|
60934
60941
|
updateErrorState() {
|
|
60935
60942
|
const t = this.currentState ? this.options.getClipError?.(this.currentState.trackIndex, this.currentState.clipIndex) : null;
|
|
60936
|
-
t && (!this.currentError || t.error !== this.currentError.error || t.assetType !== this.currentError.assetType) ? (this.currentError = t, this.element.classList.add("ss-clip--error"), this.errorBadge || (this.errorBadge = document.createElement("div"), this.errorBadge.className = "ss-clip-error-badge", this.errorBadge.textContent = "⚠", this.element.appendChild(this.errorBadge)), this.errorBadge.title =
|
|
60943
|
+
t && (!this.currentError || t.error !== this.currentError.error || t.assetType !== this.currentError.assetType) ? (this.currentError = t, this.element.classList.add("ss-clip--error"), this.errorBadge || (this.errorBadge = document.createElement("div"), this.errorBadge.className = "ss-clip-error-badge", this.errorBadge.textContent = "⚠", this.element.appendChild(this.errorBadge)), this.errorBadge.title = ZJ(t.error, t.assetType)) : !t && this.currentError && (this.currentError = null, this.element.classList.remove("ss-clip--error"), this.errorBadge?.remove(), this.errorBadge = null);
|
|
60937
60944
|
}
|
|
60938
60945
|
dispose() {
|
|
60939
60946
|
if (this.currentState) {
|
|
@@ -61013,7 +61020,7 @@ class a4 {
|
|
|
61013
61020
|
return this.currentLumaRef !== void 0;
|
|
61014
61021
|
}
|
|
61015
61022
|
}
|
|
61016
|
-
class
|
|
61023
|
+
class jJ {
|
|
61017
61024
|
element;
|
|
61018
61025
|
clipComponents = /* @__PURE__ */ new Map();
|
|
61019
61026
|
options;
|
|
@@ -61133,7 +61140,7 @@ class ZJ {
|
|
|
61133
61140
|
return null;
|
|
61134
61141
|
}
|
|
61135
61142
|
}
|
|
61136
|
-
class
|
|
61143
|
+
class WJ {
|
|
61137
61144
|
element;
|
|
61138
61145
|
contentElement;
|
|
61139
61146
|
trackComponents = [];
|
|
@@ -61161,7 +61168,7 @@ class jJ {
|
|
|
61161
61168
|
this.needsUpdate = !1;
|
|
61162
61169
|
const t = this.currentTracks, i = this.currentPixelsPerSecond;
|
|
61163
61170
|
for (this.contentElement.style.width = `${this.currentTimelineWidth}px`; this.trackComponents.length < t.length; ) {
|
|
61164
|
-
const r = this.trackComponents.length, n = new
|
|
61171
|
+
const r = this.trackComponents.length, n = new jJ(r, {
|
|
61165
61172
|
showBadges: this.options.showBadges,
|
|
61166
61173
|
onClipSelect: this.options.onClipSelect,
|
|
61167
61174
|
getClipRenderer: this.options.getClipRenderer,
|
|
@@ -61250,7 +61257,7 @@ class jJ {
|
|
|
61250
61257
|
this.element.scrollLeft = t, this.element.scrollTop = i;
|
|
61251
61258
|
}
|
|
61252
61259
|
}
|
|
61253
|
-
class
|
|
61260
|
+
class HJ {
|
|
61254
61261
|
constructor(t, i, r, n) {
|
|
61255
61262
|
this.lumaTrackIndex = t, this.lumaClipIndex = i, this.contentTrackIndex = r, this.contentClipIndex = n, this.transformCommand = new XE(t, i, "luma");
|
|
61256
61263
|
}
|
|
@@ -61329,7 +61336,7 @@ class WJ {
|
|
|
61329
61336
|
this.transformCommand.dispose?.(), this.lumaClipId = null, this.contentClipId = null, this.originalLumaStart = null, this.originalLumaLength = null;
|
|
61330
61337
|
}
|
|
61331
61338
|
}
|
|
61332
|
-
class
|
|
61339
|
+
class GJ {
|
|
61333
61340
|
constructor(t, i, r, n, s, a) {
|
|
61334
61341
|
this.fromTrackIndex = t, this.fromClipIndex = i, this.toTrackIndex = r, this.contentTrackIndex = n, this.contentClipIndex = s, this.targetStart = a, t !== r && (this.moveCommand = new ts(t, i, r, a));
|
|
61335
61342
|
}
|
|
@@ -61348,7 +61355,7 @@ class HJ {
|
|
|
61348
61355
|
const s = t.findClipIndices(i), a = t.findClipIndices(r);
|
|
61349
61356
|
if (!s || !a)
|
|
61350
61357
|
throw new Error("Failed to find clips after move");
|
|
61351
|
-
this.attachCommand = new
|
|
61358
|
+
this.attachCommand = new HJ(s.trackIndex, s.clipIndex, a.trackIndex, a.clipIndex), await this.attachCommand.execute(t), this.wasExecuted = !0;
|
|
61352
61359
|
} catch (s) {
|
|
61353
61360
|
if (n && !this.wasExecuted && this.moveCommand)
|
|
61354
61361
|
try {
|
|
@@ -61370,7 +61377,7 @@ class HJ {
|
|
|
61370
61377
|
this.attachCommand?.dispose?.(), this.moveCommand?.dispose?.();
|
|
61371
61378
|
}
|
|
61372
61379
|
}
|
|
61373
|
-
class
|
|
61380
|
+
class qJ {
|
|
61374
61381
|
constructor(t, i, r, n, s) {
|
|
61375
61382
|
this.fromTrackIndex = t, this.fromClipIndex = i, this.toTrackIndex = r, this.newStart = n, this.pushOffset = s, this.moveCommand = new ts(t, i, r, n);
|
|
61376
61383
|
}
|
|
@@ -61472,7 +61479,7 @@ function o4(e, t, i) {
|
|
|
61472
61479
|
function $l(e) {
|
|
61473
61480
|
e && (e.style.display = "none");
|
|
61474
61481
|
}
|
|
61475
|
-
function
|
|
61482
|
+
function YJ(e, t, i) {
|
|
61476
61483
|
const r = Ch(e.container, e.dropZone, "ss-drop-zone");
|
|
61477
61484
|
return r.style.top = `${t - 2 + i}px`, r.style.display = "block", r;
|
|
61478
61485
|
}
|
|
@@ -61486,14 +61493,14 @@ function q0(e, t, i, r) {
|
|
|
61486
61493
|
function nm(e) {
|
|
61487
61494
|
e && (e.style.display = "none");
|
|
61488
61495
|
}
|
|
61489
|
-
function
|
|
61496
|
+
function XJ(e, t, i, r, n, s) {
|
|
61490
61497
|
const a = Ch(e.container, e.lumaConnectionLine, "ss-luma-connection-line"), o = So(t.config.start, s);
|
|
61491
61498
|
return a.style.left = `${o}px`, a.style.top = `${i + n}px`, a.style.height = `${r}px`, a.classList.add("active"), a;
|
|
61492
61499
|
}
|
|
61493
61500
|
function m1(e) {
|
|
61494
61501
|
e && e.classList.remove("active");
|
|
61495
61502
|
}
|
|
61496
|
-
function
|
|
61503
|
+
function KJ(e, t, i, r, n, s, a, o, l) {
|
|
61497
61504
|
if (t.lumaTargetClipElement && t.lumaTargetClipElement.classList.remove("ss-clip-luma-target"), !r)
|
|
61498
61505
|
return m1(t.lumaConnectionLine), i && i.classList.remove("ss-clip-luma-has-target"), { targetClipElement: null, connectionLine: t.lumaConnectionLine };
|
|
61499
61506
|
const u = e.querySelector(
|
|
@@ -61501,7 +61508,7 @@ function XJ(e, t, i, r, n, s, a, o, l) {
|
|
|
61501
61508
|
);
|
|
61502
61509
|
if (u) {
|
|
61503
61510
|
u.classList.add("ss-clip-luma-target"), i && i.classList.add("ss-clip-luma-has-target");
|
|
61504
|
-
const c =
|
|
61511
|
+
const c = XJ(t, r, s, a, o, l);
|
|
61505
61512
|
return { targetClipElement: u, connectionLine: c };
|
|
61506
61513
|
}
|
|
61507
61514
|
return { targetClipElement: null, connectionLine: t.lumaConnectionLine };
|
|
@@ -61509,7 +61516,7 @@ function XJ(e, t, i, r, n, s, a, o, l) {
|
|
|
61509
61516
|
function Ul(e, t) {
|
|
61510
61517
|
e.lumaTargetClipElement && e.lumaTargetClipElement.classList.remove("ss-clip-luma-target"), t && t.classList.remove("ss-clip-luma-has-target"), m1(e.lumaConnectionLine);
|
|
61511
61518
|
}
|
|
61512
|
-
function
|
|
61519
|
+
function JJ(e, t, i, r) {
|
|
61513
61520
|
const n = document.createElement("div");
|
|
61514
61521
|
n.className = "ss-drag-ghost ss-clip", n.dataset.assetType = t;
|
|
61515
61522
|
const s = cG(e, r);
|
|
@@ -61532,7 +61539,7 @@ function l4(e, t = null) {
|
|
|
61532
61539
|
lumaTargetClipElement: null
|
|
61533
61540
|
};
|
|
61534
61541
|
}
|
|
61535
|
-
function
|
|
61542
|
+
function QJ(e) {
|
|
61536
61543
|
return {
|
|
61537
61544
|
container: e,
|
|
61538
61545
|
snapLine: null,
|
|
@@ -61542,17 +61549,17 @@ function JJ(e) {
|
|
|
61542
61549
|
lumaTargetClipElement: null
|
|
61543
61550
|
};
|
|
61544
61551
|
}
|
|
61545
|
-
function
|
|
61552
|
+
function tQ(e) {
|
|
61546
61553
|
e.snapLine && e.snapLine.remove(), e.dropZone && e.dropZone.remove(), e.dragTimeTooltip && e.dragTimeTooltip.remove(), e.lumaConnectionLine && e.lumaConnectionLine.remove(), e.lumaTargetClipElement && e.lumaTargetClipElement.classList.remove("ss-clip-luma-target");
|
|
61547
61554
|
}
|
|
61548
61555
|
function u4(e, t) {
|
|
61549
61556
|
e.style.position = t.position, e.style.left = t.left, e.style.top = t.top, e.style.zIndex = t.zIndex, e.style.pointerEvents = t.pointerEvents, e.style.width = "", e.style.height = "";
|
|
61550
61557
|
}
|
|
61551
61558
|
const c4 = { type: "idle" };
|
|
61552
|
-
function
|
|
61559
|
+
function eQ(e, t, i) {
|
|
61553
61560
|
return { type: "pending", startPoint: e, clipRef: t, originalTime: i };
|
|
61554
61561
|
}
|
|
61555
|
-
function
|
|
61562
|
+
function iQ(e, t, i, r, n, s, a, o) {
|
|
61556
61563
|
return {
|
|
61557
61564
|
type: "dragging",
|
|
61558
61565
|
clipRef: e.clipRef,
|
|
@@ -61570,7 +61577,7 @@ function eQ(e, t, i, r, n, s, a, o) {
|
|
|
61570
61577
|
altKeyHeld: o
|
|
61571
61578
|
};
|
|
61572
61579
|
}
|
|
61573
|
-
function
|
|
61580
|
+
function rQ(e, t, i, r, n) {
|
|
61574
61581
|
return { type: "resizing", clipRef: e, clipElement: t, edge: i, originalStart: r, originalLength: n };
|
|
61575
61582
|
}
|
|
61576
61583
|
function Ml(e, t) {
|
|
@@ -61581,14 +61588,14 @@ function Ml(e, t) {
|
|
|
61581
61588
|
altKeyHeld: t.altKeyHeld ?? e.altKeyHeld
|
|
61582
61589
|
};
|
|
61583
61590
|
}
|
|
61584
|
-
const
|
|
61591
|
+
const nQ = {
|
|
61585
61592
|
dragThreshold: 3,
|
|
61586
61593
|
snapThreshold: 10,
|
|
61587
61594
|
resizeZone: 12
|
|
61588
61595
|
};
|
|
61589
|
-
class
|
|
61596
|
+
class sQ {
|
|
61590
61597
|
constructor(t, i, r, n, s, a) {
|
|
61591
|
-
this.edit = t, this.stateManager = i, this.trackList = r, this.tracksContainer = n, this.feedbackElements =
|
|
61598
|
+
this.edit = t, this.stateManager = i, this.trackList = r, this.tracksContainer = n, this.feedbackElements = QJ(s), this.config = { ...nQ, ...a }, this.handlePointerDown = this.onPointerDown.bind(this), this.handlePointerMove = this.onPointerMove.bind(this), this.handlePointerUp = this.onPointerUp.bind(this), this.handlePointerCancel = this.onPointerCancel.bind(this);
|
|
61592
61599
|
}
|
|
61593
61600
|
state = c4;
|
|
61594
61601
|
activePointerId = -1;
|
|
@@ -61629,7 +61636,7 @@ class nQ {
|
|
|
61629
61636
|
}
|
|
61630
61637
|
startPending(t, i) {
|
|
61631
61638
|
const r = this.stateManager.getClipAt(i.trackIndex, i.clipIndex);
|
|
61632
|
-
r && (this.beginPointerInteraction(t), this.state =
|
|
61639
|
+
r && (this.beginPointerInteraction(t), this.state = eQ({ x: t.clientX, y: t.clientY }, i, r.config.start));
|
|
61633
61640
|
}
|
|
61634
61641
|
startResize(t, i, r) {
|
|
61635
61642
|
const n = this.stateManager.getClipAt(i.trackIndex, i.clipIndex);
|
|
@@ -61637,7 +61644,7 @@ class nQ {
|
|
|
61637
61644
|
const s = this.tracksContainer.querySelector(
|
|
61638
61645
|
`[data-track-index="${i.trackIndex}"][data-clip-index="${i.clipIndex}"]`
|
|
61639
61646
|
);
|
|
61640
|
-
s && (this.beginPointerInteraction(t), this.state =
|
|
61647
|
+
s && (this.beginPointerInteraction(t), this.state = rQ(i, s, r, n.config.start, n.config.length), this.buildSnapPointsForClip(i), t.preventDefault());
|
|
61641
61648
|
}
|
|
61642
61649
|
/** Track the pointer driving this interaction and capture it so its pointerup cannot be lost */
|
|
61643
61650
|
beginPointerInteraction(t) {
|
|
@@ -61691,8 +61698,8 @@ class nQ {
|
|
|
61691
61698
|
pointerEvents: s.style.pointerEvents
|
|
61692
61699
|
}, o = s.getBoundingClientRect(), l = t.clientX - o.left, u = t.clientY - o.top;
|
|
61693
61700
|
s.style.position = "fixed", s.style.left = `${o.left}px`, s.style.top = `${o.top}px`, s.style.width = `${o.width}px`, s.style.height = `${o.height}px`, s.style.zIndex = "18", s.style.pointerEvents = "none";
|
|
61694
|
-
const c = this.stateManager.getViewport().pixelsPerSecond, f = this.stateManager.getTracks()[r.trackIndex], d = n.config.asset?.type || "unknown", h = this.getHeights()[r.trackIndex] ?? _o(f?.primaryAssetType ?? d), m =
|
|
61695
|
-
this.feedbackElements.container.appendChild(m), this.state =
|
|
61701
|
+
const c = this.stateManager.getViewport().pixelsPerSecond, f = this.stateManager.getTracks()[r.trackIndex], d = n.config.asset?.type || "unknown", h = this.getHeights()[r.trackIndex] ?? _o(f?.primaryAssetType ?? d), m = JJ(n.config.length, d, h, c);
|
|
61702
|
+
this.feedbackElements.container.appendChild(m), this.state = iQ(i, s, m, l, u, a, n.config.length, t.altKey);
|
|
61696
61703
|
const v = Y0(this.feedbackElements.container, this.tracksContainer);
|
|
61697
61704
|
m.style.left = `${So(n.config.start, c)}px`, m.style.top = `${this.getTrackYPosition(r.trackIndex) + 4 + v}px`, this.buildSnapPointsForClip(r);
|
|
61698
61705
|
}
|
|
@@ -61745,7 +61752,7 @@ class nQ {
|
|
|
61745
61752
|
if (t.dragTarget.type !== "track") return i.config.start;
|
|
61746
61753
|
const s = this.stateManager.getTracks()[t.dragTarget.trackIndex];
|
|
61747
61754
|
if (!s) return i.config.start;
|
|
61748
|
-
const a = this.getTrackYPosition(t.dragTarget.trackIndex), l = this.getHeights()[t.dragTarget.trackIndex] ?? _o(s.primaryAssetType), u =
|
|
61755
|
+
const a = this.getTrackYPosition(t.dragTarget.trackIndex), l = this.getHeights()[t.dragTarget.trackIndex] ?? _o(s.primaryAssetType), u = KJ(
|
|
61749
61756
|
this.tracksContainer,
|
|
61750
61757
|
this.feedbackElements,
|
|
61751
61758
|
t.clipElement,
|
|
@@ -61776,7 +61783,7 @@ class nQ {
|
|
|
61776
61783
|
} else {
|
|
61777
61784
|
n.style.display = "none";
|
|
61778
61785
|
const s = this.getTrackYPosition(t.dragTarget.insertionIndex);
|
|
61779
|
-
this.feedbackElements.dropZone =
|
|
61786
|
+
this.feedbackElements.dropZone = YJ(this.feedbackElements, s, r.tracksOffset);
|
|
61780
61787
|
}
|
|
61781
61788
|
}
|
|
61782
61789
|
// ─── Resize Handling ───────────────────────────────────────────────────────
|
|
@@ -61875,7 +61882,7 @@ class nQ {
|
|
|
61875
61882
|
executeTransformAndAttach(t, i) {
|
|
61876
61883
|
const { clipRef: r, originalTrack: n, dragTarget: s } = t;
|
|
61877
61884
|
if (s.type !== "track") return;
|
|
61878
|
-
const a = new
|
|
61885
|
+
const a = new GJ(
|
|
61879
61886
|
n,
|
|
61880
61887
|
// fromTrackIndex
|
|
61881
61888
|
r.clipIndex,
|
|
@@ -61926,7 +61933,7 @@ class nQ {
|
|
|
61926
61933
|
}
|
|
61927
61934
|
case "move-with-push": {
|
|
61928
61935
|
if (s.type !== "track") return;
|
|
61929
|
-
const c = new
|
|
61936
|
+
const c = new qJ(n, r.clipIndex, s.trackIndex, l, i.pushOffset);
|
|
61930
61937
|
this.edit.executeEditCommand(c), this.moveLumaWithContent(u, s.trackIndex, l);
|
|
61931
61938
|
break;
|
|
61932
61939
|
}
|
|
@@ -62057,11 +62064,11 @@ class nQ {
|
|
|
62057
62064
|
return this.state.type !== "resizing" ? !1 : this.state.clipRef.trackIndex === t && this.state.clipRef.clipIndex === i;
|
|
62058
62065
|
}
|
|
62059
62066
|
dispose() {
|
|
62060
|
-
this.cancelInteraction(), this.tracksContainer.removeEventListener("pointerdown", this.handlePointerDown), document.removeEventListener("pointermove", this.handlePointerMove), document.removeEventListener("pointerup", this.handlePointerUp), document.removeEventListener("pointercancel", this.handlePointerCancel),
|
|
62067
|
+
this.cancelInteraction(), this.tracksContainer.removeEventListener("pointerdown", this.handlePointerDown), document.removeEventListener("pointermove", this.handlePointerMove), document.removeEventListener("pointerup", this.handlePointerUp), document.removeEventListener("pointercancel", this.handlePointerCancel), tQ(this.feedbackElements);
|
|
62061
62068
|
}
|
|
62062
62069
|
}
|
|
62063
|
-
const
|
|
62064
|
-
class
|
|
62070
|
+
const aQ = 72;
|
|
62071
|
+
class oQ {
|
|
62065
62072
|
generator;
|
|
62066
62073
|
onRendered;
|
|
62067
62074
|
// Track state per clip identity (src|trim|start) - NOT by element reference
|
|
@@ -62149,7 +62156,7 @@ class aQ {
|
|
|
62149
62156
|
return new Promise((i) => {
|
|
62150
62157
|
const r = new Image();
|
|
62151
62158
|
r.crossOrigin = "anonymous", r.onload = () => {
|
|
62152
|
-
const n = r.naturalWidth / r.naturalHeight, s = Math.round(
|
|
62159
|
+
const n = r.naturalWidth / r.naturalHeight, s = Math.round(aQ * n);
|
|
62153
62160
|
i({ url: t, thumbnailWidth: s });
|
|
62154
62161
|
}, r.onerror = () => i(null), r.src = t;
|
|
62155
62162
|
});
|
|
@@ -62168,7 +62175,7 @@ class aQ {
|
|
|
62168
62175
|
this.clipStates.clear();
|
|
62169
62176
|
}
|
|
62170
62177
|
}
|
|
62171
|
-
class
|
|
62178
|
+
class lQ {
|
|
62172
62179
|
cache = /* @__PURE__ */ new Map();
|
|
62173
62180
|
pendingRequests = /* @__PURE__ */ new Map();
|
|
62174
62181
|
videoPool = /* @__PURE__ */ new Map();
|
|
@@ -62276,14 +62283,14 @@ class oQ {
|
|
|
62276
62283
|
this.videoPool.clear(), this.extractionCanvas = null, this.extractionContext = null;
|
|
62277
62284
|
}
|
|
62278
62285
|
}
|
|
62279
|
-
const
|
|
62280
|
-
function
|
|
62286
|
+
const uQ = 150, cQ = 0.7;
|
|
62287
|
+
function fQ(e) {
|
|
62281
62288
|
const { container: t, onResize: i, onResizeEnd: r } = e, n = document.createElement("div");
|
|
62282
62289
|
n.className = "ss-timeline-divider";
|
|
62283
62290
|
let s = 0, a = 0;
|
|
62284
62291
|
function o(d) {
|
|
62285
|
-
const h = window.innerHeight *
|
|
62286
|
-
return Math.max(
|
|
62292
|
+
const h = window.innerHeight * cQ;
|
|
62293
|
+
return Math.max(uQ, Math.min(h, d));
|
|
62287
62294
|
}
|
|
62288
62295
|
function l(d) {
|
|
62289
62296
|
const h = s - d.clientY, m = o(a + h);
|
|
@@ -62305,7 +62312,7 @@ function cQ(e) {
|
|
|
62305
62312
|
}
|
|
62306
62313
|
};
|
|
62307
62314
|
}
|
|
62308
|
-
class
|
|
62315
|
+
class dQ {
|
|
62309
62316
|
constructor(t, i = {}) {
|
|
62310
62317
|
this.edit = t, this.viewport = {
|
|
62311
62318
|
scrollX: 0,
|
|
@@ -62460,16 +62467,16 @@ class fQ {
|
|
|
62460
62467
|
};
|
|
62461
62468
|
}
|
|
62462
62469
|
}
|
|
62463
|
-
const
|
|
62464
|
-
class
|
|
62470
|
+
const hQ = 10;
|
|
62471
|
+
class oet {
|
|
62465
62472
|
constructor(t, i, r) {
|
|
62466
|
-
this.edit = t, this.element = document.createElement("div"), this.element.className = "ss-html-timeline", this.container = i, this.options = { resizable: !0, ...r }, this.element.style.width = "100%", this.element.style.height = "100%", this.stateManager = new
|
|
62473
|
+
this.edit = t, this.element = document.createElement("div"), this.element.className = "ss-html-timeline", this.container = i, this.options = { resizable: !0, ...r }, this.element.style.width = "100%", this.element.style.height = "100%", this.stateManager = new dQ(t, {
|
|
62467
62474
|
width: 800,
|
|
62468
62475
|
// placeholder, updated in load()
|
|
62469
62476
|
height: 300,
|
|
62470
62477
|
// placeholder, updated in load()
|
|
62471
62478
|
pixelsPerSecond: aG
|
|
62472
|
-
}), this.thumbnailGenerator = new
|
|
62479
|
+
}), this.thumbnailGenerator = new lQ(), this.mediaThumbnailRenderer = new oQ(this.thumbnailGenerator, () => {
|
|
62473
62480
|
this.thumbnailRenderPending || (this.thumbnailRenderPending = !0, requestAnimationFrame(() => {
|
|
62474
62481
|
this.thumbnailRenderPending = !1, this.requestRender();
|
|
62475
62482
|
}));
|
|
@@ -62588,7 +62595,7 @@ class aet {
|
|
|
62588
62595
|
}
|
|
62589
62596
|
// ========== Component Building ==========
|
|
62590
62597
|
buildComponents() {
|
|
62591
|
-
this.element.innerHTML = "", this.options.resizable && (this.resizeHandle =
|
|
62598
|
+
this.element.innerHTML = "", this.options.resizable && (this.resizeHandle = fQ({
|
|
62592
62599
|
container: this.container,
|
|
62593
62600
|
onResize: () => this.resize(),
|
|
62594
62601
|
onResizeEnd: (i) => {
|
|
@@ -62596,7 +62603,7 @@ class aet {
|
|
|
62596
62603
|
}
|
|
62597
62604
|
}), this.element.appendChild(this.resizeHandle.element));
|
|
62598
62605
|
const t = this.stateManager.getViewport();
|
|
62599
|
-
this.toolbar = new
|
|
62606
|
+
this.toolbar = new $J(
|
|
62600
62607
|
{
|
|
62601
62608
|
onPlay: () => this.edit.play(),
|
|
62602
62609
|
onPause: () => this.edit.pause(),
|
|
@@ -62605,12 +62612,12 @@ class aet {
|
|
|
62605
62612
|
onZoomChange: (i) => this.setZoom(i)
|
|
62606
62613
|
},
|
|
62607
62614
|
t.pixelsPerSecond
|
|
62608
|
-
), this.element.appendChild(this.toolbar.element), this.rulerTracksWrapper = document.createElement("div"), this.rulerTracksWrapper.className = "ss-ruler-tracks-wrapper", this.element.appendChild(this.rulerTracksWrapper), this.ruler = new
|
|
62615
|
+
), this.element.appendChild(this.toolbar.element), this.rulerTracksWrapper = document.createElement("div"), this.rulerTracksWrapper.className = "ss-ruler-tracks-wrapper", this.element.appendChild(this.rulerTracksWrapper), this.ruler = new LJ({
|
|
62609
62616
|
onSeek: (i) => this.edit.seek(i),
|
|
62610
62617
|
onWheel: (i) => {
|
|
62611
62618
|
this.trackList && (this.trackList.element.scrollTop += i.deltaY, this.trackList.element.scrollLeft += i.deltaX);
|
|
62612
62619
|
}
|
|
62613
|
-
}), this.rulerTracksWrapper.appendChild(this.ruler.element), this.trackList = new
|
|
62620
|
+
}), this.rulerTracksWrapper.appendChild(this.ruler.element), this.trackList = new WJ({
|
|
62614
62621
|
showBadges: !0,
|
|
62615
62622
|
onClipSelect: (i, r, n) => {
|
|
62616
62623
|
this.stateManager.selectClip(i, r, n), this.requestRender();
|
|
@@ -62622,7 +62629,7 @@ class aet {
|
|
|
62622
62629
|
onMaskClick: (i, r) => {
|
|
62623
62630
|
const n = this.edit.getResolvedClip(i, r), s = this.edit.getClipId(i, r), a = this.stateManager.findAttachedLuma(i, r);
|
|
62624
62631
|
if (!a || !n || !s) return;
|
|
62625
|
-
const o = n.start, l = i + 1, c = this.edit.getResolvedClip(a.trackIndex, a.clipIndex)?.asset?.src || "", f = JE(c), d = new
|
|
62632
|
+
const o = n.start, l = i + 1, c = this.edit.getResolvedClip(a.trackIndex, a.clipIndex)?.asset?.src || "", f = JE(c), d = new PJ(l, a.trackIndex, a.clipIndex, o, f);
|
|
62626
62633
|
this.edit.executeEditCommand(d), this.stateManager.clearLumaVisibilityForClipId(s), this.requestRender();
|
|
62627
62634
|
},
|
|
62628
62635
|
isLumaVisibleForEditing: (i, r) => this.stateManager.isLumaVisibleForEditing(i, r),
|
|
@@ -62634,12 +62641,12 @@ class aet {
|
|
|
62634
62641
|
}
|
|
62635
62642
|
}), this.trackList.setScrollHandler((i, r) => {
|
|
62636
62643
|
this.stateManager.setScroll(i, r), this.ruler?.syncScroll(i), this.playhead && (this.playhead.element.style.transform = `translateX(${-i}px)`, this.playhead.setScrollX(i));
|
|
62637
|
-
}), this.rulerTracksWrapper.appendChild(this.trackList.element), this.playhead = new
|
|
62644
|
+
}), this.rulerTracksWrapper.appendChild(this.trackList.element), this.playhead = new VJ({
|
|
62638
62645
|
onSeek: (i) => this.edit.seek(i)
|
|
62639
|
-
}), this.playhead.setPixelsPerSecond(t.pixelsPerSecond), this.rulerTracksWrapper.appendChild(this.playhead.element), this.playheadGhost = document.createElement("div"), this.playheadGhost.className = "ss-playhead-ghost", this.rulerTracksWrapper.appendChild(this.playheadGhost), this.rulerTracksWrapper.addEventListener("mousemove", this.handleRulerMouseMove), this.feedbackLayer = document.createElement("div"), this.feedbackLayer.className = "ss-feedback-layer", this.rulerTracksWrapper.appendChild(this.feedbackLayer), this.interactionController = new
|
|
62640
|
-
snapThreshold:
|
|
62646
|
+
}), this.playhead.setPixelsPerSecond(t.pixelsPerSecond), this.rulerTracksWrapper.appendChild(this.playhead.element), this.playheadGhost = document.createElement("div"), this.playheadGhost.className = "ss-playhead-ghost", this.rulerTracksWrapper.appendChild(this.playheadGhost), this.rulerTracksWrapper.addEventListener("mousemove", this.handleRulerMouseMove), this.feedbackLayer = document.createElement("div"), this.feedbackLayer.className = "ss-feedback-layer", this.rulerTracksWrapper.appendChild(this.feedbackLayer), this.interactionController = new sQ(this.edit, this.stateManager, this.trackList, this.trackList.element, this.feedbackLayer, {
|
|
62647
|
+
snapThreshold: hQ,
|
|
62641
62648
|
onRequestRender: () => this.requestRender()
|
|
62642
|
-
}), this.interactionController.mount(), this.clipContextMenu = new
|
|
62649
|
+
}), this.interactionController.mount(), this.clipContextMenu = new RJ(this.edit, this.trackList.element), this.clipContextMenu.mount(), this.stateManager.setInteractionQuery({
|
|
62643
62650
|
isDragging: (i, r) => this.interactionController?.isDragging(i, r) ?? !1,
|
|
62644
62651
|
isResizing: (i, r) => this.interactionController?.isResizing(i, r) ?? !1
|
|
62645
62652
|
});
|
|
@@ -62752,7 +62759,7 @@ class f4 {
|
|
|
62752
62759
|
this.storedPreviousBinding = void 0;
|
|
62753
62760
|
}
|
|
62754
62761
|
}
|
|
62755
|
-
function
|
|
62762
|
+
function pQ(e) {
|
|
62756
62763
|
if (typeof e != "object" || e === null) return !1;
|
|
62757
62764
|
const t = e;
|
|
62758
62765
|
return t.type === "text" && (!t.text || t.text.trim() === "");
|
|
@@ -62760,7 +62767,7 @@ function hQ(e) {
|
|
|
62760
62767
|
function d4(e) {
|
|
62761
62768
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
62762
62769
|
}
|
|
62763
|
-
function
|
|
62770
|
+
function mQ(e) {
|
|
62764
62771
|
const t = e.width ?? 100, i = e.height ?? 100, r = d4(e.background?.color ?? "#000000"), n = e.background?.opacity ?? 1, s = e.background?.borderRadius ?? 0, a = [`width="${t}"`, `height="${i}"`, `fill="${r}"`];
|
|
62765
62772
|
if (n !== 1 && a.push(`fill-opacity="${n}"`), s > 0 && a.push(`rx="${s}"`, `ry="${s}"`), e.stroke?.width && e.stroke.width > 0) {
|
|
62766
62773
|
const o = d4(e.stroke.color ?? "#000000");
|
|
@@ -62768,8 +62775,8 @@ function pQ(e) {
|
|
|
62768
62775
|
}
|
|
62769
62776
|
return `<svg viewBox="0 0 ${t} ${i}" xmlns="http://www.w3.org/2000/svg"><rect ${a.join(" ")}/></svg>`;
|
|
62770
62777
|
}
|
|
62771
|
-
function
|
|
62772
|
-
const t = e.asset, i =
|
|
62778
|
+
function gQ(e) {
|
|
62779
|
+
const t = e.asset, i = mQ(t), r = {
|
|
62773
62780
|
...e,
|
|
62774
62781
|
asset: {
|
|
62775
62782
|
type: "svg",
|
|
@@ -62778,7 +62785,7 @@ function mQ(e) {
|
|
|
62778
62785
|
};
|
|
62779
62786
|
return t.width !== void 0 && r.width === void 0 && (r.width = t.width), t.height !== void 0 && r.height === void 0 && (r.height = t.height), r;
|
|
62780
62787
|
}
|
|
62781
|
-
class
|
|
62788
|
+
class yQ extends Ao {
|
|
62782
62789
|
// Recursion guard for merge field updates (prevents stack overflow)
|
|
62783
62790
|
isUpdatingMergeFields = !1;
|
|
62784
62791
|
// ─── Merge Field API ───────────────────────────────────────────────────────
|
|
@@ -62931,7 +62938,7 @@ class gQ extends Ao {
|
|
|
62931
62938
|
if (a.clips)
|
|
62932
62939
|
for (let o = 0; o < a.clips.length; o += 1) {
|
|
62933
62940
|
const l = a.clips[o], u = l.asset;
|
|
62934
|
-
u?.type === "text" && (
|
|
62941
|
+
u?.type === "text" && (pQ(u) ? (a.clips[o] = gQ(l), n += 1) : (a.clips[o] = this.convertTextClipToRichText(l), r += 1));
|
|
62935
62942
|
}
|
|
62936
62943
|
}
|
|
62937
62944
|
return console.log("CONVERTED TEMPLATE - Copy the JSON below:"), console.log(JSON.stringify(i, null, " ")), { richText: r, svg: n };
|
|
@@ -63047,7 +63054,7 @@ class gQ extends Ao {
|
|
|
63047
63054
|
}
|
|
63048
63055
|
}
|
|
63049
63056
|
}
|
|
63050
|
-
class
|
|
63057
|
+
class bQ {
|
|
63051
63058
|
container = null;
|
|
63052
63059
|
buttonsContainer = null;
|
|
63053
63060
|
ui;
|
|
@@ -63094,13 +63101,13 @@ class yQ {
|
|
|
63094
63101
|
this.dragResult?.dispose(), this.dragResult = null, this.unsubscribe?.(), this.unsubscribe = null, this.container?.remove(), this.container = null, this.buttonsContainer = null;
|
|
63095
63102
|
}
|
|
63096
63103
|
}
|
|
63097
|
-
const
|
|
63104
|
+
const vQ = [
|
|
63098
63105
|
{ label: "1920 × 1080", sublabel: "16:9 • 1080p", width: 1920, height: 1080 },
|
|
63099
63106
|
{ label: "1280 × 720", sublabel: "16:9 • 720p", width: 1280, height: 720 },
|
|
63100
63107
|
{ label: "1080 × 1920", sublabel: "9:16 • Vertical", width: 1080, height: 1920 },
|
|
63101
63108
|
{ label: "1080 × 1080", sublabel: "1:1 • Square", width: 1080, height: 1080 },
|
|
63102
63109
|
{ label: "1080 × 1350", sublabel: "4:5 • Portrait", width: 1080, height: 1350 }
|
|
63103
|
-
],
|
|
63110
|
+
], wQ = [24, 25, 30, 60], xQ = [
|
|
63104
63111
|
"#000000",
|
|
63105
63112
|
"#FFFFFF",
|
|
63106
63113
|
"#1a1a1a",
|
|
@@ -63118,7 +63125,7 @@ const bQ = [
|
|
|
63118
63125
|
check: '<svg class="checkmark" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>',
|
|
63119
63126
|
variables: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9.5 5H9a2 2 0 0 0-2 2v2c0 1-.6 3-3 3 1 0 3 .6 3 3v2a2 2 0 0 0 2 2h.5m5-14h.5a2 2 0 0 1 2 2v2c0 1 .6 3 3 3-1 0-3 .6-3 3v2a2 2 0 0 1-2 2h-.5"/></svg>'
|
|
63120
63127
|
};
|
|
63121
|
-
class
|
|
63128
|
+
class CQ {
|
|
63122
63129
|
container = null;
|
|
63123
63130
|
edit = null;
|
|
63124
63131
|
// Current state
|
|
@@ -63188,7 +63195,7 @@ class xQ {
|
|
|
63188
63195
|
</button>
|
|
63189
63196
|
<div class="ss-canvas-toolbar-popup" data-popup="resolution">
|
|
63190
63197
|
<div class="ss-canvas-toolbar-popup-header">Presets</div>
|
|
63191
|
-
${
|
|
63198
|
+
${vQ.map(
|
|
63192
63199
|
(r) => `
|
|
63193
63200
|
<div class="ss-canvas-toolbar-popup-item" data-width="${r.width}" data-height="${r.height}">
|
|
63194
63201
|
<div class="ss-canvas-toolbar-popup-item-label">
|
|
@@ -63221,7 +63228,7 @@ class xQ {
|
|
|
63221
63228
|
<input type="color" class="ss-canvas-toolbar-color-input" data-color-input value="${this.currentBgColor}" />
|
|
63222
63229
|
</div>
|
|
63223
63230
|
<div class="ss-canvas-toolbar-color-swatches">
|
|
63224
|
-
${
|
|
63231
|
+
${xQ.map(
|
|
63225
63232
|
(r) => `
|
|
63226
63233
|
<div class="ss-canvas-toolbar-color-swatch" data-swatch-color="${r}" style="background: ${r}"></div>
|
|
63227
63234
|
`
|
|
@@ -63238,7 +63245,7 @@ class xQ {
|
|
|
63238
63245
|
<span class="ss-canvas-toolbar-fps-label" data-fps-label>fps</span>
|
|
63239
63246
|
</button>
|
|
63240
63247
|
<div class="ss-canvas-toolbar-popup" data-popup="fps">
|
|
63241
|
-
${
|
|
63248
|
+
${wQ.map(
|
|
63242
63249
|
(r) => `
|
|
63243
63250
|
<div class="ss-canvas-toolbar-popup-item" data-fps="${r}">
|
|
63244
63251
|
<span>${r} fps</span>
|
|
@@ -63441,7 +63448,7 @@ class xQ {
|
|
|
63441
63448
|
this.dragResult?.dispose(), this.dragResult = null, this.clickOutsideHandler && (document.removeEventListener("click", this.clickOutsideHandler), this.clickOutsideHandler = null), this.container?.remove(), this.container = null, this.resolutionPopup = null, this.backgroundPopup = null, this.fpsPopup = null, this.variablesPopup = null, this.resolutionBtn = null, this.backgroundBtn = null, this.fpsBtn = null, this.variablesBtn = null, this.variablesList = null, this.variablesEmpty = null, this.resolutionLabel = null, this.fpsLabel = null, this.bgColorDot = null, this.customWidthInput = null, this.customHeightInput = null, this.colorInput = null, this.resolutionChangeCallback = null, this.fpsChangeCallback = null, this.backgroundChangeCallback = null;
|
|
63442
63449
|
}
|
|
63443
63450
|
}
|
|
63444
|
-
class
|
|
63451
|
+
class kQ {
|
|
63445
63452
|
bindings = [];
|
|
63446
63453
|
/**
|
|
63447
63454
|
* Register an event listener on a single element.
|
|
@@ -63496,7 +63503,7 @@ class CQ {
|
|
|
63496
63503
|
}
|
|
63497
63504
|
class ea {
|
|
63498
63505
|
constructor(t = {}) {
|
|
63499
|
-
this.config = t, this.events = new
|
|
63506
|
+
this.config = t, this.events = new kQ();
|
|
63500
63507
|
}
|
|
63501
63508
|
container = null;
|
|
63502
63509
|
events;
|
|
@@ -63578,7 +63585,7 @@ class ea {
|
|
|
63578
63585
|
t ?? this.container?.style.display === "none" ? this.show() : this.hide();
|
|
63579
63586
|
}
|
|
63580
63587
|
}
|
|
63581
|
-
const
|
|
63588
|
+
const _Q = [
|
|
63582
63589
|
{
|
|
63583
63590
|
id: "manual",
|
|
63584
63591
|
icon: '<path d="M4 3v8l5-4-5-4z" fill="currentColor" stroke="none"/><path d="M10 3v8"/>',
|
|
@@ -63589,7 +63596,7 @@ const kQ = [
|
|
|
63589
63596
|
icon: '<path d="M3 7h3M8 7h3"/><circle cx="7" cy="7" r="2" fill="none"/>',
|
|
63590
63597
|
tooltip: "Auto: After previous clip"
|
|
63591
63598
|
}
|
|
63592
|
-
],
|
|
63599
|
+
], SQ = [
|
|
63593
63600
|
{
|
|
63594
63601
|
id: "manual",
|
|
63595
63602
|
icon: '<path d="M2 5h10M2 7h7M2 9h10"/>',
|
|
@@ -63623,7 +63630,7 @@ class h4 extends ea {
|
|
|
63623
63630
|
// Merge field bound state
|
|
63624
63631
|
mergeFieldName = null;
|
|
63625
63632
|
constructor(t) {
|
|
63626
|
-
super({ className: "ss-timing-control", attributes: { "data-type": t } }), this.type = t, this.modes = t === "start" ?
|
|
63633
|
+
super({ className: "ss-timing-control", attributes: { "data-type": t } }), this.type = t, this.modes = t === "start" ? _Q : SQ, this.state = { mode: "manual", value: t === "start" ? 0 : 3e3 };
|
|
63627
63634
|
}
|
|
63628
63635
|
render() {
|
|
63629
63636
|
const t = this.modes[0], i = this.type === "start" ? "START" : "LENGTH";
|
|
@@ -63960,7 +63967,7 @@ class sm extends ea {
|
|
|
63960
63967
|
super.dispose(), this.bindCallbacks = [], this.clearCallbacks = [];
|
|
63961
63968
|
}
|
|
63962
63969
|
}
|
|
63963
|
-
class
|
|
63970
|
+
class EQ extends Ga {
|
|
63964
63971
|
// Timing controls
|
|
63965
63972
|
startControl = null;
|
|
63966
63973
|
lengthControl = null;
|
|
@@ -64374,7 +64381,7 @@ class rn extends ea {
|
|
|
64374
64381
|
return { Left: "←", Right: "→", Up: "↑", Down: "↓" }[t] ?? "";
|
|
64375
64382
|
}
|
|
64376
64383
|
}
|
|
64377
|
-
const
|
|
64384
|
+
const AQ = (e) => typeof structuredClone == "function" ? structuredClone(e) : JSON.parse(JSON.stringify(e));
|
|
64378
64385
|
class fc {
|
|
64379
64386
|
sessions = /* @__PURE__ */ new Map();
|
|
64380
64387
|
/**
|
|
@@ -64387,7 +64394,7 @@ class fc {
|
|
|
64387
64394
|
start(t, i, r) {
|
|
64388
64395
|
this.sessions.set(t, {
|
|
64389
64396
|
clipId: i,
|
|
64390
|
-
initialState:
|
|
64397
|
+
initialState: AQ(r),
|
|
64391
64398
|
startTime: Date.now()
|
|
64392
64399
|
});
|
|
64393
64400
|
}
|
|
@@ -64433,7 +64440,7 @@ class fc {
|
|
|
64433
64440
|
return this.sessions.has(t);
|
|
64434
64441
|
}
|
|
64435
64442
|
}
|
|
64436
|
-
class
|
|
64443
|
+
class TQ extends ea {
|
|
64437
64444
|
constructor(t) {
|
|
64438
64445
|
super({ className: "ss-scrollable-list", ...t }), this.listConfig = t, this.groups = t.groups, this.height = t.height ?? 300, this.selectedValue = t.selectedValue;
|
|
64439
64446
|
}
|
|
@@ -66449,7 +66456,7 @@ class rA {
|
|
|
66449
66456
|
this.colorThrottle.cancel(), this.highlightThrottle.cancel(), this.colorInput?.removeEventListener("input", this.handleColorInputChange), this.colorOpacitySlider?.removeEventListener("input", this.handleColorOpacityInput), this.colorOpacitySlider?.removeEventListener("change", this.handleColorOpacityChange), this.highlightToggle?.removeEventListener("change", this.handleHighlightToggle), this.highlightColorInput?.removeEventListener("input", this.handleHighlightInputChange), this.container?.remove(), this.container = null, this.colorTab = null, this.gradientTab = null, this.colorContent = null, this.gradientContent = null, this.colorInput = null, this.colorOpacitySlider = null, this.colorOpacityValue = null, this.highlightColorInput = null, this.highlightToggle = null, this.onColorChange = null;
|
|
66450
66457
|
}
|
|
66451
66458
|
}
|
|
66452
|
-
class
|
|
66459
|
+
class IQ {
|
|
66453
66460
|
container = null;
|
|
66454
66461
|
enableCheckbox = null;
|
|
66455
66462
|
colorInput = null;
|
|
@@ -66582,8 +66589,8 @@ class TQ {
|
|
|
66582
66589
|
this.abortController.abort(), this.enableCheckbox && (this.enableCheckbox.removeEventListener("pointerdown", this.handleEnableInteractionStart), this.enableCheckbox.removeEventListener("change", this.handleEnableChange), this.enableCheckbox.removeEventListener("blur", this.handleEnableInteractionEnd)), this.container?.remove(), this.container = null, this.enableCheckbox = null, this.colorInput = null, this.opacitySlider = null, this.opacityValue = null, this.onColorChange = null, this.dragStartCallback = null, this.dragEndCallback = null;
|
|
66583
66590
|
}
|
|
66584
66591
|
}
|
|
66585
|
-
const
|
|
66586
|
-
class
|
|
66592
|
+
const DQ = 3, PQ = "100px";
|
|
66593
|
+
class FQ {
|
|
66587
66594
|
loadingQueue = [];
|
|
66588
66595
|
loadedFonts = /* @__PURE__ */ new Set();
|
|
66589
66596
|
pendingFonts = /* @__PURE__ */ new Set();
|
|
@@ -66613,7 +66620,7 @@ class PQ {
|
|
|
66613
66620
|
s && this.enqueue(s);
|
|
66614
66621
|
}
|
|
66615
66622
|
},
|
|
66616
|
-
{ root: t, rootMargin:
|
|
66623
|
+
{ root: t, rootMargin: PQ }
|
|
66617
66624
|
);
|
|
66618
66625
|
}
|
|
66619
66626
|
/**
|
|
@@ -66671,7 +66678,7 @@ class PQ {
|
|
|
66671
66678
|
* Process the loading queue with concurrency limit.
|
|
66672
66679
|
*/
|
|
66673
66680
|
async processQueue() {
|
|
66674
|
-
for (; this.activeLoads <
|
|
66681
|
+
for (; this.activeLoads < DQ && this.loadingQueue.length > 0; ) {
|
|
66675
66682
|
const t = this.loadingQueue.shift();
|
|
66676
66683
|
t && (this.activeLoads += 1, this.loadFont(t).catch(() => {
|
|
66677
66684
|
this.pendingFonts.delete(t);
|
|
@@ -66720,10 +66727,10 @@ class PQ {
|
|
|
66720
66727
|
}
|
|
66721
66728
|
let Q0 = null;
|
|
66722
66729
|
function nA() {
|
|
66723
|
-
return Q0 || (Q0 = new
|
|
66730
|
+
return Q0 || (Q0 = new FQ()), Q0;
|
|
66724
66731
|
}
|
|
66725
66732
|
const ga = 40, g4 = 5;
|
|
66726
|
-
class
|
|
66733
|
+
class BQ {
|
|
66727
66734
|
container;
|
|
66728
66735
|
viewport;
|
|
66729
66736
|
content;
|
|
@@ -66858,8 +66865,8 @@ class FQ {
|
|
|
66858
66865
|
this.items.clear(), this.viewport.remove();
|
|
66859
66866
|
}
|
|
66860
66867
|
}
|
|
66861
|
-
const y4 = "ss-recent-fonts", b4 = 6, v4 = /* @__PURE__ */ new Set(["Material Icons", "Material Symbols Outlined", "Material Symbols Rounded", "Material Symbols Sharp"]),
|
|
66862
|
-
class
|
|
66868
|
+
const y4 = "ss-recent-fonts", b4 = 6, v4 = /* @__PURE__ */ new Set(["Material Icons", "Material Symbols Outlined", "Material Symbols Rounded", "Material Symbols Sharp"]), NQ = (e) => e.includes("fonts.gstatic.com"), MQ = (e) => e.includes("templates.shotstack.io"), zQ = (e) => !NQ(e) && !MQ(e), w4 = (e) => (e.split("/").pop() ?? "").replace(/\.(ttf|otf|woff|woff2)$/i, "").replace(/-(Bold|Light|Regular|Italic|Medium|SemiBold|Black|Thin|ExtraLight|ExtraBold|Heavy)$/i, "");
|
|
66869
|
+
class OQ {
|
|
66863
66870
|
element;
|
|
66864
66871
|
searchInput;
|
|
66865
66872
|
categoryTabs;
|
|
@@ -66878,7 +66885,7 @@ class zQ {
|
|
|
66878
66885
|
fontMetadata;
|
|
66879
66886
|
fontLoader = nA();
|
|
66880
66887
|
constructor(t) {
|
|
66881
|
-
this.selectedFilename = t.selectedFilename, this.onSelect = t.onSelect, this.onClose = t.onClose, this.timelineFonts = t.timelineFonts ?? [], this.fontMetadata = t.fontMetadata, this.loadRecentFonts(), this.element = this.createElement(), this.searchInput = this.element.querySelector(".ss-font-picker-search-input"), this.categoryTabs = this.element.querySelector(".ss-font-picker-categories"), this.recentSection = this.element.querySelector(".ss-font-picker-recent"), this.customSection = this.element.querySelector(".ss-font-picker-custom"), this.customDivider = this.element.querySelector(".ss-font-picker-custom-divider"), this.listContainer = this.element.querySelector(".ss-font-picker-list"), this.virtualList = new
|
|
66888
|
+
this.selectedFilename = t.selectedFilename, this.onSelect = t.onSelect, this.onClose = t.onClose, this.timelineFonts = t.timelineFonts ?? [], this.fontMetadata = t.fontMetadata, this.loadRecentFonts(), this.element = this.createElement(), this.searchInput = this.element.querySelector(".ss-font-picker-search-input"), this.categoryTabs = this.element.querySelector(".ss-font-picker-categories"), this.recentSection = this.element.querySelector(".ss-font-picker-recent"), this.customSection = this.element.querySelector(".ss-font-picker-custom"), this.customDivider = this.element.querySelector(".ss-font-picker-custom-divider"), this.listContainer = this.element.querySelector(".ss-font-picker-list"), this.virtualList = new BQ({
|
|
66882
66889
|
container: this.listContainer,
|
|
66883
66890
|
selectedFilename: this.selectedFilename,
|
|
66884
66891
|
onSelect: (i) => this.handleFontSelect(i)
|
|
@@ -67040,7 +67047,7 @@ class zQ {
|
|
|
67040
67047
|
* Shows non-Google fonts from timeline.fonts.
|
|
67041
67048
|
*/
|
|
67042
67049
|
updateCustomSection(t) {
|
|
67043
|
-
let i = this.timelineFonts.filter((n) =>
|
|
67050
|
+
let i = this.timelineFonts.filter((n) => zQ(n.src));
|
|
67044
67051
|
if (t) {
|
|
67045
67052
|
const n = t.toLowerCase().trim();
|
|
67046
67053
|
i = i.filter((s) => this.resolveCustomFontName(s.src).toLowerCase().includes(n));
|
|
@@ -67390,20 +67397,24 @@ class Aa extends Ga {
|
|
|
67390
67397
|
style: {
|
|
67391
67398
|
...o.style || {},
|
|
67392
67399
|
letterSpacing: n.letterSpacing,
|
|
67393
|
-
wordSpacing: n.wordSpacing,
|
|
67400
|
+
...this.supportsWordSpacing() ? { wordSpacing: n.wordSpacing } : {},
|
|
67394
67401
|
lineHeight: n.lineHeight
|
|
67395
67402
|
}
|
|
67396
67403
|
};
|
|
67397
67404
|
this.edit.updateClipInDocument(a, { asset: l }), this.edit.resolveClip(a);
|
|
67398
67405
|
} else
|
|
67399
67406
|
this.updateClipProperty({
|
|
67400
|
-
style: {
|
|
67407
|
+
style: {
|
|
67408
|
+
letterSpacing: n.letterSpacing,
|
|
67409
|
+
...this.supportsWordSpacing() ? { wordSpacing: n.wordSpacing } : {},
|
|
67410
|
+
lineHeight: n.lineHeight
|
|
67411
|
+
}
|
|
67401
67412
|
});
|
|
67402
67413
|
}), this.spacingPanel.onDragEnd(() => {
|
|
67403
67414
|
const n = this.dragManager.end("spacing-panel");
|
|
67404
67415
|
if (!n || !this.spacingPanel) return;
|
|
67405
67416
|
const { clipId: s } = n, a = this.spacingPanel.getState(), o = structuredClone(n.initialState);
|
|
67406
|
-
o.asset && (o.asset.type === "rich-text" || o.asset.type === "rich-caption") && o.asset.style && (o.asset.style.letterSpacing = a.letterSpacing, o.asset.style.wordSpacing = a.wordSpacing, o.asset.style.lineHeight = a.lineHeight), this.edit.commitClipUpdate(s, n.initialState, o);
|
|
67417
|
+
o.asset && (o.asset.type === "rich-text" || o.asset.type === "rich-caption") && o.asset.style && (o.asset.style.letterSpacing = a.letterSpacing, this.supportsWordSpacing() && (o.asset.style.wordSpacing = a.wordSpacing), o.asset.style.lineHeight = a.lineHeight), this.edit.commitClipUpdate(s, n.initialState, o);
|
|
67407
67418
|
}), this.spacingPanel.mount(r)), this.animationPopup = this.container.querySelector("[data-animation-popup]"), this.animationDurationSlider = this.container.querySelector("[data-animation-duration]"), this.animationDurationValue = this.container.querySelector("[data-animation-duration-value]"), this.animationStyleSection = this.container.querySelector("[data-animation-style-section]"), this.animationDirectionSection = this.container.querySelector("[data-animation-direction-section]"), this.transitionPopup = this.container.querySelector("[data-transition-popup]"), this.effectPopup = this.container.querySelector("[data-effect-popup]"), this.transitionPopup && (this.transitionPanel = new rn(), this.transitionPanel.onChange(() => {
|
|
67408
67419
|
const n = this.transitionPanel?.getClipValue();
|
|
67409
67420
|
this.applyClipUpdate({ transition: n });
|
|
@@ -67528,7 +67539,7 @@ class Aa extends Ga {
|
|
|
67528
67539
|
this.edit.commitClipUpdate(a, s.initialState, l);
|
|
67529
67540
|
}), this.stylePanel.mount(this.stylePopup);
|
|
67530
67541
|
const n = this.stylePanel.getFillColorPickerMount();
|
|
67531
|
-
n && (this.backgroundColorPicker = new
|
|
67542
|
+
n && (this.backgroundColorPicker = new IQ(), this.backgroundColorPicker.mount(n), this.backgroundColorPicker.onDragStart((s) => {
|
|
67532
67543
|
const a = this.captureClipState();
|
|
67533
67544
|
a && this.dragManager.start(s, a.clipId, a.initialState);
|
|
67534
67545
|
}), this.backgroundColorPicker.onChange((s, a, o, l) => {
|
|
@@ -67687,6 +67698,13 @@ class Aa extends Ga {
|
|
|
67687
67698
|
createSpacingPanel() {
|
|
67688
67699
|
return new g1();
|
|
67689
67700
|
}
|
|
67701
|
+
/**
|
|
67702
|
+
* Whether this toolbar's asset type accepts `style.wordSpacing`. Rich-caption
|
|
67703
|
+
* does not — its schema rejects the key, so it must never be written.
|
|
67704
|
+
*/
|
|
67705
|
+
supportsWordSpacing() {
|
|
67706
|
+
return !0;
|
|
67707
|
+
}
|
|
67690
67708
|
createFontColorPicker() {
|
|
67691
67709
|
return new rA();
|
|
67692
67710
|
}
|
|
@@ -67889,7 +67907,7 @@ class Aa extends Ga {
|
|
|
67889
67907
|
if (!this.fontPopup) return;
|
|
67890
67908
|
this.fontPicker && (this.fontPicker.destroy(), this.fontPicker = null);
|
|
67891
67909
|
const i = this.getCurrentAsset()?.font?.family, n = this.edit.getDocument()?.getFonts() ?? [];
|
|
67892
|
-
this.fontPicker = new
|
|
67910
|
+
this.fontPicker = new OQ({
|
|
67893
67911
|
selectedFilename: i,
|
|
67894
67912
|
timelineFonts: n,
|
|
67895
67913
|
fontMetadata: this.edit.getFontMetadata(),
|
|
@@ -68166,7 +68184,7 @@ class Aa extends Ga {
|
|
|
68166
68184
|
this.dragManager.clear(), this.lastSyncedClipId = null, this.unsubFontCapabilities?.(), this.unsubFontCapabilities = null, this.unsubMergeFieldChanged?.(), this.unsubMergeFieldChanged = null, this.unsubCanvasDoubleClick?.(), this.unsubCanvasDoubleClick = null, this.boundHandleClick && (this.container?.removeEventListener("click", this.boundHandleClick), this.boundHandleClick = null), super.dispose(), this.sizeInput = null, this.sizePopup = null, this.weightPopup = null, this.weightPreview = null, this.fontPopup = null, this.fontPreview = null, this.fontPicker?.destroy(), this.fontPicker = null, this.fontColorPicker?.dispose(), this.fontColorPicker = null, this.fontColorPopup = null, this.colorDisplay = null, this.spacingPopup = null, this.spacingPanel?.dispose(), this.spacingPanel = null, this.stylePopup = null, this.stylePanel?.dispose(), this.stylePanel = null, this.alignIcon = null, this.verticalAlignIcon = null, this.transformBtn = null, this.underlineBtn = null, this.linethroughBtn = null, this.textEditPopup = null, this.textEditArea = null, this.textEditDebounceTimer && (clearTimeout(this.textEditDebounceTimer), this.textEditDebounceTimer = null), this.animationPopup = null, this.animationDurationSlider = null, this.animationDurationValue = null, this.animationStyleSection = null, this.animationDirectionSection = null, this.backgroundColorPicker?.dispose(), this.backgroundColorPicker = null, this.backgroundPopup = null, this.transitionPanel?.dispose(), this.transitionPanel = null, this.transitionPopup = null, this.effectPanel?.dispose(), this.effectPanel = null, this.effectPopup = null, this.mergeFieldManager?.dispose(), this.mergeFieldManager = null;
|
|
68167
68185
|
}
|
|
68168
68186
|
}
|
|
68169
|
-
class
|
|
68187
|
+
class RQ extends Aa {
|
|
68170
68188
|
// Caption popup panels
|
|
68171
68189
|
wordAnimPopup = null;
|
|
68172
68190
|
activeWordPopup = null;
|
|
@@ -68207,7 +68225,10 @@ class OQ extends Aa {
|
|
|
68207
68225
|
return new iA({});
|
|
68208
68226
|
}
|
|
68209
68227
|
createSpacingPanel() {
|
|
68210
|
-
return new g1(
|
|
68228
|
+
return new g1();
|
|
68229
|
+
}
|
|
68230
|
+
supportsWordSpacing() {
|
|
68231
|
+
return !1;
|
|
68211
68232
|
}
|
|
68212
68233
|
createFontColorPicker() {
|
|
68213
68234
|
return new rA({ hideGradient: !0 });
|
|
@@ -68616,16 +68637,16 @@ function x4(e, t, i) {
|
|
|
68616
68637
|
const r = e.x >= -i && e.x <= i, n = e.x >= t.width - i && e.x <= t.width + i, s = e.y >= -i && e.y <= i, a = e.y >= t.height - i && e.y <= t.height + i, o = e.y > i && e.y < t.height - i, l = e.x > i && e.x < t.width - i;
|
|
68617
68638
|
return r && o ? "left" : n && o ? "right" : s && l ? "top" : a && l ? "bottom" : null;
|
|
68618
68639
|
}
|
|
68619
|
-
const
|
|
68620
|
-
function
|
|
68640
|
+
const VQ = ["topLeft", "topRight", "bottomRight", "bottomLeft"];
|
|
68641
|
+
function LQ(e, t, i, r) {
|
|
68621
68642
|
for (let n = 0; n < t.length; n += 1) {
|
|
68622
68643
|
const s = t[n], a = e.x - s.x, o = e.y - s.y, l = Math.sqrt(a * a + o * o);
|
|
68623
68644
|
if (l > i && l < i + r)
|
|
68624
|
-
return
|
|
68645
|
+
return VQ[n];
|
|
68625
68646
|
}
|
|
68626
68647
|
return null;
|
|
68627
68648
|
}
|
|
68628
|
-
function
|
|
68649
|
+
function $Q(e, t, i, r) {
|
|
68629
68650
|
let n = i.width, s = i.height, a = i.offsetX, o = i.offsetY;
|
|
68630
68651
|
const l = r.width || 1, u = r.height || 1;
|
|
68631
68652
|
switch (e) {
|
|
@@ -68644,7 +68665,7 @@ function LQ(e, t, i, r) {
|
|
|
68644
68665
|
}
|
|
68645
68666
|
return { width: n, height: s, offsetX: a, offsetY: o };
|
|
68646
68667
|
}
|
|
68647
|
-
function
|
|
68668
|
+
function UQ(e, t, i, r) {
|
|
68648
68669
|
let n = i.width, s = i.height, a = i.offsetX, o = i.offsetY;
|
|
68649
68670
|
const l = r.width || 1, u = r.height || 1;
|
|
68650
68671
|
switch (e) {
|
|
@@ -68703,16 +68724,16 @@ const Nr = {
|
|
|
68703
68724
|
right: 0,
|
|
68704
68725
|
top: 90,
|
|
68705
68726
|
bottom: 90
|
|
68706
|
-
},
|
|
68707
|
-
function
|
|
68708
|
-
const r = `<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='680 1800 640 620'>${e === 0 ? "" : `<g transform='translate(1002 2110) rotate(${e}) translate(-1002 -2110)'>`}<path d='${
|
|
68727
|
+
}, ZQ = "M1113.142,1956.331C1008.608,1982.71 887.611,2049.487 836.035,2213.487L891.955,2219.403L779,2396L705.496,2199.678L772.745,2206.792C832.051,1999.958 984.143,1921.272 1110.63,1892.641L1107.952,1824.711L1299,1911L1115.34,2012.065L1113.142,1956.331Z", jQ = "M1320,2186L1085,2421L1120,2457L975,2496L1014,2351L1050,2386L1285,2151L1250,2115L1396,2075L1356,2221L1320,2186Z", WQ = "matrix(0.807871,0.707107,-0.807871,0.707107,2111.872433,-206.020386)";
|
|
68728
|
+
function HQ(e) {
|
|
68729
|
+
const r = `<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='680 1800 640 620'>${e === 0 ? "" : `<g transform='translate(1002 2110) rotate(${e}) translate(-1002 -2110)'>`}<path d='${ZQ}' fill='black' stroke='white' stroke-width='33.33'/>${e === 0 ? "" : "</g>"}</svg>`;
|
|
68709
68730
|
return `url("data:image/svg+xml,${encodeURIComponent(r)}") 12 12, auto`;
|
|
68710
68731
|
}
|
|
68711
68732
|
function tp(e) {
|
|
68712
|
-
const t = `<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='905 1940 640 620'><g transform='rotate(${e} 1225 2250)'><g transform='${
|
|
68733
|
+
const t = `<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='905 1940 640 620'><g transform='rotate(${e} 1225 2250)'><g transform='${WQ}'><path d='${jQ}' fill='black' stroke='white' stroke-width='33.33'/></g></g></svg>`;
|
|
68713
68734
|
return `url("data:image/svg+xml,${encodeURIComponent(t)}") 12 12, auto`;
|
|
68714
68735
|
}
|
|
68715
|
-
function
|
|
68736
|
+
function GQ(e, t) {
|
|
68716
68737
|
const i = (Nr.ROTATION_HIT_ZONE + Nr.SCALE_HANDLE_RADIUS) / t;
|
|
68717
68738
|
return {
|
|
68718
68739
|
x: -i,
|
|
@@ -68721,8 +68742,8 @@ function HQ(e, t) {
|
|
|
68721
68742
|
height: e.height + i * 2
|
|
68722
68743
|
};
|
|
68723
68744
|
}
|
|
68724
|
-
const
|
|
68725
|
-
threshold:
|
|
68745
|
+
const qQ = 20, YQ = {
|
|
68746
|
+
threshold: qQ,
|
|
68726
68747
|
snapToCanvas: !0,
|
|
68727
68748
|
snapToClips: !0
|
|
68728
68749
|
};
|
|
@@ -68733,20 +68754,20 @@ function sA(e, t) {
|
|
|
68733
68754
|
y: [s, o, a]
|
|
68734
68755
|
};
|
|
68735
68756
|
}
|
|
68736
|
-
function
|
|
68757
|
+
function XQ(e) {
|
|
68737
68758
|
return {
|
|
68738
68759
|
x: [0, e.width / 2, e.width],
|
|
68739
68760
|
y: [0, e.height / 2, e.height]
|
|
68740
68761
|
};
|
|
68741
68762
|
}
|
|
68742
|
-
function
|
|
68763
|
+
function KQ(e) {
|
|
68743
68764
|
return {
|
|
68744
68765
|
x: [e.left, e.centerX, e.right],
|
|
68745
68766
|
y: [e.top, e.centerY, e.bottom]
|
|
68746
68767
|
};
|
|
68747
68768
|
}
|
|
68748
|
-
function
|
|
68749
|
-
const n = [], s = { ...e }, a = sA(e, t), o =
|
|
68769
|
+
function JQ(e, t, i, r) {
|
|
68770
|
+
const n = [], s = { ...e }, a = sA(e, t), o = XQ(i);
|
|
68750
68771
|
let l = r, u = r;
|
|
68751
68772
|
for (const c of a.x)
|
|
68752
68773
|
for (const f of o.x) {
|
|
@@ -68768,14 +68789,14 @@ function KQ(e, t, i, r) {
|
|
|
68768
68789
|
}
|
|
68769
68790
|
return { position: s, guides: n };
|
|
68770
68791
|
}
|
|
68771
|
-
function
|
|
68792
|
+
function QQ(e, t, i, r) {
|
|
68772
68793
|
const n = [], s = { ...e };
|
|
68773
68794
|
if (i.length === 0)
|
|
68774
68795
|
return { position: s, guides: n };
|
|
68775
68796
|
const a = sA(e, t), o = e.y, l = e.y + t.height, u = e.x, c = e.x + t.width;
|
|
68776
68797
|
let f = r, d = r;
|
|
68777
68798
|
for (const h of i) {
|
|
68778
|
-
const m =
|
|
68799
|
+
const m = KQ(h);
|
|
68779
68800
|
for (const v of a.x)
|
|
68780
68801
|
for (const g of m.x) {
|
|
68781
68802
|
const w = Math.abs(v - g);
|
|
@@ -68807,8 +68828,8 @@ function JQ(e, t, i, r) {
|
|
|
68807
68828
|
}
|
|
68808
68829
|
return { position: s, guides: n };
|
|
68809
68830
|
}
|
|
68810
|
-
function
|
|
68811
|
-
const { clipSize: i, canvasSize: r, otherClips: n, config: s } = t, { threshold: a, snapToCanvas: o, snapToClips: l } = s, u = o ?
|
|
68831
|
+
function ttt(e, t) {
|
|
68832
|
+
const { clipSize: i, canvasSize: r, otherClips: n, config: s } = t, { threshold: a, snapToCanvas: o, snapToClips: l } = s, u = o ? JQ(e, i, r, a) : { position: { ...e }, guides: [] }, c = l && n.length > 0 ? QQ(e, i, n, a) : { position: { ...e }, guides: [] }, f = { position: { ...e }, guides: [] }, d = u.guides.some((g) => g.axis === "x"), h = c.guides.some((g) => g.axis === "x");
|
|
68812
68833
|
if (d && h) {
|
|
68813
68834
|
const g = Math.abs(u.position.x - e.x);
|
|
68814
68835
|
Math.abs(c.position.x - e.x) < g ? (f.position.x = c.position.x, f.guides.push(...c.guides.filter((C) => C.axis === "x"))) : (f.position.x = u.position.x, f.guides.push(...u.guides.filter((C) => C.axis === "x")));
|
|
@@ -68820,8 +68841,8 @@ function QQ(e, t) {
|
|
|
68820
68841
|
} else v ? (f.position.y = c.position.y, f.guides.push(...c.guides.filter((g) => g.axis === "y"))) : m && (f.position.y = u.position.y, f.guides.push(...u.guides.filter((g) => g.axis === "y")));
|
|
68821
68842
|
return f;
|
|
68822
68843
|
}
|
|
68823
|
-
const
|
|
68824
|
-
function
|
|
68844
|
+
const ett = [0, 45, 90, 135, 180, 225, 270, 315], itt = 5;
|
|
68845
|
+
function rtt(e, t = ett, i = itt) {
|
|
68825
68846
|
const r = (e % 360 + 360) % 360;
|
|
68826
68847
|
for (const n of t) {
|
|
68827
68848
|
const s = Math.abs(r - n);
|
|
@@ -68830,12 +68851,12 @@ function itt(e, t = ttt, i = ett) {
|
|
|
68830
68851
|
}
|
|
68831
68852
|
return { angle: e, snapped: !1 };
|
|
68832
68853
|
}
|
|
68833
|
-
function
|
|
68854
|
+
function ntt(e, t) {
|
|
68834
68855
|
return t.filter(
|
|
68835
68856
|
(i) => !(i.left >= e.left && i.right <= e.right && i.top >= e.top && i.bottom <= e.bottom) && !(e.left >= i.left && e.right <= i.right && e.top >= i.top && e.bottom <= i.bottom)
|
|
68836
68857
|
);
|
|
68837
68858
|
}
|
|
68838
|
-
function
|
|
68859
|
+
function stt(e, t, i) {
|
|
68839
68860
|
return {
|
|
68840
68861
|
x: e.x + t.x * (i.x - 1),
|
|
68841
68862
|
y: e.y + t.y * (i.y - 1)
|
|
@@ -68851,21 +68872,21 @@ function _4(e, t) {
|
|
|
68851
68872
|
centerY: e.y + t.height / 2
|
|
68852
68873
|
};
|
|
68853
68874
|
}
|
|
68854
|
-
function
|
|
68875
|
+
function att(e, t, i = [], r = {}) {
|
|
68855
68876
|
return {
|
|
68856
68877
|
clipSize: e,
|
|
68857
68878
|
canvasSize: t,
|
|
68858
68879
|
otherClips: i,
|
|
68859
|
-
config: { ...
|
|
68880
|
+
config: { ...YQ, ...r }
|
|
68860
68881
|
};
|
|
68861
68882
|
}
|
|
68862
|
-
function
|
|
68883
|
+
function ott(e) {
|
|
68863
68884
|
const i = new DOMParser().parseFromString(e, "image/svg+xml");
|
|
68864
68885
|
if (i.querySelector("parsererror")) return !1;
|
|
68865
68886
|
const r = i.querySelector("svg");
|
|
68866
68887
|
return r ? r.querySelectorAll("path, polygon, polyline, circle, ellipse, line, g").length === 0 : !1;
|
|
68867
68888
|
}
|
|
68868
|
-
function
|
|
68889
|
+
function ltt(e, t, i) {
|
|
68869
68890
|
const n = new DOMParser().parseFromString(e, "image/svg+xml");
|
|
68870
68891
|
if (n.querySelector("parsererror"))
|
|
68871
68892
|
return console.warn("[SVG Utils] Invalid SVG markup"), e;
|
|
@@ -68892,14 +68913,14 @@ function ep(e, t, i) {
|
|
|
68892
68913
|
}
|
|
68893
68914
|
return n.setAttribute(t, i), new XMLSerializer().serializeToString(r);
|
|
68894
68915
|
}
|
|
68895
|
-
const
|
|
68896
|
-
class
|
|
68916
|
+
const utt = 20, ctt = 4, ftt = 11, S4 = 6, E4 = 3, dtt = 8, htt = 16755456, ptt = 2;
|
|
68917
|
+
class mtt {
|
|
68897
68918
|
constructor(t) {
|
|
68898
68919
|
this.edit = t, this.container = new K.Container(), this.container.zIndex = 18, this.container.sortableChildren = !0, this.outline = new K.Graphics(), this.handles = /* @__PURE__ */ new Map(), this.edgeHandles = /* @__PURE__ */ new Map(), this.focusContainer = new K.Container(), this.focusContainer.zIndex = 17, this.focusContainer.visible = !1, this.focusOutline = new K.Graphics(), this.focusContainer.addChild(this.focusOutline), this.dimensionContainer = new K.Container(), this.dimensionContainer.zIndex = 20, this.dimensionContainer.visible = !1, this.dimensionBackground = new K.Graphics(), this.dimensionLabel = new K.Text({
|
|
68899
68920
|
text: "",
|
|
68900
68921
|
style: {
|
|
68901
68922
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
68902
|
-
fontSize:
|
|
68923
|
+
fontSize: ftt,
|
|
68903
68924
|
fill: "#ffffff"
|
|
68904
68925
|
}
|
|
68905
68926
|
}), this.dimensionContainer.addChild(this.dimensionBackground), this.dimensionContainer.addChild(this.dimensionLabel), this.onClipSelectedBound = this.onClipSelected.bind(this), this.onSelectionClearedBound = this.onSelectionCleared.bind(this), this.onClipFocusedBound = this.onClipFocused.bind(this), this.onClipBlurredBound = this.onClipBlurred.bind(this), this.onPointerDownBound = this.onPointerDown.bind(this), this.onPointerMoveBound = this.onPointerMove.bind(this), this.onPointerUpBound = this.onPointerUp.bind(this), this.edit.events.on(tt.ClipSelected, this.onClipSelectedBound), this.edit.events.on(tt.SelectionCleared, this.onSelectionClearedBound);
|
|
@@ -69005,7 +69026,7 @@ class ptt {
|
|
|
69005
69026
|
}
|
|
69006
69027
|
this.focusContainer.visible = !0;
|
|
69007
69028
|
const t = this.focusedPlayer.getSize(), i = this.focusedPlayer.getScale(), r = this.edit.getCanvasZoom(), n = i * r;
|
|
69008
|
-
this.focusOutline.clear(), this.focusOutline.strokeStyle = { width:
|
|
69029
|
+
this.focusOutline.clear(), this.focusOutline.strokeStyle = { width: ptt * 2 / n, color: htt, alpha: 0.45 }, this.focusOutline.rect(0, 0, t.width, t.height), this.focusOutline.stroke();
|
|
69009
69030
|
}
|
|
69010
69031
|
// ─── Rendering ───────────────────────────────────────────────────────────────
|
|
69011
69032
|
syncToPlayer() {
|
|
@@ -69017,7 +69038,7 @@ class ptt {
|
|
|
69017
69038
|
if (!this.selectedPlayer) return;
|
|
69018
69039
|
const t = this.selectedPlayer.getSize(), i = this.getUIScale(), r = this.isHovering || this.isDragging ? Nr.ACTIVE_COLOR : Nr.DEFAULT_COLOR;
|
|
69019
69040
|
this.outline.clear(), this.outline.strokeStyle = { width: Nr.OUTLINE_WIDTH / i, color: r }, this.outline.rect(0, 0, t.width, t.height), this.outline.stroke();
|
|
69020
|
-
const n =
|
|
69041
|
+
const n = GQ(t, i);
|
|
69021
69042
|
this.outline.hitArea = new K.Rectangle(n.x, n.y, n.width, n.height);
|
|
69022
69043
|
}
|
|
69023
69044
|
drawHandles() {
|
|
@@ -69035,7 +69056,7 @@ class ptt {
|
|
|
69035
69056
|
this.drawEdgeHandles(t, i, r);
|
|
69036
69057
|
}
|
|
69037
69058
|
drawEdgeHandles(t, i, r) {
|
|
69038
|
-
const n = this.selectedPlayer?.supportsEdgeResize() ?? !1, s =
|
|
69059
|
+
const n = this.selectedPlayer?.supportsEdgeResize() ?? !1, s = utt / i, a = ctt / i, o = a / 2, l = {
|
|
69039
69060
|
top: { x: t.width / 2, y: 0, isHorizontal: !0 },
|
|
69040
69061
|
bottom: { x: t.width / 2, y: t.height, isHorizontal: !0 },
|
|
69041
69062
|
left: { x: 0, y: t.height / 2, isHorizontal: !1 },
|
|
@@ -69124,8 +69145,8 @@ class ptt {
|
|
|
69124
69145
|
...this.finalDragState.offset
|
|
69125
69146
|
}), this.finalDragState.width !== void 0 && (t.width = this.finalDragState.width), this.finalDragState.height !== void 0 && (t.height = this.finalDragState.height), (this.scaleDirection || this.edgeDragDirection) && t.asset?.type === "svg") {
|
|
69126
69147
|
const i = t.asset;
|
|
69127
|
-
if (i.src && t.width && t.height &&
|
|
69128
|
-
const r =
|
|
69148
|
+
if (i.src && t.width && t.height && ott(i.src)) {
|
|
69149
|
+
const r = ltt(i.src, t.width, t.height);
|
|
69129
69150
|
this.edit.updateClipInDocument(this.selectedClipId, {
|
|
69130
69151
|
asset: { ...i, src: r }
|
|
69131
69152
|
}), this.edit.resolveClip(this.selectedClipId);
|
|
@@ -69165,10 +69186,10 @@ class ptt {
|
|
|
69165
69186
|
{ x: S.x - z.x * T.x, y: S.y - z.y * T.y },
|
|
69166
69187
|
{ width: k.width * T.x, height: k.height * T.y }
|
|
69167
69188
|
);
|
|
69168
|
-
}), d = _4(l, u), h =
|
|
69189
|
+
}), d = _4(l, u), h = ntt(d, f), m = att(u, this.edit.size, h), v = ttt(l, m);
|
|
69169
69190
|
for (const _ of v.guides)
|
|
69170
69191
|
this.edit.showAlignmentGuide(_.type, _.axis, _.position, _.bounds);
|
|
69171
|
-
const g =
|
|
69192
|
+
const g = stt(v.position, n, a), w = this.selectedPlayer.getSize(), C = this.selectedPlayer.clipConfiguration.position ?? "center", x = M4(this.edit.size, w, C, g);
|
|
69172
69193
|
this.finalDragState = {
|
|
69173
69194
|
offset: { x: x.x, y: x.y }
|
|
69174
69195
|
}, this.edit.updateClipInDocument(this.selectedClipId, {
|
|
@@ -69186,7 +69207,7 @@ class ptt {
|
|
|
69186
69207
|
const i = t.getLocalPosition(this.edit.getViewportContainer()), r = {
|
|
69187
69208
|
x: i.x - this.edgeDragStart.x,
|
|
69188
69209
|
y: i.y - this.edgeDragStart.y
|
|
69189
|
-
}, n =
|
|
69210
|
+
}, n = $Q(this.scaleDirection, r, this.originalDimensions, this.edit.size), s = C4(n.width, n.height), a = k4(s.width, s.height);
|
|
69190
69211
|
this.finalDragState = {
|
|
69191
69212
|
width: a.width,
|
|
69192
69213
|
height: a.height,
|
|
@@ -69208,7 +69229,7 @@ class ptt {
|
|
|
69208
69229
|
const i = t.getLocalPosition(this.edit.getViewportContainer()), r = {
|
|
69209
69230
|
x: i.x - this.edgeDragStart.x,
|
|
69210
69231
|
y: i.y - this.edgeDragStart.y
|
|
69211
|
-
}, n =
|
|
69232
|
+
}, n = UQ(this.edgeDragDirection, r, this.originalDimensions, this.edit.size), s = C4(n.width, n.height), a = k4(s.width, s.height);
|
|
69212
69233
|
this.finalDragState = {
|
|
69213
69234
|
width: a.width,
|
|
69214
69235
|
height: a.height,
|
|
@@ -69227,7 +69248,7 @@ class ptt {
|
|
|
69227
69248
|
}
|
|
69228
69249
|
handleRotation(t) {
|
|
69229
69250
|
if (!this.selectedPlayer || !this.selectedClipId || this.rotationStart === null) return;
|
|
69230
|
-
const i = this.getContentCenter(), n = (Math.atan2(t.globalY - i.y, t.globalX - i.x) - this.rotationStart) * (180 / Math.PI), s = this.initialRotation + n, { angle: a } =
|
|
69251
|
+
const i = this.getContentCenter(), n = (Math.atan2(t.globalY - i.y, t.globalX - i.x) - this.rotationStart) * (180 / Math.PI), s = this.initialRotation + n, { angle: a } = rtt(s), o = a % 360, l = this.selectedPlayer.clipConfiguration.transform ?? {};
|
|
69231
69252
|
this.finalDragState = {
|
|
69232
69253
|
transform: {
|
|
69233
69254
|
...l,
|
|
@@ -69247,7 +69268,7 @@ class ptt {
|
|
|
69247
69268
|
const r = this.dimensionLabel.width, n = this.dimensionLabel.height, s = r + S4 * 2, a = n + E4 * 2;
|
|
69248
69269
|
this.dimensionBackground.clear(), this.dimensionBackground.fillStyle = { color: 0, alpha: 0.7 }, this.dimensionBackground.roundRect(0, 0, s, a, a / 2), this.dimensionBackground.fill(), this.dimensionLabel.position.set(S4, E4);
|
|
69249
69270
|
const o = this.selectedPlayer.getContainer(), l = this.selectedPlayer.getSize(), u = o.toGlobal({ x: l.width / 2, y: l.height }), c = this.dimensionContainer.parent, f = c ? c.toLocal(u) : u, d = this.edit.getCanvasZoom();
|
|
69250
|
-
this.dimensionContainer.position.set(f.x - s / 2, f.y +
|
|
69271
|
+
this.dimensionContainer.position.set(f.x - s / 2, f.y + dtt / d), this.dimensionContainer.scale.set(1 / d), this.dimensionContainer.visible = !0;
|
|
69251
69272
|
}
|
|
69252
69273
|
hideDimensionLabel() {
|
|
69253
69274
|
this.dimensionContainer.visible = !1;
|
|
@@ -69288,7 +69309,7 @@ class ptt {
|
|
|
69288
69309
|
{ x: i.width, y: i.height },
|
|
69289
69310
|
{ x: 0, y: i.height }
|
|
69290
69311
|
];
|
|
69291
|
-
return
|
|
69312
|
+
return LQ(t, a, n, s);
|
|
69292
69313
|
}
|
|
69293
69314
|
getCornerResizeCursor(t) {
|
|
69294
69315
|
const i = this.selectedPlayer?.getRotation() ?? 0, r = Gc[`${t}Resize`] ?? 45;
|
|
@@ -69304,7 +69325,7 @@ class ptt {
|
|
|
69304
69325
|
const o = this.getRotationCorner(r, n);
|
|
69305
69326
|
if (o) {
|
|
69306
69327
|
const l = Gc[o] ?? 0;
|
|
69307
|
-
this.outline.cursor =
|
|
69328
|
+
this.outline.cursor = HQ(l + a);
|
|
69308
69329
|
return;
|
|
69309
69330
|
}
|
|
69310
69331
|
if (this.selectedPlayer.supportsEdgeResize()) {
|
|
@@ -69633,8 +69654,8 @@ const A4 = [
|
|
|
69633
69654
|
check: '<svg class="checkmark" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>',
|
|
69634
69655
|
effect: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M12 1v4M12 19v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M1 12h4M19 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"/></svg>',
|
|
69635
69656
|
dimensions: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18"/><path d="M9 3v18"/></svg>'
|
|
69636
|
-
},
|
|
69637
|
-
class
|
|
69657
|
+
}, gtt = 150;
|
|
69658
|
+
class ytt extends Ga {
|
|
69638
69659
|
// ─── Current Values ──────────────────────────────────────────────────────────
|
|
69639
69660
|
currentFit = "crop";
|
|
69640
69661
|
currentWidth = 1024;
|
|
@@ -69893,7 +69914,7 @@ class gtt extends Ga {
|
|
|
69893
69914
|
s && n && n.setClipBinding(s, "asset.prompt", a);
|
|
69894
69915
|
} else s && n && n.removeClipBinding(s, "asset.prompt");
|
|
69895
69916
|
this.updateAssetProperty({ prompt: r }), this.updatePromptButtonText(t);
|
|
69896
|
-
},
|
|
69917
|
+
}, gtt);
|
|
69897
69918
|
}
|
|
69898
69919
|
updatePromptDisplay(t) {
|
|
69899
69920
|
const i = this.edit.getDocument(), r = this.edit.getClipId(this.selectedTrackIdx, this.selectedClipIdx), s = (r ? i?.getClipBinding(r, "asset.prompt") : void 0)?.placeholder ?? t.prompt ?? "";
|
|
@@ -70021,7 +70042,7 @@ class gtt extends Ga {
|
|
|
70021
70042
|
this.abortController?.abort(), this.abortController = null, this.dragManager.clear(), this.promptDebounceTimer && (clearTimeout(this.promptDebounceTimer), this.promptDebounceTimer = null), this.transitionPanel?.dispose(), this.effectPanel?.dispose(), this.opacitySlider?.dispose(), this.scaleSlider?.dispose(), super.dispose(), this.transitionPanel = null, this.effectPanel = null, this.opacitySlider = null, this.scaleSlider = null, this.promptTextarea = null;
|
|
70022
70043
|
}
|
|
70023
70044
|
}
|
|
70024
|
-
const
|
|
70045
|
+
const btt = [
|
|
70025
70046
|
// English (US)
|
|
70026
70047
|
{ name: "Matthew", language: "English (US)", languageCode: "en-US", gender: "Male" },
|
|
70027
70048
|
{ name: "Joanna", language: "English (US)", languageCode: "en-US", gender: "Female" },
|
|
@@ -70091,9 +70112,9 @@ const ytt = [
|
|
|
70091
70112
|
// Arabic
|
|
70092
70113
|
{ name: "Hala", language: "Arabic", languageCode: "ar-AE", gender: "Female" }
|
|
70093
70114
|
];
|
|
70094
|
-
function
|
|
70115
|
+
function vtt() {
|
|
70095
70116
|
const e = /* @__PURE__ */ new Map();
|
|
70096
|
-
for (const t of
|
|
70117
|
+
for (const t of btt) {
|
|
70097
70118
|
const i = e.get(t.language) ?? [];
|
|
70098
70119
|
i.push(t), e.set(t.language, i);
|
|
70099
70120
|
}
|
|
@@ -70117,8 +70138,8 @@ const Si = {
|
|
|
70117
70138
|
fadeOut: '<svg viewBox="0 0 32 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 4 L18 4 L30 14"/></svg>',
|
|
70118
70139
|
fadeInOut: '<svg viewBox="0 0 32 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M2 14 L10 4 L22 4 L30 14"/></svg>',
|
|
70119
70140
|
fadeNone: '<svg viewBox="0 0 32 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M2 10 L30 10"/></svg>'
|
|
70120
|
-
},
|
|
70121
|
-
class
|
|
70141
|
+
}, wtt = 300;
|
|
70142
|
+
class xtt extends Ga {
|
|
70122
70143
|
// State
|
|
70123
70144
|
currentVoice = "Matthew";
|
|
70124
70145
|
currentVolume = 100;
|
|
@@ -70240,8 +70261,8 @@ class wtt extends Ga {
|
|
|
70240
70261
|
}
|
|
70241
70262
|
mountCompositeComponents() {
|
|
70242
70263
|
const t = this.container?.querySelector("[data-voice-list-mount]");
|
|
70243
|
-
t && (this.voiceList = new
|
|
70244
|
-
groups:
|
|
70264
|
+
t && (this.voiceList = new TQ({
|
|
70265
|
+
groups: vtt(),
|
|
70245
70266
|
height: 300,
|
|
70246
70267
|
selectedValue: this.currentVoice
|
|
70247
70268
|
}), this.voiceList.onChange((i) => this.handleVoiceChange(i)), this.voiceList.mount(t));
|
|
@@ -70335,7 +70356,7 @@ class wtt extends Ga {
|
|
|
70335
70356
|
this.textDebounceTimer && clearTimeout(this.textDebounceTimer), this.textDebounceTimer = setTimeout(() => {
|
|
70336
70357
|
const t = this.textArea?.value ?? "";
|
|
70337
70358
|
this.updateTextPreview(t), this.updateAssetProperty({ text: t });
|
|
70338
|
-
},
|
|
70359
|
+
}, wtt);
|
|
70339
70360
|
}
|
|
70340
70361
|
updateTextPreview(t) {
|
|
70341
70362
|
const i = this.container?.querySelector("[data-text-preview]");
|
|
@@ -70410,7 +70431,7 @@ class wtt extends Ga {
|
|
|
70410
70431
|
this.abortController?.abort(), this.abortController = null, this.dragManager.clear(), this.textDebounceTimer && (clearTimeout(this.textDebounceTimer), this.textDebounceTimer = null), this.voiceList?.dispose(), this.voiceList = null, super.dispose(), this.voiceBtn = null, this.voicePopup = null, this.textBtn = null, this.textPopup = null, this.textArea = null, this.volumeBtn = null, this.volumePopup = null, this.volumeSlider = null, this.volumeDisplayInput = null, this.audioFadeBtn = null, this.audioFadePopup = null;
|
|
70411
70432
|
}
|
|
70412
70433
|
}
|
|
70413
|
-
class
|
|
70434
|
+
class Ctt extends Ga {
|
|
70414
70435
|
// Text edit
|
|
70415
70436
|
textEditBtn = null;
|
|
70416
70437
|
textEditPopup = null;
|
|
@@ -70753,7 +70774,7 @@ class xtt extends Ga {
|
|
|
70753
70774
|
if (!this.fontPopup) return;
|
|
70754
70775
|
const t = `<div class="ss-toolbar-font-section">
|
|
70755
70776
|
<div class="ss-toolbar-font-section-header">Built-in Fonts</div>
|
|
70756
|
-
${
|
|
70777
|
+
${OJ.map((i) => `<div class="ss-toolbar-font-item" data-font="${i}"><span class="ss-toolbar-font-name" style="font-family:'${i}'">${i}</span></div>`).join("")}
|
|
70757
70778
|
</div>`;
|
|
70758
70779
|
this.fontPopup.innerHTML = t, this.fontPopup.querySelectorAll("[data-font]").forEach((i) => {
|
|
70759
70780
|
i.addEventListener("click", () => {
|
|
@@ -70970,7 +70991,7 @@ class am {
|
|
|
70970
70991
|
* Private constructor - use UIController.create() or UIController.minimal() instead.
|
|
70971
70992
|
*/
|
|
70972
70993
|
constructor(t, i, r) {
|
|
70973
|
-
this.edit = t, this.canvas = i, this.mergeFieldsEnabled = r.mergeFields ?? t instanceof
|
|
70994
|
+
this.edit = t, this.canvas = i, this.mergeFieldsEnabled = r.mergeFields ?? t instanceof yQ, this.selectionHandlesEnabled = r.selectionHandles ?? !0, this.maxPixels = r.maxPixels, this.onKeyDownBound = this.onKeyDown.bind(this);
|
|
70974
70995
|
}
|
|
70975
70996
|
edit;
|
|
70976
70997
|
/**
|
|
@@ -70983,10 +71004,10 @@ class am {
|
|
|
70983
71004
|
* Register all standard toolbars. Called by create() factory.
|
|
70984
71005
|
*/
|
|
70985
71006
|
registerStandardToolbars() {
|
|
70986
|
-
this.selectionHandlesEnabled && this.registerCanvasOverlay(new
|
|
71007
|
+
this.selectionHandlesEnabled && this.registerCanvasOverlay(new mtt(this.edit)), this.registerToolbar("text", new Ctt(this.edit)), this.registerToolbar("rich-text", new Aa(this.edit, { mergeFields: this.mergeFieldsEnabled })), this.registerToolbar("rich-caption", new RQ(this.edit)), this.registerToolbar("svg", new Jf(this.edit)), this.registerToolbar(["video", "image"], new Ql(this.edit, { mergeFields: this.mergeFieldsEnabled })), this.registerToolbar("audio", new Ql(this.edit, { mergeFields: this.mergeFieldsEnabled })), this.registerToolbar("text-to-image", new ytt(this.edit)), this.registerToolbar("image-to-video", new Ql(this.edit)), this.registerToolbar("text-to-speech", new xtt(this.edit)), this.canvasToolbar = new CQ(this.edit, {
|
|
70987
71008
|
mergeFields: this.mergeFieldsEnabled,
|
|
70988
71009
|
maxPixels: this.maxPixels
|
|
70989
|
-
}), this.registerUtility(this.canvasToolbar), this.canvasToolbar.onResolutionChange((t, i) => this.edit.setOutputSize(t, i)), this.canvasToolbar.onFpsChange((t) => this.edit.setOutputFps(t)), this.canvasToolbar.onBackgroundChange((t) => this.edit.setTimelineBackground(t)), this.assetToolbar = new
|
|
71010
|
+
}), this.registerUtility(this.canvasToolbar), this.canvasToolbar.onResolutionChange((t, i) => this.edit.setOutputSize(t, i)), this.canvasToolbar.onFpsChange((t) => this.edit.setOutputFps(t)), this.canvasToolbar.onBackgroundChange((t) => this.edit.setTimelineBackground(t)), this.assetToolbar = new bQ(this), this.registerUtility(this.assetToolbar), this.clipToolbar = new EQ(this.edit);
|
|
70990
71011
|
}
|
|
70991
71012
|
// ─── Public API ─────────────────────────────────────────────────────────────
|
|
70992
71013
|
/**
|
|
@@ -71261,7 +71282,7 @@ class am {
|
|
|
71261
71282
|
this.currentAssetType = null, this.currentTrackIndex = -1, this.currentClipIndex = -1, this.hideAllToolbars();
|
|
71262
71283
|
};
|
|
71263
71284
|
}
|
|
71264
|
-
const
|
|
71285
|
+
const uet = vA.version;
|
|
71265
71286
|
var Lt, ns = new Array(128).fill(void 0);
|
|
71266
71287
|
ns.push(void 0, null, !0, !1);
|
|
71267
71288
|
var tu = ns.length;
|
|
@@ -71273,12 +71294,12 @@ function sr(e) {
|
|
|
71273
71294
|
function Yi(e) {
|
|
71274
71295
|
return ns[e];
|
|
71275
71296
|
}
|
|
71276
|
-
function
|
|
71297
|
+
function ktt(e) {
|
|
71277
71298
|
e < 132 || (ns[e] = tu, tu = e);
|
|
71278
71299
|
}
|
|
71279
71300
|
function ss(e) {
|
|
71280
71301
|
const t = Yi(e);
|
|
71281
|
-
return
|
|
71302
|
+
return ktt(e), t;
|
|
71282
71303
|
}
|
|
71283
71304
|
var Eu = 0, Zl = null;
|
|
71284
71305
|
function lf() {
|
|
@@ -71286,7 +71307,7 @@ function lf() {
|
|
|
71286
71307
|
}
|
|
71287
71308
|
var uf = typeof TextEncoder < "u" ? new TextEncoder("utf-8") : { encode: () => {
|
|
71288
71309
|
throw Error("TextEncoder not available");
|
|
71289
|
-
} },
|
|
71310
|
+
} }, _tt = typeof uf.encodeInto == "function" ? function(e, t) {
|
|
71290
71311
|
return uf.encodeInto(e, t);
|
|
71291
71312
|
} : function(e, t) {
|
|
71292
71313
|
const i = uf.encode(e);
|
|
@@ -71311,7 +71332,7 @@ function om(e, t, i) {
|
|
|
71311
71332
|
}
|
|
71312
71333
|
if (a !== r) {
|
|
71313
71334
|
a !== 0 && (e = e.slice(a)), n = i(n, r, r = a + e.length * 3, 1) >>> 0;
|
|
71314
|
-
const o = lf().subarray(n + a, n + r), l =
|
|
71335
|
+
const o = lf().subarray(n + a, n + r), l = _tt(e, o);
|
|
71315
71336
|
a += l.written, n = i(n, r, a, 1) >>> 0;
|
|
71316
71337
|
}
|
|
71317
71338
|
return Eu = a, n;
|
|
@@ -71330,12 +71351,12 @@ typeof TextDecoder < "u" && aA.decode();
|
|
|
71330
71351
|
function cf(e, t) {
|
|
71331
71352
|
return e = e >>> 0, aA.decode(lf().subarray(e, e + t));
|
|
71332
71353
|
}
|
|
71333
|
-
function
|
|
71354
|
+
function Stt(e, t) {
|
|
71334
71355
|
if (!(e instanceof t))
|
|
71335
71356
|
throw new Error(`expected instance of ${t.name}`);
|
|
71336
71357
|
return e.ptr;
|
|
71337
71358
|
}
|
|
71338
|
-
function
|
|
71359
|
+
function Ett(e, t) {
|
|
71339
71360
|
try {
|
|
71340
71361
|
return e.apply(this, t);
|
|
71341
71362
|
} catch (i) {
|
|
@@ -71408,7 +71429,7 @@ var P4 = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
71408
71429
|
}
|
|
71409
71430
|
}, F4 = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
71410
71431
|
}, unregister: () => {
|
|
71411
|
-
} } : new FinalizationRegistry((e) => Lt.__wbg_renderedimage_free(e >>> 0)),
|
|
71432
|
+
} } : new FinalizationRegistry((e) => Lt.__wbg_renderedimage_free(e >>> 0)), Att = class lA {
|
|
71412
71433
|
static __wrap(t) {
|
|
71413
71434
|
t = t >>> 0;
|
|
71414
71435
|
const i = Object.create(lA.prototype);
|
|
@@ -71460,12 +71481,12 @@ var P4 = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
71460
71481
|
const t = Lt.renderedimage_pixels(this.__wbg_ptr);
|
|
71461
71482
|
return ss(t);
|
|
71462
71483
|
}
|
|
71463
|
-
},
|
|
71484
|
+
}, Ttt = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
71464
71485
|
}, unregister: () => {
|
|
71465
|
-
} } : new FinalizationRegistry((e) => Lt.__wbg_resvg_free(e >>> 0)),
|
|
71486
|
+
} } : new FinalizationRegistry((e) => Lt.__wbg_resvg_free(e >>> 0)), Itt = class {
|
|
71466
71487
|
__destroy_into_raw() {
|
|
71467
71488
|
const e = this.__wbg_ptr;
|
|
71468
|
-
return this.__wbg_ptr = 0,
|
|
71489
|
+
return this.__wbg_ptr = 0, Ttt.unregister(this), e;
|
|
71469
71490
|
}
|
|
71470
71491
|
free() {
|
|
71471
71492
|
const e = this.__destroy_into_raw();
|
|
@@ -71514,7 +71535,7 @@ var P4 = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
71514
71535
|
var e = xi()[r / 4 + 0], t = xi()[r / 4 + 1], i = xi()[r / 4 + 2];
|
|
71515
71536
|
if (i)
|
|
71516
71537
|
throw ss(t);
|
|
71517
|
-
return
|
|
71538
|
+
return Att.__wrap(e);
|
|
71518
71539
|
} finally {
|
|
71519
71540
|
Lt.__wbindgen_add_to_stack_pointer(16);
|
|
71520
71541
|
}
|
|
@@ -71560,7 +71581,7 @@ var P4 = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
71560
71581
|
* @param {BBox} bbox
|
|
71561
71582
|
*/
|
|
71562
71583
|
cropByBBox(e) {
|
|
71563
|
-
|
|
71584
|
+
Stt(e, ip), Lt.resvg_cropByBBox(this.__wbg_ptr, e.__wbg_ptr);
|
|
71564
71585
|
}
|
|
71565
71586
|
/**
|
|
71566
71587
|
* @returns {Array<any>}
|
|
@@ -71593,7 +71614,7 @@ var P4 = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
71593
71614
|
}
|
|
71594
71615
|
}
|
|
71595
71616
|
};
|
|
71596
|
-
async function
|
|
71617
|
+
async function Dtt(e, t) {
|
|
71597
71618
|
if (typeof Response == "function" && e instanceof Response) {
|
|
71598
71619
|
if (typeof WebAssembly.instantiateStreaming == "function")
|
|
71599
71620
|
try {
|
|
@@ -71611,7 +71632,7 @@ async function Itt(e, t) {
|
|
|
71611
71632
|
return i instanceof WebAssembly.Instance ? { instance: i, module: e } : i;
|
|
71612
71633
|
}
|
|
71613
71634
|
}
|
|
71614
|
-
function
|
|
71635
|
+
function Ptt() {
|
|
71615
71636
|
const e = {};
|
|
71616
71637
|
return e.wbg = {}, e.wbg.__wbg_new_28c511d9baebfa89 = function(t, i) {
|
|
71617
71638
|
const r = new Error(cf(t, i));
|
|
@@ -71634,7 +71655,7 @@ function Dtt() {
|
|
|
71634
71655
|
const i = Yi(t).values();
|
|
71635
71656
|
return sr(i);
|
|
71636
71657
|
}, e.wbg.__wbg_next_196c84450b364254 = function() {
|
|
71637
|
-
return
|
|
71658
|
+
return Ett(function(t) {
|
|
71638
71659
|
const i = Yi(t).next();
|
|
71639
71660
|
return sr(i);
|
|
71640
71661
|
}, arguments);
|
|
@@ -71671,23 +71692,23 @@ function Dtt() {
|
|
|
71671
71692
|
throw new Error(cf(t, i));
|
|
71672
71693
|
}, e;
|
|
71673
71694
|
}
|
|
71674
|
-
function
|
|
71695
|
+
function Ftt(e, t) {
|
|
71675
71696
|
return Lt = e.exports, uA.__wbindgen_wasm_module = t, jl = null, Zl = null, Lt;
|
|
71676
71697
|
}
|
|
71677
71698
|
async function uA(e) {
|
|
71678
71699
|
if (Lt !== void 0)
|
|
71679
71700
|
return Lt;
|
|
71680
71701
|
typeof e > "u" && (e = new URL("index_bg.wasm", void 0));
|
|
71681
|
-
const t =
|
|
71702
|
+
const t = Ptt();
|
|
71682
71703
|
(typeof e == "string" || typeof Request == "function" && e instanceof Request || typeof URL == "function" && e instanceof URL) && (e = fetch(e));
|
|
71683
|
-
const { instance: i, module: r } = await
|
|
71684
|
-
return
|
|
71704
|
+
const { instance: i, module: r } = await Dtt(await e, t);
|
|
71705
|
+
return Ftt(i, r);
|
|
71685
71706
|
}
|
|
71686
|
-
var
|
|
71707
|
+
var Btt = uA, um = !1, Ntt = async (e) => {
|
|
71687
71708
|
if (um)
|
|
71688
71709
|
throw new Error("Already initialized. The `initWasm()` function can be used only once.");
|
|
71689
|
-
await
|
|
71690
|
-
},
|
|
71710
|
+
await Btt(await e), um = !0;
|
|
71711
|
+
}, Mtt = class extends Itt {
|
|
71691
71712
|
/**
|
|
71692
71713
|
* @param {Uint8Array | string} svg
|
|
71693
71714
|
* @param {ResvgRenderOptions | undefined} options
|
|
@@ -71696,7 +71717,7 @@ var Ftt = uA, um = !1, Btt = async (e) => {
|
|
|
71696
71717
|
if (!um)
|
|
71697
71718
|
throw new Error("Wasm has not been initialized. Call `initWasm()` function.");
|
|
71698
71719
|
const i = t?.font;
|
|
71699
|
-
if (i &&
|
|
71720
|
+
if (i && ztt(i)) {
|
|
71700
71721
|
const r = {
|
|
71701
71722
|
...t,
|
|
71702
71723
|
font: {
|
|
@@ -71709,15 +71730,15 @@ var Ftt = uA, um = !1, Btt = async (e) => {
|
|
|
71709
71730
|
super(e, JSON.stringify(t));
|
|
71710
71731
|
}
|
|
71711
71732
|
};
|
|
71712
|
-
function
|
|
71733
|
+
function ztt(e) {
|
|
71713
71734
|
return Object.prototype.hasOwnProperty.call(e, "fontBuffers");
|
|
71714
71735
|
}
|
|
71715
|
-
const
|
|
71736
|
+
const Ott = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
71716
71737
|
__proto__: null,
|
|
71717
|
-
Resvg:
|
|
71718
|
-
initWasm:
|
|
71738
|
+
Resvg: Mtt,
|
|
71739
|
+
initWasm: Ntt
|
|
71719
71740
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
71720
|
-
var
|
|
71741
|
+
var Rtt = di({ "node_modules/.pnpm/harfbuzzjs@0.4.12/node_modules/harfbuzzjs/hb.js"(e, t) {
|
|
71721
71742
|
var i = (() => {
|
|
71722
71743
|
var r = typeof document < "u" ? document.currentScript?.src : void 0;
|
|
71723
71744
|
return async function(n = {}) {
|
|
@@ -71989,11 +72010,11 @@ var Ott = di({ "node_modules/.pnpm/harfbuzzjs@0.4.12/node_modules/harfbuzzjs/hb.
|
|
|
71989
72010
|
})();
|
|
71990
72011
|
typeof e == "object" && typeof t == "object" ? (t.exports = i, t.exports.default = i) : typeof define == "function" && define.amd && define([], () => i);
|
|
71991
72012
|
} });
|
|
71992
|
-
const
|
|
72013
|
+
const Vtt = Rtt(), Ltt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
71993
72014
|
__proto__: null,
|
|
71994
|
-
default:
|
|
72015
|
+
default: Vtt
|
|
71995
72016
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
71996
|
-
var
|
|
72017
|
+
var $tt = di({ "node_modules/.pnpm/harfbuzzjs@0.4.12/node_modules/harfbuzzjs/hbjs.js"(e, t) {
|
|
71997
72018
|
function i(r) {
|
|
71998
72019
|
var n = r.wasmExports, s = new TextDecoder("utf8");
|
|
71999
72020
|
let a = r.addFunction, o = r.removeFunction;
|
|
@@ -72174,16 +72195,17 @@ var Ltt = di({ "node_modules/.pnpm/harfbuzzjs@0.4.12/node_modules/harfbuzzjs/hbj
|
|
|
72174
72195
|
} catch {
|
|
72175
72196
|
}
|
|
72176
72197
|
} });
|
|
72177
|
-
const
|
|
72198
|
+
const Utt = $tt(), Ztt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
72178
72199
|
__proto__: null,
|
|
72179
|
-
default:
|
|
72200
|
+
default: Utt
|
|
72180
72201
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
72181
72202
|
export {
|
|
72182
72203
|
_n as Canvas,
|
|
72183
|
-
|
|
72204
|
+
set as Controls,
|
|
72184
72205
|
Ao as Edit,
|
|
72185
|
-
|
|
72206
|
+
oet as Timeline,
|
|
72186
72207
|
am as UIController,
|
|
72187
|
-
|
|
72188
|
-
|
|
72208
|
+
uet as VERSION,
|
|
72209
|
+
aet as VideoExporter,
|
|
72210
|
+
Nq as WebGLUnsupportedError
|
|
72189
72211
|
};
|