@shotstack/shotstack-studio 2.22.0 → 2.22.1

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.
@@ -591,7 +591,7 @@ class h8 extends i8 {
591
591
  this.uniformGroup.uniforms.uRevealFromRight = t ? 1 : 0;
592
592
  }
593
593
  }
594
- const j = {
594
+ const Z = {
595
595
  // Playback
596
596
  PlaybackPlay: "playback:play",
597
597
  PlaybackPause: "playback:pause",
@@ -873,6 +873,11 @@ class Mi extends b8 {
873
873
  clipId = null;
874
874
  /** True when the player's asset needs external resolution (e.g. alias caption awaiting transcription). */
875
875
  needsResolution = !1;
876
+ /**
877
+ * Why the asset couldn't be shown, or null. A failing player draws a placeholder and still
878
+ * resolves load() so the rest of the edit keeps loading; this is how the failure is reported.
879
+ */
880
+ loadError = null;
876
881
  edit;
877
882
  clipConfiguration;
878
883
  resolvedTiming;
@@ -922,8 +927,11 @@ class Mi extends b8 {
922
927
  const p = [...f.in.brightnessKeyframes, ...f.out.brightnessKeyframes];
923
928
  p.length && (this.wipeBrightnessBuilder = new na(p, t), this.wipeInFromRight = f.in.wipeFromRight, this.wipeOutFromRight = f.out.wipeFromRight, this.wipeOutStart = f.out.brightnessKeyframes[0]?.start ?? Number.POSITIVE_INFINITY);
924
929
  }
930
+ recordLoadError(t) {
931
+ this.loadError = t instanceof Error ? t.message : String(t);
932
+ }
925
933
  async load() {
926
- this.lumaWrapper?.destroyed && (this.lumaWrapper = new X.Container(), this.getContainer().addChild(this.lumaWrapper)), this.contentContainer?.destroyed && (this.contentContainer = new X.Container(), this.lumaWrapper.addChild(this.contentContainer)), this.getContainer().sortableChildren = !0, this.getContainer().cursor = "pointer", this.getContainer().eventMode = "static", this.getContainer().on?.("pointerdown", this.onPointerDown.bind(this));
934
+ this.loadError = null, this.lumaWrapper?.destroyed && (this.lumaWrapper = new X.Container(), this.getContainer().addChild(this.lumaWrapper)), this.contentContainer?.destroyed && (this.contentContainer = new X.Container(), this.lumaWrapper.addChild(this.contentContainer)), this.getContainer().sortableChildren = !0, this.getContainer().cursor = "pointer", this.getContainer().eventMode = "static", this.getContainer().on?.("pointerdown", this.onPointerDown.bind(this));
927
935
  }
928
936
  update(t, i) {
929
937
  this.applyPlayheadState();
@@ -5497,7 +5505,7 @@ const Z9 = /* @__PURE__ */ tt("ZodObject", (e, t) => {
5497
5505
  ah(), s7.init(e, t), ri.init(e, t), e._zod.processJSONSchema = (i, r, n) => UF(e, i, r, n), rD(e, "shape", (i) => i._zod.def.shape, !1);
5498
5506
  }, {
5499
5507
  keyof() {
5500
- return Z(Object.keys(this._zod.def.shape));
5508
+ return j(Object.keys(this._zod.def.shape));
5501
5509
  },
5502
5510
  catchall(e) {
5503
5511
  return this.clone(Ar(this._zod.def, { catchall: e }));
@@ -5625,7 +5633,7 @@ const Sm = /* @__PURE__ */ tt("ZodEnum", (e, t) => {
5625
5633
  });
5626
5634
  };
5627
5635
  });
5628
- function Z(e, t) {
5636
+ function j(e, t) {
5629
5637
  const i = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
5630
5638
  return new Sm({
5631
5639
  type: "enum",
@@ -5830,7 +5838,7 @@ const Kr = {
5830
5838
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
5831
5839
  }, N()), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
5832
5840
  }).strict(), hB = A({
5833
- type: Z(["caption"]),
5841
+ type: j(["caption"]),
5834
5842
  src: b().min(1).regex(/\S/),
5835
5843
  font: m(dB),
5836
5844
  background: m(cB),
@@ -5912,7 +5920,7 @@ const Kr = {
5912
5920
  provider: Pt("google-drive"),
5913
5921
  options: m(xB)
5914
5922
  }).strict(), kB = A({
5915
- playbackPolicy: m(jt(Z(["public", "signed"]))),
5923
+ playbackPolicy: m(jt(j(["public", "signed"]))),
5916
5924
  passthrough: m(b().max(255))
5917
5925
  }).strict(), SB = A({
5918
5926
  provider: Pt("mux"),
@@ -5931,7 +5939,7 @@ const Kr = {
5931
5939
  exclude: m(Yt())
5932
5940
  }).strict(), TB = A({
5933
5941
  title: m(b().max(150)),
5934
- privacyLevel: m(Z([
5942
+ privacyLevel: m(j([
5935
5943
  "public",
5936
5944
  "friends",
5937
5945
  "private"
@@ -5943,19 +5951,19 @@ const Kr = {
5943
5951
  provider: Pt("tiktok"),
5944
5952
  options: m(TB)
5945
5953
  }).strict(), DB = A({
5946
- view: m(Z([
5954
+ view: m(j([
5947
5955
  "anybody",
5948
5956
  "nobody",
5949
5957
  "contacts",
5950
5958
  "password",
5951
5959
  "unlisted"
5952
5960
  ])),
5953
- embed: m(Z([
5961
+ embed: m(j([
5954
5962
  "public",
5955
5963
  "private",
5956
5964
  "whitelist"
5957
5965
  ])),
5958
- comments: m(Z([
5966
+ comments: m(j([
5959
5967
  "anybody",
5960
5968
  "nobody",
5961
5969
  "contacts"
@@ -5986,12 +5994,12 @@ const Kr = {
5986
5994
  }).strict(), NB = A({
5987
5995
  src: b()
5988
5996
  }).strict(), K3 = A({
5989
- type: Z(["html5"]),
5997
+ type: j(["html5"]),
5990
5998
  html: b().max(1e6),
5991
5999
  css: m(b().max(5e5)),
5992
6000
  js: m(b().max(5e5))
5993
6001
  }).strict(), MB = K3, zB = A({
5994
- type: Z(["html"]),
6002
+ type: j(["html"]),
5995
6003
  html: b(),
5996
6004
  css: m(b()),
5997
6005
  width: m(E([M((e) => {
@@ -6003,7 +6011,7 @@ const Kr = {
6003
6011
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6004
6012
  }, N().int()), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
6005
6013
  background: m(b()),
6006
- position: m(Z([
6014
+ position: m(j([
6007
6015
  "top",
6008
6016
  "topRight",
6009
6017
  "right",
@@ -6015,7 +6023,7 @@ const Kr = {
6015
6023
  "center"
6016
6024
  ]))
6017
6025
  }).strict(), X3 = A({
6018
- type: Z(["image"]),
6026
+ type: j(["image"]),
6019
6027
  src: m(b().min(1).regex(/\S/)),
6020
6028
  prompt: m(b().max(4e3)),
6021
6029
  model: m(b()),
@@ -6029,10 +6037,10 @@ const Kr = {
6029
6037
  path: ["src"]
6030
6038
  });
6031
6039
  }), OB = A({
6032
- type: Z(["image-to-video"]),
6040
+ type: j(["image-to-video"]),
6033
6041
  src: b().min(1),
6034
6042
  prompt: m(b()),
6035
- aspectRatio: m(Z([
6043
+ aspectRatio: m(j([
6036
6044
  "1:1",
6037
6045
  "4:3",
6038
6046
  "16:9",
@@ -6047,7 +6055,7 @@ const Kr = {
6047
6055
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
6048
6056
  crop: m(lh)
6049
6057
  }).strict(), RB = A({
6050
- preset: Z([
6058
+ preset: j([
6051
6059
  "conference",
6052
6060
  "interview",
6053
6061
  "lecture",
@@ -6099,9 +6107,9 @@ const GB = A({
6099
6107
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
6100
6108
  preservePitch: m(Yt())
6101
6109
  }).strict(), HB = A({
6102
- format: m(Z(["srt", "vtt"]))
6110
+ format: m(j(["srt", "vtt"]))
6103
6111
  }).strict(), qB = A({
6104
- type: Z(["luma"]),
6112
+ type: j(["luma"]),
6105
6113
  src: b().min(1).regex(/\S/),
6106
6114
  trim: m(E([M((e) => {
6107
6115
  if (!(e === "" || e === null || e === void 0))
@@ -6132,7 +6140,7 @@ const GB = A({
6132
6140
  providerId: m(b()),
6133
6141
  filename: m(b()),
6134
6142
  url: m(b()),
6135
- status: Z([
6143
+ status: j([
6136
6144
  "importing",
6137
6145
  "ready",
6138
6146
  "failed",
@@ -6152,7 +6160,7 @@ A({
6152
6160
  }).strict();
6153
6161
  A({
6154
6162
  id: b(),
6155
- status: Z([
6163
+ status: j([
6156
6164
  "queued",
6157
6165
  "processing",
6158
6166
  "done",
@@ -6211,13 +6219,13 @@ const iN = A({
6211
6219
  if (!(e === "" || e === null || e === void 0))
6212
6220
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6213
6221
  }, N().gte(1).lte(500)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
6214
- textDecoration: m(Z([
6222
+ textDecoration: m(j([
6215
6223
  "none",
6216
6224
  "underline",
6217
6225
  "line-through"
6218
6226
  ]))
6219
6227
  }).strict(), rN = A({
6220
- style: Z([
6228
+ style: j([
6221
6229
  "karaoke",
6222
6230
  "highlight",
6223
6231
  "pop",
@@ -6227,7 +6235,7 @@ const iN = A({
6227
6235
  "typewriter",
6228
6236
  "none"
6229
6237
  ]),
6230
- direction: m(Z([
6238
+ direction: m(j([
6231
6239
  "left",
6232
6240
  "right",
6233
6241
  "up",
@@ -6240,7 +6248,7 @@ const iN = A({
6240
6248
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6241
6249
  }, N().int().gte(1).lte(500)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
6242
6250
  weight: m(ti()).default("400"),
6243
- style: m(Z(["normal", "italic"])),
6251
+ style: m(j(["normal", "italic"])),
6244
6252
  color: m(E([b().regex(/^#[A-Fa-f0-9]{6}$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffffff"),
6245
6253
  opacity: m(E([M((e) => {
6246
6254
  if (!(e === "" || e === null || e === void 0))
@@ -6248,18 +6256,18 @@ const iN = A({
6248
6256
  }, N().gte(0).lte(1)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
6249
6257
  background: m(E([b().regex(/^#[A-Fa-f0-9]{6}$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
6250
6258
  }).strict(), qg = A({
6251
- horizontal: m(Z([
6259
+ horizontal: m(j([
6252
6260
  "left",
6253
6261
  "center",
6254
6262
  "right"
6255
6263
  ])),
6256
- vertical: m(Z([
6264
+ vertical: m(j([
6257
6265
  "top",
6258
6266
  "middle",
6259
6267
  "bottom"
6260
6268
  ]))
6261
6269
  }).strict(), sN = qg, tC = A({
6262
- preset: Z([
6270
+ preset: j([
6263
6271
  "fadeIn",
6264
6272
  "slideIn",
6265
6273
  "typewriter",
@@ -6271,8 +6279,8 @@ const iN = A({
6271
6279
  if (!(e === "" || e === null || e === void 0))
6272
6280
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6273
6281
  }, N().gte(0.1).lte(30)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
6274
- style: m(Z(["character", "word"])),
6275
- direction: m(Z([
6282
+ style: m(j(["character", "word"])),
6283
+ direction: m(j([
6276
6284
  "left",
6277
6285
  "right",
6278
6286
  "up",
@@ -6308,7 +6316,7 @@ const iN = A({
6308
6316
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6309
6317
  }, N().gte(0)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
6310
6318
  }).strict(), iC = A({
6311
- type: m(Z(["linear", "radial"])),
6319
+ type: m(j(["linear", "radial"])),
6312
6320
  angle: m(E([M((e) => {
6313
6321
  if (!(e === "" || e === null || e === void 0))
6314
6322
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
@@ -6329,7 +6337,7 @@ const iN = A({
6329
6337
  if (!(e === "" || e === null || e === void 0))
6330
6338
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6331
6339
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
6332
- textTransform: m(Z([
6340
+ textTransform: m(j([
6333
6341
  "none",
6334
6342
  "uppercase",
6335
6343
  "lowercase",
@@ -6339,7 +6347,7 @@ const iN = A({
6339
6347
  if (!(e === "" || e === null || e === void 0))
6340
6348
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6341
6349
  }, N().gte(1).lte(500)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
6342
- textDecoration: m(Z([
6350
+ textDecoration: m(j([
6343
6351
  "none",
6344
6352
  "underline",
6345
6353
  "line-through"
@@ -6394,14 +6402,14 @@ const iN = A({
6394
6402
  font: m(iN),
6395
6403
  stroke: m(E([
6396
6404
  cc,
6397
- Z(["none"])
6405
+ j(["none"])
6398
6406
  ])),
6399
6407
  shadow: m(E([
6400
6408
  uh,
6401
- Z(["none"])
6409
+ j(["none"])
6402
6410
  ]))
6403
6411
  }).strict(), dN = nC, fN = A({
6404
- type: Z(["rich-caption"]),
6412
+ type: j(["rich-caption"]),
6405
6413
  src: b().min(1),
6406
6414
  font: m(nN),
6407
6415
  style: m(lN),
@@ -6426,7 +6434,7 @@ const iN = A({
6426
6434
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6427
6435
  }, N().int().gte(1).lte(500)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
6428
6436
  weight: m(ti()).default("400"),
6429
- style: m(Z(["normal", "italic"])),
6437
+ style: m(j(["normal", "italic"])),
6430
6438
  color: m(E([b().regex(/^#[A-Fa-f0-9]{6}$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
6431
6439
  opacity: m(E([M((e) => {
6432
6440
  if (!(e === "" || e === null || e === void 0))
@@ -6447,20 +6455,20 @@ const iN = A({
6447
6455
  if (!(e === "" || e === null || e === void 0))
6448
6456
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6449
6457
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
6450
- textTransform: m(Z([
6458
+ textTransform: m(j([
6451
6459
  "none",
6452
6460
  "uppercase",
6453
6461
  "lowercase",
6454
6462
  "capitalize"
6455
6463
  ])),
6456
- textDecoration: m(Z([
6464
+ textDecoration: m(j([
6457
6465
  "none",
6458
6466
  "underline",
6459
6467
  "line-through"
6460
6468
  ])),
6461
6469
  gradient: m(iC)
6462
6470
  }).strict(), pN = aC, oC = A({
6463
- type: Z(["rich-text"]),
6471
+ type: j(["rich-text"]),
6464
6472
  text: b().max(5e3),
6465
6473
  font: m(sC),
6466
6474
  style: m(aC),
@@ -6480,7 +6488,7 @@ const iN = A({
6480
6488
  }).strict(), mN = oC, gN = A({
6481
6489
  id: m(b()),
6482
6490
  owner: m(b()),
6483
- status: m(Z(["queued", "failed"])),
6491
+ status: m(j(["queued", "failed"])),
6484
6492
  created: m(b())
6485
6493
  }).strict(), yN = A({
6486
6494
  type: m(b()),
@@ -6494,8 +6502,8 @@ const bN = A({
6494
6502
  id: b(),
6495
6503
  destinations: jt(Hg)
6496
6504
  }).strict(), vN = A({
6497
- type: Z(["shape"]),
6498
- shape: Z([
6505
+ type: j(["shape"]),
6506
+ shape: j([
6499
6507
  "rectangle",
6500
6508
  "circle",
6501
6509
  "line"
@@ -6562,7 +6570,7 @@ const bN = A({
6562
6570
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6563
6571
  }, N().int().gte(1).lte(4096)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
6564
6572
  }).strict(), uC = A({
6565
- format: m(Z([
6573
+ format: m(j([
6566
6574
  "mp4",
6567
6575
  "webm",
6568
6576
  "mov",
@@ -6580,12 +6588,12 @@ const bN = A({
6580
6588
  "tif"
6581
6589
  ])),
6582
6590
  size: m(lC),
6583
- fit: m(Z([
6591
+ fit: m(j([
6584
6592
  "cover",
6585
6593
  "contain",
6586
6594
  "crop"
6587
6595
  ])),
6588
- resolution: m(Z([
6596
+ resolution: m(j([
6589
6597
  "preview",
6590
6598
  "mobile",
6591
6599
  "sd",
@@ -6623,7 +6631,7 @@ const bN = A({
6623
6631
  transcription: m(HB)
6624
6632
  }).strict(), xN = A({
6625
6633
  id: b(),
6626
- status: m(Z([
6634
+ status: m(j([
6627
6635
  "queued",
6628
6636
  "importing",
6629
6637
  "ready",
@@ -6660,7 +6668,7 @@ const bN = A({
6660
6668
  owner: b(),
6661
6669
  input: m(b()),
6662
6670
  source: m(b()),
6663
- status: m(Z([
6671
+ status: m(j([
6664
6672
  "queued",
6665
6673
  "importing",
6666
6674
  "ready",
@@ -6705,7 +6713,7 @@ const SN = A({
6705
6713
  callback: m(b())
6706
6714
  }).strict(), _N = A({
6707
6715
  src: b().min(1).regex(/\S/),
6708
- effect: m(Z([
6716
+ effect: m(j([
6709
6717
  "fadeIn",
6710
6718
  "fadeOut",
6711
6719
  "fadeInFadeOut"
@@ -6715,24 +6723,24 @@ const SN = A({
6715
6723
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6716
6724
  }, N()), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
6717
6725
  }).strict(), dC = A({
6718
- type: Z(["svg"]),
6726
+ type: j(["svg"]),
6719
6727
  src: b().min(1).max(5e5)
6720
6728
  }).strict(), EN = dC, AN = A({
6721
6729
  id: b(),
6722
6730
  merge: m(jt(J3))
6723
6731
  }).strict(), TN = A({
6724
- horizontal: m(Z([
6732
+ horizontal: m(j([
6725
6733
  "left",
6726
6734
  "center",
6727
6735
  "right"
6728
6736
  ])),
6729
- vertical: m(Z([
6737
+ vertical: m(j([
6730
6738
  "top",
6731
6739
  "center",
6732
6740
  "bottom"
6733
6741
  ]))
6734
6742
  }).strict(), IN = A({
6735
- preset: Z(["typewriter"]),
6743
+ preset: j(["typewriter"]),
6736
6744
  duration: m(E([M((e) => {
6737
6745
  if (!(e === "" || e === null || e === void 0))
6738
6746
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
@@ -6778,7 +6786,7 @@ const SN = A({
6778
6786
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
6779
6787
  color: m(E([b().regex(/^#[A-Fa-f0-9]{6}$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
6780
6788
  }).strict(), BN = A({
6781
- type: Z(["text"]),
6789
+ type: j(["text"]),
6782
6790
  text: b(),
6783
6791
  width: m(E([M((e) => {
6784
6792
  if (!(e === "" || e === null || e === void 0))
@@ -6801,7 +6809,7 @@ const SN = A({
6801
6809
  path: ["background", "wrap"]
6802
6810
  });
6803
6811
  }), NN = A({
6804
- type: Z(["text-to-image"]),
6812
+ type: j(["text-to-image"]),
6805
6813
  prompt: b(),
6806
6814
  width: m(E([M((e) => {
6807
6815
  if (!(e === "" || e === null || e === void 0))
@@ -6822,7 +6830,7 @@ const SN = A({
6822
6830
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
6823
6831
  }, N().gte(0).lte(1)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
6824
6832
  }).strict(), zN = A({
6825
- format: Z([
6833
+ format: j([
6826
6834
  "mp4",
6827
6835
  "gif",
6828
6836
  "mp3",
@@ -6830,7 +6838,7 @@ const SN = A({
6830
6838
  "png",
6831
6839
  "bmp"
6832
6840
  ]),
6833
- resolution: m(Z([
6841
+ resolution: m(j([
6834
6842
  "preview",
6835
6843
  "mobile",
6836
6844
  "sd",
@@ -6838,7 +6846,7 @@ const SN = A({
6838
6846
  "1080",
6839
6847
  "4k"
6840
6848
  ])),
6841
- aspectRatio: m(Z([
6849
+ aspectRatio: m(j([
6842
6850
  "16:9",
6843
6851
  "9:16",
6844
6852
  "1:1",
@@ -6859,7 +6867,7 @@ const SN = A({
6859
6867
  Pt(59.94),
6860
6868
  Pt(60)
6861
6869
  ])),
6862
- scaleTo: m(Z([
6870
+ scaleTo: m(j([
6863
6871
  "preview",
6864
6872
  "mobile",
6865
6873
  "sd",
@@ -6867,7 +6875,7 @@ const SN = A({
6867
6875
  "1080",
6868
6876
  "4k"
6869
6877
  ])),
6870
- quality: m(Z([
6878
+ quality: m(j([
6871
6879
  "verylow",
6872
6880
  "low",
6873
6881
  "medium",
@@ -6889,7 +6897,7 @@ const SN = A({
6889
6897
  var r = typeof e.resolution == "string", n = e.size != null && e.size.width != null && e.size.height != null;
6890
6898
  !i && !r && !n && t.addIssue({ code: Kr.custom, message: 'output requires either "resolution" or "size" (with width and height)' });
6891
6899
  }), ON = A({
6892
- in: m(Z([
6900
+ in: m(j([
6893
6901
  "none",
6894
6902
  "fade",
6895
6903
  "fadeSlow",
@@ -6953,7 +6961,7 @@ const SN = A({
6953
6961
  "shuffleTopLeftFast",
6954
6962
  "zoom"
6955
6963
  ])),
6956
- out: m(Z([
6964
+ out: m(j([
6957
6965
  "none",
6958
6966
  "fade",
6959
6967
  "fadeSlow",
@@ -7028,12 +7036,12 @@ const SN = A({
7028
7036
  if (!(e === "" || e === null || e === void 0))
7029
7037
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
7030
7038
  }, N()), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
7031
- interpolation: m(Z([
7039
+ interpolation: m(j([
7032
7040
  "linear",
7033
7041
  "bezier",
7034
7042
  "constant"
7035
7043
  ])),
7036
- easing: m(Z([
7044
+ easing: m(j([
7037
7045
  "ease",
7038
7046
  "easeIn",
7039
7047
  "easeOut",
@@ -7064,7 +7072,7 @@ const SN = A({
7064
7072
  "easeInOutBack"
7065
7073
  ]))
7066
7074
  }).strict(), fC = A({
7067
- type: Z(["audio"]),
7075
+ type: j(["audio"]),
7068
7076
  src: m(b().min(1).regex(/\S/)),
7069
7077
  prompt: m(b().max(4e3)),
7070
7078
  model: m(b()),
@@ -7084,7 +7092,7 @@ const SN = A({
7084
7092
  if (!(e === "" || e === null || e === void 0))
7085
7093
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
7086
7094
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
7087
- effect: m(Z([
7095
+ effect: m(j([
7088
7096
  "none",
7089
7097
  "fadeIn",
7090
7098
  "fadeOut",
@@ -7136,7 +7144,7 @@ const SN = A({
7136
7144
  jt(Wn)
7137
7145
  ]))
7138
7146
  }).strict(), LN = A({
7139
- type: Z(["text-to-speech"]),
7147
+ type: j(["text-to-speech"]),
7140
7148
  text: b(),
7141
7149
  voice: b(),
7142
7150
  language: m(b()),
@@ -7156,16 +7164,16 @@ const SN = A({
7156
7164
  if (!(e === "" || e === null || e === void 0))
7157
7165
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
7158
7166
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
7159
- effect: m(Z([
7167
+ effect: m(j([
7160
7168
  "none",
7161
7169
  "fadeIn",
7162
7170
  "fadeOut",
7163
7171
  "fadeInFadeOut"
7164
7172
  ]))
7165
7173
  }).strict(), $N = A({
7166
- type: Z(["title"]),
7174
+ type: j(["title"]),
7167
7175
  text: b(),
7168
- style: m(Z([
7176
+ style: m(j([
7169
7177
  "minimal",
7170
7178
  "blockbuster",
7171
7179
  "vogue",
@@ -7178,7 +7186,7 @@ const SN = A({
7178
7186
  "subtitle"
7179
7187
  ])),
7180
7188
  color: m(b()),
7181
- size: m(Z([
7189
+ size: m(j([
7182
7190
  "xx-small",
7183
7191
  "x-small",
7184
7192
  "small",
@@ -7188,7 +7196,7 @@ const SN = A({
7188
7196
  "xx-large"
7189
7197
  ])),
7190
7198
  background: m(b()),
7191
- position: m(Z([
7199
+ position: m(j([
7192
7200
  "top",
7193
7201
  "topRight",
7194
7202
  "right",
@@ -7205,7 +7213,7 @@ const SN = A({
7205
7213
  skew: m(VN),
7206
7214
  flip: m(BB)
7207
7215
  }).strict(), pC = A({
7208
- type: Z(["video"]),
7216
+ type: j(["video"]),
7209
7217
  src: m(b().min(1).regex(/\S/)),
7210
7218
  prompt: m(b().max(4e3)),
7211
7219
  model: m(b()),
@@ -7222,7 +7230,7 @@ const SN = A({
7222
7230
  }, N().gte(0).lte(1)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
7223
7231
  jt(Wn)
7224
7232
  ])),
7225
- volumeEffect: m(Z([
7233
+ volumeEffect: m(j([
7226
7234
  "none",
7227
7235
  "fadeIn",
7228
7236
  "fadeOut",
@@ -7275,7 +7283,7 @@ const SN = A({
7275
7283
  }, N().gte(0)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
7276
7284
  E([b().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
7277
7285
  ]),
7278
- fit: m(Z([
7286
+ fit: m(j([
7279
7287
  "cover",
7280
7288
  "contain",
7281
7289
  "crop",
@@ -7296,7 +7304,7 @@ const SN = A({
7296
7304
  if (!(e === "" || e === null || e === void 0))
7297
7305
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
7298
7306
  }, N().gte(1).lte(2160)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
7299
- position: m(Z([
7307
+ position: m(j([
7300
7308
  "top",
7301
7309
  "topRight",
7302
7310
  "right",
@@ -7309,7 +7317,7 @@ const SN = A({
7309
7317
  ])),
7310
7318
  offset: m(hC),
7311
7319
  transition: m(ON),
7312
- effect: m(Z([
7320
+ effect: m(j([
7313
7321
  "zoomIn",
7314
7322
  "zoomInSlow",
7315
7323
  "zoomInFast",
@@ -7329,7 +7337,7 @@ const SN = A({
7329
7337
  "slideDownSlow",
7330
7338
  "slideDownFast"
7331
7339
  ])),
7332
- filter: m(Z([
7340
+ filter: m(j([
7333
7341
  "none",
7334
7342
  "blur",
7335
7343
  "boost",
@@ -7368,8 +7376,8 @@ const SN = A({
7368
7376
  output: zN,
7369
7377
  merge: m(jt(J3)),
7370
7378
  callback: m(b()),
7371
- disk: m(Z(["local", "mount"])),
7372
- instance: m(Z([
7379
+ disk: m(j(["local", "mount"])),
7380
+ instance: m(j([
7373
7381
  "s1",
7374
7382
  "s2",
7375
7383
  "a1"
@@ -7378,7 +7386,7 @@ const SN = A({
7378
7386
  id: b(),
7379
7387
  owner: b(),
7380
7388
  plan: m(b()),
7381
- status: Z([
7389
+ status: j([
7382
7390
  "queued",
7383
7391
  "fetching",
7384
7392
  "preprocessing",
@@ -38499,7 +38507,7 @@ class Rf extends Mi {
38499
38507
  emitCaptureFailed(t, i) {
38500
38508
  const r = t instanceof Error ? t.message : String(t);
38501
38509
  try {
38502
- this.edit.getInternalEvents().emit(j.ClipCaptureFailed, {
38510
+ this.edit.getInternalEvents().emit(Z.ClipCaptureFailed, {
38503
38511
  clipId: this.clipId,
38504
38512
  assetType: "html5",
38505
38513
  error: r,
@@ -38511,7 +38519,7 @@ class Rf extends Mi {
38511
38519
  }
38512
38520
  emitCaptureStarted() {
38513
38521
  try {
38514
- this.edit.getInternalEvents().emit(j.ClipCaptureStarted, {
38522
+ this.edit.getInternalEvents().emit(Z.ClipCaptureStarted, {
38515
38523
  clipId: this.clipId,
38516
38524
  assetType: "html5"
38517
38525
  });
@@ -38521,7 +38529,7 @@ class Rf extends Mi {
38521
38529
  }
38522
38530
  emitCaptureCompleted(t) {
38523
38531
  try {
38524
- this.edit.getInternalEvents().emit(j.ClipCaptureCompleted, {
38532
+ this.edit.getInternalEvents().emit(Z.ClipCaptureCompleted, {
38525
38533
  clipId: this.clipId,
38526
38534
  assetType: "html5",
38527
38535
  frameCount: t
@@ -38797,8 +38805,8 @@ class Oq extends Mi {
38797
38805
  await super.load();
38798
38806
  try {
38799
38807
  await this.loadTexture(), this.configureKeyframes();
38800
- } catch {
38801
- this.createFallbackGraphic();
38808
+ } catch (t) {
38809
+ this.recordLoadError(t), this.createFallbackGraphic();
38802
38810
  }
38803
38811
  }
38804
38812
  createFallbackGraphic() {
@@ -38822,11 +38830,11 @@ class Oq extends Mi {
38822
38830
  }
38823
38831
  /** Reload the image asset when asset.src changes (e.g., merge field update) */
38824
38832
  async reloadAsset() {
38825
- this.disposeTexture(), this.clearPlaceholder();
38833
+ this.disposeTexture(), this.clearPlaceholder(), this.loadError = null;
38826
38834
  try {
38827
38835
  await this.loadTexture();
38828
- } catch {
38829
- this.createFallbackGraphic();
38836
+ } catch (t) {
38837
+ this.recordLoadError(t), this.createFallbackGraphic();
38830
38838
  }
38831
38839
  }
38832
38840
  async loadTexture() {
@@ -39155,8 +39163,8 @@ function OA(e, t, i) {
39155
39163
  }, a = ({ clipId: l, error: u }) => {
39156
39164
  l === t && i.setFailed(u);
39157
39165
  }, o = e.getInternalEvents();
39158
- return o.on(j.ClipGenerationStarted, n), o.on(j.ClipGenerationCompleted, s), o.on(j.ClipGenerationFailed, a), () => {
39159
- o.off(j.ClipGenerationStarted, n), o.off(j.ClipGenerationCompleted, s), o.off(j.ClipGenerationFailed, a);
39166
+ return o.on(Z.ClipGenerationStarted, n), o.on(Z.ClipGenerationCompleted, s), o.on(Z.ClipGenerationFailed, a), () => {
39167
+ o.off(Z.ClipGenerationStarted, n), o.off(Z.ClipGenerationCompleted, s), o.off(Z.ClipGenerationFailed, a);
39160
39168
  };
39161
39169
  }
39162
39170
  class G4 extends Mi {
@@ -39312,7 +39320,7 @@ const Vf = (e) => {
39312
39320
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39313
39321
  }, N()), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
39314
39322
  }).strict(), qq = A({
39315
- type: Z(["caption"]),
39323
+ type: j(["caption"]),
39316
39324
  src: b().min(1).regex(/\S/),
39317
39325
  font: m(Gq),
39318
39326
  background: m(Wq),
@@ -39394,7 +39402,7 @@ const Vf = (e) => {
39394
39402
  provider: Pt("google-drive"),
39395
39403
  options: m(iY)
39396
39404
  }).strict(), nY = A({
39397
- playbackPolicy: m(jt(Z(["public", "signed"]))),
39405
+ playbackPolicy: m(jt(j(["public", "signed"]))),
39398
39406
  passthrough: m(b().max(255))
39399
39407
  }).strict(), sY = A({
39400
39408
  provider: Pt("mux"),
@@ -39413,7 +39421,7 @@ const Vf = (e) => {
39413
39421
  exclude: m(Yt())
39414
39422
  }).strict(), uY = A({
39415
39423
  title: m(b().max(150)),
39416
- privacyLevel: m(Z([
39424
+ privacyLevel: m(j([
39417
39425
  "public",
39418
39426
  "friends",
39419
39427
  "private"
@@ -39425,19 +39433,19 @@ const Vf = (e) => {
39425
39433
  provider: Pt("tiktok"),
39426
39434
  options: m(uY)
39427
39435
  }).strict(), dY = A({
39428
- view: m(Z([
39436
+ view: m(j([
39429
39437
  "anybody",
39430
39438
  "nobody",
39431
39439
  "contacts",
39432
39440
  "password",
39433
39441
  "unlisted"
39434
39442
  ])),
39435
- embed: m(Z([
39443
+ embed: m(j([
39436
39444
  "public",
39437
39445
  "private",
39438
39446
  "whitelist"
39439
39447
  ])),
39440
- comments: m(Z([
39448
+ comments: m(j([
39441
39449
  "anybody",
39442
39450
  "nobody",
39443
39451
  "contacts"
@@ -39468,7 +39476,7 @@ const Vf = (e) => {
39468
39476
  }).strict(), gY = A({
39469
39477
  src: b()
39470
39478
  }).strict(), yY = A({
39471
- unit: Z([
39479
+ unit: j([
39472
39480
  "render",
39473
39481
  "second",
39474
39482
  "minute",
@@ -39489,7 +39497,7 @@ const Vf = (e) => {
39489
39497
  effectiveFrom: b()
39490
39498
  }).strict(), bY = A({
39491
39499
  model: b(),
39492
- type: Z([
39500
+ type: j([
39493
39501
  "image",
39494
39502
  "video",
39495
39503
  "audio"
@@ -39497,12 +39505,12 @@ const Vf = (e) => {
39497
39505
  pricing: m(yY),
39498
39506
  options: m(Yn(b(), ti()))
39499
39507
  }).strict(), vY = A({
39500
- type: Z(["html5"]),
39508
+ type: j(["html5"]),
39501
39509
  html: b().max(1e6),
39502
39510
  css: m(b().max(5e5)),
39503
39511
  js: m(b().max(5e5))
39504
39512
  }).strict(), wY = A({
39505
- type: Z(["html"]),
39513
+ type: j(["html"]),
39506
39514
  html: b(),
39507
39515
  css: m(b()),
39508
39516
  width: m(E([M((e) => {
@@ -39514,7 +39522,7 @@ const Vf = (e) => {
39514
39522
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39515
39523
  }, N().int()), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
39516
39524
  background: m(b()),
39517
- position: m(Z([
39525
+ position: m(j([
39518
39526
  "top",
39519
39527
  "topRight",
39520
39528
  "right",
@@ -39526,7 +39534,7 @@ const Vf = (e) => {
39526
39534
  "center"
39527
39535
  ]))
39528
39536
  }).strict(), VA = A({
39529
- type: Z(["image"]),
39537
+ type: j(["image"]),
39530
39538
  src: m(b().min(1).regex(/\S/)),
39531
39539
  prompt: m(b().max(4e3)),
39532
39540
  model: m(b()),
@@ -39540,10 +39548,10 @@ const Vf = (e) => {
39540
39548
  path: ["src"]
39541
39549
  });
39542
39550
  }), xY = A({
39543
- type: Z(["image-to-video"]),
39551
+ type: j(["image-to-video"]),
39544
39552
  src: b().min(1),
39545
39553
  prompt: m(b()),
39546
- aspectRatio: m(Z([
39554
+ aspectRatio: m(j([
39547
39555
  "1:1",
39548
39556
  "4:3",
39549
39557
  "16:9",
@@ -39558,7 +39566,7 @@ const Vf = (e) => {
39558
39566
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
39559
39567
  crop: m(h0)
39560
39568
  }).strict(), CY = A({
39561
- preset: Z([
39569
+ preset: j([
39562
39570
  "conference",
39563
39571
  "interview",
39564
39572
  "lecture",
@@ -39610,9 +39618,9 @@ const DY = A({
39610
39618
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
39611
39619
  preservePitch: m(Yt())
39612
39620
  }).strict(), PY = A({
39613
- format: m(Z(["srt", "vtt"]))
39621
+ format: m(j(["srt", "vtt"]))
39614
39622
  }).strict(), FY = A({
39615
- type: Z(["luma"]),
39623
+ type: j(["luma"]),
39616
39624
  src: b().min(1).regex(/\S/),
39617
39625
  trim: m(E([M((e) => {
39618
39626
  if (!(e === "" || e === null || e === void 0))
@@ -39643,7 +39651,7 @@ const DY = A({
39643
39651
  providerId: m(b()),
39644
39652
  filename: m(b()),
39645
39653
  url: m(b()),
39646
- status: Z([
39654
+ status: j([
39647
39655
  "importing",
39648
39656
  "ready",
39649
39657
  "failed",
@@ -39666,7 +39674,7 @@ A({
39666
39674
  }).strict();
39667
39675
  A({
39668
39676
  id: b(),
39669
- status: Z([
39677
+ status: j([
39670
39678
  "queued",
39671
39679
  "processing",
39672
39680
  "done",
@@ -39725,13 +39733,13 @@ const LY = A({
39725
39733
  if (!(e === "" || e === null || e === void 0))
39726
39734
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39727
39735
  }, N().gte(1).lte(500)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
39728
- textDecoration: m(Z([
39736
+ textDecoration: m(j([
39729
39737
  "none",
39730
39738
  "underline",
39731
39739
  "line-through"
39732
39740
  ]))
39733
39741
  }).strict(), $Y = A({
39734
- style: Z([
39742
+ style: j([
39735
39743
  "karaoke",
39736
39744
  "highlight",
39737
39745
  "pop",
@@ -39741,7 +39749,7 @@ const LY = A({
39741
39749
  "typewriter",
39742
39750
  "none"
39743
39751
  ]),
39744
- direction: m(Z([
39752
+ direction: m(j([
39745
39753
  "left",
39746
39754
  "right",
39747
39755
  "up",
@@ -39754,7 +39762,7 @@ const LY = A({
39754
39762
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39755
39763
  }, N().int().gte(1).lte(500)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
39756
39764
  weight: m(ti()).default("400"),
39757
- style: m(Z(["normal", "italic"])),
39765
+ style: m(j(["normal", "italic"])),
39758
39766
  color: m(E([b().regex(/^#[A-Fa-f0-9]{6}$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffffff"),
39759
39767
  opacity: m(E([M((e) => {
39760
39768
  if (!(e === "" || e === null || e === void 0))
@@ -39762,18 +39770,18 @@ const LY = A({
39762
39770
  }, N().gte(0).lte(1)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
39763
39771
  background: m(E([b().regex(/^#[A-Fa-f0-9]{6}$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
39764
39772
  }).strict(), UA = A({
39765
- horizontal: m(Z([
39773
+ horizontal: m(j([
39766
39774
  "left",
39767
39775
  "center",
39768
39776
  "right"
39769
39777
  ])),
39770
- vertical: m(Z([
39778
+ vertical: m(j([
39771
39779
  "top",
39772
39780
  "middle",
39773
39781
  "bottom"
39774
39782
  ]))
39775
39783
  }).strict(), ZY = A({
39776
- preset: Z([
39784
+ preset: j([
39777
39785
  "fadeIn",
39778
39786
  "slideIn",
39779
39787
  "typewriter",
@@ -39785,8 +39793,8 @@ const LY = A({
39785
39793
  if (!(e === "" || e === null || e === void 0))
39786
39794
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39787
39795
  }, N().gte(0.1).lte(30)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
39788
- style: m(Z(["character", "word"])),
39789
- direction: m(Z([
39796
+ style: m(j(["character", "word"])),
39797
+ direction: m(j([
39790
39798
  "left",
39791
39799
  "right",
39792
39800
  "up",
@@ -39822,7 +39830,7 @@ const LY = A({
39822
39830
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39823
39831
  }, N().gte(0)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
39824
39832
  }).strict(), WA = A({
39825
- type: m(Z(["linear", "radial"])),
39833
+ type: m(j(["linear", "radial"])),
39826
39834
  angle: m(E([M((e) => {
39827
39835
  if (!(e === "" || e === null || e === void 0))
39828
39836
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
@@ -39843,7 +39851,7 @@ const LY = A({
39843
39851
  if (!(e === "" || e === null || e === void 0))
39844
39852
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39845
39853
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
39846
- textTransform: m(Z([
39854
+ textTransform: m(j([
39847
39855
  "none",
39848
39856
  "uppercase",
39849
39857
  "lowercase",
@@ -39853,7 +39861,7 @@ const LY = A({
39853
39861
  if (!(e === "" || e === null || e === void 0))
39854
39862
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39855
39863
  }, N().gte(1).lte(500)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
39856
- textDecoration: m(Z([
39864
+ textDecoration: m(j([
39857
39865
  "none",
39858
39866
  "underline",
39859
39867
  "line-through"
@@ -39908,14 +39916,14 @@ const LY = A({
39908
39916
  font: m(LY),
39909
39917
  stroke: m(E([
39910
39918
  m0,
39911
- Z(["none"])
39919
+ j(["none"])
39912
39920
  ])),
39913
39921
  shadow: m(E([
39914
39922
  ub,
39915
- Z(["none"])
39923
+ j(["none"])
39916
39924
  ]))
39917
39925
  }).strict(), HA = A({
39918
- type: Z(["rich-caption"]),
39926
+ type: j(["rich-caption"]),
39919
39927
  src: b().min(1),
39920
39928
  font: m(UY),
39921
39929
  style: m(jY),
@@ -39940,7 +39948,7 @@ const LY = A({
39940
39948
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39941
39949
  }, N().int().gte(1).lte(500)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
39942
39950
  weight: m(ti()).default("400"),
39943
- style: m(Z(["normal", "italic"])),
39951
+ style: m(j(["normal", "italic"])),
39944
39952
  color: m(E([b().regex(/^#[A-Fa-f0-9]{6}$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
39945
39953
  opacity: m(E([M((e) => {
39946
39954
  if (!(e === "" || e === null || e === void 0))
@@ -39961,20 +39969,20 @@ const LY = A({
39961
39969
  if (!(e === "" || e === null || e === void 0))
39962
39970
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
39963
39971
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
39964
- textTransform: m(Z([
39972
+ textTransform: m(j([
39965
39973
  "none",
39966
39974
  "uppercase",
39967
39975
  "lowercase",
39968
39976
  "capitalize"
39969
39977
  ])),
39970
- textDecoration: m(Z([
39978
+ textDecoration: m(j([
39971
39979
  "none",
39972
39980
  "underline",
39973
39981
  "line-through"
39974
39982
  ])),
39975
39983
  gradient: m(WA)
39976
39984
  }).strict(), qA = A({
39977
- type: Z(["rich-text"]),
39985
+ type: j(["rich-text"]),
39978
39986
  text: b().max(5e3),
39979
39987
  font: m(HY),
39980
39988
  style: m(qY),
@@ -39994,7 +40002,7 @@ const LY = A({
39994
40002
  }).strict(), YY = qA, KY = A({
39995
40003
  id: m(b()),
39996
40004
  owner: m(b()),
39997
- status: m(Z(["queued", "failed"])),
40005
+ status: m(j(["queued", "failed"])),
39998
40006
  created: m(b())
39999
40007
  }).strict(), XY = A({
40000
40008
  type: m(b()),
@@ -40008,8 +40016,8 @@ const JY = A({
40008
40016
  id: b(),
40009
40017
  destinations: jt(p0)
40010
40018
  }).strict(), QY = A({
40011
- type: Z(["shape"]),
40012
- shape: Z([
40019
+ type: j(["shape"]),
40020
+ shape: j([
40013
40021
  "rectangle",
40014
40022
  "circle",
40015
40023
  "line"
@@ -40076,7 +40084,7 @@ const JY = A({
40076
40084
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
40077
40085
  }, N().int().gte(1).lte(4096)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
40078
40086
  }).strict(), tK = cb, YA = A({
40079
- format: m(Z([
40087
+ format: m(j([
40080
40088
  "mp4",
40081
40089
  "webm",
40082
40090
  "mov",
@@ -40094,12 +40102,12 @@ const JY = A({
40094
40102
  "tif"
40095
40103
  ])),
40096
40104
  size: m(cb),
40097
- fit: m(Z([
40105
+ fit: m(j([
40098
40106
  "cover",
40099
40107
  "contain",
40100
40108
  "crop"
40101
40109
  ])),
40102
- resolution: m(Z([
40110
+ resolution: m(j([
40103
40111
  "preview",
40104
40112
  "mobile",
40105
40113
  "sd",
@@ -40137,7 +40145,7 @@ const JY = A({
40137
40145
  transcription: m(PY)
40138
40146
  }).strict(), iK = A({
40139
40147
  id: b(),
40140
- status: m(Z([
40148
+ status: m(j([
40141
40149
  "queued",
40142
40150
  "importing",
40143
40151
  "ready",
@@ -40174,7 +40182,7 @@ const JY = A({
40174
40182
  owner: b(),
40175
40183
  input: m(b()),
40176
40184
  source: m(b()),
40177
- status: m(Z([
40185
+ status: m(j([
40178
40186
  "queued",
40179
40187
  "importing",
40180
40188
  "ready",
@@ -40219,7 +40227,7 @@ const sK = A({
40219
40227
  callback: m(b())
40220
40228
  }).strict(), aK = A({
40221
40229
  src: b().min(1).regex(/\S/),
40222
- effect: m(Z([
40230
+ effect: m(j([
40223
40231
  "fadeIn",
40224
40232
  "fadeOut",
40225
40233
  "fadeInFadeOut"
@@ -40229,24 +40237,24 @@ const sK = A({
40229
40237
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
40230
40238
  }, N()), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
40231
40239
  }).strict(), XA = A({
40232
- type: Z(["svg"]),
40240
+ type: j(["svg"]),
40233
40241
  src: b().min(1).max(5e5)
40234
40242
  }).strict(), oK = XA, lK = A({
40235
40243
  id: b(),
40236
40244
  merge: m(jt(LA))
40237
40245
  }).strict(), uK = A({
40238
- horizontal: m(Z([
40246
+ horizontal: m(j([
40239
40247
  "left",
40240
40248
  "center",
40241
40249
  "right"
40242
40250
  ])),
40243
- vertical: m(Z([
40251
+ vertical: m(j([
40244
40252
  "top",
40245
40253
  "center",
40246
40254
  "bottom"
40247
40255
  ]))
40248
40256
  }).strict(), cK = A({
40249
- preset: Z(["typewriter"]),
40257
+ preset: j(["typewriter"]),
40250
40258
  duration: m(E([M((e) => {
40251
40259
  if (!(e === "" || e === null || e === void 0))
40252
40260
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
@@ -40292,7 +40300,7 @@ const sK = A({
40292
40300
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
40293
40301
  color: m(E([b().regex(/^#[A-Fa-f0-9]{6}$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
40294
40302
  }).strict(), pK = A({
40295
- type: Z(["text"]),
40303
+ type: j(["text"]),
40296
40304
  text: b(),
40297
40305
  width: m(E([M((e) => {
40298
40306
  if (!(e === "" || e === null || e === void 0))
@@ -40315,7 +40323,7 @@ const sK = A({
40315
40323
  path: ["background", "wrap"]
40316
40324
  });
40317
40325
  }), mK = A({
40318
- type: Z(["text-to-image"]),
40326
+ type: j(["text-to-image"]),
40319
40327
  prompt: b(),
40320
40328
  width: m(E([M((e) => {
40321
40329
  if (!(e === "" || e === null || e === void 0))
@@ -40336,7 +40344,7 @@ const sK = A({
40336
40344
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
40337
40345
  }, N().gte(0).lte(1)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
40338
40346
  }).strict(), JA = A({
40339
- format: Z([
40347
+ format: j([
40340
40348
  "mp4",
40341
40349
  "gif",
40342
40350
  "mp3",
@@ -40344,7 +40352,7 @@ const sK = A({
40344
40352
  "png",
40345
40353
  "bmp"
40346
40354
  ]),
40347
- resolution: m(Z([
40355
+ resolution: m(j([
40348
40356
  "preview",
40349
40357
  "mobile",
40350
40358
  "sd",
@@ -40352,7 +40360,7 @@ const sK = A({
40352
40360
  "1080",
40353
40361
  "4k"
40354
40362
  ])),
40355
- aspectRatio: m(Z([
40363
+ aspectRatio: m(j([
40356
40364
  "16:9",
40357
40365
  "9:16",
40358
40366
  "1:1",
@@ -40373,7 +40381,7 @@ const sK = A({
40373
40381
  Pt(59.94),
40374
40382
  Pt(60)
40375
40383
  ])),
40376
- scaleTo: m(Z([
40384
+ scaleTo: m(j([
40377
40385
  "preview",
40378
40386
  "mobile",
40379
40387
  "sd",
@@ -40381,7 +40389,7 @@ const sK = A({
40381
40389
  "1080",
40382
40390
  "4k"
40383
40391
  ])),
40384
- quality: m(Z([
40392
+ quality: m(j([
40385
40393
  "verylow",
40386
40394
  "low",
40387
40395
  "medium",
@@ -40403,7 +40411,7 @@ const sK = A({
40403
40411
  var r = typeof e.resolution == "string", n = e.size != null && e.size.width != null && e.size.height != null;
40404
40412
  !i && !r && !n && t.addIssue({ code: Kr.custom, message: 'output requires either "resolution" or "size" (with width and height)' });
40405
40413
  }), g0 = JA, yK = A({
40406
- in: m(Z([
40414
+ in: m(j([
40407
40415
  "none",
40408
40416
  "fade",
40409
40417
  "fadeSlow",
@@ -40467,7 +40475,7 @@ const sK = A({
40467
40475
  "shuffleTopLeftFast",
40468
40476
  "zoom"
40469
40477
  ])),
40470
- out: m(Z([
40478
+ out: m(j([
40471
40479
  "none",
40472
40480
  "fade",
40473
40481
  "fadeSlow",
@@ -40542,12 +40550,12 @@ const sK = A({
40542
40550
  if (!(e === "" || e === null || e === void 0))
40543
40551
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
40544
40552
  }, N()), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
40545
- interpolation: m(Z([
40553
+ interpolation: m(j([
40546
40554
  "linear",
40547
40555
  "bezier",
40548
40556
  "constant"
40549
40557
  ])),
40550
- easing: m(Z([
40558
+ easing: m(j([
40551
40559
  "ease",
40552
40560
  "easeIn",
40553
40561
  "easeOut",
@@ -40578,7 +40586,7 @@ const sK = A({
40578
40586
  "easeInOutBack"
40579
40587
  ]))
40580
40588
  }).strict(), QA = A({
40581
- type: Z(["audio"]),
40589
+ type: j(["audio"]),
40582
40590
  src: m(b().min(1).regex(/\S/)),
40583
40591
  prompt: m(b().max(4e3)),
40584
40592
  model: m(b()),
@@ -40598,7 +40606,7 @@ const sK = A({
40598
40606
  if (!(e === "" || e === null || e === void 0))
40599
40607
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
40600
40608
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
40601
- effect: m(Z([
40609
+ effect: m(j([
40602
40610
  "none",
40603
40611
  "fadeIn",
40604
40612
  "fadeOut",
@@ -40650,7 +40658,7 @@ const sK = A({
40650
40658
  jt(qn)
40651
40659
  ]))
40652
40660
  }).strict(), wK = A({
40653
- type: Z(["text-to-speech"]),
40661
+ type: j(["text-to-speech"]),
40654
40662
  text: b(),
40655
40663
  voice: b(),
40656
40664
  language: m(b()),
@@ -40670,16 +40678,16 @@ const sK = A({
40670
40678
  if (!(e === "" || e === null || e === void 0))
40671
40679
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
40672
40680
  }, N().gte(0).lte(10)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
40673
- effect: m(Z([
40681
+ effect: m(j([
40674
40682
  "none",
40675
40683
  "fadeIn",
40676
40684
  "fadeOut",
40677
40685
  "fadeInFadeOut"
40678
40686
  ]))
40679
40687
  }).strict(), xK = A({
40680
- type: Z(["title"]),
40688
+ type: j(["title"]),
40681
40689
  text: b(),
40682
- style: m(Z([
40690
+ style: m(j([
40683
40691
  "minimal",
40684
40692
  "blockbuster",
40685
40693
  "vogue",
@@ -40692,7 +40700,7 @@ const sK = A({
40692
40700
  "subtitle"
40693
40701
  ])),
40694
40702
  color: m(b()),
40695
- size: m(Z([
40703
+ size: m(j([
40696
40704
  "xx-small",
40697
40705
  "x-small",
40698
40706
  "small",
@@ -40702,7 +40710,7 @@ const sK = A({
40702
40710
  "xx-large"
40703
40711
  ])),
40704
40712
  background: m(b()),
40705
- position: m(Z([
40713
+ position: m(j([
40706
40714
  "top",
40707
40715
  "topRight",
40708
40716
  "right",
@@ -40719,7 +40727,7 @@ const sK = A({
40719
40727
  skew: m(vK),
40720
40728
  flip: m(mY)
40721
40729
  }).strict(), eT = A({
40722
- type: Z(["video"]),
40730
+ type: j(["video"]),
40723
40731
  src: m(b().min(1).regex(/\S/)),
40724
40732
  prompt: m(b().max(4e3)),
40725
40733
  model: m(b()),
@@ -40736,7 +40744,7 @@ const sK = A({
40736
40744
  }, N().gte(0).lte(1)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
40737
40745
  jt(qn)
40738
40746
  ])),
40739
- volumeEffect: m(Z([
40747
+ volumeEffect: m(j([
40740
40748
  "none",
40741
40749
  "fadeIn",
40742
40750
  "fadeOut",
@@ -40789,7 +40797,7 @@ const sK = A({
40789
40797
  }, N().gte(0)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
40790
40798
  E([b().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
40791
40799
  ]),
40792
- fit: m(Z([
40800
+ fit: m(j([
40793
40801
  "cover",
40794
40802
  "contain",
40795
40803
  "crop",
@@ -40810,7 +40818,7 @@ const sK = A({
40810
40818
  if (!(e === "" || e === null || e === void 0))
40811
40819
  return Array.isArray(e) ? e : typeof e == "string" ? /^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(e) ? e : Number(e) : e;
40812
40820
  }, N().gte(1).lte(2160)), b().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
40813
- position: m(Z([
40821
+ position: m(j([
40814
40822
  "top",
40815
40823
  "topRight",
40816
40824
  "right",
@@ -40823,7 +40831,7 @@ const sK = A({
40823
40831
  ])),
40824
40832
  offset: m(tT),
40825
40833
  transition: m(yK),
40826
- effect: m(Z([
40834
+ effect: m(j([
40827
40835
  "zoomIn",
40828
40836
  "zoomInSlow",
40829
40837
  "zoomInFast",
@@ -40843,7 +40851,7 @@ const sK = A({
40843
40851
  "slideDownSlow",
40844
40852
  "slideDownFast"
40845
40853
  ])),
40846
- filter: m(Z([
40854
+ filter: m(j([
40847
40855
  "none",
40848
40856
  "blur",
40849
40857
  "boost",
@@ -40882,8 +40890,8 @@ const sK = A({
40882
40890
  output: JA,
40883
40891
  merge: m(jt(LA)),
40884
40892
  callback: m(b()),
40885
- disk: m(Z(["local", "mount"])),
40886
- instance: m(Z([
40893
+ disk: m(j(["local", "mount"])),
40894
+ instance: m(j([
40887
40895
  "s1",
40888
40896
  "s2",
40889
40897
  "a1"
@@ -40892,7 +40900,7 @@ const sK = A({
40892
40900
  id: b(),
40893
40901
  owner: b(),
40894
40902
  plan: m(b()),
40895
- status: Z([
40903
+ status: j([
40896
40904
  "queued",
40897
40905
  "fetching",
40898
40906
  "preprocessing",
@@ -41023,7 +41031,7 @@ A({
41023
41031
  body: m(mt()),
41024
41032
  path: m(mt()),
41025
41033
  query: m(A({
41026
- expand: m(Z(["options"]))
41034
+ expand: m(j(["options"]))
41027
41035
  }))
41028
41036
  }).strict();
41029
41037
  A({
@@ -41832,6 +41840,7 @@ class ls extends Mi {
41832
41840
  renderedWidth = 0;
41833
41841
  renderedHeight = 0;
41834
41842
  pendingRender = null;
41843
+ placeholder = null;
41835
41844
  constructor(t, i) {
41836
41845
  super(t, i, Re.Svg);
41837
41846
  }
@@ -41854,27 +41863,36 @@ class ls extends Mi {
41854
41863
  i !== t.src && (t = { ...t, src: i });
41855
41864
  }
41856
41865
  try {
41857
- if (!oK.safeParse(t).success) {
41858
- this.createFallbackGraphic();
41866
+ const i = oK.safeParse(t);
41867
+ if (!i.success) {
41868
+ this.recordLoadError(`Invalid svg asset: ${i.error.issues.map((r) => r.message).join("; ")}`), this.createFallbackGraphic();
41859
41869
  return;
41860
41870
  }
41861
41871
  await ls.initializeResvg(), await this.doRender(), this.configureKeyframes();
41862
41872
  } catch (i) {
41863
- console.error("Failed to render SVG asset:", i), this.createFallbackGraphic();
41873
+ console.error("Failed to render SVG asset:", i), this.recordLoadError(i), this.createFallbackGraphic();
41864
41874
  }
41865
41875
  }
41866
41876
  async reloadAsset() {
41867
- await this.rerenderAtCurrentDimensions();
41877
+ this.loadError = null;
41878
+ try {
41879
+ await this.rerenderAtCurrentDimensions();
41880
+ } catch (t) {
41881
+ console.error("Failed to render SVG asset:", t), this.recordLoadError(t), this.createFallbackGraphic();
41882
+ }
41868
41883
  }
41869
41884
  createFallbackGraphic() {
41870
- const t = this.clipConfiguration.width || this.edit.size.width, i = this.clipConfiguration.height || this.edit.size.height, r = $c(t, i);
41871
- this.renderedWidth = t, this.renderedHeight = i, this.contentContainer.addChild(r), this.configureKeyframes();
41885
+ const t = this.clipConfiguration.width || this.edit.size.width, i = this.clipConfiguration.height || this.edit.size.height;
41886
+ this.clearPlaceholder(), this.placeholder = $c(t, i), this.renderedWidth = t, this.renderedHeight = i, this.contentContainer.addChild(this.placeholder), this.configureKeyframes();
41887
+ }
41888
+ clearPlaceholder() {
41889
+ this.placeholder && (this.contentContainer.removeChild(this.placeholder), this.placeholder.destroy(), this.placeholder = null);
41872
41890
  }
41873
41891
  update(t, i) {
41874
41892
  super.update(t, i);
41875
41893
  }
41876
41894
  dispose() {
41877
- super.dispose(), this.pendingRender = null, this.sprite && (this.sprite.destroy(), this.sprite = null), this.texture && (this.texture.destroy(!0), this.texture = null);
41895
+ super.dispose(), this.pendingRender = null, this.placeholder = null, this.sprite && (this.sprite.destroy(), this.sprite = null), this.texture && (this.texture.destroy(!0), this.texture = null);
41878
41896
  }
41879
41897
  getSize() {
41880
41898
  return this.clipConfiguration.width && this.clipConfiguration.height ? {
@@ -41901,7 +41919,14 @@ class ls extends Mi {
41901
41919
  this.rerenderAtCurrentDimensions();
41902
41920
  }
41903
41921
  async rerenderAtCurrentDimensions() {
41904
- this.pendingRender && await this.pendingRender, this.sprite && (this.contentContainer.removeChild(this.sprite), this.sprite.destroy(), this.sprite = null), this.texture && (this.texture.destroy(!0), this.texture = null), this.pendingRender = this.doRender(), await this.pendingRender, this.pendingRender = null;
41922
+ this.pendingRender && await this.pendingRender.catch(() => {
41923
+ }), this.sprite && (this.contentContainer.removeChild(this.sprite), this.sprite.destroy(), this.sprite = null), this.texture && (this.texture.destroy(!0), this.texture = null), this.pendingRender = this.doRender();
41924
+ try {
41925
+ await this.pendingRender;
41926
+ } finally {
41927
+ this.pendingRender = null;
41928
+ }
41929
+ this.clearPlaceholder();
41905
41930
  }
41906
41931
  async doRender() {
41907
41932
  const t = this.clipConfiguration.asset, i = this.clipConfiguration.width || this.edit.size.width, r = this.clipConfiguration.height || this.edit.size.height, n = await CV(t, {
@@ -42514,7 +42539,7 @@ class RK extends Mi {
42514
42539
  try {
42515
42540
  await this.loadVideo(), this.configureKeyframes();
42516
42541
  } catch (t) {
42517
- console.warn(`[VideoPlayer.load] FAILED clipId=${this.clipId}:`, t), this.createFallbackGraphic();
42542
+ console.warn(`[VideoPlayer.load] FAILED clipId=${this.clipId}:`, t), this.recordLoadError(t), this.createFallbackGraphic();
42518
42543
  } finally {
42519
42544
  this.skipVideoUpdate = !1;
42520
42545
  }
@@ -42545,11 +42570,11 @@ class RK extends Mi {
42545
42570
  }
42546
42571
  /** Reload the video asset when asset.src changes (e.g., merge field update) */
42547
42572
  async reloadAsset() {
42548
- this.skipVideoUpdate = !0, this.isPlaying = !1, this.syncTimer = 0, this.activeSyncTimer = 0;
42573
+ this.skipVideoUpdate = !0, this.isPlaying = !1, this.syncTimer = 0, this.activeSyncTimer = 0, this.loadError = null;
42549
42574
  try {
42550
42575
  this.disposeVideo(), this.clearPlaceholder(), await this.loadVideo();
42551
42576
  } catch (t) {
42552
- console.warn(`[VideoPlayer.reloadAsset] FAILED clipId=${this.clipId}:`, t), this.createFallbackGraphic();
42577
+ console.warn(`[VideoPlayer.reloadAsset] FAILED clipId=${this.clipId}:`, t), this.recordLoadError(t), this.createFallbackGraphic();
42553
42578
  } finally {
42554
42579
  this.skipVideoUpdate = !1;
42555
42580
  }
@@ -42734,12 +42759,12 @@ class y0 {
42734
42759
  if (!t) throw new Error("AddTrackCommand.execute: context is required");
42735
42760
  const i = t.getDocument();
42736
42761
  if (!i) throw new Error("AddTrackCommand.execute: document is required");
42737
- if (i.addTrack(this.trackIdx, this.preparedTrack), t.resolve(), t.updateDuration(), t.emitEvent(j.TrackAdded, {
42762
+ if (i.addTrack(this.trackIdx, this.preparedTrack), t.resolve(), t.updateDuration(), t.emitEvent(Z.TrackAdded, {
42738
42763
  trackIndex: this.trackIdx,
42739
42764
  totalTracks: i.getTrackCount()
42740
42765
  }), this.preparedTrack)
42741
42766
  for (let r = 0; r < this.preparedTrack.clips.length; r += 1)
42742
- t.emitEvent(j.ClipAdded, {
42767
+ t.emitEvent(Z.ClipAdded, {
42743
42768
  trackIndex: this.trackIdx,
42744
42769
  clipIndex: r
42745
42770
  });
@@ -42752,11 +42777,11 @@ class y0 {
42752
42777
  const n = i.getTrack(this.trackIdx)?.clips.length ?? 0;
42753
42778
  i.removeTrack(this.trackIdx), t.resolve(), t.updateDuration();
42754
42779
  for (let s = n - 1; s >= 0; s -= 1)
42755
- t.emitEvent(j.ClipDeleted, {
42780
+ t.emitEvent(Z.ClipDeleted, {
42756
42781
  trackIndex: this.trackIdx,
42757
42782
  clipIndex: s
42758
42783
  });
42759
- return t.emitEvent(j.TrackRemoved, { trackIndex: this.trackIdx }), Xt();
42784
+ return t.emitEvent(Z.TrackRemoved, { trackIndex: this.trackIdx }), Xt();
42760
42785
  }
42761
42786
  dispose() {
42762
42787
  }
@@ -43139,7 +43164,7 @@ class _X {
43139
43164
  const r = t.documentAddClip(this.trackIdx, this.clip);
43140
43165
  this.addedClipId = r.id, this.convertedReferences && this.convertedReferences.size > 0 && mb(i, this.convertedReferences), t.resolve(), t.updateDuration();
43141
43166
  const a = t.getDocumentTrack(this.trackIdx)?.clips?.findIndex((o) => o.id === this.addedClipId) ?? -1;
43142
- return t.emitEvent(j.ClipAdded, {
43167
+ return t.emitEvent(Z.ClipAdded, {
43143
43168
  trackIndex: this.trackIdx,
43144
43169
  clipIndex: a
43145
43170
  }), Xt();
@@ -43158,7 +43183,7 @@ class _X {
43158
43183
  this.convertedReferences = pb(i, t.getEditState(), a, l);
43159
43184
  }
43160
43185
  const o = t.getSelectedClip();
43161
- return o && o.clipId === this.addedClipId && (t.setSelectedClip(null), t.emitEvent(j.SelectionCleared)), t.documentRemoveClip(this.trackIdx, s), t.resolve(), t.updateDuration(), t.emitEvent(j.ClipDeleted, {
43186
+ return o && o.clipId === this.addedClipId && (t.setSelectedClip(null), t.emitEvent(Z.SelectionCleared)), t.documentRemoveClip(this.trackIdx, s), t.resolve(), t.updateDuration(), t.emitEvent(Z.ClipDeleted, {
43162
43187
  trackIndex: this.trackIdx,
43163
43188
  clipIndex: s
43164
43189
  }), Xt();
@@ -43227,7 +43252,7 @@ class gb {
43227
43252
  s.add(`${this.trackIdx}:${a}`);
43228
43253
  this.convertedReferences = kX(i, t.getEditState(), n, s);
43229
43254
  }
43230
- return i.removeTrack(this.trackIdx), t.resolve(), t.updateDuration(), t.emitEvent(j.TrackRemoved, { trackIndex: this.trackIdx }), Xt();
43255
+ return i.removeTrack(this.trackIdx), t.resolve(), t.updateDuration(), t.emitEvent(Z.TrackRemoved, { trackIndex: this.trackIdx }), Xt();
43231
43256
  }
43232
43257
  undo(t) {
43233
43258
  if (!t) throw new Error("DeleteTrackCommand.undo: context is required");
@@ -43236,7 +43261,7 @@ class gb {
43236
43261
  i.addTrack(this.trackIdx);
43237
43262
  for (let r = 0; r < this.deletedClips.length; r += 1)
43238
43263
  i.addClip(this.trackIdx, this.deletedClips[r], r);
43239
- return this.convertedReferences && this.convertedReferences.size > 0 && mb(i, this.convertedReferences), t.resolve(), t.updateDuration(), t.emitEvent(j.TrackAdded, { trackIndex: this.trackIdx, totalTracks: i.getTrackCount() }), Xt();
43264
+ return this.convertedReferences && this.convertedReferences.size > 0 && mb(i, this.convertedReferences), t.resolve(), t.updateDuration(), t.emitEvent(Z.TrackAdded, { trackIndex: this.trackIdx, totalTracks: i.getTrackCount() }), Xt();
43240
43265
  }
43241
43266
  dispose() {
43242
43267
  this.deletedClips = [], this.convertedReferences = void 0;
@@ -43273,9 +43298,9 @@ class _p {
43273
43298
  }
43274
43299
  t.clearClipError(this.trackIdx, this.clipIdx);
43275
43300
  const s = t.getSelectedClip();
43276
- s && this.deletedClipId && s.clipId === this.deletedClipId && (t.setSelectedClip(null), t.emitEvent(j.SelectionCleared)), t.documentRemoveClip(this.trackIdx, this.clipIdx);
43301
+ s && this.deletedClipId && s.clipId === this.deletedClipId && (t.setSelectedClip(null), t.emitEvent(Z.SelectionCleared)), t.documentRemoveClip(this.trackIdx, this.clipIdx);
43277
43302
  const a = i.getTrack(this.trackIdx);
43278
- return a && a.clips.length === 0 && (this.deleteTrackCommand = new gb(this.trackIdx), this.deleteTrackCommand.execute(t).status === "success" && (this.trackWasDeleted = !0)), t.resolve(), t.updateDuration(), t.emitEvent(j.ClipDeleted, {
43303
+ return a && a.clips.length === 0 && (this.deleteTrackCommand = new gb(this.trackIdx), this.deleteTrackCommand.execute(t).status === "success" && (this.trackWasDeleted = !0)), t.resolve(), t.updateDuration(), t.emitEvent(Z.ClipDeleted, {
43279
43304
  trackIndex: this.trackIdx,
43280
43305
  clipIndex: this.clipIdx
43281
43306
  }), Xt();
@@ -43287,10 +43312,10 @@ class _p {
43287
43312
  if (!i) throw new Error("DeleteClipCommand.undo: no document");
43288
43313
  this.trackWasDeleted && i.addTrack(this.trackIdx);
43289
43314
  const n = t.documentAddClip(this.trackIdx, this.deletedClipConfig, this.clipIdx).id;
43290
- return n && this.storedBindings && this.storedBindings.size > 0 && i.setClipBindingsForClip(n, this.storedBindings), this.convertedReferences && this.convertedReferences.size > 0 && mb(i, this.convertedReferences), t.resolve(), t.updateDuration(), this.trackWasDeleted && (t.emitEvent(j.TrackAdded, {
43315
+ return n && this.storedBindings && this.storedBindings.size > 0 && i.setClipBindingsForClip(n, this.storedBindings), this.convertedReferences && this.convertedReferences.size > 0 && mb(i, this.convertedReferences), t.resolve(), t.updateDuration(), this.trackWasDeleted && (t.emitEvent(Z.TrackAdded, {
43291
43316
  trackIndex: this.trackIdx,
43292
43317
  totalTracks: i.getTrackCount()
43293
- }), this.trackWasDeleted = !1), t.emitEvent(j.ClipRestored, {
43318
+ }), this.trackWasDeleted = !1), t.emitEvent(Z.ClipRestored, {
43294
43319
  trackIndex: this.trackIdx,
43295
43320
  clipIndex: this.clipIdx
43296
43321
  }), Xt();
@@ -43328,7 +43353,7 @@ class fs {
43328
43353
  const a = i.getClip(this.effectiveToTrackIndex, this.newClipIndex);
43329
43354
  if (!this.previousDocClip || !a)
43330
43355
  throw new Error(`MoveClipCommand: document clip not found after mutation at ${this.effectiveToTrackIndex}/${this.newClipIndex}`);
43331
- t.emitEvent(j.ClipUpdated, {
43356
+ t.emitEvent(Z.ClipUpdated, {
43332
43357
  previous: {
43333
43358
  clip: ke(this.previousDocClip),
43334
43359
  trackIndex: this.fromTrackIndex,
@@ -43341,7 +43366,7 @@ class fs {
43341
43366
  }
43342
43367
  });
43343
43368
  const o = this.clipId ? t.getPlayerByClipId(this.clipId) : r;
43344
- return o && (t.setSelectedClip(o), t.emitEvent(j.ClipSelected, {
43369
+ return o && (t.setSelectedClip(o), t.emitEvent(Z.ClipSelected, {
43345
43370
  clip: ke(a),
43346
43371
  trackIndex: this.effectiveToTrackIndex,
43347
43372
  clipIndex: this.newClipIndex
@@ -43360,7 +43385,7 @@ class fs {
43360
43385
  start: this.originalStart
43361
43386
  }), t.resolve(), t.updateDuration(), this.fromTrackIndex !== this.effectiveToTrackIndex && t.propagateTimingChanges(this.effectiveToTrackIndex, this.newClipIndex - 1), t.propagateTimingChanges(this.fromTrackIndex, this.fromClipIndex);
43362
43387
  const s = i.getClip(this.fromTrackIndex, this.fromClipIndex);
43363
- this.previousDocClip && t.emitEvent(j.ClipUpdated, {
43388
+ this.previousDocClip && t.emitEvent(Z.ClipUpdated, {
43364
43389
  previous: {
43365
43390
  clip: ke(n ?? this.previousDocClip),
43366
43391
  trackIndex: this.effectiveToTrackIndex,
@@ -43373,7 +43398,7 @@ class fs {
43373
43398
  }
43374
43399
  });
43375
43400
  const a = t.getPlayerByClipId(this.clipId);
43376
- return a && s && (t.setSelectedClip(a), t.emitEvent(j.ClipSelected, {
43401
+ return a && s && (t.setSelectedClip(a), t.emitEvent(Z.ClipSelected, {
43377
43402
  clip: ke(s),
43378
43403
  trackIndex: this.fromTrackIndex,
43379
43404
  clipIndex: this.fromClipIndex
@@ -43559,7 +43584,7 @@ class Ed {
43559
43584
  const g = t.getDocumentClip(o, l);
43560
43585
  if (!this.previousDocClip || !g)
43561
43586
  throw new Error(`SetUpdatedClipCommand: document clip not found after mutation at ${o}/${l}`);
43562
- return t.emitEvent(j.ClipUpdated, {
43587
+ return t.emitEvent(Z.ClipUpdated, {
43563
43588
  previous: { clip: ke(this.previousDocClip), trackIndex: o, clipIndex: l },
43564
43589
  current: { clip: ke(g), trackIndex: o, clipIndex: l }
43565
43590
  }), Xt();
@@ -43585,7 +43610,7 @@ class Ed {
43585
43610
  const d = t.getDocumentClip(s, a);
43586
43611
  if (!o || !d)
43587
43612
  throw new Error(`SetUpdatedClipCommand: document clip not found after undo at ${s}/${a}`);
43588
- return t.emitEvent(j.ClipUpdated, {
43613
+ return t.emitEvent(Z.ClipUpdated, {
43589
43614
  previous: { clip: ke(o), trackIndex: s, clipIndex: a },
43590
43615
  current: { clip: ke(d), trackIndex: s, clipIndex: a }
43591
43616
  }), Xt();
@@ -43620,7 +43645,7 @@ class NX {
43620
43645
  }), t.updateDuration();
43621
43646
  const l = t.getDocumentClip(this.trackIndex, this.clipIndex);
43622
43647
  if (!l) throw new Error(`UpdateClipTimingCommand: document clip not found after mutation at ${this.trackIndex}/${this.clipIndex}`);
43623
- return t.emitEvent(j.ClipUpdated, {
43648
+ return t.emitEvent(Z.ClipUpdated, {
43624
43649
  previous: { trackIndex: this.trackIndex, clipIndex: this.clipIndex, clip: ke(a) },
43625
43650
  current: { trackIndex: this.trackIndex, clipIndex: this.clipIndex, clip: ke(l) }
43626
43651
  }), t.propagateTimingChanges(this.trackIndex, this.clipIndex), Xt();
@@ -43640,7 +43665,7 @@ class NX {
43640
43665
  const a = t.getDocumentClip(this.trackIndex, this.clipIndex);
43641
43666
  if (!n || !a)
43642
43667
  throw new Error(`UpdateClipTimingCommand: document clip not found after undo at ${this.trackIndex}/${this.clipIndex}`);
43643
- return t.emitEvent(j.ClipUpdated, {
43668
+ return t.emitEvent(Z.ClipUpdated, {
43644
43669
  previous: { trackIndex: this.trackIndex, clipIndex: this.clipIndex, clip: ke(n) },
43645
43670
  current: { trackIndex: this.trackIndex, clipIndex: this.clipIndex, clip: ke(a) }
43646
43671
  }), t.propagateTimingChanges(this.trackIndex, this.clipIndex), Xt();
@@ -43672,7 +43697,7 @@ class MX {
43672
43697
  const l = t.getDocumentClip(this.trackIndex, this.clipIndex);
43673
43698
  if (!this.previousDocClip || !l)
43674
43699
  throw new Error(`UpdateTextContentCommand: document clip not found after mutation at ${this.trackIndex}/${this.clipIndex}`);
43675
- return t.emitEvent(j.ClipUpdated, {
43700
+ return t.emitEvent(Z.ClipUpdated, {
43676
43701
  previous: { clip: ke(this.previousDocClip), trackIndex: this.trackIndex, clipIndex: this.clipIndex },
43677
43702
  current: { clip: ke(l), trackIndex: this.trackIndex, clipIndex: this.clipIndex }
43678
43703
  }), Xt();
@@ -43689,7 +43714,7 @@ class MX {
43689
43714
  if (this.previousDocClip) {
43690
43715
  if (!r || !o)
43691
43716
  throw new Error(`UpdateTextContentCommand: document clip not found after undo at ${this.trackIndex}/${this.clipIndex}`);
43692
- t.emitEvent(j.ClipUpdated, {
43717
+ t.emitEvent(Z.ClipUpdated, {
43693
43718
  previous: { clip: ke(r), trackIndex: this.trackIndex, clipIndex: this.clipIndex },
43694
43719
  current: { clip: ke(o), trackIndex: this.trackIndex, clipIndex: this.clipIndex }
43695
43720
  });
@@ -43833,10 +43858,10 @@ class RX {
43833
43858
  }
43834
43859
  }
43835
43860
  setupEventListeners() {
43836
- this.events.on(Et.PlayerLoaded, this.onPlayerLoadedBound), this.events.on(j.ClipUpdated, this.onClipChangedBound), this.events.on(Et.PlayerMovedBetweenTracks, this.onClipChangedBound);
43861
+ this.events.on(Et.PlayerLoaded, this.onPlayerLoadedBound), this.events.on(Z.ClipUpdated, this.onClipChangedBound), this.events.on(Et.PlayerMovedBetweenTracks, this.onClipChangedBound);
43837
43862
  }
43838
43863
  removeEventListeners() {
43839
- this.events.off(Et.PlayerLoaded, this.onPlayerLoadedBound), this.events.off(j.ClipUpdated, this.onClipChangedBound), this.events.off(Et.PlayerMovedBetweenTracks, this.onClipChangedBound);
43864
+ this.events.off(Et.PlayerLoaded, this.onPlayerLoadedBound), this.events.off(Z.ClipUpdated, this.onClipChangedBound), this.events.off(Et.PlayerMovedBetweenTracks, this.onClipChangedBound);
43840
43865
  }
43841
43866
  processPendingMaskCleanup() {
43842
43867
  for (let t = this.pendingMaskCleanup.length - 1; t >= 0; t -= 1) {
@@ -43889,7 +43914,7 @@ class UX {
43889
43914
  * @param options.silent If true, suppresses event emission (for command-based operations)
43890
43915
  */
43891
43916
  register(t, i) {
43892
- this.fields.set(t.name, t), i?.silent || this.events.emit(j.MergeFieldChanged, { fields: this.getAll() });
43917
+ this.fields.set(t.name, t), i?.silent || this.events.emit(Z.MergeFieldChanged, { fields: this.getAll() });
43893
43918
  }
43894
43919
  /**
43895
43920
  * Remove a merge field by name.
@@ -43898,7 +43923,7 @@ class UX {
43898
43923
  */
43899
43924
  remove(t, i) {
43900
43925
  const r = this.fields.delete(t);
43901
- return r && !i?.silent && this.events.emit(j.MergeFieldChanged, { fields: this.getAll() }), r;
43926
+ return r && !i?.silent && this.events.emit(Z.MergeFieldChanged, { fields: this.getAll() }), r;
43902
43927
  }
43903
43928
  /** Get a merge field by name */
43904
43929
  get(t) {
@@ -44029,7 +44054,7 @@ class jX {
44029
44054
  size: r
44030
44055
  }, delete n.output.resolution, delete n.output.aspectRatio);
44031
44056
  const s = this.edit.getDocument();
44032
- s?.setSize(r), s?.clearResolution(), s?.clearAspectRatio(), this.edit.updateCanvasForSize(), this.edit.getInternalEvents().emit(j.OutputResized, r);
44057
+ s?.setSize(r), s?.clearResolution(), s?.clearAspectRatio(), this.edit.updateCanvasForSize(), this.edit.getInternalEvents().emit(Z.OutputResized, r);
44033
44058
  }
44034
44059
  getSize() {
44035
44060
  return this.edit.size;
@@ -44043,7 +44068,7 @@ class jX {
44043
44068
  r && (r.output = {
44044
44069
  ...r.output,
44045
44070
  fps: i
44046
- }), this.edit.getDocument()?.setFps(i), this.edit.getInternalEvents().emit(j.OutputFpsChanged, { fps: t });
44071
+ }), this.edit.getDocument()?.setFps(i), this.edit.getInternalEvents().emit(Z.OutputFpsChanged, { fps: t });
44047
44072
  }
44048
44073
  getFps() {
44049
44074
  return this.edit.getResolvedEdit()?.output?.fps ?? 30;
@@ -44054,7 +44079,7 @@ class jX {
44054
44079
  r && (r.output = {
44055
44080
  ...r.output,
44056
44081
  format: i
44057
- }), this.edit.getDocument()?.setFormat(i), this.edit.getInternalEvents().emit(j.OutputFormatChanged, { format: i });
44082
+ }), this.edit.getDocument()?.setFormat(i), this.edit.getInternalEvents().emit(Z.OutputFormatChanged, { format: i });
44058
44083
  }
44059
44084
  getFormat() {
44060
44085
  return this.edit.getResolvedEdit()?.output?.format ?? "mp4";
@@ -44065,7 +44090,7 @@ class jX {
44065
44090
  r && (r.output = {
44066
44091
  ...r.output,
44067
44092
  destinations: i
44068
- }), this.edit.getInternalEvents().emit(j.OutputDestinationsChanged, { destinations: i });
44093
+ }), this.edit.getInternalEvents().emit(Z.OutputDestinationsChanged, { destinations: i });
44069
44094
  }
44070
44095
  getDestinations() {
44071
44096
  return this.edit.getResolvedEdit()?.output?.destinations ?? [];
@@ -44078,7 +44103,7 @@ class jX {
44078
44103
  resolution: i
44079
44104
  }, delete r.output.size);
44080
44105
  const a = this.edit.getDocument();
44081
- a?.setResolution(i), a?.clearSize(), this.edit.updateCanvasForSize(), this.edit.getInternalEvents().emit(j.OutputResolutionChanged, { resolution: i }), this.edit.getInternalEvents().emit(j.OutputResized, { width: s.width, height: s.height });
44106
+ a?.setResolution(i), a?.clearSize(), this.edit.updateCanvasForSize(), this.edit.getInternalEvents().emit(Z.OutputResolutionChanged, { resolution: i }), this.edit.getInternalEvents().emit(Z.OutputResized, { width: s.width, height: s.height });
44082
44107
  }
44083
44108
  getResolution() {
44084
44109
  return this.edit.getResolvedEdit()?.output?.resolution;
@@ -44090,7 +44115,7 @@ class jX {
44090
44115
  r && (r.output = {
44091
44116
  ...r.output,
44092
44117
  aspectRatio: i
44093
- }), this.edit.getDocument()?.setAspectRatio(i), this.edit.getInternalEvents().emit(j.OutputAspectRatioChanged, { aspectRatio: i });
44118
+ }), this.edit.getDocument()?.setAspectRatio(i), this.edit.getInternalEvents().emit(Z.OutputAspectRatioChanged, { aspectRatio: i });
44094
44119
  return;
44095
44120
  }
44096
44121
  const s = $f(n, i);
@@ -44099,7 +44124,7 @@ class jX {
44099
44124
  aspectRatio: i
44100
44125
  }, delete r.output.size);
44101
44126
  const a = this.edit.getDocument();
44102
- a?.setAspectRatio(i), a?.clearSize(), this.edit.updateCanvasForSize(), this.edit.getInternalEvents().emit(j.OutputAspectRatioChanged, { aspectRatio: i }), this.edit.getInternalEvents().emit(j.OutputResized, { width: s.width, height: s.height });
44127
+ a?.setAspectRatio(i), a?.clearSize(), this.edit.updateCanvasForSize(), this.edit.getInternalEvents().emit(Z.OutputAspectRatioChanged, { aspectRatio: i }), this.edit.getInternalEvents().emit(Z.OutputResized, { width: s.width, height: s.height });
44103
44128
  }
44104
44129
  getAspectRatio() {
44105
44130
  return this.edit.getResolvedEdit()?.output?.aspectRatio;
@@ -44138,7 +44163,7 @@ class HX {
44138
44163
  if (r) {
44139
44164
  this.selectedClip = r;
44140
44165
  const n = this.edit.getDocumentClip(t, i);
44141
- n && this.edit.getInternalEvents().emit(j.ClipSelected, {
44166
+ n && this.edit.getInternalEvents().emit(Z.ClipSelected, {
44142
44167
  clip: ke(n),
44143
44168
  trackIndex: t,
44144
44169
  clipIndex: i
@@ -44156,7 +44181,7 @@ class HX {
44156
44181
  * Clear the current selection.
44157
44182
  */
44158
44183
  clearSelection() {
44159
- this.selectedClip = null, this.edit.getInternalEvents().emit(j.SelectionCleared);
44184
+ this.selectedClip = null, this.edit.getInternalEvents().emit(Z.SelectionCleared);
44160
44185
  }
44161
44186
  /**
44162
44187
  * Check if a specific clip is selected by indices.
@@ -44205,7 +44230,7 @@ class HX {
44205
44230
  r && (this.copiedClip = {
44206
44231
  trackIndex: t,
44207
44232
  clipConfiguration: structuredClone(r)
44208
- }, this.edit.getInternalEvents().emit(j.ClipCopied, { trackIndex: t, clipIndex: i }), GX(LK(r)).catch(() => {
44233
+ }, this.edit.getInternalEvents().emit(Z.ClipCopied, { trackIndex: t, clipIndex: i }), GX(LK(r)).catch(() => {
44209
44234
  }));
44210
44235
  }
44211
44236
  /**
@@ -44350,7 +44375,7 @@ class KX {
44350
44375
  }), o.reconfigureAfterRestore());
44351
44376
  }
44352
44377
  }
44353
- this.edit.updateTotalDuration(), this.edit.getInternalEvents().emit(j.TimelineUpdated, {
44378
+ this.edit.updateTotalDuration(), this.edit.getInternalEvents().emit(Z.TimelineUpdated, {
44354
44379
  current: this.edit.getEdit()
44355
44380
  });
44356
44381
  }
@@ -45402,16 +45427,16 @@ class nJ {
45402
45427
  const s = this.edit.createPlayerFromAssetType(t);
45403
45428
  s.layer = r + 1, s.clipId = i, this.edit.registerPlayerByClipId(i, s), this.edit.addPlayerToTracksArray(r, s), this.edit.addPlayerToContainer(r, s);
45404
45429
  const a = t.asset?.type ?? "unknown", o = s.load().then(() => {
45405
- this.edit.getInternalEvents().emit(Et.PlayerLoaded, {
45430
+ s.loadError && this.reportLoadFailure(s, s.loadError), this.edit.getInternalEvents().emit(Et.PlayerLoaded, {
45406
45431
  player: s,
45407
45432
  trackIndex: r,
45408
45433
  clipIndex: n
45409
- }), Cu(t.asset) && this.edit.getInternalEvents().emit(j.ClipUnresolved, {
45434
+ }), Cu(t.asset) && this.edit.getInternalEvents().emit(Z.ClipUnresolved, {
45410
45435
  trackIndex: r,
45411
45436
  clipIndex: n,
45412
45437
  assetType: a,
45413
45438
  clipId: i
45414
- }), s.needsResolution && this.edit.getInternalEvents().emit(j.ClipUnresolved, {
45439
+ }), s.needsResolution && this.edit.getInternalEvents().emit(Z.ClipUnresolved, {
45415
45440
  trackIndex: r,
45416
45441
  clipIndex: n,
45417
45442
  assetType: a,
@@ -45419,7 +45444,7 @@ class nJ {
45419
45444
  });
45420
45445
  }).catch((l) => {
45421
45446
  const u = l instanceof Error ? l.message : String(l);
45422
- this.edit.getInternalEvents().emit(j.ClipLoadFailed, {
45447
+ this.edit.getInternalEvents().emit(Z.ClipLoadFailed, {
45423
45448
  trackIndex: r,
45424
45449
  clipIndex: n,
45425
45450
  error: u,
@@ -45462,6 +45487,16 @@ class nJ {
45462
45487
  sx.has(a) || (n[a] !== void 0 ? r[a] = n[a] : delete r[a]);
45463
45488
  t.reconfigureAfterRestore();
45464
45489
  }
45490
+ /**
45491
+ * Announce a player that couldn't show its asset. Its position is looked up now, not when the
45492
+ * load started, because clips can move while an asset is still loading.
45493
+ */
45494
+ reportLoadFailure(t, i) {
45495
+ const r = this.edit.findClipIndices(t);
45496
+ if (!r) return;
45497
+ const n = t.clipConfiguration.asset?.type ?? "unknown";
45498
+ this.edit.getInternalEvents().emit(Z.ClipLoadFailed, { ...r, error: i, assetType: n });
45499
+ }
45465
45500
  /**
45466
45501
  * Check if asset properties changed (excluding type, which is handled separately).
45467
45502
  */
@@ -45482,9 +45517,9 @@ class nJ {
45482
45517
  s = a !== o;
45483
45518
  }
45484
45519
  s && t.reloadAsset ? t.reloadAsset().then(() => {
45485
- t.reconfigureAfterRestore();
45520
+ t.reconfigureAfterRestore(), t.loadError && this.reportLoadFailure(t, t.loadError);
45486
45521
  }).catch((a) => {
45487
- console.error("Failed to reload asset:", a);
45522
+ console.error("Failed to reload asset:", a), this.reportLoadFailure(t, a instanceof Error ? a.message : String(a));
45488
45523
  }) : t.reconfigureAfterRestore();
45489
45524
  }
45490
45525
  /**
@@ -45868,9 +45903,9 @@ class Ys {
45868
45903
  ), this.playerReconciler = new nJ(this), this.assetGenerator = new iJ({
45869
45904
  getClipAsset: (n) => this.getResolvedClipById(n)?.asset,
45870
45905
  applyGeneratedSrc: (n, s) => this.applyGeneratedSrc(n, s),
45871
- emitStarted: (n) => this.internalEvents.emit(j.ClipGenerationStarted, { clipId: n }),
45872
- emitCompleted: (n) => this.internalEvents.emit(j.ClipGenerationCompleted, { clipId: n }),
45873
- emitFailed: (n, s) => this.internalEvents.emit(j.ClipGenerationFailed, { clipId: n, error: s }),
45906
+ emitStarted: (n) => this.internalEvents.emit(Z.ClipGenerationStarted, { clipId: n }),
45907
+ emitCompleted: (n) => this.internalEvents.emit(Z.ClipGenerationCompleted, { clipId: n }),
45908
+ emitFailed: (n, s) => this.internalEvents.emit(Z.ClipGenerationFailed, { clipId: n, error: s }),
45874
45909
  emitStatusChanged: (n) => this.internalEvents.emit(Et.GenerationStatusChanged, { clipId: n })
45875
45910
  }), this.mergeFieldService = new UX(this.internalEvents), this.outputSettings = new jX(this), this.selectionManager = new HX(this), this.timingManager = new KX(this), this.setupIntentListeners(), this.setupGenerationListeners();
45876
45911
  }
@@ -45901,7 +45936,7 @@ class Ys {
45901
45936
  this.lumaMaskController.initialize(), await this.playerReconciler.reconcileInitial(a), this.normalizeLumaAttachments();
45902
45937
  for (const [o, l] of n)
45903
45938
  l.size > 0 && this.document.setClipBindingsForClip(o, l);
45904
- await this.timingManager.resolveAllTiming(), this.updateTotalDuration(), s.timeline.soundtrack && await this.loadSoundtrack(s.timeline.soundtrack), this.internalEvents.emit(j.TimelineUpdated, { current: this.getEdit() }), this.emitEditChanged(t);
45939
+ await this.timingManager.resolveAllTiming(), this.updateTotalDuration(), s.timeline.soundtrack && await this.loadSoundtrack(s.timeline.soundtrack), this.internalEvents.emit(Z.TimelineUpdated, { current: this.getEdit() }), this.emitEditChanged(t);
45905
45940
  }
45906
45941
  /** @internal */
45907
45942
  getInternalEvents() {
@@ -45933,10 +45968,10 @@ class Ys {
45933
45968
  }), this.internalEvents.emit(Et.ViewportNeedsZoomToFit);
45934
45969
  }
45935
45970
  play() {
45936
- this.isPlaying = !0, this.playWallAnchorMs = performance.now(), this.playTimeAnchorSeconds = this.playbackTime, this.internalEvents.emit(j.PlaybackPlay);
45971
+ this.isPlaying = !0, this.playWallAnchorMs = performance.now(), this.playTimeAnchorSeconds = this.playbackTime, this.internalEvents.emit(Z.PlaybackPlay);
45937
45972
  }
45938
45973
  pause() {
45939
- this.isPlaying = !1, this.internalEvents.emit(j.PlaybackPause);
45974
+ this.isPlaying = !1, this.internalEvents.emit(Z.PlaybackPause);
45940
45975
  }
45941
45976
  seek(t) {
45942
45977
  this.playbackTime = Math.max(0, Math.min(t, this.totalDuration)), this.pause(), this.update(0, Ys.SEEK_ELAPSED_MARKER);
@@ -46278,12 +46313,15 @@ class Ys {
46278
46313
  * @internal
46279
46314
  */
46280
46315
  getClipError(t, i) {
46281
- const r = this.clipErrors.get(`${t}-${i}`);
46282
- if (r) return r;
46283
- const n = this.getResolvedClip(t, i)?.asset;
46284
- if (!n || !("src" in n) || typeof n.src != "string") return null;
46285
- const s = pa(n.src), a = this.getClipId(t, i), o = n.type === "video" && a ? `${a}:${s}` : s, l = this.assetLoader.loadTracker.registry[o];
46286
- return l?.status === "failed" ? { error: l.error ?? `Invalid source '${n.src}'.`, assetType: n.type } : null;
46316
+ const r = this.getPlayerClip(t, i);
46317
+ if (r?.loadError)
46318
+ return { error: r.loadError, assetType: r.clipConfiguration.asset?.type ?? "unknown" };
46319
+ const n = this.clipErrors.get(`${t}-${i}`);
46320
+ if (n) return n;
46321
+ const s = this.getResolvedClip(t, i)?.asset;
46322
+ if (!s || !("src" in s) || typeof s.src != "string") return null;
46323
+ const a = pa(s.src), o = this.getClipId(t, i), l = s.type === "video" && o ? `${o}:${a}` : a, u = this.assetLoader.loadTracker.registry[l];
46324
+ return u?.status === "failed" ? { error: u.error ?? `Invalid source '${s.src}'.`, assetType: s.type } : null;
46287
46325
  }
46288
46326
  /**
46289
46327
  * Clear the error for a deleted clip and shift indices for remaining errors.
@@ -46513,7 +46551,7 @@ class Ys {
46513
46551
  const t = this.commandHistory[this.commandIndex];
46514
46552
  if (!t.undo) return Kt("Command cannot be undone");
46515
46553
  const i = this.createCommandContext(), r = await Promise.resolve(t.undo(i));
46516
- return this.commandIndex -= 1, this.internalEvents.emit(j.EditUndo, { command: t.name }), this.emitEditChanged(`undo:${t.name}`), r;
46554
+ return this.commandIndex -= 1, this.internalEvents.emit(Z.EditUndo, { command: t.name }), this.emitEditChanged(`undo:${t.name}`), r;
46517
46555
  });
46518
46556
  }
46519
46557
  /**
@@ -46526,7 +46564,7 @@ class Ys {
46526
46564
  return this.commandQueue.enqueue(async () => {
46527
46565
  if (this.commandIndex >= this.commandHistory.length - 1) return Kt("Nothing to redo");
46528
46566
  const t = this.commandIndex + 1, i = this.commandHistory[t], r = this.createCommandContext(), n = await Promise.resolve(i.execute(r));
46529
- return this.commandIndex = t, this.internalEvents.emit(j.EditRedo, { command: i.name }), this.emitEditChanged(`redo:${i.name}`), n;
46567
+ return this.commandIndex = t, this.internalEvents.emit(Z.EditRedo, { command: i.name }), this.emitEditChanged(`redo:${i.name}`), n;
46530
46568
  });
46531
46569
  }
46532
46570
  /** True when there is a command to undo (the history pointer is not before the first command). */
@@ -46676,7 +46714,7 @@ class Ys {
46676
46714
  * @internal
46677
46715
  */
46678
46716
  emitEditChanged(t) {
46679
- this.isBatchingEvents || this.internalEvents.emit(j.EditChanged, { source: t, timestamp: Date.now() });
46717
+ this.isBatchingEvents || this.internalEvents.emit(Z.EditChanged, { source: t, timestamp: Date.now() });
46680
46718
  }
46681
46719
  /**
46682
46720
  * Detects merge field placeholders in the raw edit before substitution.
@@ -46829,9 +46867,15 @@ class Ys {
46829
46867
  const s = this.document.getClipId(t, r);
46830
46868
  s && (i.clipId = s, this.playerByClipId.set(s, i));
46831
46869
  }
46832
- this.addPlayerToContainer(t, i), i.load().catch((n) => {
46870
+ this.addPlayerToContainer(t, i), i.load().then(() => {
46871
+ if (!i.loadError) return;
46872
+ const n = this.findClipIndices(i);
46873
+ if (!n) return;
46874
+ const s = i.clipConfiguration?.asset?.type ?? "unknown";
46875
+ this.internalEvents.emit(Z.ClipLoadFailed, { ...n, error: i.loadError, assetType: s });
46876
+ }).catch((n) => {
46833
46877
  const s = i.clipConfiguration?.asset?.type ?? "unknown", a = n instanceof Error ? n.message : String(n);
46834
- this.clipErrors.set(`${t}-${r}`, { error: a, assetType: s }), this.internalEvents.emit(j.ClipLoadFailed, {
46878
+ this.clipErrors.set(`${t}-${r}`, { error: a, assetType: s }), this.internalEvents.emit(Z.ClipLoadFailed, {
46835
46879
  trackIndex: t,
46836
46880
  clipIndex: r,
46837
46881
  error: a,
@@ -47031,7 +47075,7 @@ class Ys {
47031
47075
  for (const n of r)
47032
47076
  t = Math.max(t, n.getEnd());
47033
47077
  const i = this.totalDuration;
47034
- this.totalDuration = t, i !== this.totalDuration && this.internalEvents.emit(j.DurationChanged, { duration: this.totalDuration });
47078
+ this.totalDuration = t, i !== this.totalDuration && this.internalEvents.emit(Z.DurationChanged, { duration: this.totalDuration });
47035
47079
  }
47036
47080
  /** @internal */
47037
47081
  propagateTimingChanges(t, i) {
@@ -47359,7 +47403,7 @@ class Ys {
47359
47403
  width: this.size.width,
47360
47404
  height: this.size.height,
47361
47405
  backgroundColor: this.backgroundColor
47362
- }), this.internalEvents.emit(j.TimelineBackgroundChanged, { color: t });
47406
+ }), this.internalEvents.emit(Z.TimelineBackgroundChanged, { color: t });
47363
47407
  }
47364
47408
  getTimelineBackground() {
47365
47409
  return this.backgroundColor;
@@ -47499,11 +47543,11 @@ class Ys {
47499
47543
  static DoubleClickThresholdMs = 500;
47500
47544
  // ─── Event Listeners ─────────────────────────────────────────────────────────
47501
47545
  static GenerationConfigTriggers = [
47502
- j.ClipSelected,
47503
- j.SelectionCleared,
47504
- j.EditChanged,
47505
- j.MergeFieldChanged,
47506
- j.TimelineUpdated
47546
+ Z.ClipSelected,
47547
+ Z.SelectionCleared,
47548
+ Z.EditChanged,
47549
+ Z.MergeFieldChanged,
47550
+ Z.TimelineUpdated
47507
47551
  ];
47508
47552
  setupGenerationListeners() {
47509
47553
  this.internalEvents.on(Et.Resolved, this.onResolvedForGeneration);
@@ -63498,7 +63542,7 @@ class OI {
63498
63542
  }
63499
63543
  async undo(t) {
63500
63544
  if (!t) throw new Error("CreateTrackAndMoveClipCommand.undo: context is required");
63501
- return this.wasExecuted ? (await this.moveClipCommand.undo(t), this.addTrackCommand.undo(t), this.wasExecuted = !1, t.emitEvent(j.TrackRemoved, {
63545
+ return this.wasExecuted ? (await this.moveClipCommand.undo(t), this.addTrackCommand.undo(t), this.wasExecuted = !1, t.emitEvent(Z.TrackRemoved, {
63502
63546
  trackIndex: this.insertionIndex
63503
63547
  }), Xt()) : Kt("Command was not executed");
63504
63548
  }
@@ -63527,7 +63571,7 @@ class RI {
63527
63571
  t.documentUpdateClip(this.trackIndex, this.clipIndex, { asset: a }), t.resolve();
63528
63572
  const o = t.getDocumentClip(this.trackIndex, this.clipIndex);
63529
63573
  if (!o) throw new Error(`TransformClipAssetCommand: document clip not found after mutation at ${this.trackIndex}/${this.clipIndex}`);
63530
- return t.emitEvent(j.ClipUpdated, {
63574
+ return t.emitEvent(Z.ClipUpdated, {
63531
63575
  previous: { trackIndex: this.trackIndex, clipIndex: this.clipIndex, clip: ke(n) },
63532
63576
  current: { trackIndex: this.trackIndex, clipIndex: this.clipIndex, clip: ke(o) }
63533
63577
  }), Xt();
@@ -63539,7 +63583,7 @@ class RI {
63539
63583
  const r = t.getDocumentClip(this.trackIndex, this.clipIndex);
63540
63584
  if (!i || !r)
63541
63585
  throw new Error(`TransformClipAssetCommand: document clip not found after undo at ${this.trackIndex}/${this.clipIndex}`);
63542
- return t.emitEvent(j.ClipUpdated, {
63586
+ return t.emitEvent(Z.ClipUpdated, {
63543
63587
  previous: { trackIndex: this.trackIndex, clipIndex: this.clipIndex, clip: ke(i) },
63544
63588
  current: { trackIndex: this.trackIndex, clipIndex: this.clipIndex, clip: ke(r) }
63545
63589
  }), Xt();
@@ -63568,7 +63612,7 @@ class VI {
63568
63612
  const r = structuredClone(t.getDocumentClip(this.lumaTrackIndex, this.lumaClipIndex)), n = t.getEditSession();
63569
63613
  this.storedContentClipId = n.getLumaContentRelationship(i.clipId) ?? null, n.clearLumaContentRelationship(i.clipId), this.transformCommand.execute(t), t.resolve();
63570
63614
  const s = t.getDocumentClip(this.lumaTrackIndex, this.lumaClipIndex);
63571
- return r && s && t.emitEvent(j.ClipUpdated, {
63615
+ return r && s && t.emitEvent(Z.ClipUpdated, {
63572
63616
  previous: {
63573
63617
  trackIndex: this.lumaTrackIndex,
63574
63618
  clipIndex: this.lumaClipIndex,
@@ -63591,7 +63635,7 @@ class VI {
63591
63635
  }
63592
63636
  t.resolve();
63593
63637
  const r = t.getDocumentClip(this.lumaTrackIndex, this.lumaClipIndex);
63594
- return i && r && t.emitEvent(j.ClipUpdated, {
63638
+ return i && r && t.emitEvent(Z.ClipUpdated, {
63595
63639
  previous: {
63596
63640
  trackIndex: this.lumaTrackIndex,
63597
63641
  clipIndex: this.lumaClipIndex,
@@ -63774,7 +63818,7 @@ class Ca {
63774
63818
  * Subscribe to clip-inventory events exactly once per toolbar instance.
63775
63819
  */
63776
63820
  ensureClipCountSubscription() {
63777
- this.clipCountListener || (this.clipCountListener = () => this.refreshDeleteState(), this.edit.events.on(j.ClipAdded, this.clipCountListener), this.edit.events.on(j.ClipDeleted, this.clipCountListener), this.edit.events.on(j.ClipRestored, this.clipCountListener));
63821
+ this.clipCountListener || (this.clipCountListener = () => this.refreshDeleteState(), this.edit.events.on(Z.ClipAdded, this.clipCountListener), this.edit.events.on(Z.ClipDeleted, this.clipCountListener), this.edit.events.on(Z.ClipRestored, this.clipCountListener));
63778
63822
  }
63779
63823
  /**
63780
63824
  * Sync the trash button's disabled state with whether the selected clip is
@@ -63820,7 +63864,7 @@ class Ca {
63820
63864
  * Subclasses should call super.dispose() and then null their own references.
63821
63865
  */
63822
63866
  dispose() {
63823
- this.dragResult?.dispose(), this.dragResult = null, this.clickOutsideHandler && (document.removeEventListener("click", this.clickOutsideHandler), this.clickOutsideHandler = null), this.clipCountListener && (this.edit.events.off(j.ClipAdded, this.clipCountListener), this.edit.events.off(j.ClipDeleted, this.clipCountListener), this.edit.events.off(j.ClipRestored, this.clipCountListener), this.clipCountListener = null), this.deleteBtn = null, this.container?.remove(), this.container = null;
63867
+ this.dragResult?.dispose(), this.dragResult = null, this.clickOutsideHandler && (document.removeEventListener("click", this.clickOutsideHandler), this.clickOutsideHandler = null), this.clipCountListener && (this.edit.events.off(Z.ClipAdded, this.clipCountListener), this.edit.events.off(Z.ClipDeleted, this.clipCountListener), this.edit.events.off(Z.ClipRestored, this.clipCountListener), this.clipCountListener = null), this.deleteBtn = null, this.container?.remove(), this.container = null;
63824
63868
  }
63825
63869
  /**
63826
63870
  * Check if a popup is currently visible (handles both CSS class and inline style patterns).
@@ -64653,7 +64697,7 @@ class nrt {
64653
64697
  length: i.getLength()
64654
64698
  }), t.resolve();
64655
64699
  const o = t.getDocumentClip(this.lumaTrackIndex, this.lumaClipIndex);
64656
- return n && o && t.emitEvent(j.ClipUpdated, {
64700
+ return n && o && t.emitEvent(Z.ClipUpdated, {
64657
64701
  previous: {
64658
64702
  trackIndex: this.lumaTrackIndex,
64659
64703
  clipIndex: this.lumaClipIndex,
@@ -64682,7 +64726,7 @@ class nrt {
64682
64726
  }
64683
64727
  this.transformCommand.undo(t), t.resolve();
64684
64728
  const r = t.getDocumentClip(this.lumaTrackIndex, this.lumaClipIndex);
64685
- return i && r && t.emitEvent(j.ClipUpdated, {
64729
+ return i && r && t.emitEvent(Z.ClipUpdated, {
64686
64730
  previous: {
64687
64731
  trackIndex: this.lumaTrackIndex,
64688
64732
  clipIndex: this.lumaClipIndex,
@@ -64808,7 +64852,7 @@ class Bd {
64808
64852
  i.updateClip(this.trackIndex, this.clipIndex, { length: this.newLength }), this.clipId ? t.resolveClip(this.clipId) : t.resolve(), t.updateDuration();
64809
64853
  const o = t.getDocumentClip(this.trackIndex, this.clipIndex);
64810
64854
  if (!o) throw new Error(`ResizeClipCommand: document clip not found after mutation at ${this.trackIndex}/${this.clipIndex}`);
64811
- return t.emitEvent(j.ClipUpdated, {
64855
+ return t.emitEvent(Z.ClipUpdated, {
64812
64856
  previous: { clip: ke(a), trackIndex: this.trackIndex, clipIndex: this.clipIndex },
64813
64857
  current: { clip: ke(o), trackIndex: this.trackIndex, clipIndex: this.clipIndex }
64814
64858
  }), t.propagateTimingChanges(this.trackIndex, this.clipIndex), Xt();
@@ -64824,7 +64868,7 @@ class Bd {
64824
64868
  const s = t.getDocumentClip(this.trackIndex, this.clipIndex);
64825
64869
  if (!n || !s)
64826
64870
  throw new Error(`ResizeClipCommand: document clip not found after undo at ${this.trackIndex}/${this.clipIndex}`);
64827
- return t.emitEvent(j.ClipUpdated, {
64871
+ return t.emitEvent(Z.ClipUpdated, {
64828
64872
  previous: { clip: ke(n), trackIndex: this.trackIndex, clipIndex: this.clipIndex },
64829
64873
  current: { clip: ke(s), trackIndex: this.trackIndex, clipIndex: this.clipIndex }
64830
64874
  }), t.propagateTimingChanges(this.trackIndex, this.clipIndex), Xt();
@@ -65690,7 +65734,7 @@ class Srt {
65690
65734
  pixelsPerSecond: i.pixelsPerSecond ?? 50,
65691
65735
  width: i.width ?? 800,
65692
65736
  height: i.height ?? 400
65693
- }, this.edit.getInternalEvents().on(Et.Resolved, this.invalidateCache), this.edit.events.on(j.ClipUpdated, this.invalidateCache), this.edit.events.on(j.TimelineUpdated, this.invalidateCache), this.edit.events.on(j.ClipGenerationStarted, this.invalidateCache), this.edit.events.on(j.ClipGenerationCompleted, this.invalidateCache), this.edit.events.on(j.ClipGenerationFailed, this.invalidateCache), this.edit.events.on(j.ClipSelected, this.invalidateCache), this.edit.events.on(j.SelectionCleared, this.invalidateCache), this.edit.getInternalEvents().on(Et.ClipFocused, this.onClipFocused), this.edit.getInternalEvents().on(Et.ClipBlurred, this.onClipBlurred);
65737
+ }, this.edit.getInternalEvents().on(Et.Resolved, this.invalidateCache), this.edit.events.on(Z.ClipUpdated, this.invalidateCache), this.edit.events.on(Z.TimelineUpdated, this.invalidateCache), this.edit.events.on(Z.ClipGenerationStarted, this.invalidateCache), this.edit.events.on(Z.ClipGenerationCompleted, this.invalidateCache), this.edit.events.on(Z.ClipGenerationFailed, this.invalidateCache), this.edit.events.on(Z.ClipSelected, this.invalidateCache), this.edit.events.on(Z.SelectionCleared, this.invalidateCache), this.edit.getInternalEvents().on(Et.ClipFocused, this.onClipFocused), this.edit.getInternalEvents().on(Et.ClipBlurred, this.onClipBlurred);
65694
65738
  }
65695
65739
  viewport;
65696
65740
  interactionQuery = null;
@@ -65816,7 +65860,7 @@ class Srt {
65816
65860
  this.lumaEditingVisibleByClipId.delete(t);
65817
65861
  }
65818
65862
  dispose() {
65819
- this.edit.getInternalEvents().off(Et.Resolved, this.invalidateCache), this.edit.events.off(j.ClipUpdated, this.invalidateCache), this.edit.events.off(j.TimelineUpdated, this.invalidateCache), this.edit.events.off(j.ClipGenerationStarted, this.invalidateCache), this.edit.events.off(j.ClipGenerationCompleted, this.invalidateCache), this.edit.events.off(j.ClipGenerationFailed, this.invalidateCache), this.edit.events.off(j.ClipSelected, this.invalidateCache), this.edit.events.off(j.SelectionCleared, this.invalidateCache), this.edit.getInternalEvents().off(Et.ClipFocused, this.onClipFocused), this.edit.getInternalEvents().off(Et.ClipBlurred, this.onClipBlurred), this.cachedTracks = null, this.interactionQuery = null, this.lumaEditingVisibleByClipId.clear();
65863
+ this.edit.getInternalEvents().off(Et.Resolved, this.invalidateCache), this.edit.events.off(Z.ClipUpdated, this.invalidateCache), this.edit.events.off(Z.TimelineUpdated, this.invalidateCache), this.edit.events.off(Z.ClipGenerationStarted, this.invalidateCache), this.edit.events.off(Z.ClipGenerationCompleted, this.invalidateCache), this.edit.events.off(Z.ClipGenerationFailed, this.invalidateCache), this.edit.events.off(Z.ClipSelected, this.invalidateCache), this.edit.events.off(Z.SelectionCleared, this.invalidateCache), this.edit.getInternalEvents().off(Et.ClipFocused, this.onClipFocused), this.edit.getInternalEvents().off(Et.ClipBlurred, this.onClipBlurred), this.cachedTracks = null, this.interactionQuery = null, this.lumaEditingVisibleByClipId.clear();
65820
65864
  }
65821
65865
  // ========== Private ==========
65822
65866
  getComputedVisualState(t, i, r) {
@@ -65932,12 +65976,12 @@ class Bst {
65932
65976
  return t;
65933
65977
  }
65934
65978
  setupEventListeners() {
65935
- this.edit.events.on(j.TimelineUpdated, this.handleTimelineUpdated), this.edit.events.on(j.ClipAdded, this.handleTimelineUpdated), this.edit.events.on(j.ClipDeleted, this.handleTimelineUpdated), this.edit.events.on(j.ClipRestored, this.handleTimelineUpdated), this.edit.events.on(j.TrackAdded, this.handleTimelineUpdated), this.edit.events.on(j.TrackRemoved, this.handleTimelineUpdated), this.edit.events.on(j.PlaybackPlay, this.handlePlaybackPlay), this.edit.events.on(j.PlaybackPause, this.handlePlaybackPause), this.edit.events.on(j.ClipSelected, this.handleClipSelected), this.edit.events.on(j.ClipUpdated, this.handleClipUpdated), this.edit.events.on(j.ClipLoadFailed, this.handleClipLoadFailed), this.edit.assetLoader.loadTracker.on("onAssetLoadInfoUpdated", this.handleClipLoadFailed), this.edit.events.on(j.ClipGenerationStarted, this.handleClipGeneration), this.edit.events.on(j.ClipGenerationCompleted, this.handleClipGeneration), this.edit.events.on(j.ClipGenerationFailed, this.handleClipGeneration);
65979
+ this.edit.events.on(Z.TimelineUpdated, this.handleTimelineUpdated), this.edit.events.on(Z.ClipAdded, this.handleTimelineUpdated), this.edit.events.on(Z.ClipDeleted, this.handleTimelineUpdated), this.edit.events.on(Z.ClipRestored, this.handleTimelineUpdated), this.edit.events.on(Z.TrackAdded, this.handleTimelineUpdated), this.edit.events.on(Z.TrackRemoved, this.handleTimelineUpdated), this.edit.events.on(Z.PlaybackPlay, this.handlePlaybackPlay), this.edit.events.on(Z.PlaybackPause, this.handlePlaybackPause), this.edit.events.on(Z.ClipSelected, this.handleClipSelected), this.edit.events.on(Z.ClipUpdated, this.handleClipUpdated), this.edit.events.on(Z.ClipLoadFailed, this.handleClipLoadFailed), this.edit.assetLoader.loadTracker.on("onAssetLoadInfoUpdated", this.handleClipLoadFailed), this.edit.events.on(Z.ClipGenerationStarted, this.handleClipGeneration), this.edit.events.on(Z.ClipGenerationCompleted, this.handleClipGeneration), this.edit.events.on(Z.ClipGenerationFailed, this.handleClipGeneration);
65936
65980
  const t = this.edit.getInternalEvents();
65937
65981
  t.on(Et.ClipFocused, this.handleClipFocusChanged), t.on(Et.ClipBlurred, this.handleClipFocusChanged);
65938
65982
  }
65939
65983
  removeEventListeners() {
65940
- this.edit.events.off(j.TimelineUpdated, this.handleTimelineUpdated), this.edit.events.off(j.ClipAdded, this.handleTimelineUpdated), this.edit.events.off(j.ClipDeleted, this.handleTimelineUpdated), this.edit.events.off(j.ClipRestored, this.handleTimelineUpdated), this.edit.events.off(j.TrackAdded, this.handleTimelineUpdated), this.edit.events.off(j.TrackRemoved, this.handleTimelineUpdated), this.edit.events.off(j.PlaybackPlay, this.handlePlaybackPlay), this.edit.events.off(j.PlaybackPause, this.handlePlaybackPause), this.edit.events.off(j.ClipSelected, this.handleClipSelected), this.edit.events.off(j.ClipUpdated, this.handleClipUpdated), this.edit.events.off(j.ClipLoadFailed, this.handleClipLoadFailed), this.edit.assetLoader.loadTracker.off("onAssetLoadInfoUpdated", this.handleClipLoadFailed), this.edit.events.off(j.ClipGenerationStarted, this.handleClipGeneration), this.edit.events.off(j.ClipGenerationCompleted, this.handleClipGeneration), this.edit.events.off(j.ClipGenerationFailed, this.handleClipGeneration);
65984
+ this.edit.events.off(Z.TimelineUpdated, this.handleTimelineUpdated), this.edit.events.off(Z.ClipAdded, this.handleTimelineUpdated), this.edit.events.off(Z.ClipDeleted, this.handleTimelineUpdated), this.edit.events.off(Z.ClipRestored, this.handleTimelineUpdated), this.edit.events.off(Z.TrackAdded, this.handleTimelineUpdated), this.edit.events.off(Z.TrackRemoved, this.handleTimelineUpdated), this.edit.events.off(Z.PlaybackPlay, this.handlePlaybackPlay), this.edit.events.off(Z.PlaybackPause, this.handlePlaybackPause), this.edit.events.off(Z.ClipSelected, this.handleClipSelected), this.edit.events.off(Z.ClipUpdated, this.handleClipUpdated), this.edit.events.off(Z.ClipLoadFailed, this.handleClipLoadFailed), this.edit.assetLoader.loadTracker.off("onAssetLoadInfoUpdated", this.handleClipLoadFailed), this.edit.events.off(Z.ClipGenerationStarted, this.handleClipGeneration), this.edit.events.off(Z.ClipGenerationCompleted, this.handleClipGeneration), this.edit.events.off(Z.ClipGenerationFailed, this.handleClipGeneration);
65941
65985
  const t = this.edit.getInternalEvents();
65942
65986
  t.off(Et.ClipFocused, this.handleClipFocusChanged), t.off(Et.ClipBlurred, this.handleClipFocusChanged);
65943
65987
  }
@@ -65973,7 +66017,7 @@ class Bst {
65973
66017
  container: this.container,
65974
66018
  onResize: () => this.resize(),
65975
66019
  onResizeEnd: (i) => {
65976
- this.edit.getInternalEvents().emit(j.TimelineResized, { height: i });
66020
+ this.edit.getInternalEvents().emit(Z.TimelineResized, { height: i });
65977
66021
  }
65978
66022
  }), this.element.appendChild(this.resizeHandle.element));
65979
66023
  const t = this.stateManager.getViewport();
@@ -66123,12 +66167,12 @@ class m2 {
66123
66167
  this.updateDocumentClip(t, r, !0);
66124
66168
  } else
66125
66169
  this.updateDocumentClip(t, this.storedNewValue, !1);
66126
- return t.resolve(), t.emitEvent(j.MergeFieldChanged, { fields: i.getAll() }), Xt();
66170
+ return t.resolve(), t.emitEvent(Z.MergeFieldChanged, { fields: i.getAll() }), Xt();
66127
66171
  }
66128
66172
  async undo(t) {
66129
66173
  if (!t) throw new Error("SetMergeFieldCommand.undo: context is required");
66130
66174
  const i = t.getMergeFields();
66131
- return this.storedPreviousBinding ? t.setClipBinding(this.clipId, this.propertyPath, this.storedPreviousBinding) : t.removeClipBinding(this.clipId, this.propertyPath), this.previousFieldName && i.register({ name: this.previousFieldName, defaultValue: this.storedPreviousValue }, { silent: !0 }), this.storedPreviousBinding ? this.updateDocumentClip(t, this.storedPreviousBinding.placeholder, !0) : this.updateDocumentClip(t, this.storedPreviousValue, !1), t.resolve(), t.emitEvent(j.MergeFieldChanged, { fields: i.getAll() }), Xt();
66175
+ return this.storedPreviousBinding ? t.setClipBinding(this.clipId, this.propertyPath, this.storedPreviousBinding) : t.removeClipBinding(this.clipId, this.propertyPath), this.previousFieldName && i.register({ name: this.previousFieldName, defaultValue: this.storedPreviousValue }, { silent: !0 }), this.storedPreviousBinding ? this.updateDocumentClip(t, this.storedPreviousBinding.placeholder, !0) : this.updateDocumentClip(t, this.storedPreviousValue, !1), t.resolve(), t.emitEvent(Z.MergeFieldChanged, { fields: i.getAll() }), Xt();
66132
66176
  }
66133
66177
  dispose() {
66134
66178
  this.storedPreviousBinding = void 0;
@@ -66208,7 +66252,7 @@ class Irt extends Ys {
66208
66252
  this.mergeFieldService.register({ ...r, defaultValue: i }, { silent: !0 });
66209
66253
  for (const [, n] of this.getPlayerMap())
66210
66254
  this.updateMergeFieldBindings(n, t, i);
66211
- this.resolve(), this.getInternalEvents().emit(j.TimelineUpdated, { current: this.getEdit() });
66255
+ this.resolve(), this.getInternalEvents().emit(Z.TimelineUpdated, { current: this.getEdit() });
66212
66256
  } finally {
66213
66257
  this.isUpdatingMergeFields = !1;
66214
66258
  }
@@ -66311,7 +66355,7 @@ class Irt extends Ys {
66311
66355
  const o = this.getTemplateClipById(a);
66312
66356
  o && await this.restoreMergeFieldInClip(a, o, r, n);
66313
66357
  }
66314
- this.mergeFieldService.remove(t) || this.getInternalEvents().emit(j.MergeFieldChanged, { fields: this.mergeFieldService.getAll() });
66358
+ this.mergeFieldService.remove(t) || this.getInternalEvents().emit(Z.MergeFieldChanged, { fields: this.mergeFieldService.getAll() });
66315
66359
  }
66316
66360
  // ─── Text Conversion API ───────────────────────────────────────────────────
66317
66361
  /**
@@ -67403,9 +67447,9 @@ class Rrt extends Ca {
67403
67447
  setupEventListeners() {
67404
67448
  this.editChangedListener = () => {
67405
67449
  this.selectedTrackIdx >= 0 && this.selectedClipIdx >= 0 && this.syncState();
67406
- }, this.edit.events.on(j.EditChanged, this.editChangedListener), this.mergeFieldChangedListener = () => {
67450
+ }, this.edit.events.on(Z.EditChanged, this.editChangedListener), this.mergeFieldChangedListener = () => {
67407
67451
  this.selectedTrackIdx >= 0 && this.selectedClipIdx >= 0 && this.syncState();
67408
- }, this.edit.events.on(j.MergeFieldChanged, this.mergeFieldChangedListener);
67452
+ }, this.edit.events.on(Z.MergeFieldChanged, this.mergeFieldChangedListener);
67409
67453
  }
67410
67454
  mountComponents() {
67411
67455
  const t = this.container?.querySelector("[data-start-mount]");
@@ -67486,7 +67530,7 @@ class Rrt extends Ca {
67486
67530
  return [];
67487
67531
  }
67488
67532
  dispose() {
67489
- this.editChangedListener && (this.edit.events.off(j.EditChanged, this.editChangedListener), this.editChangedListener = null), this.mergeFieldChangedListener && (this.edit.events.off(j.MergeFieldChanged, this.mergeFieldChangedListener), this.mergeFieldChangedListener = null), this.startMergeLabel?.dispose(), this.lengthMergeLabel?.dispose(), this.startControl?.dispose(), this.lengthControl?.dispose(), super.dispose(), this.startMergeLabel = null, this.lengthMergeLabel = null, this.startControl = null, this.lengthControl = null;
67533
+ this.editChangedListener && (this.edit.events.off(Z.EditChanged, this.editChangedListener), this.editChangedListener = null), this.mergeFieldChangedListener && (this.edit.events.off(Z.MergeFieldChanged, this.mergeFieldChangedListener), this.mergeFieldChangedListener = null), this.startMergeLabel?.dispose(), this.lengthMergeLabel?.dispose(), this.startControl?.dispose(), this.lengthControl?.dispose(), super.dispose(), this.startMergeLabel = null, this.lengthMergeLabel = null, this.startControl = null, this.lengthControl = null;
67490
67534
  }
67491
67535
  }
67492
67536
  const Vrt = 300, Lrt = {
@@ -67600,9 +67644,9 @@ class Urt extends Ca {
67600
67644
  subscribeToEditState() {
67601
67645
  if (this.generationUnsubscribers.length > 0) return;
67602
67646
  const t = this.edit.getInternalEvents(), i = [
67603
- j.ClipGenerationStarted,
67604
- j.ClipGenerationCompleted,
67605
- j.ClipGenerationFailed,
67647
+ Z.ClipGenerationStarted,
67648
+ Z.ClipGenerationCompleted,
67649
+ Z.ClipGenerationFailed,
67606
67650
  Et.GenerationStatusChanged
67607
67651
  ];
67608
67652
  for (const s of i) {
@@ -67614,7 +67658,7 @@ class Urt extends Ca {
67614
67658
  const r = () => this.syncState();
67615
67659
  t.on(Et.AssetGeneratorChanged, r), this.generationUnsubscribers.push(() => t.off(Et.AssetGeneratorChanged, r));
67616
67660
  const n = () => this.syncState();
67617
- this.edit.events.on(j.EditChanged, n), this.generationUnsubscribers.push(() => this.edit.events.off(j.EditChanged, n));
67661
+ this.edit.events.on(Z.EditChanged, n), this.generationUnsubscribers.push(() => this.edit.events.off(Z.EditChanged, n));
67618
67662
  }
67619
67663
  schedulePromptCommit() {
67620
67664
  this.promptDebounceTimer && clearTimeout(this.promptDebounceTimer), this.promptDebounceTimer = setTimeout(() => this.commitPrompt(), Vrt);
@@ -68803,7 +68847,7 @@ class ps extends Ca {
68803
68847
  </div>
68804
68848
  </div>
68805
68849
  ` : ""}
68806
- `, t.insertBefore(this.container, t.firstChild), this.fitBtn = this.container.querySelector('[data-action="fit"]'), this.opacityBtn = this.container.querySelector('[data-action="opacity"]'), this.scaleBtn = this.container.querySelector('[data-action="scale"]'), this.volumeBtn = this.container.querySelector('[data-action="volume"]'), this.transitionBtn = this.container.querySelector('[data-action="transition"]'), this.effectBtn = this.container.querySelector('[data-action="effect"]'), this.advancedBtn = this.container.querySelector('[data-action="advanced"]'), this.audioFadeBtn = this.container.querySelector('[data-action="audio-fade"]'), this.speedBtn = this.container.querySelector('[data-action="speed"]'), this.fitPopup = this.container.querySelector('[data-popup="fit"]'), this.opacityPopup = this.container.querySelector('[data-popup="opacity"]'), this.scalePopup = this.container.querySelector('[data-popup="scale"]'), this.volumePopup = this.container.querySelector('[data-popup="volume"]'), this.transitionPopup = this.container.querySelector('[data-popup="transition"]'), this.effectPopup = this.container.querySelector('[data-popup="effect"]'), this.advancedPopup = this.container.querySelector('[data-popup="advanced"]'), this.audioFadePopup = this.container.querySelector('[data-popup="audio-fade"]'), this.speedPopup = this.container.querySelector('[data-popup="speed"]'), this.fitLabel = this.container.querySelector("[data-fit-label]"), this.volumeValue = this.container.querySelector("[data-volume-value]"), this.volumeSlider = this.container.querySelector("[data-volume-slider]"), this.volumeDisplayInput = this.container.querySelector("[data-volume-display]"), this.volumeSection = this.container.querySelector("[data-volume-section]"), this.visualSection = this.container.querySelector("[data-visual-section]"), this.audioSection = this.container.querySelector("[data-audio-section]"), this.speedSection = this.container.querySelector("[data-speed-section]"), this.speedSlider = this.container.querySelector("[data-speed-slider]"), this.speedValue = this.container.querySelector("[data-speed-value]"), this.speedDisplayInput = this.container.querySelector("[data-speed-display]"), this.dynamicToggle = this.container.querySelector("[data-dynamic-toggle]"), this.dynamicPanel = this.container.querySelector("[data-dynamic-panel]"), this.dynamicInput = this.container.querySelector("[data-dynamic-input]"), this.mountCompositeComponents(), this.showMergeFields && (this.mergeFieldManager = new jI(this, ps.MEDIA_PROPERTY_DEFAULTS), this.mergeFieldManager.init(), this.unsubMergeFieldChanged = this.edit.getInternalEvents().on(j.MergeFieldChanged, () => {
68850
+ `, t.insertBefore(this.container, t.firstChild), this.fitBtn = this.container.querySelector('[data-action="fit"]'), this.opacityBtn = this.container.querySelector('[data-action="opacity"]'), this.scaleBtn = this.container.querySelector('[data-action="scale"]'), this.volumeBtn = this.container.querySelector('[data-action="volume"]'), this.transitionBtn = this.container.querySelector('[data-action="transition"]'), this.effectBtn = this.container.querySelector('[data-action="effect"]'), this.advancedBtn = this.container.querySelector('[data-action="advanced"]'), this.audioFadeBtn = this.container.querySelector('[data-action="audio-fade"]'), this.speedBtn = this.container.querySelector('[data-action="speed"]'), this.fitPopup = this.container.querySelector('[data-popup="fit"]'), this.opacityPopup = this.container.querySelector('[data-popup="opacity"]'), this.scalePopup = this.container.querySelector('[data-popup="scale"]'), this.volumePopup = this.container.querySelector('[data-popup="volume"]'), this.transitionPopup = this.container.querySelector('[data-popup="transition"]'), this.effectPopup = this.container.querySelector('[data-popup="effect"]'), this.advancedPopup = this.container.querySelector('[data-popup="advanced"]'), this.audioFadePopup = this.container.querySelector('[data-popup="audio-fade"]'), this.speedPopup = this.container.querySelector('[data-popup="speed"]'), this.fitLabel = this.container.querySelector("[data-fit-label]"), this.volumeValue = this.container.querySelector("[data-volume-value]"), this.volumeSlider = this.container.querySelector("[data-volume-slider]"), this.volumeDisplayInput = this.container.querySelector("[data-volume-display]"), this.volumeSection = this.container.querySelector("[data-volume-section]"), this.visualSection = this.container.querySelector("[data-visual-section]"), this.audioSection = this.container.querySelector("[data-audio-section]"), this.speedSection = this.container.querySelector("[data-speed-section]"), this.speedSlider = this.container.querySelector("[data-speed-slider]"), this.speedValue = this.container.querySelector("[data-speed-value]"), this.speedDisplayInput = this.container.querySelector("[data-speed-display]"), this.dynamicToggle = this.container.querySelector("[data-dynamic-toggle]"), this.dynamicPanel = this.container.querySelector("[data-dynamic-panel]"), this.dynamicInput = this.container.querySelector("[data-dynamic-input]"), this.mountCompositeComponents(), this.showMergeFields && (this.mergeFieldManager = new jI(this, ps.MEDIA_PROPERTY_DEFAULTS), this.mergeFieldManager.init(), this.unsubMergeFieldChanged = this.edit.getInternalEvents().on(Z.MergeFieldChanged, () => {
68807
68851
  this.container?.style.display !== "none" && this.mergeFieldManager?.hasLabels && this.syncState();
68808
68852
  })), this.setupEventListeners(), this.setupOutsideClickHandler(), this.enableDrag(), this.appendDeleteButton();
68809
68853
  }
@@ -68972,9 +69016,9 @@ class ps extends Ca {
68972
69016
  },
68973
69017
  { signal: t }
68974
69018
  );
68975
- }), this.playbackPauseListener || (this.playbackPauseListener = () => this.syncIfVisible(), this.edit.events.on(j.PlaybackPause, this.playbackPauseListener)), this.editChangedListener || (this.editChangedListener = (i) => {
69019
+ }), this.playbackPauseListener || (this.playbackPauseListener = () => this.syncIfVisible(), this.edit.events.on(Z.PlaybackPause, this.playbackPauseListener)), this.editChangedListener || (this.editChangedListener = (i) => {
68976
69020
  i.source.startsWith("load") && this.pendingOpacityTimes.clear(), this.syncIfVisible();
68977
- }, this.edit.events.on(j.EditChanged, this.editChangedListener));
69021
+ }, this.edit.events.on(Z.EditChanged, this.editChangedListener));
68978
69022
  }
68979
69023
  syncIfVisible() {
68980
69024
  this.container?.style.display !== "none" && (this.selectedTrackIdx < 0 || this.dragManager.isDragging("opacity") || this.syncState());
@@ -69437,7 +69481,7 @@ class ps extends Ca {
69437
69481
  this.assetType = r?.asset?.type ?? "image", this.pendingOpacityTimes.clear(), super.show(t, i);
69438
69482
  }
69439
69483
  dispose() {
69440
- this.abortController?.abort(), this.abortController = null, this.dragManager.clear(), this.playbackPauseListener && (this.edit.events.off(j.PlaybackPause, this.playbackPauseListener), this.playbackPauseListener = null), this.editChangedListener && (this.edit.events.off(j.EditChanged, this.editChangedListener), this.editChangedListener = null), this.pendingOpacityTimes.clear(), this.opacityDragTime = null, this.transitionPanel?.dispose(), this.effectPanel?.dispose(), this.opacitySlider?.dispose(), this.scaleSlider?.dispose(), this.unsubMergeFieldChanged?.(), this.unsubMergeFieldChanged = null, this.mergeFieldManager?.dispose(), this.mergeFieldManager = null, super.dispose(), this.transitionPanel = null, this.effectPanel = null, this.opacitySlider = null, this.scaleSlider = null, this.fitBtn = null, this.opacityBtn = null, this.opacityPreviousKeyframeBtn = null, this.opacityKeyframeBtn = null, this.opacityNextKeyframeBtn = null, this.scaleBtn = null, this.volumeBtn = null, this.transitionBtn = null, this.effectBtn = null, this.advancedBtn = null, this.audioFadeBtn = null, this.speedBtn = null, this.fitPopup = null, this.opacityPopup = null, this.scalePopup = null, this.volumePopup = null, this.transitionPopup = null, this.effectPopup = null, this.advancedPopup = null, this.audioFadePopup = null, this.speedPopup = null, this.fitLabel = null, this.volumeSlider = null, this.volumeValue = null, this.volumeDisplayInput = null, this.volumeSection = null, this.visualSection = null, this.audioSection = null, this.speedSection = null, this.speedSlider = null, this.speedValue = null, this.speedDisplayInput = null, this.dynamicToggle = null, this.dynamicPanel = null, this.dynamicInput = null;
69484
+ this.abortController?.abort(), this.abortController = null, this.dragManager.clear(), this.playbackPauseListener && (this.edit.events.off(Z.PlaybackPause, this.playbackPauseListener), this.playbackPauseListener = null), this.editChangedListener && (this.edit.events.off(Z.EditChanged, this.editChangedListener), this.editChangedListener = null), this.pendingOpacityTimes.clear(), this.opacityDragTime = null, this.transitionPanel?.dispose(), this.effectPanel?.dispose(), this.opacitySlider?.dispose(), this.scaleSlider?.dispose(), this.unsubMergeFieldChanged?.(), this.unsubMergeFieldChanged = null, this.mergeFieldManager?.dispose(), this.mergeFieldManager = null, super.dispose(), this.transitionPanel = null, this.effectPanel = null, this.opacitySlider = null, this.scaleSlider = null, this.fitBtn = null, this.opacityBtn = null, this.opacityPreviousKeyframeBtn = null, this.opacityKeyframeBtn = null, this.opacityNextKeyframeBtn = null, this.scaleBtn = null, this.volumeBtn = null, this.transitionBtn = null, this.effectBtn = null, this.advancedBtn = null, this.audioFadeBtn = null, this.speedBtn = null, this.fitPopup = null, this.opacityPopup = null, this.scalePopup = null, this.volumePopup = null, this.transitionPopup = null, this.effectPopup = null, this.advancedPopup = null, this.audioFadePopup = null, this.speedPopup = null, this.fitLabel = null, this.volumeSlider = null, this.volumeValue = null, this.volumeDisplayInput = null, this.volumeSection = null, this.visualSection = null, this.audioSection = null, this.speedSection = null, this.speedSlider = null, this.speedValue = null, this.speedDisplayInput = null, this.dynamicToggle = null, this.dynamicPanel = null, this.dynamicInput = null;
69441
69485
  }
69442
69486
  }
69443
69487
  class Yb extends ka {
@@ -71650,7 +71694,7 @@ class to extends Ca {
71650
71694
  n.key === "Enter" && (n.ctrlKey || n.metaKey) && (n.preventDefault(), this.textEditDebounceTimer && (clearTimeout(this.textEditDebounceTimer), this.textEditDebounceTimer = null), this.applyTextEdit(), this.closeAllPopups()), n.key === "Escape" && this.closeAllPopups();
71651
71695
  }), this.setupOutsideClickHandler(), this.enableDrag(), this.appendDeleteButton(), t.style.position = "relative", t.insertBefore(this.container, t.firstChild), this.unsubFontCapabilities = this.edit.getInternalEvents().on(Et.FontCapabilitiesChanged, () => {
71652
71696
  this.container?.style.display !== "none" && this.syncState();
71653
- }), this.unsubMergeFieldChanged = this.edit.getInternalEvents().on(j.MergeFieldChanged, () => {
71697
+ }), this.unsubMergeFieldChanged = this.edit.getInternalEvents().on(Z.MergeFieldChanged, () => {
71654
71698
  this.container?.style.display !== "none" && this.showMergeFields && this.mergeFieldManager?.hasLabels && this.mergeFieldManager.sync();
71655
71699
  }), this.unsubCanvasDoubleClick = this.edit.getInternalEvents().on(Et.CanvasClipDoubleClicked, () => {
71656
71700
  this.selectedTrackIdx < 0 || this.selectedClipIdx < 0 || !this.container || !this.container.classList.contains("visible") || this.openTextEditPopup();
@@ -72972,7 +73016,7 @@ class znt {
72972
73016
  fontSize: Fnt,
72973
73017
  fill: "#ffffff"
72974
73018
  }
72975
- }), this.dimensionContainer.addChild(this.dimensionBackground), this.dimensionContainer.addChild(this.dimensionLabel), this.onClipSelectedBound = this.onClipSelected.bind(this), this.onSelectionClearedBound = this.onSelectionCleared.bind(this), this.onClipFocusedBound = this.onClipFocused.bind(this), this.onClipBlurredBound = this.onClipBlurred.bind(this), this.onPointerDownBound = this.onPointerDown.bind(this), this.onPointerMoveBound = this.onPointerMove.bind(this), this.onPointerUpBound = this.onPointerUp.bind(this), this.edit.events.on(j.ClipSelected, this.onClipSelectedBound), this.edit.events.on(j.SelectionCleared, this.onSelectionClearedBound);
73019
+ }), this.dimensionContainer.addChild(this.dimensionBackground), this.dimensionContainer.addChild(this.dimensionLabel), this.onClipSelectedBound = this.onClipSelected.bind(this), this.onSelectionClearedBound = this.onSelectionCleared.bind(this), this.onClipFocusedBound = this.onClipFocused.bind(this), this.onClipBlurredBound = this.onClipBlurred.bind(this), this.onPointerDownBound = this.onPointerDown.bind(this), this.onPointerMoveBound = this.onPointerMove.bind(this), this.onPointerUpBound = this.onPointerUp.bind(this), this.edit.events.on(Z.ClipSelected, this.onClipSelectedBound), this.edit.events.on(Z.SelectionCleared, this.onSelectionClearedBound);
72976
73020
  const i = this.edit.getInternalEvents();
72977
73021
  i.on(Et.ClipFocused, this.onClipFocusedBound), i.on(Et.ClipBlurred, this.onClipBlurredBound);
72978
73022
  }
@@ -73039,7 +73083,7 @@ class znt {
73039
73083
  this.container.visible = !0, this.drawOutline(), this.drawHandles(), this.drawFocusGlow();
73040
73084
  }
73041
73085
  dispose() {
73042
- this.edit.events.off(j.ClipSelected, this.onClipSelectedBound), this.edit.events.off(j.SelectionCleared, this.onSelectionClearedBound);
73086
+ this.edit.events.off(Z.ClipSelected, this.onClipSelectedBound), this.edit.events.off(Z.SelectionCleared, this.onSelectionClearedBound);
73043
73087
  const t = this.edit.getInternalEvents();
73044
73088
  t.off(Et.ClipFocused, this.onClipFocusedBound), t.off(Et.ClipBlurred, this.onClipBlurredBound), this.app && (this.app.stage.off("pointerdown", this.onPointerDownBound), this.app.stage.off("globalpointermove", this.onPointerMoveBound), this.app.stage.off("pointerup", this.onPointerUpBound), this.app.stage.off("pointerupoutside", this.onPointerUpBound)), this.outline.destroy();
73045
73089
  for (const i of this.handles.values())
@@ -75077,7 +75121,7 @@ class Ag {
75077
75121
  * Subscribe to edit events. Called by factory methods.
75078
75122
  */
75079
75123
  subscribeToEvents() {
75080
- this.edit.events.on(j.ClipSelected, this.onClipSelected), this.edit.events.on(j.SelectionCleared, this.onSelectionCleared);
75124
+ this.edit.events.on(Z.ClipSelected, this.onClipSelected), this.edit.events.on(Z.SelectionCleared, this.onSelectionCleared);
75081
75125
  }
75082
75126
  /**
75083
75127
  * Register all standard toolbars. Called by create() factory.
@@ -75154,7 +75198,7 @@ class Ag {
75154
75198
  });
75155
75199
  }), document.addEventListener("keydown", this.onKeyDownBound);
75156
75200
  const s = this.edit.getInternalEvents();
75157
- for (const o of [j.ClipGenerationStarted, j.ClipGenerationCompleted, j.ClipGenerationFailed]) {
75201
+ for (const o of [Z.ClipGenerationStarted, Z.ClipGenerationCompleted, Z.ClipGenerationFailed]) {
75158
75202
  const l = () => this.syncGenerateSegments();
75159
75203
  s.on(o, l), this.generationListeners.push(() => s.off(o, l));
75160
75204
  }
@@ -75199,7 +75243,7 @@ class Ag {
75199
75243
  */
75200
75244
  dispose() {
75201
75245
  if (this.isDisposed) return;
75202
- this.isDisposed = !0, this.edit.events.off(j.ClipSelected, this.onClipSelected), this.edit.events.off(j.SelectionCleared, this.onSelectionCleared), document.removeEventListener("keydown", this.onKeyDownBound);
75246
+ this.isDisposed = !0, this.edit.events.off(Z.ClipSelected, this.onClipSelected), this.edit.events.off(Z.SelectionCleared, this.onSelectionCleared), document.removeEventListener("keydown", this.onKeyDownBound);
75203
75247
  for (const { btn: i, handler: r } of this.modeButtonHandlers)
75204
75248
  i.removeEventListener("click", r);
75205
75249
  this.modeButtonHandlers = [];