@netless/app-slide 0.2.62 → 0.2.63
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/LICENSE +21 -0
- package/dist/main.cjs.js +171 -161
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +133 -125
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +106 -96
- package/dist/main.iife.js.map +1 -1
- package/package.json +9 -9
- package/src/SlideController/index.ts +1 -1
- package/src/SlideDocsViewer/index.ts +22 -22
package/dist/main.es.js
CHANGED
|
@@ -11555,7 +11555,7 @@ var Slide = function(t) {
|
|
|
11555
11555
|
}, function(t, e) {
|
|
11556
11556
|
t.exports = "varying vec2 vTextureCoord;\nuniform float percent;\nuniform sampler2D uSampler;\nvarying vec2 filterCoord;\nuniform vec4 inputSize;\nuniform vec4 uBoundRect;\nuniform float transition;\nuniform sampler2D dissolveSampler;\nvoid main() {\n vec4 outputColor = texture2D(uSampler, vTextureCoord);\n float splitWidth = max(uBoundRect.z, uBoundRect.w) / 3.0;\n vec2 position = mod(filterCoord.xy, splitWidth);\n vec2 loopTime = floor(filterCoord.xy / splitWidth);\n if (loopTime.x > 0.5) {\n position.x = splitWidth - position.x;\n }\n if (loopTime.y > 0.5) {\n position.y = splitWidth - position.y;\n }\n vec4 dissolveColor = texture2D(dissolveSampler, position.xy / splitWidth);\n float timePercent = transition > 0.0 ? percent : 1.0 - percent;\n if (dissolveColor.r < percent) {\n gl_FragColor = outputColor;\n }\n else {\n gl_FragColor = vec4(0, 0, 0, 0);\n }\n}\n";
|
|
11557
11557
|
}, function(t, e) {
|
|
11558
|
-
t.exports = "varying vec2 vTextureCoord;\nuniform float percent;\nuniform sampler2D uSampler;\nvarying vec2 filterCoord;\nuniform vec4 uBoundRect;\nuniform float transition;\nuniform sampler2D dissolveSampler;\nuniform float option;\nvoid main() {\n vec4 outputColor = texture2D(uSampler, vTextureCoord);\n vec2 position = vec2(uBoundRect.z - filterCoord.x, uBoundRect.w - filterCoord.y);\n vec4 dissolveColor;\n if (option > 0.5) {\n dissolveColor = texture2D(dissolveSampler, vec2(vTextureCoord.x, 0.0));\n }\n else {\n dissolveColor = texture2D(dissolveSampler, vec2(0.0, vTextureCoord.y));\n }\n if (dissolveColor.r < percent) {\n
|
|
11558
|
+
t.exports = "varying vec2 vTextureCoord;\nuniform float percent;\nuniform sampler2D uSampler;\nvarying vec2 filterCoord;\nuniform vec4 uBoundRect;\nuniform float transition;\nuniform sampler2D dissolveSampler;\nuniform float option;\nvoid main() {\n vec4 outputColor = texture2D(uSampler, vTextureCoord);\n vec2 position = vec2(uBoundRect.z - filterCoord.x, uBoundRect.w - filterCoord.y);\n vec4 dissolveColor;\n if (option > 0.5) {\n dissolveColor = texture2D(dissolveSampler, vec2(vTextureCoord.x, 0.0));\n }\n else {\n dissolveColor = texture2D(dissolveSampler, vec2(0.0, vTextureCoord.y));\n }\n if (transition > .0) {\n if (dissolveColor.r < percent) {\n gl_FragColor = outputColor;\n }\n else {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n }\n else {\n if (dissolveColor.r < percent) {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n else {\n gl_FragColor = outputColor;\n }\n }\n}\n";
|
|
11559
11559
|
}, function(t, e) {
|
|
11560
11560
|
t.exports = "float interpolationFloat(float from, float to, float start, float end, float timePercent, int timing) {\n float pi = 3.14159265358;\n float current;\n float duration = 1.0;\n if (timePercent < start) {\n current = 0.0;\n }\n else if (timePercent > end) {\n current = 1.0;\n }\n else {\n current = (timePercent - start) / (end - start);\n }\n if (timing == 0) {\n return ((current / duration) * (to - from)) + from;\n }\n else if (timing == 1) {\n current = current / duration;\n return (((to - from) * current) * current) + from;\n }\n else if (timing == 2) {\n current = current / duration;\n return (((-1.0 * (to - from)) * current) * (current - 2.0)) + from;\n }\n else {\n current /= (duration / 2.0);\n if (current < 1.0) {\n return ((((to - from) / 2.0) * current) * current) + from;\n }\n current--;\n return ((-(to - from) / 2.0) * ((current * (current - 2.0)) - 1.0)) + from;\n }\n}\nvarying vec2 vTextureCoord;\nuniform float percent;\nuniform sampler2D uSampler;\nvarying vec2 filterCoord;\nuniform vec4 uBoundRect;\nuniform float transition;\nuniform float option;\nvoid main() {\n vec4 outputColor = texture2D(uSampler, vTextureCoord);\n vec2 point = vec2(filterCoord.x - (uBoundRect.z / 2.0), filterCoord.y - (uBoundRect.w / 2.0));\n float timePercent = interpolationFloat(0.0, 1.0, 0.0, 1.0, percent, 2);\n float radius = sqrt(pow(uBoundRect.z, 2.0) + pow(uBoundRect.w, 2.0)) / 2.0;\n float alphaWidth = 0.1;\n float pointDistance = sqrt(pow(point.x, 2.0) + pow(point.y, 2.0));\n float alphaRadiusFormula;\n if (option > 0.5) {\n if (transition > 0.0) {\n alphaRadiusFormula = 1.0 - ((pointDistance - (radius * timePercent)) / (alphaWidth * radius));\n }\n else {\n alphaRadiusFormula = (pointDistance - (radius * timePercent)) / (alphaWidth * radius);\n }\n }\n else {\n if (transition > 0.0) {\n alphaRadiusFormula = (pointDistance - (radius * (1.0 - timePercent))) / (alphaWidth * radius);\n }\n else {\n alphaRadiusFormula = 1.0 - ((pointDistance - (radius * (1.0 - timePercent))) / (alphaWidth * radius));\n }\n }\n if (option > 0.5) {\n if (pointDistance < (radius * timePercent)) {\n gl_FragColor = transition > 0.0 ? outputColor : vec4(0, 0, 0, 0);\n }\n else if (pointDistance < (radius * (timePercent + alphaWidth))) {\n gl_FragColor = outputColor * alphaRadiusFormula;\n }\n else {\n gl_FragColor = transition > 0.0 ? vec4(0, 0, 0, 0) : outputColor;\n }\n }\n else {\n if (pointDistance < (radius * (1.0 - timePercent))) {\n gl_FragColor = transition > 0.0 ? vec4(0, 0, 0, 0) : outputColor;\n }\n else if (pointDistance < (radius * ((1.0 - timePercent) + alphaWidth))) {\n gl_FragColor = outputColor * alphaRadiusFormula;\n }\n else {\n gl_FragColor = transition > 0.0 ? outputColor : vec4(0, 0, 0, 0);\n }\n }\n}\n";
|
|
11561
11561
|
}, function(t, e) {
|
|
@@ -12608,7 +12608,9 @@ var Slide = function(t) {
|
|
|
12608
12608
|
return r(t2) && "[object Set]" == n(t2);
|
|
12609
12609
|
};
|
|
12610
12610
|
}, function(t, e, i) {
|
|
12611
|
-
i.r(e), i.d(e, "
|
|
12611
|
+
i.r(e), i.d(e, "ErrorType", function() {
|
|
12612
|
+
return gm;
|
|
12613
|
+
}), i.d(e, "delay", function() {
|
|
12612
12614
|
return dT;
|
|
12613
12615
|
}), i.d(e, "waitUntil", function() {
|
|
12614
12616
|
return pT;
|
|
@@ -29244,7 +29246,7 @@ void main() {
|
|
|
29244
29246
|
class hg {
|
|
29245
29247
|
constructor(t2, e2, i2) {
|
|
29246
29248
|
var n2, r2, o2, s2, a2, l2;
|
|
29247
|
-
this.scaleExt = { x: 1, y: 1 }, this.scaleOrigin = { x: 1, y: 1 }, this.designScale = { x: 1, y: 1 }, this.bound = new Lh.j(0, 0, 1, 1), this.pptX = 0, this.pptY = 0, this.presetSubType = 0, this.designWidth = 0, this.designHeight = 0, this.designX = 0, this.designY = 0, this.hasPreset = false, this.container = new Oh.b(), this.ctx = e2, this.style = new rg(this.container, !!t2.hardHidden, t2.rotation || 0), this.designGlobalPosition = { x: i2.parentGlobalPos.x + (null !== (r2 = null === (n2 = t2.position) || void 0 === n2 ? void 0 : n2.x) && void 0 !== r2 ? r2 : 0), y: i2.parentGlobalPos.y + (null !== (s2 = null === (o2 = t2.position) || void 0 === o2 ? void 0 : o2.y) && void 0 !== s2 ? s2 : 0) }, (t2.hlinkClick || t2.hlinkHover) && (this.hyperlink = new og(this.container, this.ctx), t2.hlinkHover && (null === (a2 = this.hyperlink) || void 0 === a2 || a2.addAction(t2.hlinkHover, "hover")), t2.hlinkClick && (null === (l2 = this.hyperlink) || void 0 === l2 || l2.addAction(t2.hlinkClick, "click"))), this.ctx.clock.waitUntil(() => {
|
|
29249
|
+
this.scaleExt = { x: 1, y: 1 }, this.scaleOrigin = { x: 1, y: 1 }, this.designScale = { x: 1, y: 1 }, this.bound = new Lh.j(0, 0, 1, 1), this.pptX = 0, this.pptY = 0, this.presetSubType = 0, this.designWidth = 0, this.designHeight = 0, this.designX = 0, this.designY = 0, this.hasPreset = false, this.container = new Oh.b(), this.ctx = e2, this.option = i2, this.style = new rg(this.container, !!t2.hardHidden, t2.rotation || 0), this.designGlobalPosition = { x: i2.parentGlobalPos.x + (null !== (r2 = null === (n2 = t2.position) || void 0 === n2 ? void 0 : n2.x) && void 0 !== r2 ? r2 : 0), y: i2.parentGlobalPos.y + (null !== (s2 = null === (o2 = t2.position) || void 0 === o2 ? void 0 : o2.y) && void 0 !== s2 ? s2 : 0) }, (t2.hlinkClick || t2.hlinkHover) && (this.hyperlink = new og(this.container, this.ctx), t2.hlinkHover && (null === (a2 = this.hyperlink) || void 0 === a2 || a2.addAction(t2.hlinkHover, "hover")), t2.hlinkClick && (null === (l2 = this.hyperlink) || void 0 === l2 || l2.addAction(t2.hlinkClick, "click"))), this.ctx.clock.waitUntil(() => {
|
|
29248
29250
|
try {
|
|
29249
29251
|
return !!this.container.width;
|
|
29250
29252
|
} catch (t3) {
|
|
@@ -29441,9 +29443,6 @@ void main() {
|
|
|
29441
29443
|
Tg.matrix = [1, 0, 0, 0, 0.1, 0, 1, 0, 0, 0.1, 0, 0, 1, 0, 0.1, 0, 0, 0, 1, 0];
|
|
29442
29444
|
const Eg = { darken: yg, darkenLess: xg, lightenLess: Tg, lighten: bg };
|
|
29443
29445
|
class Sg extends hg {
|
|
29444
|
-
constructor(t2, e2, i2) {
|
|
29445
|
-
super({ position: { x: t2.x, y: t2.y }, width: t2.width, height: t2.height }, e2, i2), this.fillColorFilter = new _g(), this.fill = new ng(this), this.json = t2, this.ctx = e2, this.parentGlobalPos = i2.parentGlobalPos, this.global = { x: i2.parentGlobalPos.x + t2.x, y: i2.parentGlobalPos.y + t2.y }, this.updateTransform({ position: { x: t2.x, y: t2.y }, width: t2.width, height: t2.height });
|
|
29446
|
-
}
|
|
29447
29446
|
get fillActive() {
|
|
29448
29447
|
var t2, e2;
|
|
29449
29448
|
return (null !== (e2 = null === (t2 = this.container.filters) || void 0 === t2 ? void 0 : t2.length) && void 0 !== e2 ? e2 : -1) > 0;
|
|
@@ -29452,6 +29451,9 @@ void main() {
|
|
|
29452
29451
|
var e2, i2;
|
|
29453
29452
|
t2 ? (null !== (i2 = null === (e2 = this.container.filters) || void 0 === e2 ? void 0 : e2.indexOf(this.fillColorFilter)) && void 0 !== i2 ? i2 : -1) < 0 && (this.container.filters = [this.fillColorFilter]) : this.container.filters = [];
|
|
29454
29453
|
}
|
|
29454
|
+
constructor(t2, e2, i2) {
|
|
29455
|
+
super({ position: { x: t2.x, y: t2.y }, width: t2.width, height: t2.height }, e2, i2), this.fillColorFilter = new _g(), this.fill = new ng(this), this.json = t2, this.ctx = e2, this.parentGlobalPos = i2.parentGlobalPos, this.global = { x: i2.parentGlobalPos.x + t2.x, y: i2.parentGlobalPos.y + t2.y }, this.updateTransform({ position: { x: t2.x, y: t2.y }, width: t2.width, height: t2.height });
|
|
29456
|
+
}
|
|
29455
29457
|
get renderContainer() {
|
|
29456
29458
|
return this.container;
|
|
29457
29459
|
}
|
|
@@ -29884,7 +29886,7 @@ void main() {
|
|
|
29884
29886
|
p2[t3].point.x += n2, p2[t3].point.y = -p2[t3].point.y + r2;
|
|
29885
29887
|
return { points: p2, position: { x: 0, y: 0 } };
|
|
29886
29888
|
}
|
|
29887
|
-
const qg = "\nvec3 rgb2hsl(vec3 rgb) {\n float cMax = max(max(rgb.r, rgb.g), rgb.b);\n float cMin = min(min(rgb.r, rgb.g), rgb.b);\n float delta = cMax - cMin;\n \n float h = 0.0;\n if (delta == 0.0) {\n h = 0.0;\n } else if (cMax == rgb.r) {\n h = 60.0 * mod(((rgb.g - rgb.b) / delta), 6.0);\n } else if (cMax == rgb.g ) {\n h = 60.0 * ((rgb.b - rgb.r) / delta + 2.0);\n } else if (cMax == rgb.b) {\n h = 60.0 * ((rgb.r - rgb.g) / delta + 4.0);\n }\n \n float l = (cMax + cMin) / 2.0;\n \n float s = 0.0;\n if (delta == 0.0) {\n s = 0.0;\n } else {\n s = delta / (1.0 - abs(2.0 * l - 1.0));\n }\n \n return vec3(h, s, l);\n}\n", Zg = [qg], Jg = { biLevel: "\nvec4 transform(vec4 texColor, float arg) {\n mat3 rgb2yuv = mat3(\n 0.2126, 0.7152, 0.0722,\n -0.09991, -0.33609, 0.43600,\n 0.615, -0.5586, -0.05639\n );\n vec3 yuv = texColor.rgb * rgb2yuv;\n if (yuv.x >=
|
|
29889
|
+
const qg = "\nvec3 rgb2hsl(vec3 rgb) {\n float cMax = max(max(rgb.r, rgb.g), rgb.b);\n float cMin = min(min(rgb.r, rgb.g), rgb.b);\n float delta = cMax - cMin;\n \n float h = 0.0;\n if (delta == 0.0) {\n h = 0.0;\n } else if (cMax == rgb.r) {\n h = 60.0 * mod(((rgb.g - rgb.b) / delta), 6.0);\n } else if (cMax == rgb.g ) {\n h = 60.0 * ((rgb.b - rgb.r) / delta + 2.0);\n } else if (cMax == rgb.b) {\n h = 60.0 * ((rgb.r - rgb.g) / delta + 4.0);\n }\n \n float l = (cMax + cMin) / 2.0;\n \n float s = 0.0;\n if (delta == 0.0) {\n s = 0.0;\n } else {\n s = delta / (1.0 - abs(2.0 * l - 1.0));\n }\n \n return vec3(h, s, l);\n}\n", Zg = [qg], Jg = { biLevel: "\nvec4 transform(vec4 texColor, float arg) {\n mat3 rgb2yuv = mat3(\n 0.2126, 0.7152, 0.0722,\n -0.09991, -0.33609, 0.43600,\n 0.615, -0.5586, -0.05639\n );\n vec3 yuv = texColor.rgb * rgb2yuv;\n if (yuv.x >= arg || texColor.a < 0.9) {\n return vec4(1.0, 1.0, 1.0, 1.0) * texColor.a;\n } else {\n return vec4(0.0, 0.0, 0.0, 1.0) * texColor.a;\n }\n}\n", alphaModFix: "\nvec4 transform(vec4 texColor, float arg) {\n return texColor * arg;\n}\n", alphaBiLevel: "\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < arg) {\n result.a = 0.0;\n } else {\n result.a = 1.0;\n }\n return result;\n}\n", alphaCeiling: "\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a > 0.0) {\n result.a = 1.0;\n }\n return result;\n}\n", alphaFloor: "\nvec4 transform(vec4 texColor, float arg) {\n vec4 result = vec4(texColor);\n result.rgb = result.rgb / texColor.a;\n if (texColor.a < 1.0) {\n result.a = 0.0;\n }\n return result;\n}\n", grayscl: "\nvec4 transform(vec4 texColor, float arg) {\n float avg = (texColor.r + texColor.g + texColor.b) / 3.0;\n return vec4(avg, avg, avg, texColor.a);\n}\n" };
|
|
29888
29890
|
class Kg extends Vh.k {
|
|
29889
29891
|
constructor(t2, e2) {
|
|
29890
29892
|
var i2;
|
|
@@ -29988,9 +29990,6 @@ void main(void){
|
|
|
29988
29990
|
}), i2;
|
|
29989
29991
|
}
|
|
29990
29992
|
class lv {
|
|
29991
|
-
constructor(t2, e2, i2, n2, r2) {
|
|
29992
|
-
this.ctx = t2, this.fillStyle = e2, this.width = i2, this.height = n2, this.config = r2, this.clonedObjects = [], this._displayObject = null, this.gradientHash = jm()(`${JSON.stringify(e2)}${Math.ceil(i2)}${Math.ceil(n2)}`);
|
|
29993
|
-
}
|
|
29994
29993
|
get displayObject() {
|
|
29995
29994
|
return this._displayObject || (this._displayObject = this.createDisplayObject()), this._displayObject;
|
|
29996
29995
|
}
|
|
@@ -30000,8 +29999,11 @@ void main(void){
|
|
|
30000
29999
|
get hasFill() {
|
|
30001
30000
|
return !!this.fillStyle && "noFill" !== this.fillStyle.fillType;
|
|
30002
30001
|
}
|
|
30002
|
+
constructor(t2, e2, i2, n2, r2) {
|
|
30003
|
+
this.ctx = t2, this.fillStyle = e2, this.width = i2, this.height = n2, this.config = r2, this.clonedObjects = [], this._displayObject = null, this.gradientHash = jm()(`${JSON.stringify(e2)}${Math.ceil(i2)}${Math.ceil(n2)}`);
|
|
30004
|
+
}
|
|
30003
30005
|
createDisplayObject() {
|
|
30004
|
-
var t2;
|
|
30006
|
+
var t2, e2;
|
|
30005
30007
|
if (!this.fillStyle)
|
|
30006
30008
|
return null;
|
|
30007
30009
|
if (this.config.useSlideBackgroundFill && this.ctx.bgTexture) {
|
|
@@ -30011,29 +30013,29 @@ void main(void){
|
|
|
30011
30013
|
if ("solidFill" === this.fillStyle.fillType || "noFill" === this.fillStyle.fillType)
|
|
30012
30014
|
return null;
|
|
30013
30015
|
if ("gradientFill" === this.fillStyle.fillType) {
|
|
30014
|
-
const t3 = new ep(),
|
|
30015
|
-
return this.ctx.renderer.render(
|
|
30016
|
+
const t3 = new ep(), e3 = Wg(JSON.parse(JSON.stringify(this.fillStyle)), this.width, this.height), i2 = Vh.p.create({ width: this.width, height: this.height, resolution: this.ctx.renderer.resolution });
|
|
30017
|
+
return this.ctx.renderer.render(e3, { renderTexture: i2 }), e3.destroy({ children: true, texture: true }), t3.texture = i2, t3;
|
|
30016
30018
|
}
|
|
30017
30019
|
if ("blipFill" === this.fillStyle.fillType) {
|
|
30018
|
-
const { src:
|
|
30019
|
-
if (
|
|
30020
|
-
const
|
|
30021
|
-
if (
|
|
30022
|
-
const { l:
|
|
30023
|
-
|
|
30024
|
-
const
|
|
30025
|
-
|
|
30020
|
+
const { src: i2, filters: n2 } = this.fillStyle, r2 = this.ctx.spriteTexture.getTexture(i2), o2 = this.ctx.spriteTexture.getFrameData(i2);
|
|
30021
|
+
if (r2) {
|
|
30022
|
+
const i3 = new ep();
|
|
30023
|
+
if (i3.texture = r2, n2.length > 0 && this.config.useFilter && (this.ctx.featureList || {}).filter && (i3.filters = av(n2, this.ctx.featureList)), this.config.fillFloat) {
|
|
30024
|
+
const { l: n3, t: r3, r: o3, b: s2 } = this.config.fillFloat.fillRect, a2 = this.width * (1 - n3 - o3), l2 = this.height * (1 - r3 - s2), h2 = (null !== (t2 = this.config.shapeRotation) && void 0 !== t2 ? t2 : 0) + (null !== (e2 = this.config.groupRotation) && void 0 !== e2 ? e2 : 0), u2 = new Jd();
|
|
30025
|
+
u2.drawRect(0, 0, a2, l2), u2.pivot.x = a2 / 2, u2.pivot.y = l2 / 2, u2.rotation = h2;
|
|
30026
|
+
const c2 = u2.getBounds(), d2 = c2.width, p2 = c2.height;
|
|
30027
|
+
i3.width = d2, i3.height = p2, i3.anchor.x = 0.5, i3.anchor.y = 0.5, i3.rotation = -1 * h2, i3.name = "math-texture", 0 === h2 ? (i3.position.x = d2 / 2 + n3 * this.width, i3.position.y = p2 / 2 + r3 * this.height) : (i3.position.x = this.width / 2, i3.position.y = this.height / 2);
|
|
30026
30028
|
} else
|
|
30027
|
-
|
|
30028
|
-
return
|
|
30029
|
+
i3.width = this.width, i3.height = this.height, o2.rotate && (i3.position.x = this.width / 2, i3.position.y = this.height / 2, i3.anchor.x = 0.5, i3.anchor.y = 0.5, i3.rotation = o2.rotate / 180 * Math.PI);
|
|
30030
|
+
return i3;
|
|
30029
30031
|
}
|
|
30030
30032
|
} else if ("gifFill" === this.fillStyle.fillType) {
|
|
30031
|
-
const { src: t3, delays:
|
|
30033
|
+
const { src: t3, delays: e3, filters: i2 } = this.fillStyle, n2 = this.ctx.spriteTexture.getGifFrames(t3).map((t4, i3) => ({ texture: t4, time: e3[i3] || 20 })), r2 = new im(n2, true);
|
|
30032
30034
|
r2.name = Mm(), r2.width = this.width, r2.height = this.height, i2.length > 0 && this.config.useFilter && (this.ctx.featureList || {}).filter && (r2.filters = av(i2, this.ctx.featureList));
|
|
30033
30035
|
const o2 = this.fillStyle.loop;
|
|
30034
30036
|
let s2 = 1;
|
|
30035
30037
|
return r2.onLoop = () => {
|
|
30036
|
-
s2 += 1, o2 > 0 && s2 > o2 && r2.gotoAndStop(r2.totalFrames);
|
|
30038
|
+
s2 += 1, o2 > 0 && s2 > o2 && r2.gotoAndStop(r2.totalFrames - 1);
|
|
30037
30039
|
}, r2;
|
|
30038
30040
|
}
|
|
30039
30041
|
return null;
|
|
@@ -30205,6 +30207,9 @@ void main(void){
|
|
|
30205
30207
|
});
|
|
30206
30208
|
};
|
|
30207
30209
|
class Nv extends Za.a {
|
|
30210
|
+
get container() {
|
|
30211
|
+
return this._targetContainer;
|
|
30212
|
+
}
|
|
30208
30213
|
constructor(t2, e2, i2, n2, r2, o2) {
|
|
30209
30214
|
super(), this.effects = [], this.attachs = [], this.frames = /* @__PURE__ */ new Map(), this._targetContainer = new Oh.b(), this.frameCount = 1, this.ctx = n2, this.originWidth = t2.width, this.originHeight = t2.height, this.cacheKey = i2, this.sourceSprite = new ep();
|
|
30210
30215
|
for (const i3 of e2)
|
|
@@ -30231,9 +30236,6 @@ void main(void){
|
|
|
30231
30236
|
const s2 = new Lh.j(0, 0, this.originWidth, this.originHeight), a2 = this.effects.map((t3) => t3.filterAreaJustify(s2)), l2 = a2.map((t3) => t3.x), h2 = a2.map((t3) => t3.y), u2 = a2.map((t3) => t3.width), c2 = a2.map((t3) => t3.height);
|
|
30232
30237
|
this.filterArea = new Lh.j(Math.min(...l2, 0), Math.min(...h2, 0), Math.max(...u2, this.originWidth), Math.max(...c2, this.originHeight)), this.sourceSprite.filters = this.effects, this.sourceSprite.filterArea = new Lh.j(0, 0, this.filterArea.width, this.filterArea.height), this._targetSprite = new ep(), this._targetSprite.name = "effect-sprite", this._targetContainer.sortableChildren = true, this._targetSprite.zIndex = 999, this._targetContainer.addChild(this._targetSprite);
|
|
30233
30238
|
}
|
|
30234
|
-
get container() {
|
|
30235
|
-
return this._targetContainer;
|
|
30236
|
-
}
|
|
30237
30239
|
getSdfTexture(t2, e2) {
|
|
30238
30240
|
return Ov(this, void 0, void 0, function* () {
|
|
30239
30241
|
const i2 = `${this.cacheKey}_${t2}`, n2 = this.effects.map((t3) => ({ sdfRect: t3.sdfBox(e2.width, e2.height) })).reduce((t3, e3) => e3.sdfRect ? (t3.width < e3.sdfRect.width && (t3.width = e3.sdfRect.width), t3.height < e3.sdfRect.height && (t3.height = e3.sdfRect.height), t3) : t3, new Lh.j(0, 0));
|
|
@@ -30664,12 +30666,6 @@ void main(void){
|
|
|
30664
30666
|
});
|
|
30665
30667
|
};
|
|
30666
30668
|
class Yv {
|
|
30667
|
-
constructor(t2, e2, i2, n2, r2) {
|
|
30668
|
-
var o2;
|
|
30669
|
-
this.iterateElements = [], this.paragraphs = [], this.effectList = [], this.container = new Oh.b(), this.textContainer = new Oh.b(), this.textColorFilter = new _g(), this.json = t2, this.ctx = e2, this.shapeRotation = r2, this.parentGlobalPos = n2, this.iterateType = i2, this.container.name = "textBody", this.global = { x: this.parentGlobalPos.x + t2.position.x, y: this.parentGlobalPos.y + t2.position.y }, this.container.position.x = t2.position.x, this.container.position.y = t2.position.y, this.container.scale.x = t2.scale.x, this.container.scale.y = t2.scale.y;
|
|
30670
|
-
const s2 = new Jd();
|
|
30671
|
-
s2.drawRect(0, 0, t2.width, t2.height), this.container.addChild(s2), this.container.addChild(this.textContainer), this.textColorFilter.currentColor = "#000000FF", this.textColorFilter.designColor = "#000000FF", this.effectList = null !== (o2 = t2.effectList) && void 0 !== o2 ? o2 : [];
|
|
30672
|
-
}
|
|
30673
30669
|
get width() {
|
|
30674
30670
|
return this.json.width;
|
|
30675
30671
|
}
|
|
@@ -30697,6 +30693,12 @@ void main(void){
|
|
|
30697
30693
|
var e2;
|
|
30698
30694
|
"true" === t2 ? (null !== (e2 = this.container.filters) && void 0 !== e2 ? e2 : []).indexOf(this.textColorFilter) < 0 && (this.container.filters = [this.textColorFilter]) : this.container.filters = [];
|
|
30699
30695
|
}
|
|
30696
|
+
constructor(t2, e2, i2, n2, r2) {
|
|
30697
|
+
var o2;
|
|
30698
|
+
this.iterateElements = [], this.paragraphs = [], this.effectList = [], this.container = new Oh.b(), this.textContainer = new Oh.b(), this.textColorFilter = new _g(), this.json = t2, this.ctx = e2, this.shapeRotation = r2, this.parentGlobalPos = n2, this.iterateType = i2, this.container.name = "textBody", this.global = { x: this.parentGlobalPos.x + t2.position.x, y: this.parentGlobalPos.y + t2.position.y }, this.container.position.x = t2.position.x, this.container.position.y = t2.position.y, this.container.scale.x = t2.scale.x, this.container.scale.y = t2.scale.y;
|
|
30699
|
+
const s2 = new Jd();
|
|
30700
|
+
s2.drawRect(0, 0, t2.width, t2.height), this.container.addChild(s2), this.container.addChild(this.textContainer), this.textColorFilter.currentColor = "#000000FF", this.textColorFilter.designColor = "#000000FF", this.effectList = null !== (o2 = t2.effectList) && void 0 !== o2 ? o2 : [];
|
|
30701
|
+
}
|
|
30700
30702
|
getTextElement(t2, e2) {
|
|
30701
30703
|
return "paragraph" === t2 ? this.paragraphs[e2[0]] : null;
|
|
30702
30704
|
}
|
|
@@ -30730,28 +30732,28 @@ void main(void){
|
|
|
30730
30732
|
this.container.scale.x < 0 && (this.container.x += -1 * t3);
|
|
30731
30733
|
}), "@TextBodyImpl[reset width]"), t2.addSubMTask(() => Wv(this, void 0, void 0, function* () {
|
|
30732
30734
|
if (this.json.presetTextShape) {
|
|
30733
|
-
const t3 = this.json.paragraphs.map((t4) => t4.x).reduce((t4, e3) => Math.min(t4, e3)), e2 = this.json.paragraphs[0].y, i2 = this.textContainer.getBounds(), { width:
|
|
30734
|
-
if (
|
|
30735
|
-
const i3 = Vh.p.create({ width: n2, height:
|
|
30736
|
-
|
|
30737
|
-
const
|
|
30735
|
+
const t3 = this.json.paragraphs.map((t4) => t4.x).reduce((t4, e3) => Math.min(t4, e3)), e2 = this.json.paragraphs[0].y, i2 = this.textContainer.getBounds(), n2 = this.json.paragraphs.map((t4) => t4.lines.map((t5) => t5.width).sort((t5, e3) => t5 - e3)[0]).sort((t4, e3) => t4 - e3)[0], { width: r2, height: o2 } = i2, { geometry: s2, type: a2 } = this.json.presetTextShape;
|
|
30736
|
+
if (s2.paths) {
|
|
30737
|
+
const i3 = Vh.p.create({ width: n2, height: o2, resolution: this.ctx.renderer.resolution }), l2 = new Lh.d();
|
|
30738
|
+
l2.translate(-t3, -e2), this.ctx.renderer.render(this.textContainer, { renderTexture: i3, transform: l2 });
|
|
30739
|
+
const h2 = void 0 !== this.json.isHorz && !this.json.isHorz;
|
|
30738
30740
|
if (["textCircle", "textArchUp", "textArchDown"].indexOf(this.json.presetTextShape.type) >= 0) {
|
|
30739
|
-
const t4 = Xv(
|
|
30740
|
-
|
|
30741
|
+
const t4 = Xv(s2.paths[0].path, this.json.width, this.json.height, r2, o2);
|
|
30742
|
+
s2.paths.unshift(Object.assign(Object.assign({}, s2.paths[0]), { path: t4 }));
|
|
30741
30743
|
}
|
|
30742
|
-
const
|
|
30744
|
+
const u2 = function(t4, e3, i4, n3) {
|
|
30743
30745
|
if (!Vv[i4])
|
|
30744
30746
|
return null;
|
|
30745
30747
|
const r3 = Vv[i4].top(jv(e3)), o3 = Vv[i4].bottom(jv(t4));
|
|
30746
30748
|
if (r3.length !== o3.length)
|
|
30747
30749
|
return null;
|
|
30748
|
-
const s3 = Math.min(r3.length, o3.length), a3 = 1 / (s3 - 1), l3 = [], h3 = [],
|
|
30750
|
+
const s3 = Math.min(r3.length, o3.length), a3 = 1 / (s3 - 1), l3 = [], h3 = [], u3 = new Array(2 * s3).fill("").map((t5, e4) => e4);
|
|
30749
30751
|
for (let t5 = 0; t5 < s3; t5++)
|
|
30750
30752
|
l3.push(r3[t5].x, r3[t5].y), n3 ? h3.push(1, a3 * t5) : h3.push(a3 * t5, 0), l3.push(o3[t5].x, o3[t5].y), n3 ? h3.push(0, a3 * t5) : h3.push(a3 * t5, 1);
|
|
30751
|
-
return { vertices: new Float32Array(l3), uvs: new Float32Array(h3), drawMode: Sc.f.TRIANGLE_STRIP, indices: new Uint16Array(
|
|
30752
|
-
}(
|
|
30753
|
-
if (
|
|
30754
|
-
const t4 = new tm.b(i3,
|
|
30753
|
+
return { vertices: new Float32Array(l3), uvs: new Float32Array(h3), drawMode: Sc.f.TRIANGLE_STRIP, indices: new Uint16Array(u3) };
|
|
30754
|
+
}(s2.paths[1], s2.paths[0], a2, h2);
|
|
30755
|
+
if (u2) {
|
|
30756
|
+
const t4 = new tm.b(i3, u2.vertices, u2.uvs, u2.indices, u2.drawMode);
|
|
30755
30757
|
this.textContainer.visible = false, this.container.addChild(t4);
|
|
30756
30758
|
}
|
|
30757
30759
|
}
|
|
@@ -30846,12 +30848,12 @@ void main(void){
|
|
|
30846
30848
|
}
|
|
30847
30849
|
}
|
|
30848
30850
|
class Zv {
|
|
30849
|
-
constructor(t2, e2, i2, n2, r2, o2, s2, a2, l2, h2, u2) {
|
|
30850
|
-
this.id = t2, this.ctx = e2, this.paths = i2, this.hash = n2, this.nept = r2, this.width = o2, this.height = s2, this.lineStyle = a2, this.shouldFill = l2, this.bgColor = h2, this.lnColor = u2, this.clonedObjects = [], this._displayObject = null, this.isRectangle = false, this.isPureRect = false, this.isColoredPureRect = false, this.isRectangle = this.rectangleDetect(i2), this.isRectangle && l2 ? this.bgColor ? this.isColoredPureRect = true : this.isPureRect = true : this.ctx.graphicsTexture.addGraphics(this.id, this.paths, this.hash, this.nept, this.width, this.height, this.lineStyle, this.ctx.objectPoolGroup, this.shouldFill, this.bgColor, this.lnColor);
|
|
30851
|
-
}
|
|
30852
30851
|
get displayObject() {
|
|
30853
30852
|
return this._displayObject;
|
|
30854
30853
|
}
|
|
30854
|
+
constructor(t2, e2, i2, n2, r2, o2, s2, a2, l2, h2, u2) {
|
|
30855
|
+
this.id = t2, this.ctx = e2, this.paths = i2, this.hash = n2, this.nept = r2, this.width = o2, this.height = s2, this.lineStyle = a2, this.shouldFill = l2, this.bgColor = h2, this.lnColor = u2, this.clonedObjects = [], this._displayObject = null, this.isRectangle = false, this.isPureRect = false, this.isColoredPureRect = false, this.isRectangle = this.rectangleDetect(i2), this.isRectangle && l2 ? this.bgColor ? this.isColoredPureRect = true : this.isPureRect = true : this.ctx.graphicsTexture.addGraphics(this.id, this.paths, this.hash, this.nept, this.width, this.height, this.lineStyle, this.ctx.objectPoolGroup, this.shouldFill, this.bgColor, this.lnColor);
|
|
30856
|
+
}
|
|
30855
30857
|
pointDis(t2, e2) {
|
|
30856
30858
|
return Math.pow(t2.x - e2.x, 2) + Math.pow(t2.y - e2.y, 2);
|
|
30857
30859
|
}
|
|
@@ -30960,7 +30962,7 @@ void main(void){
|
|
|
30960
30962
|
constructor(t2, e2, i2) {
|
|
30961
30963
|
var n2, r2, o2, s2, a2, l2, h2, u2, c2;
|
|
30962
30964
|
super(t2, e2, i2), this.renderContainer = new Oh.b(), this.needCacheAsBitMap = false, this.backgroundGraphics = null, this.effectList = [], this.strokeGraphics = null, this.ghco = null, this.useGroupFill = false, this.arrowList = [], this.fillColorFilter = new _g(), this.strokeColorFilter = new _g(), this.pptColorFilter = new _g(), this.id = "", this.ppt_c = new ig(this), this.fill = new ng(this), this.stroke = new tg(this), this.effectObject = null, this.effectContainer = new Oh.b(), this.effectDisposer = () => {
|
|
30963
|
-
}, this.json = t2, this.
|
|
30965
|
+
}, this.json = t2, this.json.fillStyle && "groupFill" === this.json.fillStyle.fillType && i2.groupFillStyle && (this.json.fillStyle = i2.groupFillStyle, this.useGroupFill = true), this.id = t2.id;
|
|
30964
30966
|
const { fillStyle: d2, lineStyle: p2 } = this.json;
|
|
30965
30967
|
this.container.sortableChildren = true, this.container.name = t2.id + "_container_[Shape]", this.effectContainer.name = "effect-container", this.effectContainer.zIndex = 1, this.container.addChild(this.effectContainer), this.renderContainer.name = t2.id + "_render_container_[Shape]", this.generateArrowList(), this.backgroundFill = this.createBackgroundFill(), this.backgroundGraphics = this.createBackgroundGraphics(), this.strokeFill = this.createStrokeFill(), this.strokeGraphics = this.createStrokeGraphics();
|
|
30966
30968
|
try {
|
|
@@ -31049,7 +31051,7 @@ void main(void){
|
|
|
31049
31051
|
}
|
|
31050
31052
|
createBackgroundFill() {
|
|
31051
31053
|
var t2, e2, i2, n2;
|
|
31052
|
-
const { fillStyle: r2, width: o2, height: s2, lineStyle: a2, geometry: l2 } = this.json, h2 = (null == l2 ? void 0 : l2.fillTransform) || Kv, u2 = { useFilter: true, useSlideBackgroundFill: this.json.useBgFill, fillFloat: this.json.fillFloat, shapeRotation: this.json.rotation }, c2 = this.useGroupFill && (null === (t2 = this.option.groupSize) || void 0 === t2 ? void 0 : t2.w) ? this.option.groupSize.w : h2.width || o2, d2 = this.useGroupFill && (null === (e2 = this.option.groupSize) || void 0 === e2 ? void 0 : e2.h) ? this.option.groupSize.h : h2.height || s2;
|
|
31054
|
+
const { fillStyle: r2, width: o2, height: s2, lineStyle: a2, geometry: l2 } = this.json, h2 = (null == l2 ? void 0 : l2.fillTransform) || Kv, u2 = { useFilter: true, useSlideBackgroundFill: this.json.useBgFill, fillFloat: this.json.fillFloat, shapeRotation: this.json.rotation, groupRotation: this.option.groupRotation }, c2 = this.useGroupFill && (null === (t2 = this.option.groupSize) || void 0 === t2 ? void 0 : t2.w) ? this.option.groupSize.w : h2.width || o2, d2 = this.useGroupFill && (null === (e2 = this.option.groupSize) || void 0 === e2 ? void 0 : e2.h) ? this.option.groupSize.h : h2.height || s2;
|
|
31053
31055
|
return new lv(this.ctx, r2, c2 + (null !== (i2 = null == a2 ? void 0 : a2.width) && void 0 !== i2 ? i2 : 0), d2 + (null !== (n2 = null == a2 ? void 0 : a2.width) && void 0 !== n2 ? n2 : 0), u2);
|
|
31054
31056
|
}
|
|
31055
31057
|
createBackground() {
|
|
@@ -31115,7 +31117,7 @@ void main(void){
|
|
|
31115
31117
|
var t3, e2;
|
|
31116
31118
|
null === (t3 = this.strokeGraphics) || void 0 === t3 || t3.render(), null === (e2 = this.backgroundGraphics) || void 0 === e2 || e2.render(), this.createBackground(), yield this.subClassRender(), this.createFilledPathMask(), this.createPathFill(), this.createArrow();
|
|
31117
31119
|
}), "@ShapeImpl[render]"), this.text && this.text.render(t2), t2.addSubMTask(() => Jv(this, void 0, void 0, function* () {
|
|
31118
|
-
var t3, e2, i2, n2, r2, o2, s2, a2, l2, h2, u2, c2, d2;
|
|
31120
|
+
var t3, e2, i2, n2, r2, o2, s2, a2, l2, h2, u2, c2, d2, p2, f2, m2, g2;
|
|
31119
31121
|
if ("wd" === (null === (t3 = this.json.textBody) || void 0 === t3 ? void 0 : t3.iterateType) || "lt" === (null === (e2 = this.json.textBody) || void 0 === e2 ? void 0 : e2.iterateType)) {
|
|
31120
31122
|
if (this.renderContainer.addChild(this.container), this.text) {
|
|
31121
31123
|
const { x: t4, y: e3 } = null !== (i2 = this.json.scale) && void 0 !== i2 ? i2 : { x: 1, y: 1 };
|
|
@@ -31144,7 +31146,11 @@ void main(void){
|
|
|
31144
31146
|
const t4 = Vh.p.create({ width: this.json.width, height: this.json.height, resolution: Math.ceil(this.ctx.renderer.resolution) });
|
|
31145
31147
|
this.ctx.renderer.render(this.renderContainer, { renderTexture: t4 }), this.ctx.bgTexture = t4;
|
|
31146
31148
|
}
|
|
31147
|
-
|
|
31149
|
+
if ("noFill" === (null === (u2 = this.json.fillStyle) || void 0 === u2 ? void 0 : u2.fillType)) {
|
|
31150
|
+
const t4 = null !== (d2 = null === (c2 = this.json.effectList) || void 0 === c2 ? void 0 : c2.findIndex((t5) => "innerShadow" === t5.type)) && void 0 !== d2 ? d2 : -1;
|
|
31151
|
+
t4 >= 0 && (null === (p2 = this.json.effectList) || void 0 === p2 || p2.splice(t4, 1));
|
|
31152
|
+
}
|
|
31153
|
+
this.json.effectList && this.json.effectList.length > 0 && (null === (f2 = this.ctx.featureList) || void 0 === f2 ? void 0 : f2.effect) && !this.ctx.forceCanvas && !this.json.media && (this.effectObject = new Nv(this.effectContainer, this.json.effectList, `${this.ctx.taskId}_${this.ctx.slideIndex}_${this.json.id}`, this.ctx, this.json.rotation || 0, new Lh.g((null === (m2 = this.json.scale) || void 0 === m2 ? void 0 : m2.x) || 1, (null === (g2 = this.json.scale) || void 0 === g2 ? void 0 : g2.y) || 1)), function(t4) {
|
|
31148
31154
|
var e3, i3, n3;
|
|
31149
31155
|
return "gifFill" === (null === (e3 = t4.fillStyle) || void 0 === e3 ? void 0 : e3.fillType) || ("gifFill" === (null === (n3 = null === (i3 = t4.lineStyle) || void 0 === i3 ? void 0 : i3.fill) || void 0 === n3 ? void 0 : n3.fillType) || !!t4.picFill && "gifFill" === t4.picFill.fillType);
|
|
31150
31156
|
}(this.json) && this.effectObject.setFrameCount(-1), this.effectObject.on("ready", () => {
|
|
@@ -31229,6 +31235,9 @@ void main(void){
|
|
|
31229
31235
|
}
|
|
31230
31236
|
const a_ = { medianContainerClass: "median-container", hoverHiddeDelay: 1500, portalWidth: 300, portalHeight: 50, hiddenOpacity: "0", hoverOpacity: "1", opacityAnimationTime: 0.4 };
|
|
31231
31237
|
class l_ {
|
|
31238
|
+
get clippedDuration() {
|
|
31239
|
+
return this.duration;
|
|
31240
|
+
}
|
|
31232
31241
|
constructor(t2) {
|
|
31233
31242
|
var e2, i2;
|
|
31234
31243
|
this.progress = document.createElement("div"), this.totalTime = document.createElement("span"), this.playButton = document.createElement("div"), this.pauseButton = document.createElement("div"), this.currentTime = document.createElement("span"), this.mediaController = document.createElement("div"), this.currentProgress = document.createElement("div"), this.fullScreenButton = document.createElement("div"), this.exitFullScreenButton = document.createElement("div"), this.medianIsEnd = false, this.pickBookmarkIndex = 0, this.playCallBackList = [], this.duration = 0, this.isVideo = false, this.start = 0, this.end = 0, this.fullscreenStatus = false, this.fadeState = { in: false, out: false }, this.changeMediaProgress = (t3) => {
|
|
@@ -31289,9 +31298,6 @@ void main(void){
|
|
|
31289
31298
|
}
|
|
31290
31299
|
}, this.targetId = t2.targetId, this.ctx = t2.ctx, this.height = t2.height, this.width = t2.width, this.target = t2.target, this.media = t2.media, this.info = t2.info, this.shapeId = t2.shapeId, this.canvasElement = t2.canvasElement, "video" === this.media.type && (this.isVideo = true), this.getMedianContainer(), this.createMediaController(), this.info.cut && (this.start = null !== (e2 = this.info.cut.start) && void 0 !== e2 ? e2 : 0, this.end = null !== (i2 = this.info.cut.end) && void 0 !== i2 ? i2 : 0), this.info.bookmarkList && (this.bookmarkList = this.info.bookmarkList.sort((t3, e3) => t3.time - e3.time));
|
|
31291
31300
|
}
|
|
31292
|
-
get clippedDuration() {
|
|
31293
|
-
return this.duration;
|
|
31294
|
-
}
|
|
31295
31301
|
getMedianContainer() {
|
|
31296
31302
|
var t2;
|
|
31297
31303
|
const { medianContainerClass: e2 } = a_;
|
|
@@ -31520,6 +31526,27 @@ void main(void){
|
|
|
31520
31526
|
});
|
|
31521
31527
|
};
|
|
31522
31528
|
class d_ extends Za.a {
|
|
31529
|
+
get videoElement() {
|
|
31530
|
+
return this.videoResource.source;
|
|
31531
|
+
}
|
|
31532
|
+
get currentTime() {
|
|
31533
|
+
var t2, e2;
|
|
31534
|
+
return null !== (e2 = null === (t2 = this.videoElement) || void 0 === t2 ? void 0 : t2.currentTime) && void 0 !== e2 ? e2 : 0;
|
|
31535
|
+
}
|
|
31536
|
+
set currentTime(t2) {
|
|
31537
|
+
this.rtcAudio.currentTime = t2, this.videoElement && (this.videoElement.currentTime = t2);
|
|
31538
|
+
}
|
|
31539
|
+
get paused() {
|
|
31540
|
+
var t2, e2;
|
|
31541
|
+
return null === (e2 = null === (t2 = this.videoElement) || void 0 === t2 ? void 0 : t2.paused) || void 0 === e2 || e2;
|
|
31542
|
+
}
|
|
31543
|
+
get duration() {
|
|
31544
|
+
var t2, e2;
|
|
31545
|
+
return null !== (e2 = null === (t2 = this.videoElement) || void 0 === t2 ? void 0 : t2.duration) && void 0 !== e2 ? e2 : 0;
|
|
31546
|
+
}
|
|
31547
|
+
get clippedDuration() {
|
|
31548
|
+
return this.controller.clippedDuration;
|
|
31549
|
+
}
|
|
31523
31550
|
constructor(t2) {
|
|
31524
31551
|
var e2, i2, n2, r2, o2, s2, a2;
|
|
31525
31552
|
super(), this.type = "video", this.sprite = new ep(), this.isPlaying = false, this.isGlobalPause = false, this.fullscreen = false, this.url = "", this.isLoaded = false, this.onVideoResourceLoaded = () => {
|
|
@@ -31565,27 +31592,6 @@ void main(void){
|
|
|
31565
31592
|
});
|
|
31566
31593
|
}), this.ctx.activeMedia.add(this), this.ctx.volumeAdjuster.on("update", this.updateVolume), this.ctx.globalEventHub.on("syncFullscreenVideoState", this.syncFullscreenVideoState);
|
|
31567
31594
|
}
|
|
31568
|
-
get videoElement() {
|
|
31569
|
-
return this.videoResource.source;
|
|
31570
|
-
}
|
|
31571
|
-
get currentTime() {
|
|
31572
|
-
var t2, e2;
|
|
31573
|
-
return null !== (e2 = null === (t2 = this.videoElement) || void 0 === t2 ? void 0 : t2.currentTime) && void 0 !== e2 ? e2 : 0;
|
|
31574
|
-
}
|
|
31575
|
-
set currentTime(t2) {
|
|
31576
|
-
this.rtcAudio.currentTime = t2, this.videoElement && (this.videoElement.currentTime = t2);
|
|
31577
|
-
}
|
|
31578
|
-
get paused() {
|
|
31579
|
-
var t2, e2;
|
|
31580
|
-
return null === (e2 = null === (t2 = this.videoElement) || void 0 === t2 ? void 0 : t2.paused) || void 0 === e2 || e2;
|
|
31581
|
-
}
|
|
31582
|
-
get duration() {
|
|
31583
|
-
var t2, e2;
|
|
31584
|
-
return null !== (e2 = null === (t2 = this.videoElement) || void 0 === t2 ? void 0 : t2.duration) && void 0 !== e2 ? e2 : 0;
|
|
31585
|
-
}
|
|
31586
|
-
get clippedDuration() {
|
|
31587
|
-
return this.controller.clippedDuration;
|
|
31588
|
-
}
|
|
31589
31595
|
showController() {
|
|
31590
31596
|
this.controller.show();
|
|
31591
31597
|
}
|
|
@@ -31778,7 +31784,19 @@ void main(void){
|
|
|
31778
31784
|
};
|
|
31779
31785
|
class g_ extends Qv {
|
|
31780
31786
|
constructor(t2, e2, i2) {
|
|
31781
|
-
super(Object.assign(Object.assign({}, t2), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e2, i2), this.isInteractiveOutside = false, this.cmd = new eg(this), this.
|
|
31787
|
+
super(Object.assign(Object.assign({}, t2), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e2, i2), this.isInteractiveOutside = false, this.cmd = new eg(this), this.onSlideRenderPlayGif = (t3, e3) => {
|
|
31788
|
+
var i3;
|
|
31789
|
+
const { displayObject: n2 } = this.picFill;
|
|
31790
|
+
n2 && n2 instanceof im && this.ctx.slideIndex === t3 && (null === (i3 = this.effectObject) || void 0 === i3 || i3.setFrameCount(n2.totalFrames), e3 ? n2.gotoAndPlay(0) : n2.gotoAndStop(n2.totalFrames - 1), n2.onFrameChange = (t4) => {
|
|
31791
|
+
if (this.effectObject)
|
|
31792
|
+
if (this.effectObject.hasFrame(t4))
|
|
31793
|
+
this.effectObject.updateFrame(t4);
|
|
31794
|
+
else {
|
|
31795
|
+
const e4 = this.getEffectTexture();
|
|
31796
|
+
e4 && (this.effectObject.createFrame(t4, e4.texture), this.effectObject.setFrameOffset(e4.offsetX, e4.offsetY));
|
|
31797
|
+
}
|
|
31798
|
+
});
|
|
31799
|
+
}, this.media = null == t2 ? void 0 : t2.media, this.container.name = t2.id + "_container_[Picture]", this.renderContainer.name = t2.id + "_render_container_[Picture]", this.picFill = new lv(this.ctx, t2.picFill, t2.width, t2.height, { useFilter: true, useSlideBackgroundFill: false });
|
|
31782
31800
|
}
|
|
31783
31801
|
applyCommand(t2, e2) {
|
|
31784
31802
|
var i2, n2, r2, o2;
|
|
@@ -31802,18 +31820,7 @@ void main(void){
|
|
|
31802
31820
|
if (s2) {
|
|
31803
31821
|
s2.name = this.json.id + "_pic_fill_[Picture]";
|
|
31804
31822
|
const a2 = null === (t2 = this.backgroundGraphics) || void 0 === t2 ? void 0 : t2.getClonedDisplayObject();
|
|
31805
|
-
if ((null === (e2 = this.backgroundGraphics) || void 0 === e2 ? void 0 : e2.isNeedMask(s2.width, s2.height)) && a2 && (s2.mask = a2, this.effectContainer.addChild(a2)), s2.width = this.designWidth, s2.height = this.designHeight, s2 instanceof im && this.ctx.slideScopeEventHub.
|
|
31806
|
-
var e3;
|
|
31807
|
-
this.ctx.slideIndex === t3 && (null === (e3 = this.effectObject) || void 0 === e3 || e3.setFrameCount(s2.totalFrames), s2.play(), s2.onFrameChange = (t4) => {
|
|
31808
|
-
if (this.effectObject)
|
|
31809
|
-
if (this.effectObject.hasFrame(t4))
|
|
31810
|
-
this.effectObject.updateFrame(t4);
|
|
31811
|
-
else {
|
|
31812
|
-
const e4 = this.getEffectTexture();
|
|
31813
|
-
e4 && (this.effectObject.createFrame(t4, e4.texture), this.effectObject.setFrameOffset(e4.offsetX, e4.offsetY));
|
|
31814
|
-
}
|
|
31815
|
-
});
|
|
31816
|
-
}), this.effectContainer.addChild(s2), this.media) {
|
|
31823
|
+
if ((null === (e2 = this.backgroundGraphics) || void 0 === e2 ? void 0 : e2.isNeedMask(s2.width, s2.height)) && a2 && (s2.mask = a2, this.effectContainer.addChild(a2)), s2.width = this.designWidth, s2.height = this.designHeight, s2 instanceof im && this.ctx.slideScopeEventHub.on("slide-render", this.onSlideRenderPlayGif), this.effectContainer.addChild(s2), this.media) {
|
|
31817
31824
|
let t3 = this.media.src;
|
|
31818
31825
|
if ("audio" === this.media.type && /mp4$/.test(t3) && (t3 = t3.replace(/mp4$/, "mp3")), this.ctx.urlInterrupter) {
|
|
31819
31826
|
const e3 = Date.now();
|
|
@@ -31853,7 +31860,7 @@ void main(void){
|
|
|
31853
31860
|
super.initOnReuse(), this.mediaPlayer && (this.container.interactive = true);
|
|
31854
31861
|
}
|
|
31855
31862
|
destroy() {
|
|
31856
|
-
this.mediaPlayer && (this.picFill.displayObject && !this.isInteractiveOutside && (this.container.interactive = false), this.mediaPlayer.destroy(), this.mediaPlayer = void 0), this.picFill.destroy();
|
|
31863
|
+
this.mediaPlayer && (this.picFill.displayObject && !this.isInteractiveOutside && (this.container.interactive = false), this.mediaPlayer.destroy(), this.mediaPlayer = void 0), this.picFill.destroy(), this.ctx.slideScopeEventHub.removeListener("slide-render", this.onSlideRenderPlayGif);
|
|
31857
31864
|
}
|
|
31858
31865
|
}
|
|
31859
31866
|
var v_ = function(t2, e2, i2, n2) {
|
|
@@ -31890,13 +31897,14 @@ void main(void){
|
|
|
31890
31897
|
const o2 = { x: null !== (i2 = null === (e2 = this.json.position) || void 0 === e2 ? void 0 : e2.x) && void 0 !== i2 ? i2 : 0, y: null !== (r2 = null === (n2 = this.json.position) || void 0 === n2 ? void 0 : n2.y) && void 0 !== r2 ? r2 : 0 };
|
|
31891
31898
|
for (let e3 = 0, i3 = this.json.children.length; e3 < i3; e3++)
|
|
31892
31899
|
t2.addSubMTask(() => v_(this, void 0, void 0, function* () {
|
|
31893
|
-
|
|
31894
|
-
|
|
31895
|
-
|
|
31896
|
-
|
|
31897
|
-
|
|
31898
|
-
|
|
31899
|
-
|
|
31900
|
+
var i4, n3, r3, s2;
|
|
31901
|
+
let a2 = this.json.children[e3], l2 = null;
|
|
31902
|
+
if (!(!this.ctx.featureList || !this.ctx.featureList.smartArt) && ("Shape" === (null == a2 ? void 0 : a2.type) || "Picture" === (null == a2 ? void 0 : a2.type)) && this.ctx.smartArtShapeList) {
|
|
31903
|
+
const { id: t3 } = a2, e4 = this.ctx.smartArtShapeList.find((e5) => e5.id === t3);
|
|
31904
|
+
e4 && (a2 = e4);
|
|
31905
|
+
}
|
|
31906
|
+
const h2 = { parentGlobalPos: o2, groupFillStyle: null !== (i4 = this.json.fillStyle) && void 0 !== i4 ? i4 : { fillType: "noFill" }, groupSize: { w: this.json.width, h: this.json.height }, groupRotation: (null !== (n3 = this.json.rotation) && void 0 !== n3 ? n3 : 0) + (null !== (s2 = null === (r3 = this.option) || void 0 === r3 ? void 0 : r3.groupRotation) && void 0 !== s2 ? s2 : 0) };
|
|
31907
|
+
"Shape" === (null == a2 ? void 0 : a2.type) ? l2 = new Qv(a2, this.ctx, h2) : "Picture" === (null == a2 ? void 0 : a2.type) ? l2 = new g_(a2, this.ctx, h2) : "Container" === (null == a2 ? void 0 : a2.type) && (l2 = new __(a2, this.ctx, h2, t2)), l2 && this.children.push(l2);
|
|
31900
31908
|
}), "@ContainerImpl[child.init]");
|
|
31901
31909
|
}
|
|
31902
31910
|
get interactiveContainer() {
|
|
@@ -32407,7 +32415,7 @@ void main(void){
|
|
|
32407
32415
|
class py extends E_ {
|
|
32408
32416
|
constructor(t2) {
|
|
32409
32417
|
var e2;
|
|
32410
|
-
super(t2), this.filterType = "", this.isConflict = false, this.activeWhenConflict = "prev", this.onTimeUpdate = ({ duration: t3, delta: e3 }) => {
|
|
32418
|
+
super(t2), this.filterType = "", this.isConflict = false, this.activeWhenConflict = "prev", this.removeTimeout = null, this.onTimeUpdate = ({ duration: t3, delta: e3 }) => {
|
|
32411
32419
|
var i3;
|
|
32412
32420
|
const n3 = e3 / t3;
|
|
32413
32421
|
if (this.filter) {
|
|
@@ -32415,9 +32423,9 @@ void main(void){
|
|
|
32415
32423
|
const t4 = null === (i3 = this.timingTarget) || void 0 === i3 ? void 0 : i3.container.getBounds();
|
|
32416
32424
|
t4 && (this.filter.uniforms.uBoundRect = new Float32Array([t4.x, t4.y, t4.width, t4.height]));
|
|
32417
32425
|
}
|
|
32418
|
-
n3 >= 1 && this.timingTarget && this.ctx.clock.setTimeout(() => {
|
|
32419
|
-
this.removeFilter();
|
|
32420
|
-
}, 34);
|
|
32426
|
+
n3 >= 1 && this.timingTarget && (this.removeTimeout = this.ctx.clock.setTimeout(() => {
|
|
32427
|
+
this.removeFilter(), this.removeTimeout = null;
|
|
32428
|
+
}, 34));
|
|
32421
32429
|
}, this.onSeekToStart = () => {
|
|
32422
32430
|
this.timingTarget && this.removeFilter();
|
|
32423
32431
|
}, this.onSeekToEnd = () => {
|
|
@@ -32425,7 +32433,7 @@ void main(void){
|
|
|
32425
32433
|
}, this.onDestroy = () => {
|
|
32426
32434
|
this.removeFilter();
|
|
32427
32435
|
}, this.commonTimeNode.on("timelineStart", () => {
|
|
32428
|
-
this.filter && this.timingTarget && (this.timingTarget.container.filters && 0 !== this.timingTarget.container.filters.length ? this.timingTarget.container.filters.push(this.filter) : this.timingTarget.container.filters = [this.filter]);
|
|
32436
|
+
this.removeTimeout && (this.ctx.clock.clearTimeout(this.removeTimeout), this.removeTimeout = null), this.filter && this.timingTarget && (this.timingTarget.container.filters && 0 !== this.timingTarget.container.filters.length ? this.timingTarget.container.filters.push(this.filter) : this.timingTarget.container.filters = [this.filter]);
|
|
32429
32437
|
}), this.commonTimeNode.on("timeNodeDestroy", this.onDestroy), this.commonTimeNode.on("timeUpdate", this.onTimeUpdate);
|
|
32430
32438
|
let i2 = 1;
|
|
32431
32439
|
"out" === t2.json.transition && (i2 = -1);
|
|
@@ -32665,11 +32673,10 @@ void main(void){
|
|
|
32665
32673
|
}
|
|
32666
32674
|
function xy(t2) {
|
|
32667
32675
|
return function(t3) {
|
|
32668
|
-
|
|
32669
|
-
return !!(null === (e2 = t3) || void 0 === e2 ? void 0 : e2.cBhvr);
|
|
32676
|
+
return !!(null == t3 ? void 0 : t3.cBhvr);
|
|
32670
32677
|
}(t2) ? t2.cBhvr.ctn : function(t3) {
|
|
32671
|
-
var e2
|
|
32672
|
-
return !!(null === (
|
|
32678
|
+
var e2;
|
|
32679
|
+
return !!(null === (e2 = null == t3 ? void 0 : t3.cMediaNode) || void 0 === e2 ? void 0 : e2.ctn);
|
|
32673
32680
|
}(t2) ? t2.cMediaNode.ctn : t2.ctn;
|
|
32674
32681
|
}
|
|
32675
32682
|
var by = function(t2, e2, i2, n2) {
|
|
@@ -33815,6 +33822,17 @@ void main(void){
|
|
|
33815
33822
|
Ph.skipHello();
|
|
33816
33823
|
const jy = { 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", gallery: "Gallery", switch: "Switch", prism: "Prism", doors: "Doors" }, zy = { 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", mediaStop: "mediaStop", requestNextSlide: "requestNextSlide", requestPrevSlide: "requestPrevSlide", requestGotoSlide: "requestGotoSlide", requestOpenUrl: "requestOpenUrl", userInput: "userInput", fullscreenChange: "fullscreenChange", changeLocalFullscreenState: "changeLocalFullscreenState" };
|
|
33817
33824
|
class Vy extends Za.a {
|
|
33825
|
+
get view() {
|
|
33826
|
+
return this.app.renderer ? this.app.view : null;
|
|
33827
|
+
}
|
|
33828
|
+
get nextSlideIndex() {
|
|
33829
|
+
var t2;
|
|
33830
|
+
return (null === (t2 = this.currentStage) || void 0 === t2 ? void 0 : t2.json.nextIndex) ? this.currentStage.json.nextIndex : this.currentIndex + 1;
|
|
33831
|
+
}
|
|
33832
|
+
get prevSlideIndex() {
|
|
33833
|
+
var t2;
|
|
33834
|
+
return (null === (t2 = this.currentStage) || void 0 === t2 ? void 0 : t2.json.prevIndex) ? this.currentStage.json.prevIndex : this.currentIndex - 1;
|
|
33835
|
+
}
|
|
33818
33836
|
constructor(t2, e2 = {}) {
|
|
33819
33837
|
super(), this.errorChannel = new Za.a(), this.transactionPlayer = null, this.isForward = true, this.drawCall = 0, this.scale = 1, this._isPaused = false, this.maxResolution = new Lh.g(0, 0), this.isNVIDIA = false, this.fps = new bm(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.globalEventHub = new Za.a(), this.globalVideoBackground = new Jd(), this.globalVideoSprite = new ep(), this.onMousemoveTimeout = null, this.cacheFunctionMap = /* @__PURE__ */ new Map(), this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
|
|
33820
33838
|
this.errorChannel.emit("error", new Tm(gm.CanvasCrash, "webgl context lost."));
|
|
@@ -33901,17 +33919,6 @@ void main(void){
|
|
|
33901
33919
|
}
|
|
33902
33920
|
this.globalEventHub.on("requestFullscreen", this.onRequestFullscreenVideo), this.globalEventHub.on("requestCancelFullscreen", this.onRequestCancelFullscreenVideo);
|
|
33903
33921
|
}
|
|
33904
|
-
get view() {
|
|
33905
|
-
return this.app.renderer ? this.app.view : null;
|
|
33906
|
-
}
|
|
33907
|
-
get nextSlideIndex() {
|
|
33908
|
-
var t2;
|
|
33909
|
-
return (null === (t2 = this.currentStage) || void 0 === t2 ? void 0 : t2.json.nextIndex) ? this.currentStage.json.nextIndex : this.currentIndex + 1;
|
|
33910
|
-
}
|
|
33911
|
-
get prevSlideIndex() {
|
|
33912
|
-
var t2;
|
|
33913
|
-
return (null === (t2 = this.currentStage) || void 0 === t2 ? void 0 : t2.json.prevIndex) ? this.currentStage.json.prevIndex : this.currentIndex - 1;
|
|
33914
|
-
}
|
|
33915
33922
|
getMaxResolution(t2) {
|
|
33916
33923
|
return !$a()(t2) && Number.isInteger(t2) ? (t2 < 1 && (t2 = 1), t2 > 4 && (t2 = 4), t2) : Vy.platform.isAndroid() || Vy.platform.isIOS() ? 2 : 4;
|
|
33917
33924
|
}
|
|
@@ -33984,7 +33991,7 @@ void main(void){
|
|
|
33984
33991
|
}
|
|
33985
33992
|
null === (n2 = this.transactionPlayer) || void 0 === n2 || n2.dispose();
|
|
33986
33993
|
}
|
|
33987
|
-
this.isForward ? yield s2.startTiming() : s2.setMainSeqApplied(), s2.ctx.slideScopeEventHub.emit("slide-render", s2.ctx.slideIndex), this.emit(zy.renderEnd, t2), this.emit(zy.slideChange, t2), s2.ctx.isRendering = false, this.preload(t2 + 1).catch((e3) => {
|
|
33994
|
+
this.isForward ? yield s2.startTiming() : s2.setMainSeqApplied(), s2.ctx.slideScopeEventHub.emit("slide-render", s2.ctx.slideIndex, this.isForward), this.emit(zy.renderEnd, t2), this.emit(zy.slideChange, t2), s2.ctx.isRendering = false, this.preload(t2 + 1).catch((e3) => {
|
|
33988
33995
|
this.errorChannel.emit("error", Tm.transform(e3), t2 + 1);
|
|
33989
33996
|
}), this.preload(t2 - 1).catch((e3) => {
|
|
33990
33997
|
this.errorChannel.emit("error", Tm.transform(e3), t2 - 1);
|
|
@@ -36037,7 +36044,7 @@ void main(void){
|
|
|
36037
36044
|
}
|
|
36038
36045
|
var fT = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart" }, mT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, gT = "";
|
|
36039
36046
|
try {
|
|
36040
|
-
gT = "1.4.
|
|
36047
|
+
gT = "1.4.12-alpha.0";
|
|
36041
36048
|
} catch (t2) {
|
|
36042
36049
|
gT = "dev";
|
|
36043
36050
|
}
|
|
@@ -36048,6 +36055,7 @@ void main(void){
|
|
|
36048
36055
|
});
|
|
36049
36056
|
} catch (t2) {
|
|
36050
36057
|
}
|
|
36058
|
+
navigator.userAgent.toUpperCase().includes("HUAWEI") && document.createElement("canvas").getContext("2d").fillText("\u9065\u9065\u9886\u5148", 0, 10);
|
|
36051
36059
|
var _T = function(t2) {
|
|
36052
36060
|
function e2(i3) {
|
|
36053
36061
|
var n3 = t2.call(this) || this;
|
|
@@ -39040,15 +39048,15 @@ class SlideDocsViewer {
|
|
|
39040
39048
|
const scenePath = `${this.baseScenePath}/${pageIndex}`;
|
|
39041
39049
|
const windowManger = this.context.manager.windowManger;
|
|
39042
39050
|
if (windowManger._appliancePlugin) {
|
|
39043
|
-
await windowManger._appliancePlugin.screenshotToCanvasAsync(
|
|
39044
|
-
} else {
|
|
39045
|
-
this.whiteboardView.screenshotToCanvas(
|
|
39051
|
+
await windowManger._appliancePlugin.screenshotToCanvasAsync(
|
|
39046
39052
|
ctx,
|
|
39047
39053
|
scenePath,
|
|
39048
39054
|
canvas.width,
|
|
39049
39055
|
canvas.height,
|
|
39050
39056
|
camera
|
|
39051
39057
|
);
|
|
39058
|
+
} else {
|
|
39059
|
+
this.whiteboardView.screenshotToCanvas(ctx, scenePath, canvas.width, canvas.height, camera);
|
|
39052
39060
|
}
|
|
39053
39061
|
}
|
|
39054
39062
|
reportProgress(progress, result) {
|
|
@@ -39312,7 +39320,7 @@ class SlidePreviewer {
|
|
|
39312
39320
|
}
|
|
39313
39321
|
}
|
|
39314
39322
|
const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
|
|
39315
|
-
const version = "0.2.
|
|
39323
|
+
const version = "0.2.63";
|
|
39316
39324
|
const SlideApp = {
|
|
39317
39325
|
kind: "Slide",
|
|
39318
39326
|
setup(context) {
|