@netless/app-slide 0.2.6-alpha.1 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.es.js CHANGED
@@ -6490,14 +6490,16 @@ var Slide = function(t) {
6490
6490
  }, function(t, e, n) {
6491
6491
  n.r(e), n.d(e, "ErrorType", function() {
6492
6492
  return VE;
6493
+ }), n.d(e, "preloadResource", function() {
6494
+ return rI;
6493
6495
  }), n.d(e, "delay", function() {
6494
- return lI;
6496
+ return cI;
6495
6497
  }), n.d(e, "waitUntil", function() {
6496
- return uI;
6498
+ return dI;
6497
6499
  }), n.d(e, "SLIDE_EVENTS", function() {
6498
- return hI;
6500
+ return pI;
6499
6501
  }), n.d(e, "Slide", function() {
6500
- return fI;
6502
+ return vI;
6501
6503
  });
6502
6504
  var i = {};
6503
6505
  n.r(i), n.d(i, "ACESFilmicToneMapping", function() {
@@ -29399,10 +29401,9 @@ void main() {
29399
29401
  }
29400
29402
  class EM {
29401
29403
  constructor(t2) {
29402
- this.target = t2;
29403
- }
29404
- applyCommand(t2, e2) {
29405
- this.target.applyCommand(t2, e2);
29404
+ this.applyCommand = (t3, e2) => {
29405
+ this.target.applyCommand(t3, e2);
29406
+ }, this.target = t2, this.applyCommand = Object(l.debounce)(this.applyCommand, 100, { maxWait: 500 });
29406
29407
  }
29407
29408
  }
29408
29409
  class MM {
@@ -31117,52 +31118,14 @@ void main(void){
31117
31118
  this.unbindEvent(), this.playCallBackList = [], (t2 = this.container) === null || t2 === void 0 || t2.removeChild(this.mediaController);
31118
31119
  }
31119
31120
  }
31120
- var VA = n(49), WA = function(t2, e2, n2, i2) {
31121
- return new (n2 || (n2 = Promise))(function(r2, o2) {
31122
- function s2(t3) {
31123
- try {
31124
- l2(i2.next(t3));
31125
- } catch (t4) {
31126
- o2(t4);
31127
- }
31128
- }
31129
- function a2(t3) {
31130
- try {
31131
- l2(i2.throw(t3));
31132
- } catch (t4) {
31133
- o2(t4);
31134
- }
31135
- }
31136
- function l2(t3) {
31137
- var e3;
31138
- t3.done ? r2(t3.value) : (e3 = t3.value, e3 instanceof n2 ? e3 : new n2(function(t4) {
31139
- t4(e3);
31140
- })).then(s2, a2);
31141
- }
31142
- l2((i2 = i2.apply(t2, e2 || [])).next());
31143
- });
31144
- };
31145
- class XA extends a.a {
31121
+ var VA = n(49);
31122
+ class WA extends a.a {
31146
31123
  constructor(t2, e2) {
31147
- super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this._isResourceExist = "unknow", this.url = t2, this.runningAudio = e2, KR.RtcAudioClazz ? (this.rctClient = new KR.RtcAudioClazz(t2), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new VA.Howl({ src: [t2] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play"))), this.detectResourceExist();
31124
+ super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.url = t2, this.runningAudio = e2, KR.RtcAudioClazz ? (this.rctClient = new KR.RtcAudioClazz(t2), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new VA.Howl({ src: [t2] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play")));
31148
31125
  }
31149
31126
  startTimeChangeEmit() {
31150
31127
  this.currentTime !== this.lastTime && (this.lastTime = this.currentTime, this.emit("timeupdate")), this.isEnded || setTimeout(() => this.startTimeChangeEmit(), 300);
31151
31128
  }
31152
- detectResourceExist() {
31153
- return new Promise((t2) => {
31154
- fetch(this.url, { method: "HEAD" }).then((e2) => {
31155
- this._isResourceExist = e2.ok ? "true" : "false", t2(e2.ok);
31156
- }).catch(() => {
31157
- this._isResourceExist = "false", t2(false);
31158
- });
31159
- });
31160
- }
31161
- isResourceExist() {
31162
- return WA(this, void 0, void 0, function* () {
31163
- return this._isResourceExist !== "unknow" ? this._isResourceExist === "true" : this.detectResourceExist();
31164
- });
31165
- }
31166
31129
  play() {
31167
31130
  var t2, e2, n2;
31168
31131
  this.runningAudio.has(this.url) && ((t2 = this.runningAudio.get(this.url)) === null || t2 === void 0 || t2.stop(), this.runningAudio.delete(this.url)), this.lastTime = -1, (e2 = this.howl) === null || e2 === void 0 || e2.play(), (n2 = this.rctClient) === null || n2 === void 0 || n2.play(), this.startTimeChangeEmit(), this.runningAudio.set(this.url, this);
@@ -31200,8 +31163,11 @@ void main(void){
31200
31163
  get isPaused() {
31201
31164
  return this.rctClient ? this.rctClient.isPaused : !!this.howl && this.howl.playing();
31202
31165
  }
31166
+ volume(t2) {
31167
+ this.rctClient ? this.rctClient.volume(t2) : this.howl && this.howl.volume(t2);
31168
+ }
31203
31169
  }
31204
- var qA = function(t2, e2, n2, i2) {
31170
+ var XA = function(t2, e2, n2, i2) {
31205
31171
  return new (n2 || (n2 = Promise))(function(r2, o2) {
31206
31172
  function s2(t3) {
31207
31173
  try {
@@ -31226,14 +31192,16 @@ void main(void){
31226
31192
  l2((i2 = i2.apply(t2, e2 || [])).next());
31227
31193
  });
31228
31194
  };
31229
- class YA extends a.a {
31195
+ class qA extends a.a {
31230
31196
  constructor(t2) {
31231
31197
  var e2, n2;
31232
- super(), this.type = "video", this.sprite = new Ow(), this.isPlaying = false, this.isGlobalPause = false, this.id = t2.id, this.start = (e2 = t2.video.cut) === null || e2 === void 0 ? void 0 : e2.start, this.end = (n2 = t2.video.cut) === null || n2 === void 0 ? void 0 : n2.end, this.container = t2.container, this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31198
+ super(), this.type = "video", this.sprite = new Ow(), this.isPlaying = false, this.isGlobalPause = false, this.updateVolume = (t3) => {
31199
+ KR.RtcAudioClazz ? this.rtcAudio.volume(t3) : this.videoResource.source && (this.videoResource.source.volume = t3);
31200
+ }, this.id = t2.id, this.start = (e2 = t2.video.cut) === null || e2 === void 0 ? void 0 : e2.start, this.end = (n2 = t2.video.cut) === null || n2 === void 0 ? void 0 : n2.end, this.container = t2.container, this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31233
31201
  let i2 = t2.video.src;
31234
31202
  this.ctx.loaderDelegate && (i2 = this.ctx.loaderDelegate.redirectMedia(i2), this.ctx.logger.info(`redirect media url from ${t2.video.src} to ${i2} by delegate.`, t2.ctx.taskId)), this.videoResource = new Iy(i2, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true });
31235
31203
  let r2 = t2.video.src.replace(/4$/, "3");
31236
- this.ctx.loaderDelegate && (r2 = this.ctx.loaderDelegate.redirectMedia(r2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${r2} by delegate.`, t2.ctx.taskId)), this.rtcAudio = new XA(r2, t2.ctx.runningAudio);
31204
+ this.ctx.loaderDelegate && (r2 = this.ctx.loaderDelegate.redirectMedia(r2), this.ctx.logger.info(`redirect media url from ${t2.video.src.replace(/4$/, "3")} to ${r2} by delegate.`, t2.ctx.taskId)), this.rtcAudio = new WA(r2, t2.ctx.runningAudio);
31237
31205
  const { video: o2, width: s2, height: a2, target: l2 } = t2;
31238
31206
  this.controller = new jA({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, width: s2, height: a2, target: l2, media: this, info: o2, canvasElement: t2.canvasElement }), this.controller.addPlayCallBack(() => {
31239
31207
  this.sprite.width = s2, this.sprite.height = a2, this.ctx.clock.setTimeout(() => {
@@ -31249,7 +31217,7 @@ void main(void){
31249
31217
  this.videoResource.source.addEventListener(t3, () => {
31250
31218
  t3 !== "timeupdate" || this.isPlaying || this.pause(), this.emit(t3);
31251
31219
  });
31252
- }), this.ctx.activeMedia.add(this);
31220
+ }), this.ctx.activeMedia.add(this), this.ctx.volumeAdjuster.on("update", this.updateVolume);
31253
31221
  }
31254
31222
  get currentTime() {
31255
31223
  var t2, e2;
@@ -31278,19 +31246,16 @@ void main(void){
31278
31246
  }
31279
31247
  play() {
31280
31248
  var t2;
31281
- return qA(this, void 0, void 0, function* () {
31282
- this.isPlaying = true, yield this.load(), yield this.ctx.clock.waitUntil(() => {
31249
+ return XA(this, void 0, void 0, function* () {
31250
+ this.isPlaying = true, this.updateVolume(this.ctx.volumeAdjuster.volume), yield this.load(), yield this.ctx.clock.waitUntil(() => {
31283
31251
  const t3 = this.videoResource.source;
31284
31252
  return !!(t3 && t3.videoWidth > 0);
31285
31253
  }, 3e3);
31286
31254
  const e2 = this.videoResource.source;
31287
- if (e2 && e2.videoWidth <= 0)
31288
- return;
31289
- const n2 = yield this.rtcAudio.isResourceExist();
31290
- KR.RtcAudioClazz && n2 ? (this.videoResource.source.volume = 0, this.rtcAudio.once("play", () => {
31255
+ e2 && e2.videoWidth <= 0 || (KR.RtcAudioClazz ? (this.videoResource.source.volume = 0, this.rtcAudio.once("play", () => {
31291
31256
  var t3;
31292
31257
  (t3 = this.videoResource.source) === null || t3 === void 0 || t3.play();
31293
- }), this.rtcAudio.play()) : yield (t2 = this.videoResource.source) === null || t2 === void 0 ? void 0 : t2.play();
31258
+ }), this.rtcAudio.play()) : yield (t2 = this.videoResource.source) === null || t2 === void 0 ? void 0 : t2.play());
31294
31259
  });
31295
31260
  }
31296
31261
  load() {
@@ -31320,10 +31285,10 @@ void main(void){
31320
31285
  }
31321
31286
  destroy() {
31322
31287
  var t2;
31323
- this.sprite.interactive = false, this.sprite.destroy({ texture: true, baseTexture: true }), (t2 = this.videoResource) === null || t2 === void 0 || t2.destroy(), this.rtcAudio.destroy(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31288
+ this.ctx.volumeAdjuster.removeListener("update", this.updateVolume), this.sprite.interactive = false, this.sprite.destroy({ texture: true, baseTexture: true }), (t2 = this.videoResource) === null || t2 === void 0 || t2.destroy(), this.rtcAudio.destroy(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31324
31289
  }
31325
31290
  }
31326
- var ZA = function(t2, e2, n2, i2) {
31291
+ var YA = function(t2, e2, n2, i2) {
31327
31292
  return new (n2 || (n2 = Promise))(function(r2, o2) {
31328
31293
  function s2(t3) {
31329
31294
  try {
@@ -31348,13 +31313,15 @@ void main(void){
31348
31313
  l2((i2 = i2.apply(t2, e2 || [])).next());
31349
31314
  });
31350
31315
  };
31351
- class JA extends a.a {
31316
+ class ZA extends a.a {
31352
31317
  constructor(t2) {
31353
- super(), this.type = "audio", this.isPlaying = false, this.isGlobalPause = false, this.id = t2.id;
31318
+ super(), this.type = "audio", this.isPlaying = false, this.isGlobalPause = false, this.updateVolume = (t3) => {
31319
+ this.audioPlayer.volume(t3);
31320
+ }, this.id = t2.id;
31354
31321
  let e2 = t2.audio.src;
31355
- t2.ctx.loaderDelegate && (e2 = t2.ctx.loaderDelegate.redirectMedia(e2), t2.ctx.logger.info(`redirect media url from ${t2.audio.src} to ${e2} by delegate.`, t2.ctx.taskId)), this.audioPlayer = new XA(e2, t2.ctx.runningAudio), t2.audio.cut && (this.start = t2.audio.cut.start, this.end = t2.audio.cut.end), this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31322
+ t2.ctx.loaderDelegate && (e2 = t2.ctx.loaderDelegate.redirectMedia(e2), t2.ctx.logger.info(`redirect media url from ${t2.audio.src} to ${e2} by delegate.`, t2.ctx.taskId)), this.audioPlayer = new WA(e2, t2.ctx.runningAudio), t2.audio.cut && (this.start = t2.audio.cut.start, this.end = t2.audio.cut.end), this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31356
31323
  const { width: n2, height: i2, target: r2 } = t2;
31357
- this.controller = new jA({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, height: i2, width: n2, target: r2, media: this, info: t2.audio, canvasElement: t2.canvasElement }), this.audioPlayer.on("load", () => this.emit("durationchange")), this.audioPlayer.on("timeupdate", () => this.emit("timeupdate")), this.audioPlayer.on("pause", () => this.emit("pause")), this.audioPlayer.on("play", () => this.emit("play")), this.ctx.activeMedia.add(this);
31324
+ this.controller = new jA({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, height: i2, width: n2, target: r2, media: this, info: t2.audio, canvasElement: t2.canvasElement }), this.audioPlayer.on("load", () => this.emit("durationchange")), this.audioPlayer.on("timeupdate", () => this.emit("timeupdate")), this.audioPlayer.on("pause", () => this.emit("pause")), this.audioPlayer.on("play", () => this.emit("play")), this.ctx.activeMedia.add(this), this.ctx.volumeAdjuster.on("update", this.updateVolume);
31358
31325
  }
31359
31326
  get currentTime() {
31360
31327
  return this.audioPlayer.currentTime;
@@ -31384,8 +31351,8 @@ void main(void){
31384
31351
  this.controller.hide();
31385
31352
  }
31386
31353
  play() {
31387
- return ZA(this, void 0, void 0, function* () {
31388
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Audio player prevent play event with paused state", this.ctx.taskId) : (this.isPlaying = true, this.audioPlayer.play());
31354
+ return YA(this, void 0, void 0, function* () {
31355
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Audio player prevent play event with paused state", this.ctx.taskId) : (this.updateVolume(this.ctx.volumeAdjuster.volume), this.isPlaying = true, this.audioPlayer.play());
31389
31356
  });
31390
31357
  }
31391
31358
  pause() {
@@ -31407,10 +31374,10 @@ void main(void){
31407
31374
  this.seek(0), this.pause();
31408
31375
  }
31409
31376
  destroy() {
31410
- this.audioPlayer.pause(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31377
+ this.ctx.volumeAdjuster.removeListener("update", this.updateVolume), this.audioPlayer.pause(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31411
31378
  }
31412
31379
  }
31413
- class $A extends GA {
31380
+ class JA extends GA {
31414
31381
  constructor(t2, e2, n2, i2) {
31415
31382
  super(Object.assign(Object.assign({}, t2), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e2, n2, i2), this.isInteractiveOutside = false, this.cmd = new EM(this), this.media = t2 == null ? void 0 : t2.media, this.picFill = new TA(this.ctx, t2.picFill, t2.width, t2.height, { useFilter: false, useSlideBackgroundFill: false });
31416
31383
  }
@@ -31433,7 +31400,7 @@ void main(void){
31433
31400
  const s2 = (t2 = this.backgroundGraphics) === null || t2 === void 0 ? void 0 : t2.getClonedDisplayObject();
31434
31401
  ((e2 = this.backgroundGraphics) === null || e2 === void 0 ? void 0 : e2.isNeedMask(o2.width, o2.height)) && s2 && (o2.mask = s2, this.container.addChild(s2)), o2.width = this.designWidth, o2.height = this.designHeight, o2 instanceof jE && this.ctx.slideScopeEventHub.once("slide-render", (t3) => {
31435
31402
  this.ctx.slideIndex === t3 && o2.play();
31436
- }), this.container.addChild(o2), ((n2 = this.media) === null || n2 === void 0 ? void 0 : n2.type) === "video" && this.media.src ? (this.mediaPlayer = new YA({ id: this.json.id + "-video", shapeId: this.json.id, ctx: this.ctx, video: this.media, height: this.designHeight, width: this.designWidth, target: o2, container: this.container, canvasElement: this.ctx.view }), (i2 = this.mediaPlayer) === null || i2 === void 0 || i2.sprite) : ((r2 = this.media) === null || r2 === void 0 ? void 0 : r2.type) === "audio" && this.media.src && (this.mediaPlayer = new JA({ id: this.json.id + "-audio", shapeId: this.json.id, ctx: this.ctx, audio: this.media, height: this.designHeight, width: this.designWidth, target: o2, canvasElement: this.ctx.view })), this.mediaPlayer && (this.isInteractiveOutside = this.container.interactive, this.container.interactive = true, this.container.on("mouseover", () => {
31403
+ }), this.container.addChild(o2), ((n2 = this.media) === null || n2 === void 0 ? void 0 : n2.type) === "video" && this.media.src ? (this.mediaPlayer = new qA({ id: this.json.id + "-video", shapeId: this.json.id, ctx: this.ctx, video: this.media, height: this.designHeight, width: this.designWidth, target: o2, container: this.container, canvasElement: this.ctx.view }), (i2 = this.mediaPlayer) === null || i2 === void 0 || i2.sprite) : ((r2 = this.media) === null || r2 === void 0 ? void 0 : r2.type) === "audio" && this.media.src && (this.mediaPlayer = new ZA({ id: this.json.id + "-audio", shapeId: this.json.id, ctx: this.ctx, audio: this.media, height: this.designHeight, width: this.designWidth, target: o2, canvasElement: this.ctx.view })), this.mediaPlayer && (this.isInteractiveOutside = this.container.interactive, this.container.interactive = true, this.container.on("mouseover", () => {
31437
31404
  this.mediaPlayer.showController();
31438
31405
  }), this.container.on("mouseout", () => {
31439
31406
  this.mediaPlayer.hideController();
@@ -31460,7 +31427,7 @@ void main(void){
31460
31427
  this.mediaPlayer && (this.picFill.displayObject && !this.isInteractiveOutside && (this.container.interactive = false), this.mediaPlayer.destroy(), this.mediaPlayer = void 0), this.picFill.destroy();
31461
31428
  }
31462
31429
  }
31463
- var KA = function(t2, e2, n2, i2) {
31430
+ var $A = function(t2, e2, n2, i2) {
31464
31431
  return new (n2 || (n2 = Promise))(function(r2, o2) {
31465
31432
  function s2(t3) {
31466
31433
  try {
@@ -31485,7 +31452,7 @@ void main(void){
31485
31452
  l2((i2 = i2.apply(t2, e2 || [])).next());
31486
31453
  });
31487
31454
  };
31488
- class QA extends PM {
31455
+ class KA extends PM {
31489
31456
  constructor(t2, e2, n2, i2, r2) {
31490
31457
  super(t2, e2, n2), this.children = [], this.cacheSprite = new Ow(), this.cacheContainer = new ty(), this.json = t2, this.json.fillStyle && this.json.fillStyle.fillType === "groupFill" && i2 && (this.json.fillStyle = i2), this.container.name = t2.id, this.cacheContainer.name = t2.id + "-cache-container", this.ctx.timingTargets.addTarget(t2.id, this), this.updateTransform(this.json), this.fillObject = new TA(this.ctx, t2.fillStyle, t2.width, t2.height, { useFilter: false, useSlideBackgroundFill: false }), this.createChildren(r2);
31491
31458
  }
@@ -31493,10 +31460,10 @@ void main(void){
31493
31460
  var e2, n2, i2, r2;
31494
31461
  const o2 = { x: (n2 = (e2 = this.json.position) === null || e2 === void 0 ? void 0 : e2.x) !== null && n2 !== void 0 ? n2 : 0, y: (r2 = (i2 = this.json.position) === null || i2 === void 0 ? void 0 : i2.y) !== null && r2 !== void 0 ? r2 : 0 };
31495
31462
  for (let e3 = 0, n3 = this.json.children.length; e3 < n3; e3++)
31496
- t2.addSubMTask(() => KA(this, void 0, void 0, function* () {
31463
+ t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31497
31464
  const n4 = this.json.children[e3];
31498
31465
  let i3 = null;
31499
- (n4 == null ? void 0 : n4.type) === "Shape" ? i3 = new GA(n4, this.ctx, o2, this.json.fillStyle) : (n4 == null ? void 0 : n4.type) === "Picture" ? i3 = new $A(n4, this.ctx, o2, this.json.fillStyle) : (n4 == null ? void 0 : n4.type) === "Container" && (i3 = new QA(n4, this.ctx, o2, this.json.fillStyle, t2)), i3 && this.children.push(i3);
31466
+ (n4 == null ? void 0 : n4.type) === "Shape" ? i3 = new GA(n4, this.ctx, o2, this.json.fillStyle) : (n4 == null ? void 0 : n4.type) === "Picture" ? i3 = new JA(n4, this.ctx, o2, this.json.fillStyle) : (n4 == null ? void 0 : n4.type) === "Container" && (i3 = new KA(n4, this.ctx, o2, this.json.fillStyle, t2)), i3 && this.children.push(i3);
31500
31467
  }), "@ContainerImpl[child.init]");
31501
31468
  }
31502
31469
  get interactiveContainer() {
@@ -31507,7 +31474,7 @@ void main(void){
31507
31474
  }
31508
31475
  preRender(t2) {
31509
31476
  for (const e2 of this.children)
31510
- t2.addSubMTask(() => KA(this, void 0, void 0, function* () {
31477
+ t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31511
31478
  e2.preRender(t2);
31512
31479
  }), "@ContainerImpl[child.preRender]");
31513
31480
  }
@@ -31523,13 +31490,13 @@ void main(void){
31523
31490
  render(t2) {
31524
31491
  let e2 = new ty();
31525
31492
  for (const n2 of this.children)
31526
- n2.render(t2), t2.addSubMTask(() => KA(this, void 0, void 0, function* () {
31493
+ n2.render(t2), t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31527
31494
  var t3;
31528
31495
  n2.isStatic() && !this.json.cacheAsTexture && n2.json.width < 4096 && n2.json.height < 4096 ? e2.addChild(n2.renderContainer) : (e2.children.length > 0 && (e2.cacheAsBitmap = true, this.cacheContainer.addChild(e2), e2 = new ty()), this.cacheContainer.addChild(n2.renderContainer)), (n2.json.hlinkHover || n2.json.hlinkClick) && ((t3 = n2.hyperlink) === null || t3 === void 0 || t3.addProxy(this.container));
31529
31496
  }), "@ContainerImpl[child.render]");
31530
- t2.addMTask(() => KA(this, void 0, void 0, function* () {
31497
+ t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31531
31498
  e2.children.length > 0 && (e2.cacheAsBitmap = true, this.cacheContainer.addChild(e2));
31532
- }), "@ContainerImpl[child.render]"), t2.addSubMTask(() => KA(this, void 0, void 0, function* () {
31499
+ }), "@ContainerImpl[child.render]"), t2.addSubMTask(() => $A(this, void 0, void 0, function* () {
31533
31500
  this.container.addChild(this.cacheContainer), this.json.cacheAsTexture && (!function(t3, e3, n2, i2, r2) {
31534
31501
  const o2 = t3.getBounds(), s2 = Math.min(o2.x, e3.x, o2.x + o2.width, e3.x + e3.width), a2 = Math.max(o2.x, e3.x, o2.x + o2.width, e3.x + e3.width), l2 = Math.min(o2.y, e3.y, o2.y + o2.height, e3.y + e3.height), u2 = a2 - s2, h2 = Math.max(o2.y, e3.y, o2.y + o2.height, e3.y + e3.height) - l2;
31535
31502
  let c2 = KE(e3.x - o2.x), d2 = KE(e3.y - o2.y);
@@ -31552,7 +31519,7 @@ void main(void){
31552
31519
  this.cacheSprite && this.cacheSprite.destroy({ texture: true }), this.children.forEach((t2) => t2.destroy()), this.container.destroy({ children: true, texture: true, baseTexture: true }), this.cacheContainer.destroy({ children: true, texture: true, baseTexture: true });
31553
31520
  }
31554
31521
  }
31555
- class tR extends a.a {
31522
+ class QA extends a.a {
31556
31523
  constructor(t2, e2, n2, i2) {
31557
31524
  super(), this.cond = {}, this.timeoutIds = [], this.condHandle = (t3, e3 = {}) => {
31558
31525
  if (t3)
@@ -31599,7 +31566,7 @@ void main(void){
31599
31566
  }), this.timeoutIds.forEach((t2) => this.ctx.clock.clearTimeout(t2));
31600
31567
  }
31601
31568
  }
31602
- class eR extends a.a {
31569
+ class tR extends a.a {
31603
31570
  constructor(t2) {
31604
31571
  super(), this.isTimeNodeEndSync = false, this.interactiveListeners = [], this.runtimeNodeEventHub = new a.a(), this._currentSeqIndex = 0, this._currentSeqState = "idle", this.isForward = true, this.autoPlay = false, this.handlePrev = (t3 = false) => {
31605
31572
  var e3, n3, i3, r3, o3, s3;
@@ -31609,7 +31576,7 @@ void main(void){
31609
31576
  this.isTimeNodeEndSync && (this.isTimeNodeEndSync = false, this.currentSeqState = "idle", this.currentSeqIndex = 0), this.hasNext() || !this.isMainSeq ? this.currentSeqState === "idle" ? (e3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || e3 === void 0 || e3.commonTimeNode.startTimeNodeForce() : this.currentSeqState === "running" ? ((n3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || n3 === void 0 || n3.commonTimeNode.seekToEnd(false, true), this.currentSeqState = "end", this.incrSeqIndex(), (i3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || i3 === void 0 || i3.commonTimeNode.startTimeNodeForce()) : this.currentSeqState === "end" && (this.incrSeqIndex(), (r3 = this.commonTimeNode.children[this.currentSeqIndex]) === null || r3 === void 0 || r3.commonTimeNode.startTimeNodeForce()) : this.globalEventHub.emit("c:next slide", t3);
31610
31577
  };
31611
31578
  const { json: e2, iterateType: n2, isIterate: i2, isSub: r2, parent: o2, ctx: s2, eventHub: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t2;
31612
- this.isMainSeq = e2.ctn.nodeType === "mainSeq", this.isInteractiveSeq = e2.ctn.nodeType === "interactiveSeq", this.id = e2.ctn.id, this.isIterate = i2, this.json = e2, this.ctx = s2, this.globalEventHub = l2, this.commonTimeNode = new PR({ json: e2.ctn, isSub: r2, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s2, parent: o2, isIterate: false, iterateType: n2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 || this.isInteractiveSeq }), this.bindShapeEvent(), this.nextConds = new tR("mainSeq", e2.nextCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.prevConds = new tR("mainSeq", e2.preCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.commonTimeNode.on("timeNodeRestart", () => {
31579
+ this.isMainSeq = e2.ctn.nodeType === "mainSeq", this.isInteractiveSeq = e2.ctn.nodeType === "interactiveSeq", this.id = e2.ctn.id, this.isIterate = i2, this.json = e2, this.ctx = s2, this.globalEventHub = l2, this.commonTimeNode = new RR({ json: e2.ctn, isSub: r2, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s2, parent: o2, isIterate: false, iterateType: n2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 || this.isInteractiveSeq }), this.bindShapeEvent(), this.nextConds = new QA("mainSeq", e2.nextCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.prevConds = new QA("mainSeq", e2.preCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.commonTimeNode.on("timeNodeRestart", () => {
31613
31580
  this.currentSeqIndex = 0, this.currentSeqState = "idle";
31614
31581
  }), this.commonTimeNode.on("childTimeNodeStart", (t3) => {
31615
31582
  const e3 = this.commonTimeNode.children.findIndex((e4) => e4.commonTimeNode.uuid === t3.id);
@@ -31699,7 +31666,7 @@ void main(void){
31699
31666
  this.currentSeqIndex = n2, this.currentSeqState = e2 === "start" ? "idle" : "end";
31700
31667
  }
31701
31668
  }
31702
- function nR(t2, e2, n2) {
31669
+ function eR(t2, e2, n2) {
31703
31670
  const i2 = e2.split(".");
31704
31671
  i2.reduce((r2, o2, s2) => {
31705
31672
  if (r2)
@@ -31707,7 +31674,7 @@ void main(void){
31707
31674
  console.warn(`${t2} not support ${e2}`);
31708
31675
  }, t2);
31709
31676
  }
31710
- function iR(t2, e2) {
31677
+ function nR(t2, e2) {
31711
31678
  if (!e2)
31712
31679
  return null;
31713
31680
  return e2.split(".").reduce((n2, i2) => {
@@ -31716,7 +31683,7 @@ void main(void){
31716
31683
  console.warn(`${t2} not support ${e2}`);
31717
31684
  }, t2);
31718
31685
  }
31719
- class rR {
31686
+ class iR {
31720
31687
  constructor(t2) {
31721
31688
  this.timingTarget = null, this.runtimeNodeEventHub = new a.a(), this.basicOnTimeNodeEnd = () => {
31722
31689
  if (this.isConflict) {
@@ -31734,29 +31701,29 @@ void main(void){
31734
31701
  }
31735
31702
  };
31736
31703
  const { isIterate: e2, isSub: n2, json: i2, ctx: r2, parent: o2, eventHub: s2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t2;
31737
- this.json = i2, this.id = i2.cBhvr.ctn.id, this.ctx = r2, this.globalEventHub = s2, this.commonTimeNode = new PR({ json: i2.cBhvr.ctn, isSub: n2, eventHubs: { global: s2, runtime: this.runtimeNodeEventHub }, ctx: r2, parent: o2, isIterate: e2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.timingTarget = this.ctx.timingTargets.getTarget(i2.cBhvr.target, e2, { type: l2, index: u2, id: h2 }), this.commonTimeNode.on("seekToStart", () => this.onSeekToStart()), this.commonTimeNode.on("seekToEnd", () => this.onSeekToEnd()), this.commonTimeNode.on("timelineStart", this.basicOnTimeLineStart), this.commonTimeNode.on("timeNodeEnd", this.basicOnTimeNodeEnd);
31704
+ this.json = i2, this.id = i2.cBhvr.ctn.id, this.ctx = r2, this.globalEventHub = s2, this.commonTimeNode = new RR({ json: i2.cBhvr.ctn, isSub: n2, eventHubs: { global: s2, runtime: this.runtimeNodeEventHub }, ctx: r2, parent: o2, isIterate: e2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.timingTarget = this.ctx.timingTargets.getTarget(i2.cBhvr.target, e2, { type: l2, index: u2, id: h2 }), this.commonTimeNode.on("seekToStart", () => this.onSeekToStart()), this.commonTimeNode.on("seekToEnd", () => this.onSeekToEnd()), this.commonTimeNode.on("timelineStart", this.basicOnTimeLineStart), this.commonTimeNode.on("timeNodeEnd", this.basicOnTimeNodeEnd);
31738
31705
  }
31739
31706
  getTargetId(t2) {
31740
31707
  let e2 = t2.id;
31741
31708
  return t2.type === "shape" && t2.txEl && (e2 = `${e2}-txEl-${t2.txEl.range[0]}`), this.commonTimeNode.isIterate && (e2 = `${e2}-iterate-${this.commonTimeNode.iterateIndex}`), e2;
31742
31709
  }
31743
31710
  }
31744
- class oR extends rR {
31711
+ class rR extends iR {
31745
31712
  constructor(t2) {
31746
31713
  super(t2), this.isConflict = false, this.activeWhenConflict = "next", this.startVal = null, this.updateStartValue = () => {
31747
- this.timingTarget && (this.startVal = iR(this.timingTarget, this.json.cBhvr.attrList[0]));
31714
+ this.timingTarget && (this.startVal = nR(this.timingTarget, this.json.cBhvr.attrList[0]));
31748
31715
  }, this.onSeekToStart = () => {
31749
31716
  const t3 = this.json.cBhvr.attrList[0];
31750
- this.startVal !== null && this.timingTarget && nR(this.timingTarget, t3, this.startVal);
31717
+ this.startVal !== null && this.timingTarget && eR(this.timingTarget, t3, this.startVal);
31751
31718
  }, this.onSeekToEnd = () => {
31752
31719
  const t3 = this.json.cBhvr.attrList[0], e2 = this.json.cBhvr.to || this.json.to;
31753
- e2 && this.timingTarget && nR(this.timingTarget, t3, e2);
31720
+ e2 && this.timingTarget && eR(this.timingTarget, t3, e2);
31754
31721
  }, this.commonTimeNode.on("timeNodeStart", this.updateStartValue), this.commonTimeNode.on("timeNodeCreate", this.updateStartValue), this.commonTimeNode.on("timeUpdate", ({ duration: t3, delta: e2 }) => {
31755
31722
  if (e2 / t3 >= 1) {
31756
31723
  const t4 = this.json.cBhvr.attrList[0];
31757
31724
  this.json.cBhvr.attrList.length > 1 && console.warn("this.json.cBhvr.attrList.length > 0");
31758
31725
  const e3 = this.json.cBhvr.to || this.json.to;
31759
- e3 && this.timingTarget && nR(this.timingTarget, t4, e3);
31726
+ e3 && this.timingTarget && eR(this.timingTarget, t4, e3);
31760
31727
  }
31761
31728
  });
31762
31729
  }
@@ -31764,7 +31731,7 @@ void main(void){
31764
31731
  return this.json.cBhvr.attrList[0];
31765
31732
  }
31766
31733
  }
31767
- var sR = function(t2, e2, n2, i2) {
31734
+ var oR = function(t2, e2, n2, i2) {
31768
31735
  var r2, o2 = arguments.length, s2 = o2 < 3 ? e2 : i2 === null ? i2 = Object.getOwnPropertyDescriptor(e2, n2) : i2;
31769
31736
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
31770
31737
  s2 = Reflect.decorate(t2, e2, n2, i2);
@@ -31773,7 +31740,7 @@ void main(void){
31773
31740
  (r2 = t2[a2]) && (s2 = (o2 < 3 ? r2(s2) : o2 > 3 ? r2(e2, n2, s2) : r2(e2, n2)) || s2);
31774
31741
  return o2 > 3 && s2 && Object.defineProperty(e2, n2, s2), s2;
31775
31742
  };
31776
- class aR {
31743
+ class sR {
31777
31744
  constructor(t2, e2) {
31778
31745
  this.math = { pi: Math.PI, e: Math.E, abs: Math.abs, acos: Math.acos, asin: Math.asin, atan: Math.atan, ceil: Math.ceil, cos: Math.cos, cosh: Math.cosh, deg: (t3) => t3 / Math.PI * 180, exp: Math.exp, floor: Math.floor, ln: Math.log, max: Math.max, min: Math.min, rad: (t3) => t3 / 180 * Math.PI, rand: Math.random, sin: Math.sin, sinh: Math.sinh, sqrt: Math.sqrt, tan: Math.tan, tanh: Math.tanh }, this.timingTarget = e2, this.val = t2.val.value, this.time = t2.time, t2.fmla && (this.fmla = this.parseFmla(t2.fmla));
31779
31746
  }
@@ -31785,7 +31752,7 @@ void main(void){
31785
31752
  }), new Function("vars", "math", "$", "return " + e2);
31786
31753
  }
31787
31754
  }
31788
- class lR extends aR {
31755
+ class aR extends sR {
31789
31756
  constructor(t2, e2, n2) {
31790
31757
  super(t2, e2), this.value = t2.val.value, n2 && (this.fmla = this.parseFmla(n2));
31791
31758
  }
@@ -31797,8 +31764,8 @@ void main(void){
31797
31764
  return t2.fmla ? t2.fmla(n2, this.math, r2) : r2;
31798
31765
  }
31799
31766
  }
31800
- sR([YE()], lR.prototype, "interpolationFrom", null);
31801
- class uR extends aR {
31767
+ oR([YE()], aR.prototype, "interpolationFrom", null);
31768
+ class lR extends sR {
31802
31769
  constructor(t2, e2) {
31803
31770
  var n2;
31804
31771
  super(t2, e2), this.value = (n2 = t2.val) === null || n2 === void 0 ? void 0 : n2.value;
@@ -31811,8 +31778,8 @@ void main(void){
31811
31778
  return this.value || "";
31812
31779
  }
31813
31780
  }
31814
- sR([YE()], uR.prototype, "interpolationFrom", null);
31815
- class hR extends aR {
31781
+ oR([YE()], lR.prototype, "interpolationFrom", null);
31782
+ class uR extends sR {
31816
31783
  constructor(t2, e2) {
31817
31784
  super(t2, e2), this.fn = this.parseFmla(this.val);
31818
31785
  }
@@ -31824,8 +31791,8 @@ void main(void){
31824
31791
  return t2.fmla ? t2.fmla(n2, this.math, r2) : r2;
31825
31792
  }
31826
31793
  }
31827
- sR([YE()], hR.prototype, "interpolationFrom", null);
31828
- class cR extends aR {
31794
+ oR([YE()], uR.prototype, "interpolationFrom", null);
31795
+ class hR extends sR {
31829
31796
  constructor(t2, e2) {
31830
31797
  super(t2, e2), this.value = t2.val.value;
31831
31798
  }
@@ -31836,11 +31803,11 @@ void main(void){
31836
31803
  return this.value;
31837
31804
  }
31838
31805
  }
31839
- sR([YE()], cR.prototype, "interpolationFrom", null);
31840
- class dR extends rR {
31806
+ oR([YE()], hR.prototype, "interpolationFrom", null);
31807
+ class cR extends iR {
31841
31808
  constructor(t2) {
31842
31809
  super(t2), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.vars = { ppt_x: 0, ppt_y: 0, ppt_w: 0, ppt_h: 0 }, this.keyFrames = [], this.isColorAnim = false, this.onTimeNodeStart = () => {
31843
- this.timingTarget && (this.startVal = iR(this.timingTarget, this.json.cBhvr.attrList[0]));
31810
+ this.timingTarget && (this.startVal = nR(this.timingTarget, this.json.cBhvr.attrList[0]));
31844
31811
  }, this.updateVars = () => {
31845
31812
  var t3, e2, n2, i2;
31846
31813
  ((t3 = this.timingTarget) === null || t3 === void 0 ? void 0 : t3.ppt_h) && (this.vars.ppt_h = this.timingTarget.ppt_h), ((e2 = this.timingTarget) === null || e2 === void 0 ? void 0 : e2.ppt_w) && (this.vars.ppt_w = this.timingTarget.ppt_w), ((n2 = this.timingTarget) === null || n2 === void 0 ? void 0 : n2.ppt_x) && (this.vars.ppt_x = this.timingTarget.ppt_x), ((i2 = this.timingTarget) === null || i2 === void 0 ? void 0 : i2.ppt_y) && (this.vars.ppt_y = this.timingTarget.ppt_y), this.isColorAnim;
@@ -31848,12 +31815,12 @@ void main(void){
31848
31815
  const n2 = e2 / t3, i2 = this.keyFrames.findIndex((t4) => n2 <= t4[0]), { attrList: r2 } = this.json.cBhvr;
31849
31816
  if (i2 < 0) {
31850
31817
  const t4 = this.keyFrames[this.keyFrames.length - 1];
31851
- return void (this.timingTarget && r2 && r2[0] && nR(this.timingTarget, r2[0], t4[1].resolveValue(this.vars)));
31818
+ return void (this.timingTarget && r2 && r2[0] && eR(this.timingTarget, r2[0], t4[1].resolveValue(this.vars)));
31852
31819
  }
31853
31820
  const o2 = i2 - 1, s2 = this.keyFrames[i2], a2 = this.keyFrames[o2] || s2, l2 = s2[0] - a2[0] == 0 ? 1 : (n2 - a2[0]) / (s2[0] - a2[0]), u2 = s2[1].interpolationFrom(a2[1], l2, this.vars);
31854
- this.timingTarget && r2 && r2[0] && nR(this.timingTarget, r2[0], u2);
31821
+ this.timingTarget && r2 && r2[0] && eR(this.timingTarget, r2[0], u2);
31855
31822
  }, this.onSeekToStart = () => {
31856
- this.startVal !== null && this.timingTarget && nR(this.timingTarget, this.json.cBhvr.attrList[0], this.startVal);
31823
+ this.startVal !== null && this.timingTarget && eR(this.timingTarget, this.json.cBhvr.attrList[0], this.startVal);
31857
31824
  }, this.onSeekToEnd = () => {
31858
31825
  this.onTimeUpdate({ duration: 1, delta: 1, isReverse: false });
31859
31826
  }, this.initKeyFrames(), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate), this.commonTimeNode.on("timelineStart", this.updateVars), this.commonTimeNode.on("timeNodeStart", this.onTimeNodeStart), this.commonTimeNode.on("timeNodeCreate", this.onTimeNodeStart);
@@ -31869,24 +31836,24 @@ void main(void){
31869
31836
  if (this.json.from || this.startVal) {
31870
31837
  const t4 = { time: 0, val: { type: "string", value: this.json.from || this.startVal.toString() }, fmla: "" };
31871
31838
  if (e2 === "num" && this.timingTarget) {
31872
- const e3 = new hR(t4, this.timingTarget);
31839
+ const e3 = new uR(t4, this.timingTarget);
31873
31840
  this.keyFrames.push([t4.time, e3]);
31874
31841
  }
31875
31842
  }
31876
31843
  const t3 = { time: 1, val: { type: "string", value: this.json.to }, fmla: "" };
31877
31844
  if (e2 === "num" && this.timingTarget) {
31878
- const e3 = new hR(t3, this.timingTarget);
31845
+ const e3 = new uR(t3, this.timingTarget);
31879
31846
  this.keyFrames.push([t3.time, e3]);
31880
31847
  }
31881
31848
  } else if (this.json.by) {
31882
31849
  const n2 = { time: 0, val: { type: "string", value: this.json.cBhvr.attrList[0] }, fmla: "" };
31883
31850
  if (e2 === "num" && this.timingTarget) {
31884
- const t3 = new hR(n2, this.timingTarget);
31851
+ const t3 = new uR(n2, this.timingTarget);
31885
31852
  this.keyFrames.push([n2.time, t3]);
31886
31853
  }
31887
31854
  const i2 = { time: 1, val: { type: "string", value: (((t2 = n2.val) === null || t2 === void 0 ? void 0 : t2.value) || "") + "+" + this.json.by }, fmla: "" };
31888
31855
  if (e2 === "num" && this.timingTarget) {
31889
- const t3 = new hR(i2, this.timingTarget);
31856
+ const t3 = new uR(i2, this.timingTarget);
31890
31857
  this.keyFrames.push([i2.time, t3]);
31891
31858
  }
31892
31859
  }
@@ -31895,15 +31862,15 @@ void main(void){
31895
31862
  for (const t3 of this.json.tavLst)
31896
31863
  if (t3.val && this.timingTarget) {
31897
31864
  let n2 = null;
31898
- t3.val.type === "string" ? e2 === "num" ? n2 = new hR(t3, this.timingTarget) : e2 === "str" && (n2 = new uR(t3, this.timingTarget)) : t3.val.type === "number" ? n2 = new lR(t3, this.timingTarget) : t3.val.type === "color" ? (this.isColorAnim = true, n2 = new cR(t3, this.timingTarget)) : t3.val.type === "boolean" && console.warn("not implements"), n2 && this.keyFrames.push([t3.time, n2]);
31865
+ t3.val.type === "string" ? e2 === "num" ? n2 = new uR(t3, this.timingTarget) : e2 === "str" && (n2 = new lR(t3, this.timingTarget)) : t3.val.type === "number" ? n2 = new aR(t3, this.timingTarget) : t3.val.type === "color" ? (this.isColorAnim = true, n2 = new hR(t3, this.timingTarget)) : t3.val.type === "boolean" && console.warn("not implements"), n2 && this.keyFrames.push([t3.time, n2]);
31899
31866
  }
31900
31867
  }
31901
31868
  }
31902
31869
  }
31903
- var pR = n(50), fR = n.n(pR), mR = n(51), gR = n.n(mR);
31904
- class vR extends Gx {
31870
+ var dR = n(50), pR = n.n(dR), fR = n(51), mR = n.n(fR);
31871
+ class gR extends Gx {
31905
31872
  constructor() {
31906
- super(gR.a, fR.a, { percent: 0, direction: 1, transition: 0 });
31873
+ super(mR.a, pR.a, { percent: 0, direction: 1, transition: 0 });
31907
31874
  }
31908
31875
  set transition(t2) {
31909
31876
  this.uniforms.transition = t2;
@@ -31915,10 +31882,10 @@ void main(void){
31915
31882
  this.uniforms.direction = t2;
31916
31883
  }
31917
31884
  }
31918
- var _R = n(52), yR = n.n(_R);
31919
- class xR extends Gx {
31885
+ var vR = n(52), _R = n.n(vR);
31886
+ class yR extends Gx {
31920
31887
  constructor() {
31921
- super(void 0, yR.a, { percent: 0, transition: 1 });
31888
+ super(void 0, _R.a, { percent: 0, transition: 1 });
31922
31889
  }
31923
31890
  set transition(t2) {
31924
31891
  this.uniforms.transition = Math.pow(t2, t2);
@@ -31927,7 +31894,7 @@ void main(void){
31927
31894
  this.uniforms.percent = t2;
31928
31895
  }
31929
31896
  }
31930
- class bR extends rR {
31897
+ class xR extends iR {
31931
31898
  constructor(t2) {
31932
31899
  var e2;
31933
31900
  super(t2), this.filterType = "", this.isConflict = true, this.activeWhenConflict = "prev", this.onTimeUpdate = ({ duration: t3, delta: e3 }) => {
@@ -31948,10 +31915,10 @@ void main(void){
31948
31915
  if (i2) {
31949
31916
  const t3 = i2[1], e3 = i2[3];
31950
31917
  if (t3 === "wipe") {
31951
- const n3 = new vR();
31918
+ const n3 = new gR();
31952
31919
  e3 === "up" ? n3.direction = 1 : e3 === "down" ? n3.direction = 2 : e3 === "left" ? n3.direction = 3 : e3 === "right" && (n3.direction = 4), this.filter = n3, this.filterType = `${t3}-${e3}`;
31953
31920
  } else if (t3 === "fade") {
31954
- const e4 = new xR();
31921
+ const e4 = new yR();
31955
31922
  this.filter = e4, this.filterType = "" + t3;
31956
31923
  }
31957
31924
  this.filter && (this.filter.transition = n2);
@@ -31961,7 +31928,7 @@ void main(void){
31961
31928
  return this.filterType;
31962
31929
  }
31963
31930
  }
31964
- class TR extends rR {
31931
+ class bR extends iR {
31965
31932
  constructor(t2) {
31966
31933
  super(t2), this.isConflict = true, this.activeWhenConflict = "next", this.startPos = null, this.onTimeNodeStart = () => {
31967
31934
  var t3, e2;
@@ -32014,7 +31981,7 @@ void main(void){
32014
31981
  this.path = e2;
32015
31982
  }
32016
31983
  }
32017
- class wR extends rR {
31984
+ class TR extends iR {
32018
31985
  constructor(t2) {
32019
31986
  super(t2), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.onTimelineStart = (t3) => {
32020
31987
  t3.isReverse || this.updateCurrentValue();
@@ -32044,34 +32011,34 @@ void main(void){
32044
32011
  this.timingTarget && (this.current = { x: this.timingTarget.scale.x, y: this.timingTarget.scale.y });
32045
32012
  }
32046
32013
  }
32047
- class SR extends rR {
32014
+ class wR extends iR {
32048
32015
  constructor(t2) {
32049
32016
  super(t2), this.isConflict = false, this.activeWhenConflict = "next", this.isTimelineStart = false, this.startColorString = null, this.currentColorString = "#FFFFFFFF", this.onTimelineStart = (t3) => {
32050
32017
  if (this.isTimelineStart)
32051
32018
  return;
32052
32019
  this.isTimelineStart = true, t3.isReverse || this.updateCurrentValue(), this.from.isInit() || this.from.fromHexString(this.currentColorString), this.to.isInit() || this.from.by(this.by, this.to);
32053
32020
  const [e2] = this.json.cBhvr.attrList[0].split(".");
32054
- nR(this.timingTarget, e2 + ".on", "true");
32021
+ eR(this.timingTarget, e2 + ".on", "true");
32055
32022
  }, this.onTimeNodeEnd = () => {
32056
32023
  if (this.json.cBhvr.ctn.fill === "remove") {
32057
32024
  const [t3] = this.json.cBhvr.attrList[0].split(".");
32058
- nR(this.timingTarget, t3 + ".on", "false");
32025
+ eR(this.timingTarget, t3 + ".on", "false");
32059
32026
  }
32060
32027
  this.isTimelineStart = false;
32061
32028
  }, this.onSeekToStart = () => {
32062
32029
  var t3;
32063
32030
  if (this.timingTarget && (this.onTimeUpdate({ duration: 1, delta: 0 }), ((t3 = this.timingTarget.fill) === null || t3 === void 0 ? void 0 : t3.designColor.toUpperCase()) === this.from.toHexString().toUpperCase())) {
32064
32031
  const [t4] = this.json.cBhvr.attrList[0].split(".");
32065
- nR(this.timingTarget, t4 + ".on", "false");
32032
+ eR(this.timingTarget, t4 + ".on", "false");
32066
32033
  }
32067
32034
  }, this.onTimeNodeStart = () => {
32068
32035
  if (this.timingTarget) {
32069
- const t3 = iR(this.timingTarget, this.json.cBhvr.attrList[0]);
32036
+ const t3 = nR(this.timingTarget, this.json.cBhvr.attrList[0]);
32070
32037
  t3 && (this.startColorString = t3);
32071
32038
  }
32072
32039
  }, this.onTimeUpdate = ({ delta: t3, duration: e2 }) => {
32073
32040
  const n2 = t3 / e2;
32074
- this.to.interpolationFrom(this.from, n2, this.target), this.timingTarget && nR(this.timingTarget, this.json.cBhvr.attrList[0], this.target.toHexString());
32041
+ this.to.interpolationFrom(this.from, n2, this.target), this.timingTarget && eR(this.timingTarget, this.json.cBhvr.attrList[0], this.target.toHexString());
32075
32042
  }, this.onSeekToEnd = () => {
32076
32043
  this.isTimelineStart || this.onTimelineStart({ isReverse: false, activeCount: 0, id: "" }), this.onTimeUpdate({ duration: 1, delta: 1 });
32077
32044
  }, this.json.clrSpc === "rgb" ? (this.from = new IM(this.json.from), this.to = new IM(this.json.to), this.by = new IM(this.json.by), this.target = new IM()) : (this.from = new CM(this.json.from), this.to = new CM(this.json.to), this.by = new CM(this.json.by), this.target = new CM()), this.commonTimeNode.on("timeNodeStart", this.onTimeNodeStart), this.commonTimeNode.on("timeNodeCreate", this.onTimeNodeStart), this.commonTimeNode.on("timelineStart", this.onTimelineStart), this.commonTimeNode.on("timeNodeEnd", this.onTimeNodeEnd), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate);
@@ -32081,12 +32048,12 @@ void main(void){
32081
32048
  }
32082
32049
  updateCurrentValue() {
32083
32050
  if (this.timingTarget) {
32084
- const t2 = iR(this.timingTarget, this.json.cBhvr.attrList[0]);
32051
+ const t2 = nR(this.timingTarget, this.json.cBhvr.attrList[0]);
32085
32052
  t2 && (this.currentColorString = t2);
32086
32053
  }
32087
32054
  }
32088
32055
  }
32089
- class ER extends rR {
32056
+ class SR extends iR {
32090
32057
  constructor(t2) {
32091
32058
  super(t2), this.isConflict = false, this.activeWhenConflict = "next", this.startVal = null, this.lastVal = null, this.onTimelineStart = (t3) => {
32092
32059
  this.lastVal = null, t3.isReverse || this.updateCurrentValue();
@@ -32119,7 +32086,7 @@ void main(void){
32119
32086
  this.currentVal = (t2 = this.timingTarget) === null || t2 === void 0 ? void 0 : t2.r;
32120
32087
  }
32121
32088
  }
32122
- class MR extends rR {
32089
+ class ER extends iR {
32123
32090
  constructor(t2) {
32124
32091
  super(t2), this.isConflict = false, this.activeWhenConflict = "next", this.isApplied = false, this.onTimeUpdate = () => {
32125
32092
  var t3, e2;
@@ -32140,22 +32107,24 @@ void main(void){
32140
32107
  return ((e2 = (t2 = this.json) === null || t2 === void 0 ? void 0 : t2.cmd) !== null && e2 !== void 0 ? e2 : "") + ((i2 = (n2 = this.json) === null || n2 === void 0 ? void 0 : n2.cmdType) !== null && i2 !== void 0 ? i2 : "");
32141
32108
  }
32142
32109
  }
32143
- class AR {
32110
+ class MR {
32144
32111
  constructor(t2) {
32145
- this.runtimeNodeEventHub = new a.a(), this.stopAudio = () => {
32112
+ this.runtimeNodeEventHub = new a.a(), this.onVolumeUpdate = (t3) => {
32113
+ this.audio.volume(t3);
32114
+ }, this.stopAudio = () => {
32146
32115
  this.audio.stop();
32147
32116
  }, this.destroy = () => {
32148
- this.stopAudio(), this.audio.destroy(), this.ctx.activeMedia.delete(this.audio);
32117
+ this.stopAudio(), this.audio.destroy(), this.ctx.activeMedia.delete(this.audio), this.ctx.volumeAdjuster.off("update", this.onVolumeUpdate);
32149
32118
  };
32150
32119
  const { json: e2, isIterate: n2, isSub: i2, eventHub: r2, ctx: o2, parent: s2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t2;
32151
- this.json = e2, this.id = e2.cMediaNode.ctn.id, this.commonTimeNode = new PR({ json: e2.cMediaNode.ctn, isSub: i2, eventHubs: { global: r2, runtime: this.runtimeNodeEventHub }, ctx: o2, parent: s2, isIterate: n2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 });
32120
+ this.json = e2, this.id = e2.cMediaNode.ctn.id, this.commonTimeNode = new RR({ json: e2.cMediaNode.ctn, isSub: i2, eventHubs: { global: r2, runtime: this.runtimeNodeEventHub }, ctx: o2, parent: s2, isIterate: n2, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 });
32152
32121
  let d2 = e2.cMediaNode.tgtEl;
32153
- o2.loaderDelegate && (d2 = o2.loaderDelegate.redirectMedia(d2), o2.logger.info(`redirect media url from ${e2.cMediaNode.tgtEl} to ${d2} by delegate.`, o2.taskId)), this.audio = new XA(d2, o2.runningAudio), o2.activeMedia.add(this.audio), this.commonTimeNode.on("timelineStart", () => {
32154
- this.audio.play();
32155
- }), this.commonTimeNode.on("seekToStart", this.stopAudio), this.commonTimeNode.on("seekToEnd", this.stopAudio), this.commonTimeNode.on("timeNodeDestroy", this.destroy), this.ctx = o2;
32122
+ o2.loaderDelegate && (d2 = o2.loaderDelegate.redirectMedia(d2), o2.logger.info(`redirect media url from ${e2.cMediaNode.tgtEl} to ${d2} by delegate.`, o2.taskId)), this.audio = new WA(d2, o2.runningAudio), o2.activeMedia.add(this.audio), this.commonTimeNode.on("timelineStart", () => {
32123
+ this.audio.volume(o2.volumeAdjuster.volume), this.audio.play();
32124
+ }), this.commonTimeNode.on("seekToStart", this.stopAudio), this.commonTimeNode.on("seekToEnd", this.stopAudio), this.commonTimeNode.on("timeNodeDestroy", this.destroy), this.ctx = o2, this.ctx.volumeAdjuster.on("update", this.onVolumeUpdate);
32156
32125
  }
32157
32126
  }
32158
- var RR = function(t2, e2, n2, i2) {
32127
+ var AR = function(t2, e2, n2, i2) {
32159
32128
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32160
32129
  function s2(t3) {
32161
32130
  try {
@@ -32180,7 +32149,7 @@ void main(void){
32180
32149
  l2((i2 = i2.apply(t2, e2 || [])).next());
32181
32150
  });
32182
32151
  };
32183
- class PR extends a.a {
32152
+ class RR extends a.a {
32184
32153
  constructor(t2) {
32185
32154
  var e2, n2;
32186
32155
  super(), this.uuid = Date.now().toString(32) + Math.random().toString(32).substring(2), this.isSub = false, this.isShadow = false, this.startCount = 0, this.applyCount = 0, this.isReverse = false, this.isConflictDispose = false, this.isIterateEnd = false, this.parentTimeNode = null, this.isActive = false, this.isDestroy = false, this.shouldSeekOnStart = false, this.repeatTimeoutId = "", this.iterateShadows = [], this.isEndEventsEmitted = false, this.tmFilter = [], this.timeDelta = 0, this.isIterate = false, this.iterateType = "el", this.iterateIndex = 0, this.children = [], this.subList = [], this.duration = 0, this.isNegativeSpeed = false, this.handleEndCond = () => {
@@ -32201,7 +32170,7 @@ void main(void){
32201
32170
  const { isSub: i2, isIterate: r2, ctx: o2, eventHubs: s2, parent: a2, json: l2, iterateType: u2, iterateId: h2, iterateIndex: c2, isInInteractiveSeq: d2 } = t2;
32202
32171
  this.isSub = i2, this.isInInteractiveSeq = d2, this.isIterate = r2, this.parentTimeNode = a2, this.json = l2, this.ctx = o2, this.iterateIndex = c2, this.eventHubs = s2, this.iterateType = u2, this.iterateId = h2, this.tmFilter = (n2 = (e2 = l2.tmFilter) === null || e2 === void 0 ? void 0 : e2.split(";").map((t3) => t3.split(",").map((t4) => parseFloat(t4.trim())))) !== null && n2 !== void 0 ? n2 : [];
32203
32172
  const p2 = Number(this.json.dur), f2 = this.json.spd || 1;
32204
- this.isNegativeSpeed = f2 < 0, Number.isNaN(p2) || (this.duration = p2 / Math.abs(f2)), this.uuid += "--" + this.json.id, this.setPreStyle(), l2.childTnLst && this.createChildren(l2.childTnLst), this.startConds = new tR(this.json.id || "", l2.stCondLst, s2, this.ctx), this.endConds = new tR(this.json.id || "", l2.endCondLst, s2, this.ctx), l2.endSync && (this.endSync = new tR(this.json.id || "", [l2.endSync], s2, this.ctx), this.endSync.on("active", () => {
32173
+ this.isNegativeSpeed = f2 < 0, Number.isNaN(p2) || (this.duration = p2 / Math.abs(f2)), this.uuid += "--" + this.json.id, this.setPreStyle(), l2.childTnLst && this.createChildren(l2.childTnLst), this.startConds = new QA(this.json.id || "", l2.stCondLst, s2, this.ctx), this.endConds = new QA(this.json.id || "", l2.endCondLst, s2, this.ctx), l2.endSync && (this.endSync = new QA(this.json.id || "", [l2.endSync], s2, this.ctx), this.endSync.on("active", () => {
32205
32174
  var t3;
32206
32175
  this.json.nodeType === "interactiveSeq" && (this.isActive = false, this.shouldSeekOnStart = true, this.emit("timeNodeEndSync"), (t3 = this.endSync) === null || t3 === void 0 || t3.reset());
32207
32176
  })), this.startConds.on("active", (t3) => {
@@ -32219,7 +32188,7 @@ void main(void){
32219
32188
  n3 === t2 && (e2 = false, this.ctx.eventHub.removeListener("IterateTimeNodeEnd", i2));
32220
32189
  };
32221
32190
  for (this.ctx.eventHub.on("IterateTimeNodeEnd", i2); e2; ) {
32222
- const e3 = JSON.parse(JSON.stringify(this.json)), i3 = new PR({ json: e3, isSub: false, eventHubs: this.eventHubs, ctx: this.ctx, parent: null, isIterate: true, iterateType: e3.iterate.type, iterateIndex: n2, iterateId: t2, isInInteractiveSeq: this.isInInteractiveSeq });
32191
+ const e3 = JSON.parse(JSON.stringify(this.json)), i3 = new RR({ json: e3, isSub: false, eventHubs: this.eventHubs, ctx: this.ctx, parent: null, isIterate: true, iterateType: e3.iterate.type, iterateIndex: n2, iterateId: t2, isInInteractiveSeq: this.isInInteractiveSeq });
32223
32192
  this.iterateShadows[n2] = i3, n2 += 1;
32224
32193
  }
32225
32194
  }
@@ -32235,7 +32204,7 @@ void main(void){
32235
32204
  createTimeNode(t2, e2) {
32236
32205
  let n2 = null;
32237
32206
  const i2 = { json: t2, isSub: e2, isIterate: this.isIterate, eventHub: this.eventHubs.global, ctx: this.ctx, parent: this, iterateType: this.iterateType, iterateIndex: this.iterateIndex, iterateId: this.iterateId, isInInteractiveSeq: this.isInInteractiveSeq };
32238
- return t2.type === "seq" ? n2 = new eR(i2) : t2.type === "par" ? n2 = new CR(i2) : t2.type === "set" ? n2 = new oR(i2) : t2.type === "anim" ? n2 = new dR(i2) : t2.type === "animEffect" ? n2 = new bR(i2) : t2.type === "animMotion" ? n2 = new TR(i2) : t2.type === "animScale" ? n2 = new wR(i2) : t2.type === "animClr" ? n2 = new SR(i2) : t2.type === "animRot" ? n2 = new ER(i2) : t2.type === "cmd" ? n2 = new MR(i2) : t2.type === "audio" && (n2 = new AR(i2)), n2;
32207
+ return t2.type === "seq" ? n2 = new tR(i2) : t2.type === "par" ? n2 = new PR(i2) : t2.type === "set" ? n2 = new rR(i2) : t2.type === "anim" ? n2 = new cR(i2) : t2.type === "animEffect" ? n2 = new xR(i2) : t2.type === "animMotion" ? n2 = new bR(i2) : t2.type === "animScale" ? n2 = new TR(i2) : t2.type === "animClr" ? n2 = new wR(i2) : t2.type === "animRot" ? n2 = new SR(i2) : t2.type === "cmd" ? n2 = new ER(i2) : t2.type === "audio" && (n2 = new MR(i2)), n2;
32239
32208
  }
32240
32209
  createSubList(t2) {
32241
32210
  this.subList && this.subList.forEach((t3) => t3.commonTimeNode.destroy()), this.subList = [], t2.forEach((t3) => {
@@ -32308,7 +32277,7 @@ void main(void){
32308
32277
  })) : this.duration > e2 && (this.ctx.eventHub.emit($R.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
32309
32278
  }
32310
32279
  startIterate() {
32311
- return RR(this, void 0, void 0, function* () {
32280
+ return AR(this, void 0, void 0, function* () {
32312
32281
  if (this.json.iterate) {
32313
32282
  this.isIterateEnd = false;
32314
32283
  for (const t2 of this.iterateShadows) {
@@ -32449,11 +32418,11 @@ void main(void){
32449
32418
  this.emit("timeNodeDestroy"), this.isDestroy = true, this.dispose(), this.startConds.removeAllListeners(), this.endConds.removeAllListeners(), this.children.forEach((t2) => t2.commonTimeNode.destroy()), this.clearSubList();
32450
32419
  }
32451
32420
  }
32452
- class CR extends a.a {
32421
+ class PR extends a.a {
32453
32422
  constructor(t2) {
32454
32423
  super(), this.isRunning = false, this.runtimeNodeEventHub = new a.a();
32455
32424
  const { json: e2, iterateType: n2, isIterate: i2, isSub: r2, parent: o2, ctx: s2, eventHub: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t2;
32456
- this.id = e2.ctn.id, this.json = e2, this.ctx = s2, this.isIterate = i2, this.globalEventHub = l2, this.commonTimeNode = new PR({ json: e2.ctn, isSub: r2, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s2, parent: o2, isIterate: false, iterateType: n2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.commonTimeNode.on("timeNodeStart", () => {
32425
+ this.id = e2.ctn.id, this.json = e2, this.ctx = s2, this.isIterate = i2, this.globalEventHub = l2, this.commonTimeNode = new RR({ json: e2.ctn, isSub: r2, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s2, parent: o2, isIterate: false, iterateType: n2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.commonTimeNode.on("timeNodeStart", () => {
32457
32426
  this.commonTimeNode.children.forEach((t3) => {
32458
32427
  t3.commonTimeNode.setReverse(this.commonTimeNode.getReverse()), t3.commonTimeNode.startTimeNode();
32459
32428
  }), this.isRunning || (this.isRunning = true, this.globalEventHub.emit(`runtime ${this.id} begin`), this.emit("begin"));
@@ -32466,7 +32435,7 @@ void main(void){
32466
32435
  });
32467
32436
  }
32468
32437
  }
32469
- var IR = function(t2, e2, n2, i2) {
32438
+ var CR = function(t2, e2, n2, i2) {
32470
32439
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32471
32440
  function s2(t3) {
32472
32441
  try {
@@ -32491,11 +32460,11 @@ void main(void){
32491
32460
  l2((i2 = i2.apply(t2, e2 || [])).next());
32492
32461
  });
32493
32462
  };
32494
- class OR {
32463
+ class IR {
32495
32464
  constructor(t2, e2, n2) {
32496
32465
  this.json = t2, this.ctx = n2, this.globalEventHub = e2;
32497
32466
  const i2 = t2.timeNodeList.find((t3) => t3.type === "par" && t3.ctn.nodeType === "tmRoot");
32498
- i2 && (this.tmRoot = new CR({ json: i2, isSub: false, isIterate: false, eventHub: e2, ctx: n2, parent: null, iterateType: "el", iterateIndex: 0, iterateId: "", isInInteractiveSeq: false }), this.mainSeq = this.tmRoot.commonTimeNode.children.find((t3) => {
32467
+ i2 && (this.tmRoot = new PR({ json: i2, isSub: false, isIterate: false, eventHub: e2, ctx: n2, parent: null, iterateType: "el", iterateIndex: 0, iterateId: "", isInInteractiveSeq: false }), this.mainSeq = this.tmRoot.commonTimeNode.children.find((t3) => {
32499
32468
  var e3, n3, i3;
32500
32469
  return ((e3 = t3.json) === null || e3 === void 0 ? void 0 : e3.type) === "seq" && ((i3 = (n3 = t3.json) === null || n3 === void 0 ? void 0 : n3.ctn) === null || i3 === void 0 ? void 0 : i3.nodeType) === "mainSeq";
32501
32470
  }));
@@ -32509,7 +32478,7 @@ void main(void){
32509
32478
  }
32510
32479
  start() {
32511
32480
  var t2, e2;
32512
- return IR(this, void 0, void 0, function* () {
32481
+ return CR(this, void 0, void 0, function* () {
32513
32482
  this.json.autoPlayMainSeq ? (yield this.ctx.clock.delay(16), (t2 = this.mainSeq) === null || t2 === void 0 || t2.commonTimeNode.startTimeNode()) : (e2 = this.mainSeq) === null || e2 === void 0 || e2.commonTimeNode.startTimeNode();
32514
32483
  });
32515
32484
  }
@@ -32567,7 +32536,7 @@ void main(void){
32567
32536
  this.globalEventHub.emit(t2);
32568
32537
  }
32569
32538
  }
32570
- var LR = function(t2, e2, n2, i2) {
32539
+ var OR = function(t2, e2, n2, i2) {
32571
32540
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32572
32541
  function s2(t3) {
32573
32542
  try {
@@ -32592,7 +32561,7 @@ void main(void){
32592
32561
  l2((i2 = i2.apply(t2, e2 || [])).next());
32593
32562
  });
32594
32563
  };
32595
- class NR extends QA {
32564
+ class LR extends KA {
32596
32565
  constructor(t2, e2, n2, i2) {
32597
32566
  super({ id: "stage", width: t2.width, height: t2.height, type: "Container", children: t2.children }, e2, n2, void 0, i2), this.isRendered = false, this.isTimingStartValueCollected = false, this.json = t2, e2.hasBackgroundFillShape = this.detectUseBackgroundFill(this.json), this.container.visible = false, this.ctx = e2;
32598
32567
  const r2 = new Aw();
@@ -32614,7 +32583,7 @@ void main(void){
32614
32583
  render(t2) {
32615
32584
  if (this.isRendered)
32616
32585
  return;
32617
- this.collectAnimatedIds().forEach((t3) => this.ctx.animatedIds.add(t3)), this.isRendered = true, super.render(t2), t2.addSubMTask(() => LR(this, void 0, void 0, function* () {
32586
+ this.collectAnimatedIds().forEach((t3) => this.ctx.animatedIds.add(t3)), this.isRendered = true, super.render(t2), t2.addSubMTask(() => OR(this, void 0, void 0, function* () {
32618
32587
  this.ctx.eventHub.emit("StageRenderEnd");
32619
32588
  }), "@StageImpl[emit.StageRenderEnd]");
32620
32589
  }
@@ -32637,7 +32606,7 @@ void main(void){
32637
32606
  }), t2;
32638
32607
  }
32639
32608
  createTiming() {
32640
- this.json.timing && !this.timing && (this.timing = new OR(this.json.timing, this.ctx.timingEventHub, this.ctx));
32609
+ this.json.timing && !this.timing && (this.timing = new IR(this.json.timing, this.ctx.timingEventHub, this.ctx));
32641
32610
  }
32642
32611
  startTiming() {
32643
32612
  var t2;
@@ -32711,7 +32680,7 @@ void main(void){
32711
32680
  (i2 = this.timing) === null || i2 === void 0 || i2.setInteractiveSeqState(t2, e2, n2);
32712
32681
  }
32713
32682
  setMediaState(t2, e2) {
32714
- return LR(this, void 0, void 0, function* () {
32683
+ return OR(this, void 0, void 0, function* () {
32715
32684
  const n2 = this.ctx.medias[t2];
32716
32685
  n2 && (e2 ? yield n2.play() : yield n2.pause());
32717
32686
  });
@@ -32721,7 +32690,7 @@ void main(void){
32721
32690
  n2 && n2.seek(e2);
32722
32691
  }
32723
32692
  }
32724
- class DR {
32693
+ class NR {
32725
32694
  constructor(t2) {
32726
32695
  this.ticker = t2, this.tasks = [], this.couldRunning = false, this.applyNext = () => {
32727
32696
  const t3 = this.tasks[0];
@@ -32744,7 +32713,7 @@ void main(void){
32744
32713
  this.couldRunning = false;
32745
32714
  }
32746
32715
  }
32747
- var FR = function(t2, e2, n2, i2) {
32716
+ var DR = function(t2, e2, n2, i2) {
32748
32717
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32749
32718
  function s2(t3) {
32750
32719
  try {
@@ -32769,8 +32738,8 @@ void main(void){
32769
32738
  l2((i2 = i2.apply(t2, e2 || [])).next());
32770
32739
  });
32771
32740
  };
32772
- const BR = (t2) => new Promise((e2) => setTimeout(e2, t2));
32773
- class UR extends a.a {
32741
+ const FR = (t2) => new Promise((e2) => setTimeout(e2, t2));
32742
+ class BR extends a.a {
32774
32743
  constructor(t2, e2, n2) {
32775
32744
  super(), this.slideIndex = t2, this.taskId = e2, this.logger = n2, this.uuid = eM(), this.isCancel = false, this.tasks = [];
32776
32745
  }
@@ -32802,10 +32771,10 @@ void main(void){
32802
32771
  }));
32803
32772
  }
32804
32773
  applyAll() {
32805
- return FR(this, void 0, void 0, function* () {
32774
+ return DR(this, void 0, void 0, function* () {
32806
32775
  for (; !this.tasks.every((t2) => t2.state === "finish"); )
32807
32776
  if (this.tasks.some((t2) => t2.state === "running"))
32808
- yield BR(16);
32777
+ yield FR(16);
32809
32778
  else {
32810
32779
  if (this.tasks.some((t2) => t2.state === "error"))
32811
32780
  return;
@@ -32832,16 +32801,16 @@ void main(void){
32832
32801
  });
32833
32802
  }
32834
32803
  }
32835
- var kR = n(53);
32836
- const GR = new (n.n(kR)).a(), HR = GR.getDevice(), zR = GR.getBrowser(), jR = GR.getOS(), VR = { isDesktop() {
32804
+ var UR = n(53);
32805
+ const kR = new (n.n(UR)).a(), GR = kR.getDevice(), HR = kR.getBrowser(), zR = kR.getOS(), jR = { isDesktop() {
32837
32806
  let t2 = true;
32838
- return HR.type === "mobile" && (t2 = false), /Samsung/.test(zR.name || "") && (t2 = false), window.__nativeTags && window.__nativeTags.platform && (t2 = false), t2;
32807
+ return GR.type === "mobile" && (t2 = false), /Samsung/.test(HR.name || "") && (t2 = false), window.__nativeTags && window.__nativeTags.platform && (t2 = false), t2;
32839
32808
  }, isIOS() {
32840
32809
  let t2 = false;
32841
- return window.__nativeTags && window.__nativeTags.platform && /^ios/i.test(window.__nativeTags.platform) && (t2 = true), jR.name && /iOS/.test(jR.name) && (t2 = true), t2;
32810
+ return window.__nativeTags && window.__nativeTags.platform && /^ios/i.test(window.__nativeTags.platform) && (t2 = true), zR.name && /iOS/.test(zR.name) && (t2 = true), t2;
32842
32811
  }, isAndroid() {
32843
32812
  let t2 = false;
32844
- return window.__nativeTags && window.__nativeTags.platform && /^android/i.test(window.__nativeTags.platform) && (t2 = true), jR.name && /android/i.test(jR.name) && (t2 = true), t2;
32813
+ return window.__nativeTags && window.__nativeTags.platform && /^android/i.test(window.__nativeTags.platform) && (t2 = true), zR.name && /android/i.test(zR.name) && (t2 = true), t2;
32845
32814
  }, isLowGpuMemory() {
32846
32815
  var t2, e2;
32847
32816
  const n2 = (e2 = (t2 = window.__nativeTags) === null || t2 === void 0 ? void 0 : t2.platform) !== null && e2 !== void 0 ? e2 : "";
@@ -32862,7 +32831,7 @@ void main(void){
32862
32831
  }
32863
32832
  return true;
32864
32833
  } };
32865
- var WR = function(t2, e2, n2, i2) {
32834
+ var VR = function(t2, e2, n2, i2) {
32866
32835
  return new (n2 || (n2 = Promise))(function(r2, o2) {
32867
32836
  function s2(t3) {
32868
32837
  try {
@@ -32887,23 +32856,23 @@ void main(void){
32887
32856
  l2((i2 = i2.apply(t2, e2 || [])).next());
32888
32857
  });
32889
32858
  };
32890
- class XR {
32891
- constructor(t2, e2, n2, i2, r2, o2, s2, a2, l2, u2, h2, c2, d2) {
32892
- this.loader = t2, this.mode = e2, this.renderer = n2, this.ticker = i2, this.view = r2, this.clock = o2, this.objPoolGroup = s2, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, this.currentStageIndex = 0, this.cacheCount = VR.isDesktop() ? 2 : 1, this.stageStates = /* @__PURE__ */ Object.create(null), this.stageJsons = /* @__PURE__ */ Object.create(null), this.stageCtxs = /* @__PURE__ */ Object.create(null), this.stageImpls = /* @__PURE__ */ Object.create(null), this.taskId = "", this.url = "", this.runningAudio = /* @__PURE__ */ new Map(), this.activeMedia = /* @__PURE__ */ new Set(), this.microTaskManager = new DR(i2);
32859
+ class WR {
32860
+ constructor(t2, e2, n2, i2, r2, o2, s2, a2, l2, u2, h2, c2, d2, p2) {
32861
+ this.loader = t2, this.mode = e2, this.renderer = n2, this.ticker = i2, this.view = r2, this.clock = o2, this.objPoolGroup = s2, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, this.volumeAdjuster = p2, this.currentStageIndex = 0, this.cacheCount = jR.isDesktop() ? 2 : 1, this.stageStates = /* @__PURE__ */ Object.create(null), this.stageJsons = /* @__PURE__ */ Object.create(null), this.stageCtxs = /* @__PURE__ */ Object.create(null), this.stageImpls = /* @__PURE__ */ Object.create(null), this.taskId = "", this.url = "", this.runningAudio = /* @__PURE__ */ new Map(), this.activeMedia = /* @__PURE__ */ new Set(), this.microTaskManager = new NR(i2);
32893
32862
  }
32894
32863
  setResourceData(t2, e2) {
32895
32864
  this.taskId = t2, this.url = e2;
32896
32865
  }
32897
32866
  createCtx(t2) {
32898
32867
  const { task: e2 } = this.stageStates[t2];
32899
- e2.addMTask(() => WR(this, void 0, void 0, function* () {
32900
- const e3 = new dM(this.loader), n2 = new a.a(), i2 = { taskId: this.taskId, mode: this.mode, renderer: this.renderer, graphicsTexture: new bM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new wM(n2), eventHub: n2, view: this.view, medias: /* @__PURE__ */ Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new TM(), clock: this.clock, spriteTexture: e3, slideIndex: t2, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false, slideScopeEventHub: new a.a(), logger: this.logger, loaderDelegate: this.loaderDelegate, runningAudio: this.runningAudio, activeMedia: this.activeMedia, isPlayerPaused: this.isPlayerPaused, timingEventHub: new a.a(), maxResolution: this.maxResolution, animatedIds: /* @__PURE__ */ new Set() };
32868
+ e2.addMTask(() => VR(this, void 0, void 0, function* () {
32869
+ const e3 = new dM(this.loader), n2 = new a.a(), i2 = { taskId: this.taskId, mode: this.mode, renderer: this.renderer, graphicsTexture: new bM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new wM(n2), eventHub: n2, view: this.view, medias: /* @__PURE__ */ Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new TM(), clock: this.clock, spriteTexture: e3, slideIndex: t2, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false, slideScopeEventHub: new a.a(), logger: this.logger, loaderDelegate: this.loaderDelegate, runningAudio: this.runningAudio, activeMedia: this.activeMedia, isPlayerPaused: this.isPlayerPaused, timingEventHub: new a.a(), maxResolution: this.maxResolution, animatedIds: /* @__PURE__ */ new Set(), volumeAdjuster: this.volumeAdjuster };
32901
32870
  this.stageCtxs[t2] = i2;
32902
32871
  }), "@StagePool[createCtx]");
32903
32872
  }
32904
32873
  loadStageJson(t2) {
32905
32874
  const { task: e2 } = this.stageStates[t2];
32906
- e2.addMTask(() => WR(this, void 0, void 0, function* () {
32875
+ e2.addMTask(() => VR(this, void 0, void 0, function* () {
32907
32876
  const e3 = yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t2}.json`);
32908
32877
  this.stageJsons[t2] = e3, this.stageCtxs[t2].stageWidth = e3.width, this.stageCtxs[t2].stageHeight = e3.height;
32909
32878
  }), "@StagePool[loadStageJson]");
@@ -32928,7 +32897,7 @@ void main(void){
32928
32897
  createStage(t2) {
32929
32898
  const { task: e2 } = this.stageStates[t2];
32930
32899
  e2.addMTask(() => {
32931
- const n2 = this.stageJsons[t2], i2 = this.stageCtxs[t2], r2 = new NR(n2, i2, { x: 0, y: 0 }, e2);
32900
+ const n2 = this.stageJsons[t2], i2 = this.stageCtxs[t2], r2 = new LR(n2, i2, { x: 0, y: 0 }, e2);
32932
32901
  return this.stageImpls[t2] = r2, Promise.resolve();
32933
32902
  }, "@StagePool[createStage]");
32934
32903
  }
@@ -32938,7 +32907,7 @@ void main(void){
32938
32907
  }
32939
32908
  createGraphicsTexture(t2) {
32940
32909
  const { task: e2 } = this.stageStates[t2];
32941
- e2.addMTask(() => WR(this, void 0, void 0, function* () {
32910
+ e2.addMTask(() => VR(this, void 0, void 0, function* () {
32942
32911
  const n2 = this.stageCtxs[t2];
32943
32912
  n2.graphicsTexture.pack().forEach((t3, i2) => {
32944
32913
  e2.addSubMTask(() => n2.graphicsTexture.render(t3, i2, this.objPoolGroup), "@StagePool[graphicsTexture.render]");
@@ -32947,9 +32916,9 @@ void main(void){
32947
32916
  }
32948
32917
  renderStage(t2) {
32949
32918
  const { task: e2 } = this.stageStates[t2];
32950
- e2.addMTask(() => WR(this, void 0, void 0, function* () {
32919
+ e2.addMTask(() => VR(this, void 0, void 0, function* () {
32951
32920
  const n2 = this.stageImpls[t2], i2 = this.stageCtxs[t2];
32952
- yield n2.render(e2), e2.addSubMTask(() => WR(this, void 0, void 0, function* () {
32921
+ yield n2.render(e2), e2.addSubMTask(() => VR(this, void 0, void 0, function* () {
32953
32922
  var e3;
32954
32923
  const r2 = `snapshot-${t2.toString()}-start`;
32955
32924
  if (!(yield (e3 = this.localstorage) === null || e3 === void 0 ? void 0 : e3.getItem(r2)) && KR.platform.isLowGpuMemory()) {
@@ -32982,7 +32951,7 @@ void main(void){
32982
32951
  preload(t2, e2 = false) {
32983
32952
  if (this.stageImpls[t2] || this.stageStates[t2])
32984
32953
  return Promise.resolve();
32985
- const n2 = new UR(t2, this.taskId, this.logger);
32954
+ const n2 = new BR(t2, this.taskId, this.logger);
32986
32955
  return n2.on("task-error", (t3, e3) => {
32987
32956
  delete this.stageStates[e3], delete this.stageImpls[e3], delete this.stageCtxs[e3], this.errorChannel.emit("error", t3, e3);
32988
32957
  }), this.stageStates[t2] = { state: "load", task: n2 }, this.createCtx(t2), this.loadStageJson(t2), this.loadSpriteSheets(t2), this.createStage(t2), this.preRenderStage(t2), this.createGraphicsTexture(t2), this.renderStage(t2), this.microTaskManager.addTask(n2), e2 ? n2.applyAll() : new Promise((e3) => {
@@ -32996,7 +32965,7 @@ void main(void){
32996
32965
  return this.stageJsons[t2] || null;
32997
32966
  }
32998
32967
  getStage(t2) {
32999
- return WR(this, void 0, void 0, function* () {
32968
+ return VR(this, void 0, void 0, function* () {
33000
32969
  this.currentStageIndex = t2;
33001
32970
  const e2 = this.stageStates[t2];
33002
32971
  return (e2 == null ? void 0 : e2.state) === "finish" && this.stageImpls[t2] ? this.stageImpls[t2] : (e2 == null ? void 0 : e2.state) === "load" ? (yield e2.task.applyAll(), this.stageImpls[t2]) : (yield this.preload(t2, true), this.stageImpls[t2]);
@@ -33006,7 +32975,7 @@ void main(void){
33006
32975
  this.runningAudio.clear();
33007
32976
  }
33008
32977
  }
33009
- var qR = function(t2, e2, n2, i2) {
32978
+ var XR = function(t2, e2, n2, i2) {
33010
32979
  return new (n2 || (n2 = Promise))(function(r2, o2) {
33011
32980
  function s2(t3) {
33012
32981
  try {
@@ -33031,10 +33000,10 @@ void main(void){
33031
33000
  l2((i2 = i2.apply(t2, e2 || [])).next());
33032
33001
  });
33033
33002
  };
33034
- class YR {
33003
+ class qR {
33035
33004
  constructor(t2) {
33036
33005
  var e2;
33037
- this.logger = t2, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e2 = YR.localCache) === null || e2 === void 0 || e2.ready(() => {
33006
+ this.logger = t2, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e2 = qR.localCache) === null || e2 === void 0 || e2.ready(() => {
33038
33007
  this.isIndexDBReady = true;
33039
33008
  }).catch(() => {
33040
33009
  t2.warn("local storage not ready", this.taskId);
@@ -33047,17 +33016,17 @@ void main(void){
33047
33016
  this.taskId = t2;
33048
33017
  }
33049
33018
  getItem(t2) {
33050
- return qR(this, void 0, void 0, function* () {
33019
+ return XR(this, void 0, void 0, function* () {
33051
33020
  let e2 = null;
33052
- return this.couldUseIndexDBCache && YR.localCache && (e2 = yield iM(() => YR.localCache.getItem(`${this.taskId}/${t2}`), 500)), e2 = e2 === nM ? null : e2, e2 || this.memoryCache.get(t2) || null;
33021
+ return this.couldUseIndexDBCache && qR.localCache && (e2 = yield iM(() => qR.localCache.getItem(`${this.taskId}/${t2}`), 500)), e2 = e2 === nM ? null : e2, e2 || this.memoryCache.get(t2) || null;
33053
33022
  });
33054
33023
  }
33055
33024
  setItem(t2, e2, n2 = false) {
33056
- return qR(this, void 0, void 0, function* () {
33025
+ return XR(this, void 0, void 0, function* () {
33057
33026
  if (!this.couldUseIndexDBCache)
33058
33027
  return n2 && this.memoryCache.set(t2, e2), Promise.resolve();
33059
- if (YR.localCache) {
33060
- (yield iM(() => YR.localCache.setItem(`${this.taskId}/${t2}`, e2).catch(() => {
33028
+ if (qR.localCache) {
33029
+ (yield iM(() => qR.localCache.setItem(`${this.taskId}/${t2}`, e2).catch(() => {
33061
33030
  n2 && this.memoryCache.set(t2, e2);
33062
33031
  }), 500)) === nM && n2 && this.memoryCache.set(t2, e2);
33063
33032
  }
@@ -33065,20 +33034,31 @@ void main(void){
33065
33034
  }
33066
33035
  dispose() {
33067
33036
  var t2;
33068
- this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t2 = YR.localCache) === null || t2 === void 0 || t2.keys().then((t3) => {
33037
+ this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t2 = qR.localCache) === null || t2 === void 0 || t2.keys().then((t3) => {
33069
33038
  t3.filter((t4) => t4.indexOf(this.taskId) >= 0).forEach((t4) => {
33070
33039
  var e2;
33071
- (e2 = YR.localCache) === null || e2 === void 0 || e2.removeItem(t4).catch(() => {
33040
+ (e2 = qR.localCache) === null || e2 === void 0 || e2.removeItem(t4).catch(() => {
33072
33041
  });
33073
33042
  });
33074
33043
  }));
33075
33044
  }
33076
33045
  }
33077
- YR.localCache = null;
33046
+ qR.localCache = null;
33078
33047
  try {
33079
- YR.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
33048
+ qR.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
33080
33049
  } catch (t2) {
33081
33050
  }
33051
+ class YR extends a.a {
33052
+ constructor() {
33053
+ super(...arguments), this._volume = 0.5;
33054
+ }
33055
+ get volume() {
33056
+ return this._volume;
33057
+ }
33058
+ set volume(t2) {
33059
+ t2 < 0 && (t2 = 0), t2 > 1 && (t2 = 1), this._volume = t2, this.emit("update", this._volume);
33060
+ }
33061
+ }
33082
33062
  var ZR = function(t2, e2, n2, i2) {
33083
33063
  return new (n2 || (n2 = Promise))(function(r2, o2) {
33084
33064
  function s2(t3) {
@@ -33110,9 +33090,9 @@ void main(void){
33110
33090
  constructor(t2, e2 = {}) {
33111
33091
  super(), this.errorChannel = new a.a(), this.transactionPlayer = null, this.transactionSprite = new Ow(), this.isForward = true, this.drawCall = 0, this.scale = 1, this.prevSlideBase64 = null, this._isPaused = false, this.maxResolution = new v_(0, 0), this.fps = new XE(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
33112
33092
  this.errorChannel.emit("error", new qE(VE.CanvasCrash, "webgl context lost."));
33113
- }, this.logger = t2.logger, this.mode = t2.mode, this.localStorage = new YR(this.logger);
33093
+ }, this.logger = t2.logger, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new qR(this.logger);
33114
33094
  let n2 = Math.max(window.devicePixelRatio, 2);
33115
- VR.isDesktop() || (n2 = 1), this.config = { minFPS: Object(l.isUndefined)(e2.minFPS) ? 30 : e2.minFPS, maxFPS: Object(l.isUndefined)(e2.maxFPS) ? 40 : e2.maxFPS, resolution: Object(l.isUndefined)(e2.resolution) ? n2 : e2.resolution, autoFPS: !Object(l.isUndefined)(e2.autoFPS) && e2.autoFPS, autoResolution: !Object(l.isUndefined)(e2.autoResolution) && e2.autoResolution, transactionBgColor: Object(l.isUndefined)(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel) }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.loader = new sM(this.localStorage, t2.useLocalCache, this.logger, t2.resourceTimeout, t2.loadDelegate), this.app = new Lb({ antialias: true, autoDensity: false, backgroundColor: 16777215 }), this.updateConfig(this.config), this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
33095
+ jR.isDesktop() || (n2 = 1), this.config = { minFPS: Object(l.isUndefined)(e2.minFPS) ? 30 : e2.minFPS, maxFPS: Object(l.isUndefined)(e2.maxFPS) ? 40 : e2.maxFPS, resolution: Object(l.isUndefined)(e2.resolution) ? n2 : e2.resolution, autoFPS: !Object(l.isUndefined)(e2.autoFPS) && e2.autoFPS, autoResolution: !Object(l.isUndefined)(e2.autoResolution) && e2.autoResolution, transactionBgColor: Object(l.isUndefined)(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel) }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.loader = new sM(this.localStorage, t2.useLocalCache, this.logger, t2.resourceTimeout, t2.loadDelegate), this.app = new Lb({ antialias: true, autoDensity: false, backgroundColor: 16777215 }), this.updateConfig(this.config), this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
33116
33096
  const i2 = this.app.renderer, { drawElements: r2 } = i2.gl;
33117
33097
  i2.gl.drawElements = (...t3) => {
33118
33098
  r2.call(i2.gl, ...t3), this.drawCall += 1;
@@ -33138,7 +33118,7 @@ void main(void){
33138
33118
  }
33139
33119
  }), this.app.ticker.add(() => {
33140
33120
  this.runtime.drawCall = this.drawCall, this.runtime.fps = Math.floor(this.app.ticker.minFPS), this.drawCall = 0;
33141
- }, null, ey.LOW), this.clock = new lM(this.app.ticker), this.objPoolGroup = eM(), this.stagePool = new XR(this.loader, this.mode, this.app.renderer, this.app.ticker, this.app.view, this.clock, this.objPoolGroup, this.errorChannel, this.localStorage, this.logger, t2.loadDelegate, this.isPlayerPaused, this.maxResolution), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
33121
+ }, null, ey.LOW), this.clock = new lM(this.app.ticker), this.objPoolGroup = eM(), this.stagePool = new WR(this.loader, this.mode, this.app.renderer, this.app.ticker, this.app.view, this.clock, this.objPoolGroup, this.errorChannel, this.localStorage, this.logger, t2.loadDelegate, this.isPlayerPaused, this.maxResolution, this.volumeAdjuster), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
33142
33122
  try {
33143
33123
  this.transactionPlayer = new og();
33144
33124
  } catch (t3) {
@@ -33263,7 +33243,7 @@ void main(void){
33263
33243
  }
33264
33244
  updateResolution(t2, e2) {
33265
33245
  this.app.ticker.addOnce(() => {
33266
- let n2 = VR.isDesktop() ? t2 : 1;
33246
+ let n2 = jR.isDesktop() ? t2 : 1;
33267
33247
  for (; n2 * this.designWidth > this.maxResolution.x || n2 * this.designHeight > this.maxResolution.y; )
33268
33248
  n2 -= 0.1;
33269
33249
  this.app.renderer.resolution = n2, this.app.renderer.plugins.interaction.resolution = this.app.renderer.resolution, this.app.renderer.resize(this.designWidth, this.designHeight), Object(l.isFunction)(e2) && e2();
@@ -33381,7 +33361,7 @@ void main(void){
33381
33361
  }
33382
33362
  static clearLocalCache() {
33383
33363
  var t2;
33384
- (t2 = YR.localCache) === null || t2 === void 0 || t2.clear().catch(() => {
33364
+ (t2 = qR.localCache) === null || t2 === void 0 || t2.clear().catch(() => {
33385
33365
  });
33386
33366
  }
33387
33367
  destroy() {
@@ -33402,7 +33382,7 @@ void main(void){
33402
33382
  }
33403
33383
  }
33404
33384
  }
33405
- KR.platform = VR, KR.RtcAudioClazz = null;
33385
+ KR.platform = jR, KR.RtcAudioClazz = null;
33406
33386
  var QR = /* @__PURE__ */ new Map();
33407
33387
  function tP(t2) {
33408
33388
  var e2 = QR.get(t2.hookPoint) || [];
@@ -34830,7 +34810,120 @@ void main(void){
34830
34810
  }, t2.prototype.destroy = function() {
34831
34811
  this.isDestroy = true;
34832
34812
  }, t2;
34833
- }(), nI = function() {
34813
+ }(), nI = function(t2, e2, n2, i2) {
34814
+ return new (n2 || (n2 = Promise))(function(r2, o2) {
34815
+ function s2(t3) {
34816
+ try {
34817
+ l2(i2.next(t3));
34818
+ } catch (t4) {
34819
+ o2(t4);
34820
+ }
34821
+ }
34822
+ function a2(t3) {
34823
+ try {
34824
+ l2(i2.throw(t3));
34825
+ } catch (t4) {
34826
+ o2(t4);
34827
+ }
34828
+ }
34829
+ function l2(t3) {
34830
+ var e3;
34831
+ t3.done ? r2(t3.value) : (e3 = t3.value, e3 instanceof n2 ? e3 : new n2(function(t4) {
34832
+ t4(e3);
34833
+ })).then(s2, a2);
34834
+ }
34835
+ l2((i2 = i2.apply(t2, e2 || [])).next());
34836
+ });
34837
+ }, iI = function(t2, e2) {
34838
+ var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
34839
+ if (1 & r2[0])
34840
+ throw r2[1];
34841
+ return r2[1];
34842
+ }, trys: [], ops: [] };
34843
+ return o2 = { next: a2(0), throw: a2(1), return: a2(2) }, typeof Symbol == "function" && (o2[Symbol.iterator] = function() {
34844
+ return this;
34845
+ }), o2;
34846
+ function a2(o3) {
34847
+ return function(a3) {
34848
+ return function(o4) {
34849
+ if (n2)
34850
+ throw new TypeError("Generator is already executing.");
34851
+ for (; s2; )
34852
+ try {
34853
+ if (n2 = 1, i2 && (r2 = 2 & o4[0] ? i2.return : o4[0] ? i2.throw || ((r2 = i2.return) && r2.call(i2), 0) : i2.next) && !(r2 = r2.call(i2, o4[1])).done)
34854
+ return r2;
34855
+ switch (i2 = 0, r2 && (o4 = [2 & o4[0], r2.value]), o4[0]) {
34856
+ case 0:
34857
+ case 1:
34858
+ r2 = o4;
34859
+ break;
34860
+ case 4:
34861
+ return s2.label++, { value: o4[1], done: false };
34862
+ case 5:
34863
+ s2.label++, i2 = o4[1], o4 = [0];
34864
+ continue;
34865
+ case 7:
34866
+ o4 = s2.ops.pop(), s2.trys.pop();
34867
+ continue;
34868
+ default:
34869
+ if (!(r2 = s2.trys, (r2 = r2.length > 0 && r2[r2.length - 1]) || o4[0] !== 6 && o4[0] !== 2)) {
34870
+ s2 = 0;
34871
+ continue;
34872
+ }
34873
+ if (o4[0] === 3 && (!r2 || o4[1] > r2[0] && o4[1] < r2[3])) {
34874
+ s2.label = o4[1];
34875
+ break;
34876
+ }
34877
+ if (o4[0] === 6 && s2.label < r2[1]) {
34878
+ s2.label = r2[1], r2 = o4;
34879
+ break;
34880
+ }
34881
+ if (r2 && s2.label < r2[2]) {
34882
+ s2.label = r2[2], s2.ops.push(o4);
34883
+ break;
34884
+ }
34885
+ r2[2] && s2.ops.pop(), s2.trys.pop();
34886
+ continue;
34887
+ }
34888
+ o4 = e2.call(t2, s2);
34889
+ } catch (t3) {
34890
+ o4 = [6, t3], i2 = 0;
34891
+ } finally {
34892
+ n2 = r2 = 0;
34893
+ }
34894
+ if (5 & o4[0])
34895
+ throw o4[1];
34896
+ return { value: o4[0] ? o4[1] : void 0, done: true };
34897
+ }([o3, a3]);
34898
+ };
34899
+ }
34900
+ };
34901
+ function rI(t2, e2, n2) {
34902
+ return nI(this, void 0, void 0, function() {
34903
+ var i2, r2, o2, s2;
34904
+ return iI(this, function(a2) {
34905
+ switch (a2.label) {
34906
+ case 0:
34907
+ return i2 = document.createElement("div"), (r2 = new vI({ anchor: i2, renderOptions: { minFPS: 1, maxFPS: 1, resolution: 1 }, mode: "local", interactive: false })).setResource(t2, e2), [4, r2.getSlideCountAsync()];
34908
+ case 1:
34909
+ if (o2 = a2.sent(), n2)
34910
+ return [3, 6];
34911
+ s2 = 1, a2.label = 2;
34912
+ case 2:
34913
+ return s2 <= o2 ? [4, r2.player.stagePool.preload(s2, true)] : [3, 5];
34914
+ case 3:
34915
+ a2.sent(), a2.label = 4;
34916
+ case 4:
34917
+ return s2++, [3, 2];
34918
+ case 5:
34919
+ return [3, 6];
34920
+ case 6:
34921
+ return r2.destroy(), [2];
34922
+ }
34923
+ });
34924
+ });
34925
+ }
34926
+ var oI = function() {
34834
34927
  var t2 = function(e2, n2) {
34835
34928
  return (t2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) {
34836
34929
  t3.__proto__ = e3;
@@ -34847,14 +34940,14 @@ void main(void){
34847
34940
  }
34848
34941
  t2(e2, n2), e2.prototype = n2 === null ? Object.create(n2) : (i2.prototype = n2.prototype, new i2());
34849
34942
  };
34850
- }(), iI = function() {
34851
- return (iI = Object.assign || function(t2) {
34943
+ }(), sI = function() {
34944
+ return (sI = Object.assign || function(t2) {
34852
34945
  for (var e2, n2 = 1, i2 = arguments.length; n2 < i2; n2++)
34853
34946
  for (var r2 in e2 = arguments[n2])
34854
34947
  Object.prototype.hasOwnProperty.call(e2, r2) && (t2[r2] = e2[r2]);
34855
34948
  return t2;
34856
34949
  }).apply(this, arguments);
34857
- }, rI = function(t2, e2, n2, i2) {
34950
+ }, aI = function(t2, e2, n2, i2) {
34858
34951
  var r2, o2 = arguments.length, s2 = o2 < 3 ? e2 : i2 === null ? i2 = Object.getOwnPropertyDescriptor(e2, n2) : i2;
34859
34952
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
34860
34953
  s2 = Reflect.decorate(t2, e2, n2, i2);
@@ -34862,7 +34955,7 @@ void main(void){
34862
34955
  for (var a2 = t2.length - 1; a2 >= 0; a2--)
34863
34956
  (r2 = t2[a2]) && (s2 = (o2 < 3 ? r2(s2) : o2 > 3 ? r2(e2, n2, s2) : r2(e2, n2)) || s2);
34864
34957
  return o2 > 3 && s2 && Object.defineProperty(e2, n2, s2), s2;
34865
- }, oI = function(t2, e2, n2, i2) {
34958
+ }, lI = function(t2, e2, n2, i2) {
34866
34959
  return new (n2 || (n2 = Promise))(function(r2, o2) {
34867
34960
  function s2(t3) {
34868
34961
  try {
@@ -34886,7 +34979,7 @@ void main(void){
34886
34979
  }
34887
34980
  l2((i2 = i2.apply(t2, e2 || [])).next());
34888
34981
  });
34889
- }, sI = function(t2, e2) {
34982
+ }, uI = function(t2, e2) {
34890
34983
  var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
34891
34984
  if (1 & r2[0])
34892
34985
  throw r2[1];
@@ -34949,20 +35042,20 @@ void main(void){
34949
35042
  }([o3, a3]);
34950
35043
  };
34951
35044
  }
34952
- }, aI = window.ResizeObserver || GP, lI = function(t2) {
35045
+ }, hI = window.ResizeObserver || GP, cI = function(t2) {
34953
35046
  return new Promise(function(e2) {
34954
35047
  return setTimeout(e2, t2);
34955
35048
  });
34956
35049
  };
34957
- function uI(t2, e2) {
34958
- return oI(this, void 0, void 0, function() {
35050
+ function dI(t2, e2) {
35051
+ return lI(this, void 0, void 0, function() {
34959
35052
  var n2;
34960
- return sI(this, function(i2) {
35053
+ return uI(this, function(i2) {
34961
35054
  switch (i2.label) {
34962
35055
  case 0:
34963
35056
  n2 = Date.now(), i2.label = 1;
34964
35057
  case 1:
34965
- return !t2() && Date.now() - n2 < e2 ? [4, lI(50)] : [3, 3];
35058
+ return !t2() && Date.now() - n2 < e2 ? [4, cI(50)] : [3, 3];
34966
35059
  case 2:
34967
35060
  return i2.sent(), [3, 1];
34968
35061
  case 3:
@@ -34971,25 +35064,25 @@ void main(void){
34971
35064
  });
34972
35065
  });
34973
35066
  }
34974
- var hI = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, cI = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, dI = "";
35067
+ var pI = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, fI = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, mI = "";
34975
35068
  try {
34976
- dI = "0.5.16-alpha.1";
35069
+ mI = "0.6.3";
34977
35070
  } catch (t2) {
34978
- dI = "development";
35071
+ mI = "development";
34979
35072
  }
34980
- var pI = null;
35073
+ var gI = null;
34981
35074
  try {
34982
- pI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
35075
+ gI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
34983
35076
  } catch (t2) {
34984
35077
  }
34985
- var fI = function(t2) {
35078
+ var vI = function(t2) {
34986
35079
  function e2(n3) {
34987
35080
  var i2 = t2.call(this) || this;
34988
- return i2.iosResetCache = [], i2.needClearCacheImage = false, i2.version = dI, i2.__slideState = Object(l.cloneDeep)(cI), i2.userInputTime = 0, i2.isSyncingSlideState = false, i2.frozenTaskManager = new eI(), i2.randomId = Math.random().toString(32).substr(2), i2.resize = false, i2.isAnimating = false, i2.renderingTaskManager = new VP(), i2.isLoading = false, i2.interactive = true, i2.renderingIndex = 0, i2.frameWidth = 1, i2.frameHeight = 1, i2.frame = document.createElement("div"), i2.medianController = document.createElement("div"), i2.frameResizeObserver = new aI(function() {
35081
+ return i2.iosResetCache = [], i2.needClearCacheImage = false, i2.version = mI, i2.__slideState = Object(l.cloneDeep)(fI), i2.userInputTime = 0, i2.isSyncingSlideState = false, i2.frozenTaskManager = new eI(), i2.randomId = Math.random().toString(32).substr(2), i2.resize = false, i2.isAnimating = false, i2.renderingTaskManager = new VP(), i2.isLoading = false, i2.interactive = true, i2.renderingIndex = 0, i2.frameWidth = 1, i2.frameHeight = 1, i2.frame = document.createElement("div"), i2.medianController = document.createElement("div"), i2.frameResizeObserver = new hI(function() {
34989
35082
  return i2.frameResizeHandler();
34990
35083
  }), i2.timestamp = function() {
34991
35084
  return Date.now();
34992
- }, i2.mode = "local", i2.enableGlobalClick = false, i2.lastEmitedState = null, i2.playerController = null, i2.isInitResized = false, i2.cacheImage = document.createElement("img"), i2.isTouchStart = false, i2.touchStartId = void 0, i2.taskId = "", i2.designWidth = 0, i2.designHeight = 0, i2._slideCount = 0, i2._dispatchIncrId = 0, i2._receiveIncrId = 0, i2.userInputHandle = function() {
35085
+ }, i2.mode = "local", i2.enableGlobalClick = false, i2.lastEmitedState = null, i2.playerController = null, i2.isInitResized = false, i2.cacheImage = document.createElement("img"), i2.isTouchStart = false, i2.touchStartId = void 0, i2.taskId = "", i2.volumeAdjuster = new YR(), i2.designWidth = 0, i2.designHeight = 0, i2._slideCount = 0, i2._dispatchIncrId = 0, i2._receiveIncrId = 0, i2.userInputHandle = function() {
34993
35086
  i2.userInputTime = Date.now();
34994
35087
  }, i2.handleViewClick = function() {
34995
35088
  setTimeout(function() {
@@ -35005,12 +35098,12 @@ void main(void){
35005
35098
  }, i2.handleSlideRef = function() {
35006
35099
  console.log(i2), window.__slide = i2;
35007
35100
  }, i2.receiveSyncHandler = function(t3) {
35008
- return oI(i2, void 0, void 0, function() {
35101
+ return lI(i2, void 0, void 0, function() {
35009
35102
  var e3, n4, i3, r2, o2 = this;
35010
- return sI(this, function(s2) {
35103
+ return uI(this, function(s2) {
35011
35104
  switch (s2.label) {
35012
35105
  case 0:
35013
- return Object(l.isNumber)(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(hI.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), t3.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
35106
+ return Object(l.isNumber)(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(pI.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), t3.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
35014
35107
  o2.doNextStep(true);
35015
35108
  })) : this.doNextStep(true), [3, 6]);
35016
35109
  case 1:
@@ -35031,9 +35124,9 @@ void main(void){
35031
35124
  });
35032
35125
  });
35033
35126
  }, i2.handlePrevSlide = function(t3) {
35034
- return t3 === void 0 && (t3 = false), oI(i2, void 0, void 0, function() {
35127
+ return t3 === void 0 && (t3 = false), lI(i2, void 0, void 0, function() {
35035
35128
  var e3, n4;
35036
- return sI(this, function(i3) {
35129
+ return uI(this, function(i3) {
35037
35130
  switch (i3.label) {
35038
35131
  case 0:
35039
35132
  return this.player ? [4, (n4 = this.player) === null || n4 === void 0 ? void 0 : n4.createSnapshotForNextSlide(true)] : [2];
@@ -35043,9 +35136,9 @@ void main(void){
35043
35136
  });
35044
35137
  });
35045
35138
  }, i2.handleNextSlide = function(t3) {
35046
- return t3 === void 0 && (t3 = false), oI(i2, void 0, void 0, function() {
35139
+ return t3 === void 0 && (t3 = false), lI(i2, void 0, void 0, function() {
35047
35140
  var e3, n4;
35048
- return sI(this, function(i3) {
35141
+ return uI(this, function(i3) {
35049
35142
  switch (i3.label) {
35050
35143
  case 0:
35051
35144
  return this.player ? [4, (n4 = this.player) === null || n4 === void 0 ? void 0 : n4.createSnapshotForNextSlide(false)] : [2];
@@ -35069,23 +35162,23 @@ void main(void){
35069
35162
  }, error: function(t3, n4) {
35070
35163
  var r2, o2;
35071
35164
  ((r2 = i2.config.logger) === null || r2 === void 0 ? void 0 : r2.error) && (e2._tempLog += "ERROR - " + new Date().toISOString() + " - {" + i2.randomId + "}[" + n4 + "] " + t3 + "\n\n", (o2 = i2.config.logger) === null || o2 === void 0 || o2.error("[" + n4 + "] " + t3));
35072
- } }, i2.anchor = i2.config.anchor, i2.syncQueue = new QC(i2.receiveSyncHandler), i2.lock = new tI(i2.mode === "interactive"), i2.cacheImage.style.position = "absolute", i2.cacheImage.style.zIndex = "100", i2.setMedianControllerAttribute(), i2.frame.appendChild(i2.medianController), i2.frameResizeObserver.observe(i2.frame), i2.on(hI.syncReceive, function(t3) {
35165
+ } }, i2.anchor = i2.config.anchor, i2.syncQueue = new QC(i2.receiveSyncHandler), i2.lock = new tI(i2.mode === "interactive"), i2.cacheImage.style.position = "absolute", i2.cacheImage.style.zIndex = "100", i2.setMedianControllerAttribute(), i2.frame.appendChild(i2.medianController), i2.frameResizeObserver.observe(i2.frame), i2.on(pI.syncReceive, function(t3) {
35073
35166
  i2.lock.unlock(t3.type, t3.uuid), i2.syncQueue.addTask(t3);
35074
35167
  }), i2.renderingTaskManager.eventHub.on("task-error", function(t3) {
35075
35168
  var e3 = t3.error, n4 = t3.task, r2 = qE.transform(e3);
35076
- r2.errorType === VE.RuntimeWarn ? i2.logger.warn(r2.message, i2.taskId) : i2.logger.error(r2.message, i2.taskId), i2.isLoading = false, i2.emit(hI.renderError, { error: r2, index: n4.slideIndex });
35169
+ r2.errorType === VE.RuntimeWarn ? i2.logger.warn(r2.message, i2.taskId) : i2.logger.error(r2.message, i2.taskId), i2.isLoading = false, i2.emit(pI.renderError, { error: r2, index: n4.slideIndex });
35077
35170
  }), window.addEventListener("__slide_ref__", i2.handleSlideRef), i2.resizeView = Object(l.debounce)(i2.resizeView.bind(i2), 50), i2.player = i2.initPlayer(i2.config), i2.config.controller && i2.createController(), i2.player.view && i2.frame.appendChild(i2.player.view), i2.handleViewClick = Object(l.debounce)(i2.handleViewClick, 300), i2.player.errorChannel.on("error", function(t3, e3) {
35078
35171
  var n4 = qE.transform(t3);
35079
- n4.errorType === VE.RuntimeWarn ? i2.logger.warn(n4.message, i2.taskId) : i2.logger.error(n4.message, i2.taskId), i2.isLoading = false, e3 === i2.renderingIndex && i2.emit(hI.renderError, { error: t3, index: e3 });
35172
+ n4.errorType === VE.RuntimeWarn ? i2.logger.warn(n4.message, i2.taskId) : i2.logger.error(n4.message, i2.taskId), i2.isLoading = false, e3 === i2.renderingIndex && i2.emit(pI.renderError, { error: t3, index: e3 });
35080
35173
  }), i2;
35081
35174
  }
35082
35175
  var n2;
35083
- return nI(e2, t2), e2.flushLog = function() {
35084
- return oI(this, void 0, void 0, function() {
35085
- return sI(this, function(t3) {
35176
+ return oI(e2, t2), e2.flushLog = function() {
35177
+ return lI(this, void 0, void 0, function() {
35178
+ return uI(this, function(t3) {
35086
35179
  switch (t3.label) {
35087
35180
  case 0:
35088
- return e2._tempLog.length > 0 ? [4, pI == null ? void 0 : pI.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)] : [3, 2];
35181
+ return e2._tempLog.length > 0 ? [4, gI == null ? void 0 : gI.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)] : [3, 2];
35089
35182
  case 1:
35090
35183
  t3.sent(), e2._tempLog = "", e2._tempLogIndex += 1, t3.label = 2;
35091
35184
  case 2:
@@ -35098,13 +35191,13 @@ void main(void){
35098
35191
  }, enumerable: false, configurable: true }), e2.prototype.initSlideConfig = function(t3) {
35099
35192
  return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (KR.RtcAudioClazz = t3.rtcAudio), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !Object(l.isUndefined)(t3.enableGlobalClick) && t3.enableGlobalClick, this.resize = t3.resize || false, this.interactive = t3.interactive, this.frame.style.cssText = t3.fixedFrameSize ? "width:" + t3.fixedFrameSize.width + "px;height:" + t3.fixedFrameSize.height + "px;" : "width:100%;height:100%", this.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", t3.fixedFrameSize && (this.frameWidth = t3.fixedFrameSize.width, this.frameHeight = t3.fixedFrameSize.height), t3;
35100
35193
  }, e2.prototype.initPlayer = function(t3) {
35101
- var e3, n3, i2, r2 = this, o2 = new KR({ mode: this.mode, useLocalCache: !!Object(l.isUndefined)(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: Object(l.isUndefined)(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate });
35194
+ var e3, n3, i2, r2 = this, o2 = new KR({ mode: this.mode, useLocalCache: !!Object(l.isUndefined)(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: Object(l.isUndefined)(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate, volumeAdjuster: this.volumeAdjuster });
35102
35195
  return o2.setInteractive(this.interactive), o2.updateConfig(t3.renderOptions || {}), o2.on($R.renderStart, function(t4) {
35103
- r2.isLoading = true, r2.emit(hI.renderStart, t4);
35196
+ r2.isLoading = true, r2.emit(pI.renderStart, t4);
35104
35197
  }), o2.on($R.renderEnd, function(t4) {
35105
- r2.isLoading = false, r2.player && (r2.designHeight = r2.player.designHeight, r2.designWidth = r2.player.designWidth, r2.cacheImage.style.width = r2.player.designWidth + "px", r2.cacheImage.style.height = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(hI.renderEnd, t4);
35198
+ r2.isLoading = false, r2.player && (r2.designHeight = r2.player.designHeight, r2.designWidth = r2.player.designWidth, r2.cacheImage.style.width = r2.player.designWidth + "px", r2.cacheImage.style.height = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(pI.renderEnd, t4);
35106
35199
  }), o2.on($R.slideChange, function(t4) {
35107
- r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(hI.slideChange, t4);
35200
+ r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(pI.slideChange, t4);
35108
35201
  }), o2.on($R.mainSeqStateChange, function(t4) {
35109
35202
  r2.__slideState.mainSeqState = t4, r2.emitStateChange();
35110
35203
  }), o2.on($R.mainSeqStepChange, function(t4) {
@@ -35113,16 +35206,16 @@ void main(void){
35113
35206
  var e4 = t4.id, n4 = t4.state;
35114
35207
  r2.__slideState.interactiveSeqState[e4] = n4, r2.emitStateChange();
35115
35208
  }), o2.on($R.animateStart, function() {
35116
- r2.isAnimating !== true && (r2.isAnimating = true, r2.emit(hI.animateStart));
35209
+ r2.isAnimating !== true && (r2.isAnimating = true, r2.emit(pI.animateStart));
35117
35210
  }), o2.on($R.animateEnd, function() {
35118
- r2.isAnimating !== false && (r2.isAnimating = false, r2.emit(hI.animateEnd));
35211
+ r2.isAnimating !== false && (r2.isAnimating = false, r2.emit(pI.animateEnd));
35119
35212
  }), o2.on($R.interactiveSeqAction, function(t4) {
35120
35213
  var e4 = t4.action, n4 = t4.seqId;
35121
35214
  r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "interactiveAnim", action: e4, seqId: n4 }), r2.emitStateChange();
35122
35215
  }), o2.on($R.mainSeqStepStart, function(t4) {
35123
- r2.emit(hI.mainSeqStepStart, t4);
35216
+ r2.emit(pI.mainSeqStepStart, t4);
35124
35217
  }), o2.on($R.mainSeqStepEnd, function(t4) {
35125
- r2.emit(hI.mainSeqStepEnd, t4);
35218
+ r2.emit(pI.mainSeqStepEnd, t4);
35126
35219
  }), o2.on($R.mediaPlay, function(t4) {
35127
35220
  var e4 = { type: "play", time: r2.timestamp() - 1e3 * t4.time };
35128
35221
  r2.__slideState.mediaState[t4.id] = e4, r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPlay", id: t4.id, state: e4 }), r2.emitStateChange();
@@ -35160,9 +35253,9 @@ void main(void){
35160
35253
  }
35161
35254
  }, e2.prototype.setSlideState = function(t3) {
35162
35255
  var e3, n3, i2;
35163
- return oI(this, void 0, void 0, function() {
35256
+ return lI(this, void 0, void 0, function() {
35164
35257
  var r2, o2 = this;
35165
- return sI(this, function(s2) {
35258
+ return uI(this, function(s2) {
35166
35259
  switch (s2.label) {
35167
35260
  case 0:
35168
35261
  return this.isSyncingSlideState = true, this.logger.info("stateChange receive " + JSON.stringify(t3), this.taskId), t3.taskId && t3.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t3.taskId, (e3 = this.player) === null || e3 === void 0 || e3.setResourceData(t3.taskId, this.__slideState.url)), t3.url && t3.url !== this.__slideState.url && (this.__slideState.url = t3.url, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(this.__slideState.taskId, t3.url)), Number.isInteger(t3.currentSlideIndex) && t3.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t3.currentSlideIndex, [4, this.doRenderSlide(t3.currentSlideIndex)]) : [3, 2];
@@ -35202,9 +35295,9 @@ void main(void){
35202
35295
  }, Object.defineProperty(e2.prototype, "slideCount", { get: function() {
35203
35296
  return this._slideCount;
35204
35297
  }, enumerable: false, configurable: true }), e2.prototype.getSizeAsync = function() {
35205
- return oI(this, void 0, void 0, function() {
35298
+ return lI(this, void 0, void 0, function() {
35206
35299
  var t3;
35207
- return sI(this, function(e3) {
35300
+ return uI(this, function(e3) {
35208
35301
  switch (e3.label) {
35209
35302
  case 0:
35210
35303
  if (this.width > 0 && this.height > 0)
@@ -35224,8 +35317,8 @@ void main(void){
35224
35317
  });
35225
35318
  });
35226
35319
  }, e2.prototype.getSlideCountAsync = function() {
35227
- return oI(this, void 0, void 0, function() {
35228
- return sI(this, function(t3) {
35320
+ return lI(this, void 0, void 0, function() {
35321
+ return uI(this, function(t3) {
35229
35322
  switch (t3.label) {
35230
35323
  case 0:
35231
35324
  if (this._slideCount > 0)
@@ -35281,9 +35374,9 @@ void main(void){
35281
35374
  this.taskId = t3, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(t3, e3), this.__slideState.taskId = t3, this.__slideState.url = e3, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t3, url: e3 });
35282
35375
  }, e2.prototype._renderSlide = function(t3) {
35283
35376
  var e3;
35284
- return oI(this, void 0, void 0, function() {
35377
+ return lI(this, void 0, void 0, function() {
35285
35378
  var n3 = this;
35286
- return sI(this, function(i2) {
35379
+ return uI(this, function(i2) {
35287
35380
  switch (i2.label) {
35288
35381
  case 0:
35289
35382
  return this.renderingIndex = t3, this.player && t3 === this.player.currentIndex ? [2] : ((KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.indexOf(t3) < 0 && this.iosResetCache.push(t3), [4, (e3 = this.player) === null || e3 === void 0 ? void 0 : e3.renderSlide(t3)]);
@@ -35344,14 +35437,14 @@ void main(void){
35344
35437
  }, e2.prototype.emitStateChange = function() {
35345
35438
  if (this.mode !== "local" && !this.isSyncingSlideState) {
35346
35439
  var t3 = this.slideState;
35347
- !Object(l.isEqual)(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(hI.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
35440
+ !Object(l.isEqual)(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(pI.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
35348
35441
  }
35349
35442
  }, e2.prototype.emitSyncDispatch = function(t3) {
35350
35443
  if (!this.lock.isLocked(t3.type)) {
35351
35444
  var e3 = Math.random().toString(32).substr(2);
35352
35445
  this.lock.addLock(t3.type, e3);
35353
- var n3 = iI(iI({}, t3), { uuid: e3 });
35354
- this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(hI.syncDispatch, n3), this.logger.info("sync dispatch " + JSON.stringify(n3), this.taskId);
35446
+ var n3 = sI(sI({}, t3), { uuid: e3 });
35447
+ this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(pI.syncDispatch, n3), this.logger.info("sync dispatch " + JSON.stringify(n3), this.taskId);
35355
35448
  }
35356
35449
  }, e2.prototype.setMainSeqStep = function(t3, e3) {
35357
35450
  var n3;
@@ -35367,9 +35460,9 @@ void main(void){
35367
35460
  (t3 = this.player) === null || t3 === void 0 || t3.resume();
35368
35461
  }, e2.prototype._doFrozen = function() {
35369
35462
  var t3;
35370
- return oI(this, void 0, void 0, function() {
35463
+ return lI(this, void 0, void 0, function() {
35371
35464
  var e3, n3, i2, r2 = this;
35372
- return sI(this, function(o2) {
35465
+ return uI(this, function(o2) {
35373
35466
  switch (o2.label) {
35374
35467
  case 0:
35375
35468
  return this.view && this.player ? [4, this.player.clock.waitUntil(function() {
@@ -35377,7 +35470,7 @@ void main(void){
35377
35470
  }, 6e4)] : [3, 2];
35378
35471
  case 1:
35379
35472
  for (n3 in o2.sent(), e3 = this.player.getSnapshot() || "", this.cacheImage.src = e3, this.frame.appendChild(this.cacheImage), this.player.destroy(), (t3 = this.playerController) === null || t3 === void 0 || t3.destroy(), this.player = void 0, this.__slideState.mediaState)
35380
- i2 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = iI(iI({}, i2), { frozenTime: this.timestamp() });
35473
+ i2 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = sI(sI({}, i2), { frozenTime: this.timestamp() });
35381
35474
  o2.label = 2;
35382
35475
  case 2:
35383
35476
  return [2];
@@ -35391,14 +35484,14 @@ void main(void){
35391
35484
  });
35392
35485
  }, e2.prototype._doRelease = function() {
35393
35486
  var t3, e3;
35394
- return oI(this, void 0, void 0, function() {
35487
+ return lI(this, void 0, void 0, function() {
35395
35488
  var n3, i2, r2, o2;
35396
- return sI(this, function(s2) {
35489
+ return uI(this, function(s2) {
35397
35490
  switch (s2.label) {
35398
35491
  case 0:
35399
35492
  if (this.player)
35400
35493
  return [2];
35401
- for (i2 in this.player = this.initPlayer(this.config), ((t3 = this.config) === null || t3 === void 0 ? void 0 : t3.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = Object(l.cloneDeep)(cI), n3.mediaState)
35494
+ for (i2 in this.player = this.initPlayer(this.config), ((t3 = this.config) === null || t3 === void 0 ? void 0 : t3.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = Object(l.cloneDeep)(fI), n3.mediaState)
35402
35495
  (r2 = n3.mediaState[i2]).type === "play" && (o2 = Math.max((e3 = r2.frozenTime) !== null && e3 !== void 0 ? e3 : 0, r2.time), r2.time = this.timestamp() - (o2 - r2.time), r2.frozenTime = void 0);
35403
35496
  return [4, this.setSlideState(n3)];
35404
35497
  case 1:
@@ -35432,14 +35525,14 @@ void main(void){
35432
35525
  } catch (t4) {
35433
35526
  }
35434
35527
  }, e2.prototype.waitLoadEnd = function() {
35435
- return oI(this, void 0, void 0, function() {
35528
+ return lI(this, void 0, void 0, function() {
35436
35529
  var t3;
35437
- return sI(this, function(e3) {
35530
+ return uI(this, function(e3) {
35438
35531
  switch (e3.label) {
35439
35532
  case 0:
35440
35533
  t3 = 0, e3.label = 1;
35441
35534
  case 1:
35442
- return this.isLoading && t3 < 10 ? [4, lI(100)] : [3, 3];
35535
+ return this.isLoading && t3 < 10 ? [4, cI(100)] : [3, 3];
35443
35536
  case 2:
35444
35537
  return e3.sent(), t3 += 1, [3, 1];
35445
35538
  case 3:
@@ -35447,6 +35540,8 @@ void main(void){
35447
35540
  }
35448
35541
  });
35449
35542
  });
35543
+ }, e2.prototype.preload = function(t3) {
35544
+ return this.player ? this.player.preload(t3) : Promise.resolve();
35450
35545
  }, e2.prototype.destroy = function() {
35451
35546
  var t3 = this;
35452
35547
  this.logger.info("pre destroy slide", ""), this.isLoading ? this.waitLoadEnd().then(function() {
@@ -35465,22 +35560,26 @@ void main(void){
35465
35560
  return false;
35466
35561
  var t3 = this.player.currentIndex === 1, e3 = this.mainSeqLength === 0 || this.mainSeqStep === 0, n3 = this.mainSeqState === "idle" || this.mainSeqState === null;
35467
35562
  return !(t3 && e3 && n3);
35563
+ }, e2.prototype.updateGlobalVolume = function(t3) {
35564
+ this.volumeAdjuster.volume = t3;
35565
+ }, e2.prototype.getGlobalVolume = function() {
35566
+ return this.volumeAdjuster.volume;
35468
35567
  }, e2.clearLocalCache = function() {
35469
35568
  KR.clearLocalCache();
35470
35569
  }, e2.disposeLocalCache = function() {
35471
35570
  }, e2._tempLog = "", e2._tempLogIndex = 1, e2.usePlugin = tP, e2.handleLogDownload = function() {
35472
- return oI(void 0, void 0, void 0, function() {
35571
+ return lI(void 0, void 0, void 0, function() {
35473
35572
  var t3, e3, n3, i2, r2, o2, s2;
35474
- return sI(this, function(a2) {
35573
+ return uI(this, function(a2) {
35475
35574
  switch (a2.label) {
35476
35575
  case 0:
35477
- return t3 = "", pI ? [4, pI.keys()] : [3, 5];
35576
+ return t3 = "", gI ? [4, gI.keys()] : [3, 5];
35478
35577
  case 1:
35479
35578
  e3 = (a2.sent() || []).sort(function(t4, e4) {
35480
35579
  return parseInt(t4.replace("run_time_log_", "")) - parseInt(e4.replace("run_time_log_", ""));
35481
35580
  }), n3 = 0, i2 = e3, a2.label = 2;
35482
35581
  case 2:
35483
- return n3 < i2.length ? (r2 = i2[n3], o2 = t3, [4, pI.getItem(r2)]) : [3, 5];
35582
+ return n3 < i2.length ? (r2 = i2[n3], o2 = t3, [4, gI.getItem(r2)]) : [3, 5];
35484
35583
  case 3:
35485
35584
  t3 = o2 + (a2.sent() || ""), a2.label = 4;
35486
35585
  case 4:
@@ -35490,7 +35589,7 @@ void main(void){
35490
35589
  }
35491
35590
  });
35492
35591
  });
35493
- }, rI([(n2 = "Slide.initConfig", function(t3, e3, i2) {
35592
+ }, aI([(n2 = "Slide.initConfig", function(t3, e3, i2) {
35494
35593
  var r2 = i2.value;
35495
35594
  i2.value = function() {
35496
35595
  for (var t4 = [], e4 = 0; e4 < arguments.length; e4++)
@@ -35517,15 +35616,15 @@ void main(void){
35517
35616
  };
35518
35617
  })], e2.prototype, "initSlideConfig", null), e2;
35519
35618
  }(a.a);
35520
- pI == null || pI.clear(), window.addEventListener("__slide_log__", fI.handleLogDownload), window.setInterval(function() {
35521
- fI.flushLog().catch(function() {
35619
+ gI == null || gI.clear(), window.addEventListener("__slide_log__", vI.handleLogDownload), window.setInterval(function() {
35620
+ vI.flushLog().catch(function() {
35522
35621
  });
35523
35622
  }, 9e3);
35524
35623
  }]);
35525
35624
  const SOUP = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
35526
- const SOUP_LEN = SOUP.length;
35625
+ const SOUP_LEN = 87;
35527
35626
  const ID_LEN = 20;
35528
- const reusedIdCarrier = Array(ID_LEN);
35627
+ const reusedIdCarrier = [];
35529
35628
  const genUID = () => {
35530
35629
  for (let i = 0; i < ID_LEN; i++) {
35531
35630
  reusedIdCarrier[i] = SOUP.charAt(Math.random() * SOUP_LEN);
@@ -35546,7 +35645,7 @@ class SideEffectManager {
35546
35645
  }
35547
35646
  addDisposer(disposer, disposerID = this.genUID()) {
35548
35647
  this.flush(disposerID);
35549
- this.disposers.set(disposerID, Array.isArray(disposer) ? () => disposer.forEach(invoke) : disposer);
35648
+ this.disposers.set(disposerID, Array.isArray(disposer) ? joinDisposers(disposer) : disposer);
35550
35649
  return disposerID;
35551
35650
  }
35552
35651
  add(executor, disposerID = this.genUID()) {
@@ -35577,11 +35676,7 @@ class SideEffectManager {
35577
35676
  flush(disposerID) {
35578
35677
  const disposer = this.remove(disposerID);
35579
35678
  if (disposer) {
35580
- try {
35581
- disposer();
35582
- } catch (e) {
35583
- console.error(e);
35584
- }
35679
+ disposer();
35585
35680
  }
35586
35681
  }
35587
35682
  flushAll() {
@@ -35596,6 +35691,9 @@ class SideEffectManager {
35596
35691
  return uid;
35597
35692
  }
35598
35693
  }
35694
+ function joinDisposers(disposers) {
35695
+ return () => disposers.forEach(invoke);
35696
+ }
35599
35697
  function clamp$1(value, min, max) {
35600
35698
  return Math.min(Math.max(value, min), max);
35601
35699
  }
@@ -37699,7 +37797,7 @@ class SlidePreviewer {
37699
37797
  }
37700
37798
  }
37701
37799
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
37702
- const version = "0.2.6-alpha.1";
37800
+ const version = "0.2.8";
37703
37801
  const SlideApp = {
37704
37802
  kind: "Slide",
37705
37803
  setup(context) {