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

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
@@ -6491,13 +6491,13 @@ var Slide = function(t) {
6491
6491
  n.r(e), n.d(e, "ErrorType", function() {
6492
6492
  return VE;
6493
6493
  }), n.d(e, "delay", function() {
6494
- return lI;
6495
- }), n.d(e, "waitUntil", function() {
6496
6494
  return uI;
6497
- }), n.d(e, "SLIDE_EVENTS", function() {
6495
+ }), n.d(e, "waitUntil", function() {
6498
6496
  return hI;
6497
+ }), n.d(e, "SLIDE_EVENTS", function() {
6498
+ return cI;
6499
6499
  }), n.d(e, "Slide", function() {
6500
- return fI;
6500
+ return mI;
6501
6501
  });
6502
6502
  var i = {};
6503
6503
  n.r(i), n.d(i, "ACESFilmicToneMapping", function() {
@@ -29473,26 +29473,26 @@ void main() {
29473
29473
  return this.object.hitArea ? this.object.hitArea : new g_(0, 0, this.object.width, this.object.height);
29474
29474
  }
29475
29475
  handleAction(t2, e2 = false) {
29476
- this.proxy && !e2 || (this.ctx.eventHub.emit($R.hyperlinkTrigger, t2), this.execAction(t2));
29476
+ this.proxy && !e2 || (this.ctx.eventHub.emit(KR.hyperlinkTrigger, t2), this.execAction(t2));
29477
29477
  }
29478
29478
  execAction(t2) {
29479
29479
  var e2;
29480
- if (this.ctx.eventHub.emit($R.userInput), t2.action === "ppaction://hlinksldjump") {
29480
+ if (this.ctx.eventHub.emit(KR.userInput), t2.action === "ppaction://hlinksldjump") {
29481
29481
  const n2 = ((e2 = t2 == null ? void 0 : t2.target) !== null && e2 !== void 0 ? e2 : "").match(/slide(\d+)\.xml/);
29482
- n2 && n2[1] && this.ctx.eventHub.emit($R.requestGotoSlide, Number(n2[1]));
29482
+ n2 && n2[1] && this.ctx.eventHub.emit(KR.requestGotoSlide, Number(n2[1]));
29483
29483
  } else if (t2.action === "ppaction://hlinkshowjump?jump=nextslide")
29484
- this.ctx.eventHub.emit($R.requestNextSlide);
29484
+ this.ctx.eventHub.emit(KR.requestNextSlide);
29485
29485
  else if (t2.action === "ppaction://hlinkshowjump?jump=previousslide")
29486
- this.ctx.eventHub.emit($R.requestPrevSlide);
29486
+ this.ctx.eventHub.emit(KR.requestPrevSlide);
29487
29487
  else if (t2.action === "ppaction://hlinkshowjump?jump=firstslide")
29488
- this.ctx.eventHub.emit($R.requestGotoSlide, 1);
29488
+ this.ctx.eventHub.emit(KR.requestGotoSlide, 1);
29489
29489
  else if (t2.action === "ppaction://hlinkshowjump?jump=lastslide")
29490
- this.ctx.eventHub.emit($R.requestGotoSlide, -1);
29490
+ this.ctx.eventHub.emit(KR.requestGotoSlide, -1);
29491
29491
  else if (t2.action === "ppaction://hlinkshowjump?jump=lastslideviewed") {
29492
29492
  const t3 = this.ctx.lastViewedIndex;
29493
- this.ctx.eventHub.emit($R.requestGotoSlide, t3);
29493
+ this.ctx.eventHub.emit(KR.requestGotoSlide, t3);
29494
29494
  } else
29495
- t2.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit($R.requestGotoSlide, -1);
29495
+ t2.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit(KR.requestGotoSlide, -1);
29496
29496
  }
29497
29497
  }
29498
29498
  class PM {
@@ -31000,7 +31000,7 @@ void main(void){
31000
31000
  return void this.ctx.logger.info("Media controller prevent seek event with paused state", this.ctx.taskId);
31001
31001
  t3.stopPropagation();
31002
31002
  const e3 = t3.offsetX / this.progress.clientWidth * this.duration;
31003
- this.medianIsEnd = false, this.ctx.mode !== "interactive" && this.jumpToTime(e3), this.ctx.mode !== "local" && this.ctx.eventHub.emit($R.mediaSeek, { id: this.targetId, time: e3, isPlaying: this.media.isPlaying });
31003
+ this.medianIsEnd = false, this.ctx.mode !== "interactive" && this.jumpToTime(e3), this.ctx.mode !== "local" && this.ctx.eventHub.emit(KR.mediaSeek, { id: this.targetId, time: e3, isPlaying: this.media.isPlaying });
31004
31004
  }, this.jumpToTime = (t3 = 0) => {
31005
31005
  const e3 = Math.floor(t3) + this.start;
31006
31006
  this.media.currentTime !== e3 && (this.media.currentTime = e3, this.changeBookmarkIndex(e3, e3 > this.media.currentTime));
@@ -31029,9 +31029,9 @@ void main(void){
31029
31029
  t3();
31030
31030
  });
31031
31031
  }, this.playMediaFromCtrl = () => {
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 }));
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(KR.mediaPlay, { id: this.targetId, time: this.media.currentTime - this.start }));
31033
31033
  }, this.pauseMediaFromCtrl = () => {
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 }));
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(KR.mediaPause, { id: this.targetId, time: this.media.currentTime - this.start }));
31035
31035
  }, this.targetId = t2.targetId, this.ctx = t2.ctx, this.height = t2.height, this.width = t2.width, this.target = t2.target, this.media = t2.media, this.info = t2.info, this.shapeId = t2.shapeId, this.canvasElement = t2.canvasElement, this.getMedianContainer(), this.createMediaController(), this.info.cut && (this.start = (e2 = this.info.cut.start) !== null && e2 !== void 0 ? e2 : 0, this.end = (n2 = this.info.cut.end) !== null && n2 !== void 0 ? n2 : 0), this.info.bookmarkList && (this.bookmarkList = this.info.bookmarkList.sort((t3, e3) => t3.time - e3.time));
31036
31036
  }
31037
31037
  getMedianContainer() {
@@ -31144,7 +31144,7 @@ void main(void){
31144
31144
  };
31145
31145
  class XA extends a.a {
31146
31146
  constructor(t2, e2) {
31147
- super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this._isResourceExist = "unknow", this.url = t2, this.runningAudio = e2, KR.RtcAudioClazz ? (this.rctClient = new KR.RtcAudioClazz(t2), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new VA.Howl({ src: [t2] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play"))), this.detectResourceExist();
31147
+ super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this._isResourceExist = "unknow", this.url = t2, this.runningAudio = e2, QR.RtcAudioClazz ? (this.rctClient = new QR.RtcAudioClazz(t2), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new VA.Howl({ src: [t2] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play"))), this.detectResourceExist();
31148
31148
  }
31149
31149
  startTimeChangeEmit() {
31150
31150
  this.currentTime !== this.lastTime && (this.lastTime = this.currentTime, this.emit("timeupdate")), this.isEnded || setTimeout(() => this.startTimeChangeEmit(), 300);
@@ -31200,6 +31200,9 @@ void main(void){
31200
31200
  get isPaused() {
31201
31201
  return this.rctClient ? this.rctClient.isPaused : !!this.howl && this.howl.playing();
31202
31202
  }
31203
+ volume(t2) {
31204
+ this.rctClient ? this.rctClient.volume(t2) : this.howl && this.howl.volume(t2);
31205
+ }
31203
31206
  }
31204
31207
  var qA = function(t2, e2, n2, i2) {
31205
31208
  return new (n2 || (n2 = Promise))(function(r2, o2) {
@@ -31229,7 +31232,9 @@ void main(void){
31229
31232
  class YA extends a.a {
31230
31233
  constructor(t2) {
31231
31234
  var e2, n2;
31232
- super(), this.type = "video", this.sprite = new Ow(), this.isPlaying = false, this.isGlobalPause = false, this.id = t2.id, this.start = (e2 = t2.video.cut) === null || e2 === void 0 ? void 0 : e2.start, this.end = (n2 = t2.video.cut) === null || n2 === void 0 ? void 0 : n2.end, this.container = t2.container, this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31235
+ super(), this.type = "video", this.sprite = new Ow(), this.isPlaying = false, this.isGlobalPause = false, this.updateVolume = (t3) => {
31236
+ QR.RtcAudioClazz ? this.rtcAudio.volume(t3) : this.videoResource.source && (this.videoResource.source.volume = t3);
31237
+ }, this.id = t2.id, this.start = (e2 = t2.video.cut) === null || e2 === void 0 ? void 0 : e2.start, this.end = (n2 = t2.video.cut) === null || n2 === void 0 ? void 0 : n2.end, this.container = t2.container, this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31233
31238
  let i2 = t2.video.src;
31234
31239
  this.ctx.loaderDelegate && (i2 = this.ctx.loaderDelegate.redirectMedia(i2), this.ctx.logger.info(`redirect media url from ${t2.video.src} to ${i2} by delegate.`, t2.ctx.taskId)), this.videoResource = new Iy(i2, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true });
31235
31240
  let r2 = t2.video.src.replace(/4$/, "3");
@@ -31249,14 +31254,14 @@ void main(void){
31249
31254
  this.videoResource.source.addEventListener(t3, () => {
31250
31255
  t3 !== "timeupdate" || this.isPlaying || this.pause(), this.emit(t3);
31251
31256
  });
31252
- }), this.ctx.activeMedia.add(this);
31257
+ }), this.ctx.activeMedia.add(this), this.ctx.volumeAdjuster.on("update", this.updateVolume);
31253
31258
  }
31254
31259
  get currentTime() {
31255
31260
  var t2, e2;
31256
31261
  return (e2 = (t2 = this.videoResource.source) === null || t2 === void 0 ? void 0 : t2.currentTime) !== null && e2 !== void 0 ? e2 : 0;
31257
31262
  }
31258
31263
  set currentTime(t2) {
31259
- KR.RtcAudioClazz && (this.rtcAudio.currentTime = t2), this.videoResource.source && (this.videoResource.source.currentTime = t2);
31264
+ QR.RtcAudioClazz && (this.rtcAudio.currentTime = t2), this.videoResource.source && (this.videoResource.source.currentTime = t2);
31260
31265
  }
31261
31266
  get paused() {
31262
31267
  var t2, e2;
@@ -31287,7 +31292,7 @@ void main(void){
31287
31292
  if (e2 && e2.videoWidth <= 0)
31288
31293
  return;
31289
31294
  const n2 = yield this.rtcAudio.isResourceExist();
31290
- KR.RtcAudioClazz && n2 ? (this.videoResource.source.volume = 0, this.rtcAudio.once("play", () => {
31295
+ QR.RtcAudioClazz && n2 ? (this.videoResource.source.volume = 0, this.rtcAudio.once("play", () => {
31291
31296
  var t3;
31292
31297
  (t3 = this.videoResource.source) === null || t3 === void 0 || t3.play();
31293
31298
  }), this.rtcAudio.play()) : yield (t2 = this.videoResource.source) === null || t2 === void 0 ? void 0 : t2.play();
@@ -31298,7 +31303,7 @@ void main(void){
31298
31303
  }
31299
31304
  pause() {
31300
31305
  var t2;
31301
- this.isPlaying = false, KR.RtcAudioClazz ? (this.rtcAudio.once("pause", () => {
31306
+ this.isPlaying = false, QR.RtcAudioClazz ? (this.rtcAudio.once("pause", () => {
31302
31307
  var t3;
31303
31308
  (t3 = this.videoResource.source) === null || t3 === void 0 || t3.pause();
31304
31309
  }), this.rtcAudio.pause()) : (t2 = this.videoResource.source) === null || t2 === void 0 || t2.pause();
@@ -31350,11 +31355,13 @@ void main(void){
31350
31355
  };
31351
31356
  class JA extends a.a {
31352
31357
  constructor(t2) {
31353
- super(), this.type = "audio", this.isPlaying = false, this.isGlobalPause = false, this.id = t2.id;
31358
+ super(), this.type = "audio", this.isPlaying = false, this.isGlobalPause = false, this.updateVolume = (t3) => {
31359
+ this.audioPlayer.volume(t3);
31360
+ }, this.id = t2.id;
31354
31361
  let e2 = t2.audio.src;
31355
31362
  t2.ctx.loaderDelegate && (e2 = t2.ctx.loaderDelegate.redirectMedia(e2), t2.ctx.logger.info(`redirect media url from ${t2.audio.src} to ${e2} by delegate.`, t2.ctx.taskId)), this.audioPlayer = new XA(e2, t2.ctx.runningAudio), t2.audio.cut && (this.start = t2.audio.cut.start, this.end = t2.audio.cut.end), this.ctx = t2.ctx, this.ctx.medias[this.id] = this;
31356
31363
  const { width: n2, height: i2, target: r2 } = t2;
31357
- this.controller = new jA({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, height: i2, width: n2, target: r2, media: this, info: t2.audio, canvasElement: t2.canvasElement }), this.audioPlayer.on("load", () => this.emit("durationchange")), this.audioPlayer.on("timeupdate", () => this.emit("timeupdate")), this.audioPlayer.on("pause", () => this.emit("pause")), this.audioPlayer.on("play", () => this.emit("play")), this.ctx.activeMedia.add(this);
31364
+ this.controller = new jA({ targetId: t2.id, shapeId: t2.shapeId, ctx: t2.ctx, height: i2, width: n2, target: r2, media: this, info: t2.audio, canvasElement: t2.canvasElement }), this.audioPlayer.on("load", () => this.emit("durationchange")), this.audioPlayer.on("timeupdate", () => this.emit("timeupdate")), this.audioPlayer.on("pause", () => this.emit("pause")), this.audioPlayer.on("play", () => this.emit("play")), this.ctx.activeMedia.add(this), this.ctx.volumeAdjuster.on("update", this.updateVolume);
31358
31365
  }
31359
31366
  get currentTime() {
31360
31367
  return this.audioPlayer.currentTime;
@@ -31407,7 +31414,7 @@ void main(void){
31407
31414
  this.seek(0), this.pause();
31408
31415
  }
31409
31416
  destroy() {
31410
- this.audioPlayer.pause(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31417
+ this.ctx.volumeAdjuster.removeListener("update", this.updateVolume), this.audioPlayer.pause(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
31411
31418
  }
31412
31419
  }
31413
31420
  class $A extends GA {
@@ -31613,12 +31620,12 @@ void main(void){
31613
31620
  this.currentSeqIndex = 0, this.currentSeqState = "idle";
31614
31621
  }), this.commonTimeNode.on("childTimeNodeStart", (t3) => {
31615
31622
  const e3 = this.commonTimeNode.children.findIndex((e4) => e4.commonTimeNode.uuid === t3.id);
31616
- e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit($R.mainSeqStepStart, e3);
31623
+ e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit(KR.mainSeqStepStart, e3);
31617
31624
  }), this.commonTimeNode.on("childTimeNodeEnd", (t3) => {
31618
31625
  const e3 = this.commonTimeNode.children.findIndex((e4) => e4.commonTimeNode.uuid === t3.id);
31619
31626
  e3 >= 0 && (this.currentSeqIndex = e3), this.currentSeqState = "end", this.autoPlay && this.ctx.clock.setTimeout(() => {
31620
31627
  this.handleNext();
31621
- }), this.isMainSeq && this.ctx.eventHub.emit($R.mainSeqStepEnd, e3);
31628
+ }), this.isMainSeq && this.ctx.eventHub.emit(KR.mainSeqStepEnd, e3);
31622
31629
  }), this.commonTimeNode.on("timeNodeEndSync", () => {
31623
31630
  this.isTimeNodeEndSync = true, this.commonTimeNode.resetForRepeat();
31624
31631
  }), this.commonTimeNode.on("timeNodeDestroy", () => {
@@ -31635,13 +31642,13 @@ void main(void){
31635
31642
  return this._currentSeqIndex;
31636
31643
  }
31637
31644
  set currentSeqIndex(t2) {
31638
- this._currentSeqIndex = t2, this.isMainSeq ? this.ctx.eventHub.emit($R.mainSeqStepChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit($R.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t2, state: this._currentSeqState } });
31645
+ this._currentSeqIndex = t2, this.isMainSeq ? this.ctx.eventHub.emit(KR.mainSeqStepChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit(KR.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t2, state: this._currentSeqState } });
31639
31646
  }
31640
31647
  get currentSeqState() {
31641
31648
  return this._currentSeqState;
31642
31649
  }
31643
31650
  set currentSeqState(t2) {
31644
- this._currentSeqState = t2, this.isMainSeq ? this.ctx.eventHub.emit($R.mainSeqStateChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit($R.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t2 } });
31651
+ this._currentSeqState = t2, this.isMainSeq ? this.ctx.eventHub.emit(KR.mainSeqStateChange, t2) : this.isInteractiveSeq && this.ctx.eventHub.emit(KR.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t2 } });
31645
31652
  }
31646
31653
  get stepLength() {
31647
31654
  return this.commonTimeNode.children.length;
@@ -31676,9 +31683,9 @@ void main(void){
31676
31683
  if (t3) {
31677
31684
  t3.interactiveContainer.interactive = true, t3.interactiveContainer.cursor = "pointer";
31678
31685
  const n2 = () => {
31679
- this.ctx.eventHub.emit($R.userInput);
31686
+ this.ctx.eventHub.emit(KR.userInput);
31680
31687
  const t4 = `shape ${e2} onClick`, { mode: n3 } = this.ctx;
31681
- n3 !== "interactive" && n3 !== "sync" || this.ctx.eventHub.emit($R.interactiveSeqAction, { action: t4, seqId: this.json.ctn.id }), n3 !== "sync" && n3 !== "local" || this.globalEventHub.emit(t4);
31688
+ n3 !== "interactive" && n3 !== "sync" || this.ctx.eventHub.emit(KR.interactiveSeqAction, { action: t4, seqId: this.json.ctn.id }), n3 !== "sync" && n3 !== "local" || this.globalEventHub.emit(t4);
31682
31689
  };
31683
31690
  t3.interactiveContainer.on("pointerdown", n2), this.interactiveListeners.push([t3, n2]);
31684
31691
  }
@@ -32296,7 +32303,7 @@ void main(void){
32296
32303
  startReverseTimeLine() {
32297
32304
  this.isEndEventsEmitted = false, this.timeDelta = 0;
32298
32305
  const t2 = 1e3 / this.ctx.ticker.maxFPS;
32299
- this.duration <= t2 && 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 > t2 && (this.ctx.eventHub.emit($R.animateStart), this.ctx.ticker.add(this.updateTimeLine));
32306
+ this.duration <= t2 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit(KR.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t2 && (this.ctx.eventHub.emit(KR.animateStart), this.ctx.ticker.add(this.updateTimeLine));
32300
32307
  }
32301
32308
  startTimeLine(t2 = true) {
32302
32309
  if (t2 && (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)
@@ -32305,7 +32312,7 @@ void main(void){
32305
32312
  const e2 = 1e3 / this.ctx.ticker.maxFPS;
32306
32313
  this.duration <= e2 && 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(() => {
32307
32314
  this.onTimeLineEnd();
32308
- })) : this.duration > e2 && (this.ctx.eventHub.emit($R.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
32315
+ })) : this.duration > e2 && (this.ctx.eventHub.emit(KR.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
32309
32316
  }
32310
32317
  startIterate() {
32311
32318
  return RR(this, void 0, void 0, function* () {
@@ -32413,7 +32420,7 @@ void main(void){
32413
32420
  });
32414
32421
  }
32415
32422
  dispose(t2 = false) {
32416
- this.isConflictDispose = t2, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit($R.animateEnd);
32423
+ this.isConflictDispose = t2, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit(KR.animateEnd);
32417
32424
  try {
32418
32425
  this.ctx.ticker.remove(this.updateTimeLine);
32419
32426
  } catch (t3) {
@@ -32603,9 +32610,9 @@ void main(void){
32603
32610
  }
32604
32611
  initOnReuse() {
32605
32612
  super.initOnReuse(), this.ctx.timingEventHub.on("c:prev slide", (t2) => {
32606
- this.ctx.eventHub.emit($R.requestPrevSlide, t2);
32613
+ this.ctx.eventHub.emit(KR.requestPrevSlide, t2);
32607
32614
  }), this.ctx.timingEventHub.on("c:next slide", (t2) => {
32608
- this.ctx.eventHub.emit($R.requestNextSlide, t2);
32615
+ this.ctx.eventHub.emit(KR.requestNextSlide, t2);
32609
32616
  });
32610
32617
  }
32611
32618
  get interactiveContainer() {
@@ -32692,11 +32699,11 @@ void main(void){
32692
32699
  }
32693
32700
  nextStep(t2 = false) {
32694
32701
  var e2;
32695
- this.hasTiming() && ((e2 = this.timing) === null || e2 === void 0 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t2)) : this.ctx.eventHub.emit($R.requestNextSlide, t2);
32702
+ this.hasTiming() && ((e2 = this.timing) === null || e2 === void 0 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t2)) : this.ctx.eventHub.emit(KR.requestNextSlide, t2);
32696
32703
  }
32697
32704
  prevStep(t2 = false) {
32698
32705
  var e2;
32699
- this.hasTiming() && ((e2 = this.timing) === null || e2 === void 0 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t2)) : this.ctx.eventHub.emit($R.requestPrevSlide, t2);
32706
+ this.hasTiming() && ((e2 = this.timing) === null || e2 === void 0 ? void 0 : e2.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t2)) : this.ctx.eventHub.emit(KR.requestPrevSlide, t2);
32700
32707
  }
32701
32708
  applyInteractiveAction(t2) {
32702
32709
  var e2;
@@ -32888,8 +32895,8 @@ void main(void){
32888
32895
  });
32889
32896
  };
32890
32897
  class XR {
32891
- constructor(t2, e2, n2, i2, r2, o2, s2, a2, l2, u2, h2, c2, d2) {
32892
- this.loader = t2, this.mode = e2, this.renderer = n2, this.ticker = i2, this.view = r2, this.clock = o2, this.objPoolGroup = s2, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, this.currentStageIndex = 0, this.cacheCount = VR.isDesktop() ? 2 : 1, this.stageStates = /* @__PURE__ */ Object.create(null), this.stageJsons = /* @__PURE__ */ Object.create(null), this.stageCtxs = /* @__PURE__ */ Object.create(null), this.stageImpls = /* @__PURE__ */ Object.create(null), this.taskId = "", this.url = "", this.runningAudio = /* @__PURE__ */ new Map(), this.activeMedia = /* @__PURE__ */ new Set(), this.microTaskManager = new DR(i2);
32898
+ constructor(t2, e2, n2, i2, r2, o2, s2, a2, l2, u2, h2, c2, d2, p2) {
32899
+ this.loader = t2, this.mode = e2, this.renderer = n2, this.ticker = i2, this.view = r2, this.clock = o2, this.objPoolGroup = s2, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, this.volumeAdjuster = p2, this.currentStageIndex = 0, this.cacheCount = VR.isDesktop() ? 2 : 1, this.stageStates = /* @__PURE__ */ Object.create(null), this.stageJsons = /* @__PURE__ */ Object.create(null), this.stageCtxs = /* @__PURE__ */ Object.create(null), this.stageImpls = /* @__PURE__ */ Object.create(null), this.taskId = "", this.url = "", this.runningAudio = /* @__PURE__ */ new Map(), this.activeMedia = /* @__PURE__ */ new Set(), this.microTaskManager = new DR(i2);
32893
32900
  }
32894
32901
  setResourceData(t2, e2) {
32895
32902
  this.taskId = t2, this.url = e2;
@@ -32897,7 +32904,7 @@ void main(void){
32897
32904
  createCtx(t2) {
32898
32905
  const { task: e2 } = this.stageStates[t2];
32899
32906
  e2.addMTask(() => WR(this, void 0, void 0, function* () {
32900
- const e3 = new dM(this.loader), n2 = new a.a(), i2 = { taskId: this.taskId, mode: this.mode, renderer: this.renderer, graphicsTexture: new bM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new wM(n2), eventHub: n2, view: this.view, medias: /* @__PURE__ */ Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new TM(), clock: this.clock, spriteTexture: e3, slideIndex: t2, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false, slideScopeEventHub: new a.a(), logger: this.logger, loaderDelegate: this.loaderDelegate, runningAudio: this.runningAudio, activeMedia: this.activeMedia, isPlayerPaused: this.isPlayerPaused, timingEventHub: new a.a(), maxResolution: this.maxResolution, animatedIds: /* @__PURE__ */ new Set() };
32907
+ const e3 = new dM(this.loader), n2 = new a.a(), i2 = { taskId: this.taskId, mode: this.mode, renderer: this.renderer, graphicsTexture: new bM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new wM(n2), eventHub: n2, view: this.view, medias: /* @__PURE__ */ Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new TM(), clock: this.clock, spriteTexture: e3, slideIndex: t2, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false, slideScopeEventHub: new a.a(), logger: this.logger, loaderDelegate: this.loaderDelegate, runningAudio: this.runningAudio, activeMedia: this.activeMedia, isPlayerPaused: this.isPlayerPaused, timingEventHub: new a.a(), maxResolution: this.maxResolution, animatedIds: /* @__PURE__ */ new Set(), volumeAdjuster: this.volumeAdjuster };
32901
32908
  this.stageCtxs[t2] = i2;
32902
32909
  }), "@StagePool[createCtx]");
32903
32910
  }
@@ -32952,7 +32959,7 @@ void main(void){
32952
32959
  yield n2.render(e2), e2.addSubMTask(() => WR(this, void 0, void 0, function* () {
32953
32960
  var e3;
32954
32961
  const r2 = `snapshot-${t2.toString()}-start`;
32955
- if (!(yield (e3 = this.localstorage) === null || e3 === void 0 ? void 0 : e3.getItem(r2)) && KR.platform.isLowGpuMemory()) {
32962
+ if (!(yield (e3 = this.localstorage) === null || e3 === void 0 ? void 0 : e3.getItem(r2)) && QR.platform.isLowGpuMemory()) {
32956
32963
  n2.createTiming(), n2.container.visible = true, n2.collectMainSeqStartValue(), n2.setMainSeqStep(0, "start");
32957
32964
  const t3 = Hy.create({ width: n2.json.width, height: n2.json.height, resolution: 1 });
32958
32965
  i2.renderer.render(n2.container, { renderTexture: t3 });
@@ -33079,7 +33086,18 @@ void main(void){
33079
33086
  YR.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
33080
33087
  } catch (t2) {
33081
33088
  }
33082
- var ZR = function(t2, e2, n2, i2) {
33089
+ class ZR extends a.a {
33090
+ constructor() {
33091
+ super(...arguments), this._volume = 0.5;
33092
+ }
33093
+ get volume() {
33094
+ return this._volume;
33095
+ }
33096
+ set volume(t2) {
33097
+ t2 < 0 && (t2 = 0), t2 > 1 && (t2 = 1), this._volume = t2, this.emit("update", this._volume);
33098
+ }
33099
+ }
33100
+ var JR = function(t2, e2, n2, i2) {
33083
33101
  return new (n2 || (n2 = Promise))(function(r2, o2) {
33084
33102
  function s2(t3) {
33085
33103
  try {
@@ -33105,10 +33123,10 @@ void main(void){
33105
33123
  });
33106
33124
  };
33107
33125
  r.skipHello();
33108
- 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" };
33109
- class KR extends a.a {
33126
+ const $R = { 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" }, KR = { 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" };
33127
+ class QR extends a.a {
33110
33128
  constructor(t2, e2 = {}) {
33111
- 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 = () => {
33129
+ 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.volumeAdjuster = new ZR(), this.fps = new XE(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
33112
33130
  this.errorChannel.emit("error", new qE(VE.CanvasCrash, "webgl context lost."));
33113
33131
  }, this.logger = t2.logger, this.mode = t2.mode, this.localStorage = new YR(this.logger);
33114
33132
  let n2 = Math.max(window.devicePixelRatio, 2);
@@ -33138,7 +33156,7 @@ void main(void){
33138
33156
  }
33139
33157
  }), this.app.ticker.add(() => {
33140
33158
  this.runtime.drawCall = this.drawCall, this.runtime.fps = Math.floor(this.app.ticker.minFPS), this.drawCall = 0;
33141
- }, null, ey.LOW), this.clock = new lM(this.app.ticker), this.objPoolGroup = eM(), this.stagePool = new XR(this.loader, this.mode, this.app.renderer, this.app.ticker, this.app.view, this.clock, this.objPoolGroup, this.errorChannel, this.localStorage, this.logger, t2.loadDelegate, this.isPlayerPaused, this.maxResolution), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
33159
+ }, null, ey.LOW), this.clock = new lM(this.app.ticker), this.objPoolGroup = eM(), this.stagePool = new XR(this.loader, this.mode, this.app.renderer, this.app.ticker, this.app.view, this.clock, this.objPoolGroup, this.errorChannel, this.localStorage, this.logger, t2.loadDelegate, this.isPlayerPaused, this.maxResolution, this.volumeAdjuster), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
33142
33160
  try {
33143
33161
  this.transactionPlayer = new og();
33144
33162
  } catch (t3) {
@@ -33157,7 +33175,7 @@ void main(void){
33157
33175
  return ((t2 = this.currentStage) === null || t2 === void 0 ? void 0 : t2.json.prevIndex) ? this.currentStage.json.prevIndex : this.currentIndex - 1;
33158
33176
  }
33159
33177
  getMaxResolution(t2) {
33160
- return !Object(l.isUndefined)(t2) && Number.isInteger(t2) ? (t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4), t2) : KR.platform.isAndroid() || KR.platform.isIOS() ? 2 : 4;
33178
+ return !Object(l.isUndefined)(t2) && Number.isInteger(t2) ? (t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4), t2) : QR.platform.isAndroid() || QR.platform.isIOS() ? 2 : 4;
33161
33179
  }
33162
33180
  updateMaxResolutionLevel(t2) {
33163
33181
  t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4);
@@ -33168,7 +33186,7 @@ void main(void){
33168
33186
  Object(l.isUndefined)(t2.minFPS) || (this.config.minFPS = t2.minFPS, this.app.ticker.minFPS = t2.minFPS), Object(l.isUndefined)(t2.maxFPS) || (this.config.maxFPS = t2.maxFPS, this.app.ticker.maxFPS = t2.maxFPS), Object(l.isUndefined)(t2.resolution) || (this.config.resolution = t2.resolution, this.updateResolution(this.scale * this.config.resolution)), Object(l.isUndefined)(t2.autoFPS) || (this.config.autoFPS = t2.autoFPS), Object(l.isUndefined)(t2.autoResolution) || (this.config.autoResolution = t2.autoResolution), Object(l.isUndefined)(t2.transactionBgColor) || (this.config.transactionBgColor = t2.transactionBgColor), this.taskId && this.logger.info("ppt player update config: " + JSON.stringify(this.config), this.taskId), Object(l.isUndefined)(t2.maxResolutionLevel) || (this.config.maxResolutionLevel = t2.maxResolutionLevel, this.updateMaxResolutionLevel(this.config.maxResolutionLevel));
33169
33187
  }
33170
33188
  preload(t2) {
33171
- return ZR(this, void 0, void 0, function* () {
33189
+ return JR(this, void 0, void 0, function* () {
33172
33190
  t2 < 1 || t2 > this.slideCount || (this.logger.info(`preload slide ${t2} begin`, this.taskId), yield this.stagePool.preload(t2), this.logger.info(`preload slide ${t2} end`, this.taskId));
33173
33191
  });
33174
33192
  }
@@ -33187,14 +33205,14 @@ void main(void){
33187
33205
  }
33188
33206
  renderSlide(t2, e2 = false) {
33189
33207
  var n2;
33190
- return ZR(this, void 0, void 0, function* () {
33208
+ return JR(this, void 0, void 0, function* () {
33191
33209
  if (this._isPaused)
33192
33210
  return void this.logger.info("ppt play prevent render slide with paused state", this.taskId);
33193
- this.logger.info("render slide " + t2, this.taskId), this.emit($R.renderStart, t2);
33211
+ this.logger.info("render slide " + t2, this.taskId), this.emit(KR.renderStart, t2);
33194
33212
  const i2 = yield this.stagePool.getStage(t2);
33195
33213
  if (!i2)
33196
33214
  return;
33197
- this.translateEvent(i2.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(t2);
33215
+ this.translateEvent(i2.ctx.eventHub, [KR.mainSeqStepChange, KR.mainSeqStateChange, KR.hyperlinkTrigger, KR.interactiveSeqAction, KR.mainSeqStepStart, KR.mainSeqStepEnd, KR.animateStart, KR.animateEnd, KR.mediaPlay, KR.mediaPause, KR.mediaSeek, KR.requestGotoSlide, KR.requestNextSlide, KR.requestPrevSlide, KR.interactiveSeqStateChange, KR.userInput]), this.currentIndex = Number(t2);
33198
33216
  const { width: r2, height: o2, slideCount: s2 } = i2.json;
33199
33217
  this.slideCount = s2, this.designWidth = r2, this.designHeight = o2, i2.json.transition && i2.json.transition.type && !this.prevSlideBase64 && this.currentStage && (this.prevSlideBase64 = this.getBase64(this.currentStage)), (n2 = this.currentStage) === null || n2 === void 0 || n2.clearOnSlideChange();
33200
33218
  const a2 = this.currentStage;
@@ -33206,7 +33224,7 @@ void main(void){
33206
33224
  }
33207
33225
  i2.container.visible = false, this.app.stage.addChild(i2.container);
33208
33226
  let { transition: u2 } = i2.json;
33209
- !this.isForward && (a2 == null ? void 0 : a2.json.transition) && (u2 = a2.json.transition), this.prevSlideBase64 && l2 && u2 && u2.type && a2 && i2 && (yield this.playTransaction(this.prevSlideBase64, l2, u2, a2, i2), this.prevSlideBase64 = null), this.isForward ? yield i2.startTiming() : i2.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), i2.container.visible = true, a2 && (a2.setMainSeqStep(0, "start"), a2.clearOnTransactionEnd(), this.app.stage.removeChild(a2.container)), i2.ctx.slideScopeEventHub.emit("slide-render", i2.ctx.slideIndex), this.emit($R.renderEnd, t2), this.emit($R.slideChange, t2), this.preload(t2 + 1).catch((e3) => {
33227
+ !this.isForward && (a2 == null ? void 0 : a2.json.transition) && (u2 = a2.json.transition), this.prevSlideBase64 && l2 && u2 && u2.type && a2 && i2 && (yield this.playTransaction(this.prevSlideBase64, l2, u2, a2, i2), this.prevSlideBase64 = null), this.isForward ? yield i2.startTiming() : i2.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), i2.container.visible = true, a2 && (a2.setMainSeqStep(0, "start"), a2.clearOnTransactionEnd(), this.app.stage.removeChild(a2.container)), i2.ctx.slideScopeEventHub.emit("slide-render", i2.ctx.slideIndex), this.emit(KR.renderEnd, t2), this.emit(KR.slideChange, t2), this.preload(t2 + 1).catch((e3) => {
33210
33228
  this.errorChannel.emit("error", qE.transform(e3), t2 + 1);
33211
33229
  }), this.preload(t2 - 1).catch((e3) => {
33212
33230
  this.errorChannel.emit("error", qE.transform(e3), t2 - 1);
@@ -33214,7 +33232,7 @@ void main(void){
33214
33232
  });
33215
33233
  }
33216
33234
  renderToBase64(t2, e2, n2) {
33217
- return ZR(this, void 0, void 0, function* () {
33235
+ return JR(this, void 0, void 0, function* () {
33218
33236
  const i2 = yield this.stagePool.getStage(t2);
33219
33237
  if (i2) {
33220
33238
  const { width: r2, height: o2 } = i2.json;
@@ -33236,16 +33254,16 @@ void main(void){
33236
33254
  return e2.destroy(true), n2;
33237
33255
  }
33238
33256
  playTransaction(t2, e2, n2, i2, r2) {
33239
- return ZR(this, void 0, void 0, function* () {
33257
+ return JR(this, void 0, void 0, function* () {
33240
33258
  const o2 = this.app.view.parentElement;
33241
- if (t2 && e2 && o2 && JR[n2.type] && this.transactionPlayer) {
33259
+ if (t2 && e2 && o2 && $R[n2.type] && this.transactionPlayer) {
33242
33260
  this.transactionSprite.zIndex = 999, this.transactionSprite.visible = false, this.app.stage.addChild(this.transactionSprite);
33243
33261
  const o3 = this.transactionPlayer.renderer.domElement, s2 = ky.from(o3), a2 = () => s2.update();
33244
33262
  return this.app.ticker.add(a2), this.transactionSprite.texture = s2, setTimeout(() => {
33245
33263
  this.transactionSprite.visible = true;
33246
33264
  }, 100), new Promise((o4) => {
33247
33265
  var s3, l2, u2, h2;
33248
- (s3 = this.transactionPlayer) === null || s3 === void 0 || s3.play({ reverse: !this.isForward, prevTextureUrl: t2, nextTextureUrl: e2, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: JR[n2.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: () => {
33266
+ (s3 = this.transactionPlayer) === null || s3 === void 0 || s3.play({ reverse: !this.isForward, prevTextureUrl: t2, nextTextureUrl: e2, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: $R[n2.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: () => {
33249
33267
  var t3, e3;
33250
33268
  o4(), i2.container.visible = false, r2.container.visible = true, (t3 = this.app.stage) === null || t3 === void 0 || t3.removeChild(this.transactionSprite), (e3 = this.app.ticker) === null || e3 === void 0 || e3.remove(a2);
33251
33269
  } });
@@ -33338,7 +33356,7 @@ void main(void){
33338
33356
  }
33339
33357
  setMediaState(t2, e2) {
33340
33358
  var n2;
33341
- return ZR(this, void 0, void 0, function* () {
33359
+ return JR(this, void 0, void 0, function* () {
33342
33360
  yield (n2 = this.currentStage) === null || n2 === void 0 ? void 0 : n2.setMediaState(t2, e2);
33343
33361
  });
33344
33362
  }
@@ -33362,7 +33380,7 @@ void main(void){
33362
33380
  return this.currentStage && this.getBase64(this.currentStage) || "";
33363
33381
  }
33364
33382
  createSnapshotForNextSlide(t2) {
33365
- return ZR(this, void 0, void 0, function* () {
33383
+ return JR(this, void 0, void 0, function* () {
33366
33384
  const e2 = this.nextSlideIndex, n2 = this.stagePool.getStageJson(e2);
33367
33385
  if (n2 && n2.transition && n2.transition.type && this.currentStage && this.transactionPlayer) {
33368
33386
  const e3 = t2 ? `snapshot-${this.currentStage.json.index}-start` : `snapshot-${this.currentStage.json.index}-end`;
@@ -33384,6 +33402,9 @@ void main(void){
33384
33402
  (t2 = YR.localCache) === null || t2 === void 0 || t2.clear().catch(() => {
33385
33403
  });
33386
33404
  }
33405
+ updateGlobalVolume(t2) {
33406
+ this.volumeAdjuster.volume = t2;
33407
+ }
33387
33408
  destroy() {
33388
33409
  var t2;
33389
33410
  try {
@@ -33402,23 +33423,23 @@ void main(void){
33402
33423
  }
33403
33424
  }
33404
33425
  }
33405
- KR.platform = VR, KR.RtcAudioClazz = null;
33406
- var QR = /* @__PURE__ */ new Map();
33407
- function tP(t2) {
33408
- var e2 = QR.get(t2.hookPoint) || [];
33409
- e2.push(t2), QR.set(t2.hookPoint, e2);
33426
+ QR.platform = VR, QR.RtcAudioClazz = null;
33427
+ var tP = /* @__PURE__ */ new Map();
33428
+ function eP(t2) {
33429
+ var e2 = tP.get(t2.hookPoint) || [];
33430
+ e2.push(t2), tP.set(t2.hookPoint, e2);
33410
33431
  }
33411
- var eP, nP = [], iP = "ResizeObserver loop completed with undelivered notifications.";
33432
+ var nP, iP = [], rP = "ResizeObserver loop completed with undelivered notifications.";
33412
33433
  !function(t2) {
33413
33434
  t2.BORDER_BOX = "border-box", t2.CONTENT_BOX = "content-box", t2.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
33414
- }(eP || (eP = {}));
33415
- var rP, oP = function(t2) {
33435
+ }(nP || (nP = {}));
33436
+ var oP, sP = function(t2) {
33416
33437
  return Object.freeze(t2);
33417
- }, sP = function(t2, e2) {
33418
- this.inlineSize = t2, this.blockSize = e2, oP(this);
33419
- }, aP = function() {
33438
+ }, aP = function(t2, e2) {
33439
+ this.inlineSize = t2, this.blockSize = e2, sP(this);
33440
+ }, lP = function() {
33420
33441
  function t2(t3, e2, n2, i2) {
33421
- return this.x = t3, this.y = e2, this.width = n2, this.height = i2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, oP(this);
33442
+ return this.x = t3, this.y = e2, this.width = n2, this.height = i2, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, sP(this);
33422
33443
  }
33423
33444
  return t2.prototype.toJSON = function() {
33424
33445
  var t3 = this;
@@ -33426,59 +33447,59 @@ void main(void){
33426
33447
  }, t2.fromRect = function(e2) {
33427
33448
  return new t2(e2.x, e2.y, e2.width, e2.height);
33428
33449
  }, t2;
33429
- }(), lP = function(t2) {
33450
+ }(), uP = function(t2) {
33430
33451
  return t2 instanceof SVGElement && "getBBox" in t2;
33431
- }, uP = function(t2) {
33432
- if (lP(t2)) {
33452
+ }, hP = function(t2) {
33453
+ if (uP(t2)) {
33433
33454
  var e2 = t2.getBBox(), n2 = e2.width, i2 = e2.height;
33434
33455
  return !n2 && !i2;
33435
33456
  }
33436
33457
  var r2 = t2, o2 = r2.offsetWidth, s2 = r2.offsetHeight;
33437
33458
  return !(o2 || s2 || t2.getClientRects().length);
33438
- }, hP = function(t2) {
33459
+ }, cP = function(t2) {
33439
33460
  var e2, n2;
33440
33461
  if (t2 instanceof Element)
33441
33462
  return true;
33442
33463
  var i2 = (n2 = (e2 = t2) === null || e2 === void 0 ? void 0 : e2.ownerDocument) === null || n2 === void 0 ? void 0 : n2.defaultView;
33443
33464
  return !!(i2 && t2 instanceof i2.Element);
33444
- }, 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(t2) {
33465
+ }, dP = typeof window != "undefined" ? window : {}, pP = /* @__PURE__ */ new WeakMap(), fP = /auto|scroll/, mP = /^tb|vertical/, gP = /msie|trident/i.test(dP.navigator && dP.navigator.userAgent), vP = function(t2) {
33445
33466
  return parseFloat(t2 || "0");
33446
- }, vP = function(t2, e2, n2) {
33447
- return t2 === void 0 && (t2 = 0), e2 === void 0 && (e2 = 0), n2 === void 0 && (n2 = false), new sP((n2 ? e2 : t2) || 0, (n2 ? t2 : e2) || 0);
33448
- }, _P = oP({ devicePixelContentBoxSize: vP(), borderBoxSize: vP(), contentBoxSize: vP(), contentRect: new aP(0, 0, 0, 0) }), yP = function(t2, e2) {
33449
- if (e2 === void 0 && (e2 = false), dP.has(t2) && !e2)
33450
- return dP.get(t2);
33451
- if (uP(t2))
33452
- return dP.set(t2, _P), _P;
33453
- var n2 = getComputedStyle(t2), i2 = lP(t2) && t2.ownerSVGElement && t2.getBBox(), r2 = !mP && n2.boxSizing === "border-box", o2 = fP.test(n2.writingMode || ""), s2 = !i2 && pP.test(n2.overflowY || ""), a2 = !i2 && pP.test(n2.overflowX || ""), l2 = i2 ? 0 : gP(n2.paddingTop), u2 = i2 ? 0 : gP(n2.paddingRight), h2 = i2 ? 0 : gP(n2.paddingBottom), c2 = i2 ? 0 : gP(n2.paddingLeft), d2 = i2 ? 0 : gP(n2.borderTopWidth), p2 = i2 ? 0 : gP(n2.borderRightWidth), f2 = i2 ? 0 : gP(n2.borderBottomWidth), m2 = c2 + u2, g2 = l2 + h2, v2 = (i2 ? 0 : gP(n2.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t2.offsetHeight - _2 - t2.clientHeight : 0, x2 = s2 ? t2.offsetWidth - v2 - t2.clientWidth : 0, b2 = r2 ? m2 + v2 : 0, T2 = r2 ? g2 + _2 : 0, w2 = i2 ? i2.width : gP(n2.width) - b2 - x2, S2 = i2 ? i2.height : gP(n2.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) });
33454
- return dP.set(t2, A2), A2;
33455
- }, xP = function(t2, e2, n2) {
33456
- var i2 = yP(t2, n2), r2 = i2.borderBoxSize, o2 = i2.contentBoxSize, s2 = i2.devicePixelContentBoxSize;
33467
+ }, _P = function(t2, e2, n2) {
33468
+ return t2 === void 0 && (t2 = 0), e2 === void 0 && (e2 = 0), n2 === void 0 && (n2 = false), new aP((n2 ? e2 : t2) || 0, (n2 ? t2 : e2) || 0);
33469
+ }, yP = sP({ devicePixelContentBoxSize: _P(), borderBoxSize: _P(), contentBoxSize: _P(), contentRect: new lP(0, 0, 0, 0) }), xP = function(t2, e2) {
33470
+ if (e2 === void 0 && (e2 = false), pP.has(t2) && !e2)
33471
+ return pP.get(t2);
33472
+ if (hP(t2))
33473
+ return pP.set(t2, yP), yP;
33474
+ var n2 = getComputedStyle(t2), i2 = uP(t2) && t2.ownerSVGElement && t2.getBBox(), r2 = !gP && n2.boxSizing === "border-box", o2 = mP.test(n2.writingMode || ""), s2 = !i2 && fP.test(n2.overflowY || ""), a2 = !i2 && fP.test(n2.overflowX || ""), l2 = i2 ? 0 : vP(n2.paddingTop), u2 = i2 ? 0 : vP(n2.paddingRight), h2 = i2 ? 0 : vP(n2.paddingBottom), c2 = i2 ? 0 : vP(n2.paddingLeft), d2 = i2 ? 0 : vP(n2.borderTopWidth), p2 = i2 ? 0 : vP(n2.borderRightWidth), f2 = i2 ? 0 : vP(n2.borderBottomWidth), m2 = c2 + u2, g2 = l2 + h2, v2 = (i2 ? 0 : vP(n2.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t2.offsetHeight - _2 - t2.clientHeight : 0, x2 = s2 ? t2.offsetWidth - v2 - t2.clientWidth : 0, b2 = r2 ? m2 + v2 : 0, T2 = r2 ? g2 + _2 : 0, w2 = i2 ? i2.width : vP(n2.width) - b2 - x2, S2 = i2 ? i2.height : vP(n2.height) - T2 - y2, E2 = w2 + m2 + x2 + v2, M2 = S2 + g2 + y2 + _2, A2 = sP({ devicePixelContentBoxSize: _P(Math.round(w2 * devicePixelRatio), Math.round(S2 * devicePixelRatio), o2), borderBoxSize: _P(E2, M2, o2), contentBoxSize: _P(w2, S2, o2), contentRect: new lP(c2, l2, w2, S2) });
33475
+ return pP.set(t2, A2), A2;
33476
+ }, bP = function(t2, e2, n2) {
33477
+ var i2 = xP(t2, n2), r2 = i2.borderBoxSize, o2 = i2.contentBoxSize, s2 = i2.devicePixelContentBoxSize;
33457
33478
  switch (e2) {
33458
- case eP.DEVICE_PIXEL_CONTENT_BOX:
33479
+ case nP.DEVICE_PIXEL_CONTENT_BOX:
33459
33480
  return s2;
33460
- case eP.BORDER_BOX:
33481
+ case nP.BORDER_BOX:
33461
33482
  return r2;
33462
33483
  default:
33463
33484
  return o2;
33464
33485
  }
33465
- }, bP = function(t2) {
33466
- var e2 = yP(t2);
33467
- this.target = t2, this.contentRect = e2.contentRect, this.borderBoxSize = oP([e2.borderBoxSize]), this.contentBoxSize = oP([e2.contentBoxSize]), this.devicePixelContentBoxSize = oP([e2.devicePixelContentBoxSize]);
33468
33486
  }, TP = function(t2) {
33469
- if (uP(t2))
33487
+ var e2 = xP(t2);
33488
+ this.target = t2, this.contentRect = e2.contentRect, this.borderBoxSize = sP([e2.borderBoxSize]), this.contentBoxSize = sP([e2.contentBoxSize]), this.devicePixelContentBoxSize = sP([e2.devicePixelContentBoxSize]);
33489
+ }, wP = function(t2) {
33490
+ if (hP(t2))
33470
33491
  return 1 / 0;
33471
33492
  for (var e2 = 0, n2 = t2.parentNode; n2; )
33472
33493
  e2 += 1, n2 = n2.parentNode;
33473
33494
  return e2;
33474
- }, wP = function() {
33495
+ }, SP = function() {
33475
33496
  var t2 = 1 / 0, e2 = [];
33476
- nP.forEach(function(n3) {
33497
+ iP.forEach(function(n3) {
33477
33498
  if (n3.activeTargets.length !== 0) {
33478
33499
  var i3 = [];
33479
33500
  n3.activeTargets.forEach(function(e3) {
33480
- var n4 = new bP(e3.target), r2 = TP(e3.target);
33481
- i3.push(n4), e3.lastReportedSize = xP(e3.target, e3.observedBox), r2 < t2 && (t2 = r2);
33501
+ var n4 = new TP(e3.target), r2 = wP(e3.target);
33502
+ i3.push(n4), e3.lastReportedSize = bP(e3.target, e3.observedBox), r2 < t2 && (t2 = r2);
33482
33503
  }), e2.push(function() {
33483
33504
  n3.callback.call(n3.observer, i3, n3.observer);
33484
33505
  }), n3.activeTargets.splice(0, n3.activeTargets.length);
@@ -33488,36 +33509,36 @@ void main(void){
33488
33509
  (0, i2[n2])();
33489
33510
  }
33490
33511
  return t2;
33491
- }, SP = function(t2) {
33492
- nP.forEach(function(e2) {
33512
+ }, EP = function(t2) {
33513
+ iP.forEach(function(e2) {
33493
33514
  e2.activeTargets.splice(0, e2.activeTargets.length), e2.skippedTargets.splice(0, e2.skippedTargets.length), e2.observationTargets.forEach(function(n2) {
33494
- n2.isActive() && (TP(n2.target) > t2 ? e2.activeTargets.push(n2) : e2.skippedTargets.push(n2));
33515
+ n2.isActive() && (wP(n2.target) > t2 ? e2.activeTargets.push(n2) : e2.skippedTargets.push(n2));
33495
33516
  });
33496
33517
  });
33497
- }, EP = function() {
33518
+ }, MP = function() {
33498
33519
  var t2, e2 = 0;
33499
- for (SP(e2); nP.some(function(t3) {
33520
+ for (EP(e2); iP.some(function(t3) {
33500
33521
  return t3.activeTargets.length > 0;
33501
33522
  }); )
33502
- e2 = wP(), SP(e2);
33503
- return nP.some(function(t3) {
33523
+ e2 = SP(), EP(e2);
33524
+ return iP.some(function(t3) {
33504
33525
  return t3.skippedTargets.length > 0;
33505
- }) && (typeof ErrorEvent == "function" ? t2 = new ErrorEvent("error", { message: iP }) : ((t2 = document.createEvent("Event")).initEvent("error", false, false), t2.message = iP), window.dispatchEvent(t2)), e2 > 0;
33506
- }, MP = [], AP = function(t2) {
33507
- if (!rP) {
33526
+ }) && (typeof ErrorEvent == "function" ? t2 = new ErrorEvent("error", { message: rP }) : ((t2 = document.createEvent("Event")).initEvent("error", false, false), t2.message = rP), window.dispatchEvent(t2)), e2 > 0;
33527
+ }, AP = [], RP = function(t2) {
33528
+ if (!oP) {
33508
33529
  var e2 = 0, n2 = document.createTextNode("");
33509
33530
  new MutationObserver(function() {
33510
- return MP.splice(0).forEach(function(t3) {
33531
+ return AP.splice(0).forEach(function(t3) {
33511
33532
  return t3();
33512
33533
  });
33513
- }).observe(n2, { characterData: true }), rP = function() {
33534
+ }).observe(n2, { characterData: true }), oP = function() {
33514
33535
  n2.textContent = "" + (e2 ? e2-- : e2++);
33515
33536
  };
33516
33537
  }
33517
- MP.push(t2), rP();
33518
- }, 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(t2) {
33538
+ AP.push(t2), oP();
33539
+ }, PP = 0, CP = { attributes: true, characterData: true, childList: true, subtree: true }, IP = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], OP = function(t2) {
33519
33540
  return t2 === void 0 && (t2 = 0), Date.now() + t2;
33520
- }, OP = false, LP = new (function() {
33541
+ }, LP = false, NP = new (function() {
33521
33542
  function t2() {
33522
33543
  var t3 = this;
33523
33544
  this.stopped = true, this.listener = function() {
@@ -33526,19 +33547,19 @@ void main(void){
33526
33547
  }
33527
33548
  return t2.prototype.run = function(t3) {
33528
33549
  var e2 = this;
33529
- if (t3 === void 0 && (t3 = 250), !OP) {
33530
- OP = true;
33531
- var n2, i2 = IP(t3);
33550
+ if (t3 === void 0 && (t3 = 250), !LP) {
33551
+ LP = true;
33552
+ var n2, i2 = OP(t3);
33532
33553
  n2 = function() {
33533
33554
  var n3 = false;
33534
33555
  try {
33535
- n3 = EP();
33556
+ n3 = MP();
33536
33557
  } finally {
33537
- if (OP = false, t3 = i2 - IP(), !RP)
33558
+ if (LP = false, t3 = i2 - OP(), !PP)
33538
33559
  return;
33539
33560
  n3 ? e2.run(1e3) : t3 > 0 ? e2.run(t3) : e2.start();
33540
33561
  }
33541
- }, AP(function() {
33562
+ }, RP(function() {
33542
33563
  requestAnimationFrame(n2);
33543
33564
  });
33544
33565
  }
@@ -33546,29 +33567,29 @@ void main(void){
33546
33567
  this.stop(), this.run();
33547
33568
  }, t2.prototype.observe = function() {
33548
33569
  var t3 = this, e2 = function() {
33549
- return t3.observer && t3.observer.observe(document.body, PP);
33570
+ return t3.observer && t3.observer.observe(document.body, CP);
33550
33571
  };
33551
- document.body ? e2() : cP.addEventListener("DOMContentLoaded", e2);
33572
+ document.body ? e2() : dP.addEventListener("DOMContentLoaded", e2);
33552
33573
  }, t2.prototype.start = function() {
33553
33574
  var t3 = this;
33554
- this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), CP.forEach(function(e2) {
33555
- return cP.addEventListener(e2, t3.listener, true);
33575
+ this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), IP.forEach(function(e2) {
33576
+ return dP.addEventListener(e2, t3.listener, true);
33556
33577
  }));
33557
33578
  }, t2.prototype.stop = function() {
33558
33579
  var t3 = this;
33559
- this.stopped || (this.observer && this.observer.disconnect(), CP.forEach(function(e2) {
33560
- return cP.removeEventListener(e2, t3.listener, true);
33580
+ this.stopped || (this.observer && this.observer.disconnect(), IP.forEach(function(e2) {
33581
+ return dP.removeEventListener(e2, t3.listener, true);
33561
33582
  }), this.stopped = true);
33562
33583
  }, t2;
33563
- }())(), NP = function(t2) {
33564
- !RP && t2 > 0 && LP.start(), !(RP += t2) && LP.stop();
33565
- }, DP = function() {
33584
+ }())(), DP = function(t2) {
33585
+ !PP && t2 > 0 && NP.start(), !(PP += t2) && NP.stop();
33586
+ }, FP = function() {
33566
33587
  function t2(t3, e2) {
33567
- this.target = t3, this.observedBox = e2 || eP.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
33588
+ this.target = t3, this.observedBox = e2 || nP.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
33568
33589
  }
33569
33590
  return t2.prototype.isActive = function() {
33570
- var t3, e2 = xP(this.target, this.observedBox, true);
33571
- return t3 = this.target, lP(t3) || function(t4) {
33591
+ var t3, e2 = bP(this.target, this.observedBox, true);
33592
+ return t3 = this.target, uP(t3) || function(t4) {
33572
33593
  switch (t4.tagName) {
33573
33594
  case "INPUT":
33574
33595
  if (t4.type !== "image")
@@ -33585,57 +33606,57 @@ void main(void){
33585
33606
  return false;
33586
33607
  }(t3) || getComputedStyle(t3).display !== "inline" || (this.lastReportedSize = e2), this.lastReportedSize.inlineSize !== e2.inlineSize || this.lastReportedSize.blockSize !== e2.blockSize;
33587
33608
  }, t2;
33588
- }(), FP = function(t2, e2) {
33609
+ }(), BP = function(t2, e2) {
33589
33610
  this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t2, this.callback = e2;
33590
- }, BP = /* @__PURE__ */ new WeakMap(), UP = function(t2, e2) {
33611
+ }, UP = /* @__PURE__ */ new WeakMap(), kP = function(t2, e2) {
33591
33612
  for (var n2 = 0; n2 < t2.length; n2 += 1)
33592
33613
  if (t2[n2].target === e2)
33593
33614
  return n2;
33594
33615
  return -1;
33595
- }, kP = function() {
33616
+ }, GP = function() {
33596
33617
  function t2() {
33597
33618
  }
33598
33619
  return t2.connect = function(t3, e2) {
33599
- var n2 = new FP(t3, e2);
33600
- BP.set(t3, n2);
33620
+ var n2 = new BP(t3, e2);
33621
+ UP.set(t3, n2);
33601
33622
  }, t2.observe = function(t3, e2, n2) {
33602
- var i2 = BP.get(t3), r2 = i2.observationTargets.length === 0;
33603
- UP(i2.observationTargets, e2) < 0 && (r2 && nP.push(i2), i2.observationTargets.push(new DP(e2, n2 && n2.box)), NP(1), LP.schedule());
33623
+ var i2 = UP.get(t3), r2 = i2.observationTargets.length === 0;
33624
+ kP(i2.observationTargets, e2) < 0 && (r2 && iP.push(i2), i2.observationTargets.push(new FP(e2, n2 && n2.box)), DP(1), NP.schedule());
33604
33625
  }, t2.unobserve = function(t3, e2) {
33605
- var n2 = BP.get(t3), i2 = UP(n2.observationTargets, e2), r2 = n2.observationTargets.length === 1;
33606
- i2 >= 0 && (r2 && nP.splice(nP.indexOf(n2), 1), n2.observationTargets.splice(i2, 1), NP(-1));
33626
+ var n2 = UP.get(t3), i2 = kP(n2.observationTargets, e2), r2 = n2.observationTargets.length === 1;
33627
+ i2 >= 0 && (r2 && iP.splice(iP.indexOf(n2), 1), n2.observationTargets.splice(i2, 1), DP(-1));
33607
33628
  }, t2.disconnect = function(t3) {
33608
- var e2 = this, n2 = BP.get(t3);
33629
+ var e2 = this, n2 = UP.get(t3);
33609
33630
  n2.observationTargets.slice().forEach(function(n3) {
33610
33631
  return e2.unobserve(t3, n3.target);
33611
33632
  }), n2.activeTargets.splice(0, n2.activeTargets.length);
33612
33633
  }, t2;
33613
- }(), GP = function() {
33634
+ }(), HP = function() {
33614
33635
  function t2(t3) {
33615
33636
  if (arguments.length === 0)
33616
33637
  throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
33617
33638
  if (typeof t3 != "function")
33618
33639
  throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
33619
- kP.connect(this, t3);
33640
+ GP.connect(this, t3);
33620
33641
  }
33621
33642
  return t2.prototype.observe = function(t3, e2) {
33622
33643
  if (arguments.length === 0)
33623
33644
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
33624
- if (!hP(t3))
33645
+ if (!cP(t3))
33625
33646
  throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
33626
- kP.observe(this, t3, e2);
33647
+ GP.observe(this, t3, e2);
33627
33648
  }, t2.prototype.unobserve = function(t3) {
33628
33649
  if (arguments.length === 0)
33629
33650
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
33630
- if (!hP(t3))
33651
+ if (!cP(t3))
33631
33652
  throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
33632
- kP.unobserve(this, t3);
33653
+ GP.unobserve(this, t3);
33633
33654
  }, t2.prototype.disconnect = function() {
33634
- kP.disconnect(this);
33655
+ GP.disconnect(this);
33635
33656
  }, t2.toString = function() {
33636
33657
  return "function ResizeObserver () { [polyfill code] }";
33637
33658
  }, t2;
33638
- }(), HP = function(t2, e2, n2, i2) {
33659
+ }(), zP = function(t2, e2, n2, i2) {
33639
33660
  return new (n2 || (n2 = Promise))(function(r2, o2) {
33640
33661
  function s2(t3) {
33641
33662
  try {
@@ -33659,7 +33680,7 @@ void main(void){
33659
33680
  }
33660
33681
  l2((i2 = i2.apply(t2, e2 || [])).next());
33661
33682
  });
33662
- }, zP = function(t2, e2) {
33683
+ }, jP = function(t2, e2) {
33663
33684
  var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
33664
33685
  if (1 & r2[0])
33665
33686
  throw r2[1];
@@ -33722,14 +33743,14 @@ void main(void){
33722
33743
  }([o3, a3]);
33723
33744
  };
33724
33745
  }
33725
- }, jP = function() {
33746
+ }, VP = function() {
33726
33747
  function t2(t3, e2, n2, i2, r2) {
33727
33748
  this.state = "idle", this.index = -1, this.slideIndex = -1, this.fn = n2, this.index = t3, this.slideIndex = e2, this.eventHub = i2, this.id = r2;
33728
33749
  }
33729
33750
  return t2.prototype.apply = function() {
33730
- return HP(this, void 0, void 0, function() {
33751
+ return zP(this, void 0, void 0, function() {
33731
33752
  var t3;
33732
- return zP(this, function(e2) {
33753
+ return jP(this, function(e2) {
33733
33754
  switch (e2.label) {
33734
33755
  case 0:
33735
33756
  this.eventHub.emit("task-start", this), e2.label = 1;
@@ -33745,7 +33766,7 @@ void main(void){
33745
33766
  });
33746
33767
  });
33747
33768
  }, t2;
33748
- }(), VP = function() {
33769
+ }(), WP = function() {
33749
33770
  function t2() {
33750
33771
  var t3 = this;
33751
33772
  this.eventHub = new a.a(), this.tasks = [], this.index = 0, this.eventHub.on("task-end", function(e2) {
@@ -33767,7 +33788,7 @@ void main(void){
33767
33788
  e2.tasks.splice(t4, 1);
33768
33789
  });
33769
33790
  }, t2.prototype.addTask = function(t3, e2, n2) {
33770
- var i2 = new jP(this.index++, e2, t3, this.eventHub, n2);
33791
+ var i2 = new VP(this.index++, e2, t3, this.eventHub, n2);
33771
33792
  this.tasks.push(i2), this.tasks.sort(function(t4, e3) {
33772
33793
  return t4.index - e3.index;
33773
33794
  }), this.replaceIdleTask(), this.tasks.length === 1 && i2.apply();
@@ -33779,7 +33800,7 @@ void main(void){
33779
33800
  this.eventHub.removeAllListeners();
33780
33801
  }, t2;
33781
33802
  }();
33782
- function WP(t2, e2) {
33803
+ function XP(t2, e2) {
33783
33804
  var n2 = t2.__state.conversionName.toString(), i2 = Math.round(t2.r), r2 = Math.round(t2.g), o2 = Math.round(t2.b), s2 = t2.a, a2 = Math.round(t2.h), l2 = t2.s.toFixed(1), u2 = t2.v.toFixed(1);
33784
33805
  if (e2 || n2 === "THREE_CHAR_HEX" || n2 === "SIX_CHAR_HEX") {
33785
33806
  for (var h2 = t2.hex.toString(16); h2.length < 6; )
@@ -33788,28 +33809,28 @@ void main(void){
33788
33809
  }
33789
33810
  return n2 === "CSS_RGB" ? "rgb(" + i2 + "," + r2 + "," + o2 + ")" : n2 === "CSS_RGBA" ? "rgba(" + i2 + "," + r2 + "," + o2 + "," + s2 + ")" : n2 === "HEX" ? "0x" + t2.hex.toString(16) : n2 === "RGB_ARRAY" ? "[" + i2 + "," + r2 + "," + o2 + "]" : n2 === "RGBA_ARRAY" ? "[" + i2 + "," + r2 + "," + o2 + "," + s2 + "]" : n2 === "RGB_OBJ" ? "{r:" + i2 + ",g:" + r2 + ",b:" + o2 + "}" : n2 === "RGBA_OBJ" ? "{r:" + i2 + ",g:" + r2 + ",b:" + o2 + ",a:" + s2 + "}" : n2 === "HSV_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + u2 + "}" : n2 === "HSVA_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + u2 + ",a:" + s2 + "}" : "unknown format";
33790
33811
  }
33791
- var XP = Array.prototype.forEach, qP = Array.prototype.slice, YP = { BREAK: {}, extend: function(t2) {
33792
- return this.each(qP.call(arguments, 1), function(e2) {
33812
+ var qP = Array.prototype.forEach, YP = Array.prototype.slice, ZP = { BREAK: {}, extend: function(t2) {
33813
+ return this.each(YP.call(arguments, 1), function(e2) {
33793
33814
  (this.isObject(e2) ? Object.keys(e2) : []).forEach(function(n2) {
33794
33815
  this.isUndefined(e2[n2]) || (t2[n2] = e2[n2]);
33795
33816
  }.bind(this));
33796
33817
  }, this), t2;
33797
33818
  }, defaults: function(t2) {
33798
- return this.each(qP.call(arguments, 1), function(e2) {
33819
+ return this.each(YP.call(arguments, 1), function(e2) {
33799
33820
  (this.isObject(e2) ? Object.keys(e2) : []).forEach(function(n2) {
33800
33821
  this.isUndefined(t2[n2]) && (t2[n2] = e2[n2]);
33801
33822
  }.bind(this));
33802
33823
  }, this), t2;
33803
33824
  }, compose: function() {
33804
- var t2 = qP.call(arguments);
33825
+ var t2 = YP.call(arguments);
33805
33826
  return function() {
33806
- for (var e2 = qP.call(arguments), n2 = t2.length - 1; n2 >= 0; n2--)
33827
+ for (var e2 = YP.call(arguments), n2 = t2.length - 1; n2 >= 0; n2--)
33807
33828
  e2 = [t2[n2].apply(this, e2)];
33808
33829
  return e2[0];
33809
33830
  };
33810
33831
  }, each: function(t2, e2, n2) {
33811
33832
  if (t2) {
33812
- if (XP && t2.forEach && t2.forEach === XP)
33833
+ if (qP && t2.forEach && t2.forEach === qP)
33813
33834
  t2.forEach(e2, n2);
33814
33835
  else if (t2.length === t2.length + 0) {
33815
33836
  var i2, r2 = void 0;
@@ -33834,7 +33855,7 @@ void main(void){
33834
33855
  clearTimeout(i2), i2 = setTimeout(s2, e2), a2 && t2.apply(r2, o2);
33835
33856
  };
33836
33857
  }, toArray: function(t2) {
33837
- return t2.toArray ? t2.toArray() : qP.call(t2);
33858
+ return t2.toArray ? t2.toArray() : YP.call(t2);
33838
33859
  }, isUndefined: function(t2) {
33839
33860
  return t2 === void 0;
33840
33861
  }, isNull: function(t2) {
@@ -33860,23 +33881,23 @@ void main(void){
33860
33881
  return t2 === false || t2 === true;
33861
33882
  }, isFunction: function(t2) {
33862
33883
  return t2 instanceof Function;
33863
- } }, ZP = [{ litmus: YP.isString, conversions: { THREE_CHAR_HEX: { read: function(t2) {
33884
+ } }, JP = [{ litmus: ZP.isString, conversions: { THREE_CHAR_HEX: { read: function(t2) {
33864
33885
  var e2 = t2.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
33865
33886
  return e2 !== null && { space: "HEX", hex: parseInt("0x" + e2[1].toString() + e2[1].toString() + e2[2].toString() + e2[2].toString() + e2[3].toString() + e2[3].toString(), 0) };
33866
- }, write: WP }, SIX_CHAR_HEX: { read: function(t2) {
33887
+ }, write: XP }, SIX_CHAR_HEX: { read: function(t2) {
33867
33888
  var e2 = t2.match(/^#([A-F0-9]{6})$/i);
33868
33889
  return e2 !== null && { space: "HEX", hex: parseInt("0x" + e2[1].toString(), 0) };
33869
- }, write: WP }, CSS_RGB: { read: function(t2) {
33890
+ }, write: XP }, CSS_RGB: { read: function(t2) {
33870
33891
  var e2 = t2.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
33871
33892
  return e2 !== null && { space: "RGB", r: parseFloat(e2[1]), g: parseFloat(e2[2]), b: parseFloat(e2[3]) };
33872
- }, write: WP }, CSS_RGBA: { read: function(t2) {
33893
+ }, write: XP }, CSS_RGBA: { read: function(t2) {
33873
33894
  var e2 = t2.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
33874
33895
  return e2 !== null && { space: "RGB", r: parseFloat(e2[1]), g: parseFloat(e2[2]), b: parseFloat(e2[3]), a: parseFloat(e2[4]) };
33875
- }, write: WP } } }, { litmus: YP.isNumber, conversions: { HEX: { read: function(t2) {
33896
+ }, write: XP } } }, { litmus: ZP.isNumber, conversions: { HEX: { read: function(t2) {
33876
33897
  return { space: "HEX", hex: t2, conversionName: "HEX" };
33877
33898
  }, write: function(t2) {
33878
33899
  return t2.hex;
33879
- } } } }, { litmus: YP.isArray, conversions: { RGB_ARRAY: { read: function(t2) {
33900
+ } } } }, { litmus: ZP.isArray, conversions: { RGB_ARRAY: { read: function(t2) {
33880
33901
  return t2.length === 3 && { space: "RGB", r: t2[0], g: t2[1], b: t2[2] };
33881
33902
  }, write: function(t2) {
33882
33903
  return [t2.r, t2.g, t2.b];
@@ -33884,33 +33905,33 @@ void main(void){
33884
33905
  return t2.length === 4 && { space: "RGB", r: t2[0], g: t2[1], b: t2[2], a: t2[3] };
33885
33906
  }, write: function(t2) {
33886
33907
  return [t2.r, t2.g, t2.b, t2.a];
33887
- } } } }, { litmus: YP.isObject, conversions: { RGBA_OBJ: { read: function(t2) {
33888
- return !!(YP.isNumber(t2.r) && YP.isNumber(t2.g) && YP.isNumber(t2.b) && YP.isNumber(t2.a)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b, a: t2.a };
33908
+ } } } }, { litmus: ZP.isObject, conversions: { RGBA_OBJ: { read: function(t2) {
33909
+ return !!(ZP.isNumber(t2.r) && ZP.isNumber(t2.g) && ZP.isNumber(t2.b) && ZP.isNumber(t2.a)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b, a: t2.a };
33889
33910
  }, write: function(t2) {
33890
33911
  return { r: t2.r, g: t2.g, b: t2.b, a: t2.a };
33891
33912
  } }, RGB_OBJ: { read: function(t2) {
33892
- return !!(YP.isNumber(t2.r) && YP.isNumber(t2.g) && YP.isNumber(t2.b)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b };
33913
+ return !!(ZP.isNumber(t2.r) && ZP.isNumber(t2.g) && ZP.isNumber(t2.b)) && { space: "RGB", r: t2.r, g: t2.g, b: t2.b };
33893
33914
  }, write: function(t2) {
33894
33915
  return { r: t2.r, g: t2.g, b: t2.b };
33895
33916
  } }, HSVA_OBJ: { read: function(t2) {
33896
- return !!(YP.isNumber(t2.h) && YP.isNumber(t2.s) && YP.isNumber(t2.v) && YP.isNumber(t2.a)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v, a: t2.a };
33917
+ return !!(ZP.isNumber(t2.h) && ZP.isNumber(t2.s) && ZP.isNumber(t2.v) && ZP.isNumber(t2.a)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v, a: t2.a };
33897
33918
  }, write: function(t2) {
33898
33919
  return { h: t2.h, s: t2.s, v: t2.v, a: t2.a };
33899
33920
  } }, HSV_OBJ: { read: function(t2) {
33900
- return !!(YP.isNumber(t2.h) && YP.isNumber(t2.s) && YP.isNumber(t2.v)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v };
33921
+ return !!(ZP.isNumber(t2.h) && ZP.isNumber(t2.s) && ZP.isNumber(t2.v)) && { space: "HSV", h: t2.h, s: t2.s, v: t2.v };
33901
33922
  }, write: function(t2) {
33902
33923
  return { h: t2.h, s: t2.s, v: t2.v };
33903
- } } } }], JP = void 0, $P = void 0, KP = function() {
33904
- $P = false;
33905
- var t2 = arguments.length > 1 ? YP.toArray(arguments) : arguments[0];
33906
- return YP.each(ZP, function(e2) {
33924
+ } } } }], $P = void 0, KP = void 0, QP = function() {
33925
+ KP = false;
33926
+ var t2 = arguments.length > 1 ? ZP.toArray(arguments) : arguments[0];
33927
+ return ZP.each(JP, function(e2) {
33907
33928
  if (e2.litmus(t2))
33908
- return YP.each(e2.conversions, function(e3, n2) {
33909
- if (JP = e3.read(t2), $P === false && JP !== false)
33910
- return $P = JP, JP.conversionName = n2, JP.conversion = e3, YP.BREAK;
33911
- }), YP.BREAK;
33912
- }), $P;
33913
- }, QP = void 0, tC = { hsv_to_rgb: function(t2, e2, n2) {
33929
+ return ZP.each(e2.conversions, function(e3, n2) {
33930
+ if ($P = e3.read(t2), KP === false && $P !== false)
33931
+ return KP = $P, $P.conversionName = n2, $P.conversion = e3, ZP.BREAK;
33932
+ }), ZP.BREAK;
33933
+ }), KP;
33934
+ }, tC = void 0, eC = { hsv_to_rgb: function(t2, e2, n2) {
33914
33935
  var i2 = Math.floor(t2 / 60) % 6, r2 = t2 / 60 - Math.floor(t2 / 60), o2 = n2 * (1 - e2), s2 = n2 * (1 - r2 * e2), a2 = n2 * (1 - (1 - r2) * e2), l2 = [[n2, a2, o2], [s2, n2, o2], [o2, n2, a2], [o2, s2, n2], [a2, o2, n2], [n2, o2, s2]][i2];
33915
33936
  return { r: 255 * l2[0], g: 255 * l2[1], b: 255 * l2[2] };
33916
33937
  }, rgb_to_hsv: function(t2, e2, n2) {
@@ -33922,15 +33943,15 @@ void main(void){
33922
33943
  }, component_from_hex: function(t2, e2) {
33923
33944
  return t2 >> 8 * e2 & 255;
33924
33945
  }, hex_with_component: function(t2, e2, n2) {
33925
- return n2 << (QP = 8 * e2) | t2 & ~(255 << QP);
33926
- } }, eC = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t2) {
33946
+ return n2 << (tC = 8 * e2) | t2 & ~(255 << tC);
33947
+ } }, nC = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t2) {
33927
33948
  return typeof t2;
33928
33949
  } : function(t2) {
33929
33950
  return t2 && typeof Symbol == "function" && t2.constructor === Symbol && t2 !== Symbol.prototype ? "symbol" : typeof t2;
33930
- }, nC = function(t2, e2) {
33951
+ }, iC = function(t2, e2) {
33931
33952
  if (!(t2 instanceof e2))
33932
33953
  throw new TypeError("Cannot call a class as a function");
33933
- }, iC = function() {
33954
+ }, rC = function() {
33934
33955
  function t2(t3, e2) {
33935
33956
  for (var n2 = 0; n2 < e2.length; n2++) {
33936
33957
  var i2 = e2[n2];
@@ -33940,7 +33961,7 @@ void main(void){
33940
33961
  return function(e2, n2, i2) {
33941
33962
  return n2 && t2(e2.prototype, n2), i2 && t2(e2, i2), e2;
33942
33963
  };
33943
- }(), rC = function t2(e2, n2, i2) {
33964
+ }(), oC = function t2(e2, n2, i2) {
33944
33965
  e2 === null && (e2 = Function.prototype);
33945
33966
  var r2 = Object.getOwnPropertyDescriptor(e2, n2);
33946
33967
  if (r2 === void 0) {
@@ -33951,67 +33972,67 @@ void main(void){
33951
33972
  return r2.value;
33952
33973
  var s2 = r2.get;
33953
33974
  return s2 !== void 0 ? s2.call(i2) : void 0;
33954
- }, oC = function(t2, e2) {
33975
+ }, sC = function(t2, e2) {
33955
33976
  if (typeof e2 != "function" && e2 !== null)
33956
33977
  throw new TypeError("Super expression must either be null or a function, not " + typeof e2);
33957
33978
  t2.prototype = Object.create(e2 && e2.prototype, { constructor: { value: t2, enumerable: false, writable: true, configurable: true } }), e2 && (Object.setPrototypeOf ? Object.setPrototypeOf(t2, e2) : t2.__proto__ = e2);
33958
- }, sC = function(t2, e2) {
33979
+ }, aC = function(t2, e2) {
33959
33980
  if (!t2)
33960
33981
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
33961
33982
  return !e2 || typeof e2 != "object" && typeof e2 != "function" ? t2 : e2;
33962
- }, aC = function() {
33983
+ }, lC = function() {
33963
33984
  function t2() {
33964
- if (nC(this, t2), this.__state = KP.apply(this, arguments), this.__state === false)
33985
+ if (iC(this, t2), this.__state = QP.apply(this, arguments), this.__state === false)
33965
33986
  throw new Error("Failed to interpret color arguments");
33966
33987
  this.__state.a = this.__state.a || 1;
33967
33988
  }
33968
- return iC(t2, [{ key: "toString", value: function() {
33969
- return WP(this);
33989
+ return rC(t2, [{ key: "toString", value: function() {
33990
+ return XP(this);
33970
33991
  } }, { key: "toHexString", value: function() {
33971
- return WP(this, true);
33992
+ return XP(this, true);
33972
33993
  } }, { key: "toOriginal", value: function() {
33973
33994
  return this.__state.conversion.write(this);
33974
33995
  } }]), t2;
33975
33996
  }();
33976
- function lC(t2, e2, n2) {
33997
+ function uC(t2, e2, n2) {
33977
33998
  Object.defineProperty(t2, e2, { get: function() {
33978
- return this.__state.space === "RGB" || aC.recalculateRGB(this, e2, n2), this.__state[e2];
33999
+ return this.__state.space === "RGB" || lC.recalculateRGB(this, e2, n2), this.__state[e2];
33979
34000
  }, set: function(t3) {
33980
- this.__state.space !== "RGB" && (aC.recalculateRGB(this, e2, n2), this.__state.space = "RGB"), this.__state[e2] = t3;
34001
+ this.__state.space !== "RGB" && (lC.recalculateRGB(this, e2, n2), this.__state.space = "RGB"), this.__state[e2] = t3;
33981
34002
  } });
33982
34003
  }
33983
- function uC(t2, e2) {
34004
+ function hC(t2, e2) {
33984
34005
  Object.defineProperty(t2, e2, { get: function() {
33985
- return this.__state.space === "HSV" || aC.recalculateHSV(this), this.__state[e2];
34006
+ return this.__state.space === "HSV" || lC.recalculateHSV(this), this.__state[e2];
33986
34007
  }, set: function(t3) {
33987
- this.__state.space !== "HSV" && (aC.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e2] = t3;
34008
+ this.__state.space !== "HSV" && (lC.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e2] = t3;
33988
34009
  } });
33989
34010
  }
33990
- aC.recalculateRGB = function(t2, e2, n2) {
34011
+ lC.recalculateRGB = function(t2, e2, n2) {
33991
34012
  if (t2.__state.space === "HEX")
33992
- t2.__state[e2] = tC.component_from_hex(t2.__state.hex, n2);
34013
+ t2.__state[e2] = eC.component_from_hex(t2.__state.hex, n2);
33993
34014
  else {
33994
34015
  if (t2.__state.space !== "HSV")
33995
34016
  throw new Error("Corrupted color state");
33996
- YP.extend(t2.__state, tC.hsv_to_rgb(t2.__state.h, t2.__state.s, t2.__state.v));
34017
+ ZP.extend(t2.__state, eC.hsv_to_rgb(t2.__state.h, t2.__state.s, t2.__state.v));
33997
34018
  }
33998
- }, aC.recalculateHSV = function(t2) {
33999
- var e2 = tC.rgb_to_hsv(t2.r, t2.g, t2.b);
34000
- YP.extend(t2.__state, { s: e2.s, v: e2.v }), YP.isNaN(e2.h) ? YP.isUndefined(t2.__state.h) && (t2.__state.h = 0) : t2.__state.h = e2.h;
34001
- }, 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() {
34019
+ }, lC.recalculateHSV = function(t2) {
34020
+ var e2 = eC.rgb_to_hsv(t2.r, t2.g, t2.b);
34021
+ ZP.extend(t2.__state, { s: e2.s, v: e2.v }), ZP.isNaN(e2.h) ? ZP.isUndefined(t2.__state.h) && (t2.__state.h = 0) : t2.__state.h = e2.h;
34022
+ }, lC.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], uC(lC.prototype, "r", 2), uC(lC.prototype, "g", 1), uC(lC.prototype, "b", 0), hC(lC.prototype, "h"), hC(lC.prototype, "s"), hC(lC.prototype, "v"), Object.defineProperty(lC.prototype, "a", { get: function() {
34002
34023
  return this.__state.a;
34003
34024
  }, set: function(t2) {
34004
34025
  this.__state.a = t2;
34005
- } }), Object.defineProperty(aC.prototype, "hex", { get: function() {
34006
- 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;
34026
+ } }), Object.defineProperty(lC.prototype, "hex", { get: function() {
34027
+ return this.__state.space !== "HEX" && (this.__state.hex = eC.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
34007
34028
  }, set: function(t2) {
34008
34029
  this.__state.space = "HEX", this.__state.hex = t2;
34009
34030
  } });
34010
- var hC = function() {
34031
+ var cC = function() {
34011
34032
  function t2(e2, n2) {
34012
- nC(this, t2), this.initialValue = e2[n2], this.domElement = document.createElement("div"), this.object = e2, this.property = n2, this.__onChange = void 0, this.__onFinishChange = void 0;
34033
+ iC(this, t2), this.initialValue = e2[n2], this.domElement = document.createElement("div"), this.object = e2, this.property = n2, this.__onChange = void 0, this.__onFinishChange = void 0;
34013
34034
  }
34014
- return iC(t2, [{ key: "onChange", value: function(t3) {
34035
+ return rC(t2, [{ key: "onChange", value: function(t3) {
34015
34036
  return this.__onChange = t3, this;
34016
34037
  } }, { key: "onFinishChange", value: function(t3) {
34017
34038
  return this.__onFinishChange = t3, this;
@@ -34024,29 +34045,29 @@ void main(void){
34024
34045
  } }, { key: "isModified", value: function() {
34025
34046
  return this.initialValue !== this.getValue();
34026
34047
  } }]), t2;
34027
- }(), cC = {};
34028
- YP.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t2, e2) {
34029
- YP.each(t2, function(t3) {
34030
- cC[t3] = e2;
34048
+ }(), dC = {};
34049
+ ZP.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t2, e2) {
34050
+ ZP.each(t2, function(t3) {
34051
+ dC[t3] = e2;
34031
34052
  });
34032
34053
  });
34033
- var dC = /(\d+(\.\d+)?)px/;
34034
- function pC(t2) {
34035
- if (t2 === "0" || YP.isUndefined(t2))
34054
+ var pC = /(\d+(\.\d+)?)px/;
34055
+ function fC(t2) {
34056
+ if (t2 === "0" || ZP.isUndefined(t2))
34036
34057
  return 0;
34037
- var e2 = t2.match(dC);
34038
- return YP.isNull(e2) ? 0 : parseFloat(e2[1]);
34058
+ var e2 = t2.match(pC);
34059
+ return ZP.isNull(e2) ? 0 : parseFloat(e2[1]);
34039
34060
  }
34040
- var fC = { makeSelectable: function(t2, e2) {
34061
+ var mC = { makeSelectable: function(t2, e2) {
34041
34062
  t2 !== void 0 && t2.style !== void 0 && (t2.onselectstart = e2 ? function() {
34042
34063
  return false;
34043
34064
  } : function() {
34044
34065
  }, t2.style.MozUserSelect = e2 ? "auto" : "none", t2.style.KhtmlUserSelect = e2 ? "auto" : "none", t2.unselectable = e2 ? "on" : "off");
34045
34066
  }, makeFullscreen: function(t2, e2, n2) {
34046
34067
  var i2 = n2, r2 = e2;
34047
- YP.isUndefined(r2) && (r2 = true), YP.isUndefined(i2) && (i2 = true), t2.style.position = "absolute", r2 && (t2.style.left = 0, t2.style.right = 0), i2 && (t2.style.top = 0, t2.style.bottom = 0);
34068
+ ZP.isUndefined(r2) && (r2 = true), ZP.isUndefined(i2) && (i2 = true), t2.style.position = "absolute", r2 && (t2.style.left = 0, t2.style.right = 0), i2 && (t2.style.top = 0, t2.style.bottom = 0);
34048
34069
  }, fakeEvent: function(t2, e2, n2, i2) {
34049
- var r2 = n2 || {}, o2 = cC[e2];
34070
+ var r2 = n2 || {}, o2 = dC[e2];
34050
34071
  if (!o2)
34051
34072
  throw new Error("Event type " + e2 + " not supported.");
34052
34073
  var s2 = document.createEvent(o2);
@@ -34057,18 +34078,18 @@ void main(void){
34057
34078
  break;
34058
34079
  case "KeyboardEvents":
34059
34080
  var u2 = s2.initKeyboardEvent || s2.initKeyEvent;
34060
- YP.defaults(r2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), u2(e2, r2.bubbles || false, r2.cancelable, window, r2.ctrlKey, r2.altKey, r2.shiftKey, r2.metaKey, r2.keyCode, r2.charCode);
34081
+ ZP.defaults(r2, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), u2(e2, r2.bubbles || false, r2.cancelable, window, r2.ctrlKey, r2.altKey, r2.shiftKey, r2.metaKey, r2.keyCode, r2.charCode);
34061
34082
  break;
34062
34083
  default:
34063
34084
  s2.initEvent(e2, r2.bubbles || false, r2.cancelable || true);
34064
34085
  }
34065
- YP.defaults(s2, i2), t2.dispatchEvent(s2);
34086
+ ZP.defaults(s2, i2), t2.dispatchEvent(s2);
34066
34087
  }, bind: function(t2, e2, n2, i2) {
34067
34088
  var r2 = i2 || false;
34068
- return t2.addEventListener ? t2.addEventListener(e2, n2, r2) : t2.attachEvent && t2.attachEvent("on" + e2, n2), fC;
34089
+ return t2.addEventListener ? t2.addEventListener(e2, n2, r2) : t2.attachEvent && t2.attachEvent("on" + e2, n2), mC;
34069
34090
  }, unbind: function(t2, e2, n2, i2) {
34070
34091
  var r2 = i2 || false;
34071
- return t2.removeEventListener ? t2.removeEventListener(e2, n2, r2) : t2.detachEvent && t2.detachEvent("on" + e2, n2), fC;
34092
+ return t2.removeEventListener ? t2.removeEventListener(e2, n2, r2) : t2.detachEvent && t2.detachEvent("on" + e2, n2), mC;
34072
34093
  }, addClass: function(t2, e2) {
34073
34094
  if (t2.className === void 0)
34074
34095
  t2.className = e2;
@@ -34076,7 +34097,7 @@ void main(void){
34076
34097
  var n2 = t2.className.split(/ +/);
34077
34098
  n2.indexOf(e2) === -1 && (n2.push(e2), t2.className = n2.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
34078
34099
  }
34079
- return fC;
34100
+ return mC;
34080
34101
  }, removeClass: function(t2, e2) {
34081
34102
  if (e2)
34082
34103
  if (t2.className === e2)
@@ -34087,15 +34108,15 @@ void main(void){
34087
34108
  }
34088
34109
  else
34089
34110
  t2.className = void 0;
34090
- return fC;
34111
+ return mC;
34091
34112
  }, hasClass: function(t2, e2) {
34092
34113
  return new RegExp("(?:^|\\s+)" + e2 + "(?:\\s+|$)").test(t2.className) || false;
34093
34114
  }, getWidth: function(t2) {
34094
34115
  var e2 = getComputedStyle(t2);
34095
- return pC(e2["border-left-width"]) + pC(e2["border-right-width"]) + pC(e2["padding-left"]) + pC(e2["padding-right"]) + pC(e2.width);
34116
+ return fC(e2["border-left-width"]) + fC(e2["border-right-width"]) + fC(e2["padding-left"]) + fC(e2["padding-right"]) + fC(e2.width);
34096
34117
  }, getHeight: function(t2) {
34097
34118
  var e2 = getComputedStyle(t2);
34098
- return pC(e2["border-top-width"]) + pC(e2["border-bottom-width"]) + pC(e2["padding-top"]) + pC(e2["padding-bottom"]) + pC(e2.height);
34119
+ return fC(e2["border-top-width"]) + fC(e2["border-bottom-width"]) + fC(e2["padding-top"]) + fC(e2["padding-bottom"]) + fC(e2.height);
34099
34120
  }, getOffset: function(t2) {
34100
34121
  var e2 = t2, n2 = { left: 0, top: 0 };
34101
34122
  if (e2.offsetParent)
@@ -34105,86 +34126,86 @@ void main(void){
34105
34126
  return n2;
34106
34127
  }, isActive: function(t2) {
34107
34128
  return t2 === document.activeElement && (t2.type || t2.href);
34108
- } }, mC = function(t2) {
34129
+ } }, gC = function(t2) {
34109
34130
  function e2(t3, n2) {
34110
- nC(this, e2);
34111
- var i2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
34112
- return i2.__prev = i2.getValue(), i2.__checkbox = document.createElement("input"), i2.__checkbox.setAttribute("type", "checkbox"), fC.bind(i2.__checkbox, "change", function() {
34131
+ iC(this, e2);
34132
+ var i2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
34133
+ return i2.__prev = i2.getValue(), i2.__checkbox = document.createElement("input"), i2.__checkbox.setAttribute("type", "checkbox"), mC.bind(i2.__checkbox, "change", function() {
34113
34134
  r2.setValue(!r2.__prev);
34114
34135
  }, false), i2.domElement.appendChild(i2.__checkbox), i2.updateDisplay(), i2;
34115
34136
  }
34116
- return oC(e2, t2), iC(e2, [{ key: "setValue", value: function(t3) {
34117
- var n2 = rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
34137
+ return sC(e2, t2), rC(e2, [{ key: "setValue", value: function(t3) {
34138
+ var n2 = oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
34118
34139
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), n2;
34119
34140
  } }, { key: "updateDisplay", value: function() {
34120
- return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34141
+ return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34121
34142
  } }]), e2;
34122
- }(hC), gC = function(t2) {
34143
+ }(cC), vC = function(t2) {
34123
34144
  function e2(t3, n2, i2) {
34124
- nC(this, e2);
34125
- var r2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2, s2 = r2;
34126
- if (r2.__select = document.createElement("select"), YP.isArray(o2)) {
34145
+ iC(this, e2);
34146
+ var r2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2, s2 = r2;
34147
+ if (r2.__select = document.createElement("select"), ZP.isArray(o2)) {
34127
34148
  var a2 = {};
34128
- YP.each(o2, function(t4) {
34149
+ ZP.each(o2, function(t4) {
34129
34150
  a2[t4] = t4;
34130
34151
  }), o2 = a2;
34131
34152
  }
34132
- return YP.each(o2, function(t4, e3) {
34153
+ return ZP.each(o2, function(t4, e3) {
34133
34154
  var n3 = document.createElement("option");
34134
34155
  n3.innerHTML = e3, n3.setAttribute("value", t4), s2.__select.appendChild(n3);
34135
- }), r2.updateDisplay(), fC.bind(r2.__select, "change", function() {
34156
+ }), r2.updateDisplay(), mC.bind(r2.__select, "change", function() {
34136
34157
  var t4 = this.options[this.selectedIndex].value;
34137
34158
  s2.setValue(t4);
34138
34159
  }), r2.domElement.appendChild(r2.__select), r2;
34139
34160
  }
34140
- return oC(e2, t2), iC(e2, [{ key: "setValue", value: function(t3) {
34141
- var n2 = rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
34161
+ return sC(e2, t2), rC(e2, [{ key: "setValue", value: function(t3) {
34162
+ var n2 = oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, t3);
34142
34163
  return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), n2;
34143
34164
  } }, { key: "updateDisplay", value: function() {
34144
- return fC.isActive(this.__select) ? this : (this.__select.value = this.getValue(), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this));
34165
+ return mC.isActive(this.__select) ? this : (this.__select.value = this.getValue(), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this));
34145
34166
  } }]), e2;
34146
- }(hC), vC = function(t2) {
34167
+ }(cC), _C = function(t2) {
34147
34168
  function e2(t3, n2) {
34148
- nC(this, e2);
34149
- var i2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
34169
+ iC(this, e2);
34170
+ var i2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), r2 = i2;
34150
34171
  function o2() {
34151
34172
  r2.setValue(r2.__input.value);
34152
34173
  }
34153
- return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"), fC.bind(i2.__input, "keyup", o2), fC.bind(i2.__input, "change", o2), fC.bind(i2.__input, "blur", function() {
34174
+ return i2.__input = document.createElement("input"), i2.__input.setAttribute("type", "text"), mC.bind(i2.__input, "keyup", o2), mC.bind(i2.__input, "change", o2), mC.bind(i2.__input, "blur", function() {
34154
34175
  r2.__onFinishChange && r2.__onFinishChange.call(r2, r2.getValue());
34155
- }), fC.bind(i2.__input, "keydown", function(t4) {
34176
+ }), mC.bind(i2.__input, "keydown", function(t4) {
34156
34177
  t4.keyCode === 13 && this.blur();
34157
34178
  }), i2.updateDisplay(), i2.domElement.appendChild(i2.__input), i2;
34158
34179
  }
34159
- return oC(e2, t2), iC(e2, [{ key: "updateDisplay", value: function() {
34160
- return fC.isActive(this.__input) || (this.__input.value = this.getValue()), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34180
+ return sC(e2, t2), rC(e2, [{ key: "updateDisplay", value: function() {
34181
+ return mC.isActive(this.__input) || (this.__input.value = this.getValue()), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34161
34182
  } }]), e2;
34162
- }(hC);
34163
- function _C(t2) {
34183
+ }(cC);
34184
+ function yC(t2) {
34164
34185
  var e2 = t2.toString();
34165
34186
  return e2.indexOf(".") > -1 ? e2.length - e2.indexOf(".") - 1 : 0;
34166
34187
  }
34167
- var yC = function(t2) {
34188
+ var xC = function(t2) {
34168
34189
  function e2(t3, n2, i2) {
34169
- nC(this, e2);
34170
- var r2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2 || {};
34171
- return r2.__min = o2.min, r2.__max = o2.max, r2.__step = o2.step, YP.isUndefined(r2.__step) ? r2.initialValue === 0 ? r2.__impliedStep = 1 : r2.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r2.initialValue)) / Math.LN10)) / 10 : r2.__impliedStep = r2.__step, r2.__precision = _C(r2.__impliedStep), r2;
34190
+ iC(this, e2);
34191
+ var r2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = i2 || {};
34192
+ return r2.__min = o2.min, r2.__max = o2.max, r2.__step = o2.step, ZP.isUndefined(r2.__step) ? r2.initialValue === 0 ? r2.__impliedStep = 1 : r2.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r2.initialValue)) / Math.LN10)) / 10 : r2.__impliedStep = r2.__step, r2.__precision = yC(r2.__impliedStep), r2;
34172
34193
  }
34173
- return oC(e2, t2), iC(e2, [{ key: "setValue", value: function(t3) {
34194
+ return sC(e2, t2), rC(e2, [{ key: "setValue", value: function(t3) {
34174
34195
  var n2 = t3;
34175
- return this.__min !== void 0 && n2 < this.__min ? n2 = this.__min : this.__max !== void 0 && n2 > this.__max && (n2 = this.__max), this.__step !== void 0 && n2 % this.__step != 0 && (n2 = Math.round(n2 / this.__step) * this.__step), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, n2);
34196
+ return this.__min !== void 0 && n2 < this.__min ? n2 = this.__min : this.__max !== void 0 && n2 > this.__max && (n2 = this.__max), this.__step !== void 0 && n2 % this.__step != 0 && (n2 = Math.round(n2 / this.__step) * this.__step), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "setValue", this).call(this, n2);
34176
34197
  } }, { key: "min", value: function(t3) {
34177
34198
  return this.__min = t3, this;
34178
34199
  } }, { key: "max", value: function(t3) {
34179
34200
  return this.__max = t3, this;
34180
34201
  } }, { key: "step", value: function(t3) {
34181
- return this.__step = t3, this.__impliedStep = t3, this.__precision = _C(t3), this;
34202
+ return this.__step = t3, this.__impliedStep = t3, this.__precision = yC(t3), this;
34182
34203
  } }]), e2;
34183
- }(hC);
34184
- var xC = function(t2) {
34204
+ }(cC);
34205
+ var bC = function(t2) {
34185
34206
  function e2(t3, n2, i2) {
34186
- nC(this, e2);
34187
- var r2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, i2));
34207
+ iC(this, e2);
34208
+ var r2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, i2));
34188
34209
  r2.__truncationSuspended = false;
34189
34210
  var o2 = r2, s2 = void 0;
34190
34211
  function a2() {
@@ -34195,101 +34216,101 @@ void main(void){
34195
34216
  o2.setValue(o2.getValue() + e3 * o2.__impliedStep), s2 = t4.clientY;
34196
34217
  }
34197
34218
  function u2() {
34198
- fC.unbind(window, "mousemove", l2), fC.unbind(window, "mouseup", u2), a2();
34219
+ mC.unbind(window, "mousemove", l2), mC.unbind(window, "mouseup", u2), a2();
34199
34220
  }
34200
- return r2.__input = document.createElement("input"), r2.__input.setAttribute("type", "text"), fC.bind(r2.__input, "change", function() {
34221
+ return r2.__input = document.createElement("input"), r2.__input.setAttribute("type", "text"), mC.bind(r2.__input, "change", function() {
34201
34222
  var t4 = parseFloat(o2.__input.value);
34202
- YP.isNaN(t4) || o2.setValue(t4);
34203
- }), fC.bind(r2.__input, "blur", function() {
34223
+ ZP.isNaN(t4) || o2.setValue(t4);
34224
+ }), mC.bind(r2.__input, "blur", function() {
34204
34225
  a2();
34205
- }), fC.bind(r2.__input, "mousedown", function(t4) {
34206
- fC.bind(window, "mousemove", l2), fC.bind(window, "mouseup", u2), s2 = t4.clientY;
34207
- }), fC.bind(r2.__input, "keydown", function(t4) {
34226
+ }), mC.bind(r2.__input, "mousedown", function(t4) {
34227
+ mC.bind(window, "mousemove", l2), mC.bind(window, "mouseup", u2), s2 = t4.clientY;
34228
+ }), mC.bind(r2.__input, "keydown", function(t4) {
34208
34229
  t4.keyCode === 13 && (o2.__truncationSuspended = true, this.blur(), o2.__truncationSuspended = false, a2());
34209
34230
  }), r2.updateDisplay(), r2.domElement.appendChild(r2.__input), r2;
34210
34231
  }
34211
- return oC(e2, t2), iC(e2, [{ key: "updateDisplay", value: function() {
34232
+ return sC(e2, t2), rC(e2, [{ key: "updateDisplay", value: function() {
34212
34233
  var t3, n2, i2;
34213
- return this.__input.value = this.__truncationSuspended ? this.getValue() : (t3 = this.getValue(), n2 = this.__precision, i2 = Math.pow(10, n2), Math.round(t3 * i2) / i2), rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34234
+ return this.__input.value = this.__truncationSuspended ? this.getValue() : (t3 = this.getValue(), n2 = this.__precision, i2 = Math.pow(10, n2), Math.round(t3 * i2) / i2), oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34214
34235
  } }]), e2;
34215
- }(yC);
34216
- function bC(t2, e2, n2, i2, r2) {
34236
+ }(xC);
34237
+ function TC(t2, e2, n2, i2, r2) {
34217
34238
  return i2 + (t2 - e2) / (n2 - e2) * (r2 - i2);
34218
34239
  }
34219
- var TC = function(t2) {
34240
+ var wC = function(t2) {
34220
34241
  function e2(t3, n2, i2, r2, o2) {
34221
- nC(this, e2);
34222
- var s2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, { min: i2, max: r2, step: o2 })), a2 = s2;
34242
+ iC(this, e2);
34243
+ var s2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2, { min: i2, max: r2, step: o2 })), a2 = s2;
34223
34244
  function l2(t4) {
34224
34245
  t4.preventDefault();
34225
34246
  var e3 = a2.__background.getBoundingClientRect();
34226
- return a2.setValue(bC(t4.clientX, e3.left, e3.right, a2.__min, a2.__max)), false;
34247
+ return a2.setValue(TC(t4.clientX, e3.left, e3.right, a2.__min, a2.__max)), false;
34227
34248
  }
34228
34249
  function u2() {
34229
- fC.unbind(window, "mousemove", l2), fC.unbind(window, "mouseup", u2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34250
+ mC.unbind(window, "mousemove", l2), mC.unbind(window, "mouseup", u2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34230
34251
  }
34231
34252
  function h2(t4) {
34232
34253
  var e3 = t4.touches[0].clientX, n3 = a2.__background.getBoundingClientRect();
34233
- a2.setValue(bC(e3, n3.left, n3.right, a2.__min, a2.__max));
34254
+ a2.setValue(TC(e3, n3.left, n3.right, a2.__min, a2.__max));
34234
34255
  }
34235
34256
  function c2() {
34236
- fC.unbind(window, "touchmove", h2), fC.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34257
+ mC.unbind(window, "touchmove", h2), mC.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
34237
34258
  }
34238
- return s2.__background = document.createElement("div"), s2.__foreground = document.createElement("div"), fC.bind(s2.__background, "mousedown", function(t4) {
34239
- document.activeElement.blur(), fC.bind(window, "mousemove", l2), fC.bind(window, "mouseup", u2), l2(t4);
34240
- }), fC.bind(s2.__background, "touchstart", function(t4) {
34259
+ return s2.__background = document.createElement("div"), s2.__foreground = document.createElement("div"), mC.bind(s2.__background, "mousedown", function(t4) {
34260
+ document.activeElement.blur(), mC.bind(window, "mousemove", l2), mC.bind(window, "mouseup", u2), l2(t4);
34261
+ }), mC.bind(s2.__background, "touchstart", function(t4) {
34241
34262
  if (t4.touches.length !== 1)
34242
34263
  return;
34243
- fC.bind(window, "touchmove", h2), fC.bind(window, "touchend", c2), h2(t4);
34244
- }), fC.addClass(s2.__background, "slider"), fC.addClass(s2.__foreground, "slider-fg"), s2.updateDisplay(), s2.__background.appendChild(s2.__foreground), s2.domElement.appendChild(s2.__background), s2;
34264
+ mC.bind(window, "touchmove", h2), mC.bind(window, "touchend", c2), h2(t4);
34265
+ }), mC.addClass(s2.__background, "slider"), mC.addClass(s2.__foreground, "slider-fg"), s2.updateDisplay(), s2.__background.appendChild(s2.__foreground), s2.domElement.appendChild(s2.__background), s2;
34245
34266
  }
34246
- return oC(e2, t2), iC(e2, [{ key: "updateDisplay", value: function() {
34267
+ return sC(e2, t2), rC(e2, [{ key: "updateDisplay", value: function() {
34247
34268
  var t3 = (this.getValue() - this.__min) / (this.__max - this.__min);
34248
- return this.__foreground.style.width = 100 * t3 + "%", rC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34269
+ return this.__foreground.style.width = 100 * t3 + "%", oC(e2.prototype.__proto__ || Object.getPrototypeOf(e2.prototype), "updateDisplay", this).call(this);
34249
34270
  } }]), e2;
34250
- }(yC), wC = function(t2) {
34271
+ }(xC), SC = function(t2) {
34251
34272
  function e2(t3, n2, i2) {
34252
- nC(this, e2);
34253
- var r2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = r2;
34254
- return r2.__button = document.createElement("div"), r2.__button.innerHTML = i2 === void 0 ? "Fire" : i2, fC.bind(r2.__button, "click", function(t4) {
34273
+ iC(this, e2);
34274
+ var r2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2)), o2 = r2;
34275
+ return r2.__button = document.createElement("div"), r2.__button.innerHTML = i2 === void 0 ? "Fire" : i2, mC.bind(r2.__button, "click", function(t4) {
34255
34276
  return t4.preventDefault(), o2.fire(), false;
34256
- }), fC.addClass(r2.__button, "button"), r2.domElement.appendChild(r2.__button), r2;
34277
+ }), mC.addClass(r2.__button, "button"), r2.domElement.appendChild(r2.__button), r2;
34257
34278
  }
34258
- return oC(e2, t2), iC(e2, [{ key: "fire", value: function() {
34279
+ return sC(e2, t2), rC(e2, [{ key: "fire", value: function() {
34259
34280
  this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
34260
34281
  } }]), e2;
34261
- }(hC), SC = function(t2) {
34282
+ }(cC), EC = function(t2) {
34262
34283
  function e2(t3, n2) {
34263
- nC(this, e2);
34264
- var i2 = sC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2));
34265
- i2.__color = new aC(i2.getValue()), i2.__temp = new aC(0);
34284
+ iC(this, e2);
34285
+ var i2 = aC(this, (e2.__proto__ || Object.getPrototypeOf(e2)).call(this, t3, n2));
34286
+ i2.__color = new lC(i2.getValue()), i2.__temp = new lC(0);
34266
34287
  var r2 = i2;
34267
- i2.domElement = document.createElement("div"), fC.makeSelectable(i2.domElement, false), i2.__selector = document.createElement("div"), i2.__selector.className = "selector", i2.__saturation_field = document.createElement("div"), i2.__saturation_field.className = "saturation-field", i2.__field_knob = document.createElement("div"), i2.__field_knob.className = "field-knob", i2.__field_knob_border = "2px solid ", i2.__hue_knob = document.createElement("div"), i2.__hue_knob.className = "hue-knob", i2.__hue_field = document.createElement("div"), i2.__hue_field.className = "hue-field", i2.__input = document.createElement("input"), i2.__input.type = "text", i2.__input_textShadow = "0 1px 1px ", fC.bind(i2.__input, "keydown", function(t4) {
34288
+ i2.domElement = document.createElement("div"), mC.makeSelectable(i2.domElement, false), i2.__selector = document.createElement("div"), i2.__selector.className = "selector", i2.__saturation_field = document.createElement("div"), i2.__saturation_field.className = "saturation-field", i2.__field_knob = document.createElement("div"), i2.__field_knob.className = "field-knob", i2.__field_knob_border = "2px solid ", i2.__hue_knob = document.createElement("div"), i2.__hue_knob.className = "hue-knob", i2.__hue_field = document.createElement("div"), i2.__hue_field.className = "hue-field", i2.__input = document.createElement("input"), i2.__input.type = "text", i2.__input_textShadow = "0 1px 1px ", mC.bind(i2.__input, "keydown", function(t4) {
34268
34289
  t4.keyCode === 13 && c2.call(this);
34269
- }), fC.bind(i2.__input, "blur", c2), fC.bind(i2.__selector, "mousedown", function() {
34270
- fC.addClass(this, "drag").bind(window, "mouseup", function() {
34271
- fC.removeClass(r2.__selector, "drag");
34290
+ }), mC.bind(i2.__input, "blur", c2), mC.bind(i2.__selector, "mousedown", function() {
34291
+ mC.addClass(this, "drag").bind(window, "mouseup", function() {
34292
+ mC.removeClass(r2.__selector, "drag");
34272
34293
  });
34273
- }), fC.bind(i2.__selector, "touchstart", function() {
34274
- fC.addClass(this, "drag").bind(window, "touchend", function() {
34275
- fC.removeClass(r2.__selector, "drag");
34294
+ }), mC.bind(i2.__selector, "touchstart", function() {
34295
+ mC.addClass(this, "drag").bind(window, "touchend", function() {
34296
+ mC.removeClass(r2.__selector, "drag");
34276
34297
  });
34277
34298
  });
34278
34299
  var o2, s2 = document.createElement("div");
34279
34300
  function a2(t4) {
34280
- p2(t4), fC.bind(window, "mousemove", p2), fC.bind(window, "touchmove", p2), fC.bind(window, "mouseup", u2), fC.bind(window, "touchend", u2);
34301
+ p2(t4), mC.bind(window, "mousemove", p2), mC.bind(window, "touchmove", p2), mC.bind(window, "mouseup", u2), mC.bind(window, "touchend", u2);
34281
34302
  }
34282
34303
  function l2(t4) {
34283
- f2(t4), fC.bind(window, "mousemove", f2), fC.bind(window, "touchmove", f2), fC.bind(window, "mouseup", h2), fC.bind(window, "touchend", h2);
34304
+ f2(t4), mC.bind(window, "mousemove", f2), mC.bind(window, "touchmove", f2), mC.bind(window, "mouseup", h2), mC.bind(window, "touchend", h2);
34284
34305
  }
34285
34306
  function u2() {
34286
- fC.unbind(window, "mousemove", p2), fC.unbind(window, "touchmove", p2), fC.unbind(window, "mouseup", u2), fC.unbind(window, "touchend", u2), d2();
34307
+ mC.unbind(window, "mousemove", p2), mC.unbind(window, "touchmove", p2), mC.unbind(window, "mouseup", u2), mC.unbind(window, "touchend", u2), d2();
34287
34308
  }
34288
34309
  function h2() {
34289
- fC.unbind(window, "mousemove", f2), fC.unbind(window, "touchmove", f2), fC.unbind(window, "mouseup", h2), fC.unbind(window, "touchend", h2), d2();
34310
+ mC.unbind(window, "mousemove", f2), mC.unbind(window, "touchmove", f2), mC.unbind(window, "mouseup", h2), mC.unbind(window, "touchend", h2), d2();
34290
34311
  }
34291
34312
  function c2() {
34292
- var t4 = KP(this.value);
34313
+ var t4 = QP(this.value);
34293
34314
  t4 !== false ? (r2.__color.__state = t4, r2.setValue(r2.__color.toOriginal())) : this.value = r2.__color.toString();
34294
34315
  }
34295
34316
  function d2() {
@@ -34305,28 +34326,28 @@ void main(void){
34305
34326
  var e3 = r2.__hue_field.getBoundingClientRect(), n3 = 1 - ((t4.touches && t4.touches[0] || t4).clientY - e3.top) / (e3.bottom - e3.top);
34306
34327
  return n3 > 1 ? n3 = 1 : n3 < 0 && (n3 = 0), r2.__color.h = 360 * n3, r2.setValue(r2.__color.toOriginal()), false;
34307
34328
  }
34308
- return YP.extend(i2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), YP.extend(i2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i2.__field_knob_border + (i2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), YP.extend(i2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), YP.extend(i2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), YP.extend(s2.style, { width: "100%", height: "100%", background: "none" }), MC(s2, "top", "rgba(0,0,0,0)", "#000"), YP.extend(i2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = i2.__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(i2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i2.__input_textShadow + "rgba(0,0,0,0.7)" }), fC.bind(i2.__saturation_field, "mousedown", a2), fC.bind(i2.__saturation_field, "touchstart", a2), fC.bind(i2.__field_knob, "mousedown", a2), fC.bind(i2.__field_knob, "touchstart", a2), fC.bind(i2.__hue_field, "mousedown", l2), fC.bind(i2.__hue_field, "touchstart", l2), i2.__saturation_field.appendChild(s2), i2.__selector.appendChild(i2.__field_knob), i2.__selector.appendChild(i2.__saturation_field), i2.__selector.appendChild(i2.__hue_field), i2.__hue_field.appendChild(i2.__hue_knob), i2.domElement.appendChild(i2.__input), i2.domElement.appendChild(i2.__selector), i2.updateDisplay(), i2;
34329
+ return ZP.extend(i2.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), ZP.extend(i2.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i2.__field_knob_border + (i2.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), ZP.extend(i2.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), ZP.extend(i2.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), ZP.extend(s2.style, { width: "100%", height: "100%", background: "none" }), AC(s2, "top", "rgba(0,0,0,0)", "#000"), ZP.extend(i2.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = i2.__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%);", ZP.extend(i2.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i2.__input_textShadow + "rgba(0,0,0,0.7)" }), mC.bind(i2.__saturation_field, "mousedown", a2), mC.bind(i2.__saturation_field, "touchstart", a2), mC.bind(i2.__field_knob, "mousedown", a2), mC.bind(i2.__field_knob, "touchstart", a2), mC.bind(i2.__hue_field, "mousedown", l2), mC.bind(i2.__hue_field, "touchstart", l2), i2.__saturation_field.appendChild(s2), i2.__selector.appendChild(i2.__field_knob), i2.__selector.appendChild(i2.__saturation_field), i2.__selector.appendChild(i2.__hue_field), i2.__hue_field.appendChild(i2.__hue_knob), i2.domElement.appendChild(i2.__input), i2.domElement.appendChild(i2.__selector), i2.updateDisplay(), i2;
34309
34330
  }
34310
- return oC(e2, t2), iC(e2, [{ key: "updateDisplay", value: function() {
34311
- var t3 = KP(this.getValue());
34331
+ return sC(e2, t2), rC(e2, [{ key: "updateDisplay", value: function() {
34332
+ var t3 = QP(this.getValue());
34312
34333
  if (t3 !== false) {
34313
34334
  var e3 = false;
34314
- YP.each(aC.COMPONENTS, function(n3) {
34315
- if (!YP.isUndefined(t3[n3]) && !YP.isUndefined(this.__color.__state[n3]) && t3[n3] !== this.__color.__state[n3])
34335
+ ZP.each(lC.COMPONENTS, function(n3) {
34336
+ if (!ZP.isUndefined(t3[n3]) && !ZP.isUndefined(this.__color.__state[n3]) && t3[n3] !== this.__color.__state[n3])
34316
34337
  return e3 = true, {};
34317
- }, this), e3 && YP.extend(this.__color.__state, t3);
34338
+ }, this), e3 && ZP.extend(this.__color.__state, t3);
34318
34339
  }
34319
- YP.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
34340
+ ZP.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
34320
34341
  var n2 = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, i2 = 255 - n2;
34321
- 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(" + n2 + "," + n2 + "," + n2 + ")" }), 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(" + n2 + "," + n2 + "," + n2 + ")", textShadow: this.__input_textShadow + "rgba(" + i2 + "," + i2 + "," + i2 + ",.7)" });
34342
+ ZP.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(" + n2 + "," + n2 + "," + n2 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, AC(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), ZP.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n2 + "," + n2 + "," + n2 + ")", textShadow: this.__input_textShadow + "rgba(" + i2 + "," + i2 + "," + i2 + ",.7)" });
34322
34343
  } }]), e2;
34323
- }(hC), EC = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
34324
- function MC(t2, e2, n2, i2) {
34325
- t2.style.background = "", YP.each(EC, function(r2) {
34344
+ }(cC), MC = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
34345
+ function AC(t2, e2, n2, i2) {
34346
+ t2.style.background = "", ZP.each(MC, function(r2) {
34326
34347
  t2.style.cssText += "background: " + r2 + "linear-gradient(" + e2 + ", " + n2 + " 0%, " + i2 + " 100%); ";
34327
34348
  });
34328
34349
  }
34329
- var AC = function(t2, e2) {
34350
+ var RC = function(t2, e2) {
34330
34351
  var n2 = e2 || document, i2 = document.createElement("style");
34331
34352
  i2.type = "text/css", i2.innerHTML = t2;
34332
34353
  var r2 = n2.getElementsByTagName("head")[0];
@@ -34334,7 +34355,7 @@ void main(void){
34334
34355
  r2.appendChild(i2);
34335
34356
  } catch (t3) {
34336
34357
  }
34337
- }, RC = `<div id="dg-save" class="dg dialogue">
34358
+ }, PC = `<div id="dg-save" class="dg dialogue">
34338
34359
 
34339
34360
  Here's the new load parameter for your <code>GUI</code>'s constructor:
34340
34361
 
@@ -34354,50 +34375,50 @@ void main(void){
34354
34375
 
34355
34376
  </div>
34356
34377
 
34357
- </div>`, PC = function(t2, e2) {
34378
+ </div>`, CC = function(t2, e2) {
34358
34379
  var n2 = t2[e2];
34359
- return YP.isArray(arguments[2]) || YP.isObject(arguments[2]) ? new gC(t2, e2, arguments[2]) : YP.isNumber(n2) ? YP.isNumber(arguments[2]) && YP.isNumber(arguments[3]) ? YP.isNumber(arguments[4]) ? new TC(t2, e2, arguments[2], arguments[3], arguments[4]) : new TC(t2, e2, arguments[2], arguments[3]) : YP.isNumber(arguments[4]) ? new xC(t2, e2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new xC(t2, e2, { min: arguments[2], max: arguments[3] }) : YP.isString(n2) ? new vC(t2, e2) : YP.isFunction(n2) ? new wC(t2, e2, "") : YP.isBoolean(n2) ? new mC(t2, e2) : null;
34380
+ return ZP.isArray(arguments[2]) || ZP.isObject(arguments[2]) ? new vC(t2, e2, arguments[2]) : ZP.isNumber(n2) ? ZP.isNumber(arguments[2]) && ZP.isNumber(arguments[3]) ? ZP.isNumber(arguments[4]) ? new wC(t2, e2, arguments[2], arguments[3], arguments[4]) : new wC(t2, e2, arguments[2], arguments[3]) : ZP.isNumber(arguments[4]) ? new bC(t2, e2, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new bC(t2, e2, { min: arguments[2], max: arguments[3] }) : ZP.isString(n2) ? new _C(t2, e2) : ZP.isFunction(n2) ? new SC(t2, e2, "") : ZP.isBoolean(n2) ? new gC(t2, e2) : null;
34360
34381
  };
34361
- var CC = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t2) {
34382
+ var IC = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t2) {
34362
34383
  setTimeout(t2, 1e3 / 60);
34363
- }, IC = function() {
34384
+ }, OC = function() {
34364
34385
  function t2() {
34365
- nC(this, t2), 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);
34386
+ iC(this, t2), this.backgroundElement = document.createElement("div"), ZP.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" }), mC.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), ZP.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);
34366
34387
  var e2 = this;
34367
- fC.bind(this.backgroundElement, "click", function() {
34388
+ mC.bind(this.backgroundElement, "click", function() {
34368
34389
  e2.hide();
34369
34390
  });
34370
34391
  }
34371
- return iC(t2, [{ key: "show", value: function() {
34392
+ return rC(t2, [{ key: "show", value: function() {
34372
34393
  var t3 = this;
34373
- 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() {
34394
+ this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), ZP.defer(function() {
34374
34395
  t3.backgroundElement.style.opacity = 1, t3.domElement.style.opacity = 1, t3.domElement.style.webkitTransform = "scale(1)";
34375
34396
  });
34376
34397
  } }, { key: "hide", value: function() {
34377
34398
  var t3 = this, e2 = function e3() {
34378
- t3.domElement.style.display = "none", t3.backgroundElement.style.display = "none", fC.unbind(t3.domElement, "webkitTransitionEnd", e3), fC.unbind(t3.domElement, "transitionend", e3), fC.unbind(t3.domElement, "oTransitionEnd", e3);
34399
+ t3.domElement.style.display = "none", t3.backgroundElement.style.display = "none", mC.unbind(t3.domElement, "webkitTransitionEnd", e3), mC.unbind(t3.domElement, "transitionend", e3), mC.unbind(t3.domElement, "oTransitionEnd", e3);
34379
34400
  };
34380
- fC.bind(this.domElement, "webkitTransitionEnd", e2), fC.bind(this.domElement, "transitionend", e2), fC.bind(this.domElement, "oTransitionEnd", e2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
34401
+ mC.bind(this.domElement, "webkitTransitionEnd", e2), mC.bind(this.domElement, "transitionend", e2), mC.bind(this.domElement, "oTransitionEnd", e2), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
34381
34402
  } }, { key: "layout", value: function() {
34382
- 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";
34403
+ this.domElement.style.left = window.innerWidth / 2 - mC.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - mC.getHeight(this.domElement) / 2 + "px";
34383
34404
  } }]), t2;
34384
34405
  }();
34385
- AC(function(t2) {
34406
+ RC(function(t2) {
34386
34407
  if (t2 && typeof window != "undefined") {
34387
34408
  var e2 = document.createElement("style");
34388
34409
  return e2.setAttribute("type", "text/css"), e2.innerHTML = t2, document.head.appendChild(e2), t2;
34389
34410
  }
34390
34411
  }(".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"));
34391
- var OC = function() {
34412
+ var LC = function() {
34392
34413
  try {
34393
34414
  return !!window.localStorage;
34394
34415
  } catch (t2) {
34395
34416
  return false;
34396
34417
  }
34397
- }(), LC = void 0, NC = true, DC = void 0, FC = false, BC = [], UC = function t2(e2) {
34418
+ }(), NC = void 0, DC = true, FC = void 0, BC = false, UC = [], kC = function t2(e2) {
34398
34419
  var n2 = this, i2 = e2 || {};
34399
- 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 = [], i2 = YP.defaults(i2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), i2 = YP.defaults(i2, { resizable: i2.autoPlace, hideable: i2.autoPlace }), YP.isUndefined(i2.load) ? i2.load = { preset: "Default" } : i2.preset && (i2.load.preset = i2.preset), YP.isUndefined(i2.parent) && i2.hideable && BC.push(this), i2.resizable = YP.isUndefined(i2.parent) && i2.resizable, i2.autoPlace && YP.isUndefined(i2.scrollable) && (i2.scrollable = true);
34400
- var r2, o2 = OC && localStorage.getItem(VC(this, "isLocal")) === "true", s2 = void 0, a2 = void 0;
34420
+ this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), mC.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], i2 = ZP.defaults(i2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), i2 = ZP.defaults(i2, { resizable: i2.autoPlace, hideable: i2.autoPlace }), ZP.isUndefined(i2.load) ? i2.load = { preset: "Default" } : i2.preset && (i2.load.preset = i2.preset), ZP.isUndefined(i2.parent) && i2.hideable && UC.push(this), i2.resizable = ZP.isUndefined(i2.parent) && i2.resizable, i2.autoPlace && ZP.isUndefined(i2.scrollable) && (i2.scrollable = true);
34421
+ var r2, o2 = LC && localStorage.getItem(WC(this, "isLocal")) === "true", s2 = void 0, a2 = void 0;
34401
34422
  if (Object.defineProperties(this, { parent: { get: function() {
34402
34423
  return i2.parent;
34403
34424
  } }, scrollable: { get: function() {
@@ -34416,7 +34437,7 @@ void main(void){
34416
34437
  } }, width: { get: function() {
34417
34438
  return i2.width;
34418
34439
  }, set: function(t3) {
34419
- i2.width = t3, ZC(n2, t3);
34440
+ i2.width = t3, JC(n2, t3);
34420
34441
  } }, name: { get: function() {
34421
34442
  return i2.name;
34422
34443
  }, set: function(t3) {
@@ -34424,50 +34445,50 @@ void main(void){
34424
34445
  } }, closed: { get: function() {
34425
34446
  return i2.closed;
34426
34447
  }, set: function(e3) {
34427
- i2.closed = e3, i2.closed ? fC.addClass(n2.__ul, t2.CLASS_CLOSED) : fC.removeClass(n2.__ul, t2.CLASS_CLOSED), this.onResize(), n2.__closeButton && (n2.__closeButton.innerHTML = e3 ? t2.TEXT_OPEN : t2.TEXT_CLOSED);
34448
+ i2.closed = e3, i2.closed ? mC.addClass(n2.__ul, t2.CLASS_CLOSED) : mC.removeClass(n2.__ul, t2.CLASS_CLOSED), this.onResize(), n2.__closeButton && (n2.__closeButton.innerHTML = e3 ? t2.TEXT_OPEN : t2.TEXT_CLOSED);
34428
34449
  } }, load: { get: function() {
34429
34450
  return i2.load;
34430
34451
  } }, useLocalStorage: { get: function() {
34431
34452
  return o2;
34432
34453
  }, set: function(t3) {
34433
- OC && (o2 = t3, t3 ? fC.bind(window, "unload", s2) : fC.unbind(window, "unload", s2), localStorage.setItem(VC(n2, "isLocal"), t3));
34434
- } } }), YP.isUndefined(i2.parent)) {
34435
- if (this.closed = i2.closed || false, fC.addClass(this.domElement, t2.CLASS_MAIN), fC.makeSelectable(this.domElement, false), OC && o2) {
34454
+ LC && (o2 = t3, t3 ? mC.bind(window, "unload", s2) : mC.unbind(window, "unload", s2), localStorage.setItem(WC(n2, "isLocal"), t3));
34455
+ } } }), ZP.isUndefined(i2.parent)) {
34456
+ if (this.closed = i2.closed || false, mC.addClass(this.domElement, t2.CLASS_MAIN), mC.makeSelectable(this.domElement, false), LC && o2) {
34436
34457
  n2.useLocalStorage = true;
34437
- var l2 = localStorage.getItem(VC(this, "gui"));
34458
+ var l2 = localStorage.getItem(WC(this, "gui"));
34438
34459
  l2 && (i2.load = JSON.parse(l2));
34439
34460
  }
34440
- this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED, fC.addClass(this.__closeButton, t2.CLASS_CLOSE_BUTTON), i2.closeOnTop ? (fC.addClass(this.__closeButton, t2.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (fC.addClass(this.__closeButton, t2.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), fC.bind(this.__closeButton, "click", function() {
34461
+ this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED, mC.addClass(this.__closeButton, t2.CLASS_CLOSE_BUTTON), i2.closeOnTop ? (mC.addClass(this.__closeButton, t2.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (mC.addClass(this.__closeButton, t2.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), mC.bind(this.__closeButton, "click", function() {
34441
34462
  n2.closed = !n2.closed;
34442
34463
  });
34443
34464
  } else {
34444
34465
  i2.closed === void 0 && (i2.closed = true);
34445
34466
  var u2 = document.createTextNode(i2.name);
34446
- fC.addClass(u2, "controller-name"), a2 = kC(n2, u2);
34447
- fC.addClass(this.__ul, t2.CLASS_CLOSED), fC.addClass(a2, "title"), fC.bind(a2, "click", function(t3) {
34467
+ mC.addClass(u2, "controller-name"), a2 = GC(n2, u2);
34468
+ mC.addClass(this.__ul, t2.CLASS_CLOSED), mC.addClass(a2, "title"), mC.bind(a2, "click", function(t3) {
34448
34469
  return t3.preventDefault(), n2.closed = !n2.closed, false;
34449
34470
  }), i2.closed || (this.closed = false);
34450
34471
  }
34451
- i2.autoPlace && (YP.isUndefined(i2.parent) && (NC && (DC = document.createElement("div"), fC.addClass(DC, "dg"), fC.addClass(DC, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(DC), NC = false), DC.appendChild(this.domElement), fC.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || ZC(n2, i2.width)), this.__resizeHandler = function() {
34472
+ i2.autoPlace && (ZP.isUndefined(i2.parent) && (DC && (FC = document.createElement("div"), mC.addClass(FC, "dg"), mC.addClass(FC, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(FC), DC = false), FC.appendChild(this.domElement), mC.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || JC(n2, i2.width)), this.__resizeHandler = function() {
34452
34473
  n2.onResizeDebounced();
34453
- }, 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(), i2.resizable && YC(this), s2 = function() {
34454
- OC && localStorage.getItem(VC(n2, "isLocal")) === "true" && localStorage.setItem(VC(n2, "gui"), JSON.stringify(n2.getSaveObject()));
34455
- }, this.saveToLocalStorageIfPossible = s2, i2.parent || ((r2 = n2.getRoot()).width += 1, YP.defer(function() {
34474
+ }, mC.bind(window, "resize", this.__resizeHandler), mC.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), mC.bind(this.__ul, "transitionend", this.__resizeHandler), mC.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), i2.resizable && ZC(this), s2 = function() {
34475
+ LC && localStorage.getItem(WC(n2, "isLocal")) === "true" && localStorage.setItem(WC(n2, "gui"), JSON.stringify(n2.getSaveObject()));
34476
+ }, this.saveToLocalStorageIfPossible = s2, i2.parent || ((r2 = n2.getRoot()).width += 1, ZP.defer(function() {
34456
34477
  r2.width -= 1;
34457
34478
  }));
34458
34479
  };
34459
- function kC(t2, e2, n2) {
34480
+ function GC(t2, e2, n2) {
34460
34481
  var i2 = document.createElement("li");
34461
34482
  return e2 && i2.appendChild(e2), n2 ? t2.__ul.insertBefore(i2, n2) : t2.__ul.appendChild(i2), t2.onResize(), i2;
34462
34483
  }
34463
- function GC(t2) {
34464
- fC.unbind(window, "resize", t2.__resizeHandler), t2.saveToLocalStorageIfPossible && fC.unbind(window, "unload", t2.saveToLocalStorageIfPossible);
34484
+ function HC(t2) {
34485
+ mC.unbind(window, "resize", t2.__resizeHandler), t2.saveToLocalStorageIfPossible && mC.unbind(window, "unload", t2.saveToLocalStorageIfPossible);
34465
34486
  }
34466
- function HC(t2, e2) {
34487
+ function zC(t2, e2) {
34467
34488
  var n2 = t2.__preset_select[t2.__preset_select.selectedIndex];
34468
34489
  n2.innerHTML = e2 ? n2.value + "*" : n2.value;
34469
34490
  }
34470
- function zC(t2, e2) {
34491
+ function jC(t2, e2) {
34471
34492
  var n2 = t2.getRoot(), i2 = n2.__rememberedObjects.indexOf(e2.object);
34472
34493
  if (i2 !== -1) {
34473
34494
  var r2 = n2.__rememberedObjectIndecesToControllers[i2];
@@ -34487,31 +34508,31 @@ void main(void){
34487
34508
  }
34488
34509
  }
34489
34510
  }
34490
- function jC(t2, e2, n2, i2) {
34511
+ function VC(t2, e2, n2, i2) {
34491
34512
  if (e2[n2] === void 0)
34492
34513
  throw new Error('Object "' + e2 + '" has no property "' + n2 + '"');
34493
34514
  var r2 = void 0;
34494
34515
  if (i2.color)
34495
- r2 = new SC(e2, n2);
34516
+ r2 = new EC(e2, n2);
34496
34517
  else {
34497
34518
  var o2 = [e2, n2].concat(i2.factoryArgs);
34498
- r2 = PC.apply(t2, o2);
34519
+ r2 = CC.apply(t2, o2);
34499
34520
  }
34500
- i2.before instanceof hC && (i2.before = i2.before.__li), zC(t2, r2), fC.addClass(r2.domElement, "c");
34521
+ i2.before instanceof cC && (i2.before = i2.before.__li), jC(t2, r2), mC.addClass(r2.domElement, "c");
34501
34522
  var s2 = document.createElement("span");
34502
- fC.addClass(s2, "property-name"), s2.innerHTML = r2.property;
34523
+ mC.addClass(s2, "property-name"), s2.innerHTML = r2.property;
34503
34524
  var a2 = document.createElement("div");
34504
34525
  a2.appendChild(s2), a2.appendChild(r2.domElement);
34505
- var l2 = kC(t2, a2, i2.before);
34506
- return fC.addClass(l2, UC.CLASS_CONTROLLER_ROW), r2 instanceof SC ? fC.addClass(l2, "color") : fC.addClass(l2, eC(r2.getValue())), function(t3, e3, n3) {
34507
- if (n3.__li = e3, n3.__gui = t3, YP.extend(n3, { options: function(e4) {
34526
+ var l2 = GC(t2, a2, i2.before);
34527
+ return mC.addClass(l2, kC.CLASS_CONTROLLER_ROW), r2 instanceof EC ? mC.addClass(l2, "color") : mC.addClass(l2, nC(r2.getValue())), function(t3, e3, n3) {
34528
+ if (n3.__li = e3, n3.__gui = t3, ZP.extend(n3, { options: function(e4) {
34508
34529
  if (arguments.length > 1) {
34509
34530
  var i4 = n3.__li.nextElementSibling;
34510
- return n3.remove(), jC(t3, n3.object, n3.property, { before: i4, factoryArgs: [YP.toArray(arguments)] });
34531
+ return n3.remove(), VC(t3, n3.object, n3.property, { before: i4, factoryArgs: [ZP.toArray(arguments)] });
34511
34532
  }
34512
- if (YP.isArray(e4) || YP.isObject(e4)) {
34533
+ if (ZP.isArray(e4) || ZP.isObject(e4)) {
34513
34534
  var r4 = n3.__li.nextElementSibling;
34514
- return n3.remove(), jC(t3, n3.object, n3.property, { before: r4, factoryArgs: [e4] });
34535
+ return n3.remove(), VC(t3, n3.object, n3.property, { before: r4, factoryArgs: [e4] });
34515
34536
  }
34516
34537
  }, name: function(t4) {
34517
34538
  return n3.__li.firstElementChild.firstElementChild.innerHTML = t4, n3;
@@ -34519,157 +34540,157 @@ void main(void){
34519
34540
  return n3.__gui.listen(n3), n3;
34520
34541
  }, remove: function() {
34521
34542
  return n3.__gui.remove(n3), n3;
34522
- } }), n3 instanceof TC) {
34523
- var i3 = new xC(n3.object, n3.property, { min: n3.__min, max: n3.__max, step: n3.__step });
34524
- YP.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t4) {
34543
+ } }), n3 instanceof wC) {
34544
+ var i3 = new bC(n3.object, n3.property, { min: n3.__min, max: n3.__max, step: n3.__step });
34545
+ ZP.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t4) {
34525
34546
  var e4 = n3[t4], r4 = i3[t4];
34526
34547
  n3[t4] = i3[t4] = function() {
34527
34548
  var t5 = Array.prototype.slice.call(arguments);
34528
34549
  return r4.apply(i3, t5), e4.apply(n3, t5);
34529
34550
  };
34530
- }), fC.addClass(e3, "has-slider"), n3.domElement.insertBefore(i3.domElement, n3.domElement.firstElementChild);
34531
- } else if (n3 instanceof xC) {
34551
+ }), mC.addClass(e3, "has-slider"), n3.domElement.insertBefore(i3.domElement, n3.domElement.firstElementChild);
34552
+ } else if (n3 instanceof bC) {
34532
34553
  var r3 = function(e4) {
34533
- if (YP.isNumber(n3.__min) && YP.isNumber(n3.__max)) {
34554
+ if (ZP.isNumber(n3.__min) && ZP.isNumber(n3.__max)) {
34534
34555
  var i4 = n3.__li.firstElementChild.firstElementChild.innerHTML, r4 = n3.__gui.__listening.indexOf(n3) > -1;
34535
34556
  n3.remove();
34536
- var o3 = jC(t3, n3.object, n3.property, { before: n3.__li.nextElementSibling, factoryArgs: [n3.__min, n3.__max, n3.__step] });
34557
+ var o3 = VC(t3, n3.object, n3.property, { before: n3.__li.nextElementSibling, factoryArgs: [n3.__min, n3.__max, n3.__step] });
34537
34558
  return o3.name(i4), r4 && o3.listen(), o3;
34538
34559
  }
34539
34560
  return e4;
34540
34561
  };
34541
- n3.min = YP.compose(r3, n3.min), n3.max = YP.compose(r3, n3.max);
34562
+ n3.min = ZP.compose(r3, n3.min), n3.max = ZP.compose(r3, n3.max);
34542
34563
  } else
34543
- n3 instanceof mC ? (fC.bind(e3, "click", function() {
34544
- fC.fakeEvent(n3.__checkbox, "click");
34545
- }), fC.bind(n3.__checkbox, "click", function(t4) {
34564
+ n3 instanceof gC ? (mC.bind(e3, "click", function() {
34565
+ mC.fakeEvent(n3.__checkbox, "click");
34566
+ }), mC.bind(n3.__checkbox, "click", function(t4) {
34546
34567
  t4.stopPropagation();
34547
- })) : n3 instanceof wC ? (fC.bind(e3, "click", function() {
34548
- fC.fakeEvent(n3.__button, "click");
34549
- }), fC.bind(e3, "mouseover", function() {
34550
- fC.addClass(n3.__button, "hover");
34551
- }), fC.bind(e3, "mouseout", function() {
34552
- fC.removeClass(n3.__button, "hover");
34553
- })) : n3 instanceof SC && (fC.addClass(e3, "color"), n3.updateDisplay = YP.compose(function(t4) {
34568
+ })) : n3 instanceof SC ? (mC.bind(e3, "click", function() {
34569
+ mC.fakeEvent(n3.__button, "click");
34570
+ }), mC.bind(e3, "mouseover", function() {
34571
+ mC.addClass(n3.__button, "hover");
34572
+ }), mC.bind(e3, "mouseout", function() {
34573
+ mC.removeClass(n3.__button, "hover");
34574
+ })) : n3 instanceof EC && (mC.addClass(e3, "color"), n3.updateDisplay = ZP.compose(function(t4) {
34554
34575
  return e3.style.borderLeftColor = n3.__color.toString(), t4;
34555
34576
  }, n3.updateDisplay), n3.updateDisplay());
34556
- n3.setValue = YP.compose(function(e4) {
34557
- return t3.getRoot().__preset_select && n3.isModified() && HC(t3.getRoot(), true), e4;
34577
+ n3.setValue = ZP.compose(function(e4) {
34578
+ return t3.getRoot().__preset_select && n3.isModified() && zC(t3.getRoot(), true), e4;
34558
34579
  }, n3.setValue);
34559
34580
  }(t2, l2, r2), t2.__controllers.push(r2), r2;
34560
34581
  }
34561
- function VC(t2, e2) {
34582
+ function WC(t2, e2) {
34562
34583
  return document.location.href + "." + e2;
34563
34584
  }
34564
- function WC(t2, e2, n2) {
34585
+ function XC(t2, e2, n2) {
34565
34586
  var i2 = document.createElement("option");
34566
34587
  i2.innerHTML = e2, i2.value = e2, t2.__preset_select.appendChild(i2), n2 && (t2.__preset_select.selectedIndex = t2.__preset_select.length - 1);
34567
34588
  }
34568
- function XC(t2, e2) {
34589
+ function qC(t2, e2) {
34569
34590
  e2.style.display = t2.useLocalStorage ? "block" : "none";
34570
34591
  }
34571
- function qC(t2) {
34592
+ function YC(t2) {
34572
34593
  var e2 = t2.__save_row = document.createElement("li");
34573
- fC.addClass(t2.domElement, "has-save"), t2.__ul.insertBefore(e2, t2.__ul.firstChild), fC.addClass(e2, "save-row");
34594
+ mC.addClass(t2.domElement, "has-save"), t2.__ul.insertBefore(e2, t2.__ul.firstChild), mC.addClass(e2, "save-row");
34574
34595
  var n2 = document.createElement("span");
34575
- n2.innerHTML = "&nbsp;", fC.addClass(n2, "button gears");
34596
+ n2.innerHTML = "&nbsp;", mC.addClass(n2, "button gears");
34576
34597
  var i2 = document.createElement("span");
34577
- i2.innerHTML = "Save", fC.addClass(i2, "button"), fC.addClass(i2, "save");
34598
+ i2.innerHTML = "Save", mC.addClass(i2, "button"), mC.addClass(i2, "save");
34578
34599
  var r2 = document.createElement("span");
34579
- r2.innerHTML = "New", fC.addClass(r2, "button"), fC.addClass(r2, "save-as");
34600
+ r2.innerHTML = "New", mC.addClass(r2, "button"), mC.addClass(r2, "save-as");
34580
34601
  var o2 = document.createElement("span");
34581
- o2.innerHTML = "Revert", fC.addClass(o2, "button"), fC.addClass(o2, "revert");
34602
+ o2.innerHTML = "Revert", mC.addClass(o2, "button"), mC.addClass(o2, "revert");
34582
34603
  var s2 = t2.__preset_select = document.createElement("select");
34583
- if (t2.load && t2.load.remembered ? YP.each(t2.load.remembered, function(e3, n3) {
34584
- WC(t2, n3, n3 === t2.preset);
34585
- }) : WC(t2, "Default", false), fC.bind(s2, "change", function() {
34604
+ if (t2.load && t2.load.remembered ? ZP.each(t2.load.remembered, function(e3, n3) {
34605
+ XC(t2, n3, n3 === t2.preset);
34606
+ }) : XC(t2, "Default", false), mC.bind(s2, "change", function() {
34586
34607
  for (var e3 = 0; e3 < t2.__preset_select.length; e3++)
34587
34608
  t2.__preset_select[e3].innerHTML = t2.__preset_select[e3].value;
34588
34609
  t2.preset = this.value;
34589
- }), e2.appendChild(s2), e2.appendChild(n2), e2.appendChild(i2), e2.appendChild(r2), e2.appendChild(o2), OC) {
34610
+ }), e2.appendChild(s2), e2.appendChild(n2), e2.appendChild(i2), e2.appendChild(r2), e2.appendChild(o2), LC) {
34590
34611
  var a2 = document.getElementById("dg-local-explain"), l2 = document.getElementById("dg-local-storage");
34591
- document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(VC(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), XC(t2, a2), fC.bind(l2, "change", function() {
34592
- t2.useLocalStorage = !t2.useLocalStorage, XC(t2, a2);
34612
+ document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(WC(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), qC(t2, a2), mC.bind(l2, "change", function() {
34613
+ t2.useLocalStorage = !t2.useLocalStorage, qC(t2, a2);
34593
34614
  });
34594
34615
  }
34595
34616
  var u2 = document.getElementById("dg-new-constructor");
34596
- fC.bind(u2, "keydown", function(t3) {
34597
- !t3.metaKey || t3.which !== 67 && t3.keyCode !== 67 || LC.hide();
34598
- }), fC.bind(n2, "click", function() {
34599
- u2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), LC.show(), u2.focus(), u2.select();
34600
- }), fC.bind(i2, "click", function() {
34617
+ mC.bind(u2, "keydown", function(t3) {
34618
+ !t3.metaKey || t3.which !== 67 && t3.keyCode !== 67 || NC.hide();
34619
+ }), mC.bind(n2, "click", function() {
34620
+ u2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), NC.show(), u2.focus(), u2.select();
34621
+ }), mC.bind(i2, "click", function() {
34601
34622
  t2.save();
34602
- }), fC.bind(r2, "click", function() {
34623
+ }), mC.bind(r2, "click", function() {
34603
34624
  var e3 = prompt("Enter a new preset name.");
34604
34625
  e3 && t2.saveAs(e3);
34605
- }), fC.bind(o2, "click", function() {
34626
+ }), mC.bind(o2, "click", function() {
34606
34627
  t2.revert();
34607
34628
  });
34608
34629
  }
34609
- function YC(t2) {
34630
+ function ZC(t2) {
34610
34631
  var e2 = void 0;
34611
34632
  function n2(n3) {
34612
34633
  return n3.preventDefault(), t2.width += e2 - n3.clientX, t2.onResize(), e2 = n3.clientX, false;
34613
34634
  }
34614
34635
  function i2() {
34615
- fC.removeClass(t2.__closeButton, UC.CLASS_DRAG), fC.unbind(window, "mousemove", n2), fC.unbind(window, "mouseup", i2);
34636
+ mC.removeClass(t2.__closeButton, kC.CLASS_DRAG), mC.unbind(window, "mousemove", n2), mC.unbind(window, "mouseup", i2);
34616
34637
  }
34617
34638
  function r2(r3) {
34618
- return r3.preventDefault(), e2 = r3.clientX, fC.addClass(t2.__closeButton, UC.CLASS_DRAG), fC.bind(window, "mousemove", n2), fC.bind(window, "mouseup", i2), false;
34639
+ return r3.preventDefault(), e2 = r3.clientX, mC.addClass(t2.__closeButton, kC.CLASS_DRAG), mC.bind(window, "mousemove", n2), mC.bind(window, "mouseup", i2), false;
34619
34640
  }
34620
- t2.__resize_handle = document.createElement("div"), YP.extend(t2.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), fC.bind(t2.__resize_handle, "mousedown", r2), fC.bind(t2.__closeButton, "mousedown", r2), t2.domElement.insertBefore(t2.__resize_handle, t2.domElement.firstElementChild);
34641
+ t2.__resize_handle = document.createElement("div"), ZP.extend(t2.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), mC.bind(t2.__resize_handle, "mousedown", r2), mC.bind(t2.__closeButton, "mousedown", r2), t2.domElement.insertBefore(t2.__resize_handle, t2.domElement.firstElementChild);
34621
34642
  }
34622
- function ZC(t2, e2) {
34643
+ function JC(t2, e2) {
34623
34644
  t2.domElement.style.width = e2 + "px", t2.__save_row && t2.autoPlace && (t2.__save_row.style.width = e2 + "px"), t2.__closeButton && (t2.__closeButton.style.width = e2 + "px");
34624
34645
  }
34625
- function JC(t2, e2) {
34646
+ function $C(t2, e2) {
34626
34647
  var n2 = {};
34627
- return YP.each(t2.__rememberedObjects, function(i2, r2) {
34648
+ return ZP.each(t2.__rememberedObjects, function(i2, r2) {
34628
34649
  var o2 = {}, s2 = t2.__rememberedObjectIndecesToControllers[r2];
34629
- YP.each(s2, function(t3, n3) {
34650
+ ZP.each(s2, function(t3, n3) {
34630
34651
  o2[n3] = e2 ? t3.initialValue : t3.getValue();
34631
34652
  }), n2[r2] = o2;
34632
34653
  }), n2;
34633
34654
  }
34634
- UC.toggleHide = function() {
34635
- FC = !FC, YP.each(BC, function(t2) {
34636
- t2.domElement.style.display = FC ? "none" : "";
34655
+ kC.toggleHide = function() {
34656
+ BC = !BC, ZP.each(UC, function(t2) {
34657
+ t2.domElement.style.display = BC ? "none" : "";
34637
34658
  });
34638
- }, 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(t2) {
34639
- document.activeElement.type === "text" || t2.which !== 72 && t2.keyCode !== 72 || UC.toggleHide();
34640
- }, fC.bind(window, "keydown", UC._keydownHandler, false), YP.extend(UC.prototype, { add: function(t2, e2) {
34641
- return jC(this, t2, e2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
34659
+ }, kC.CLASS_AUTO_PLACE = "a", kC.CLASS_AUTO_PLACE_CONTAINER = "ac", kC.CLASS_MAIN = "main", kC.CLASS_CONTROLLER_ROW = "cr", kC.CLASS_TOO_TALL = "taller-than-window", kC.CLASS_CLOSED = "closed", kC.CLASS_CLOSE_BUTTON = "close-button", kC.CLASS_CLOSE_TOP = "close-top", kC.CLASS_CLOSE_BOTTOM = "close-bottom", kC.CLASS_DRAG = "drag", kC.DEFAULT_WIDTH = 245, kC.TEXT_CLOSED = "Close Controls", kC.TEXT_OPEN = "Open Controls", kC._keydownHandler = function(t2) {
34660
+ document.activeElement.type === "text" || t2.which !== 72 && t2.keyCode !== 72 || kC.toggleHide();
34661
+ }, mC.bind(window, "keydown", kC._keydownHandler, false), ZP.extend(kC.prototype, { add: function(t2, e2) {
34662
+ return VC(this, t2, e2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
34642
34663
  }, addColor: function(t2, e2) {
34643
- return jC(this, t2, e2, { color: true });
34664
+ return VC(this, t2, e2, { color: true });
34644
34665
  }, remove: function(t2) {
34645
34666
  this.__ul.removeChild(t2.__li), this.__controllers.splice(this.__controllers.indexOf(t2), 1);
34646
34667
  var e2 = this;
34647
- YP.defer(function() {
34668
+ ZP.defer(function() {
34648
34669
  e2.onResize();
34649
34670
  });
34650
34671
  }, destroy: function() {
34651
34672
  if (this.parent)
34652
34673
  throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
34653
- this.autoPlace && DC.removeChild(this.domElement);
34674
+ this.autoPlace && FC.removeChild(this.domElement);
34654
34675
  var t2 = this;
34655
- YP.each(this.__folders, function(e2) {
34676
+ ZP.each(this.__folders, function(e2) {
34656
34677
  t2.removeFolder(e2);
34657
- }), fC.unbind(window, "keydown", UC._keydownHandler, false), GC(this);
34678
+ }), mC.unbind(window, "keydown", kC._keydownHandler, false), HC(this);
34658
34679
  }, addFolder: function(t2) {
34659
34680
  if (this.__folders[t2] !== void 0)
34660
34681
  throw new Error('You already have a folder in this GUI by the name "' + t2 + '"');
34661
34682
  var e2 = { name: t2, parent: this };
34662
34683
  e2.autoPlace = this.autoPlace, this.load && this.load.folders && this.load.folders[t2] && (e2.closed = this.load.folders[t2].closed, e2.load = this.load.folders[t2]);
34663
- var n2 = new UC(e2);
34684
+ var n2 = new kC(e2);
34664
34685
  this.__folders[t2] = n2;
34665
- var i2 = kC(this, n2.domElement);
34666
- return fC.addClass(i2, "folder"), n2;
34686
+ var i2 = GC(this, n2.domElement);
34687
+ return mC.addClass(i2, "folder"), n2;
34667
34688
  }, removeFolder: function(t2) {
34668
- this.__ul.removeChild(t2.domElement.parentElement), delete this.__folders[t2.name], this.load && this.load.folders && this.load.folders[t2.name] && delete this.load.folders[t2.name], GC(t2);
34689
+ this.__ul.removeChild(t2.domElement.parentElement), delete this.__folders[t2.name], this.load && this.load.folders && this.load.folders[t2.name] && delete this.load.folders[t2.name], HC(t2);
34669
34690
  var e2 = this;
34670
- YP.each(t2.__folders, function(e3) {
34691
+ ZP.each(t2.__folders, function(e3) {
34671
34692
  t2.removeFolder(e3);
34672
- }), YP.defer(function() {
34693
+ }), ZP.defer(function() {
34673
34694
  e2.onResize();
34674
34695
  });
34675
34696
  }, open: function() {
@@ -34683,60 +34704,60 @@ void main(void){
34683
34704
  }, onResize: function() {
34684
34705
  var t2 = this.getRoot();
34685
34706
  if (t2.scrollable) {
34686
- var e2 = fC.getOffset(t2.__ul).top, n2 = 0;
34687
- YP.each(t2.__ul.childNodes, function(e3) {
34688
- t2.autoPlace && e3 === t2.__save_row || (n2 += fC.getHeight(e3));
34689
- }), window.innerHeight - e2 - 20 < n2 ? (fC.addClass(t2.domElement, UC.CLASS_TOO_TALL), t2.__ul.style.height = window.innerHeight - e2 - 20 + "px") : (fC.removeClass(t2.domElement, UC.CLASS_TOO_TALL), t2.__ul.style.height = "auto");
34707
+ var e2 = mC.getOffset(t2.__ul).top, n2 = 0;
34708
+ ZP.each(t2.__ul.childNodes, function(e3) {
34709
+ t2.autoPlace && e3 === t2.__save_row || (n2 += mC.getHeight(e3));
34710
+ }), window.innerHeight - e2 - 20 < n2 ? (mC.addClass(t2.domElement, kC.CLASS_TOO_TALL), t2.__ul.style.height = window.innerHeight - e2 - 20 + "px") : (mC.removeClass(t2.domElement, kC.CLASS_TOO_TALL), t2.__ul.style.height = "auto");
34690
34711
  }
34691
- t2.__resize_handle && YP.defer(function() {
34712
+ t2.__resize_handle && ZP.defer(function() {
34692
34713
  t2.__resize_handle.style.height = t2.__ul.offsetHeight + "px";
34693
34714
  }), t2.__closeButton && (t2.__closeButton.style.width = t2.width + "px");
34694
- }, onResizeDebounced: YP.debounce(function() {
34715
+ }, onResizeDebounced: ZP.debounce(function() {
34695
34716
  this.onResize();
34696
34717
  }, 50), remember: function() {
34697
- if (YP.isUndefined(LC) && ((LC = new IC()).domElement.innerHTML = RC), this.parent)
34718
+ if (ZP.isUndefined(NC) && ((NC = new OC()).domElement.innerHTML = PC), this.parent)
34698
34719
  throw new Error("You can only call remember on a top level GUI.");
34699
34720
  var t2 = this;
34700
- YP.each(Array.prototype.slice.call(arguments), function(e2) {
34701
- t2.__rememberedObjects.length === 0 && qC(t2), t2.__rememberedObjects.indexOf(e2) === -1 && t2.__rememberedObjects.push(e2);
34702
- }), this.autoPlace && ZC(this, this.width);
34721
+ ZP.each(Array.prototype.slice.call(arguments), function(e2) {
34722
+ t2.__rememberedObjects.length === 0 && YC(t2), t2.__rememberedObjects.indexOf(e2) === -1 && t2.__rememberedObjects.push(e2);
34723
+ }), this.autoPlace && JC(this, this.width);
34703
34724
  }, getRoot: function() {
34704
34725
  for (var t2 = this; t2.parent; )
34705
34726
  t2 = t2.parent;
34706
34727
  return t2;
34707
34728
  }, getSaveObject: function() {
34708
34729
  var t2 = this.load;
34709
- return t2.closed = this.closed, this.__rememberedObjects.length > 0 && (t2.preset = this.preset, t2.remembered || (t2.remembered = {}), t2.remembered[this.preset] = JC(this)), t2.folders = {}, YP.each(this.__folders, function(e2, n2) {
34730
+ return t2.closed = this.closed, this.__rememberedObjects.length > 0 && (t2.preset = this.preset, t2.remembered || (t2.remembered = {}), t2.remembered[this.preset] = $C(this)), t2.folders = {}, ZP.each(this.__folders, function(e2, n2) {
34710
34731
  t2.folders[n2] = e2.getSaveObject();
34711
34732
  }), t2;
34712
34733
  }, save: function() {
34713
- this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = JC(this), HC(this, false), this.saveToLocalStorageIfPossible();
34734
+ this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = $C(this), zC(this, false), this.saveToLocalStorageIfPossible();
34714
34735
  }, saveAs: function(t2) {
34715
- this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = JC(this, true)), this.load.remembered[t2] = JC(this), this.preset = t2, WC(this, t2, true), this.saveToLocalStorageIfPossible();
34736
+ this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = $C(this, true)), this.load.remembered[t2] = $C(this), this.preset = t2, XC(this, t2, true), this.saveToLocalStorageIfPossible();
34716
34737
  }, revert: function(t2) {
34717
- YP.each(this.__controllers, function(e2) {
34718
- this.getRoot().load.remembered ? zC(t2 || this.getRoot(), e2) : e2.setValue(e2.initialValue), e2.__onFinishChange && e2.__onFinishChange.call(e2, e2.getValue());
34719
- }, this), YP.each(this.__folders, function(t3) {
34738
+ ZP.each(this.__controllers, function(e2) {
34739
+ this.getRoot().load.remembered ? jC(t2 || this.getRoot(), e2) : e2.setValue(e2.initialValue), e2.__onFinishChange && e2.__onFinishChange.call(e2, e2.getValue());
34740
+ }, this), ZP.each(this.__folders, function(t3) {
34720
34741
  t3.revert(t3);
34721
- }), t2 || HC(this.getRoot(), false);
34742
+ }), t2 || zC(this.getRoot(), false);
34722
34743
  }, listen: function(t2) {
34723
34744
  var e2 = this.__listening.length === 0;
34724
34745
  this.__listening.push(t2), e2 && function t3(e3) {
34725
- e3.length !== 0 && CC.call(window, function() {
34746
+ e3.length !== 0 && IC.call(window, function() {
34726
34747
  t3(e3);
34727
34748
  });
34728
- YP.each(e3, function(t4) {
34749
+ ZP.each(e3, function(t4) {
34729
34750
  t4.updateDisplay();
34730
34751
  });
34731
34752
  }(this.__listening);
34732
34753
  }, updateDisplay: function() {
34733
- YP.each(this.__controllers, function(t2) {
34754
+ ZP.each(this.__controllers, function(t2) {
34734
34755
  t2.updateDisplay();
34735
- }), YP.each(this.__folders, function(t2) {
34756
+ }), ZP.each(this.__folders, function(t2) {
34736
34757
  t2.updateDisplay();
34737
34758
  });
34738
34759
  } });
34739
- var $C = UC, KC = function() {
34760
+ var KC = kC, QC = function() {
34740
34761
  function t2(t3) {
34741
34762
  this.runTime = { fps: 0, resolution: "" }, this.target = t3.target, this.data = t3.params, this.player = t3.player, this.gui = this.createControllerGUI(), this.createStats(), this.addEventListener();
34742
34763
  }
@@ -34746,7 +34767,7 @@ void main(void){
34746
34767
  t3.player.view && (t3.controller.runTimeFps.setValue(t3.player.fps.value), t3.controller.drawCall.setValue(t3.player.runtime.drawCall), t3.controller.runTimeResolution.setValue(t3.player.view.width + "*" + t3.player.view.height));
34747
34768
  }, 500);
34748
34769
  }, t2.prototype.createControllerGUI = function() {
34749
- var t3, e2, n2, i2, r2, o2 = new $C({ autoPlace: true, closed: true });
34770
+ var t3, e2, n2, i2, r2, o2 = new KC({ autoPlace: true, closed: true });
34750
34771
  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";
34751
34772
  var s2 = 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");
34752
34773
  return this.controller = { runTimeResolution: l2, runTimeFps: s2, drawCall: a2, moreCalculation: u2, minFPS: h2.add({ "\u6700\u4F4Efps": (t3 = this.data.minFPS) !== null && t3 !== void 0 ? t3 : 40 }, "\u6700\u4F4Efps", 0, 60), maxFPS: h2.add({ "\u6700\u9AD8fps": (e2 = this.data.maxFPS) !== null && e2 !== void 0 ? e2 : 50 }, "\u6700\u9AD8fps", 0, 60), resolution: h2.add({ "\u76EE\u6807\u5206\u8FA8\u500D\u7387": (n2 = this.data.resolution) !== null && n2 !== void 0 ? n2 : window.devicePixelRatio }, "\u76EE\u6807\u5206\u8FA8\u500D\u7387", 0.5, 6), autoResolution: h2.add({ "\u81EA\u52A8\u5206\u8FA8\u7387": (i2 = this.data.autoResolution) !== null && i2 !== void 0 && i2 }, "\u81EA\u52A8\u5206\u8FA8\u7387", true), autoFps: h2.add({ "\u81EA\u52A8fps": (r2 = this.data.autoFPS) === null || r2 === void 0 || r2 }, "\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;
@@ -34777,7 +34798,7 @@ void main(void){
34777
34798
  } catch (t3) {
34778
34799
  }
34779
34800
  }, t2;
34780
- }(), QC = function() {
34801
+ }(), tI = function() {
34781
34802
  function t2(t3) {
34782
34803
  var e2 = this;
34783
34804
  this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
@@ -34793,7 +34814,7 @@ void main(void){
34793
34814
  }, t2.prototype.addTask = function(t3) {
34794
34815
  this.tasks.push(t3), this.isScheduling || this.schedule();
34795
34816
  }, t2;
34796
- }(), tI = function() {
34817
+ }(), eI = function() {
34797
34818
  function t2(t3) {
34798
34819
  this.autoUnlock = /* @__PURE__ */ Object.create(null), this.locks = /* @__PURE__ */ Object.create(null), this.available = false, this.available = t3;
34799
34820
  }
@@ -34807,7 +34828,7 @@ void main(void){
34807
34828
  }, t2.prototype.isLocked = function(t3) {
34808
34829
  return !!this.available && !!this.locks[t3];
34809
34830
  }, t2;
34810
- }(), eI = function() {
34831
+ }(), nI = function() {
34811
34832
  function t2() {
34812
34833
  var t3 = this;
34813
34834
  this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
@@ -34830,7 +34851,7 @@ void main(void){
34830
34851
  }, t2.prototype.destroy = function() {
34831
34852
  this.isDestroy = true;
34832
34853
  }, t2;
34833
- }(), nI = function() {
34854
+ }(), iI = function() {
34834
34855
  var t2 = function(e2, n2) {
34835
34856
  return (t2 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) {
34836
34857
  t3.__proto__ = e3;
@@ -34847,14 +34868,14 @@ void main(void){
34847
34868
  }
34848
34869
  t2(e2, n2), e2.prototype = n2 === null ? Object.create(n2) : (i2.prototype = n2.prototype, new i2());
34849
34870
  };
34850
- }(), iI = function() {
34851
- return (iI = Object.assign || function(t2) {
34871
+ }(), rI = function() {
34872
+ return (rI = Object.assign || function(t2) {
34852
34873
  for (var e2, n2 = 1, i2 = arguments.length; n2 < i2; n2++)
34853
34874
  for (var r2 in e2 = arguments[n2])
34854
34875
  Object.prototype.hasOwnProperty.call(e2, r2) && (t2[r2] = e2[r2]);
34855
34876
  return t2;
34856
34877
  }).apply(this, arguments);
34857
- }, rI = function(t2, e2, n2, i2) {
34878
+ }, oI = function(t2, e2, n2, i2) {
34858
34879
  var r2, o2 = arguments.length, s2 = o2 < 3 ? e2 : i2 === null ? i2 = Object.getOwnPropertyDescriptor(e2, n2) : i2;
34859
34880
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
34860
34881
  s2 = Reflect.decorate(t2, e2, n2, i2);
@@ -34862,7 +34883,7 @@ void main(void){
34862
34883
  for (var a2 = t2.length - 1; a2 >= 0; a2--)
34863
34884
  (r2 = t2[a2]) && (s2 = (o2 < 3 ? r2(s2) : o2 > 3 ? r2(e2, n2, s2) : r2(e2, n2)) || s2);
34864
34885
  return o2 > 3 && s2 && Object.defineProperty(e2, n2, s2), s2;
34865
- }, oI = function(t2, e2, n2, i2) {
34886
+ }, sI = function(t2, e2, n2, i2) {
34866
34887
  return new (n2 || (n2 = Promise))(function(r2, o2) {
34867
34888
  function s2(t3) {
34868
34889
  try {
@@ -34886,7 +34907,7 @@ void main(void){
34886
34907
  }
34887
34908
  l2((i2 = i2.apply(t2, e2 || [])).next());
34888
34909
  });
34889
- }, sI = function(t2, e2) {
34910
+ }, aI = function(t2, e2) {
34890
34911
  var n2, i2, r2, o2, s2 = { label: 0, sent: function() {
34891
34912
  if (1 & r2[0])
34892
34913
  throw r2[1];
@@ -34949,20 +34970,20 @@ void main(void){
34949
34970
  }([o3, a3]);
34950
34971
  };
34951
34972
  }
34952
- }, aI = window.ResizeObserver || GP, lI = function(t2) {
34973
+ }, lI = window.ResizeObserver || HP, uI = function(t2) {
34953
34974
  return new Promise(function(e2) {
34954
34975
  return setTimeout(e2, t2);
34955
34976
  });
34956
34977
  };
34957
- function uI(t2, e2) {
34958
- return oI(this, void 0, void 0, function() {
34978
+ function hI(t2, e2) {
34979
+ return sI(this, void 0, void 0, function() {
34959
34980
  var n2;
34960
- return sI(this, function(i2) {
34981
+ return aI(this, function(i2) {
34961
34982
  switch (i2.label) {
34962
34983
  case 0:
34963
34984
  n2 = Date.now(), i2.label = 1;
34964
34985
  case 1:
34965
- return !t2() && Date.now() - n2 < e2 ? [4, lI(50)] : [3, 3];
34986
+ return !t2() && Date.now() - n2 < e2 ? [4, uI(50)] : [3, 3];
34966
34987
  case 2:
34967
34988
  return i2.sent(), [3, 1];
34968
34989
  case 3:
@@ -34971,21 +34992,21 @@ void main(void){
34971
34992
  });
34972
34993
  });
34973
34994
  }
34974
- var hI = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, cI = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, dI = "";
34995
+ var cI = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, dI = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, pI = "";
34975
34996
  try {
34976
- dI = "0.5.16-alpha.1";
34997
+ pI = "0.5.16-alpha.3";
34977
34998
  } catch (t2) {
34978
- dI = "development";
34999
+ pI = "development";
34979
35000
  }
34980
- var pI = null;
35001
+ var fI = null;
34981
35002
  try {
34982
- pI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
35003
+ fI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
34983
35004
  } catch (t2) {
34984
35005
  }
34985
- var fI = function(t2) {
35006
+ var mI = function(t2) {
34986
35007
  function e2(n3) {
34987
35008
  var i2 = t2.call(this) || this;
34988
- return i2.iosResetCache = [], i2.needClearCacheImage = false, i2.version = dI, i2.__slideState = Object(l.cloneDeep)(cI), i2.userInputTime = 0, i2.isSyncingSlideState = false, i2.frozenTaskManager = new eI(), i2.randomId = Math.random().toString(32).substr(2), i2.resize = false, i2.isAnimating = false, i2.renderingTaskManager = new VP(), i2.isLoading = false, i2.interactive = true, i2.renderingIndex = 0, i2.frameWidth = 1, i2.frameHeight = 1, i2.frame = document.createElement("div"), i2.medianController = document.createElement("div"), i2.frameResizeObserver = new aI(function() {
35009
+ return i2.iosResetCache = [], i2.needClearCacheImage = false, i2.version = pI, i2.__slideState = Object(l.cloneDeep)(dI), i2.userInputTime = 0, i2.isSyncingSlideState = false, i2.frozenTaskManager = new nI(), i2.randomId = Math.random().toString(32).substr(2), i2.resize = false, i2.isAnimating = false, i2.renderingTaskManager = new WP(), i2.isLoading = false, i2.interactive = true, i2.renderingIndex = 0, i2.frameWidth = 1, i2.frameHeight = 1, i2.frame = document.createElement("div"), i2.medianController = document.createElement("div"), i2.frameResizeObserver = new lI(function() {
34989
35010
  return i2.frameResizeHandler();
34990
35011
  }), i2.timestamp = function() {
34991
35012
  return Date.now();
@@ -35005,12 +35026,12 @@ void main(void){
35005
35026
  }, i2.handleSlideRef = function() {
35006
35027
  console.log(i2), window.__slide = i2;
35007
35028
  }, i2.receiveSyncHandler = function(t3) {
35008
- return oI(i2, void 0, void 0, function() {
35029
+ return sI(i2, void 0, void 0, function() {
35009
35030
  var e3, n4, i3, r2, o2 = this;
35010
- return sI(this, function(s2) {
35031
+ return aI(this, function(s2) {
35011
35032
  switch (s2.label) {
35012
35033
  case 0:
35013
- return Object(l.isNumber)(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(hI.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), t3.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
35034
+ return Object(l.isNumber)(t3.incrId) && (t3.incrId && t3.incrId - this._receiveIncrId != 1 && this.emit(cI.syncEventLag), this._receiveIncrId = t3.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t3), this.taskId), t3.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t3.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t3.next, "start"), this.player.nextTick(function() {
35014
35035
  o2.doNextStep(true);
35015
35036
  })) : this.doNextStep(true), [3, 6]);
35016
35037
  case 1:
@@ -35031,9 +35052,9 @@ void main(void){
35031
35052
  });
35032
35053
  });
35033
35054
  }, i2.handlePrevSlide = function(t3) {
35034
- return t3 === void 0 && (t3 = false), oI(i2, void 0, void 0, function() {
35055
+ return t3 === void 0 && (t3 = false), sI(i2, void 0, void 0, function() {
35035
35056
  var e3, n4;
35036
- return sI(this, function(i3) {
35057
+ return aI(this, function(i3) {
35037
35058
  switch (i3.label) {
35038
35059
  case 0:
35039
35060
  return this.player ? [4, (n4 = this.player) === null || n4 === void 0 ? void 0 : n4.createSnapshotForNextSlide(true)] : [2];
@@ -35043,9 +35064,9 @@ void main(void){
35043
35064
  });
35044
35065
  });
35045
35066
  }, i2.handleNextSlide = function(t3) {
35046
- return t3 === void 0 && (t3 = false), oI(i2, void 0, void 0, function() {
35067
+ return t3 === void 0 && (t3 = false), sI(i2, void 0, void 0, function() {
35047
35068
  var e3, n4;
35048
- return sI(this, function(i3) {
35069
+ return aI(this, function(i3) {
35049
35070
  switch (i3.label) {
35050
35071
  case 0:
35051
35072
  return this.player ? [4, (n4 = this.player) === null || n4 === void 0 ? void 0 : n4.createSnapshotForNextSlide(false)] : [2];
@@ -35069,23 +35090,23 @@ void main(void){
35069
35090
  }, error: function(t3, n4) {
35070
35091
  var r2, o2;
35071
35092
  ((r2 = i2.config.logger) === null || r2 === void 0 ? void 0 : r2.error) && (e2._tempLog += "ERROR - " + new Date().toISOString() + " - {" + i2.randomId + "}[" + n4 + "] " + t3 + "\n\n", (o2 = i2.config.logger) === null || o2 === void 0 || o2.error("[" + n4 + "] " + t3));
35072
- } }, i2.anchor = i2.config.anchor, i2.syncQueue = new QC(i2.receiveSyncHandler), i2.lock = new tI(i2.mode === "interactive"), i2.cacheImage.style.position = "absolute", i2.cacheImage.style.zIndex = "100", i2.setMedianControllerAttribute(), i2.frame.appendChild(i2.medianController), i2.frameResizeObserver.observe(i2.frame), i2.on(hI.syncReceive, function(t3) {
35093
+ } }, i2.anchor = i2.config.anchor, i2.syncQueue = new tI(i2.receiveSyncHandler), i2.lock = new eI(i2.mode === "interactive"), i2.cacheImage.style.position = "absolute", i2.cacheImage.style.zIndex = "100", i2.setMedianControllerAttribute(), i2.frame.appendChild(i2.medianController), i2.frameResizeObserver.observe(i2.frame), i2.on(cI.syncReceive, function(t3) {
35073
35094
  i2.lock.unlock(t3.type, t3.uuid), i2.syncQueue.addTask(t3);
35074
35095
  }), i2.renderingTaskManager.eventHub.on("task-error", function(t3) {
35075
35096
  var e3 = t3.error, n4 = t3.task, r2 = qE.transform(e3);
35076
- r2.errorType === VE.RuntimeWarn ? i2.logger.warn(r2.message, i2.taskId) : i2.logger.error(r2.message, i2.taskId), i2.isLoading = false, i2.emit(hI.renderError, { error: r2, index: n4.slideIndex });
35097
+ r2.errorType === VE.RuntimeWarn ? i2.logger.warn(r2.message, i2.taskId) : i2.logger.error(r2.message, i2.taskId), i2.isLoading = false, i2.emit(cI.renderError, { error: r2, index: n4.slideIndex });
35077
35098
  }), window.addEventListener("__slide_ref__", i2.handleSlideRef), i2.resizeView = Object(l.debounce)(i2.resizeView.bind(i2), 50), i2.player = i2.initPlayer(i2.config), i2.config.controller && i2.createController(), i2.player.view && i2.frame.appendChild(i2.player.view), i2.handleViewClick = Object(l.debounce)(i2.handleViewClick, 300), i2.player.errorChannel.on("error", function(t3, e3) {
35078
35099
  var n4 = qE.transform(t3);
35079
- n4.errorType === VE.RuntimeWarn ? i2.logger.warn(n4.message, i2.taskId) : i2.logger.error(n4.message, i2.taskId), i2.isLoading = false, e3 === i2.renderingIndex && i2.emit(hI.renderError, { error: t3, index: e3 });
35100
+ n4.errorType === VE.RuntimeWarn ? i2.logger.warn(n4.message, i2.taskId) : i2.logger.error(n4.message, i2.taskId), i2.isLoading = false, e3 === i2.renderingIndex && i2.emit(cI.renderError, { error: t3, index: e3 });
35080
35101
  }), i2;
35081
35102
  }
35082
35103
  var n2;
35083
- return nI(e2, t2), e2.flushLog = function() {
35084
- return oI(this, void 0, void 0, function() {
35085
- return sI(this, function(t3) {
35104
+ return iI(e2, t2), e2.flushLog = function() {
35105
+ return sI(this, void 0, void 0, function() {
35106
+ return aI(this, function(t3) {
35086
35107
  switch (t3.label) {
35087
35108
  case 0:
35088
- return e2._tempLog.length > 0 ? [4, pI == null ? void 0 : pI.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)] : [3, 2];
35109
+ return e2._tempLog.length > 0 ? [4, fI == null ? void 0 : fI.setItem("run_time_log_" + e2._tempLogIndex, e2._tempLog)] : [3, 2];
35089
35110
  case 1:
35090
35111
  t3.sent(), e2._tempLog = "", e2._tempLogIndex += 1, t3.label = 2;
35091
35112
  case 2:
@@ -35096,51 +35117,51 @@ void main(void){
35096
35117
  }, Object.defineProperty(e2.prototype, "dispatchIncrId", { get: function() {
35097
35118
  return this._dispatchIncrId++;
35098
35119
  }, enumerable: false, configurable: true }), e2.prototype.initSlideConfig = function(t3) {
35099
- return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (KR.RtcAudioClazz = t3.rtcAudio), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !Object(l.isUndefined)(t3.enableGlobalClick) && t3.enableGlobalClick, this.resize = t3.resize || false, this.interactive = t3.interactive, this.frame.style.cssText = t3.fixedFrameSize ? "width:" + t3.fixedFrameSize.width + "px;height:" + t3.fixedFrameSize.height + "px;" : "width:100%;height:100%", this.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", t3.fixedFrameSize && (this.frameWidth = t3.fixedFrameSize.width, this.frameHeight = t3.fixedFrameSize.height), t3;
35120
+ return t3.timestamp && (this.timestamp = t3.timestamp), t3.rtcAudio && (QR.RtcAudioClazz = t3.rtcAudio), this.mode = t3.mode, this.anchor = t3.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !Object(l.isUndefined)(t3.enableGlobalClick) && t3.enableGlobalClick, this.resize = t3.resize || false, this.interactive = t3.interactive, this.frame.style.cssText = t3.fixedFrameSize ? "width:" + t3.fixedFrameSize.width + "px;height:" + t3.fixedFrameSize.height + "px;" : "width:100%;height:100%", this.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", t3.fixedFrameSize && (this.frameWidth = t3.fixedFrameSize.width, this.frameHeight = t3.fixedFrameSize.height), t3;
35100
35121
  }, e2.prototype.initPlayer = function(t3) {
35101
- var e3, n3, i2, r2 = this, o2 = new KR({ mode: this.mode, useLocalCache: !!Object(l.isUndefined)(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: Object(l.isUndefined)(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate });
35102
- return o2.setInteractive(this.interactive), o2.updateConfig(t3.renderOptions || {}), o2.on($R.renderStart, function(t4) {
35103
- r2.isLoading = true, r2.emit(hI.renderStart, t4);
35104
- }), o2.on($R.renderEnd, function(t4) {
35105
- r2.isLoading = false, r2.player && (r2.designHeight = r2.player.designHeight, r2.designWidth = r2.player.designWidth, r2.cacheImage.style.width = r2.player.designWidth + "px", r2.cacheImage.style.height = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(hI.renderEnd, t4);
35106
- }), o2.on($R.slideChange, function(t4) {
35107
- r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(hI.slideChange, t4);
35108
- }), o2.on($R.mainSeqStateChange, function(t4) {
35122
+ var e3, n3, i2, r2 = this, o2 = new QR({ 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 });
35123
+ return o2.setInteractive(this.interactive), o2.updateConfig(t3.renderOptions || {}), o2.on(KR.renderStart, function(t4) {
35124
+ r2.isLoading = true, r2.emit(cI.renderStart, t4);
35125
+ }), o2.on(KR.renderEnd, function(t4) {
35126
+ r2.isLoading = false, r2.player && (r2.designHeight = r2.player.designHeight, r2.designWidth = r2.player.designWidth, r2.cacheImage.style.width = r2.player.designWidth + "px", r2.cacheImage.style.height = r2.player.designHeight + "px", r2._slideCount = r2.player.slideCount), r2.emit(cI.renderEnd, t4);
35127
+ }), o2.on(KR.slideChange, function(t4) {
35128
+ r2.__slideState.currentSlideIndex = t4, r2.emitStateChange(), r2.emit(cI.slideChange, t4);
35129
+ }), o2.on(KR.mainSeqStateChange, function(t4) {
35109
35130
  r2.__slideState.mainSeqState = t4, r2.emitStateChange();
35110
- }), o2.on($R.mainSeqStepChange, function(t4) {
35131
+ }), o2.on(KR.mainSeqStepChange, function(t4) {
35111
35132
  r2.__slideState.mainSeqStep = t4, r2.emitStateChange();
35112
- }), o2.on($R.interactiveSeqStateChange, function(t4) {
35133
+ }), o2.on(KR.interactiveSeqStateChange, function(t4) {
35113
35134
  var e4 = t4.id, n4 = t4.state;
35114
35135
  r2.__slideState.interactiveSeqState[e4] = n4, r2.emitStateChange();
35115
- }), o2.on($R.animateStart, function() {
35116
- r2.isAnimating !== true && (r2.isAnimating = true, r2.emit(hI.animateStart));
35117
- }), o2.on($R.animateEnd, function() {
35118
- r2.isAnimating !== false && (r2.isAnimating = false, r2.emit(hI.animateEnd));
35119
- }), o2.on($R.interactiveSeqAction, function(t4) {
35136
+ }), o2.on(KR.animateStart, function() {
35137
+ r2.isAnimating !== true && (r2.isAnimating = true, r2.emit(cI.animateStart));
35138
+ }), o2.on(KR.animateEnd, function() {
35139
+ r2.isAnimating !== false && (r2.isAnimating = false, r2.emit(cI.animateEnd));
35140
+ }), o2.on(KR.interactiveSeqAction, function(t4) {
35120
35141
  var e4 = t4.action, n4 = t4.seqId;
35121
35142
  r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "interactiveAnim", action: e4, seqId: n4 }), r2.emitStateChange();
35122
- }), o2.on($R.mainSeqStepStart, function(t4) {
35123
- r2.emit(hI.mainSeqStepStart, t4);
35124
- }), o2.on($R.mainSeqStepEnd, function(t4) {
35125
- r2.emit(hI.mainSeqStepEnd, t4);
35126
- }), o2.on($R.mediaPlay, function(t4) {
35143
+ }), o2.on(KR.mainSeqStepStart, function(t4) {
35144
+ r2.emit(cI.mainSeqStepStart, t4);
35145
+ }), o2.on(KR.mainSeqStepEnd, function(t4) {
35146
+ r2.emit(cI.mainSeqStepEnd, t4);
35147
+ }), o2.on(KR.mediaPlay, function(t4) {
35127
35148
  var e4 = { type: "play", time: r2.timestamp() - 1e3 * t4.time };
35128
35149
  r2.__slideState.mediaState[t4.id] = e4, r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPlay", id: t4.id, state: e4 }), r2.emitStateChange();
35129
- }), o2.on($R.mediaPause, function(t4) {
35150
+ }), o2.on(KR.mediaPause, function(t4) {
35130
35151
  var e4 = { type: "pause", time: t4.time };
35131
35152
  r2.__slideState.mediaState[t4.id] = e4, r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaPause", id: t4.id, state: e4 }), r2.emitStateChange();
35132
- }), o2.on($R.mediaSeek, function(t4) {
35153
+ }), o2.on(KR.mediaSeek, function(t4) {
35133
35154
  var e4 = { type: "pause", time: 0 };
35134
35155
  t4.isPlaying ? (e4.type = "play", r2.__slideState.mediaState[t4.id] ? e4.time = r2.__slideState.mediaState[t4.id].time - 1e3 * t4.time : e4.time = r2.timestamp() - 1e3 * t4.time, r2.__slideState.mediaState[t4.id] = e4) : (e4.type = "pause", e4.time = t4.time, r2.__slideState.mediaState[t4.id] = e4), r2.emitSyncDispatch({ slideIndex: r2.__slideState.currentSlideIndex, type: "mediaSeek", id: t4.id, time: t4.time, state: e4 }), r2.emitStateChange();
35135
- }), o2.on($R.requestPrevSlide, function(t4) {
35156
+ }), o2.on(KR.requestPrevSlide, function(t4) {
35136
35157
  r2.handlePrevSlide(t4);
35137
- }), o2.on($R.requestNextSlide, function(t4) {
35158
+ }), o2.on(KR.requestNextSlide, function(t4) {
35138
35159
  r2.handleNextSlide(t4);
35139
- }), o2.on($R.requestGotoSlide, function(t4) {
35160
+ }), o2.on(KR.requestGotoSlide, function(t4) {
35140
35161
  r2.config.navigatorDelegate ? r2.config.navigatorDelegate.gotoPage(t4) : r2.handleGotoSlide(t4);
35141
- }), (e3 = o2.view) === null || e3 === void 0 || e3.addEventListener("touchend", this.handleViewTouchEnd), (n3 = o2.view) === null || n3 === void 0 || n3.addEventListener("touchstart", this.handleViewTouchStart), (i2 = o2.view) === null || i2 === void 0 || i2.addEventListener("click", this.handleViewClick), o2.on($R.userInput, this.userInputHandle), o2;
35162
+ }), (e3 = o2.view) === null || e3 === void 0 || e3.addEventListener("touchend", this.handleViewTouchEnd), (n3 = o2.view) === null || n3 === void 0 || n3.addEventListener("touchstart", this.handleViewTouchStart), (i2 = o2.view) === null || i2 === void 0 || i2.addEventListener("click", this.handleViewClick), o2.on(KR.userInput, this.userInputHandle), o2;
35142
35163
  }, e2.prototype.createController = function() {
35143
- this.player && (this.playerController = new KC({ player: this.player, params: this.player.config || {}, target: this.frame }));
35164
+ this.player && (this.playerController = new QC({ player: this.player, params: this.player.config || {}, target: this.frame }));
35144
35165
  }, e2.prototype.setMedianControllerAttribute = function() {
35145
35166
  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";
35146
35167
  }, e2.prototype.frameResizeHandler = function() {
@@ -35160,9 +35181,9 @@ void main(void){
35160
35181
  }
35161
35182
  }, e2.prototype.setSlideState = function(t3) {
35162
35183
  var e3, n3, i2;
35163
- return oI(this, void 0, void 0, function() {
35184
+ return sI(this, void 0, void 0, function() {
35164
35185
  var r2, o2 = this;
35165
- return sI(this, function(s2) {
35186
+ return aI(this, function(s2) {
35166
35187
  switch (s2.label) {
35167
35188
  case 0:
35168
35189
  return this.isSyncingSlideState = true, this.logger.info("stateChange receive " + JSON.stringify(t3), this.taskId), t3.taskId && t3.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t3.taskId, (e3 = this.player) === null || e3 === void 0 || e3.setResourceData(t3.taskId, this.__slideState.url)), t3.url && t3.url !== this.__slideState.url && (this.__slideState.url = t3.url, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(this.__slideState.taskId, t3.url)), Number.isInteger(t3.currentSlideIndex) && t3.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t3.currentSlideIndex, [4, this.doRenderSlide(t3.currentSlideIndex)]) : [3, 2];
@@ -35202,9 +35223,9 @@ void main(void){
35202
35223
  }, Object.defineProperty(e2.prototype, "slideCount", { get: function() {
35203
35224
  return this._slideCount;
35204
35225
  }, enumerable: false, configurable: true }), e2.prototype.getSizeAsync = function() {
35205
- return oI(this, void 0, void 0, function() {
35226
+ return sI(this, void 0, void 0, function() {
35206
35227
  var t3;
35207
- return sI(this, function(e3) {
35228
+ return aI(this, function(e3) {
35208
35229
  switch (e3.label) {
35209
35230
  case 0:
35210
35231
  if (this.width > 0 && this.height > 0)
@@ -35224,8 +35245,8 @@ void main(void){
35224
35245
  });
35225
35246
  });
35226
35247
  }, e2.prototype.getSlideCountAsync = function() {
35227
- return oI(this, void 0, void 0, function() {
35228
- return sI(this, function(t3) {
35248
+ return sI(this, void 0, void 0, function() {
35249
+ return aI(this, function(t3) {
35229
35250
  switch (t3.label) {
35230
35251
  case 0:
35231
35252
  if (this._slideCount > 0)
@@ -35281,12 +35302,12 @@ void main(void){
35281
35302
  this.taskId = t3, (n3 = this.player) === null || n3 === void 0 || n3.setResourceData(t3, e3), this.__slideState.taskId = t3, this.__slideState.url = e3, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t3, url: e3 });
35282
35303
  }, e2.prototype._renderSlide = function(t3) {
35283
35304
  var e3;
35284
- return oI(this, void 0, void 0, function() {
35305
+ return sI(this, void 0, void 0, function() {
35285
35306
  var n3 = this;
35286
- return sI(this, function(i2) {
35307
+ return aI(this, function(i2) {
35287
35308
  switch (i2.label) {
35288
35309
  case 0:
35289
- return this.renderingIndex = t3, this.player && t3 === this.player.currentIndex ? [2] : ((KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.indexOf(t3) < 0 && this.iosResetCache.push(t3), [4, (e3 = this.player) === null || e3 === void 0 ? void 0 : e3.renderSlide(t3)]);
35310
+ return this.renderingIndex = t3, this.player && t3 === this.player.currentIndex ? [2] : ((QR.platform.isIOS() || QR.platform.isAndroid()) && this.iosResetCache.indexOf(t3) < 0 && this.iosResetCache.push(t3), [4, (e3 = this.player) === null || e3 === void 0 ? void 0 : e3.renderSlide(t3)]);
35290
35311
  case 1:
35291
35312
  return i2.sent(), this.__slideState.currentSlideIndex = t3, this.resizeView(), this.__slideState.interactiveSeqState = {}, this.emitStateChange(), setTimeout(function() {
35292
35313
  var t4, e4;
@@ -35305,8 +35326,8 @@ void main(void){
35305
35326
  (n3 !== this.player.currentIndex || this.renderingTaskManager.hasStartTask()) && (n3 > this.slideCount && this.slideCount > 0 || this.poseRenderSlide(n3, e3));
35306
35327
  }
35307
35328
  }, e2.prototype.needCreateNewPlayer = function() {
35308
- var t3 = KR.platform.isLowGpuMemory() ? 15 : 30;
35309
- return (KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.length > t3;
35329
+ var t3 = QR.platform.isLowGpuMemory() ? 15 : 30;
35330
+ return (QR.platform.isIOS() || QR.platform.isAndroid()) && this.iosResetCache.length > t3;
35310
35331
  }, e2.prototype.poseRenderSlide = function(t3, e3) {
35311
35332
  this.mode === "interactive" ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t3, isForward: e3 }) : this.mode === "sync" ? (this.doRenderSlide(t3, e3), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t3, isForward: e3 })) : this.doRenderSlide(t3, e3);
35312
35333
  }, e2.prototype.doRenderSlide = function(t3, e3) {
@@ -35344,14 +35365,14 @@ void main(void){
35344
35365
  }, e2.prototype.emitStateChange = function() {
35345
35366
  if (this.mode !== "local" && !this.isSyncingSlideState) {
35346
35367
  var t3 = this.slideState;
35347
- !Object(l.isEqual)(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(hI.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
35368
+ !Object(l.isEqual)(this.lastEmitedState, t3) && this.isSlideStateReady(t3) && (this.lastEmitedState = t3, this.emit(cI.stateChange, t3), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
35348
35369
  }
35349
35370
  }, e2.prototype.emitSyncDispatch = function(t3) {
35350
35371
  if (!this.lock.isLocked(t3.type)) {
35351
35372
  var e3 = Math.random().toString(32).substr(2);
35352
35373
  this.lock.addLock(t3.type, e3);
35353
- var n3 = iI(iI({}, t3), { uuid: e3 });
35354
- this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(hI.syncDispatch, n3), this.logger.info("sync dispatch " + JSON.stringify(n3), this.taskId);
35374
+ var n3 = rI(rI({}, t3), { uuid: e3 });
35375
+ this.config.mode === "sync" && (n3.incrId = this.dispatchIncrId), this.emit(cI.syncDispatch, n3), this.logger.info("sync dispatch " + JSON.stringify(n3), this.taskId);
35355
35376
  }
35356
35377
  }, e2.prototype.setMainSeqStep = function(t3, e3) {
35357
35378
  var n3;
@@ -35367,9 +35388,9 @@ void main(void){
35367
35388
  (t3 = this.player) === null || t3 === void 0 || t3.resume();
35368
35389
  }, e2.prototype._doFrozen = function() {
35369
35390
  var t3;
35370
- return oI(this, void 0, void 0, function() {
35391
+ return sI(this, void 0, void 0, function() {
35371
35392
  var e3, n3, i2, r2 = this;
35372
- return sI(this, function(o2) {
35393
+ return aI(this, function(o2) {
35373
35394
  switch (o2.label) {
35374
35395
  case 0:
35375
35396
  return this.view && this.player ? [4, this.player.clock.waitUntil(function() {
@@ -35377,7 +35398,7 @@ void main(void){
35377
35398
  }, 6e4)] : [3, 2];
35378
35399
  case 1:
35379
35400
  for (n3 in o2.sent(), e3 = this.player.getSnapshot() || "", this.cacheImage.src = e3, this.frame.appendChild(this.cacheImage), this.player.destroy(), (t3 = this.playerController) === null || t3 === void 0 || t3.destroy(), this.player = void 0, this.__slideState.mediaState)
35380
- i2 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = iI(iI({}, i2), { frozenTime: this.timestamp() });
35401
+ i2 = this.__slideState.mediaState[n3], this.__slideState.mediaState[n3] = rI(rI({}, i2), { frozenTime: this.timestamp() });
35381
35402
  o2.label = 2;
35382
35403
  case 2:
35383
35404
  return [2];
@@ -35391,14 +35412,14 @@ void main(void){
35391
35412
  });
35392
35413
  }, e2.prototype._doRelease = function() {
35393
35414
  var t3, e3;
35394
- return oI(this, void 0, void 0, function() {
35415
+ return sI(this, void 0, void 0, function() {
35395
35416
  var n3, i2, r2, o2;
35396
- return sI(this, function(s2) {
35417
+ return aI(this, function(s2) {
35397
35418
  switch (s2.label) {
35398
35419
  case 0:
35399
35420
  if (this.player)
35400
35421
  return [2];
35401
- for (i2 in this.player = this.initPlayer(this.config), ((t3 = this.config) === null || t3 === void 0 ? void 0 : t3.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = Object(l.cloneDeep)(cI), n3.mediaState)
35422
+ for (i2 in this.player = this.initPlayer(this.config), ((t3 = this.config) === null || t3 === void 0 ? void 0 : t3.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n3 = this.__slideState, this.__slideState = Object(l.cloneDeep)(dI), n3.mediaState)
35402
35423
  (r2 = n3.mediaState[i2]).type === "play" && (o2 = Math.max((e3 = r2.frozenTime) !== null && e3 !== void 0 ? e3 : 0, r2.time), r2.time = this.timestamp() - (o2 - r2.time), r2.frozenTime = void 0);
35403
35424
  return [4, this.setSlideState(n3)];
35404
35425
  case 1:
@@ -35432,14 +35453,14 @@ void main(void){
35432
35453
  } catch (t4) {
35433
35454
  }
35434
35455
  }, e2.prototype.waitLoadEnd = function() {
35435
- return oI(this, void 0, void 0, function() {
35456
+ return sI(this, void 0, void 0, function() {
35436
35457
  var t3;
35437
- return sI(this, function(e3) {
35458
+ return aI(this, function(e3) {
35438
35459
  switch (e3.label) {
35439
35460
  case 0:
35440
35461
  t3 = 0, e3.label = 1;
35441
35462
  case 1:
35442
- return this.isLoading && t3 < 10 ? [4, lI(100)] : [3, 3];
35463
+ return this.isLoading && t3 < 10 ? [4, uI(100)] : [3, 3];
35443
35464
  case 2:
35444
35465
  return e3.sent(), t3 += 1, [3, 1];
35445
35466
  case 3:
@@ -35465,22 +35486,25 @@ void main(void){
35465
35486
  return false;
35466
35487
  var t3 = this.player.currentIndex === 1, e3 = this.mainSeqLength === 0 || this.mainSeqStep === 0, n3 = this.mainSeqState === "idle" || this.mainSeqState === null;
35467
35488
  return !(t3 && e3 && n3);
35489
+ }, e2.prototype.updateGlobalVolume = function(t3) {
35490
+ var e3;
35491
+ (e3 = this.player) === null || e3 === void 0 || e3.updateGlobalVolume(t3);
35468
35492
  }, e2.clearLocalCache = function() {
35469
- KR.clearLocalCache();
35493
+ QR.clearLocalCache();
35470
35494
  }, e2.disposeLocalCache = function() {
35471
- }, e2._tempLog = "", e2._tempLogIndex = 1, e2.usePlugin = tP, e2.handleLogDownload = function() {
35472
- return oI(void 0, void 0, void 0, function() {
35495
+ }, e2._tempLog = "", e2._tempLogIndex = 1, e2.usePlugin = eP, e2.handleLogDownload = function() {
35496
+ return sI(void 0, void 0, void 0, function() {
35473
35497
  var t3, e3, n3, i2, r2, o2, s2;
35474
- return sI(this, function(a2) {
35498
+ return aI(this, function(a2) {
35475
35499
  switch (a2.label) {
35476
35500
  case 0:
35477
- return t3 = "", pI ? [4, pI.keys()] : [3, 5];
35501
+ return t3 = "", fI ? [4, fI.keys()] : [3, 5];
35478
35502
  case 1:
35479
35503
  e3 = (a2.sent() || []).sort(function(t4, e4) {
35480
35504
  return parseInt(t4.replace("run_time_log_", "")) - parseInt(e4.replace("run_time_log_", ""));
35481
35505
  }), n3 = 0, i2 = e3, a2.label = 2;
35482
35506
  case 2:
35483
- return n3 < i2.length ? (r2 = i2[n3], o2 = t3, [4, pI.getItem(r2)]) : [3, 5];
35507
+ return n3 < i2.length ? (r2 = i2[n3], o2 = t3, [4, fI.getItem(r2)]) : [3, 5];
35484
35508
  case 3:
35485
35509
  t3 = o2 + (a2.sent() || ""), a2.label = 4;
35486
35510
  case 4:
@@ -35490,12 +35514,12 @@ void main(void){
35490
35514
  }
35491
35515
  });
35492
35516
  });
35493
- }, rI([(n2 = "Slide.initConfig", function(t3, e3, i2) {
35517
+ }, oI([(n2 = "Slide.initConfig", function(t3, e3, i2) {
35494
35518
  var r2 = i2.value;
35495
35519
  i2.value = function() {
35496
35520
  for (var t4 = [], e4 = 0; e4 < arguments.length; e4++)
35497
35521
  t4[e4] = arguments[e4];
35498
- for (var i3 = QR.get(n2) || [], o2 = t4, s2 = 0, a2 = i3; s2 < a2.length; s2++) {
35522
+ for (var i3 = tP.get(n2) || [], o2 = t4, s2 = 0, a2 = i3; s2 < a2.length; s2++) {
35499
35523
  var l2 = a2[s2];
35500
35524
  try {
35501
35525
  o2 = l2.before(o2);
@@ -35517,8 +35541,8 @@ void main(void){
35517
35541
  };
35518
35542
  })], e2.prototype, "initSlideConfig", null), e2;
35519
35543
  }(a.a);
35520
- pI == null || pI.clear(), window.addEventListener("__slide_log__", fI.handleLogDownload), window.setInterval(function() {
35521
- fI.flushLog().catch(function() {
35544
+ fI == null || fI.clear(), window.addEventListener("__slide_log__", mI.handleLogDownload), window.setInterval(function() {
35545
+ mI.flushLog().catch(function() {
35522
35546
  });
35523
35547
  }, 9e3);
35524
35548
  }]);
@@ -37699,7 +37723,7 @@ class SlidePreviewer {
37699
37723
  }
37700
37724
  }
37701
37725
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
37702
- const version = "0.2.6-alpha.1";
37726
+ const version = "0.2.6";
37703
37727
  const SlideApp = {
37704
37728
  kind: "Slide",
37705
37729
  setup(context) {