@linker-design-plus/timeline-track 2.0.16 → 2.0.17

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.es.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var Ha = Object.defineProperty;
2
2
  var Na = (s, e, t) => e in s ? Ha(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
3
  var p = (s, e, t) => Na(s, typeof e != "symbol" ? e + "" : e, t);
4
- const E = {
4
+ const A = {
5
5
  transparent: "transparent",
6
6
  white: "#ffffff",
7
7
  black: "#000000",
@@ -52,87 +52,87 @@ const E = {
52
52
  sliderThumbInnerShadow: "rgba(255, 255, 255, 0.92)",
53
53
  sliderThumbShadow: "rgba(8, 24, 56, 0.24)"
54
54
  }, Q = {
55
- background: E.black,
56
- border: E.borderStrong,
57
- timeTick: E.textSecondary,
58
- timeText: E.textSubtle,
59
- trackBackground: E.black,
60
- trackSelectedBackground: E.selectedTrackSurface,
61
- trackBorder: E.borderStrong,
62
- clipBackground: E.clipSurface,
63
- clipBorder: E.black,
64
- clipName: E.textPrimary,
65
- clipDuration: E.textMuted,
66
- clipHandle: E.textPrimary,
67
- clipSelectedBorder: E.clipSelectedBorder,
68
- clipCoverBackground: E.borderStrong,
69
- audioClipText: E.textAudio,
70
- audioClipAccent: E.audioClipAccent,
71
- playhead: E.textPrimary,
72
- grid: E.borderStrong,
73
- snapGuideLineColor: E.accentSelectedBorder,
74
- scrollbarBackground: E.borderStrong,
75
- scrollbarBorder: E.borderSubtle,
76
- scrollbarThumb: E.borderMedium
55
+ background: A.black,
56
+ border: A.borderStrong,
57
+ timeTick: A.textSecondary,
58
+ timeText: A.textSubtle,
59
+ trackBackground: A.black,
60
+ trackSelectedBackground: A.selectedTrackSurface,
61
+ trackBorder: A.borderStrong,
62
+ clipBackground: A.clipSurface,
63
+ clipBorder: A.black,
64
+ clipName: A.textPrimary,
65
+ clipDuration: A.textMuted,
66
+ clipHandle: A.textPrimary,
67
+ clipSelectedBorder: A.clipSelectedBorder,
68
+ clipCoverBackground: A.borderStrong,
69
+ audioClipText: A.textAudio,
70
+ audioClipAccent: A.audioClipAccent,
71
+ playhead: A.textPrimary,
72
+ grid: A.borderStrong,
73
+ snapGuideLineColor: A.accentSelectedBorder,
74
+ scrollbarBackground: A.borderStrong,
75
+ scrollbarBorder: A.borderSubtle,
76
+ scrollbarThumb: A.borderMedium
77
77
  }, ge = {
78
78
  backgroundColor: "#0f0f0f",
79
- borderColor: E.borderStrong,
80
- textColor: E.textSecondary,
81
- labelColor: E.textHint,
82
- inputBackground: E.inputSurface,
83
- inputBorder: E.borderMedium,
84
- inputFocusBorder: E.accentFocus,
85
- buttonBackground: E.inputSurface,
86
- buttonBorder: E.borderMedium,
87
- buttonActiveBackground: E.accentFocus,
88
- buttonActiveBorder: E.accentFocus,
89
- buttonActiveText: E.white
79
+ borderColor: A.borderStrong,
80
+ textColor: A.textSecondary,
81
+ labelColor: A.textHint,
82
+ inputBackground: A.inputSurface,
83
+ inputBorder: A.borderMedium,
84
+ inputFocusBorder: A.accentFocus,
85
+ buttonBackground: A.inputSurface,
86
+ buttonBorder: A.borderMedium,
87
+ buttonActiveBackground: A.accentFocus,
88
+ buttonActiveBorder: A.accentFocus,
89
+ buttonActiveText: A.white
90
90
  }, we = {
91
- background: E.panelSurface,
92
- border: E.borderStrong,
93
- text: E.textPrimary,
94
- buttonBackground: E.buttonSurface,
91
+ background: A.panelSurface,
92
+ border: A.borderStrong,
93
+ text: A.textPrimary,
94
+ buttonBackground: A.buttonSurface,
95
95
  buttonHover: "#3a3a3a",
96
- buttonDanger: E.accentDanger
96
+ buttonDanger: A.accentDanger
97
97
  }, me = {
98
98
  background: Q.scrollbarBackground,
99
99
  border: Q.scrollbarBorder,
100
100
  thumb: Q.scrollbarThumb,
101
- hitArea: E.overlayHitArea
101
+ hitArea: A.overlayHitArea
102
102
  }, Ct = {
103
- fill: E.white,
104
- stroke: E.black,
105
- text: E.black
103
+ fill: A.white,
104
+ stroke: A.black,
105
+ text: A.black
106
106
  }, Ce = {
107
- tabBarBackground: E.buttonSurface,
108
- actionBarBackground: E.buttonSurface,
109
- activeTabBackground: E.activeTabBackground,
110
- activeTabText: E.white,
111
- inactiveTabText: E.textInactive,
112
- sliderThumbShadow: `0 8px 20px ${E.sliderThumbShadow}`,
113
- sliderThumbInnerShadow: `inset 0 1px 1px ${E.sliderThumbInnerShadow}`
107
+ tabBarBackground: A.buttonSurface,
108
+ actionBarBackground: A.buttonSurface,
109
+ activeTabBackground: A.activeTabBackground,
110
+ activeTabText: A.white,
111
+ inactiveTabText: A.textInactive,
112
+ sliderThumbShadow: `0 8px 20px ${A.sliderThumbShadow}`,
113
+ sliderThumbInnerShadow: `inset 0 1px 1px ${A.sliderThumbInnerShadow}`
114
114
  }, Gi = {
115
- grip: E.accentPlayheadGrip,
116
- shadow: E.overlayShadow,
117
- marker: E.playheadMarker
115
+ grip: A.accentPlayheadGrip,
116
+ shadow: A.overlayShadow,
117
+ marker: A.playheadMarker
118
118
  }, fi = {
119
- background: E.overlayPreview,
120
- text: E.white,
121
- actionBackground: E.accentAction,
122
- actionText: E.white
119
+ background: A.overlayPreview,
120
+ text: A.white,
121
+ actionBackground: A.accentAction,
122
+ actionText: A.white
123
123
  }, Li = {
124
- border: E.overlayTransformHandle,
125
- handleBackground: E.black
124
+ border: A.overlayTransformHandle,
125
+ handleBackground: A.black
126
126
  }, nn = {
127
- fill: E.overlaySelectionBoxFill,
128
- stroke: E.accentSelectionBox
127
+ fill: A.overlaySelectionBoxFill,
128
+ stroke: A.accentSelectionBox
129
129
  }, mi = {
130
- videoFill: E.overlayVideoDropPreview,
131
- videoStroke: E.accentSelectedBorder,
132
- audioFill: E.overlayAudioDropPreview,
133
- audioStroke: E.accentAudioPreview
130
+ videoFill: A.overlayVideoDropPreview,
131
+ videoStroke: A.accentSelectedBorder,
132
+ audioFill: A.overlayAudioDropPreview,
133
+ audioStroke: A.accentAudioPreview
134
134
  }, sn = {
135
- line: E.gridLine
135
+ line: A.gridLine
136
136
  }, $a = {
137
137
  fontSize: 32,
138
138
  color: "#fff",
@@ -188,7 +188,7 @@ function Hi(s) {
188
188
  ...s
189
189
  } : { ...Tr };
190
190
  }
191
- const _s = 720, Fe = {
191
+ const _s = 720, Be = {
192
192
  mode: "auto-first-added-video",
193
193
  width: 16,
194
194
  height: 9
@@ -196,7 +196,7 @@ const _s = 720, Fe = {
196
196
  {
197
197
  key: "default",
198
198
  label: "默认",
199
- aspectRatio: { ...Fe }
199
+ aspectRatio: { ...Be }
200
200
  },
201
201
  {
202
202
  key: "9:16",
@@ -228,8 +228,8 @@ function Ut(s) {
228
228
  function st(s) {
229
229
  return {
230
230
  mode: Is(s == null ? void 0 : s.mode),
231
- width: typeof (s == null ? void 0 : s.width) == "number" && s.width > 0 ? s.width : Fe.width,
232
- height: typeof (s == null ? void 0 : s.height) == "number" && s.height > 0 ? s.height : Fe.height
231
+ width: typeof (s == null ? void 0 : s.width) == "number" && s.width > 0 ? s.width : Be.width,
232
+ height: typeof (s == null ? void 0 : s.height) == "number" && s.height > 0 ? s.height : Be.height
233
233
  };
234
234
  }
235
235
  function As(s, e = _s) {
@@ -289,7 +289,7 @@ function Es(s, e = {}) {
289
289
  function wr(s) {
290
290
  s.disablePictureInPicture = !0, s.setAttribute("disablepictureinpicture", "");
291
291
  }
292
- class N {
292
+ class $ {
293
293
  /**
294
294
  * 将毫秒转换为秒
295
295
  */
@@ -414,7 +414,7 @@ class N {
414
414
  /**
415
415
  * 刻度类型
416
416
  */
417
- p(N, "TICK_TYPE_MAJOR", "major"), p(N, "TICK_TYPE_MINOR", "minor");
417
+ p($, "TICK_TYPE_MAJOR", "major"), p($, "TICK_TYPE_MINOR", "minor");
418
418
  const Wa = Math.PI / 180;
419
419
  function Ya() {
420
420
  return typeof window < "u" && ({}.toString.call(window) === "[object Window]" || {}.toString.call(window) === "[object global]");
@@ -465,7 +465,7 @@ const at = typeof global < "u" ? global : typeof window < "u" ? window : typeof
465
465
  _injectGlobal(s) {
466
466
  typeof at.Konva < "u" && console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."), at.Konva = s;
467
467
  }
468
- }, oe = (s) => {
468
+ }, ae = (s) => {
469
469
  D[s.prototype.getClassName()] = s;
470
470
  };
471
471
  D._injectGlobal(D);
@@ -1523,7 +1523,7 @@ class Yr {
1523
1523
  }
1524
1524
  }
1525
1525
  }
1526
- class je extends Yr {
1526
+ class Xe extends Yr {
1527
1527
  constructor(e = { width: 0, height: 0, willReadFrequently: !1 }) {
1528
1528
  super(e), this.context = new yo(this, {
1529
1529
  willReadFrequently: e.willReadFrequently
@@ -1596,7 +1596,7 @@ const Z = {
1596
1596
  }
1597
1597
  };
1598
1598
  D.isBrowser && (window.addEventListener("mouseup", Z._endDragBefore, !0), window.addEventListener("touchend", Z._endDragBefore, !0), window.addEventListener("touchcancel", Z._endDragBefore, !0), window.addEventListener("mousemove", Z._drag), window.addEventListener("touchmove", Z._drag), window.addEventListener("mouseup", Z._endDragAfter, !1), window.addEventListener("touchend", Z._endDragAfter, !1), window.addEventListener("touchcancel", Z._endDragAfter, !1));
1599
- function Je(s) {
1599
+ function Ze(s) {
1600
1600
  return T._isString(s) ? '"' + s + '"' : Object.prototype.toString.call(s) === "[object Number]" || T._isBoolean(s) ? s : Object.prototype.toString.call(s);
1601
1601
  }
1602
1602
  function Rs(s) {
@@ -1605,33 +1605,33 @@ function Rs(s) {
1605
1605
  function L() {
1606
1606
  if (D.isUnminified)
1607
1607
  return function(s, e) {
1608
- return T._isNumber(s) || T.warn(Je(s) + ' is a not valid value for "' + e + '" attribute. The value should be a number.'), s;
1608
+ return T._isNumber(s) || T.warn(Ze(s) + ' is a not valid value for "' + e + '" attribute. The value should be a number.'), s;
1609
1609
  };
1610
1610
  }
1611
1611
  function qi(s) {
1612
1612
  if (D.isUnminified)
1613
1613
  return function(e, t) {
1614
1614
  let i = T._isNumber(e), r = T._isArray(e) && e.length == s;
1615
- return !i && !r && T.warn(Je(e) + ' is a not valid value for "' + t + '" attribute. The value should be a number or Array<number>(' + s + ")"), e;
1615
+ return !i && !r && T.warn(Ze(e) + ' is a not valid value for "' + t + '" attribute. The value should be a number or Array<number>(' + s + ")"), e;
1616
1616
  };
1617
1617
  }
1618
1618
  function jr() {
1619
1619
  if (D.isUnminified)
1620
1620
  return function(s, e) {
1621
- return T._isNumber(s) || s === "auto" || T.warn(Je(s) + ' is a not valid value for "' + e + '" attribute. The value should be a number or "auto".'), s;
1621
+ return T._isNumber(s) || s === "auto" || T.warn(Ze(s) + ' is a not valid value for "' + e + '" attribute. The value should be a number or "auto".'), s;
1622
1622
  };
1623
1623
  }
1624
1624
  function dt() {
1625
1625
  if (D.isUnminified)
1626
1626
  return function(s, e) {
1627
- return T._isString(s) || T.warn(Je(s) + ' is a not valid value for "' + e + '" attribute. The value should be a string.'), s;
1627
+ return T._isString(s) || T.warn(Ze(s) + ' is a not valid value for "' + e + '" attribute. The value should be a string.'), s;
1628
1628
  };
1629
1629
  }
1630
1630
  function Ls() {
1631
1631
  if (D.isUnminified)
1632
1632
  return function(s, e) {
1633
1633
  const t = T._isString(s), i = Object.prototype.toString.call(s) === "[object CanvasGradient]" || s && s.addColorStop;
1634
- return t || i || T.warn(Je(s) + ' is a not valid value for "' + e + '" attribute. The value should be a string or a native gradient.'), s;
1634
+ return t || i || T.warn(Ze(s) + ' is a not valid value for "' + e + '" attribute. The value should be a string or a native gradient.'), s;
1635
1635
  };
1636
1636
  }
1637
1637
  function Co() {
@@ -1640,19 +1640,19 @@ function Co() {
1640
1640
  const t = Int8Array ? Object.getPrototypeOf(Int8Array) : null;
1641
1641
  return t && s instanceof t || (T._isArray(s) ? s.forEach(function(i) {
1642
1642
  T._isNumber(i) || T.warn('"' + e + '" attribute has non numeric element ' + i + ". Make sure that all elements are numbers.");
1643
- }) : T.warn(Je(s) + ' is a not valid value for "' + e + '" attribute. The value should be a array of numbers.')), s;
1643
+ }) : T.warn(Ze(s) + ' is a not valid value for "' + e + '" attribute. The value should be a array of numbers.')), s;
1644
1644
  };
1645
1645
  }
1646
- function Ae() {
1646
+ function Ie() {
1647
1647
  if (D.isUnminified)
1648
1648
  return function(s, e) {
1649
- return s === !0 || s === !1 || T.warn(Je(s) + ' is a not valid value for "' + e + '" attribute. The value should be a boolean.'), s;
1649
+ return s === !0 || s === !1 || T.warn(Ze(s) + ' is a not valid value for "' + e + '" attribute. The value should be a boolean.'), s;
1650
1650
  };
1651
1651
  }
1652
1652
  function bo(s) {
1653
1653
  if (D.isUnminified)
1654
1654
  return function(e, t) {
1655
- return e == null || T.isObject(e) || T.warn(Je(e) + ' is a not valid value for "' + t + '" attribute. The value should be an object with properties ' + s), e;
1655
+ return e == null || T.isObject(e) || T.warn(Ze(e) + ' is a not valid value for "' + t + '" attribute. The value should be an object with properties ' + s), e;
1656
1656
  };
1657
1657
  }
1658
1658
  const At = "get", Et = "set", m = {
@@ -1781,7 +1781,7 @@ function To(s) {
1781
1781
  return () => {
1782
1782
  };
1783
1783
  }
1784
- const Di = "absoluteOpacity", dn = "allEventListeners", Be = "absoluteTransform", un = "absoluteScale", it = "canvas", wo = "Change", ko = "children", xo = "konva", kr = "listening", Po = "mouseenter", _o = "mouseleave", Io = "pointerenter", Ao = "pointerleave", Eo = "touchenter", Ro = "touchleave", pn = "set", gn = "Shape", Mi = " ", fn = "stage", Ye = "transform", Lo = "Stage", xr = "visible", Do = [
1784
+ const Di = "absoluteOpacity", dn = "allEventListeners", Me = "absoluteTransform", un = "absoluteScale", tt = "canvas", wo = "Change", ko = "children", xo = "konva", kr = "listening", Po = "mouseenter", _o = "mouseleave", Io = "pointerenter", Ao = "pointerleave", Eo = "touchenter", Ro = "touchleave", pn = "set", gn = "Shape", Mi = " ", fn = "stage", We = "transform", Lo = "Stage", xr = "visible", Do = [
1785
1785
  "xChange.konva",
1786
1786
  "yChange.konva",
1787
1787
  "scaleXChange.konva",
@@ -1802,11 +1802,11 @@ class R {
1802
1802
  return !1;
1803
1803
  }
1804
1804
  _clearCache(e) {
1805
- (e === Ye || e === Be) && this._cache.get(e) ? this._cache.get(e).dirty = !0 : e ? this._cache.delete(e) : this._cache.clear();
1805
+ (e === We || e === Me) && this._cache.get(e) ? this._cache.get(e).dirty = !0 : e ? this._cache.delete(e) : this._cache.clear();
1806
1806
  }
1807
1807
  _getCache(e, t) {
1808
1808
  let i = this._cache.get(e);
1809
- return (i === void 0 || (e === Ye || e === Be) && i.dirty === !0) && (i = t.call(this), this._cache.set(e, i)), i;
1809
+ return (i === void 0 || (e === We || e === Me) && i.dirty === !0) && (i = t.call(this), this._cache.set(e, i)), i;
1810
1810
  }
1811
1811
  _calculate(e, t, i) {
1812
1812
  if (!this._attachedDepsListeners.get(e)) {
@@ -1818,15 +1818,15 @@ class R {
1818
1818
  return this._getCache(e, i);
1819
1819
  }
1820
1820
  _getCanvasCache() {
1821
- return this._cache.get(it);
1821
+ return this._cache.get(tt);
1822
1822
  }
1823
1823
  _clearSelfAndDescendantCache(e) {
1824
- this._clearCache(e), e === Be && this.fire("absoluteTransformChange");
1824
+ this._clearCache(e), e === Me && this.fire("absoluteTransformChange");
1825
1825
  }
1826
1826
  clearCache() {
1827
- if (this._cache.has(it)) {
1828
- const { scene: e, filter: t, hit: i } = this._cache.get(it);
1829
- T.releaseCanvas(e._canvas, t._canvas, i._canvas), this._cache.delete(it);
1827
+ if (this._cache.has(tt)) {
1828
+ const { scene: e, filter: t, hit: i } = this._cache.get(tt);
1829
+ T.releaseCanvas(e._canvas, t._canvas, i._canvas), this._cache.delete(tt);
1830
1830
  }
1831
1831
  return this._clearSelfAndDescendantCache(), this._requestDraw(), this;
1832
1832
  }
@@ -1844,11 +1844,11 @@ class R {
1844
1844
  }
1845
1845
  const u = Math.abs(Math.round(i.x) - o) > 0.5 ? 1 : 0, g = Math.abs(Math.round(i.y) - l) > 0.5 ? 1 : 0;
1846
1846
  r += c * 2 + u, n += c * 2 + g, o -= c, l -= c;
1847
- const f = new je({
1847
+ const f = new Xe({
1848
1848
  pixelRatio: a,
1849
1849
  width: r,
1850
1850
  height: n
1851
- }), y = new je({
1851
+ }), y = new Xe({
1852
1852
  pixelRatio: a,
1853
1853
  width: 0,
1854
1854
  height: 0,
@@ -1857,12 +1857,12 @@ class R {
1857
1857
  pixelRatio: d,
1858
1858
  width: r,
1859
1859
  height: n
1860
- }), v = f.getContext(), b = S.getContext(), C = new je({
1860
+ }), v = f.getContext(), b = S.getContext(), C = new Xe({
1861
1861
  width: f.width / f.pixelRatio + Math.abs(o),
1862
1862
  height: f.height / f.pixelRatio + Math.abs(l),
1863
1863
  pixelRatio: f.pixelRatio
1864
1864
  }), w = C.getContext();
1865
- return S.isCache = !0, f.isCache = !0, this._cache.delete(it), this._filterUpToDate = !1, t.imageSmoothingEnabled === !1 && (f.getContext()._context.imageSmoothingEnabled = !1, y.getContext()._context.imageSmoothingEnabled = !1), v.save(), b.save(), w.save(), v.translate(-o, -l), b.translate(-o, -l), w.translate(-o, -l), C.x = o, C.y = l, this._isUnderCache = !0, this._clearSelfAndDescendantCache(Di), this._clearSelfAndDescendantCache(un), this.drawScene(f, this, C), this.drawHit(S, this), this._isUnderCache = !1, v.restore(), b.restore(), h && (v.save(), v.beginPath(), v.rect(0, 0, r, n), v.closePath(), v.setAttr("strokeStyle", "red"), v.setAttr("lineWidth", 5), v.stroke(), v.restore()), T.releaseCanvas(C._canvas), this._cache.set(it, {
1865
+ return S.isCache = !0, f.isCache = !0, this._cache.delete(tt), this._filterUpToDate = !1, t.imageSmoothingEnabled === !1 && (f.getContext()._context.imageSmoothingEnabled = !1, y.getContext()._context.imageSmoothingEnabled = !1), v.save(), b.save(), w.save(), v.translate(-o, -l), b.translate(-o, -l), w.translate(-o, -l), C.x = o, C.y = l, this._isUnderCache = !0, this._clearSelfAndDescendantCache(Di), this._clearSelfAndDescendantCache(un), this.drawScene(f, this, C), this.drawHit(S, this), this._isUnderCache = !1, v.restore(), b.restore(), h && (v.save(), v.beginPath(), v.rect(0, 0, r, n), v.closePath(), v.setAttr("strokeStyle", "red"), v.setAttr("lineWidth", 5), v.stroke(), v.restore()), T.releaseCanvas(C._canvas), this._cache.set(tt, {
1866
1866
  scene: f,
1867
1867
  filter: y,
1868
1868
  hit: S,
@@ -1871,7 +1871,7 @@ class R {
1871
1871
  }), this._requestDraw(), this;
1872
1872
  }
1873
1873
  isCached() {
1874
- return this._cache.has(it);
1874
+ return this._cache.has(tt);
1875
1875
  }
1876
1876
  getClientRect(e) {
1877
1877
  throw new Error('abstract "getClientRect" method call');
@@ -1982,7 +1982,7 @@ class R {
1982
1982
  return this.isDragging() && this.stopDrag(), Z._dragElements.delete(this._id), this._remove(), this;
1983
1983
  }
1984
1984
  _clearCaches() {
1985
- this._clearSelfAndDescendantCache(Be), this._clearSelfAndDescendantCache(Di), this._clearSelfAndDescendantCache(un), this._clearSelfAndDescendantCache(fn), this._clearSelfAndDescendantCache(xr), this._clearSelfAndDescendantCache(kr);
1985
+ this._clearSelfAndDescendantCache(Me), this._clearSelfAndDescendantCache(Di), this._clearSelfAndDescendantCache(un), this._clearSelfAndDescendantCache(fn), this._clearSelfAndDescendantCache(xr), this._clearSelfAndDescendantCache(kr);
1986
1986
  }
1987
1987
  _remove() {
1988
1988
  this._clearCaches();
@@ -2069,7 +2069,7 @@ class R {
2069
2069
  return e;
2070
2070
  }
2071
2071
  _batchTransformChanges(e) {
2072
- this._batchingTransformChange = !0, e(), this._batchingTransformChange = !1, this._needClearTransformCache && (this._clearCache(Ye), this._clearSelfAndDescendantCache(Be)), this._needClearTransformCache = !1;
2072
+ this._batchingTransformChange = !0, e(), this._batchingTransformChange = !1, this._needClearTransformCache && (this._clearCache(We), this._clearSelfAndDescendantCache(Me)), this._needClearTransformCache = !1;
2073
2073
  }
2074
2074
  setPosition(e) {
2075
2075
  return this._batchTransformChanges(() => {
@@ -2107,12 +2107,12 @@ class R {
2107
2107
  }
2108
2108
  setAbsolutePosition(e) {
2109
2109
  const { x: t, y: i, ...r } = this._clearTransform();
2110
- this.attrs.x = t, this.attrs.y = i, this._clearCache(Ye);
2110
+ this.attrs.x = t, this.attrs.y = i, this._clearCache(We);
2111
2111
  const n = this._getAbsoluteTransform().copy();
2112
2112
  return n.invert(), n.translate(e.x, e.y), e = {
2113
2113
  x: this.attrs.x + n.getTranslation().x,
2114
2114
  y: this.attrs.y + n.getTranslation().y
2115
- }, this._setTransform(r), this.setPosition({ x: e.x, y: e.y }), this._clearCache(Ye), this._clearSelfAndDescendantCache(Be), this;
2115
+ }, this._setTransform(r), this.setPosition({ x: e.x, y: e.y }), this._clearCache(We), this._clearSelfAndDescendantCache(Me), this;
2116
2116
  }
2117
2117
  _setTransform(e) {
2118
2118
  let t;
@@ -2256,7 +2256,7 @@ class R {
2256
2256
  return t.target = t.target || this, i ? this._fireAndBubble(e, t) : this._fire(e, t), this;
2257
2257
  }
2258
2258
  getAbsoluteTransform(e) {
2259
- return e ? this._getAbsoluteTransform(e) : this._getCache(Be, this._getAbsoluteTransform);
2259
+ return e ? this._getAbsoluteTransform(e) : this._getCache(Me, this._getAbsoluteTransform);
2260
2260
  }
2261
2261
  _getAbsoluteTransform(e) {
2262
2262
  let t;
@@ -2266,7 +2266,7 @@ class R {
2266
2266
  r === "all" ? t.multiply(i.getTransform()) : r === "position" && t.translate(i.x() - i.offsetX(), i.y() - i.offsetY());
2267
2267
  }, e), t;
2268
2268
  {
2269
- t = this._cache.get(Be) || new Se(), this.parent ? this.parent.getAbsoluteTransform().copyInto(t) : t.reset();
2269
+ t = this._cache.get(Me) || new Se(), this.parent ? this.parent.getAbsoluteTransform().copyInto(t) : t.reset();
2270
2270
  const i = this.transformsEnabled();
2271
2271
  if (i === "all")
2272
2272
  t.multiply(this.getTransform());
@@ -2291,11 +2291,11 @@ class R {
2291
2291
  return this.getAbsoluteTransform().decompose().rotation;
2292
2292
  }
2293
2293
  getTransform() {
2294
- return this._getCache(Ye, this._getTransform);
2294
+ return this._getCache(We, this._getTransform);
2295
2295
  }
2296
2296
  _getTransform() {
2297
2297
  var e, t;
2298
- const i = this._cache.get(Ye) || new Se();
2298
+ const i = this._cache.get(We) || new Se();
2299
2299
  i.reset();
2300
2300
  const r = this.x(), n = this.y(), a = D.getAngle(this.rotation()), o = (e = this.attrs.scaleX) !== null && e !== void 0 ? e : 1, l = (t = this.attrs.scaleY) !== null && t !== void 0 ? t : 1, c = this.attrs.skewX || 0, h = this.attrs.skewY || 0, d = this.attrs.offsetX || 0, u = this.attrs.offsetY || 0;
2301
2301
  return (r !== 0 || n !== 0) && i.translate(r, n), a !== 0 && i.rotate(a), (c !== 0 || h !== 0) && i.skew(c, h), (o !== 1 || l !== 1) && i.scale(o, l), (d !== 0 || u !== 0) && i.translate(-1 * d, -1 * u), i.dirty = !1, i;
@@ -2312,11 +2312,11 @@ class R {
2312
2312
  }
2313
2313
  _toKonvaCanvas(e) {
2314
2314
  e = e || {};
2315
- const t = this.getClientRect(), i = this.getStage(), r = e.x !== void 0 ? e.x : Math.floor(t.x), n = e.y !== void 0 ? e.y : Math.floor(t.y), a = e.pixelRatio || 1, o = new je({
2315
+ const t = this.getClientRect(), i = this.getStage(), r = e.x !== void 0 ? e.x : Math.floor(t.x), n = e.y !== void 0 ? e.y : Math.floor(t.y), a = e.pixelRatio || 1, o = new Xe({
2316
2316
  width: e.width || Math.ceil(t.width) || (i ? i.width() : 0),
2317
2317
  height: e.height || Math.ceil(t.height) || (i ? i.height() : 0),
2318
2318
  pixelRatio: a
2319
- }), l = o.getContext(), c = new je({
2319
+ }), l = o.getContext(), c = new Xe({
2320
2320
  width: o.width / o.pixelRatio + Math.abs(r),
2321
2321
  height: o.height / o.pixelRatio + Math.abs(n),
2322
2322
  pixelRatio: o.pixelRatio
@@ -2578,7 +2578,7 @@ R.prototype.on.call(R.prototype, Do, function() {
2578
2578
  this._needClearTransformCache = !0;
2579
2579
  return;
2580
2580
  }
2581
- this._clearCache(Ye), this._clearSelfAndDescendantCache(Be);
2581
+ this._clearCache(We), this._clearSelfAndDescendantCache(Me);
2582
2582
  });
2583
2583
  R.prototype.on.call(R.prototype, "visibleChange.konva", function() {
2584
2584
  this._clearSelfAndDescendantCache(xr);
@@ -2612,16 +2612,16 @@ ee(R, "offsetY", 0, L());
2612
2612
  ee(R, "dragDistance", void 0, L());
2613
2613
  ee(R, "width", 0, L());
2614
2614
  ee(R, "height", 0, L());
2615
- ee(R, "listening", !0, Ae());
2616
- ee(R, "preventDefault", !0, Ae());
2615
+ ee(R, "listening", !0, Ie());
2616
+ ee(R, "preventDefault", !0, Ie());
2617
2617
  ee(R, "filters", void 0, function(s) {
2618
2618
  return this._filterUpToDate = !1, s;
2619
2619
  });
2620
- ee(R, "visible", !0, Ae());
2620
+ ee(R, "visible", !0, Ie());
2621
2621
  ee(R, "transformsEnabled", "all", dt());
2622
2622
  ee(R, "size");
2623
2623
  ee(R, "dragBoundFunc");
2624
- ee(R, "draggable", !1, Ae());
2624
+ ee(R, "draggable", !1, Ie());
2625
2625
  m.backCompat(R, {
2626
2626
  rotateDeg: "rotate",
2627
2627
  setRotationDeg: "setRotation",
@@ -2986,7 +2986,7 @@ class Ki extends ve {
2986
2986
  }
2987
2987
  _toKonvaCanvas(e) {
2988
2988
  e = { ...e }, e.x = e.x || 0, e.y = e.y || 0, e.width = e.width || this.width(), e.height = e.height || this.height();
2989
- const t = new je({
2989
+ const t = new Xe({
2990
2990
  width: e.width,
2991
2991
  height: e.height,
2992
2992
  pixelRatio: e.pixelRatio || 1
@@ -3256,7 +3256,7 @@ class Ki extends ve {
3256
3256
  };
3257
3257
  }
3258
3258
  _buildDOM() {
3259
- if (this.bufferCanvas = new je({
3259
+ if (this.bufferCanvas = new Xe({
3260
3260
  width: this.width(),
3261
3261
  height: this.height()
3262
3262
  }), this.bufferHitCanvas = new Xr({
@@ -3283,7 +3283,7 @@ class Ki extends ve {
3283
3283
  }
3284
3284
  }
3285
3285
  Ki.prototype.nodeType = Oo;
3286
- oe(Ki);
3286
+ ae(Ki);
3287
3287
  m.addGetterSetter(Ki, "container");
3288
3288
  D.isBrowser && document.addEventListener("visibilitychange", () => {
3289
3289
  Yt.forEach((s) => {
@@ -3559,7 +3559,7 @@ _.prototype._fillFuncHit = Uo;
3559
3559
  _.prototype._strokeFuncHit = Wo;
3560
3560
  _.prototype._centroid = !1;
3561
3561
  _.prototype.nodeType = "Shape";
3562
- oe(_);
3562
+ ae(_);
3563
3563
  _.prototype.eventListeners = {};
3564
3564
  _.prototype.on.call(_.prototype, "shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", Yo);
3565
3565
  _.prototype.on.call(_.prototype, "shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva", Xo);
@@ -3570,9 +3570,9 @@ m.addGetterSetter(_, "stroke", void 0, Ls());
3570
3570
  m.addGetterSetter(_, "strokeWidth", 2, L());
3571
3571
  m.addGetterSetter(_, "fillAfterStrokeEnabled", !1);
3572
3572
  m.addGetterSetter(_, "hitStrokeWidth", "auto", jr());
3573
- m.addGetterSetter(_, "strokeHitEnabled", !0, Ae());
3574
- m.addGetterSetter(_, "perfectDrawEnabled", !0, Ae());
3575
- m.addGetterSetter(_, "shadowForStrokeEnabled", !0, Ae());
3573
+ m.addGetterSetter(_, "strokeHitEnabled", !0, Ie());
3574
+ m.addGetterSetter(_, "perfectDrawEnabled", !0, Ie());
3575
+ m.addGetterSetter(_, "shadowForStrokeEnabled", !0, Ie());
3576
3576
  m.addGetterSetter(_, "lineJoin");
3577
3577
  m.addGetterSetter(_, "lineCap");
3578
3578
  m.addGetterSetter(_, "miterLimit");
@@ -3666,7 +3666,7 @@ const Zo = "beforeDraw", Jo = "draw", Zs = [
3666
3666
  ], Qo = Zs.length;
3667
3667
  class ut extends ve {
3668
3668
  constructor(e) {
3669
- super(e), this.canvas = new je(), this.hitCanvas = new Xr({
3669
+ super(e), this.canvas = new Xe(), this.hitCanvas = new Xr({
3670
3670
  pixelRatio: 1
3671
3671
  }), this._waitingForDraw = !1, this.on("visibleChange.konva", this._checkVisibility), this._checkVisibility(), this.on("imageSmoothingEnabledChange.konva", this._setSmoothEnabled), this._setSmoothEnabled();
3672
3672
  }
@@ -3842,17 +3842,17 @@ class ut extends ve {
3842
3842
  }
3843
3843
  }
3844
3844
  ut.prototype.nodeType = "Layer";
3845
- oe(ut);
3845
+ ae(ut);
3846
3846
  m.addGetterSetter(ut, "imageSmoothingEnabled", !0);
3847
3847
  m.addGetterSetter(ut, "clearBeforeDraw", !0);
3848
- m.addGetterSetter(ut, "hitGraphEnabled", !0, Ae());
3848
+ m.addGetterSetter(ut, "hitGraphEnabled", !0, Ie());
3849
3849
  class Kr extends ut {
3850
3850
  constructor(e) {
3851
3851
  super(e), this.listening(!1), T.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.');
3852
3852
  }
3853
3853
  }
3854
3854
  Kr.prototype.nodeType = "FastLayer";
3855
- oe(Kr);
3855
+ ae(Kr);
3856
3856
  class wt extends ve {
3857
3857
  _validateAdd(e) {
3858
3858
  const t = e.getType();
@@ -3860,7 +3860,7 @@ class wt extends ve {
3860
3860
  }
3861
3861
  }
3862
3862
  wt.prototype.nodeType = "Group";
3863
- oe(wt);
3863
+ ae(wt);
3864
3864
  const nr = function() {
3865
3865
  return at.performance && at.performance.now ? function() {
3866
3866
  return at.performance.now();
@@ -4192,7 +4192,7 @@ const jt = {
4192
4192
  Context: ji,
4193
4193
  Canvas: Yr
4194
4194
  });
4195
- class Ge extends _ {
4195
+ class Fe extends _ {
4196
4196
  _sceneFunc(e) {
4197
4197
  const t = D.getAngle(this.angle()), i = this.clockwise();
4198
4198
  e.beginPath(), e.arc(0, 0, this.outerRadius(), 0, t, i), e.arc(0, 0, this.innerRadius(), t, 0, !i), e.closePath(), e.fillStrokeShape(this);
@@ -4219,19 +4219,19 @@ class Ge extends _ {
4219
4219
  };
4220
4220
  }
4221
4221
  }
4222
- Ge.prototype._centroid = !0;
4223
- Ge.prototype.className = "Arc";
4224
- Ge.prototype._attrsAffectingSize = [
4222
+ Fe.prototype._centroid = !0;
4223
+ Fe.prototype.className = "Arc";
4224
+ Fe.prototype._attrsAffectingSize = [
4225
4225
  "innerRadius",
4226
4226
  "outerRadius",
4227
4227
  "angle",
4228
4228
  "clockwise"
4229
4229
  ];
4230
- oe(Ge);
4231
- m.addGetterSetter(Ge, "innerRadius", 0, L());
4232
- m.addGetterSetter(Ge, "outerRadius", 0, L());
4233
- m.addGetterSetter(Ge, "angle", 0, L());
4234
- m.addGetterSetter(Ge, "clockwise", !1, Ae());
4230
+ ae(Fe);
4231
+ m.addGetterSetter(Fe, "innerRadius", 0, L());
4232
+ m.addGetterSetter(Fe, "outerRadius", 0, L());
4233
+ m.addGetterSetter(Fe, "angle", 0, L());
4234
+ m.addGetterSetter(Fe, "clockwise", !1, Ie());
4235
4235
  function Ir(s, e, t, i, r, n, a) {
4236
4236
  const o = Math.sqrt(Math.pow(t - s, 2) + Math.pow(i - e, 2)), l = Math.sqrt(Math.pow(r - t, 2) + Math.pow(n - i, 2)), c = a * o / (o + l), h = a * l / (o + l), d = t - c * (r - s), u = i - c * (n - e), g = t + h * (r - s), f = i + h * (n - e);
4237
4237
  return [d, u, g, f];
@@ -4264,7 +4264,7 @@ function nl(s) {
4264
4264
  return n * n * n * r[0] + 3 * n * n * i * r[1] + 3 * n * i * i * r[2] + i * i * i * r[3];
4265
4265
  }));
4266
4266
  }
4267
- class He extends _ {
4267
+ class Ge extends _ {
4268
4268
  constructor(e) {
4269
4269
  super(e), this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva", function() {
4270
4270
  this._clearCache("tensionPoints");
@@ -4348,13 +4348,13 @@ class He extends _ {
4348
4348
  };
4349
4349
  }
4350
4350
  }
4351
- He.prototype.className = "Line";
4352
- He.prototype._attrsAffectingSize = ["points", "bezier", "tension"];
4353
- oe(He);
4354
- m.addGetterSetter(He, "closed", !1);
4355
- m.addGetterSetter(He, "bezier", !1);
4356
- m.addGetterSetter(He, "tension", 0, L());
4357
- m.addGetterSetter(He, "points", [], Co());
4351
+ Ge.prototype.className = "Line";
4352
+ Ge.prototype._attrsAffectingSize = ["points", "bezier", "tension"];
4353
+ ae(Ge);
4354
+ m.addGetterSetter(Ge, "closed", !1);
4355
+ m.addGetterSetter(Ge, "bezier", !1);
4356
+ m.addGetterSetter(Ge, "tension", 0, L());
4357
+ m.addGetterSetter(Ge, "points", [], Co());
4358
4358
  const sl = [
4359
4359
  [],
4360
4360
  [],
@@ -5350,7 +5350,7 @@ class ie extends _ {
5350
5350
  for (; f.length > 0 && !isNaN(f[0]); ) {
5351
5351
  let S = "", v = [];
5352
5352
  const b = o, C = l;
5353
- let w, x, P, M, I, A, k, $, B, Y;
5353
+ let w, x, P, M, I, E, k, z, B, Y;
5354
5354
  switch (g) {
5355
5355
  case "l":
5356
5356
  o += f.shift(), l += f.shift(), S = "L", v.push(o, l);
@@ -5409,10 +5409,10 @@ class ie extends _ {
5409
5409
  x = o, P = l, w = n[n.length - 1], w.command === "Q" && (x = o + (o - w.points[0]), P = l + (l - w.points[1])), o += f.shift(), l += f.shift(), S = "Q", v.push(x, P, o, l);
5410
5410
  break;
5411
5411
  case "A":
5412
- M = f.shift(), I = f.shift(), A = f.shift(), k = f.shift(), $ = f.shift(), B = o, Y = l, o = f.shift(), l = f.shift(), S = "A", v = this.convertEndpointToCenterParameterization(B, Y, o, l, k, $, M, I, A);
5412
+ M = f.shift(), I = f.shift(), E = f.shift(), k = f.shift(), z = f.shift(), B = o, Y = l, o = f.shift(), l = f.shift(), S = "A", v = this.convertEndpointToCenterParameterization(B, Y, o, l, k, z, M, I, E);
5413
5413
  break;
5414
5414
  case "a":
5415
- M = f.shift(), I = f.shift(), A = f.shift(), k = f.shift(), $ = f.shift(), B = o, Y = l, o += f.shift(), l += f.shift(), S = "A", v = this.convertEndpointToCenterParameterization(B, Y, o, l, k, $, M, I, A);
5415
+ M = f.shift(), I = f.shift(), E = f.shift(), k = f.shift(), z = f.shift(), B = o, Y = l, o += f.shift(), l += f.shift(), S = "A", v = this.convertEndpointToCenterParameterization(B, Y, o, l, k, z, M, I, E);
5416
5416
  break;
5417
5417
  }
5418
5418
  n.push({
@@ -5465,20 +5465,20 @@ class ie extends _ {
5465
5465
  n === a && (f *= -1), isNaN(f) && (f = 0);
5466
5466
  const y = f * o * u / l, S = f * -l * d / o, v = (e + i) / 2 + Math.cos(h) * y - Math.sin(h) * S, b = (t + r) / 2 + Math.sin(h) * y + Math.cos(h) * S, C = function(k) {
5467
5467
  return Math.sqrt(k[0] * k[0] + k[1] * k[1]);
5468
- }, w = function(k, $) {
5469
- return (k[0] * $[0] + k[1] * $[1]) / (C(k) * C($));
5470
- }, x = function(k, $) {
5471
- return (k[0] * $[1] < k[1] * $[0] ? -1 : 1) * Math.acos(w(k, $));
5468
+ }, w = function(k, z) {
5469
+ return (k[0] * z[0] + k[1] * z[1]) / (C(k) * C(z));
5470
+ }, x = function(k, z) {
5471
+ return (k[0] * z[1] < k[1] * z[0] ? -1 : 1) * Math.acos(w(k, z));
5472
5472
  }, P = x([1, 0], [(d - y) / o, (u - S) / l]), M = [(d - y) / o, (u - S) / l], I = [(-1 * d - y) / o, (-1 * u - S) / l];
5473
- let A = x(M, I);
5474
- return w(M, I) <= -1 && (A = Math.PI), w(M, I) >= 1 && (A = 0), a === 0 && A > 0 && (A = A - 2 * Math.PI), a === 1 && A < 0 && (A = A + 2 * Math.PI), [v, b, o, l, P, A, h, a];
5473
+ let E = x(M, I);
5474
+ return w(M, I) <= -1 && (E = Math.PI), w(M, I) >= 1 && (E = 0), a === 0 && E > 0 && (E = E - 2 * Math.PI), a === 1 && E < 0 && (E = E + 2 * Math.PI), [v, b, o, l, P, E, h, a];
5475
5475
  }
5476
5476
  }
5477
5477
  ie.prototype.className = "Path";
5478
5478
  ie.prototype._attrsAffectingSize = ["data"];
5479
- oe(ie);
5479
+ ae(ie);
5480
5480
  m.addGetterSetter(ie, "data");
5481
- class pt extends He {
5481
+ class pt extends Ge {
5482
5482
  _sceneFunc(e) {
5483
5483
  super._sceneFunc(e);
5484
5484
  const t = Math.PI * 2, i = this.points();
@@ -5517,7 +5517,7 @@ class pt extends He {
5517
5517
  }
5518
5518
  }
5519
5519
  pt.prototype.className = "Arrow";
5520
- oe(pt);
5520
+ ae(pt);
5521
5521
  m.addGetterSetter(pt, "pointerLength", 10, L());
5522
5522
  m.addGetterSetter(pt, "pointerWidth", 10, L());
5523
5523
  m.addGetterSetter(pt, "pointerAtBeginning", !1);
@@ -5542,9 +5542,9 @@ class Pt extends _ {
5542
5542
  Pt.prototype._centroid = !0;
5543
5543
  Pt.prototype.className = "Circle";
5544
5544
  Pt.prototype._attrsAffectingSize = ["radius"];
5545
- oe(Pt);
5545
+ ae(Pt);
5546
5546
  m.addGetterSetter(Pt, "radius", 0, L());
5547
- class Qe extends _ {
5547
+ class Je extends _ {
5548
5548
  _sceneFunc(e) {
5549
5549
  const t = this.radiusX(), i = this.radiusY();
5550
5550
  e.beginPath(), e.save(), t !== i && e.scale(1, i / t), e.arc(0, 0, t, 0, Math.PI * 2, !1), e.restore(), e.closePath(), e.fillStrokeShape(this);
@@ -5562,14 +5562,14 @@ class Qe extends _ {
5562
5562
  this.radiusY(e / 2);
5563
5563
  }
5564
5564
  }
5565
- Qe.prototype.className = "Ellipse";
5566
- Qe.prototype._centroid = !0;
5567
- Qe.prototype._attrsAffectingSize = ["radiusX", "radiusY"];
5568
- oe(Qe);
5569
- m.addComponentsGetterSetter(Qe, "radius", ["x", "y"]);
5570
- m.addGetterSetter(Qe, "radiusX", 0, L());
5571
- m.addGetterSetter(Qe, "radiusY", 0, L());
5572
- let Ee = class Js extends _ {
5565
+ Je.prototype.className = "Ellipse";
5566
+ Je.prototype._centroid = !0;
5567
+ Je.prototype._attrsAffectingSize = ["radiusX", "radiusY"];
5568
+ ae(Je);
5569
+ m.addComponentsGetterSetter(Je, "radius", ["x", "y"]);
5570
+ m.addGetterSetter(Je, "radiusX", 0, L());
5571
+ m.addGetterSetter(Je, "radiusY", 0, L());
5572
+ let Ae = class Js extends _ {
5573
5573
  constructor(e) {
5574
5574
  super(e), this._loadListener = () => {
5575
5575
  this._requestDraw();
@@ -5632,16 +5632,16 @@ let Ee = class Js extends _ {
5632
5632
  }, r.onerror = i, r.crossOrigin = "Anonymous", r.src = e;
5633
5633
  }
5634
5634
  };
5635
- Ee.prototype.className = "Image";
5636
- Ee.prototype._attrsAffectingSize = ["image"];
5637
- oe(Ee);
5638
- m.addGetterSetter(Ee, "cornerRadius", 0, qi(4));
5639
- m.addGetterSetter(Ee, "image");
5640
- m.addComponentsGetterSetter(Ee, "crop", ["x", "y", "width", "height"]);
5641
- m.addGetterSetter(Ee, "cropX", 0, L());
5642
- m.addGetterSetter(Ee, "cropY", 0, L());
5643
- m.addGetterSetter(Ee, "cropWidth", 0, L());
5644
- m.addGetterSetter(Ee, "cropHeight", 0, L());
5635
+ Ae.prototype.className = "Image";
5636
+ Ae.prototype._attrsAffectingSize = ["image"];
5637
+ ae(Ae);
5638
+ m.addGetterSetter(Ae, "cornerRadius", 0, qi(4));
5639
+ m.addGetterSetter(Ae, "image");
5640
+ m.addComponentsGetterSetter(Ae, "crop", ["x", "y", "width", "height"]);
5641
+ m.addGetterSetter(Ae, "cropX", 0, L());
5642
+ m.addGetterSetter(Ae, "cropY", 0, L());
5643
+ m.addGetterSetter(Ae, "cropWidth", 0, L());
5644
+ m.addGetterSetter(Ae, "cropHeight", 0, L());
5645
5645
  const Qs = [
5646
5646
  "fontFamily",
5647
5647
  "fontSize",
@@ -5711,7 +5711,7 @@ class Zr extends wt {
5711
5711
  }
5712
5712
  }
5713
5713
  Zr.prototype.className = "Label";
5714
- oe(Zr);
5714
+ ae(Zr);
5715
5715
  class gt extends _ {
5716
5716
  _sceneFunc(e) {
5717
5717
  const t = this.width(), i = this.height(), r = this.pointerDirection(), n = this.pointerWidth(), a = this.pointerHeight(), o = this.cornerRadius();
@@ -5729,7 +5729,7 @@ class gt extends _ {
5729
5729
  }
5730
5730
  }
5731
5731
  gt.prototype.className = "Tag";
5732
- oe(gt);
5732
+ ae(gt);
5733
5733
  m.addGetterSetter(gt, "pointerDirection", hl);
5734
5734
  m.addGetterSetter(gt, "pointerWidth", 0, L());
5735
5735
  m.addGetterSetter(gt, "pointerHeight", 0, L());
@@ -5741,9 +5741,9 @@ class di extends _ {
5741
5741
  }
5742
5742
  }
5743
5743
  di.prototype.className = "Rect";
5744
- oe(di);
5744
+ ae(di);
5745
5745
  m.addGetterSetter(di, "cornerRadius", 0, qi(4));
5746
- class et extends _ {
5746
+ class Qe extends _ {
5747
5747
  _sceneFunc(e) {
5748
5748
  const t = this._getPoints(), i = this.radius(), r = this.sides(), n = this.cornerRadius();
5749
5749
  if (e.beginPath(), n)
@@ -5789,13 +5789,13 @@ class et extends _ {
5789
5789
  this.radius(e / 2);
5790
5790
  }
5791
5791
  }
5792
- et.prototype.className = "RegularPolygon";
5793
- et.prototype._centroid = !0;
5794
- et.prototype._attrsAffectingSize = ["radius"];
5795
- oe(et);
5796
- m.addGetterSetter(et, "radius", 0, L());
5797
- m.addGetterSetter(et, "sides", 0, L());
5798
- m.addGetterSetter(et, "cornerRadius", 0, qi(4));
5792
+ Qe.prototype.className = "RegularPolygon";
5793
+ Qe.prototype._centroid = !0;
5794
+ Qe.prototype._attrsAffectingSize = ["radius"];
5795
+ ae(Qe);
5796
+ m.addGetterSetter(Qe, "radius", 0, L());
5797
+ m.addGetterSetter(Qe, "sides", 0, L());
5798
+ m.addGetterSetter(Qe, "cornerRadius", 0, qi(4));
5799
5799
  const Pn = Math.PI * 2;
5800
5800
  class ft extends _ {
5801
5801
  _sceneFunc(e) {
@@ -5817,10 +5817,10 @@ class ft extends _ {
5817
5817
  ft.prototype.className = "Ring";
5818
5818
  ft.prototype._centroid = !0;
5819
5819
  ft.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"];
5820
- oe(ft);
5820
+ ae(ft);
5821
5821
  m.addGetterSetter(ft, "innerRadius", 0, L());
5822
5822
  m.addGetterSetter(ft, "outerRadius", 0, L());
5823
- class Me extends _ {
5823
+ class De extends _ {
5824
5824
  constructor(e) {
5825
5825
  super(e), this._updated = !0, this.anim = new xe(() => {
5826
5826
  const t = this._updated;
@@ -5877,20 +5877,20 @@ class Me extends _ {
5877
5877
  e < n - 1 ? this.frameIndex(e + 1) : this.frameIndex(0);
5878
5878
  }
5879
5879
  }
5880
- Me.prototype.className = "Sprite";
5881
- oe(Me);
5882
- m.addGetterSetter(Me, "animation");
5883
- m.addGetterSetter(Me, "animations");
5884
- m.addGetterSetter(Me, "frameOffsets");
5885
- m.addGetterSetter(Me, "image");
5886
- m.addGetterSetter(Me, "frameIndex", 0, L());
5887
- m.addGetterSetter(Me, "frameRate", 17, L());
5888
- m.backCompat(Me, {
5880
+ De.prototype.className = "Sprite";
5881
+ ae(De);
5882
+ m.addGetterSetter(De, "animation");
5883
+ m.addGetterSetter(De, "animations");
5884
+ m.addGetterSetter(De, "frameOffsets");
5885
+ m.addGetterSetter(De, "image");
5886
+ m.addGetterSetter(De, "frameIndex", 0, L());
5887
+ m.addGetterSetter(De, "frameRate", 17, L());
5888
+ m.backCompat(De, {
5889
5889
  index: "frameIndex",
5890
5890
  getIndex: "getFrameIndex",
5891
5891
  setIndex: "setFrameIndex"
5892
5892
  });
5893
- class tt extends _ {
5893
+ class et extends _ {
5894
5894
  _sceneFunc(e) {
5895
5895
  const t = this.innerRadius(), i = this.outerRadius(), r = this.numPoints();
5896
5896
  e.beginPath(), e.moveTo(0, 0 - i);
@@ -5913,14 +5913,14 @@ class tt extends _ {
5913
5913
  this.outerRadius(e / 2);
5914
5914
  }
5915
5915
  }
5916
- tt.prototype.className = "Star";
5917
- tt.prototype._centroid = !0;
5918
- tt.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"];
5919
- oe(tt);
5920
- m.addGetterSetter(tt, "numPoints", 5, L());
5921
- m.addGetterSetter(tt, "innerRadius", 0, L());
5922
- m.addGetterSetter(tt, "outerRadius", 0, L());
5923
- function Xe(s) {
5916
+ et.prototype.className = "Star";
5917
+ et.prototype._centroid = !0;
5918
+ et.prototype._attrsAffectingSize = ["innerRadius", "outerRadius"];
5919
+ ae(et);
5920
+ m.addGetterSetter(et, "numPoints", 5, L());
5921
+ m.addGetterSetter(et, "innerRadius", 0, L());
5922
+ m.addGetterSetter(et, "outerRadius", 0, L());
5923
+ function Ye(s) {
5924
5924
  return [...s].reduce((e, t, i, r) => {
5925
5925
  if (new RegExp("\\p{Emoji}", "u").test(t)) {
5926
5926
  const n = r[i + 1];
@@ -5984,53 +5984,53 @@ class re extends _ {
5984
5984
  if (!D.legacyTextRendering) {
5985
5985
  const I = this.measureSize("M");
5986
5986
  M = "alphabetic";
5987
- const A = (t = I.fontBoundingBoxAscent) !== null && t !== void 0 ? t : I.actualBoundingBoxAscent, k = (i = I.fontBoundingBoxDescent) !== null && i !== void 0 ? i : I.actualBoundingBoxDescent;
5988
- P = (A - k) / 2 + l / 2;
5987
+ const E = (t = I.fontBoundingBoxAscent) !== null && t !== void 0 ? t : I.actualBoundingBoxAscent, k = (i = I.fontBoundingBoxDescent) !== null && i !== void 0 ? i : I.actualBoundingBoxDescent;
5988
+ P = (E - k) / 2 + l / 2;
5989
5989
  }
5990
5990
  for (h === An && e.setAttr("direction", h), e.setAttr("font", this._getContextFont()), e.setAttr("textBaseline", M), e.setAttr("textAlign", ta), c === In ? d = (this.getHeight() - n * l - a * 2) / 2 : c === Sl && (d = this.getHeight() - n * l - a * 2), e.translate(a, d + a), x = 0; x < n; x++) {
5991
- let I = 0, A = 0;
5992
- const k = r[x], $ = k.text, B = k.width, Y = k.lastInParagraph;
5991
+ let I = 0, E = 0;
5992
+ const k = r[x], z = k.text, B = k.width, Y = k.lastInParagraph;
5993
5993
  if (e.save(), u === Cl ? I += g - B - a * 2 : u === ul && (I += (g - B - a * 2) / 2), C) {
5994
5994
  e.save(), e.beginPath();
5995
- const G = b ?? (D.legacyTextRendering ? Math.round(o / 2) : Math.round(o / 4)), O = I, J = P + A + G;
5995
+ const G = b ?? (D.legacyTextRendering ? Math.round(o / 2) : Math.round(o / 4)), O = I, J = P + E + G;
5996
5996
  e.moveTo(O, J);
5997
- const H = u === Rt && !Y ? g - a * 2 : B;
5998
- e.lineTo(O + Math.round(H), J), e.lineWidth = o / 15;
5997
+ const N = u === Rt && !Y ? g - a * 2 : B;
5998
+ e.lineTo(O + Math.round(N), J), e.lineWidth = o / 15;
5999
5999
  const q = this._getLinearGradient();
6000
6000
  e.strokeStyle = q || S, e.stroke(), e.restore();
6001
6001
  }
6002
6002
  const V = I;
6003
6003
  if (h !== An && (f !== 0 || u === Rt || y)) {
6004
- const G = $.split(" ").length - 1, O = Xe($);
6004
+ const G = z.split(" ").length - 1, O = Ye(z);
6005
6005
  for (let J = 0; J < O.length; J++) {
6006
- const H = O[J];
6007
- if (H === " " && !Y && u === Rt && (I += (g - a * 2 - B) / G), this._partialTextX = I, this._partialTextY = P + A, this._partialText = H, y) {
6006
+ const N = O[J];
6007
+ if (N === " " && !Y && u === Rt && (I += (g - a * 2 - B) / G), this._partialTextX = I, this._partialTextY = P + E, this._partialText = N, y) {
6008
6008
  e.save();
6009
- const ne = r.slice(0, x).reduce((le, pe) => le + Xe(pe.text).length, 0), W = J + ne;
6009
+ const ne = r.slice(0, x).reduce((le, pe) => le + Ye(pe.text).length, 0), W = J + ne;
6010
6010
  y({
6011
- char: H,
6011
+ char: N,
6012
6012
  index: W,
6013
6013
  x: I,
6014
- y: P + A,
6014
+ y: P + E,
6015
6015
  lineIndex: x,
6016
6016
  column: J,
6017
6017
  isLastInLine: Y,
6018
- width: this.measureSize(H).width,
6018
+ width: this.measureSize(N).width,
6019
6019
  context: e
6020
6020
  });
6021
6021
  }
6022
- e.fillStrokeShape(this), y && e.restore(), I += this.measureSize(H).width + f;
6022
+ e.fillStrokeShape(this), y && e.restore(), I += this.measureSize(N).width + f;
6023
6023
  }
6024
6024
  } else
6025
- f !== 0 && e.setAttr("letterSpacing", `${f}px`), this._partialTextX = I, this._partialTextY = P + A, this._partialText = $, e.fillStrokeShape(this);
6025
+ f !== 0 && e.setAttr("letterSpacing", `${f}px`), this._partialTextX = I, this._partialTextY = P + E, this._partialText = z, e.fillStrokeShape(this);
6026
6026
  if (w) {
6027
6027
  e.save(), e.beginPath();
6028
6028
  const G = D.legacyTextRendering ? 0 : -Math.round(o / 4), O = V;
6029
- e.moveTo(O, P + A + G);
6029
+ e.moveTo(O, P + E + G);
6030
6030
  const J = u === Rt && !Y ? g - a * 2 : B;
6031
- e.lineTo(O + Math.round(J), P + A + G), e.lineWidth = o / 15;
6032
- const H = this._getLinearGradient();
6033
- e.strokeStyle = H || S, e.stroke(), e.restore();
6031
+ e.lineTo(O + Math.round(J), P + E + G), e.lineWidth = o / 15;
6032
+ const N = this._getLinearGradient();
6033
+ e.strokeStyle = N || S, e.stroke(), e.restore();
6034
6034
  }
6035
6035
  e.restore(), n > 1 && (P += l);
6036
6036
  }
@@ -6101,28 +6101,28 @@ class re extends _ {
6101
6101
  let w = e[b], x = this._getTextWidth(w);
6102
6102
  if (o && x > h)
6103
6103
  for (; w.length > 0; ) {
6104
- let P = 0, M = Xe(w).length, I = "", A = 0;
6104
+ let P = 0, M = Ye(w).length, I = "", E = 0;
6105
6105
  for (; P < M; ) {
6106
- const k = P + M >>> 1, $ = Xe(w), B = $.slice(0, k + 1).join(""), Y = this._getTextWidth(B);
6107
- (S && l && u + r > d ? Y + v : Y) <= h ? (P = k + 1, I = B, A = Y) : M = k;
6106
+ const k = P + M >>> 1, z = Ye(w), B = z.slice(0, k + 1).join(""), Y = this._getTextWidth(B);
6107
+ (S && l && u + r > d ? Y + v : Y) <= h ? (P = k + 1, I = B, E = Y) : M = k;
6108
6108
  }
6109
6109
  if (I) {
6110
6110
  if (y) {
6111
- const B = Xe(w), Y = Xe(I), V = B[Y.length], G = V === ki || V === _n;
6111
+ const B = Ye(w), Y = Ye(I), V = B[Y.length], G = V === ki || V === _n;
6112
6112
  let O;
6113
- if (G && A <= h)
6113
+ if (G && E <= h)
6114
6114
  O = Y.length;
6115
6115
  else {
6116
- const J = Y.lastIndexOf(ki), H = Y.lastIndexOf(_n);
6117
- O = Math.max(J, H) + 1;
6116
+ const J = Y.lastIndexOf(ki), N = Y.lastIndexOf(_n);
6117
+ O = Math.max(J, N) + 1;
6118
6118
  }
6119
- O > 0 && (P = O, I = B.slice(0, P).join(""), A = this._getTextWidth(I));
6119
+ O > 0 && (P = O, I = B.slice(0, P).join(""), E = this._getTextWidth(I));
6120
6120
  }
6121
- if (I = I.trimRight(), this._addTextLine(I), i = Math.max(i, A), u += r, this._shouldHandleEllipsis(u)) {
6121
+ if (I = I.trimRight(), this._addTextLine(I), i = Math.max(i, E), u += r, this._shouldHandleEllipsis(u)) {
6122
6122
  this._tryToAddEllipsisToLastLine();
6123
6123
  break;
6124
6124
  }
6125
- if (w = Xe(w).slice(P).join("").trimLeft(), w.length > 0 && (x = this._getTextWidth(w), x <= h)) {
6125
+ if (w = Ye(w).slice(P).join("").trimLeft(), w.length > 0 && (x = this._getTextWidth(w), x <= h)) {
6126
6126
  this._addTextLine(w), u += r, i = Math.max(i, x);
6127
6127
  break;
6128
6128
  }
@@ -6163,7 +6163,7 @@ re.prototype._attrsAffectingSize = [
6163
6163
  "lineHeight",
6164
6164
  "letterSpacing"
6165
6165
  ];
6166
- oe(re);
6166
+ ae(re);
6167
6167
  m.overWriteSetter(re, "width", jr());
6168
6168
  m.overWriteSetter(re, "height", jr());
6169
6169
  m.addGetterSetter(re, "direction", ea);
@@ -6176,7 +6176,7 @@ m.addGetterSetter(re, "align", ta);
6176
6176
  m.addGetterSetter(re, "verticalAlign", yl);
6177
6177
  m.addGetterSetter(re, "lineHeight", 1, L());
6178
6178
  m.addGetterSetter(re, "wrap", bl);
6179
- m.addGetterSetter(re, "ellipsis", !1, Ae());
6179
+ m.addGetterSetter(re, "ellipsis", !1, Ie());
6180
6180
  m.addGetterSetter(re, "letterSpacing", 0, L());
6181
6181
  m.addGetterSetter(re, "text", "", dt());
6182
6182
  m.addGetterSetter(re, "textDecoration", "");
@@ -6262,7 +6262,7 @@ class he extends _ {
6262
6262
  };
6263
6263
  }
6264
6264
  _setTextData() {
6265
- const e = Xe(this.text()), t = [];
6265
+ const e = Ye(this.text()), t = [];
6266
6266
  let i = 0;
6267
6267
  for (let d = 0; d < e.length; d++)
6268
6268
  t.push({
@@ -6343,7 +6343,7 @@ he.prototype._fillFuncHit = sa;
6343
6343
  he.prototype._strokeFuncHit = aa;
6344
6344
  he.prototype.className = "TextPath";
6345
6345
  he.prototype._attrsAffectingSize = ["text", "fontSize", "data"];
6346
- oe(he);
6346
+ ae(he);
6347
6347
  m.addGetterSetter(he, "data");
6348
6348
  m.addGetterSetter(he, "fontFamily", "Arial");
6349
6349
  m.addGetterSetter(he, "fontSize", 12, L());
@@ -6672,7 +6672,7 @@ class X extends wt {
6672
6672
  const C = D.getAngle(this.rotateAnchorAngle());
6673
6673
  let w = Math.atan2(-i, t) + Math.PI / 2 - C;
6674
6674
  b.height < 0 && (w -= Math.PI);
6675
- const P = D.getAngle(this.rotation()) + w, M = D.getAngle(this.rotationSnapTolerance()), A = Bl(this.rotationSnaps(), P, M) - b.rotation, k = Ol(b, A);
6675
+ const P = D.getAngle(this.rotation()) + w, M = D.getAngle(this.rotationSnapTolerance()), E = Bl(this.rotationSnaps(), P, M) - b.rotation, k = Ol(b, E);
6676
6676
  this._fitNodesInto(k, e);
6677
6677
  return;
6678
6678
  }
@@ -6964,9 +6964,9 @@ function Fl(s) {
6964
6964
  }), s || [];
6965
6965
  }
6966
6966
  X.prototype.className = "Transformer";
6967
- oe(X);
6967
+ ae(X);
6968
6968
  m.addGetterSetter(X, "enabledAnchors", $i, Fl);
6969
- m.addGetterSetter(X, "flipEnabled", !0, Ae());
6969
+ m.addGetterSetter(X, "flipEnabled", !0, Ie());
6970
6970
  m.addGetterSetter(X, "resizeEnabled", !0);
6971
6971
  m.addGetterSetter(X, "anchorSize", 10, L());
6972
6972
  m.addGetterSetter(X, "rotateEnabled", !0);
@@ -7001,7 +7001,7 @@ m.backCompat(X, {
7001
7001
  rotateHandlerOffset: "rotateAnchorOffset",
7002
7002
  enabledHandlers: "enabledAnchors"
7003
7003
  });
7004
- class Ne extends _ {
7004
+ class He extends _ {
7005
7005
  _sceneFunc(e) {
7006
7006
  e.beginPath(), e.arc(0, 0, this.radius(), 0, D.getAngle(this.angle()), this.clockwise()), e.lineTo(0, 0), e.closePath(), e.fillStrokeShape(this);
7007
7007
  }
@@ -7018,14 +7018,14 @@ class Ne extends _ {
7018
7018
  this.radius(e / 2);
7019
7019
  }
7020
7020
  }
7021
- Ne.prototype.className = "Wedge";
7022
- Ne.prototype._centroid = !0;
7023
- Ne.prototype._attrsAffectingSize = ["radius"];
7024
- oe(Ne);
7025
- m.addGetterSetter(Ne, "radius", 0, L());
7026
- m.addGetterSetter(Ne, "angle", 0, L());
7027
- m.addGetterSetter(Ne, "clockwise", !1);
7028
- m.backCompat(Ne, {
7021
+ He.prototype.className = "Wedge";
7022
+ He.prototype._centroid = !0;
7023
+ He.prototype._attrsAffectingSize = ["radius"];
7024
+ ae(He);
7025
+ m.addGetterSetter(He, "radius", 0, L());
7026
+ m.addGetterSetter(He, "angle", 0, L());
7027
+ m.addGetterSetter(He, "clockwise", !1);
7028
+ m.backCompat(He, {
7029
7029
  angleDeg: "angle",
7030
7030
  getAngleDeg: "getAngle",
7031
7031
  setAngleDeg: "setAngle"
@@ -7549,32 +7549,32 @@ const Gl = [
7549
7549
  function Nl(s, e) {
7550
7550
  const t = s.data, i = s.width, r = s.height;
7551
7551
  let n, a, o, l, c, h, d, u, g, f, y, S, v, b, C, w, x, P, M, I;
7552
- const A = e + e + 1, k = i - 1, $ = r - 1, B = e + 1, Y = B * (B + 1) / 2, V = new Ln(), G = Gl[e], O = Hl[e];
7553
- let J = null, H = V, q = null, ne = null;
7554
- for (let W = 1; W < A; W++)
7555
- H = H.next = new Ln(), W === B && (J = H);
7556
- H.next = V, o = a = 0;
7552
+ const E = e + e + 1, k = i - 1, z = r - 1, B = e + 1, Y = B * (B + 1) / 2, V = new Ln(), G = Gl[e], O = Hl[e];
7553
+ let J = null, N = V, q = null, ne = null;
7554
+ for (let W = 1; W < E; W++)
7555
+ N = N.next = new Ln(), W === B && (J = N);
7556
+ N.next = V, o = a = 0;
7557
7557
  for (let W = 0; W < r; W++) {
7558
- S = v = b = C = l = c = h = d = 0, u = B * (w = t[a]), g = B * (x = t[a + 1]), f = B * (P = t[a + 2]), y = B * (M = t[a + 3]), l += Y * w, c += Y * x, h += Y * P, d += Y * M, H = V;
7558
+ S = v = b = C = l = c = h = d = 0, u = B * (w = t[a]), g = B * (x = t[a + 1]), f = B * (P = t[a + 2]), y = B * (M = t[a + 3]), l += Y * w, c += Y * x, h += Y * P, d += Y * M, N = V;
7559
7559
  for (let le = 0; le < B; le++)
7560
- H.r = w, H.g = x, H.b = P, H.a = M, H = H.next;
7560
+ N.r = w, N.g = x, N.b = P, N.a = M, N = N.next;
7561
7561
  for (let le = 1; le < B; le++)
7562
- n = a + ((k < le ? k : le) << 2), l += (H.r = w = t[n]) * (I = B - le), c += (H.g = x = t[n + 1]) * I, h += (H.b = P = t[n + 2]) * I, d += (H.a = M = t[n + 3]) * I, S += w, v += x, b += P, C += M, H = H.next;
7562
+ n = a + ((k < le ? k : le) << 2), l += (N.r = w = t[n]) * (I = B - le), c += (N.g = x = t[n + 1]) * I, h += (N.b = P = t[n + 2]) * I, d += (N.a = M = t[n + 3]) * I, S += w, v += x, b += P, C += M, N = N.next;
7563
7563
  q = V, ne = J;
7564
7564
  for (let le = 0; le < i; le++)
7565
7565
  t[a + 3] = M = d * G >> O, M !== 0 ? (M = 255 / M, t[a] = (l * G >> O) * M, t[a + 1] = (c * G >> O) * M, t[a + 2] = (h * G >> O) * M) : t[a] = t[a + 1] = t[a + 2] = 0, l -= u, c -= g, h -= f, d -= y, u -= q.r, g -= q.g, f -= q.b, y -= q.a, n = o + ((n = le + e + 1) < k ? n : k) << 2, S += q.r = t[n], v += q.g = t[n + 1], b += q.b = t[n + 2], C += q.a = t[n + 3], l += S, c += v, h += b, d += C, q = q.next, u += w = ne.r, g += x = ne.g, f += P = ne.b, y += M = ne.a, S -= w, v -= x, b -= P, C -= M, ne = ne.next, a += 4;
7566
7566
  o += i;
7567
7567
  }
7568
7568
  for (let W = 0; W < i; W++) {
7569
- v = b = C = S = c = h = d = l = 0, a = W << 2, u = B * (w = t[a]), g = B * (x = t[a + 1]), f = B * (P = t[a + 2]), y = B * (M = t[a + 3]), l += Y * w, c += Y * x, h += Y * P, d += Y * M, H = V;
7569
+ v = b = C = S = c = h = d = l = 0, a = W << 2, u = B * (w = t[a]), g = B * (x = t[a + 1]), f = B * (P = t[a + 2]), y = B * (M = t[a + 3]), l += Y * w, c += Y * x, h += Y * P, d += Y * M, N = V;
7570
7570
  for (let pe = 0; pe < B; pe++)
7571
- H.r = w, H.g = x, H.b = P, H.a = M, H = H.next;
7571
+ N.r = w, N.g = x, N.b = P, N.a = M, N = N.next;
7572
7572
  let le = i;
7573
7573
  for (let pe = 1; pe <= e; pe++)
7574
- a = le + W << 2, l += (H.r = w = t[a]) * (I = B - pe), c += (H.g = x = t[a + 1]) * I, h += (H.b = P = t[a + 2]) * I, d += (H.a = M = t[a + 3]) * I, S += w, v += x, b += P, C += M, H = H.next, pe < $ && (le += i);
7574
+ a = le + W << 2, l += (N.r = w = t[a]) * (I = B - pe), c += (N.g = x = t[a + 1]) * I, h += (N.b = P = t[a + 2]) * I, d += (N.a = M = t[a + 3]) * I, S += w, v += x, b += P, C += M, N = N.next, pe < z && (le += i);
7575
7575
  a = W, q = V, ne = J;
7576
7576
  for (let pe = 0; pe < r; pe++)
7577
- n = a << 2, t[n + 3] = M = d * G >> O, M > 0 ? (M = 255 / M, t[n] = (l * G >> O) * M, t[n + 1] = (c * G >> O) * M, t[n + 2] = (h * G >> O) * M) : t[n] = t[n + 1] = t[n + 2] = 0, l -= u, c -= g, h -= f, d -= y, u -= q.r, g -= q.g, f -= q.b, y -= q.a, n = W + ((n = pe + B) < $ ? n : $) * i << 2, l += S += q.r = t[n], c += v += q.g = t[n + 1], h += b += q.b = t[n + 2], d += C += q.a = t[n + 3], q = q.next, u += w = ne.r, g += x = ne.g, f += P = ne.b, y += M = ne.a, S -= w, v -= x, b -= P, C -= M, ne = ne.next, a += i;
7577
+ n = a << 2, t[n + 3] = M = d * G >> O, M > 0 ? (M = 255 / M, t[n] = (l * G >> O) * M, t[n + 1] = (c * G >> O) * M, t[n + 2] = (h * G >> O) * M) : t[n] = t[n + 1] = t[n + 2] = 0, l -= u, c -= g, h -= f, d -= y, u -= q.r, g -= q.g, f -= q.b, y -= q.a, n = W + ((n = pe + B) < z ? n : z) * i << 2, l += S += q.r = t[n], c += v += q.g = t[n + 1], h += b += q.b = t[n + 2], d += C += q.a = t[n + 3], q = q.next, u += w = ne.r, g += x = ne.g, f += P = ne.b, y += M = ne.a, S -= w, v -= x, b -= P, C -= M, ne = ne.next, a += i;
7578
7578
  }
7579
7579
  }
7580
7580
  const $l = function(e) {
@@ -7610,16 +7610,16 @@ const Wl = function(s) {
7610
7610
  bottom: 90,
7611
7611
  "bottom-left": 45,
7612
7612
  left: 0
7613
- }[(a = (n = this.embossDirection) === null || n === void 0 ? void 0 : n.call(this)) !== null && a !== void 0 ? a : "top-left"]) !== null && o !== void 0 ? o : 315, v = !!((c = (l = this.embossBlend) === null || l === void 0 ? void 0 : l.call(this)) !== null && c !== void 0 && c), b = g * 10, C = f * 255, w = S * Math.PI / 180, x = Math.cos(w), P = Math.sin(w), M = 128 / 1020 * b, I = new Uint8ClampedArray(h), A = new Float32Array(d * u);
7613
+ }[(a = (n = this.embossDirection) === null || n === void 0 ? void 0 : n.call(this)) !== null && a !== void 0 ? a : "top-left"]) !== null && o !== void 0 ? o : 315, v = !!((c = (l = this.embossBlend) === null || l === void 0 ? void 0 : l.call(this)) !== null && c !== void 0 && c), b = g * 10, C = f * 255, w = S * Math.PI / 180, x = Math.cos(w), P = Math.sin(w), M = 128 / 1020 * b, I = new Uint8ClampedArray(h), E = new Float32Array(d * u);
7614
7614
  for (let V = 0, G = 0; G < h.length; G += 4, V++)
7615
- A[V] = 0.2126 * I[G] + 0.7152 * I[G + 1] + 0.0722 * I[G + 2];
7616
- const k = [-1, 0, 1, -2, 0, 2, -1, 0, 1], $ = [-1, -2, -1, 0, 0, 0, 1, 2, 1], B = [-d - 1, -d, -d + 1, -1, 0, 1, d - 1, d, d + 1], Y = (V) => V < 0 ? 0 : V > 255 ? 255 : V;
7615
+ E[V] = 0.2126 * I[G] + 0.7152 * I[G + 1] + 0.0722 * I[G + 2];
7616
+ const k = [-1, 0, 1, -2, 0, 2, -1, 0, 1], z = [-1, -2, -1, 0, 0, 0, 1, 2, 1], B = [-d - 1, -d, -d + 1, -1, 0, 1, d - 1, d, d + 1], Y = (V) => V < 0 ? 0 : V > 255 ? 255 : V;
7617
7617
  for (let V = 1; V < u - 1; V++)
7618
7618
  for (let G = 1; G < d - 1; G++) {
7619
7619
  const O = V * d + G;
7620
- let J = 0, H = 0;
7621
- J += A[O + B[0]] * k[0], H += A[O + B[0]] * $[0], J += A[O + B[1]] * k[1], H += A[O + B[1]] * $[1], J += A[O + B[2]] * k[2], H += A[O + B[2]] * $[2], J += A[O + B[3]] * k[3], H += A[O + B[3]] * $[3], J += A[O + B[5]] * k[5], H += A[O + B[5]] * $[5], J += A[O + B[6]] * k[6], H += A[O + B[6]] * $[6], J += A[O + B[7]] * k[7], H += A[O + B[7]] * $[7], J += A[O + B[8]] * k[8], H += A[O + B[8]] * $[8];
7622
- const q = x * J + P * H, ne = Y(C + q * M), W = O * 4;
7620
+ let J = 0, N = 0;
7621
+ J += E[O + B[0]] * k[0], N += E[O + B[0]] * z[0], J += E[O + B[1]] * k[1], N += E[O + B[1]] * z[1], J += E[O + B[2]] * k[2], N += E[O + B[2]] * z[2], J += E[O + B[3]] * k[3], N += E[O + B[3]] * z[3], J += E[O + B[5]] * k[5], N += E[O + B[5]] * z[5], J += E[O + B[6]] * k[6], N += E[O + B[6]] * z[6], J += E[O + B[7]] * k[7], N += E[O + B[7]] * z[7], J += E[O + B[8]] * k[8], N += E[O + B[8]] * z[8];
7622
+ const q = x * J + P * N, ne = Y(C + q * M), W = O * 4;
7623
7623
  if (v) {
7624
7624
  const le = ne - C;
7625
7625
  h[W] = Y(I[W] + le), h[W + 1] = Y(I[W + 1] + le), h[W + 2] = Y(I[W + 2] + le), h[W + 3] = I[W + 3];
@@ -7730,8 +7730,8 @@ const Kl = function(s) {
7730
7730
  let x = (Math.atan2(C, b) * 180 / Math.PI + 360 + y) % 360;
7731
7731
  x = x * f / 360, S = Math.floor(x), v = Math.floor(w);
7732
7732
  let P = (v * n + S) * 4;
7733
- const M = i[P + 0], I = i[P + 1], A = i[P + 2], k = i[P + 3];
7734
- P = (d * n + h) * 4, r[P + 0] = M, r[P + 1] = I, r[P + 2] = A, r[P + 3] = k;
7733
+ const M = i[P + 0], I = i[P + 1], E = i[P + 2], k = i[P + 3];
7734
+ P = (d * n + h) * 4, r[P + 0] = M, r[P + 1] = I, r[P + 2] = E, r[P + 3] = k;
7735
7735
  }
7736
7736
  }, Ql = function(s) {
7737
7737
  const e = s.width, t = s.height;
@@ -7961,24 +7961,24 @@ const uc = function(s) {
7961
7961
  };
7962
7962
  m.addGetterSetter(R, "threshold", 0.5, L(), m.afterSetFilter);
7963
7963
  const j = bn.Util._assign(bn, {
7964
- Arc: Ge,
7964
+ Arc: Fe,
7965
7965
  Arrow: pt,
7966
7966
  Circle: Pt,
7967
- Ellipse: Qe,
7968
- Image: Ee,
7967
+ Ellipse: Je,
7968
+ Image: Ae,
7969
7969
  Label: Zr,
7970
7970
  Tag: gt,
7971
- Line: He,
7971
+ Line: Ge,
7972
7972
  Path: ie,
7973
7973
  Rect: di,
7974
- RegularPolygon: et,
7974
+ RegularPolygon: Qe,
7975
7975
  Ring: ft,
7976
- Sprite: Me,
7977
- Star: tt,
7976
+ Sprite: De,
7977
+ Star: et,
7978
7978
  Text: re,
7979
7979
  TextPath: he,
7980
7980
  Transformer: X,
7981
- Wedge: Ne,
7981
+ Wedge: He,
7982
7982
  Filters: {
7983
7983
  Blur: $l,
7984
7984
  Brightness: Vl,
@@ -8001,7 +8001,7 @@ const j = bn.Util._assign(bn, {
8001
8001
  Solarize: pc,
8002
8002
  Threshold: gc
8003
8003
  }
8004
- }), ca = "media-editor-track.diagnostics.v1", Or = "media-editor-track.diagnostics.failure-window.v1", ha = "media-editor-track-diagnostics", Ke = "snapshots", da = "state", ua = "latest-failure-window", ni = 1, Jr = 1, Dn = 40, fc = 48, mc = 250, Mn = 20, yc = 100, Sc = /* @__PURE__ */ new Set([
8004
+ }), ca = "media-editor-track.diagnostics.v1", Or = "media-editor-track.diagnostics.failure-window.v1", ha = "media-editor-track-diagnostics", qe = "snapshots", da = "state", ua = "latest-failure-window", ni = 1, Jr = 1, Dn = 40, fc = 48, mc = 250, Mn = 20, yc = 100, Sc = /* @__PURE__ */ new Set([
8005
8005
  "pending-preview.begin",
8006
8006
  "preview.sync.requested",
8007
8007
  "media.seeking",
@@ -8011,7 +8011,7 @@ const j = bn.Util._assign(bn, {
8011
8011
  info: 20,
8012
8012
  warn: 30,
8013
8013
  error: 40
8014
- }, $e = {
8014
+ }, Ne = {
8015
8015
  enabled: !0,
8016
8016
  persist: !0,
8017
8017
  storageQuotaMb: 10,
@@ -8216,14 +8216,14 @@ function xc(s, e) {
8216
8216
  }
8217
8217
  function Pc(s) {
8218
8218
  return {
8219
- enabled: (s == null ? void 0 : s.enabled) ?? $e.enabled,
8220
- persist: (s == null ? void 0 : s.persist) ?? $e.persist,
8221
- storageQuotaMb: (s == null ? void 0 : s.storageQuotaMb) ?? $e.storageQuotaMb,
8222
- maxSessions: Math.max(1, (s == null ? void 0 : s.maxSessions) ?? $e.maxSessions),
8223
- maxHotEvents: Math.max(20, (s == null ? void 0 : s.maxHotEvents) ?? $e.maxHotEvents),
8224
- includeFullSourceUrl: (s == null ? void 0 : s.includeFullSourceUrl) ?? $e.includeFullSourceUrl,
8225
- enablePanel: (s == null ? void 0 : s.enablePanel) ?? $e.enablePanel,
8226
- consoleSeverityThreshold: (s == null ? void 0 : s.consoleSeverityThreshold) ?? $e.consoleSeverityThreshold
8219
+ enabled: (s == null ? void 0 : s.enabled) ?? Ne.enabled,
8220
+ persist: (s == null ? void 0 : s.persist) ?? Ne.persist,
8221
+ storageQuotaMb: (s == null ? void 0 : s.storageQuotaMb) ?? Ne.storageQuotaMb,
8222
+ maxSessions: Math.max(1, (s == null ? void 0 : s.maxSessions) ?? Ne.maxSessions),
8223
+ maxHotEvents: Math.max(20, (s == null ? void 0 : s.maxHotEvents) ?? Ne.maxHotEvents),
8224
+ includeFullSourceUrl: (s == null ? void 0 : s.includeFullSourceUrl) ?? Ne.includeFullSourceUrl,
8225
+ enablePanel: (s == null ? void 0 : s.enablePanel) ?? Ne.enablePanel,
8226
+ consoleSeverityThreshold: (s == null ? void 0 : s.consoleSeverityThreshold) ?? Ne.consoleSeverityThreshold
8227
8227
  };
8228
8228
  }
8229
8229
  function _c() {
@@ -8288,12 +8288,12 @@ async function ma(s, e) {
8288
8288
  const n = indexedDB.open(ha, 1);
8289
8289
  n.onupgradeneeded = () => {
8290
8290
  const a = n.result;
8291
- a.objectStoreNames.contains(Ke) || a.createObjectStore(Ke);
8291
+ a.objectStoreNames.contains(qe) || a.createObjectStore(qe);
8292
8292
  }, n.onsuccess = () => i(n.result), n.onerror = () => r(n.error);
8293
8293
  });
8294
8294
  return await new Promise((i, r) => {
8295
- const n = t.transaction(Ke, "readwrite");
8296
- n.objectStore(Ke).put(e, s), n.oncomplete = () => i(), n.onerror = () => r(n.error), n.onabort = () => r(n.error);
8295
+ const n = t.transaction(qe, "readwrite");
8296
+ n.objectStore(qe).put(e, s), n.oncomplete = () => i(), n.onerror = () => r(n.error), n.onabort = () => r(n.error);
8297
8297
  }), t.close(), !0;
8298
8298
  } catch {
8299
8299
  return !1;
@@ -8315,10 +8315,10 @@ async function ya(s) {
8315
8315
  const n = indexedDB.open(ha, 1);
8316
8316
  n.onupgradeneeded = () => {
8317
8317
  const a = n.result;
8318
- a.objectStoreNames.contains(Ke) || a.createObjectStore(Ke);
8318
+ a.objectStoreNames.contains(qe) || a.createObjectStore(qe);
8319
8319
  }, n.onsuccess = () => i(n.result), n.onerror = () => r(n.error);
8320
8320
  }), t = await new Promise((i, r) => {
8321
- const o = e.transaction(Ke, "readonly").objectStore(Ke).get(s);
8321
+ const o = e.transaction(qe, "readonly").objectStore(qe).get(s);
8322
8322
  o.onsuccess = () => i(o.result ?? null), o.onerror = () => r(o.error);
8323
8323
  });
8324
8324
  return e.close(), t;
@@ -8767,7 +8767,7 @@ const F = {
8767
8767
  Hn("error", s, e, t);
8768
8768
  }
8769
8769
  };
8770
- class De {
8770
+ class Le {
8771
8771
  static clearImageCache() {
8772
8772
  this.imageCache = {}, this.keyframeDimensionsCache = {}, this.keyframeDimensionsPromiseCache = {};
8773
8773
  }
@@ -8950,7 +8950,7 @@ class De {
8950
8950
  delete this.imageCache[e], delete this.keyframeDimensionsCache[e], delete this.keyframeDimensionsPromiseCache[e];
8951
8951
  }
8952
8952
  }
8953
- p(De, "MIN_IMAGE_DISPLAY_WIDTH", 24), p(De, "COVER_RENDER_VERSION_KEY", "_coverRenderVersion"), p(De, "MAX_CACHE_SIZE", 1e3), p(De, "DEFAULT_DIMENSIONS", { width: 160, height: 90 }), p(De, "keyframeDimensionsCache", {}), p(De, "keyframeDimensionsPromiseCache", {}), p(De, "imageCache", {});
8953
+ p(Le, "MIN_IMAGE_DISPLAY_WIDTH", 24), p(Le, "COVER_RENDER_VERSION_KEY", "_coverRenderVersion"), p(Le, "MAX_CACHE_SIZE", 1e3), p(Le, "DEFAULT_DIMENSIONS", { width: 160, height: 90 }), p(Le, "keyframeDimensionsCache", {}), p(Le, "keyframeDimensionsPromiseCache", {}), p(Le, "imageCache", {});
8954
8954
  const Gc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><path d="M1.8437804474494934,2.934130300488281C2.0975289474494936,2.6803818004882816,2.5560352474494934,2.5258255004882812,3.4537861474494935,2.5258255004882812L7.691924847449493,2.5258255004882812C8.589675247449494,2.5258255004882812,9.048181847449493,2.6803818004882816,9.301930747449493,2.934130300488281C9.555688247449494,3.1878788004882814,9.710234947449493,3.6463940004882813,9.710234947449493,4.544136000488281L9.710234947449493,5.154385800488281L9.710234947449493,5.156664400488282L9.710234947449493,8.837531600488282L9.710234947449493,8.839810400488282L9.710234947449493,9.455756700488282C9.710234947449493,10.352920500488281,9.554433147449494,10.811444300488281,9.299509347449494,11.065193200488281C9.045182547449494,11.319528600488281,8.586177147449494,11.474209800488282,7.691924847449493,11.474209800488282L3.4537861474494935,11.474209800488282C2.6371141474494935,11.474209800488282,2.1565246474494932,11.20751000048828,1.8706969474494934,10.86509900048828C1.5731912474494933,10.50867840048828,1.4354756474494934,10.006423900488281,1.4354756474494934,9.455756700488282L1.4354756474494934,4.544136000488281C1.4354756474494934,3.6463940004882813,1.5900319474494935,3.1878788004882814,1.8437804474494934,2.934130300488281ZM9.917876547449493,11.684700500488281C10.391550347449494,11.212192500488282,10.559057547449493,10.52217200048828,10.582387647449494,9.67692760048828L11.516774647449493,10.33260820048828L11.516774647449493,10.33260820048828C11.978190647449493,10.658107800488281,12.521887647449493,10.806299200488281,12.992055647449494,10.562466600488282C13.461642647449493,10.318055200488281,13.653574647449494,9.787735900488281,13.653574647449494,9.222480300488282L13.653574647449494,4.777554700488281C13.653574647449494,4.212299300488281,13.461625647449493,3.6825676004882815,12.992624647449494,3.437568500488281C12.523623647449494,3.1925697004882814,11.980024647449493,3.3384564004882815,11.519194647449494,3.6604486004882815L11.518056647449493,3.661018400488281L10.582387647449494,4.3178380004882815C10.558470047449493,3.475504500488281,10.392209347449493,2.7870953004882812,9.920297947449493,2.315762820488281C9.406961747449493,1.8024266504882813,8.637509647449493,1.6508255004882812,7.691924847449493,1.6508255004882812L3.4537861474494935,1.6508255004882812C2.5082015474494934,1.6508255004882812,1.7387490474494933,1.8024266504882813,1.2254129674494934,2.315762820488281C0.7120767974494934,2.8290989004882814,0.5604756474494934,3.598560200488281,0.5604756474494934,4.544136000488281L0.5604756474494934,9.455756700488282C0.5604756474494934,10.13592340048828,0.7290598274494934,10.86171720048828,1.1986388574494935,11.42521860048828C1.6798959474494934,12.003300500488281,2.4271137474494937,12.349209500488282,3.4537861474494935,12.349209500488282L7.691924847449493,12.349209500488282C8.635176947449493,12.349209500488282,9.403962447449494,12.197448500488282,9.917876547449493,11.684700500488281ZM12.020781647449493,9.61682840048828L10.585234647449493,8.609952000488281L10.585234647449493,5.384101600488281L12.019642647449494,4.377937300488281L12.020212647449494,4.3773675004882815C12.352129647449493,4.145782500488281,12.531874647449493,4.183709400488281,12.587880647449493,4.212877700488281C12.643876647449494,4.242046400488281,12.778574647449494,4.368635700488282,12.778574647449494,4.777554700488281L12.778574647449494,9.222480300488282C12.778574647449494,9.631399600488281,12.643866647449494,9.757436800488282,12.588449647449494,9.786018400488281C12.533620647449494,9.814020200488281,12.354416647449494,9.852481800488281,12.021921647449494,9.617398300488281L12.020781647449493,9.61682840048828ZM3.3313089474494935,3.9374466004882813C3.0898080474494933,3.9374466004882813,2.8938089474494935,4.133445700488281,2.8938089474494935,4.374946600488281C2.8938089474494935,4.616447400488282,3.0898080474494933,4.812446600488281,3.3313089474494935,4.812446600488281L4.815419447449494,4.812446600488281C5.056920347449493,4.812446600488281,5.252919447449494,4.616447400488282,5.252919447449494,4.374946600488281C5.252919447449494,4.133445700488281,5.056920347449493,3.9374466004882813,4.815419447449494,3.9374466004882813L3.3313089474494935,3.9374466004882813Z" fill="#868A9C" fill-opacity="1"/></svg>', Hc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><path d="M11.206380472434997,2.733718973069763C9.993001372434998,1.991438673069763,8.552978872434998,1.6945722130697631,7.139648772434998,1.8937121730697632C5.7263186724349975,2.092858673069763,4.426350972434998,2.775678773069763,3.4596355724349976,3.825838973069763C2.4930013724349975,4.875998873069763,1.9263509724349976,6.228518873069763,1.8396810724349975,7.652945373069763C1.7596843224349974,9.077412973069762,2.1796875724349976,10.485612273069764,3.0196941724349977,11.637611373069763C3.8597005724349978,12.789678373069764,5.0796712724349975,13.614278373069762,6.459635572434998,13.970879373069764C7.839681072434997,14.327545373069762,9.299641972434998,14.194145373069762,10.593017972434998,13.593478373069763C11.892985472434997,12.992878373069763,12.933024472434997,11.962078373069764,13.552978472434997,10.676812573069764C14.173015472434997,9.391545673069762,14.326335472434998,7.9312790730697635,13.993001472434997,6.544878873069763C13.926350472434997,6.276532073069763,14.093017472434997,6.0061725730697635,14.359700472434998,5.941012273069763C14.626302472434997,5.875851973069763,14.899658472434998,6.040565873069763,14.966308472434998,6.308912673069763C15.353027472434997,7.920145873069763,15.173015472434997,9.617145873069763,14.453044472434998,11.110879373069762C13.732991472434998,12.604545373069763,12.519694472434997,13.802478373069762,11.019694472434997,14.500545373069762C9.513020872434998,15.198611373069763,7.812988672434997,15.353611373069763,6.2063802724349975,14.939145373069763C4.599690772434998,14.524678373069763,3.1930340724349975,13.566345373069764,2.2129720724349973,12.227478373069763C1.2329915724349976,10.888679373069763,0.7530111074349976,9.252079373069764,0.8463542074349976,7.5966790730697635C0.9396973124349975,5.941252573069764,1.5996907924349975,4.369405673069763,2.726318472434998,3.1489456730697634C3.8463543724349973,1.9284919730697632,5.359700572434997,1.134938593069763,6.999674672434997,0.9035053700697632C8.639648772434999,0.6720721230697632,10.312988672434997,1.0170720830697633,11.726318472434997,1.8797255730697633C11.966308472434998,2.023398773069763,12.039714472434998,2.3310454730697634,11.892985472434997,2.5668653730697635C11.753011472434997,2.8026921730697634,11.446370472434998,2.8773921730697634,11.206380472434997,2.733718973069763ZM11.686360472434998,5.413441573069763C11.879639472434997,5.608874673069764,11.879639472434997,5.925454473069763,11.686360472434998,6.1205485730697635L7.2396648724349975,10.559748073069763C7.046305572434997,10.754747773069763,6.7263186724349975,10.754615173069762,6.533040372434997,10.559481973069763L4.312988372434997,8.339814573069763C4.119710372434998,8.144614573069763,4.119710372434998,7.828014773069763,4.312988372434997,7.632747973069764C4.506347772434998,7.437481773069763,4.826334872434998,7.437481773069763,5.019694172434997,7.632747973069764L6.886311872434997,9.499081973069764L10.979655472434997,5.412814473069763C11.173015472434997,5.217727973069763,11.493001472434997,5.218008373069763,11.686360472434998,5.413441573069763Z" fill-rule="evenodd" fill="#24C744" fill-opacity="1"/></svg>', Nc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><path d="M1.3164876075,5.2511568456573485C2.7112323875,3.0589928456573485,4.7552132875,1.7354023456573486,6.9998931875,1.7354023456573486C9.2445726875,1.7354023456573486,11.2885531875,3.0589928456573485,12.6832981875,5.2511568456573485C13.0012411875,5.7498953456573485,13.1452941875,6.3880765456573485,13.1452941875,6.9999821456573486C13.1452941875,7.611905345657348,13.0012411875,8.250068445657348,12.6832981875,8.74882484565735C11.2885531875,10.940988745657348,9.2445726875,12.264562345657348,6.9998931875,12.264562345657348C4.7552132875,12.264562345657348,2.7112323875,10.940988745657348,1.3164876075,8.74882484565735C0.9985453175,8.250068445657348,0.8544921875,7.611905345657348,0.8544921875,6.9999821456573486C0.8544921875,6.3880765456573485,0.9985453175,5.749325945657349,1.3164876075,5.2511568456573485ZM6.9998931875,2.6104023456573486C5.1262406875,2.6104023456573486,3.3318786875,3.713480445657349,2.0549823875,5.721323445657349L2.0543771875,5.721323445657349C1.8473052375,6.0456564456573485,1.7294921875,6.509396745657349,1.7294921875,6.9999821456573486C1.7294921875,7.490567445657349,1.8473052375,7.954324945657349,2.0543771875,8.278070645657348L2.0549823875,8.27865814565735C3.3318786875,10.286483045657349,5.1262406875,11.389561845657349,6.9998931875,11.389561845657349C8.8735446875,11.389561845657349,10.6679076875,10.286483045657349,11.9448031875,8.27865814565735L11.9454091875,8.278070645657348C12.1518751875,7.954324945657349,12.2702941875,7.490567445657349,12.2702941875,6.9999821456573486C12.2702941875,6.509396745657349,12.1518751875,6.0456564456573485,11.9454091875,5.721323445657349L11.9448031875,5.721323445657349C10.6679076875,3.713480445657349,8.8735446875,2.6104023456573486,6.9998931875,2.6104023456573486ZM4.4741208875,7.002937045657348C4.4741208875,5.606429845657349,5.6034745875,4.4771115456573485,6.9999641875,4.4771115456573485C8.3964533875,4.4771115456573485,9.5258073875,5.606429845657349,9.5258073875,7.002937045657348C9.5258073875,8.399444345657349,8.3964533875,9.528762545657349,6.9999641875,9.528762545657349C5.6034745875,9.528762545657349,4.4741208875,8.399444345657349,4.4741208875,7.002937045657348ZM6.9999641875,5.3521115456573485C6.0864762875,5.3521115456573485,5.3491210875,6.089431545657349,5.3491210875,7.002937045657348C5.3491210875,7.916442645657349,6.0864762875,8.653762545657349,6.9999641875,8.653762545657349C7.9134516875,8.653762545657349,8.650807387499999,7.916442645657349,8.650807387499999,7.002937045657348C8.650807387499999,6.089431545657349,7.9134516875,5.3521115456573485,6.9999641875,5.3521115456573485Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></svg>', $c = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><path d="M3.5486246148989866,6.472501117640625C3.7632801848989867,6.361666362640625,4.026926634898987,6.445068359640625,4.138366634898987,6.659741711640625C4.944508744898987,8.214329931640625,6.797759844898987,9.340158931640625,8.999857544898987,9.340158931640625C11.201954944898986,9.340158931640625,13.055775244898987,8.214329931640625,13.861347544898987,6.659741711640625C13.972788544898988,6.445068359640625,14.237040544898987,6.361666362640625,14.451090544898987,6.472501117640625C14.665781544898987,6.583905531640625,14.749770544898986,6.847569761640625,14.638366544898988,7.062243101640625C14.367100544898987,7.584907531640625,14.003692544898987,8.060913131640625,13.566192544898987,8.475074731640625L14.459278544898988,9.368161431640626C14.630177544898986,9.539077731640624,14.630177544898986,9.816164531640625,14.459278544898988,9.987080831640625C14.288344544898987,10.157996931640625,14.011275544898988,10.157996931640625,13.840342544898986,9.987080831640625L12.883701944898986,9.030405531640625C12.378519644898986,9.383328631640625,11.808039344898987,9.667999231640625,11.192590844898987,9.869249831640625L11.502344744898986,11.025413531640625C11.564757944898988,11.258743331640625,11.426508544898986,11.499069231640625,11.193196444898987,11.561500531640625C10.959848544898986,11.623913731640625,10.720092444898988,11.485664331640624,10.657109344898988,11.251747131640624L10.345611244898986,10.087999831640625C9.911600744898987,10.171401731640625,9.460677744898987,10.215158931640625,8.999857544898987,10.215158931640625C8.548365244898987,10.215158931640625,8.107340444898988,10.173164131640625,7.681518244898987,10.093233631640626L7.371195444898987,11.251747131640624C7.308781744898987,11.485664331640624,7.069025444898987,11.623913731640625,6.835108144898987,11.561500531640625C6.6017607448989875,11.499069231640625,6.4635111448989875,11.258743331640625,6.525924544898986,11.025413531640625L6.833363644898987,9.877990731640626C6.192280844898987,9.670900831640624,5.600189044898986,9.374000531640625,5.078094344898987,9.003578231640624L4.095179204898987,9.987080831640625C3.924280764898987,10.157996931640625,3.6471760548989867,10.157996931640625,3.476277614898987,9.987080831640625C3.305343588298987,9.816164531640625,3.305343588298987,9.539077731640624,3.476277614898987,9.368161431640626L4.400873744898987,8.443583031640625C3.9779357348989866,8.036987331640624,3.6256001248989866,7.572072231640625,3.361348427898987,7.062243101640625C3.250513676898987,6.847569761640625,3.3339334728989867,6.583905531640625,3.5486246148989866,6.472501117640625Z" fill="#FFFFFF" fill-opacity="1"/></svg>', zc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M9.217651334374999,1.6159667934375C8.817657434375,1.7239685034375,8.579650834375,2.1349792434375,8.687652634374999,2.5349731234375C8.794677734375,2.9349670234375003,9.205657934375001,3.1719665234375,9.605651834375,3.0649719234374997C14.537658734375,1.7439575234375,19.612670734375,4.6739807234375,20.934661734375,9.6059570234375C22.255676734375,14.5379635234375,19.325652734375,19.6129765234375,14.393676734375,20.9349675234375C9.461669934375,22.2559815234375,4.3866577343749995,19.3259585234375,3.064666734375,14.3939815234375C2.3956604343750003,11.8969725234375,2.816650434375,9.3629761234375,4.036651634375,7.2969665234375C4.246673534375001,6.9399719234375,4.128662134375,6.4799804234375,3.771667434375,6.2699585234375C3.415649434375,6.0589599234375,2.955657934375,6.1779785234375,2.744659434375,6.5339660234375C1.3286743163749999,8.9329834234375,0.8386535643749999,11.8789675234375,1.615661624375,14.7819825234375C3.151672334375,20.5139775234375,9.049652134375,23.9199825234375,14.781677734375,22.3839725234375C20.513671734375,20.8479615234375,23.919677734375,14.9499815234375,22.383666734375,9.2179565234375C20.847656734375,3.4859619234375,14.949676734375,0.07995602343750008,9.217651334374999,1.6159667934375Z" fill="#C9CBD4" fill-opacity="1"/><path d="M16.7496337890625,12C16.7496337890625,14.6270103,14.6266440890625,16.75,11.9996337890625,16.75C9.3736238890625,16.75,7.2496337890625,14.6270103,7.2496337890625,12C7.2496337890625,9.3739901,9.3736238890625,7.25,11.9996337890625,7.25C14.6266440890625,7.25,16.7496337890625,9.3739901,16.7496337890625,12ZM11.9996337890625,15.25C13.7976336890625,15.25,15.2496337890625,13.7979999,15.2496337890625,12C15.2496337890625,10.2020001,13.7976336890625,8.75,11.9996337890625,8.75C10.2016338890625,8.75,8.7496337890625,10.2020001,8.7496337890625,12C8.7496337890625,13.7979999,10.2016338890625,15.25,11.9996337890625,15.25Z" fill="#C9CBD4" fill-opacity="1"/></svg>', Vc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><path d="M12.594244271484374,3.926410052418518C12.594244271484374,3.9339934524185183,12.594244271484374,3.941576852418518,12.594244271484374,3.949160252418518L12.594244271484374,10.004165252418519L12.594244271484374,10.009998952418519C12.591269271484375,11.254248752418517,11.581520271484376,12.261664752418518,10.336686171484375,12.261664752418518C9.090102671484374,12.261664752418518,8.079185971484375,11.250748752418518,8.079185971484375,10.004165252418519C8.079185971484375,8.757582352418517,9.090102671484374,7.746665552418518,10.336686171484375,7.746665552418518C10.857602071484376,7.746665552418518,11.337102871484374,7.922832152418518,11.719244271484374,8.219165952418518L11.719244271484374,4.510315252418518L5.920881771484375,6.091725952418518L5.920881771484375,11.212248752418517L5.920881771484375,11.217499752418519C5.920881771484375,12.464083752418517,4.909947871484375,13.474998752418518,3.663387771484375,13.474998752418518C2.416787071484375,13.474998752418518,1.405852854251865,12.464082752418518,1.405852854251865,11.217499752418519C1.405852854251865,9.970916352418518,2.416786871484375,8.959999652418517,3.663387771484375,8.959999652418517C4.184269171484376,8.959999652418517,4.663780971484375,9.136166252418517,5.045881971484375,9.432499552418518L5.045881971484375,5.765065352418518C5.045881971484375,5.759809652418518,5.045881971484375,5.754577252418518,5.045881971484375,5.749326852418518L5.045881971484375,3.879142852418518C5.045881971484375,2.9108270524185182,5.645524971484375,2.2224822524185184,6.488441471484375,1.9926605524185181L10.128436071484375,1.000982272418518C10.652911171484375,0.8580656054185181,11.273518571484376,0.8131547724185181,11.781602271484376,1.1106431024185182C12.324102271484374,1.4273930824185181,12.594244271484374,2.0416489524185177,12.594244271484374,2.887488152418518L12.594244271484374,3.926410052418518ZM11.719244271484374,2.887487652418518C11.719244271484374,2.216660252418518,11.514435271484375,1.967576852418518,11.340019271484374,1.866071042418518C11.132935571484374,1.744731902418518,10.796352371484375,1.726076842418518,10.358268771484376,1.845648522418518L6.718304671484375,2.8373209524185183C6.231775271484375,2.969731652418518,5.920881771484375,3.330809252418518,5.920881771484375,3.879142452418518L5.920881771484375,5.184648152418518L11.719244271484374,3.603231552418518L11.719244271484374,2.887487652418518ZM3.663388271484375,12.599998752418518C4.426948071484375,12.599998752418518,5.045882471484375,11.981081752418518,5.045882471484375,11.217499752418519C5.045882471484375,10.453916152418518,4.426948271484375,9.834999652418517,3.663388271484375,9.834999652418517C2.8997932714843753,9.834999652418517,2.280853391484375,10.453916152418518,2.280853391484375,11.217499752418519C2.280853391484375,11.981082752418518,2.899793471484375,12.599998752418518,3.663388271484375,12.599998752418518ZM8.954185971484375,10.004165252418519C8.954185971484375,10.767749452418519,9.573102971484374,11.386664752418518,10.336686171484375,11.386664752418518C11.100269271484375,11.386664752418518,11.719244271484374,10.767748452418518,11.719244271484374,10.004165252418519C11.719244271484374,9.240582152418519,11.100269271484375,8.621665552418518,10.336686171484375,8.621665552418518C9.573102971484374,8.621665552418518,8.954185971484375,9.240582152418519,8.954185971484375,10.004165252418519Z" fill="#868A9C" fill-opacity="1"/></svg>', Uc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><path d="M11.305803496070862,2.8583284381607053C11.498882496070863,2.713661038160706,11.773050496070862,2.7521666381607055,11.918296496070862,2.9458338381607057C13.720794496070862,5.347419838160706,13.720794496070862,8.652577538160706,11.918296496070862,11.054163138160705C11.773050496070862,11.247830138160706,11.498882496070863,11.286335138160705,11.305803496070862,11.141669138160706C11.112723496070862,10.996414138160706,11.073630496070862,10.722246738160706,11.218307496070862,10.529166838160705C12.787475496070861,8.439078938160705,12.787475496070861,5.5609179381607055,11.218307496070862,3.4708303381607055C11.073630496070862,3.2777506381607058,11.112723496070862,3.0035830381607056,11.305803496070862,2.8583284381607053ZM10.850643496070862,4.404167338160706C10.705398196070862,4.210500138160706,10.431231096070862,4.171994538160705,10.238133096070861,4.316661938160705C10.044466596070862,4.461916538160706,10.005978196070862,4.736083838160706,10.150637296070862,4.929163538160706C11.072313496070862,6.156499038160706,11.072313496070862,7.843498338160706,10.150637296070862,9.070833838160706C10.005978196070862,9.263913738160706,10.044466596070862,9.538080838160706,10.238133096070861,9.683335938160706C10.431231096070862,9.828002538160705,10.705398196070862,9.789497038160706,10.850643496070862,9.595830538160705C12.005633496070862,8.058162338160706,12.005633496070862,5.941834538160705,10.850643496070862,4.404167338160706ZM6.527554596070861,1.3638305381607054C7.564730296070862,0.4561640581607056,9.188140496070861,1.1929142881607055,9.188140496070861,2.5713347381607052L9.188140496070861,11.428662138160705C9.188140496070861,12.807083138160706,7.564730296070862,13.543833138160705,6.527554596070861,12.636166138160705L3.9608915960708617,10.390329938160706C3.934063996070862,10.367000238160706,3.9002226960708617,10.354164738160705,3.8646364960708617,10.354164738160705L2.917307496070862,10.354164738160705C1.7092156960708618,10.354164738160705,0.7298074960708618,9.374747838160706,0.7298074960708618,8.166665238160705L0.7298074960708618,5.8333321381607055C0.7298074960708618,4.6252492381607055,1.7092156960708618,3.6458321381607055,2.917307496070862,3.6458321381607055L3.8646364960708617,3.6458321381607055C3.9002226960708617,3.6458321381607055,3.934063996070862,3.6329969381607055,3.9608915960708617,3.6096674381607055L6.527554596070861,1.3638305381607054ZM8.313140496070861,2.5713347381607052C8.313140496070861,1.9448317881607056,7.575215496070862,1.6099954881607057,7.103891996070862,2.0224125381607054L4.537228696070862,4.268249638160706C4.351145196070862,4.430994638160706,4.111976496070862,4.520831938160706,3.8646364960708617,4.520831938160706L2.917307496070862,4.520831938160706C2.192217496070862,4.520831938160706,1.6048074960708618,5.108250738160706,1.6048074960708618,5.8333321381607055L1.6048074960708618,8.166665238160705C1.6048074960708618,8.891746138160705,2.192217496070862,9.479165638160705,2.917307496070862,9.479165638160705L3.8646364960708617,9.479165638160705C4.111976496070862,9.479165638160705,4.351145196070862,9.569002738160705,4.537228696070862,9.731748238160705L7.103891996070862,11.977584138160706C7.575215496070862,12.390002138160705,8.313140496070861,12.055165138160705,8.313140496070861,11.428662138160705L8.313140496070861,2.5713347381607052Z" fill-rule="evenodd" fill="#FFFFFF" fill-opacity="1"/></svg>', Wc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><path d="M9.188069328125,2.7498358381607053L9.188069328125,2.5713360381607053C9.188069328125,1.1929155481607057,7.564641028125,0.4561653181607056,6.527501128125,1.3638317881607056L3.960820428125,3.6096686381607057C3.933975228125,3.6329981381607057,3.900151528125,3.6458331381607056,3.864583228125,3.6458331381607056L2.917236328125,3.6458331381607056C1.709162358125,3.6458331381607056,0.729736328125,4.625250238160706,0.729736328125,5.833333138160706L0.729736328125,8.166666138160705C0.729736328125,8.990334138160705,1.1847533881249999,9.707831938160705,1.857309928125,10.080586038160705L2.519968628125,9.417918838160706C1.989151028125,9.249912838160705,1.604736328125,8.752919338160705,1.604736328125,8.166666138160705L1.604736328125,5.833333138160706C1.604736328125,5.108252138160705,2.192164028125,4.520833138160706,2.917236328125,4.520833138160706L3.864583228125,4.520833138160706C4.111887428125,4.520833138160706,4.351074028125,4.4309958381607055,4.537139628125,4.268250538160705L7.103820828125,2.0224138381607055C7.575144328125,1.6099967381607057,8.313069328125,1.9448330381607055,8.313069328125,2.5713360381607053L8.313069328125,3.6248358381607058L9.188069328125,2.7498358381607053Z" fill="#FFFFFF" fill-opacity="1"/><path d="M9.188069388879395,6.8751726150512695L8.313069388879395,7.7501726150512695L8.313069388879395,11.42867231505127C8.313069388879395,12.055175315051269,7.575144088879394,12.39001181505127,7.103820288879394,11.97759441505127L5.493814768879394,10.56883951505127L4.8737382888793945,11.18892481505127L6.5275010888793945,12.63617661505127C7.564640988879395,13.54384331505127,9.188069388879395,12.807092715051269,9.188069388879395,11.42867231505127L9.188069388879395,6.8751726150512695Z" fill="#FFFFFF" fill-opacity="1"/><path d="M10.519225743566894,5.543419959263916C11.048904063566894,6.679164689263916,10.926391243566895,8.038332489263915,10.150583580566895,9.070834589263917C10.005889575566895,9.263914589263916,10.044412931566894,9.538081689263915,10.238062213566895,9.683336689263916C10.431141853566894,9.828003889263915,10.705327033566894,9.789498289263916,10.850555063566894,9.595831389263916C11.887160943566894,8.215666289263917,11.993331543566894,6.369420189263916,11.169067043566894,4.893587589263916L10.519225743566894,5.543419959263916Z" fill="#FFFFFF" fill-opacity="1"/><path d="M11.747202221848145,4.3160754470959475C12.761021631848145,6.290655617095947,12.584853731848145,8.708574817095947,11.218093551848144,10.529159117095947C11.073435149848144,10.722238517095947,11.112528165848145,10.996406117095948,11.305607791848145,11.141660717095947C11.498687411848145,11.286328317095947,11.772872571848145,11.247822717095946,11.918100651848144,11.054155317095947C13.545587731848144,8.886487017095948,13.703704331848144,5.9814896170959475,12.392949131848145,3.6703286170959473L11.747202221848145,4.3160754470959475Z" fill="#FFFFFF" fill-opacity="1"/><path d="M12.5598954921875,2.0591658358917235C12.7307934921875,1.8882496358917238,12.7307934921875,1.6117501858917236,12.5598954921875,1.4408339558917236C12.3889614921875,1.2699177268917237,12.1124624921875,1.2699177268917237,11.9415284921875,1.4408339558917236L1.4415283221875,11.940833335891723C1.2706298831875,12.111750335891724,1.2706298831875,12.388249335891723,1.4415283221875,12.559165335891723C1.6124623421875,12.730081335891724,1.8889617921875002,12.730081335891724,2.0598958121875,12.559165335891723L12.5598954921875,2.0591658358917235Z" fill="#FFFFFF" fill-opacity="1"/></svg>', Yc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14" height="14" viewBox="0 0 14 14"><path d="M3.348292020680237,2.6424992084503174C2.923644920680237,2.6424992084503174,2.578287720680237,2.9849191084503177,2.578287720680237,3.4125035084503175L2.578287720680237,4.474174308450317C2.578287720680237,4.715657508450317,2.382288570680237,4.911674308450317,2.140787720680237,4.911674308450317C1.8992868706802368,4.911674308450317,1.7032877206802368,4.715657508450317,1.7032877206802368,4.474174308450317L1.7032877206802368,3.4125035084503175C1.7032877206802368,2.4984104584503175,2.442957520680237,1.7674992084503174,3.348292020680237,1.7674992084503174L10.651636720680237,1.7674992084503174C11.565124120680236,1.7674992084503174,12.296640720680237,2.5071690084503175,12.296640720680237,3.4125035084503175L12.296640720680237,4.474174308450317C12.296640720680237,4.715657508450317,12.100641720680237,4.911674308450317,11.859140720680237,4.911674308450317C11.617640120680237,4.911674308450317,11.421641020680237,4.715657508450317,11.421641020680237,4.474174308450317L11.421641020680237,3.4125035084503175C11.421641020680237,2.9878386084503177,11.079203220680236,2.6424992084503174,10.651636720680237,2.6424992084503174L7.435114520680237,2.6424992084503174C7.436289420680237,2.657666388450317,7.437464320680236,2.6734210884503176,7.437464320680236,2.6891580184503177L7.437464320680236,11.357500308450318L8.714965420680237,11.357500308450318C8.956466320680237,11.357500308450318,9.152465420680237,11.553499508450317,9.152465420680237,11.795000208450318C9.152465420680237,12.036501208450318,8.956466320680237,12.232500208450318,8.714965420680237,12.232500208450318L5.284962820680237,12.232500208450318C5.043461920680237,12.232500208450318,4.847462820680237,12.036501208450318,4.847462820680237,11.795000208450318C4.847462820680237,11.553499508450317,5.043461920680237,11.357500308450318,5.284962820680237,11.357500308450318L6.562464320680236,11.357500308450318L6.562464320680236,2.6891580184503177C6.562464320680236,2.6734210884503176,6.563033720680237,2.657666388450317,6.564814220680237,2.6424992084503174L3.348292020680237,2.6424992084503174Z" fill="#868A9C" fill-opacity="1"/></svg>', Xc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="19" height="15" viewBox="0 0 19 15"><rect x="0" y="7" width="1" height="1" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="2" y="6" width="1" height="3" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="4" y="4.5" width="1" height="6" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="6" y="5" width="1" height="5" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="8" y="4" width="1" height="7" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="10" y="5" width="1" height="5" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="12" y="6" width="1" height="3" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="14" y="4" width="1" height="7" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="16" y="6.5" width="1" height="2" rx="0.5" fill="#B5B6BF" fill-opacity="1"/><rect x="18" y="7" width="1" height="1" rx="0.5" fill="#B5B6BF" fill-opacity="1"/></svg>', jc = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="19" height="15" viewBox="0 0 19 15"><rect x="0" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="2" y="7" width="15" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="4" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="6" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="8" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="10" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="12" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="14" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="16" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/><rect x="18" y="7" width="1" height="1" rx="0.5" fill="#C9CBD4" fill-opacity="1"/></svg>', qc = /* @__PURE__ */ new Map([
8955
8955
  ["OmAi-camera", Gc],
8956
8956
  ["OmAi-accept", Hc],
@@ -8984,10 +8984,10 @@ function Kc(s) {
8984
8984
  return "decoding" in r && (r.decoding = "async"), r.src = i, Nn.set(s, r), r;
8985
8985
  }
8986
8986
  const de = 3, $n = 10, Zc = 4, Jc = 6, zn = 8, Vn = 14, Br = 10, Qc = 12, eh = 4, Sa = 1, Vi = 28, va = 8, Fr = 19, Gr = 15;
8987
- function si(s, e, t, i, r = E.white, n = E.black, a = 1) {
8987
+ function si(s, e, t, i, r = A.white, n = A.black, a = 1) {
8988
8988
  return new j.Rect({ x: s, y: e, width: t, height: i, fill: r, stroke: n, strokeWidth: a });
8989
8989
  }
8990
- function Ui(s, e, t, i = 12, r = "Arial", n = E.black, a = "left", o = "top") {
8990
+ function Ui(s, e, t, i = 12, r = "Arial", n = A.black, a = "left", o = "top") {
8991
8991
  return new j.Text({ text: s, x: e, y: t, fontSize: i, fontFamily: r, fill: n, align: a, verticalAlign: o });
8992
8992
  }
8993
8993
  function kt(s = 0, e = 0) {
@@ -9008,26 +9008,26 @@ function th(s, e, t, i) {
9008
9008
  return !r || !n ? !1 : (r.x(0), r.y(0), r.width(de), r.height(t), n.x(e - de), n.y(0), n.width(de), n.height(t), !0);
9009
9009
  }
9010
9010
  function Ca(s, e, t) {
9011
- const i = e ? s.clipSelectedBorder : E.transparent, r = e ? Sa : 0;
9011
+ const i = e ? s.clipSelectedBorder : A.transparent, r = e ? Sa : 0;
9012
9012
  return t === "audio" ? {
9013
- background: E.audioClipBackground,
9013
+ background: A.audioClipBackground,
9014
9014
  label: s.audioClipText || s.clipName,
9015
9015
  accent: s.audioClipAccent || s.clipHandle,
9016
9016
  coverBackground: s.clipCoverBackground || Q.clipCoverBackground,
9017
9017
  border: i,
9018
9018
  borderWidth: r
9019
9019
  } : t === "text" ? {
9020
- background: E.textClipBackground,
9020
+ background: A.textClipBackground,
9021
9021
  label: s.clipName,
9022
9022
  accent: s.clipHandle,
9023
- coverBackground: s.clipCoverBackground || E.accentCoverFallback,
9023
+ coverBackground: s.clipCoverBackground || A.accentCoverFallback,
9024
9024
  border: i,
9025
9025
  borderWidth: r
9026
9026
  } : {
9027
- background: E.videoClipBackground,
9027
+ background: A.videoClipBackground,
9028
9028
  label: s.clipName,
9029
9029
  accent: s.clipHandle,
9030
- coverBackground: s.clipCoverBackground || E.accentCoverFallback,
9030
+ coverBackground: s.clipCoverBackground || A.accentCoverFallback,
9031
9031
  border: i,
9032
9032
  borderWidth: r
9033
9033
  };
@@ -9044,7 +9044,7 @@ function rh(s, e, t) {
9044
9044
  const l = si(0, 0, a, n, t.coverBackground, "transparent", 0);
9045
9045
  l.cornerRadius(2), l.name("clip-cover-background"), o.add(l);
9046
9046
  const c = kt(0, 0);
9047
- c.name("clip-covers-group"), o.add(c), De.renderClipCovers(
9047
+ c.name("clip-covers-group"), o.add(c), Le.renderClipCovers(
9048
9048
  c,
9049
9049
  e.thumbnails ?? [],
9050
9050
  a,
@@ -9053,7 +9053,7 @@ function rh(s, e, t) {
9053
9053
  e.deferCoverRender
9054
9054
  );
9055
9055
  const h = a >= 120 ? Vi + va : 0, d = Ui(
9056
- `${e.clipName} ${N.formatDuration(e.duration)}`,
9056
+ `${e.clipName} ${$.formatDuration(e.duration)}`,
9057
9057
  de,
9058
9058
  e.height - r,
9059
9059
  Br,
@@ -9069,7 +9069,7 @@ function nh(s, e, t) {
9069
9069
  if (!i || !r || !n || !a || !o || (i.width(e.width), i.height(e.height), i.fill(t.background), i.stroke(t.border), i.strokeWidth(t.borderWidth), i.cornerRadius(4), !th(s, e.width, e.height)))
9070
9070
  return !1;
9071
9071
  const l = 15, c = e.height - l - 4, h = e.width - de * 2;
9072
- r.x(de), r.y(2), r.clip({ x: 0, y: 0, width: h, height: c }), n.width(h), n.height(c), n.fill(t.coverBackground), n.cornerRadius(2), De.renderClipCovers(
9072
+ r.x(de), r.y(2), r.clip({ x: 0, y: 0, width: h, height: c }), n.width(h), n.height(c), n.fill(t.coverBackground), n.cornerRadius(2), Le.renderClipCovers(
9073
9073
  a,
9074
9074
  e.thumbnails ?? [],
9075
9075
  h,
@@ -9078,7 +9078,7 @@ function nh(s, e, t) {
9078
9078
  e.deferCoverRender
9079
9079
  );
9080
9080
  const d = h >= 120 ? Vi + va : 0;
9081
- o.text(`${e.clipName} ${N.formatDuration(e.duration)}`), o.x(de), o.y(e.height - l), o.fill(t.label), o.height(l), ai(o);
9081
+ o.text(`${e.clipName} ${$.formatDuration(e.duration)}`), o.x(de), o.y(e.height - l), o.fill(t.label), o.height(l), ai(o);
9082
9082
  const u = s.findOne(".video-audio-status");
9083
9083
  return u == null || u.destroy(), d > 0 && Ta(s, e.width, e.height, e.hasSeparatedAudio), !0;
9084
9084
  }
@@ -9221,7 +9221,7 @@ function dh(s, e, t, i) {
9221
9221
  y: e,
9222
9222
  width: t,
9223
9223
  height: i,
9224
- stroke: E.clipSelectedBorder,
9224
+ stroke: A.clipSelectedBorder,
9225
9225
  strokeWidth: Sa,
9226
9226
  fillEnabled: !1
9227
9227
  });
@@ -9258,7 +9258,7 @@ function gh(s, e, t, i, r, n, a, o) {
9258
9258
  );
9259
9259
  if (h.name("time-tick-line"), s.add(h), a === "major") {
9260
9260
  const d = t + c + 5, u = uh(
9261
- N.formatTime(r),
9261
+ $.formatTime(r),
9262
9262
  e,
9263
9263
  d,
9264
9264
  10,
@@ -9277,7 +9277,7 @@ function fh(s, e, t, i, r, n) {
9277
9277
  a.add(Hr([0, o, i, o], sn.line, 0.5));
9278
9278
  s.add(a);
9279
9279
  }
9280
- class ae {
9280
+ class se {
9281
9281
  /**
9282
9282
  * 创建舞台
9283
9283
  */
@@ -9379,7 +9379,7 @@ class ae {
9379
9379
  * 清空图片缓存
9380
9380
  */
9381
9381
  static clearImageCache() {
9382
- De.clearImageCache();
9382
+ Le.clearImageCache();
9383
9383
  }
9384
9384
  /**
9385
9385
  * 创建片段组
@@ -9442,7 +9442,7 @@ class ae {
9442
9442
  }
9443
9443
  }
9444
9444
  // 定义拉伸交互区域宽度常量
9445
- p(ae, "RESIZE_AREA_WIDTH", 3);
9445
+ p(se, "RESIZE_AREA_WIDTH", 3);
9446
9446
  function ui(s) {
9447
9447
  let e = !1;
9448
9448
  return typeof window < "u" && (window.addEventListener("mousemove", s.onPointerMove), window.addEventListener("mouseup", s.onPointerEnd), window.addEventListener("blur", s.onWindowBlur || s.onPointerEnd), e = !0), typeof document < "u" && (document.addEventListener("visibilitychange", s.onVisibilityChange), e = !0), e;
@@ -9498,7 +9498,7 @@ class Ju {
9498
9498
  e.evt.preventDefault(), this.updatePointerPosition(e.evt.offsetX), this.isPointerInsideTimeline = !0;
9499
9499
  const { deltaX: t, deltaY: i, shiftKey: r } = e.evt, n = Math.abs(t) > 0;
9500
9500
  if (r || n) {
9501
- const l = (n ? t : i) * 1.5, c = this.stage.width(), h = N.timeToPixels(this.config.duration, this.config.zoom), d = Math.max(0, h - c), u = Math.max(0, Math.min(d, this.scrollLeft + l));
9501
+ const l = (n ? t : i) * 1.5, c = this.stage.width(), h = $.timeToPixels(this.config.duration, this.config.zoom), d = Math.max(0, h - c), u = Math.max(0, Math.min(d, this.scrollLeft + l));
9502
9502
  u !== this.scrollLeft && this.animateHorizontalScroll(u);
9503
9503
  } else Math.abs(i) > 0 && this.handleZoom(e);
9504
9504
  }), this.stage.on("click", (e) => {
@@ -9552,7 +9552,7 @@ class Ju {
9552
9552
  } else if (this.isDragging) {
9553
9553
  const t = e.clientX - this.startDragX, i = this.scrollLeft;
9554
9554
  this.scrollLeft -= t;
9555
- const r = this.stage.width(), n = N.timeToPixels(this.config.duration, this.config.zoom);
9555
+ const r = this.stage.width(), n = $.timeToPixels(this.config.duration, this.config.zoom);
9556
9556
  this.scrollLeft = Math.max(0, Math.min(n - r, this.scrollLeft)), this.startDragX = e.clientX, this.render(), this.scrollLeft !== i && this.onScrollChange(this.scrollLeft);
9557
9557
  }
9558
9558
  }
@@ -9568,18 +9568,18 @@ class Ju {
9568
9568
  }
9569
9569
  animateZoom(e, t) {
9570
9570
  const i = this.config.zoom, r = Va.DURATION, n = Date.now(), a = this.pixelToTime(t), o = () => {
9571
- const l = Date.now() - n, c = Math.min(l / r, 1), h = this.easeOutCubic(c), d = i + (e - i) * h, u = N.timeToPixels(a, d), g = Math.max(0, u - (t - this.leftPadding));
9571
+ const l = Date.now() - n, c = Math.min(l / r, 1), h = this.easeOutCubic(c), d = i + (e - i) * h, u = $.timeToPixels(a, d), g = Math.max(0, u - (t - this.leftPadding));
9572
9572
  if (this.scrollLeft = g, this.config.zoom = d, this.onZoomChange(d), this.onScrollChange(g), this.render(), c < 1)
9573
9573
  this.animationFrameId = requestAnimationFrame(o);
9574
9574
  else {
9575
- const f = N.timeToPixels(a, e), y = Math.max(0, f - (t - this.leftPadding));
9575
+ const f = $.timeToPixels(a, e), y = Math.max(0, f - (t - this.leftPadding));
9576
9576
  this.config.zoom = e, this.scrollLeft = y, this.onZoomChange(e), this.onScrollChange(y), this.render();
9577
9577
  }
9578
9578
  };
9579
9579
  this.animationFrameId && cancelAnimationFrame(this.animationFrameId), o();
9580
9580
  }
9581
9581
  animateHorizontalScroll(e) {
9582
- const t = this.scrollLeft, i = 300, r = Date.now(), n = this.stage.width(), a = N.timeToPixels(this.config.duration, this.config.zoom);
9582
+ const t = this.scrollLeft, i = 300, r = Date.now(), n = this.stage.width(), a = $.timeToPixels(this.config.duration, this.config.zoom);
9583
9583
  this.animationFrameId && (cancelAnimationFrame(this.animationFrameId), this.animationFrameId = null);
9584
9584
  const o = () => {
9585
9585
  const l = Date.now() - r, c = Math.min(l / i, 1), h = this.easeOutCubic(c), d = t + (e - t) * h;
@@ -9595,10 +9595,10 @@ class Ju {
9595
9595
  this.setCurrentTime(t);
9596
9596
  }
9597
9597
  pixelToTime(e) {
9598
- return N.pixelsToTime(e - this.leftPadding + this.scrollLeft, this.config.zoom);
9598
+ return $.pixelsToTime(e - this.leftPadding + this.scrollLeft, this.config.zoom);
9599
9599
  }
9600
9600
  timeToPixel(e) {
9601
- return N.timeToPixels(e, this.config.zoom) - this.scrollLeft + this.leftPadding;
9601
+ return $.timeToPixels(e, this.config.zoom) - this.scrollLeft + this.leftPadding;
9602
9602
  }
9603
9603
  setCurrentTime(e) {
9604
9604
  this.config.currentTime = Math.max(0, e), this.onTimeChange(this.config.currentTime);
@@ -9620,7 +9620,7 @@ class Ju {
9620
9620
  if (i)
9621
9621
  i.width(e), i.height(t), i.fill(this.theme.background), i.stroke(this.theme.border);
9622
9622
  else {
9623
- const r = ae.createRect(0, 0, e, t, this.theme.background, this.theme.border, 1);
9623
+ const r = se.createRect(0, 0, e, t, this.theme.background, this.theme.border, 1);
9624
9624
  r.name("timeline-background"), this.gridLayer.add(r);
9625
9625
  }
9626
9626
  this.gridLayer.find(".grid-line").forEach((r) => r.remove()), this.gridLayer.find(".time-tick-line").forEach((r) => r.remove()), this.gridLayer.find(".time-tick-text").forEach((r) => r.remove()), this.renderTimeTicks(), this.renderScrollbar(), this.gridLayer.batchDraw();
@@ -9630,7 +9630,7 @@ class Ju {
9630
9630
  if (a)
9631
9631
  a.x(0), a.y(i), a.width(e), a.height(this.scrollbarHeight), a.fill(this.theme.scrollbarBackground || me.background), a.stroke(this.theme.scrollbarBorder || me.border), a.visible(!0);
9632
9632
  else {
9633
- const l = ae.createRect(
9633
+ const l = se.createRect(
9634
9634
  0,
9635
9635
  i,
9636
9636
  e,
@@ -9645,7 +9645,7 @@ class Ju {
9645
9645
  if (o)
9646
9646
  o.x(n), o.y(i), o.width(r), o.height(this.scrollbarHeight), o.fill(this.theme.scrollbarThumb || me.thumb), o.stroke(this.theme.scrollbarThumbBorder || this.theme.scrollbarBorder || me.border), o.visible(r < e);
9647
9647
  else {
9648
- const l = ae.createRect(
9648
+ const l = se.createRect(
9649
9649
  n,
9650
9650
  i,
9651
9651
  r,
@@ -9658,12 +9658,12 @@ class Ju {
9658
9658
  }
9659
9659
  }
9660
9660
  renderTimeTicks() {
9661
- const e = this.stage.width(), t = this.scrollLeft, i = this.scrollLeft + e, r = N.pixelsToTime(t, this.config.zoom), n = N.pixelsToTime(i, this.config.zoom), a = N.msToSeconds(r), o = N.msToSeconds(n), l = 10, c = a - l, h = o + l, { majorStep: d, minorStep: u } = N.getTickConfig(this.config.zoom), g = N.generateVisibleTicks(c, h, d, u);
9661
+ const e = this.stage.width(), t = this.scrollLeft, i = this.scrollLeft + e, r = $.pixelsToTime(t, this.config.zoom), n = $.pixelsToTime(i, this.config.zoom), a = $.msToSeconds(r), o = $.msToSeconds(n), l = 10, c = a - l, h = o + l, { majorStep: d, minorStep: u } = $.getTickConfig(this.config.zoom), g = $.generateVisibleTicks(c, h, d, u);
9662
9662
  let f = 0;
9663
9663
  const y = 20;
9664
9664
  for (const S of g) {
9665
9665
  const v = this.timeToPixel(S.time);
9666
- v >= -y && v <= e + y && (ae.drawTimeTick(
9666
+ v >= -y && v <= e + y && (se.drawTimeTick(
9667
9667
  this.gridLayer,
9668
9668
  v,
9669
9669
  0,
@@ -9693,7 +9693,7 @@ class Ju {
9693
9693
  this.scrollLeft = Math.max(0, Math.min(i - t, e)), this.render();
9694
9694
  }
9695
9695
  getTotalDurationPixels() {
9696
- return N.timeToPixels(this.config.duration, this.config.zoom);
9696
+ return $.timeToPixels(this.config.duration, this.config.zoom);
9697
9697
  }
9698
9698
  getScrollbarThumbWidth() {
9699
9699
  const e = this.stage.width(), t = this.getTotalDurationPixels();
@@ -9718,7 +9718,7 @@ class Ju {
9718
9718
  * @param time 目标时间(毫秒)
9719
9719
  */
9720
9720
  scrollToTime(e) {
9721
- const t = N.timeToPixels(e, this.config.zoom), i = this.stage.width(), r = Math.max(0, t - i / 2);
9721
+ const t = $.timeToPixels(e, this.config.zoom), i = this.stage.width(), r = Math.max(0, t - i / 2);
9722
9722
  this.setScrollLeft(r), this.onScrollChange(r);
9723
9723
  }
9724
9724
  /**
@@ -9726,7 +9726,7 @@ class Ju {
9726
9726
  * @param clip 目标片段
9727
9727
  */
9728
9728
  scrollToClip(e) {
9729
- const t = N.timeToPixels(e.startTime, this.config.zoom), r = N.timeToPixels(e.startTime + e.duration, this.config.zoom) - t, n = this.stage.width();
9729
+ const t = $.timeToPixels(e.startTime, this.config.zoom), r = $.timeToPixels(e.startTime + e.duration, this.config.zoom) - t, n = this.stage.width();
9730
9730
  let a;
9731
9731
  r <= n ? a = Math.max(0, t - (n - r) / 2) : a = Math.max(0, t), this.setScrollLeft(a), this.onScrollChange(a);
9732
9732
  }
@@ -9763,10 +9763,10 @@ class Ju {
9763
9763
  }
9764
9764
  const Vt = 8;
9765
9765
  function ye(s, e, t) {
9766
- return ae.timeToPixels(s, e) - t + ue;
9766
+ return se.timeToPixels(s, e) - t + ue;
9767
9767
  }
9768
9768
  function Te(s, e) {
9769
- const t = Math.max(s, 1e3), i = ae.timeToPixels(t, e);
9769
+ const t = Math.max(s, 1e3), i = se.timeToPixels(t, e);
9770
9770
  return i <= Ni ? Ni : i;
9771
9771
  }
9772
9772
  function mh(s, e) {
@@ -9791,7 +9791,7 @@ class lr {
9791
9791
  this.clip = Es(
9792
9792
  {
9793
9793
  ...e,
9794
- endTime: N.calculateEndTime(e.startTime, e.duration)
9794
+ endTime: $.calculateEndTime(e.startTime, e.duration)
9795
9795
  },
9796
9796
  {
9797
9797
  isDragging: e.isDragging,
@@ -9811,7 +9811,7 @@ class lr {
9811
9811
  this.clip = {
9812
9812
  ...this.clip,
9813
9813
  ...e,
9814
- endTime: N.calculateEndTime(e.startTime, e.duration)
9814
+ endTime: $.calculateEndTime(e.startTime, e.duration)
9815
9815
  };
9816
9816
  }
9817
9817
  setSelected(e) {
@@ -9869,7 +9869,7 @@ function cr(s) {
9869
9869
  function Kt(s) {
9870
9870
  return (s == null ? void 0 : s.kind) === "draggingMove" || (s == null ? void 0 : s.kind) === "draggingResizeLeft" || (s == null ? void 0 : s.kind) === "draggingResizeRight";
9871
9871
  }
9872
- function rt(s) {
9872
+ function it(s) {
9873
9873
  return !s || s.kind === "idle" || s.kind === "boxSelecting" ? null : s.context;
9874
9874
  }
9875
9875
  function Zt(s) {
@@ -10016,8 +10016,8 @@ function bh(s, e, t, i) {
10016
10016
  const r = t - s.pointerStartClientX, n = i - s.pointerStartClientY;
10017
10017
  return Math.hypot(r, n) >= Math.max(0, e);
10018
10018
  }
10019
- const Le = class Le {
10020
- constructor(e, t, i, r, n, a, o, l, c, h, d, u, g, f, y, S, v, b, C, w, x, P, M, I, A, k = Le.DEFAULT_DRAG_ACTIVATION_THRESHOLD, $ = !1, B = Le.DEFAULT_CLIP_SNAP_THRESHOLD) {
10019
+ const Re = class Re {
10020
+ constructor(e, t, i, r, n, a, o, l, c, h, d, u, g, f, y, S, v, b, C, w, x, P, M, I, E, k = Re.DEFAULT_DRAG_ACTIVATION_THRESHOLD, z = !1, B = Re.DEFAULT_CLIP_SNAP_THRESHOLD) {
10021
10021
  p(this, "layer");
10022
10022
  p(this, "trackGroup");
10023
10023
  p(this, "dragOverlayLayer", null);
@@ -10082,7 +10082,7 @@ const Le = class Le {
10082
10082
  const e = this.resolveInteractionState();
10083
10083
  if (!Kt(e) || !this.onHorizontalDragAutoScroll)
10084
10084
  return;
10085
- const t = this.layer.getStage(), i = t == null ? void 0 : t.container(), r = rt(e);
10085
+ const t = this.layer.getStage(), i = t == null ? void 0 : t.container(), r = it(e);
10086
10086
  if (!i || !r) {
10087
10087
  this.stopEdgeAutoScroll();
10088
10088
  return;
@@ -10099,7 +10099,7 @@ const Le = class Le {
10099
10099
  }
10100
10100
  this.startEdgeAutoScroll();
10101
10101
  });
10102
- this.layer = e, this.config = t, this.theme = o, this.trackType = i, this.zoom = r, this.trackY = n, this.trackHeight = a, this.onClipUpdate = l, this.onClipAdd = c, this.onClipRemove = h, this.onClipSplit = d, this.onClipSelect = u, this.onTimeJump = g, this.onHorizontalDragAutoScroll = f, this.onClipOverlap = y, this.onClipCrossTrackPreview = S, this.onClipCrossTrack = v, this.onClearDropPreview = b, this.onClearSelection = C, this.onSnapGuideChange = w, this.onClipToggleSelection = x, this.onSetSingleSelection = P, this.getMultiDragClipIds = M, this.onMultiDragMove = I, this.onMultiDragInteractionEnd = A, this.dragActivationThreshold = Math.max(0, k), this.enableClipSnap = $, this.clipSnapThreshold = Math.max(0, B), this.trackGroup = ae.createGroup(0, n), this.layer.add(this.trackGroup), this.initClips(), this.initEventListeners(), this.render();
10102
+ this.layer = e, this.config = t, this.theme = o, this.trackType = i, this.zoom = r, this.trackY = n, this.trackHeight = a, this.onClipUpdate = l, this.onClipAdd = c, this.onClipRemove = h, this.onClipSplit = d, this.onClipSelect = u, this.onTimeJump = g, this.onHorizontalDragAutoScroll = f, this.onClipOverlap = y, this.onClipCrossTrackPreview = S, this.onClipCrossTrack = v, this.onClearDropPreview = b, this.onClearSelection = C, this.onSnapGuideChange = w, this.onClipToggleSelection = x, this.onSetSingleSelection = P, this.getMultiDragClipIds = M, this.onMultiDragMove = I, this.onMultiDragInteractionEnd = E, this.dragActivationThreshold = Math.max(0, k), this.enableClipSnap = z, this.clipSnapThreshold = Math.max(0, B), this.trackGroup = se.createGroup(0, n), this.layer.add(this.trackGroup), this.initClips(), this.initEventListeners(), this.render();
10103
10103
  }
10104
10104
  get hasDragMoved() {
10105
10105
  return this.getLegacyInteractionSnapshot().hasDragMoved;
@@ -10216,11 +10216,11 @@ const Le = class Le {
10216
10216
  ensureDropPreviewGroup() {
10217
10217
  if (this.dropPreviewGroup)
10218
10218
  return this.dropPreviewGroup;
10219
- const e = ae.createGroup(0, 0);
10219
+ const e = se.createGroup(0, 0);
10220
10220
  return e.name("clip-drop-preview"), e.visible(!1), e.listening(!1), this.trackGroup.add(e), this.dropPreviewGroup = e, e;
10221
10221
  }
10222
10222
  createDropPreviewRect(e) {
10223
- const t = this.trackType === "text" ? "rgba(96, 76, 51, 0.28)" : this.trackType === "video" ? mi.videoFill : mi.audioFill, i = this.trackType === "text" ? "#C9CBD4" : this.trackType === "video" ? mi.videoStroke : mi.audioStroke, r = ye(e.startTime, this.zoom, this.scrollLeft), n = Te(e.duration, this.zoom), a = ae.createRect(r, 2, Math.max(n, 1), Math.max(this.trackHeight - 4, 1), t, i, 1);
10223
+ const t = this.trackType === "text" ? "rgba(96, 76, 51, 0.28)" : this.trackType === "video" ? mi.videoFill : mi.audioFill, i = this.trackType === "text" ? "#C9CBD4" : this.trackType === "video" ? mi.videoStroke : mi.audioStroke, r = ye(e.startTime, this.zoom, this.scrollLeft), n = Te(e.duration, this.zoom), a = se.createRect(r, 2, Math.max(n, 1), Math.max(this.trackHeight - 4, 1), t, i, 1);
10224
10224
  return a.dash([6, 4]), a.cornerRadius(4), a.listening(!1), a.visible(r + n > 0 && r < this.layer.width()), a;
10225
10225
  }
10226
10226
  showDropPreview(e) {
@@ -10264,7 +10264,7 @@ const Le = class Le {
10264
10264
  if (!t) return;
10265
10265
  const i = t.container();
10266
10266
  if (!i) return;
10267
- const r = i.getBoundingClientRect(), n = e.clientX - r.left, a = Math.max(0, N.pixelsToTime(n - ue + this.scrollLeft, this.zoom));
10267
+ const r = i.getBoundingClientRect(), n = e.clientX - r.left, a = Math.max(0, $.pixelsToTime(n - ue + this.scrollLeft, this.zoom));
10268
10268
  this.onTimeJump(a), this.onClearSelection && this.onClearSelection();
10269
10269
  }
10270
10270
  handleTrackBackgroundMouseDown(e) {
@@ -10284,7 +10284,7 @@ const Le = class Le {
10284
10284
  i && (this.isVisualUpdate = !0, i.setSelected(t), this.isVisualUpdate = !1, t ? this.selectedClipIds.add(e) : this.selectedClipIds.delete(e), this.syncSelectionState(e), this.updateClipGroup(i.getClip()), this.render(!1), this.layer.batchDraw());
10285
10285
  }
10286
10286
  createClipGroup(e) {
10287
- const t = ye(e.startTime, this.zoom, this.scrollLeft), i = Te(e.duration, this.zoom), r = 2, n = this.trackHeight - 4, a = ae.createClipGroup(
10287
+ const t = ye(e.startTime, this.zoom, this.scrollLeft), i = Te(e.duration, this.zoom), r = 2, n = this.trackHeight - 4, a = se.createClipGroup(
10288
10288
  t,
10289
10289
  r,
10290
10290
  i,
@@ -10409,7 +10409,7 @@ const Le = class Le {
10409
10409
  }
10410
10410
  }
10411
10411
  resolveDraggedClipForInteraction(e = this.interactionState) {
10412
- const t = rt(e);
10412
+ const t = it(e);
10413
10413
  if (t != null && t.clipId) {
10414
10414
  const r = this.clips.find((n) => n.getClip().id === t.clipId) ?? null;
10415
10415
  if (r)
@@ -10453,12 +10453,12 @@ const Le = class Le {
10453
10453
  };
10454
10454
  }
10455
10455
  syncLegacyInteractionMirror(e = this.interactionState) {
10456
- const t = this.getLegacyInteractionSnapshot(), i = rt(e);
10456
+ const t = this.getLegacyInteractionSnapshot(), i = it(e);
10457
10457
  t.hasDragMoved = Kt(e), t.activePointerOperation = Zt(e), t.originalClipsState = (i == null ? void 0 : i.originalClipsState) ?? [], t.nonDraggedClips = (i == null ? void 0 : i.nonDraggedClips) ?? [], t.snapCandidateClips = (i == null ? void 0 : i.snapCandidateClips) ?? [], t.dragStartY = (i == null ? void 0 : i.pointerStartY) ?? 0, t.dragTargetTrackY = (i == null ? void 0 : i.dragTargetTrackY) ?? 0, t.crossTrackDragOffsetY = (i == null ? void 0 : i.crossTrackDragOffsetY) ?? 0, t.crossTrackDragStartX = (i == null ? void 0 : i.pointerStartX) ?? 0, t.dragStartScrollLeft = (i == null ? void 0 : i.dragStartScrollLeft) ?? 0, t.dragGestureStartClientX = (i == null ? void 0 : i.pointerStartClientX) ?? null, t.dragGestureStartClientY = (i == null ? void 0 : i.pointerStartClientY) ?? null, t.lastDragClientX = (i == null ? void 0 : i.lastPointerClientX) ?? null, t.lastDragClientY = (i == null ? void 0 : i.lastPointerClientY) ?? null;
10458
10458
  }
10459
10459
  handleClipMoveEnd(e, t) {
10460
10460
  var S, v, b;
10461
- const i = this.resolveInteractionState(t), r = this.getLegacyInteractionSnapshot(), n = rt(i) || {
10461
+ const i = this.resolveInteractionState(t), r = this.getLegacyInteractionSnapshot(), n = it(i) || {
10462
10462
  clipId: e.id,
10463
10463
  originalClipsState: r.originalClipsState.length > 0 ? r.originalClipsState : [e],
10464
10464
  nonDraggedClips: r.nonDraggedClips,
@@ -10478,18 +10478,18 @@ const Le = class Le {
10478
10478
  isFinal: !0
10479
10479
  })) {
10480
10480
  for (const k of this.selectedClipIds) {
10481
- const $ = (v = this.clipGroups) == null ? void 0 : v.get(k);
10482
- $ == null || $.y(2);
10481
+ const z = (v = this.clipGroups) == null ? void 0 : v.get(k);
10482
+ z == null || z.y(2);
10483
10483
  }
10484
10484
  this.multiDragOriginalPositions.clear();
10485
10485
  return;
10486
10486
  }
10487
10487
  const x = [], P = [];
10488
- for (const [A, k] of this.multiDragOriginalPositions) {
10489
- const $ = this.clips.find((O) => O.getClip().id === A);
10490
- if (!$) continue;
10488
+ for (const [E, k] of this.multiDragOriginalPositions) {
10489
+ const z = this.clips.find((O) => O.getClip().id === E);
10490
+ if (!z) continue;
10491
10491
  const B = Math.max(0, k.startTime + w), Y = {
10492
- ...$.getClip(),
10492
+ ...z.getClip(),
10493
10493
  startTime: B,
10494
10494
  endTime: B + k.duration,
10495
10495
  isDragging: !1,
@@ -10498,18 +10498,18 @@ const Le = class Le {
10498
10498
  isResizingRight: !1,
10499
10499
  zIndex: 1,
10500
10500
  opacity: 1,
10501
- isSelected: this.selectedClipIds.has(A)
10501
+ isSelected: this.selectedClipIds.has(E)
10502
10502
  };
10503
10503
  x.push(Y);
10504
- const V = n.originalClipsState.find((O) => O.id === A);
10504
+ const V = n.originalClipsState.find((O) => O.id === E);
10505
10505
  V && P.push(V);
10506
- const G = (b = this.clipGroups) == null ? void 0 : b.get(A);
10506
+ const G = (b = this.clipGroups) == null ? void 0 : b.get(E);
10507
10507
  G && G.y(2);
10508
10508
  }
10509
10509
  const M = [];
10510
- for (const A of this.clips) {
10511
- const k = A.getClip(), $ = x.find((B) => B.id === k.id);
10512
- $ ? M.push($) : M.push({
10510
+ for (const E of this.clips) {
10511
+ const k = E.getClip(), z = x.find((B) => B.id === k.id);
10512
+ z ? M.push(z) : M.push({
10513
10513
  ...k,
10514
10514
  isDragging: !1,
10515
10515
  isResizing: !1,
@@ -10517,19 +10517,19 @@ const Le = class Le {
10517
10517
  isResizingRight: !1
10518
10518
  });
10519
10519
  }
10520
- M.sort((A, k) => A.startTime - k.startTime), this.isVisualUpdate = !0;
10521
- for (const A of M)
10522
- this.clips.find(($) => $.getClip().id === A.id) && this.handleClipUpdate(A);
10520
+ M.sort((E, k) => E.startTime - k.startTime), this.isVisualUpdate = !0;
10521
+ for (const E of M)
10522
+ this.clips.find((z) => z.getClip().id === E.id) && this.handleClipUpdate(E);
10523
10523
  this.isVisualUpdate = !1;
10524
- const I = P.map((A) => {
10525
- const k = x.find(($) => $.id === A.id);
10526
- return k && (A.startTime !== k.startTime || A.duration !== k.duration) ? {
10527
- clipId: A.id,
10528
- previousState: A,
10524
+ const I = P.map((E) => {
10525
+ const k = x.find((z) => z.id === E.id);
10526
+ return k && (E.startTime !== k.startTime || E.duration !== k.duration) ? {
10527
+ clipId: E.id,
10528
+ previousState: E,
10529
10529
  newState: k
10530
10530
  } : null;
10531
- }).filter((A) => A !== null);
10532
- I.length > 0 && this.onClipUpdate(e, P.find((A) => A.id === e.id), I), this.multiDragOriginalPositions.clear();
10531
+ }).filter((E) => E !== null);
10532
+ I.length > 0 && this.onClipUpdate(e, P.find((E) => E.id === e.id), I), this.multiDragOriginalPositions.clear();
10533
10533
  return;
10534
10534
  }
10535
10535
  if (o && this.onClipCrossTrack && this.config.id) {
@@ -10641,7 +10641,7 @@ const Le = class Le {
10641
10641
  const r = Te(e.duration, this.zoom);
10642
10642
  this.updateClipViewportState(e);
10643
10643
  const n = e.isSelected;
10644
- (e.isDragging || n) && i.moveToTop(), i.opacity(e.opacity), ae.updateClipGroup(
10644
+ (e.isDragging || n) && i.moveToTop(), i.opacity(e.opacity), se.updateClipGroup(
10645
10645
  i,
10646
10646
  r,
10647
10647
  this.trackHeight - 4,
@@ -10685,7 +10685,7 @@ const Le = class Le {
10685
10685
  id: `${e.id}_split_${Date.now()}`,
10686
10686
  startTime: t,
10687
10687
  duration: r,
10688
- endTime: N.calculateEndTime(t, r),
10688
+ endTime: $.calculateEndTime(t, r),
10689
10689
  startTimeAtSource: n,
10690
10690
  endTimeAtSource: e.endTimeAtSource
10691
10691
  };
@@ -10734,7 +10734,7 @@ const Le = class Le {
10734
10734
  const a = n.getClip();
10735
10735
  this.updateClipViewportState(a);
10736
10736
  });
10737
- const t = this.resolveInteractionState(), i = rt(t), r = Ii(t, { type: "SCROLL_LEFT_CHANGED" });
10737
+ const t = this.resolveInteractionState(), i = it(t), r = Ii(t, { type: "SCROLL_LEFT_CHANGED" });
10738
10738
  this.interactionState = r.state, this.syncLegacyInteractionMirror(r.state), r.effects.updatePreview && i && this.updateDraggedClipFromPointer(i.lastPointerClientX, i.lastPointerClientY, !1), this.layer.batchDraw();
10739
10739
  }
10740
10740
  updateClipVisibility(e) {
@@ -10783,7 +10783,7 @@ const Le = class Le {
10783
10783
  render(e = !0) {
10784
10784
  const t = this.getTrackBackgroundFill();
10785
10785
  if (this.trackGroup.children.length === 0) {
10786
- const i = ae.createRect(0, 0, this.layer.width(), this.trackHeight, t, this.theme.trackBorder, 1);
10786
+ const i = se.createRect(0, 0, this.layer.width(), this.trackHeight, t, this.theme.trackBorder, 1);
10787
10787
  i.name("track-background"), i.on("click", (r) => {
10788
10788
  this.handleTrackBackgroundClick(r.evt);
10789
10789
  }), i.on("mousedown", (r) => {
@@ -10877,7 +10877,7 @@ const Le = class Le {
10877
10877
  this.setClipDragOverlayActive(e, !1), this.updateClipPositionFinal(e, t);
10878
10878
  else if (o) {
10879
10879
  const c = ye(t, this.zoom, this.scrollLeft);
10880
- o.x(c), o.y(this.resolveClipRenderY(e, r)), o.moveToTop(), ae.updateClipGroup(
10880
+ o.x(c), o.y(this.resolveClipRenderY(e, r)), o.moveToTop(), se.updateClipGroup(
10881
10881
  o,
10882
10882
  Te(a.duration, this.zoom),
10883
10883
  this.trackHeight - 4,
@@ -10931,7 +10931,7 @@ const Le = class Le {
10931
10931
  }
10932
10932
  setClipSnapEnabled(e) {
10933
10933
  this.enableClipSnap = e, e || this.updateSnapGuideLine(null);
10934
- const t = this.resolveInteractionState(), i = rt(t);
10934
+ const t = this.resolveInteractionState(), i = it(t);
10935
10935
  if (Kt(t) && i) {
10936
10936
  this.updateDraggedClipFromPointer(i.lastPointerClientX, i.lastPointerClientY, !1);
10937
10937
  return;
@@ -10943,7 +10943,7 @@ const Le = class Le {
10943
10943
  }
10944
10944
  updateDraggedClipFromPointer(e, t, i) {
10945
10945
  var v, b, C, w, x;
10946
- const r = this.resolveInteractionState(), n = rt(r), a = Zt(r), o = this.layer.getStage(), l = this.resolveDraggedClipForInteraction(r);
10946
+ const r = this.resolveInteractionState(), n = it(r), a = Zt(r), o = this.layer.getStage(), l = this.resolveDraggedClipForInteraction(r);
10947
10947
  if (!o || !l || !n || !a) return;
10948
10948
  const c = o.container();
10949
10949
  if (!c) return;
@@ -10965,8 +10965,8 @@ const Le = class Le {
10965
10965
  this.hideDropPreview(), (b = this.onClearDropPreview) == null || b.call(this), this.updateSnapGuideLine(null);
10966
10966
  return;
10967
10967
  }
10968
- const A = I.clip, k = A.startTime - M.startTime, $ = this.applyPreviewClipState(l, A), B = ye(A.startTime, this.zoom, this.scrollLeft), Y = Te(A.duration, this.zoom);
10969
- S.x(B), S.y(this.resolveClipRenderY(y.id, n.crossTrackDragOffsetY)), S.visible(B + Y > 0 && B < this.layer.width()), $ && (this.updateClipGroup(A), S.y(this.resolveClipRenderY(y.id, n.crossTrackDragOffsetY)));
10968
+ const E = I.clip, k = E.startTime - M.startTime, z = this.applyPreviewClipState(l, E), B = ye(E.startTime, this.zoom, this.scrollLeft), Y = Te(E.duration, this.zoom);
10969
+ S.x(B), S.y(this.resolveClipRenderY(y.id, n.crossTrackDragOffsetY)), S.visible(B + Y > 0 && B < this.layer.width()), z && (this.updateClipGroup(E), S.y(this.resolveClipRenderY(y.id, n.crossTrackDragOffsetY)));
10970
10970
  let V = !1;
10971
10971
  if (f) {
10972
10972
  this.onMultiDragMove && this.config.id && (V = this.onMultiDragMove({
@@ -10981,14 +10981,14 @@ const Le = class Le {
10981
10981
  if (G === y.id) continue;
10982
10982
  const J = this.clips.find((ne) => ne.getClip().id === G);
10983
10983
  if (!J) continue;
10984
- const H = Math.max(0, O.startTime + k), q = (C = this.clipGroups) == null ? void 0 : C.get(G);
10984
+ const N = Math.max(0, O.startTime + k), q = (C = this.clipGroups) == null ? void 0 : C.get(G);
10985
10985
  if (q) {
10986
- const ne = ye(H, this.zoom, this.scrollLeft);
10986
+ const ne = ye(N, this.zoom, this.scrollLeft);
10987
10987
  q.x(ne), q.y(this.resolveClipRenderY(G, n.crossTrackDragOffsetY)), q.visible(
10988
10988
  ne + Te(O.duration, this.zoom) > 0 && ne < this.layer.width()
10989
10989
  );
10990
10990
  const W = J.getClip();
10991
- ae.updateClipGroup(
10991
+ se.updateClipGroup(
10992
10992
  q,
10993
10993
  Te(W.duration, this.zoom),
10994
10994
  this.trackHeight - 4,
@@ -11007,13 +11007,13 @@ const Le = class Le {
11007
11007
  }
11008
11008
  }
11009
11009
  }
11010
- g && this.onClipCrossTrackPreview && this.config.id && !V ? this.onClipCrossTrackPreview(A, n.dragTargetTrackY, this.config.id) !== "self" && this.hideDropPreview() : V ? this.hideDropPreview() : this.showDropPreview(A), this.updateSnapGuideLine(I.guideTime);
11010
+ g && this.onClipCrossTrackPreview && this.config.id && !V ? this.onClipCrossTrackPreview(E, n.dragTargetTrackY, this.config.id) !== "self" && this.hideDropPreview() : V ? this.hideDropPreview() : this.showDropPreview(E), this.updateSnapGuideLine(I.guideTime);
11011
11011
  } else
11012
11012
  this.hideDropPreview(), (w = this.onClearDropPreview) == null || w.call(this), this.updateSnapGuideLine(null);
11013
11013
  i && this.updateEdgeAutoScrollState(d, h.width), this.layer.batchDraw(), (x = this.dragOverlayLayer) == null || x.batchDraw();
11014
11014
  }
11015
11015
  buildPreviewClip(e, t, i, r, n) {
11016
- const a = i - r.pointerStartX + (this.scrollLeft - r.dragStartScrollLeft), o = N.pixelsToTime(a, this.zoom);
11016
+ const a = i - r.pointerStartX + (this.scrollLeft - r.dragStartScrollLeft), o = $.pixelsToTime(a, this.zoom);
11017
11017
  let l;
11018
11018
  return n === "resize-left" || e.isResizingLeft ? l = this.buildResizeLeftPreviewClip(e, t, o) : n === "resize-right" || e.isResizingRight ? l = this.buildResizeRightPreviewClip(e, t, o) : l = {
11019
11019
  ...e,
@@ -11090,7 +11090,7 @@ const Le = class Le {
11090
11090
  }
11091
11091
  buildResizeLeftPreviewClip(e, t, i) {
11092
11092
  if (!this.isSourceBoundClip(t)) {
11093
- const g = N.calculateEndTime(t.startTime, t.duration);
11093
+ const g = $.calculateEndTime(t.startTime, t.duration);
11094
11094
  let f = Math.max(0, t.startTime + i), y = g - f;
11095
11095
  return y < 1e3 && (y = 1e3, f = g - y), {
11096
11096
  ...e,
@@ -11102,7 +11102,7 @@ const Le = class Le {
11102
11102
  sourceDuration: y
11103
11103
  };
11104
11104
  }
11105
- const n = Math.max(0, t.startTime + i) - t.startTime, o = Math.max(0, t.startTimeAtSource + i) - t.startTimeAtSource, l = Math.abs(n) < Math.abs(o) ? n : o, c = N.calculateEndTime(t.startTime, t.duration);
11105
+ const n = Math.max(0, t.startTime + i) - t.startTime, o = Math.max(0, t.startTimeAtSource + i) - t.startTimeAtSource, l = Math.abs(n) < Math.abs(o) ? n : o, c = $.calculateEndTime(t.startTime, t.duration);
11106
11106
  let h = t.startTime + l, d = t.duration - l, u;
11107
11107
  return d < 1e3 ? (d = 1e3, h = c - d, u = t.endTimeAtSource - d) : u = t.startTimeAtSource + l, {
11108
11108
  ...e,
@@ -11143,7 +11143,7 @@ const Le = class Le {
11143
11143
  const r = i.flatMap((c) => [c.startTime, c.startTime + c.duration]);
11144
11144
  if (r.length === 0)
11145
11145
  return { clip: e, guideTime: null };
11146
- const n = N.pixelsToTime(this.clipSnapThreshold, this.zoom), a = e.startTime + e.duration, o = [];
11146
+ const n = $.pixelsToTime(this.clipSnapThreshold, this.zoom), a = e.startTime + e.duration, o = [];
11147
11147
  if (e.isResizingLeft)
11148
11148
  for (const c of r) {
11149
11149
  const h = a - c, d = t.endTimeAtSource - h, u = Math.abs(c - e.startTime);
@@ -11269,7 +11269,7 @@ const Le = class Le {
11269
11269
  calculateHorizontalAutoScrollVelocity(e, t) {
11270
11270
  if (t <= 0)
11271
11271
  return 0;
11272
- const i = Math.min(Le.AUTO_SCROLL_EDGE_THRESHOLD, t / 2), r = Le.AUTO_SCROLL_MAX_SPEED;
11272
+ const i = Math.min(Re.AUTO_SCROLL_EDGE_THRESHOLD, t / 2), r = Re.AUTO_SCROLL_MAX_SPEED;
11273
11273
  if (e <= 0)
11274
11274
  return -r;
11275
11275
  if (e >= t)
@@ -11291,8 +11291,8 @@ const Le = class Le {
11291
11291
  this.edgeAutoScrollAnimationFrameId !== null && (typeof cancelAnimationFrame == "function" && cancelAnimationFrame(this.edgeAutoScrollAnimationFrameId), this.edgeAutoScrollAnimationFrameId = null);
11292
11292
  }
11293
11293
  };
11294
- p(Le, "DEFAULT_DRAG_ACTIVATION_THRESHOLD", 4), p(Le, "DEFAULT_CLIP_SNAP_THRESHOLD", 8), p(Le, "AUTO_SCROLL_EDGE_THRESHOLD", 48), p(Le, "AUTO_SCROLL_MAX_SPEED", 18);
11295
- let Nr = Le;
11294
+ p(Re, "DEFAULT_DRAG_ACTIVATION_THRESHOLD", 4), p(Re, "DEFAULT_CLIP_SNAP_THRESHOLD", 8), p(Re, "AUTO_SCROLL_EDGE_THRESHOLD", 48), p(Re, "AUTO_SCROLL_MAX_SPEED", 18);
11295
+ let Nr = Re;
11296
11296
  class Qu {
11297
11297
  constructor(e, t, i, r, n, a) {
11298
11298
  p(this, "layer");
@@ -11305,7 +11305,7 @@ class Qu {
11305
11305
  p(this, "scrollLeft", 0);
11306
11306
  p(this, "onTimeChange");
11307
11307
  p(this, "isDragging", !1);
11308
- this.layer = e, this.currentTime = t, this.zoom = i, this.theme = n, this.onTimeChange = a, this.playheadGroup = ae.createGroup(), this.layer.add(this.playheadGroup), this.playheadLine = ae.createLine(
11308
+ this.layer = e, this.currentTime = t, this.zoom = i, this.theme = n, this.onTimeChange = a, this.playheadGroup = se.createGroup(), this.layer.add(this.playheadGroup), this.playheadLine = se.createLine(
11309
11309
  [0, 0, 0, r],
11310
11310
  this.theme.playhead,
11311
11311
  1
@@ -11336,7 +11336,7 @@ class Qu {
11336
11336
  if (!t) return;
11337
11337
  const i = t.container();
11338
11338
  if (!i) return;
11339
- const r = i.getBoundingClientRect(), n = e.clientX - r.left, a = N.pixelsToTime(n - ue + this.scrollLeft, this.zoom);
11339
+ const r = i.getBoundingClientRect(), n = e.clientX - r.left, a = $.pixelsToTime(n - ue + this.scrollLeft, this.zoom);
11340
11340
  this.setTime(a);
11341
11341
  }
11342
11342
  setTime(e) {
@@ -11352,7 +11352,7 @@ class Qu {
11352
11352
  this.playheadLine.points([0, 0, 0, e]), this.render();
11353
11353
  }
11354
11354
  render() {
11355
- const e = N.timeToPixels(this.currentTime, this.zoom) - this.scrollLeft + ue;
11355
+ const e = $.timeToPixels(this.currentTime, this.zoom) - this.scrollLeft + ue;
11356
11356
  this.playheadGroup.x(e), this.playheadGroup.visible(e >= 0 && e <= this.layer.width()), this.layer.batchDraw();
11357
11357
  }
11358
11358
  getTime() {
@@ -11405,7 +11405,7 @@ const wh = (s) => new Th(typeof s == "string" ? s : s + "", void 0, ka), kh = (s
11405
11405
  * Copyright 2017 Google LLC
11406
11406
  * SPDX-License-Identifier: BSD-3-Clause
11407
11407
  */
11408
- const { is: xh, defineProperty: Ph, getOwnPropertyDescriptor: _h, getOwnPropertyNames: Ih, getOwnPropertySymbols: Ah, getPrototypeOf: Eh } = Object, Ze = globalThis, Yn = Ze.trustedTypes, Rh = Yn ? Yn.emptyScript : "", hr = Ze.reactiveElementPolyfillSupport, Jt = (s, e) => s, $r = { toAttribute(s, e) {
11408
+ const { is: xh, defineProperty: Ph, getOwnPropertyDescriptor: _h, getOwnPropertyNames: Ih, getOwnPropertySymbols: Ah, getPrototypeOf: Eh } = Object, Ke = globalThis, Yn = Ke.trustedTypes, Rh = Yn ? Yn.emptyScript : "", hr = Ke.reactiveElementPolyfillSupport, Jt = (s, e) => s, $r = { toAttribute(s, e) {
11409
11409
  switch (e) {
11410
11410
  case Boolean:
11411
11411
  s = s ? Rh : null;
@@ -11434,7 +11434,7 @@ const { is: xh, defineProperty: Ph, getOwnPropertyDescriptor: _h, getOwnProperty
11434
11434
  }
11435
11435
  return t;
11436
11436
  } }, xa = (s, e) => !xh(s, e), Xn = { attribute: !0, type: String, converter: $r, reflect: !1, useDefault: !1, hasChanged: xa };
11437
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), Ze.litPropertyMetadata ?? (Ze.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
11437
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), Ke.litPropertyMetadata ?? (Ke.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
11438
11438
  let vt = class extends HTMLElement {
11439
11439
  static addInitializer(e) {
11440
11440
  this._$Ei(), (this.l ?? (this.l = [])).push(e);
@@ -11638,14 +11638,14 @@ let vt = class extends HTMLElement {
11638
11638
  firstUpdated(e) {
11639
11639
  }
11640
11640
  };
11641
- vt.elementStyles = [], vt.shadowRootOptions = { mode: "open" }, vt[Jt("elementProperties")] = /* @__PURE__ */ new Map(), vt[Jt("finalized")] = /* @__PURE__ */ new Map(), hr == null || hr({ ReactiveElement: vt }), (Ze.reactiveElementVersions ?? (Ze.reactiveElementVersions = [])).push("2.1.2");
11641
+ vt.elementStyles = [], vt.shadowRootOptions = { mode: "open" }, vt[Jt("elementProperties")] = /* @__PURE__ */ new Map(), vt[Jt("finalized")] = /* @__PURE__ */ new Map(), hr == null || hr({ ReactiveElement: vt }), (Ke.reactiveElementVersions ?? (Ke.reactiveElementVersions = [])).push("2.1.2");
11642
11642
  /**
11643
11643
  * @license
11644
11644
  * Copyright 2017 Google LLC
11645
11645
  * SPDX-License-Identifier: BSD-3-Clause
11646
11646
  */
11647
- const Qt = globalThis, jn = (s) => s, Yi = Qt.trustedTypes, qn = Yi ? Yi.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Pa = "$lit$", qe = `lit$${Math.random().toFixed(9).slice(2)}$`, _a = "?" + qe, Lh = `<${_a}>`, ct = document, oi = () => ct.createComment(""), li = (s) => s === null || typeof s != "object" && typeof s != "function", en = Array.isArray, Dh = (s) => en(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", dr = `[
11648
- \f\r]`, Ot = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Kn = /-->/g, Zn = />/g, nt = RegExp(`>|${dr}(?:([^\\s"'>=/]+)(${dr}*=${dr}*(?:[^
11647
+ const Qt = globalThis, jn = (s) => s, Yi = Qt.trustedTypes, qn = Yi ? Yi.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Pa = "$lit$", je = `lit$${Math.random().toFixed(9).slice(2)}$`, _a = "?" + je, Lh = `<${_a}>`, ct = document, oi = () => ct.createComment(""), li = (s) => s === null || typeof s != "object" && typeof s != "function", en = Array.isArray, Dh = (s) => en(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", dr = `[
11648
+ \f\r]`, Ot = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Kn = /-->/g, Zn = />/g, rt = RegExp(`>|${dr}(?:([^\\s"'>=/]+)(${dr}*=${dr}*(?:[^
11649
11649
  \f\r"'\`<>=]|("|')|))|$)`, "g"), Jn = /'/g, Qn = /"/g, Ia = /^(?:script|style|textarea|title)$/i, Mh = (s) => (e, ...t) => ({ _$litType$: s, strings: e, values: t }), K = Mh(1), ht = Symbol.for("lit-noChange"), ce = Symbol.for("lit-nothing"), es = /* @__PURE__ */ new WeakMap(), ot = ct.createTreeWalker(ct, 129);
11650
11650
  function Aa(s, e) {
11651
11651
  if (!en(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
@@ -11657,9 +11657,9 @@ const Oh = (s, e) => {
11657
11657
  for (let o = 0; o < t; o++) {
11658
11658
  const l = s[o];
11659
11659
  let c, h, d = -1, u = 0;
11660
- for (; u < l.length && (a.lastIndex = u, h = a.exec(l), h !== null); ) u = a.lastIndex, a === Ot ? h[1] === "!--" ? a = Kn : h[1] !== void 0 ? a = Zn : h[2] !== void 0 ? (Ia.test(h[2]) && (r = RegExp("</" + h[2], "g")), a = nt) : h[3] !== void 0 && (a = nt) : a === nt ? h[0] === ">" ? (a = r ?? Ot, d = -1) : h[1] === void 0 ? d = -2 : (d = a.lastIndex - h[2].length, c = h[1], a = h[3] === void 0 ? nt : h[3] === '"' ? Qn : Jn) : a === Qn || a === Jn ? a = nt : a === Kn || a === Zn ? a = Ot : (a = nt, r = void 0);
11661
- const g = a === nt && s[o + 1].startsWith("/>") ? " " : "";
11662
- n += a === Ot ? l + Lh : d >= 0 ? (i.push(c), l.slice(0, d) + Pa + l.slice(d) + qe + g) : l + qe + (d === -2 ? o : g);
11660
+ for (; u < l.length && (a.lastIndex = u, h = a.exec(l), h !== null); ) u = a.lastIndex, a === Ot ? h[1] === "!--" ? a = Kn : h[1] !== void 0 ? a = Zn : h[2] !== void 0 ? (Ia.test(h[2]) && (r = RegExp("</" + h[2], "g")), a = rt) : h[3] !== void 0 && (a = rt) : a === rt ? h[0] === ">" ? (a = r ?? Ot, d = -1) : h[1] === void 0 ? d = -2 : (d = a.lastIndex - h[2].length, c = h[1], a = h[3] === void 0 ? rt : h[3] === '"' ? Qn : Jn) : a === Qn || a === Jn ? a = rt : a === Kn || a === Zn ? a = Ot : (a = rt, r = void 0);
11661
+ const g = a === rt && s[o + 1].startsWith("/>") ? " " : "";
11662
+ n += a === Ot ? l + Lh : d >= 0 ? (i.push(c), l.slice(0, d) + Pa + l.slice(d) + je + g) : l + je + (d === -2 ? o : g);
11663
11663
  }
11664
11664
  return [Aa(s, n + (s[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
11665
11665
  };
@@ -11676,11 +11676,11 @@ class ci {
11676
11676
  for (; (r = ot.nextNode()) !== null && l.length < o; ) {
11677
11677
  if (r.nodeType === 1) {
11678
11678
  if (r.hasAttributes()) for (const d of r.getAttributeNames()) if (d.endsWith(Pa)) {
11679
- const u = h[a++], g = r.getAttribute(d).split(qe), f = /([.?@])?(.*)/.exec(u);
11679
+ const u = h[a++], g = r.getAttribute(d).split(je), f = /([.?@])?(.*)/.exec(u);
11680
11680
  l.push({ type: 1, index: n, name: f[2], strings: g, ctor: f[1] === "." ? Fh : f[1] === "?" ? Gh : f[1] === "@" ? Hh : Ji }), r.removeAttribute(d);
11681
- } else d.startsWith(qe) && (l.push({ type: 6, index: n }), r.removeAttribute(d));
11681
+ } else d.startsWith(je) && (l.push({ type: 6, index: n }), r.removeAttribute(d));
11682
11682
  if (Ia.test(r.tagName)) {
11683
- const d = r.textContent.split(qe), u = d.length - 1;
11683
+ const d = r.textContent.split(je), u = d.length - 1;
11684
11684
  if (u > 0) {
11685
11685
  r.textContent = Yi ? Yi.emptyScript : "";
11686
11686
  for (let g = 0; g < u; g++) r.append(d[g], oi()), ot.nextNode(), l.push({ type: 2, index: ++n });
@@ -11690,7 +11690,7 @@ class ci {
11690
11690
  } else if (r.nodeType === 8) if (r.data === _a) l.push({ type: 2, index: n });
11691
11691
  else {
11692
11692
  let d = -1;
11693
- for (; (d = r.data.indexOf(qe, d + 1)) !== -1; ) l.push({ type: 7, index: n }), d += qe.length - 1;
11693
+ for (; (d = r.data.indexOf(je, d + 1)) !== -1; ) l.push({ type: 7, index: n }), d += je.length - 1;
11694
11694
  }
11695
11695
  n++;
11696
11696
  }
@@ -11954,24 +11954,24 @@ class zr extends Vh {
11954
11954
  }
11955
11955
  zr.directiveName = "unsafeHTML", zr.resultType = 1;
11956
11956
  const ei = zh(zr);
11957
- function Ie(s) {
11957
+ function _e(s) {
11958
11958
  return s === "text" ? Qi.TEXT : s === "video" ? Qi.VIDEO : Qi.AUDIO;
11959
11959
  }
11960
11960
  function Bt(s, e, t) {
11961
11961
  let i = t;
11962
11962
  for (const r of s) {
11963
11963
  if (r.id === e) break;
11964
- i += Ie(r.type);
11964
+ i += _e(r.type);
11965
11965
  }
11966
11966
  return i;
11967
11967
  }
11968
11968
  function ts(s, e) {
11969
- return s.reduce((t, i) => t + Ie(i.type), e);
11969
+ return s.reduce((t, i) => t + _e(i.type), e);
11970
11970
  }
11971
11971
  function Uh(s, e) {
11972
11972
  let t = e;
11973
11973
  return s.map((i) => {
11974
- const r = Ie(i.type), n = {
11974
+ const r = _e(i.type), n = {
11975
11975
  trackId: i.id,
11976
11976
  y: t,
11977
11977
  height: r
@@ -12033,7 +12033,7 @@ class Wh extends Ea {
12033
12033
  `;
12034
12034
  }
12035
12035
  renderTrackItem(e, t, i, r, n) {
12036
- const a = Ie(e.type), o = e.type === "text" ? n.textTrack : e.type === "video" ? n.videoTrack : n.audioTrack, l = e.type === "text" ? e.isMuted ? n.hide : n.display : e.isMuted ? n.volumeMuted : n.volume, c = e.type === "text" ? e.isMuted ? "显示文本轨" : "隐藏文本轨" : e.isMuted ? "取消静音" : "静音";
12036
+ const a = _e(e.type), o = e.type === "text" ? n.textTrack : e.type === "video" ? n.videoTrack : n.audioTrack, l = e.type === "text" ? e.isMuted ? n.hide : n.display : e.isMuted ? n.volumeMuted : n.volume, c = e.type === "text" ? e.isMuted ? "显示文本轨" : "隐藏文本轨" : e.isMuted ? "取消静音" : "静音";
12037
12037
  return K`
12038
12038
  <div
12039
12039
  class="track-info-item"
@@ -12150,7 +12150,7 @@ const Xh = {
12150
12150
  audio: "音频",
12151
12151
  text: "文本",
12152
12152
  voice: "音色"
12153
- }, z = {
12153
+ }, H = {
12154
12154
  container: "clip-config-panel",
12155
12155
  tabBar: "clip-config-tab-bar",
12156
12156
  tabButton: "clip-config-tab-button",
@@ -12182,6 +12182,11 @@ const Xh = {
12182
12182
  voiceCardSubtitle: "clip-config-voice-subtitle",
12183
12183
  voiceCardCheck: "clip-config-voice-check",
12184
12184
  voiceCardPreviewBadge: "clip-config-voice-preview-badge",
12185
+ voiceCardAvatarWrap: "clip-config-voice-avatar-wrap",
12186
+ voiceCardAvatarWrapFirstRow: "clip-config-voice-avatar-wrap--first-row",
12187
+ voiceCardAvatarTooltip: "clip-config-voice-avatar-tooltip",
12188
+ voiceCardAvatarMask: "clip-config-voice-avatar-mask",
12189
+ voiceCardAvatarSpeaker: "clip-config-voice-avatar-speaker",
12185
12190
  voiceCheckbox: "clip-config-voice-checkbox",
12186
12191
  primaryButton: "clip-config-primary-button",
12187
12192
  errorText: "clip-config-error-text",
@@ -12253,7 +12258,7 @@ class jh extends Ea {
12253
12258
  border-radius: 50%;
12254
12259
  appearance: none;
12255
12260
  -webkit-appearance: none;
12256
- background: radial-gradient(circle at 32% 30%, ${E.sliderThumbGlowStart} 0%, ${E.sliderThumbGlowEnd} 74%);
12261
+ background: radial-gradient(circle at 32% 30%, ${A.sliderThumbGlowStart} 0%, ${A.sliderThumbGlowEnd} 74%);
12257
12262
  box-shadow:
12258
12263
  var(--clip-slider-thumb-shadow),
12259
12264
  ${Ce.sliderThumbInnerShadow};
@@ -12276,13 +12281,117 @@ class jh extends Ea {
12276
12281
  height: 9px;
12277
12282
  border: 1px solid var(--clip-slider-thumb-border);
12278
12283
  border-radius: 50%;
12279
- background: radial-gradient(circle at 32% 30%, ${E.sliderThumbGlowStart} 0%, ${E.sliderThumbGlowEnd} 74%);
12284
+ background: radial-gradient(circle at 32% 30%, ${A.sliderThumbGlowStart} 0%, ${A.sliderThumbGlowEnd} 74%);
12280
12285
  box-shadow:
12281
12286
  var(--clip-slider-thumb-shadow),
12282
12287
  ${Ce.sliderThumbInnerShadow};
12288
+ }
12289
+ .clip-config-voice-card{
12290
+ border: 1px solid transparent;
12291
+ }
12292
+ .clip-config-voice-card:hover {
12293
+ z-index: 2;
12294
+ border: 1px solid #4E5569;
12295
+ }
12296
+
12297
+ .clip-config-panel .clip-config-voice-avatar-wrap {
12298
+ position: relative;
12299
+ flex-shrink: 0;
12300
+ display: inline-flex;
12301
+ align-items: stretch;
12302
+ vertical-align: top;
12303
+ cursor: pointer;
12304
+ }
12305
+
12306
+ .clip-config-panel .clip-config-voice-avatar-tooltip {
12307
+ position: absolute;
12308
+ left: 50%;
12309
+ bottom: calc(100% + 8px);
12310
+ top: auto;
12311
+ transform: translateX(-50%);
12312
+ padding: 4px 10px;
12313
+ border-radius: 6px;
12314
+ background: #4e5569;
12315
+ color: ${A.white};
12316
+ font-size: 11px;
12317
+ line-height: 1.3;
12318
+ font-weight: 500;
12319
+ white-space: nowrap;
12320
+ opacity: 0;
12321
+ pointer-events: none;
12322
+ transition: opacity 140ms ease;
12323
+ z-index: 3;
12324
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
12325
+ }
12326
+
12327
+ .clip-config-panel .clip-config-voice-avatar-tooltip::after {
12328
+ content: '';
12329
+ position: absolute;
12330
+ left: 50%;
12331
+ top: 100%;
12332
+ transform: translateX(-50%);
12333
+ border: 5px solid transparent;
12334
+ border-top-color: #4e5569;
12335
+ }
12336
+
12337
+ .clip-config-panel .clip-config-voice-avatar-wrap--first-row .clip-config-voice-avatar-tooltip {
12338
+ top: calc(100% + 8px);
12339
+ bottom: auto;
12340
+ }
12341
+
12342
+ .clip-config-panel .clip-config-voice-avatar-wrap--first-row .clip-config-voice-avatar-tooltip::after {
12343
+ display: none;
12344
+ }
12345
+
12346
+ .clip-config-panel .clip-config-voice-avatar-wrap--first-row .clip-config-voice-avatar-tooltip::before {
12347
+ content: '';
12348
+ position: absolute;
12349
+ left: 50%;
12350
+ bottom: 100%;
12351
+ transform: translateX(-50%);
12352
+ border: 5px solid transparent;
12353
+ border-bottom-color: #4e5569;
12354
+ }
12355
+
12356
+ .clip-config-panel .clip-config-voice-avatar-mask {
12357
+ position: absolute;
12358
+ inset: 0;
12359
+ border-radius: 8px;
12360
+ background: rgba(0, 0, 0, 0.42);
12361
+ opacity: 0;
12362
+ pointer-events: none;
12363
+ transition: opacity 140ms ease;
12364
+ z-index: 1;
12365
+ }
12366
+
12367
+ .clip-config-panel .clip-config-voice-card:hover .clip-config-voice-avatar-mask {
12368
+ opacity: 1;
12369
+ }
12370
+
12371
+ .clip-config-panel .clip-config-voice-avatar-speaker {
12372
+ position: absolute;
12373
+ inset: 0;
12374
+ border-radius: 8px;
12375
+ display: flex;
12376
+ align-items: center;
12377
+ justify-content: center;
12378
+ opacity: 0;
12379
+ pointer-events: none;
12380
+ transition: opacity 140ms ease;
12381
+ z-index: 2;
12382
+ filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
12383
+ }
12384
+
12385
+ .clip-config-panel .clip-config-voice-card:hover .clip-config-voice-avatar-speaker {
12386
+ opacity: 1;
12387
+ pointer-events: auto;
12388
+ }
12389
+
12390
+ .clip-config-panel .clip-config-voice-avatar-speaker:hover ~ .clip-config-voice-avatar-tooltip {
12391
+ opacity: 1;
12283
12392
  }
12284
12393
  </style>
12285
- <div class=${z.container} style=${this.getContainerStyle(i)}>
12394
+ <div class=${H.container} style=${this.getContainerStyle(i)}>
12286
12395
  ${t ? this.renderPanel(e) : this.renderEmptyState(i, r)}
12287
12396
  </div>
12288
12397
  ${this.renderVoiceLoadingOverlay(e)}
@@ -12291,7 +12400,7 @@ class jh extends Ea {
12291
12400
  renderVoiceLoadingOverlay(e) {
12292
12401
  return e.isVoiceLoadingOverlayVisible ? K`
12293
12402
  <div
12294
- class=${z.voiceLoadingOverlay}
12403
+ class=${H.voiceLoadingOverlay}
12295
12404
  style=${[
12296
12405
  "position:fixed",
12297
12406
  "inset:0",
@@ -12305,7 +12414,7 @@ class jh extends Ea {
12305
12414
  ].join(";")}
12306
12415
  >
12307
12416
  <div
12308
- class=${z.voiceLoadingCard}
12417
+ class=${H.voiceLoadingCard}
12309
12418
  style=${[
12310
12419
  "width:160px",
12311
12420
  "height:160px",
@@ -12322,13 +12431,13 @@ class jh extends Ea {
12322
12431
  ].join(";")}
12323
12432
  >
12324
12433
  <div
12325
- class=${z.voiceLoadingIcon}
12434
+ class=${H.voiceLoadingIcon}
12326
12435
  style="width:24px;height:24px;display:flex;align-items:center;justify-content:center;animation:clip-config-voice-loading-spin 1s linear infinite;"
12327
12436
  >
12328
12437
  ${e.loadingIconSvg ? ei(this.resizeSvg(e.loadingIconSvg, 24)) : "⟳"}
12329
12438
  </div>
12330
12439
  <div
12331
- class=${z.voiceLoadingText}
12440
+ class=${H.voiceLoadingText}
12332
12441
  style="font-size:14px;line-height:24px;color:#c9cbd4;"
12333
12442
  >
12334
12443
  配音生成中...
@@ -12340,7 +12449,7 @@ class jh extends Ea {
12340
12449
  renderEmptyState(e, t) {
12341
12450
  return K`
12342
12451
  <div
12343
- class=${z.emptyState}
12452
+ class=${H.emptyState}
12344
12453
  style=${`text-align:center;padding:40px 20px;color:${e.labelColor};`}
12345
12454
  >
12346
12455
  <div style="margin-bottom:8px;display:flex;align-items:center;justify-content:center;">
@@ -12351,32 +12460,36 @@ class jh extends Ea {
12351
12460
  `;
12352
12461
  }
12353
12462
  renderPanel(e) {
12354
- const t = this.getAvailableTabs(e.clip);
12463
+ const t = this.getAvailableTabs(e.clip), i = this.shouldUseVoiceInnerScroll(e);
12355
12464
  return K`
12356
12465
  ${t.length > 1 ? this.renderTabBar(e, t) : null}
12357
12466
  <div
12358
- class=${z.content}
12359
- style="padding:12px;flex:1;overflow-y:auto;min-height:0;"
12467
+ class=${H.content}
12468
+ style=${i ? "padding:12px;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden;" : "padding:12px;flex:1;overflow-y:auto;min-height:0;"}
12360
12469
  >
12361
- ${t.map((i) => this.renderTabPanel(e, i))}
12470
+ ${t.map((r) => this.renderTabPanel(e, r))}
12362
12471
  </div>
12363
12472
  ${this.renderActionBar(e)}
12364
12473
  `;
12365
12474
  }
12475
+ /** 音色 Tab 下由列表区域单独滚动,筛选条保持在外层固定不动 */
12476
+ shouldUseVoiceInnerScroll(e) {
12477
+ return e.activeTab === "voice" && this.supportsVoicePanel(e.clip);
12478
+ }
12366
12479
  renderTabPanel(e, t) {
12367
12480
  return t === "visual" ? this.renderVisualPanel(e) : t === "audio" ? this.renderAudioPanel(e) : t === "text" ? this.renderTextPanel(e) : t === "voice" ? this.renderVoicePanel(e) : null;
12368
12481
  }
12369
12482
  renderTabBar(e, t) {
12370
12483
  return K`
12371
12484
  <div
12372
- class=${z.tabBar}
12485
+ class=${H.tabBar}
12373
12486
  style=${`display:flex;gap:12px;padding:4px;background-color:${Ce.tabBarBackground};border-radius:4px 4px 0 0;height:32px;`}
12374
12487
  >
12375
12488
  ${t.map((i) => {
12376
12489
  const r = e.activeTab === i;
12377
12490
  return K`
12378
12491
  <button
12379
- class=${z.tabButton}
12492
+ class=${H.tabButton}
12380
12493
  style=${[
12381
12494
  "line-height:22px",
12382
12495
  "padding:0 6px",
@@ -12385,7 +12498,7 @@ class jh extends Ea {
12385
12498
  "font-size:13px",
12386
12499
  "font-family:inherit",
12387
12500
  "transition:background-color 0.15s, color 0.15s",
12388
- `background-color:${r ? Ce.activeTabBackground : E.transparent}`,
12501
+ `background-color:${r ? Ce.activeTabBackground : A.transparent}`,
12389
12502
  `color:${r ? Ce.activeTabText : Ce.inactiveTabText}`,
12390
12503
  "border-radius:4px"
12391
12504
  ].join(";")}
@@ -12402,7 +12515,7 @@ class jh extends Ea {
12402
12515
  const t = e.activeTab === "voice" && this.supportsVoicePanel(e.clip);
12403
12516
  return K`
12404
12517
  <div
12405
- class=${z.actionBar}
12518
+ class=${H.actionBar}
12406
12519
  style=${[
12407
12520
  `border-top:1px solid ${e.theme.borderColor}`,
12408
12521
  "border-radius:0 0 4px 4px",
@@ -12420,7 +12533,7 @@ class jh extends Ea {
12420
12533
  return K`
12421
12534
  <div style="display:flex;align-items:center;justify-content:space-between;gap:12px;">
12422
12535
  <label
12423
- class=${z.voiceCheckbox}
12536
+ class=${H.voiceCheckbox}
12424
12537
  style="display:flex;align-items:center;gap:8px;cursor:pointer;"
12425
12538
  >
12426
12539
  <input
@@ -12431,7 +12544,7 @@ class jh extends Ea {
12431
12544
  <span style=${`font-size:12px;color:${e.theme.textColor};`}>${r}</span>
12432
12545
  </label>
12433
12546
  <button
12434
- class=${z.primaryButton}
12547
+ class=${H.primaryButton}
12435
12548
  style=${[
12436
12549
  "padding:8px 14px",
12437
12550
  "border:none",
@@ -12456,7 +12569,7 @@ class jh extends Ea {
12456
12569
  renderVisualPanel(e) {
12457
12570
  const t = e.activeTab === "visual" ? "block" : "none";
12458
12571
  return K`
12459
- <div class=${z.visualPanel} style=${`display:${t};`}>
12572
+ <div class=${H.visualPanel} style=${`display:${t};`}>
12460
12573
  ${this.renderPositionSection(e)}
12461
12574
  ${this.renderScaleSection(e)}
12462
12575
  </div>
@@ -12464,7 +12577,7 @@ class jh extends Ea {
12464
12577
  }
12465
12578
  renderPositionSection(e) {
12466
12579
  return K`
12467
- <div class=${z.section} style="margin-bottom:16px;">
12580
+ <div class=${H.section} style="margin-bottom:16px;">
12468
12581
  ${this.renderSectionTitle("位置", e.theme)}
12469
12582
  ${this.renderPositionControl(e, "X", "x")}
12470
12583
  ${this.renderPositionControl(e, "Y", "y")}
@@ -12476,11 +12589,11 @@ class jh extends Ea {
12476
12589
  const t = this.getTransform(e.clip);
12477
12590
  return K`
12478
12591
  <div
12479
- class=${z.section}
12592
+ class=${H.section}
12480
12593
  style=${`border-top:1px solid ${e.theme.borderColor};padding-top:16px;`}
12481
12594
  >
12482
12595
  ${this.renderSectionTitle("缩放", e.theme)}
12483
- <div class=${z.row} style="display:flex;align-items:center;gap:8px;">
12596
+ <div class=${H.row} style="display:flex;align-items:center;gap:8px;">
12484
12597
  ${this.renderRangeInput({
12485
12598
  min: "0.1",
12486
12599
  max: "8",
@@ -12496,7 +12609,7 @@ class jh extends Ea {
12496
12609
  onChange: (i) => e.callbacks.onTransformChange("scale", i)
12497
12610
  })}
12498
12611
  <button
12499
- class=${z.resetButton}
12612
+ class=${H.resetButton}
12500
12613
  style=${[
12501
12614
  "padding:4px 8px",
12502
12615
  `border:1px solid ${e.theme.buttonBorder}`,
@@ -12518,10 +12631,10 @@ class jh extends Ea {
12518
12631
  var r;
12519
12632
  const t = e.activeTab === "audio" ? "block" : "none", i = ((r = e.clip) == null ? void 0 : r.volume) ?? 1;
12520
12633
  return K`
12521
- <div class=${z.audioPanel} style=${`display:${t};`}>
12522
- <div class=${z.section}>
12634
+ <div class=${H.audioPanel} style=${`display:${t};`}>
12635
+ <div class=${H.section}>
12523
12636
  ${this.renderSectionTitle("音量", e.theme)}
12524
- <div class=${z.row} style="display:flex;align-items:center;gap:8px;">
12637
+ <div class=${H.row} style="display:flex;align-items:center;gap:8px;">
12525
12638
  ${this.renderRangeInput({
12526
12639
  min: "0",
12527
12640
  max: "1",
@@ -12545,11 +12658,11 @@ class jh extends Ea {
12545
12658
  renderTextPanel(e) {
12546
12659
  const t = e.clip, i = this.getTransform(t), r = ii(t == null ? void 0 : t.textStyle), n = e.activeTab === "text" ? "block" : "none";
12547
12660
  return K`
12548
- <div class=${z.textPanel} style=${`display:${n};`}>
12549
- <div class=${z.section} style="margin-bottom:16px;">
12661
+ <div class=${H.textPanel} style=${`display:${n};`}>
12662
+ <div class=${H.section} style="margin-bottom:16px;">
12550
12663
  ${this.renderSectionTitle("文本", e.theme)}
12551
12664
  <textarea
12552
- class=${z.textarea}
12665
+ class=${H.textarea}
12553
12666
  rows="5"
12554
12667
  .value=${e.textDraftContent}
12555
12668
  style=${[
@@ -12568,9 +12681,9 @@ class jh extends Ea {
12568
12681
  @blur=${() => e.callbacks.onTextContentCommit()}
12569
12682
  ></textarea>
12570
12683
  </div>
12571
- <div class=${z.section} style="margin-bottom:16px;">
12684
+ <div class=${H.section} style="margin-bottom:16px;">
12572
12685
  ${this.renderSectionTitle("字号", e.theme)}
12573
- <div class=${z.row} style="display:flex;align-items:center;gap:8px;">
12686
+ <div class=${H.row} style="display:flex;align-items:center;gap:8px;">
12574
12687
  ${this.renderRangeInput({
12575
12688
  min: "5",
12576
12689
  max: "300",
@@ -12587,11 +12700,11 @@ class jh extends Ea {
12587
12700
  })}
12588
12701
  </div>
12589
12702
  </div>
12590
- <div class=${z.section} style="margin-bottom:16px;">
12703
+ <div class=${H.section} style="margin-bottom:16px;">
12591
12704
  ${this.renderSectionTitle("颜色", e.theme)}
12592
12705
  <input
12593
12706
  type="color"
12594
- class=${z.colorInput}
12707
+ class=${H.colorInput}
12595
12708
  .value=${r.color}
12596
12709
  style=${[
12597
12710
  "width:108px",
@@ -12604,16 +12717,16 @@ class jh extends Ea {
12604
12717
  @input=${(a) => e.callbacks.onTextStyleChange("color", a.target.value)}
12605
12718
  />
12606
12719
  </div>
12607
- <div class=${z.section} style="margin-bottom:16px;">
12720
+ <div class=${H.section} style="margin-bottom:16px;">
12608
12721
  ${this.renderSectionTitle("位置", e.theme)}
12609
- <div class=${z.row} style="display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:12px;">
12722
+ <div class=${H.row} style="display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:12px;">
12610
12723
  ${this.renderLabeledNumberInput(e, "X", i.x, (a) => e.callbacks.onTextStyleChange("x", a), "0.01", "0", "1")}
12611
12724
  ${this.renderLabeledNumberInput(e, "Y", i.y, (a) => e.callbacks.onTextStyleChange("y", a), "0.01", "0", "1")}
12612
12725
  </div>
12613
12726
  </div>
12614
- <div class=${z.section}>
12727
+ <div class=${H.section}>
12615
12728
  ${this.renderSectionTitle("旋转", e.theme)}
12616
- <div class=${z.row} style="max-width:220px;">
12729
+ <div class=${H.row} style="max-width:220px;">
12617
12730
  ${this.renderLabeledNumberInput(e, "角度", r.rotation, (a) => e.callbacks.onTextStyleChange("rotation", a), "1")}
12618
12731
  </div>
12619
12732
  </div>
@@ -12626,23 +12739,32 @@ class jh extends Ea {
12626
12739
  { key: "男", label: "男声" },
12627
12740
  { key: "普通话", label: "普通话" },
12628
12741
  { key: "粤语", label: "粤语" }
12629
- ], r = e.voiceCatalog.filter((n) => !e.activeVoiceFilterTag || n.tags.includes(e.activeVoiceFilterTag));
12742
+ ], r = e.voiceCatalog.filter((l) => !e.activeVoiceFilterTag || l.tags.includes(e.activeVoiceFilterTag)), n = this.shouldUseVoiceInnerScroll(e), o = [
12743
+ `display:${t === "block" ? n ? "flex" : "block" : "none"}`,
12744
+ n ? "flex-direction:column" : "",
12745
+ n ? "flex:1" : "",
12746
+ n ? "min-height:0" : "",
12747
+ n ? "overflow:hidden" : ""
12748
+ ].filter(Boolean).join(";");
12630
12749
  return K`
12631
- <div class=${z.voicePanel} style=${`display:${t};`}>
12632
- <div class=${z.section} style="margin-bottom:16px;">
12633
- <div class=${z.filterGroup} style="display:flex;gap:8px;flex-wrap:wrap;">
12634
- ${i.map((n) => this.renderFilterButton(
12750
+ <div class=${H.voicePanel} style=${o}>
12751
+ <div class=${H.section} style=${n ? "flex-shrink:0;margin-bottom:12px;" : "margin-bottom:16px;"}>
12752
+ <div class=${H.filterGroup} style="display:flex;gap:8px;flex-wrap:wrap;">
12753
+ ${i.map((l) => this.renderFilterButton(
12635
12754
  e,
12636
- n.key,
12637
- n.label,
12638
- e.activeVoiceFilterTag === n.key,
12639
- () => e.callbacks.onVoiceFilterChange(n.key)
12755
+ l.key,
12756
+ l.label,
12757
+ e.activeVoiceFilterTag === l.key,
12758
+ () => e.callbacks.onVoiceFilterChange(l.key)
12640
12759
  ))}
12641
12760
  </div>
12642
12761
  </div>
12643
- <div class=${z.section}>
12644
- <div class=${z.voiceCardGrid} style="display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:8px;">
12645
- ${r.map((n) => this.renderVoiceCard(e, n))}
12762
+ <div
12763
+ class=${H.section}
12764
+ style=${n ? "flex:1;min-height:0;overflow-y:auto;" : ""}
12765
+ >
12766
+ <div class=${H.voiceCardGrid} style="display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:8px;">
12767
+ ${r.map((l, c) => this.renderVoiceCard(e, l, c))}
12646
12768
  </div>
12647
12769
  ${r.length === 0 ? K`
12648
12770
  <div style=${`padding:16px 0;font-size:12px;color:${e.theme.labelColor};`}>
@@ -12651,8 +12773,8 @@ class jh extends Ea {
12651
12773
  ` : null}
12652
12774
  ${e.voiceErrorMessage ? K`
12653
12775
  <div
12654
- class=${z.errorText}
12655
- style=${`padding-top:12px;font-size:12px;color:${E.accentDanger};`}
12776
+ class=${H.errorText}
12777
+ style=${`padding-top:12px;font-size:12px;color:${A.accentDanger};`}
12656
12778
  >
12657
12779
  ${e.voiceErrorMessage}
12658
12780
  </div>
@@ -12664,7 +12786,7 @@ class jh extends Ea {
12664
12786
  renderFilterButton(e, t, i, r, n) {
12665
12787
  return K`
12666
12788
  <button
12667
- class=${z.filterButton}
12789
+ class=${H.filterButton}
12668
12790
  style=${[
12669
12791
  "padding:6px 12px",
12670
12792
  "border:none",
@@ -12681,11 +12803,11 @@ class jh extends Ea {
12681
12803
  </button>
12682
12804
  `;
12683
12805
  }
12684
- renderVoiceCard(e, t) {
12685
- const i = e.selectedVoiceId === t.id, r = e.previewingVoiceId === t.id, n = t.avatar;
12806
+ renderVoiceCard(e, t, i) {
12807
+ const r = e.selectedVoiceId === t.id, n = e.previewingVoiceId === t.id, a = t.avatar, o = i < 2;
12686
12808
  return K`
12687
12809
  <button
12688
- class=${z.voiceCard}
12810
+ class=${H.voiceCard}
12689
12811
  style=${[
12690
12812
  "position:relative",
12691
12813
  "display:flex",
@@ -12696,15 +12818,57 @@ class jh extends Ea {
12696
12818
  "border-radius:12px",
12697
12819
  "text-align:left",
12698
12820
  "cursor:pointer",
12699
- "border:none",
12700
- `outline:${i ? `1px solid ${e.theme.buttonActiveBorder}` : "none"}`,
12701
- `background:${i ? Ce.activeTabBackground : e.theme.buttonBackground}`,
12821
+ `border:${r ? `1px solid ${e.theme.buttonActiveBorder}` : ""}`,
12822
+ `background:${r ? Ce.activeTabBackground : e.theme.buttonBackground}`,
12702
12823
  `color:${e.theme.textColor}`
12703
12824
  ].join(";")}
12704
12825
  @click=${() => e.callbacks.onVoiceSelect(t.id)}
12705
12826
  >
12827
+ ${a ? K`
12828
+ <span
12829
+ class=${[
12830
+ H.voiceCardAvatarWrap,
12831
+ o ? H.voiceCardAvatarWrapFirstRow : ""
12832
+ ].filter(Boolean).join(" ")}
12833
+ >
12834
+ <div
12835
+ class=${H.voiceCardAvatar}
12836
+ style=${[
12837
+ "width:32px",
12838
+ "height:32px",
12839
+ "border-radius:8px",
12840
+ "flex-shrink:0",
12841
+ "display:flex",
12842
+ "align-items:center",
12843
+ "justify-content:center",
12844
+ `background:url(${a}) center / cover no-repeat`,
12845
+ `color:${A.white}`,
12846
+ "font-size:18px",
12847
+ "font-weight:600"
12848
+ ].join(";")}
12849
+ >
12850
+ </div>
12851
+ <span class=${H.voiceCardAvatarMask} aria-hidden="true"></span>
12852
+ <span
12853
+ class=${H.voiceCardAvatarSpeaker}
12854
+ aria-hidden="true"
12855
+ >
12856
+ <svg
12857
+ width="18"
12858
+ height="18"
12859
+ viewBox="0 0 24 24"
12860
+ fill=${A.white}
12861
+ >
12862
+ <path
12863
+ d="M3 9v6h4l5 5V4L7 9H3zm13.5 3a4.5 4.5 0 0 0-2.5-4.03v8.05a4.5 4.5 0 0 0 2.5-4.02zM14 3.23v2.06a7 7 0 0 1 0 13.42v-2.06a5 5 0 0 0 0-9.3z"
12864
+ />
12865
+ </svg>
12866
+ </span>
12867
+ <span class=${H.voiceCardAvatarTooltip}>试听</span>
12868
+ </span>
12869
+ ` : K`
12706
12870
  <div
12707
- class=${z.voiceCardAvatar}
12871
+ class=${H.voiceCardAvatar}
12708
12872
  style=${[
12709
12873
  "width:32px",
12710
12874
  "height:32px",
@@ -12713,33 +12877,34 @@ class jh extends Ea {
12713
12877
  "display:flex",
12714
12878
  "align-items:center",
12715
12879
  "justify-content:center",
12716
- `background:${n ? `url(${n}) center / cover no-repeat` : "linear-gradient(135deg, #6c7080 0%, #424656 100%)"}`,
12717
- `color:${E.white}`,
12880
+ "background:linear-gradient(135deg, #6c7080 0%, #424656 100%)",
12881
+ `color:${A.white}`,
12718
12882
  "font-size:18px",
12719
12883
  "font-weight:600"
12720
12884
  ].join(";")}
12721
12885
  >
12722
- ${n ? "" : t.name.slice(0, 1)}
12886
+ ${t.name.slice(0, 1)}
12723
12887
  </div>
12724
- <div class=${z.voiceCardMeta} style="flex:1;min-width:0;">
12888
+ `}
12889
+ <div class=${H.voiceCardMeta} style="flex:1;min-width:0;">
12725
12890
  <div
12726
- class=${z.voiceCardTitle}
12891
+ class=${H.voiceCardTitle}
12727
12892
  style=${[
12728
12893
  "display:flex",
12729
12894
  "align-items:center",
12730
12895
  "gap:6px",
12731
12896
  "padding-right:24px",
12732
12897
  "font-size:14px",
12733
- `color:${E.white}`,
12898
+ `color:${A.white}`,
12734
12899
  "white-space:nowrap",
12735
12900
  "overflow:hidden",
12736
12901
  "text-overflow:ellipsis"
12737
12902
  ].join(";")}
12738
12903
  >
12739
12904
  <span style="overflow:hidden;text-overflow:ellipsis;">${t.name}</span>
12740
- ${r ? K`
12905
+ ${n ? K`
12741
12906
  <span
12742
- class=${z.voiceCardPreviewBadge}
12907
+ class=${H.voiceCardPreviewBadge}
12743
12908
  style=${[
12744
12909
  "display:inline-flex",
12745
12910
  "align-items:center",
@@ -12749,7 +12914,7 @@ class jh extends Ea {
12749
12914
  "border-radius:999px",
12750
12915
  "font-size:10px",
12751
12916
  "line-height:16px",
12752
- `background:${E.white}`,
12917
+ `background:${A.white}`,
12753
12918
  `color:${Ce.activeTabBackground}`
12754
12919
  ].join(";")}
12755
12920
  >
@@ -12758,15 +12923,15 @@ class jh extends Ea {
12758
12923
  ` : null}
12759
12924
  </div>
12760
12925
  <div
12761
- class=${z.voiceCardSubtitle}
12926
+ class=${H.voiceCardSubtitle}
12762
12927
  style=${`padding-top: 2px;font-size:10px;color:${e.theme.labelColor};white-space:nowrap;overflow:hidden;text-overflow:ellipsis;`}
12763
12928
  >
12764
12929
  ${t.lang} · ${t.emotion}
12765
12930
  </div>
12766
12931
  </div>
12767
- ${i ? K`
12932
+ ${r ? K`
12768
12933
  <div
12769
- class=${z.voiceCardCheck}
12934
+ class=${H.voiceCardCheck}
12770
12935
  style="position:absolute;top:50%;right:8px;transform:translateY(-42%);"
12771
12936
  >
12772
12937
  ${e.selectedIconSvg ? ei(this.resizeSvg(e.selectedIconSvg, 20)) : "✓"}
@@ -12779,11 +12944,11 @@ class jh extends Ea {
12779
12944
  const r = this.getTransform(e.clip), n = r.scale / 2, a = -n, o = 1 + n;
12780
12945
  return K`
12781
12946
  <div
12782
- class=${z.row}
12947
+ class=${H.row}
12783
12948
  style="display:flex;align-items:center;gap:8px;margin-bottom:8px;"
12784
12949
  >
12785
12950
  <label
12786
- class=${z.label}
12951
+ class=${H.label}
12787
12952
  style=${`width:16px;font-size:13px;color:${e.theme.labelColor};`}
12788
12953
  >
12789
12954
  ${t}
@@ -12819,12 +12984,12 @@ class jh extends Ea {
12819
12984
  ];
12820
12985
  return K`
12821
12986
  <div
12822
- class=${z.presetGrid}
12987
+ class=${H.presetGrid}
12823
12988
  style="display:grid;grid-template-columns:repeat(3, 1fr);gap:4px;"
12824
12989
  >
12825
12990
  ${t.map((i) => K`
12826
12991
  <button
12827
- class=${z.presetButton}
12992
+ class=${H.presetButton}
12828
12993
  style=${[
12829
12994
  "padding:6px",
12830
12995
  `border:1px solid ${e.theme.buttonBorder}`,
@@ -12848,7 +13013,7 @@ class jh extends Ea {
12848
13013
  renderSectionTitle(e, t) {
12849
13014
  return K`
12850
13015
  <div
12851
- class=${z.sectionTitle}
13016
+ class=${H.sectionTitle}
12852
13017
  style=${`font-size:12px;color:${t.labelColor};margin-bottom:8px;text-transform:uppercase;`}
12853
13018
  >
12854
13019
  ${e}
@@ -12859,7 +13024,7 @@ class jh extends Ea {
12859
13024
  return K`
12860
13025
  <input
12861
13026
  type="range"
12862
- class=${z.slider}
13027
+ class=${H.slider}
12863
13028
  min=${e.min}
12864
13029
  max=${e.max}
12865
13030
  step=${e.step}
@@ -12873,7 +13038,7 @@ class jh extends Ea {
12873
13038
  return K`
12874
13039
  <input
12875
13040
  type="number"
12876
- class=${z.input}
13041
+ class=${H.input}
12877
13042
  min=${t.min}
12878
13043
  max=${t.max}
12879
13044
  step=${t.step}
@@ -12916,10 +13081,10 @@ class jh extends Ea {
12916
13081
  "flex-direction:column",
12917
13082
  "overflow:hidden",
12918
13083
  "height:100%",
12919
- `--clip-slider-fill-start:${E.sliderFillStart}`,
12920
- `--clip-slider-fill-end:${E.sliderFillEnd}`,
12921
- `--clip-slider-road:${E.sliderRoad}`,
12922
- `--clip-slider-thumb-border:${E.sliderThumbBorder}`,
13084
+ `--clip-slider-fill-start:${A.sliderFillStart}`,
13085
+ `--clip-slider-fill-end:${A.sliderFillEnd}`,
13086
+ `--clip-slider-road:${A.sliderRoad}`,
13087
+ `--clip-slider-thumb-border:${A.sliderThumbBorder}`,
12923
13088
  `--clip-slider-thumb-shadow:${Ce.sliderThumbShadow}`
12924
13089
  ].join(";");
12925
13090
  }
@@ -13477,7 +13642,7 @@ class is {
13477
13642
  resolveTrackTargetByY(e, t, i, r) {
13478
13643
  let n = t, a = null, o = null;
13479
13644
  for (const l of i) {
13480
- const c = Ie(l.type), h = n + c;
13645
+ const c = _e(l.type), h = n + c;
13481
13646
  if (l.type === r && (a === null && (a = n), o = h), e >= n && e < h)
13482
13647
  return {
13483
13648
  status: "existing_track",
@@ -13501,7 +13666,7 @@ class is {
13501
13666
  resolvePreferredInsertionPlacement(e, t, i, r, n) {
13502
13667
  let a = r;
13503
13668
  const o = n.map((d) => {
13504
- const u = a, g = Ie(d.type), f = u + g;
13669
+ const u = a, g = _e(d.type), f = u + g;
13505
13670
  return a = f, {
13506
13671
  id: d.id,
13507
13672
  type: d.type,
@@ -14447,19 +14612,19 @@ function wd(s) {
14447
14612
  }
14448
14613
  function kd(s, e) {
14449
14614
  return !Ut(s.mode) || !e ? s : {
14450
- mode: Fe.mode,
14615
+ mode: Be.mode,
14451
14616
  width: e.width,
14452
14617
  height: e.height
14453
14618
  };
14454
14619
  }
14455
- function _e(s) {
14620
+ function Oe(s) {
14456
14621
  return s.getAttribute("src") || s.currentSrc || s.src || "";
14457
14622
  }
14458
14623
  function rn(s) {
14459
14624
  return s.getAttribute("src") || "";
14460
14625
  }
14461
- function Oe(s, e) {
14462
- const t = rn(s), i = s.currentSrc || "", r = s.src || "", n = _e(s);
14626
+ function nt(s, e) {
14627
+ const t = rn(s), i = s.currentSrc || "", r = s.src || "", n = Oe(s);
14463
14628
  return {
14464
14629
  desiredSource: e || null,
14465
14630
  srcAttribute: t || null,
@@ -14474,13 +14639,13 @@ function Oe(s, e) {
14474
14639
  function Xi(s) {
14475
14640
  return typeof HTMLVideoElement < "u" ? s instanceof HTMLVideoElement : s.tagName === "VIDEO";
14476
14641
  }
14477
- function ze(s) {
14642
+ function $e(s) {
14478
14643
  try {
14479
14644
  s.load();
14480
14645
  } catch {
14481
14646
  }
14482
14647
  }
14483
- function Ve(s) {
14648
+ function ze(s) {
14484
14649
  try {
14485
14650
  s.pause();
14486
14651
  } catch {
@@ -14525,12 +14690,12 @@ function _d(s) {
14525
14690
  return null;
14526
14691
  }
14527
14692
  }
14528
- function se(s) {
14693
+ function oe(s) {
14529
14694
  return {
14530
14695
  tsMs: Pd(),
14531
14696
  currentTime: Number.isFinite(s.currentTime) ? Number(s.currentTime.toFixed(3)) : null,
14532
14697
  duration: Number.isFinite(s.duration) ? Number(s.duration.toFixed(3)) : null,
14533
- currentSrc: _e(s) || null,
14698
+ currentSrc: Oe(s) || null,
14534
14699
  srcAttribute: rn(s) || null,
14535
14700
  elementSrc: s.src || null,
14536
14701
  rawCurrentSrc: s.currentSrc || null,
@@ -14562,7 +14727,7 @@ function Id(s, e, t) {
14562
14727
  return `${s.clip.id}:${i}`;
14563
14728
  }
14564
14729
  }
14565
- function Ue(s) {
14730
+ function Ve(s) {
14566
14731
  return typeof (s == null ? void 0 : s.then) == "function";
14567
14732
  }
14568
14733
  function Ad(s, e) {
@@ -14653,7 +14818,7 @@ class Rd {
14653
14818
  p(this, "boundTextPreviewWindowBlur", () => {
14654
14819
  this.finishTextPreviewDrag(!1);
14655
14820
  });
14656
- p(this, "requestedAspectRatio", { ...Fe });
14821
+ p(this, "requestedAspectRatio", { ...Be });
14657
14822
  p(this, "resolvedAutoAspectRatio", null);
14658
14823
  p(this, "aspectRatioProbe", null);
14659
14824
  p(this, "aspectRatioProbeSrc", null);
@@ -14701,13 +14866,13 @@ class Rd {
14701
14866
  clipId: ((i = e.entry) == null ? void 0 : i.clip.id) ?? null,
14702
14867
  slotKey: `${e.trackId}:${e.role}`,
14703
14868
  desiredSourceUrl: e.desiredSource,
14704
- actualSourceUrl: _e(e.element) || null,
14869
+ actualSourceUrl: Oe(e.element) || null,
14705
14870
  extra: {
14706
14871
  role: e.role,
14707
14872
  kind: e.kind,
14708
14873
  phase: e.phase,
14709
14874
  retryCount: e.retryCount,
14710
- sourceState: Oe(e.element, e.desiredSource),
14875
+ sourceState: nt(e.element, e.desiredSource),
14711
14876
  ...t.extra ?? {}
14712
14877
  }
14713
14878
  };
@@ -14724,7 +14889,7 @@ class Rd {
14724
14889
  const t = document.createElement("div");
14725
14890
  t.className = this.dependencies.rootClassName ?? "timeline-preview-root", t.style.position = "relative", t.style.width = "100%", t.style.height = "100%", t.style.overflow = "hidden";
14726
14891
  const i = document.createElement("div");
14727
- i.className = this.dependencies.frameClassName ?? "timeline-preview-frame", i.style.position = "absolute", i.style.left = "0", i.style.top = "0", i.style.overflow = "hidden", i.style.background = E.black, t.appendChild(i);
14892
+ i.className = this.dependencies.frameClassName ?? "timeline-preview-frame", i.style.position = "absolute", i.style.left = "0", i.style.top = "0", i.style.overflow = "hidden", i.style.background = A.black, t.appendChild(i);
14728
14893
  const r = document.createElement("div");
14729
14894
  r.className = "timeline-preview-text-layer", r.style.position = "absolute", r.style.inset = "0", r.style.pointerEvents = "none", r.style.zIndex = "2000", i.appendChild(r);
14730
14895
  const n = document.createElement("div");
@@ -14746,7 +14911,7 @@ class Rd {
14746
14911
  }), (e = this.resizeObserver) == null || e.disconnect(), this.resizeObserver = null, this.transformOverlay.detach(), this.finishTextPreviewDrag(!1), this.pendingOverlayRenderer.destroy();
14747
14912
  for (const o of this.trackSlots.values())
14748
14913
  this.destroySlot(o.current), this.destroySlot(o.preload);
14749
- this.trackSlots.clear(), this.clearTextPreviewEntries(), this.resetTextPreviewFontState(), this.aspectRatioProbe && (Ve(this.aspectRatioProbe), this.aspectRatioProbe.src = "", ze(this.aspectRatioProbe), this.aspectRatioProbe = null), this.aspectRatioProbeSrc = null, this.aspectRatioProbeResolveToken += 1, this.isAspectRatioProbeLoading = !1, this.audioContext && ((n = (i = (t = this.audioContext).close) == null ? void 0 : (r = i.call(t)).catch) == null || n.call(r, () => {
14914
+ this.trackSlots.clear(), this.clearTextPreviewEntries(), this.resetTextPreviewFontState(), this.aspectRatioProbe && (ze(this.aspectRatioProbe), this.aspectRatioProbe.src = "", $e(this.aspectRatioProbe), this.aspectRatioProbe = null), this.aspectRatioProbeSrc = null, this.aspectRatioProbeResolveToken += 1, this.isAspectRatioProbeLoading = !1, this.audioContext && ((n = (i = (t = this.audioContext).close) == null ? void 0 : (r = i.call(t)).catch) == null || n.call(r, () => {
14750
14915
  }), this.audioContext = null, this.masterGainNode = null), (a = this.rootElement) == null || a.remove(), this.rootElement = null, this.frameElement = null, this.textOverlayRoot = null, this.pendingOverlayElement = null, this.container = null, this.primarySelectedClipId = null, this.transientVisualTransform = null, this.pendingState = null, this.activeSyncRequestId = void 0, this.isSyncProjecting = !1, this.loadingCount = 0, this.isBuffering = !1, this.clearBufferingVisibleTimeout(), this.lastRuntimeSignature = null, this.lastSettledSyncRequestId = null, this.lastRuntimeState = {
14751
14916
  phase: "idle",
14752
14917
  loadingCount: 0,
@@ -14784,7 +14949,7 @@ class Rd {
14784
14949
  kind: l.current.kind,
14785
14950
  order: ((h = l.current.entry) == null ? void 0 : h.trackOrder) ?? ((d = l.preload.entry) == null ? void 0 : d.trackOrder) ?? 1e4 + c
14786
14951
  };
14787
- }), n = Ed(e, t).map((o) => this.applyTrackPlan(o)).filter((o) => Ue(o));
14952
+ }), n = Ed(e, t).map((o) => this.applyTrackPlan(o)).filter((o) => Ve(o));
14788
14953
  if (this.isSyncProjecting = n.length > 0, this.refreshVisualLayout(), this.refreshRuntimeState(), n.length === 0) {
14789
14954
  this.refreshVisualLayout(), this.refreshRuntimeState();
14790
14955
  return;
@@ -14810,14 +14975,14 @@ class Rd {
14810
14975
  }
14811
14976
  createMediaElement(e, t) {
14812
14977
  const i = this.dependencies.createMediaElement, r = i ? i(e, t) : document.createElement(e === "video" ? "video" : "audio");
14813
- return r.preload = t === "preload" ? "auto" : "metadata", r.crossOrigin = "anonymous", r.loop = !1, r.controls = !1, Xi(r) ? (wr(r), r.playsInline = !0, r.style.position = "absolute", r.style.inset = "0", r.style.width = "100%", r.style.height = "100%", r.style.objectFit = "fill", r.style.background = E.black, r.style.pointerEvents = "none") : r.style.display = "none", r;
14978
+ return r.preload = t === "preload" ? "auto" : "metadata", r.crossOrigin = "anonymous", r.loop = !1, r.controls = !1, Xi(r) ? (wr(r), r.playsInline = !0, r.style.position = "absolute", r.style.inset = "0", r.style.width = "100%", r.style.height = "100%", r.style.objectFit = "fill", r.style.background = A.black, r.style.pointerEvents = "none") : r.style.display = "none", r;
14814
14979
  }
14815
14980
  createSlot(e, t, i) {
14816
14981
  var b, C;
14817
14982
  const r = this.createMediaElement(t, i), n = t === "video" ? document.createElement("div") : null;
14818
14983
  if (n) {
14819
14984
  const w = this.dependencies.slotClassNamePrefix ?? "timeline-preview-slot";
14820
- n.className = `${w} timeline-preview-slot--${e} timeline-preview-slot--${i}`, n.style.position = "absolute", n.style.overflow = "hidden", n.style.background = E.black, n.style.pointerEvents = "none", n.style.display = "none", n.appendChild(r), (b = this.frameElement) == null || b.appendChild(n);
14985
+ n.className = `${w} timeline-preview-slot--${e} timeline-preview-slot--${i}`, n.style.position = "absolute", n.style.overflow = "hidden", n.style.background = A.black, n.style.pointerEvents = "none", n.style.display = "none", n.appendChild(r), (b = this.frameElement) == null || b.appendChild(n);
14821
14986
  }
14822
14987
  const a = {
14823
14988
  role: i,
@@ -14860,17 +15025,17 @@ class Rd {
14860
15025
  }
14861
15026
  this.emitDiagnostic("info", "playback", "media.loadstart", this.buildSlotTraceData(a, {
14862
15027
  message: "Media load started",
14863
- mediaState: se(a.element)
15028
+ mediaState: oe(a.element)
14864
15029
  })), a.isLoading = !0, a.loadStartedSinceRecover = !0, a.phase !== "recovering" && (a.phase = "binding"), this.refreshRuntimeState();
14865
15030
  }, c = (w) => {
14866
15031
  this.emitDiagnostic("info", "playback", `media.${w.type}`, this.buildSlotTraceData(a, {
14867
15032
  message: `Media event: ${w.type}`,
14868
- mediaState: se(a.element)
15033
+ mediaState: oe(a.element)
14869
15034
  })), o();
14870
15035
  }, h = () => {
14871
15036
  this.emitDiagnostic("warn", "playback", "media.waiting", this.buildSlotTraceData(a, {
14872
15037
  message: "Media waiting",
14873
- mediaState: se(a.element),
15038
+ mediaState: oe(a.element),
14874
15039
  extra: {
14875
15040
  active: a.isActive
14876
15041
  }
@@ -14878,7 +15043,7 @@ class Rd {
14878
15043
  }, d = () => {
14879
15044
  this.emitDiagnostic("warn", "playback", "media.stalled", this.buildSlotTraceData(a, {
14880
15045
  message: "Media stalled",
14881
- mediaState: se(a.element),
15046
+ mediaState: oe(a.element),
14882
15047
  extra: {
14883
15048
  active: a.isActive
14884
15049
  }
@@ -14890,7 +15055,7 @@ class Rd {
14890
15055
  }
14891
15056
  this.emitDiagnostic("debug", "playback", "media.seeking", this.buildSlotTraceData(a, {
14892
15057
  message: "Media seeking",
14893
- mediaState: se(a.element),
15058
+ mediaState: oe(a.element),
14894
15059
  extra: {
14895
15060
  active: a.isActive
14896
15061
  }
@@ -14898,7 +15063,7 @@ class Rd {
14898
15063
  }, g = () => {
14899
15064
  this.emitDiagnostic("debug", "playback", "media.seeked", this.buildSlotTraceData(a, {
14900
15065
  message: "Media seeked",
14901
- mediaState: se(a.element)
15066
+ mediaState: oe(a.element)
14902
15067
  })), a.isSeeking = !1, a.isBuffering = !1, a.entry && a.phase !== "failed" && (a.phase = a.isActive ? "active" : "primed"), this.refreshRuntimeState();
14903
15068
  }, f = (w) => {
14904
15069
  var x;
@@ -14906,31 +15071,31 @@ class Rd {
14906
15071
  if (w === "abort" && this.shouldIgnoreExpectedAbort(a)) {
14907
15072
  this.emitDiagnostic("debug", "playback", "media.abort.ignored", this.buildSlotTraceData(a, {
14908
15073
  message: "Ignored expected media abort during source reset",
14909
- mediaState: se(a.element)
15074
+ mediaState: oe(a.element)
14910
15075
  }));
14911
15076
  return;
14912
15077
  }
14913
15078
  if (w === "emptied" && this.shouldIgnoreExpectedEmptied(a)) {
14914
15079
  this.emitDiagnostic("debug", "playback", "media.emptied.ignored", this.buildSlotTraceData(a, {
14915
15080
  message: "Ignored expected media emptied during source reset",
14916
- mediaState: se(a.element)
15081
+ mediaState: oe(a.element)
14917
15082
  }));
14918
15083
  return;
14919
15084
  }
14920
15085
  if (this.emitDiagnostic(w === "error" ? "error" : "warn", "playback", `media.${w}`, this.buildSlotTraceData(a, {
14921
15086
  message: `Media event: ${w}`,
14922
- mediaState: se(a.element),
15087
+ mediaState: oe(a.element),
14923
15088
  error: a.element.error
14924
15089
  })), F.warn("TimelinePreviewSession", `media event: ${w}`, {
14925
15090
  trackId: a.trackId,
14926
15091
  role: a.role,
14927
15092
  clipId: ((x = a.entry) == null ? void 0 : x.clip.id) ?? null,
14928
15093
  phase: a.phase,
14929
- mediaState: se(a.element)
15094
+ mediaState: oe(a.element)
14930
15095
  }), a.forceRecover = !0, a.expectedEmptiedEvents = 0, a.isLoading = !1, a.isSeeking = !1, a.isBuffering = !1, a.recoverableEventCount += 1, this.shouldSkipImmediatePreloadRecovery(a)) {
14931
15096
  a.phase = "idle", this.emitDiagnostic("info", "recovery", "preload.recovery.skipped", this.buildSlotTraceData(a, {
14932
15097
  message: "Skipped immediate preload recovery after recoverable media event",
14933
- mediaState: se(a.element),
15098
+ mediaState: oe(a.element),
14934
15099
  extra: {
14935
15100
  reason: w,
14936
15101
  recoverableEventCount: a.recoverableEventCount,
@@ -14965,7 +15130,7 @@ class Rd {
14965
15130
  }
14966
15131
  destroySlot(e) {
14967
15132
  var t, i, r, n, a;
14968
- this.deferredPreloadSlotKeys.delete(this.getSlotKey(e)), e.resolveToken += 1, e.applyToken += 1, e.cleanup.forEach((o) => o()), Ve(e.element), this.releaseSlotObjectUrl(e), this.clearPendingRuntimeSource(e), e.stableSourceUrl = null, e.element.removeAttribute("src"), ze(e.element), (i = (t = e.gainNode) == null ? void 0 : t.disconnect) == null || i.call(t), (n = (r = e.sourceNode) == null ? void 0 : r.disconnect) == null || n.call(r), e.gainNode = null, e.sourceNode = null, (a = e.wrapper) == null || a.remove(), e.element.remove();
15133
+ this.deferredPreloadSlotKeys.delete(this.getSlotKey(e)), e.resolveToken += 1, e.applyToken += 1, e.cleanup.forEach((o) => o()), ze(e.element), this.releaseSlotObjectUrl(e), this.clearPendingRuntimeSource(e), e.stableSourceUrl = null, e.element.removeAttribute("src"), $e(e.element), (i = (t = e.gainNode) == null ? void 0 : t.disconnect) == null || i.call(t), (n = (r = e.sourceNode) == null ? void 0 : r.disconnect) == null || n.call(r), e.gainNode = null, e.sourceNode = null, (a = e.wrapper) == null || a.remove(), e.element.remove();
14969
15134
  }
14970
15135
  releaseSlotObjectUrl(e) {
14971
15136
  var t;
@@ -15003,7 +15168,7 @@ class Rd {
15003
15168
  let t = this.getTrackSlots(e.trackId, e.kind);
15004
15169
  e.current.entry && Ad(t.preload, e.current.entry.clip.id) && (this.swapTrackSlots(e.trackId), t = this.getTrackSlots(e.trackId, e.kind));
15005
15170
  const i = this.applySlotTarget(t.current, e.current), r = this.applySlotTarget(t.preload, e.preload);
15006
- if (Ue(i) || Ue(r))
15171
+ if (Ve(i) || Ve(r))
15007
15172
  return Promise.all([
15008
15173
  Promise.resolve(i),
15009
15174
  Promise.resolve(r)
@@ -15011,7 +15176,7 @@ class Rd {
15011
15176
  });
15012
15177
  }
15013
15178
  applySlotTarget(e, t) {
15014
- const i = ++e.applyToken, r = e.entry, n = _e(e.element) || null;
15179
+ const i = ++e.applyToken, r = e.entry, n = Oe(e.element) || null;
15015
15180
  if (e.entry = t.entry, e.requestedPlayState = t.playState, e.isActive = t.role === "current" && !!t.entry, e.errorMessage = t.entry ? e.errorMessage : null, e.isBuffering = t.entry ? e.isBuffering : !1, e.isSeeking = t.entry ? e.isSeeking : !1, e.consecutiveStalledCount = t.entry ? e.consecutiveStalledCount : 0, !t.entry) {
15016
15181
  this.deferredPreloadSlotKeys.delete(this.getSlotKey(e)), (r || n) && this.emitDiagnostic("info", "playback", "slot.cleared", this.buildSlotTraceData(e, {
15017
15182
  message: "Preview slot cleared",
@@ -15019,11 +15184,11 @@ class Rd {
15019
15184
  previousClipId: (r == null ? void 0 : r.clip.id) ?? null,
15020
15185
  previousSource: n
15021
15186
  }
15022
- })), Ve(e.element), e.stableSourceUrl = null, e.desiredSource = null, e.errorMessage = null, e.isLoading = !1, e.isSeeking = !1, e.isBuffering = !1, this.resetSlotRecoveryTracking(e), this.releaseSlotObjectUrl(e), this.clearPendingRuntimeSource(e), e.element.removeAttribute("src"), ze(e.element), e.phase = "idle", this.setSlotVisible(e, !1, 0), this.refreshVisualLayout(), this.refreshRuntimeState();
15187
+ })), ze(e.element), e.stableSourceUrl = null, e.desiredSource = null, e.errorMessage = null, e.isLoading = !1, e.isSeeking = !1, e.isBuffering = !1, this.resetSlotRecoveryTracking(e), this.releaseSlotObjectUrl(e), this.clearPendingRuntimeSource(e), e.element.removeAttribute("src"), $e(e.element), e.phase = "idle", this.setSlotVisible(e, !1, 0), this.refreshVisualLayout(), this.refreshRuntimeState();
15023
15188
  return;
15024
15189
  }
15025
15190
  const a = this.resolveDesiredSource(e, t.entry, i);
15026
- if (Ue(a))
15191
+ if (Ve(a))
15027
15192
  return a.then((o) => {
15028
15193
  if (!o || !this.isCurrentSourceTarget(e, t.entry, o.stableSourceUrl)) {
15029
15194
  this.revokeResolvedObjectUrl(o);
@@ -15072,42 +15237,37 @@ class Rd {
15072
15237
  }
15073
15238
  })), this.refreshRuntimeState()), a);
15074
15239
  if (!r) {
15075
- const l = { url: t.clip.src }, c = this.dependencies.resourceCacheManager ? o() : null;
15076
- return this.resolvePlayableSlotSource(e, t, l, i, c);
15240
+ const l = { url: t.clip.src };
15241
+ return this.dependencies.resourceCacheManager && o(), this.resolvePlayableSlotSource(e, t, l);
15077
15242
  }
15078
15243
  try {
15079
15244
  const l = n ? n.getPreviewSource(
15080
15245
  this.buildPreviewSourceCacheKey(t.clip),
15081
15246
  () => r(t.clip)
15082
15247
  ) : r(t.clip);
15083
- if (Ue(l)) {
15084
- const h = o();
15085
- return l.then((d) => h !== e.resolveToken || !this.isCurrentRequest(e, i, t) ? null : d ? (this.emitDiagnostic("info", "resource", "source.resolve.resolved", this.buildSlotTraceData(e, {
15248
+ if (Ve(l)) {
15249
+ const c = o();
15250
+ return l.then((h) => c !== e.resolveToken || !this.isCurrentRequest(e, i, t) ? null : h ? (this.emitDiagnostic("info", "resource", "source.resolve.resolved", this.buildSlotTraceData(e, {
15086
15251
  message: "Preview source resolved",
15087
15252
  sourceUrl: t.clip.src,
15088
- desiredSourceUrl: d.url,
15253
+ desiredSourceUrl: h.url,
15089
15254
  extra: {
15090
- mimeType: d.mimeType,
15091
- mediaKind: d.kind
15255
+ mimeType: h.mimeType,
15256
+ mediaKind: h.kind
15092
15257
  }
15093
- })), this.resolvePlayableSlotSource(e, t, d, i, h)) : (this.emitDiagnostic("warn", "resource", "source.resolve.missing", this.buildSlotTraceData(e, {
15258
+ })), this.resolvePlayableSlotSource(e, t, h)) : (this.emitDiagnostic("warn", "resource", "source.resolve.missing", this.buildSlotTraceData(e, {
15094
15259
  message: "Preview source missing",
15095
15260
  sourceUrl: t.clip.src
15096
- })), this.failSlot(e, t, "未找到可用预览源"), null)).catch((d) => (this.emitDiagnostic("error", "resource", "source.resolve.failed", this.buildSlotTraceData(e, {
15261
+ })), this.failSlot(e, t, "未找到可用预览源"), null)).catch((h) => (this.emitDiagnostic("error", "resource", "source.resolve.failed", this.buildSlotTraceData(e, {
15097
15262
  message: "Preview source resolve failed",
15098
15263
  sourceUrl: t.clip.src,
15099
- error: d
15264
+ error: h
15100
15265
  })), F.warn("TimelinePreviewSession", "preview source resolver failed", {
15101
15266
  clipId: t.clip.id,
15102
- error: d
15267
+ error: h
15103
15268
  }), this.failSlot(e, t, "预览源解析失败"), null));
15104
15269
  }
15105
- if (!l)
15106
- return this.emitDiagnostic("warn", "resource", "source.resolve.missing", this.buildSlotTraceData(e, {
15107
- message: "Preview source missing",
15108
- sourceUrl: t.clip.src
15109
- })), this.failSlot(e, t, "未找到可用预览源"), null;
15110
- this.emitDiagnostic("info", "resource", "source.resolve.resolved", this.buildSlotTraceData(e, {
15270
+ return l ? (this.emitDiagnostic("info", "resource", "source.resolve.resolved", this.buildSlotTraceData(e, {
15111
15271
  message: "Preview source resolved",
15112
15272
  sourceUrl: t.clip.src,
15113
15273
  desiredSourceUrl: l.url,
@@ -15115,9 +15275,10 @@ class Rd {
15115
15275
  mimeType: l.mimeType,
15116
15276
  mediaKind: l.kind
15117
15277
  }
15118
- }));
15119
- const c = this.dependencies.resourceCacheManager ? o() : null;
15120
- return this.resolvePlayableSlotSource(e, t, l, i, c);
15278
+ })), this.dependencies.resourceCacheManager && o(), this.resolvePlayableSlotSource(e, t, l)) : (this.emitDiagnostic("warn", "resource", "source.resolve.missing", this.buildSlotTraceData(e, {
15279
+ message: "Preview source missing",
15280
+ sourceUrl: t.clip.src
15281
+ })), this.failSlot(e, t, "未找到可用预览源"), null);
15121
15282
  } catch (l) {
15122
15283
  return this.emitDiagnostic("error", "resource", "source.resolve.failed", this.buildSlotTraceData(e, {
15123
15284
  message: "Preview source resolve failed",
@@ -15132,83 +15293,69 @@ class Rd {
15132
15293
  decorateSlotSourceUrl(e, t) {
15133
15294
  return t;
15134
15295
  }
15135
- resolvePlayableSlotSource(e, t, i, r, n) {
15136
- const a = this.dependencies.resourceCacheManager, o = this.getReusableResolvedSlotSource(e, i);
15137
- if (o)
15138
- return this.emitDiagnostic("debug", "resource", "source.runtime.reused", this.buildSlotTraceData(e, {
15139
- message: "Reused existing runtime preview source",
15140
- desiredSourceUrl: o.url,
15141
- actualSourceUrl: _e(e.element) || null,
15142
- mediaState: se(e.element),
15143
- extra: {
15144
- stableSourceUrl: i.url,
15145
- runtimeSourceUrl: o.url,
15146
- objectUrl: o.objectUrl,
15147
- sourceState: Oe(e.element, o.url)
15148
- }
15149
- })), o;
15296
+ resolvePlayableSlotSource(e, t, i) {
15297
+ const r = this.dependencies.resourceCacheManager, n = this.getReusableResolvedSlotSource(e, i);
15298
+ if (n)
15299
+ return this.emitRuntimeSourceDiagnostic(e, i.url, n, "source.runtime.reused", "Reused existing runtime preview source"), n;
15150
15300
  if (e.pendingRuntimeSourceUrl === i.url && e.pendingRuntimeSourcePromise)
15151
- return this.emitDiagnostic("debug", "resource", "source.runtime.pending-reused", this.buildSlotTraceData(e, {
15152
- message: "Reused pending runtime preview source resolution",
15153
- desiredSourceUrl: i.url,
15154
- actualSourceUrl: _e(e.element) || null,
15155
- mediaState: se(e.element),
15156
- extra: {
15157
- stableSourceUrl: i.url,
15158
- sourceState: Oe(e.element, i.url)
15159
- }
15160
- })), e.pendingRuntimeSourcePromise;
15161
- if (!a)
15301
+ return this.emitRuntimeSourceDiagnostic(e, i.url, null, "source.runtime.pending-reused", "Reused pending runtime preview source resolution"), e.pendingRuntimeSourcePromise;
15302
+ if (!r)
15162
15303
  return {
15163
15304
  stableSourceUrl: i.url,
15164
15305
  url: this.decorateSlotSourceUrl(e, i.url),
15165
15306
  objectUrl: null
15166
15307
  };
15167
- const l = () => !this.isCurrentSourceTarget(e, t, i.url), c = {
15308
+ const a = () => !this.isCurrentSourceTarget(e, t, i.url), o = {
15168
15309
  url: i.url,
15169
15310
  mimeType: i.mimeType,
15170
15311
  kind: i.kind,
15171
15312
  sourceKey: this.buildPreviewSourceCacheKey(t.clip)
15172
- }, h = () => ({
15313
+ }, l = () => ({
15173
15314
  stableSourceUrl: i.url,
15174
15315
  url: this.decorateSlotSourceUrl(e, i.url),
15175
15316
  objectUrl: null
15176
15317
  });
15177
15318
  try {
15178
- const d = a.resolvePlayableUrl(c), u = (g) => {
15179
- if (!(g != null && g.url))
15180
- return l() ? null : h();
15181
- const f = {
15319
+ const c = r.resolvePlayableUrl(o), h = (d) => {
15320
+ if (!(d != null && d.url))
15321
+ return a() ? null : l();
15322
+ const u = {
15182
15323
  stableSourceUrl: i.url,
15183
- url: this.decorateSlotSourceUrl(e, g.url),
15184
- objectUrl: g.objectUrl ?? null
15324
+ url: this.decorateSlotSourceUrl(e, d.url),
15325
+ objectUrl: d.objectUrl ?? null
15185
15326
  };
15186
- return l() ? (this.revokeResolvedObjectUrl(f), null) : (this.emitDiagnostic("debug", "resource", "source.runtime.resolved", this.buildSlotTraceData(e, {
15187
- message: "Resolved runtime playable source",
15188
- desiredSourceUrl: f.url,
15189
- actualSourceUrl: _e(e.element) || null,
15190
- mediaState: se(e.element),
15191
- extra: {
15192
- stableSourceUrl: i.url,
15193
- runtimeSourceUrl: f.url,
15194
- cacheStatus: g.cacheStatus,
15195
- objectUrl: f.objectUrl,
15196
- sourceState: Oe(e.element, f.url)
15197
- }
15198
- })), f);
15327
+ return a() ? (this.revokeResolvedObjectUrl(u), null) : (this.emitRuntimeSourceDiagnostic(e, i.url, u, "source.runtime.resolved", "Resolved runtime playable source", {
15328
+ cacheStatus: d.cacheStatus
15329
+ }), u);
15199
15330
  };
15200
- if (Ue(d)) {
15201
- const g = d.then(u).catch(() => l() ? null : h());
15202
- return g.finally(() => {
15203
- e.pendingRuntimeSourcePromise === g && this.clearPendingRuntimeSource(e);
15331
+ if (Ve(c)) {
15332
+ const d = c.then(h).catch(() => a() ? null : l());
15333
+ return d.finally(() => {
15334
+ e.pendingRuntimeSourcePromise === d && this.clearPendingRuntimeSource(e);
15204
15335
  }).catch(() => {
15205
- }), e.pendingRuntimeSourceUrl = i.url, e.pendingRuntimeSourcePromise = g, g;
15336
+ }), e.pendingRuntimeSourceUrl = i.url, e.pendingRuntimeSourcePromise = d, d;
15206
15337
  }
15207
- return u(d);
15338
+ return h(c);
15208
15339
  } catch {
15209
- return l() ? null : h();
15340
+ return a() ? null : l();
15210
15341
  }
15211
15342
  }
15343
+ emitRuntimeSourceDiagnostic(e, t, i, r, n, a = {}) {
15344
+ const o = (i == null ? void 0 : i.url) ?? t;
15345
+ this.emitDiagnostic("debug", "resource", r, this.buildSlotTraceData(e, {
15346
+ message: n,
15347
+ desiredSourceUrl: o,
15348
+ actualSourceUrl: Oe(e.element) || null,
15349
+ mediaState: oe(e.element),
15350
+ extra: {
15351
+ stableSourceUrl: t,
15352
+ runtimeSourceUrl: (i == null ? void 0 : i.url) ?? null,
15353
+ objectUrl: (i == null ? void 0 : i.objectUrl) ?? null,
15354
+ sourceState: nt(e.element, o),
15355
+ ...a
15356
+ }
15357
+ }));
15358
+ }
15212
15359
  getReusableResolvedSlotSource(e, t) {
15213
15360
  if (!e.desiredSource || e.stableSourceUrl !== t.url)
15214
15361
  return null;
@@ -15220,7 +15367,7 @@ class Rd {
15220
15367
  };
15221
15368
  }
15222
15369
  slotNeedsRecovery(e, t) {
15223
- const i = rn(e.element), r = i || _e(e.element);
15370
+ const i = rn(e.element), r = i || Oe(e.element);
15224
15371
  let n = !1, a = null;
15225
15372
  e.forceRecover ? (n = !0, a = "force-recover") : i ? r !== t ? (n = !0, a = "source-mismatch") : (typeof e.element.networkState == "number" ? e.element.networkState : null) === yd && (n = !(e.isLoading || e.phase === "binding" || e.phase === "recovering"), a = n ? "network-empty" : "network-empty-binding-in-flight") : (n = !0, a = "missing-src-attribute");
15226
15373
  const o = n && (a === "source-mismatch" || e.isActive && e.phase !== "idle" && e.phase !== "binding");
@@ -15228,7 +15375,7 @@ class Rd {
15228
15375
  message: n ? "Preview slot needs recovery" : "Preview slot source is reusable",
15229
15376
  desiredSourceUrl: t,
15230
15377
  actualSourceUrl: r || null,
15231
- mediaState: se(e.element),
15378
+ mediaState: oe(e.element),
15232
15379
  extra: {
15233
15380
  needsRecovery: n,
15234
15381
  recoveryReason: a,
@@ -15241,7 +15388,7 @@ class Rd {
15241
15388
  isBuffering: e.isBuffering,
15242
15389
  networkState: typeof e.element.networkState == "number" ? e.element.networkState : null,
15243
15390
  readyState: typeof e.element.readyState == "number" ? e.element.readyState : null,
15244
- sourceState: Oe(e.element, t)
15391
+ sourceState: nt(e.element, t)
15245
15392
  }
15246
15393
  })), n;
15247
15394
  }
@@ -15262,7 +15409,7 @@ class Rd {
15262
15409
  url: e.desiredSource,
15263
15410
  objectUrl: e.objectUrl
15264
15411
  } : this.resolveDesiredSource(e, e.entry, e.applyToken));
15265
- if (Ue(o))
15412
+ if (Ve(o))
15266
15413
  return o.then((l) => {
15267
15414
  l && this.finishSlotRecovery(e, t, a, l, r);
15268
15415
  });
@@ -15287,7 +15434,7 @@ class Rd {
15287
15434
  e.phase = "recovering", e.errorMessage = null, e.forceRecover = !1, e.isLoading = !0, e.isBuffering = e.isActive && i.playState === "playing", e.isSeeking = !1, e.consecutiveStalledCount = 0, e.recoverableEventCount = 0, e.loadStartedSinceRecover = !1, this.refreshRuntimeState(), this.emitDiagnostic(t === "reconcile" ? "info" : "warn", "recovery", "slot.recover", this.buildSlotTraceData(e, {
15288
15435
  message: "Recovering preview slot",
15289
15436
  desiredSourceUrl: o,
15290
- mediaState: se(e.element),
15437
+ mediaState: oe(e.element),
15291
15438
  extra: {
15292
15439
  reason: t,
15293
15440
  mediaTime: e.entry.mediaTime,
@@ -15300,10 +15447,10 @@ class Rd {
15300
15447
  reason: t,
15301
15448
  retryCount: e.retryCount,
15302
15449
  desiredSource: o,
15303
- mediaState: se(e.element)
15450
+ mediaState: oe(e.element)
15304
15451
  });
15305
- const c = _e(e.element), h = Oe(e.element, o), d = !!c || t !== "reconcile" || e.retryCount > 1;
15306
- Ve(e.element), e.expectedEmptiedEvents = d ? 2 : 1, e.stableSourceUrl = a.stableSourceUrl, this.rememberSlotObjectUrl(e, a.objectUrl), d && (e.element.removeAttribute("src"), ze(e.element)), e.element.setAttribute("src", o), ze(e.element), this.emitDiagnostic("info", "resource", "source.assigned", this.buildSlotTraceData(e, {
15452
+ const c = Oe(e.element), h = nt(e.element, o), d = !!c || t !== "reconcile" || e.retryCount > 1;
15453
+ ze(e.element), e.expectedEmptiedEvents = d ? 2 : 1, e.stableSourceUrl = a.stableSourceUrl, this.rememberSlotObjectUrl(e, a.objectUrl), d && (e.element.removeAttribute("src"), $e(e.element)), e.element.setAttribute("src", o), $e(e.element), this.emitDiagnostic("info", "resource", "source.assigned", this.buildSlotTraceData(e, {
15307
15454
  message: "Preview source assigned",
15308
15455
  desiredSourceUrl: o,
15309
15456
  actualSourceUrl: o,
@@ -15311,7 +15458,7 @@ class Rd {
15311
15458
  reason: t,
15312
15459
  hardReset: d,
15313
15460
  previousSourceState: h,
15314
- nextSourceState: Oe(e.element, o),
15461
+ nextSourceState: nt(e.element, o),
15315
15462
  objectUrl: a.objectUrl,
15316
15463
  stableSourceUrl: a.stableSourceUrl
15317
15464
  }
@@ -15348,7 +15495,7 @@ class Rd {
15348
15495
  }
15349
15496
  deferPreloadTarget(e, t, i, r) {
15350
15497
  const n = i.url;
15351
- e.desiredSource = n, this.rememberSlotObjectUrl(e, i.objectUrl), e.forceRecover = !0, e.isLoading = !1, e.isSeeking = !1, e.isBuffering = !1, e.errorMessage = null, e.element.getAttribute("src") && e.element.getAttribute("src") !== n && (Ve(e.element), e.element.removeAttribute("src"), ze(e.element)), _e(e.element) || (e.phase = "idle"), this.deferredPreloadSlotKeys.add(this.getSlotKey(e)), this.emitDiagnostic("info", "recovery", "preload.recovery.deferred", this.buildSlotTraceData(e, {
15498
+ e.desiredSource = n, this.rememberSlotObjectUrl(e, i.objectUrl), e.forceRecover = !0, e.isLoading = !1, e.isSeeking = !1, e.isBuffering = !1, e.errorMessage = null, e.element.getAttribute("src") && e.element.getAttribute("src") !== n && (ze(e.element), e.element.removeAttribute("src"), $e(e.element)), Oe(e.element) || (e.phase = "idle"), this.deferredPreloadSlotKeys.add(this.getSlotKey(e)), this.emitDiagnostic("info", "recovery", "preload.recovery.deferred", this.buildSlotTraceData(e, {
15352
15499
  message: "Deferred preload recovery until active current media settles",
15353
15500
  desiredSourceUrl: n,
15354
15501
  extra: {
@@ -15435,9 +15582,9 @@ class Rd {
15435
15582
  return e.role === "preload" && !e.isActive && !!e.entry;
15436
15583
  }
15437
15584
  parkPreloadSlot(e, t, i) {
15438
- Ve(e.element), this.releaseSlotObjectUrl(e), e.element.removeAttribute("src"), ze(e.element), e.phase = "idle", e.isLoading = !1, e.isSeeking = !1, e.isBuffering = !1, e.errorMessage = null, this.resetSlotRecoveryTracking(e, !0), this.emitDiagnostic("warn", "recovery", "preload.recovery.parked", this.buildSlotTraceData(e, {
15585
+ ze(e.element), this.releaseSlotObjectUrl(e), e.element.removeAttribute("src"), $e(e.element), e.phase = "idle", e.isLoading = !1, e.isSeeking = !1, e.isBuffering = !1, e.errorMessage = null, this.resetSlotRecoveryTracking(e, !0), this.emitDiagnostic("warn", "recovery", "preload.recovery.parked", this.buildSlotTraceData(e, {
15439
15586
  message: "Background preload parked until next steady sync",
15440
- mediaState: se(e.element),
15587
+ mediaState: oe(e.element),
15441
15588
  extra: {
15442
15589
  reason: i,
15443
15590
  errorMessage: t
@@ -15451,7 +15598,7 @@ class Rd {
15451
15598
  }
15452
15599
  e.phase = "failed", e.isLoading = !1, e.isSeeking = !1, e.isBuffering = !1, e.errorMessage = i, e.forceRecover = !1, e.expectedEmptiedEvents = 0, this.emitDiagnostic("error", "recovery", "slot.failed", this.buildSlotTraceData(e, {
15453
15600
  message: "Preview slot failed",
15454
- mediaState: se(e.element),
15601
+ mediaState: oe(e.element),
15455
15602
  extra: {
15456
15603
  errorMessage: i
15457
15604
  }
@@ -15460,7 +15607,7 @@ class Rd {
15460
15607
  role: e.role,
15461
15608
  clipId: t.clip.id,
15462
15609
  errorMessage: i,
15463
- mediaState: se(e.element)
15610
+ mediaState: oe(e.element)
15464
15611
  }), this.refreshRuntimeState();
15465
15612
  }
15466
15613
  configureAudioRouting(e, t) {
@@ -15488,7 +15635,7 @@ class Rd {
15488
15635
  const n = t.mediaTime / 1e3, a = Math.max(0.1, i * 0.15);
15489
15636
  if (Math.abs(e.element.currentTime - n) > a && (this.emitDiagnostic("debug", "playback", "media.current-slot.seek", this.buildSlotTraceData(e, {
15490
15637
  message: "Current slot seek applied",
15491
- mediaState: se(e.element),
15638
+ mediaState: oe(e.element),
15492
15639
  extra: {
15493
15640
  playState: r,
15494
15641
  speed: i,
@@ -15499,10 +15646,10 @@ class Rd {
15499
15646
  }
15500
15647
  })), e.isSeeking = !0, cs(e.element, n)), r === "playing") {
15501
15648
  this.resumeAudioContext();
15502
- const l = Oe(e.element, e.desiredSource);
15649
+ const l = nt(e.element, e.desiredSource);
15503
15650
  this.emitDiagnostic(l.hasSrcAttribute ? "debug" : "warn", "playback", "media.play.requested", this.buildSlotTraceData(e, {
15504
15651
  message: l.hasSrcAttribute ? "Media play requested" : "Media play requested without configured src attribute",
15505
- mediaState: se(e.element),
15652
+ mediaState: oe(e.element),
15506
15653
  extra: {
15507
15654
  playState: r,
15508
15655
  speed: i,
@@ -15512,23 +15659,23 @@ class Rd {
15512
15659
  } else
15513
15660
  this.emitDiagnostic("debug", "playback", "media.pause.requested", this.buildSlotTraceData(e, {
15514
15661
  message: "Media pause requested",
15515
- mediaState: se(e.element),
15662
+ mediaState: oe(e.element),
15516
15663
  extra: {
15517
15664
  playState: r,
15518
15665
  speed: i,
15519
- sourceState: Oe(e.element, e.desiredSource)
15666
+ sourceState: nt(e.element, e.desiredSource)
15520
15667
  }
15521
- })), Ve(e.element);
15668
+ })), ze(e.element);
15522
15669
  this.setSlotVisible(e, t.hasVisual, 1e3 - t.trackOrder);
15523
15670
  }
15524
15671
  preparePreloadSlot(e, t) {
15525
15672
  e.isActive = !1, e.isBuffering = !1, e.isSeeking = !1, e.entry = t, e.element.playbackRate = 1, this.emitDiagnostic("debug", "playback", "media.preload-slot.seek", this.buildSlotTraceData(e, {
15526
15673
  message: "Preload slot primed",
15527
- mediaState: se(e.element),
15674
+ mediaState: oe(e.element),
15528
15675
  extra: {
15529
15676
  toSeconds: Number((t.clip.startTimeAtSource / 1e3).toFixed(3))
15530
15677
  }
15531
- })), cs(e.element, t.clip.startTimeAtSource / 1e3), Ve(e.element), this.setSlotVisible(e, !1, 0);
15678
+ })), cs(e.element, t.clip.startTimeAtSource / 1e3), ze(e.element), this.setSlotVisible(e, !1, 0);
15532
15679
  }
15533
15680
  setSlotVisible(e, t, i) {
15534
15681
  if (e.kind !== "video" || !e.wrapper) {
@@ -15589,7 +15736,7 @@ class Rd {
15589
15736
  message: "Aspect ratio probe started",
15590
15737
  clipId: e.clip.id,
15591
15738
  sourceUrl: a
15592
- }), this.refreshRuntimeState(), o.crossOrigin = "anonymous", o.preload = "metadata", o.muted = !0, o.src = a, ze(o);
15739
+ }), this.refreshRuntimeState(), o.crossOrigin = "anonymous", o.preload = "metadata", o.muted = !0, o.src = a, $e(o);
15593
15740
  })().catch(() => {
15594
15741
  });
15595
15742
  }
@@ -15601,7 +15748,7 @@ class Rd {
15601
15748
  this.buildPreviewSourceCacheKey(e.clip),
15602
15749
  () => i(e.clip)
15603
15750
  ) : i(e.clip);
15604
- if (!Ue(n))
15751
+ if (!Ve(n))
15605
15752
  return (n == null ? void 0 : n.url) ?? null;
15606
15753
  this.isAspectRatioProbeLoading = !0, this.refreshRuntimeState();
15607
15754
  const a = await n;
@@ -15649,16 +15796,16 @@ class Rd {
15649
15796
  var v, b, C, w, x, P, M;
15650
15797
  const e = [];
15651
15798
  let t = this.isAspectRatioProbeLoading ? 1 : 0, i = 0, r = !1, n = null, a = !1, o = !1, l = !1, c = !1, h = !1, d = !1;
15652
- for (const { current: I, preload: A } of this.trackSlots.values())
15653
- for (const k of [I, A]) {
15654
- const $ = _e(k.element) || null;
15799
+ for (const { current: I, preload: E } of this.trackSlots.values())
15800
+ for (const k of [I, E]) {
15801
+ const z = Oe(k.element) || null;
15655
15802
  e.push({
15656
15803
  trackId: k.trackId,
15657
15804
  role: k.role,
15658
15805
  kind: k.kind,
15659
15806
  clipId: ((v = k.entry) == null ? void 0 : v.clip.id) ?? null,
15660
15807
  desiredSource: k.desiredSource,
15661
- actualSource: $,
15808
+ actualSource: z,
15662
15809
  phase: k.phase,
15663
15810
  retryCount: k.retryCount,
15664
15811
  errorMessage: k.errorMessage
@@ -16507,7 +16654,7 @@ function iu(s) {
16507
16654
  const e = s.createTrack(s.trackType, s.trackName), t = Ba(s.trackCollection, e);
16508
16655
  return t ? s.trackCollection.moveClipToTrack(s.clip, s.currentTrackId, t) : !1;
16509
16656
  }
16510
- function We(s) {
16657
+ function Ue(s) {
16511
16658
  var e, t, i, r, n;
16512
16659
  (e = s.checkTrackDurationChange) == null || e.call(s), (t = s.updateCanPlayState) == null || t.call(s), (i = s.updateTrackInfoPanel) == null || i.call(s), (r = s.handleClipChange) == null || r.call(s), (n = s.cleanupEmptyTracks) == null || n.call(s);
16513
16660
  }
@@ -16646,13 +16793,13 @@ class uu {
16646
16793
  });
16647
16794
  }
16648
16795
  }
16649
- const pu = "timeline-preview-resource-cache", gu = "timeline-preview-resource-cache-blobs", fu = 1, Re = "blobs";
16796
+ const pu = "timeline-preview-resource-cache", gu = "timeline-preview-resource-cache-blobs", fu = 1, Ee = "blobs";
16650
16797
  function mu() {
16651
16798
  return new Promise((s, e) => {
16652
16799
  const t = indexedDB.open(gu, fu);
16653
16800
  t.onupgradeneeded = () => {
16654
16801
  const i = t.result;
16655
- i.objectStoreNames.contains(Re) || i.createObjectStore(Re);
16802
+ i.objectStoreNames.contains(Ee) || i.createObjectStore(Ee);
16656
16803
  }, t.onerror = () => e(t.error), t.onsuccess = () => s(t.result);
16657
16804
  });
16658
16805
  }
@@ -16674,21 +16821,21 @@ class yu {
16674
16821
  async read(e) {
16675
16822
  const t = await this.getDb();
16676
16823
  return new Promise((i, r) => {
16677
- const n = t.transaction(Re, "readonly").objectStore(Re).get(e);
16824
+ const n = t.transaction(Ee, "readonly").objectStore(Ee).get(e);
16678
16825
  n.onerror = () => r(n.error), n.onsuccess = () => i(n.result ?? null);
16679
16826
  });
16680
16827
  }
16681
16828
  async write(e, t) {
16682
- const r = (await this.getDb()).transaction(Re, "readwrite");
16683
- r.objectStore(Re).put(t, e), await vr(r);
16829
+ const r = (await this.getDb()).transaction(Ee, "readwrite");
16830
+ r.objectStore(Ee).put(t, e), await vr(r);
16684
16831
  }
16685
16832
  async delete(e) {
16686
- const i = (await this.getDb()).transaction(Re, "readwrite");
16687
- i.objectStore(Re).delete(e), await vr(i);
16833
+ const i = (await this.getDb()).transaction(Ee, "readwrite");
16834
+ i.objectStore(Ee).delete(e), await vr(i);
16688
16835
  }
16689
16836
  async clear() {
16690
- const t = (await this.getDb()).transaction(Re, "readwrite");
16691
- t.objectStore(Re).clear(), await vr(t);
16837
+ const t = (await this.getDb()).transaction(Ee, "readwrite");
16838
+ t.objectStore(Ee).clear(), await vr(t);
16692
16839
  }
16693
16840
  }
16694
16841
  class Su {
@@ -17871,11 +18018,11 @@ class Nu {
17871
18018
  return this.scrollLeft;
17872
18019
  }
17873
18020
  scrollToTime(e) {
17874
- const t = N.timeToPixels(e, this.config.zoom), i = this.stage.width();
18021
+ const t = $.timeToPixels(e, this.config.zoom), i = this.stage.width();
17875
18022
  this.setScrollLeft(Math.max(0, t - i / 2));
17876
18023
  }
17877
18024
  scrollToClip(e) {
17878
- const t = N.timeToPixels(e.startTime, this.config.zoom), r = N.timeToPixels(e.startTime + e.duration, this.config.zoom) - t, n = this.stage.width(), a = r <= n ? Math.max(0, t - (n - r) / 2) : Math.max(0, t);
18025
+ const t = $.timeToPixels(e.startTime, this.config.zoom), r = $.timeToPixels(e.startTime + e.duration, this.config.zoom) - t, n = this.stage.width(), a = r <= n ? Math.max(0, t - (n - r) / 2) : Math.max(0, t);
17879
18026
  this.setScrollLeft(a);
17880
18027
  }
17881
18028
  resize(e) {
@@ -17927,26 +18074,26 @@ class Nu {
17927
18074
  this.dragStartX = e.clientX, this.scrollLeft = i, this.render(), r !== this.scrollLeft && this.onScrollChange(this.scrollLeft);
17928
18075
  }
17929
18076
  pixelToTime(e) {
17930
- return N.pixelsToTime(e - ue + this.scrollLeft, this.config.zoom);
18077
+ return $.pixelsToTime(e - ue + this.scrollLeft, this.config.zoom);
17931
18078
  }
17932
18079
  timeToPixel(e) {
17933
- return N.timeToPixels(e, this.config.zoom) - this.scrollLeft + ue;
18080
+ return $.timeToPixels(e, this.config.zoom) - this.scrollLeft + ue;
17934
18081
  }
17935
18082
  render() {
17936
18083
  const e = this.stage.width(), t = this.stage.height(), i = this.layer.findOne(".timeline-header-background");
17937
18084
  if (i)
17938
18085
  i.width(e), i.height(t), i.fill(this.theme.background), i.stroke(this.theme.border);
17939
18086
  else {
17940
- const r = ae.createRect(0, 0, e, t, this.theme.background, this.theme.border, 1);
18087
+ const r = se.createRect(0, 0, e, t, this.theme.background, this.theme.border, 1);
17941
18088
  r.name("timeline-header-background"), this.layer.add(r);
17942
18089
  }
17943
18090
  this.layer.find(".time-tick-line").forEach((r) => r.remove()), this.layer.find(".time-tick-text").forEach((r) => r.remove()), this.renderTimeTicks(), this.layer.batchDraw();
17944
18091
  }
17945
18092
  renderTimeTicks() {
17946
- const e = this.stage.width(), t = this.scrollLeft, i = this.scrollLeft + e, r = N.pixelsToTime(t, this.config.zoom), n = N.pixelsToTime(i, this.config.zoom), a = N.msToSeconds(r), o = N.msToSeconds(n), { majorStep: l, minorStep: c } = N.getTickConfig(this.config.zoom), h = N.generateVisibleTicks(a - 10, o + 10, l, c);
18093
+ const e = this.stage.width(), t = this.scrollLeft, i = this.scrollLeft + e, r = $.pixelsToTime(t, this.config.zoom), n = $.pixelsToTime(i, this.config.zoom), a = $.msToSeconds(r), o = $.msToSeconds(n), { majorStep: l, minorStep: c } = $.getTickConfig(this.config.zoom), h = $.generateVisibleTicks(a - 10, o + 10, l, c);
17947
18094
  for (const d of h) {
17948
18095
  const u = this.timeToPixel(d.time);
17949
- u >= -20 && u <= e + 20 && ae.drawTimeTick(
18096
+ u >= -20 && u <= e + 20 && se.drawTimeTick(
17950
18097
  this.layer,
17951
18098
  u,
17952
18099
  0,
@@ -17962,7 +18109,7 @@ class Nu {
17962
18109
  }
17963
18110
  }
17964
18111
  clampScrollLeft(e) {
17965
- const t = Math.max(0, N.timeToPixels(this.config.duration, this.config.zoom) - this.stage.width());
18112
+ const t = Math.max(0, $.timeToPixels(this.config.duration, this.config.zoom) - this.stage.width());
17966
18113
  return Math.max(0, Math.min(t, e));
17967
18114
  }
17968
18115
  }
@@ -18047,7 +18194,7 @@ const U = class U {
18047
18194
  }), this.hasBoundGlobalPointerListeners = !1);
18048
18195
  }
18049
18196
  updateTimeFromClientX(e) {
18050
- const t = this.container.getBoundingClientRect(), i = e - t.left, r = N.pixelsToTime(i - ue + this.scrollLeft, this.zoom);
18197
+ const t = this.container.getBoundingClientRect(), i = e - t.left, r = $.pixelsToTime(i - ue + this.scrollLeft, this.zoom);
18051
18198
  this.onTimeChange(Math.max(0, r), "scrub");
18052
18199
  }
18053
18200
  updateEdgeAutoScrollState(e) {
@@ -18085,7 +18232,7 @@ const U = class U {
18085
18232
  this.edgeAutoScrollAnimationFrameId !== null && (typeof cancelAnimationFrame == "function" && cancelAnimationFrame(this.edgeAutoScrollAnimationFrameId), this.edgeAutoScrollAnimationFrameId = null);
18086
18233
  }
18087
18234
  render() {
18088
- const e = N.timeToPixels(this.currentTime, this.zoom) - this.scrollLeft + ue, t = e >= 0 && e <= this.container.clientWidth, i = Math.max(U.HANDLE_HEIGHT + U.END_CAP_HEIGHT, this.height);
18235
+ const e = $.timeToPixels(this.currentTime, this.zoom) - this.scrollLeft + ue, t = e >= 0 && e <= this.container.clientWidth, i = Math.max(U.HANDLE_HEIGHT + U.END_CAP_HEIGHT, this.height);
18089
18236
  this.visualElement.style.display = t ? "block" : "none", this.lineHitAreaElement.style.display = t ? "block" : "none", this.visualElement.style.left = `${e}px`, this.visualElement.style.height = `${i}px`, this.visualElement.setAttribute("height", `${i}`), this.visualElement.setAttribute("viewBox", `0 0 ${U.VISUAL_WIDTH} ${i}`), this.lineHitAreaElement.style.left = `${e}px`, this.lineHitAreaElement.style.height = `${i}px`, this.renderVisual(i);
18090
18237
  }
18091
18238
  renderVisual(e) {
@@ -18177,7 +18324,7 @@ class ws {
18177
18324
  container: this.container,
18178
18325
  width: this.container.clientWidth,
18179
18326
  height: this.container.clientHeight
18180
- }), this.layer = new j.Layer(), this.layer.name("scrollbar-layer"), this.stage.add(this.layer), this.hitAreaRect = ae.createRect(0, 0, 0, 0, me.hitArea, "transparent", 0), this.hitAreaRect.name("scrollbar-hit-area"), this.thumbRect = ae.createRect(
18327
+ }), this.layer = new j.Layer(), this.layer.name("scrollbar-layer"), this.stage.add(this.layer), this.hitAreaRect = se.createRect(0, 0, 0, 0, me.hitArea, "transparent", 0), this.hitAreaRect.name("scrollbar-hit-area"), this.thumbRect = se.createRect(
18181
18328
  0,
18182
18329
  0,
18183
18330
  0,
@@ -18345,7 +18492,7 @@ class $u {
18345
18492
  };
18346
18493
  }
18347
18494
  }
18348
- const zu = "@linker-design-plus/timeline-track", Vu = "2.0.16-alfha.0", Ft = {
18495
+ const zu = "@linker-design-plus/timeline-track", Vu = "2.0.17", Ft = {
18349
18496
  name: zu,
18350
18497
  version: Vu
18351
18498
  }, Uu = 1, Wu = 2, Yu = 120;
@@ -18412,7 +18559,7 @@ class rp {
18412
18559
  p(this, "previewPlaybackAutoResume", !1);
18413
18560
  p(this, "previewBufferingSuspendTimeoutId", null);
18414
18561
  p(this, "lastSelectedClipId", null);
18415
- p(this, "previewAspectRatio", { ...Fe });
18562
+ p(this, "previewAspectRatio", { ...Be });
18416
18563
  p(this, "bodyViewportScrollListener", () => {
18417
18564
  this.handleBodyViewportScroll();
18418
18565
  });
@@ -18885,7 +19032,7 @@ class rp {
18885
19032
  return ((e = this.layout) == null ? void 0 : e.bodyViewport.clientHeight) || 0;
18886
19033
  }
18887
19034
  getHorizontalContentWidth() {
18888
- return N.timeToPixels(this.getDurationState(), this.getZoomState());
19035
+ return $.timeToPixels(this.getDurationState(), this.getZoomState());
18889
19036
  }
18890
19037
  getVerticalContentHeight() {
18891
19038
  return Math.max(this.calculateTotalHeight(), this.getViewportHeight());
@@ -19161,7 +19308,7 @@ class rp {
19161
19308
  var d, u, g;
19162
19309
  if (!this.trackLayer)
19163
19310
  return F.error("TimelineManager", "Track layer not initialized"), "";
19164
- const a = this.trackManager.createTrack(e, t, i, r, n), o = a.id, l = Ie(e), c = this.calculateTrackY(o), h = this.getTimelineTrackBridge().createTrack({
19311
+ const a = this.trackManager.createTrack(e, t, i, r, n), o = a.id, l = _e(e), c = this.calculateTrackY(o), h = this.getTimelineTrackBridge().createTrack({
19165
19312
  layer: this.trackLayer,
19166
19313
  config: { id: o, clips: [], role: a.role },
19167
19314
  trackType: e,
@@ -19262,7 +19409,7 @@ class rp {
19262
19409
  if (!this.snapGuideLayer)
19263
19410
  return null;
19264
19411
  if (!this.trackInsertionPreviewLine) {
19265
- const e = ae.createLine(
19412
+ const e = se.createLine(
19266
19413
  [0, 0, 0, 0],
19267
19414
  this.getSnapGuideAccentColor(),
19268
19415
  2
@@ -19298,17 +19445,17 @@ class rp {
19298
19445
  const c = r.find((h) => h.id === i);
19299
19446
  if (c) {
19300
19447
  const h = Bt(r, c.id, this.getTrackContentTopOffset());
19301
- return t === "before_track" ? h : h + Ie(c.type);
19448
+ return t === "before_track" ? h : h + _e(c.type);
19302
19449
  }
19303
19450
  }
19304
19451
  if (t === "top_of_type_region" && a)
19305
19452
  return Bt(r, a.id, this.getTrackContentTopOffset());
19306
19453
  if (t === "bottom_of_type_region" && o)
19307
- return Bt(r, o.id, this.getTrackContentTopOffset()) + Ie(o.type);
19454
+ return Bt(r, o.id, this.getTrackContentTopOffset()) + _e(o.type);
19308
19455
  if (!n)
19309
19456
  return e !== "audio" ? this.getTrackContentTopOffset() : ts(r, this.getTrackContentTopOffset());
19310
19457
  const l = Bt(r, n.id, this.getTrackContentTopOffset());
19311
- return e === "text" ? this.getTrackContentTopOffset() : e === "video" ? l : l + Ie(n.type);
19458
+ return e === "text" ? this.getTrackContentTopOffset() : e === "video" ? l : l + _e(n.type);
19312
19459
  }
19313
19460
  updateViewportLayout() {
19314
19461
  var o;
@@ -19340,7 +19487,7 @@ class rp {
19340
19487
  }), this.bodyBackgroundRect = r, this.backgroundLayer.add(r), i && this.backgroundLayer.batchDraw();
19341
19488
  }
19342
19489
  handleBodyBackgroundClick(e) {
19343
- const t = N.pixelsToTime(e - ue + this.getScrollLeftState(), this.getZoomState());
19490
+ const t = $.pixelsToTime(e - ue + this.getScrollLeftState(), this.getZoomState());
19344
19491
  this.handleTimeChange(Math.max(0, t));
19345
19492
  }
19346
19493
  handleBodyCanvasHostClick(e) {
@@ -19357,7 +19504,7 @@ class rp {
19357
19504
  return null;
19358
19505
  if (!this.snapGuideLine) {
19359
19506
  const e = this.config.theme;
19360
- this.snapGuideLine = ae.createLine(
19507
+ this.snapGuideLine = se.createLine(
19361
19508
  [0, 0, 0, this.calculateTotalHeight()],
19362
19509
  this.getSnapGuideAccentColor(),
19363
19510
  e.snapGuideLineWidth ?? 1
@@ -19543,7 +19690,7 @@ class rp {
19543
19690
  if (!r.changed) return;
19544
19691
  const n = r.nextValue;
19545
19692
  if (this.ensureConfigState().zoom = n, this.syncZoomToScene(n), this.refreshScrollbarMetrics(), this.timeline) {
19546
- const a = this.timeline.getScrollLeft(), o = N.timeToPixels(i, t), c = N.timeToPixels(i, n) - o + a;
19693
+ const a = this.timeline.getScrollLeft(), o = $.timeToPixels(i, t), c = $.timeToPixels(i, n) - o + a;
19547
19694
  this.timeline.setScrollLeft(c), this.handleScrollChange(this.timeline.getScrollLeft());
19548
19695
  }
19549
19696
  this.emitEvent("zoom_change", { zoom: n });
@@ -19574,11 +19721,11 @@ class rp {
19574
19721
  this.setZoom(e);
19575
19722
  return;
19576
19723
  }
19577
- const i = this.getZoomState(), r = this.timeline.getScrollLeft(), n = N.pixelsToTime(t - ue + r, i), a = this.getTimelineCommands().setZoom(e);
19724
+ const i = this.getZoomState(), r = this.timeline.getScrollLeft(), n = $.pixelsToTime(t - ue + r, i), a = this.getTimelineCommands().setZoom(e);
19578
19725
  if (!a.changed) return;
19579
19726
  const o = a.nextValue;
19580
19727
  this.ensureConfigState().zoom = o, this.syncZoomToScene(o), this.refreshScrollbarMetrics();
19581
- const c = N.timeToPixels(n, o) - (t - ue);
19728
+ const c = $.timeToPixels(n, o) - (t - ue);
19582
19729
  this.timeline.setScrollLeft(c), this.handleScrollChange(this.timeline.getScrollLeft()), this.emitEvent("zoom_change", { zoom: o });
19583
19730
  }
19584
19731
  getZoom() {
@@ -19774,7 +19921,7 @@ class rp {
19774
19921
  let h = r ? a : e.sourceDuration;
19775
19922
  if (!h)
19776
19923
  try {
19777
- h = await N.getVideoDuration(n, {
19924
+ h = await $.getVideoDuration(n, {
19778
19925
  registry: this.sourceMediaRegistry,
19779
19926
  cacheKey: this.buildSourceMediaKey(e)
19780
19927
  }), h <= 0 && (h = c);
@@ -19818,7 +19965,7 @@ class rp {
19818
19965
  recordHistory: () => {
19819
19966
  this.getTimelineHistoryRecorder().recordAddClip(g);
19820
19967
  },
19821
- applyEffects: () => We({
19968
+ applyEffects: () => Ue({
19822
19969
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
19823
19970
  updateCanPlayState: this.updateCanPlayState.bind(this),
19824
19971
  updateTrackInfoPanel: this.updateTrackInfoPanel.bind(this),
@@ -19838,7 +19985,7 @@ class rp {
19838
19985
  recordHistory: () => {
19839
19986
  this.getTimelineHistoryRecorder().recordAddClip(g);
19840
19987
  },
19841
- applyEffects: () => We({
19988
+ applyEffects: () => Ue({
19842
19989
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
19843
19990
  updateCanPlayState: this.updateCanPlayState.bind(this),
19844
19991
  updateTrackInfoPanel: this.updateTrackInfoPanel.bind(this),
@@ -19859,7 +20006,7 @@ class rp {
19859
20006
  t.trackId ? this.getTrackRestoreAnchor(t.trackId) : null
19860
20007
  );
19861
20008
  },
19862
- applyEffects: () => We({
20009
+ applyEffects: () => Ue({
19863
20010
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
19864
20011
  updateCanPlayState: this.updateCanPlayState.bind(this),
19865
20012
  updateTrackInfoPanel: this.updateTrackInfoPanel.bind(this),
@@ -19886,7 +20033,7 @@ class rp {
19886
20033
  emitSelectionChangeEvent: this.emitSelectionChangeEvent.bind(this),
19887
20034
  emitSelectedClipChangeIfNeeded: this.emitSelectedClipChangeIfNeeded.bind(this),
19888
20035
  handleClipChange: this.handleClipChange.bind(this)
19889
- }), We({
20036
+ }), Ue({
19890
20037
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
19891
20038
  updateCanPlayState: this.updateCanPlayState.bind(this),
19892
20039
  updateTrackInfoPanel: this.updateTrackInfoPanel.bind(this),
@@ -19899,7 +20046,7 @@ class rp {
19899
20046
  const i = this.findClipById(e);
19900
20047
  i && this.markClipThumbnailLoadCompleted(i);
19901
20048
  }
19902
- We({
20049
+ Ue({
19903
20050
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
19904
20051
  updateCanPlayState: this.updateCanPlayState.bind(this)
19905
20052
  });
@@ -19912,7 +20059,7 @@ class rp {
19912
20059
  const r = i == null ? void 0 : i.track.splitSelectedClip;
19913
20060
  r && (this.withSplitOperation(() => {
19914
20061
  r.call(i.track, t);
19915
- }), We({
20062
+ }), Ue({
19916
20063
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
19917
20064
  updateCanPlayState: this.updateCanPlayState.bind(this)
19918
20065
  }));
@@ -19924,7 +20071,7 @@ class rp {
19924
20071
  const i = t == null ? void 0 : t.track.splitSelectedClip;
19925
20072
  i && (this.withSplitOperation(() => {
19926
20073
  i.call(t.track, e);
19927
- }), We({
20074
+ }), Ue({
19928
20075
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
19929
20076
  updateCanPlayState: this.updateCanPlayState.bind(this)
19930
20077
  }));
@@ -19936,7 +20083,7 @@ class rp {
19936
20083
  var n, a, o;
19937
20084
  const e = this.getPreviewAspectRatio();
19938
20085
  let t = e.width, i = e.height;
19939
- if (Ut(e.mode) && t === Fe.width && i === Fe.height) {
20086
+ if (Ut(e.mode) && t === Be.width && i === Be.height) {
19940
20087
  const l = (n = this.getAutoAspectRatioClip()) == null ? void 0 : n.clip, c = (a = l == null ? void 0 : l.style) == null ? void 0 : a.sys_width, h = (o = l == null ? void 0 : l.style) == null ? void 0 : o.sys_height;
19941
20088
  typeof c == "number" && c > 0 && typeof h == "number" && h > 0 && (t = c, i = h);
19942
20089
  }
@@ -20394,12 +20541,12 @@ class rp {
20394
20541
  const I = l[M];
20395
20542
  if (!I)
20396
20543
  continue;
20397
- const A = C + M;
20398
- if (x += Math.abs(A - I.preferredTrackIndex), A < 0 || A >= a.length) {
20544
+ const E = C + M;
20545
+ if (x += Math.abs(E - I.preferredTrackIndex), E < 0 || E >= a.length) {
20399
20546
  P += 1;
20400
20547
  continue;
20401
20548
  }
20402
- if (this.doesClipGroupOverlapOnTrack(a[A].id, I.clips, o)) {
20549
+ if (this.doesClipGroupOverlapOnTrack(a[E].id, I.clips, o)) {
20403
20550
  w = !1;
20404
20551
  break;
20405
20552
  }
@@ -21143,7 +21290,7 @@ class rp {
21143
21290
  }
21144
21291
  resetPreviewAspectRatioToAuto() {
21145
21292
  var e, t;
21146
- this.previewAspectRatio = { ...Fe }, (e = this.previewSession) == null || e.applyAspectRatio(this.previewAspectRatio), this.previewAspectRatio = ((t = this.previewSession) == null ? void 0 : t.getAspectRatio()) || this.previewAspectRatio, this.syncPreviewSession(), this.emitEvent("preview_aspect_ratio_change", { aspectRatio: this.getPreviewAspectRatio() });
21293
+ this.previewAspectRatio = { ...Be }, (e = this.previewSession) == null || e.applyAspectRatio(this.previewAspectRatio), this.previewAspectRatio = ((t = this.previewSession) == null ? void 0 : t.getAspectRatio()) || this.previewAspectRatio, this.syncPreviewSession(), this.emitEvent("preview_aspect_ratio_change", { aspectRatio: this.getPreviewAspectRatio() });
21147
21294
  }
21148
21295
  /**
21149
21296
  * 删除当前选中的 clip
@@ -21915,10 +22062,10 @@ class rp {
21915
22062
  return t;
21916
22063
  }
21917
22064
  resolveTrackRenderHeight(e) {
21918
- return Ie(e.getTrackType());
22065
+ return _e(e.getTrackType());
21919
22066
  }
21920
22067
  addClipToTrack(e, t) {
21921
- return this.registerPreviewAutoAspectRatioClip(t), this.getTrackCollection().addClipToTrack(e, t) ? (We({
22068
+ return this.registerPreviewAutoAspectRatioClip(t), this.getTrackCollection().addClipToTrack(e, t) ? (Ue({
21922
22069
  checkTrackDurationChange: this.checkTrackDurationChange.bind(this),
21923
22070
  updateCanPlayState: this.updateCanPlayState.bind(this),
21924
22071
  updateTrackInfoPanel: this.updateTrackInfoPanel.bind(this),
@@ -22099,7 +22246,7 @@ export {
22099
22246
  lr as Clip,
22100
22247
  Kh as ClipConfigPanel,
22101
22248
  za as DEFAULT_CLIP_VIEW_STATE,
22102
- Fe as DEFAULT_PREVIEW_ASPECT_RATIO,
22249
+ Be as DEFAULT_PREVIEW_ASPECT_RATIO,
22103
22250
  $a as DEFAULT_TEXT_CLIP_STYLE,
22104
22251
  Mc as DiagnosticsCenter,
22105
22252
  Fc as DiagnosticsPanel,
@@ -22110,7 +22257,7 @@ export {
22110
22257
  ue as TIMELINE_LEFT_PADDING,
22111
22258
  Zu as TIME_SCALE,
22112
22259
  Qi as TRACK_HEIGHT,
22113
- N as TimeUtils,
22260
+ $ as TimeUtils,
22114
22261
  Ju as Timeline,
22115
22262
  rp as TimelineManager,
22116
22263
  Nr as Track,