@netless/app-slide 0.2.5 → 0.2.6-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +71 -71
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +778 -705
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +71 -71
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
package/dist/main.es.js
CHANGED
|
@@ -6491,13 +6491,13 @@ var Slide = function(t2) {
|
|
|
6491
6491
|
n2.r(e2), n2.d(e2, "ErrorType", function() {
|
|
6492
6492
|
return VE;
|
|
6493
6493
|
}), n2.d(e2, "delay", function() {
|
|
6494
|
-
return aI;
|
|
6495
|
-
}), n2.d(e2, "waitUntil", function() {
|
|
6496
6494
|
return lI;
|
|
6497
|
-
}), n2.d(e2, "
|
|
6495
|
+
}), n2.d(e2, "waitUntil", function() {
|
|
6498
6496
|
return uI;
|
|
6497
|
+
}), n2.d(e2, "SLIDE_EVENTS", function() {
|
|
6498
|
+
return hI;
|
|
6499
6499
|
}), n2.d(e2, "Slide", function() {
|
|
6500
|
-
return
|
|
6500
|
+
return fI;
|
|
6501
6501
|
});
|
|
6502
6502
|
var i2 = {};
|
|
6503
6503
|
n2.r(i2), n2.d(i2, "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(t3, e3 = false) {
|
|
29476
|
-
this.proxy && !e3 || (this.ctx.eventHub.emit(
|
|
29476
|
+
this.proxy && !e3 || (this.ctx.eventHub.emit($R.hyperlinkTrigger, t3), this.execAction(t3));
|
|
29477
29477
|
}
|
|
29478
29478
|
execAction(t3) {
|
|
29479
29479
|
var e3;
|
|
29480
|
-
if (this.ctx.eventHub.emit(
|
|
29480
|
+
if (this.ctx.eventHub.emit($R.userInput), t3.action === "ppaction://hlinksldjump") {
|
|
29481
29481
|
const n3 = ((e3 = t3 == null ? void 0 : t3.target) !== null && e3 !== void 0 ? e3 : "").match(/slide(\d+)\.xml/);
|
|
29482
|
-
n3 && n3[1] && this.ctx.eventHub.emit(
|
|
29482
|
+
n3 && n3[1] && this.ctx.eventHub.emit($R.requestGotoSlide, Number(n3[1]));
|
|
29483
29483
|
} else if (t3.action === "ppaction://hlinkshowjump?jump=nextslide")
|
|
29484
|
-
this.ctx.eventHub.emit(
|
|
29484
|
+
this.ctx.eventHub.emit($R.requestNextSlide);
|
|
29485
29485
|
else if (t3.action === "ppaction://hlinkshowjump?jump=previousslide")
|
|
29486
|
-
this.ctx.eventHub.emit(
|
|
29486
|
+
this.ctx.eventHub.emit($R.requestPrevSlide);
|
|
29487
29487
|
else if (t3.action === "ppaction://hlinkshowjump?jump=firstslide")
|
|
29488
|
-
this.ctx.eventHub.emit(
|
|
29488
|
+
this.ctx.eventHub.emit($R.requestGotoSlide, 1);
|
|
29489
29489
|
else if (t3.action === "ppaction://hlinkshowjump?jump=lastslide")
|
|
29490
|
-
this.ctx.eventHub.emit(
|
|
29490
|
+
this.ctx.eventHub.emit($R.requestGotoSlide, -1);
|
|
29491
29491
|
else if (t3.action === "ppaction://hlinkshowjump?jump=lastslideviewed") {
|
|
29492
29492
|
const t4 = this.ctx.lastViewedIndex;
|
|
29493
|
-
this.ctx.eventHub.emit(
|
|
29493
|
+
this.ctx.eventHub.emit($R.requestGotoSlide, t4);
|
|
29494
29494
|
} else
|
|
29495
|
-
t3.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit(
|
|
29495
|
+
t3.action === "ppaction://hlinkshowjump?jump=endshow" && this.ctx.eventHub.emit($R.requestGotoSlide, -1);
|
|
29496
29496
|
}
|
|
29497
29497
|
}
|
|
29498
29498
|
class PM {
|
|
@@ -29715,6 +29715,9 @@ void main() {
|
|
|
29715
29715
|
}
|
|
29716
29716
|
initOnReuse() {
|
|
29717
29717
|
}
|
|
29718
|
+
isStatic() {
|
|
29719
|
+
return true;
|
|
29720
|
+
}
|
|
29718
29721
|
getTextElement() {
|
|
29719
29722
|
return null;
|
|
29720
29723
|
}
|
|
@@ -30204,7 +30207,7 @@ void main(void){
|
|
|
30204
30207
|
}
|
|
30205
30208
|
class TA {
|
|
30206
30209
|
constructor(t3, e3, n3, i3, r3) {
|
|
30207
|
-
this.ctx = t3, this.fillStyle = e3, this.width = n3, this.height = i3, this.config = r3, this.clonedObjects = [], this._displayObject = null;
|
|
30210
|
+
this.ctx = t3, this.fillStyle = e3, this.width = n3, this.height = i3, this.config = r3, this.clonedObjects = [], this._displayObject = null, this.gradientHash = fM()(`${JSON.stringify(e3)}${Math.ceil(n3)}${Math.ceil(i3)}`);
|
|
30208
30211
|
}
|
|
30209
30212
|
get displayObject() {
|
|
30210
30213
|
return this._displayObject || (this._displayObject = this.createDisplayObject()), this._displayObject;
|
|
@@ -30225,8 +30228,15 @@ void main(void){
|
|
|
30225
30228
|
}
|
|
30226
30229
|
if (this.fillStyle.fillType === "solidFill" || this.fillStyle.fillType === "noFill")
|
|
30227
30230
|
return null;
|
|
30228
|
-
if (this.fillStyle.fillType === "gradientFill")
|
|
30229
|
-
|
|
30231
|
+
if (this.fillStyle.fillType === "gradientFill") {
|
|
30232
|
+
const t4 = new Ow();
|
|
30233
|
+
let e3 = TA.gradientPool.get(this.gradientHash);
|
|
30234
|
+
if (!e3) {
|
|
30235
|
+
const t5 = hA(this.fillStyle, this.width, this.height), n3 = Hy.create({ width: this.width, height: this.height, resolution: this.ctx.renderer.resolution });
|
|
30236
|
+
this.ctx.renderer.render(t5, { renderTexture: n3 }), e3 = n3, TA.gradientPool.set(this.gradientHash, e3), t5.destroy({ children: true, texture: true });
|
|
30237
|
+
}
|
|
30238
|
+
return t4.texture = e3, t4;
|
|
30239
|
+
}
|
|
30230
30240
|
if (this.fillStyle.fillType === "blipFill") {
|
|
30231
30241
|
const { src: e3, filters: n3 } = this.fillStyle, i3 = this.ctx.spriteTexture.getTexture(e3), r3 = this.ctx.spriteTexture.getFrameData(e3);
|
|
30232
30242
|
if (i3) {
|
|
@@ -30281,6 +30291,7 @@ void main(void){
|
|
|
30281
30291
|
}), this.clonedObjects = [];
|
|
30282
30292
|
}
|
|
30283
30293
|
}
|
|
30294
|
+
TA.gradientPool = /* @__PURE__ */ new Map();
|
|
30284
30295
|
var wA = function(t3, e3, n3, i3) {
|
|
30285
30296
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
30286
30297
|
function s3(t4) {
|
|
@@ -30944,6 +30955,9 @@ void main(void){
|
|
|
30944
30955
|
}
|
|
30945
30956
|
initOnReuse() {
|
|
30946
30957
|
}
|
|
30958
|
+
isStatic() {
|
|
30959
|
+
return !!this.json.cacheAsBitMap;
|
|
30960
|
+
}
|
|
30947
30961
|
destroy() {
|
|
30948
30962
|
var t3, e3, n3, i3;
|
|
30949
30963
|
(t3 = this.text) === null || t3 === void 0 || t3.destroy(), this.fillColorFilter.destroy(), this.strokeColorFilter.destroy(), this.backgroundFill.destroy(), (e3 = this.backgroundGraphics) === null || e3 === void 0 || e3.destroy(), this.strokeFill.destroy(), (n3 = this.strokeGraphics) === null || n3 === void 0 || n3.destroy(), this.renderContainer.destroy(), (i3 = this.arrowRenderTexture) === null || i3 === void 0 || i3.destroy(true), this.arrowList = [];
|
|
@@ -30986,7 +31000,7 @@ void main(void){
|
|
|
30986
31000
|
return void this.ctx.logger.info("Media controller prevent seek event with paused state", this.ctx.taskId);
|
|
30987
31001
|
t4.stopPropagation();
|
|
30988
31002
|
const e4 = t4.offsetX / this.progress.clientWidth * this.duration;
|
|
30989
|
-
this.medianIsEnd = false, this.ctx.mode !== "interactive" && this.jumpToTime(e4), this.ctx.mode !== "local" && this.ctx.eventHub.emit(
|
|
31003
|
+
this.medianIsEnd = false, this.ctx.mode !== "interactive" && this.jumpToTime(e4), this.ctx.mode !== "local" && this.ctx.eventHub.emit($R.mediaSeek, { id: this.targetId, time: e4, isPlaying: this.media.isPlaying });
|
|
30990
31004
|
}, this.jumpToTime = (t4 = 0) => {
|
|
30991
31005
|
const e4 = Math.floor(t4) + this.start;
|
|
30992
31006
|
this.media.currentTime !== e4 && (this.media.currentTime = e4, this.changeBookmarkIndex(e4, e4 > this.media.currentTime));
|
|
@@ -31015,9 +31029,9 @@ void main(void){
|
|
|
31015
31029
|
t4();
|
|
31016
31030
|
});
|
|
31017
31031
|
}, this.playMediaFromCtrl = () => {
|
|
31018
|
-
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(
|
|
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 }));
|
|
31019
31033
|
}, this.pauseMediaFromCtrl = () => {
|
|
31020
|
-
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(
|
|
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 }));
|
|
31021
31035
|
}, this.targetId = t3.targetId, this.ctx = t3.ctx, this.height = t3.height, this.width = t3.width, this.target = t3.target, this.media = t3.media, this.info = t3.info, this.shapeId = t3.shapeId, this.canvasElement = t3.canvasElement, this.getMedianContainer(), this.createMediaController(), this.info.cut && (this.start = (e3 = this.info.cut.start) !== null && e3 !== void 0 ? e3 : 0, this.end = (n3 = this.info.cut.end) !== null && n3 !== void 0 ? n3 : 0), this.info.bookmarkList && (this.bookmarkList = this.info.bookmarkList.sort((t4, e4) => t4.time - e4.time));
|
|
31022
31036
|
}
|
|
31023
31037
|
getMedianContainer() {
|
|
@@ -31103,14 +31117,52 @@ void main(void){
|
|
|
31103
31117
|
this.unbindEvent(), this.playCallBackList = [], (t3 = this.container) === null || t3 === void 0 || t3.removeChild(this.mediaController);
|
|
31104
31118
|
}
|
|
31105
31119
|
}
|
|
31106
|
-
var VA = n2(49)
|
|
31107
|
-
|
|
31120
|
+
var VA = n2(49), WA = function(t3, e3, n3, i3) {
|
|
31121
|
+
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
31122
|
+
function s3(t4) {
|
|
31123
|
+
try {
|
|
31124
|
+
l2(i3.next(t4));
|
|
31125
|
+
} catch (t5) {
|
|
31126
|
+
o2(t5);
|
|
31127
|
+
}
|
|
31128
|
+
}
|
|
31129
|
+
function a2(t4) {
|
|
31130
|
+
try {
|
|
31131
|
+
l2(i3.throw(t4));
|
|
31132
|
+
} catch (t5) {
|
|
31133
|
+
o2(t5);
|
|
31134
|
+
}
|
|
31135
|
+
}
|
|
31136
|
+
function l2(t4) {
|
|
31137
|
+
var e4;
|
|
31138
|
+
t4.done ? r3(t4.value) : (e4 = t4.value, e4 instanceof n3 ? e4 : new n3(function(t5) {
|
|
31139
|
+
t5(e4);
|
|
31140
|
+
})).then(s3, a2);
|
|
31141
|
+
}
|
|
31142
|
+
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
31143
|
+
});
|
|
31144
|
+
};
|
|
31145
|
+
class XA extends a.a {
|
|
31108
31146
|
constructor(t3, e3) {
|
|
31109
|
-
super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this.url = t3, this.runningAudio = e3,
|
|
31147
|
+
super(), this.isGlobalPause = false, this.lastTime = -1, this.howl = null, this.rctClient = null, this._isResourceExist = "unknow", this.url = t3, this.runningAudio = e3, KR.RtcAudioClazz ? (this.rctClient = new KR.RtcAudioClazz(t3), this.rctClient.on("load", () => this.emit("load")), this.rctClient.on("pause", () => this.emit("pause")), this.rctClient.on("play", () => this.emit("play"))) : (this.howl = new VA.Howl({ src: [t3] }), this.howl.on("load", () => this.emit("load")), this.howl.on("pause", () => this.emit("pause")), this.howl.on("play", () => this.emit("play"))), this.detectResourceExist();
|
|
31110
31148
|
}
|
|
31111
31149
|
startTimeChangeEmit() {
|
|
31112
31150
|
this.currentTime !== this.lastTime && (this.lastTime = this.currentTime, this.emit("timeupdate")), this.isEnded || setTimeout(() => this.startTimeChangeEmit(), 300);
|
|
31113
31151
|
}
|
|
31152
|
+
detectResourceExist() {
|
|
31153
|
+
return new Promise((t3) => {
|
|
31154
|
+
fetch(this.url, { method: "HEAD" }).then((e3) => {
|
|
31155
|
+
this._isResourceExist = e3.ok ? "true" : "false", t3(e3.ok);
|
|
31156
|
+
}).catch(() => {
|
|
31157
|
+
this._isResourceExist = "false", t3(false);
|
|
31158
|
+
});
|
|
31159
|
+
});
|
|
31160
|
+
}
|
|
31161
|
+
isResourceExist() {
|
|
31162
|
+
return WA(this, void 0, void 0, function* () {
|
|
31163
|
+
return this._isResourceExist !== "unknow" ? this._isResourceExist === "true" : this.detectResourceExist();
|
|
31164
|
+
});
|
|
31165
|
+
}
|
|
31114
31166
|
play() {
|
|
31115
31167
|
var t3, e3, n3;
|
|
31116
31168
|
this.runningAudio.has(this.url) && ((t3 = this.runningAudio.get(this.url)) === null || t3 === void 0 || t3.stop(), this.runningAudio.delete(this.url)), this.lastTime = -1, (e3 = this.howl) === null || e3 === void 0 || e3.play(), (n3 = this.rctClient) === null || n3 === void 0 || n3.play(), this.startTimeChangeEmit(), this.runningAudio.set(this.url, this);
|
|
@@ -31149,7 +31201,7 @@ void main(void){
|
|
|
31149
31201
|
return this.rctClient ? this.rctClient.isPaused : !!this.howl && this.howl.playing();
|
|
31150
31202
|
}
|
|
31151
31203
|
}
|
|
31152
|
-
var
|
|
31204
|
+
var qA = function(t3, e3, n3, i3) {
|
|
31153
31205
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
31154
31206
|
function s3(t4) {
|
|
31155
31207
|
try {
|
|
@@ -31174,14 +31226,14 @@ void main(void){
|
|
|
31174
31226
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
31175
31227
|
});
|
|
31176
31228
|
};
|
|
31177
|
-
class
|
|
31229
|
+
class YA extends a.a {
|
|
31178
31230
|
constructor(t3) {
|
|
31179
31231
|
var e3, n3;
|
|
31180
31232
|
super(), this.type = "video", this.sprite = new Ow(), this.isPlaying = false, this.isGlobalPause = false, this.id = t3.id, this.start = (e3 = t3.video.cut) === null || e3 === void 0 ? void 0 : e3.start, this.end = (n3 = t3.video.cut) === null || n3 === void 0 ? void 0 : n3.end, this.container = t3.container, this.ctx = t3.ctx, this.ctx.medias[this.id] = this;
|
|
31181
31233
|
let i3 = t3.video.src;
|
|
31182
31234
|
this.ctx.loaderDelegate && (i3 = this.ctx.loaderDelegate.redirectMedia(i3), this.ctx.logger.info(`redirect media url from ${t3.video.src} to ${i3} by delegate.`, t3.ctx.taskId)), this.videoResource = new Iy(i3, { autoLoad: true, autoPlay: false, updateFPS: 30, crossorigin: true });
|
|
31183
31235
|
let r3 = t3.video.src.replace(/4$/, "3");
|
|
31184
|
-
this.ctx.loaderDelegate && (r3 = this.ctx.loaderDelegate.redirectMedia(r3), this.ctx.logger.info(`redirect media url from ${t3.video.src.replace(/4$/, "3")} to ${r3} by delegate.`, t3.ctx.taskId)), this.rtcAudio = new
|
|
31236
|
+
this.ctx.loaderDelegate && (r3 = this.ctx.loaderDelegate.redirectMedia(r3), this.ctx.logger.info(`redirect media url from ${t3.video.src.replace(/4$/, "3")} to ${r3} by delegate.`, t3.ctx.taskId)), this.rtcAudio = new XA(r3, t3.ctx.runningAudio);
|
|
31185
31237
|
const { video: o2, width: s3, height: a2, target: l2 } = t3;
|
|
31186
31238
|
this.controller = new jA({ targetId: t3.id, shapeId: t3.shapeId, ctx: t3.ctx, width: s3, height: a2, target: l2, media: this, info: o2, canvasElement: t3.canvasElement }), this.controller.addPlayCallBack(() => {
|
|
31187
31239
|
this.sprite.width = s3, this.sprite.height = a2, this.ctx.clock.setTimeout(() => {
|
|
@@ -31204,7 +31256,7 @@ void main(void){
|
|
|
31204
31256
|
return (e3 = (t3 = this.videoResource.source) === null || t3 === void 0 ? void 0 : t3.currentTime) !== null && e3 !== void 0 ? e3 : 0;
|
|
31205
31257
|
}
|
|
31206
31258
|
set currentTime(t3) {
|
|
31207
|
-
this.videoResource.source && (this.videoResource.source.currentTime = t3);
|
|
31259
|
+
KR.RtcAudioClazz && (this.rtcAudio.currentTime = t3), this.videoResource.source && (this.videoResource.source.currentTime = t3);
|
|
31208
31260
|
}
|
|
31209
31261
|
get paused() {
|
|
31210
31262
|
var t3, e3;
|
|
@@ -31226,16 +31278,19 @@ void main(void){
|
|
|
31226
31278
|
}
|
|
31227
31279
|
play() {
|
|
31228
31280
|
var t3;
|
|
31229
|
-
return
|
|
31281
|
+
return qA(this, void 0, void 0, function* () {
|
|
31230
31282
|
this.isPlaying = true, yield this.load(), yield this.ctx.clock.waitUntil(() => {
|
|
31231
31283
|
const t4 = this.videoResource.source;
|
|
31232
31284
|
return !!(t4 && t4.videoWidth > 0);
|
|
31233
31285
|
}, 3e3);
|
|
31234
31286
|
const e3 = this.videoResource.source;
|
|
31235
|
-
e3 && e3.videoWidth <= 0
|
|
31287
|
+
if (e3 && e3.videoWidth <= 0)
|
|
31288
|
+
return;
|
|
31289
|
+
const n3 = yield this.rtcAudio.isResourceExist();
|
|
31290
|
+
KR.RtcAudioClazz && n3 ? (this.videoResource.source.volume = 0, this.rtcAudio.once("play", () => {
|
|
31236
31291
|
var t4;
|
|
31237
31292
|
(t4 = this.videoResource.source) === null || t4 === void 0 || t4.play();
|
|
31238
|
-
})) : yield (t3 = this.videoResource.source) === null || t3 === void 0 ? void 0 : t3.play()
|
|
31293
|
+
}), this.rtcAudio.play()) : yield (t3 = this.videoResource.source) === null || t3 === void 0 ? void 0 : t3.play();
|
|
31239
31294
|
});
|
|
31240
31295
|
}
|
|
31241
31296
|
load() {
|
|
@@ -31243,10 +31298,10 @@ void main(void){
|
|
|
31243
31298
|
}
|
|
31244
31299
|
pause() {
|
|
31245
31300
|
var t3;
|
|
31246
|
-
this.isPlaying = false,
|
|
31301
|
+
this.isPlaying = false, KR.RtcAudioClazz ? (this.rtcAudio.once("pause", () => {
|
|
31247
31302
|
var t4;
|
|
31248
31303
|
(t4 = this.videoResource.source) === null || t4 === void 0 || t4.pause();
|
|
31249
|
-
})) : (t3 = this.videoResource.source) === null || t3 === void 0 || t3.pause();
|
|
31304
|
+
}), this.rtcAudio.pause()) : (t3 = this.videoResource.source) === null || t3 === void 0 || t3.pause();
|
|
31250
31305
|
}
|
|
31251
31306
|
globalPause() {
|
|
31252
31307
|
this.isPlaying && (this.isGlobalPause = true, this.pause());
|
|
@@ -31268,7 +31323,7 @@ void main(void){
|
|
|
31268
31323
|
this.sprite.interactive = false, this.sprite.destroy({ texture: true, baseTexture: true }), (t3 = this.videoResource) === null || t3 === void 0 || t3.destroy(), this.rtcAudio.destroy(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
|
|
31269
31324
|
}
|
|
31270
31325
|
}
|
|
31271
|
-
var
|
|
31326
|
+
var ZA = function(t3, e3, n3, i3) {
|
|
31272
31327
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
31273
31328
|
function s3(t4) {
|
|
31274
31329
|
try {
|
|
@@ -31293,11 +31348,11 @@ void main(void){
|
|
|
31293
31348
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
31294
31349
|
});
|
|
31295
31350
|
};
|
|
31296
|
-
class
|
|
31351
|
+
class JA extends a.a {
|
|
31297
31352
|
constructor(t3) {
|
|
31298
31353
|
super(), this.type = "audio", this.isPlaying = false, this.isGlobalPause = false, this.id = t3.id;
|
|
31299
31354
|
let e3 = t3.audio.src;
|
|
31300
|
-
t3.ctx.loaderDelegate && (e3 = t3.ctx.loaderDelegate.redirectMedia(e3), t3.ctx.logger.info(`redirect media url from ${t3.audio.src} to ${e3} by delegate.`, t3.ctx.taskId)), this.audioPlayer = new
|
|
31355
|
+
t3.ctx.loaderDelegate && (e3 = t3.ctx.loaderDelegate.redirectMedia(e3), t3.ctx.logger.info(`redirect media url from ${t3.audio.src} to ${e3} by delegate.`, t3.ctx.taskId)), this.audioPlayer = new XA(e3, t3.ctx.runningAudio), t3.audio.cut && (this.start = t3.audio.cut.start, this.end = t3.audio.cut.end), this.ctx = t3.ctx, this.ctx.medias[this.id] = this;
|
|
31301
31356
|
const { width: n3, height: i3, target: r3 } = t3;
|
|
31302
31357
|
this.controller = new jA({ targetId: t3.id, shapeId: t3.shapeId, ctx: t3.ctx, height: i3, width: n3, target: r3, media: this, info: t3.audio, canvasElement: t3.canvasElement }), this.audioPlayer.on("load", () => this.emit("durationchange")), this.audioPlayer.on("timeupdate", () => this.emit("timeupdate")), this.audioPlayer.on("pause", () => this.emit("pause")), this.audioPlayer.on("play", () => this.emit("play")), this.ctx.activeMedia.add(this);
|
|
31303
31358
|
}
|
|
@@ -31329,7 +31384,7 @@ void main(void){
|
|
|
31329
31384
|
this.controller.hide();
|
|
31330
31385
|
}
|
|
31331
31386
|
play() {
|
|
31332
|
-
return
|
|
31387
|
+
return ZA(this, void 0, void 0, function* () {
|
|
31333
31388
|
this.ctx.isPlayerPaused() ? this.ctx.logger.info("Audio player prevent play event with paused state", this.ctx.taskId) : (this.isPlaying = true, this.audioPlayer.play());
|
|
31334
31389
|
});
|
|
31335
31390
|
}
|
|
@@ -31355,7 +31410,7 @@ void main(void){
|
|
|
31355
31410
|
this.audioPlayer.pause(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
|
|
31356
31411
|
}
|
|
31357
31412
|
}
|
|
31358
|
-
class
|
|
31413
|
+
class $A extends GA {
|
|
31359
31414
|
constructor(t3, e3, n3, i3) {
|
|
31360
31415
|
super(Object.assign(Object.assign({}, t3), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e3, n3, i3), this.isInteractiveOutside = false, this.cmd = new EM(this), this.media = t3 == null ? void 0 : t3.media, this.picFill = new TA(this.ctx, t3.picFill, t3.width, t3.height, { useFilter: false, useSlideBackgroundFill: false });
|
|
31361
31416
|
}
|
|
@@ -31378,7 +31433,7 @@ void main(void){
|
|
|
31378
31433
|
const s3 = (t3 = this.backgroundGraphics) === null || t3 === void 0 ? void 0 : t3.getClonedDisplayObject();
|
|
31379
31434
|
((e3 = this.backgroundGraphics) === null || e3 === void 0 ? void 0 : e3.isNeedMask(o2.width, o2.height)) && s3 && (o2.mask = s3, this.container.addChild(s3)), o2.width = this.designWidth, o2.height = this.designHeight, o2 instanceof jE && this.ctx.slideScopeEventHub.once("slide-render", (t4) => {
|
|
31380
31435
|
this.ctx.slideIndex === t4 && o2.play();
|
|
31381
|
-
}), this.container.addChild(o2), ((n3 = this.media) === null || n3 === void 0 ? void 0 : n3.type) === "video" && this.media.src ? (this.mediaPlayer = new
|
|
31436
|
+
}), this.container.addChild(o2), ((n3 = this.media) === null || n3 === void 0 ? void 0 : n3.type) === "video" && this.media.src ? (this.mediaPlayer = new YA({ id: this.json.id + "-video", shapeId: this.json.id, ctx: this.ctx, video: this.media, height: this.designHeight, width: this.designWidth, target: o2, container: this.container, canvasElement: this.ctx.view }), (i3 = this.mediaPlayer) === null || i3 === void 0 || i3.sprite) : ((r3 = this.media) === null || r3 === void 0 ? void 0 : r3.type) === "audio" && this.media.src && (this.mediaPlayer = new JA({ id: this.json.id + "-audio", shapeId: this.json.id, ctx: this.ctx, audio: this.media, height: this.designHeight, width: this.designWidth, target: o2, canvasElement: this.ctx.view })), this.mediaPlayer && (this.isInteractiveOutside = this.container.interactive, this.container.interactive = true, this.container.on("mouseover", () => {
|
|
31382
31437
|
this.mediaPlayer.showController();
|
|
31383
31438
|
}), this.container.on("mouseout", () => {
|
|
31384
31439
|
this.mediaPlayer.hideController();
|
|
@@ -31397,11 +31452,15 @@ void main(void){
|
|
|
31397
31452
|
initOnReuse() {
|
|
31398
31453
|
super.initOnReuse(), this.mediaPlayer && (this.container.interactive = true);
|
|
31399
31454
|
}
|
|
31455
|
+
isStatic() {
|
|
31456
|
+
const t3 = this.json;
|
|
31457
|
+
return (!t3.media || t3.media.type !== "video") && super.isStatic();
|
|
31458
|
+
}
|
|
31400
31459
|
destroy() {
|
|
31401
31460
|
this.mediaPlayer && (this.picFill.displayObject && !this.isInteractiveOutside && (this.container.interactive = false), this.mediaPlayer.destroy(), this.mediaPlayer = void 0), this.picFill.destroy();
|
|
31402
31461
|
}
|
|
31403
31462
|
}
|
|
31404
|
-
var
|
|
31463
|
+
var KA = function(t3, e3, n3, i3) {
|
|
31405
31464
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
31406
31465
|
function s3(t4) {
|
|
31407
31466
|
try {
|
|
@@ -31426,7 +31485,7 @@ void main(void){
|
|
|
31426
31485
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
31427
31486
|
});
|
|
31428
31487
|
};
|
|
31429
|
-
class
|
|
31488
|
+
class QA extends PM {
|
|
31430
31489
|
constructor(t3, e3, n3, i3, r3) {
|
|
31431
31490
|
super(t3, e3, n3), this.children = [], this.cacheSprite = new Ow(), this.cacheContainer = new ty(), this.json = t3, this.json.fillStyle && this.json.fillStyle.fillType === "groupFill" && i3 && (this.json.fillStyle = i3), this.container.name = t3.id, this.cacheContainer.name = t3.id + "-cache-container", this.ctx.timingTargets.addTarget(t3.id, this), this.updateTransform(this.json), this.fillObject = new TA(this.ctx, t3.fillStyle, t3.width, t3.height, { useFilter: false, useSlideBackgroundFill: false }), this.createChildren(r3);
|
|
31432
31491
|
}
|
|
@@ -31434,10 +31493,10 @@ void main(void){
|
|
|
31434
31493
|
var e3, n3, i3, r3;
|
|
31435
31494
|
const o2 = { x: (n3 = (e3 = this.json.position) === null || e3 === void 0 ? void 0 : e3.x) !== null && n3 !== void 0 ? n3 : 0, y: (r3 = (i3 = this.json.position) === null || i3 === void 0 ? void 0 : i3.y) !== null && r3 !== void 0 ? r3 : 0 };
|
|
31436
31495
|
for (let e4 = 0, n4 = this.json.children.length; e4 < n4; e4++)
|
|
31437
|
-
t3.addSubMTask(() =>
|
|
31496
|
+
t3.addSubMTask(() => KA(this, void 0, void 0, function* () {
|
|
31438
31497
|
const n5 = this.json.children[e4];
|
|
31439
31498
|
let i4 = null;
|
|
31440
|
-
(n5 == null ? void 0 : n5.type) === "Shape" ? i4 = new GA(n5, this.ctx, o2, this.json.fillStyle) : (n5 == null ? void 0 : n5.type) === "Picture" ? i4 = new
|
|
31499
|
+
(n5 == null ? void 0 : n5.type) === "Shape" ? i4 = new GA(n5, this.ctx, o2, this.json.fillStyle) : (n5 == null ? void 0 : n5.type) === "Picture" ? i4 = new $A(n5, this.ctx, o2, this.json.fillStyle) : (n5 == null ? void 0 : n5.type) === "Container" && (i4 = new QA(n5, this.ctx, o2, this.json.fillStyle, t3)), i4 && this.children.push(i4);
|
|
31441
31500
|
}), "@ContainerImpl[child.init]");
|
|
31442
31501
|
}
|
|
31443
31502
|
get interactiveContainer() {
|
|
@@ -31448,7 +31507,7 @@ void main(void){
|
|
|
31448
31507
|
}
|
|
31449
31508
|
preRender(t3) {
|
|
31450
31509
|
for (const e3 of this.children)
|
|
31451
|
-
t3.addSubMTask(() =>
|
|
31510
|
+
t3.addSubMTask(() => KA(this, void 0, void 0, function* () {
|
|
31452
31511
|
e3.preRender(t3);
|
|
31453
31512
|
}), "@ContainerImpl[child.preRender]");
|
|
31454
31513
|
}
|
|
@@ -31462,13 +31521,22 @@ void main(void){
|
|
|
31462
31521
|
return null;
|
|
31463
31522
|
}
|
|
31464
31523
|
render(t3) {
|
|
31465
|
-
|
|
31466
|
-
|
|
31524
|
+
let e3 = new ty();
|
|
31525
|
+
for (const n3 of this.children)
|
|
31526
|
+
n3.render(t3), t3.addSubMTask(() => KA(this, void 0, void 0, function* () {
|
|
31467
31527
|
var t4;
|
|
31468
|
-
e3.renderContainer && this.cacheContainer.addChild(e3.renderContainer), (
|
|
31528
|
+
n3.isStatic() && !this.json.cacheAsTexture && n3.json.width < 4096 && n3.json.height < 4096 ? e3.addChild(n3.renderContainer) : (e3.children.length > 0 && (e3.cacheAsBitmap = true, this.cacheContainer.addChild(e3), e3 = new ty()), this.cacheContainer.addChild(n3.renderContainer)), (n3.json.hlinkHover || n3.json.hlinkClick) && ((t4 = n3.hyperlink) === null || t4 === void 0 || t4.addProxy(this.container));
|
|
31469
31529
|
}), "@ContainerImpl[child.render]");
|
|
31470
|
-
t3.
|
|
31471
|
-
|
|
31530
|
+
t3.addMTask(() => KA(this, void 0, void 0, function* () {
|
|
31531
|
+
e3.children.length > 0 && (e3.cacheAsBitmap = true, this.cacheContainer.addChild(e3));
|
|
31532
|
+
}), "@ContainerImpl[child.render]"), t3.addSubMTask(() => KA(this, void 0, void 0, function* () {
|
|
31533
|
+
this.container.addChild(this.cacheContainer), this.json.cacheAsTexture && (!function(t4, e4, n3, i3, r3) {
|
|
31534
|
+
const o2 = t4.getBounds(), s3 = Math.min(o2.x, e4.x, o2.x + o2.width, e4.x + e4.width), a2 = Math.max(o2.x, e4.x, o2.x + o2.width, e4.x + e4.width), l2 = Math.min(o2.y, e4.y, o2.y + o2.height, e4.y + e4.height), u2 = a2 - s3, h2 = Math.max(o2.y, e4.y, o2.y + o2.height, e4.y + e4.height) - l2;
|
|
31535
|
+
let c2 = KE(e4.x - o2.x), d2 = KE(e4.y - o2.y);
|
|
31536
|
+
r3 || (c2 = Math.max(0, c2), d2 = Math.max(0, d2));
|
|
31537
|
+
const p2 = Hy.create({ width: u2, height: h2, resolution: i3.renderer.resolution });
|
|
31538
|
+
t4.position.x = c2, t4.position.y = d2, i3.renderer.render(t4, { renderTexture: p2 }), n3.texture = p2, n3.position.x = -c2, n3.position.y = -d2;
|
|
31539
|
+
}(this.cacheContainer, new d_(this.designX, this.designY, this.designWidth, this.designHeight), this.cacheSprite, this.ctx, false), this.container.addChild(this.cacheSprite), this.cacheContainer.position.x = 0, this.cacheContainer.position.y = 0, this.cacheContainer.visible = false);
|
|
31472
31540
|
}), "@ContainerImpl[child.append]");
|
|
31473
31541
|
}
|
|
31474
31542
|
clearOnSlideChange() {
|
|
@@ -31477,11 +31545,14 @@ void main(void){
|
|
|
31477
31545
|
initOnReuse() {
|
|
31478
31546
|
this.children.forEach((t3) => t3.initOnReuse());
|
|
31479
31547
|
}
|
|
31548
|
+
isStatic() {
|
|
31549
|
+
return !!this.json.cacheAsTexture;
|
|
31550
|
+
}
|
|
31480
31551
|
destroy() {
|
|
31481
31552
|
this.cacheSprite && this.cacheSprite.destroy({ texture: true }), this.children.forEach((t3) => t3.destroy()), this.container.destroy({ children: true, texture: true, baseTexture: true }), this.cacheContainer.destroy({ children: true, texture: true, baseTexture: true });
|
|
31482
31553
|
}
|
|
31483
31554
|
}
|
|
31484
|
-
class
|
|
31555
|
+
class tR extends a.a {
|
|
31485
31556
|
constructor(t3, e3, n3, i3) {
|
|
31486
31557
|
super(), this.cond = {}, this.timeoutIds = [], this.condHandle = (t4, e4 = {}) => {
|
|
31487
31558
|
if (t4)
|
|
@@ -31528,7 +31599,7 @@ void main(void){
|
|
|
31528
31599
|
}), this.timeoutIds.forEach((t3) => this.ctx.clock.clearTimeout(t3));
|
|
31529
31600
|
}
|
|
31530
31601
|
}
|
|
31531
|
-
class
|
|
31602
|
+
class eR extends a.a {
|
|
31532
31603
|
constructor(t3) {
|
|
31533
31604
|
super(), this.isTimeNodeEndSync = false, this.interactiveListeners = [], this.runtimeNodeEventHub = new a.a(), this._currentSeqIndex = 0, this._currentSeqState = "idle", this.isForward = true, this.autoPlay = false, this.handlePrev = (t4 = false) => {
|
|
31534
31605
|
var e4, n4, i4, r4, o3, s4;
|
|
@@ -31538,16 +31609,16 @@ void main(void){
|
|
|
31538
31609
|
this.isTimeNodeEndSync && (this.isTimeNodeEndSync = false, this.currentSeqState = "idle", this.currentSeqIndex = 0), this.hasNext() || !this.isMainSeq ? this.currentSeqState === "idle" ? (e4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || e4 === void 0 || e4.commonTimeNode.startTimeNodeForce() : this.currentSeqState === "running" ? ((n4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || n4 === void 0 || n4.commonTimeNode.seekToEnd(false, true), this.currentSeqState = "end", this.incrSeqIndex(), (i4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || i4 === void 0 || i4.commonTimeNode.startTimeNodeForce()) : this.currentSeqState === "end" && (this.incrSeqIndex(), (r4 = this.commonTimeNode.children[this.currentSeqIndex]) === null || r4 === void 0 || r4.commonTimeNode.startTimeNodeForce()) : this.globalEventHub.emit("c:next slide", t4);
|
|
31539
31610
|
};
|
|
31540
31611
|
const { json: e3, iterateType: n3, isIterate: i3, isSub: r3, parent: o2, ctx: s3, eventHub: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t3;
|
|
31541
|
-
this.isMainSeq = e3.ctn.nodeType === "mainSeq", this.isInteractiveSeq = e3.ctn.nodeType === "interactiveSeq", this.id = e3.ctn.id, this.isIterate = i3, this.json = e3, this.ctx = s3, this.globalEventHub = l2, this.commonTimeNode = new
|
|
31612
|
+
this.isMainSeq = e3.ctn.nodeType === "mainSeq", this.isInteractiveSeq = e3.ctn.nodeType === "interactiveSeq", this.id = e3.ctn.id, this.isIterate = i3, this.json = e3, this.ctx = s3, this.globalEventHub = l2, this.commonTimeNode = new PR({ json: e3.ctn, isSub: r3, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s3, parent: o2, isIterate: false, iterateType: n3, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 || this.isInteractiveSeq }), this.bindShapeEvent(), this.nextConds = new tR("mainSeq", e3.nextCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.prevConds = new tR("mainSeq", e3.preCondLst, { global: l2, runtime: this.runtimeNodeEventHub }, this.ctx), this.commonTimeNode.on("timeNodeRestart", () => {
|
|
31542
31613
|
this.currentSeqIndex = 0, this.currentSeqState = "idle";
|
|
31543
31614
|
}), this.commonTimeNode.on("childTimeNodeStart", (t4) => {
|
|
31544
31615
|
const e4 = this.commonTimeNode.children.findIndex((e5) => e5.commonTimeNode.uuid === t4.id);
|
|
31545
|
-
e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit(
|
|
31616
|
+
e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "running", this.isMainSeq && this.ctx.eventHub.emit($R.mainSeqStepStart, e4);
|
|
31546
31617
|
}), this.commonTimeNode.on("childTimeNodeEnd", (t4) => {
|
|
31547
31618
|
const e4 = this.commonTimeNode.children.findIndex((e5) => e5.commonTimeNode.uuid === t4.id);
|
|
31548
31619
|
e4 >= 0 && (this.currentSeqIndex = e4), this.currentSeqState = "end", this.autoPlay && this.ctx.clock.setTimeout(() => {
|
|
31549
31620
|
this.handleNext();
|
|
31550
|
-
}), this.isMainSeq && this.ctx.eventHub.emit(
|
|
31621
|
+
}), this.isMainSeq && this.ctx.eventHub.emit($R.mainSeqStepEnd, e4);
|
|
31551
31622
|
}), this.commonTimeNode.on("timeNodeEndSync", () => {
|
|
31552
31623
|
this.isTimeNodeEndSync = true, this.commonTimeNode.resetForRepeat();
|
|
31553
31624
|
}), this.commonTimeNode.on("timeNodeDestroy", () => {
|
|
@@ -31564,13 +31635,13 @@ void main(void){
|
|
|
31564
31635
|
return this._currentSeqIndex;
|
|
31565
31636
|
}
|
|
31566
31637
|
set currentSeqIndex(t3) {
|
|
31567
|
-
this._currentSeqIndex = t3, this.isMainSeq ? this.ctx.eventHub.emit(
|
|
31638
|
+
this._currentSeqIndex = t3, this.isMainSeq ? this.ctx.eventHub.emit($R.mainSeqStepChange, t3) : this.isInteractiveSeq && this.ctx.eventHub.emit($R.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: t3, state: this._currentSeqState } });
|
|
31568
31639
|
}
|
|
31569
31640
|
get currentSeqState() {
|
|
31570
31641
|
return this._currentSeqState;
|
|
31571
31642
|
}
|
|
31572
31643
|
set currentSeqState(t3) {
|
|
31573
|
-
this._currentSeqState = t3, this.isMainSeq ? this.ctx.eventHub.emit(
|
|
31644
|
+
this._currentSeqState = t3, this.isMainSeq ? this.ctx.eventHub.emit($R.mainSeqStateChange, t3) : this.isInteractiveSeq && this.ctx.eventHub.emit($R.interactiveSeqStateChange, { id: this.json.ctn.id, state: { step: this._currentSeqIndex, state: t3 } });
|
|
31574
31645
|
}
|
|
31575
31646
|
get stepLength() {
|
|
31576
31647
|
return this.commonTimeNode.children.length;
|
|
@@ -31605,9 +31676,9 @@ void main(void){
|
|
|
31605
31676
|
if (t4) {
|
|
31606
31677
|
t4.interactiveContainer.interactive = true, t4.interactiveContainer.cursor = "pointer";
|
|
31607
31678
|
const n3 = () => {
|
|
31608
|
-
this.ctx.eventHub.emit(
|
|
31679
|
+
this.ctx.eventHub.emit($R.userInput);
|
|
31609
31680
|
const t5 = `shape ${e3} onClick`, { mode: n4 } = this.ctx;
|
|
31610
|
-
n4 !== "interactive" && n4 !== "sync" || this.ctx.eventHub.emit(
|
|
31681
|
+
n4 !== "interactive" && n4 !== "sync" || this.ctx.eventHub.emit($R.interactiveSeqAction, { action: t5, seqId: this.json.ctn.id }), n4 !== "sync" && n4 !== "local" || this.globalEventHub.emit(t5);
|
|
31611
31682
|
};
|
|
31612
31683
|
t4.interactiveContainer.on("pointerdown", n3), this.interactiveListeners.push([t4, n3]);
|
|
31613
31684
|
}
|
|
@@ -31628,7 +31699,7 @@ void main(void){
|
|
|
31628
31699
|
this.currentSeqIndex = n3, this.currentSeqState = e3 === "start" ? "idle" : "end";
|
|
31629
31700
|
}
|
|
31630
31701
|
}
|
|
31631
|
-
function
|
|
31702
|
+
function nR(t3, e3, n3) {
|
|
31632
31703
|
const i3 = e3.split(".");
|
|
31633
31704
|
i3.reduce((r3, o2, s3) => {
|
|
31634
31705
|
if (r3)
|
|
@@ -31636,7 +31707,7 @@ void main(void){
|
|
|
31636
31707
|
console.warn(`${t3} not support ${e3}`);
|
|
31637
31708
|
}, t3);
|
|
31638
31709
|
}
|
|
31639
|
-
function
|
|
31710
|
+
function iR(t3, e3) {
|
|
31640
31711
|
if (!e3)
|
|
31641
31712
|
return null;
|
|
31642
31713
|
return e3.split(".").reduce((n3, i3) => {
|
|
@@ -31645,7 +31716,7 @@ void main(void){
|
|
|
31645
31716
|
console.warn(`${t3} not support ${e3}`);
|
|
31646
31717
|
}, t3);
|
|
31647
31718
|
}
|
|
31648
|
-
class
|
|
31719
|
+
class rR {
|
|
31649
31720
|
constructor(t3) {
|
|
31650
31721
|
this.timingTarget = null, this.runtimeNodeEventHub = new a.a(), this.basicOnTimeNodeEnd = () => {
|
|
31651
31722
|
if (this.isConflict) {
|
|
@@ -31663,29 +31734,29 @@ void main(void){
|
|
|
31663
31734
|
}
|
|
31664
31735
|
};
|
|
31665
31736
|
const { isIterate: e3, isSub: n3, json: i3, ctx: r3, parent: o2, eventHub: s3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t3;
|
|
31666
|
-
this.json = i3, this.id = i3.cBhvr.ctn.id, this.ctx = r3, this.globalEventHub = s3, this.commonTimeNode = new
|
|
31737
|
+
this.json = i3, this.id = i3.cBhvr.ctn.id, this.ctx = r3, this.globalEventHub = s3, this.commonTimeNode = new PR({ json: i3.cBhvr.ctn, isSub: n3, eventHubs: { global: s3, runtime: this.runtimeNodeEventHub }, ctx: r3, parent: o2, isIterate: e3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.timingTarget = this.ctx.timingTargets.getTarget(i3.cBhvr.target, e3, { type: l2, index: u2, id: h2 }), this.commonTimeNode.on("seekToStart", () => this.onSeekToStart()), this.commonTimeNode.on("seekToEnd", () => this.onSeekToEnd()), this.commonTimeNode.on("timelineStart", this.basicOnTimeLineStart), this.commonTimeNode.on("timeNodeEnd", this.basicOnTimeNodeEnd);
|
|
31667
31738
|
}
|
|
31668
31739
|
getTargetId(t3) {
|
|
31669
31740
|
let e3 = t3.id;
|
|
31670
31741
|
return t3.type === "shape" && t3.txEl && (e3 = `${e3}-txEl-${t3.txEl.range[0]}`), this.commonTimeNode.isIterate && (e3 = `${e3}-iterate-${this.commonTimeNode.iterateIndex}`), e3;
|
|
31671
31742
|
}
|
|
31672
31743
|
}
|
|
31673
|
-
class
|
|
31744
|
+
class oR extends rR {
|
|
31674
31745
|
constructor(t3) {
|
|
31675
31746
|
super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.startVal = null, this.updateStartValue = () => {
|
|
31676
|
-
this.timingTarget && (this.startVal =
|
|
31747
|
+
this.timingTarget && (this.startVal = iR(this.timingTarget, this.json.cBhvr.attrList[0]));
|
|
31677
31748
|
}, this.onSeekToStart = () => {
|
|
31678
31749
|
const t4 = this.json.cBhvr.attrList[0];
|
|
31679
|
-
this.startVal !== null && this.timingTarget &&
|
|
31750
|
+
this.startVal !== null && this.timingTarget && nR(this.timingTarget, t4, this.startVal);
|
|
31680
31751
|
}, this.onSeekToEnd = () => {
|
|
31681
31752
|
const t4 = this.json.cBhvr.attrList[0], e3 = this.json.cBhvr.to || this.json.to;
|
|
31682
|
-
e3 && this.timingTarget &&
|
|
31753
|
+
e3 && this.timingTarget && nR(this.timingTarget, t4, e3);
|
|
31683
31754
|
}, this.commonTimeNode.on("timeNodeStart", this.updateStartValue), this.commonTimeNode.on("timeNodeCreate", this.updateStartValue), this.commonTimeNode.on("timeUpdate", ({ duration: t4, delta: e3 }) => {
|
|
31684
31755
|
if (e3 / t4 >= 1) {
|
|
31685
31756
|
const t5 = this.json.cBhvr.attrList[0];
|
|
31686
31757
|
this.json.cBhvr.attrList.length > 1 && console.warn("this.json.cBhvr.attrList.length > 0");
|
|
31687
31758
|
const e4 = this.json.cBhvr.to || this.json.to;
|
|
31688
|
-
e4 && this.timingTarget &&
|
|
31759
|
+
e4 && this.timingTarget && nR(this.timingTarget, t5, e4);
|
|
31689
31760
|
}
|
|
31690
31761
|
});
|
|
31691
31762
|
}
|
|
@@ -31693,7 +31764,7 @@ void main(void){
|
|
|
31693
31764
|
return this.json.cBhvr.attrList[0];
|
|
31694
31765
|
}
|
|
31695
31766
|
}
|
|
31696
|
-
var
|
|
31767
|
+
var sR = function(t3, e3, n3, i3) {
|
|
31697
31768
|
var r3, o2 = arguments.length, s3 = o2 < 3 ? e3 : i3 === null ? i3 = Object.getOwnPropertyDescriptor(e3, n3) : i3;
|
|
31698
31769
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
31699
31770
|
s3 = Reflect.decorate(t3, e3, n3, i3);
|
|
@@ -31702,7 +31773,7 @@ void main(void){
|
|
|
31702
31773
|
(r3 = t3[a2]) && (s3 = (o2 < 3 ? r3(s3) : o2 > 3 ? r3(e3, n3, s3) : r3(e3, n3)) || s3);
|
|
31703
31774
|
return o2 > 3 && s3 && Object.defineProperty(e3, n3, s3), s3;
|
|
31704
31775
|
};
|
|
31705
|
-
class
|
|
31776
|
+
class aR {
|
|
31706
31777
|
constructor(t3, e3) {
|
|
31707
31778
|
this.math = { pi: Math.PI, e: Math.E, abs: Math.abs, acos: Math.acos, asin: Math.asin, atan: Math.atan, ceil: Math.ceil, cos: Math.cos, cosh: Math.cosh, deg: (t4) => t4 / Math.PI * 180, exp: Math.exp, floor: Math.floor, ln: Math.log, max: Math.max, min: Math.min, rad: (t4) => t4 / 180 * Math.PI, rand: Math.random, sin: Math.sin, sinh: Math.sinh, sqrt: Math.sqrt, tan: Math.tan, tanh: Math.tanh }, this.timingTarget = e3, this.val = t3.val.value, this.time = t3.time, t3.fmla && (this.fmla = this.parseFmla(t3.fmla));
|
|
31708
31779
|
}
|
|
@@ -31714,7 +31785,7 @@ void main(void){
|
|
|
31714
31785
|
}), new Function("vars", "math", "$", "return " + e3);
|
|
31715
31786
|
}
|
|
31716
31787
|
}
|
|
31717
|
-
class
|
|
31788
|
+
class lR extends aR {
|
|
31718
31789
|
constructor(t3, e3, n3) {
|
|
31719
31790
|
super(t3, e3), this.value = t3.val.value, n3 && (this.fmla = this.parseFmla(n3));
|
|
31720
31791
|
}
|
|
@@ -31726,8 +31797,8 @@ void main(void){
|
|
|
31726
31797
|
return t3.fmla ? t3.fmla(n3, this.math, r3) : r3;
|
|
31727
31798
|
}
|
|
31728
31799
|
}
|
|
31729
|
-
|
|
31730
|
-
class
|
|
31800
|
+
sR([YE()], lR.prototype, "interpolationFrom", null);
|
|
31801
|
+
class uR extends aR {
|
|
31731
31802
|
constructor(t3, e3) {
|
|
31732
31803
|
var n3;
|
|
31733
31804
|
super(t3, e3), this.value = (n3 = t3.val) === null || n3 === void 0 ? void 0 : n3.value;
|
|
@@ -31740,8 +31811,8 @@ void main(void){
|
|
|
31740
31811
|
return this.value || "";
|
|
31741
31812
|
}
|
|
31742
31813
|
}
|
|
31743
|
-
|
|
31744
|
-
class
|
|
31814
|
+
sR([YE()], uR.prototype, "interpolationFrom", null);
|
|
31815
|
+
class hR extends aR {
|
|
31745
31816
|
constructor(t3, e3) {
|
|
31746
31817
|
super(t3, e3), this.fn = this.parseFmla(this.val);
|
|
31747
31818
|
}
|
|
@@ -31753,8 +31824,8 @@ void main(void){
|
|
|
31753
31824
|
return t3.fmla ? t3.fmla(n3, this.math, r3) : r3;
|
|
31754
31825
|
}
|
|
31755
31826
|
}
|
|
31756
|
-
|
|
31757
|
-
class
|
|
31827
|
+
sR([YE()], hR.prototype, "interpolationFrom", null);
|
|
31828
|
+
class cR extends aR {
|
|
31758
31829
|
constructor(t3, e3) {
|
|
31759
31830
|
super(t3, e3), this.value = t3.val.value;
|
|
31760
31831
|
}
|
|
@@ -31765,11 +31836,11 @@ void main(void){
|
|
|
31765
31836
|
return this.value;
|
|
31766
31837
|
}
|
|
31767
31838
|
}
|
|
31768
|
-
|
|
31769
|
-
class
|
|
31839
|
+
sR([YE()], cR.prototype, "interpolationFrom", null);
|
|
31840
|
+
class dR extends rR {
|
|
31770
31841
|
constructor(t3) {
|
|
31771
31842
|
super(t3), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.vars = { ppt_x: 0, ppt_y: 0, ppt_w: 0, ppt_h: 0 }, this.keyFrames = [], this.isColorAnim = false, this.onTimeNodeStart = () => {
|
|
31772
|
-
this.timingTarget && (this.startVal =
|
|
31843
|
+
this.timingTarget && (this.startVal = iR(this.timingTarget, this.json.cBhvr.attrList[0]));
|
|
31773
31844
|
}, this.updateVars = () => {
|
|
31774
31845
|
var t4, e3, n3, i3;
|
|
31775
31846
|
((t4 = this.timingTarget) === null || t4 === void 0 ? void 0 : t4.ppt_h) && (this.vars.ppt_h = this.timingTarget.ppt_h), ((e3 = this.timingTarget) === null || e3 === void 0 ? void 0 : e3.ppt_w) && (this.vars.ppt_w = this.timingTarget.ppt_w), ((n3 = this.timingTarget) === null || n3 === void 0 ? void 0 : n3.ppt_x) && (this.vars.ppt_x = this.timingTarget.ppt_x), ((i3 = this.timingTarget) === null || i3 === void 0 ? void 0 : i3.ppt_y) && (this.vars.ppt_y = this.timingTarget.ppt_y), this.isColorAnim;
|
|
@@ -31777,12 +31848,12 @@ void main(void){
|
|
|
31777
31848
|
const n3 = e3 / t4, i3 = this.keyFrames.findIndex((t5) => n3 <= t5[0]), { attrList: r3 } = this.json.cBhvr;
|
|
31778
31849
|
if (i3 < 0) {
|
|
31779
31850
|
const t5 = this.keyFrames[this.keyFrames.length - 1];
|
|
31780
|
-
return void (this.timingTarget && r3 && r3[0] &&
|
|
31851
|
+
return void (this.timingTarget && r3 && r3[0] && nR(this.timingTarget, r3[0], t5[1].resolveValue(this.vars)));
|
|
31781
31852
|
}
|
|
31782
31853
|
const o2 = i3 - 1, s3 = this.keyFrames[i3], a2 = this.keyFrames[o2] || s3, l2 = s3[0] - a2[0] == 0 ? 1 : (n3 - a2[0]) / (s3[0] - a2[0]), u2 = s3[1].interpolationFrom(a2[1], l2, this.vars);
|
|
31783
|
-
this.timingTarget && r3 && r3[0] &&
|
|
31854
|
+
this.timingTarget && r3 && r3[0] && nR(this.timingTarget, r3[0], u2);
|
|
31784
31855
|
}, this.onSeekToStart = () => {
|
|
31785
|
-
this.startVal !== null && this.timingTarget &&
|
|
31856
|
+
this.startVal !== null && this.timingTarget && nR(this.timingTarget, this.json.cBhvr.attrList[0], this.startVal);
|
|
31786
31857
|
}, this.onSeekToEnd = () => {
|
|
31787
31858
|
this.onTimeUpdate({ duration: 1, delta: 1, isReverse: false });
|
|
31788
31859
|
}, this.initKeyFrames(), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate), this.commonTimeNode.on("timelineStart", this.updateVars), this.commonTimeNode.on("timeNodeStart", this.onTimeNodeStart), this.commonTimeNode.on("timeNodeCreate", this.onTimeNodeStart);
|
|
@@ -31798,24 +31869,24 @@ void main(void){
|
|
|
31798
31869
|
if (this.json.from || this.startVal) {
|
|
31799
31870
|
const t5 = { time: 0, val: { type: "string", value: this.json.from || this.startVal.toString() }, fmla: "" };
|
|
31800
31871
|
if (e3 === "num" && this.timingTarget) {
|
|
31801
|
-
const e4 = new
|
|
31872
|
+
const e4 = new hR(t5, this.timingTarget);
|
|
31802
31873
|
this.keyFrames.push([t5.time, e4]);
|
|
31803
31874
|
}
|
|
31804
31875
|
}
|
|
31805
31876
|
const t4 = { time: 1, val: { type: "string", value: this.json.to }, fmla: "" };
|
|
31806
31877
|
if (e3 === "num" && this.timingTarget) {
|
|
31807
|
-
const e4 = new
|
|
31878
|
+
const e4 = new hR(t4, this.timingTarget);
|
|
31808
31879
|
this.keyFrames.push([t4.time, e4]);
|
|
31809
31880
|
}
|
|
31810
31881
|
} else if (this.json.by) {
|
|
31811
31882
|
const n3 = { time: 0, val: { type: "string", value: this.json.cBhvr.attrList[0] }, fmla: "" };
|
|
31812
31883
|
if (e3 === "num" && this.timingTarget) {
|
|
31813
|
-
const t4 = new
|
|
31884
|
+
const t4 = new hR(n3, this.timingTarget);
|
|
31814
31885
|
this.keyFrames.push([n3.time, t4]);
|
|
31815
31886
|
}
|
|
31816
31887
|
const i3 = { time: 1, val: { type: "string", value: (((t3 = n3.val) === null || t3 === void 0 ? void 0 : t3.value) || "") + "+" + this.json.by }, fmla: "" };
|
|
31817
31888
|
if (e3 === "num" && this.timingTarget) {
|
|
31818
|
-
const t4 = new
|
|
31889
|
+
const t4 = new hR(i3, this.timingTarget);
|
|
31819
31890
|
this.keyFrames.push([i3.time, t4]);
|
|
31820
31891
|
}
|
|
31821
31892
|
}
|
|
@@ -31824,15 +31895,15 @@ void main(void){
|
|
|
31824
31895
|
for (const t4 of this.json.tavLst)
|
|
31825
31896
|
if (t4.val && this.timingTarget) {
|
|
31826
31897
|
let n3 = null;
|
|
31827
|
-
t4.val.type === "string" ? e3 === "num" ? n3 = new
|
|
31898
|
+
t4.val.type === "string" ? e3 === "num" ? n3 = new hR(t4, this.timingTarget) : e3 === "str" && (n3 = new uR(t4, this.timingTarget)) : t4.val.type === "number" ? n3 = new lR(t4, this.timingTarget) : t4.val.type === "color" ? (this.isColorAnim = true, n3 = new cR(t4, this.timingTarget)) : t4.val.type === "boolean" && console.warn("not implements"), n3 && this.keyFrames.push([t4.time, n3]);
|
|
31828
31899
|
}
|
|
31829
31900
|
}
|
|
31830
31901
|
}
|
|
31831
31902
|
}
|
|
31832
|
-
var
|
|
31833
|
-
class
|
|
31903
|
+
var pR = n2(50), fR = n2.n(pR), mR = n2(51), gR = n2.n(mR);
|
|
31904
|
+
class vR extends Gx {
|
|
31834
31905
|
constructor() {
|
|
31835
|
-
super(
|
|
31906
|
+
super(gR.a, fR.a, { percent: 0, direction: 1, transition: 0 });
|
|
31836
31907
|
}
|
|
31837
31908
|
set transition(t3) {
|
|
31838
31909
|
this.uniforms.transition = t3;
|
|
@@ -31844,10 +31915,10 @@ void main(void){
|
|
|
31844
31915
|
this.uniforms.direction = t3;
|
|
31845
31916
|
}
|
|
31846
31917
|
}
|
|
31847
|
-
var
|
|
31848
|
-
class
|
|
31918
|
+
var _R = n2(52), yR = n2.n(_R);
|
|
31919
|
+
class xR extends Gx {
|
|
31849
31920
|
constructor() {
|
|
31850
|
-
super(void 0,
|
|
31921
|
+
super(void 0, yR.a, { percent: 0, transition: 1 });
|
|
31851
31922
|
}
|
|
31852
31923
|
set transition(t3) {
|
|
31853
31924
|
this.uniforms.transition = Math.pow(t3, t3);
|
|
@@ -31856,7 +31927,7 @@ void main(void){
|
|
|
31856
31927
|
this.uniforms.percent = t3;
|
|
31857
31928
|
}
|
|
31858
31929
|
}
|
|
31859
|
-
class
|
|
31930
|
+
class bR extends rR {
|
|
31860
31931
|
constructor(t3) {
|
|
31861
31932
|
var e3;
|
|
31862
31933
|
super(t3), this.filterType = "", this.isConflict = true, this.activeWhenConflict = "prev", this.onTimeUpdate = ({ duration: t4, delta: e4 }) => {
|
|
@@ -31877,10 +31948,10 @@ void main(void){
|
|
|
31877
31948
|
if (i3) {
|
|
31878
31949
|
const t4 = i3[1], e4 = i3[3];
|
|
31879
31950
|
if (t4 === "wipe") {
|
|
31880
|
-
const n4 = new
|
|
31951
|
+
const n4 = new vR();
|
|
31881
31952
|
e4 === "up" ? n4.direction = 1 : e4 === "down" ? n4.direction = 2 : e4 === "left" ? n4.direction = 3 : e4 === "right" && (n4.direction = 4), this.filter = n4, this.filterType = `${t4}-${e4}`;
|
|
31882
31953
|
} else if (t4 === "fade") {
|
|
31883
|
-
const e5 = new
|
|
31954
|
+
const e5 = new xR();
|
|
31884
31955
|
this.filter = e5, this.filterType = "" + t4;
|
|
31885
31956
|
}
|
|
31886
31957
|
this.filter && (this.filter.transition = n3);
|
|
@@ -31890,7 +31961,7 @@ void main(void){
|
|
|
31890
31961
|
return this.filterType;
|
|
31891
31962
|
}
|
|
31892
31963
|
}
|
|
31893
|
-
class
|
|
31964
|
+
class TR extends rR {
|
|
31894
31965
|
constructor(t3) {
|
|
31895
31966
|
super(t3), this.isConflict = true, this.activeWhenConflict = "next", this.startPos = null, this.onTimeNodeStart = () => {
|
|
31896
31967
|
var t4, e3;
|
|
@@ -31943,7 +32014,7 @@ void main(void){
|
|
|
31943
32014
|
this.path = e3;
|
|
31944
32015
|
}
|
|
31945
32016
|
}
|
|
31946
|
-
class
|
|
32017
|
+
class wR extends rR {
|
|
31947
32018
|
constructor(t3) {
|
|
31948
32019
|
super(t3), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.onTimelineStart = (t4) => {
|
|
31949
32020
|
t4.isReverse || this.updateCurrentValue();
|
|
@@ -31973,34 +32044,34 @@ void main(void){
|
|
|
31973
32044
|
this.timingTarget && (this.current = { x: this.timingTarget.scale.x, y: this.timingTarget.scale.y });
|
|
31974
32045
|
}
|
|
31975
32046
|
}
|
|
31976
|
-
class
|
|
32047
|
+
class SR extends rR {
|
|
31977
32048
|
constructor(t3) {
|
|
31978
32049
|
super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.isTimelineStart = false, this.startColorString = null, this.currentColorString = "#FFFFFFFF", this.onTimelineStart = (t4) => {
|
|
31979
32050
|
if (this.isTimelineStart)
|
|
31980
32051
|
return;
|
|
31981
32052
|
this.isTimelineStart = true, t4.isReverse || this.updateCurrentValue(), this.from.isInit() || this.from.fromHexString(this.currentColorString), this.to.isInit() || this.from.by(this.by, this.to);
|
|
31982
32053
|
const [e3] = this.json.cBhvr.attrList[0].split(".");
|
|
31983
|
-
|
|
32054
|
+
nR(this.timingTarget, e3 + ".on", "true");
|
|
31984
32055
|
}, this.onTimeNodeEnd = () => {
|
|
31985
32056
|
if (this.json.cBhvr.ctn.fill === "remove") {
|
|
31986
32057
|
const [t4] = this.json.cBhvr.attrList[0].split(".");
|
|
31987
|
-
|
|
32058
|
+
nR(this.timingTarget, t4 + ".on", "false");
|
|
31988
32059
|
}
|
|
31989
32060
|
this.isTimelineStart = false;
|
|
31990
32061
|
}, this.onSeekToStart = () => {
|
|
31991
32062
|
var t4;
|
|
31992
32063
|
if (this.timingTarget && (this.onTimeUpdate({ duration: 1, delta: 0 }), ((t4 = this.timingTarget.fill) === null || t4 === void 0 ? void 0 : t4.designColor.toUpperCase()) === this.from.toHexString().toUpperCase())) {
|
|
31993
32064
|
const [t5] = this.json.cBhvr.attrList[0].split(".");
|
|
31994
|
-
|
|
32065
|
+
nR(this.timingTarget, t5 + ".on", "false");
|
|
31995
32066
|
}
|
|
31996
32067
|
}, this.onTimeNodeStart = () => {
|
|
31997
32068
|
if (this.timingTarget) {
|
|
31998
|
-
const t4 =
|
|
32069
|
+
const t4 = iR(this.timingTarget, this.json.cBhvr.attrList[0]);
|
|
31999
32070
|
t4 && (this.startColorString = t4);
|
|
32000
32071
|
}
|
|
32001
32072
|
}, this.onTimeUpdate = ({ delta: t4, duration: e3 }) => {
|
|
32002
32073
|
const n3 = t4 / e3;
|
|
32003
|
-
this.to.interpolationFrom(this.from, n3, this.target), this.timingTarget &&
|
|
32074
|
+
this.to.interpolationFrom(this.from, n3, this.target), this.timingTarget && nR(this.timingTarget, this.json.cBhvr.attrList[0], this.target.toHexString());
|
|
32004
32075
|
}, this.onSeekToEnd = () => {
|
|
32005
32076
|
this.isTimelineStart || this.onTimelineStart({ isReverse: false, activeCount: 0, id: "" }), this.onTimeUpdate({ duration: 1, delta: 1 });
|
|
32006
32077
|
}, this.json.clrSpc === "rgb" ? (this.from = new IM(this.json.from), this.to = new IM(this.json.to), this.by = new IM(this.json.by), this.target = new IM()) : (this.from = new CM(this.json.from), this.to = new CM(this.json.to), this.by = new CM(this.json.by), this.target = new CM()), this.commonTimeNode.on("timeNodeStart", this.onTimeNodeStart), this.commonTimeNode.on("timeNodeCreate", this.onTimeNodeStart), this.commonTimeNode.on("timelineStart", this.onTimelineStart), this.commonTimeNode.on("timeNodeEnd", this.onTimeNodeEnd), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate);
|
|
@@ -32010,12 +32081,12 @@ void main(void){
|
|
|
32010
32081
|
}
|
|
32011
32082
|
updateCurrentValue() {
|
|
32012
32083
|
if (this.timingTarget) {
|
|
32013
|
-
const t3 =
|
|
32084
|
+
const t3 = iR(this.timingTarget, this.json.cBhvr.attrList[0]);
|
|
32014
32085
|
t3 && (this.currentColorString = t3);
|
|
32015
32086
|
}
|
|
32016
32087
|
}
|
|
32017
32088
|
}
|
|
32018
|
-
class
|
|
32089
|
+
class ER extends rR {
|
|
32019
32090
|
constructor(t3) {
|
|
32020
32091
|
super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.startVal = null, this.lastVal = null, this.onTimelineStart = (t4) => {
|
|
32021
32092
|
this.lastVal = null, t4.isReverse || this.updateCurrentValue();
|
|
@@ -32048,7 +32119,7 @@ void main(void){
|
|
|
32048
32119
|
this.currentVal = (t3 = this.timingTarget) === null || t3 === void 0 ? void 0 : t3.r;
|
|
32049
32120
|
}
|
|
32050
32121
|
}
|
|
32051
|
-
class
|
|
32122
|
+
class MR extends rR {
|
|
32052
32123
|
constructor(t3) {
|
|
32053
32124
|
super(t3), this.isConflict = false, this.activeWhenConflict = "next", this.isApplied = false, this.onTimeUpdate = () => {
|
|
32054
32125
|
var t4, e3;
|
|
@@ -32069,7 +32140,7 @@ void main(void){
|
|
|
32069
32140
|
return ((e3 = (t3 = this.json) === null || t3 === void 0 ? void 0 : t3.cmd) !== null && e3 !== void 0 ? e3 : "") + ((i3 = (n3 = this.json) === null || n3 === void 0 ? void 0 : n3.cmdType) !== null && i3 !== void 0 ? i3 : "");
|
|
32070
32141
|
}
|
|
32071
32142
|
}
|
|
32072
|
-
class
|
|
32143
|
+
class AR {
|
|
32073
32144
|
constructor(t3) {
|
|
32074
32145
|
this.runtimeNodeEventHub = new a.a(), this.stopAudio = () => {
|
|
32075
32146
|
this.audio.stop();
|
|
@@ -32077,14 +32148,14 @@ void main(void){
|
|
|
32077
32148
|
this.stopAudio(), this.audio.destroy(), this.ctx.activeMedia.delete(this.audio);
|
|
32078
32149
|
};
|
|
32079
32150
|
const { json: e3, isIterate: n3, isSub: i3, eventHub: r3, ctx: o2, parent: s3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t3;
|
|
32080
|
-
this.json = e3, this.id = e3.cMediaNode.ctn.id, this.commonTimeNode = new
|
|
32151
|
+
this.json = e3, this.id = e3.cMediaNode.ctn.id, this.commonTimeNode = new PR({ json: e3.cMediaNode.ctn, isSub: i3, eventHubs: { global: r3, runtime: this.runtimeNodeEventHub }, ctx: o2, parent: s3, isIterate: n3, iterateType: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 });
|
|
32081
32152
|
let d2 = e3.cMediaNode.tgtEl;
|
|
32082
|
-
o2.loaderDelegate && (d2 = o2.loaderDelegate.redirectMedia(d2), o2.logger.info(`redirect media url from ${e3.cMediaNode.tgtEl} to ${d2} by delegate.`, o2.taskId)), this.audio = new
|
|
32153
|
+
o2.loaderDelegate && (d2 = o2.loaderDelegate.redirectMedia(d2), o2.logger.info(`redirect media url from ${e3.cMediaNode.tgtEl} to ${d2} by delegate.`, o2.taskId)), this.audio = new XA(d2, o2.runningAudio), o2.activeMedia.add(this.audio), this.commonTimeNode.on("timelineStart", () => {
|
|
32083
32154
|
this.audio.play();
|
|
32084
32155
|
}), this.commonTimeNode.on("seekToStart", this.stopAudio), this.commonTimeNode.on("seekToEnd", this.stopAudio), this.commonTimeNode.on("timeNodeDestroy", this.destroy), this.ctx = o2;
|
|
32085
32156
|
}
|
|
32086
32157
|
}
|
|
32087
|
-
var
|
|
32158
|
+
var RR = function(t3, e3, n3, i3) {
|
|
32088
32159
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
32089
32160
|
function s3(t4) {
|
|
32090
32161
|
try {
|
|
@@ -32109,7 +32180,7 @@ void main(void){
|
|
|
32109
32180
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
32110
32181
|
});
|
|
32111
32182
|
};
|
|
32112
|
-
class
|
|
32183
|
+
class PR extends a.a {
|
|
32113
32184
|
constructor(t3) {
|
|
32114
32185
|
var e3, n3;
|
|
32115
32186
|
super(), this.uuid = Date.now().toString(32) + Math.random().toString(32).substring(2), this.isSub = false, this.isShadow = false, this.startCount = 0, this.applyCount = 0, this.isReverse = false, this.isConflictDispose = false, this.isIterateEnd = false, this.parentTimeNode = null, this.isActive = false, this.isDestroy = false, this.shouldSeekOnStart = false, this.repeatTimeoutId = "", this.iterateShadows = [], this.isEndEventsEmitted = false, this.tmFilter = [], this.timeDelta = 0, this.isIterate = false, this.iterateType = "el", this.iterateIndex = 0, this.children = [], this.subList = [], this.duration = 0, this.isNegativeSpeed = false, this.handleEndCond = () => {
|
|
@@ -32130,7 +32201,7 @@ void main(void){
|
|
|
32130
32201
|
const { isSub: i3, isIterate: r3, ctx: o2, eventHubs: s3, parent: a2, json: l2, iterateType: u2, iterateId: h2, iterateIndex: c2, isInInteractiveSeq: d2 } = t3;
|
|
32131
32202
|
this.isSub = i3, this.isInInteractiveSeq = d2, this.isIterate = r3, this.parentTimeNode = a2, this.json = l2, this.ctx = o2, this.iterateIndex = c2, this.eventHubs = s3, this.iterateType = u2, this.iterateId = h2, this.tmFilter = (n3 = (e3 = l2.tmFilter) === null || e3 === void 0 ? void 0 : e3.split(";").map((t4) => t4.split(",").map((t5) => parseFloat(t5.trim())))) !== null && n3 !== void 0 ? n3 : [];
|
|
32132
32203
|
const p2 = Number(this.json.dur), f2 = this.json.spd || 1;
|
|
32133
|
-
this.isNegativeSpeed = f2 < 0, Number.isNaN(p2) || (this.duration = p2 / Math.abs(f2)), this.uuid += "--" + this.json.id, this.setPreStyle(), l2.childTnLst && this.createChildren(l2.childTnLst), this.startConds = new
|
|
32204
|
+
this.isNegativeSpeed = f2 < 0, Number.isNaN(p2) || (this.duration = p2 / Math.abs(f2)), this.uuid += "--" + this.json.id, this.setPreStyle(), l2.childTnLst && this.createChildren(l2.childTnLst), this.startConds = new tR(this.json.id || "", l2.stCondLst, s3, this.ctx), this.endConds = new tR(this.json.id || "", l2.endCondLst, s3, this.ctx), l2.endSync && (this.endSync = new tR(this.json.id || "", [l2.endSync], s3, this.ctx), this.endSync.on("active", () => {
|
|
32134
32205
|
var t4;
|
|
32135
32206
|
this.json.nodeType === "interactiveSeq" && (this.isActive = false, this.shouldSeekOnStart = true, this.emit("timeNodeEndSync"), (t4 = this.endSync) === null || t4 === void 0 || t4.reset());
|
|
32136
32207
|
})), this.startConds.on("active", (t4) => {
|
|
@@ -32148,7 +32219,7 @@ void main(void){
|
|
|
32148
32219
|
n4 === t3 && (e3 = false, this.ctx.eventHub.removeListener("IterateTimeNodeEnd", i3));
|
|
32149
32220
|
};
|
|
32150
32221
|
for (this.ctx.eventHub.on("IterateTimeNodeEnd", i3); e3; ) {
|
|
32151
|
-
const e4 = JSON.parse(JSON.stringify(this.json)), i4 = new
|
|
32222
|
+
const e4 = JSON.parse(JSON.stringify(this.json)), i4 = new PR({ json: e4, isSub: false, eventHubs: this.eventHubs, ctx: this.ctx, parent: null, isIterate: true, iterateType: e4.iterate.type, iterateIndex: n3, iterateId: t3, isInInteractiveSeq: this.isInInteractiveSeq });
|
|
32152
32223
|
this.iterateShadows[n3] = i4, n3 += 1;
|
|
32153
32224
|
}
|
|
32154
32225
|
}
|
|
@@ -32164,7 +32235,7 @@ void main(void){
|
|
|
32164
32235
|
createTimeNode(t3, e3) {
|
|
32165
32236
|
let n3 = null;
|
|
32166
32237
|
const i3 = { json: t3, isSub: e3, isIterate: this.isIterate, eventHub: this.eventHubs.global, ctx: this.ctx, parent: this, iterateType: this.iterateType, iterateIndex: this.iterateIndex, iterateId: this.iterateId, isInInteractiveSeq: this.isInInteractiveSeq };
|
|
32167
|
-
return t3.type === "seq" ? n3 = new
|
|
32238
|
+
return t3.type === "seq" ? n3 = new eR(i3) : t3.type === "par" ? n3 = new CR(i3) : t3.type === "set" ? n3 = new oR(i3) : t3.type === "anim" ? n3 = new dR(i3) : t3.type === "animEffect" ? n3 = new bR(i3) : t3.type === "animMotion" ? n3 = new TR(i3) : t3.type === "animScale" ? n3 = new wR(i3) : t3.type === "animClr" ? n3 = new SR(i3) : t3.type === "animRot" ? n3 = new ER(i3) : t3.type === "cmd" ? n3 = new MR(i3) : t3.type === "audio" && (n3 = new AR(i3)), n3;
|
|
32168
32239
|
}
|
|
32169
32240
|
createSubList(t3) {
|
|
32170
32241
|
this.subList = [], t3.forEach((t4) => {
|
|
@@ -32225,7 +32296,7 @@ void main(void){
|
|
|
32225
32296
|
startReverseTimeLine() {
|
|
32226
32297
|
this.isEndEventsEmitted = false, this.timeDelta = 0;
|
|
32227
32298
|
const t3 = 1e3 / this.ctx.ticker.maxFPS;
|
|
32228
|
-
this.duration <= t3 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit(
|
|
32299
|
+
this.duration <= t3 && this.duration > 0 ? (this.emit("timeUpdate", { delta: this.duration, duration: this.duration, isReverse: this.isReverse }), this.ctx.eventHub.emit($R.animateEnd), this.ctx.ticker.remove(this.updateTimeLine)) : this.duration > t3 && (this.ctx.eventHub.emit($R.animateStart), this.ctx.ticker.add(this.updateTimeLine));
|
|
32229
32300
|
}
|
|
32230
32301
|
startTimeLine(t3 = true) {
|
|
32231
32302
|
if (t3 && (this.isEndEventsEmitted = false, this.eventHubs.global.emit(`time ${this.json.id} begin`), this.eventHubs.global.emit(`time ${this.json.id} onBegin`), this.eventHubs.runtime.emit(`runtime ${this.json.id} begin`)), this.json.iterate)
|
|
@@ -32234,10 +32305,10 @@ void main(void){
|
|
|
32234
32305
|
const e3 = 1e3 / this.ctx.ticker.maxFPS;
|
|
32235
32306
|
this.duration <= e3 && this.duration > 0 ? (this.timeDelta = this.isReverse ? 0 : this.duration, this.emit("timeUpdate", { delta: this.timeDelta, duration: this.duration, isReverse: this.isReverse }), this.emit("timelineEnd", { id: this.uuid, activeCount: this.applyCount, isReverse: this.isReverse }), this.ctx.ticker.addOnce(() => {
|
|
32236
32307
|
this.onTimeLineEnd();
|
|
32237
|
-
})) : this.duration > e3 && (this.ctx.eventHub.emit(
|
|
32308
|
+
})) : this.duration > e3 && (this.ctx.eventHub.emit($R.animateStart), this.updateTimeLine(0), this.ctx.ticker.add(this.updateTimeLine));
|
|
32238
32309
|
}
|
|
32239
32310
|
startIterate() {
|
|
32240
|
-
return
|
|
32311
|
+
return RR(this, void 0, void 0, function* () {
|
|
32241
32312
|
if (this.json.iterate) {
|
|
32242
32313
|
this.isIterateEnd = false;
|
|
32243
32314
|
for (const t3 of this.iterateShadows) {
|
|
@@ -32342,7 +32413,7 @@ void main(void){
|
|
|
32342
32413
|
});
|
|
32343
32414
|
}
|
|
32344
32415
|
dispose(t3 = false) {
|
|
32345
|
-
this.isConflictDispose = t3, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit(
|
|
32416
|
+
this.isConflictDispose = t3, this.ctx.clock.clearTimeout(this.repeatTimeoutId), this.ctx.eventHub.emit($R.animateEnd);
|
|
32346
32417
|
try {
|
|
32347
32418
|
this.ctx.ticker.remove(this.updateTimeLine);
|
|
32348
32419
|
} catch (t4) {
|
|
@@ -32378,11 +32449,11 @@ void main(void){
|
|
|
32378
32449
|
this.emit("timeNodeDestroy"), this.isDestroy = true, this.dispose(), this.startConds.removeAllListeners(), this.endConds.removeAllListeners(), this.children.forEach((t3) => t3.commonTimeNode.destroy()), this.clearSubList();
|
|
32379
32450
|
}
|
|
32380
32451
|
}
|
|
32381
|
-
class
|
|
32452
|
+
class CR extends a.a {
|
|
32382
32453
|
constructor(t3) {
|
|
32383
32454
|
super(), this.isRunning = false, this.runtimeNodeEventHub = new a.a();
|
|
32384
32455
|
const { json: e3, iterateType: n3, isIterate: i3, isSub: r3, parent: o2, ctx: s3, eventHub: l2, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 } = t3;
|
|
32385
|
-
this.id = e3.ctn.id, this.json = e3, this.ctx = s3, this.isIterate = i3, this.globalEventHub = l2, this.commonTimeNode = new
|
|
32456
|
+
this.id = e3.ctn.id, this.json = e3, this.ctx = s3, this.isIterate = i3, this.globalEventHub = l2, this.commonTimeNode = new PR({ json: e3.ctn, isSub: r3, eventHubs: { global: l2, runtime: this.runtimeNodeEventHub }, ctx: s3, parent: o2, isIterate: false, iterateType: n3, iterateIndex: u2, iterateId: h2, isInInteractiveSeq: c2 }), this.commonTimeNode.on("timeNodeStart", () => {
|
|
32386
32457
|
this.commonTimeNode.children.forEach((t4) => {
|
|
32387
32458
|
t4.commonTimeNode.setReverse(this.commonTimeNode.getReverse()), t4.commonTimeNode.startTimeNode();
|
|
32388
32459
|
}), this.isRunning || (this.isRunning = true, this.globalEventHub.emit(`runtime ${this.id} begin`), this.emit("begin"));
|
|
@@ -32395,7 +32466,7 @@ void main(void){
|
|
|
32395
32466
|
});
|
|
32396
32467
|
}
|
|
32397
32468
|
}
|
|
32398
|
-
var
|
|
32469
|
+
var IR = function(t3, e3, n3, i3) {
|
|
32399
32470
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
32400
32471
|
function s3(t4) {
|
|
32401
32472
|
try {
|
|
@@ -32420,11 +32491,11 @@ void main(void){
|
|
|
32420
32491
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
32421
32492
|
});
|
|
32422
32493
|
};
|
|
32423
|
-
class
|
|
32494
|
+
class OR {
|
|
32424
32495
|
constructor(t3, e3, n3) {
|
|
32425
32496
|
this.json = t3, this.ctx = n3, this.globalEventHub = e3;
|
|
32426
32497
|
const i3 = t3.timeNodeList.find((t4) => t4.type === "par" && t4.ctn.nodeType === "tmRoot");
|
|
32427
|
-
i3 && (this.tmRoot = new
|
|
32498
|
+
i3 && (this.tmRoot = new CR({ json: i3, isSub: false, isIterate: false, eventHub: e3, ctx: n3, parent: null, iterateType: "el", iterateIndex: 0, iterateId: "", isInInteractiveSeq: false }), this.mainSeq = this.tmRoot.commonTimeNode.children.find((t4) => {
|
|
32428
32499
|
var e4, n4, i4;
|
|
32429
32500
|
return ((e4 = t4.json) === null || e4 === void 0 ? void 0 : e4.type) === "seq" && ((i4 = (n4 = t4.json) === null || n4 === void 0 ? void 0 : n4.ctn) === null || i4 === void 0 ? void 0 : i4.nodeType) === "mainSeq";
|
|
32430
32501
|
}));
|
|
@@ -32438,7 +32509,7 @@ void main(void){
|
|
|
32438
32509
|
}
|
|
32439
32510
|
start() {
|
|
32440
32511
|
var t3, e3;
|
|
32441
|
-
return
|
|
32512
|
+
return IR(this, void 0, void 0, function* () {
|
|
32442
32513
|
this.json.autoPlayMainSeq ? (yield this.ctx.clock.delay(16), (t3 = this.mainSeq) === null || t3 === void 0 || t3.commonTimeNode.startTimeNode()) : (e3 = this.mainSeq) === null || e3 === void 0 || e3.commonTimeNode.startTimeNode();
|
|
32443
32514
|
});
|
|
32444
32515
|
}
|
|
@@ -32496,7 +32567,7 @@ void main(void){
|
|
|
32496
32567
|
this.globalEventHub.emit(t3);
|
|
32497
32568
|
}
|
|
32498
32569
|
}
|
|
32499
|
-
var
|
|
32570
|
+
var LR = function(t3, e3, n3, i3) {
|
|
32500
32571
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
32501
32572
|
function s3(t4) {
|
|
32502
32573
|
try {
|
|
@@ -32521,7 +32592,7 @@ void main(void){
|
|
|
32521
32592
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
32522
32593
|
});
|
|
32523
32594
|
};
|
|
32524
|
-
class
|
|
32595
|
+
class NR extends QA {
|
|
32525
32596
|
constructor(t3, e3, n3, i3) {
|
|
32526
32597
|
super({ id: "stage", width: t3.width, height: t3.height, type: "Container", children: t3.children }, e3, n3, void 0, i3), this.isRendered = false, this.isTimingStartValueCollected = false, this.json = t3, e3.hasBackgroundFillShape = this.detectUseBackgroundFill(this.json), this.container.visible = false, this.ctx = e3;
|
|
32527
32598
|
const r3 = new Aw();
|
|
@@ -32532,21 +32603,21 @@ void main(void){
|
|
|
32532
32603
|
}
|
|
32533
32604
|
initOnReuse() {
|
|
32534
32605
|
super.initOnReuse(), this.ctx.timingEventHub.on("c:prev slide", (t3) => {
|
|
32535
|
-
this.ctx.eventHub.emit(
|
|
32606
|
+
this.ctx.eventHub.emit($R.requestPrevSlide, t3);
|
|
32536
32607
|
}), this.ctx.timingEventHub.on("c:next slide", (t3) => {
|
|
32537
|
-
this.ctx.eventHub.emit(
|
|
32608
|
+
this.ctx.eventHub.emit($R.requestNextSlide, t3);
|
|
32538
32609
|
});
|
|
32539
32610
|
}
|
|
32540
32611
|
get interactiveContainer() {
|
|
32541
32612
|
return this.container;
|
|
32542
32613
|
}
|
|
32543
32614
|
render(t3) {
|
|
32544
|
-
this.isRendered || (this.isRendered = true, super.render(t3), t3.addSubMTask(() =>
|
|
32615
|
+
this.isRendered || (this.isRendered = true, super.render(t3), t3.addSubMTask(() => LR(this, void 0, void 0, function* () {
|
|
32545
32616
|
this.ctx.eventHub.emit("StageRenderEnd");
|
|
32546
32617
|
}), "@StageImpl[emit.StageRenderEnd]"));
|
|
32547
32618
|
}
|
|
32548
32619
|
createTiming() {
|
|
32549
|
-
this.json.timing && !this.timing && (this.timing = new
|
|
32620
|
+
this.json.timing && !this.timing && (this.timing = new OR(this.json.timing, this.ctx.timingEventHub, this.ctx));
|
|
32550
32621
|
}
|
|
32551
32622
|
startTiming() {
|
|
32552
32623
|
var t3;
|
|
@@ -32601,11 +32672,11 @@ void main(void){
|
|
|
32601
32672
|
}
|
|
32602
32673
|
nextStep(t3 = false) {
|
|
32603
32674
|
var e3;
|
|
32604
|
-
this.hasTiming() && ((e3 = this.timing) === null || e3 === void 0 ? void 0 : e3.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t3)) : this.ctx.eventHub.emit(
|
|
32675
|
+
this.hasTiming() && ((e3 = this.timing) === null || e3 === void 0 ? void 0 : e3.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onNext", t3)) : this.ctx.eventHub.emit($R.requestNextSlide, t3);
|
|
32605
32676
|
}
|
|
32606
32677
|
prevStep(t3 = false) {
|
|
32607
32678
|
var e3;
|
|
32608
|
-
this.hasTiming() && ((e3 = this.timing) === null || e3 === void 0 ? void 0 : e3.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t3)) : this.ctx.eventHub.emit(
|
|
32679
|
+
this.hasTiming() && ((e3 = this.timing) === null || e3 === void 0 ? void 0 : e3.hasMainSeq()) ? (this.ctx.timingEventHub.emit("shape slide onStopAudio"), this.ctx.timingEventHub.emit("shape slide onPrev", t3)) : this.ctx.eventHub.emit($R.requestPrevSlide, t3);
|
|
32609
32680
|
}
|
|
32610
32681
|
applyInteractiveAction(t3) {
|
|
32611
32682
|
var e3;
|
|
@@ -32620,7 +32691,7 @@ void main(void){
|
|
|
32620
32691
|
(i3 = this.timing) === null || i3 === void 0 || i3.setInteractiveSeqState(t3, e3, n3);
|
|
32621
32692
|
}
|
|
32622
32693
|
setMediaState(t3, e3) {
|
|
32623
|
-
return
|
|
32694
|
+
return LR(this, void 0, void 0, function* () {
|
|
32624
32695
|
const n3 = this.ctx.medias[t3];
|
|
32625
32696
|
n3 && (e3 ? yield n3.play() : yield n3.pause());
|
|
32626
32697
|
});
|
|
@@ -32630,7 +32701,7 @@ void main(void){
|
|
|
32630
32701
|
n3 && n3.seek(e3);
|
|
32631
32702
|
}
|
|
32632
32703
|
}
|
|
32633
|
-
class
|
|
32704
|
+
class DR {
|
|
32634
32705
|
constructor(t3) {
|
|
32635
32706
|
this.ticker = t3, this.tasks = [], this.couldRunning = false, this.applyNext = () => {
|
|
32636
32707
|
const t4 = this.tasks[0];
|
|
@@ -32653,7 +32724,7 @@ void main(void){
|
|
|
32653
32724
|
this.couldRunning = false;
|
|
32654
32725
|
}
|
|
32655
32726
|
}
|
|
32656
|
-
var
|
|
32727
|
+
var FR = function(t3, e3, n3, i3) {
|
|
32657
32728
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
32658
32729
|
function s3(t4) {
|
|
32659
32730
|
try {
|
|
@@ -32678,8 +32749,8 @@ void main(void){
|
|
|
32678
32749
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
32679
32750
|
});
|
|
32680
32751
|
};
|
|
32681
|
-
const
|
|
32682
|
-
class
|
|
32752
|
+
const BR = (t3) => new Promise((e3) => setTimeout(e3, t3));
|
|
32753
|
+
class UR extends a.a {
|
|
32683
32754
|
constructor(t3, e3, n3) {
|
|
32684
32755
|
super(), this.slideIndex = t3, this.taskId = e3, this.logger = n3, this.uuid = eM(), this.isCancel = false, this.tasks = [];
|
|
32685
32756
|
}
|
|
@@ -32711,10 +32782,10 @@ void main(void){
|
|
|
32711
32782
|
}));
|
|
32712
32783
|
}
|
|
32713
32784
|
applyAll() {
|
|
32714
|
-
return
|
|
32785
|
+
return FR(this, void 0, void 0, function* () {
|
|
32715
32786
|
for (; !this.tasks.every((t3) => t3.state === "finish"); )
|
|
32716
32787
|
if (this.tasks.some((t3) => t3.state === "running"))
|
|
32717
|
-
yield
|
|
32788
|
+
yield BR(16);
|
|
32718
32789
|
else {
|
|
32719
32790
|
if (this.tasks.some((t3) => t3.state === "error"))
|
|
32720
32791
|
return;
|
|
@@ -32741,16 +32812,16 @@ void main(void){
|
|
|
32741
32812
|
});
|
|
32742
32813
|
}
|
|
32743
32814
|
}
|
|
32744
|
-
var
|
|
32745
|
-
const
|
|
32815
|
+
var kR = n2(53);
|
|
32816
|
+
const GR = new (n2.n(kR)).a(), HR = GR.getDevice(), zR = GR.getBrowser(), jR = GR.getOS(), VR = { isDesktop() {
|
|
32746
32817
|
let t3 = true;
|
|
32747
|
-
return
|
|
32818
|
+
return HR.type === "mobile" && (t3 = false), /Samsung/.test(zR.name || "") && (t3 = false), window.__nativeTags && window.__nativeTags.platform && (t3 = false), t3;
|
|
32748
32819
|
}, isIOS() {
|
|
32749
32820
|
let t3 = false;
|
|
32750
|
-
return window.__nativeTags && window.__nativeTags.platform && /^ios/i.test(window.__nativeTags.platform) && (t3 = true),
|
|
32821
|
+
return window.__nativeTags && window.__nativeTags.platform && /^ios/i.test(window.__nativeTags.platform) && (t3 = true), jR.name && /iOS/.test(jR.name) && (t3 = true), t3;
|
|
32751
32822
|
}, isAndroid() {
|
|
32752
32823
|
let t3 = false;
|
|
32753
|
-
return window.__nativeTags && window.__nativeTags.platform && /^android/i.test(window.__nativeTags.platform) && (t3 = true),
|
|
32824
|
+
return window.__nativeTags && window.__nativeTags.platform && /^android/i.test(window.__nativeTags.platform) && (t3 = true), jR.name && /android/i.test(jR.name) && (t3 = true), t3;
|
|
32754
32825
|
}, isLowGpuMemory() {
|
|
32755
32826
|
var t3, e3;
|
|
32756
32827
|
const n3 = (e3 = (t3 = window.__nativeTags) === null || t3 === void 0 ? void 0 : t3.platform) !== null && e3 !== void 0 ? e3 : "";
|
|
@@ -32771,7 +32842,7 @@ void main(void){
|
|
|
32771
32842
|
}
|
|
32772
32843
|
return true;
|
|
32773
32844
|
} };
|
|
32774
|
-
var
|
|
32845
|
+
var WR = function(t3, e3, n3, i3) {
|
|
32775
32846
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
32776
32847
|
function s3(t4) {
|
|
32777
32848
|
try {
|
|
@@ -32796,23 +32867,23 @@ void main(void){
|
|
|
32796
32867
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
32797
32868
|
});
|
|
32798
32869
|
};
|
|
32799
|
-
class
|
|
32870
|
+
class XR {
|
|
32800
32871
|
constructor(t3, e3, n3, i3, r3, o2, s3, a2, l2, u2, h2, c2, d2) {
|
|
32801
|
-
this.loader = t3, this.mode = e3, this.renderer = n3, this.ticker = i3, this.view = r3, this.clock = o2, this.objPoolGroup = s3, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, this.currentStageIndex = 0, this.cacheCount =
|
|
32872
|
+
this.loader = t3, this.mode = e3, this.renderer = n3, this.ticker = i3, this.view = r3, this.clock = o2, this.objPoolGroup = s3, this.errorChannel = a2, this.localstorage = l2, this.logger = u2, this.loaderDelegate = h2, this.isPlayerPaused = c2, this.maxResolution = d2, this.currentStageIndex = 0, this.cacheCount = VR.isDesktop() ? 2 : 1, this.stageStates = /* @__PURE__ */ Object.create(null), this.stageJsons = /* @__PURE__ */ Object.create(null), this.stageCtxs = /* @__PURE__ */ Object.create(null), this.stageImpls = /* @__PURE__ */ Object.create(null), this.taskId = "", this.url = "", this.runningAudio = /* @__PURE__ */ new Map(), this.activeMedia = /* @__PURE__ */ new Set(), this.microTaskManager = new DR(i3);
|
|
32802
32873
|
}
|
|
32803
32874
|
setResourceData(t3, e3) {
|
|
32804
32875
|
this.taskId = t3, this.url = e3;
|
|
32805
32876
|
}
|
|
32806
32877
|
createCtx(t3) {
|
|
32807
32878
|
const { task: e3 } = this.stageStates[t3];
|
|
32808
|
-
e3.addMTask(() =>
|
|
32879
|
+
e3.addMTask(() => WR(this, void 0, void 0, function* () {
|
|
32809
32880
|
const e4 = new dM(this.loader), n3 = new a.a(), i3 = { taskId: this.taskId, mode: this.mode, renderer: this.renderer, graphicsTexture: new bM(), stageWidth: 0, stageHeight: 0, ticker: this.ticker, timingTargets: new wM(n3), eventHub: n3, view: this.view, medias: /* @__PURE__ */ Object.create(null), lastViewedIndex: 0, conflictTimeNodeManager: new TM(), clock: this.clock, spriteTexture: e4, slideIndex: t3, objectPoolGroup: this.objPoolGroup, hasBackgroundFillShape: false, slideScopeEventHub: new a.a(), logger: this.logger, loaderDelegate: this.loaderDelegate, runningAudio: this.runningAudio, activeMedia: this.activeMedia, isPlayerPaused: this.isPlayerPaused, timingEventHub: new a.a(), maxResolution: this.maxResolution };
|
|
32810
32881
|
this.stageCtxs[t3] = i3;
|
|
32811
32882
|
}), "@StagePool[createCtx]");
|
|
32812
32883
|
}
|
|
32813
32884
|
loadStageJson(t3) {
|
|
32814
32885
|
const { task: e3 } = this.stageStates[t3];
|
|
32815
|
-
e3.addMTask(() =>
|
|
32886
|
+
e3.addMTask(() => WR(this, void 0, void 0, function* () {
|
|
32816
32887
|
const e4 = yield this.loader.fetchJson(`${this.url}/${this.taskId}/jsonOutput/slide-${t3}.json`);
|
|
32817
32888
|
this.stageJsons[t3] = e4, this.stageCtxs[t3].stageWidth = e4.width, this.stageCtxs[t3].stageHeight = e4.height;
|
|
32818
32889
|
}), "@StagePool[loadStageJson]");
|
|
@@ -32837,7 +32908,7 @@ void main(void){
|
|
|
32837
32908
|
createStage(t3) {
|
|
32838
32909
|
const { task: e3 } = this.stageStates[t3];
|
|
32839
32910
|
e3.addMTask(() => {
|
|
32840
|
-
const n3 = this.stageJsons[t3], i3 = this.stageCtxs[t3], r3 = new
|
|
32911
|
+
const n3 = this.stageJsons[t3], i3 = this.stageCtxs[t3], r3 = new NR(n3, i3, { x: 0, y: 0 }, e3);
|
|
32841
32912
|
return this.stageImpls[t3] = r3, Promise.resolve();
|
|
32842
32913
|
}, "@StagePool[createStage]");
|
|
32843
32914
|
}
|
|
@@ -32847,7 +32918,7 @@ void main(void){
|
|
|
32847
32918
|
}
|
|
32848
32919
|
createGraphicsTexture(t3) {
|
|
32849
32920
|
const { task: e3 } = this.stageStates[t3];
|
|
32850
|
-
e3.addMTask(() =>
|
|
32921
|
+
e3.addMTask(() => WR(this, void 0, void 0, function* () {
|
|
32851
32922
|
const n3 = this.stageCtxs[t3];
|
|
32852
32923
|
n3.graphicsTexture.pack().forEach((t4, i3) => {
|
|
32853
32924
|
e3.addSubMTask(() => n3.graphicsTexture.render(t4, i3, this.objPoolGroup), "@StagePool[graphicsTexture.render]");
|
|
@@ -32856,12 +32927,12 @@ void main(void){
|
|
|
32856
32927
|
}
|
|
32857
32928
|
renderStage(t3) {
|
|
32858
32929
|
const { task: e3 } = this.stageStates[t3];
|
|
32859
|
-
e3.addMTask(() =>
|
|
32930
|
+
e3.addMTask(() => WR(this, void 0, void 0, function* () {
|
|
32860
32931
|
const n3 = this.stageImpls[t3], i3 = this.stageCtxs[t3];
|
|
32861
|
-
yield n3.render(e3), e3.addSubMTask(() =>
|
|
32932
|
+
yield n3.render(e3), e3.addSubMTask(() => WR(this, void 0, void 0, function* () {
|
|
32862
32933
|
var e4;
|
|
32863
32934
|
const r3 = `snapshot-${t3.toString()}-start`;
|
|
32864
|
-
if (!(yield (e4 = this.localstorage) === null || e4 === void 0 ? void 0 : e4.getItem(r3)) &&
|
|
32935
|
+
if (!(yield (e4 = this.localstorage) === null || e4 === void 0 ? void 0 : e4.getItem(r3)) && KR.platform.isLowGpuMemory()) {
|
|
32865
32936
|
n3.createTiming(), n3.container.visible = true, n3.collectMainSeqStartValue(), n3.setMainSeqStep(0, "start");
|
|
32866
32937
|
const t4 = Hy.create({ width: n3.json.width, height: n3.json.height, resolution: 1 });
|
|
32867
32938
|
i3.renderer.render(n3.container, { renderTexture: t4 });
|
|
@@ -32891,7 +32962,7 @@ void main(void){
|
|
|
32891
32962
|
preload(t3, e3 = false) {
|
|
32892
32963
|
if (this.stageImpls[t3] || this.stageStates[t3])
|
|
32893
32964
|
return Promise.resolve();
|
|
32894
|
-
const n3 = new
|
|
32965
|
+
const n3 = new UR(t3, this.taskId, this.logger);
|
|
32895
32966
|
return n3.on("task-error", (t4, e4) => {
|
|
32896
32967
|
delete this.stageStates[e4], delete this.stageImpls[e4], delete this.stageCtxs[e4], this.errorChannel.emit("error", t4, e4);
|
|
32897
32968
|
}), this.stageStates[t3] = { state: "load", task: n3 }, this.createCtx(t3), this.loadStageJson(t3), this.loadSpriteSheets(t3), this.createStage(t3), this.preRenderStage(t3), this.createGraphicsTexture(t3), this.renderStage(t3), this.microTaskManager.addTask(n3), e3 ? n3.applyAll() : new Promise((e4) => {
|
|
@@ -32905,7 +32976,7 @@ void main(void){
|
|
|
32905
32976
|
return this.stageJsons[t3] || null;
|
|
32906
32977
|
}
|
|
32907
32978
|
getStage(t3) {
|
|
32908
|
-
return
|
|
32979
|
+
return WR(this, void 0, void 0, function* () {
|
|
32909
32980
|
this.currentStageIndex = t3;
|
|
32910
32981
|
const e3 = this.stageStates[t3];
|
|
32911
32982
|
return (e3 == null ? void 0 : e3.state) === "finish" && this.stageImpls[t3] ? this.stageImpls[t3] : (e3 == null ? void 0 : e3.state) === "load" ? (yield e3.task.applyAll(), this.stageImpls[t3]) : (yield this.preload(t3, true), this.stageImpls[t3]);
|
|
@@ -32915,7 +32986,7 @@ void main(void){
|
|
|
32915
32986
|
this.runningAudio.clear();
|
|
32916
32987
|
}
|
|
32917
32988
|
}
|
|
32918
|
-
var
|
|
32989
|
+
var qR = function(t3, e3, n3, i3) {
|
|
32919
32990
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
32920
32991
|
function s3(t4) {
|
|
32921
32992
|
try {
|
|
@@ -32940,10 +33011,10 @@ void main(void){
|
|
|
32940
33011
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
32941
33012
|
});
|
|
32942
33013
|
};
|
|
32943
|
-
class
|
|
33014
|
+
class YR {
|
|
32944
33015
|
constructor(t3) {
|
|
32945
33016
|
var e3;
|
|
32946
|
-
this.logger = t3, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e3 =
|
|
33017
|
+
this.logger = t3, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e3 = YR.localCache) === null || e3 === void 0 || e3.ready(() => {
|
|
32947
33018
|
this.isIndexDBReady = true;
|
|
32948
33019
|
}).catch(() => {
|
|
32949
33020
|
t3.warn("local storage not ready", this.taskId);
|
|
@@ -32956,17 +33027,17 @@ void main(void){
|
|
|
32956
33027
|
this.taskId = t3;
|
|
32957
33028
|
}
|
|
32958
33029
|
getItem(t3) {
|
|
32959
|
-
return
|
|
33030
|
+
return qR(this, void 0, void 0, function* () {
|
|
32960
33031
|
let e3 = null;
|
|
32961
|
-
return this.couldUseIndexDBCache &&
|
|
33032
|
+
return this.couldUseIndexDBCache && YR.localCache && (e3 = yield iM(() => YR.localCache.getItem(`${this.taskId}/${t3}`), 500)), e3 = e3 === nM ? null : e3, e3 || this.memoryCache.get(t3) || null;
|
|
32962
33033
|
});
|
|
32963
33034
|
}
|
|
32964
33035
|
setItem(t3, e3, n3 = false) {
|
|
32965
|
-
return
|
|
33036
|
+
return qR(this, void 0, void 0, function* () {
|
|
32966
33037
|
if (!this.couldUseIndexDBCache)
|
|
32967
33038
|
return n3 && this.memoryCache.set(t3, e3), Promise.resolve();
|
|
32968
|
-
if (
|
|
32969
|
-
(yield iM(() =>
|
|
33039
|
+
if (YR.localCache) {
|
|
33040
|
+
(yield iM(() => YR.localCache.setItem(`${this.taskId}/${t3}`, e3).catch(() => {
|
|
32970
33041
|
n3 && this.memoryCache.set(t3, e3);
|
|
32971
33042
|
}), 500)) === nM && n3 && this.memoryCache.set(t3, e3);
|
|
32972
33043
|
}
|
|
@@ -32974,21 +33045,21 @@ void main(void){
|
|
|
32974
33045
|
}
|
|
32975
33046
|
dispose() {
|
|
32976
33047
|
var t3;
|
|
32977
|
-
this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t3 =
|
|
33048
|
+
this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t3 = YR.localCache) === null || t3 === void 0 || t3.keys().then((t4) => {
|
|
32978
33049
|
t4.filter((t5) => t5.indexOf(this.taskId) >= 0).forEach((t5) => {
|
|
32979
33050
|
var e3;
|
|
32980
|
-
(e3 =
|
|
33051
|
+
(e3 = YR.localCache) === null || e3 === void 0 || e3.removeItem(t5).catch(() => {
|
|
32981
33052
|
});
|
|
32982
33053
|
});
|
|
32983
33054
|
}));
|
|
32984
33055
|
}
|
|
32985
33056
|
}
|
|
32986
|
-
|
|
33057
|
+
YR.localCache = null;
|
|
32987
33058
|
try {
|
|
32988
|
-
|
|
33059
|
+
YR.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
|
|
32989
33060
|
} catch (t3) {
|
|
32990
33061
|
}
|
|
32991
|
-
var
|
|
33062
|
+
var ZR = function(t3, e3, n3, i3) {
|
|
32992
33063
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
32993
33064
|
function s3(t4) {
|
|
32994
33065
|
try {
|
|
@@ -33014,14 +33085,14 @@ void main(void){
|
|
|
33014
33085
|
});
|
|
33015
33086
|
};
|
|
33016
33087
|
r2.skipHello();
|
|
33017
|
-
const
|
|
33018
|
-
class
|
|
33088
|
+
const JR = { randomBar: "RandomLines", circle: "Shape", ripple: "Ripples", wipe: "Erase", dissolve: "Dissolve", morph: "Smooth", fade: "FadeInOut", push: "Push", split: "Separation", reveal: "Display", pull: "Uncover", cover: "Cover", flash: "Flash", checker: "Checkerboard", blinds: "WindowShades", curtains: "Curtain", fallOver: "Fall", drape: "Suspension", wheel: "Clock", comb: "Combing", warp: "Scale", peelOff: "PeelOff", flip: "Flip" }, $R = { mainSeqStepChange: "mainSeqStepChange", mainSeqStateChange: "mainSeqStateChange", interactiveSeqStateChange: "interactiveSeqStateChange", interactiveSeqAction: "interactiveSeqAction", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", slideChange: "slideChange", renderStart: "renderStart", renderEnd: "renderEnd", hyperlinkTrigger: "hyperlinkTrigger", animateStart: "animateStart", animateEnd: "animateEnd", mediaSeek: "mediaSeek", mediaPlay: "mediaPlay", mediaPause: "mediaPause", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide", userInput: "userInput" };
|
|
33089
|
+
class KR extends a.a {
|
|
33019
33090
|
constructor(t3, e3 = {}) {
|
|
33020
33091
|
super(), this.errorChannel = new a.a(), this.transactionPlayer = null, this.transactionSprite = new Ow(), this.isForward = true, this.drawCall = 0, this.scale = 1, this.prevSlideBase64 = null, this._isPaused = false, this.maxResolution = new v_(0, 0), this.fps = new XE(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
|
|
33021
33092
|
this.errorChannel.emit("error", new qE(VE.CanvasCrash, "webgl context lost."));
|
|
33022
|
-
}, this.logger = t3.logger, this.mode = t3.mode, this.localStorage = new
|
|
33093
|
+
}, this.logger = t3.logger, this.mode = t3.mode, this.localStorage = new YR(this.logger);
|
|
33023
33094
|
let n3 = Math.max(window.devicePixelRatio, 2);
|
|
33024
|
-
|
|
33095
|
+
VR.isDesktop() || (n3 = 1), this.config = { minFPS: Object(l.isUndefined)(e3.minFPS) ? 30 : e3.minFPS, maxFPS: Object(l.isUndefined)(e3.maxFPS) ? 40 : e3.maxFPS, resolution: Object(l.isUndefined)(e3.resolution) ? n3 : e3.resolution, autoFPS: !Object(l.isUndefined)(e3.autoFPS) && e3.autoFPS, autoResolution: !Object(l.isUndefined)(e3.autoResolution) && e3.autoResolution, transactionBgColor: Object(l.isUndefined)(e3.transactionBgColor) ? 0 : e3.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e3.maxResolutionLevel) }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.loader = new sM(this.localStorage, t3.useLocalCache, this.logger, t3.resourceTimeout, t3.loadDelegate), this.app = new Lb({ antialias: true, autoDensity: false, backgroundColor: 16777215 }), this.updateConfig(this.config), this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
|
|
33025
33096
|
const i3 = this.app.renderer, { drawElements: r3 } = i3.gl;
|
|
33026
33097
|
i3.gl.drawElements = (...t4) => {
|
|
33027
33098
|
r3.call(i3.gl, ...t4), this.drawCall += 1;
|
|
@@ -33047,7 +33118,7 @@ void main(void){
|
|
|
33047
33118
|
}
|
|
33048
33119
|
}), this.app.ticker.add(() => {
|
|
33049
33120
|
this.runtime.drawCall = this.drawCall, this.runtime.fps = Math.floor(this.app.ticker.minFPS), this.drawCall = 0;
|
|
33050
|
-
}, null, ey.LOW), this.clock = new lM(this.app.ticker), this.objPoolGroup = eM(), this.stagePool = new
|
|
33121
|
+
}, null, ey.LOW), this.clock = new lM(this.app.ticker), this.objPoolGroup = eM(), this.stagePool = new XR(this.loader, this.mode, this.app.renderer, this.app.ticker, this.app.view, this.clock, this.objPoolGroup, this.errorChannel, this.localStorage, this.logger, t3.loadDelegate, this.isPlayerPaused, this.maxResolution), this.app.view.addEventListener("webglcontextlost", this.onWebGLLost);
|
|
33051
33122
|
try {
|
|
33052
33123
|
this.transactionPlayer = new og();
|
|
33053
33124
|
} catch (t4) {
|
|
@@ -33066,7 +33137,7 @@ void main(void){
|
|
|
33066
33137
|
return ((t3 = this.currentStage) === null || t3 === void 0 ? void 0 : t3.json.prevIndex) ? this.currentStage.json.prevIndex : this.currentIndex - 1;
|
|
33067
33138
|
}
|
|
33068
33139
|
getMaxResolution(t3) {
|
|
33069
|
-
return !Object(l.isUndefined)(t3) && Number.isInteger(t3) ? (t3 < 1 && (t3 = 1), t3 > 4 && (t3 = 4), t3) :
|
|
33140
|
+
return !Object(l.isUndefined)(t3) && Number.isInteger(t3) ? (t3 < 1 && (t3 = 1), t3 > 4 && (t3 = 4), t3) : KR.platform.isAndroid() || KR.platform.isIOS() ? 2 : 4;
|
|
33070
33141
|
}
|
|
33071
33142
|
updateMaxResolutionLevel(t3) {
|
|
33072
33143
|
t3 < 1 && (t3 = 1), t3 > 4 && (t3 = 4);
|
|
@@ -33077,7 +33148,7 @@ void main(void){
|
|
|
33077
33148
|
Object(l.isUndefined)(t3.minFPS) || (this.config.minFPS = t3.minFPS, this.app.ticker.minFPS = t3.minFPS), Object(l.isUndefined)(t3.maxFPS) || (this.config.maxFPS = t3.maxFPS, this.app.ticker.maxFPS = t3.maxFPS), Object(l.isUndefined)(t3.resolution) || (this.config.resolution = t3.resolution, this.updateResolution(this.scale * this.config.resolution)), Object(l.isUndefined)(t3.autoFPS) || (this.config.autoFPS = t3.autoFPS), Object(l.isUndefined)(t3.autoResolution) || (this.config.autoResolution = t3.autoResolution), Object(l.isUndefined)(t3.transactionBgColor) || (this.config.transactionBgColor = t3.transactionBgColor), this.taskId && this.logger.info("ppt player update config: " + JSON.stringify(this.config), this.taskId), Object(l.isUndefined)(t3.maxResolutionLevel) || (this.config.maxResolutionLevel = t3.maxResolutionLevel, this.updateMaxResolutionLevel(this.config.maxResolutionLevel));
|
|
33078
33149
|
}
|
|
33079
33150
|
preload(t3) {
|
|
33080
|
-
return
|
|
33151
|
+
return ZR(this, void 0, void 0, function* () {
|
|
33081
33152
|
t3 < 1 || t3 > this.slideCount || (this.logger.info(`preload slide ${t3} begin`, this.taskId), yield this.stagePool.preload(t3), this.logger.info(`preload slide ${t3} end`, this.taskId));
|
|
33082
33153
|
});
|
|
33083
33154
|
}
|
|
@@ -33096,14 +33167,14 @@ void main(void){
|
|
|
33096
33167
|
}
|
|
33097
33168
|
renderSlide(t3, e3 = false) {
|
|
33098
33169
|
var n3;
|
|
33099
|
-
return
|
|
33170
|
+
return ZR(this, void 0, void 0, function* () {
|
|
33100
33171
|
if (this._isPaused)
|
|
33101
33172
|
return void this.logger.info("ppt play prevent render slide with paused state", this.taskId);
|
|
33102
|
-
this.logger.info("render slide " + t3, this.taskId), this.emit(
|
|
33173
|
+
this.logger.info("render slide " + t3, this.taskId), this.emit($R.renderStart, t3);
|
|
33103
33174
|
const i3 = yield this.stagePool.getStage(t3);
|
|
33104
33175
|
if (!i3)
|
|
33105
33176
|
return;
|
|
33106
|
-
this.translateEvent(i3.ctx.eventHub, [
|
|
33177
|
+
this.translateEvent(i3.ctx.eventHub, [$R.mainSeqStepChange, $R.mainSeqStateChange, $R.hyperlinkTrigger, $R.interactiveSeqAction, $R.mainSeqStepStart, $R.mainSeqStepEnd, $R.animateStart, $R.animateEnd, $R.mediaPlay, $R.mediaPause, $R.mediaSeek, $R.requestGotoSlide, $R.requestNextSlide, $R.requestPrevSlide, $R.interactiveSeqStateChange, $R.userInput]), this.currentIndex = Number(t3);
|
|
33107
33178
|
const { width: r3, height: o2, slideCount: s3 } = i3.json;
|
|
33108
33179
|
this.slideCount = s3, this.designWidth = r3, this.designHeight = o2, i3.json.transition && i3.json.transition.type && !this.prevSlideBase64 && this.currentStage && (this.prevSlideBase64 = this.getBase64(this.currentStage)), (n3 = this.currentStage) === null || n3 === void 0 || n3.clearOnSlideChange();
|
|
33109
33180
|
const a2 = this.currentStage;
|
|
@@ -33115,7 +33186,7 @@ void main(void){
|
|
|
33115
33186
|
}
|
|
33116
33187
|
i3.container.visible = false, this.app.stage.addChild(i3.container);
|
|
33117
33188
|
let { transition: u2 } = i3.json;
|
|
33118
|
-
!this.isForward && (a2 == null ? void 0 : a2.json.transition) && (u2 = a2.json.transition), this.prevSlideBase64 && l2 && u2 && u2.type && a2 && i3 && (yield this.playTransaction(this.prevSlideBase64, l2, u2, a2, i3), this.prevSlideBase64 = null), this.isForward ? yield i3.startTiming() : i3.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), i3.container.visible = true, a2 && (a2.setMainSeqStep(0, "start"), a2.clearOnTransactionEnd(), this.app.stage.removeChild(a2.container)), i3.ctx.slideScopeEventHub.emit("slide-render", i3.ctx.slideIndex), this.emit(
|
|
33189
|
+
!this.isForward && (a2 == null ? void 0 : a2.json.transition) && (u2 = a2.json.transition), this.prevSlideBase64 && l2 && u2 && u2.type && a2 && i3 && (yield this.playTransaction(this.prevSlideBase64, l2, u2, a2, i3), this.prevSlideBase64 = null), this.isForward ? yield i3.startTiming() : i3.setMainSeqApplied(), this.updateResolution(this.config.resolution * this.scale), i3.container.visible = true, a2 && (a2.setMainSeqStep(0, "start"), a2.clearOnTransactionEnd(), this.app.stage.removeChild(a2.container)), i3.ctx.slideScopeEventHub.emit("slide-render", i3.ctx.slideIndex), this.emit($R.renderEnd, t3), this.emit($R.slideChange, t3), this.preload(t3 + 1).catch((e4) => {
|
|
33119
33190
|
this.errorChannel.emit("error", qE.transform(e4), t3 + 1);
|
|
33120
33191
|
}), this.preload(t3 - 1).catch((e4) => {
|
|
33121
33192
|
this.errorChannel.emit("error", qE.transform(e4), t3 - 1);
|
|
@@ -33123,7 +33194,7 @@ void main(void){
|
|
|
33123
33194
|
});
|
|
33124
33195
|
}
|
|
33125
33196
|
renderToBase64(t3, e3, n3) {
|
|
33126
|
-
return
|
|
33197
|
+
return ZR(this, void 0, void 0, function* () {
|
|
33127
33198
|
const i3 = yield this.stagePool.getStage(t3);
|
|
33128
33199
|
if (i3) {
|
|
33129
33200
|
const { width: r3, height: o2 } = i3.json;
|
|
@@ -33145,16 +33216,16 @@ void main(void){
|
|
|
33145
33216
|
return e3.destroy(true), n3;
|
|
33146
33217
|
}
|
|
33147
33218
|
playTransaction(t3, e3, n3, i3, r3) {
|
|
33148
|
-
return
|
|
33219
|
+
return ZR(this, void 0, void 0, function* () {
|
|
33149
33220
|
const o2 = this.app.view.parentElement;
|
|
33150
|
-
if (t3 && e3 && o2 &&
|
|
33221
|
+
if (t3 && e3 && o2 && JR[n3.type] && this.transactionPlayer) {
|
|
33151
33222
|
this.transactionSprite.zIndex = 999, this.transactionSprite.visible = false, this.app.stage.addChild(this.transactionSprite);
|
|
33152
33223
|
const o3 = this.transactionPlayer.renderer.domElement, s3 = ky.from(o3), a2 = () => s3.update();
|
|
33153
33224
|
return this.app.ticker.add(a2), this.transactionSprite.texture = s3, setTimeout(() => {
|
|
33154
33225
|
this.transactionSprite.visible = true;
|
|
33155
33226
|
}, 100), new Promise((o4) => {
|
|
33156
33227
|
var s4, l2, u2, h2;
|
|
33157
|
-
(s4 = this.transactionPlayer) === null || s4 === void 0 || s4.play({ reverse: !this.isForward, prevTextureUrl: t3, nextTextureUrl: e3, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType:
|
|
33228
|
+
(s4 = this.transactionPlayer) === null || s4 === void 0 || s4.play({ reverse: !this.isForward, prevTextureUrl: t3, nextTextureUrl: e3, textureWidth: this.designWidth, textureHeight: this.designHeight, presetType: JR[n3.type], stageWidth: this.designWidth, stageHeight: this.designHeight, duration: (u2 = (l2 = this.currentStage) === null || l2 === void 0 ? void 0 : l2.json.transition) === null || u2 === void 0 ? void 0 : u2.dur, delay: 0, clearColor: this.config.transactionBgColor, maxFPS: Math.ceil((h2 = this.config.maxFPS) !== null && h2 !== void 0 ? h2 : 60), onTransactionEnd: () => {
|
|
33158
33229
|
var t4, e4;
|
|
33159
33230
|
o4(), i3.container.visible = false, r3.container.visible = true, (t4 = this.app.stage) === null || t4 === void 0 || t4.removeChild(this.transactionSprite), (e4 = this.app.ticker) === null || e4 === void 0 || e4.remove(a2);
|
|
33160
33231
|
} });
|
|
@@ -33172,7 +33243,7 @@ void main(void){
|
|
|
33172
33243
|
}
|
|
33173
33244
|
updateResolution(t3, e3) {
|
|
33174
33245
|
this.app.ticker.addOnce(() => {
|
|
33175
|
-
let n3 =
|
|
33246
|
+
let n3 = VR.isDesktop() ? t3 : 1;
|
|
33176
33247
|
for (; n3 * this.designWidth > this.maxResolution.x || n3 * this.designHeight > this.maxResolution.y; )
|
|
33177
33248
|
n3 -= 0.1;
|
|
33178
33249
|
this.app.renderer.resolution = n3, this.app.renderer.plugins.interaction.resolution = this.app.renderer.resolution, this.app.renderer.resize(this.designWidth, this.designHeight), Object(l.isFunction)(e3) && e3();
|
|
@@ -33247,7 +33318,7 @@ void main(void){
|
|
|
33247
33318
|
}
|
|
33248
33319
|
setMediaState(t3, e3) {
|
|
33249
33320
|
var n3;
|
|
33250
|
-
return
|
|
33321
|
+
return ZR(this, void 0, void 0, function* () {
|
|
33251
33322
|
yield (n3 = this.currentStage) === null || n3 === void 0 ? void 0 : n3.setMediaState(t3, e3);
|
|
33252
33323
|
});
|
|
33253
33324
|
}
|
|
@@ -33271,7 +33342,7 @@ void main(void){
|
|
|
33271
33342
|
return this.currentStage && this.getBase64(this.currentStage) || "";
|
|
33272
33343
|
}
|
|
33273
33344
|
createSnapshotForNextSlide(t3) {
|
|
33274
|
-
return
|
|
33345
|
+
return ZR(this, void 0, void 0, function* () {
|
|
33275
33346
|
const e3 = this.nextSlideIndex, n3 = this.stagePool.getStageJson(e3);
|
|
33276
33347
|
if (n3 && n3.transition && n3.transition.type && this.currentStage && this.transactionPlayer) {
|
|
33277
33348
|
const e4 = t3 ? `snapshot-${this.currentStage.json.index}-start` : `snapshot-${this.currentStage.json.index}-end`;
|
|
@@ -33290,7 +33361,7 @@ void main(void){
|
|
|
33290
33361
|
}
|
|
33291
33362
|
static clearLocalCache() {
|
|
33292
33363
|
var t3;
|
|
33293
|
-
(t3 =
|
|
33364
|
+
(t3 = YR.localCache) === null || t3 === void 0 || t3.clear().catch(() => {
|
|
33294
33365
|
});
|
|
33295
33366
|
}
|
|
33296
33367
|
destroy() {
|
|
@@ -33311,23 +33382,23 @@ void main(void){
|
|
|
33311
33382
|
}
|
|
33312
33383
|
}
|
|
33313
33384
|
}
|
|
33314
|
-
|
|
33315
|
-
var
|
|
33316
|
-
function
|
|
33317
|
-
var e3 =
|
|
33318
|
-
e3.push(t3),
|
|
33385
|
+
KR.platform = VR, KR.RtcAudioClazz = null;
|
|
33386
|
+
var QR = /* @__PURE__ */ new Map();
|
|
33387
|
+
function tP(t3) {
|
|
33388
|
+
var e3 = QR.get(t3.hookPoint) || [];
|
|
33389
|
+
e3.push(t3), QR.set(t3.hookPoint, e3);
|
|
33319
33390
|
}
|
|
33320
|
-
var
|
|
33391
|
+
var eP, nP = [], iP = "ResizeObserver loop completed with undelivered notifications.";
|
|
33321
33392
|
!function(t3) {
|
|
33322
33393
|
t3.BORDER_BOX = "border-box", t3.CONTENT_BOX = "content-box", t3.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
33323
|
-
}(
|
|
33324
|
-
var
|
|
33394
|
+
}(eP || (eP = {}));
|
|
33395
|
+
var rP, oP = function(t3) {
|
|
33325
33396
|
return Object.freeze(t3);
|
|
33326
|
-
},
|
|
33327
|
-
this.inlineSize = t3, this.blockSize = e3,
|
|
33328
|
-
},
|
|
33397
|
+
}, sP = function(t3, e3) {
|
|
33398
|
+
this.inlineSize = t3, this.blockSize = e3, oP(this);
|
|
33399
|
+
}, aP = function() {
|
|
33329
33400
|
function t3(t4, e3, n3, i3) {
|
|
33330
|
-
return this.x = t4, this.y = e3, this.width = n3, this.height = i3, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width,
|
|
33401
|
+
return this.x = t4, this.y = e3, this.width = n3, this.height = i3, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, oP(this);
|
|
33331
33402
|
}
|
|
33332
33403
|
return t3.prototype.toJSON = function() {
|
|
33333
33404
|
var t4 = this;
|
|
@@ -33335,59 +33406,59 @@ void main(void){
|
|
|
33335
33406
|
}, t3.fromRect = function(e3) {
|
|
33336
33407
|
return new t3(e3.x, e3.y, e3.width, e3.height);
|
|
33337
33408
|
}, t3;
|
|
33338
|
-
}(),
|
|
33409
|
+
}(), lP = function(t3) {
|
|
33339
33410
|
return t3 instanceof SVGElement && "getBBox" in t3;
|
|
33340
|
-
},
|
|
33341
|
-
if (
|
|
33411
|
+
}, uP = function(t3) {
|
|
33412
|
+
if (lP(t3)) {
|
|
33342
33413
|
var e3 = t3.getBBox(), n3 = e3.width, i3 = e3.height;
|
|
33343
33414
|
return !n3 && !i3;
|
|
33344
33415
|
}
|
|
33345
33416
|
var r3 = t3, o2 = r3.offsetWidth, s3 = r3.offsetHeight;
|
|
33346
33417
|
return !(o2 || s3 || t3.getClientRects().length);
|
|
33347
|
-
},
|
|
33418
|
+
}, hP = function(t3) {
|
|
33348
33419
|
var e3, n3;
|
|
33349
33420
|
if (t3 instanceof Element)
|
|
33350
33421
|
return true;
|
|
33351
33422
|
var i3 = (n3 = (e3 = t3) === null || e3 === void 0 ? void 0 : e3.ownerDocument) === null || n3 === void 0 ? void 0 : n3.defaultView;
|
|
33352
33423
|
return !!(i3 && t3 instanceof i3.Element);
|
|
33353
|
-
},
|
|
33424
|
+
}, cP = typeof window != "undefined" ? window : {}, dP = /* @__PURE__ */ new WeakMap(), pP = /auto|scroll/, fP = /^tb|vertical/, mP = /msie|trident/i.test(cP.navigator && cP.navigator.userAgent), gP = function(t3) {
|
|
33354
33425
|
return parseFloat(t3 || "0");
|
|
33355
|
-
},
|
|
33356
|
-
return t3 === void 0 && (t3 = 0), e3 === void 0 && (e3 = 0), n3 === void 0 && (n3 = false), new
|
|
33357
|
-
},
|
|
33358
|
-
if (e3 === void 0 && (e3 = false),
|
|
33359
|
-
return
|
|
33360
|
-
if (
|
|
33361
|
-
return
|
|
33362
|
-
var n3 = getComputedStyle(t3), i3 =
|
|
33363
|
-
return
|
|
33364
|
-
},
|
|
33365
|
-
var i3 =
|
|
33426
|
+
}, vP = function(t3, e3, n3) {
|
|
33427
|
+
return t3 === void 0 && (t3 = 0), e3 === void 0 && (e3 = 0), n3 === void 0 && (n3 = false), new sP((n3 ? e3 : t3) || 0, (n3 ? t3 : e3) || 0);
|
|
33428
|
+
}, _P = oP({ devicePixelContentBoxSize: vP(), borderBoxSize: vP(), contentBoxSize: vP(), contentRect: new aP(0, 0, 0, 0) }), yP = function(t3, e3) {
|
|
33429
|
+
if (e3 === void 0 && (e3 = false), dP.has(t3) && !e3)
|
|
33430
|
+
return dP.get(t3);
|
|
33431
|
+
if (uP(t3))
|
|
33432
|
+
return dP.set(t3, _P), _P;
|
|
33433
|
+
var n3 = getComputedStyle(t3), i3 = lP(t3) && t3.ownerSVGElement && t3.getBBox(), r3 = !mP && n3.boxSizing === "border-box", o2 = fP.test(n3.writingMode || ""), s3 = !i3 && pP.test(n3.overflowY || ""), a2 = !i3 && pP.test(n3.overflowX || ""), l2 = i3 ? 0 : gP(n3.paddingTop), u2 = i3 ? 0 : gP(n3.paddingRight), h2 = i3 ? 0 : gP(n3.paddingBottom), c2 = i3 ? 0 : gP(n3.paddingLeft), d2 = i3 ? 0 : gP(n3.borderTopWidth), p2 = i3 ? 0 : gP(n3.borderRightWidth), f2 = i3 ? 0 : gP(n3.borderBottomWidth), m2 = c2 + u2, g2 = l2 + h2, v2 = (i3 ? 0 : gP(n3.borderLeftWidth)) + p2, _2 = d2 + f2, y2 = a2 ? t3.offsetHeight - _2 - t3.clientHeight : 0, x2 = s3 ? t3.offsetWidth - v2 - t3.clientWidth : 0, b2 = r3 ? m2 + v2 : 0, T2 = r3 ? g2 + _2 : 0, w2 = i3 ? i3.width : gP(n3.width) - b2 - x2, S2 = i3 ? i3.height : gP(n3.height) - T2 - y2, E2 = w2 + m2 + x2 + v2, M2 = S2 + g2 + y2 + _2, A2 = oP({ devicePixelContentBoxSize: vP(Math.round(w2 * devicePixelRatio), Math.round(S2 * devicePixelRatio), o2), borderBoxSize: vP(E2, M2, o2), contentBoxSize: vP(w2, S2, o2), contentRect: new aP(c2, l2, w2, S2) });
|
|
33434
|
+
return dP.set(t3, A2), A2;
|
|
33435
|
+
}, xP = function(t3, e3, n3) {
|
|
33436
|
+
var i3 = yP(t3, n3), r3 = i3.borderBoxSize, o2 = i3.contentBoxSize, s3 = i3.devicePixelContentBoxSize;
|
|
33366
33437
|
switch (e3) {
|
|
33367
|
-
case
|
|
33438
|
+
case eP.DEVICE_PIXEL_CONTENT_BOX:
|
|
33368
33439
|
return s3;
|
|
33369
|
-
case
|
|
33440
|
+
case eP.BORDER_BOX:
|
|
33370
33441
|
return r3;
|
|
33371
33442
|
default:
|
|
33372
33443
|
return o2;
|
|
33373
33444
|
}
|
|
33374
|
-
}, xP = function(t3) {
|
|
33375
|
-
var e3 = _P(t3);
|
|
33376
|
-
this.target = t3, this.contentRect = e3.contentRect, this.borderBoxSize = rP([e3.borderBoxSize]), this.contentBoxSize = rP([e3.contentBoxSize]), this.devicePixelContentBoxSize = rP([e3.devicePixelContentBoxSize]);
|
|
33377
33445
|
}, bP = function(t3) {
|
|
33378
|
-
|
|
33446
|
+
var e3 = yP(t3);
|
|
33447
|
+
this.target = t3, this.contentRect = e3.contentRect, this.borderBoxSize = oP([e3.borderBoxSize]), this.contentBoxSize = oP([e3.contentBoxSize]), this.devicePixelContentBoxSize = oP([e3.devicePixelContentBoxSize]);
|
|
33448
|
+
}, TP = function(t3) {
|
|
33449
|
+
if (uP(t3))
|
|
33379
33450
|
return 1 / 0;
|
|
33380
33451
|
for (var e3 = 0, n3 = t3.parentNode; n3; )
|
|
33381
33452
|
e3 += 1, n3 = n3.parentNode;
|
|
33382
33453
|
return e3;
|
|
33383
|
-
},
|
|
33454
|
+
}, wP = function() {
|
|
33384
33455
|
var t3 = 1 / 0, e3 = [];
|
|
33385
|
-
|
|
33456
|
+
nP.forEach(function(n4) {
|
|
33386
33457
|
if (n4.activeTargets.length !== 0) {
|
|
33387
33458
|
var i4 = [];
|
|
33388
33459
|
n4.activeTargets.forEach(function(e4) {
|
|
33389
|
-
var n5 = new
|
|
33390
|
-
i4.push(n5), e4.lastReportedSize =
|
|
33460
|
+
var n5 = new bP(e4.target), r3 = TP(e4.target);
|
|
33461
|
+
i4.push(n5), e4.lastReportedSize = xP(e4.target, e4.observedBox), r3 < t3 && (t3 = r3);
|
|
33391
33462
|
}), e3.push(function() {
|
|
33392
33463
|
n4.callback.call(n4.observer, i4, n4.observer);
|
|
33393
33464
|
}), n4.activeTargets.splice(0, n4.activeTargets.length);
|
|
@@ -33397,36 +33468,36 @@ void main(void){
|
|
|
33397
33468
|
(0, i3[n3])();
|
|
33398
33469
|
}
|
|
33399
33470
|
return t3;
|
|
33400
|
-
},
|
|
33401
|
-
|
|
33471
|
+
}, SP = function(t3) {
|
|
33472
|
+
nP.forEach(function(e3) {
|
|
33402
33473
|
e3.activeTargets.splice(0, e3.activeTargets.length), e3.skippedTargets.splice(0, e3.skippedTargets.length), e3.observationTargets.forEach(function(n3) {
|
|
33403
|
-
n3.isActive() && (
|
|
33474
|
+
n3.isActive() && (TP(n3.target) > t3 ? e3.activeTargets.push(n3) : e3.skippedTargets.push(n3));
|
|
33404
33475
|
});
|
|
33405
33476
|
});
|
|
33406
|
-
},
|
|
33477
|
+
}, EP = function() {
|
|
33407
33478
|
var t3, e3 = 0;
|
|
33408
|
-
for (
|
|
33479
|
+
for (SP(e3); nP.some(function(t4) {
|
|
33409
33480
|
return t4.activeTargets.length > 0;
|
|
33410
33481
|
}); )
|
|
33411
|
-
e3 =
|
|
33412
|
-
return
|
|
33482
|
+
e3 = wP(), SP(e3);
|
|
33483
|
+
return nP.some(function(t4) {
|
|
33413
33484
|
return t4.skippedTargets.length > 0;
|
|
33414
|
-
}) && (typeof ErrorEvent == "function" ? t3 = new ErrorEvent("error", { message:
|
|
33415
|
-
},
|
|
33416
|
-
if (!
|
|
33485
|
+
}) && (typeof ErrorEvent == "function" ? t3 = new ErrorEvent("error", { message: iP }) : ((t3 = document.createEvent("Event")).initEvent("error", false, false), t3.message = iP), window.dispatchEvent(t3)), e3 > 0;
|
|
33486
|
+
}, MP = [], AP = function(t3) {
|
|
33487
|
+
if (!rP) {
|
|
33417
33488
|
var e3 = 0, n3 = document.createTextNode("");
|
|
33418
33489
|
new MutationObserver(function() {
|
|
33419
|
-
return
|
|
33490
|
+
return MP.splice(0).forEach(function(t4) {
|
|
33420
33491
|
return t4();
|
|
33421
33492
|
});
|
|
33422
|
-
}).observe(n3, { characterData: true }),
|
|
33493
|
+
}).observe(n3, { characterData: true }), rP = function() {
|
|
33423
33494
|
n3.textContent = "" + (e3 ? e3-- : e3++);
|
|
33424
33495
|
};
|
|
33425
33496
|
}
|
|
33426
|
-
|
|
33427
|
-
},
|
|
33497
|
+
MP.push(t3), rP();
|
|
33498
|
+
}, RP = 0, PP = { attributes: true, characterData: true, childList: true, subtree: true }, CP = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], IP = function(t3) {
|
|
33428
33499
|
return t3 === void 0 && (t3 = 0), Date.now() + t3;
|
|
33429
|
-
},
|
|
33500
|
+
}, OP = false, LP = new (function() {
|
|
33430
33501
|
function t3() {
|
|
33431
33502
|
var t4 = this;
|
|
33432
33503
|
this.stopped = true, this.listener = function() {
|
|
@@ -33435,19 +33506,19 @@ void main(void){
|
|
|
33435
33506
|
}
|
|
33436
33507
|
return t3.prototype.run = function(t4) {
|
|
33437
33508
|
var e3 = this;
|
|
33438
|
-
if (t4 === void 0 && (t4 = 250), !
|
|
33439
|
-
|
|
33440
|
-
var n3, i3 =
|
|
33509
|
+
if (t4 === void 0 && (t4 = 250), !OP) {
|
|
33510
|
+
OP = true;
|
|
33511
|
+
var n3, i3 = IP(t4);
|
|
33441
33512
|
n3 = function() {
|
|
33442
33513
|
var n4 = false;
|
|
33443
33514
|
try {
|
|
33444
|
-
n4 =
|
|
33515
|
+
n4 = EP();
|
|
33445
33516
|
} finally {
|
|
33446
|
-
if (
|
|
33517
|
+
if (OP = false, t4 = i3 - IP(), !RP)
|
|
33447
33518
|
return;
|
|
33448
33519
|
n4 ? e3.run(1e3) : t4 > 0 ? e3.run(t4) : e3.start();
|
|
33449
33520
|
}
|
|
33450
|
-
},
|
|
33521
|
+
}, AP(function() {
|
|
33451
33522
|
requestAnimationFrame(n3);
|
|
33452
33523
|
});
|
|
33453
33524
|
}
|
|
@@ -33455,29 +33526,29 @@ void main(void){
|
|
|
33455
33526
|
this.stop(), this.run();
|
|
33456
33527
|
}, t3.prototype.observe = function() {
|
|
33457
33528
|
var t4 = this, e3 = function() {
|
|
33458
|
-
return t4.observer && t4.observer.observe(document.body,
|
|
33529
|
+
return t4.observer && t4.observer.observe(document.body, PP);
|
|
33459
33530
|
};
|
|
33460
|
-
document.body ? e3() :
|
|
33531
|
+
document.body ? e3() : cP.addEventListener("DOMContentLoaded", e3);
|
|
33461
33532
|
}, t3.prototype.start = function() {
|
|
33462
33533
|
var t4 = this;
|
|
33463
|
-
this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(),
|
|
33464
|
-
return
|
|
33534
|
+
this.stopped && (this.stopped = false, this.observer = new MutationObserver(this.listener), this.observe(), CP.forEach(function(e3) {
|
|
33535
|
+
return cP.addEventListener(e3, t4.listener, true);
|
|
33465
33536
|
}));
|
|
33466
33537
|
}, t3.prototype.stop = function() {
|
|
33467
33538
|
var t4 = this;
|
|
33468
|
-
this.stopped || (this.observer && this.observer.disconnect(),
|
|
33469
|
-
return
|
|
33539
|
+
this.stopped || (this.observer && this.observer.disconnect(), CP.forEach(function(e3) {
|
|
33540
|
+
return cP.removeEventListener(e3, t4.listener, true);
|
|
33470
33541
|
}), this.stopped = true);
|
|
33471
33542
|
}, t3;
|
|
33472
|
-
}())(),
|
|
33473
|
-
!
|
|
33474
|
-
},
|
|
33543
|
+
}())(), NP = function(t3) {
|
|
33544
|
+
!RP && t3 > 0 && LP.start(), !(RP += t3) && LP.stop();
|
|
33545
|
+
}, DP = function() {
|
|
33475
33546
|
function t3(t4, e3) {
|
|
33476
|
-
this.target = t4, this.observedBox = e3 ||
|
|
33547
|
+
this.target = t4, this.observedBox = e3 || eP.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
|
|
33477
33548
|
}
|
|
33478
33549
|
return t3.prototype.isActive = function() {
|
|
33479
|
-
var t4, e3 =
|
|
33480
|
-
return t4 = this.target,
|
|
33550
|
+
var t4, e3 = xP(this.target, this.observedBox, true);
|
|
33551
|
+
return t4 = this.target, lP(t4) || function(t5) {
|
|
33481
33552
|
switch (t5.tagName) {
|
|
33482
33553
|
case "INPUT":
|
|
33483
33554
|
if (t5.type !== "image")
|
|
@@ -33494,57 +33565,57 @@ void main(void){
|
|
|
33494
33565
|
return false;
|
|
33495
33566
|
}(t4) || getComputedStyle(t4).display !== "inline" || (this.lastReportedSize = e3), this.lastReportedSize.inlineSize !== e3.inlineSize || this.lastReportedSize.blockSize !== e3.blockSize;
|
|
33496
33567
|
}, t3;
|
|
33497
|
-
}(),
|
|
33568
|
+
}(), FP = function(t3, e3) {
|
|
33498
33569
|
this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = t3, this.callback = e3;
|
|
33499
|
-
},
|
|
33570
|
+
}, BP = /* @__PURE__ */ new WeakMap(), UP = function(t3, e3) {
|
|
33500
33571
|
for (var n3 = 0; n3 < t3.length; n3 += 1)
|
|
33501
33572
|
if (t3[n3].target === e3)
|
|
33502
33573
|
return n3;
|
|
33503
33574
|
return -1;
|
|
33504
|
-
},
|
|
33575
|
+
}, kP = function() {
|
|
33505
33576
|
function t3() {
|
|
33506
33577
|
}
|
|
33507
33578
|
return t3.connect = function(t4, e3) {
|
|
33508
|
-
var n3 = new
|
|
33509
|
-
|
|
33579
|
+
var n3 = new FP(t4, e3);
|
|
33580
|
+
BP.set(t4, n3);
|
|
33510
33581
|
}, t3.observe = function(t4, e3, n3) {
|
|
33511
|
-
var i3 =
|
|
33512
|
-
|
|
33582
|
+
var i3 = BP.get(t4), r3 = i3.observationTargets.length === 0;
|
|
33583
|
+
UP(i3.observationTargets, e3) < 0 && (r3 && nP.push(i3), i3.observationTargets.push(new DP(e3, n3 && n3.box)), NP(1), LP.schedule());
|
|
33513
33584
|
}, t3.unobserve = function(t4, e3) {
|
|
33514
|
-
var n3 =
|
|
33515
|
-
i3 >= 0 && (r3 &&
|
|
33585
|
+
var n3 = BP.get(t4), i3 = UP(n3.observationTargets, e3), r3 = n3.observationTargets.length === 1;
|
|
33586
|
+
i3 >= 0 && (r3 && nP.splice(nP.indexOf(n3), 1), n3.observationTargets.splice(i3, 1), NP(-1));
|
|
33516
33587
|
}, t3.disconnect = function(t4) {
|
|
33517
|
-
var e3 = this, n3 =
|
|
33588
|
+
var e3 = this, n3 = BP.get(t4);
|
|
33518
33589
|
n3.observationTargets.slice().forEach(function(n4) {
|
|
33519
33590
|
return e3.unobserve(t4, n4.target);
|
|
33520
33591
|
}), n3.activeTargets.splice(0, n3.activeTargets.length);
|
|
33521
33592
|
}, t3;
|
|
33522
|
-
}(),
|
|
33593
|
+
}(), GP = function() {
|
|
33523
33594
|
function t3(t4) {
|
|
33524
33595
|
if (arguments.length === 0)
|
|
33525
33596
|
throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
33526
33597
|
if (typeof t4 != "function")
|
|
33527
33598
|
throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
|
|
33528
|
-
|
|
33599
|
+
kP.connect(this, t4);
|
|
33529
33600
|
}
|
|
33530
33601
|
return t3.prototype.observe = function(t4, e3) {
|
|
33531
33602
|
if (arguments.length === 0)
|
|
33532
33603
|
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
33533
|
-
if (!
|
|
33604
|
+
if (!hP(t4))
|
|
33534
33605
|
throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
33535
|
-
|
|
33606
|
+
kP.observe(this, t4, e3);
|
|
33536
33607
|
}, t3.prototype.unobserve = function(t4) {
|
|
33537
33608
|
if (arguments.length === 0)
|
|
33538
33609
|
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
|
|
33539
|
-
if (!
|
|
33610
|
+
if (!hP(t4))
|
|
33540
33611
|
throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
|
|
33541
|
-
|
|
33612
|
+
kP.unobserve(this, t4);
|
|
33542
33613
|
}, t3.prototype.disconnect = function() {
|
|
33543
|
-
|
|
33614
|
+
kP.disconnect(this);
|
|
33544
33615
|
}, t3.toString = function() {
|
|
33545
33616
|
return "function ResizeObserver () { [polyfill code] }";
|
|
33546
33617
|
}, t3;
|
|
33547
|
-
}(),
|
|
33618
|
+
}(), HP = function(t3, e3, n3, i3) {
|
|
33548
33619
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
33549
33620
|
function s3(t4) {
|
|
33550
33621
|
try {
|
|
@@ -33568,7 +33639,7 @@ void main(void){
|
|
|
33568
33639
|
}
|
|
33569
33640
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
33570
33641
|
});
|
|
33571
|
-
},
|
|
33642
|
+
}, zP = function(t3, e3) {
|
|
33572
33643
|
var n3, i3, r3, o2, s3 = { label: 0, sent: function() {
|
|
33573
33644
|
if (1 & r3[0])
|
|
33574
33645
|
throw r3[1];
|
|
@@ -33631,14 +33702,14 @@ void main(void){
|
|
|
33631
33702
|
}([o3, a3]);
|
|
33632
33703
|
};
|
|
33633
33704
|
}
|
|
33634
|
-
},
|
|
33705
|
+
}, jP = function() {
|
|
33635
33706
|
function t3(t4, e3, n3, i3, r3) {
|
|
33636
33707
|
this.state = "idle", this.index = -1, this.slideIndex = -1, this.fn = n3, this.index = t4, this.slideIndex = e3, this.eventHub = i3, this.id = r3;
|
|
33637
33708
|
}
|
|
33638
33709
|
return t3.prototype.apply = function() {
|
|
33639
|
-
return
|
|
33710
|
+
return HP(this, void 0, void 0, function() {
|
|
33640
33711
|
var t4;
|
|
33641
|
-
return
|
|
33712
|
+
return zP(this, function(e3) {
|
|
33642
33713
|
switch (e3.label) {
|
|
33643
33714
|
case 0:
|
|
33644
33715
|
this.eventHub.emit("task-start", this), e3.label = 1;
|
|
@@ -33654,7 +33725,7 @@ void main(void){
|
|
|
33654
33725
|
});
|
|
33655
33726
|
});
|
|
33656
33727
|
}, t3;
|
|
33657
|
-
}(),
|
|
33728
|
+
}(), VP = function() {
|
|
33658
33729
|
function t3() {
|
|
33659
33730
|
var t4 = this;
|
|
33660
33731
|
this.eventHub = new a.a(), this.tasks = [], this.index = 0, this.eventHub.on("task-end", function(e3) {
|
|
@@ -33676,7 +33747,7 @@ void main(void){
|
|
|
33676
33747
|
e3.tasks.splice(t5, 1);
|
|
33677
33748
|
});
|
|
33678
33749
|
}, t3.prototype.addTask = function(t4, e3, n3) {
|
|
33679
|
-
var i3 = new
|
|
33750
|
+
var i3 = new jP(this.index++, e3, t4, this.eventHub, n3);
|
|
33680
33751
|
this.tasks.push(i3), this.tasks.sort(function(t5, e4) {
|
|
33681
33752
|
return t5.index - e4.index;
|
|
33682
33753
|
}), this.replaceIdleTask(), this.tasks.length === 1 && i3.apply();
|
|
@@ -33688,7 +33759,7 @@ void main(void){
|
|
|
33688
33759
|
this.eventHub.removeAllListeners();
|
|
33689
33760
|
}, t3;
|
|
33690
33761
|
}();
|
|
33691
|
-
function
|
|
33762
|
+
function WP(t3, e3) {
|
|
33692
33763
|
var n3 = t3.__state.conversionName.toString(), i3 = Math.round(t3.r), r3 = Math.round(t3.g), o2 = Math.round(t3.b), s3 = t3.a, a2 = Math.round(t3.h), l2 = t3.s.toFixed(1), u2 = t3.v.toFixed(1);
|
|
33693
33764
|
if (e3 || n3 === "THREE_CHAR_HEX" || n3 === "SIX_CHAR_HEX") {
|
|
33694
33765
|
for (var h2 = t3.hex.toString(16); h2.length < 6; )
|
|
@@ -33697,28 +33768,28 @@ void main(void){
|
|
|
33697
33768
|
}
|
|
33698
33769
|
return n3 === "CSS_RGB" ? "rgb(" + i3 + "," + r3 + "," + o2 + ")" : n3 === "CSS_RGBA" ? "rgba(" + i3 + "," + r3 + "," + o2 + "," + s3 + ")" : n3 === "HEX" ? "0x" + t3.hex.toString(16) : n3 === "RGB_ARRAY" ? "[" + i3 + "," + r3 + "," + o2 + "]" : n3 === "RGBA_ARRAY" ? "[" + i3 + "," + r3 + "," + o2 + "," + s3 + "]" : n3 === "RGB_OBJ" ? "{r:" + i3 + ",g:" + r3 + ",b:" + o2 + "}" : n3 === "RGBA_OBJ" ? "{r:" + i3 + ",g:" + r3 + ",b:" + o2 + ",a:" + s3 + "}" : n3 === "HSV_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + u2 + "}" : n3 === "HSVA_OBJ" ? "{h:" + a2 + ",s:" + l2 + ",v:" + u2 + ",a:" + s3 + "}" : "unknown format";
|
|
33699
33770
|
}
|
|
33700
|
-
var
|
|
33701
|
-
return this.each(
|
|
33771
|
+
var XP = Array.prototype.forEach, qP = Array.prototype.slice, YP = { BREAK: {}, extend: function(t3) {
|
|
33772
|
+
return this.each(qP.call(arguments, 1), function(e3) {
|
|
33702
33773
|
(this.isObject(e3) ? Object.keys(e3) : []).forEach(function(n3) {
|
|
33703
33774
|
this.isUndefined(e3[n3]) || (t3[n3] = e3[n3]);
|
|
33704
33775
|
}.bind(this));
|
|
33705
33776
|
}, this), t3;
|
|
33706
33777
|
}, defaults: function(t3) {
|
|
33707
|
-
return this.each(
|
|
33778
|
+
return this.each(qP.call(arguments, 1), function(e3) {
|
|
33708
33779
|
(this.isObject(e3) ? Object.keys(e3) : []).forEach(function(n3) {
|
|
33709
33780
|
this.isUndefined(t3[n3]) && (t3[n3] = e3[n3]);
|
|
33710
33781
|
}.bind(this));
|
|
33711
33782
|
}, this), t3;
|
|
33712
33783
|
}, compose: function() {
|
|
33713
|
-
var t3 =
|
|
33784
|
+
var t3 = qP.call(arguments);
|
|
33714
33785
|
return function() {
|
|
33715
|
-
for (var e3 =
|
|
33786
|
+
for (var e3 = qP.call(arguments), n3 = t3.length - 1; n3 >= 0; n3--)
|
|
33716
33787
|
e3 = [t3[n3].apply(this, e3)];
|
|
33717
33788
|
return e3[0];
|
|
33718
33789
|
};
|
|
33719
33790
|
}, each: function(t3, e3, n3) {
|
|
33720
33791
|
if (t3) {
|
|
33721
|
-
if (
|
|
33792
|
+
if (XP && t3.forEach && t3.forEach === XP)
|
|
33722
33793
|
t3.forEach(e3, n3);
|
|
33723
33794
|
else if (t3.length === t3.length + 0) {
|
|
33724
33795
|
var i3, r3 = void 0;
|
|
@@ -33743,7 +33814,7 @@ void main(void){
|
|
|
33743
33814
|
clearTimeout(i3), i3 = setTimeout(s3, e3), a2 && t3.apply(r3, o2);
|
|
33744
33815
|
};
|
|
33745
33816
|
}, toArray: function(t3) {
|
|
33746
|
-
return t3.toArray ? t3.toArray() :
|
|
33817
|
+
return t3.toArray ? t3.toArray() : qP.call(t3);
|
|
33747
33818
|
}, isUndefined: function(t3) {
|
|
33748
33819
|
return t3 === void 0;
|
|
33749
33820
|
}, isNull: function(t3) {
|
|
@@ -33769,23 +33840,23 @@ void main(void){
|
|
|
33769
33840
|
return t3 === false || t3 === true;
|
|
33770
33841
|
}, isFunction: function(t3) {
|
|
33771
33842
|
return t3 instanceof Function;
|
|
33772
|
-
} },
|
|
33843
|
+
} }, ZP = [{ litmus: YP.isString, conversions: { THREE_CHAR_HEX: { read: function(t3) {
|
|
33773
33844
|
var e3 = t3.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
|
|
33774
33845
|
return e3 !== null && { space: "HEX", hex: parseInt("0x" + e3[1].toString() + e3[1].toString() + e3[2].toString() + e3[2].toString() + e3[3].toString() + e3[3].toString(), 0) };
|
|
33775
|
-
}, write:
|
|
33846
|
+
}, write: WP }, SIX_CHAR_HEX: { read: function(t3) {
|
|
33776
33847
|
var e3 = t3.match(/^#([A-F0-9]{6})$/i);
|
|
33777
33848
|
return e3 !== null && { space: "HEX", hex: parseInt("0x" + e3[1].toString(), 0) };
|
|
33778
|
-
}, write:
|
|
33849
|
+
}, write: WP }, CSS_RGB: { read: function(t3) {
|
|
33779
33850
|
var e3 = t3.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
|
|
33780
33851
|
return e3 !== null && { space: "RGB", r: parseFloat(e3[1]), g: parseFloat(e3[2]), b: parseFloat(e3[3]) };
|
|
33781
|
-
}, write:
|
|
33852
|
+
}, write: WP }, CSS_RGBA: { read: function(t3) {
|
|
33782
33853
|
var e3 = t3.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
|
|
33783
33854
|
return e3 !== null && { space: "RGB", r: parseFloat(e3[1]), g: parseFloat(e3[2]), b: parseFloat(e3[3]), a: parseFloat(e3[4]) };
|
|
33784
|
-
}, write:
|
|
33855
|
+
}, write: WP } } }, { litmus: YP.isNumber, conversions: { HEX: { read: function(t3) {
|
|
33785
33856
|
return { space: "HEX", hex: t3, conversionName: "HEX" };
|
|
33786
33857
|
}, write: function(t3) {
|
|
33787
33858
|
return t3.hex;
|
|
33788
|
-
} } } }, { litmus:
|
|
33859
|
+
} } } }, { litmus: YP.isArray, conversions: { RGB_ARRAY: { read: function(t3) {
|
|
33789
33860
|
return t3.length === 3 && { space: "RGB", r: t3[0], g: t3[1], b: t3[2] };
|
|
33790
33861
|
}, write: function(t3) {
|
|
33791
33862
|
return [t3.r, t3.g, t3.b];
|
|
@@ -33793,33 +33864,33 @@ void main(void){
|
|
|
33793
33864
|
return t3.length === 4 && { space: "RGB", r: t3[0], g: t3[1], b: t3[2], a: t3[3] };
|
|
33794
33865
|
}, write: function(t3) {
|
|
33795
33866
|
return [t3.r, t3.g, t3.b, t3.a];
|
|
33796
|
-
} } } }, { litmus:
|
|
33797
|
-
return !!(
|
|
33867
|
+
} } } }, { litmus: YP.isObject, conversions: { RGBA_OBJ: { read: function(t3) {
|
|
33868
|
+
return !!(YP.isNumber(t3.r) && YP.isNumber(t3.g) && YP.isNumber(t3.b) && YP.isNumber(t3.a)) && { space: "RGB", r: t3.r, g: t3.g, b: t3.b, a: t3.a };
|
|
33798
33869
|
}, write: function(t3) {
|
|
33799
33870
|
return { r: t3.r, g: t3.g, b: t3.b, a: t3.a };
|
|
33800
33871
|
} }, RGB_OBJ: { read: function(t3) {
|
|
33801
|
-
return !!(
|
|
33872
|
+
return !!(YP.isNumber(t3.r) && YP.isNumber(t3.g) && YP.isNumber(t3.b)) && { space: "RGB", r: t3.r, g: t3.g, b: t3.b };
|
|
33802
33873
|
}, write: function(t3) {
|
|
33803
33874
|
return { r: t3.r, g: t3.g, b: t3.b };
|
|
33804
33875
|
} }, HSVA_OBJ: { read: function(t3) {
|
|
33805
|
-
return !!(
|
|
33876
|
+
return !!(YP.isNumber(t3.h) && YP.isNumber(t3.s) && YP.isNumber(t3.v) && YP.isNumber(t3.a)) && { space: "HSV", h: t3.h, s: t3.s, v: t3.v, a: t3.a };
|
|
33806
33877
|
}, write: function(t3) {
|
|
33807
33878
|
return { h: t3.h, s: t3.s, v: t3.v, a: t3.a };
|
|
33808
33879
|
} }, HSV_OBJ: { read: function(t3) {
|
|
33809
|
-
return !!(
|
|
33880
|
+
return !!(YP.isNumber(t3.h) && YP.isNumber(t3.s) && YP.isNumber(t3.v)) && { space: "HSV", h: t3.h, s: t3.s, v: t3.v };
|
|
33810
33881
|
}, write: function(t3) {
|
|
33811
33882
|
return { h: t3.h, s: t3.s, v: t3.v };
|
|
33812
|
-
} } } }],
|
|
33813
|
-
|
|
33814
|
-
var t3 = arguments.length > 1 ?
|
|
33815
|
-
return
|
|
33883
|
+
} } } }], JP = void 0, $P = void 0, KP = function() {
|
|
33884
|
+
$P = false;
|
|
33885
|
+
var t3 = arguments.length > 1 ? YP.toArray(arguments) : arguments[0];
|
|
33886
|
+
return YP.each(ZP, function(e3) {
|
|
33816
33887
|
if (e3.litmus(t3))
|
|
33817
|
-
return
|
|
33818
|
-
if (
|
|
33819
|
-
return
|
|
33820
|
-
}),
|
|
33821
|
-
}),
|
|
33822
|
-
},
|
|
33888
|
+
return YP.each(e3.conversions, function(e4, n3) {
|
|
33889
|
+
if (JP = e4.read(t3), $P === false && JP !== false)
|
|
33890
|
+
return $P = JP, JP.conversionName = n3, JP.conversion = e4, YP.BREAK;
|
|
33891
|
+
}), YP.BREAK;
|
|
33892
|
+
}), $P;
|
|
33893
|
+
}, QP = void 0, tC = { hsv_to_rgb: function(t3, e3, n3) {
|
|
33823
33894
|
var i3 = Math.floor(t3 / 60) % 6, r3 = t3 / 60 - Math.floor(t3 / 60), o2 = n3 * (1 - e3), s3 = n3 * (1 - r3 * e3), a2 = n3 * (1 - (1 - r3) * e3), l2 = [[n3, a2, o2], [s3, n3, o2], [o2, n3, a2], [o2, s3, n3], [a2, o2, n3], [n3, o2, s3]][i3];
|
|
33824
33895
|
return { r: 255 * l2[0], g: 255 * l2[1], b: 255 * l2[2] };
|
|
33825
33896
|
}, rgb_to_hsv: function(t3, e3, n3) {
|
|
@@ -33831,15 +33902,15 @@ void main(void){
|
|
|
33831
33902
|
}, component_from_hex: function(t3, e3) {
|
|
33832
33903
|
return t3 >> 8 * e3 & 255;
|
|
33833
33904
|
}, hex_with_component: function(t3, e3, n3) {
|
|
33834
|
-
return n3 << (
|
|
33835
|
-
} },
|
|
33905
|
+
return n3 << (QP = 8 * e3) | t3 & ~(255 << QP);
|
|
33906
|
+
} }, eC = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t3) {
|
|
33836
33907
|
return typeof t3;
|
|
33837
33908
|
} : function(t3) {
|
|
33838
33909
|
return t3 && typeof Symbol == "function" && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3;
|
|
33839
|
-
},
|
|
33910
|
+
}, nC = function(t3, e3) {
|
|
33840
33911
|
if (!(t3 instanceof e3))
|
|
33841
33912
|
throw new TypeError("Cannot call a class as a function");
|
|
33842
|
-
},
|
|
33913
|
+
}, iC = function() {
|
|
33843
33914
|
function t3(t4, e3) {
|
|
33844
33915
|
for (var n3 = 0; n3 < e3.length; n3++) {
|
|
33845
33916
|
var i3 = e3[n3];
|
|
@@ -33849,7 +33920,7 @@ void main(void){
|
|
|
33849
33920
|
return function(e3, n3, i3) {
|
|
33850
33921
|
return n3 && t3(e3.prototype, n3), i3 && t3(e3, i3), e3;
|
|
33851
33922
|
};
|
|
33852
|
-
}(),
|
|
33923
|
+
}(), rC = function t3(e3, n3, i3) {
|
|
33853
33924
|
e3 === null && (e3 = Function.prototype);
|
|
33854
33925
|
var r3 = Object.getOwnPropertyDescriptor(e3, n3);
|
|
33855
33926
|
if (r3 === void 0) {
|
|
@@ -33860,67 +33931,67 @@ void main(void){
|
|
|
33860
33931
|
return r3.value;
|
|
33861
33932
|
var s3 = r3.get;
|
|
33862
33933
|
return s3 !== void 0 ? s3.call(i3) : void 0;
|
|
33863
|
-
},
|
|
33934
|
+
}, oC = function(t3, e3) {
|
|
33864
33935
|
if (typeof e3 != "function" && e3 !== null)
|
|
33865
33936
|
throw new TypeError("Super expression must either be null or a function, not " + typeof e3);
|
|
33866
33937
|
t3.prototype = Object.create(e3 && e3.prototype, { constructor: { value: t3, enumerable: false, writable: true, configurable: true } }), e3 && (Object.setPrototypeOf ? Object.setPrototypeOf(t3, e3) : t3.__proto__ = e3);
|
|
33867
|
-
},
|
|
33938
|
+
}, sC = function(t3, e3) {
|
|
33868
33939
|
if (!t3)
|
|
33869
33940
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
33870
33941
|
return !e3 || typeof e3 != "object" && typeof e3 != "function" ? t3 : e3;
|
|
33871
|
-
},
|
|
33942
|
+
}, aC = function() {
|
|
33872
33943
|
function t3() {
|
|
33873
|
-
if (
|
|
33944
|
+
if (nC(this, t3), this.__state = KP.apply(this, arguments), this.__state === false)
|
|
33874
33945
|
throw new Error("Failed to interpret color arguments");
|
|
33875
33946
|
this.__state.a = this.__state.a || 1;
|
|
33876
33947
|
}
|
|
33877
|
-
return
|
|
33878
|
-
return
|
|
33948
|
+
return iC(t3, [{ key: "toString", value: function() {
|
|
33949
|
+
return WP(this);
|
|
33879
33950
|
} }, { key: "toHexString", value: function() {
|
|
33880
|
-
return
|
|
33951
|
+
return WP(this, true);
|
|
33881
33952
|
} }, { key: "toOriginal", value: function() {
|
|
33882
33953
|
return this.__state.conversion.write(this);
|
|
33883
33954
|
} }]), t3;
|
|
33884
33955
|
}();
|
|
33885
|
-
function
|
|
33956
|
+
function lC(t3, e3, n3) {
|
|
33886
33957
|
Object.defineProperty(t3, e3, { get: function() {
|
|
33887
|
-
return this.__state.space === "RGB" ||
|
|
33958
|
+
return this.__state.space === "RGB" || aC.recalculateRGB(this, e3, n3), this.__state[e3];
|
|
33888
33959
|
}, set: function(t4) {
|
|
33889
|
-
this.__state.space !== "RGB" && (
|
|
33960
|
+
this.__state.space !== "RGB" && (aC.recalculateRGB(this, e3, n3), this.__state.space = "RGB"), this.__state[e3] = t4;
|
|
33890
33961
|
} });
|
|
33891
33962
|
}
|
|
33892
|
-
function
|
|
33963
|
+
function uC(t3, e3) {
|
|
33893
33964
|
Object.defineProperty(t3, e3, { get: function() {
|
|
33894
|
-
return this.__state.space === "HSV" ||
|
|
33965
|
+
return this.__state.space === "HSV" || aC.recalculateHSV(this), this.__state[e3];
|
|
33895
33966
|
}, set: function(t4) {
|
|
33896
|
-
this.__state.space !== "HSV" && (
|
|
33967
|
+
this.__state.space !== "HSV" && (aC.recalculateHSV(this), this.__state.space = "HSV"), this.__state[e3] = t4;
|
|
33897
33968
|
} });
|
|
33898
33969
|
}
|
|
33899
|
-
|
|
33970
|
+
aC.recalculateRGB = function(t3, e3, n3) {
|
|
33900
33971
|
if (t3.__state.space === "HEX")
|
|
33901
|
-
t3.__state[e3] =
|
|
33972
|
+
t3.__state[e3] = tC.component_from_hex(t3.__state.hex, n3);
|
|
33902
33973
|
else {
|
|
33903
33974
|
if (t3.__state.space !== "HSV")
|
|
33904
33975
|
throw new Error("Corrupted color state");
|
|
33905
|
-
|
|
33976
|
+
YP.extend(t3.__state, tC.hsv_to_rgb(t3.__state.h, t3.__state.s, t3.__state.v));
|
|
33906
33977
|
}
|
|
33907
|
-
},
|
|
33908
|
-
var e3 =
|
|
33909
|
-
|
|
33910
|
-
},
|
|
33978
|
+
}, aC.recalculateHSV = function(t3) {
|
|
33979
|
+
var e3 = tC.rgb_to_hsv(t3.r, t3.g, t3.b);
|
|
33980
|
+
YP.extend(t3.__state, { s: e3.s, v: e3.v }), YP.isNaN(e3.h) ? YP.isUndefined(t3.__state.h) && (t3.__state.h = 0) : t3.__state.h = e3.h;
|
|
33981
|
+
}, aC.COMPONENTS = ["r", "g", "b", "h", "s", "v", "hex", "a"], lC(aC.prototype, "r", 2), lC(aC.prototype, "g", 1), lC(aC.prototype, "b", 0), uC(aC.prototype, "h"), uC(aC.prototype, "s"), uC(aC.prototype, "v"), Object.defineProperty(aC.prototype, "a", { get: function() {
|
|
33911
33982
|
return this.__state.a;
|
|
33912
33983
|
}, set: function(t3) {
|
|
33913
33984
|
this.__state.a = t3;
|
|
33914
|
-
} }), Object.defineProperty(
|
|
33915
|
-
return this.__state.space !== "HEX" && (this.__state.hex =
|
|
33985
|
+
} }), Object.defineProperty(aC.prototype, "hex", { get: function() {
|
|
33986
|
+
return this.__state.space !== "HEX" && (this.__state.hex = tC.rgb_to_hex(this.r, this.g, this.b), this.__state.space = "HEX"), this.__state.hex;
|
|
33916
33987
|
}, set: function(t3) {
|
|
33917
33988
|
this.__state.space = "HEX", this.__state.hex = t3;
|
|
33918
33989
|
} });
|
|
33919
|
-
var
|
|
33990
|
+
var hC = function() {
|
|
33920
33991
|
function t3(e3, n3) {
|
|
33921
|
-
|
|
33992
|
+
nC(this, t3), this.initialValue = e3[n3], this.domElement = document.createElement("div"), this.object = e3, this.property = n3, this.__onChange = void 0, this.__onFinishChange = void 0;
|
|
33922
33993
|
}
|
|
33923
|
-
return
|
|
33994
|
+
return iC(t3, [{ key: "onChange", value: function(t4) {
|
|
33924
33995
|
return this.__onChange = t4, this;
|
|
33925
33996
|
} }, { key: "onFinishChange", value: function(t4) {
|
|
33926
33997
|
return this.__onFinishChange = t4, this;
|
|
@@ -33933,29 +34004,29 @@ void main(void){
|
|
|
33933
34004
|
} }, { key: "isModified", value: function() {
|
|
33934
34005
|
return this.initialValue !== this.getValue();
|
|
33935
34006
|
} }]), t3;
|
|
33936
|
-
}(),
|
|
33937
|
-
|
|
33938
|
-
|
|
33939
|
-
|
|
34007
|
+
}(), cC = {};
|
|
34008
|
+
YP.each({ HTMLEvents: ["change"], MouseEvents: ["click", "mousemove", "mousedown", "mouseup", "mouseover"], KeyboardEvents: ["keydown"] }, function(t3, e3) {
|
|
34009
|
+
YP.each(t3, function(t4) {
|
|
34010
|
+
cC[t4] = e3;
|
|
33940
34011
|
});
|
|
33941
34012
|
});
|
|
33942
|
-
var
|
|
33943
|
-
function
|
|
33944
|
-
if (t3 === "0" ||
|
|
34013
|
+
var dC = /(\d+(\.\d+)?)px/;
|
|
34014
|
+
function pC(t3) {
|
|
34015
|
+
if (t3 === "0" || YP.isUndefined(t3))
|
|
33945
34016
|
return 0;
|
|
33946
|
-
var e3 = t3.match(
|
|
33947
|
-
return
|
|
34017
|
+
var e3 = t3.match(dC);
|
|
34018
|
+
return YP.isNull(e3) ? 0 : parseFloat(e3[1]);
|
|
33948
34019
|
}
|
|
33949
|
-
var
|
|
34020
|
+
var fC = { makeSelectable: function(t3, e3) {
|
|
33950
34021
|
t3 !== void 0 && t3.style !== void 0 && (t3.onselectstart = e3 ? function() {
|
|
33951
34022
|
return false;
|
|
33952
34023
|
} : function() {
|
|
33953
34024
|
}, t3.style.MozUserSelect = e3 ? "auto" : "none", t3.style.KhtmlUserSelect = e3 ? "auto" : "none", t3.unselectable = e3 ? "on" : "off");
|
|
33954
34025
|
}, makeFullscreen: function(t3, e3, n3) {
|
|
33955
34026
|
var i3 = n3, r3 = e3;
|
|
33956
|
-
|
|
34027
|
+
YP.isUndefined(r3) && (r3 = true), YP.isUndefined(i3) && (i3 = true), t3.style.position = "absolute", r3 && (t3.style.left = 0, t3.style.right = 0), i3 && (t3.style.top = 0, t3.style.bottom = 0);
|
|
33957
34028
|
}, fakeEvent: function(t3, e3, n3, i3) {
|
|
33958
|
-
var r3 = n3 || {}, o2 =
|
|
34029
|
+
var r3 = n3 || {}, o2 = cC[e3];
|
|
33959
34030
|
if (!o2)
|
|
33960
34031
|
throw new Error("Event type " + e3 + " not supported.");
|
|
33961
34032
|
var s3 = document.createEvent(o2);
|
|
@@ -33966,18 +34037,18 @@ void main(void){
|
|
|
33966
34037
|
break;
|
|
33967
34038
|
case "KeyboardEvents":
|
|
33968
34039
|
var u2 = s3.initKeyboardEvent || s3.initKeyEvent;
|
|
33969
|
-
|
|
34040
|
+
YP.defaults(r3, { cancelable: true, ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, keyCode: void 0, charCode: void 0 }), u2(e3, r3.bubbles || false, r3.cancelable, window, r3.ctrlKey, r3.altKey, r3.shiftKey, r3.metaKey, r3.keyCode, r3.charCode);
|
|
33970
34041
|
break;
|
|
33971
34042
|
default:
|
|
33972
34043
|
s3.initEvent(e3, r3.bubbles || false, r3.cancelable || true);
|
|
33973
34044
|
}
|
|
33974
|
-
|
|
34045
|
+
YP.defaults(s3, i3), t3.dispatchEvent(s3);
|
|
33975
34046
|
}, bind: function(t3, e3, n3, i3) {
|
|
33976
34047
|
var r3 = i3 || false;
|
|
33977
|
-
return t3.addEventListener ? t3.addEventListener(e3, n3, r3) : t3.attachEvent && t3.attachEvent("on" + e3, n3),
|
|
34048
|
+
return t3.addEventListener ? t3.addEventListener(e3, n3, r3) : t3.attachEvent && t3.attachEvent("on" + e3, n3), fC;
|
|
33978
34049
|
}, unbind: function(t3, e3, n3, i3) {
|
|
33979
34050
|
var r3 = i3 || false;
|
|
33980
|
-
return t3.removeEventListener ? t3.removeEventListener(e3, n3, r3) : t3.detachEvent && t3.detachEvent("on" + e3, n3),
|
|
34051
|
+
return t3.removeEventListener ? t3.removeEventListener(e3, n3, r3) : t3.detachEvent && t3.detachEvent("on" + e3, n3), fC;
|
|
33981
34052
|
}, addClass: function(t3, e3) {
|
|
33982
34053
|
if (t3.className === void 0)
|
|
33983
34054
|
t3.className = e3;
|
|
@@ -33985,7 +34056,7 @@ void main(void){
|
|
|
33985
34056
|
var n3 = t3.className.split(/ +/);
|
|
33986
34057
|
n3.indexOf(e3) === -1 && (n3.push(e3), t3.className = n3.join(" ").replace(/^\s+/, "").replace(/\s+$/, ""));
|
|
33987
34058
|
}
|
|
33988
|
-
return
|
|
34059
|
+
return fC;
|
|
33989
34060
|
}, removeClass: function(t3, e3) {
|
|
33990
34061
|
if (e3)
|
|
33991
34062
|
if (t3.className === e3)
|
|
@@ -33996,15 +34067,15 @@ void main(void){
|
|
|
33996
34067
|
}
|
|
33997
34068
|
else
|
|
33998
34069
|
t3.className = void 0;
|
|
33999
|
-
return
|
|
34070
|
+
return fC;
|
|
34000
34071
|
}, hasClass: function(t3, e3) {
|
|
34001
34072
|
return new RegExp("(?:^|\\s+)" + e3 + "(?:\\s+|$)").test(t3.className) || false;
|
|
34002
34073
|
}, getWidth: function(t3) {
|
|
34003
34074
|
var e3 = getComputedStyle(t3);
|
|
34004
|
-
return
|
|
34075
|
+
return pC(e3["border-left-width"]) + pC(e3["border-right-width"]) + pC(e3["padding-left"]) + pC(e3["padding-right"]) + pC(e3.width);
|
|
34005
34076
|
}, getHeight: function(t3) {
|
|
34006
34077
|
var e3 = getComputedStyle(t3);
|
|
34007
|
-
return
|
|
34078
|
+
return pC(e3["border-top-width"]) + pC(e3["border-bottom-width"]) + pC(e3["padding-top"]) + pC(e3["padding-bottom"]) + pC(e3.height);
|
|
34008
34079
|
}, getOffset: function(t3) {
|
|
34009
34080
|
var e3 = t3, n3 = { left: 0, top: 0 };
|
|
34010
34081
|
if (e3.offsetParent)
|
|
@@ -34014,86 +34085,86 @@ void main(void){
|
|
|
34014
34085
|
return n3;
|
|
34015
34086
|
}, isActive: function(t3) {
|
|
34016
34087
|
return t3 === document.activeElement && (t3.type || t3.href);
|
|
34017
|
-
} },
|
|
34088
|
+
} }, mC = function(t3) {
|
|
34018
34089
|
function e3(t4, n3) {
|
|
34019
|
-
|
|
34020
|
-
var i3 =
|
|
34021
|
-
return i3.__prev = i3.getValue(), i3.__checkbox = document.createElement("input"), i3.__checkbox.setAttribute("type", "checkbox"),
|
|
34090
|
+
nC(this, e3);
|
|
34091
|
+
var i3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), r3 = i3;
|
|
34092
|
+
return i3.__prev = i3.getValue(), i3.__checkbox = document.createElement("input"), i3.__checkbox.setAttribute("type", "checkbox"), fC.bind(i3.__checkbox, "change", function() {
|
|
34022
34093
|
r3.setValue(!r3.__prev);
|
|
34023
34094
|
}, false), i3.domElement.appendChild(i3.__checkbox), i3.updateDisplay(), i3;
|
|
34024
34095
|
}
|
|
34025
|
-
return
|
|
34026
|
-
var n3 =
|
|
34096
|
+
return oC(e3, t3), iC(e3, [{ key: "setValue", value: function(t4) {
|
|
34097
|
+
var n3 = rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, t4);
|
|
34027
34098
|
return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), this.__prev = this.getValue(), n3;
|
|
34028
34099
|
} }, { key: "updateDisplay", value: function() {
|
|
34029
|
-
return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false),
|
|
34100
|
+
return this.getValue() === true ? (this.__checkbox.setAttribute("checked", "checked"), this.__checkbox.checked = true, this.__prev = true) : (this.__checkbox.checked = false, this.__prev = false), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
|
|
34030
34101
|
} }]), e3;
|
|
34031
|
-
}(
|
|
34102
|
+
}(hC), gC = function(t3) {
|
|
34032
34103
|
function e3(t4, n3, i3) {
|
|
34033
|
-
|
|
34034
|
-
var r3 =
|
|
34035
|
-
if (r3.__select = document.createElement("select"),
|
|
34104
|
+
nC(this, e3);
|
|
34105
|
+
var r3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = i3, s3 = r3;
|
|
34106
|
+
if (r3.__select = document.createElement("select"), YP.isArray(o2)) {
|
|
34036
34107
|
var a2 = {};
|
|
34037
|
-
|
|
34108
|
+
YP.each(o2, function(t5) {
|
|
34038
34109
|
a2[t5] = t5;
|
|
34039
34110
|
}), o2 = a2;
|
|
34040
34111
|
}
|
|
34041
|
-
return
|
|
34112
|
+
return YP.each(o2, function(t5, e4) {
|
|
34042
34113
|
var n4 = document.createElement("option");
|
|
34043
34114
|
n4.innerHTML = e4, n4.setAttribute("value", t5), s3.__select.appendChild(n4);
|
|
34044
|
-
}), r3.updateDisplay(),
|
|
34115
|
+
}), r3.updateDisplay(), fC.bind(r3.__select, "change", function() {
|
|
34045
34116
|
var t5 = this.options[this.selectedIndex].value;
|
|
34046
34117
|
s3.setValue(t5);
|
|
34047
34118
|
}), r3.domElement.appendChild(r3.__select), r3;
|
|
34048
34119
|
}
|
|
34049
|
-
return
|
|
34050
|
-
var n3 =
|
|
34120
|
+
return oC(e3, t3), iC(e3, [{ key: "setValue", value: function(t4) {
|
|
34121
|
+
var n3 = rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, t4);
|
|
34051
34122
|
return this.__onFinishChange && this.__onFinishChange.call(this, this.getValue()), n3;
|
|
34052
34123
|
} }, { key: "updateDisplay", value: function() {
|
|
34053
|
-
return
|
|
34124
|
+
return fC.isActive(this.__select) ? this : (this.__select.value = this.getValue(), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this));
|
|
34054
34125
|
} }]), e3;
|
|
34055
|
-
}(
|
|
34126
|
+
}(hC), vC = function(t3) {
|
|
34056
34127
|
function e3(t4, n3) {
|
|
34057
|
-
|
|
34058
|
-
var i3 =
|
|
34128
|
+
nC(this, e3);
|
|
34129
|
+
var i3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), r3 = i3;
|
|
34059
34130
|
function o2() {
|
|
34060
34131
|
r3.setValue(r3.__input.value);
|
|
34061
34132
|
}
|
|
34062
|
-
return i3.__input = document.createElement("input"), i3.__input.setAttribute("type", "text"),
|
|
34133
|
+
return i3.__input = document.createElement("input"), i3.__input.setAttribute("type", "text"), fC.bind(i3.__input, "keyup", o2), fC.bind(i3.__input, "change", o2), fC.bind(i3.__input, "blur", function() {
|
|
34063
34134
|
r3.__onFinishChange && r3.__onFinishChange.call(r3, r3.getValue());
|
|
34064
|
-
}),
|
|
34135
|
+
}), fC.bind(i3.__input, "keydown", function(t5) {
|
|
34065
34136
|
t5.keyCode === 13 && this.blur();
|
|
34066
34137
|
}), i3.updateDisplay(), i3.domElement.appendChild(i3.__input), i3;
|
|
34067
34138
|
}
|
|
34068
|
-
return
|
|
34069
|
-
return
|
|
34139
|
+
return oC(e3, t3), iC(e3, [{ key: "updateDisplay", value: function() {
|
|
34140
|
+
return fC.isActive(this.__input) || (this.__input.value = this.getValue()), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
|
|
34070
34141
|
} }]), e3;
|
|
34071
|
-
}(
|
|
34072
|
-
function
|
|
34142
|
+
}(hC);
|
|
34143
|
+
function _C(t3) {
|
|
34073
34144
|
var e3 = t3.toString();
|
|
34074
34145
|
return e3.indexOf(".") > -1 ? e3.length - e3.indexOf(".") - 1 : 0;
|
|
34075
34146
|
}
|
|
34076
|
-
var
|
|
34147
|
+
var yC = function(t3) {
|
|
34077
34148
|
function e3(t4, n3, i3) {
|
|
34078
|
-
|
|
34079
|
-
var r3 =
|
|
34080
|
-
return r3.__min = o2.min, r3.__max = o2.max, r3.__step = o2.step,
|
|
34149
|
+
nC(this, e3);
|
|
34150
|
+
var r3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = i3 || {};
|
|
34151
|
+
return r3.__min = o2.min, r3.__max = o2.max, r3.__step = o2.step, YP.isUndefined(r3.__step) ? r3.initialValue === 0 ? r3.__impliedStep = 1 : r3.__impliedStep = Math.pow(10, Math.floor(Math.log(Math.abs(r3.initialValue)) / Math.LN10)) / 10 : r3.__impliedStep = r3.__step, r3.__precision = _C(r3.__impliedStep), r3;
|
|
34081
34152
|
}
|
|
34082
|
-
return
|
|
34153
|
+
return oC(e3, t3), iC(e3, [{ key: "setValue", value: function(t4) {
|
|
34083
34154
|
var n3 = t4;
|
|
34084
|
-
return this.__min !== void 0 && n3 < this.__min ? n3 = this.__min : this.__max !== void 0 && n3 > this.__max && (n3 = this.__max), this.__step !== void 0 && n3 % this.__step != 0 && (n3 = Math.round(n3 / this.__step) * this.__step),
|
|
34155
|
+
return this.__min !== void 0 && n3 < this.__min ? n3 = this.__min : this.__max !== void 0 && n3 > this.__max && (n3 = this.__max), this.__step !== void 0 && n3 % this.__step != 0 && (n3 = Math.round(n3 / this.__step) * this.__step), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "setValue", this).call(this, n3);
|
|
34085
34156
|
} }, { key: "min", value: function(t4) {
|
|
34086
34157
|
return this.__min = t4, this;
|
|
34087
34158
|
} }, { key: "max", value: function(t4) {
|
|
34088
34159
|
return this.__max = t4, this;
|
|
34089
34160
|
} }, { key: "step", value: function(t4) {
|
|
34090
|
-
return this.__step = t4, this.__impliedStep = t4, this.__precision =
|
|
34161
|
+
return this.__step = t4, this.__impliedStep = t4, this.__precision = _C(t4), this;
|
|
34091
34162
|
} }]), e3;
|
|
34092
|
-
}(
|
|
34093
|
-
var
|
|
34163
|
+
}(hC);
|
|
34164
|
+
var xC = function(t3) {
|
|
34094
34165
|
function e3(t4, n3, i3) {
|
|
34095
|
-
|
|
34096
|
-
var r3 =
|
|
34166
|
+
nC(this, e3);
|
|
34167
|
+
var r3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3, i3));
|
|
34097
34168
|
r3.__truncationSuspended = false;
|
|
34098
34169
|
var o2 = r3, s3 = void 0;
|
|
34099
34170
|
function a2() {
|
|
@@ -34104,101 +34175,101 @@ void main(void){
|
|
|
34104
34175
|
o2.setValue(o2.getValue() + e4 * o2.__impliedStep), s3 = t5.clientY;
|
|
34105
34176
|
}
|
|
34106
34177
|
function u2() {
|
|
34107
|
-
|
|
34178
|
+
fC.unbind(window, "mousemove", l2), fC.unbind(window, "mouseup", u2), a2();
|
|
34108
34179
|
}
|
|
34109
|
-
return r3.__input = document.createElement("input"), r3.__input.setAttribute("type", "text"),
|
|
34180
|
+
return r3.__input = document.createElement("input"), r3.__input.setAttribute("type", "text"), fC.bind(r3.__input, "change", function() {
|
|
34110
34181
|
var t5 = parseFloat(o2.__input.value);
|
|
34111
|
-
|
|
34112
|
-
}),
|
|
34182
|
+
YP.isNaN(t5) || o2.setValue(t5);
|
|
34183
|
+
}), fC.bind(r3.__input, "blur", function() {
|
|
34113
34184
|
a2();
|
|
34114
|
-
}),
|
|
34115
|
-
|
|
34116
|
-
}),
|
|
34185
|
+
}), fC.bind(r3.__input, "mousedown", function(t5) {
|
|
34186
|
+
fC.bind(window, "mousemove", l2), fC.bind(window, "mouseup", u2), s3 = t5.clientY;
|
|
34187
|
+
}), fC.bind(r3.__input, "keydown", function(t5) {
|
|
34117
34188
|
t5.keyCode === 13 && (o2.__truncationSuspended = true, this.blur(), o2.__truncationSuspended = false, a2());
|
|
34118
34189
|
}), r3.updateDisplay(), r3.domElement.appendChild(r3.__input), r3;
|
|
34119
34190
|
}
|
|
34120
|
-
return
|
|
34191
|
+
return oC(e3, t3), iC(e3, [{ key: "updateDisplay", value: function() {
|
|
34121
34192
|
var t4, n3, i3;
|
|
34122
|
-
return this.__input.value = this.__truncationSuspended ? this.getValue() : (t4 = this.getValue(), n3 = this.__precision, i3 = Math.pow(10, n3), Math.round(t4 * i3) / i3),
|
|
34193
|
+
return this.__input.value = this.__truncationSuspended ? this.getValue() : (t4 = this.getValue(), n3 = this.__precision, i3 = Math.pow(10, n3), Math.round(t4 * i3) / i3), rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
|
|
34123
34194
|
} }]), e3;
|
|
34124
|
-
}(
|
|
34125
|
-
function
|
|
34195
|
+
}(yC);
|
|
34196
|
+
function bC(t3, e3, n3, i3, r3) {
|
|
34126
34197
|
return i3 + (t3 - e3) / (n3 - e3) * (r3 - i3);
|
|
34127
34198
|
}
|
|
34128
|
-
var
|
|
34199
|
+
var TC = function(t3) {
|
|
34129
34200
|
function e3(t4, n3, i3, r3, o2) {
|
|
34130
|
-
|
|
34131
|
-
var s3 =
|
|
34201
|
+
nC(this, e3);
|
|
34202
|
+
var s3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3, { min: i3, max: r3, step: o2 })), a2 = s3;
|
|
34132
34203
|
function l2(t5) {
|
|
34133
34204
|
t5.preventDefault();
|
|
34134
34205
|
var e4 = a2.__background.getBoundingClientRect();
|
|
34135
|
-
return a2.setValue(
|
|
34206
|
+
return a2.setValue(bC(t5.clientX, e4.left, e4.right, a2.__min, a2.__max)), false;
|
|
34136
34207
|
}
|
|
34137
34208
|
function u2() {
|
|
34138
|
-
|
|
34209
|
+
fC.unbind(window, "mousemove", l2), fC.unbind(window, "mouseup", u2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
|
|
34139
34210
|
}
|
|
34140
34211
|
function h2(t5) {
|
|
34141
34212
|
var e4 = t5.touches[0].clientX, n4 = a2.__background.getBoundingClientRect();
|
|
34142
|
-
a2.setValue(
|
|
34213
|
+
a2.setValue(bC(e4, n4.left, n4.right, a2.__min, a2.__max));
|
|
34143
34214
|
}
|
|
34144
34215
|
function c2() {
|
|
34145
|
-
|
|
34216
|
+
fC.unbind(window, "touchmove", h2), fC.unbind(window, "touchend", c2), a2.__onFinishChange && a2.__onFinishChange.call(a2, a2.getValue());
|
|
34146
34217
|
}
|
|
34147
|
-
return s3.__background = document.createElement("div"), s3.__foreground = document.createElement("div"),
|
|
34148
|
-
document.activeElement.blur(),
|
|
34149
|
-
}),
|
|
34218
|
+
return s3.__background = document.createElement("div"), s3.__foreground = document.createElement("div"), fC.bind(s3.__background, "mousedown", function(t5) {
|
|
34219
|
+
document.activeElement.blur(), fC.bind(window, "mousemove", l2), fC.bind(window, "mouseup", u2), l2(t5);
|
|
34220
|
+
}), fC.bind(s3.__background, "touchstart", function(t5) {
|
|
34150
34221
|
if (t5.touches.length !== 1)
|
|
34151
34222
|
return;
|
|
34152
|
-
|
|
34153
|
-
}),
|
|
34223
|
+
fC.bind(window, "touchmove", h2), fC.bind(window, "touchend", c2), h2(t5);
|
|
34224
|
+
}), fC.addClass(s3.__background, "slider"), fC.addClass(s3.__foreground, "slider-fg"), s3.updateDisplay(), s3.__background.appendChild(s3.__foreground), s3.domElement.appendChild(s3.__background), s3;
|
|
34154
34225
|
}
|
|
34155
|
-
return
|
|
34226
|
+
return oC(e3, t3), iC(e3, [{ key: "updateDisplay", value: function() {
|
|
34156
34227
|
var t4 = (this.getValue() - this.__min) / (this.__max - this.__min);
|
|
34157
|
-
return this.__foreground.style.width = 100 * t4 + "%",
|
|
34228
|
+
return this.__foreground.style.width = 100 * t4 + "%", rC(e3.prototype.__proto__ || Object.getPrototypeOf(e3.prototype), "updateDisplay", this).call(this);
|
|
34158
34229
|
} }]), e3;
|
|
34159
|
-
}(
|
|
34230
|
+
}(yC), wC = function(t3) {
|
|
34160
34231
|
function e3(t4, n3, i3) {
|
|
34161
|
-
|
|
34162
|
-
var r3 =
|
|
34163
|
-
return r3.__button = document.createElement("div"), r3.__button.innerHTML = i3 === void 0 ? "Fire" : i3,
|
|
34232
|
+
nC(this, e3);
|
|
34233
|
+
var r3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3)), o2 = r3;
|
|
34234
|
+
return r3.__button = document.createElement("div"), r3.__button.innerHTML = i3 === void 0 ? "Fire" : i3, fC.bind(r3.__button, "click", function(t5) {
|
|
34164
34235
|
return t5.preventDefault(), o2.fire(), false;
|
|
34165
|
-
}),
|
|
34236
|
+
}), fC.addClass(r3.__button, "button"), r3.domElement.appendChild(r3.__button), r3;
|
|
34166
34237
|
}
|
|
34167
|
-
return
|
|
34238
|
+
return oC(e3, t3), iC(e3, [{ key: "fire", value: function() {
|
|
34168
34239
|
this.__onChange && this.__onChange.call(this), this.getValue().call(this.object), this.__onFinishChange && this.__onFinishChange.call(this, this.getValue());
|
|
34169
34240
|
} }]), e3;
|
|
34170
|
-
}(
|
|
34241
|
+
}(hC), SC = function(t3) {
|
|
34171
34242
|
function e3(t4, n3) {
|
|
34172
|
-
|
|
34173
|
-
var i3 =
|
|
34174
|
-
i3.__color = new
|
|
34243
|
+
nC(this, e3);
|
|
34244
|
+
var i3 = sC(this, (e3.__proto__ || Object.getPrototypeOf(e3)).call(this, t4, n3));
|
|
34245
|
+
i3.__color = new aC(i3.getValue()), i3.__temp = new aC(0);
|
|
34175
34246
|
var r3 = i3;
|
|
34176
|
-
i3.domElement = document.createElement("div"),
|
|
34247
|
+
i3.domElement = document.createElement("div"), fC.makeSelectable(i3.domElement, false), i3.__selector = document.createElement("div"), i3.__selector.className = "selector", i3.__saturation_field = document.createElement("div"), i3.__saturation_field.className = "saturation-field", i3.__field_knob = document.createElement("div"), i3.__field_knob.className = "field-knob", i3.__field_knob_border = "2px solid ", i3.__hue_knob = document.createElement("div"), i3.__hue_knob.className = "hue-knob", i3.__hue_field = document.createElement("div"), i3.__hue_field.className = "hue-field", i3.__input = document.createElement("input"), i3.__input.type = "text", i3.__input_textShadow = "0 1px 1px ", fC.bind(i3.__input, "keydown", function(t5) {
|
|
34177
34248
|
t5.keyCode === 13 && c2.call(this);
|
|
34178
|
-
}),
|
|
34179
|
-
|
|
34180
|
-
|
|
34249
|
+
}), fC.bind(i3.__input, "blur", c2), fC.bind(i3.__selector, "mousedown", function() {
|
|
34250
|
+
fC.addClass(this, "drag").bind(window, "mouseup", function() {
|
|
34251
|
+
fC.removeClass(r3.__selector, "drag");
|
|
34181
34252
|
});
|
|
34182
|
-
}),
|
|
34183
|
-
|
|
34184
|
-
|
|
34253
|
+
}), fC.bind(i3.__selector, "touchstart", function() {
|
|
34254
|
+
fC.addClass(this, "drag").bind(window, "touchend", function() {
|
|
34255
|
+
fC.removeClass(r3.__selector, "drag");
|
|
34185
34256
|
});
|
|
34186
34257
|
});
|
|
34187
34258
|
var o2, s3 = document.createElement("div");
|
|
34188
34259
|
function a2(t5) {
|
|
34189
|
-
p2(t5),
|
|
34260
|
+
p2(t5), fC.bind(window, "mousemove", p2), fC.bind(window, "touchmove", p2), fC.bind(window, "mouseup", u2), fC.bind(window, "touchend", u2);
|
|
34190
34261
|
}
|
|
34191
34262
|
function l2(t5) {
|
|
34192
|
-
f2(t5),
|
|
34263
|
+
f2(t5), fC.bind(window, "mousemove", f2), fC.bind(window, "touchmove", f2), fC.bind(window, "mouseup", h2), fC.bind(window, "touchend", h2);
|
|
34193
34264
|
}
|
|
34194
34265
|
function u2() {
|
|
34195
|
-
|
|
34266
|
+
fC.unbind(window, "mousemove", p2), fC.unbind(window, "touchmove", p2), fC.unbind(window, "mouseup", u2), fC.unbind(window, "touchend", u2), d2();
|
|
34196
34267
|
}
|
|
34197
34268
|
function h2() {
|
|
34198
|
-
|
|
34269
|
+
fC.unbind(window, "mousemove", f2), fC.unbind(window, "touchmove", f2), fC.unbind(window, "mouseup", h2), fC.unbind(window, "touchend", h2), d2();
|
|
34199
34270
|
}
|
|
34200
34271
|
function c2() {
|
|
34201
|
-
var t5 =
|
|
34272
|
+
var t5 = KP(this.value);
|
|
34202
34273
|
t5 !== false ? (r3.__color.__state = t5, r3.setValue(r3.__color.toOriginal())) : this.value = r3.__color.toString();
|
|
34203
34274
|
}
|
|
34204
34275
|
function d2() {
|
|
@@ -34214,28 +34285,28 @@ void main(void){
|
|
|
34214
34285
|
var e4 = r3.__hue_field.getBoundingClientRect(), n4 = 1 - ((t5.touches && t5.touches[0] || t5).clientY - e4.top) / (e4.bottom - e4.top);
|
|
34215
34286
|
return n4 > 1 ? n4 = 1 : n4 < 0 && (n4 = 0), r3.__color.h = 360 * n4, r3.setValue(r3.__color.toOriginal()), false;
|
|
34216
34287
|
}
|
|
34217
|
-
return
|
|
34288
|
+
return YP.extend(i3.__selector.style, { width: "122px", height: "102px", padding: "3px", backgroundColor: "#222", boxShadow: "0px 1px 3px rgba(0,0,0,0.3)" }), YP.extend(i3.__field_knob.style, { position: "absolute", width: "12px", height: "12px", border: i3.__field_knob_border + (i3.__color.v < 0.5 ? "#fff" : "#000"), boxShadow: "0px 1px 3px rgba(0,0,0,0.5)", borderRadius: "12px", zIndex: 1 }), YP.extend(i3.__hue_knob.style, { position: "absolute", width: "15px", height: "2px", borderRight: "4px solid #fff", zIndex: 1 }), YP.extend(i3.__saturation_field.style, { width: "100px", height: "100px", border: "1px solid #555", marginRight: "3px", display: "inline-block", cursor: "pointer" }), YP.extend(s3.style, { width: "100%", height: "100%", background: "none" }), MC(s3, "top", "rgba(0,0,0,0)", "#000"), YP.extend(i3.__hue_field.style, { width: "15px", height: "100px", border: "1px solid #555", cursor: "ns-resize", position: "absolute", top: "3px", right: "3px" }), (o2 = i3.__hue_field).style.background = "", o2.style.cssText += "background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);", o2.style.cssText += "background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", o2.style.cssText += "background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);", YP.extend(i3.__input.style, { outline: "none", textAlign: "center", color: "#fff", border: 0, fontWeight: "bold", textShadow: i3.__input_textShadow + "rgba(0,0,0,0.7)" }), fC.bind(i3.__saturation_field, "mousedown", a2), fC.bind(i3.__saturation_field, "touchstart", a2), fC.bind(i3.__field_knob, "mousedown", a2), fC.bind(i3.__field_knob, "touchstart", a2), fC.bind(i3.__hue_field, "mousedown", l2), fC.bind(i3.__hue_field, "touchstart", l2), i3.__saturation_field.appendChild(s3), i3.__selector.appendChild(i3.__field_knob), i3.__selector.appendChild(i3.__saturation_field), i3.__selector.appendChild(i3.__hue_field), i3.__hue_field.appendChild(i3.__hue_knob), i3.domElement.appendChild(i3.__input), i3.domElement.appendChild(i3.__selector), i3.updateDisplay(), i3;
|
|
34218
34289
|
}
|
|
34219
|
-
return
|
|
34220
|
-
var t4 =
|
|
34290
|
+
return oC(e3, t3), iC(e3, [{ key: "updateDisplay", value: function() {
|
|
34291
|
+
var t4 = KP(this.getValue());
|
|
34221
34292
|
if (t4 !== false) {
|
|
34222
34293
|
var e4 = false;
|
|
34223
|
-
|
|
34224
|
-
if (!
|
|
34294
|
+
YP.each(aC.COMPONENTS, function(n4) {
|
|
34295
|
+
if (!YP.isUndefined(t4[n4]) && !YP.isUndefined(this.__color.__state[n4]) && t4[n4] !== this.__color.__state[n4])
|
|
34225
34296
|
return e4 = true, {};
|
|
34226
|
-
}, this), e4 &&
|
|
34297
|
+
}, this), e4 && YP.extend(this.__color.__state, t4);
|
|
34227
34298
|
}
|
|
34228
|
-
|
|
34299
|
+
YP.extend(this.__temp.__state, this.__color.__state), this.__temp.a = 1;
|
|
34229
34300
|
var n3 = this.__color.v < 0.5 || this.__color.s > 0.5 ? 255 : 0, i3 = 255 - n3;
|
|
34230
|
-
|
|
34301
|
+
YP.extend(this.__field_knob.style, { marginLeft: 100 * this.__color.s - 7 + "px", marginTop: 100 * (1 - this.__color.v) - 7 + "px", backgroundColor: this.__temp.toHexString(), border: this.__field_knob_border + "rgb(" + n3 + "," + n3 + "," + n3 + ")" }), this.__hue_knob.style.marginTop = 100 * (1 - this.__color.h / 360) + "px", this.__temp.s = 1, this.__temp.v = 1, MC(this.__saturation_field, "left", "#fff", this.__temp.toHexString()), this.__input.value = this.__color.toString(), YP.extend(this.__input.style, { backgroundColor: this.__color.toHexString(), color: "rgb(" + n3 + "," + n3 + "," + n3 + ")", textShadow: this.__input_textShadow + "rgba(" + i3 + "," + i3 + "," + i3 + ",.7)" });
|
|
34231
34302
|
} }]), e3;
|
|
34232
|
-
}(
|
|
34233
|
-
function
|
|
34234
|
-
t3.style.background = "",
|
|
34303
|
+
}(hC), EC = ["-moz-", "-o-", "-webkit-", "-ms-", ""];
|
|
34304
|
+
function MC(t3, e3, n3, i3) {
|
|
34305
|
+
t3.style.background = "", YP.each(EC, function(r3) {
|
|
34235
34306
|
t3.style.cssText += "background: " + r3 + "linear-gradient(" + e3 + ", " + n3 + " 0%, " + i3 + " 100%); ";
|
|
34236
34307
|
});
|
|
34237
34308
|
}
|
|
34238
|
-
var
|
|
34309
|
+
var AC = function(t3, e3) {
|
|
34239
34310
|
var n3 = e3 || document, i3 = document.createElement("style");
|
|
34240
34311
|
i3.type = "text/css", i3.innerHTML = t3;
|
|
34241
34312
|
var r3 = n3.getElementsByTagName("head")[0];
|
|
@@ -34243,7 +34314,7 @@ void main(void){
|
|
|
34243
34314
|
r3.appendChild(i3);
|
|
34244
34315
|
} catch (t4) {
|
|
34245
34316
|
}
|
|
34246
|
-
},
|
|
34317
|
+
}, RC = `<div id="dg-save" class="dg dialogue">
|
|
34247
34318
|
|
|
34248
34319
|
Here's the new load parameter for your <code>GUI</code>'s constructor:
|
|
34249
34320
|
|
|
@@ -34263,50 +34334,50 @@ void main(void){
|
|
|
34263
34334
|
|
|
34264
34335
|
</div>
|
|
34265
34336
|
|
|
34266
|
-
</div>`,
|
|
34337
|
+
</div>`, PC = function(t3, e3) {
|
|
34267
34338
|
var n3 = t3[e3];
|
|
34268
|
-
return
|
|
34339
|
+
return YP.isArray(arguments[2]) || YP.isObject(arguments[2]) ? new gC(t3, e3, arguments[2]) : YP.isNumber(n3) ? YP.isNumber(arguments[2]) && YP.isNumber(arguments[3]) ? YP.isNumber(arguments[4]) ? new TC(t3, e3, arguments[2], arguments[3], arguments[4]) : new TC(t3, e3, arguments[2], arguments[3]) : YP.isNumber(arguments[4]) ? new xC(t3, e3, { min: arguments[2], max: arguments[3], step: arguments[4] }) : new xC(t3, e3, { min: arguments[2], max: arguments[3] }) : YP.isString(n3) ? new vC(t3, e3) : YP.isFunction(n3) ? new wC(t3, e3, "") : YP.isBoolean(n3) ? new mC(t3, e3) : null;
|
|
34269
34340
|
};
|
|
34270
|
-
var
|
|
34341
|
+
var CC = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(t3) {
|
|
34271
34342
|
setTimeout(t3, 1e3 / 60);
|
|
34272
|
-
},
|
|
34343
|
+
}, IC = function() {
|
|
34273
34344
|
function t3() {
|
|
34274
|
-
|
|
34345
|
+
nC(this, t3), this.backgroundElement = document.createElement("div"), YP.extend(this.backgroundElement.style, { backgroundColor: "rgba(0,0,0,0.8)", top: 0, left: 0, display: "none", zIndex: "1000", opacity: 0, WebkitTransition: "opacity 0.2s linear", transition: "opacity 0.2s linear" }), fC.makeFullscreen(this.backgroundElement), this.backgroundElement.style.position = "fixed", this.domElement = document.createElement("div"), YP.extend(this.domElement.style, { position: "fixed", display: "none", zIndex: "1001", opacity: 0, WebkitTransition: "-webkit-transform 0.2s ease-out, opacity 0.2s linear", transition: "transform 0.2s ease-out, opacity 0.2s linear" }), document.body.appendChild(this.backgroundElement), document.body.appendChild(this.domElement);
|
|
34275
34346
|
var e3 = this;
|
|
34276
|
-
|
|
34347
|
+
fC.bind(this.backgroundElement, "click", function() {
|
|
34277
34348
|
e3.hide();
|
|
34278
34349
|
});
|
|
34279
34350
|
}
|
|
34280
|
-
return
|
|
34351
|
+
return iC(t3, [{ key: "show", value: function() {
|
|
34281
34352
|
var t4 = this;
|
|
34282
|
-
this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(),
|
|
34353
|
+
this.backgroundElement.style.display = "block", this.domElement.style.display = "block", this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)", this.layout(), YP.defer(function() {
|
|
34283
34354
|
t4.backgroundElement.style.opacity = 1, t4.domElement.style.opacity = 1, t4.domElement.style.webkitTransform = "scale(1)";
|
|
34284
34355
|
});
|
|
34285
34356
|
} }, { key: "hide", value: function() {
|
|
34286
34357
|
var t4 = this, e3 = function e4() {
|
|
34287
|
-
t4.domElement.style.display = "none", t4.backgroundElement.style.display = "none",
|
|
34358
|
+
t4.domElement.style.display = "none", t4.backgroundElement.style.display = "none", fC.unbind(t4.domElement, "webkitTransitionEnd", e4), fC.unbind(t4.domElement, "transitionend", e4), fC.unbind(t4.domElement, "oTransitionEnd", e4);
|
|
34288
34359
|
};
|
|
34289
|
-
|
|
34360
|
+
fC.bind(this.domElement, "webkitTransitionEnd", e3), fC.bind(this.domElement, "transitionend", e3), fC.bind(this.domElement, "oTransitionEnd", e3), this.backgroundElement.style.opacity = 0, this.domElement.style.opacity = 0, this.domElement.style.webkitTransform = "scale(1.1)";
|
|
34290
34361
|
} }, { key: "layout", value: function() {
|
|
34291
|
-
this.domElement.style.left = window.innerWidth / 2 -
|
|
34362
|
+
this.domElement.style.left = window.innerWidth / 2 - fC.getWidth(this.domElement) / 2 + "px", this.domElement.style.top = window.innerHeight / 2 - fC.getHeight(this.domElement) / 2 + "px";
|
|
34292
34363
|
} }]), t3;
|
|
34293
34364
|
}();
|
|
34294
|
-
|
|
34365
|
+
AC(function(t3) {
|
|
34295
34366
|
if (t3 && typeof window != "undefined") {
|
|
34296
34367
|
var e3 = document.createElement("style");
|
|
34297
34368
|
return e3.setAttribute("type", "text/css"), e3.innerHTML = t3, document.head.appendChild(e3), t3;
|
|
34298
34369
|
}
|
|
34299
34370
|
}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n"));
|
|
34300
|
-
var
|
|
34371
|
+
var OC = function() {
|
|
34301
34372
|
try {
|
|
34302
34373
|
return !!window.localStorage;
|
|
34303
34374
|
} catch (t3) {
|
|
34304
34375
|
return false;
|
|
34305
34376
|
}
|
|
34306
|
-
}(),
|
|
34377
|
+
}(), LC = void 0, NC = true, DC = void 0, FC = false, BC = [], UC = function t3(e3) {
|
|
34307
34378
|
var n3 = this, i3 = e3 || {};
|
|
34308
|
-
this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul),
|
|
34309
|
-
var r3, o2 =
|
|
34379
|
+
this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), fC.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], i3 = YP.defaults(i3, { closeOnTop: false, autoPlace: true, width: t3.DEFAULT_WIDTH }), i3 = YP.defaults(i3, { resizable: i3.autoPlace, hideable: i3.autoPlace }), YP.isUndefined(i3.load) ? i3.load = { preset: "Default" } : i3.preset && (i3.load.preset = i3.preset), YP.isUndefined(i3.parent) && i3.hideable && BC.push(this), i3.resizable = YP.isUndefined(i3.parent) && i3.resizable, i3.autoPlace && YP.isUndefined(i3.scrollable) && (i3.scrollable = true);
|
|
34380
|
+
var r3, o2 = OC && localStorage.getItem(VC(this, "isLocal")) === "true", s3 = void 0, a2 = void 0;
|
|
34310
34381
|
if (Object.defineProperties(this, { parent: { get: function() {
|
|
34311
34382
|
return i3.parent;
|
|
34312
34383
|
} }, scrollable: { get: function() {
|
|
@@ -34325,7 +34396,7 @@ void main(void){
|
|
|
34325
34396
|
} }, width: { get: function() {
|
|
34326
34397
|
return i3.width;
|
|
34327
34398
|
}, set: function(t4) {
|
|
34328
|
-
i3.width = t4,
|
|
34399
|
+
i3.width = t4, ZC(n3, t4);
|
|
34329
34400
|
} }, name: { get: function() {
|
|
34330
34401
|
return i3.name;
|
|
34331
34402
|
}, set: function(t4) {
|
|
@@ -34333,50 +34404,50 @@ void main(void){
|
|
|
34333
34404
|
} }, closed: { get: function() {
|
|
34334
34405
|
return i3.closed;
|
|
34335
34406
|
}, set: function(e4) {
|
|
34336
|
-
i3.closed = e4, i3.closed ?
|
|
34407
|
+
i3.closed = e4, i3.closed ? fC.addClass(n3.__ul, t3.CLASS_CLOSED) : fC.removeClass(n3.__ul, t3.CLASS_CLOSED), this.onResize(), n3.__closeButton && (n3.__closeButton.innerHTML = e4 ? t3.TEXT_OPEN : t3.TEXT_CLOSED);
|
|
34337
34408
|
} }, load: { get: function() {
|
|
34338
34409
|
return i3.load;
|
|
34339
34410
|
} }, useLocalStorage: { get: function() {
|
|
34340
34411
|
return o2;
|
|
34341
34412
|
}, set: function(t4) {
|
|
34342
|
-
|
|
34343
|
-
} } }),
|
|
34344
|
-
if (this.closed = i3.closed || false,
|
|
34413
|
+
OC && (o2 = t4, t4 ? fC.bind(window, "unload", s3) : fC.unbind(window, "unload", s3), localStorage.setItem(VC(n3, "isLocal"), t4));
|
|
34414
|
+
} } }), YP.isUndefined(i3.parent)) {
|
|
34415
|
+
if (this.closed = i3.closed || false, fC.addClass(this.domElement, t3.CLASS_MAIN), fC.makeSelectable(this.domElement, false), OC && o2) {
|
|
34345
34416
|
n3.useLocalStorage = true;
|
|
34346
|
-
var l2 = localStorage.getItem(
|
|
34417
|
+
var l2 = localStorage.getItem(VC(this, "gui"));
|
|
34347
34418
|
l2 && (i3.load = JSON.parse(l2));
|
|
34348
34419
|
}
|
|
34349
|
-
this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t3.TEXT_CLOSED,
|
|
34420
|
+
this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t3.TEXT_CLOSED, fC.addClass(this.__closeButton, t3.CLASS_CLOSE_BUTTON), i3.closeOnTop ? (fC.addClass(this.__closeButton, t3.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (fC.addClass(this.__closeButton, t3.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), fC.bind(this.__closeButton, "click", function() {
|
|
34350
34421
|
n3.closed = !n3.closed;
|
|
34351
34422
|
});
|
|
34352
34423
|
} else {
|
|
34353
34424
|
i3.closed === void 0 && (i3.closed = true);
|
|
34354
34425
|
var u2 = document.createTextNode(i3.name);
|
|
34355
|
-
|
|
34356
|
-
|
|
34426
|
+
fC.addClass(u2, "controller-name"), a2 = kC(n3, u2);
|
|
34427
|
+
fC.addClass(this.__ul, t3.CLASS_CLOSED), fC.addClass(a2, "title"), fC.bind(a2, "click", function(t4) {
|
|
34357
34428
|
return t4.preventDefault(), n3.closed = !n3.closed, false;
|
|
34358
34429
|
}), i3.closed || (this.closed = false);
|
|
34359
34430
|
}
|
|
34360
|
-
i3.autoPlace && (
|
|
34431
|
+
i3.autoPlace && (YP.isUndefined(i3.parent) && (NC && (DC = document.createElement("div"), fC.addClass(DC, "dg"), fC.addClass(DC, t3.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(DC), NC = false), DC.appendChild(this.domElement), fC.addClass(this.domElement, t3.CLASS_AUTO_PLACE)), this.parent || ZC(n3, i3.width)), this.__resizeHandler = function() {
|
|
34361
34432
|
n3.onResizeDebounced();
|
|
34362
|
-
},
|
|
34363
|
-
|
|
34364
|
-
}, this.saveToLocalStorageIfPossible = s3, i3.parent || ((r3 = n3.getRoot()).width += 1,
|
|
34433
|
+
}, fC.bind(window, "resize", this.__resizeHandler), fC.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), fC.bind(this.__ul, "transitionend", this.__resizeHandler), fC.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), i3.resizable && YC(this), s3 = function() {
|
|
34434
|
+
OC && localStorage.getItem(VC(n3, "isLocal")) === "true" && localStorage.setItem(VC(n3, "gui"), JSON.stringify(n3.getSaveObject()));
|
|
34435
|
+
}, this.saveToLocalStorageIfPossible = s3, i3.parent || ((r3 = n3.getRoot()).width += 1, YP.defer(function() {
|
|
34365
34436
|
r3.width -= 1;
|
|
34366
34437
|
}));
|
|
34367
34438
|
};
|
|
34368
|
-
function
|
|
34439
|
+
function kC(t3, e3, n3) {
|
|
34369
34440
|
var i3 = document.createElement("li");
|
|
34370
34441
|
return e3 && i3.appendChild(e3), n3 ? t3.__ul.insertBefore(i3, n3) : t3.__ul.appendChild(i3), t3.onResize(), i3;
|
|
34371
34442
|
}
|
|
34372
|
-
function
|
|
34373
|
-
|
|
34443
|
+
function GC(t3) {
|
|
34444
|
+
fC.unbind(window, "resize", t3.__resizeHandler), t3.saveToLocalStorageIfPossible && fC.unbind(window, "unload", t3.saveToLocalStorageIfPossible);
|
|
34374
34445
|
}
|
|
34375
|
-
function
|
|
34446
|
+
function HC(t3, e3) {
|
|
34376
34447
|
var n3 = t3.__preset_select[t3.__preset_select.selectedIndex];
|
|
34377
34448
|
n3.innerHTML = e3 ? n3.value + "*" : n3.value;
|
|
34378
34449
|
}
|
|
34379
|
-
function
|
|
34450
|
+
function zC(t3, e3) {
|
|
34380
34451
|
var n3 = t3.getRoot(), i3 = n3.__rememberedObjects.indexOf(e3.object);
|
|
34381
34452
|
if (i3 !== -1) {
|
|
34382
34453
|
var r3 = n3.__rememberedObjectIndecesToControllers[i3];
|
|
@@ -34396,31 +34467,31 @@ void main(void){
|
|
|
34396
34467
|
}
|
|
34397
34468
|
}
|
|
34398
34469
|
}
|
|
34399
|
-
function
|
|
34470
|
+
function jC(t3, e3, n3, i3) {
|
|
34400
34471
|
if (e3[n3] === void 0)
|
|
34401
34472
|
throw new Error('Object "' + e3 + '" has no property "' + n3 + '"');
|
|
34402
34473
|
var r3 = void 0;
|
|
34403
34474
|
if (i3.color)
|
|
34404
|
-
r3 = new
|
|
34475
|
+
r3 = new SC(e3, n3);
|
|
34405
34476
|
else {
|
|
34406
34477
|
var o2 = [e3, n3].concat(i3.factoryArgs);
|
|
34407
|
-
r3 =
|
|
34478
|
+
r3 = PC.apply(t3, o2);
|
|
34408
34479
|
}
|
|
34409
|
-
i3.before instanceof
|
|
34480
|
+
i3.before instanceof hC && (i3.before = i3.before.__li), zC(t3, r3), fC.addClass(r3.domElement, "c");
|
|
34410
34481
|
var s3 = document.createElement("span");
|
|
34411
|
-
|
|
34482
|
+
fC.addClass(s3, "property-name"), s3.innerHTML = r3.property;
|
|
34412
34483
|
var a2 = document.createElement("div");
|
|
34413
34484
|
a2.appendChild(s3), a2.appendChild(r3.domElement);
|
|
34414
|
-
var l2 =
|
|
34415
|
-
return
|
|
34416
|
-
if (n4.__li = e4, n4.__gui = t4,
|
|
34485
|
+
var l2 = kC(t3, a2, i3.before);
|
|
34486
|
+
return fC.addClass(l2, UC.CLASS_CONTROLLER_ROW), r3 instanceof SC ? fC.addClass(l2, "color") : fC.addClass(l2, eC(r3.getValue())), function(t4, e4, n4) {
|
|
34487
|
+
if (n4.__li = e4, n4.__gui = t4, YP.extend(n4, { options: function(e5) {
|
|
34417
34488
|
if (arguments.length > 1) {
|
|
34418
34489
|
var i5 = n4.__li.nextElementSibling;
|
|
34419
|
-
return n4.remove(),
|
|
34490
|
+
return n4.remove(), jC(t4, n4.object, n4.property, { before: i5, factoryArgs: [YP.toArray(arguments)] });
|
|
34420
34491
|
}
|
|
34421
|
-
if (
|
|
34492
|
+
if (YP.isArray(e5) || YP.isObject(e5)) {
|
|
34422
34493
|
var r5 = n4.__li.nextElementSibling;
|
|
34423
|
-
return n4.remove(),
|
|
34494
|
+
return n4.remove(), jC(t4, n4.object, n4.property, { before: r5, factoryArgs: [e5] });
|
|
34424
34495
|
}
|
|
34425
34496
|
}, name: function(t5) {
|
|
34426
34497
|
return n4.__li.firstElementChild.firstElementChild.innerHTML = t5, n4;
|
|
@@ -34428,157 +34499,157 @@ void main(void){
|
|
|
34428
34499
|
return n4.__gui.listen(n4), n4;
|
|
34429
34500
|
}, remove: function() {
|
|
34430
34501
|
return n4.__gui.remove(n4), n4;
|
|
34431
|
-
} }), n4 instanceof
|
|
34432
|
-
var i4 = new
|
|
34433
|
-
|
|
34502
|
+
} }), n4 instanceof TC) {
|
|
34503
|
+
var i4 = new xC(n4.object, n4.property, { min: n4.__min, max: n4.__max, step: n4.__step });
|
|
34504
|
+
YP.each(["updateDisplay", "onChange", "onFinishChange", "step", "min", "max"], function(t5) {
|
|
34434
34505
|
var e5 = n4[t5], r5 = i4[t5];
|
|
34435
34506
|
n4[t5] = i4[t5] = function() {
|
|
34436
34507
|
var t6 = Array.prototype.slice.call(arguments);
|
|
34437
34508
|
return r5.apply(i4, t6), e5.apply(n4, t6);
|
|
34438
34509
|
};
|
|
34439
|
-
}),
|
|
34440
|
-
} else if (n4 instanceof
|
|
34510
|
+
}), fC.addClass(e4, "has-slider"), n4.domElement.insertBefore(i4.domElement, n4.domElement.firstElementChild);
|
|
34511
|
+
} else if (n4 instanceof xC) {
|
|
34441
34512
|
var r4 = function(e5) {
|
|
34442
|
-
if (
|
|
34513
|
+
if (YP.isNumber(n4.__min) && YP.isNumber(n4.__max)) {
|
|
34443
34514
|
var i5 = n4.__li.firstElementChild.firstElementChild.innerHTML, r5 = n4.__gui.__listening.indexOf(n4) > -1;
|
|
34444
34515
|
n4.remove();
|
|
34445
|
-
var o3 =
|
|
34516
|
+
var o3 = jC(t4, n4.object, n4.property, { before: n4.__li.nextElementSibling, factoryArgs: [n4.__min, n4.__max, n4.__step] });
|
|
34446
34517
|
return o3.name(i5), r5 && o3.listen(), o3;
|
|
34447
34518
|
}
|
|
34448
34519
|
return e5;
|
|
34449
34520
|
};
|
|
34450
|
-
n4.min =
|
|
34521
|
+
n4.min = YP.compose(r4, n4.min), n4.max = YP.compose(r4, n4.max);
|
|
34451
34522
|
} else
|
|
34452
|
-
n4 instanceof
|
|
34453
|
-
|
|
34454
|
-
}),
|
|
34523
|
+
n4 instanceof mC ? (fC.bind(e4, "click", function() {
|
|
34524
|
+
fC.fakeEvent(n4.__checkbox, "click");
|
|
34525
|
+
}), fC.bind(n4.__checkbox, "click", function(t5) {
|
|
34455
34526
|
t5.stopPropagation();
|
|
34456
|
-
})) : n4 instanceof
|
|
34457
|
-
|
|
34458
|
-
}),
|
|
34459
|
-
|
|
34460
|
-
}),
|
|
34461
|
-
|
|
34462
|
-
})) : n4 instanceof
|
|
34527
|
+
})) : n4 instanceof wC ? (fC.bind(e4, "click", function() {
|
|
34528
|
+
fC.fakeEvent(n4.__button, "click");
|
|
34529
|
+
}), fC.bind(e4, "mouseover", function() {
|
|
34530
|
+
fC.addClass(n4.__button, "hover");
|
|
34531
|
+
}), fC.bind(e4, "mouseout", function() {
|
|
34532
|
+
fC.removeClass(n4.__button, "hover");
|
|
34533
|
+
})) : n4 instanceof SC && (fC.addClass(e4, "color"), n4.updateDisplay = YP.compose(function(t5) {
|
|
34463
34534
|
return e4.style.borderLeftColor = n4.__color.toString(), t5;
|
|
34464
34535
|
}, n4.updateDisplay), n4.updateDisplay());
|
|
34465
|
-
n4.setValue =
|
|
34466
|
-
return t4.getRoot().__preset_select && n4.isModified() &&
|
|
34536
|
+
n4.setValue = YP.compose(function(e5) {
|
|
34537
|
+
return t4.getRoot().__preset_select && n4.isModified() && HC(t4.getRoot(), true), e5;
|
|
34467
34538
|
}, n4.setValue);
|
|
34468
34539
|
}(t3, l2, r3), t3.__controllers.push(r3), r3;
|
|
34469
34540
|
}
|
|
34470
|
-
function
|
|
34541
|
+
function VC(t3, e3) {
|
|
34471
34542
|
return document.location.href + "." + e3;
|
|
34472
34543
|
}
|
|
34473
|
-
function
|
|
34544
|
+
function WC(t3, e3, n3) {
|
|
34474
34545
|
var i3 = document.createElement("option");
|
|
34475
34546
|
i3.innerHTML = e3, i3.value = e3, t3.__preset_select.appendChild(i3), n3 && (t3.__preset_select.selectedIndex = t3.__preset_select.length - 1);
|
|
34476
34547
|
}
|
|
34477
|
-
function
|
|
34548
|
+
function XC(t3, e3) {
|
|
34478
34549
|
e3.style.display = t3.useLocalStorage ? "block" : "none";
|
|
34479
34550
|
}
|
|
34480
|
-
function
|
|
34551
|
+
function qC(t3) {
|
|
34481
34552
|
var e3 = t3.__save_row = document.createElement("li");
|
|
34482
|
-
|
|
34553
|
+
fC.addClass(t3.domElement, "has-save"), t3.__ul.insertBefore(e3, t3.__ul.firstChild), fC.addClass(e3, "save-row");
|
|
34483
34554
|
var n3 = document.createElement("span");
|
|
34484
|
-
n3.innerHTML = " ",
|
|
34555
|
+
n3.innerHTML = " ", fC.addClass(n3, "button gears");
|
|
34485
34556
|
var i3 = document.createElement("span");
|
|
34486
|
-
i3.innerHTML = "Save",
|
|
34557
|
+
i3.innerHTML = "Save", fC.addClass(i3, "button"), fC.addClass(i3, "save");
|
|
34487
34558
|
var r3 = document.createElement("span");
|
|
34488
|
-
r3.innerHTML = "New",
|
|
34559
|
+
r3.innerHTML = "New", fC.addClass(r3, "button"), fC.addClass(r3, "save-as");
|
|
34489
34560
|
var o2 = document.createElement("span");
|
|
34490
|
-
o2.innerHTML = "Revert",
|
|
34561
|
+
o2.innerHTML = "Revert", fC.addClass(o2, "button"), fC.addClass(o2, "revert");
|
|
34491
34562
|
var s3 = t3.__preset_select = document.createElement("select");
|
|
34492
|
-
if (t3.load && t3.load.remembered ?
|
|
34493
|
-
|
|
34494
|
-
}) :
|
|
34563
|
+
if (t3.load && t3.load.remembered ? YP.each(t3.load.remembered, function(e4, n4) {
|
|
34564
|
+
WC(t3, n4, n4 === t3.preset);
|
|
34565
|
+
}) : WC(t3, "Default", false), fC.bind(s3, "change", function() {
|
|
34495
34566
|
for (var e4 = 0; e4 < t3.__preset_select.length; e4++)
|
|
34496
34567
|
t3.__preset_select[e4].innerHTML = t3.__preset_select[e4].value;
|
|
34497
34568
|
t3.preset = this.value;
|
|
34498
|
-
}), e3.appendChild(s3), e3.appendChild(n3), e3.appendChild(i3), e3.appendChild(r3), e3.appendChild(o2),
|
|
34569
|
+
}), e3.appendChild(s3), e3.appendChild(n3), e3.appendChild(i3), e3.appendChild(r3), e3.appendChild(o2), OC) {
|
|
34499
34570
|
var a2 = document.getElementById("dg-local-explain"), l2 = document.getElementById("dg-local-storage");
|
|
34500
|
-
document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(
|
|
34501
|
-
t3.useLocalStorage = !t3.useLocalStorage,
|
|
34571
|
+
document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(VC(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), XC(t3, a2), fC.bind(l2, "change", function() {
|
|
34572
|
+
t3.useLocalStorage = !t3.useLocalStorage, XC(t3, a2);
|
|
34502
34573
|
});
|
|
34503
34574
|
}
|
|
34504
34575
|
var u2 = document.getElementById("dg-new-constructor");
|
|
34505
|
-
|
|
34506
|
-
!t4.metaKey || t4.which !== 67 && t4.keyCode !== 67 ||
|
|
34507
|
-
}),
|
|
34508
|
-
u2.innerHTML = JSON.stringify(t3.getSaveObject(), void 0, 2),
|
|
34509
|
-
}),
|
|
34576
|
+
fC.bind(u2, "keydown", function(t4) {
|
|
34577
|
+
!t4.metaKey || t4.which !== 67 && t4.keyCode !== 67 || LC.hide();
|
|
34578
|
+
}), fC.bind(n3, "click", function() {
|
|
34579
|
+
u2.innerHTML = JSON.stringify(t3.getSaveObject(), void 0, 2), LC.show(), u2.focus(), u2.select();
|
|
34580
|
+
}), fC.bind(i3, "click", function() {
|
|
34510
34581
|
t3.save();
|
|
34511
|
-
}),
|
|
34582
|
+
}), fC.bind(r3, "click", function() {
|
|
34512
34583
|
var e4 = prompt("Enter a new preset name.");
|
|
34513
34584
|
e4 && t3.saveAs(e4);
|
|
34514
|
-
}),
|
|
34585
|
+
}), fC.bind(o2, "click", function() {
|
|
34515
34586
|
t3.revert();
|
|
34516
34587
|
});
|
|
34517
34588
|
}
|
|
34518
|
-
function
|
|
34589
|
+
function YC(t3) {
|
|
34519
34590
|
var e3 = void 0;
|
|
34520
34591
|
function n3(n4) {
|
|
34521
34592
|
return n4.preventDefault(), t3.width += e3 - n4.clientX, t3.onResize(), e3 = n4.clientX, false;
|
|
34522
34593
|
}
|
|
34523
34594
|
function i3() {
|
|
34524
|
-
|
|
34595
|
+
fC.removeClass(t3.__closeButton, UC.CLASS_DRAG), fC.unbind(window, "mousemove", n3), fC.unbind(window, "mouseup", i3);
|
|
34525
34596
|
}
|
|
34526
34597
|
function r3(r4) {
|
|
34527
|
-
return r4.preventDefault(), e3 = r4.clientX,
|
|
34598
|
+
return r4.preventDefault(), e3 = r4.clientX, fC.addClass(t3.__closeButton, UC.CLASS_DRAG), fC.bind(window, "mousemove", n3), fC.bind(window, "mouseup", i3), false;
|
|
34528
34599
|
}
|
|
34529
|
-
t3.__resize_handle = document.createElement("div"),
|
|
34600
|
+
t3.__resize_handle = document.createElement("div"), YP.extend(t3.__resize_handle.style, { width: "6px", marginLeft: "-3px", height: "200px", cursor: "ew-resize", position: "absolute" }), fC.bind(t3.__resize_handle, "mousedown", r3), fC.bind(t3.__closeButton, "mousedown", r3), t3.domElement.insertBefore(t3.__resize_handle, t3.domElement.firstElementChild);
|
|
34530
34601
|
}
|
|
34531
|
-
function
|
|
34602
|
+
function ZC(t3, e3) {
|
|
34532
34603
|
t3.domElement.style.width = e3 + "px", t3.__save_row && t3.autoPlace && (t3.__save_row.style.width = e3 + "px"), t3.__closeButton && (t3.__closeButton.style.width = e3 + "px");
|
|
34533
34604
|
}
|
|
34534
|
-
function
|
|
34605
|
+
function JC(t3, e3) {
|
|
34535
34606
|
var n3 = {};
|
|
34536
|
-
return
|
|
34607
|
+
return YP.each(t3.__rememberedObjects, function(i3, r3) {
|
|
34537
34608
|
var o2 = {}, s3 = t3.__rememberedObjectIndecesToControllers[r3];
|
|
34538
|
-
|
|
34609
|
+
YP.each(s3, function(t4, n4) {
|
|
34539
34610
|
o2[n4] = e3 ? t4.initialValue : t4.getValue();
|
|
34540
34611
|
}), n3[r3] = o2;
|
|
34541
34612
|
}), n3;
|
|
34542
34613
|
}
|
|
34543
|
-
|
|
34544
|
-
|
|
34545
|
-
t3.domElement.style.display =
|
|
34614
|
+
UC.toggleHide = function() {
|
|
34615
|
+
FC = !FC, YP.each(BC, function(t3) {
|
|
34616
|
+
t3.domElement.style.display = FC ? "none" : "";
|
|
34546
34617
|
});
|
|
34547
|
-
},
|
|
34548
|
-
document.activeElement.type === "text" || t3.which !== 72 && t3.keyCode !== 72 ||
|
|
34549
|
-
},
|
|
34550
|
-
return
|
|
34618
|
+
}, UC.CLASS_AUTO_PLACE = "a", UC.CLASS_AUTO_PLACE_CONTAINER = "ac", UC.CLASS_MAIN = "main", UC.CLASS_CONTROLLER_ROW = "cr", UC.CLASS_TOO_TALL = "taller-than-window", UC.CLASS_CLOSED = "closed", UC.CLASS_CLOSE_BUTTON = "close-button", UC.CLASS_CLOSE_TOP = "close-top", UC.CLASS_CLOSE_BOTTOM = "close-bottom", UC.CLASS_DRAG = "drag", UC.DEFAULT_WIDTH = 245, UC.TEXT_CLOSED = "Close Controls", UC.TEXT_OPEN = "Open Controls", UC._keydownHandler = function(t3) {
|
|
34619
|
+
document.activeElement.type === "text" || t3.which !== 72 && t3.keyCode !== 72 || UC.toggleHide();
|
|
34620
|
+
}, fC.bind(window, "keydown", UC._keydownHandler, false), YP.extend(UC.prototype, { add: function(t3, e3) {
|
|
34621
|
+
return jC(this, t3, e3, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
|
|
34551
34622
|
}, addColor: function(t3, e3) {
|
|
34552
|
-
return
|
|
34623
|
+
return jC(this, t3, e3, { color: true });
|
|
34553
34624
|
}, remove: function(t3) {
|
|
34554
34625
|
this.__ul.removeChild(t3.__li), this.__controllers.splice(this.__controllers.indexOf(t3), 1);
|
|
34555
34626
|
var e3 = this;
|
|
34556
|
-
|
|
34627
|
+
YP.defer(function() {
|
|
34557
34628
|
e3.onResize();
|
|
34558
34629
|
});
|
|
34559
34630
|
}, destroy: function() {
|
|
34560
34631
|
if (this.parent)
|
|
34561
34632
|
throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");
|
|
34562
|
-
this.autoPlace &&
|
|
34633
|
+
this.autoPlace && DC.removeChild(this.domElement);
|
|
34563
34634
|
var t3 = this;
|
|
34564
|
-
|
|
34635
|
+
YP.each(this.__folders, function(e3) {
|
|
34565
34636
|
t3.removeFolder(e3);
|
|
34566
|
-
}),
|
|
34637
|
+
}), fC.unbind(window, "keydown", UC._keydownHandler, false), GC(this);
|
|
34567
34638
|
}, addFolder: function(t3) {
|
|
34568
34639
|
if (this.__folders[t3] !== void 0)
|
|
34569
34640
|
throw new Error('You already have a folder in this GUI by the name "' + t3 + '"');
|
|
34570
34641
|
var e3 = { name: t3, parent: this };
|
|
34571
34642
|
e3.autoPlace = this.autoPlace, this.load && this.load.folders && this.load.folders[t3] && (e3.closed = this.load.folders[t3].closed, e3.load = this.load.folders[t3]);
|
|
34572
|
-
var n3 = new
|
|
34643
|
+
var n3 = new UC(e3);
|
|
34573
34644
|
this.__folders[t3] = n3;
|
|
34574
|
-
var i3 =
|
|
34575
|
-
return
|
|
34645
|
+
var i3 = kC(this, n3.domElement);
|
|
34646
|
+
return fC.addClass(i3, "folder"), n3;
|
|
34576
34647
|
}, removeFolder: function(t3) {
|
|
34577
|
-
this.__ul.removeChild(t3.domElement.parentElement), delete this.__folders[t3.name], this.load && this.load.folders && this.load.folders[t3.name] && delete this.load.folders[t3.name],
|
|
34648
|
+
this.__ul.removeChild(t3.domElement.parentElement), delete this.__folders[t3.name], this.load && this.load.folders && this.load.folders[t3.name] && delete this.load.folders[t3.name], GC(t3);
|
|
34578
34649
|
var e3 = this;
|
|
34579
|
-
|
|
34650
|
+
YP.each(t3.__folders, function(e4) {
|
|
34580
34651
|
t3.removeFolder(e4);
|
|
34581
|
-
}),
|
|
34652
|
+
}), YP.defer(function() {
|
|
34582
34653
|
e3.onResize();
|
|
34583
34654
|
});
|
|
34584
34655
|
}, open: function() {
|
|
@@ -34592,60 +34663,60 @@ void main(void){
|
|
|
34592
34663
|
}, onResize: function() {
|
|
34593
34664
|
var t3 = this.getRoot();
|
|
34594
34665
|
if (t3.scrollable) {
|
|
34595
|
-
var e3 =
|
|
34596
|
-
|
|
34597
|
-
t3.autoPlace && e4 === t3.__save_row || (n3 +=
|
|
34598
|
-
}), window.innerHeight - e3 - 20 < n3 ? (
|
|
34666
|
+
var e3 = fC.getOffset(t3.__ul).top, n3 = 0;
|
|
34667
|
+
YP.each(t3.__ul.childNodes, function(e4) {
|
|
34668
|
+
t3.autoPlace && e4 === t3.__save_row || (n3 += fC.getHeight(e4));
|
|
34669
|
+
}), window.innerHeight - e3 - 20 < n3 ? (fC.addClass(t3.domElement, UC.CLASS_TOO_TALL), t3.__ul.style.height = window.innerHeight - e3 - 20 + "px") : (fC.removeClass(t3.domElement, UC.CLASS_TOO_TALL), t3.__ul.style.height = "auto");
|
|
34599
34670
|
}
|
|
34600
|
-
t3.__resize_handle &&
|
|
34671
|
+
t3.__resize_handle && YP.defer(function() {
|
|
34601
34672
|
t3.__resize_handle.style.height = t3.__ul.offsetHeight + "px";
|
|
34602
34673
|
}), t3.__closeButton && (t3.__closeButton.style.width = t3.width + "px");
|
|
34603
|
-
}, onResizeDebounced:
|
|
34674
|
+
}, onResizeDebounced: YP.debounce(function() {
|
|
34604
34675
|
this.onResize();
|
|
34605
34676
|
}, 50), remember: function() {
|
|
34606
|
-
if (
|
|
34677
|
+
if (YP.isUndefined(LC) && ((LC = new IC()).domElement.innerHTML = RC), this.parent)
|
|
34607
34678
|
throw new Error("You can only call remember on a top level GUI.");
|
|
34608
34679
|
var t3 = this;
|
|
34609
|
-
|
|
34610
|
-
t3.__rememberedObjects.length === 0 &&
|
|
34611
|
-
}), this.autoPlace &&
|
|
34680
|
+
YP.each(Array.prototype.slice.call(arguments), function(e3) {
|
|
34681
|
+
t3.__rememberedObjects.length === 0 && qC(t3), t3.__rememberedObjects.indexOf(e3) === -1 && t3.__rememberedObjects.push(e3);
|
|
34682
|
+
}), this.autoPlace && ZC(this, this.width);
|
|
34612
34683
|
}, getRoot: function() {
|
|
34613
34684
|
for (var t3 = this; t3.parent; )
|
|
34614
34685
|
t3 = t3.parent;
|
|
34615
34686
|
return t3;
|
|
34616
34687
|
}, getSaveObject: function() {
|
|
34617
34688
|
var t3 = this.load;
|
|
34618
|
-
return t3.closed = this.closed, this.__rememberedObjects.length > 0 && (t3.preset = this.preset, t3.remembered || (t3.remembered = {}), t3.remembered[this.preset] =
|
|
34689
|
+
return t3.closed = this.closed, this.__rememberedObjects.length > 0 && (t3.preset = this.preset, t3.remembered || (t3.remembered = {}), t3.remembered[this.preset] = JC(this)), t3.folders = {}, YP.each(this.__folders, function(e3, n3) {
|
|
34619
34690
|
t3.folders[n3] = e3.getSaveObject();
|
|
34620
34691
|
}), t3;
|
|
34621
34692
|
}, save: function() {
|
|
34622
|
-
this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] =
|
|
34693
|
+
this.load.remembered || (this.load.remembered = {}), this.load.remembered[this.preset] = JC(this), HC(this, false), this.saveToLocalStorageIfPossible();
|
|
34623
34694
|
}, saveAs: function(t3) {
|
|
34624
|
-
this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default =
|
|
34695
|
+
this.load.remembered || (this.load.remembered = {}, this.load.remembered.Default = JC(this, true)), this.load.remembered[t3] = JC(this), this.preset = t3, WC(this, t3, true), this.saveToLocalStorageIfPossible();
|
|
34625
34696
|
}, revert: function(t3) {
|
|
34626
|
-
|
|
34627
|
-
this.getRoot().load.remembered ?
|
|
34628
|
-
}, this),
|
|
34697
|
+
YP.each(this.__controllers, function(e3) {
|
|
34698
|
+
this.getRoot().load.remembered ? zC(t3 || this.getRoot(), e3) : e3.setValue(e3.initialValue), e3.__onFinishChange && e3.__onFinishChange.call(e3, e3.getValue());
|
|
34699
|
+
}, this), YP.each(this.__folders, function(t4) {
|
|
34629
34700
|
t4.revert(t4);
|
|
34630
|
-
}), t3 ||
|
|
34701
|
+
}), t3 || HC(this.getRoot(), false);
|
|
34631
34702
|
}, listen: function(t3) {
|
|
34632
34703
|
var e3 = this.__listening.length === 0;
|
|
34633
34704
|
this.__listening.push(t3), e3 && function t4(e4) {
|
|
34634
|
-
e4.length !== 0 &&
|
|
34705
|
+
e4.length !== 0 && CC.call(window, function() {
|
|
34635
34706
|
t4(e4);
|
|
34636
34707
|
});
|
|
34637
|
-
|
|
34708
|
+
YP.each(e4, function(t5) {
|
|
34638
34709
|
t5.updateDisplay();
|
|
34639
34710
|
});
|
|
34640
34711
|
}(this.__listening);
|
|
34641
34712
|
}, updateDisplay: function() {
|
|
34642
|
-
|
|
34713
|
+
YP.each(this.__controllers, function(t3) {
|
|
34643
34714
|
t3.updateDisplay();
|
|
34644
|
-
}),
|
|
34715
|
+
}), YP.each(this.__folders, function(t3) {
|
|
34645
34716
|
t3.updateDisplay();
|
|
34646
34717
|
});
|
|
34647
34718
|
} });
|
|
34648
|
-
var
|
|
34719
|
+
var $C = UC, KC = function() {
|
|
34649
34720
|
function t3(t4) {
|
|
34650
34721
|
this.runTime = { fps: 0, resolution: "" }, this.target = t4.target, this.data = t4.params, this.player = t4.player, this.gui = this.createControllerGUI(), this.createStats(), this.addEventListener();
|
|
34651
34722
|
}
|
|
@@ -34655,7 +34726,7 @@ void main(void){
|
|
|
34655
34726
|
t4.player.view && (t4.controller.runTimeFps.setValue(t4.player.fps.value), t4.controller.drawCall.setValue(t4.player.runtime.drawCall), t4.controller.runTimeResolution.setValue(t4.player.view.width + "*" + t4.player.view.height));
|
|
34656
34727
|
}, 500);
|
|
34657
34728
|
}, t3.prototype.createControllerGUI = function() {
|
|
34658
|
-
var t4, e3, n3, i3, r3, o2 = new
|
|
34729
|
+
var t4, e3, n3, i3, r3, o2 = new $C({ autoPlace: true, closed: true });
|
|
34659
34730
|
o2.domElement.style.opacity = ".6", o2.domElement.style.transformOrigin = "100% 0", o2.domElement.style.transform = "scale(1)", this.target.appendChild(o2.domElement), o2.domElement.style.position = "absolute", o2.domElement.style.right = "0", o2.domElement.style.top = "0", o2.domElement.style.zIndex = "2";
|
|
34660
34731
|
var s3 = o2.add({ FPS: 0 }, "FPS", 0), a2 = o2.add({ drawCall: 0 }, "drawCall", 0), l2 = o2.add({ "\u5206\u8FA8\u7387": "" }, "\u5206\u8FA8\u7387", ""), u2 = o2.add({ "\u989D\u5916\u8BA1\u7B97": 0 }, "\u989D\u5916\u8BA1\u7B97", 0, 200), h2 = o2.addFolder("renderOptions");
|
|
34661
34732
|
return this.controller = { runTimeResolution: l2, runTimeFps: s3, drawCall: a2, moreCalculation: u2, minFPS: h2.add({ "\u6700\u4F4Efps": (t4 = this.data.minFPS) !== null && t4 !== void 0 ? t4 : 40 }, "\u6700\u4F4Efps", 0, 60), maxFPS: h2.add({ "\u6700\u9AD8fps": (e3 = this.data.maxFPS) !== null && e3 !== void 0 ? e3 : 50 }, "\u6700\u9AD8fps", 0, 60), resolution: h2.add({ "\u76EE\u6807\u5206\u8FA8\u500D\u7387": (n3 = this.data.resolution) !== null && n3 !== void 0 ? n3 : window.devicePixelRatio }, "\u76EE\u6807\u5206\u8FA8\u500D\u7387", 0.5, 6), autoResolution: h2.add({ "\u81EA\u52A8\u5206\u8FA8\u7387": (i3 = this.data.autoResolution) !== null && i3 !== void 0 && i3 }, "\u81EA\u52A8\u5206\u8FA8\u7387", true), autoFps: h2.add({ "\u81EA\u52A8fps": (r3 = this.data.autoFPS) === null || r3 === void 0 || r3 }, "\u81EA\u52A8fps", true), transactionBgColor: h2.addColor({ "\u5207\u9875\u80CC\u666F\u8272": this.data.transactionBgColor }, "\u5207\u9875\u80CC\u666F\u8272") }, this.controller.runTimeFps.disabled = true, this.controller.runTimeResolution.disabled = true, o2;
|
|
@@ -34686,22 +34757,23 @@ void main(void){
|
|
|
34686
34757
|
} catch (t4) {
|
|
34687
34758
|
}
|
|
34688
34759
|
}, t3;
|
|
34689
|
-
}(),
|
|
34760
|
+
}(), QC = function() {
|
|
34690
34761
|
function t3(t4) {
|
|
34691
34762
|
var e3 = this;
|
|
34692
|
-
this.tasks = [], this.isDestroy = false, this.schedule = function() {
|
|
34693
|
-
|
|
34694
|
-
t5
|
|
34695
|
-
|
|
34696
|
-
|
|
34697
|
-
|
|
34763
|
+
this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
|
|
34764
|
+
e3.isScheduling = true;
|
|
34765
|
+
var t5 = e3.tasks.shift();
|
|
34766
|
+
t5 && !e3.isDestroy && e3.fn(t5).then(function() {
|
|
34767
|
+
e3.tasks.length > 0 ? window.requestAnimationFrame(e3.schedule) : e3.isScheduling = false;
|
|
34768
|
+
});
|
|
34769
|
+
}, this.fn = t4;
|
|
34698
34770
|
}
|
|
34699
34771
|
return t3.prototype.destroy = function() {
|
|
34700
34772
|
this.isDestroy = true;
|
|
34701
34773
|
}, t3.prototype.addTask = function(t4) {
|
|
34702
|
-
this.tasks.push(t4);
|
|
34774
|
+
this.tasks.push(t4), this.isScheduling || this.schedule();
|
|
34703
34775
|
}, t3;
|
|
34704
|
-
}(),
|
|
34776
|
+
}(), tI = function() {
|
|
34705
34777
|
function t3(t4) {
|
|
34706
34778
|
this.autoUnlock = /* @__PURE__ */ Object.create(null), this.locks = /* @__PURE__ */ Object.create(null), this.available = false, this.available = t4;
|
|
34707
34779
|
}
|
|
@@ -34715,17 +34787,18 @@ void main(void){
|
|
|
34715
34787
|
}, t3.prototype.isLocked = function(t4) {
|
|
34716
34788
|
return !!this.available && !!this.locks[t4];
|
|
34717
34789
|
}, t3;
|
|
34718
|
-
}(),
|
|
34790
|
+
}(), eI = function() {
|
|
34719
34791
|
function t3() {
|
|
34720
34792
|
var t4 = this;
|
|
34721
|
-
this.tasks = [], this.isDestroy = false, this.schedule = function() {
|
|
34793
|
+
this.tasks = [], this.isDestroy = false, this.isScheduling = false, this.schedule = function() {
|
|
34794
|
+
t4.isScheduling = true;
|
|
34722
34795
|
var e3 = t4.tasks.shift();
|
|
34723
|
-
e3 && !t4.isDestroy
|
|
34724
|
-
window.
|
|
34796
|
+
e3 && !t4.isDestroy && (e3.status = "running", e3.fn.apply(null).then(function() {
|
|
34797
|
+
t4.tasks.length > 0 ? window.requestAnimationFrame(t4.schedule) : t4.isScheduling = false;
|
|
34725
34798
|
}).catch(function() {
|
|
34726
|
-
window.
|
|
34727
|
-
}))
|
|
34728
|
-
}
|
|
34799
|
+
t4.tasks.length > 0 ? window.requestAnimationFrame(t4.schedule) : t4.isScheduling = false;
|
|
34800
|
+
}));
|
|
34801
|
+
};
|
|
34729
34802
|
}
|
|
34730
34803
|
return t3.prototype.getRunningTask = function() {
|
|
34731
34804
|
return this.tasks[0] && this.tasks[0].status === "running" ? this.tasks[0] : null;
|
|
@@ -34733,11 +34806,11 @@ void main(void){
|
|
|
34733
34806
|
var n3 = { type: t4, status: "wait", fn: e3 }, i3 = this.getRunningTask();
|
|
34734
34807
|
i3 && t4 === i3.type || (this.tasks = this.tasks.filter(function(e4) {
|
|
34735
34808
|
return e4.type !== t4;
|
|
34736
|
-
}), this.tasks.push(n3));
|
|
34809
|
+
}), this.tasks.push(n3), this.isScheduling || this.schedule());
|
|
34737
34810
|
}, t3.prototype.destroy = function() {
|
|
34738
34811
|
this.isDestroy = true;
|
|
34739
34812
|
}, t3;
|
|
34740
|
-
}(),
|
|
34813
|
+
}(), nI = function() {
|
|
34741
34814
|
var t3 = function(e3, n3) {
|
|
34742
34815
|
return (t3 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t4, e4) {
|
|
34743
34816
|
t4.__proto__ = e4;
|
|
@@ -34754,14 +34827,14 @@ void main(void){
|
|
|
34754
34827
|
}
|
|
34755
34828
|
t3(e3, n3), e3.prototype = n3 === null ? Object.create(n3) : (i3.prototype = n3.prototype, new i3());
|
|
34756
34829
|
};
|
|
34757
|
-
}(),
|
|
34758
|
-
return (
|
|
34830
|
+
}(), iI = function() {
|
|
34831
|
+
return (iI = Object.assign || function(t3) {
|
|
34759
34832
|
for (var e3, n3 = 1, i3 = arguments.length; n3 < i3; n3++)
|
|
34760
34833
|
for (var r3 in e3 = arguments[n3])
|
|
34761
34834
|
Object.prototype.hasOwnProperty.call(e3, r3) && (t3[r3] = e3[r3]);
|
|
34762
34835
|
return t3;
|
|
34763
34836
|
}).apply(this, arguments);
|
|
34764
|
-
},
|
|
34837
|
+
}, rI = function(t3, e3, n3, i3) {
|
|
34765
34838
|
var r3, o2 = arguments.length, s3 = o2 < 3 ? e3 : i3 === null ? i3 = Object.getOwnPropertyDescriptor(e3, n3) : i3;
|
|
34766
34839
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
34767
34840
|
s3 = Reflect.decorate(t3, e3, n3, i3);
|
|
@@ -34769,7 +34842,7 @@ void main(void){
|
|
|
34769
34842
|
for (var a2 = t3.length - 1; a2 >= 0; a2--)
|
|
34770
34843
|
(r3 = t3[a2]) && (s3 = (o2 < 3 ? r3(s3) : o2 > 3 ? r3(e3, n3, s3) : r3(e3, n3)) || s3);
|
|
34771
34844
|
return o2 > 3 && s3 && Object.defineProperty(e3, n3, s3), s3;
|
|
34772
|
-
},
|
|
34845
|
+
}, oI = function(t3, e3, n3, i3) {
|
|
34773
34846
|
return new (n3 || (n3 = Promise))(function(r3, o2) {
|
|
34774
34847
|
function s3(t4) {
|
|
34775
34848
|
try {
|
|
@@ -34793,7 +34866,7 @@ void main(void){
|
|
|
34793
34866
|
}
|
|
34794
34867
|
l2((i3 = i3.apply(t3, e3 || [])).next());
|
|
34795
34868
|
});
|
|
34796
|
-
},
|
|
34869
|
+
}, sI = function(t3, e3) {
|
|
34797
34870
|
var n3, i3, r3, o2, s3 = { label: 0, sent: function() {
|
|
34798
34871
|
if (1 & r3[0])
|
|
34799
34872
|
throw r3[1];
|
|
@@ -34856,20 +34929,20 @@ void main(void){
|
|
|
34856
34929
|
}([o3, a3]);
|
|
34857
34930
|
};
|
|
34858
34931
|
}
|
|
34859
|
-
},
|
|
34932
|
+
}, aI = window.ResizeObserver || GP, lI = function(t3) {
|
|
34860
34933
|
return new Promise(function(e3) {
|
|
34861
34934
|
return setTimeout(e3, t3);
|
|
34862
34935
|
});
|
|
34863
34936
|
};
|
|
34864
|
-
function
|
|
34865
|
-
return
|
|
34937
|
+
function uI(t3, e3) {
|
|
34938
|
+
return oI(this, void 0, void 0, function() {
|
|
34866
34939
|
var n3;
|
|
34867
|
-
return
|
|
34940
|
+
return sI(this, function(i3) {
|
|
34868
34941
|
switch (i3.label) {
|
|
34869
34942
|
case 0:
|
|
34870
34943
|
n3 = Date.now(), i3.label = 1;
|
|
34871
34944
|
case 1:
|
|
34872
|
-
return !t3() && Date.now() - n3 < e3 ? [4,
|
|
34945
|
+
return !t3() && Date.now() - n3 < e3 ? [4, lI(50)] : [3, 3];
|
|
34873
34946
|
case 2:
|
|
34874
34947
|
return i3.sent(), [3, 1];
|
|
34875
34948
|
case 3:
|
|
@@ -34878,21 +34951,21 @@ void main(void){
|
|
|
34878
34951
|
});
|
|
34879
34952
|
});
|
|
34880
34953
|
}
|
|
34881
|
-
var
|
|
34954
|
+
var hI = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, cI = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, dI = "";
|
|
34882
34955
|
try {
|
|
34883
|
-
|
|
34956
|
+
dI = "0.5.14-alpha.0";
|
|
34884
34957
|
} catch (t3) {
|
|
34885
|
-
|
|
34958
|
+
dI = "development";
|
|
34886
34959
|
}
|
|
34887
|
-
var
|
|
34960
|
+
var pI = null;
|
|
34888
34961
|
try {
|
|
34889
|
-
|
|
34962
|
+
pI = o.createInstance({ name: "__slide_local_log__", driver: o.INDEXEDDB, version: 1 });
|
|
34890
34963
|
} catch (t3) {
|
|
34891
34964
|
}
|
|
34892
|
-
var
|
|
34965
|
+
var fI = function(t3) {
|
|
34893
34966
|
function e3(n4) {
|
|
34894
34967
|
var i3 = t3.call(this) || this;
|
|
34895
|
-
return i3.iosResetCache = [], i3.needClearCacheImage = false, i3.version =
|
|
34968
|
+
return i3.iosResetCache = [], i3.needClearCacheImage = false, i3.version = dI, i3.__slideState = Object(l.cloneDeep)(cI), i3.userInputTime = 0, i3.isSyncingSlideState = false, i3.frozenTaskManager = new eI(), i3.randomId = Math.random().toString(32).substr(2), i3.resize = false, i3.isAnimating = false, i3.renderingTaskManager = new VP(), i3.isLoading = false, i3.interactive = true, i3.renderingIndex = 0, i3.frameWidth = 1, i3.frameHeight = 1, i3.frame = document.createElement("div"), i3.medianController = document.createElement("div"), i3.frameResizeObserver = new aI(function() {
|
|
34896
34969
|
return i3.frameResizeHandler();
|
|
34897
34970
|
}), i3.timestamp = function() {
|
|
34898
34971
|
return Date.now();
|
|
@@ -34912,12 +34985,12 @@ void main(void){
|
|
|
34912
34985
|
}, i3.handleSlideRef = function() {
|
|
34913
34986
|
console.log(i3), window.__slide = i3;
|
|
34914
34987
|
}, i3.receiveSyncHandler = function(t4) {
|
|
34915
|
-
return
|
|
34988
|
+
return oI(i3, void 0, void 0, function() {
|
|
34916
34989
|
var e4, n5, i4, r3, o2 = this;
|
|
34917
|
-
return
|
|
34990
|
+
return sI(this, function(s3) {
|
|
34918
34991
|
switch (s3.label) {
|
|
34919
34992
|
case 0:
|
|
34920
|
-
return Object(l.isNumber)(t4.incrId) && (t4.incrId && t4.incrId - this._receiveIncrId != 1 && this.emit(
|
|
34993
|
+
return Object(l.isNumber)(t4.incrId) && (t4.incrId && t4.incrId - this._receiveIncrId != 1 && this.emit(hI.syncEventLag), this._receiveIncrId = t4.incrId || 0), this.logger.info("sync receive " + JSON.stringify(t4), this.taskId), t4.type !== "nextStep" ? [3, 1] : (this.mainSeqStep !== t4.next - 1 && this.mainSeqStep + 1 !== this.mainSeqLength && this.player ? (this.setMainSeqStep(t4.next, "start"), this.player.nextTick(function() {
|
|
34921
34994
|
o2.doNextStep(true);
|
|
34922
34995
|
})) : this.doNextStep(true), [3, 6]);
|
|
34923
34996
|
case 1:
|
|
@@ -34938,9 +35011,9 @@ void main(void){
|
|
|
34938
35011
|
});
|
|
34939
35012
|
});
|
|
34940
35013
|
}, i3.handlePrevSlide = function(t4) {
|
|
34941
|
-
return t4 === void 0 && (t4 = false),
|
|
35014
|
+
return t4 === void 0 && (t4 = false), oI(i3, void 0, void 0, function() {
|
|
34942
35015
|
var e4, n5;
|
|
34943
|
-
return
|
|
35016
|
+
return sI(this, function(i4) {
|
|
34944
35017
|
switch (i4.label) {
|
|
34945
35018
|
case 0:
|
|
34946
35019
|
return this.player ? [4, (n5 = this.player) === null || n5 === void 0 ? void 0 : n5.createSnapshotForNextSlide(true)] : [2];
|
|
@@ -34950,9 +35023,9 @@ void main(void){
|
|
|
34950
35023
|
});
|
|
34951
35024
|
});
|
|
34952
35025
|
}, i3.handleNextSlide = function(t4) {
|
|
34953
|
-
return t4 === void 0 && (t4 = false),
|
|
35026
|
+
return t4 === void 0 && (t4 = false), oI(i3, void 0, void 0, function() {
|
|
34954
35027
|
var e4, n5;
|
|
34955
|
-
return
|
|
35028
|
+
return sI(this, function(i4) {
|
|
34956
35029
|
switch (i4.label) {
|
|
34957
35030
|
case 0:
|
|
34958
35031
|
return this.player ? [4, (n5 = this.player) === null || n5 === void 0 ? void 0 : n5.createSnapshotForNextSlide(false)] : [2];
|
|
@@ -34976,23 +35049,23 @@ void main(void){
|
|
|
34976
35049
|
}, error: function(t4, n5) {
|
|
34977
35050
|
var r3, o2;
|
|
34978
35051
|
((r3 = i3.config.logger) === null || r3 === void 0 ? void 0 : r3.error) && (e3._tempLog += "ERROR - " + new Date().toISOString() + " - {" + i3.randomId + "}[" + n5 + "] " + t4 + "\n\n", (o2 = i3.config.logger) === null || o2 === void 0 || o2.error("[" + n5 + "] " + t4));
|
|
34979
|
-
} }, i3.anchor = i3.config.anchor, i3.syncQueue = new
|
|
35052
|
+
} }, i3.anchor = i3.config.anchor, i3.syncQueue = new QC(i3.receiveSyncHandler), i3.lock = new tI(i3.mode === "interactive"), i3.cacheImage.style.position = "absolute", i3.cacheImage.style.zIndex = "100", i3.setMedianControllerAttribute(), i3.frame.appendChild(i3.medianController), i3.frameResizeObserver.observe(i3.frame), i3.on(hI.syncReceive, function(t4) {
|
|
34980
35053
|
i3.lock.unlock(t4.type, t4.uuid), i3.syncQueue.addTask(t4);
|
|
34981
35054
|
}), i3.renderingTaskManager.eventHub.on("task-error", function(t4) {
|
|
34982
35055
|
var e4 = t4.error, n5 = t4.task, r3 = qE.transform(e4);
|
|
34983
|
-
r3.errorType === VE.RuntimeWarn ? i3.logger.warn(r3.message, i3.taskId) : i3.logger.error(r3.message, i3.taskId), i3.isLoading = false, i3.emit(
|
|
35056
|
+
r3.errorType === VE.RuntimeWarn ? i3.logger.warn(r3.message, i3.taskId) : i3.logger.error(r3.message, i3.taskId), i3.isLoading = false, i3.emit(hI.renderError, { error: r3, index: n5.slideIndex });
|
|
34984
35057
|
}), window.addEventListener("__slide_ref__", i3.handleSlideRef), i3.resizeView = Object(l.debounce)(i3.resizeView.bind(i3), 50), i3.player = i3.initPlayer(i3.config), i3.config.controller && i3.createController(), i3.player.view && i3.frame.appendChild(i3.player.view), i3.handleViewClick = Object(l.debounce)(i3.handleViewClick, 300), i3.player.errorChannel.on("error", function(t4, e4) {
|
|
34985
35058
|
var n5 = qE.transform(t4);
|
|
34986
|
-
n5.errorType === VE.RuntimeWarn ? i3.logger.warn(n5.message, i3.taskId) : i3.logger.error(n5.message, i3.taskId), i3.isLoading = false, e4 === i3.renderingIndex && i3.emit(
|
|
35059
|
+
n5.errorType === VE.RuntimeWarn ? i3.logger.warn(n5.message, i3.taskId) : i3.logger.error(n5.message, i3.taskId), i3.isLoading = false, e4 === i3.renderingIndex && i3.emit(hI.renderError, { error: t4, index: e4 });
|
|
34987
35060
|
}), i3;
|
|
34988
35061
|
}
|
|
34989
35062
|
var n3;
|
|
34990
|
-
return
|
|
34991
|
-
return
|
|
34992
|
-
return
|
|
35063
|
+
return nI(e3, t3), e3.flushLog = function() {
|
|
35064
|
+
return oI(this, void 0, void 0, function() {
|
|
35065
|
+
return sI(this, function(t4) {
|
|
34993
35066
|
switch (t4.label) {
|
|
34994
35067
|
case 0:
|
|
34995
|
-
return e3._tempLog.length > 0 ? [4,
|
|
35068
|
+
return e3._tempLog.length > 0 ? [4, pI == null ? void 0 : pI.setItem("run_time_log_" + e3._tempLogIndex, e3._tempLog)] : [3, 2];
|
|
34996
35069
|
case 1:
|
|
34997
35070
|
t4.sent(), e3._tempLog = "", e3._tempLogIndex += 1, t4.label = 2;
|
|
34998
35071
|
case 2:
|
|
@@ -35003,51 +35076,51 @@ void main(void){
|
|
|
35003
35076
|
}, Object.defineProperty(e3.prototype, "dispatchIncrId", { get: function() {
|
|
35004
35077
|
return this._dispatchIncrId++;
|
|
35005
35078
|
}, enumerable: false, configurable: true }), e3.prototype.initSlideConfig = function(t4) {
|
|
35006
|
-
return t4.timestamp && (this.timestamp = t4.timestamp), t4.rtcAudio && (
|
|
35079
|
+
return t4.timestamp && (this.timestamp = t4.timestamp), t4.rtcAudio && (KR.RtcAudioClazz = t4.rtcAudio), this.mode = t4.mode, this.anchor = t4.anchor, this.anchor.appendChild(this.frame), this.enableGlobalClick = !Object(l.isUndefined)(t4.enableGlobalClick) && t4.enableGlobalClick, this.resize = t4.resize || false, this.interactive = t4.interactive, this.frame.style.cssText = t4.fixedFrameSize ? "width:" + t4.fixedFrameSize.width + "px;height:" + t4.fixedFrameSize.height + "px;" : "width:100%;height:100%", this.frame.style.cssText += "display:flex;justify-content:center;align-items:center;visibility:hidden;position:relative;z-index:1;", t4.fixedFrameSize && (this.frameWidth = t4.fixedFrameSize.width, this.frameHeight = t4.fixedFrameSize.height), t4;
|
|
35007
35080
|
}, e3.prototype.initPlayer = function(t4) {
|
|
35008
|
-
var e4, n4, i3, r3 = this, o2 = new
|
|
35009
|
-
return o2.setInteractive(this.interactive), o2.updateConfig(t4.renderOptions || {}), o2.on(
|
|
35010
|
-
r3.isLoading = true, r3.emit(
|
|
35011
|
-
}), o2.on(
|
|
35012
|
-
r3.isLoading = false, r3.player && (r3.designHeight = r3.player.designHeight, r3.designWidth = r3.player.designWidth, r3.cacheImage.style.width = r3.player.designWidth + "px", r3.cacheImage.style.height = r3.player.designHeight + "px", r3._slideCount = r3.player.slideCount), r3.emit(
|
|
35013
|
-
}), o2.on(
|
|
35014
|
-
r3.__slideState.currentSlideIndex = t5, r3.emitStateChange(), r3.emit(
|
|
35015
|
-
}), o2.on(
|
|
35081
|
+
var e4, n4, i3, r3 = this, o2 = new KR({ mode: this.mode, useLocalCache: !!Object(l.isUndefined)(this.config.useLocalCache) || this.config.useLocalCache, logger: this.logger, resourceTimeout: Object(l.isUndefined)(this.config.resourceTimeout) ? 15e3 : this.config.resourceTimeout, loadDelegate: this.config.loaderDelegate });
|
|
35082
|
+
return o2.setInteractive(this.interactive), o2.updateConfig(t4.renderOptions || {}), o2.on($R.renderStart, function(t5) {
|
|
35083
|
+
r3.isLoading = true, r3.emit(hI.renderStart, t5);
|
|
35084
|
+
}), o2.on($R.renderEnd, function(t5) {
|
|
35085
|
+
r3.isLoading = false, r3.player && (r3.designHeight = r3.player.designHeight, r3.designWidth = r3.player.designWidth, r3.cacheImage.style.width = r3.player.designWidth + "px", r3.cacheImage.style.height = r3.player.designHeight + "px", r3._slideCount = r3.player.slideCount), r3.emit(hI.renderEnd, t5);
|
|
35086
|
+
}), o2.on($R.slideChange, function(t5) {
|
|
35087
|
+
r3.__slideState.currentSlideIndex = t5, r3.emitStateChange(), r3.emit(hI.slideChange, t5);
|
|
35088
|
+
}), o2.on($R.mainSeqStateChange, function(t5) {
|
|
35016
35089
|
r3.__slideState.mainSeqState = t5, r3.emitStateChange();
|
|
35017
|
-
}), o2.on(
|
|
35090
|
+
}), o2.on($R.mainSeqStepChange, function(t5) {
|
|
35018
35091
|
r3.__slideState.mainSeqStep = t5, r3.emitStateChange();
|
|
35019
|
-
}), o2.on(
|
|
35092
|
+
}), o2.on($R.interactiveSeqStateChange, function(t5) {
|
|
35020
35093
|
var e5 = t5.id, n5 = t5.state;
|
|
35021
35094
|
r3.__slideState.interactiveSeqState[e5] = n5, r3.emitStateChange();
|
|
35022
|
-
}), o2.on(
|
|
35023
|
-
r3.isAnimating !== true && (r3.isAnimating = true, r3.emit(
|
|
35024
|
-
}), o2.on(
|
|
35025
|
-
r3.isAnimating !== false && (r3.isAnimating = false, r3.emit(
|
|
35026
|
-
}), o2.on(
|
|
35095
|
+
}), o2.on($R.animateStart, function() {
|
|
35096
|
+
r3.isAnimating !== true && (r3.isAnimating = true, r3.emit(hI.animateStart));
|
|
35097
|
+
}), o2.on($R.animateEnd, function() {
|
|
35098
|
+
r3.isAnimating !== false && (r3.isAnimating = false, r3.emit(hI.animateEnd));
|
|
35099
|
+
}), o2.on($R.interactiveSeqAction, function(t5) {
|
|
35027
35100
|
var e5 = t5.action, n5 = t5.seqId;
|
|
35028
35101
|
r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "interactiveAnim", action: e5, seqId: n5 }), r3.emitStateChange();
|
|
35029
|
-
}), o2.on(
|
|
35030
|
-
r3.emit(
|
|
35031
|
-
}), o2.on(
|
|
35032
|
-
r3.emit(
|
|
35033
|
-
}), o2.on(
|
|
35102
|
+
}), o2.on($R.mainSeqStepStart, function(t5) {
|
|
35103
|
+
r3.emit(hI.mainSeqStepStart, t5);
|
|
35104
|
+
}), o2.on($R.mainSeqStepEnd, function(t5) {
|
|
35105
|
+
r3.emit(hI.mainSeqStepEnd, t5);
|
|
35106
|
+
}), o2.on($R.mediaPlay, function(t5) {
|
|
35034
35107
|
var e5 = { type: "play", time: r3.timestamp() - 1e3 * t5.time };
|
|
35035
35108
|
r3.__slideState.mediaState[t5.id] = e5, r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaPlay", id: t5.id, state: e5 }), r3.emitStateChange();
|
|
35036
|
-
}), o2.on(
|
|
35109
|
+
}), o2.on($R.mediaPause, function(t5) {
|
|
35037
35110
|
var e5 = { type: "pause", time: t5.time };
|
|
35038
35111
|
r3.__slideState.mediaState[t5.id] = e5, r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaPause", id: t5.id, state: e5 }), r3.emitStateChange();
|
|
35039
|
-
}), o2.on(
|
|
35112
|
+
}), o2.on($R.mediaSeek, function(t5) {
|
|
35040
35113
|
var e5 = { type: "pause", time: 0 };
|
|
35041
35114
|
t5.isPlaying ? (e5.type = "play", r3.__slideState.mediaState[t5.id] ? e5.time = r3.__slideState.mediaState[t5.id].time - 1e3 * t5.time : e5.time = r3.timestamp() - 1e3 * t5.time, r3.__slideState.mediaState[t5.id] = e5) : (e5.type = "pause", e5.time = t5.time, r3.__slideState.mediaState[t5.id] = e5), r3.emitSyncDispatch({ slideIndex: r3.__slideState.currentSlideIndex, type: "mediaSeek", id: t5.id, time: t5.time, state: e5 }), r3.emitStateChange();
|
|
35042
|
-
}), o2.on(
|
|
35115
|
+
}), o2.on($R.requestPrevSlide, function(t5) {
|
|
35043
35116
|
r3.handlePrevSlide(t5);
|
|
35044
|
-
}), o2.on(
|
|
35117
|
+
}), o2.on($R.requestNextSlide, function(t5) {
|
|
35045
35118
|
r3.handleNextSlide(t5);
|
|
35046
|
-
}), o2.on(
|
|
35119
|
+
}), o2.on($R.requestGotoSlide, function(t5) {
|
|
35047
35120
|
r3.config.navigatorDelegate ? r3.config.navigatorDelegate.gotoPage(t5) : r3.handleGotoSlide(t5);
|
|
35048
|
-
}), (e4 = o2.view) === null || e4 === void 0 || e4.addEventListener("touchend", this.handleViewTouchEnd), (n4 = o2.view) === null || n4 === void 0 || n4.addEventListener("touchstart", this.handleViewTouchStart), (i3 = o2.view) === null || i3 === void 0 || i3.addEventListener("click", this.handleViewClick), o2.on(
|
|
35121
|
+
}), (e4 = o2.view) === null || e4 === void 0 || e4.addEventListener("touchend", this.handleViewTouchEnd), (n4 = o2.view) === null || n4 === void 0 || n4.addEventListener("touchstart", this.handleViewTouchStart), (i3 = o2.view) === null || i3 === void 0 || i3.addEventListener("click", this.handleViewClick), o2.on($R.userInput, this.userInputHandle), o2;
|
|
35049
35122
|
}, e3.prototype.createController = function() {
|
|
35050
|
-
this.player && (this.playerController = new
|
|
35123
|
+
this.player && (this.playerController = new KC({ player: this.player, params: this.player.config || {}, target: this.frame }));
|
|
35051
35124
|
}, e3.prototype.setMedianControllerAttribute = function() {
|
|
35052
35125
|
this.medianController.className = "median-container", this.medianController.style.position = "absolute", this.medianController.style.left = "0", this.medianController.style.top = "0", this.medianController.style.zIndex = "2";
|
|
35053
35126
|
}, e3.prototype.frameResizeHandler = function() {
|
|
@@ -35067,9 +35140,9 @@ void main(void){
|
|
|
35067
35140
|
}
|
|
35068
35141
|
}, e3.prototype.setSlideState = function(t4) {
|
|
35069
35142
|
var e4, n4, i3;
|
|
35070
|
-
return
|
|
35143
|
+
return oI(this, void 0, void 0, function() {
|
|
35071
35144
|
var r3, o2 = this;
|
|
35072
|
-
return
|
|
35145
|
+
return sI(this, function(s3) {
|
|
35073
35146
|
switch (s3.label) {
|
|
35074
35147
|
case 0:
|
|
35075
35148
|
return this.isSyncingSlideState = true, this.logger.info("stateChange receive " + JSON.stringify(t4), this.taskId), t4.taskId && t4.taskId !== this.__slideState.taskId && (this.__slideState.taskId = t4.taskId, (e4 = this.player) === null || e4 === void 0 || e4.setResourceData(t4.taskId, this.__slideState.url)), t4.url && t4.url !== this.__slideState.url && (this.__slideState.url = t4.url, (n4 = this.player) === null || n4 === void 0 || n4.setResourceData(this.__slideState.taskId, t4.url)), Number.isInteger(t4.currentSlideIndex) && t4.currentSlideIndex !== this.__slideState.currentSlideIndex ? (this.__slideState.currentSlideIndex = t4.currentSlideIndex, [4, this.doRenderSlide(t4.currentSlideIndex)]) : [3, 2];
|
|
@@ -35109,9 +35182,9 @@ void main(void){
|
|
|
35109
35182
|
}, Object.defineProperty(e3.prototype, "slideCount", { get: function() {
|
|
35110
35183
|
return this._slideCount;
|
|
35111
35184
|
}, enumerable: false, configurable: true }), e3.prototype.getSizeAsync = function() {
|
|
35112
|
-
return
|
|
35185
|
+
return oI(this, void 0, void 0, function() {
|
|
35113
35186
|
var t4;
|
|
35114
|
-
return
|
|
35187
|
+
return sI(this, function(e4) {
|
|
35115
35188
|
switch (e4.label) {
|
|
35116
35189
|
case 0:
|
|
35117
35190
|
if (this.width > 0 && this.height > 0)
|
|
@@ -35131,8 +35204,8 @@ void main(void){
|
|
|
35131
35204
|
});
|
|
35132
35205
|
});
|
|
35133
35206
|
}, e3.prototype.getSlideCountAsync = function() {
|
|
35134
|
-
return
|
|
35135
|
-
return
|
|
35207
|
+
return oI(this, void 0, void 0, function() {
|
|
35208
|
+
return sI(this, function(t4) {
|
|
35136
35209
|
switch (t4.label) {
|
|
35137
35210
|
case 0:
|
|
35138
35211
|
if (this._slideCount > 0)
|
|
@@ -35188,12 +35261,12 @@ void main(void){
|
|
|
35188
35261
|
this.taskId = t4, (n4 = this.player) === null || n4 === void 0 || n4.setResourceData(t4, e4), this.__slideState.taskId = t4, this.__slideState.url = e4, this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "setResource", taskId: t4, url: e4 });
|
|
35189
35262
|
}, e3.prototype._renderSlide = function(t4) {
|
|
35190
35263
|
var e4;
|
|
35191
|
-
return
|
|
35264
|
+
return oI(this, void 0, void 0, function() {
|
|
35192
35265
|
var n4 = this;
|
|
35193
|
-
return
|
|
35266
|
+
return sI(this, function(i3) {
|
|
35194
35267
|
switch (i3.label) {
|
|
35195
35268
|
case 0:
|
|
35196
|
-
return this.renderingIndex = t4, this.player && t4 === this.player.currentIndex ? [2] : ((
|
|
35269
|
+
return this.renderingIndex = t4, this.player && t4 === this.player.currentIndex ? [2] : ((KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.indexOf(t4) < 0 && this.iosResetCache.push(t4), [4, (e4 = this.player) === null || e4 === void 0 ? void 0 : e4.renderSlide(t4)]);
|
|
35197
35270
|
case 1:
|
|
35198
35271
|
return i3.sent(), this.__slideState.currentSlideIndex = t4, this.resizeView(), this.__slideState.interactiveSeqState = {}, this.emitStateChange(), setTimeout(function() {
|
|
35199
35272
|
var t5, e5;
|
|
@@ -35212,8 +35285,8 @@ void main(void){
|
|
|
35212
35285
|
(n4 !== this.player.currentIndex || this.renderingTaskManager.hasStartTask()) && (n4 > this.slideCount && this.slideCount > 0 || this.poseRenderSlide(n4, e4));
|
|
35213
35286
|
}
|
|
35214
35287
|
}, e3.prototype.needCreateNewPlayer = function() {
|
|
35215
|
-
var t4 =
|
|
35216
|
-
return (
|
|
35288
|
+
var t4 = KR.platform.isLowGpuMemory() ? 15 : 30;
|
|
35289
|
+
return (KR.platform.isIOS() || KR.platform.isAndroid()) && this.iosResetCache.length > t4;
|
|
35217
35290
|
}, e3.prototype.poseRenderSlide = function(t4, e4) {
|
|
35218
35291
|
this.mode === "interactive" ? this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t4, isForward: e4 }) : this.mode === "sync" ? (this.doRenderSlide(t4, e4), this.emitSyncDispatch({ slideIndex: this.__slideState.currentSlideIndex, type: "renderSlide", index: t4, isForward: e4 })) : this.doRenderSlide(t4, e4);
|
|
35219
35292
|
}, e3.prototype.doRenderSlide = function(t4, e4) {
|
|
@@ -35251,14 +35324,14 @@ void main(void){
|
|
|
35251
35324
|
}, e3.prototype.emitStateChange = function() {
|
|
35252
35325
|
if (this.mode !== "local" && !this.isSyncingSlideState) {
|
|
35253
35326
|
var t4 = this.slideState;
|
|
35254
|
-
!Object(l.isEqual)(this.lastEmitedState, t4) && this.isSlideStateReady(t4) && (this.lastEmitedState = t4, this.emit(
|
|
35327
|
+
!Object(l.isEqual)(this.lastEmitedState, t4) && this.isSlideStateReady(t4) && (this.lastEmitedState = t4, this.emit(hI.stateChange, t4), this.logger.info("stateChange dispatch " + JSON.stringify(this.slideState), this.taskId));
|
|
35255
35328
|
}
|
|
35256
35329
|
}, e3.prototype.emitSyncDispatch = function(t4) {
|
|
35257
35330
|
if (!this.lock.isLocked(t4.type)) {
|
|
35258
35331
|
var e4 = Math.random().toString(32).substr(2);
|
|
35259
35332
|
this.lock.addLock(t4.type, e4);
|
|
35260
|
-
var n4 =
|
|
35261
|
-
this.config.mode === "sync" && (n4.incrId = this.dispatchIncrId), this.emit(
|
|
35333
|
+
var n4 = iI(iI({}, t4), { uuid: e4 });
|
|
35334
|
+
this.config.mode === "sync" && (n4.incrId = this.dispatchIncrId), this.emit(hI.syncDispatch, n4), this.logger.info("sync dispatch " + JSON.stringify(n4), this.taskId);
|
|
35262
35335
|
}
|
|
35263
35336
|
}, e3.prototype.setMainSeqStep = function(t4, e4) {
|
|
35264
35337
|
var n4;
|
|
@@ -35274,9 +35347,9 @@ void main(void){
|
|
|
35274
35347
|
(t4 = this.player) === null || t4 === void 0 || t4.resume();
|
|
35275
35348
|
}, e3.prototype._doFrozen = function() {
|
|
35276
35349
|
var t4;
|
|
35277
|
-
return
|
|
35350
|
+
return oI(this, void 0, void 0, function() {
|
|
35278
35351
|
var e4, n4, i3, r3 = this;
|
|
35279
|
-
return
|
|
35352
|
+
return sI(this, function(o2) {
|
|
35280
35353
|
switch (o2.label) {
|
|
35281
35354
|
case 0:
|
|
35282
35355
|
return this.view && this.player ? [4, this.player.clock.waitUntil(function() {
|
|
@@ -35284,7 +35357,7 @@ void main(void){
|
|
|
35284
35357
|
}, 6e4)] : [3, 2];
|
|
35285
35358
|
case 1:
|
|
35286
35359
|
for (n4 in o2.sent(), e4 = this.player.getSnapshot() || "", this.cacheImage.src = e4, this.frame.appendChild(this.cacheImage), this.player.destroy(), (t4 = this.playerController) === null || t4 === void 0 || t4.destroy(), this.player = void 0, this.__slideState.mediaState)
|
|
35287
|
-
i3 = this.__slideState.mediaState[n4], this.__slideState.mediaState[n4] =
|
|
35360
|
+
i3 = this.__slideState.mediaState[n4], this.__slideState.mediaState[n4] = iI(iI({}, i3), { frozenTime: this.timestamp() });
|
|
35288
35361
|
o2.label = 2;
|
|
35289
35362
|
case 2:
|
|
35290
35363
|
return [2];
|
|
@@ -35298,14 +35371,14 @@ void main(void){
|
|
|
35298
35371
|
});
|
|
35299
35372
|
}, e3.prototype._doRelease = function() {
|
|
35300
35373
|
var t4, e4;
|
|
35301
|
-
return
|
|
35374
|
+
return oI(this, void 0, void 0, function() {
|
|
35302
35375
|
var n4, i3, r3, o2;
|
|
35303
|
-
return
|
|
35376
|
+
return sI(this, function(s3) {
|
|
35304
35377
|
switch (s3.label) {
|
|
35305
35378
|
case 0:
|
|
35306
35379
|
if (this.player)
|
|
35307
35380
|
return [2];
|
|
35308
|
-
for (i3 in this.player = this.initPlayer(this.config), ((t4 = this.config) === null || t4 === void 0 ? void 0 : t4.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n4 = this.__slideState, this.__slideState = Object(l.cloneDeep)(
|
|
35381
|
+
for (i3 in this.player = this.initPlayer(this.config), ((t4 = this.config) === null || t4 === void 0 ? void 0 : t4.controller) && this.createController(), this.player.view && (this.frame.appendChild(this.player.view), this.player.view.style.visibility = "hidden"), n4 = this.__slideState, this.__slideState = Object(l.cloneDeep)(cI), n4.mediaState)
|
|
35309
35382
|
(r3 = n4.mediaState[i3]).type === "play" && (o2 = Math.max((e4 = r3.frozenTime) !== null && e4 !== void 0 ? e4 : 0, r3.time), r3.time = this.timestamp() - (o2 - r3.time), r3.frozenTime = void 0);
|
|
35310
35383
|
return [4, this.setSlideState(n4)];
|
|
35311
35384
|
case 1:
|
|
@@ -35339,14 +35412,14 @@ void main(void){
|
|
|
35339
35412
|
} catch (t5) {
|
|
35340
35413
|
}
|
|
35341
35414
|
}, e3.prototype.waitLoadEnd = function() {
|
|
35342
|
-
return
|
|
35415
|
+
return oI(this, void 0, void 0, function() {
|
|
35343
35416
|
var t4;
|
|
35344
|
-
return
|
|
35417
|
+
return sI(this, function(e4) {
|
|
35345
35418
|
switch (e4.label) {
|
|
35346
35419
|
case 0:
|
|
35347
35420
|
t4 = 0, e4.label = 1;
|
|
35348
35421
|
case 1:
|
|
35349
|
-
return this.isLoading && t4 < 10 ? [4,
|
|
35422
|
+
return this.isLoading && t4 < 10 ? [4, lI(100)] : [3, 3];
|
|
35350
35423
|
case 2:
|
|
35351
35424
|
return e4.sent(), t4 += 1, [3, 1];
|
|
35352
35425
|
case 3:
|
|
@@ -35373,21 +35446,21 @@ void main(void){
|
|
|
35373
35446
|
var t4 = this.player.currentIndex === 1, e4 = this.mainSeqLength === 0 || this.mainSeqStep === 0, n4 = this.mainSeqState === "idle" || this.mainSeqState === null;
|
|
35374
35447
|
return !(t4 && e4 && n4);
|
|
35375
35448
|
}, e3.clearLocalCache = function() {
|
|
35376
|
-
|
|
35449
|
+
KR.clearLocalCache();
|
|
35377
35450
|
}, e3.disposeLocalCache = function() {
|
|
35378
|
-
}, e3._tempLog = "", e3._tempLogIndex = 1, e3.usePlugin =
|
|
35379
|
-
return
|
|
35451
|
+
}, e3._tempLog = "", e3._tempLogIndex = 1, e3.usePlugin = tP, e3.handleLogDownload = function() {
|
|
35452
|
+
return oI(void 0, void 0, void 0, function() {
|
|
35380
35453
|
var t4, e4, n4, i3, r3, o2, s3;
|
|
35381
|
-
return
|
|
35454
|
+
return sI(this, function(a2) {
|
|
35382
35455
|
switch (a2.label) {
|
|
35383
35456
|
case 0:
|
|
35384
|
-
return t4 = "",
|
|
35457
|
+
return t4 = "", pI ? [4, pI.keys()] : [3, 5];
|
|
35385
35458
|
case 1:
|
|
35386
35459
|
e4 = (a2.sent() || []).sort(function(t5, e5) {
|
|
35387
35460
|
return parseInt(t5.replace("run_time_log_", "")) - parseInt(e5.replace("run_time_log_", ""));
|
|
35388
35461
|
}), n4 = 0, i3 = e4, a2.label = 2;
|
|
35389
35462
|
case 2:
|
|
35390
|
-
return n4 < i3.length ? (r3 = i3[n4], o2 = t4, [4,
|
|
35463
|
+
return n4 < i3.length ? (r3 = i3[n4], o2 = t4, [4, pI.getItem(r3)]) : [3, 5];
|
|
35391
35464
|
case 3:
|
|
35392
35465
|
t4 = o2 + (a2.sent() || ""), a2.label = 4;
|
|
35393
35466
|
case 4:
|
|
@@ -35397,12 +35470,12 @@ void main(void){
|
|
|
35397
35470
|
}
|
|
35398
35471
|
});
|
|
35399
35472
|
});
|
|
35400
|
-
},
|
|
35473
|
+
}, rI([(n3 = "Slide.initConfig", function(t4, e4, i3) {
|
|
35401
35474
|
var r3 = i3.value;
|
|
35402
35475
|
i3.value = function() {
|
|
35403
35476
|
for (var t5 = [], e5 = 0; e5 < arguments.length; e5++)
|
|
35404
35477
|
t5[e5] = arguments[e5];
|
|
35405
|
-
for (var i4 =
|
|
35478
|
+
for (var i4 = QR.get(n3) || [], o2 = t5, s3 = 0, a2 = i4; s3 < a2.length; s3++) {
|
|
35406
35479
|
var l2 = a2[s3];
|
|
35407
35480
|
try {
|
|
35408
35481
|
o2 = l2.before(o2);
|
|
@@ -35424,8 +35497,8 @@ void main(void){
|
|
|
35424
35497
|
};
|
|
35425
35498
|
})], e3.prototype, "initSlideConfig", null), e3;
|
|
35426
35499
|
}(a.a);
|
|
35427
|
-
|
|
35428
|
-
|
|
35500
|
+
pI == null || pI.clear(), window.addEventListener("__slide_log__", fI.handleLogDownload), window.setInterval(function() {
|
|
35501
|
+
fI.flushLog().catch(function() {
|
|
35429
35502
|
});
|
|
35430
35503
|
}, 9e3);
|
|
35431
35504
|
}]);
|
|
@@ -37592,7 +37665,7 @@ class SlidePreviewer {
|
|
|
37592
37665
|
}
|
|
37593
37666
|
}
|
|
37594
37667
|
const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
|
|
37595
|
-
const version = "0.2.
|
|
37668
|
+
const version = "0.2.6-alpha.0";
|
|
37596
37669
|
const SlideApp = {
|
|
37597
37670
|
kind: "Slide",
|
|
37598
37671
|
setup(context) {
|