@netless/app-slide 0.2.3 → 0.2.6-alpha.0

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
@@ -17,66 +17,6 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- const s = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = s.length, t = Array(20), i = () => {
21
- for (let i2 = 0; i2 < 20; i2++)
22
- t[i2] = s.charAt(Math.random() * e);
23
- return t.join("");
24
- };
25
- function r(s2) {
26
- try {
27
- return s2();
28
- } catch (e2) {
29
- console.error(e2);
30
- }
31
- }
32
- class n {
33
- constructor() {
34
- this.disposers = /* @__PURE__ */ new Map();
35
- }
36
- addDisposer(s2, e2 = this.genUID()) {
37
- return this.flush(e2), this.disposers.set(e2, Array.isArray(s2) ? () => s2.forEach(r) : s2), e2;
38
- }
39
- add(s2, e2 = this.genUID()) {
40
- const t2 = s2();
41
- return t2 ? this.addDisposer(t2, e2) : e2;
42
- }
43
- addEventListener(s2, e2, t2, i2, r2 = this.genUID()) {
44
- return s2.addEventListener(e2, t2, i2), this.addDisposer(() => s2.removeEventListener(e2, t2, i2), r2), r2;
45
- }
46
- setTimeout(s2, e2, t2 = this.genUID()) {
47
- const i2 = window.setTimeout(() => {
48
- this.remove(t2), s2();
49
- }, e2);
50
- return this.addDisposer(() => window.clearTimeout(i2), t2);
51
- }
52
- setInterval(s2, e2, t2 = this.genUID()) {
53
- const i2 = window.setInterval(s2, e2);
54
- return this.addDisposer(() => window.clearInterval(i2), t2);
55
- }
56
- remove(s2) {
57
- const e2 = this.disposers.get(s2);
58
- return this.disposers.delete(s2), e2;
59
- }
60
- flush(s2) {
61
- const e2 = this.remove(s2);
62
- if (e2)
63
- try {
64
- e2();
65
- } catch (t2) {
66
- console.error(t2);
67
- }
68
- }
69
- flushAll() {
70
- this.disposers.forEach(r), this.disposers.clear();
71
- }
72
- genUID() {
73
- let s2;
74
- do {
75
- s2 = i();
76
- } while (this.disposers.has(s2));
77
- return s2;
78
- }
79
- }
80
20
  var Slide = function(t2) {
81
21
  var e2 = {};
82
22
  function n2(i2) {
@@ -6551,13 +6491,13 @@ var Slide = function(t2) {
6551
6491
  n2.r(e2), n2.d(e2, "ErrorType", function() {
6552
6492
  return VE;
6553
6493
  }), n2.d(e2, "delay", function() {
6554
- return rI;
6494
+ return lI;
6555
6495
  }), n2.d(e2, "waitUntil", function() {
6556
- return oI;
6496
+ return uI;
6557
6497
  }), n2.d(e2, "SLIDE_EVENTS", function() {
6558
- return sI;
6559
- }), n2.d(e2, "Slide", function() {
6560
6498
  return hI;
6499
+ }), n2.d(e2, "Slide", function() {
6500
+ return fI;
6561
6501
  });
6562
6502
  var i2 = {};
6563
6503
  n2.r(i2), n2.d(i2, "ACESFilmicToneMapping", function() {
@@ -29533,26 +29473,26 @@ void main() {
29533
29473
  return this.object.hitArea ? this.object.hitArea : new g_(0, 0, this.object.width, this.object.height);
29534
29474
  }
29535
29475
  handleAction(t3, e3 = false) {
29536
- this.proxy && !e3 || (this.ctx.eventHub.emit(JR.hyperlinkTrigger, t3), this.execAction(t3));
29476
+ this.proxy && !e3 || (this.ctx.eventHub.emit($R.hyperlinkTrigger, t3), this.execAction(t3));
29537
29477
  }
29538
29478
  execAction(t3) {
29539
29479
  var e3;
29540
- if (this.ctx.eventHub.emit(JR.userInput), t3.action === "ppaction://hlinksldjump") {
29480
+ if (this.ctx.eventHub.emit($R.userInput), t3.action === "ppaction://hlinksldjump") {
29541
29481
  const n3 = ((e3 = t3 == null ? void 0 : t3.target) !== null && e3 !== void 0 ? e3 : "").match(/slide(\d+)\.xml/);
29542
- n3 && n3[1] && this.ctx.eventHub.emit(JR.requestGotoSlide, Number(n3[1]));
29482
+ n3 && n3[1] && this.ctx.eventHub.emit($R.requestGotoSlide, Number(n3[1]));
29543
29483
  } else if (t3.action === "ppaction://hlinkshowjump?jump=nextslide")
29544
- this.ctx.eventHub.emit(JR.requestNextSlide);
29484
+ this.ctx.eventHub.emit($R.requestNextSlide);
29545
29485
  else if (t3.action === "ppaction://hlinkshowjump?jump=previousslide")
29546
- this.ctx.eventHub.emit(JR.requestPrevSlide);
29486
+ this.ctx.eventHub.emit($R.requestPrevSlide);
29547
29487
  else if (t3.action === "ppaction://hlinkshowjump?jump=firstslide")
29548
- this.ctx.eventHub.emit(JR.requestGotoSlide, 1);
29488
+ this.ctx.eventHub.emit($R.requestGotoSlide, 1);
29549
29489
  else if (t3.action === "ppaction://hlinkshowjump?jump=lastslide")
29550
- this.ctx.eventHub.emit(JR.requestGotoSlide, -1);
29490
+ this.ctx.eventHub.emit($R.requestGotoSlide, -1);
29551
29491
  else if (t3.action === "ppaction://hlinkshowjump?jump=lastslideviewed") {
29552
29492
  const t4 = this.ctx.lastViewedIndex;
29553
- this.ctx.eventHub.emit(JR.requestGotoSlide, t4);
29493
+ this.ctx.eventHub.emit($R.requestGotoSlide, t4);
29554
29494
  } else
29555
- t3.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit(JR.requestGotoSlide, -1);
29495
+ t3.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit($R.requestGotoSlide, -1);
29556
29496
  }
29557
29497
  }
29558
29498
  class PM {
@@ -29775,6 +29715,9 @@ void main() {
29775
29715
  }
29776
29716
  initOnReuse() {
29777
29717
  }
29718
+ isStatic() {
29719
+ return true;
29720
+ }
29778
29721
  getTextElement() {
29779
29722
  return null;
29780
29723
  }
@@ -30264,7 +30207,7 @@ void main(void){
30264
30207
  }
30265
30208
  class TA {
30266
30209
  constructor(t3, e3, n3, i3, r3) {
30267
- this.ctx = t3, this.fillStyle = e3, this.width = n3, this.height = i3, this.config = r3, this.clonedObjects = [], this._displayObject = null;
30210
+ this.ctx = t3, this.fillStyle = e3, this.width = n3, this.height = i3, this.config = r3, this.clonedObjects = [], this._displayObject = null, this.gradientHash = fM()(`${JSON.stringify(e3)}${Math.ceil(n3)}${Math.ceil(i3)}`);
30268
30211
  }
30269
30212
  get displayObject() {
30270
30213
  return this._displayObject || (this._displayObject = this.createDisplayObject()), this._displayObject;
@@ -30285,8 +30228,15 @@ void main(void){
30285
30228
  }
30286
30229
  if (this.fillStyle.fillType === "solidFill" || this.fillStyle.fillType === "noFill")
30287
30230
  return null;
30288
- if (this.fillStyle.fillType === "gradientFill")
30289
- return hA(this.fillStyle, this.width, this.height);
30231
+ if (this.fillStyle.fillType === "gradientFill") {
30232
+ const t4 = new Ow();
30233
+ let e3 = TA.gradientPool.get(this.gradientHash);
30234
+ if (!e3) {
30235
+ const t5 = hA(this.fillStyle, this.width, this.height), n3 = Hy.create({ width: this.width, height: this.height, resolution: this.ctx.renderer.resolution });
30236
+ this.ctx.renderer.render(t5, { renderTexture: n3 }), e3 = n3, TA.gradientPool.set(this.gradientHash, e3), t5.destroy({ children: true, texture: true });
30237
+ }
30238
+ return t4.texture = e3, t4;
30239
+ }
30290
30240
  if (this.fillStyle.fillType === "blipFill") {
30291
30241
  const { src: e3, filters: n3 } = this.fillStyle, i3 = this.ctx.spriteTexture.getTexture(e3), r3 = this.ctx.spriteTexture.getFrameData(e3);
30292
30242
  if (i3) {
@@ -30341,6 +30291,7 @@ void main(void){
30341
30291
  }), this.clonedObjects = [];
30342
30292
  }
30343
30293
  }
30294
+ TA.gradientPool = /* @__PURE__ */ new Map();
30344
30295
  var wA = function(t3, e3, n3, i3) {
30345
30296
  return new (n3 || (n3 = Promise))(function(r3, o2) {
30346
30297
  function s3(t4) {
@@ -31004,6 +30955,9 @@ void main(void){
31004
30955
  }
31005
30956
  initOnReuse() {
31006
30957
  }
30958
+ isStatic() {
30959
+ return !!this.json.cacheAsBitMap;
30960
+ }
31007
30961
  destroy() {
31008
30962
  var t3, e3, n3, i3;
31009
30963
  (t3 = this.text) === null || t3 === void 0 || t3.destroy(), this.fillColorFilter.destroy(), this.strokeColorFilter.destroy(), this.backgroundFill.destroy(), (e3 = this.backgroundGraphics) === null || e3 === void 0 || e3.destroy(), this.strokeFill.destroy(), (n3 = this.strokeGraphics) === null || n3 === void 0 || n3.destroy(), this.renderContainer.destroy(), (i3 = this.arrowRenderTexture) === null || i3 === void 0 || i3.destroy(true), this.arrowList = [];
@@ -31046,7 +31000,7 @@ void main(void){
31046
31000
  return void this.ctx.logger.info("Media controller prevent seek event with paused state", this.ctx.taskId);
31047
31001
  t4.stopPropagation();
31048
31002
  const e4 = t4.offsetX / this.progress.clientWidth * this.duration;
31049
- this.medianIsEnd = false, this.ctx.mode !== "interactive" && this.jumpToTime(e4), this.ctx.mode !== "local" && this.ctx.eventHub.emit(JR.mediaSeek, { id: this.targetId, time: e4, isPlaying: this.media.isPlaying });
31003
+ this.medianIsEnd = false, this.ctx.mode !== "interactive" && this.jumpToTime(e4), this.ctx.mode !== "local" && this.ctx.eventHub.emit($R.mediaSeek, { id: this.targetId, time: e4, isPlaying: this.media.isPlaying });
31050
31004
  }, this.jumpToTime = (t4 = 0) => {
31051
31005
  const e4 = Math.floor(t4) + this.start;
31052
31006
  this.media.currentTime !== e4 && (this.media.currentTime = e4, this.changeBookmarkIndex(e4, e4 > this.media.currentTime));
@@ -31075,9 +31029,9 @@ void main(void){
31075
31029
  t4();
31076
31030
  });
31077
31031
  }, this.playMediaFromCtrl = () => {
31078
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent play event with paused state", this.ctx.taskId) : (this.ctx.mode !== "interactive" && this.playMedia(), this.ctx.mode !== "local" && this.ctx.eventHub.emit(JR.mediaPlay, { id: this.targetId, time: this.media.currentTime - this.start }));
31032
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent play event with paused state", this.ctx.taskId) : (this.ctx.mode !== "interactive" && this.playMedia(), this.ctx.mode !== "local" && this.ctx.eventHub.emit($R.mediaPlay, { id: this.targetId, time: this.media.currentTime - this.start }));
31079
31033
  }, this.pauseMediaFromCtrl = () => {
31080
- this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent pause event with paused state", this.ctx.taskId) : (this.ctx.mode !== "interactive" && this.pauseMedia(), this.ctx.mode !== "local" && this.ctx.eventHub.emit(JR.mediaPause, { id: this.targetId, time: this.media.currentTime - this.start }));
31034
+ this.ctx.isPlayerPaused() ? this.ctx.logger.info("Media controller prevent pause event with paused state", this.ctx.taskId) : (this.ctx.mode !== "interactive" && this.pauseMedia(), this.ctx.mode !== "local" && this.ctx.eventHub.emit($R.mediaPause, { id: this.targetId, time: this.media.currentTime - this.start }));
31081
31035
  }, this.targetId = t3.targetId, this.ctx = t3.ctx, this.height = t3.height, this.width = t3.width, this.target = t3.target, this.media = t3.media, this.info = t3.info, this.shapeId = t3.shapeId, this.canvasElement = t3.canvasElement, this.getMedianContainer(), this.createMediaController(), this.info.cut && (this.start = (e3 = this.info.cut.start) !== null && e3 !== void 0 ? e3 : 0, this.end = (n3 = this.info.cut.end) !== null && n3 !== void 0 ? n3 : 0), this.info.bookmarkList && (this.bookmarkList = this.info.bookmarkList.sort((t4, e4) => t4.time - e4.time));
31082
31036
  }
31083
31037
  getMedianContainer() {
@@ -31163,13 +31117,51 @@ void main(void){
31163
31117
  this.unbindEvent(), this.playCallBackList = [], (t3 = this.container) === null || t3 === void 0 || t3.removeChild(this.mediaController);
31164
31118
  }
31165
31119
  }
31166
- var VA = n2(49);
31167
- class WA extends a.a {
31120
+ var VA = n2(49), WA = function(t3, e3, n3, i3) {
31121
+ return new (n3 || (n3 = Promise))(function(r3, o2) {
31122
+ function s3(t4) {
31123
+ try {
31124
+ l2(i3.next(t4));
31125
+ } catch (t5) {
31126
+ o2(t5);
31127
+ }
31128
+ }
31129
+ function a2(t4) {
31130
+ try {
31131
+ l2(i3.throw(t4));
31132
+ } catch (t5) {
31133
+ o2(t5);
31134
+ }
31135
+ }
31136
+ function l2(t4) {
31137
+ var e4;
31138
+ t4.done ? r3(t4.value) : (e4 = t4.value, e4 instanceof n3 ? e4 : new n3(function(t5) {
31139
+ t5(e4);
31140
+ })).then(s3, a2);
31141
+ }
31142
+ l2((i3 = i3.apply(t3, e3 || [])).next());
31143
+ });
31144
+ };
31145
+ class XA extends a.a {
31168
31146
  constructor(t3, e3) {
31169
- super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.url = t3, this.runningAudio = e3, $R.RtcAudioClazz ? (this.rctClient = new $R.RtcAudioClazz(t3), 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: [t3] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play")));
31147
+ super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this._isResourceExist = "unknow", this.url = t3, this.runningAudio = e3, KR.RtcAudioClazz ? (this.rctClient = new KR.RtcAudioClazz(t3), 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: [t3] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play"))), this.detectResourceExist();
31170
31148
  }
31171
31149
  startTimeChangeEmit() {
31172
- this.currentTime !== this.lastTime && (this.lastTime = this.currentTime, this.emit("timeupdate")), this.isEnded || requestAnimationFrame(() => this.startTimeChangeEmit());
31150
+ this.currentTime !== this.lastTime && (this.lastTime = this.currentTime, this.emit("timeupdate")), this.isEnded || setTimeout(() => this.startTimeChangeEmit(), 300);
31151
+ }
31152
+ detectResourceExist() {
31153
+ return new Promise((t3) => {
31154
+ fetch(this.url, { method: "HEAD" }).then((e3) => {
31155
+ this._isResourceExist = e3.ok ? "true" : "false", t3(e3.ok);
31156
+ }).catch(() => {
31157
+ this._isResourceExist = "false", t3(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
+ });
31173
31165
  }
31174
31166
  play() {
31175
31167
  var t3, e3, n3;
@@ -31209,7 +31201,7 @@ void main(void){
31209
31201
  return this.rctClient ? this.rctClient.isPaused : !!this.howl && this.howl.playing();
31210
31202
  }
31211
31203
  }
31212
- var XA = function(t3, e3, n3, i3) {
31204
+ var qA = function(t3, e3, n3, i3) {
31213
31205
  return new (n3 || (n3 = Promise))(function(r3, o2) {
31214
31206
  function s3(t4) {
31215
31207
  try {
@@ -31234,14 +31226,14 @@ void main(void){
31234
31226
  l2((i3 = i3.apply(t3, e3 || [])).next());
31235
31227
  });
31236
31228
  };
31237
- class qA extends a.a {
31229
+ class YA extends a.a {
31238
31230
  constructor(t3) {
31239
31231
  var e3, n3;
31240
31232
  super(), this.type = "video", this.sprite = new Ow(), this.isPlaying = false, this.isGlobalPause = false, this.id = t3.id, this.start = (e3 = t3.video.cut) === null || e3 === void 0 ? void 0 : e3.start, this.end = (n3 = t3.video.cut) === null || n3 === void 0 ? void 0 : n3.end, this.container = t3.container, this.ctx = t3.ctx, this.ctx.medias[this.id] = this;
31241
31233
  let i3 = t3.video.src;
31242
31234
  this.ctx.loaderDelegate && (i3 = this.ctx.loaderDelegate.redirectMedia(i3), this.ctx.logger.info(`redirect media url from ${t3.video.src} to ${i3} by delegate.`, t3.ctx.taskId)), this.videoResource = new Iy(i3, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true });
31243
31235
  let r3 = t3.video.src.replace(/4$/, "3");
31244
- this.ctx.loaderDelegate && (r3 = this.ctx.loaderDelegate.redirectMedia(r3), this.ctx.logger.info(`redirect media url from ${t3.video.src.replace(/4$/, "3")} to ${r3} by delegate.`, t3.ctx.taskId)), this.rtcAudio = new WA(r3, t3.ctx.runningAudio);
31236
+ this.ctx.loaderDelegate && (r3 = this.ctx.loaderDelegate.redirectMedia(r3), this.ctx.logger.info(`redirect media url from ${t3.video.src.replace(/4$/, "3")} to ${r3} by delegate.`, t3.ctx.taskId)), this.rtcAudio = new XA(r3, t3.ctx.runningAudio);
31245
31237
  const { video: o2, width: s3, height: a2, target: l2 } = t3;
31246
31238
  this.controller = new jA({ targetId: t3.id, shapeId: t3.shapeId, ctx: t3.ctx, width: s3, height: a2, target: l2, media: this, info: o2, canvasElement: t3.canvasElement }), this.controller.addPlayCallBack(() => {
31247
31239
  this.sprite.width = s3, this.sprite.height = a2, this.ctx.clock.setTimeout(() => {
@@ -31264,7 +31256,7 @@ void main(void){
31264
31256
  return (e3 = (t3 = this.videoResource.source) === null || t3 === void 0 ? void 0 : t3.currentTime) !== null && e3 !== void 0 ? e3 : 0;
31265
31257
  }
31266
31258
  set currentTime(t3) {
31267
- this.videoResource.source && (this.videoResource.source.currentTime = t3);
31259
+ KR.RtcAudioClazz && (this.rtcAudio.currentTime = t3), this.videoResource.source && (this.videoResource.source.currentTime = t3);
31268
31260
  }
31269
31261
  get paused() {
31270
31262
  var t3, e3;
@@ -31286,13 +31278,19 @@ void main(void){
31286
31278
  }
31287
31279
  play() {
31288
31280
  var t3;
31289
- return XA(this, void 0, void 0, function* () {
31281
+ return qA(this, void 0, void 0, function* () {
31290
31282
  this.isPlaying = true, yield this.load(), yield this.ctx.clock.waitUntil(() => {
31291
31283
  const t4 = this.videoResource.source;
31292
31284
  return !!(t4 && t4.videoWidth > 0);
31293
31285
  }, 3e3);
31294
31286
  const e3 = this.videoResource.source;
31295
- e3 && e3.videoWidth <= 0 || ($R.RtcAudioClazz && (this.rtcAudio.play(), this.videoResource.source.volume = 0), yield (t3 = this.videoResource.source) === null || t3 === void 0 ? void 0 : t3.play());
31287
+ if (e3 && e3.videoWidth <= 0)
31288
+ return;
31289
+ const n3 = yield this.rtcAudio.isResourceExist();
31290
+ KR.RtcAudioClazz && n3 ? (this.videoResource.source.volume = 0, this.rtcAudio.once("play", () => {
31291
+ var t4;
31292
+ (t4 = this.videoResource.source) === null || t4 === void 0 || t4.play();
31293
+ }), this.rtcAudio.play()) : yield (t3 = this.videoResource.source) === null || t3 === void 0 ? void 0 : t3.play();
31296
31294
  });
31297
31295
  }
31298
31296
  load() {
@@ -31300,7 +31298,10 @@ void main(void){
31300
31298
  }
31301
31299
  pause() {
31302
31300
  var t3;
31303
- this.isPlaying = false, $R.RtcAudioClazz && this.rtcAudio.pause(), (t3 = this.videoResource.source) === null || t3 === void 0 || t3.pause();
31301
+ this.isPlaying = false, KR.RtcAudioClazz ? (this.rtcAudio.once("pause", () => {
31302
+ var t4;
31303
+ (t4 = this.videoResource.source) === null || t4 === void 0 || t4.pause();
31304
+ }), this.rtcAudio.pause()) : (t3 = this.videoResource.source) === null || t3 === void 0 || t3.pause();
31304
31305
  }
31305
31306
  globalPause() {
31306
31307
  this.isPlaying && (this.isGlobalPause = true, this.pause());
@@ -31322,7 +31323,7 @@ void main(void){
31322
31323
  this.sprite.interactive = false, this.sprite.destroy({ texture: true, baseTexture: true }), (t3 = this.videoResource) === null || t3 === void 0 || t3.destroy(), this.rtcAudio.destroy(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31323
31324
  }
31324
31325
  }
31325
- var YA = function(t3, e3, n3, i3) {
31326
+ var ZA = function(t3, e3, n3, i3) {
31326
31327
  return new (n3 || (n3 = Promise))(function(r3, o2) {
31327
31328
  function s3(t4) {
31328
31329
  try {
@@ -31347,11 +31348,11 @@ void main(void){
31347
31348
  l2((i3 = i3.apply(t3, e3 || [])).next());
31348
31349
  });
31349
31350
  };
31350
- class ZA extends a.a {
31351
+ class JA extends a.a {
31351
31352
  constructor(t3) {
31352
31353
  super(), this.type = "audio", this.isPlaying = false, this.isGlobalPause = false, this.id = t3.id;
31353
31354
  let e3 = t3.audio.src;
31354
- t3.ctx.loaderDelegate && (e3 = t3.ctx.loaderDelegate.redirectMedia(e3), t3.ctx.logger.info(`redirect media url from ${t3.audio.src} to ${e3} by delegate.`, t3.ctx.taskId)), this.audioPlayer = new WA(e3, t3.ctx.runningAudio), t3.audio.cut && (this.start = t3.audio.cut.start, this.end = t3.audio.cut.end), this.ctx = t3.ctx, this.ctx.medias[this.id] = this;
31355
+ t3.ctx.loaderDelegate && (e3 = t3.ctx.loaderDelegate.redirectMedia(e3), t3.ctx.logger.info(`redirect media url from ${t3.audio.src} to ${e3} by delegate.`, t3.ctx.taskId)), this.audioPlayer = new XA(e3, t3.ctx.runningAudio), t3.audio.cut && (this.start = t3.audio.cut.start, this.end = t3.audio.cut.end), this.ctx = t3.ctx, this.ctx.medias[this.id] = this;
31355
31356
  const { width: n3, height: i3, target: r3 } = t3;
31356
31357
  this.controller = new jA({ targetId: t3.id, shapeId: t3.shapeId, ctx: t3.ctx, height: i3, width: n3, target: r3, media: this, info: t3.audio, canvasElement: t3.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);
31357
31358
  }
@@ -31383,7 +31384,7 @@ void main(void){
31383
31384
  this.controller.hide();
31384
31385
  }
31385
31386
  play() {
31386
- return YA(this, void 0, void 0, function* () {
31387
+ return ZA(this, void 0, void 0, function* () {
31387
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());
31388
31389
  });
31389
31390
  }
@@ -31409,7 +31410,7 @@ void main(void){
31409
31410
  this.audioPlayer.pause(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31410
31411
  }
31411
31412
  }
31412
- class JA extends GA {
31413
+ class $A extends GA {
31413
31414
  constructor(t3, e3, n3, i3) {
31414
31415
  super(Object.assign(Object.assign({}, t3), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e3, n3, i3), this.isInteractiveOutside = false, this.cmd = new EM(this), this.media = t3 == null ? void 0 : t3.media, this.picFill = new TA(this.ctx, t3.picFill, t3.width, t3.height, { useFilter: false, useSlideBackgroundFill: false });
31415
31416
  }
@@ -31432,7 +31433,7 @@ void main(void){
31432
31433
  const s3 = (t3 = this.backgroundGraphics) === null || t3 === void 0 ? void 0 : t3.getClonedDisplayObject();
31433
31434
  ((e3 = this.backgroundGraphics) === null || e3 === void 0 ? void 0 : e3.isNeedMask(o2.width, o2.height)) && s3 && (o2.mask = s3, this.container.addChild(s3)), o2.width = this.designWidth, o2.height = this.designHeight, o2 instanceof jE && this.ctx.slideScopeEventHub.once("slide-render", (t4) => {
31434
31435
  this.ctx.slideIndex === t4 && o2.play();
31435
- }), this.container.addChild(o2), ((n3 = this.media) === null || n3 === void 0 ? void 0 : n3.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 }), (i3 = this.mediaPlayer) === null || i3 === void 0 || i3.sprite) : ((r3 = this.media) === null || r3 === void 0 ? void 0 : r3.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", () => {
31436
+ }), this.container.addChild(o2), ((n3 = this.media) === null || n3 === void 0 ? void 0 : n3.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 }), (i3 = this.mediaPlayer) === null || i3 === void 0 || i3.sprite) : ((r3 = this.media) === null || r3 === void 0 ? void 0 : r3.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", () => {
31436
31437
  this.mediaPlayer.showController();
31437
31438
  }), this.container.on("mouseout", () => {
31438
31439
  this.mediaPlayer.hideController();
@@ -31451,11 +31452,15 @@ void main(void){
31451
31452
  initOnReuse() {
31452
31453
  super.initOnReuse(), this.mediaPlayer && (this.container.interactive = true);
31453
31454
  }
31455
+ isStatic() {
31456
+ const t3 = this.json;
31457
+ return (!t3.media || t3.media.type !== "video") && super.isStatic();
31458
+ }
31454
31459
  destroy() {
31455
31460
  this.mediaPlayer && (this.picFill.displayObject && !this.isInteractiveOutside && (this.container.interactive = false), this.mediaPlayer.destroy(), this.mediaPlayer = void 0), this.picFill.destroy();
31456
31461
  }
31457
31462
  }
31458
- var $A = function(t3, e3, n3, i3) {
31463
+ var KA = function(t3, e3, n3, i3) {
31459
31464
  return new (n3 || (n3 = Promise))(function(r3, o2) {
31460
31465
  function s3(t4) {
31461
31466
  try {
@@ -31480,7 +31485,7 @@ void main(void){
31480
31485
  l2((i3 = i3.apply(t3, e3 || [])).next());
31481
31486
  });
31482
31487
  };
31483
- class KA extends PM {
31488
+ class QA extends PM {
31484
31489
  constructor(t3, e3, n3, i3, r3) {
31485
31490
  super(t3, e3, n3), this.children = [], this.cacheSprite = new Ow(), this.cacheContainer = new ty(), this.json = t3, this.json.fillStyle && this.json.fillStyle.fillType === "groupFill" && i3 && (this.json.fillStyle = i3), this.container.name = t3.id, this.cacheContainer.name = t3.id + "-cache-container", this.ctx.timingTargets.addTarget(t3.id, this), this.updateTransform(this.json), this.fillObject = new TA(this.ctx, t3.fillStyle, t3.width, t3.height, { useFilter: false, useSlideBackgroundFill: false }), this.createChildren(r3);
31486
31491
  }
@@ -31488,10 +31493,10 @@ void main(void){
31488
31493
  var e3, n3, i3, r3;
31489
31494
  const o2 = { x: (n3 = (e3 = this.json.position) === null || e3 === void 0 ? void 0 : e3.x) !== null && n3 !== void 0 ? n3 : 0, y: (r3 = (i3 = this.json.position) === null || i3 === void 0 ? void 0 : i3.y) !== null && r3 !== void 0 ? r3 : 0 };
31490
31495
  for (let e4 = 0, n4 = this.json.children.length; e4 < n4; e4++)
31491
- t3.addSubMTask(() => $A(this, void 0, void 0, function* () {
31496
+ t3.addSubMTask(() => KA(this, void 0, void 0, function* () {
31492
31497
  const n5 = this.json.children[e4];
31493
31498
  let i4 = null;
31494
- (n5 == null ? void 0 : n5.type) === "Shape" ? i4 = new GA(n5, this.ctx, o2, this.json.fillStyle) : (n5 == null ? void 0 : n5.type) === "Picture" ? i4 = new JA(n5, this.ctx, o2, this.json.fillStyle) : (n5 == null ? void 0 : n5.type) === "Container" && (i4 = new KA(n5, this.ctx, o2, this.json.fillStyle, t3)), i4 && this.children.push(i4);
31499
+ (n5 == null ? void 0 : n5.type) === "Shape" ? i4 = new GA(n5, this.ctx, o2, this.json.fillStyle) : (n5 == null ? void 0 : n5.type) === "Picture" ? i4 = new $A(n5, this.ctx, o2, this.json.fillStyle) : (n5 == null ? void 0 : n5.type) === "Container" && (i4 = new QA(n5, this.ctx, o2, this.json.fillStyle, t3)), i4 && this.children.push(i4);
31495
31500
  }), "@ContainerImpl[child.init]");
31496
31501
  }
31497
31502
  get interactiveContainer() {
@@ -31502,7 +31507,7 @@ void main(void){
31502
31507
  }
31503
31508
  preRender(t3) {
31504
31509
  for (const e3 of this.children)
31505
- t3.addSubMTask(() => $A(this, void 0, void 0, function* () {
31510
+ t3.addSubMTask(() => KA(this, void 0, void 0, function* () {
31506
31511
  e3.preRender(t3);
31507
31512
  }), "@ContainerImpl[child.preRender]");
31508
31513
  }
@@ -31516,13 +31521,22 @@ void main(void){
31516
31521
  return null;
31517
31522
  }
31518
31523
  render(t3) {
31519
- for (const e3 of this.children)
31520
- e3.render(t3), t3.addSubMTask(() => $A(this, void 0, void 0, function* () {
31524
+ let e3 = new ty();
31525
+ for (const n3 of this.children)
31526
+ n3.render(t3), t3.addSubMTask(() => KA(this, void 0, void 0, function* () {
31521
31527
  var t4;
31522
- e3.renderContainer && this.cacheContainer.addChild(e3.renderContainer), (e3.json.hlinkHover || e3.json.hlinkClick) && ((t4 = e3.hyperlink) === null || t4 === void 0 || t4.addProxy(this.container));
31528
+ n3.isStatic() && !this.json.cacheAsTexture && n3.json.width < 4096 && n3.json.height < 4096 ? e3.addChild(n3.renderContainer) : (e3.children.length > 0 && (e3.cacheAsBitmap = true, this.cacheContainer.addChild(e3), e3 = new ty()), this.cacheContainer.addChild(n3.renderContainer)), (n3.json.hlinkHover || n3.json.hlinkClick) && ((t4 = n3.hyperlink) === null || t4 === void 0 || t4.addProxy(this.container));
31523
31529
  }), "@ContainerImpl[child.render]");
31524
- t3.addSubMTask(() => $A(this, void 0, void 0, function* () {
31525
- this.container.addChild(this.cacheContainer);
31530
+ t3.addMTask(() => KA(this, void 0, void 0, function* () {
31531
+ e3.children.length > 0 && (e3.cacheAsBitmap = true, this.cacheContainer.addChild(e3));
31532
+ }), "@ContainerImpl[child.render]"), t3.addSubMTask(() => KA(this, void 0, void 0, function* () {
31533
+ this.container.addChild(this.cacheContainer), this.json.cacheAsTexture && (!function(t4, e4, n3, i3, r3) {
31534
+ const o2 = t4.getBounds(), s3 = Math.min(o2.x, e4.x, o2.x + o2.width, e4.x + e4.width), a2 = Math.max(o2.x, e4.x, o2.x + o2.width, e4.x + e4.width), l2 = Math.min(o2.y, e4.y, o2.y + o2.height, e4.y + e4.height), u2 = a2 - s3, h2 = Math.max(o2.y, e4.y, o2.y + o2.height, e4.y + e4.height) - l2;
31535
+ let c2 = KE(e4.x - o2.x), d2 = KE(e4.y - o2.y);
31536
+ r3 || (c2 = Math.max(0, c2), d2 = Math.max(0, d2));
31537
+ const p2 = Hy.create({ width: u2, height: h2, resolution: i3.renderer.resolution });
31538
+ t4.position.x = c2, t4.position.y = d2, i3.renderer.render(t4, { renderTexture: p2 }), n3.texture = p2, n3.position.x = -c2, n3.position.y = -d2;
31539
+ }(this.cacheContainer, new d_(this.designX, this.designY, this.designWidth, this.designHeight), this.cacheSprite, this.ctx, false), this.container.addChild(this.cacheSprite), this.cacheContainer.position.x = 0, this.cacheContainer.position.y = 0, this.cacheContainer.visible = false);
31526
31540
  }), "@ContainerImpl[child.append]");
31527
31541
  }
31528
31542
  clearOnSlideChange() {
@@ -31531,11 +31545,14 @@ void main(void){
31531
31545
  initOnReuse() {
31532
31546
  this.children.forEach((t3) => t3.initOnReuse());
31533
31547
  }
31548
+ isStatic() {
31549
+ return !!this.json.cacheAsTexture;
31550
+ }
31534
31551
  destroy() {
31535
31552
  this.cacheSprite && this.cacheSprite.destroy({ texture: true }), this.children.forEach((t3) => t3.destroy()), this.container.destroy({ children: true, texture: true, baseTexture: true }), this.cacheContainer.destroy({ children: true, texture: true, baseTexture: true });
31536
31553
  }
31537
31554
  }
31538
- class QA extends a.a {
31555
+ class tR extends a.a {
31539
31556
  constructor(t3, e3, n3, i3) {
31540
31557
  super(), this.cond = {}, this.timeoutIds = [], this.condHandle = (t4, e4 = {}) => {
31541
31558
  if (t4)
@@ -31582,7 +31599,7 @@ void main(void){
31582
31599
  }), this.timeoutIds.forEach((t3) => this.ctx.clock.clearTimeout(t3));
31583
31600
  }
31584
31601
  }
31585
- class tR extends a.a {
31602
+ class eR extends a.a {
31586
31603
  constructor(t3) {
31587
31604
  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 = (t4 = false) => {
31588
31605
  var e4, n4, i4, r4, o3, s4;
@@ -31592,16 +31609,16 @@ void main(void){
31592
31609
  this.isTimeNodeEndSync && (this.isTimeNodeEndSync = false, this.currentSeqState = "idle", this.currentSeqIndex = 0), this.hasNext() || !this.isMainSeq ? this.currentSeqState === "idle" ? (e4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || e4 === void 0 || e4.commonTimeNode.startTimeNodeForce() : this.currentSeqState === "running" ? ((n4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || n4 === void 0 || n4.commonTimeNode.seekToEnd(false, true), this.currentSeqState = "end", this.incrSeqIndex(), (i4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || i4 === void 0 || i4.commonTimeNode.startTimeNodeForce()) : this.currentSeqState === "end" && (this.incrSeqIndex(), (r4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || r4 === void 0 || r4.commonTimeNode.startTimeNodeForce()) : this.globalEventHub.emit("c:next slide", t4);
31593
31610
  };
31594
31611
  const { json: e3, iterateType: n3, isIterate: i3, isSub: r3, parent: o2, ctx: s3, eventHub: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t3;
31595
- this.isMainSeq = e3.ctn.nodeType === "mainSeq", this.isInteractiveSeq = e3.ctn.nodeType === "interactiveSeq", this.id = e3.ctn.id, this.isIterate = i3, this.json = e3, this.ctx = s3, this.globalEventHub = l2, this.commonTimeNode = new RR({ json: e3.ctn, isSub: r3, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s3, parent: o2, isIterate: false, iterateType: n3, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 || this.isInteractiveSeq }), this.bindShapeEvent(), this.nextConds = new QA("mainSeq", e3.nextCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.prevConds = new QA("mainSeq", e3.preCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.commonTimeNode.on("timeNodeRestart", () => {
31612
+ this.isMainSeq = e3.ctn.nodeType === "mainSeq", this.isInteractiveSeq = e3.ctn.nodeType === "interactiveSeq", this.id = e3.ctn.id, this.isIterate = i3, this.json = e3, this.ctx = s3, this.globalEventHub = l2, this.commonTimeNode = new PR({ json: e3.ctn, isSub: r3, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s3, parent: o2, isIterate: false, iterateType: n3, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 || this.isInteractiveSeq }), this.bindShapeEvent(), this.nextConds = new tR("mainSeq", e3.nextCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.prevConds = new tR("mainSeq", e3.preCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.commonTimeNode.on("timeNodeRestart", () => {
31596
31613
  this.currentSeqIndex = 0, this.currentSeqState = "idle";
31597
31614
  }), this.commonTimeNode.on("childTimeNodeStart", (t4) => {
31598
31615
  const e4 = this.commonTimeNode.children.findIndex((e5) => e5.commonTimeNode.uuid === t4.id);
31599
- e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit(JR.mainSeqStepStart, e4);
31616
+ e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit($R.mainSeqStepStart, e4);
31600
31617
  }), this.commonTimeNode.on("childTimeNodeEnd", (t4) => {
31601
31618
  const e4 = this.commonTimeNode.children.findIndex((e5) => e5.commonTimeNode.uuid === t4.id);
31602
31619
  e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "end", this.autoPlay && this.ctx.clock.setTimeout(() => {
31603
31620
  this.handleNext();
31604
- }), this.isMainSeq && this.ctx.eventHub.emit(JR.mainSeqStepEnd, e4);
31621
+ }), this.isMainSeq && this.ctx.eventHub.emit($R.mainSeqStepEnd, e4);
31605
31622
  }), this.commonTimeNode.on("timeNodeEndSync", () => {
31606
31623
  this.isTimeNodeEndSync = true, this.commonTimeNode.resetForRepeat();
31607
31624
  }), this.commonTimeNode.on("timeNodeDestroy", () => {
@@ -31618,13 +31635,13 @@ void main(void){
31618
31635
  return this._currentSeqIndex;
31619
31636
  }
31620
31637
  set currentSeqIndex(t3) {
31621
- this._currentSeqIndex = t3, this.isMainSeq ? this.ctx.eventHub.emit(JR.mainSeqStepChange, t3) : this.isInteractiveSeq && this.ctx.eventHub.emit(JR.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t3, state: this._currentSeqState } });
31638
+ this._currentSeqIndex = t3, this.isMainSeq ? this.ctx.eventHub.emit($R.mainSeqStepChange, t3) : this.isInteractiveSeq && this.ctx.eventHub.emit($R.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t3, state: this._currentSeqState } });
31622
31639
  }
31623
31640
  get currentSeqState() {
31624
31641
  return this._currentSeqState;
31625
31642
  }
31626
31643
  set currentSeqState(t3) {
31627
- this._currentSeqState = t3, this.isMainSeq ? this.ctx.eventHub.emit(JR.mainSeqStateChange, t3) : this.isInteractiveSeq && this.ctx.eventHub.emit(JR.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t3 } });
31644
+ this._currentSeqState = t3, this.isMainSeq ? this.ctx.eventHub.emit($R.mainSeqStateChange, t3) : this.isInteractiveSeq && this.ctx.eventHub.emit($R.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t3 } });
31628
31645
  }
31629
31646
  get stepLength() {
31630
31647
  return this.commonTimeNode.children.length;
@@ -31659,9 +31676,9 @@ void main(void){
31659
31676
  if (t4) {
31660
31677
  t4.interactiveContainer.interactive = true, t4.interactiveContainer.cursor = "pointer";
31661
31678
  const n3 = () => {
31662
- this.ctx.eventHub.emit(JR.userInput);
31679
+ this.ctx.eventHub.emit($R.userInput);
31663
31680
  const t5 = `shape ${e3} onClick`, { mode: n4 } = this.ctx;
31664
- n4 !== "interactive" && n4 !== "sync" || this.ctx.eventHub.emit(JR.interactiveSeqAction, { action: t5, seqId: this.json.ctn.id }), n4 !== "sync" && n4 !== "local" || this.globalEventHub.emit(t5);
31681
+ n4 !== "interactive" && n4 !== "sync" || this.ctx.eventHub.emit($R.interactiveSeqAction, { action: t5, seqId: this.json.ctn.id }), n4 !== "sync" && n4 !== "local" || this.globalEventHub.emit(t5);
31665
31682
  };
31666
31683
  t4.interactiveContainer.on("pointerdown", n3), this.interactiveListeners.push([t4, n3]);
31667
31684
  }
@@ -31682,7 +31699,7 @@ void main(void){
31682
31699
  this.currentSeqIndex = n3, this.currentSeqState = e3 === "start" ? "idle" : "end";
31683
31700
  }
31684
31701
  }
31685
- function eR(t3, e3, n3) {
31702
+ function nR(t3, e3, n3) {
31686
31703
  const i3 = e3.split(".");
31687
31704
  i3.reduce((r3, o2, s3) => {
31688
31705
  if (r3)
@@ -31690,7 +31707,7 @@ void main(void){
31690
31707
  console.warn(`${t3} not support ${e3}`);
31691
31708
  }, t3);
31692
31709
  }
31693
- function nR(t3, e3) {
31710
+ function iR(t3, e3) {
31694
31711
  if (!e3)
31695
31712
  return null;
31696
31713
  return e3.split(".").reduce((n3, i3) => {
@@ -31699,7 +31716,7 @@ void main(void){
31699
31716
  console.warn(`${t3} not support ${e3}`);
31700
31717
  }, t3);
31701
31718
  }
31702
- class iR {
31719
+ class rR {
31703
31720
  constructor(t3) {
31704
31721
  this.timingTarget = null, this.runtimeNodeEventHub = new a.a(), this.basicOnTimeNodeEnd = () => {
31705
31722
  if (this.isConflict) {
@@ -31717,29 +31734,29 @@ void main(void){
31717
31734
  }
31718
31735
  };
31719
31736
  const { isIterate: e3, isSub: n3, json: i3, ctx: r3, parent: o2, eventHub: s3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t3;
31720
- this.json = i3, this.id = i3.cBhvr.ctn.id, this.ctx = r3, this.globalEventHub = s3, this.commonTimeNode = new RR({ json: i3.cBhvr.ctn, isSub: n3, eventHubs: { global: s3, runtime: this.runtimeNodeEventHub }, ctx: r3, parent: o2, isIterate: e3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.timingTarget = this.ctx.timingTargets.getTarget(i3.cBhvr.target, e3, { 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);
31737
+ this.json = i3, this.id = i3.cBhvr.ctn.id, this.ctx = r3, this.globalEventHub = s3, this.commonTimeNode = new PR({ json: i3.cBhvr.ctn, isSub: n3, eventHubs: { global: s3, runtime: this.runtimeNodeEventHub }, ctx: r3, parent: o2, isIterate: e3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.timingTarget = this.ctx.timingTargets.getTarget(i3.cBhvr.target, e3, { 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);
31721
31738
  }
31722
31739
  getTargetId(t3) {
31723
31740
  let e3 = t3.id;
31724
31741
  return t3.type === "shape" && t3.txEl && (e3 = `${e3}-txEl-${t3.txEl.range[0]}`), this.commonTimeNode.isIterate && (e3 = `${e3}-iterate-${this.commonTimeNode.iterateIndex}`), e3;
31725
31742
  }
31726
31743
  }
31727
- class rR extends iR {
31744
+ class oR extends rR {
31728
31745
  constructor(t3) {
31729
31746
  super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.startVal = null, this.updateStartValue = () => {
31730
- this.timingTarget && (this.startVal = nR(this.timingTarget, this.json.cBhvr.attrList[0]));
31747
+ this.timingTarget && (this.startVal = iR(this.timingTarget, this.json.cBhvr.attrList[0]));
31731
31748
  }, this.onSeekToStart = () => {
31732
31749
  const t4 = this.json.cBhvr.attrList[0];
31733
- this.startVal !== null && this.timingTarget && eR(this.timingTarget, t4, this.startVal);
31750
+ this.startVal !== null && this.timingTarget && nR(this.timingTarget, t4, this.startVal);
31734
31751
  }, this.onSeekToEnd = () => {
31735
31752
  const t4 = this.json.cBhvr.attrList[0], e3 = this.json.cBhvr.to || this.json.to;
31736
- e3 && this.timingTarget && eR(this.timingTarget, t4, e3);
31753
+ e3 && this.timingTarget && nR(this.timingTarget, t4, e3);
31737
31754
  }, this.commonTimeNode.on("timeNodeStart", this.updateStartValue), this.commonTimeNode.on("timeNodeCreate", this.updateStartValue), this.commonTimeNode.on("timeUpdate", ({ duration: t4, delta: e3 }) => {
31738
31755
  if (e3 / t4 >= 1) {
31739
31756
  const t5 = this.json.cBhvr.attrList[0];
31740
31757
  this.json.cBhvr.attrList.length > 1 && console.warn("this.json.cBhvr.attrList.length > 0");
31741
31758
  const e4 = this.json.cBhvr.to || this.json.to;
31742
- e4 && this.timingTarget && eR(this.timingTarget, t5, e4);
31759
+ e4 && this.timingTarget && nR(this.timingTarget, t5, e4);
31743
31760
  }
31744
31761
  });
31745
31762
  }
@@ -31747,7 +31764,7 @@ void main(void){
31747
31764
  return this.json.cBhvr.attrList[0];
31748
31765
  }
31749
31766
  }
31750
- var oR = function(t3, e3, n3, i3) {
31767
+ var sR = function(t3, e3, n3, i3) {
31751
31768
  var r3, o2 = arguments.length, s3 = o2 < 3 ? e3 : i3 === null ? i3 = Object.getOwnPropertyDescriptor(e3, n3) : i3;
31752
31769
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
31753
31770
  s3 = Reflect.decorate(t3, e3, n3, i3);
@@ -31756,7 +31773,7 @@ void main(void){
31756
31773
  (r3 = t3[a2]) && (s3 = (o2 < 3 ? r3(s3) : o2 > 3 ? r3(e3, n3, s3) : r3(e3, n3)) || s3);
31757
31774
  return o2 > 3 && s3 && Object.defineProperty(e3, n3, s3), s3;
31758
31775
  };
31759
- class sR {
31776
+ class aR {
31760
31777
  constructor(t3, e3) {
31761
31778
  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: (t4) => t4 / Math.PI * 180, exp: Math.exp, floor: Math.floor, ln: Math.log, max: Math.max, min: Math.min, rad: (t4) => t4 / 180 * Math.PI, rand: Math.random, sin: Math.sin, sinh: Math.sinh, sqrt: Math.sqrt, tan: Math.tan, tanh: Math.tanh }, this.timingTarget = e3, this.val = t3.val.value, this.time = t3.time, t3.fmla && (this.fmla = this.parseFmla(t3.fmla));
31762
31779
  }
@@ -31768,7 +31785,7 @@ void main(void){
31768
31785
  }), new Function("vars", "math", "$", "return " + e3);
31769
31786
  }
31770
31787
  }
31771
- class aR extends sR {
31788
+ class lR extends aR {
31772
31789
  constructor(t3, e3, n3) {
31773
31790
  super(t3, e3), this.value = t3.val.value, n3 && (this.fmla = this.parseFmla(n3));
31774
31791
  }
@@ -31780,8 +31797,8 @@ void main(void){
31780
31797
  return t3.fmla ? t3.fmla(n3, this.math, r3) : r3;
31781
31798
  }
31782
31799
  }
31783
- oR([YE()], aR.prototype, "interpolationFrom", null);
31784
- class lR extends sR {
31800
+ sR([YE()], lR.prototype, "interpolationFrom", null);
31801
+ class uR extends aR {
31785
31802
  constructor(t3, e3) {
31786
31803
  var n3;
31787
31804
  super(t3, e3), this.value = (n3 = t3.val) === null || n3 === void 0 ? void 0 : n3.value;
@@ -31794,8 +31811,8 @@ void main(void){
31794
31811
  return this.value || "";
31795
31812
  }
31796
31813
  }
31797
- oR([YE()], lR.prototype, "interpolationFrom", null);
31798
- class uR extends sR {
31814
+ sR([YE()], uR.prototype, "interpolationFrom", null);
31815
+ class hR extends aR {
31799
31816
  constructor(t3, e3) {
31800
31817
  super(t3, e3), this.fn = this.parseFmla(this.val);
31801
31818
  }
@@ -31807,8 +31824,8 @@ void main(void){
31807
31824
  return t3.fmla ? t3.fmla(n3, this.math, r3) : r3;
31808
31825
  }
31809
31826
  }
31810
- oR([YE()], uR.prototype, "interpolationFrom", null);
31811
- class hR extends sR {
31827
+ sR([YE()], hR.prototype, "interpolationFrom", null);
31828
+ class cR extends aR {
31812
31829
  constructor(t3, e3) {
31813
31830
  super(t3, e3), this.value = t3.val.value;
31814
31831
  }
@@ -31819,11 +31836,11 @@ void main(void){
31819
31836
  return this.value;
31820
31837
  }
31821
31838
  }
31822
- oR([YE()], hR.prototype, "interpolationFrom", null);
31823
- class cR extends iR {
31839
+ sR([YE()], cR.prototype, "interpolationFrom", null);
31840
+ class dR extends rR {
31824
31841
  constructor(t3) {
31825
31842
  super(t3), 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 = () => {
31826
- this.timingTarget && (this.startVal = nR(this.timingTarget, this.json.cBhvr.attrList[0]));
31843
+ this.timingTarget && (this.startVal = iR(this.timingTarget, this.json.cBhvr.attrList[0]));
31827
31844
  }, this.updateVars = () => {
31828
31845
  var t4, e3, n3, i3;
31829
31846
  ((t4 = this.timingTarget) === null || t4 === void 0 ? void 0 : t4.ppt_h) && (this.vars.ppt_h = this.timingTarget.ppt_h), ((e3 = this.timingTarget) === null || e3 === void 0 ? void 0 : e3.ppt_w) && (this.vars.ppt_w = this.timingTarget.ppt_w), ((n3 = this.timingTarget) === null || n3 === void 0 ? void 0 : n3.ppt_x) && (this.vars.ppt_x = this.timingTarget.ppt_x), ((i3 = this.timingTarget) === null || i3 === void 0 ? void 0 : i3.ppt_y) && (this.vars.ppt_y = this.timingTarget.ppt_y), this.isColorAnim;
@@ -31831,12 +31848,12 @@ void main(void){
31831
31848
  const n3 = e3 / t4, i3 = this.keyFrames.findIndex((t5) => n3 <= t5[0]), { attrList: r3 } = this.json.cBhvr;
31832
31849
  if (i3 < 0) {
31833
31850
  const t5 = this.keyFrames[this.keyFrames.length - 1];
31834
- return void (this.timingTarget && r3 && r3[0] && eR(this.timingTarget, r3[0], t5[1].resolveValue(this.vars)));
31851
+ return void (this.timingTarget && r3 && r3[0] && nR(this.timingTarget, r3[0], t5[1].resolveValue(this.vars)));
31835
31852
  }
31836
31853
  const o2 = i3 - 1, s3 = this.keyFrames[i3], a2 = this.keyFrames[o2] || s3, l2 = s3[0] - a2[0] == 0 ? 1 : (n3 - a2[0]) / (s3[0] - a2[0]), u2 = s3[1].interpolationFrom(a2[1], l2, this.vars);
31837
- this.timingTarget && r3 && r3[0] && eR(this.timingTarget, r3[0], u2);
31854
+ this.timingTarget && r3 && r3[0] && nR(this.timingTarget, r3[0], u2);
31838
31855
  }, this.onSeekToStart = () => {
31839
- this.startVal !== null && this.timingTarget && eR(this.timingTarget, this.json.cBhvr.attrList[0], this.startVal);
31856
+ this.startVal !== null && this.timingTarget && nR(this.timingTarget, this.json.cBhvr.attrList[0], this.startVal);
31840
31857
  }, this.onSeekToEnd = () => {
31841
31858
  this.onTimeUpdate({ duration: 1, delta: 1, isReverse: false });
31842
31859
  }, 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);
@@ -31852,24 +31869,24 @@ void main(void){
31852
31869
  if (this.json.from || this.startVal) {
31853
31870
  const t5 = { time: 0, val: { type: "string", value: this.json.from || this.startVal.toString() }, fmla: "" };
31854
31871
  if (e3 === "num" && this.timingTarget) {
31855
- const e4 = new uR(t5, this.timingTarget);
31872
+ const e4 = new hR(t5, this.timingTarget);
31856
31873
  this.keyFrames.push([t5.time, e4]);
31857
31874
  }
31858
31875
  }
31859
31876
  const t4 = { time: 1, val: { type: "string", value: this.json.to }, fmla: "" };
31860
31877
  if (e3 === "num" && this.timingTarget) {
31861
- const e4 = new uR(t4, this.timingTarget);
31878
+ const e4 = new hR(t4, this.timingTarget);
31862
31879
  this.keyFrames.push([t4.time, e4]);
31863
31880
  }
31864
31881
  } else if (this.json.by) {
31865
31882
  const n3 = { time: 0, val: { type: "string", value: this.json.cBhvr.attrList[0] }, fmla: "" };
31866
31883
  if (e3 === "num" && this.timingTarget) {
31867
- const t4 = new uR(n3, this.timingTarget);
31884
+ const t4 = new hR(n3, this.timingTarget);
31868
31885
  this.keyFrames.push([n3.time, t4]);
31869
31886
  }
31870
31887
  const i3 = { time: 1, val: { type: "string", value: (((t3 = n3.val) === null || t3 === void 0 ? void 0 : t3.value) || "") + "+" + this.json.by }, fmla: "" };
31871
31888
  if (e3 === "num" && this.timingTarget) {
31872
- const t4 = new uR(i3, this.timingTarget);
31889
+ const t4 = new hR(i3, this.timingTarget);
31873
31890
  this.keyFrames.push([i3.time, t4]);
31874
31891
  }
31875
31892
  }
@@ -31878,15 +31895,15 @@ void main(void){
31878
31895
  for (const t4 of this.json.tavLst)
31879
31896
  if (t4.val && this.timingTarget) {
31880
31897
  let n3 = null;
31881
- t4.val.type === "string" ? e3 === "num" ? n3 = new uR(t4, this.timingTarget) : e3 === "str" && (n3 = new lR(t4, this.timingTarget)) : t4.val.type === "number" ? n3 = new aR(t4, this.timingTarget) : t4.val.type === "color" ? (this.isColorAnim = true, n3 = new hR(t4, this.timingTarget)) : t4.val.type === "boolean" && console.warn("not implements"), n3 && this.keyFrames.push([t4.time, n3]);
31898
+ t4.val.type === "string" ? e3 === "num" ? n3 = new hR(t4, this.timingTarget) : e3 === "str" && (n3 = new uR(t4, this.timingTarget)) : t4.val.type === "number" ? n3 = new lR(t4, this.timingTarget) : t4.val.type === "color" ? (this.isColorAnim = true, n3 = new cR(t4, this.timingTarget)) : t4.val.type === "boolean" && console.warn("not implements"), n3 && this.keyFrames.push([t4.time, n3]);
31882
31899
  }
31883
31900
  }
31884
31901
  }
31885
31902
  }
31886
- var dR = n2(50), pR = n2.n(dR), fR = n2(51), mR = n2.n(fR);
31887
- class gR extends Gx {
31903
+ var pR = n2(50), fR = n2.n(pR), mR = n2(51), gR = n2.n(mR);
31904
+ class vR extends Gx {
31888
31905
  constructor() {
31889
- super(mR.a, pR.a, { percent: 0, direction: 1, transition: 0 });
31906
+ super(gR.a, fR.a, { percent: 0, direction: 1, transition: 0 });
31890
31907
  }
31891
31908
  set transition(t3) {
31892
31909
  this.uniforms.transition = t3;
@@ -31898,10 +31915,10 @@ void main(void){
31898
31915
  this.uniforms.direction = t3;
31899
31916
  }
31900
31917
  }
31901
- var vR = n2(52), _R = n2.n(vR);
31902
- class yR extends Gx {
31918
+ var _R = n2(52), yR = n2.n(_R);
31919
+ class xR extends Gx {
31903
31920
  constructor() {
31904
- super(void 0, _R.a, { percent: 0, transition: 1 });
31921
+ super(void 0, yR.a, { percent: 0, transition: 1 });
31905
31922
  }
31906
31923
  set transition(t3) {
31907
31924
  this.uniforms.transition = Math.pow(t3, t3);
@@ -31910,7 +31927,7 @@ void main(void){
31910
31927
  this.uniforms.percent = t3;
31911
31928
  }
31912
31929
  }
31913
- class xR extends iR {
31930
+ class bR extends rR {
31914
31931
  constructor(t3) {
31915
31932
  var e3;
31916
31933
  super(t3), this.filterType = "", this.isConflict = true, this.activeWhenConflict = "prev", this.onTimeUpdate = ({ duration: t4, delta: e4 }) => {
@@ -31931,10 +31948,10 @@ void main(void){
31931
31948
  if (i3) {
31932
31949
  const t4 = i3[1], e4 = i3[3];
31933
31950
  if (t4 === "wipe") {
31934
- const n4 = new gR();
31951
+ const n4 = new vR();
31935
31952
  e4 === "up" ? n4.direction = 1 : e4 === "down" ? n4.direction = 2 : e4 === "left" ? n4.direction = 3 : e4 === "right" && (n4.direction = 4), this.filter = n4, this.filterType = `${t4}-${e4}`;
31936
31953
  } else if (t4 === "fade") {
31937
- const e5 = new yR();
31954
+ const e5 = new xR();
31938
31955
  this.filter = e5, this.filterType = "" + t4;
31939
31956
  }
31940
31957
  this.filter && (this.filter.transition = n3);
@@ -31944,7 +31961,7 @@ void main(void){
31944
31961
  return this.filterType;
31945
31962
  }
31946
31963
  }
31947
- class bR extends iR {
31964
+ class TR extends rR {
31948
31965
  constructor(t3) {
31949
31966
  super(t3), this.isConflict = true, this.activeWhenConflict = "next", this.startPos = null, this.onTimeNodeStart = () => {
31950
31967
  var t4, e3;
@@ -31997,7 +32014,7 @@ void main(void){
31997
32014
  this.path = e3;
31998
32015
  }
31999
32016
  }
32000
- class TR extends iR {
32017
+ class wR extends rR {
32001
32018
  constructor(t3) {
32002
32019
  super(t3), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.onTimelineStart = (t4) => {
32003
32020
  t4.isReverse || this.updateCurrentValue();
@@ -32027,34 +32044,34 @@ void main(void){
32027
32044
  this.timingTarget && (this.current = { x: this.timingTarget.scale.x, y: this.timingTarget.scale.y });
32028
32045
  }
32029
32046
  }
32030
- class wR extends iR {
32047
+ class SR extends rR {
32031
32048
  constructor(t3) {
32032
32049
  super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.isTimelineStart = false, this.startColorString = null, this.currentColorString = "#FFFFFFFF", this.onTimelineStart = (t4) => {
32033
32050
  if (this.isTimelineStart)
32034
32051
  return;
32035
32052
  this.isTimelineStart = true, t4.isReverse || this.updateCurrentValue(), this.from.isInit() || this.from.fromHexString(this.currentColorString), this.to.isInit() || this.from.by(this.by, this.to);
32036
32053
  const [e3] = this.json.cBhvr.attrList[0].split(".");
32037
- eR(this.timingTarget, e3 + ".on", "true");
32054
+ nR(this.timingTarget, e3 + ".on", "true");
32038
32055
  }, this.onTimeNodeEnd = () => {
32039
32056
  if (this.json.cBhvr.ctn.fill === "remove") {
32040
32057
  const [t4] = this.json.cBhvr.attrList[0].split(".");
32041
- eR(this.timingTarget, t4 + ".on", "false");
32058
+ nR(this.timingTarget, t4 + ".on", "false");
32042
32059
  }
32043
32060
  this.isTimelineStart = false;
32044
32061
  }, this.onSeekToStart = () => {
32045
32062
  var t4;
32046
32063
  if (this.timingTarget && (this.onTimeUpdate({ duration: 1, delta: 0 }), ((t4 = this.timingTarget.fill) === null || t4 === void 0 ? void 0 : t4.designColor.toUpperCase()) === this.from.toHexString().toUpperCase())) {
32047
32064
  const [t5] = this.json.cBhvr.attrList[0].split(".");
32048
- eR(this.timingTarget, t5 + ".on", "false");
32065
+ nR(this.timingTarget, t5 + ".on", "false");
32049
32066
  }
32050
32067
  }, this.onTimeNodeStart = () => {
32051
32068
  if (this.timingTarget) {
32052
- const t4 = nR(this.timingTarget, this.json.cBhvr.attrList[0]);
32069
+ const t4 = iR(this.timingTarget, this.json.cBhvr.attrList[0]);
32053
32070
  t4 && (this.startColorString = t4);
32054
32071
  }
32055
32072
  }, this.onTimeUpdate = ({ delta: t4, duration: e3 }) => {
32056
32073
  const n3 = t4 / e3;
32057
- this.to.interpolationFrom(this.from, n3, this.target), this.timingTarget && eR(this.timingTarget, this.json.cBhvr.attrList[0], this.target.toHexString());
32074
+ this.to.interpolationFrom(this.from, n3, this.target), this.timingTarget && nR(this.timingTarget, this.json.cBhvr.attrList[0], this.target.toHexString());
32058
32075
  }, this.onSeekToEnd = () => {
32059
32076
  this.isTimelineStart || this.onTimelineStart({ isReverse: false, activeCount: 0, id: "" }), this.onTimeUpdate({ duration: 1, delta: 1 });
32060
32077
  }, 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);
@@ -32064,12 +32081,12 @@ void main(void){
32064
32081
  }
32065
32082
  updateCurrentValue() {
32066
32083
  if (this.timingTarget) {
32067
- const t3 = nR(this.timingTarget, this.json.cBhvr.attrList[0]);
32084
+ const t3 = iR(this.timingTarget, this.json.cBhvr.attrList[0]);
32068
32085
  t3 && (this.currentColorString = t3);
32069
32086
  }
32070
32087
  }
32071
32088
  }
32072
- class SR extends iR {
32089
+ class ER extends rR {
32073
32090
  constructor(t3) {
32074
32091
  super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.startVal = null, this.lastVal = null, this.onTimelineStart = (t4) => {
32075
32092
  this.lastVal = null, t4.isReverse || this.updateCurrentValue();
@@ -32102,7 +32119,7 @@ void main(void){
32102
32119
  this.currentVal = (t3 = this.timingTarget) === null || t3 === void 0 ? void 0 : t3.r;
32103
32120
  }
32104
32121
  }
32105
- class ER extends iR {
32122
+ class MR extends rR {
32106
32123
  constructor(t3) {
32107
32124
  super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.isApplied = false, this.onTimeUpdate = () => {
32108
32125
  var t4, e3;
@@ -32123,7 +32140,7 @@ void main(void){
32123
32140
  return ((e3 = (t3 = this.json) === null || t3 === void 0 ? void 0 : t3.cmd) !== null && e3 !== void 0 ? e3 : "") + ((i3 = (n3 = this.json) === null || n3 === void 0 ? void 0 : n3.cmdType) !== null && i3 !== void 0 ? i3 : "");
32124
32141
  }
32125
32142
  }
32126
- class MR {
32143
+ class AR {
32127
32144
  constructor(t3) {
32128
32145
  this.runtimeNodeEventHub = new a.a(), this.stopAudio = () => {
32129
32146
  this.audio.stop();
@@ -32131,14 +32148,14 @@ void main(void){
32131
32148
  this.stopAudio(), this.audio.destroy(), this.ctx.activeMedia.delete(this.audio);
32132
32149
  };
32133
32150
  const { json: e3, isIterate: n3, isSub: i3, eventHub: r3, ctx: o2, parent: s3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t3;
32134
- this.json = e3, this.id = e3.cMediaNode.ctn.id, this.commonTimeNode = new RR({ json: e3.cMediaNode.ctn, isSub: i3, eventHubs: { global: r3, runtime: this.runtimeNodeEventHub }, ctx: o2, parent: s3, isIterate: n3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 });
32151
+ this.json = e3, this.id = e3.cMediaNode.ctn.id, this.commonTimeNode = new PR({ json: e3.cMediaNode.ctn, isSub: i3, eventHubs: { global: r3, runtime: this.runtimeNodeEventHub }, ctx: o2, parent: s3, isIterate: n3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 });
32135
32152
  let d2 = e3.cMediaNode.tgtEl;
32136
- o2.loaderDelegate && (d2 = o2.loaderDelegate.redirectMedia(d2), o2.logger.info(`redirect media url from ${e3.cMediaNode.tgtEl} to ${d2} by delegate.`, o2.taskId)), this.audio = new WA(d2, o2.runningAudio), o2.activeMedia.add(this.audio), this.commonTimeNode.on("timelineStart", () => {
32153
+ o2.loaderDelegate && (d2 = o2.loaderDelegate.redirectMedia(d2), o2.logger.info(`redirect media url from ${e3.cMediaNode.tgtEl} to ${d2} by delegate.`, o2.taskId)), this.audio = new XA(d2, o2.runningAudio), o2.activeMedia.add(this.audio), this.commonTimeNode.on("timelineStart", () => {
32137
32154
  this.audio.play();
32138
32155
  }), this.commonTimeNode.on("seekToStart", this.stopAudio), this.commonTimeNode.on("seekToEnd", this.stopAudio), this.commonTimeNode.on("timeNodeDestroy", this.destroy), this.ctx = o2;
32139
32156
  }
32140
32157
  }
32141
- var AR = function(t3, e3, n3, i3) {
32158
+ var RR = function(t3, e3, n3, i3) {
32142
32159
  return new (n3 || (n3 = Promise))(function(r3, o2) {
32143
32160
  function s3(t4) {
32144
32161
  try {
@@ -32163,7 +32180,7 @@ void main(void){
32163
32180
  l2((i3 = i3.apply(t3, e3 || [])).next());
32164
32181
  });
32165
32182
  };
32166
- class RR extends a.a {
32183
+ class PR extends a.a {
32167
32184
  constructor(t3) {
32168
32185
  var e3, n3;
32169
32186
  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 = () => {
@@ -32184,7 +32201,7 @@ void main(void){
32184
32201
  const { isSub: i3, isIterate: r3, ctx: o2, eventHubs: s3, parent: a2, json: l2, iterateType: u2, iterateId: h2, iterateIndex: c2, isInInteractiveSeq: d2 } = t3;
32185
32202
  this.isSub = i3, this.isInInteractiveSeq = d2, this.isIterate = r3, this.parentTimeNode = a2, this.json = l2, this.ctx = o2, this.iterateIndex = c2, this.eventHubs = s3, this.iterateType = u2, this.iterateId = h2, this.tmFilter = (n3 = (e3 = l2.tmFilter) === null || e3 === void 0 ? void 0 : e3.split(";").map((t4) => t4.split(",").map((t5) => parseFloat(t5.trim())))) !== null && n3 !== void 0 ? n3 : [];
32186
32203
  const p2 = Number(this.json.dur), f2 = this.json.spd || 1;
32187
- 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, s3, this.ctx), this.endConds = new QA(this.json.id || "", l2.endCondLst, s3, this.ctx), l2.endSync && (this.endSync = new QA(this.json.id || "", [l2.endSync], s3, this.ctx), this.endSync.on("active", () => {
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, s3, this.ctx), this.endConds = new tR(this.json.id || "", l2.endCondLst, s3, this.ctx), l2.endSync && (this.endSync = new tR(this.json.id || "", [l2.endSync], s3, this.ctx), this.endSync.on("active", () => {
32188
32205
  var t4;
32189
32206
  this.json.nodeType === "interactiveSeq" && (this.isActive = false, this.shouldSeekOnStart = true, this.emit("timeNodeEndSync"), (t4 = this.endSync) === null || t4 === void 0 || t4.reset());
32190
32207
  })), this.startConds.on("active", (t4) => {
@@ -32202,7 +32219,7 @@ void main(void){
32202
32219
  n4 === t3 && (e3 = false, this.ctx.eventHub.removeListener("IterateTimeNodeEnd", i3));
32203
32220
  };
32204
32221
  for (this.ctx.eventHub.on("IterateTimeNodeEnd", i3); e3; ) {
32205
- const e4 = JSON.parse(JSON.stringify(this.json)), i4 = new RR({ json: e4, isSub: false, eventHubs: this.eventHubs, ctx: this.ctx, parent: null, isIterate: true, iterateType: e4.iterate.type, iterateIndex: n3, iterateId: t3, isInInteractiveSeq: this.isInInteractiveSeq });
32222
+ const e4 = JSON.parse(JSON.stringify(this.json)), i4 = new PR({ json: e4, isSub: false, eventHubs: this.eventHubs, ctx: this.ctx, parent: null, isIterate: true, iterateType: e4.iterate.type, iterateIndex: n3, iterateId: t3, isInInteractiveSeq: this.isInInteractiveSeq });
32206
32223
  this.iterateShadows[n3] = i4, n3 += 1;
32207
32224
  }
32208
32225
  }
@@ -32218,7 +32235,7 @@ void main(void){
32218
32235
  createTimeNode(t3, e3) {
32219
32236
  let n3 = null;
32220
32237
  const i3 = { json: t3, isSub: e3, isIterate: this.isIterate, eventHub: this.eventHubs.global, ctx: this.ctx, parent: this, iterateType: this.iterateType, iterateIndex: this.iterateIndex, iterateId: this.iterateId, isInInteractiveSeq: this.isInInteractiveSeq };
32221
- return t3.type === "seq" ? n3 = new tR(i3) : t3.type === "par" ? n3 = new PR(i3) : t3.type === "set" ? n3 = new rR(i3) : t3.type === "anim" ? n3 = new cR(i3) : t3.type === "animEffect" ? n3 = new xR(i3) : t3.type === "animMotion" ? n3 = new bR(i3) : t3.type === "animScale" ? n3 = new TR(i3) : t3.type === "animClr" ? n3 = new wR(i3) : t3.type === "animRot" ? n3 = new SR(i3) : t3.type === "cmd" ? n3 = new ER(i3) : t3.type === "audio" && (n3 = new MR(i3)), n3;
32238
+ return t3.type === "seq" ? n3 = new eR(i3) : t3.type === "par" ? n3 = new CR(i3) : t3.type === "set" ? n3 = new oR(i3) : t3.type === "anim" ? n3 = new dR(i3) : t3.type === "animEffect" ? n3 = new bR(i3) : t3.type === "animMotion" ? n3 = new TR(i3) : t3.type === "animScale" ? n3 = new wR(i3) : t3.type === "animClr" ? n3 = new SR(i3) : t3.type === "animRot" ? n3 = new ER(i3) : t3.type === "cmd" ? n3 = new MR(i3) : t3.type === "audio" && (n3 = new AR(i3)), n3;
32222
32239
  }
32223
32240
  createSubList(t3) {
32224
32241
  this.subList = [], t3.forEach((t4) => {
@@ -32279,7 +32296,7 @@ void main(void){
32279
32296
  startReverseTimeLine() {
32280
32297
  this.isEndEventsEmitted = false, this.timeDelta = 0;
32281
32298
  const t3 = 1e3 / this.ctx.ticker.maxFPS;
32282
- this.duration <= t3 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit(JR.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t3 && (this.ctx.eventHub.emit(JR.animateStart), this.ctx.ticker.add(this.updateTimeLine));
32299
+ this.duration <= t3 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit($R.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t3 && (this.ctx.eventHub.emit($R.animateStart), this.ctx.ticker.add(this.updateTimeLine));
32283
32300
  }
32284
32301
  startTimeLine(t3 = true) {
32285
32302
  if (t3 && (this.isEndEventsEmitted = false, this.eventHubs.global.emit(`time ${this.json.id} begin`), this.eventHubs.global.emit(`time ${this.json.id} onBegin`), this.eventHubs.runtime.emit(`runtime ${this.json.id} begin`)), this.json.iterate)
@@ -32288,10 +32305,10 @@ void main(void){
32288
32305
  const e3 = 1e3 / this.ctx.ticker.maxFPS;
32289
32306
  this.duration <= e3 && this.duration > 0 ? (this.timeDelta = this.isReverse ? 0 : this.duration, this.emit("timeUpdate", { delta: this.timeDelta, duration: this.duration, isReverse: this.isReverse }), this.emit("timelineEnd", { id: this.uuid, activeCount: this.applyCount, isReverse: this.isReverse }), this.ctx.ticker.addOnce(() => {
32290
32307
  this.onTimeLineEnd();
32291
- })) : this.duration > e3 && (this.ctx.eventHub.emit(JR.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
32308
+ })) : this.duration > e3 && (this.ctx.eventHub.emit($R.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
32292
32309
  }
32293
32310
  startIterate() {
32294
- return AR(this, void 0, void 0, function* () {
32311
+ return RR(this, void 0, void 0, function* () {
32295
32312
  if (this.json.iterate) {
32296
32313
  this.isIterateEnd = false;
32297
32314
  for (const t3 of this.iterateShadows) {
@@ -32396,7 +32413,7 @@ void main(void){
32396
32413
  });
32397
32414
  }
32398
32415
  dispose(t3 = false) {
32399
- this.isConflictDispose = t3, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit(JR.animateEnd);
32416
+ this.isConflictDispose = t3, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit($R.animateEnd);
32400
32417
  try {
32401
32418
  this.ctx.ticker.remove(this.updateTimeLine);
32402
32419
  } catch (t4) {
@@ -32432,11 +32449,11 @@ void main(void){
32432
32449
  this.emit("timeNodeDestroy"), this.isDestroy = true, this.dispose(), this.startConds.removeAllListeners(), this.endConds.removeAllListeners(), this.children.forEach((t3) => t3.commonTimeNode.destroy()), this.clearSubList();
32433
32450
  }
32434
32451
  }
32435
- class PR extends a.a {
32452
+ class CR extends a.a {
32436
32453
  constructor(t3) {
32437
32454
  super(), this.isRunning = false, this.runtimeNodeEventHub = new a.a();
32438
32455
  const { json: e3, iterateType: n3, isIterate: i3, isSub: r3, parent: o2, ctx: s3, eventHub: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t3;
32439
- this.id = e3.ctn.id, this.json = e3, this.ctx = s3, this.isIterate = i3, this.globalEventHub = l2, this.commonTimeNode = new RR({ json: e3.ctn, isSub: r3, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s3, parent: o2, isIterate: false, iterateType: n3, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.commonTimeNode.on("timeNodeStart", () => {
32456
+ this.id = e3.ctn.id, this.json = e3, this.ctx = s3, this.isIterate = i3, this.globalEventHub = l2, this.commonTimeNode = new PR({ json: e3.ctn, isSub: r3, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s3, parent: o2, isIterate: false, iterateType: n3, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.commonTimeNode.on("timeNodeStart", () => {
32440
32457
  this.commonTimeNode.children.forEach((t4) => {
32441
32458
  t4.commonTimeNode.setReverse(this.commonTimeNode.getReverse()), t4.commonTimeNode.startTimeNode();
32442
32459
  }), this.isRunning || (this.isRunning = true, this.globalEventHub.emit(`runtime ${this.id} begin`), this.emit("begin"));
@@ -32449,7 +32466,7 @@ void main(void){
32449
32466
  });
32450
32467
  }
32451
32468
  }
32452
- var CR = function(t3, e3, n3, i3) {
32469
+ var IR = function(t3, e3, n3, i3) {
32453
32470
  return new (n3 || (n3 = Promise))(function(r3, o2) {
32454
32471
  function s3(t4) {
32455
32472
  try {
@@ -32474,11 +32491,11 @@ void main(void){
32474
32491
  l2((i3 = i3.apply(t3, e3 || [])).next());
32475
32492
  });
32476
32493
  };
32477
- class IR {
32494
+ class OR {
32478
32495
  constructor(t3, e3, n3) {
32479
32496
  this.json = t3, this.ctx = n3, this.globalEventHub = e3;
32480
32497
  const i3 = t3.timeNodeList.find((t4) => t4.type === "par" && t4.ctn.nodeType === "tmRoot");
32481
- i3 && (this.tmRoot = new PR({ json: i3, isSub: false, isIterate: false, eventHub: e3, ctx: n3, parent: null, iterateType: "el", iterateIndex: 0, iterateId: "", isInInteractiveSeq: false }), this.mainSeq = this.tmRoot.commonTimeNode.children.find((t4) => {
32498
+ i3 && (this.tmRoot = new CR({ json: i3, isSub: false, isIterate: false, eventHub: e3, ctx: n3, parent: null, iterateType: "el", iterateIndex: 0, iterateId: "", isInInteractiveSeq: false }), this.mainSeq = this.tmRoot.commonTimeNode.children.find((t4) => {
32482
32499
  var e4, n4, i4;
32483
32500
  return ((e4 = t4.json) === null || e4 === void 0 ? void 0 : e4.type) === "seq" && ((i4 = (n4 = t4.json) === null || n4 === void 0 ? void 0 : n4.ctn) === null || i4 === void 0 ? void 0 : i4.nodeType) === "mainSeq";
32484
32501
  }));
@@ -32492,7 +32509,7 @@ void main(void){
32492
32509
  }
32493
32510
  start() {
32494
32511
  var t3, e3;
32495
- return CR(this, void 0, void 0, function* () {
32512
+ return IR(this, void 0, void 0, function* () {
32496
32513
  this.json.autoPlayMainSeq ? (yield this.ctx.clock.delay(16), (t3 = this.mainSeq) === null || t3 === void 0 || t3.commonTimeNode.startTimeNode()) : (e3 = this.mainSeq) === null || e3 === void 0 || e3.commonTimeNode.startTimeNode();
32497
32514
  });
32498
32515
  }
@@ -32550,7 +32567,7 @@ void main(void){
32550
32567
  this.globalEventHub.emit(t3);
32551
32568
  }
32552
32569
  }
32553
- var OR = function(t3, e3, n3, i3) {
32570
+ var LR = function(t3, e3, n3, i3) {
32554
32571
  return new (n3 || (n3 = Promise))(function(r3, o2) {
32555
32572
  function s3(t4) {
32556
32573
  try {
@@ -32575,7 +32592,7 @@ void main(void){
32575
32592
  l2((i3 = i3.apply(t3, e3 || [])).next());
32576
32593
  });
32577
32594
  };
32578
- class LR extends KA {
32595
+ class NR extends QA {
32579
32596
  constructor(t3, e3, n3, i3) {
32580
32597
  super({ id: "stage", width: t3.width, height: t3.height, type: "Container", children: t3.children }, e3, n3, void 0, i3), this.isRendered = false, this.isTimingStartValueCollected = false, this.json = t3, e3.hasBackgroundFillShape = this.detectUseBackgroundFill(this.json), this.container.visible = false, this.ctx = e3;
32581
32598
  const r3 = new Aw();
@@ -32586,21 +32603,21 @@ void main(void){
32586
32603
  }
32587
32604
  initOnReuse() {
32588
32605
  super.initOnReuse(), this.ctx.timingEventHub.on("c:prev slide", (t3) => {
32589
- this.ctx.eventHub.emit(JR.requestPrevSlide, t3);
32606
+ this.ctx.eventHub.emit($R.requestPrevSlide, t3);
32590
32607
  }), this.ctx.timingEventHub.on("c:next slide", (t3) => {
32591
- this.ctx.eventHub.emit(JR.requestNextSlide, t3);
32608
+ this.ctx.eventHub.emit($R.requestNextSlide, t3);
32592
32609
  });
32593
32610
  }
32594
32611
  get interactiveContainer() {
32595
32612
  return this.container;
32596
32613
  }
32597
32614
  render(t3) {
32598
- this.isRendered || (this.isRendered = true, super.render(t3), t3.addSubMTask(() => OR(this, void 0, void 0, function* () {
32615
+ this.isRendered || (this.isRendered = true, super.render(t3), t3.addSubMTask(() => LR(this, void 0, void 0, function* () {
32599
32616
  this.ctx.eventHub.emit("StageRenderEnd");
32600
32617
  }), "@StageImpl[emit.StageRenderEnd]"));
32601
32618
  }
32602
32619
  createTiming() {
32603
- this.json.timing && !this.timing && (this.timing = new IR(this.json.timing, this.ctx.timingEventHub, this.ctx));
32620
+ this.json.timing && !this.timing && (this.timing = new OR(this.json.timing, this.ctx.timingEventHub, this.ctx));
32604
32621
  }
32605
32622
  startTiming() {
32606
32623
  var t3;
@@ -32655,11 +32672,11 @@ void main(void){
32655
32672
  }
32656
32673
  nextStep(t3 = false) {
32657
32674
  var e3;
32658
- this.hasTiming() && ((e3 = this.timing) === null || e3 === void 0 ? void 0 : e3.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t3)) : this.ctx.eventHub.emit(JR.requestNextSlide, t3);
32675
+ this.hasTiming() && ((e3 = this.timing) === null || e3 === void 0 ? void 0 : e3.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t3)) : this.ctx.eventHub.emit($R.requestNextSlide, t3);
32659
32676
  }
32660
32677
  prevStep(t3 = false) {
32661
32678
  var e3;
32662
- this.hasTiming() && ((e3 = this.timing) === null || e3 === void 0 ? void 0 : e3.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t3)) : this.ctx.eventHub.emit(JR.requestPrevSlide, t3);
32679
+ this.hasTiming() && ((e3 = this.timing) === null || e3 === void 0 ? void 0 : e3.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t3)) : this.ctx.eventHub.emit($R.requestPrevSlide, t3);
32663
32680
  }
32664
32681
  applyInteractiveAction(t3) {
32665
32682
  var e3;
@@ -32674,7 +32691,7 @@ void main(void){
32674
32691
  (i3 = this.timing) === null || i3 === void 0 || i3.setInteractiveSeqState(t3, e3, n3);
32675
32692
  }
32676
32693
  setMediaState(t3, e3) {
32677
- return OR(this, void 0, void 0, function* () {
32694
+ return LR(this, void 0, void 0, function* () {
32678
32695
  const n3 = this.ctx.medias[t3];
32679
32696
  n3 && (e3 ? yield n3.play() : yield n3.pause());
32680
32697
  });
@@ -32684,7 +32701,7 @@ void main(void){
32684
32701
  n3 && n3.seek(e3);
32685
32702
  }
32686
32703
  }
32687
- class NR {
32704
+ class DR {
32688
32705
  constructor(t3) {
32689
32706
  this.ticker = t3, this.tasks = [], this.couldRunning = false, this.applyNext = () => {
32690
32707
  const t4 = this.tasks[0];
@@ -32707,7 +32724,7 @@ void main(void){
32707
32724
  this.couldRunning = false;
32708
32725
  }
32709
32726
  }
32710
- var DR = function(t3, e3, n3, i3) {
32727
+ var FR = function(t3, e3, n3, i3) {
32711
32728
  return new (n3 || (n3 = Promise))(function(r3, o2) {
32712
32729
  function s3(t4) {
32713
32730
  try {
@@ -32732,8 +32749,8 @@ void main(void){
32732
32749
  l2((i3 = i3.apply(t3, e3 || [])).next());
32733
32750
  });
32734
32751
  };
32735
- const FR = (t3) => new Promise((e3) => setTimeout(e3, t3));
32736
- class BR extends a.a {
32752
+ const BR = (t3) => new Promise((e3) => setTimeout(e3, t3));
32753
+ class UR extends a.a {
32737
32754
  constructor(t3, e3, n3) {
32738
32755
  super(), this.slideIndex = t3, this.taskId = e3, this.logger = n3, this.uuid = eM(), this.isCancel = false, this.tasks = [];
32739
32756
  }
@@ -32765,10 +32782,10 @@ void main(void){
32765
32782
  }));
32766
32783
  }
32767
32784
  applyAll() {
32768
- return DR(this, void 0, void 0, function* () {
32785
+ return FR(this, void 0, void 0, function* () {
32769
32786
  for (; !this.tasks.every((t3) => t3.state === "finish"); )
32770
32787
  if (this.tasks.some((t3) => t3.state === "running"))
32771
- yield FR(16);
32788
+ yield BR(16);
32772
32789
  else {
32773
32790
  if (this.tasks.some((t3) => t3.state === "error"))
32774
32791
  return;
@@ -32795,16 +32812,16 @@ void main(void){
32795
32812
  });
32796
32813
  }
32797
32814
  }
32798
- var UR = n2(53);
32799
- const kR = new (n2.n(UR)).a(), GR = kR.getDevice(), HR = kR.getBrowser(), zR = kR.getOS(), jR = { isDesktop() {
32815
+ var kR = n2(53);
32816
+ const GR = new (n2.n(kR)).a(), HR = GR.getDevice(), zR = GR.getBrowser(), jR = GR.getOS(), VR = { isDesktop() {
32800
32817
  let t3 = true;
32801
- return GR.type === "mobile" && (t3 = false), /Samsung/.test(HR.name || "") && (t3 = false), window.__nativeTags && window.__nativeTags.platform && (t3 = false), t3;
32818
+ return HR.type === "mobile" && (t3 = false), /Samsung/.test(zR.name || "") && (t3 = false), window.__nativeTags && window.__nativeTags.platform && (t3 = false), t3;
32802
32819
  }, isIOS() {
32803
32820
  let t3 = false;
32804
- return window.__nativeTags && window.__nativeTags.platform && /^ios/i.test(window.__nativeTags.platform) && (t3 = true), zR.name && /iOS/.test(zR.name) && (t3 = true), t3;
32821
+ return window.__nativeTags && window.__nativeTags.platform && /^ios/i.test(window.__nativeTags.platform) && (t3 = true), jR.name && /iOS/.test(jR.name) && (t3 = true), t3;
32805
32822
  }, isAndroid() {
32806
32823
  let t3 = false;
32807
- return window.__nativeTags && window.__nativeTags.platform && /^android/i.test(window.__nativeTags.platform) && (t3 = true), zR.name && /android/i.test(zR.name) && (t3 = true), t3;
32824
+ return window.__nativeTags && window.__nativeTags.platform && /^android/i.test(window.__nativeTags.platform) && (t3 = true), jR.name && /android/i.test(jR.name) && (t3 = true), t3;
32808
32825
  }, isLowGpuMemory() {
32809
32826
  var t3, e3;
32810
32827
  const n3 = (e3 = (t3 = window.__nativeTags) === null || t3 === void 0 ? void 0 : t3.platform) !== null && e3 !== void 0 ? e3 : "";
@@ -32825,7 +32842,7 @@ void main(void){
32825
32842
  }
32826
32843
  return true;
32827
32844
  } };
32828
- var VR = function(t3, e3, n3, i3) {
32845
+ var WR = function(t3, e3, n3, i3) {
32829
32846
  return new (n3 || (n3 = Promise))(function(r3, o2) {
32830
32847
  function s3(t4) {
32831
32848
  try {
@@ -32850,23 +32867,23 @@ void main(void){
32850
32867
  l2((i3 = i3.apply(t3, e3 || [])).next());
32851
32868
  });
32852
32869
  };
32853
- class WR {
32870
+ class XR {
32854
32871
  constructor(t3, e3, n3, i3, r3, o2, s3, a2, l2, u2, h2, c2, d2) {
32855
- this.loader = t3, this.mode = e3, this.renderer = n3, this.ticker = i3, this.view = r3, this.clock = o2, this.objPoolGroup = s3, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, 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(i3);
32872
+ this.loader = t3, this.mode = e3, this.renderer = n3, this.ticker = i3, this.view = r3, this.clock = o2, this.objPoolGroup = s3, 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(i3);
32856
32873
  }
32857
32874
  setResourceData(t3, e3) {
32858
32875
  this.taskId = t3, this.url = e3;
32859
32876
  }
32860
32877
  createCtx(t3) {
32861
32878
  const { task: e3 } = this.stageStates[t3];
32862
- e3.addMTask(() => VR(this, void 0, void 0, function* () {
32879
+ e3.addMTask(() => WR(this, void 0, void 0, function* () {
32863
32880
  const e4 = new dM(this.loader), n3 = new a.a(), i3 = { taskId: this.taskId, mode: this.mode, renderer: this.renderer, graphicsTexture: new bM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new wM(n3), eventHub: n3, view: this.view, medias: /* @__PURE__ */ Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new TM(), clock: this.clock, spriteTexture: e4, slideIndex: t3, 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 };
32864
32881
  this.stageCtxs[t3] = i3;
32865
32882
  }), "@StagePool[createCtx]");
32866
32883
  }
32867
32884
  loadStageJson(t3) {
32868
32885
  const { task: e3 } = this.stageStates[t3];
32869
- e3.addMTask(() => VR(this, void 0, void 0, function* () {
32886
+ e3.addMTask(() => WR(this, void 0, void 0, function* () {
32870
32887
  const e4 = yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t3}.json`);
32871
32888
  this.stageJsons[t3] = e4, this.stageCtxs[t3].stageWidth = e4.width, this.stageCtxs[t3].stageHeight = e4.height;
32872
32889
  }), "@StagePool[loadStageJson]");
@@ -32891,7 +32908,7 @@ void main(void){
32891
32908
  createStage(t3) {
32892
32909
  const { task: e3 } = this.stageStates[t3];
32893
32910
  e3.addMTask(() => {
32894
- const n3 = this.stageJsons[t3], i3 = this.stageCtxs[t3], r3 = new LR(n3, i3, { x: 0, y: 0 }, e3);
32911
+ const n3 = this.stageJsons[t3], i3 = this.stageCtxs[t3], r3 = new NR(n3, i3, { x: 0, y: 0 }, e3);
32895
32912
  return this.stageImpls[t3] = r3, Promise.resolve();
32896
32913
  }, "@StagePool[createStage]");
32897
32914
  }
@@ -32901,7 +32918,7 @@ void main(void){
32901
32918
  }
32902
32919
  createGraphicsTexture(t3) {
32903
32920
  const { task: e3 } = this.stageStates[t3];
32904
- e3.addMTask(() => VR(this, void 0, void 0, function* () {
32921
+ e3.addMTask(() => WR(this, void 0, void 0, function* () {
32905
32922
  const n3 = this.stageCtxs[t3];
32906
32923
  n3.graphicsTexture.pack().forEach((t4, i3) => {
32907
32924
  e3.addSubMTask(() => n3.graphicsTexture.render(t4, i3, this.objPoolGroup), "@StagePool[graphicsTexture.render]");
@@ -32910,12 +32927,12 @@ void main(void){
32910
32927
  }
32911
32928
  renderStage(t3) {
32912
32929
  const { task: e3 } = this.stageStates[t3];
32913
- e3.addMTask(() => VR(this, void 0, void 0, function* () {
32930
+ e3.addMTask(() => WR(this, void 0, void 0, function* () {
32914
32931
  const n3 = this.stageImpls[t3], i3 = this.stageCtxs[t3];
32915
- yield n3.render(e3), e3.addSubMTask(() => VR(this, void 0, void 0, function* () {
32932
+ yield n3.render(e3), e3.addSubMTask(() => WR(this, void 0, void 0, function* () {
32916
32933
  var e4;
32917
32934
  const r3 = `snapshot-${t3.toString()}-start`;
32918
- if (!(yield (e4 = this.localstorage) === null || e4 === void 0 ? void 0 : e4.getItem(r3)) && $R.platform.isLowGpuMemory()) {
32935
+ if (!(yield (e4 = this.localstorage) === null || e4 === void 0 ? void 0 : e4.getItem(r3)) && KR.platform.isLowGpuMemory()) {
32919
32936
  n3.createTiming(), n3.container.visible = true, n3.collectMainSeqStartValue(), n3.setMainSeqStep(0, "start");
32920
32937
  const t4 = Hy.create({ width: n3.json.width, height: n3.json.height, resolution: 1 });
32921
32938
  i3.renderer.render(n3.container, { renderTexture: t4 });
@@ -32945,7 +32962,7 @@ void main(void){
32945
32962
  preload(t3, e3 = false) {
32946
32963
  if (this.stageImpls[t3] || this.stageStates[t3])
32947
32964
  return Promise.resolve();
32948
- const n3 = new BR(t3, this.taskId, this.logger);
32965
+ const n3 = new UR(t3, this.taskId, this.logger);
32949
32966
  return n3.on("task-error", (t4, e4) => {
32950
32967
  delete this.stageStates[e4], delete this.stageImpls[e4], delete this.stageCtxs[e4], this.errorChannel.emit("error", t4, e4);
32951
32968
  }), this.stageStates[t3] = { state: "load", task: n3 }, this.createCtx(t3), this.loadStageJson(t3), this.loadSpriteSheets(t3), this.createStage(t3), this.preRenderStage(t3), this.createGraphicsTexture(t3), this.renderStage(t3), this.microTaskManager.addTask(n3), e3 ? n3.applyAll() : new Promise((e4) => {
@@ -32959,7 +32976,7 @@ void main(void){
32959
32976
  return this.stageJsons[t3] || null;
32960
32977
  }
32961
32978
  getStage(t3) {
32962
- return VR(this, void 0, void 0, function* () {
32979
+ return WR(this, void 0, void 0, function* () {
32963
32980
  this.currentStageIndex = t3;
32964
32981
  const e3 = this.stageStates[t3];
32965
32982
  return (e3 == null ? void 0 : e3.state) === "finish" && this.stageImpls[t3] ? this.stageImpls[t3] : (e3 == null ? void 0 : e3.state) === "load" ? (yield e3.task.applyAll(), this.stageImpls[t3]) : (yield this.preload(t3, true), this.stageImpls[t3]);
@@ -32969,7 +32986,7 @@ void main(void){
32969
32986
  this.runningAudio.clear();
32970
32987
  }
32971
32988
  }
32972
- var XR = function(t3, e3, n3, i3) {
32989
+ var qR = function(t3, e3, n3, i3) {
32973
32990
  return new (n3 || (n3 = Promise))(function(r3, o2) {
32974
32991
  function s3(t4) {
32975
32992
  try {
@@ -32994,10 +33011,10 @@ void main(void){
32994
33011
  l2((i3 = i3.apply(t3, e3 || [])).next());
32995
33012
  });
32996
33013
  };
32997
- class qR {
33014
+ class YR {
32998
33015
  constructor(t3) {
32999
33016
  var e3;
33000
- this.logger = t3, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e3 = qR.localCache) === null || e3 === void 0 || e3.ready(() => {
33017
+ this.logger = t3, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e3 = YR.localCache) === null || e3 === void 0 || e3.ready(() => {
33001
33018
  this.isIndexDBReady = true;
33002
33019
  }).catch(() => {
33003
33020
  t3.warn("local storage not ready", this.taskId);
@@ -33010,17 +33027,17 @@ void main(void){
33010
33027
  this.taskId = t3;
33011
33028
  }
33012
33029
  getItem(t3) {
33013
- return XR(this, void 0, void 0, function* () {
33030
+ return qR(this, void 0, void 0, function* () {
33014
33031
  let e3 = null;
33015
- return this.couldUseIndexDBCache && qR.localCache && (e3 = yield iM(() => qR.localCache.getItem(`${this.taskId}/${t3}`), 500)), e3 = e3 === nM ? null : e3, e3 || this.memoryCache.get(t3) || null;
33032
+ return this.couldUseIndexDBCache && YR.localCache && (e3 = yield iM(() => YR.localCache.getItem(`${this.taskId}/${t3}`), 500)), e3 = e3 === nM ? null : e3, e3 || this.memoryCache.get(t3) || null;
33016
33033
  });
33017
33034
  }
33018
33035
  setItem(t3, e3, n3 = false) {
33019
- return XR(this, void 0, void 0, function* () {
33036
+ return qR(this, void 0, void 0, function* () {
33020
33037
  if (!this.couldUseIndexDBCache)
33021
33038
  return n3 && this.memoryCache.set(t3, e3), Promise.resolve();
33022
- if (qR.localCache) {
33023
- (yield iM(() => qR.localCache.setItem(`${this.taskId}/${t3}`, e3).catch(() => {
33039
+ if (YR.localCache) {
33040
+ (yield iM(() => YR.localCache.setItem(`${this.taskId}/${t3}`, e3).catch(() => {
33024
33041
  n3 && this.memoryCache.set(t3, e3);
33025
33042
  }), 500)) === nM && n3 && this.memoryCache.set(t3, e3);
33026
33043
  }
@@ -33028,21 +33045,21 @@ void main(void){
33028
33045
  }
33029
33046
  dispose() {
33030
33047
  var t3;
33031
- this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t3 = qR.localCache) === null || t3 === void 0 || t3.keys().then((t4) => {
33048
+ this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t3 = YR.localCache) === null || t3 === void 0 || t3.keys().then((t4) => {
33032
33049
  t4.filter((t5) => t5.indexOf(this.taskId) >= 0).forEach((t5) => {
33033
33050
  var e3;
33034
- (e3 = qR.localCache) === null || e3 === void 0 || e3.removeItem(t5).catch(() => {
33051
+ (e3 = YR.localCache) === null || e3 === void 0 || e3.removeItem(t5).catch(() => {
33035
33052
  });
33036
33053
  });
33037
33054
  }));
33038
33055
  }
33039
33056
  }
33040
- qR.localCache = null;
33057
+ YR.localCache = null;
33041
33058
  try {
33042
- qR.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
33059
+ YR.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
33043
33060
  } catch (t3) {
33044
33061
  }
33045
- var YR = function(t3, e3, n3, i3) {
33062
+ var ZR = function(t3, e3, n3, i3) {
33046
33063
  return new (n3 || (n3 = Promise))(function(r3, o2) {
33047
33064
  function s3(t4) {
33048
33065
  try {
@@ -33068,14 +33085,14 @@ void main(void){
33068
33085
  });
33069
33086
  };
33070
33087
  r2.skipHello();
33071
- const ZR = { randomBar: "RandomLines", circle: "Shape", ripple: "Ripples", wipe: "Erase", dissolve: "Dissolve", morph: "Smooth", fade: "FadeInOut", push: "Push", split: "Separation", reveal: "Display", pull: "Uncover", cover: "Cover", flash: "Flash", checker: "Checkerboard", blinds: "WindowShades", curtains: "Curtain", fallOver: "Fall", drape: "Suspension", wheel: "Clock", comb: "Combing", warp: "Scale", peelOff: "PeelOff", flip: "Flip" }, JR = { mainSeqStepChange: "mainSeqStepChange", mainSeqStateChange: "mainSeqStateChange", interactiveSeqStateChange: "interactiveSeqStateChange", interactiveSeqAction: "interactiveSeqAction", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", slideChange: "slideChange", renderStart: "renderStart", renderEnd: "renderEnd", hyperlinkTrigger: "hyperlinkTrigger", animateStart: "animateStart", animateEnd: "animateEnd", mediaSeek: "mediaSeek", mediaPlay: "mediaPlay", mediaPause: "mediaPause", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide", userInput: "userInput" };
33072
- class $R extends a.a {
33088
+ const JR = { randomBar: "RandomLines", circle: "Shape", ripple: "Ripples", wipe: "Erase", dissolve: "Dissolve", morph: "Smooth", fade: "FadeInOut", push: "Push", split: "Separation", reveal: "Display", pull: "Uncover", cover: "Cover", flash: "Flash", checker: "Checkerboard", blinds: "WindowShades", curtains: "Curtain", fallOver: "Fall", drape: "Suspension", wheel: "Clock", comb: "Combing", warp: "Scale", peelOff: "PeelOff", flip: "Flip" }, $R = { mainSeqStepChange: "mainSeqStepChange", mainSeqStateChange: "mainSeqStateChange", interactiveSeqStateChange: "interactiveSeqStateChange", interactiveSeqAction: "interactiveSeqAction", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", slideChange: "slideChange", renderStart: "renderStart", renderEnd: "renderEnd", hyperlinkTrigger: "hyperlinkTrigger", animateStart: "animateStart", animateEnd: "animateEnd", mediaSeek: "mediaSeek", mediaPlay: "mediaPlay", mediaPause: "mediaPause", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide", userInput: "userInput" };
33089
+ class KR extends a.a {
33073
33090
  constructor(t3, e3 = {}) {
33074
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 = () => {
33075
33092
  this.errorChannel.emit("error", new qE(VE.CanvasCrash, "webgl context lost."));
33076
- }, this.logger = t3.logger, this.mode = t3.mode, this.localStorage = new qR(this.logger);
33093
+ }, this.logger = t3.logger, this.mode = t3.mode, this.localStorage = new YR(this.logger);
33077
33094
  let n3 = Math.max(window.devicePixelRatio, 2);
33078
- jR.isDesktop() || (n3 = 1), this.config = { minFPS: Object(l.isUndefined)(e3.minFPS) ? 30 : e3.minFPS, maxFPS: Object(l.isUndefined)(e3.maxFPS) ? 40 : e3.maxFPS, resolution: Object(l.isUndefined)(e3.resolution) ? n3 : e3.resolution, autoFPS: !Object(l.isUndefined)(e3.autoFPS) && e3.autoFPS, autoResolution: !Object(l.isUndefined)(e3.autoResolution) && e3.autoResolution, transactionBgColor: Object(l.isUndefined)(e3.transactionBgColor) ? 0 : e3.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e3.maxResolutionLevel) }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.loader = new sM(this.localStorage, t3.useLocalCache, this.logger, t3.resourceTimeout, t3.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
+ VR.isDesktop() || (n3 = 1), this.config = { minFPS: Object(l.isUndefined)(e3.minFPS) ? 30 : e3.minFPS, maxFPS: Object(l.isUndefined)(e3.maxFPS) ? 40 : e3.maxFPS, resolution: Object(l.isUndefined)(e3.resolution) ? n3 : e3.resolution, autoFPS: !Object(l.isUndefined)(e3.autoFPS) && e3.autoFPS, autoResolution: !Object(l.isUndefined)(e3.autoResolution) && e3.autoResolution, transactionBgColor: Object(l.isUndefined)(e3.transactionBgColor) ? 0 : e3.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e3.maxResolutionLevel) }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.loader = new sM(this.localStorage, t3.useLocalCache, this.logger, t3.resourceTimeout, t3.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;
33079
33096
  const i3 = this.app.renderer, { drawElements: r3 } = i3.gl;
33080
33097
  i3.gl.drawElements = (...t4) => {
33081
33098
  r3.call(i3.gl, ...t4), this.drawCall += 1;
@@ -33101,7 +33118,7 @@ void main(void){
33101
33118
  }
33102
33119
  }), this.app.ticker.add(() => {
33103
33120
  this.runtime.drawCall = this.drawCall, this.runtime.fps = Math.floor(this.app.ticker.minFPS), this.drawCall = 0;
33104
- }, 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, t3.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 XR(this.loader, this.mode, this.app.renderer, this.app.ticker, this.app.view, this.clock, this.objPoolGroup, this.errorChannel, this.localStorage, this.logger, t3.loadDelegate, this.isPlayerPaused, this.maxResolution), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
33105
33122
  try {
33106
33123
  this.transactionPlayer = new og();
33107
33124
  } catch (t4) {
@@ -33120,7 +33137,7 @@ void main(void){
33120
33137
  return ((t3 = this.currentStage) === null || t3 === void 0 ? void 0 : t3.json.prevIndex) ? this.currentStage.json.prevIndex : this.currentIndex - 1;
33121
33138
  }
33122
33139
  getMaxResolution(t3) {
33123
- return !Object(l.isUndefined)(t3) && Number.isInteger(t3) ? (t3 < 1 && (t3 = 1), t3 > 4 && (t3 = 4), t3) : $R.platform.isAndroid() || $R.platform.isIOS() ? 2 : 4;
33140
+ return !Object(l.isUndefined)(t3) && Number.isInteger(t3) ? (t3 < 1 && (t3 = 1), t3 > 4 && (t3 = 4), t3) : KR.platform.isAndroid() || KR.platform.isIOS() ? 2 : 4;
33124
33141
  }
33125
33142
  updateMaxResolutionLevel(t3) {
33126
33143
  t3 < 1 && (t3 = 1), t3 > 4 && (t3 = 4);
@@ -33131,7 +33148,7 @@ void main(void){
33131
33148
  Object(l.isUndefined)(t3.minFPS) || (this.config.minFPS = t3.minFPS, this.app.ticker.minFPS = t3.minFPS), Object(l.isUndefined)(t3.maxFPS) || (this.config.maxFPS = t3.maxFPS, this.app.ticker.maxFPS = t3.maxFPS), Object(l.isUndefined)(t3.resolution) || (this.config.resolution = t3.resolution, this.updateResolution(this.scale * this.config.resolution)), Object(l.isUndefined)(t3.autoFPS) || (this.config.autoFPS = t3.autoFPS), Object(l.isUndefined)(t3.autoResolution) || (this.config.autoResolution = t3.autoResolution), Object(l.isUndefined)(t3.transactionBgColor) || (this.config.transactionBgColor = t3.transactionBgColor), this.taskId && this.logger.info("ppt player update config: " + JSON.stringify(this.config), this.taskId), Object(l.isUndefined)(t3.maxResolutionLevel) || (this.config.maxResolutionLevel = t3.maxResolutionLevel, this.updateMaxResolutionLevel(this.config.maxResolutionLevel));
33132
33149
  }
33133
33150
  preload(t3) {
33134
- return YR(this, void 0, void 0, function* () {
33151
+ return ZR(this, void 0, void 0, function* () {
33135
33152
  t3 < 1 || t3 > this.slideCount || (this.logger.info(`preload slide ${t3} begin`, this.taskId), yield this.stagePool.preload(t3), this.logger.info(`preload slide ${t3} end`, this.taskId));
33136
33153
  });
33137
33154
  }
@@ -33150,14 +33167,14 @@ void main(void){
33150
33167
  }
33151
33168
  renderSlide(t3, e3 = false) {
33152
33169
  var n3;
33153
- return YR(this, void 0, void 0, function* () {
33170
+ return ZR(this, void 0, void 0, function* () {
33154
33171
  if (this._isPaused)
33155
33172
  return void this.logger.info("ppt play prevent render slide with paused state", this.taskId);
33156
- this.logger.info("render slide " + t3, this.taskId), this.emit(JR.renderStart, t3);
33173
+ this.logger.info("render slide " + t3, this.taskId), this.emit($R.renderStart, t3);
33157
33174
  const i3 = yield this.stagePool.getStage(t3);
33158
33175
  if (!i3)
33159
33176
  return;
33160
- this.translateEvent(i3.ctx.eventHub, [JR.mainSeqStepChange, JR.mainSeqStateChange, JR.hyperlinkTrigger, JR.interactiveSeqAction, JR.mainSeqStepStart, JR.mainSeqStepEnd, JR.animateStart, JR.animateEnd, JR.mediaPlay, JR.mediaPause, JR.mediaSeek, JR.requestGotoSlide, JR.requestNextSlide, JR.requestPrevSlide, JR.interactiveSeqStateChange, JR.userInput]), this.currentIndex = Number(t3);
33177
+ this.translateEvent(i3.ctx.eventHub, [$R.mainSeqStepChange, $R.mainSeqStateChange, $R.hyperlinkTrigger, $R.interactiveSeqAction, $R.mainSeqStepStart, $R.mainSeqStepEnd, $R.animateStart, $R.animateEnd, $R.mediaPlay, $R.mediaPause, $R.mediaSeek, $R.requestGotoSlide, $R.requestNextSlide, $R.requestPrevSlide, $R.interactiveSeqStateChange, $R.userInput]), this.currentIndex = Number(t3);
33161
33178
  const { width: r3, height: o2, slideCount: s3 } = i3.json;
33162
33179
  this.slideCount = s3, this.designWidth = r3, this.designHeight = o2, i3.json.transition && i3.json.transition.type && !this.prevSlideBase64 && this.currentStage && (this.prevSlideBase64 = this.getBase64(this.currentStage)), (n3 = this.currentStage) === null || n3 === void 0 || n3.clearOnSlideChange();
33163
33180
  const a2 = this.currentStage;
@@ -33169,23 +33186,23 @@ void main(void){
33169
33186
  }
33170
33187
  i3.container.visible = false, this.app.stage.addChild(i3.container);
33171
33188
  let { transition: u2 } = i3.json;
33172
- !this.isForward && (a2 == null ? void 0 : a2.json.transition) && (u2 = a2.json.transition), this.prevSlideBase64 && l2 && u2 && u2.type && a2 && i3 && (yield this.playTransaction(this.prevSlideBase64, l2, u2, a2, i3), this.prevSlideBase64 = null), this.isForward ? yield i3.startTiming() : i3.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), i3.container.visible = true, a2 && (a2.setMainSeqStep(0, "start"), a2.clearOnTransactionEnd(), this.app.stage.removeChild(a2.container)), i3.ctx.slideScopeEventHub.emit("slide-render", i3.ctx.slideIndex), this.emit(JR.renderEnd, t3), this.emit(JR.slideChange, t3), this.preload(t3 + 1).catch((e4) => {
33189
+ !this.isForward && (a2 == null ? void 0 : a2.json.transition) && (u2 = a2.json.transition), this.prevSlideBase64 && l2 && u2 && u2.type && a2 && i3 && (yield this.playTransaction(this.prevSlideBase64, l2, u2, a2, i3), this.prevSlideBase64 = null), this.isForward ? yield i3.startTiming() : i3.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), i3.container.visible = true, a2 && (a2.setMainSeqStep(0, "start"), a2.clearOnTransactionEnd(), this.app.stage.removeChild(a2.container)), i3.ctx.slideScopeEventHub.emit("slide-render", i3.ctx.slideIndex), this.emit($R.renderEnd, t3), this.emit($R.slideChange, t3), this.preload(t3 + 1).catch((e4) => {
33173
33190
  this.errorChannel.emit("error", qE.transform(e4), t3 + 1);
33174
33191
  }), this.preload(t3 - 1).catch((e4) => {
33175
33192
  this.errorChannel.emit("error", qE.transform(e4), t3 - 1);
33176
33193
  });
33177
33194
  });
33178
33195
  }
33179
- renderToBase64(t3, e3) {
33180
- return YR(this, void 0, void 0, function* () {
33181
- const n3 = yield this.stagePool.getStage(t3);
33182
- if (n3) {
33183
- const { width: i3, height: r3 } = n3.json;
33184
- this.designWidth = i3, this.designHeight = r3;
33185
- const o2 = Hy.create({ width: this.designWidth, height: this.designHeight, resolution: e3 });
33186
- n3.container.visible = true, this.app.renderer.render(n3.container, { renderTexture: o2 });
33187
- const s3 = this.app.renderer.plugins.extract.base64(o2, "image/jpeg");
33188
- return this.stagePool.destroyStageByIndex(t3), s3;
33196
+ renderToBase64(t3, e3, n3) {
33197
+ return ZR(this, void 0, void 0, function* () {
33198
+ const i3 = yield this.stagePool.getStage(t3);
33199
+ if (i3) {
33200
+ const { width: r3, height: o2 } = i3.json;
33201
+ this.designWidth = r3, this.designHeight = o2;
33202
+ const s3 = Hy.create({ width: this.designWidth, height: this.designHeight, resolution: e3 });
33203
+ i3.container.visible = true, this.app.renderer.render(i3.container, { renderTexture: s3 });
33204
+ const a2 = this.app.renderer.plugins.extract.base64(s3, n3);
33205
+ return this.stagePool.destroyStageByIndex(t3), a2;
33189
33206
  }
33190
33207
  return "__null__";
33191
33208
  });
@@ -33199,16 +33216,16 @@ void main(void){
33199
33216
  return e3.destroy(true), n3;
33200
33217
  }
33201
33218
  playTransaction(t3, e3, n3, i3, r3) {
33202
- return YR(this, void 0, void 0, function* () {
33219
+ return ZR(this, void 0, void 0, function* () {
33203
33220
  const o2 = this.app.view.parentElement;
33204
- if (t3 && e3 && o2 && ZR[n3.type] && this.transactionPlayer) {
33221
+ if (t3 && e3 && o2 && JR[n3.type] && this.transactionPlayer) {
33205
33222
  this.transactionSprite.zIndex = 999, this.transactionSprite.visible = false, this.app.stage.addChild(this.transactionSprite);
33206
33223
  const o3 = this.transactionPlayer.renderer.domElement, s3 = ky.from(o3), a2 = () => s3.update();
33207
33224
  return this.app.ticker.add(a2), this.transactionSprite.texture = s3, setTimeout(() => {
33208
33225
  this.transactionSprite.visible = true;
33209
33226
  }, 100), new Promise((o4) => {
33210
33227
  var s4, l2, u2, h2;
33211
- (s4 = this.transactionPlayer) === null || s4 === void 0 || s4.play({ reverse: !this.isForward, prevTextureUrl: t3, nextTextureUrl: e3, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: ZR[n3.type], stageWidth: this.designWidth, stageHeight: this.designHeight, duration: (u2 = (l2 = this.currentStage) === null || l2 === void 0 ? void 0 : l2.json.transition) === null || u2 === void 0 ? void 0 : u2.dur, delay: 0, clearColor: this.config.transactionBgColor, maxFPS: Math.ceil((h2 = this.config.maxFPS) !== null && h2 !== void 0 ? h2 : 60), onTransactionEnd: () => {
33228
+ (s4 = this.transactionPlayer) === null || s4 === void 0 || s4.play({ reverse: !this.isForward, prevTextureUrl: t3, nextTextureUrl: e3, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: JR[n3.type], stageWidth: this.designWidth, stageHeight: this.designHeight, duration: (u2 = (l2 = this.currentStage) === null || l2 === void 0 ? void 0 : l2.json.transition) === null || u2 === void 0 ? void 0 : u2.dur, delay: 0, clearColor: this.config.transactionBgColor, maxFPS: Math.ceil((h2 = this.config.maxFPS) !== null && h2 !== void 0 ? h2 : 60), onTransactionEnd: () => {
33212
33229
  var t4, e4;
33213
33230
  o4(), i3.container.visible = false, r3.container.visible = true, (t4 = this.app.stage) === null || t4 === void 0 || t4.removeChild(this.transactionSprite), (e4 = this.app.ticker) === null || e4 === void 0 || e4.remove(a2);
33214
33231
  } });
@@ -33226,7 +33243,7 @@ void main(void){
33226
33243
  }
33227
33244
  updateResolution(t3, e3) {
33228
33245
  this.app.ticker.addOnce(() => {
33229
- let n3 = jR.isDesktop() ? t3 : 1;
33246
+ let n3 = VR.isDesktop() ? t3 : 1;
33230
33247
  for (; n3 * this.designWidth > this.maxResolution.x || n3 * this.designHeight > this.maxResolution.y; )
33231
33248
  n3 -= 0.1;
33232
33249
  this.app.renderer.resolution = n3, this.app.renderer.plugins.interaction.resolution = this.app.renderer.resolution, this.app.renderer.resize(this.designWidth, this.designHeight), Object(l.isFunction)(e3) && e3();
@@ -33301,7 +33318,7 @@ void main(void){
33301
33318
  }
33302
33319
  setMediaState(t3, e3) {
33303
33320
  var n3;
33304
- return YR(this, void 0, void 0, function* () {
33321
+ return ZR(this, void 0, void 0, function* () {
33305
33322
  yield (n3 = this.currentStage) === null || n3 === void 0 ? void 0 : n3.setMediaState(t3, e3);
33306
33323
  });
33307
33324
  }
@@ -33325,7 +33342,7 @@ void main(void){
33325
33342
  return this.currentStage && this.getBase64(this.currentStage) || "";
33326
33343
  }
33327
33344
  createSnapshotForNextSlide(t3) {
33328
- return YR(this, void 0, void 0, function* () {
33345
+ return ZR(this, void 0, void 0, function* () {
33329
33346
  const e3 = this.nextSlideIndex, n3 = this.stagePool.getStageJson(e3);
33330
33347
  if (n3 && n3.transition && n3.transition.type && this.currentStage && this.transactionPlayer) {
33331
33348
  const e4 = t3 ? `snapshot-${this.currentStage.json.index}-start` : `snapshot-${this.currentStage.json.index}-end`;
@@ -33344,7 +33361,7 @@ void main(void){
33344
33361
  }
33345
33362
  static clearLocalCache() {
33346
33363
  var t3;
33347
- (t3 = qR.localCache) === null || t3 === void 0 || t3.clear().catch(() => {
33364
+ (t3 = YR.localCache) === null || t3 === void 0 || t3.clear().catch(() => {
33348
33365
  });
33349
33366
  }
33350
33367
  destroy() {
@@ -33365,18 +33382,23 @@ void main(void){
33365
33382
  }
33366
33383
  }
33367
33384
  }
33368
- $R.platform = jR, $R.RtcAudioClazz = null;
33369
- var KR, QR = [], tP = "ResizeObserver loop completed with undelivered notifications.";
33385
+ KR.platform = VR, KR.RtcAudioClazz = null;
33386
+ var QR = /* @__PURE__ */ new Map();
33387
+ function tP(t3) {
33388
+ var e3 = QR.get(t3.hookPoint) || [];
33389
+ e3.push(t3), QR.set(t3.hookPoint, e3);
33390
+ }
33391
+ var eP, nP = [], iP = "ResizeObserver loop completed with undelivered notifications.";
33370
33392
  !function(t3) {
33371
33393
  t3.BORDER_BOX = "border-box", t3.CONTENT_BOX = "content-box", t3.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
33372
- }(KR || (KR = {}));
33373
- var eP, nP = function(t3) {
33394
+ }(eP || (eP = {}));
33395
+ var rP, oP = function(t3) {
33374
33396
  return Object.freeze(t3);
33375
- }, iP = function(t3, e3) {
33376
- this.inlineSize = t3, this.blockSize = e3, nP(this);
33377
- }, rP = function() {
33397
+ }, sP = function(t3, e3) {
33398
+ this.inlineSize = t3, this.blockSize = e3, oP(this);
33399
+ }, aP = function() {
33378
33400
  function t3(t4, e3, n3, i3) {
33379
- return this.x = t4, this.y = e3, this.width = n3, this.height = i3, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, nP(this);
33401
+ return this.x = t4, this.y = e3, this.width = n3, this.height = i3, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, oP(this);
33380
33402
  }
33381
33403
  return t3.prototype.toJSON = function() {
33382
33404
  var t4 = this;
@@ -33384,59 +33406,59 @@ void main(void){
33384
33406
  }, t3.fromRect = function(e3) {
33385
33407
  return new t3(e3.x, e3.y, e3.width, e3.height);
33386
33408
  }, t3;
33387
- }(), oP = function(t3) {
33409
+ }(), lP = function(t3) {
33388
33410
  return t3 instanceof SVGElement && "getBBox" in t3;
33389
- }, sP = function(t3) {
33390
- if (oP(t3)) {
33411
+ }, uP = function(t3) {
33412
+ if (lP(t3)) {
33391
33413
  var e3 = t3.getBBox(), n3 = e3.width, i3 = e3.height;
33392
33414
  return !n3 && !i3;
33393
33415
  }
33394
33416
  var r3 = t3, o2 = r3.offsetWidth, s3 = r3.offsetHeight;
33395
33417
  return !(o2 || s3 || t3.getClientRects().length);
33396
- }, aP = function(t3) {
33418
+ }, hP = function(t3) {
33397
33419
  var e3, n3;
33398
33420
  if (t3 instanceof Element)
33399
33421
  return true;
33400
33422
  var i3 = (n3 = (e3 = t3) === null || e3 === void 0 ? void 0 : e3.ownerDocument) === null || n3 === void 0 ? void 0 : n3.defaultView;
33401
33423
  return !!(i3 && t3 instanceof i3.Element);
33402
- }, lP = typeof window != "undefined" ? window : {}, uP = /* @__PURE__ */ new WeakMap(), hP = /auto|scroll/, cP = /^tb|vertical/, dP = /msie|trident/i.test(lP.navigator && lP.navigator.userAgent), pP = function(t3) {
33424
+ }, cP = typeof window != "undefined" ? window : {}, dP = /* @__PURE__ */ new WeakMap(), pP = /auto|scroll/, fP = /^tb|vertical/, mP = /msie|trident/i.test(cP.navigator && cP.navigator.userAgent), gP = function(t3) {
33403
33425
  return parseFloat(t3 || "0");
33404
- }, fP = function(t3, e3, n3) {
33405
- return t3 === void 0 && (t3 = 0), e3 === void 0 && (e3 = 0), n3 === void 0 && (n3 = false), new iP((n3 ? e3 : t3) || 0, (n3 ? t3 : e3) || 0);
33406
- }, mP = nP({ devicePixelContentBoxSize: fP(), borderBoxSize: fP(), contentBoxSize: fP(), contentRect: new rP(0, 0, 0, 0) }), gP = function(t3, e3) {
33407
- if (e3 === void 0 && (e3 = false), uP.has(t3) && !e3)
33408
- return uP.get(t3);
33409
- if (sP(t3))
33410
- return uP.set(t3, mP), mP;
33411
- var n3 = getComputedStyle(t3), i3 = oP(t3) && t3.ownerSVGElement && t3.getBBox(), r3 = !dP && n3.boxSizing === "border-box", o2 = cP.test(n3.writingMode || ""), s3 = !i3 && hP.test(n3.overflowY || ""), a2 = !i3 && hP.test(n3.overflowX || ""), l2 = i3 ? 0 : pP(n3.paddingTop), u2 = i3 ? 0 : pP(n3.paddingRight), h2 = i3 ? 0 : pP(n3.paddingBottom), c2 = i3 ? 0 : pP(n3.paddingLeft), d2 = i3 ? 0 : pP(n3.borderTopWidth), p2 = i3 ? 0 : pP(n3.borderRightWidth), f2 = i3 ? 0 : pP(n3.borderBottomWidth), m2 = c2 + u2, g2 = l2 + h2, v2 = (i3 ? 0 : pP(n3.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t3.offsetHeight - _2 - t3.clientHeight : 0, x2 = s3 ? t3.offsetWidth - v2 - t3.clientWidth : 0, b2 = r3 ? m2 + v2 : 0, T2 = r3 ? g2 + _2 : 0, w2 = i3 ? i3.width : pP(n3.width) - b2 - x2, S2 = i3 ? i3.height : pP(n3.height) - T2 - y2, E2 = w2 + m2 + x2 + v2, M2 = S2 + g2 + y2 + _2, A2 = nP({ devicePixelContentBoxSize: fP(Math.round(w2 * devicePixelRatio), Math.round(S2 * devicePixelRatio), o2), borderBoxSize: fP(E2, M2, o2), contentBoxSize: fP(w2, S2, o2), contentRect: new rP(c2, l2, w2, S2) });
33412
- return uP.set(t3, A2), A2;
33413
33426
  }, vP = function(t3, e3, n3) {
33414
- var i3 = gP(t3, n3), r3 = i3.borderBoxSize, o2 = i3.contentBoxSize, s3 = i3.devicePixelContentBoxSize;
33427
+ return t3 === void 0 && (t3 = 0), e3 === void 0 && (e3 = 0), n3 === void 0 && (n3 = false), new sP((n3 ? e3 : t3) || 0, (n3 ? t3 : e3) || 0);
33428
+ }, _P = oP({ devicePixelContentBoxSize: vP(), borderBoxSize: vP(), contentBoxSize: vP(), contentRect: new aP(0, 0, 0, 0) }), yP = function(t3, e3) {
33429
+ if (e3 === void 0 && (e3 = false), dP.has(t3) && !e3)
33430
+ return dP.get(t3);
33431
+ if (uP(t3))
33432
+ return dP.set(t3, _P), _P;
33433
+ var n3 = getComputedStyle(t3), i3 = lP(t3) && t3.ownerSVGElement && t3.getBBox(), r3 = !mP && n3.boxSizing === "border-box", o2 = fP.test(n3.writingMode || ""), s3 = !i3 && pP.test(n3.overflowY || ""), a2 = !i3 && pP.test(n3.overflowX || ""), l2 = i3 ? 0 : gP(n3.paddingTop), u2 = i3 ? 0 : gP(n3.paddingRight), h2 = i3 ? 0 : gP(n3.paddingBottom), c2 = i3 ? 0 : gP(n3.paddingLeft), d2 = i3 ? 0 : gP(n3.borderTopWidth), p2 = i3 ? 0 : gP(n3.borderRightWidth), f2 = i3 ? 0 : gP(n3.borderBottomWidth), m2 = c2 + u2, g2 = l2 + h2, v2 = (i3 ? 0 : gP(n3.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t3.offsetHeight - _2 - t3.clientHeight : 0, x2 = s3 ? t3.offsetWidth - v2 - t3.clientWidth : 0, b2 = r3 ? m2 + v2 : 0, T2 = r3 ? g2 + _2 : 0, w2 = i3 ? i3.width : gP(n3.width) - b2 - x2, S2 = i3 ? i3.height : gP(n3.height) - T2 - y2, E2 = w2 + m2 + x2 + v2, M2 = S2 + g2 + y2 + _2, A2 = oP({ devicePixelContentBoxSize: vP(Math.round(w2 * devicePixelRatio), Math.round(S2 * devicePixelRatio), o2), borderBoxSize: vP(E2, M2, o2), contentBoxSize: vP(w2, S2, o2), contentRect: new aP(c2, l2, w2, S2) });
33434
+ return dP.set(t3, A2), A2;
33435
+ }, xP = function(t3, e3, n3) {
33436
+ var i3 = yP(t3, n3), r3 = i3.borderBoxSize, o2 = i3.contentBoxSize, s3 = i3.devicePixelContentBoxSize;
33415
33437
  switch (e3) {
33416
- case KR.DEVICE_PIXEL_CONTENT_BOX:
33438
+ case eP.DEVICE_PIXEL_CONTENT_BOX:
33417
33439
  return s3;
33418
- case KR.BORDER_BOX:
33440
+ case eP.BORDER_BOX:
33419
33441
  return r3;
33420
33442
  default:
33421
33443
  return o2;
33422
33444
  }
33423
- }, _P = function(t3) {
33424
- var e3 = gP(t3);
33425
- this.target = t3, this.contentRect = e3.contentRect, this.borderBoxSize = nP([e3.borderBoxSize]), this.contentBoxSize = nP([e3.contentBoxSize]), this.devicePixelContentBoxSize = nP([e3.devicePixelContentBoxSize]);
33426
- }, yP = function(t3) {
33427
- if (sP(t3))
33445
+ }, bP = function(t3) {
33446
+ var e3 = yP(t3);
33447
+ this.target = t3, this.contentRect = e3.contentRect, this.borderBoxSize = oP([e3.borderBoxSize]), this.contentBoxSize = oP([e3.contentBoxSize]), this.devicePixelContentBoxSize = oP([e3.devicePixelContentBoxSize]);
33448
+ }, TP = function(t3) {
33449
+ if (uP(t3))
33428
33450
  return 1 / 0;
33429
33451
  for (var e3 = 0, n3 = t3.parentNode; n3; )
33430
33452
  e3 += 1, n3 = n3.parentNode;
33431
33453
  return e3;
33432
- }, xP = function() {
33454
+ }, wP = function() {
33433
33455
  var t3 = 1 / 0, e3 = [];
33434
- QR.forEach(function(n4) {
33456
+ nP.forEach(function(n4) {
33435
33457
  if (n4.activeTargets.length !== 0) {
33436
33458
  var i4 = [];
33437
33459
  n4.activeTargets.forEach(function(e4) {
33438
- var n5 = new _P(e4.target), r3 = yP(e4.target);
33439
- i4.push(n5), e4.lastReportedSize = vP(e4.target, e4.observedBox), r3 < t3 && (t3 = r3);
33460
+ var n5 = new bP(e4.target), r3 = TP(e4.target);
33461
+ i4.push(n5), e4.lastReportedSize = xP(e4.target, e4.observedBox), r3 < t3 && (t3 = r3);
33440
33462
  }), e3.push(function() {
33441
33463
  n4.callback.call(n4.observer, i4, n4.observer);
33442
33464
  }), n4.activeTargets.splice(0, n4.activeTargets.length);
@@ -33446,36 +33468,36 @@ void main(void){
33446
33468
  (0, i3[n3])();
33447
33469
  }
33448
33470
  return t3;
33449
- }, bP = function(t3) {
33450
- QR.forEach(function(e3) {
33471
+ }, SP = function(t3) {
33472
+ nP.forEach(function(e3) {
33451
33473
  e3.activeTargets.splice(0, e3.activeTargets.length), e3.skippedTargets.splice(0, e3.skippedTargets.length), e3.observationTargets.forEach(function(n3) {
33452
- n3.isActive() && (yP(n3.target) > t3 ? e3.activeTargets.push(n3) : e3.skippedTargets.push(n3));
33474
+ n3.isActive() && (TP(n3.target) > t3 ? e3.activeTargets.push(n3) : e3.skippedTargets.push(n3));
33453
33475
  });
33454
33476
  });
33455
- }, TP = function() {
33477
+ }, EP = function() {
33456
33478
  var t3, e3 = 0;
33457
- for (bP(e3); QR.some(function(t4) {
33479
+ for (SP(e3); nP.some(function(t4) {
33458
33480
  return t4.activeTargets.length > 0;
33459
33481
  }); )
33460
- e3 = xP(), bP(e3);
33461
- return QR.some(function(t4) {
33482
+ e3 = wP(), SP(e3);
33483
+ return nP.some(function(t4) {
33462
33484
  return t4.skippedTargets.length > 0;
33463
- }) && (typeof ErrorEvent == "function" ? t3 = new ErrorEvent("error", { message: tP }) : ((t3 = document.createEvent("Event")).initEvent("error", false, false), t3.message = tP), window.dispatchEvent(t3)), e3 > 0;
33464
- }, wP = [], SP = function(t3) {
33465
- if (!eP) {
33485
+ }) && (typeof ErrorEvent == "function" ? t3 = new ErrorEvent("error", { message: iP }) : ((t3 = document.createEvent("Event")).initEvent("error", false, false), t3.message = iP), window.dispatchEvent(t3)), e3 > 0;
33486
+ }, MP = [], AP = function(t3) {
33487
+ if (!rP) {
33466
33488
  var e3 = 0, n3 = document.createTextNode("");
33467
33489
  new MutationObserver(function() {
33468
- return wP.splice(0).forEach(function(t4) {
33490
+ return MP.splice(0).forEach(function(t4) {
33469
33491
  return t4();
33470
33492
  });
33471
- }).observe(n3, { characterData: true }), eP = function() {
33493
+ }).observe(n3, { characterData: true }), rP = function() {
33472
33494
  n3.textContent = "" + (e3 ? e3-- : e3++);
33473
33495
  };
33474
33496
  }
33475
- wP.push(t3), eP();
33476
- }, EP = 0, MP = { attributes: true, characterData: true, childList: true, subtree: true }, AP = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], RP = function(t3) {
33497
+ MP.push(t3), rP();
33498
+ }, RP = 0, PP = { attributes: true, characterData: true, childList: true, subtree: true }, CP = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], IP = function(t3) {
33477
33499
  return t3 === void 0 && (t3 = 0), Date.now() + t3;
33478
- }, PP = false, CP = new (function() {
33500
+ }, OP = false, LP = new (function() {
33479
33501
  function t3() {
33480
33502
  var t4 = this;
33481
33503
  this.stopped = true, this.listener = function() {
@@ -33484,19 +33506,19 @@ void main(void){
33484
33506
  }
33485
33507
  return t3.prototype.run = function(t4) {
33486
33508
  var e3 = this;
33487
- if (t4 === void 0 && (t4 = 250), !PP) {
33488
- PP = true;
33489
- var n3, i3 = RP(t4);
33509
+ if (t4 === void 0 && (t4 = 250), !OP) {
33510
+ OP = true;
33511
+ var n3, i3 = IP(t4);
33490
33512
  n3 = function() {
33491
33513
  var n4 = false;
33492
33514
  try {
33493
- n4 = TP();
33515
+ n4 = EP();
33494
33516
  } finally {
33495
- if (PP = false, t4 = i3 - RP(), !EP)
33517
+ if (OP = false, t4 = i3 - IP(), !RP)
33496
33518
  return;
33497
33519
  n4 ? e3.run(1e3) : t4 > 0 ? e3.run(t4) : e3.start();
33498
33520
  }
33499
- }, SP(function() {
33521
+ }, AP(function() {
33500
33522
  requestAnimationFrame(n3);
33501
33523
  });
33502
33524
  }
@@ -33504,29 +33526,29 @@ void main(void){
33504
33526
  this.stop(), this.run();
33505
33527
  }, t3.prototype.observe = function() {
33506
33528
  var t4 = this, e3 = function() {
33507
- return t4.observer && t4.observer.observe(document.body, MP);
33529
+ return t4.observer && t4.observer.observe(document.body, PP);
33508
33530
  };
33509
- document.body ? e3() : lP.addEventListener("DOMContentLoaded", e3);
33531
+ document.body ? e3() : cP.addEventListener("DOMContentLoaded", e3);
33510
33532
  }, t3.prototype.start = function() {
33511
33533
  var t4 = this;
33512
- this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), AP.forEach(function(e3) {
33513
- return lP.addEventListener(e3, t4.listener, true);
33534
+ this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), CP.forEach(function(e3) {
33535
+ return cP.addEventListener(e3, t4.listener, true);
33514
33536
  }));
33515
33537
  }, t3.prototype.stop = function() {
33516
33538
  var t4 = this;
33517
- this.stopped || (this.observer && this.observer.disconnect(), AP.forEach(function(e3) {
33518
- return lP.removeEventListener(e3, t4.listener, true);
33539
+ this.stopped || (this.observer && this.observer.disconnect(), CP.forEach(function(e3) {
33540
+ return cP.removeEventListener(e3, t4.listener, true);
33519
33541
  }), this.stopped = true);
33520
33542
  }, t3;
33521
- }())(), IP = function(t3) {
33522
- !EP && t3 > 0 && CP.start(), !(EP += t3) && CP.stop();
33523
- }, OP = function() {
33543
+ }())(), NP = function(t3) {
33544
+ !RP && t3 > 0 && LP.start(), !(RP += t3) && LP.stop();
33545
+ }, DP = function() {
33524
33546
  function t3(t4, e3) {
33525
- this.target = t4, this.observedBox = e3 || KR.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
33547
+ this.target = t4, this.observedBox = e3 || eP.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
33526
33548
  }
33527
33549
  return t3.prototype.isActive = function() {
33528
- var t4, e3 = vP(this.target, this.observedBox, true);
33529
- return t4 = this.target, oP(t4) || function(t5) {
33550
+ var t4, e3 = xP(this.target, this.observedBox, true);
33551
+ return t4 = this.target, lP(t4) || function(t5) {
33530
33552
  switch (t5.tagName) {
33531
33553
  case "INPUT":
33532
33554
  if (t5.type !== "image")
@@ -33543,57 +33565,57 @@ void main(void){
33543
33565
  return false;
33544
33566
  }(t4) || getComputedStyle(t4).display !== "inline" || (this.lastReportedSize = e3), this.lastReportedSize.inlineSize !== e3.inlineSize || this.lastReportedSize.blockSize !== e3.blockSize;
33545
33567
  }, t3;
33546
- }(), LP = function(t3, e3) {
33568
+ }(), FP = function(t3, e3) {
33547
33569
  this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t3, this.callback = e3;
33548
- }, NP = /* @__PURE__ */ new WeakMap(), DP = function(t3, e3) {
33570
+ }, BP = /* @__PURE__ */ new WeakMap(), UP = function(t3, e3) {
33549
33571
  for (var n3 = 0; n3 < t3.length; n3 += 1)
33550
33572
  if (t3[n3].target === e3)
33551
33573
  return n3;
33552
33574
  return -1;
33553
- }, FP = function() {
33575
+ }, kP = function() {
33554
33576
  function t3() {
33555
33577
  }
33556
33578
  return t3.connect = function(t4, e3) {
33557
- var n3 = new LP(t4, e3);
33558
- NP.set(t4, n3);
33579
+ var n3 = new FP(t4, e3);
33580
+ BP.set(t4, n3);
33559
33581
  }, t3.observe = function(t4, e3, n3) {
33560
- var i3 = NP.get(t4), r3 = i3.observationTargets.length === 0;
33561
- DP(i3.observationTargets, e3) < 0 && (r3 && QR.push(i3), i3.observationTargets.push(new OP(e3, n3 && n3.box)), IP(1), CP.schedule());
33582
+ var i3 = BP.get(t4), r3 = i3.observationTargets.length === 0;
33583
+ UP(i3.observationTargets, e3) < 0 && (r3 && nP.push(i3), i3.observationTargets.push(new DP(e3, n3 && n3.box)), NP(1), LP.schedule());
33562
33584
  }, t3.unobserve = function(t4, e3) {
33563
- var n3 = NP.get(t4), i3 = DP(n3.observationTargets, e3), r3 = n3.observationTargets.length === 1;
33564
- i3 >= 0 && (r3 && QR.splice(QR.indexOf(n3), 1), n3.observationTargets.splice(i3, 1), IP(-1));
33585
+ var n3 = BP.get(t4), i3 = UP(n3.observationTargets, e3), r3 = n3.observationTargets.length === 1;
33586
+ i3 >= 0 && (r3 && nP.splice(nP.indexOf(n3), 1), n3.observationTargets.splice(i3, 1), NP(-1));
33565
33587
  }, t3.disconnect = function(t4) {
33566
- var e3 = this, n3 = NP.get(t4);
33588
+ var e3 = this, n3 = BP.get(t4);
33567
33589
  n3.observationTargets.slice().forEach(function(n4) {
33568
33590
  return e3.unobserve(t4, n4.target);
33569
33591
  }), n3.activeTargets.splice(0, n3.activeTargets.length);
33570
33592
  }, t3;
33571
- }(), BP = function() {
33593
+ }(), GP = function() {
33572
33594
  function t3(t4) {
33573
33595
  if (arguments.length === 0)
33574
33596
  throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
33575
33597
  if (typeof t4 != "function")
33576
33598
  throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
33577
- FP.connect(this, t4);
33599
+ kP.connect(this, t4);
33578
33600
  }
33579
33601
  return t3.prototype.observe = function(t4, e3) {
33580
33602
  if (arguments.length === 0)
33581
33603
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
33582
- if (!aP(t4))
33604
+ if (!hP(t4))
33583
33605
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
33584
- FP.observe(this, t4, e3);
33606
+ kP.observe(this, t4, e3);
33585
33607
  }, t3.prototype.unobserve = function(t4) {
33586
33608
  if (arguments.length === 0)
33587
33609
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
33588
- if (!aP(t4))
33610
+ if (!hP(t4))
33589
33611
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
33590
- FP.unobserve(this, t4);
33612
+ kP.unobserve(this, t4);
33591
33613
  }, t3.prototype.disconnect = function() {
33592
- FP.disconnect(this);
33614
+ kP.disconnect(this);
33593
33615
  }, t3.toString = function() {
33594
33616
  return "function ResizeObserver () { [polyfill code] }";
33595
33617
  }, t3;
33596
- }(), UP = function(t3, e3, n3, i3) {
33618
+ }(), HP = function(t3, e3, n3, i3) {
33597
33619
  return new (n3 || (n3 = Promise))(function(r3, o2) {
33598
33620
  function s3(t4) {
33599
33621
  try {
@@ -33617,7 +33639,7 @@ void main(void){
33617
33639
  }
33618
33640
  l2((i3 = i3.apply(t3, e3 || [])).next());
33619
33641
  });
33620
- }, kP = function(t3, e3) {
33642
+ }, zP = function(t3, e3) {
33621
33643
  var n3, i3, r3, o2, s3 = { label: 0, sent: function() {
33622
33644
  if (1 & r3[0])
33623
33645
  throw r3[1];
@@ -33680,14 +33702,14 @@ void main(void){
33680
33702
  }([o3, a3]);
33681
33703
  };
33682
33704
  }
33683
- }, GP = function() {
33705
+ }, jP = function() {
33684
33706
  function t3(t4, e3, n3, i3, r3) {
33685
33707
  this.state = "idle", this.index = -1, this.slideIndex = -1, this.fn = n3, this.index = t4, this.slideIndex = e3, this.eventHub = i3, this.id = r3;
33686
33708
  }
33687
33709
  return t3.prototype.apply = function() {
33688
- return UP(this, void 0, void 0, function() {
33710
+ return HP(this, void 0, void 0, function() {
33689
33711
  var t4;
33690
- return kP(this, function(e3) {
33712
+ return zP(this, function(e3) {
33691
33713
  switch (e3.label) {
33692
33714
  case 0:
33693
33715
  this.eventHub.emit("task-start", this), e3.label = 1;
@@ -33703,7 +33725,7 @@ void main(void){
33703
33725
  });
33704
33726
  });
33705
33727
  }, t3;
33706
- }(), HP = function() {
33728
+ }(), VP = function() {
33707
33729
  function t3() {
33708
33730
  var t4 = this;
33709
33731
  this.eventHub = new a.a(), this.tasks = [], this.index = 0, this.eventHub.on("task-end", function(e3) {
@@ -33725,7 +33747,7 @@ void main(void){
33725
33747
  e3.tasks.splice(t5, 1);
33726
33748
  });
33727
33749
  }, t3.prototype.addTask = function(t4, e3, n3) {
33728
- var i3 = new GP(this.index++, e3, t4, this.eventHub, n3);
33750
+ var i3 = new jP(this.index++, e3, t4, this.eventHub, n3);
33729
33751
  this.tasks.push(i3), this.tasks.sort(function(t5, e4) {
33730
33752
  return t5.index - e4.index;
33731
33753
  }), this.replaceIdleTask(), this.tasks.length === 1 && i3.apply();
@@ -33737,7 +33759,7 @@ void main(void){
33737
33759
  this.eventHub.removeAllListeners();
33738
33760
  }, t3;
33739
33761
  }();
33740
- function zP(t3, e3) {
33762
+ function WP(t3, e3) {
33741
33763
  var n3 = t3.__state.conversionName.toString(), i3 = Math.round(t3.r), r3 = Math.round(t3.g), o2 = Math.round(t3.b), s3 = t3.a, a2 = Math.round(t3.h), l2 = t3.s.toFixed(1), u2 = t3.v.toFixed(1);
33742
33764
  if (e3 || n3 === "THREE_CHAR_HEX" || n3 === "SIX_CHAR_HEX") {
33743
33765
  for (var h2 = t3.hex.toString(16); h2.length < 6; )
@@ -33746,28 +33768,28 @@ void main(void){
33746
33768
  }
33747
33769
  return n3 === "CSS_RGB" ? "rgb(" + i3 + "," + r3 + "," + o2 + ")" : n3 === "CSS_RGBA" ? "rgba(" + i3 + "," + r3 + "," + o2 + "," + s3 + ")" : n3 === "HEX" ? "0x" + t3.hex.toString(16) : n3 === "RGB_ARRAY" ? "[" + i3 + "," + r3 + "," + o2 + "]" : n3 === "RGBA_ARRAY" ? "[" + i3 + "," + r3 + "," + o2 + "," + s3 + "]" : n3 === "RGB_OBJ" ? "{r:" + i3 + ",g:" + r3 + ",b:" + o2 + "}" : n3 === "RGBA_OBJ" ? "{r:" + i3 + ",g:" + r3 + ",b:" + o2 + ",a:" + s3 + "}" : n3 === "HSV_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + u2 + "}" : n3 === "HSVA_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + u2 + ",a:" + s3 + "}" : "unknown format";
33748
33770
  }
33749
- var jP = Array.prototype.forEach, VP = Array.prototype.slice, WP = { BREAK: {}, extend: function(t3) {
33750
- return this.each(VP.call(arguments, 1), function(e3) {
33771
+ var XP = Array.prototype.forEach, qP = Array.prototype.slice, YP = { BREAK: {}, extend: function(t3) {
33772
+ return this.each(qP.call(arguments, 1), function(e3) {
33751
33773
  (this.isObject(e3) ? Object.keys(e3) : []).forEach(function(n3) {
33752
33774
  this.isUndefined(e3[n3]) || (t3[n3] = e3[n3]);
33753
33775
  }.bind(this));
33754
33776
  }, this), t3;
33755
33777
  }, defaults: function(t3) {
33756
- return this.each(VP.call(arguments, 1), function(e3) {
33778
+ return this.each(qP.call(arguments, 1), function(e3) {
33757
33779
  (this.isObject(e3) ? Object.keys(e3) : []).forEach(function(n3) {
33758
33780
  this.isUndefined(t3[n3]) && (t3[n3] = e3[n3]);
33759
33781
  }.bind(this));
33760
33782
  }, this), t3;
33761
33783
  }, compose: function() {
33762
- var t3 = VP.call(arguments);
33784
+ var t3 = qP.call(arguments);
33763
33785
  return function() {
33764
- for (var e3 = VP.call(arguments), n3 = t3.length - 1; n3 >= 0; n3--)
33786
+ for (var e3 = qP.call(arguments), n3 = t3.length - 1; n3 >= 0; n3--)
33765
33787
  e3 = [t3[n3].apply(this, e3)];
33766
33788
  return e3[0];
33767
33789
  };
33768
33790
  }, each: function(t3, e3, n3) {
33769
33791
  if (t3) {
33770
- if (jP && t3.forEach && t3.forEach === jP)
33792
+ if (XP && t3.forEach && t3.forEach === XP)
33771
33793
  t3.forEach(e3, n3);
33772
33794
  else if (t3.length === t3.length + 0) {
33773
33795
  var i3, r3 = void 0;
@@ -33792,7 +33814,7 @@ void main(void){
33792
33814
  clearTimeout(i3), i3 = setTimeout(s3, e3), a2 && t3.apply(r3, o2);
33793
33815
  };
33794
33816
  }, toArray: function(t3) {
33795
- return t3.toArray ? t3.toArray() : VP.call(t3);
33817
+ return t3.toArray ? t3.toArray() : qP.call(t3);
33796
33818
  }, isUndefined: function(t3) {
33797
33819
  return t3 === void 0;
33798
33820
  }, isNull: function(t3) {
@@ -33818,23 +33840,23 @@ void main(void){
33818
33840
  return t3 === false || t3 === true;
33819
33841
  }, isFunction: function(t3) {
33820
33842
  return t3 instanceof Function;
33821
- } }, XP = [{ litmus: WP.isString, conversions: { THREE_CHAR_HEX: { read: function(t3) {
33843
+ } }, ZP = [{ litmus: YP.isString, conversions: { THREE_CHAR_HEX: { read: function(t3) {
33822
33844
  var e3 = t3.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
33823
33845
  return e3 !== null && { space: "HEX", hex: parseInt("0x" + e3[1].toString() + e3[1].toString() + e3[2].toString() + e3[2].toString() + e3[3].toString() + e3[3].toString(), 0) };
33824
- }, write: zP }, SIX_CHAR_HEX: { read: function(t3) {
33846
+ }, write: WP }, SIX_CHAR_HEX: { read: function(t3) {
33825
33847
  var e3 = t3.match(/^#([A-F0-9]{6})$/i);
33826
33848
  return e3 !== null && { space: "HEX", hex: parseInt("0x" + e3[1].toString(), 0) };
33827
- }, write: zP }, CSS_RGB: { read: function(t3) {
33849
+ }, write: WP }, CSS_RGB: { read: function(t3) {
33828
33850
  var e3 = t3.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
33829
33851
  return e3 !== null && { space: "RGB", r: parseFloat(e3[1]), g: parseFloat(e3[2]), b: parseFloat(e3[3]) };
33830
- }, write: zP }, CSS_RGBA: { read: function(t3) {
33852
+ }, write: WP }, CSS_RGBA: { read: function(t3) {
33831
33853
  var e3 = t3.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
33832
33854
  return e3 !== null && { space: "RGB", r: parseFloat(e3[1]), g: parseFloat(e3[2]), b: parseFloat(e3[3]), a: parseFloat(e3[4]) };
33833
- }, write: zP } } }, { litmus: WP.isNumber, conversions: { HEX: { read: function(t3) {
33855
+ }, write: WP } } }, { litmus: YP.isNumber, conversions: { HEX: { read: function(t3) {
33834
33856
  return { space: "HEX", hex: t3, conversionName: "HEX" };
33835
33857
  }, write: function(t3) {
33836
33858
  return t3.hex;
33837
- } } } }, { litmus: WP.isArray, conversions: { RGB_ARRAY: { read: function(t3) {
33859
+ } } } }, { litmus: YP.isArray, conversions: { RGB_ARRAY: { read: function(t3) {
33838
33860
  return t3.length === 3 && { space: "RGB", r: t3[0], g: t3[1], b: t3[2] };
33839
33861
  }, write: function(t3) {
33840
33862
  return [t3.r, t3.g, t3.b];
@@ -33842,33 +33864,33 @@ void main(void){
33842
33864
  return t3.length === 4 && { space: "RGB", r: t3[0], g: t3[1], b: t3[2], a: t3[3] };
33843
33865
  }, write: function(t3) {
33844
33866
  return [t3.r, t3.g, t3.b, t3.a];
33845
- } } } }, { litmus: WP.isObject, conversions: { RGBA_OBJ: { read: function(t3) {
33846
- return !!(WP.isNumber(t3.r) && WP.isNumber(t3.g) && WP.isNumber(t3.b) && WP.isNumber(t3.a)) && { space: "RGB", r: t3.r, g: t3.g, b: t3.b, a: t3.a };
33867
+ } } } }, { litmus: YP.isObject, conversions: { RGBA_OBJ: { read: function(t3) {
33868
+ return !!(YP.isNumber(t3.r) && YP.isNumber(t3.g) && YP.isNumber(t3.b) && YP.isNumber(t3.a)) && { space: "RGB", r: t3.r, g: t3.g, b: t3.b, a: t3.a };
33847
33869
  }, write: function(t3) {
33848
33870
  return { r: t3.r, g: t3.g, b: t3.b, a: t3.a };
33849
33871
  } }, RGB_OBJ: { read: function(t3) {
33850
- return !!(WP.isNumber(t3.r) && WP.isNumber(t3.g) && WP.isNumber(t3.b)) && { space: "RGB", r: t3.r, g: t3.g, b: t3.b };
33872
+ return !!(YP.isNumber(t3.r) && YP.isNumber(t3.g) && YP.isNumber(t3.b)) && { space: "RGB", r: t3.r, g: t3.g, b: t3.b };
33851
33873
  }, write: function(t3) {
33852
33874
  return { r: t3.r, g: t3.g, b: t3.b };
33853
33875
  } }, HSVA_OBJ: { read: function(t3) {
33854
- return !!(WP.isNumber(t3.h) && WP.isNumber(t3.s) && WP.isNumber(t3.v) && WP.isNumber(t3.a)) && { space: "HSV", h: t3.h, s: t3.s, v: t3.v, a: t3.a };
33876
+ return !!(YP.isNumber(t3.h) && YP.isNumber(t3.s) && YP.isNumber(t3.v) && YP.isNumber(t3.a)) && { space: "HSV", h: t3.h, s: t3.s, v: t3.v, a: t3.a };
33855
33877
  }, write: function(t3) {
33856
33878
  return { h: t3.h, s: t3.s, v: t3.v, a: t3.a };
33857
33879
  } }, HSV_OBJ: { read: function(t3) {
33858
- return !!(WP.isNumber(t3.h) && WP.isNumber(t3.s) && WP.isNumber(t3.v)) && { space: "HSV", h: t3.h, s: t3.s, v: t3.v };
33880
+ return !!(YP.isNumber(t3.h) && YP.isNumber(t3.s) && YP.isNumber(t3.v)) && { space: "HSV", h: t3.h, s: t3.s, v: t3.v };
33859
33881
  }, write: function(t3) {
33860
33882
  return { h: t3.h, s: t3.s, v: t3.v };
33861
- } } } }], qP = void 0, YP = void 0, ZP = function() {
33862
- YP = false;
33863
- var t3 = arguments.length > 1 ? WP.toArray(arguments) : arguments[0];
33864
- return WP.each(XP, function(e3) {
33883
+ } } } }], JP = void 0, $P = void 0, KP = function() {
33884
+ $P = false;
33885
+ var t3 = arguments.length > 1 ? YP.toArray(arguments) : arguments[0];
33886
+ return YP.each(ZP, function(e3) {
33865
33887
  if (e3.litmus(t3))
33866
- return WP.each(e3.conversions, function(e4, n3) {
33867
- if (qP = e4.read(t3), YP === false && qP !== false)
33868
- return YP = qP, qP.conversionName = n3, qP.conversion = e4, WP.BREAK;
33869
- }), WP.BREAK;
33870
- }), YP;
33871
- }, JP = void 0, $P = { hsv_to_rgb: function(t3, e3, n3) {
33888
+ return YP.each(e3.conversions, function(e4, n3) {
33889
+ if (JP = e4.read(t3), $P === false && JP !== false)
33890
+ return $P = JP, JP.conversionName = n3, JP.conversion = e4, YP.BREAK;
33891
+ }), YP.BREAK;
33892
+ }), $P;
33893
+ }, QP = void 0, tC = { hsv_to_rgb: function(t3, e3, n3) {
33872
33894
  var i3 = Math.floor(t3 / 60) % 6, r3 = t3 / 60 - Math.floor(t3 / 60), o2 = n3 * (1 - e3), s3 = n3 * (1 - r3 * e3), a2 = n3 * (1 - (1 - r3) * e3), l2 = [[n3, a2, o2], [s3, n3, o2], [o2, n3, a2], [o2, s3, n3], [a2, o2, n3], [n3, o2, s3]][i3];
33873
33895
  return { r: 255 * l2[0], g: 255 * l2[1], b: 255 * l2[2] };
33874
33896
  }, rgb_to_hsv: function(t3, e3, n3) {
@@ -33880,15 +33902,15 @@ void main(void){
33880
33902
  }, component_from_hex: function(t3, e3) {
33881
33903
  return t3 >> 8 * e3 & 255;
33882
33904
  }, hex_with_component: function(t3, e3, n3) {
33883
- return n3 << (JP = 8 * e3) | t3 & ~(255 << JP);
33884
- } }, KP = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t3) {
33905
+ return n3 << (QP = 8 * e3) | t3 & ~(255 << QP);
33906
+ } }, eC = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t3) {
33885
33907
  return typeof t3;
33886
33908
  } : function(t3) {
33887
33909
  return t3 && typeof Symbol == "function" && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3;
33888
- }, QP = function(t3, e3) {
33910
+ }, nC = function(t3, e3) {
33889
33911
  if (!(t3 instanceof e3))
33890
33912
  throw new TypeError("Cannot call a class as a function");
33891
- }, tC = function() {
33913
+ }, iC = function() {
33892
33914
  function t3(t4, e3) {
33893
33915
  for (var n3 = 0; n3 < e3.length; n3++) {
33894
33916
  var i3 = e3[n3];
@@ -33898,7 +33920,7 @@ void main(void){
33898
33920
  return function(e3, n3, i3) {
33899
33921
  return n3 && t3(e3.prototype, n3), i3 && t3(e3, i3), e3;
33900
33922
  };
33901
- }(), eC = function t3(e3, n3, i3) {
33923
+ }(), rC = function t3(e3, n3, i3) {
33902
33924
  e3 === null && (e3 = Function.prototype);
33903
33925
  var r3 = Object.getOwnPropertyDescriptor(e3, n3);
33904
33926
  if (r3 === void 0) {
@@ -33909,67 +33931,67 @@ void main(void){
33909
33931
  return r3.value;
33910
33932
  var s3 = r3.get;
33911
33933
  return s3 !== void 0 ? s3.call(i3) : void 0;
33912
- }, nC = function(t3, e3) {
33934
+ }, oC = function(t3, e3) {
33913
33935
  if (typeof e3 != "function" && e3 !== null)
33914
33936
  throw new TypeError("Super expression must either be null or a function, not " + typeof e3);
33915
33937
  t3.prototype = Object.create(e3 && e3.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }), e3 && (Object.setPrototypeOf ? Object.setPrototypeOf(t3, e3) : t3.__proto__ = e3);
33916
- }, iC = function(t3, e3) {
33938
+ }, sC = function(t3, e3) {
33917
33939
  if (!t3)
33918
33940
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
33919
33941
  return !e3 || typeof e3 != "object" && typeof e3 != "function" ? t3 : e3;
33920
- }, rC = function() {
33942
+ }, aC = function() {
33921
33943
  function t3() {
33922
- if (QP(this, t3), this.__state = ZP.apply(this, arguments), this.__state === false)
33944
+ if (nC(this, t3), this.__state = KP.apply(this, arguments), this.__state === false)
33923
33945
  throw new Error("Failed to interpret color arguments");
33924
33946
  this.__state.a = this.__state.a || 1;
33925
33947
  }
33926
- return tC(t3, [{ key: "toString", value: function() {
33927
- return zP(this);
33948
+ return iC(t3, [{ key: "toString", value: function() {
33949
+ return WP(this);
33928
33950
  } }, { key: "toHexString", value: function() {
33929
- return zP(this, true);
33951
+ return WP(this, true);
33930
33952
  } }, { key: "toOriginal", value: function() {
33931
33953
  return this.__state.conversion.write(this);
33932
33954
  } }]), t3;
33933
33955
  }();
33934
- function oC(t3, e3, n3) {
33956
+ function lC(t3, e3, n3) {
33935
33957
  Object.defineProperty(t3, e3, { get: function() {
33936
- return this.__state.space === "RGB" || rC.recalculateRGB(this, e3, n3), this.__state[e3];
33958
+ return this.__state.space === "RGB" || aC.recalculateRGB(this, e3, n3), this.__state[e3];
33937
33959
  }, set: function(t4) {
33938
- this.__state.space !== "RGB" && (rC.recalculateRGB(this, e3, n3), this.__state.space = "RGB"), this.__state[e3] = t4;
33960
+ this.__state.space !== "RGB" && (aC.recalculateRGB(this, e3, n3), this.__state.space = "RGB"), this.__state[e3] = t4;
33939
33961
  } });
33940
33962
  }
33941
- function sC(t3, e3) {
33963
+ function uC(t3, e3) {
33942
33964
  Object.defineProperty(t3, e3, { get: function() {
33943
- return this.__state.space === "HSV" || rC.recalculateHSV(this), this.__state[e3];
33965
+ return this.__state.space === "HSV" || aC.recalculateHSV(this), this.__state[e3];
33944
33966
  }, set: function(t4) {
33945
- this.__state.space !== "HSV" && (rC.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e3] = t4;
33967
+ this.__state.space !== "HSV" && (aC.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e3] = t4;
33946
33968
  } });
33947
33969
  }
33948
- rC.recalculateRGB = function(t3, e3, n3) {
33970
+ aC.recalculateRGB = function(t3, e3, n3) {
33949
33971
  if (t3.__state.space === "HEX")
33950
- t3.__state[e3] = $P.component_from_hex(t3.__state.hex, n3);
33972
+ t3.__state[e3] = tC.component_from_hex(t3.__state.hex, n3);
33951
33973
  else {
33952
33974
  if (t3.__state.space !== "HSV")
33953
33975
  throw new Error("Corrupted color state");
33954
- WP.extend(t3.__state, $P.hsv_to_rgb(t3.__state.h, t3.__state.s, t3.__state.v));
33976
+ YP.extend(t3.__state, tC.hsv_to_rgb(t3.__state.h, t3.__state.s, t3.__state.v));
33955
33977
  }
33956
- }, rC.recalculateHSV = function(t3) {
33957
- var e3 = $P.rgb_to_hsv(t3.r, t3.g, t3.b);
33958
- WP.extend(t3.__state, { s: e3.s, v: e3.v }), WP.isNaN(e3.h) ? WP.isUndefined(t3.__state.h) && (t3.__state.h = 0) : t3.__state.h = e3.h;
33959
- }, rC.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], oC(rC.prototype, "r", 2), oC(rC.prototype, "g", 1), oC(rC.prototype, "b", 0), sC(rC.prototype, "h"), sC(rC.prototype, "s"), sC(rC.prototype, "v"), Object.defineProperty(rC.prototype, "a", { get: function() {
33978
+ }, aC.recalculateHSV = function(t3) {
33979
+ var e3 = tC.rgb_to_hsv(t3.r, t3.g, t3.b);
33980
+ YP.extend(t3.__state, { s: e3.s, v: e3.v }), YP.isNaN(e3.h) ? YP.isUndefined(t3.__state.h) && (t3.__state.h = 0) : t3.__state.h = e3.h;
33981
+ }, aC.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], lC(aC.prototype, "r", 2), lC(aC.prototype, "g", 1), lC(aC.prototype, "b", 0), uC(aC.prototype, "h"), uC(aC.prototype, "s"), uC(aC.prototype, "v"), Object.defineProperty(aC.prototype, "a", { get: function() {
33960
33982
  return this.__state.a;
33961
33983
  }, set: function(t3) {
33962
33984
  this.__state.a = t3;
33963
- } }), Object.defineProperty(rC.prototype, "hex", { get: function() {
33964
- return this.__state.space !== "HEX" && (this.__state.hex = $P.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
33985
+ } }), Object.defineProperty(aC.prototype, "hex", { get: function() {
33986
+ return this.__state.space !== "HEX" && (this.__state.hex = tC.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
33965
33987
  }, set: function(t3) {
33966
33988
  this.__state.space = "HEX", this.__state.hex = t3;
33967
33989
  } });
33968
- var aC = function() {
33990
+ var hC = function() {
33969
33991
  function t3(e3, n3) {
33970
- QP(this, t3), this.initialValue = e3[n3], this.domElement = document.createElement("div"), this.object = e3, this.property = n3, this.__onChange = void 0, this.__onFinishChange = void 0;
33992
+ nC(this, t3), this.initialValue = e3[n3], this.domElement = document.createElement("div"), this.object = e3, this.property = n3, this.__onChange = void 0, this.__onFinishChange = void 0;
33971
33993
  }
33972
- return tC(t3, [{ key: "onChange", value: function(t4) {
33994
+ return iC(t3, [{ key: "onChange", value: function(t4) {
33973
33995
  return this.__onChange = t4, this;
33974
33996
  } }, { key: "onFinishChange", value: function(t4) {
33975
33997
  return this.__onFinishChange = t4, this;
@@ -33982,29 +34004,29 @@ void main(void){
33982
34004
  } }, { key: "isModified", value: function() {
33983
34005
  return this.initialValue !== this.getValue();
33984
34006
  } }]), t3;
33985
- }(), lC = {};
33986
- WP.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t3, e3) {
33987
- WP.each(t3, function(t4) {
33988
- lC[t4] = e3;
34007
+ }(), cC = {};
34008
+ YP.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t3, e3) {
34009
+ YP.each(t3, function(t4) {
34010
+ cC[t4] = e3;
33989
34011
  });
33990
34012
  });
33991
- var uC = /(\d+(\.\d+)?)px/;
33992
- function hC(t3) {
33993
- if (t3 === "0" || WP.isUndefined(t3))
34013
+ var dC = /(\d+(\.\d+)?)px/;
34014
+ function pC(t3) {
34015
+ if (t3 === "0" || YP.isUndefined(t3))
33994
34016
  return 0;
33995
- var e3 = t3.match(uC);
33996
- return WP.isNull(e3) ? 0 : parseFloat(e3[1]);
34017
+ var e3 = t3.match(dC);
34018
+ return YP.isNull(e3) ? 0 : parseFloat(e3[1]);
33997
34019
  }
33998
- var cC = { makeSelectable: function(t3, e3) {
34020
+ var fC = { makeSelectable: function(t3, e3) {
33999
34021
  t3 !== void 0 && t3.style !== void 0 && (t3.onselectstart = e3 ? function() {
34000
34022
  return false;
34001
34023
  } : function() {
34002
34024
  }, t3.style.MozUserSelect = e3 ? "auto" : "none", t3.style.KhtmlUserSelect = e3 ? "auto" : "none", t3.unselectable = e3 ? "on" : "off");
34003
34025
  }, makeFullscreen: function(t3, e3, n3) {
34004
34026
  var i3 = n3, r3 = e3;
34005
- WP.isUndefined(r3) && (r3 = true), WP.isUndefined(i3) && (i3 = true), t3.style.position = "absolute", r3 && (t3.style.left = 0, t3.style.right = 0), i3 && (t3.style.top = 0, t3.style.bottom = 0);
34027
+ YP.isUndefined(r3) && (r3 = true), YP.isUndefined(i3) && (i3 = true), t3.style.position = "absolute", r3 && (t3.style.left = 0, t3.style.right = 0), i3 && (t3.style.top = 0, t3.style.bottom = 0);
34006
34028
  }, fakeEvent: function(t3, e3, n3, i3) {
34007
- var r3 = n3 || {}, o2 = lC[e3];
34029
+ var r3 = n3 || {}, o2 = cC[e3];
34008
34030
  if (!o2)
34009
34031
  throw new Error("Event type " + e3 + " not supported.");
34010
34032
  var s3 = document.createEvent(o2);
@@ -34015,18 +34037,18 @@ void main(void){
34015
34037
  break;
34016
34038
  case "KeyboardEvents":
34017
34039
  var u2 = s3.initKeyboardEvent || s3.initKeyEvent;
34018
- WP.defaults(r3, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), u2(e3, r3.bubbles || false, r3.cancelable, window, r3.ctrlKey, r3.altKey, r3.shiftKey, r3.metaKey, r3.keyCode, r3.charCode);
34040
+ YP.defaults(r3, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), u2(e3, r3.bubbles || false, r3.cancelable, window, r3.ctrlKey, r3.altKey, r3.shiftKey, r3.metaKey, r3.keyCode, r3.charCode);
34019
34041
  break;
34020
34042
  default:
34021
34043
  s3.initEvent(e3, r3.bubbles || false, r3.cancelable || true);
34022
34044
  }
34023
- WP.defaults(s3, i3), t3.dispatchEvent(s3);
34045
+ YP.defaults(s3, i3), t3.dispatchEvent(s3);
34024
34046
  }, bind: function(t3, e3, n3, i3) {
34025
34047
  var r3 = i3 || false;
34026
- return t3.addEventListener ? t3.addEventListener(e3, n3, r3) : t3.attachEvent && t3.attachEvent("on" + e3, n3), cC;
34048
+ return t3.addEventListener ? t3.addEventListener(e3, n3, r3) : t3.attachEvent && t3.attachEvent("on" + e3, n3), fC;
34027
34049
  }, unbind: function(t3, e3, n3, i3) {
34028
34050
  var r3 = i3 || false;
34029
- return t3.removeEventListener ? t3.removeEventListener(e3, n3, r3) : t3.detachEvent && t3.detachEvent("on" + e3, n3), cC;
34051
+ return t3.removeEventListener ? t3.removeEventListener(e3, n3, r3) : t3.detachEvent && t3.detachEvent("on" + e3, n3), fC;
34030
34052
  }, addClass: function(t3, e3) {
34031
34053
  if (t3.className === void 0)
34032
34054
  t3.className = e3;
@@ -34034,7 +34056,7 @@ void main(void){
34034
34056
  var n3 = t3.className.split(/ +/);
34035
34057
  n3.indexOf(e3) === -1 && (n3.push(e3), t3.className = n3.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
34036
34058
  }
34037
- return cC;
34059
+ return fC;
34038
34060
  }, removeClass: function(t3, e3) {
34039
34061
  if (e3)
34040
34062
  if (t3.className === e3)
@@ -34045,15 +34067,15 @@ void main(void){
34045
34067
  }
34046
34068
  else
34047
34069
  t3.className = void 0;
34048
- return cC;
34070
+ return fC;
34049
34071
  }, hasClass: function(t3, e3) {
34050
34072
  return new RegExp("(?:^|\\s+)" + e3 + "(?:\\s+|$)").test(t3.className) || false;
34051
34073
  }, getWidth: function(t3) {
34052
34074
  var e3 = getComputedStyle(t3);
34053
- return hC(e3["border-left-width"]) + hC(e3["border-right-width"]) + hC(e3["padding-left"]) + hC(e3["padding-right"]) + hC(e3.width);
34075
+ return pC(e3["border-left-width"]) + pC(e3["border-right-width"]) + pC(e3["padding-left"]) + pC(e3["padding-right"]) + pC(e3.width);
34054
34076
  }, getHeight: function(t3) {
34055
34077
  var e3 = getComputedStyle(t3);
34056
- return hC(e3["border-top-width"]) + hC(e3["border-bottom-width"]) + hC(e3["padding-top"]) + hC(e3["padding-bottom"]) + hC(e3.height);
34078
+ return pC(e3["border-top-width"]) + pC(e3["border-bottom-width"]) + pC(e3["padding-top"]) + pC(e3["padding-bottom"]) + pC(e3.height);
34057
34079
  }, getOffset: function(t3) {
34058
34080
  var e3 = t3, n3 = { left: 0, top: 0 };
34059
34081
  if (e3.offsetParent)
@@ -34063,86 +34085,86 @@ void main(void){
34063
34085
  return n3;
34064
34086
  }, isActive: function(t3) {
34065
34087
  return t3 === document.activeElement && (t3.type || t3.href);
34066
- } }, dC = function(t3) {
34088
+ } }, mC = function(t3) {
34067
34089
  function e3(t4, n3) {
34068
- QP(this, e3);
34069
- var i3 = iC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), r3 = i3;
34070
- return i3.__prev = i3.getValue(), i3.__checkbox = document.createElement("input"), i3.__checkbox.setAttribute("type", "checkbox"), cC.bind(i3.__checkbox, "change", function() {
34090
+ nC(this, e3);
34091
+ var i3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), r3 = i3;
34092
+ return i3.__prev = i3.getValue(), i3.__checkbox = document.createElement("input"), i3.__checkbox.setAttribute("type", "checkbox"), fC.bind(i3.__checkbox, "change", function() {
34071
34093
  r3.setValue(!r3.__prev);
34072
34094
  }, false), i3.domElement.appendChild(i3.__checkbox), i3.updateDisplay(), i3;
34073
34095
  }
34074
- return nC(e3, t3), tC(e3, [{ key: "setValue", value: function(t4) {
34075
- var n3 = eC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, t4);
34096
+ return oC(e3, t3), iC(e3, [{ key: "setValue", value: function(t4) {
34097
+ var n3 = rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, t4);
34076
34098
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), n3;
34077
34099
  } }, { key: "updateDisplay", value: function() {
34078
- return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), eC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
34100
+ return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
34079
34101
  } }]), e3;
34080
- }(aC), pC = function(t3) {
34102
+ }(hC), gC = function(t3) {
34081
34103
  function e3(t4, n3, i3) {
34082
- QP(this, e3);
34083
- var r3 = iC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = i3, s3 = r3;
34084
- if (r3.__select = document.createElement("select"), WP.isArray(o2)) {
34104
+ nC(this, e3);
34105
+ var r3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = i3, s3 = r3;
34106
+ if (r3.__select = document.createElement("select"), YP.isArray(o2)) {
34085
34107
  var a2 = {};
34086
- WP.each(o2, function(t5) {
34108
+ YP.each(o2, function(t5) {
34087
34109
  a2[t5] = t5;
34088
34110
  }), o2 = a2;
34089
34111
  }
34090
- return WP.each(o2, function(t5, e4) {
34112
+ return YP.each(o2, function(t5, e4) {
34091
34113
  var n4 = document.createElement("option");
34092
34114
  n4.innerHTML = e4, n4.setAttribute("value", t5), s3.__select.appendChild(n4);
34093
- }), r3.updateDisplay(), cC.bind(r3.__select, "change", function() {
34115
+ }), r3.updateDisplay(), fC.bind(r3.__select, "change", function() {
34094
34116
  var t5 = this.options[this.selectedIndex].value;
34095
34117
  s3.setValue(t5);
34096
34118
  }), r3.domElement.appendChild(r3.__select), r3;
34097
34119
  }
34098
- return nC(e3, t3), tC(e3, [{ key: "setValue", value: function(t4) {
34099
- var n3 = eC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, t4);
34120
+ return oC(e3, t3), iC(e3, [{ key: "setValue", value: function(t4) {
34121
+ var n3 = rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, t4);
34100
34122
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), n3;
34101
34123
  } }, { key: "updateDisplay", value: function() {
34102
- return cC.isActive(this.__select) ? this : (this.__select.value = this.getValue(), eC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this));
34124
+ return fC.isActive(this.__select) ? this : (this.__select.value = this.getValue(), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this));
34103
34125
  } }]), e3;
34104
- }(aC), fC = function(t3) {
34126
+ }(hC), vC = function(t3) {
34105
34127
  function e3(t4, n3) {
34106
- QP(this, e3);
34107
- var i3 = iC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), r3 = i3;
34128
+ nC(this, e3);
34129
+ var i3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), r3 = i3;
34108
34130
  function o2() {
34109
34131
  r3.setValue(r3.__input.value);
34110
34132
  }
34111
- return i3.__input = document.createElement("input"), i3.__input.setAttribute("type", "text"), cC.bind(i3.__input, "keyup", o2), cC.bind(i3.__input, "change", o2), cC.bind(i3.__input, "blur", function() {
34133
+ return i3.__input = document.createElement("input"), i3.__input.setAttribute("type", "text"), fC.bind(i3.__input, "keyup", o2), fC.bind(i3.__input, "change", o2), fC.bind(i3.__input, "blur", function() {
34112
34134
  r3.__onFinishChange && r3.__onFinishChange.call(r3, r3.getValue());
34113
- }), cC.bind(i3.__input, "keydown", function(t5) {
34135
+ }), fC.bind(i3.__input, "keydown", function(t5) {
34114
34136
  t5.keyCode === 13 && this.blur();
34115
34137
  }), i3.updateDisplay(), i3.domElement.appendChild(i3.__input), i3;
34116
34138
  }
34117
- return nC(e3, t3), tC(e3, [{ key: "updateDisplay", value: function() {
34118
- return cC.isActive(this.__input) || (this.__input.value = this.getValue()), eC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
34139
+ return oC(e3, t3), iC(e3, [{ key: "updateDisplay", value: function() {
34140
+ return fC.isActive(this.__input) || (this.__input.value = this.getValue()), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
34119
34141
  } }]), e3;
34120
- }(aC);
34121
- function mC(t3) {
34142
+ }(hC);
34143
+ function _C(t3) {
34122
34144
  var e3 = t3.toString();
34123
34145
  return e3.indexOf(".") > -1 ? e3.length - e3.indexOf(".") - 1 : 0;
34124
34146
  }
34125
- var gC = function(t3) {
34147
+ var yC = function(t3) {
34126
34148
  function e3(t4, n3, i3) {
34127
- QP(this, e3);
34128
- var r3 = iC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = i3 || {};
34129
- return r3.__min = o2.min, r3.__max = o2.max, r3.__step = o2.step, WP.isUndefined(r3.__step) ? r3.initialValue === 0 ? r3.__impliedStep = 1 : r3.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r3.initialValue)) / Math.LN10)) / 10 : r3.__impliedStep = r3.__step, r3.__precision = mC(r3.__impliedStep), r3;
34149
+ nC(this, e3);
34150
+ var r3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = i3 || {};
34151
+ return r3.__min = o2.min, r3.__max = o2.max, r3.__step = o2.step, YP.isUndefined(r3.__step) ? r3.initialValue === 0 ? r3.__impliedStep = 1 : r3.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r3.initialValue)) / Math.LN10)) / 10 : r3.__impliedStep = r3.__step, r3.__precision = _C(r3.__impliedStep), r3;
34130
34152
  }
34131
- return nC(e3, t3), tC(e3, [{ key: "setValue", value: function(t4) {
34153
+ return oC(e3, t3), iC(e3, [{ key: "setValue", value: function(t4) {
34132
34154
  var n3 = t4;
34133
- return this.__min !== void 0 && n3 < this.__min ? n3 = this.__min : this.__max !== void 0 && n3 > this.__max && (n3 = this.__max), this.__step !== void 0 && n3 % this.__step != 0 && (n3 = Math.round(n3 / this.__step) * this.__step), eC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, n3);
34155
+ return this.__min !== void 0 && n3 < this.__min ? n3 = this.__min : this.__max !== void 0 && n3 > this.__max && (n3 = this.__max), this.__step !== void 0 && n3 % this.__step != 0 && (n3 = Math.round(n3 / this.__step) * this.__step), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, n3);
34134
34156
  } }, { key: "min", value: function(t4) {
34135
34157
  return this.__min = t4, this;
34136
34158
  } }, { key: "max", value: function(t4) {
34137
34159
  return this.__max = t4, this;
34138
34160
  } }, { key: "step", value: function(t4) {
34139
- return this.__step = t4, this.__impliedStep = t4, this.__precision = mC(t4), this;
34161
+ return this.__step = t4, this.__impliedStep = t4, this.__precision = _C(t4), this;
34140
34162
  } }]), e3;
34141
- }(aC);
34142
- var vC = function(t3) {
34163
+ }(hC);
34164
+ var xC = function(t3) {
34143
34165
  function e3(t4, n3, i3) {
34144
- QP(this, e3);
34145
- var r3 = iC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3, i3));
34166
+ nC(this, e3);
34167
+ var r3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3, i3));
34146
34168
  r3.__truncationSuspended = false;
34147
34169
  var o2 = r3, s3 = void 0;
34148
34170
  function a2() {
@@ -34153,101 +34175,101 @@ void main(void){
34153
34175
  o2.setValue(o2.getValue() + e4 * o2.__impliedStep), s3 = t5.clientY;
34154
34176
  }
34155
34177
  function u2() {
34156
- cC.unbind(window, "mousemove", l2), cC.unbind(window, "mouseup", u2), a2();
34178
+ fC.unbind(window, "mousemove", l2), fC.unbind(window, "mouseup", u2), a2();
34157
34179
  }
34158
- return r3.__input = document.createElement("input"), r3.__input.setAttribute("type", "text"), cC.bind(r3.__input, "change", function() {
34180
+ return r3.__input = document.createElement("input"), r3.__input.setAttribute("type", "text"), fC.bind(r3.__input, "change", function() {
34159
34181
  var t5 = parseFloat(o2.__input.value);
34160
- WP.isNaN(t5) || o2.setValue(t5);
34161
- }), cC.bind(r3.__input, "blur", function() {
34182
+ YP.isNaN(t5) || o2.setValue(t5);
34183
+ }), fC.bind(r3.__input, "blur", function() {
34162
34184
  a2();
34163
- }), cC.bind(r3.__input, "mousedown", function(t5) {
34164
- cC.bind(window, "mousemove", l2), cC.bind(window, "mouseup", u2), s3 = t5.clientY;
34165
- }), cC.bind(r3.__input, "keydown", function(t5) {
34185
+ }), fC.bind(r3.__input, "mousedown", function(t5) {
34186
+ fC.bind(window, "mousemove", l2), fC.bind(window, "mouseup", u2), s3 = t5.clientY;
34187
+ }), fC.bind(r3.__input, "keydown", function(t5) {
34166
34188
  t5.keyCode === 13 && (o2.__truncationSuspended = true, this.blur(), o2.__truncationSuspended = false, a2());
34167
34189
  }), r3.updateDisplay(), r3.domElement.appendChild(r3.__input), r3;
34168
34190
  }
34169
- return nC(e3, t3), tC(e3, [{ key: "updateDisplay", value: function() {
34191
+ return oC(e3, t3), iC(e3, [{ key: "updateDisplay", value: function() {
34170
34192
  var t4, n3, i3;
34171
- return this.__input.value = this.__truncationSuspended ? this.getValue() : (t4 = this.getValue(), n3 = this.__precision, i3 = Math.pow(10, n3), Math.round(t4 * i3) / i3), eC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
34193
+ return this.__input.value = this.__truncationSuspended ? this.getValue() : (t4 = this.getValue(), n3 = this.__precision, i3 = Math.pow(10, n3), Math.round(t4 * i3) / i3), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
34172
34194
  } }]), e3;
34173
- }(gC);
34174
- function _C(t3, e3, n3, i3, r3) {
34195
+ }(yC);
34196
+ function bC(t3, e3, n3, i3, r3) {
34175
34197
  return i3 + (t3 - e3) / (n3 - e3) * (r3 - i3);
34176
34198
  }
34177
- var yC = function(t3) {
34199
+ var TC = function(t3) {
34178
34200
  function e3(t4, n3, i3, r3, o2) {
34179
- QP(this, e3);
34180
- var s3 = iC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3, { min: i3, max: r3, step: o2 })), a2 = s3;
34201
+ nC(this, e3);
34202
+ var s3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3, { min: i3, max: r3, step: o2 })), a2 = s3;
34181
34203
  function l2(t5) {
34182
34204
  t5.preventDefault();
34183
34205
  var e4 = a2.__background.getBoundingClientRect();
34184
- return a2.setValue(_C(t5.clientX, e4.left, e4.right, a2.__min, a2.__max)), false;
34206
+ return a2.setValue(bC(t5.clientX, e4.left, e4.right, a2.__min, a2.__max)), false;
34185
34207
  }
34186
34208
  function u2() {
34187
- cC.unbind(window, "mousemove", l2), cC.unbind(window, "mouseup", u2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34209
+ fC.unbind(window, "mousemove", l2), fC.unbind(window, "mouseup", u2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34188
34210
  }
34189
34211
  function h2(t5) {
34190
34212
  var e4 = t5.touches[0].clientX, n4 = a2.__background.getBoundingClientRect();
34191
- a2.setValue(_C(e4, n4.left, n4.right, a2.__min, a2.__max));
34213
+ a2.setValue(bC(e4, n4.left, n4.right, a2.__min, a2.__max));
34192
34214
  }
34193
34215
  function c2() {
34194
- cC.unbind(window, "touchmove", h2), cC.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34216
+ fC.unbind(window, "touchmove", h2), fC.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34195
34217
  }
34196
- return s3.__background = document.createElement("div"), s3.__foreground = document.createElement("div"), cC.bind(s3.__background, "mousedown", function(t5) {
34197
- document.activeElement.blur(), cC.bind(window, "mousemove", l2), cC.bind(window, "mouseup", u2), l2(t5);
34198
- }), cC.bind(s3.__background, "touchstart", function(t5) {
34218
+ return s3.__background = document.createElement("div"), s3.__foreground = document.createElement("div"), fC.bind(s3.__background, "mousedown", function(t5) {
34219
+ document.activeElement.blur(), fC.bind(window, "mousemove", l2), fC.bind(window, "mouseup", u2), l2(t5);
34220
+ }), fC.bind(s3.__background, "touchstart", function(t5) {
34199
34221
  if (t5.touches.length !== 1)
34200
34222
  return;
34201
- cC.bind(window, "touchmove", h2), cC.bind(window, "touchend", c2), h2(t5);
34202
- }), cC.addClass(s3.__background, "slider"), cC.addClass(s3.__foreground, "slider-fg"), s3.updateDisplay(), s3.__background.appendChild(s3.__foreground), s3.domElement.appendChild(s3.__background), s3;
34223
+ fC.bind(window, "touchmove", h2), fC.bind(window, "touchend", c2), h2(t5);
34224
+ }), fC.addClass(s3.__background, "slider"), fC.addClass(s3.__foreground, "slider-fg"), s3.updateDisplay(), s3.__background.appendChild(s3.__foreground), s3.domElement.appendChild(s3.__background), s3;
34203
34225
  }
34204
- return nC(e3, t3), tC(e3, [{ key: "updateDisplay", value: function() {
34226
+ return oC(e3, t3), iC(e3, [{ key: "updateDisplay", value: function() {
34205
34227
  var t4 = (this.getValue() - this.__min) / (this.__max - this.__min);
34206
- return this.__foreground.style.width = 100 * t4 + "%", eC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
34228
+ return this.__foreground.style.width = 100 * t4 + "%", rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
34207
34229
  } }]), e3;
34208
- }(gC), xC = function(t3) {
34230
+ }(yC), wC = function(t3) {
34209
34231
  function e3(t4, n3, i3) {
34210
- QP(this, e3);
34211
- var r3 = iC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = r3;
34212
- return r3.__button = document.createElement("div"), r3.__button.innerHTML = i3 === void 0 ? "Fire" : i3, cC.bind(r3.__button, "click", function(t5) {
34232
+ nC(this, e3);
34233
+ var r3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = r3;
34234
+ return r3.__button = document.createElement("div"), r3.__button.innerHTML = i3 === void 0 ? "Fire" : i3, fC.bind(r3.__button, "click", function(t5) {
34213
34235
  return t5.preventDefault(), o2.fire(), false;
34214
- }), cC.addClass(r3.__button, "button"), r3.domElement.appendChild(r3.__button), r3;
34236
+ }), fC.addClass(r3.__button, "button"), r3.domElement.appendChild(r3.__button), r3;
34215
34237
  }
34216
- return nC(e3, t3), tC(e3, [{ key: "fire", value: function() {
34238
+ return oC(e3, t3), iC(e3, [{ key: "fire", value: function() {
34217
34239
  this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
34218
34240
  } }]), e3;
34219
- }(aC), bC = function(t3) {
34241
+ }(hC), SC = function(t3) {
34220
34242
  function e3(t4, n3) {
34221
- QP(this, e3);
34222
- var i3 = iC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3));
34223
- i3.__color = new rC(i3.getValue()), i3.__temp = new rC(0);
34243
+ nC(this, e3);
34244
+ var i3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3));
34245
+ i3.__color = new aC(i3.getValue()), i3.__temp = new aC(0);
34224
34246
  var r3 = i3;
34225
- i3.domElement = document.createElement("div"), cC.makeSelectable(i3.domElement, false), i3.__selector = document.createElement("div"), i3.__selector.className = "selector", i3.__saturation_field = document.createElement("div"), i3.__saturation_field.className = "saturation-field", i3.__field_knob = document.createElement("div"), i3.__field_knob.className = "field-knob", i3.__field_knob_border = "2px solid ", i3.__hue_knob = document.createElement("div"), i3.__hue_knob.className = "hue-knob", i3.__hue_field = document.createElement("div"), i3.__hue_field.className = "hue-field", i3.__input = document.createElement("input"), i3.__input.type = "text", i3.__input_textShadow = "0 1px 1px ", cC.bind(i3.__input, "keydown", function(t5) {
34247
+ i3.domElement = document.createElement("div"), fC.makeSelectable(i3.domElement, false), i3.__selector = document.createElement("div"), i3.__selector.className = "selector", i3.__saturation_field = document.createElement("div"), i3.__saturation_field.className = "saturation-field", i3.__field_knob = document.createElement("div"), i3.__field_knob.className = "field-knob", i3.__field_knob_border = "2px solid ", i3.__hue_knob = document.createElement("div"), i3.__hue_knob.className = "hue-knob", i3.__hue_field = document.createElement("div"), i3.__hue_field.className = "hue-field", i3.__input = document.createElement("input"), i3.__input.type = "text", i3.__input_textShadow = "0 1px 1px ", fC.bind(i3.__input, "keydown", function(t5) {
34226
34248
  t5.keyCode === 13 && c2.call(this);
34227
- }), cC.bind(i3.__input, "blur", c2), cC.bind(i3.__selector, "mousedown", function() {
34228
- cC.addClass(this, "drag").bind(window, "mouseup", function() {
34229
- cC.removeClass(r3.__selector, "drag");
34249
+ }), fC.bind(i3.__input, "blur", c2), fC.bind(i3.__selector, "mousedown", function() {
34250
+ fC.addClass(this, "drag").bind(window, "mouseup", function() {
34251
+ fC.removeClass(r3.__selector, "drag");
34230
34252
  });
34231
- }), cC.bind(i3.__selector, "touchstart", function() {
34232
- cC.addClass(this, "drag").bind(window, "touchend", function() {
34233
- cC.removeClass(r3.__selector, "drag");
34253
+ }), fC.bind(i3.__selector, "touchstart", function() {
34254
+ fC.addClass(this, "drag").bind(window, "touchend", function() {
34255
+ fC.removeClass(r3.__selector, "drag");
34234
34256
  });
34235
34257
  });
34236
34258
  var o2, s3 = document.createElement("div");
34237
34259
  function a2(t5) {
34238
- p2(t5), cC.bind(window, "mousemove", p2), cC.bind(window, "touchmove", p2), cC.bind(window, "mouseup", u2), cC.bind(window, "touchend", u2);
34260
+ p2(t5), fC.bind(window, "mousemove", p2), fC.bind(window, "touchmove", p2), fC.bind(window, "mouseup", u2), fC.bind(window, "touchend", u2);
34239
34261
  }
34240
34262
  function l2(t5) {
34241
- f2(t5), cC.bind(window, "mousemove", f2), cC.bind(window, "touchmove", f2), cC.bind(window, "mouseup", h2), cC.bind(window, "touchend", h2);
34263
+ f2(t5), fC.bind(window, "mousemove", f2), fC.bind(window, "touchmove", f2), fC.bind(window, "mouseup", h2), fC.bind(window, "touchend", h2);
34242
34264
  }
34243
34265
  function u2() {
34244
- cC.unbind(window, "mousemove", p2), cC.unbind(window, "touchmove", p2), cC.unbind(window, "mouseup", u2), cC.unbind(window, "touchend", u2), d2();
34266
+ fC.unbind(window, "mousemove", p2), fC.unbind(window, "touchmove", p2), fC.unbind(window, "mouseup", u2), fC.unbind(window, "touchend", u2), d2();
34245
34267
  }
34246
34268
  function h2() {
34247
- cC.unbind(window, "mousemove", f2), cC.unbind(window, "touchmove", f2), cC.unbind(window, "mouseup", h2), cC.unbind(window, "touchend", h2), d2();
34269
+ fC.unbind(window, "mousemove", f2), fC.unbind(window, "touchmove", f2), fC.unbind(window, "mouseup", h2), fC.unbind(window, "touchend", h2), d2();
34248
34270
  }
34249
34271
  function c2() {
34250
- var t5 = ZP(this.value);
34272
+ var t5 = KP(this.value);
34251
34273
  t5 !== false ? (r3.__color.__state = t5, r3.setValue(r3.__color.toOriginal())) : this.value = r3.__color.toString();
34252
34274
  }
34253
34275
  function d2() {
@@ -34263,28 +34285,28 @@ void main(void){
34263
34285
  var e4 = r3.__hue_field.getBoundingClientRect(), n4 = 1 - ((t5.touches && t5.touches[0] || t5).clientY - e4.top) / (e4.bottom - e4.top);
34264
34286
  return n4 > 1 ? n4 = 1 : n4 < 0 && (n4 = 0), r3.__color.h = 360 * n4, r3.setValue(r3.__color.toOriginal()), false;
34265
34287
  }
34266
- return WP.extend(i3.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), WP.extend(i3.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i3.__field_knob_border + (i3.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), WP.extend(i3.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), WP.extend(i3.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), WP.extend(s3.style, { width: "100%", height: "100%", background: "none" }), wC(s3, "top", "rgba(0,0,0,0)", "#000"), WP.extend(i3.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = i3.__hue_field).style.background = "", o2.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o2.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", WP.extend(i3.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i3.__input_textShadow + "rgba(0,0,0,0.7)" }), cC.bind(i3.__saturation_field, "mousedown", a2), cC.bind(i3.__saturation_field, "touchstart", a2), cC.bind(i3.__field_knob, "mousedown", a2), cC.bind(i3.__field_knob, "touchstart", a2), cC.bind(i3.__hue_field, "mousedown", l2), cC.bind(i3.__hue_field, "touchstart", l2), i3.__saturation_field.appendChild(s3), i3.__selector.appendChild(i3.__field_knob), i3.__selector.appendChild(i3.__saturation_field), i3.__selector.appendChild(i3.__hue_field), i3.__hue_field.appendChild(i3.__hue_knob), i3.domElement.appendChild(i3.__input), i3.domElement.appendChild(i3.__selector), i3.updateDisplay(), i3;
34288
+ return YP.extend(i3.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), YP.extend(i3.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i3.__field_knob_border + (i3.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), YP.extend(i3.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), YP.extend(i3.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), YP.extend(s3.style, { width: "100%", height: "100%", background: "none" }), MC(s3, "top", "rgba(0,0,0,0)", "#000"), YP.extend(i3.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = i3.__hue_field).style.background = "", o2.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o2.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", YP.extend(i3.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i3.__input_textShadow + "rgba(0,0,0,0.7)" }), fC.bind(i3.__saturation_field, "mousedown", a2), fC.bind(i3.__saturation_field, "touchstart", a2), fC.bind(i3.__field_knob, "mousedown", a2), fC.bind(i3.__field_knob, "touchstart", a2), fC.bind(i3.__hue_field, "mousedown", l2), fC.bind(i3.__hue_field, "touchstart", l2), i3.__saturation_field.appendChild(s3), i3.__selector.appendChild(i3.__field_knob), i3.__selector.appendChild(i3.__saturation_field), i3.__selector.appendChild(i3.__hue_field), i3.__hue_field.appendChild(i3.__hue_knob), i3.domElement.appendChild(i3.__input), i3.domElement.appendChild(i3.__selector), i3.updateDisplay(), i3;
34267
34289
  }
34268
- return nC(e3, t3), tC(e3, [{ key: "updateDisplay", value: function() {
34269
- var t4 = ZP(this.getValue());
34290
+ return oC(e3, t3), iC(e3, [{ key: "updateDisplay", value: function() {
34291
+ var t4 = KP(this.getValue());
34270
34292
  if (t4 !== false) {
34271
34293
  var e4 = false;
34272
- WP.each(rC.COMPONENTS, function(n4) {
34273
- if (!WP.isUndefined(t4[n4]) && !WP.isUndefined(this.__color.__state[n4]) && t4[n4] !== this.__color.__state[n4])
34294
+ YP.each(aC.COMPONENTS, function(n4) {
34295
+ if (!YP.isUndefined(t4[n4]) && !YP.isUndefined(this.__color.__state[n4]) && t4[n4] !== this.__color.__state[n4])
34274
34296
  return e4 = true, {};
34275
- }, this), e4 && WP.extend(this.__color.__state, t4);
34297
+ }, this), e4 && YP.extend(this.__color.__state, t4);
34276
34298
  }
34277
- WP.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
34299
+ YP.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
34278
34300
  var n3 = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, i3 = 255 - n3;
34279
- WP.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n3 + "," + n3 + "," + n3 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, wC(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), WP.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n3 + "," + n3 + "," + n3 + ")", textShadow: this.__input_textShadow + "rgba(" + i3 + "," + i3 + "," + i3 + ",.7)" });
34301
+ YP.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n3 + "," + n3 + "," + n3 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, MC(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), YP.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n3 + "," + n3 + "," + n3 + ")", textShadow: this.__input_textShadow + "rgba(" + i3 + "," + i3 + "," + i3 + ",.7)" });
34280
34302
  } }]), e3;
34281
- }(aC), TC = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
34282
- function wC(t3, e3, n3, i3) {
34283
- t3.style.background = "", WP.each(TC, function(r3) {
34303
+ }(hC), EC = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
34304
+ function MC(t3, e3, n3, i3) {
34305
+ t3.style.background = "", YP.each(EC, function(r3) {
34284
34306
  t3.style.cssText += "background: " + r3 + "linear-gradient(" + e3 + ", " + n3 + " 0%, " + i3 + " 100%); ";
34285
34307
  });
34286
34308
  }
34287
- var SC = function(t3, e3) {
34309
+ var AC = function(t3, e3) {
34288
34310
  var n3 = e3 || document, i3 = document.createElement("style");
34289
34311
  i3.type = "text/css", i3.innerHTML = t3;
34290
34312
  var r3 = n3.getElementsByTagName("head")[0];
@@ -34292,7 +34314,7 @@ void main(void){
34292
34314
  r3.appendChild(i3);
34293
34315
  } catch (t4) {
34294
34316
  }
34295
- }, EC = `<div id="dg-save" class="dg dialogue">
34317
+ }, RC = `<div id="dg-save" class="dg dialogue">
34296
34318
 
34297
34319
  Here's the new load parameter for your <code>GUI</code>'s constructor:
34298
34320
 
@@ -34312,50 +34334,50 @@ void main(void){
34312
34334
 
34313
34335
  </div>
34314
34336
 
34315
- </div>`, MC = function(t3, e3) {
34337
+ </div>`, PC = function(t3, e3) {
34316
34338
  var n3 = t3[e3];
34317
- return WP.isArray(arguments[2]) || WP.isObject(arguments[2]) ? new pC(t3, e3, arguments[2]) : WP.isNumber(n3) ? WP.isNumber(arguments[2]) && WP.isNumber(arguments[3]) ? WP.isNumber(arguments[4]) ? new yC(t3, e3, arguments[2], arguments[3], arguments[4]) : new yC(t3, e3, arguments[2], arguments[3]) : WP.isNumber(arguments[4]) ? new vC(t3, e3, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new vC(t3, e3, { min: arguments[2], max: arguments[3] }) : WP.isString(n3) ? new fC(t3, e3) : WP.isFunction(n3) ? new xC(t3, e3, "") : WP.isBoolean(n3) ? new dC(t3, e3) : null;
34339
+ return YP.isArray(arguments[2]) || YP.isObject(arguments[2]) ? new gC(t3, e3, arguments[2]) : YP.isNumber(n3) ? YP.isNumber(arguments[2]) && YP.isNumber(arguments[3]) ? YP.isNumber(arguments[4]) ? new TC(t3, e3, arguments[2], arguments[3], arguments[4]) : new TC(t3, e3, arguments[2], arguments[3]) : YP.isNumber(arguments[4]) ? new xC(t3, e3, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new xC(t3, e3, { min: arguments[2], max: arguments[3] }) : YP.isString(n3) ? new vC(t3, e3) : YP.isFunction(n3) ? new wC(t3, e3, "") : YP.isBoolean(n3) ? new mC(t3, e3) : null;
34318
34340
  };
34319
- var AC = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t3) {
34341
+ var CC = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t3) {
34320
34342
  setTimeout(t3, 1e3 / 60);
34321
- }, RC = function() {
34343
+ }, IC = function() {
34322
34344
  function t3() {
34323
- QP(this, t3), this.backgroundElement = document.createElement("div"), WP.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", transition: "opacity 0.2s linear" }), cC.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), WP.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear", transition: "transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
34345
+ nC(this, t3), this.backgroundElement = document.createElement("div"), YP.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", transition: "opacity 0.2s linear" }), fC.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), YP.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear", transition: "transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
34324
34346
  var e3 = this;
34325
- cC.bind(this.backgroundElement, "click", function() {
34347
+ fC.bind(this.backgroundElement, "click", function() {
34326
34348
  e3.hide();
34327
34349
  });
34328
34350
  }
34329
- return tC(t3, [{ key: "show", value: function() {
34351
+ return iC(t3, [{ key: "show", value: function() {
34330
34352
  var t4 = this;
34331
- this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), WP.defer(function() {
34353
+ this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), YP.defer(function() {
34332
34354
  t4.backgroundElement.style.opacity = 1, t4.domElement.style.opacity = 1, t4.domElement.style.webkitTransform = "scale(1)";
34333
34355
  });
34334
34356
  } }, { key: "hide", value: function() {
34335
34357
  var t4 = this, e3 = function e4() {
34336
- t4.domElement.style.display = "none", t4.backgroundElement.style.display = "none", cC.unbind(t4.domElement, "webkitTransitionEnd", e4), cC.unbind(t4.domElement, "transitionend", e4), cC.unbind(t4.domElement, "oTransitionEnd", e4);
34358
+ t4.domElement.style.display = "none", t4.backgroundElement.style.display = "none", fC.unbind(t4.domElement, "webkitTransitionEnd", e4), fC.unbind(t4.domElement, "transitionend", e4), fC.unbind(t4.domElement, "oTransitionEnd", e4);
34337
34359
  };
34338
- cC.bind(this.domElement, "webkitTransitionEnd", e3), cC.bind(this.domElement, "transitionend", e3), cC.bind(this.domElement, "oTransitionEnd", e3), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
34360
+ fC.bind(this.domElement, "webkitTransitionEnd", e3), fC.bind(this.domElement, "transitionend", e3), fC.bind(this.domElement, "oTransitionEnd", e3), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
34339
34361
  } }, { key: "layout", value: function() {
34340
- this.domElement.style.left = window.innerWidth / 2 - cC.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - cC.getHeight(this.domElement) / 2 + "px";
34362
+ this.domElement.style.left = window.innerWidth / 2 - fC.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - fC.getHeight(this.domElement) / 2 + "px";
34341
34363
  } }]), t3;
34342
34364
  }();
34343
- SC(function(t3) {
34365
+ AC(function(t3) {
34344
34366
  if (t3 && typeof window != "undefined") {
34345
34367
  var e3 = document.createElement("style");
34346
34368
  return e3.setAttribute("type", "text/css"), e3.innerHTML = t3, document.head.appendChild(e3), t3;
34347
34369
  }
34348
34370
  }(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));
34349
- var PC = function() {
34371
+ var OC = function() {
34350
34372
  try {
34351
34373
  return !!window.localStorage;
34352
34374
  } catch (t3) {
34353
34375
  return false;
34354
34376
  }
34355
- }(), CC = void 0, IC = true, OC = void 0, LC = false, NC = [], DC = function t3(e3) {
34377
+ }(), LC = void 0, NC = true, DC = void 0, FC = false, BC = [], UC = function t3(e3) {
34356
34378
  var n3 = this, i3 = e3 || {};
34357
- this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), cC.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], i3 = WP.defaults(i3, { closeOnTop: false, autoPlace: true, width: t3.DEFAULT_WIDTH }), i3 = WP.defaults(i3, { resizable: i3.autoPlace, hideable: i3.autoPlace }), WP.isUndefined(i3.load) ? i3.load = { preset: "Default" } : i3.preset && (i3.load.preset = i3.preset), WP.isUndefined(i3.parent) && i3.hideable && NC.push(this), i3.resizable = WP.isUndefined(i3.parent) && i3.resizable, i3.autoPlace && WP.isUndefined(i3.scrollable) && (i3.scrollable = true);
34358
- var r3, o2 = PC && localStorage.getItem(HC(this, "isLocal")) === "true", s3 = void 0, a2 = void 0;
34379
+ this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), fC.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], i3 = YP.defaults(i3, { closeOnTop: false, autoPlace: true, width: t3.DEFAULT_WIDTH }), i3 = YP.defaults(i3, { resizable: i3.autoPlace, hideable: i3.autoPlace }), YP.isUndefined(i3.load) ? i3.load = { preset: "Default" } : i3.preset && (i3.load.preset = i3.preset), YP.isUndefined(i3.parent) && i3.hideable && BC.push(this), i3.resizable = YP.isUndefined(i3.parent) && i3.resizable, i3.autoPlace && YP.isUndefined(i3.scrollable) && (i3.scrollable = true);
34380
+ var r3, o2 = OC && localStorage.getItem(VC(this, "isLocal")) === "true", s3 = void 0, a2 = void 0;
34359
34381
  if (Object.defineProperties(this, { parent: { get: function() {
34360
34382
  return i3.parent;
34361
34383
  } }, scrollable: { get: function() {
@@ -34374,7 +34396,7 @@ void main(void){
34374
34396
  } }, width: { get: function() {
34375
34397
  return i3.width;
34376
34398
  }, set: function(t4) {
34377
- i3.width = t4, XC(n3, t4);
34399
+ i3.width = t4, ZC(n3, t4);
34378
34400
  } }, name: { get: function() {
34379
34401
  return i3.name;
34380
34402
  }, set: function(t4) {
@@ -34382,50 +34404,50 @@ void main(void){
34382
34404
  } }, closed: { get: function() {
34383
34405
  return i3.closed;
34384
34406
  }, set: function(e4) {
34385
- i3.closed = e4, i3.closed ? cC.addClass(n3.__ul, t3.CLASS_CLOSED) : cC.removeClass(n3.__ul, t3.CLASS_CLOSED), this.onResize(), n3.__closeButton && (n3.__closeButton.innerHTML = e4 ? t3.TEXT_OPEN : t3.TEXT_CLOSED);
34407
+ i3.closed = e4, i3.closed ? fC.addClass(n3.__ul, t3.CLASS_CLOSED) : fC.removeClass(n3.__ul, t3.CLASS_CLOSED), this.onResize(), n3.__closeButton && (n3.__closeButton.innerHTML = e4 ? t3.TEXT_OPEN : t3.TEXT_CLOSED);
34386
34408
  } }, load: { get: function() {
34387
34409
  return i3.load;
34388
34410
  } }, useLocalStorage: { get: function() {
34389
34411
  return o2;
34390
34412
  }, set: function(t4) {
34391
- PC && (o2 = t4, t4 ? cC.bind(window, "unload", s3) : cC.unbind(window, "unload", s3), localStorage.setItem(HC(n3, "isLocal"), t4));
34392
- } } }), WP.isUndefined(i3.parent)) {
34393
- if (this.closed = i3.closed || false, cC.addClass(this.domElement, t3.CLASS_MAIN), cC.makeSelectable(this.domElement, false), PC && o2) {
34413
+ OC && (o2 = t4, t4 ? fC.bind(window, "unload", s3) : fC.unbind(window, "unload", s3), localStorage.setItem(VC(n3, "isLocal"), t4));
34414
+ } } }), YP.isUndefined(i3.parent)) {
34415
+ if (this.closed = i3.closed || false, fC.addClass(this.domElement, t3.CLASS_MAIN), fC.makeSelectable(this.domElement, false), OC && o2) {
34394
34416
  n3.useLocalStorage = true;
34395
- var l2 = localStorage.getItem(HC(this, "gui"));
34417
+ var l2 = localStorage.getItem(VC(this, "gui"));
34396
34418
  l2 && (i3.load = JSON.parse(l2));
34397
34419
  }
34398
- this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t3.TEXT_CLOSED, cC.addClass(this.__closeButton, t3.CLASS_CLOSE_BUTTON), i3.closeOnTop ? (cC.addClass(this.__closeButton, t3.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (cC.addClass(this.__closeButton, t3.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), cC.bind(this.__closeButton, "click", function() {
34420
+ this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t3.TEXT_CLOSED, fC.addClass(this.__closeButton, t3.CLASS_CLOSE_BUTTON), i3.closeOnTop ? (fC.addClass(this.__closeButton, t3.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (fC.addClass(this.__closeButton, t3.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), fC.bind(this.__closeButton, "click", function() {
34399
34421
  n3.closed = !n3.closed;
34400
34422
  });
34401
34423
  } else {
34402
34424
  i3.closed === void 0 && (i3.closed = true);
34403
34425
  var u2 = document.createTextNode(i3.name);
34404
- cC.addClass(u2, "controller-name"), a2 = FC(n3, u2);
34405
- cC.addClass(this.__ul, t3.CLASS_CLOSED), cC.addClass(a2, "title"), cC.bind(a2, "click", function(t4) {
34426
+ fC.addClass(u2, "controller-name"), a2 = kC(n3, u2);
34427
+ fC.addClass(this.__ul, t3.CLASS_CLOSED), fC.addClass(a2, "title"), fC.bind(a2, "click", function(t4) {
34406
34428
  return t4.preventDefault(), n3.closed = !n3.closed, false;
34407
34429
  }), i3.closed || (this.closed = false);
34408
34430
  }
34409
- i3.autoPlace && (WP.isUndefined(i3.parent) && (IC && (OC = document.createElement("div"), cC.addClass(OC, "dg"), cC.addClass(OC, t3.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(OC), IC = false), OC.appendChild(this.domElement), cC.addClass(this.domElement, t3.CLASS_AUTO_PLACE)), this.parent || XC(n3, i3.width)), this.__resizeHandler = function() {
34431
+ i3.autoPlace && (YP.isUndefined(i3.parent) && (NC && (DC = document.createElement("div"), fC.addClass(DC, "dg"), fC.addClass(DC, t3.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(DC), NC = false), DC.appendChild(this.domElement), fC.addClass(this.domElement, t3.CLASS_AUTO_PLACE)), this.parent || ZC(n3, i3.width)), this.__resizeHandler = function() {
34410
34432
  n3.onResizeDebounced();
34411
- }, cC.bind(window, "resize", this.__resizeHandler), cC.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), cC.bind(this.__ul, "transitionend", this.__resizeHandler), cC.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), i3.resizable && WC(this), s3 = function() {
34412
- PC && localStorage.getItem(HC(n3, "isLocal")) === "true" && localStorage.setItem(HC(n3, "gui"), JSON.stringify(n3.getSaveObject()));
34413
- }, this.saveToLocalStorageIfPossible = s3, i3.parent || ((r3 = n3.getRoot()).width += 1, WP.defer(function() {
34433
+ }, fC.bind(window, "resize", this.__resizeHandler), fC.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), fC.bind(this.__ul, "transitionend", this.__resizeHandler), fC.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), i3.resizable && YC(this), s3 = function() {
34434
+ OC && localStorage.getItem(VC(n3, "isLocal")) === "true" && localStorage.setItem(VC(n3, "gui"), JSON.stringify(n3.getSaveObject()));
34435
+ }, this.saveToLocalStorageIfPossible = s3, i3.parent || ((r3 = n3.getRoot()).width += 1, YP.defer(function() {
34414
34436
  r3.width -= 1;
34415
34437
  }));
34416
34438
  };
34417
- function FC(t3, e3, n3) {
34439
+ function kC(t3, e3, n3) {
34418
34440
  var i3 = document.createElement("li");
34419
34441
  return e3 && i3.appendChild(e3), n3 ? t3.__ul.insertBefore(i3, n3) : t3.__ul.appendChild(i3), t3.onResize(), i3;
34420
34442
  }
34421
- function BC(t3) {
34422
- cC.unbind(window, "resize", t3.__resizeHandler), t3.saveToLocalStorageIfPossible && cC.unbind(window, "unload", t3.saveToLocalStorageIfPossible);
34443
+ function GC(t3) {
34444
+ fC.unbind(window, "resize", t3.__resizeHandler), t3.saveToLocalStorageIfPossible && fC.unbind(window, "unload", t3.saveToLocalStorageIfPossible);
34423
34445
  }
34424
- function UC(t3, e3) {
34446
+ function HC(t3, e3) {
34425
34447
  var n3 = t3.__preset_select[t3.__preset_select.selectedIndex];
34426
34448
  n3.innerHTML = e3 ? n3.value + "*" : n3.value;
34427
34449
  }
34428
- function kC(t3, e3) {
34450
+ function zC(t3, e3) {
34429
34451
  var n3 = t3.getRoot(), i3 = n3.__rememberedObjects.indexOf(e3.object);
34430
34452
  if (i3 !== -1) {
34431
34453
  var r3 = n3.__rememberedObjectIndecesToControllers[i3];
@@ -34445,31 +34467,31 @@ void main(void){
34445
34467
  }
34446
34468
  }
34447
34469
  }
34448
- function GC(t3, e3, n3, i3) {
34470
+ function jC(t3, e3, n3, i3) {
34449
34471
  if (e3[n3] === void 0)
34450
34472
  throw new Error('Object "' + e3 + '" has no property "' + n3 + '"');
34451
34473
  var r3 = void 0;
34452
34474
  if (i3.color)
34453
- r3 = new bC(e3, n3);
34475
+ r3 = new SC(e3, n3);
34454
34476
  else {
34455
34477
  var o2 = [e3, n3].concat(i3.factoryArgs);
34456
- r3 = MC.apply(t3, o2);
34478
+ r3 = PC.apply(t3, o2);
34457
34479
  }
34458
- i3.before instanceof aC && (i3.before = i3.before.__li), kC(t3, r3), cC.addClass(r3.domElement, "c");
34480
+ i3.before instanceof hC && (i3.before = i3.before.__li), zC(t3, r3), fC.addClass(r3.domElement, "c");
34459
34481
  var s3 = document.createElement("span");
34460
- cC.addClass(s3, "property-name"), s3.innerHTML = r3.property;
34482
+ fC.addClass(s3, "property-name"), s3.innerHTML = r3.property;
34461
34483
  var a2 = document.createElement("div");
34462
34484
  a2.appendChild(s3), a2.appendChild(r3.domElement);
34463
- var l2 = FC(t3, a2, i3.before);
34464
- return cC.addClass(l2, DC.CLASS_CONTROLLER_ROW), r3 instanceof bC ? cC.addClass(l2, "color") : cC.addClass(l2, KP(r3.getValue())), function(t4, e4, n4) {
34465
- if (n4.__li = e4, n4.__gui = t4, WP.extend(n4, { options: function(e5) {
34485
+ var l2 = kC(t3, a2, i3.before);
34486
+ return fC.addClass(l2, UC.CLASS_CONTROLLER_ROW), r3 instanceof SC ? fC.addClass(l2, "color") : fC.addClass(l2, eC(r3.getValue())), function(t4, e4, n4) {
34487
+ if (n4.__li = e4, n4.__gui = t4, YP.extend(n4, { options: function(e5) {
34466
34488
  if (arguments.length > 1) {
34467
34489
  var i5 = n4.__li.nextElementSibling;
34468
- return n4.remove(), GC(t4, n4.object, n4.property, { before: i5, factoryArgs: [WP.toArray(arguments)] });
34490
+ return n4.remove(), jC(t4, n4.object, n4.property, { before: i5, factoryArgs: [YP.toArray(arguments)] });
34469
34491
  }
34470
- if (WP.isArray(e5) || WP.isObject(e5)) {
34492
+ if (YP.isArray(e5) || YP.isObject(e5)) {
34471
34493
  var r5 = n4.__li.nextElementSibling;
34472
- return n4.remove(), GC(t4, n4.object, n4.property, { before: r5, factoryArgs: [e5] });
34494
+ return n4.remove(), jC(t4, n4.object, n4.property, { before: r5, factoryArgs: [e5] });
34473
34495
  }
34474
34496
  }, name: function(t5) {
34475
34497
  return n4.__li.firstElementChild.firstElementChild.innerHTML = t5, n4;
@@ -34477,157 +34499,157 @@ void main(void){
34477
34499
  return n4.__gui.listen(n4), n4;
34478
34500
  }, remove: function() {
34479
34501
  return n4.__gui.remove(n4), n4;
34480
- } }), n4 instanceof yC) {
34481
- var i4 = new vC(n4.object, n4.property, { min: n4.__min, max: n4.__max, step: n4.__step });
34482
- WP.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t5) {
34502
+ } }), n4 instanceof TC) {
34503
+ var i4 = new xC(n4.object, n4.property, { min: n4.__min, max: n4.__max, step: n4.__step });
34504
+ YP.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t5) {
34483
34505
  var e5 = n4[t5], r5 = i4[t5];
34484
34506
  n4[t5] = i4[t5] = function() {
34485
34507
  var t6 = Array.prototype.slice.call(arguments);
34486
34508
  return r5.apply(i4, t6), e5.apply(n4, t6);
34487
34509
  };
34488
- }), cC.addClass(e4, "has-slider"), n4.domElement.insertBefore(i4.domElement, n4.domElement.firstElementChild);
34489
- } else if (n4 instanceof vC) {
34510
+ }), fC.addClass(e4, "has-slider"), n4.domElement.insertBefore(i4.domElement, n4.domElement.firstElementChild);
34511
+ } else if (n4 instanceof xC) {
34490
34512
  var r4 = function(e5) {
34491
- if (WP.isNumber(n4.__min) && WP.isNumber(n4.__max)) {
34513
+ if (YP.isNumber(n4.__min) && YP.isNumber(n4.__max)) {
34492
34514
  var i5 = n4.__li.firstElementChild.firstElementChild.innerHTML, r5 = n4.__gui.__listening.indexOf(n4) > -1;
34493
34515
  n4.remove();
34494
- var o3 = GC(t4, n4.object, n4.property, { before: n4.__li.nextElementSibling, factoryArgs: [n4.__min, n4.__max, n4.__step] });
34516
+ var o3 = jC(t4, n4.object, n4.property, { before: n4.__li.nextElementSibling, factoryArgs: [n4.__min, n4.__max, n4.__step] });
34495
34517
  return o3.name(i5), r5 && o3.listen(), o3;
34496
34518
  }
34497
34519
  return e5;
34498
34520
  };
34499
- n4.min = WP.compose(r4, n4.min), n4.max = WP.compose(r4, n4.max);
34521
+ n4.min = YP.compose(r4, n4.min), n4.max = YP.compose(r4, n4.max);
34500
34522
  } else
34501
- n4 instanceof dC ? (cC.bind(e4, "click", function() {
34502
- cC.fakeEvent(n4.__checkbox, "click");
34503
- }), cC.bind(n4.__checkbox, "click", function(t5) {
34523
+ n4 instanceof mC ? (fC.bind(e4, "click", function() {
34524
+ fC.fakeEvent(n4.__checkbox, "click");
34525
+ }), fC.bind(n4.__checkbox, "click", function(t5) {
34504
34526
  t5.stopPropagation();
34505
- })) : n4 instanceof xC ? (cC.bind(e4, "click", function() {
34506
- cC.fakeEvent(n4.__button, "click");
34507
- }), cC.bind(e4, "mouseover", function() {
34508
- cC.addClass(n4.__button, "hover");
34509
- }), cC.bind(e4, "mouseout", function() {
34510
- cC.removeClass(n4.__button, "hover");
34511
- })) : n4 instanceof bC && (cC.addClass(e4, "color"), n4.updateDisplay = WP.compose(function(t5) {
34527
+ })) : n4 instanceof wC ? (fC.bind(e4, "click", function() {
34528
+ fC.fakeEvent(n4.__button, "click");
34529
+ }), fC.bind(e4, "mouseover", function() {
34530
+ fC.addClass(n4.__button, "hover");
34531
+ }), fC.bind(e4, "mouseout", function() {
34532
+ fC.removeClass(n4.__button, "hover");
34533
+ })) : n4 instanceof SC && (fC.addClass(e4, "color"), n4.updateDisplay = YP.compose(function(t5) {
34512
34534
  return e4.style.borderLeftColor = n4.__color.toString(), t5;
34513
34535
  }, n4.updateDisplay), n4.updateDisplay());
34514
- n4.setValue = WP.compose(function(e5) {
34515
- return t4.getRoot().__preset_select && n4.isModified() && UC(t4.getRoot(), true), e5;
34536
+ n4.setValue = YP.compose(function(e5) {
34537
+ return t4.getRoot().__preset_select && n4.isModified() && HC(t4.getRoot(), true), e5;
34516
34538
  }, n4.setValue);
34517
34539
  }(t3, l2, r3), t3.__controllers.push(r3), r3;
34518
34540
  }
34519
- function HC(t3, e3) {
34541
+ function VC(t3, e3) {
34520
34542
  return document.location.href + "." + e3;
34521
34543
  }
34522
- function zC(t3, e3, n3) {
34544
+ function WC(t3, e3, n3) {
34523
34545
  var i3 = document.createElement("option");
34524
34546
  i3.innerHTML = e3, i3.value = e3, t3.__preset_select.appendChild(i3), n3 && (t3.__preset_select.selectedIndex = t3.__preset_select.length - 1);
34525
34547
  }
34526
- function jC(t3, e3) {
34548
+ function XC(t3, e3) {
34527
34549
  e3.style.display = t3.useLocalStorage ? "block" : "none";
34528
34550
  }
34529
- function VC(t3) {
34551
+ function qC(t3) {
34530
34552
  var e3 = t3.__save_row = document.createElement("li");
34531
- cC.addClass(t3.domElement, "has-save"), t3.__ul.insertBefore(e3, t3.__ul.firstChild), cC.addClass(e3, "save-row");
34553
+ fC.addClass(t3.domElement, "has-save"), t3.__ul.insertBefore(e3, t3.__ul.firstChild), fC.addClass(e3, "save-row");
34532
34554
  var n3 = document.createElement("span");
34533
- n3.innerHTML = "&nbsp;", cC.addClass(n3, "button gears");
34555
+ n3.innerHTML = "&nbsp;", fC.addClass(n3, "button gears");
34534
34556
  var i3 = document.createElement("span");
34535
- i3.innerHTML = "Save", cC.addClass(i3, "button"), cC.addClass(i3, "save");
34557
+ i3.innerHTML = "Save", fC.addClass(i3, "button"), fC.addClass(i3, "save");
34536
34558
  var r3 = document.createElement("span");
34537
- r3.innerHTML = "New", cC.addClass(r3, "button"), cC.addClass(r3, "save-as");
34559
+ r3.innerHTML = "New", fC.addClass(r3, "button"), fC.addClass(r3, "save-as");
34538
34560
  var o2 = document.createElement("span");
34539
- o2.innerHTML = "Revert", cC.addClass(o2, "button"), cC.addClass(o2, "revert");
34561
+ o2.innerHTML = "Revert", fC.addClass(o2, "button"), fC.addClass(o2, "revert");
34540
34562
  var s3 = t3.__preset_select = document.createElement("select");
34541
- if (t3.load && t3.load.remembered ? WP.each(t3.load.remembered, function(e4, n4) {
34542
- zC(t3, n4, n4 === t3.preset);
34543
- }) : zC(t3, "Default", false), cC.bind(s3, "change", function() {
34563
+ if (t3.load && t3.load.remembered ? YP.each(t3.load.remembered, function(e4, n4) {
34564
+ WC(t3, n4, n4 === t3.preset);
34565
+ }) : WC(t3, "Default", false), fC.bind(s3, "change", function() {
34544
34566
  for (var e4 = 0; e4 < t3.__preset_select.length; e4++)
34545
34567
  t3.__preset_select[e4].innerHTML = t3.__preset_select[e4].value;
34546
34568
  t3.preset = this.value;
34547
- }), e3.appendChild(s3), e3.appendChild(n3), e3.appendChild(i3), e3.appendChild(r3), e3.appendChild(o2), PC) {
34569
+ }), e3.appendChild(s3), e3.appendChild(n3), e3.appendChild(i3), e3.appendChild(r3), e3.appendChild(o2), OC) {
34548
34570
  var a2 = document.getElementById("dg-local-explain"), l2 = document.getElementById("dg-local-storage");
34549
- document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(HC(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), jC(t3, a2), cC.bind(l2, "change", function() {
34550
- t3.useLocalStorage = !t3.useLocalStorage, jC(t3, a2);
34571
+ document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(VC(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), XC(t3, a2), fC.bind(l2, "change", function() {
34572
+ t3.useLocalStorage = !t3.useLocalStorage, XC(t3, a2);
34551
34573
  });
34552
34574
  }
34553
34575
  var u2 = document.getElementById("dg-new-constructor");
34554
- cC.bind(u2, "keydown", function(t4) {
34555
- !t4.metaKey || t4.which !== 67 && t4.keyCode !== 67 || CC.hide();
34556
- }), cC.bind(n3, "click", function() {
34557
- u2.innerHTML = JSON.stringify(t3.getSaveObject(), void 0, 2), CC.show(), u2.focus(), u2.select();
34558
- }), cC.bind(i3, "click", function() {
34576
+ fC.bind(u2, "keydown", function(t4) {
34577
+ !t4.metaKey || t4.which !== 67 && t4.keyCode !== 67 || LC.hide();
34578
+ }), fC.bind(n3, "click", function() {
34579
+ u2.innerHTML = JSON.stringify(t3.getSaveObject(), void 0, 2), LC.show(), u2.focus(), u2.select();
34580
+ }), fC.bind(i3, "click", function() {
34559
34581
  t3.save();
34560
- }), cC.bind(r3, "click", function() {
34582
+ }), fC.bind(r3, "click", function() {
34561
34583
  var e4 = prompt("Enter a new preset name.");
34562
34584
  e4 && t3.saveAs(e4);
34563
- }), cC.bind(o2, "click", function() {
34585
+ }), fC.bind(o2, "click", function() {
34564
34586
  t3.revert();
34565
34587
  });
34566
34588
  }
34567
- function WC(t3) {
34589
+ function YC(t3) {
34568
34590
  var e3 = void 0;
34569
34591
  function n3(n4) {
34570
34592
  return n4.preventDefault(), t3.width += e3 - n4.clientX, t3.onResize(), e3 = n4.clientX, false;
34571
34593
  }
34572
34594
  function i3() {
34573
- cC.removeClass(t3.__closeButton, DC.CLASS_DRAG), cC.unbind(window, "mousemove", n3), cC.unbind(window, "mouseup", i3);
34595
+ fC.removeClass(t3.__closeButton, UC.CLASS_DRAG), fC.unbind(window, "mousemove", n3), fC.unbind(window, "mouseup", i3);
34574
34596
  }
34575
34597
  function r3(r4) {
34576
- return r4.preventDefault(), e3 = r4.clientX, cC.addClass(t3.__closeButton, DC.CLASS_DRAG), cC.bind(window, "mousemove", n3), cC.bind(window, "mouseup", i3), false;
34598
+ return r4.preventDefault(), e3 = r4.clientX, fC.addClass(t3.__closeButton, UC.CLASS_DRAG), fC.bind(window, "mousemove", n3), fC.bind(window, "mouseup", i3), false;
34577
34599
  }
34578
- t3.__resize_handle = document.createElement("div"), WP.extend(t3.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), cC.bind(t3.__resize_handle, "mousedown", r3), cC.bind(t3.__closeButton, "mousedown", r3), t3.domElement.insertBefore(t3.__resize_handle, t3.domElement.firstElementChild);
34600
+ t3.__resize_handle = document.createElement("div"), YP.extend(t3.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), fC.bind(t3.__resize_handle, "mousedown", r3), fC.bind(t3.__closeButton, "mousedown", r3), t3.domElement.insertBefore(t3.__resize_handle, t3.domElement.firstElementChild);
34579
34601
  }
34580
- function XC(t3, e3) {
34602
+ function ZC(t3, e3) {
34581
34603
  t3.domElement.style.width = e3 + "px", t3.__save_row && t3.autoPlace && (t3.__save_row.style.width = e3 + "px"), t3.__closeButton && (t3.__closeButton.style.width = e3 + "px");
34582
34604
  }
34583
- function qC(t3, e3) {
34605
+ function JC(t3, e3) {
34584
34606
  var n3 = {};
34585
- return WP.each(t3.__rememberedObjects, function(i3, r3) {
34607
+ return YP.each(t3.__rememberedObjects, function(i3, r3) {
34586
34608
  var o2 = {}, s3 = t3.__rememberedObjectIndecesToControllers[r3];
34587
- WP.each(s3, function(t4, n4) {
34609
+ YP.each(s3, function(t4, n4) {
34588
34610
  o2[n4] = e3 ? t4.initialValue : t4.getValue();
34589
34611
  }), n3[r3] = o2;
34590
34612
  }), n3;
34591
34613
  }
34592
- DC.toggleHide = function() {
34593
- LC = !LC, WP.each(NC, function(t3) {
34594
- t3.domElement.style.display = LC ? "none" : "";
34614
+ UC.toggleHide = function() {
34615
+ FC = !FC, YP.each(BC, function(t3) {
34616
+ t3.domElement.style.display = FC ? "none" : "";
34595
34617
  });
34596
- }, DC.CLASS_AUTO_PLACE = "a", DC.CLASS_AUTO_PLACE_CONTAINER = "ac", DC.CLASS_MAIN = "main", DC.CLASS_CONTROLLER_ROW = "cr", DC.CLASS_TOO_TALL = "taller-than-window", DC.CLASS_CLOSED = "closed", DC.CLASS_CLOSE_BUTTON = "close-button", DC.CLASS_CLOSE_TOP = "close-top", DC.CLASS_CLOSE_BOTTOM = "close-bottom", DC.CLASS_DRAG = "drag", DC.DEFAULT_WIDTH = 245, DC.TEXT_CLOSED = "Close Controls", DC.TEXT_OPEN = "Open Controls", DC._keydownHandler = function(t3) {
34597
- document.activeElement.type === "text" || t3.which !== 72 && t3.keyCode !== 72 || DC.toggleHide();
34598
- }, cC.bind(window, "keydown", DC._keydownHandler, false), WP.extend(DC.prototype, { add: function(t3, e3) {
34599
- return GC(this, t3, e3, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
34618
+ }, UC.CLASS_AUTO_PLACE = "a", UC.CLASS_AUTO_PLACE_CONTAINER = "ac", UC.CLASS_MAIN = "main", UC.CLASS_CONTROLLER_ROW = "cr", UC.CLASS_TOO_TALL = "taller-than-window", UC.CLASS_CLOSED = "closed", UC.CLASS_CLOSE_BUTTON = "close-button", UC.CLASS_CLOSE_TOP = "close-top", UC.CLASS_CLOSE_BOTTOM = "close-bottom", UC.CLASS_DRAG = "drag", UC.DEFAULT_WIDTH = 245, UC.TEXT_CLOSED = "Close Controls", UC.TEXT_OPEN = "Open Controls", UC._keydownHandler = function(t3) {
34619
+ document.activeElement.type === "text" || t3.which !== 72 && t3.keyCode !== 72 || UC.toggleHide();
34620
+ }, fC.bind(window, "keydown", UC._keydownHandler, false), YP.extend(UC.prototype, { add: function(t3, e3) {
34621
+ return jC(this, t3, e3, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
34600
34622
  }, addColor: function(t3, e3) {
34601
- return GC(this, t3, e3, { color: true });
34623
+ return jC(this, t3, e3, { color: true });
34602
34624
  }, remove: function(t3) {
34603
34625
  this.__ul.removeChild(t3.__li), this.__controllers.splice(this.__controllers.indexOf(t3), 1);
34604
34626
  var e3 = this;
34605
- WP.defer(function() {
34627
+ YP.defer(function() {
34606
34628
  e3.onResize();
34607
34629
  });
34608
34630
  }, destroy: function() {
34609
34631
  if (this.parent)
34610
34632
  throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
34611
- this.autoPlace && OC.removeChild(this.domElement);
34633
+ this.autoPlace && DC.removeChild(this.domElement);
34612
34634
  var t3 = this;
34613
- WP.each(this.__folders, function(e3) {
34635
+ YP.each(this.__folders, function(e3) {
34614
34636
  t3.removeFolder(e3);
34615
- }), cC.unbind(window, "keydown", DC._keydownHandler, false), BC(this);
34637
+ }), fC.unbind(window, "keydown", UC._keydownHandler, false), GC(this);
34616
34638
  }, addFolder: function(t3) {
34617
34639
  if (this.__folders[t3] !== void 0)
34618
34640
  throw new Error('You already have a folder in this GUI by the name "' + t3 + '"');
34619
34641
  var e3 = { name: t3, parent: this };
34620
34642
  e3.autoPlace = this.autoPlace, this.load && this.load.folders && this.load.folders[t3] && (e3.closed = this.load.folders[t3].closed, e3.load = this.load.folders[t3]);
34621
- var n3 = new DC(e3);
34643
+ var n3 = new UC(e3);
34622
34644
  this.__folders[t3] = n3;
34623
- var i3 = FC(this, n3.domElement);
34624
- return cC.addClass(i3, "folder"), n3;
34645
+ var i3 = kC(this, n3.domElement);
34646
+ return fC.addClass(i3, "folder"), n3;
34625
34647
  }, removeFolder: function(t3) {
34626
- this.__ul.removeChild(t3.domElement.parentElement), delete this.__folders[t3.name], this.load && this.load.folders && this.load.folders[t3.name] && delete this.load.folders[t3.name], BC(t3);
34648
+ this.__ul.removeChild(t3.domElement.parentElement), delete this.__folders[t3.name], this.load && this.load.folders && this.load.folders[t3.name] && delete this.load.folders[t3.name], GC(t3);
34627
34649
  var e3 = this;
34628
- WP.each(t3.__folders, function(e4) {
34650
+ YP.each(t3.__folders, function(e4) {
34629
34651
  t3.removeFolder(e4);
34630
- }), WP.defer(function() {
34652
+ }), YP.defer(function() {
34631
34653
  e3.onResize();
34632
34654
  });
34633
34655
  }, open: function() {
@@ -34641,60 +34663,60 @@ void main(void){
34641
34663
  }, onResize: function() {
34642
34664
  var t3 = this.getRoot();
34643
34665
  if (t3.scrollable) {
34644
- var e3 = cC.getOffset(t3.__ul).top, n3 = 0;
34645
- WP.each(t3.__ul.childNodes, function(e4) {
34646
- t3.autoPlace && e4 === t3.__save_row || (n3 += cC.getHeight(e4));
34647
- }), window.innerHeight - e3 - 20 < n3 ? (cC.addClass(t3.domElement, DC.CLASS_TOO_TALL), t3.__ul.style.height = window.innerHeight - e3 - 20 + "px") : (cC.removeClass(t3.domElement, DC.CLASS_TOO_TALL), t3.__ul.style.height = "auto");
34666
+ var e3 = fC.getOffset(t3.__ul).top, n3 = 0;
34667
+ YP.each(t3.__ul.childNodes, function(e4) {
34668
+ t3.autoPlace && e4 === t3.__save_row || (n3 += fC.getHeight(e4));
34669
+ }), window.innerHeight - e3 - 20 < n3 ? (fC.addClass(t3.domElement, UC.CLASS_TOO_TALL), t3.__ul.style.height = window.innerHeight - e3 - 20 + "px") : (fC.removeClass(t3.domElement, UC.CLASS_TOO_TALL), t3.__ul.style.height = "auto");
34648
34670
  }
34649
- t3.__resize_handle && WP.defer(function() {
34671
+ t3.__resize_handle && YP.defer(function() {
34650
34672
  t3.__resize_handle.style.height = t3.__ul.offsetHeight + "px";
34651
34673
  }), t3.__closeButton && (t3.__closeButton.style.width = t3.width + "px");
34652
- }, onResizeDebounced: WP.debounce(function() {
34674
+ }, onResizeDebounced: YP.debounce(function() {
34653
34675
  this.onResize();
34654
34676
  }, 50), remember: function() {
34655
- if (WP.isUndefined(CC) && ((CC = new RC()).domElement.innerHTML = EC), this.parent)
34677
+ if (YP.isUndefined(LC) && ((LC = new IC()).domElement.innerHTML = RC), this.parent)
34656
34678
  throw new Error("You can only call remember on a top level GUI.");
34657
34679
  var t3 = this;
34658
- WP.each(Array.prototype.slice.call(arguments), function(e3) {
34659
- t3.__rememberedObjects.length === 0 && VC(t3), t3.__rememberedObjects.indexOf(e3) === -1 && t3.__rememberedObjects.push(e3);
34660
- }), this.autoPlace && XC(this, this.width);
34680
+ YP.each(Array.prototype.slice.call(arguments), function(e3) {
34681
+ t3.__rememberedObjects.length === 0 && qC(t3), t3.__rememberedObjects.indexOf(e3) === -1 && t3.__rememberedObjects.push(e3);
34682
+ }), this.autoPlace && ZC(this, this.width);
34661
34683
  }, getRoot: function() {
34662
34684
  for (var t3 = this; t3.parent; )
34663
34685
  t3 = t3.parent;
34664
34686
  return t3;
34665
34687
  }, getSaveObject: function() {
34666
34688
  var t3 = this.load;
34667
- return t3.closed = this.closed, this.__rememberedObjects.length > 0 && (t3.preset = this.preset, t3.remembered || (t3.remembered = {}), t3.remembered[this.preset] = qC(this)), t3.folders = {}, WP.each(this.__folders, function(e3, n3) {
34689
+ return t3.closed = this.closed, this.__rememberedObjects.length > 0 && (t3.preset = this.preset, t3.remembered || (t3.remembered = {}), t3.remembered[this.preset] = JC(this)), t3.folders = {}, YP.each(this.__folders, function(e3, n3) {
34668
34690
  t3.folders[n3] = e3.getSaveObject();
34669
34691
  }), t3;
34670
34692
  }, save: function() {
34671
- this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = qC(this), UC(this, false), this.saveToLocalStorageIfPossible();
34693
+ this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = JC(this), HC(this, false), this.saveToLocalStorageIfPossible();
34672
34694
  }, saveAs: function(t3) {
34673
- this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = qC(this, true)), this.load.remembered[t3] = qC(this), this.preset = t3, zC(this, t3, true), this.saveToLocalStorageIfPossible();
34695
+ this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = JC(this, true)), this.load.remembered[t3] = JC(this), this.preset = t3, WC(this, t3, true), this.saveToLocalStorageIfPossible();
34674
34696
  }, revert: function(t3) {
34675
- WP.each(this.__controllers, function(e3) {
34676
- this.getRoot().load.remembered ? kC(t3 || this.getRoot(), e3) : e3.setValue(e3.initialValue), e3.__onFinishChange && e3.__onFinishChange.call(e3, e3.getValue());
34677
- }, this), WP.each(this.__folders, function(t4) {
34697
+ YP.each(this.__controllers, function(e3) {
34698
+ this.getRoot().load.remembered ? zC(t3 || this.getRoot(), e3) : e3.setValue(e3.initialValue), e3.__onFinishChange && e3.__onFinishChange.call(e3, e3.getValue());
34699
+ }, this), YP.each(this.__folders, function(t4) {
34678
34700
  t4.revert(t4);
34679
- }), t3 || UC(this.getRoot(), false);
34701
+ }), t3 || HC(this.getRoot(), false);
34680
34702
  }, listen: function(t3) {
34681
34703
  var e3 = this.__listening.length === 0;
34682
34704
  this.__listening.push(t3), e3 && function t4(e4) {
34683
- e4.length !== 0 && AC.call(window, function() {
34705
+ e4.length !== 0 && CC.call(window, function() {
34684
34706
  t4(e4);
34685
34707
  });
34686
- WP.each(e4, function(t5) {
34708
+ YP.each(e4, function(t5) {
34687
34709
  t5.updateDisplay();
34688
34710
  });
34689
34711
  }(this.__listening);
34690
34712
  }, updateDisplay: function() {
34691
- WP.each(this.__controllers, function(t3) {
34713
+ YP.each(this.__controllers, function(t3) {
34692
34714
  t3.updateDisplay();
34693
- }), WP.each(this.__folders, function(t3) {
34715
+ }), YP.each(this.__folders, function(t3) {
34694
34716
  t3.updateDisplay();
34695
34717
  });
34696
34718
  } });
34697
- var YC = DC, ZC = function() {
34719
+ var $C = UC, KC = function() {
34698
34720
  function t3(t4) {
34699
34721
  this.runTime = { fps: 0, resolution: "" }, this.target = t4.target, this.data = t4.params, this.player = t4.player, this.gui = this.createControllerGUI(), this.createStats(), this.addEventListener();
34700
34722
  }
@@ -34704,7 +34726,7 @@ void main(void){
34704
34726
  t4.player.view && (t4.controller.runTimeFps.setValue(t4.player.fps.value), t4.controller.drawCall.setValue(t4.player.runtime.drawCall), t4.controller.runTimeResolution.setValue(t4.player.view.width + "*" + t4.player.view.height));
34705
34727
  }, 500);
34706
34728
  }, t3.prototype.createControllerGUI = function() {
34707
- var t4, e3, n3, i3, r3, o2 = new YC({ autoPlace: true, closed: true });
34729
+ var t4, e3, n3, i3, r3, o2 = new $C({ autoPlace: true, closed: true });
34708
34730
  o2.domElement.style.opacity = ".6", o2.domElement.style.transformOrigin = "100% 0", o2.domElement.style.transform = "scale(1)", this.target.appendChild(o2.domElement), o2.domElement.style.position = "absolute", o2.domElement.style.right = "0", o2.domElement.style.top = "0", o2.domElement.style.zIndex = "2";
34709
34731
  var s3 = o2.add({ FPS: 0 }, "FPS", 0), a2 = o2.add({ drawCall: 0 }, "drawCall", 0), l2 = o2.add({ "\u5206\u8FA8\u7387": "" }, "\u5206\u8FA8\u7387", ""), u2 = o2.add({ "\u989D\u5916\u8BA1\u7B97": 0 }, "\u989D\u5916\u8BA1\u7B97", 0, 200), h2 = o2.addFolder("renderOptions");
34710
34732
  return this.controller = { runTimeResolution: l2, runTimeFps: s3, drawCall: a2, moreCalculation: u2, minFPS: h2.add({ "\u6700\u4F4Efps": (t4 = this.data.minFPS) !== null && t4 !== void 0 ? t4 : 40 }, "\u6700\u4F4Efps", 0, 60), maxFPS: h2.add({ "\u6700\u9AD8fps": (e3 = this.data.maxFPS) !== null && e3 !== void 0 ? e3 : 50 }, "\u6700\u9AD8fps", 0, 60), resolution: h2.add({ "\u76EE\u6807\u5206\u8FA8\u500D\u7387": (n3 = this.data.resolution) !== null && n3 !== void 0 ? n3 : window.devicePixelRatio }, "\u76EE\u6807\u5206\u8FA8\u500D\u7387", 0.5, 6), autoResolution: h2.add({ "\u81EA\u52A8\u5206\u8FA8\u7387": (i3 = this.data.autoResolution) !== null && i3 !== void 0 && i3 }, "\u81EA\u52A8\u5206\u8FA8\u7387", true), autoFps: h2.add({ "\u81EA\u52A8fps": (r3 = this.data.autoFPS) === null || r3 === void 0 || r3 }, "\u81EA\u52A8fps", true), transactionBgColor: h2.addColor({ "\u5207\u9875\u80CC\u666F\u8272": this.data.transactionBgColor }, "\u5207\u9875\u80CC\u666F\u8272") }, this.controller.runTimeFps.disabled = true, this.controller.runTimeResolution.disabled = true, o2;
@@ -34735,22 +34757,23 @@ void main(void){
34735
34757
  } catch (t4) {
34736
34758
  }
34737
34759
  }, t3;
34738
- }(), JC = function() {
34760
+ }(), QC = function() {
34739
34761
  function t3(t4) {
34740
34762
  var e3 = this;
34741
- this.tasks = [], this.isDestroy = false, this.schedule = function() {
34742
- var t5 = e3.tasks[0];
34743
- t5 && !e3.isDestroy ? e3.fn(t5).then(function() {
34744
- e3.tasks.splice(0, 1), window.requestAnimationFrame(e3.schedule);
34745
- }) : window.requestAnimationFrame(e3.schedule);
34746
- }, this.fn = t4, this.schedule();
34763
+ this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
34764
+ e3.isScheduling = true;
34765
+ var t5 = e3.tasks.shift();
34766
+ t5 && !e3.isDestroy && e3.fn(t5).then(function() {
34767
+ e3.tasks.length > 0 ? window.requestAnimationFrame(e3.schedule) : e3.isScheduling = false;
34768
+ });
34769
+ }, this.fn = t4;
34747
34770
  }
34748
34771
  return t3.prototype.destroy = function() {
34749
34772
  this.isDestroy = true;
34750
34773
  }, t3.prototype.addTask = function(t4) {
34751
- this.tasks.push(t4);
34774
+ this.tasks.push(t4), this.isScheduling || this.schedule();
34752
34775
  }, t3;
34753
- }(), $C = function() {
34776
+ }(), tI = function() {
34754
34777
  function t3(t4) {
34755
34778
  this.autoUnlock = /* @__PURE__ */ Object.create(null), this.locks = /* @__PURE__ */ Object.create(null), this.available = false, this.available = t4;
34756
34779
  }
@@ -34764,17 +34787,18 @@ void main(void){
34764
34787
  }, t3.prototype.isLocked = function(t4) {
34765
34788
  return !!this.available && !!this.locks[t4];
34766
34789
  }, t3;
34767
- }(), KC = function() {
34790
+ }(), eI = function() {
34768
34791
  function t3() {
34769
34792
  var t4 = this;
34770
- this.tasks = [], this.isDestroy = false, this.schedule = function() {
34793
+ this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
34794
+ t4.isScheduling = true;
34771
34795
  var e3 = t4.tasks.shift();
34772
- e3 && !t4.isDestroy ? (e3.status = "running", e3.fn.apply(null).then(function() {
34773
- window.setTimeout(t4.schedule);
34796
+ e3 && !t4.isDestroy && (e3.status = "running", e3.fn.apply(null).then(function() {
34797
+ t4.tasks.length > 0 ? window.requestAnimationFrame(t4.schedule) : t4.isScheduling = false;
34774
34798
  }).catch(function() {
34775
- window.setTimeout(t4.schedule);
34776
- })) : window.setTimeout(t4.schedule);
34777
- }, this.schedule();
34799
+ t4.tasks.length > 0 ? window.requestAnimationFrame(t4.schedule) : t4.isScheduling = false;
34800
+ }));
34801
+ };
34778
34802
  }
34779
34803
  return t3.prototype.getRunningTask = function() {
34780
34804
  return this.tasks[0] && this.tasks[0].status === "running" ? this.tasks[0] : null;
@@ -34782,11 +34806,11 @@ void main(void){
34782
34806
  var n3 = { type: t4, status: "wait", fn: e3 }, i3 = this.getRunningTask();
34783
34807
  i3 && t4 === i3.type || (this.tasks = this.tasks.filter(function(e4) {
34784
34808
  return e4.type !== t4;
34785
- }), this.tasks.push(n3));
34809
+ }), this.tasks.push(n3), this.isScheduling || this.schedule());
34786
34810
  }, t3.prototype.destroy = function() {
34787
34811
  this.isDestroy = true;
34788
34812
  }, t3;
34789
- }(), QC = function() {
34813
+ }(), nI = function() {
34790
34814
  var t3 = function(e3, n3) {
34791
34815
  return (t3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t4, e4) {
34792
34816
  t4.__proto__ = e4;
@@ -34803,14 +34827,22 @@ void main(void){
34803
34827
  }
34804
34828
  t3(e3, n3), e3.prototype = n3 === null ? Object.create(n3) : (i3.prototype = n3.prototype, new i3());
34805
34829
  };
34806
- }(), tI = function() {
34807
- return (tI = Object.assign || function(t3) {
34830
+ }(), iI = function() {
34831
+ return (iI = Object.assign || function(t3) {
34808
34832
  for (var e3, n3 = 1, i3 = arguments.length; n3 < i3; n3++)
34809
34833
  for (var r3 in e3 = arguments[n3])
34810
34834
  Object.prototype.hasOwnProperty.call(e3, r3) && (t3[r3] = e3[r3]);
34811
34835
  return t3;
34812
34836
  }).apply(this, arguments);
34813
- }, eI = function(t3, e3, n3, i3) {
34837
+ }, rI = function(t3, e3, n3, i3) {
34838
+ var r3, o2 = arguments.length, s3 = o2 < 3 ? e3 : i3 === null ? i3 = Object.getOwnPropertyDescriptor(e3, n3) : i3;
34839
+ if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
34840
+ s3 = Reflect.decorate(t3, e3, n3, i3);
34841
+ else
34842
+ for (var a2 = t3.length - 1; a2 >= 0; a2--)
34843
+ (r3 = t3[a2]) && (s3 = (o2 < 3 ? r3(s3) : o2 > 3 ? r3(e3, n3, s3) : r3(e3, n3)) || s3);
34844
+ return o2 > 3 && s3 && Object.defineProperty(e3, n3, s3), s3;
34845
+ }, oI = function(t3, e3, n3, i3) {
34814
34846
  return new (n3 || (n3 = Promise))(function(r3, o2) {
34815
34847
  function s3(t4) {
34816
34848
  try {
@@ -34834,7 +34866,7 @@ void main(void){
34834
34866
  }
34835
34867
  l2((i3 = i3.apply(t3, e3 || [])).next());
34836
34868
  });
34837
- }, nI = function(t3, e3) {
34869
+ }, sI = function(t3, e3) {
34838
34870
  var n3, i3, r3, o2, s3 = { label: 0, sent: function() {
34839
34871
  if (1 & r3[0])
34840
34872
  throw r3[1];
@@ -34897,20 +34929,20 @@ void main(void){
34897
34929
  }([o3, a3]);
34898
34930
  };
34899
34931
  }
34900
- }, iI = window.ResizeObserver || BP, rI = function(t3) {
34932
+ }, aI = window.ResizeObserver || GP, lI = function(t3) {
34901
34933
  return new Promise(function(e3) {
34902
34934
  return setTimeout(e3, t3);
34903
34935
  });
34904
34936
  };
34905
- function oI(t3, e3) {
34906
- return eI(this, void 0, void 0, function() {
34937
+ function uI(t3, e3) {
34938
+ return oI(this, void 0, void 0, function() {
34907
34939
  var n3;
34908
- return nI(this, function(i3) {
34940
+ return sI(this, function(i3) {
34909
34941
  switch (i3.label) {
34910
34942
  case 0:
34911
34943
  n3 = Date.now(), i3.label = 1;
34912
34944
  case 1:
34913
- return !t3() && Date.now() - n3 < e3 ? [4, rI(50)] : [3, 3];
34945
+ return !t3() && Date.now() - n3 < e3 ? [4, lI(50)] : [3, 3];
34914
34946
  case 2:
34915
34947
  return i3.sent(), [3, 1];
34916
34948
  case 3:
@@ -34919,21 +34951,21 @@ void main(void){
34919
34951
  });
34920
34952
  });
34921
34953
  }
34922
- var sI = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, aI = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, lI = "";
34954
+ 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 = "";
34923
34955
  try {
34924
- lI = "0.5.9";
34956
+ dI = "0.5.14-alpha.0";
34925
34957
  } catch (t3) {
34926
- lI = "dev";
34958
+ dI = "development";
34927
34959
  }
34928
- var uI = null;
34960
+ var pI = null;
34929
34961
  try {
34930
- uI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
34962
+ pI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
34931
34963
  } catch (t3) {
34932
34964
  }
34933
- var hI = function(t3) {
34934
- function e3(n3) {
34965
+ var fI = function(t3) {
34966
+ function e3(n4) {
34935
34967
  var i3 = t3.call(this) || this;
34936
- return i3.iosResetCache = [], i3.needClearCacheImage = false, i3.version = lI, i3.__slideState = Object(l.cloneDeep)(aI), i3.userInputTime = 0, i3.isSyncingSlideState = false, i3.frozenTaskManager = new KC(), i3.randomId = Math.random().toString(32).substr(2), i3.resize = false, i3.isAnimating = false, i3.renderingTaskManager = new HP(), i3.isLoading = false, i3.interactive = true, i3.renderingIndex = 0, i3.frameWidth = 1, i3.frameHeight = 1, i3.frame = document.createElement("div"), i3.medianController = document.createElement("div"), i3.frameResizeObserver = new iI(function() {
34968
+ return i3.iosResetCache = [], i3.needClearCacheImage = false, i3.version = dI, i3.__slideState = Object(l.cloneDeep)(cI), i3.userInputTime = 0, i3.isSyncingSlideState = false, i3.frozenTaskManager = new eI(), i3.randomId = Math.random().toString(32).substr(2), i3.resize = false, i3.isAnimating = false, i3.renderingTaskManager = new VP(), i3.isLoading = false, i3.interactive = true, i3.renderingIndex = 0, i3.frameWidth = 1, i3.frameHeight = 1, i3.frame = document.createElement("div"), i3.medianController = document.createElement("div"), i3.frameResizeObserver = new aI(function() {
34937
34969
  return i3.frameResizeHandler();
34938
34970
  }), i3.timestamp = function() {
34939
34971
  return Date.now();
@@ -34953,12 +34985,12 @@ void main(void){
34953
34985
  }, i3.handleSlideRef = function() {
34954
34986
  console.log(i3), window.__slide = i3;
34955
34987
  }, i3.receiveSyncHandler = function(t4) {
34956
- return eI(i3, void 0, void 0, function() {
34957
- var e4, n4, i4, r3, o2 = this;
34958
- return nI(this, function(s3) {
34988
+ return oI(i3, void 0, void 0, function() {
34989
+ var e4, n5, i4, r3, o2 = this;
34990
+ return sI(this, function(s3) {
34959
34991
  switch (s3.label) {
34960
34992
  case 0:
34961
- return Object(l.isNumber)(t4.incrId) && (t4.incrId && t4.incrId - this._receiveIncrId != 1 && this.emit(sI.syncEventLag), this._receiveIncrId = t4.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t4), this.taskId), t4.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t4.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t4.next, "start"), this.player.nextTick(function() {
34993
+ return Object(l.isNumber)(t4.incrId) && (t4.incrId && t4.incrId - this._receiveIncrId != 1 && this.emit(hI.syncEventLag), this._receiveIncrId = t4.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t4), this.taskId), t4.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t4.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t4.next, "start"), this.player.nextTick(function() {
34962
34994
  o2.doNextStep(true);
34963
34995
  })) : this.doNextStep(true), [3, 6]);
34964
34996
  case 1:
@@ -34972,31 +35004,31 @@ void main(void){
34972
35004
  case 4:
34973
35005
  return s3.sent(), [3, 6];
34974
35006
  case 5:
34975
- t4.type === "mediaPlay" ? ((n4 = this.player) === null || n4 === void 0 || n4.setMediaState(t4.id, true), this.__slideState.mediaState[t4.id] = t4.state) : t4.type === "mediaPause" ? ((i4 = this.player) === null || i4 === void 0 || i4.setMediaState(t4.id, false), this.__slideState.mediaState[t4.id] = t4.state) : t4.type === "mediaSeek" && ((r3 = this.player) === null || r3 === void 0 || r3.setMediaCurrentTime(t4.id, t4.time), this.__slideState.mediaState[t4.id] = t4.state), s3.label = 6;
35007
+ t4.type === "mediaPlay" ? ((n5 = this.player) === null || n5 === void 0 || n5.setMediaState(t4.id, true), this.__slideState.mediaState[t4.id] = t4.state) : t4.type === "mediaPause" ? ((i4 = this.player) === null || i4 === void 0 || i4.setMediaState(t4.id, false), this.__slideState.mediaState[t4.id] = t4.state) : t4.type === "mediaSeek" && ((r3 = this.player) === null || r3 === void 0 || r3.setMediaCurrentTime(t4.id, t4.time), this.__slideState.mediaState[t4.id] = t4.state), s3.label = 6;
34976
35008
  case 6:
34977
35009
  return [2];
34978
35010
  }
34979
35011
  });
34980
35012
  });
34981
35013
  }, i3.handlePrevSlide = function(t4) {
34982
- return t4 === void 0 && (t4 = false), eI(i3, void 0, void 0, function() {
34983
- var e4, n4;
34984
- return nI(this, function(i4) {
35014
+ return t4 === void 0 && (t4 = false), oI(i3, void 0, void 0, function() {
35015
+ var e4, n5;
35016
+ return sI(this, function(i4) {
34985
35017
  switch (i4.label) {
34986
35018
  case 0:
34987
- return this.player ? [4, (n4 = this.player) === null || n4 === void 0 ? void 0 : n4.createSnapshotForNextSlide(true)] : [2];
35019
+ return this.player ? [4, (n5 = this.player) === null || n5 === void 0 ? void 0 : n5.createSnapshotForNextSlide(true)] : [2];
34988
35020
  case 1:
34989
35021
  return i4.sent(), (e4 = this.player.prevSlideIndex) >= 1 && (this.config.navigatorDelegate ? this.config.navigatorDelegate.gotoPage(e4) : t4 ? this.doRenderSlide(e4, false) : this.renderSlide(e4, false)), [2];
34990
35022
  }
34991
35023
  });
34992
35024
  });
34993
35025
  }, i3.handleNextSlide = function(t4) {
34994
- return t4 === void 0 && (t4 = false), eI(i3, void 0, void 0, function() {
34995
- var e4, n4;
34996
- return nI(this, function(i4) {
35026
+ return t4 === void 0 && (t4 = false), oI(i3, void 0, void 0, function() {
35027
+ var e4, n5;
35028
+ return sI(this, function(i4) {
34997
35029
  switch (i4.label) {
34998
35030
  case 0:
34999
- return this.player ? [4, (n4 = this.player) === null || n4 === void 0 ? void 0 : n4.createSnapshotForNextSlide(false)] : [2];
35031
+ return this.player ? [4, (n5 = this.player) === null || n5 === void 0 ? void 0 : n5.createSnapshotForNextSlide(false)] : [2];
35000
35032
  case 1:
35001
35033
  return i4.sent(), (e4 = this.player.nextSlideIndex) <= this.slideCount && (this.config.navigatorDelegate ? this.config.navigatorDelegate.gotoPage(e4) : t4 ? this.doRenderSlide(e4, true) : this.renderSlide(e4, true)), [2];
35002
35034
  }
@@ -35008,31 +35040,32 @@ void main(void){
35008
35040
  i3.renderSlide(t4, e4);
35009
35041
  } else
35010
35042
  t4 === -1 && i3.renderSlide(i3.slideCount, true);
35011
- }, n3.timestamp && (i3.timestamp = n3.timestamp), n3.rtcAudio && ($R.RtcAudioClazz = n3.rtcAudio), i3.logger = { info: function(t4, r3) {
35012
- var o2, s3;
35013
- ((o2 = n3.logger) === null || o2 === void 0 ? void 0 : o2.info) && (e3._tempLog += "INFO - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + r3 + "] " + t4 + "\n\n", (s3 = n3.logger) === null || s3 === void 0 || s3.info("[" + r3 + "] " + t4));
35014
- }, warn: function(t4, r3) {
35015
- var o2, s3;
35016
- ((o2 = n3.logger) === null || o2 === void 0 ? void 0 : o2.warn) && (e3._tempLog += "WARN - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + r3 + "] " + t4 + "\n\n", (s3 = n3.logger) === null || s3 === void 0 || s3.warn("[" + r3 + "] " + t4));
35017
- }, error: function(t4, r3) {
35018
- var o2, s3;
35019
- ((o2 = n3.logger) === null || o2 === void 0 ? void 0 : o2.error) && (e3._tempLog += "ERROR - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + r3 + "] " + t4 + "\n\n", (s3 = n3.logger) === null || s3 === void 0 || s3.error("[" + r3 + "] " + t4));
35020
- } }, i3.config = n3, i3.syncQueue = new JC(i3.receiveSyncHandler), i3.mode = n3.mode, i3.lock = new $C(i3.mode === "interactive"), i3.anchor = n3.anchor, i3.enableGlobalClick = !Object(l.isUndefined)(n3.enableGlobalClick) && n3.enableGlobalClick, i3.resize = n3.resize || false, i3.interactive = n3.interactive, i3.cacheImage.style.position = "absolute", i3.cacheImage.style.zIndex = "100", i3.frame.style.cssText = n3.fixedFrameSize ? "width:" + n3.fixedFrameSize.width + "px;height:" + n3.fixedFrameSize.height + "px;" : "width:100%;height:100%", i3.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", n3.fixedFrameSize && (i3.frameWidth = n3.fixedFrameSize.width, i3.frameHeight = n3.fixedFrameSize.height), i3.setMedianControllerAttribute(), i3.frame.appendChild(i3.medianController), i3.anchor.appendChild(i3.frame), i3.frameResizeObserver.observe(i3.frame), i3.on(sI.syncReceive, function(t4) {
35043
+ }, i3.config = i3.initSlideConfig(n4), i3.logger = { info: function(t4, n5) {
35044
+ var r3, o2;
35045
+ ((r3 = i3.config.logger) === null || r3 === void 0 ? void 0 : r3.info) && (e3._tempLog += "INFO - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + n5 + "] " + t4 + "\n\n", (o2 = i3.config.logger) === null || o2 === void 0 || o2.info("[" + n5 + "] " + t4));
35046
+ }, warn: function(t4, n5) {
35047
+ var r3, o2;
35048
+ ((r3 = i3.config.logger) === null || r3 === void 0 ? void 0 : r3.warn) && (e3._tempLog += "WARN - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + n5 + "] " + t4 + "\n\n", (o2 = i3.config.logger) === null || o2 === void 0 || o2.warn("[" + n5 + "] " + t4));
35049
+ }, error: function(t4, n5) {
35050
+ var r3, o2;
35051
+ ((r3 = i3.config.logger) === null || r3 === void 0 ? void 0 : r3.error) && (e3._tempLog += "ERROR - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + n5 + "] " + t4 + "\n\n", (o2 = i3.config.logger) === null || o2 === void 0 || o2.error("[" + n5 + "] " + t4));
35052
+ } }, i3.anchor = i3.config.anchor, i3.syncQueue = new QC(i3.receiveSyncHandler), i3.lock = new tI(i3.mode === "interactive"), i3.cacheImage.style.position = "absolute", i3.cacheImage.style.zIndex = "100", i3.setMedianControllerAttribute(), i3.frame.appendChild(i3.medianController), i3.frameResizeObserver.observe(i3.frame), i3.on(hI.syncReceive, function(t4) {
35021
35053
  i3.lock.unlock(t4.type, t4.uuid), i3.syncQueue.addTask(t4);
35022
35054
  }), i3.renderingTaskManager.eventHub.on("task-error", function(t4) {
35023
- var e4 = t4.error, n4 = t4.task, r3 = qE.transform(e4);
35024
- r3.errorType === VE.RuntimeWarn ? i3.logger.warn(r3.message, i3.taskId) : i3.logger.error(r3.message, i3.taskId), i3.isLoading = false, i3.emit(sI.renderError, { error: r3, index: n4.slideIndex });
35025
- }), window.addEventListener("__slide_ref__", i3.handleSlideRef), i3.resizeView = Object(l.debounce)(i3.resizeView.bind(i3), 50), i3.player = i3.initPlayer(n3), (n3 == null ? void 0 : n3.controller) && i3.createController(), i3.player.view && i3.frame.appendChild(i3.player.view), i3.handleViewClick = Object(l.debounce)(i3.handleViewClick, 300), i3.player.errorChannel.on("error", function(t4, e4) {
35026
- var n4 = qE.transform(t4);
35027
- n4.errorType === VE.RuntimeWarn ? i3.logger.warn(n4.message, i3.taskId) : i3.logger.error(n4.message, i3.taskId), i3.isLoading = false, e4 === i3.renderingIndex && i3.emit(sI.renderError, { error: t4, index: e4 });
35028
- }), i3.logger.info("new slide", ""), i3;
35029
- }
35030
- return QC(e3, t3), e3.flushLog = function() {
35031
- return eI(this, void 0, void 0, function() {
35032
- return nI(this, function(t4) {
35055
+ var e4 = t4.error, n5 = t4.task, r3 = qE.transform(e4);
35056
+ r3.errorType === VE.RuntimeWarn ? i3.logger.warn(r3.message, i3.taskId) : i3.logger.error(r3.message, i3.taskId), i3.isLoading = false, i3.emit(hI.renderError, { error: r3, index: n5.slideIndex });
35057
+ }), window.addEventListener("__slide_ref__", i3.handleSlideRef), i3.resizeView = Object(l.debounce)(i3.resizeView.bind(i3), 50), i3.player = i3.initPlayer(i3.config), i3.config.controller && i3.createController(), i3.player.view && i3.frame.appendChild(i3.player.view), i3.handleViewClick = Object(l.debounce)(i3.handleViewClick, 300), i3.player.errorChannel.on("error", function(t4, e4) {
35058
+ var n5 = qE.transform(t4);
35059
+ n5.errorType === VE.RuntimeWarn ? i3.logger.warn(n5.message, i3.taskId) : i3.logger.error(n5.message, i3.taskId), i3.isLoading = false, e4 === i3.renderingIndex && i3.emit(hI.renderError, { error: t4, index: e4 });
35060
+ }), i3;
35061
+ }
35062
+ var n3;
35063
+ return nI(e3, t3), e3.flushLog = function() {
35064
+ return oI(this, void 0, void 0, function() {
35065
+ return sI(this, function(t4) {
35033
35066
  switch (t4.label) {
35034
35067
  case 0:
35035
- return e3._tempLog.length > 0 ? [4, uI == null ? void 0 : uI.setItem("run_time_log_" + e3._tempLogIndex, e3._tempLog)] : [3, 2];
35068
+ return e3._tempLog.length > 0 ? [4, pI == null ? void 0 : pI.setItem("run_time_log_" + e3._tempLogIndex, e3._tempLog)] : [3, 2];
35036
35069
  case 1:
35037
35070
  t4.sent(), e3._tempLog = "", e3._tempLogIndex += 1, t4.label = 2;
35038
35071
  case 2:
@@ -35042,81 +35075,83 @@ void main(void){
35042
35075
  });
35043
35076
  }, Object.defineProperty(e3.prototype, "dispatchIncrId", { get: function() {
35044
35077
  return this._dispatchIncrId++;
35045
- }, enumerable: false, configurable: true }), e3.prototype.initPlayer = function(t4) {
35046
- var e4, n3, i3, r3 = this, o2 = new $R({ 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 });
35047
- return o2.setInteractive(this.interactive), o2.updateConfig(t4.renderOptions || {}), o2.on(JR.renderStart, function(t5) {
35048
- r3.isLoading = true, r3.emit(sI.renderStart, t5);
35049
- }), o2.on(JR.renderEnd, function(t5) {
35050
- r3.isLoading = false, r3.player && (r3.designHeight = r3.player.designHeight, r3.designWidth = r3.player.designWidth, r3.cacheImage.style.width = r3.player.designWidth + "px", r3.cacheImage.style.height = r3.player.designHeight + "px", r3._slideCount = r3.player.slideCount), r3.emit(sI.renderEnd, t5);
35051
- }), o2.on(JR.slideChange, function(t5) {
35052
- r3.__slideState.currentSlideIndex = t5, r3.emitStateChange(), r3.emit(sI.slideChange, t5);
35053
- }), o2.on(JR.mainSeqStateChange, function(t5) {
35078
+ }, enumerable: false, configurable: true }), e3.prototype.initSlideConfig = function(t4) {
35079
+ return t4.timestamp && (this.timestamp = t4.timestamp), t4.rtcAudio && (KR.RtcAudioClazz = t4.rtcAudio), this.mode = t4.mode, this.anchor = t4.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !Object(l.isUndefined)(t4.enableGlobalClick) && t4.enableGlobalClick, this.resize = t4.resize || false, this.interactive = t4.interactive, this.frame.style.cssText = t4.fixedFrameSize ? "width:" + t4.fixedFrameSize.width + "px;height:" + t4.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;", t4.fixedFrameSize && (this.frameWidth = t4.fixedFrameSize.width, this.frameHeight = t4.fixedFrameSize.height), t4;
35080
+ }, e3.prototype.initPlayer = function(t4) {
35081
+ var e4, n4, i3, r3 = 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 });
35082
+ return o2.setInteractive(this.interactive), o2.updateConfig(t4.renderOptions || {}), o2.on($R.renderStart, function(t5) {
35083
+ r3.isLoading = true, r3.emit(hI.renderStart, t5);
35084
+ }), o2.on($R.renderEnd, function(t5) {
35085
+ r3.isLoading = false, r3.player && (r3.designHeight = r3.player.designHeight, r3.designWidth = r3.player.designWidth, r3.cacheImage.style.width = r3.player.designWidth + "px", r3.cacheImage.style.height = r3.player.designHeight + "px", r3._slideCount = r3.player.slideCount), r3.emit(hI.renderEnd, t5);
35086
+ }), o2.on($R.slideChange, function(t5) {
35087
+ r3.__slideState.currentSlideIndex = t5, r3.emitStateChange(), r3.emit(hI.slideChange, t5);
35088
+ }), o2.on($R.mainSeqStateChange, function(t5) {
35054
35089
  r3.__slideState.mainSeqState = t5, r3.emitStateChange();
35055
- }), o2.on(JR.mainSeqStepChange, function(t5) {
35090
+ }), o2.on($R.mainSeqStepChange, function(t5) {
35056
35091
  r3.__slideState.mainSeqStep = t5, r3.emitStateChange();
35057
- }), o2.on(JR.interactiveSeqStateChange, function(t5) {
35058
- var e5 = t5.id, n4 = t5.state;
35059
- r3.__slideState.interactiveSeqState[e5] = n4, r3.emitStateChange();
35060
- }), o2.on(JR.animateStart, function() {
35061
- r3.isAnimating !== true && (r3.isAnimating = true, r3.emit(sI.animateStart));
35062
- }), o2.on(JR.animateEnd, function() {
35063
- r3.isAnimating !== false && (r3.isAnimating = false, r3.emit(sI.animateEnd));
35064
- }), o2.on(JR.interactiveSeqAction, function(t5) {
35065
- var e5 = t5.action, n4 = t5.seqId;
35066
- r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "interactiveAnim", action: e5, seqId: n4 }), r3.emitStateChange();
35067
- }), o2.on(JR.mainSeqStepStart, function(t5) {
35068
- r3.emit(sI.mainSeqStepStart, t5);
35069
- }), o2.on(JR.mainSeqStepEnd, function(t5) {
35070
- r3.emit(sI.mainSeqStepEnd, t5);
35071
- }), o2.on(JR.mediaPlay, function(t5) {
35092
+ }), o2.on($R.interactiveSeqStateChange, function(t5) {
35093
+ var e5 = t5.id, n5 = t5.state;
35094
+ r3.__slideState.interactiveSeqState[e5] = n5, r3.emitStateChange();
35095
+ }), o2.on($R.animateStart, function() {
35096
+ r3.isAnimating !== true && (r3.isAnimating = true, r3.emit(hI.animateStart));
35097
+ }), o2.on($R.animateEnd, function() {
35098
+ r3.isAnimating !== false && (r3.isAnimating = false, r3.emit(hI.animateEnd));
35099
+ }), o2.on($R.interactiveSeqAction, function(t5) {
35100
+ var e5 = t5.action, n5 = t5.seqId;
35101
+ r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "interactiveAnim", action: e5, seqId: n5 }), r3.emitStateChange();
35102
+ }), o2.on($R.mainSeqStepStart, function(t5) {
35103
+ r3.emit(hI.mainSeqStepStart, t5);
35104
+ }), o2.on($R.mainSeqStepEnd, function(t5) {
35105
+ r3.emit(hI.mainSeqStepEnd, t5);
35106
+ }), o2.on($R.mediaPlay, function(t5) {
35072
35107
  var e5 = { type: "play", time: r3.timestamp() - 1e3 * t5.time };
35073
35108
  r3.__slideState.mediaState[t5.id] = e5, r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaPlay", id: t5.id, state: e5 }), r3.emitStateChange();
35074
- }), o2.on(JR.mediaPause, function(t5) {
35109
+ }), o2.on($R.mediaPause, function(t5) {
35075
35110
  var e5 = { type: "pause", time: t5.time };
35076
35111
  r3.__slideState.mediaState[t5.id] = e5, r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaPause", id: t5.id, state: e5 }), r3.emitStateChange();
35077
- }), o2.on(JR.mediaSeek, function(t5) {
35112
+ }), o2.on($R.mediaSeek, function(t5) {
35078
35113
  var e5 = { type: "pause", time: 0 };
35079
35114
  t5.isPlaying ? (e5.type = "play", r3.__slideState.mediaState[t5.id] ? e5.time = r3.__slideState.mediaState[t5.id].time - 1e3 * t5.time : e5.time = r3.timestamp() - 1e3 * t5.time, r3.__slideState.mediaState[t5.id] = e5) : (e5.type = "pause", e5.time = t5.time, r3.__slideState.mediaState[t5.id] = e5), r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaSeek", id: t5.id, time: t5.time, state: e5 }), r3.emitStateChange();
35080
- }), o2.on(JR.requestPrevSlide, function(t5) {
35115
+ }), o2.on($R.requestPrevSlide, function(t5) {
35081
35116
  r3.handlePrevSlide(t5);
35082
- }), o2.on(JR.requestNextSlide, function(t5) {
35117
+ }), o2.on($R.requestNextSlide, function(t5) {
35083
35118
  r3.handleNextSlide(t5);
35084
- }), o2.on(JR.requestGotoSlide, function(t5) {
35119
+ }), o2.on($R.requestGotoSlide, function(t5) {
35085
35120
  r3.config.navigatorDelegate ? r3.config.navigatorDelegate.gotoPage(t5) : r3.handleGotoSlide(t5);
35086
- }), (e4 = o2.view) === null || e4 === void 0 || e4.addEventListener("touchend", this.handleViewTouchEnd), (n3 = o2.view) === null || n3 === void 0 || n3.addEventListener("touchstart", this.handleViewTouchStart), (i3 = o2.view) === null || i3 === void 0 || i3.addEventListener("click", this.handleViewClick), o2.on(JR.userInput, this.userInputHandle), o2;
35121
+ }), (e4 = o2.view) === null || e4 === void 0 || e4.addEventListener("touchend", this.handleViewTouchEnd), (n4 = o2.view) === null || n4 === void 0 || n4.addEventListener("touchstart", this.handleViewTouchStart), (i3 = o2.view) === null || i3 === void 0 || i3.addEventListener("click", this.handleViewClick), o2.on($R.userInput, this.userInputHandle), o2;
35087
35122
  }, e3.prototype.createController = function() {
35088
- this.player && (this.playerController = new ZC({ player: this.player, params: this.player.config || {}, target: this.frame }));
35123
+ this.player && (this.playerController = new KC({ player: this.player, params: this.player.config || {}, target: this.frame }));
35089
35124
  }, e3.prototype.setMedianControllerAttribute = function() {
35090
35125
  this.medianController.className = "median-container", this.medianController.style.position = "absolute", this.medianController.style.left = "0", this.medianController.style.top = "0", this.medianController.style.zIndex = "2";
35091
35126
  }, e3.prototype.frameResizeHandler = function() {
35092
35127
  if (!this.config.fixedFrameSize) {
35093
- var t4 = this.frame.getBoundingClientRect(), e4 = t4.width, n3 = t4.height;
35094
- this.frameWidth = e4, this.frameHeight = n3, this.resizeView();
35128
+ var t4 = this.frame.getBoundingClientRect(), e4 = t4.width, n4 = t4.height;
35129
+ this.frameWidth = e4, this.frameHeight = n4, this.resizeView();
35095
35130
  }
35096
- }, e3.prototype.updateFixedFrameSize = function(t4, e4, n3) {
35097
- this.config.fixedFrameSize && (this.frameWidth = t4, this.frameHeight = e4, this.frame.style.width = t4 + "px", this.frame.style.height = e4 + "px", this.resizeView(n3));
35131
+ }, e3.prototype.updateFixedFrameSize = function(t4, e4, n4) {
35132
+ this.config.fixedFrameSize && (this.frameWidth = t4, this.frameHeight = e4, this.frame.style.width = t4 + "px", this.frame.style.height = e4 + "px", this.resizeView(n4));
35098
35133
  }, e3.prototype.resizeView = function(t4) {
35099
- var e4, n3, i3 = this, r3 = this.width, o2 = this.height;
35134
+ var e4, n4, i3 = this, r3 = this.width, o2 = this.height;
35100
35135
  if (r3 > 0 && o2 > 0) {
35101
35136
  var s3 = this.frameWidth / r3, a2 = s3 * o2;
35102
- a2 > this.frameHeight && (s3 *= this.frameHeight / a2), (e4 = this.player) === null || e4 === void 0 || e4.scaleView(s3, this.resize, t4), this.cacheImage.style.transform = "scale(" + s3 + ")", this.medianController.style.transform = "scale(" + s3 + ")", this.medianController.style.top = (this.frameHeight - o2 * s3) / 2 + "px", this.medianController.setAttribute("data-scale", s3.toString()), this.isInitResized || (this.isInitResized = true, (n3 = this.player) === null || n3 === void 0 || n3.clock.setTimeout(function() {
35137
+ a2 > this.frameHeight && (s3 *= this.frameHeight / a2), (e4 = this.player) === null || e4 === void 0 || e4.scaleView(s3, this.resize, t4), this.cacheImage.style.transform = "scale(" + s3 + ")", this.medianController.style.transform = "scale(" + s3 + ")", this.medianController.style.top = (this.frameHeight - o2 * s3) / 2 + "px", this.medianController.setAttribute("data-scale", s3.toString()), this.isInitResized || (this.isInitResized = true, (n4 = this.player) === null || n4 === void 0 || n4.clock.setTimeout(function() {
35103
35138
  i3.frame.style.visibility = "visible";
35104
35139
  }, 32));
35105
35140
  }
35106
35141
  }, e3.prototype.setSlideState = function(t4) {
35107
- var e4, n3, i3;
35108
- return eI(this, void 0, void 0, function() {
35142
+ var e4, n4, i3;
35143
+ return oI(this, void 0, void 0, function() {
35109
35144
  var r3, o2 = this;
35110
- return nI(this, function(s3) {
35145
+ return sI(this, function(s3) {
35111
35146
  switch (s3.label) {
35112
35147
  case 0:
35113
- return this.isSyncingSlideState = true, this.logger.info("stateChange receive " + JSON.stringify(t4), this.taskId), t4.taskId && t4.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t4.taskId, (e4 = this.player) === null || e4 === void 0 || e4.setResourceData(t4.taskId, this.__slideState.url)), t4.url && t4.url !== this.__slideState.url && (this.__slideState.url = t4.url, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(this.__slideState.taskId, t4.url)), Number.isInteger(t4.currentSlideIndex) && t4.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t4.currentSlideIndex, [4, this.doRenderSlide(t4.currentSlideIndex)]) : [3, 2];
35148
+ return this.isSyncingSlideState = true, this.logger.info("stateChange receive " + JSON.stringify(t4), this.taskId), t4.taskId && t4.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t4.taskId, (e4 = this.player) === null || e4 === void 0 || e4.setResourceData(t4.taskId, this.__slideState.url)), t4.url && t4.url !== this.__slideState.url && (this.__slideState.url = t4.url, (n4 = this.player) === null || n4 === void 0 || n4.setResourceData(this.__slideState.taskId, t4.url)), Number.isInteger(t4.currentSlideIndex) && t4.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t4.currentSlideIndex, [4, this.doRenderSlide(t4.currentSlideIndex)]) : [3, 2];
35114
35149
  case 1:
35115
35150
  s3.sent(), s3.label = 2;
35116
35151
  case 2:
35117
35152
  return [4, (i3 = this.player) === null || i3 === void 0 ? void 0 : i3.clock.waitUntil(function() {
35118
- var e5, n4;
35119
- return ((e5 = o2.player) === null || e5 === void 0 ? void 0 : e5.currentIndex) === t4.currentSlideIndex && ((n4 = o2.player) === null || n4 === void 0 ? void 0 : n4.currentStage);
35153
+ var e5, n5;
35154
+ return ((e5 = o2.player) === null || e5 === void 0 ? void 0 : e5.currentIndex) === t4.currentSlideIndex && ((n5 = o2.player) === null || n5 === void 0 ? void 0 : n5.currentStage);
35120
35155
  }, 3e3)];
35121
35156
  case 3:
35122
35157
  return s3.sent(), r3 = false, Number.isInteger(t4.mainSeqStep) && t4.mainSeqStep !== this.__slideState.mainSeqStep && (r3 = true, this.__slideState.mainSeqStep = t4.mainSeqStep), t4.mainSeqState && t4.mainSeqState !== this.__slideState.mainSeqState && (r3 = true, this.__slideState.mainSeqState = t4.mainSeqState), r3 && this.setMainSeqStep(this.__slideState.mainSeqStep, this.__slideState.mainSeqState === "idle" ? "start" : "end"), t4.mediaState && (this.initMedia(t4), this.__slideState.mediaState = t4.mediaState), t4.interactiveSeqState && (this.initInteractiveSeq(t4), this.__slideState.interactiveSeqState = t4.interactiveSeqState), this.isSyncingSlideState = false, [2];
@@ -35125,19 +35160,19 @@ void main(void){
35125
35160
  });
35126
35161
  }, e3.prototype.initInteractiveSeq = function(t4) {
35127
35162
  var e4;
35128
- for (var n3 in t4.interactiveSeqState) {
35129
- var i3 = t4.interactiveSeqState[n3];
35130
- (e4 = this.player) === null || e4 === void 0 || e4.setInteractiveSeqState(n3, i3.step, i3.state === "end" ? "end" : "start");
35163
+ for (var n4 in t4.interactiveSeqState) {
35164
+ var i3 = t4.interactiveSeqState[n4];
35165
+ (e4 = this.player) === null || e4 === void 0 || e4.setInteractiveSeqState(n4, i3.step, i3.state === "end" ? "end" : "start");
35131
35166
  }
35132
35167
  }, e3.prototype.initMedia = function(t4) {
35133
- var e4, n3, i3 = this, r3 = function(r4) {
35168
+ var e4, n4, i3 = this, r3 = function(r4) {
35134
35169
  var s4 = t4.mediaState[r4], a2 = o2.__slideState.mediaState[r4];
35135
35170
  if (a2 && s4.type === a2.type && s4.time === a2.time)
35136
35171
  return "continue";
35137
35172
  s4.type === "play" ? (e4 = o2.player) === null || e4 === void 0 || e4.setMediaState(r4, true).then(function() {
35138
35173
  var t5, e5 = i3.timestamp();
35139
35174
  (t5 = i3.player) === null || t5 === void 0 || t5.setMediaCurrentTime(r4, (e5 - s4.time) / 1e3);
35140
- }) : (n3 = o2.player) === null || n3 === void 0 || n3.setMediaState(r4, false).then(function() {
35175
+ }) : (n4 = o2.player) === null || n4 === void 0 || n4.setMediaState(r4, false).then(function() {
35141
35176
  var t5;
35142
35177
  (t5 = i3.player) === null || t5 === void 0 || t5.setMediaCurrentTime(r4, s4.time);
35143
35178
  });
@@ -35147,9 +35182,9 @@ void main(void){
35147
35182
  }, Object.defineProperty(e3.prototype, "slideCount", { get: function() {
35148
35183
  return this._slideCount;
35149
35184
  }, enumerable: false, configurable: true }), e3.prototype.getSizeAsync = function() {
35150
- return eI(this, void 0, void 0, function() {
35185
+ return oI(this, void 0, void 0, function() {
35151
35186
  var t4;
35152
- return nI(this, function(e4) {
35187
+ return sI(this, function(e4) {
35153
35188
  switch (e4.label) {
35154
35189
  case 0:
35155
35190
  if (this.width > 0 && this.height > 0)
@@ -35169,8 +35204,8 @@ void main(void){
35169
35204
  });
35170
35205
  });
35171
35206
  }, e3.prototype.getSlideCountAsync = function() {
35172
- return eI(this, void 0, void 0, function() {
35173
- return nI(this, function(t4) {
35207
+ return oI(this, void 0, void 0, function() {
35208
+ return sI(this, function(t4) {
35174
35209
  switch (t4.label) {
35175
35210
  case 0:
35176
35211
  if (this._slideCount > 0)
@@ -35222,22 +35257,22 @@ void main(void){
35222
35257
  }, enumerable: false, configurable: true }), e3.prototype.updateRenderOption = function(t4) {
35223
35258
  this.player && (this.player.updateConfig(t4), this.renderOptions && (this.config.renderOptions = this.renderOptions));
35224
35259
  }, e3.prototype.setResource = function(t4, e4) {
35225
- var n3;
35226
- this.taskId = t4, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(t4, e4), this.__slideState.taskId = t4, this.__slideState.url = e4, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t4, url: e4 });
35260
+ var n4;
35261
+ this.taskId = t4, (n4 = this.player) === null || n4 === void 0 || n4.setResourceData(t4, e4), this.__slideState.taskId = t4, this.__slideState.url = e4, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t4, url: e4 });
35227
35262
  }, e3.prototype._renderSlide = function(t4) {
35228
35263
  var e4;
35229
- return eI(this, void 0, void 0, function() {
35230
- var n3 = this;
35231
- return nI(this, function(i3) {
35264
+ return oI(this, void 0, void 0, function() {
35265
+ var n4 = this;
35266
+ return sI(this, function(i3) {
35232
35267
  switch (i3.label) {
35233
35268
  case 0:
35234
- return this.renderingIndex = t4, this.player && t4 === this.player.currentIndex ? [2] : (($R.platform.isIOS() || $R.platform.isAndroid()) && this.iosResetCache.indexOf(t4) < 0 && this.iosResetCache.push(t4), [4, (e4 = this.player) === null || e4 === void 0 ? void 0 : e4.renderSlide(t4)]);
35269
+ return this.renderingIndex = t4, this.player && t4 === this.player.currentIndex ? [2] : ((KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.indexOf(t4) < 0 && this.iosResetCache.push(t4), [4, (e4 = this.player) === null || e4 === void 0 ? void 0 : e4.renderSlide(t4)]);
35235
35270
  case 1:
35236
35271
  return i3.sent(), this.__slideState.currentSlideIndex = t4, this.resizeView(), this.__slideState.interactiveSeqState = {}, this.emitStateChange(), setTimeout(function() {
35237
35272
  var t5, e5;
35238
- if (((e5 = (t5 = n3.player) === null || t5 === void 0 ? void 0 : t5.view) === null || e5 === void 0 ? void 0 : e5.style.visibility) === "hidden" && (n3.player.view.style.visibility = "visible"), n3.frame.style.visibility === "hidden" && (n3.frame.style.visibility = "visible"), n3.needClearCacheImage)
35273
+ if (((e5 = (t5 = n4.player) === null || t5 === void 0 ? void 0 : t5.view) === null || e5 === void 0 ? void 0 : e5.style.visibility) === "hidden" && (n4.player.view.style.visibility = "visible"), n4.frame.style.visibility === "hidden" && (n4.frame.style.visibility = "visible"), n4.needClearCacheImage)
35239
35274
  try {
35240
- n3.frame.removeChild(n3.cacheImage);
35275
+ n4.frame.removeChild(n4.cacheImage);
35241
35276
  } catch (t6) {
35242
35277
  }
35243
35278
  }, 100), [2];
@@ -35246,21 +35281,21 @@ void main(void){
35246
35281
  });
35247
35282
  }, e3.prototype.renderSlide = function(t4, e4) {
35248
35283
  if (e4 === void 0 && (e4 = true), this.player) {
35249
- var n3 = Number(t4);
35250
- (n3 !== this.player.currentIndex || this.renderingTaskManager.hasStartTask()) && (n3 > this.slideCount && this.slideCount > 0 || this.poseRenderSlide(n3, e4));
35284
+ var n4 = Number(t4);
35285
+ (n4 !== this.player.currentIndex || this.renderingTaskManager.hasStartTask()) && (n4 > this.slideCount && this.slideCount > 0 || this.poseRenderSlide(n4, e4));
35251
35286
  }
35252
35287
  }, e3.prototype.needCreateNewPlayer = function() {
35253
- var t4 = $R.platform.isLowGpuMemory() ? 15 : 30;
35254
- return ($R.platform.isIOS() || $R.platform.isAndroid()) && this.iosResetCache.length > t4;
35288
+ var t4 = KR.platform.isLowGpuMemory() ? 15 : 30;
35289
+ return (KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.length > t4;
35255
35290
  }, e3.prototype.poseRenderSlide = function(t4, e4) {
35256
35291
  this.mode === "interactive" ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t4, isForward: e4 }) : this.mode === "sync" ? (this.doRenderSlide(t4, e4), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t4, isForward: e4 })) : this.doRenderSlide(t4, e4);
35257
35292
  }, e3.prototype.doRenderSlide = function(t4, e4) {
35258
- var n3, i3, r3, o2 = this;
35293
+ var n4, i3, r3, o2 = this;
35259
35294
  if (e4 === void 0 && (e4 = true), !this.player)
35260
35295
  return Promise.resolve();
35261
35296
  if (this.needCreateNewPlayer() && (this.iosResetCache = [], this.iosNewPlayer = this.initPlayer(this.config), this.iosNewPlayer.setResourceData(this.__slideState.taskId, this.__slideState.url)), this.iosNewPlayer) {
35262
35297
  var s3 = this.player.getSnapshot();
35263
- this.cacheImage.src = s3, this.frame.appendChild(this.cacheImage), this.player.destroy(), (n3 = this.playerController) === null || n3 === void 0 || n3.destroy(), this.player = this.iosNewPlayer, this.iosNewPlayer = void 0, ((i3 = this.config) === null || i3 === void 0 ? void 0 : i3.controller) && this.createController(), this.needClearCacheImage = true, ((r3 = this == null ? void 0 : this.player) === null || r3 === void 0 ? void 0 : r3.view) && (this.player.view.style.visibility = "hidden", this.frame.appendChild(this.player.view));
35298
+ this.cacheImage.src = s3, this.frame.appendChild(this.cacheImage), this.player.destroy(), (n4 = this.playerController) === null || n4 === void 0 || n4.destroy(), this.player = this.iosNewPlayer, this.iosNewPlayer = void 0, ((i3 = this.config) === null || i3 === void 0 ? void 0 : i3.controller) && this.createController(), this.needClearCacheImage = true, ((r3 = this == null ? void 0 : this.player) === null || r3 === void 0 ? void 0 : r3.view) && (this.player.view.style.visibility = "hidden", this.frame.appendChild(this.player.view));
35264
35299
  }
35265
35300
  var a2 = Math.random().toString(32).substr(2);
35266
35301
  return this.player.isForward = e4, this.renderingTaskManager.addTask(function() {
@@ -35289,18 +35324,18 @@ void main(void){
35289
35324
  }, e3.prototype.emitStateChange = function() {
35290
35325
  if (this.mode !== "local" && !this.isSyncingSlideState) {
35291
35326
  var t4 = this.slideState;
35292
- !Object(l.isEqual)(this.lastEmitedState, t4) && this.isSlideStateReady(t4) && (this.lastEmitedState = t4, this.emit(sI.stateChange, t4), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
35327
+ !Object(l.isEqual)(this.lastEmitedState, t4) && this.isSlideStateReady(t4) && (this.lastEmitedState = t4, this.emit(hI.stateChange, t4), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
35293
35328
  }
35294
35329
  }, e3.prototype.emitSyncDispatch = function(t4) {
35295
35330
  if (!this.lock.isLocked(t4.type)) {
35296
35331
  var e4 = Math.random().toString(32).substr(2);
35297
35332
  this.lock.addLock(t4.type, e4);
35298
- var n3 = tI(tI({}, t4), { uuid: e4 });
35299
- this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(sI.syncDispatch, n3), this.logger.info("sync dispatch " + JSON.stringify(n3), this.taskId);
35333
+ var n4 = iI(iI({}, t4), { uuid: e4 });
35334
+ this.config.mode === "sync" && (n4.incrId = this.dispatchIncrId), this.emit(hI.syncDispatch, n4), this.logger.info("sync dispatch " + JSON.stringify(n4), this.taskId);
35300
35335
  }
35301
35336
  }, e3.prototype.setMainSeqStep = function(t4, e4) {
35302
- var n3;
35303
- (n3 = this.player) === null || n3 === void 0 || n3.setMainSeqStep(t4, e4);
35337
+ var n4;
35338
+ (n4 = this.player) === null || n4 === void 0 || n4.setMainSeqStep(t4, e4);
35304
35339
  }, e3.prototype.setInteractive = function(t4) {
35305
35340
  var e4;
35306
35341
  this.interactive = t4, (e4 = this.player) === null || e4 === void 0 || e4.setInteractive(t4);
@@ -35312,17 +35347,17 @@ void main(void){
35312
35347
  (t4 = this.player) === null || t4 === void 0 || t4.resume();
35313
35348
  }, e3.prototype._doFrozen = function() {
35314
35349
  var t4;
35315
- return eI(this, void 0, void 0, function() {
35316
- var e4, n3, i3, r3 = this;
35317
- return nI(this, function(o2) {
35350
+ return oI(this, void 0, void 0, function() {
35351
+ var e4, n4, i3, r3 = this;
35352
+ return sI(this, function(o2) {
35318
35353
  switch (o2.label) {
35319
35354
  case 0:
35320
35355
  return this.view && this.player ? [4, this.player.clock.waitUntil(function() {
35321
35356
  return !r3.isLoading;
35322
35357
  }, 6e4)] : [3, 2];
35323
35358
  case 1:
35324
- for (n3 in o2.sent(), e4 = this.player.getSnapshot() || "", this.cacheImage.src = e4, this.frame.appendChild(this.cacheImage), this.player.destroy(), (t4 = this.playerController) === null || t4 === void 0 || t4.destroy(), this.player = void 0, this.__slideState.mediaState)
35325
- i3 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = tI(tI({}, i3), { frozenTime: this.timestamp() });
35359
+ for (n4 in o2.sent(), e4 = this.player.getSnapshot() || "", this.cacheImage.src = e4, this.frame.appendChild(this.cacheImage), this.player.destroy(), (t4 = this.playerController) === null || t4 === void 0 || t4.destroy(), this.player = void 0, this.__slideState.mediaState)
35360
+ i3 = this.__slideState.mediaState[n4], this.__slideState.mediaState[n4] = iI(iI({}, i3), { frozenTime: this.timestamp() });
35326
35361
  o2.label = 2;
35327
35362
  case 2:
35328
35363
  return [2];
@@ -35336,16 +35371,16 @@ void main(void){
35336
35371
  });
35337
35372
  }, e3.prototype._doRelease = function() {
35338
35373
  var t4, e4;
35339
- return eI(this, void 0, void 0, function() {
35340
- var n3, i3, r3, o2;
35341
- return nI(this, function(s3) {
35374
+ return oI(this, void 0, void 0, function() {
35375
+ var n4, i3, r3, o2;
35376
+ return sI(this, function(s3) {
35342
35377
  switch (s3.label) {
35343
35378
  case 0:
35344
35379
  if (this.player)
35345
35380
  return [2];
35346
- for (i3 in this.player = this.initPlayer(this.config), ((t4 = this.config) === null || t4 === void 0 ? void 0 : t4.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)(aI), n3.mediaState)
35347
- (r3 = n3.mediaState[i3]).type === "play" && (o2 = Math.max((e4 = r3.frozenTime) !== null && e4 !== void 0 ? e4 : 0, r3.time), r3.time = this.timestamp() - (o2 - r3.time), r3.frozenTime = void 0);
35348
- return [4, this.setSlideState(n3)];
35381
+ for (i3 in this.player = this.initPlayer(this.config), ((t4 = this.config) === null || t4 === void 0 ? void 0 : t4.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n4 = this.__slideState, this.__slideState = Object(l.cloneDeep)(cI), n4.mediaState)
35382
+ (r3 = n4.mediaState[i3]).type === "play" && (o2 = Math.max((e4 = r3.frozenTime) !== null && e4 !== void 0 ? e4 : 0, r3.time), r3.time = this.timestamp() - (o2 - r3.time), r3.frozenTime = void 0);
35383
+ return [4, this.setSlideState(n4)];
35349
35384
  case 1:
35350
35385
  return s3.sent(), [4, this.player.clock.delay(333)];
35351
35386
  case 2:
@@ -35364,8 +35399,8 @@ void main(void){
35364
35399
  return t4._doRelease();
35365
35400
  });
35366
35401
  }, e3.prototype._doDestroy = function() {
35367
- var t4, e4, n3, i3;
35368
- this.logger.info("do destroy slide", ""), this.playerController && this.playerController.destroy(), this.frameResizeObserver.disconnect(), (t4 = this.player) === null || t4 === void 0 || t4.removeAllListeners(), (e4 = this.player) === null || e4 === void 0 || e4.destroy(), (n3 = this.player) === null || n3 === void 0 || n3.removeAllListeners(), this.logger = { warn: function() {
35402
+ var t4, e4, n4, i3;
35403
+ this.logger.info("do destroy slide", ""), this.playerController && this.playerController.destroy(), this.frameResizeObserver.disconnect(), (t4 = this.player) === null || t4 === void 0 || t4.removeAllListeners(), (e4 = this.player) === null || e4 === void 0 || e4.destroy(), (n4 = this.player) === null || n4 === void 0 || n4.removeAllListeners(), this.logger = { warn: function() {
35369
35404
  return {};
35370
35405
  }, info: function() {
35371
35406
  return {};
@@ -35377,14 +35412,14 @@ void main(void){
35377
35412
  } catch (t5) {
35378
35413
  }
35379
35414
  }, e3.prototype.waitLoadEnd = function() {
35380
- return eI(this, void 0, void 0, function() {
35415
+ return oI(this, void 0, void 0, function() {
35381
35416
  var t4;
35382
- return nI(this, function(e4) {
35417
+ return sI(this, function(e4) {
35383
35418
  switch (e4.label) {
35384
35419
  case 0:
35385
35420
  t4 = 0, e4.label = 1;
35386
35421
  case 1:
35387
- return this.isLoading && t4 < 10 ? [4, rI(100)] : [3, 3];
35422
+ return this.isLoading && t4 < 10 ? [4, lI(100)] : [3, 3];
35388
35423
  case 2:
35389
35424
  return e4.sent(), t4 += 1, [3, 1];
35390
35425
  case 3:
@@ -35403,45 +35438,130 @@ void main(void){
35403
35438
  }, e3.prototype.hasNextStep = function() {
35404
35439
  if (!this.player)
35405
35440
  return false;
35406
- var t4 = this.player.currentIndex === this.slideCount, e4 = this.mainSeqLength === 0 || this.mainSeqStep >= this.mainSeqLength - 1, n3 = this.mainSeqState === "end" || this.mainSeqState === "running" || this.mainSeqState == null;
35407
- return !(t4 && e4 && n3);
35441
+ var t4 = this.player.currentIndex === this.slideCount, e4 = this.mainSeqLength === 0 || this.mainSeqStep >= this.mainSeqLength - 1, n4 = this.mainSeqState === "end" || this.mainSeqState === "running" || this.mainSeqState == null;
35442
+ return !(t4 && e4 && n4);
35408
35443
  }, e3.prototype.hasPrevStep = function() {
35409
35444
  if (!this.player)
35410
35445
  return false;
35411
- var t4 = this.player.currentIndex === 1, e4 = this.mainSeqLength === 0 || this.mainSeqStep === 0, n3 = this.mainSeqState === "idle" || this.mainSeqState === null;
35412
- return !(t4 && e4 && n3);
35446
+ var t4 = this.player.currentIndex === 1, e4 = this.mainSeqLength === 0 || this.mainSeqStep === 0, n4 = this.mainSeqState === "idle" || this.mainSeqState === null;
35447
+ return !(t4 && e4 && n4);
35413
35448
  }, e3.clearLocalCache = function() {
35414
- $R.clearLocalCache();
35449
+ KR.clearLocalCache();
35415
35450
  }, e3.disposeLocalCache = function() {
35416
- }, e3._tempLog = "", e3._tempLogIndex = 1, e3.handleLogDownload = function() {
35417
- return eI(void 0, void 0, void 0, function() {
35418
- var t4, e4, n3, i3, r3, o2, s3;
35419
- return nI(this, function(a2) {
35451
+ }, e3._tempLog = "", e3._tempLogIndex = 1, e3.usePlugin = tP, e3.handleLogDownload = function() {
35452
+ return oI(void 0, void 0, void 0, function() {
35453
+ var t4, e4, n4, i3, r3, o2, s3;
35454
+ return sI(this, function(a2) {
35420
35455
  switch (a2.label) {
35421
35456
  case 0:
35422
- return t4 = "", uI ? [4, uI.keys()] : [3, 5];
35457
+ return t4 = "", pI ? [4, pI.keys()] : [3, 5];
35423
35458
  case 1:
35424
35459
  e4 = (a2.sent() || []).sort(function(t5, e5) {
35425
35460
  return parseInt(t5.replace("run_time_log_", "")) - parseInt(e5.replace("run_time_log_", ""));
35426
- }), n3 = 0, i3 = e4, a2.label = 2;
35461
+ }), n4 = 0, i3 = e4, a2.label = 2;
35427
35462
  case 2:
35428
- return n3 < i3.length ? (r3 = i3[n3], o2 = t4, [4, uI.getItem(r3)]) : [3, 5];
35463
+ return n4 < i3.length ? (r3 = i3[n4], o2 = t4, [4, pI.getItem(r3)]) : [3, 5];
35429
35464
  case 3:
35430
35465
  t4 = o2 + (a2.sent() || ""), a2.label = 4;
35431
35466
  case 4:
35432
- return n3++, [3, 2];
35467
+ return n4++, [3, 2];
35433
35468
  case 5:
35434
35469
  return (s3 = document.createElement("a")).setAttribute("href", "data:text/plain;charset=utf-8," + encodeURIComponent(t4)), s3.setAttribute("download", "slide_log"), s3.style.display = "none", document.body.appendChild(s3), s3.click(), document.body.removeChild(s3), window.__slideLogText = t4, [2];
35435
35470
  }
35436
35471
  });
35437
35472
  });
35438
- }, e3;
35473
+ }, rI([(n3 = "Slide.initConfig", function(t4, e4, i3) {
35474
+ var r3 = i3.value;
35475
+ i3.value = function() {
35476
+ for (var t5 = [], e5 = 0; e5 < arguments.length; e5++)
35477
+ t5[e5] = arguments[e5];
35478
+ for (var i4 = QR.get(n3) || [], o2 = t5, s3 = 0, a2 = i4; s3 < a2.length; s3++) {
35479
+ var l2 = a2[s3];
35480
+ try {
35481
+ o2 = l2.before(o2);
35482
+ } catch (t6) {
35483
+ }
35484
+ if (!Array.isArray(o2) || o2.length !== t5.length)
35485
+ throw new Error("plugin before hook return invalid args");
35486
+ }
35487
+ for (var u2 = r3.bind(this).apply(void 0, o2), h2 = 0, c2 = i4.reverse(); h2 < c2.length; h2++) {
35488
+ l2 = c2[h2];
35489
+ try {
35490
+ u2 = l2.after(u2);
35491
+ } catch (t6) {
35492
+ }
35493
+ if (!u2)
35494
+ throw new Error("plugin after hook return undefined result");
35495
+ }
35496
+ return u2;
35497
+ };
35498
+ })], e3.prototype, "initSlideConfig", null), e3;
35439
35499
  }(a.a);
35440
- uI == null || uI.clear(), window.addEventListener("__slide_log__", hI.handleLogDownload), window.setInterval(function() {
35441
- hI.flushLog().catch(function() {
35500
+ pI == null || pI.clear(), window.addEventListener("__slide_log__", fI.handleLogDownload), window.setInterval(function() {
35501
+ fI.flushLog().catch(function() {
35442
35502
  });
35443
35503
  }, 9e3);
35444
35504
  }]);
35505
+ const s = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e = s.length, t = Array(20), i = () => {
35506
+ for (let i2 = 0; i2 < 20; i2++)
35507
+ t[i2] = s.charAt(Math.random() * e);
35508
+ return t.join("");
35509
+ };
35510
+ function r(s2) {
35511
+ try {
35512
+ return s2();
35513
+ } catch (e2) {
35514
+ console.error(e2);
35515
+ }
35516
+ }
35517
+ class n {
35518
+ constructor() {
35519
+ this.disposers = /* @__PURE__ */ new Map();
35520
+ }
35521
+ addDisposer(s2, e2 = this.genUID()) {
35522
+ return this.flush(e2), this.disposers.set(e2, Array.isArray(s2) ? () => s2.forEach(r) : s2), e2;
35523
+ }
35524
+ add(s2, e2 = this.genUID()) {
35525
+ const t2 = s2();
35526
+ return t2 ? this.addDisposer(t2, e2) : e2;
35527
+ }
35528
+ addEventListener(s2, e2, t2, i2, r2 = this.genUID()) {
35529
+ return s2.addEventListener(e2, t2, i2), this.addDisposer(() => s2.removeEventListener(e2, t2, i2), r2), r2;
35530
+ }
35531
+ setTimeout(s2, e2, t2 = this.genUID()) {
35532
+ const i2 = window.setTimeout(() => {
35533
+ this.remove(t2), s2();
35534
+ }, e2);
35535
+ return this.addDisposer(() => window.clearTimeout(i2), t2);
35536
+ }
35537
+ setInterval(s2, e2, t2 = this.genUID()) {
35538
+ const i2 = window.setInterval(s2, e2);
35539
+ return this.addDisposer(() => window.clearInterval(i2), t2);
35540
+ }
35541
+ remove(s2) {
35542
+ const e2 = this.disposers.get(s2);
35543
+ return this.disposers.delete(s2), e2;
35544
+ }
35545
+ flush(s2) {
35546
+ const e2 = this.remove(s2);
35547
+ if (e2)
35548
+ try {
35549
+ e2();
35550
+ } catch (t2) {
35551
+ console.error(t2);
35552
+ }
35553
+ }
35554
+ flushAll() {
35555
+ this.disposers.forEach(r), this.disposers.clear();
35556
+ }
35557
+ genUID() {
35558
+ let s2;
35559
+ do {
35560
+ s2 = i();
35561
+ } while (this.disposers.has(s2));
35562
+ return s2;
35563
+ }
35564
+ }
35445
35565
  function clamp$1(value, min, max) {
35446
35566
  return Math.min(Math.max(value, min), max);
35447
35567
  }
@@ -36150,7 +36270,8 @@ class SlideController {
36150
36270
  return this.slide.slideState.currentSlideIndex;
36151
36271
  }
36152
36272
  createSlide(anchor) {
36153
- var _a, _b, _c, _d, _e, _f, _g, _h;
36273
+ var _a, _b;
36274
+ const options = this.context.getAppOptions() || {};
36154
36275
  const slide = new Slide.Slide({
36155
36276
  anchor,
36156
36277
  interactive: true,
@@ -36159,13 +36280,21 @@ class SlideController {
36159
36280
  controller: logger.enable,
36160
36281
  enableGlobalClick: true,
36161
36282
  renderOptions: {
36162
- minFPS: ((_a = this.context.getAppOptions()) == null ? void 0 : _a.minFPS) || 25,
36163
- maxFPS: ((_b = this.context.getAppOptions()) == null ? void 0 : _b.maxFPS) || 30,
36164
- autoFPS: (_d = (_c = this.context.getAppOptions()) == null ? void 0 : _c.autoFPS) != null ? _d : true,
36165
- autoResolution: (_f = (_e = this.context.getAppOptions()) == null ? void 0 : _e.autoResolution) != null ? _f : true,
36166
- resolution: (_g = this.context.getAppOptions()) == null ? void 0 : _g.resolution,
36167
- transactionBgColor: ((_h = this.context.getAppOptions()) == null ? void 0 : _h.bgColor) || cachedGetBgColor(anchor)
36283
+ minFPS: options.minFPS || 25,
36284
+ maxFPS: options.maxFPS || 30,
36285
+ autoFPS: (_a = options.autoFPS) != null ? _a : true,
36286
+ autoResolution: (_b = options.autoResolution) != null ? _b : true,
36287
+ resolution: options.resolution,
36288
+ transactionBgColor: options.bgColor || cachedGetBgColor(anchor),
36289
+ maxResolutionLevel: options.maxResolutionLevel
36168
36290
  },
36291
+ fixedFrameSize: options.fixedFrameSize,
36292
+ loaderDelegate: options.loaderDelegate,
36293
+ navigatorDelegate: options.navigatorDelegate,
36294
+ resourceTimeout: options.resourceTimeout,
36295
+ rtcAudio: options.rtcAudio,
36296
+ useLocalCache: options.useLocalCache,
36297
+ logger: options.logger,
36169
36298
  timestamp: this.timestamp
36170
36299
  });
36171
36300
  return slide;
@@ -37535,7 +37664,8 @@ class SlidePreviewer {
37535
37664
  return `${this.namespace}-${className}`;
37536
37665
  }
37537
37666
  }
37538
- const version = "0.2.3";
37667
+ const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
37668
+ const version = "0.2.6-alpha.0";
37539
37669
  const SlideApp = {
37540
37670
  kind: "Slide",
37541
37671
  setup(context) {
@@ -37693,5 +37823,6 @@ const SlideApp = {
37693
37823
  };
37694
37824
  }
37695
37825
  };
37696
- export { DefaultUrl, FreezerLength, SlidePreviewer, addHooks, apps, SlideApp as default, previewSlide, version };
37826
+ var Slide$1 = Slide.Slide;
37827
+ export { DefaultUrl, FreezerLength, Slide$1 as Slide, SlidePreviewer, addHooks, apps, SlideApp as default, previewSlide, usePlugin, version };
37697
37828
  //# sourceMappingURL=main.es.js.map