@famibee/skynovel 1.29.0 → 1.29.3
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/app.js +1207 -669
- package/dist/app.js.map +1 -1
- package/dist/appMain.js +9 -9
- package/dist/appMain.js.map +1 -1
- package/dist/preload.js +1 -1
- package/dist/preload.js.map +1 -1
- package/dist/sn/CmnInterface.d.ts +43 -1
- package/dist/sn/CmnInterface.d.ts.map +1 -1
- package/dist/sn/CmnLib.d.ts.map +1 -1
- package/dist/sn/Config.d.ts +2 -2
- package/dist/sn/Config.d.ts.map +1 -1
- package/dist/sn/Main.d.ts.map +1 -1
- package/dist/sn/PropParser.d.ts.map +1 -1
- package/dist/sn/SysWeb.d.ts.map +1 -1
- package/dist/sn/TxtStage.d.ts.map +1 -1
- package/dist/web.js +5553 -4285
- package/dist/web.js.map +1 -1
- package/package.json +10 -11
package/dist/app.js
CHANGED
|
@@ -772,27 +772,27 @@ function addStyle(style) {
|
|
|
772
772
|
gs.innerHTML = css_key4del + style;
|
|
773
773
|
document.getElementsByTagName("head")[0].appendChild(gs);
|
|
774
774
|
}
|
|
775
|
-
function argChk_Num(hash2,
|
|
776
|
-
const v2 = hash2[
|
|
777
|
-
if (!(
|
|
775
|
+
function argChk_Num(hash2, name2, def) {
|
|
776
|
+
const v2 = hash2[name2];
|
|
777
|
+
if (!(name2 in hash2)) {
|
|
778
778
|
if (isNaN(def))
|
|
779
|
-
throw `[${hash2[":\u30BF\u30B0\u540D"]}]\u5C5E\u6027 ${
|
|
780
|
-
hash2[
|
|
779
|
+
throw `[${hash2[":\u30BF\u30B0\u540D"]}]\u5C5E\u6027 ${name2} \u306F\u5FC5\u9808\u3067\u3059`;
|
|
780
|
+
hash2[name2] = def;
|
|
781
781
|
return def;
|
|
782
782
|
}
|
|
783
783
|
const n = String(v2).slice(0, 2) === "0x" ? parseInt(v2) : parseFloat(v2);
|
|
784
784
|
if (isNaN(n))
|
|
785
|
-
throw `[${hash2[":\u30BF\u30B0\u540D"]}]\u5C5E\u6027 ${
|
|
786
|
-
return hash2[
|
|
785
|
+
throw `[${hash2[":\u30BF\u30B0\u540D"]}]\u5C5E\u6027 ${name2} \u306E\u5024\u3010${v2}\u3011\u304C\u6570\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093`;
|
|
786
|
+
return hash2[name2] = n;
|
|
787
787
|
}
|
|
788
|
-
function argChk_Boolean(hash2,
|
|
789
|
-
if (!(
|
|
790
|
-
return hash2[
|
|
791
|
-
const v2 = hash2[
|
|
788
|
+
function argChk_Boolean(hash2, name2, def) {
|
|
789
|
+
if (!(name2 in hash2))
|
|
790
|
+
return hash2[name2] = def;
|
|
791
|
+
const v2 = hash2[name2];
|
|
792
792
|
if (v2 === null)
|
|
793
793
|
return false;
|
|
794
794
|
const v22 = String(v2);
|
|
795
|
-
return hash2[
|
|
795
|
+
return hash2[name2] = v22 === "false" ? false : Boolean(v22);
|
|
796
796
|
}
|
|
797
797
|
function parseColor(v2) {
|
|
798
798
|
if (v2.charAt(0) === "#")
|
|
@@ -808,11 +808,11 @@ function parseColor(v2) {
|
|
|
808
808
|
throw `\u8272\u540D\u524D ${v2} \u304C\u7570\u5E38\u3067\u3059`;
|
|
809
809
|
return parseInt(cc.slice(1), 16);
|
|
810
810
|
}
|
|
811
|
-
function argChk_Color(hash2,
|
|
812
|
-
const v2 = hash2[
|
|
811
|
+
function argChk_Color(hash2, name2, def) {
|
|
812
|
+
const v2 = hash2[name2];
|
|
813
813
|
if (!v2)
|
|
814
|
-
return hash2[
|
|
815
|
-
return hash2[
|
|
814
|
+
return hash2[name2] = def;
|
|
815
|
+
return hash2[name2] = parseColor(String(v2));
|
|
816
816
|
}
|
|
817
817
|
const REG_FN = /^[^\/\.]+$|[^\/]+(?=\.)/;
|
|
818
818
|
function getFn(p) {
|
|
@@ -829,10 +829,10 @@ class CmnLib {
|
|
|
829
829
|
CmnLib.stageW = 0;
|
|
830
830
|
CmnLib.stageH = 0;
|
|
831
831
|
CmnLib.debugLog = false;
|
|
832
|
-
CmnLib.isSafari = platform.name === "Safari";
|
|
833
|
-
CmnLib.isFirefox = platform.name === "Firefox";
|
|
834
|
-
CmnLib.isMac = new RegExp("OS X").test((_b2 = (_a2 = platform.os) == null ? void 0 : _a2.family) != null ? _b2 : "");
|
|
835
|
-
CmnLib.isMobile = !new RegExp("(Windows|OS X)").test((_d = (_c2 = platform.os) == null ? void 0 : _c2.family) != null ? _d : "");
|
|
832
|
+
CmnLib.isSafari = platform$1.exports.name === "Safari";
|
|
833
|
+
CmnLib.isFirefox = platform$1.exports.name === "Firefox";
|
|
834
|
+
CmnLib.isMac = new RegExp("OS X").test((_b2 = (_a2 = platform$1.exports.os) == null ? void 0 : _a2.family) != null ? _b2 : "");
|
|
835
|
+
CmnLib.isMobile = !new RegExp("(Windows|OS X)").test((_d = (_c2 = platform$1.exports.os) == null ? void 0 : _c2.family) != null ? _d : "");
|
|
836
836
|
CmnLib.hDip = {};
|
|
837
837
|
CmnLib.isDbg = false;
|
|
838
838
|
CmnLib.isPackaged = false;
|
|
@@ -2302,16 +2302,15 @@ class BinaryReconstructor {
|
|
|
2302
2302
|
this.buffers = [];
|
|
2303
2303
|
}
|
|
2304
2304
|
}
|
|
2305
|
-
var parser = /* @__PURE__ */ Object.freeze({
|
|
2305
|
+
var parser = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2306
2306
|
__proto__: null,
|
|
2307
|
-
[Symbol.toStringTag]: "Module",
|
|
2308
2307
|
protocol,
|
|
2309
2308
|
get PacketType() {
|
|
2310
2309
|
return PacketType;
|
|
2311
2310
|
},
|
|
2312
2311
|
Encoder,
|
|
2313
2312
|
Decoder
|
|
2314
|
-
});
|
|
2313
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
2315
2314
|
function on(obj, ev, fn) {
|
|
2316
2315
|
obj.on(ev, fn);
|
|
2317
2316
|
return function subDestroy() {
|
|
@@ -3061,9 +3060,7 @@ const _SysBase = class {
|
|
|
3061
3060
|
addLayCls: () => {
|
|
3062
3061
|
},
|
|
3063
3062
|
searchPath: () => "",
|
|
3064
|
-
getVal: () => {
|
|
3065
|
-
return {};
|
|
3066
|
-
},
|
|
3063
|
+
getVal: () => ({}),
|
|
3067
3064
|
resume: () => {
|
|
3068
3065
|
},
|
|
3069
3066
|
render: () => {
|
|
@@ -3413,7 +3410,6 @@ const _Config = class {
|
|
|
3413
3410
|
this.sys = sys;
|
|
3414
3411
|
this.oCfg = {
|
|
3415
3412
|
save_ns: "",
|
|
3416
|
-
coder: { len: 864 },
|
|
3417
3413
|
window: {
|
|
3418
3414
|
width: 300,
|
|
3419
3415
|
height: 300
|
|
@@ -3429,7 +3425,7 @@ const _Config = class {
|
|
|
3429
3425
|
},
|
|
3430
3426
|
log: { max_len: 1024 },
|
|
3431
3427
|
init: {
|
|
3432
|
-
bg_color:
|
|
3428
|
+
bg_color: "#000000",
|
|
3433
3429
|
tagch_msecwait: 10,
|
|
3434
3430
|
auto_msecpagewait: 3500,
|
|
3435
3431
|
escape: ""
|
|
@@ -3462,15 +3458,13 @@ const _Config = class {
|
|
|
3462
3458
|
return c2;
|
|
3463
3459
|
}
|
|
3464
3460
|
async load(oCfg) {
|
|
3465
|
-
var _a3, _b3, _c3, _d2, _e, _f, _g, _h
|
|
3461
|
+
var _a3, _b3, _c3, _d2, _e, _f, _g, _h;
|
|
3466
3462
|
this.oCfg.save_ns = (_a3 = oCfg == null ? void 0 : oCfg.save_ns) != null ? _a3 : this.oCfg.save_ns;
|
|
3467
|
-
this.oCfg.
|
|
3468
|
-
CmnLib.
|
|
3469
|
-
CmnLib.stageH = this.oCfg.window.height = Number((_f = (_e = oCfg == null ? void 0 : oCfg.window) == null ? void 0 : _e.height) != null ? _f : this.oCfg.window.height);
|
|
3463
|
+
CmnLib.stageW = this.oCfg.window.width = Number((_c3 = (_b3 = oCfg == null ? void 0 : oCfg.window) == null ? void 0 : _b3.width) != null ? _c3 : this.oCfg.window.width);
|
|
3464
|
+
CmnLib.stageH = this.oCfg.window.height = Number((_e = (_d2 = oCfg == null ? void 0 : oCfg.window) == null ? void 0 : _d2.height) != null ? _e : this.oCfg.window.height);
|
|
3470
3465
|
this.oCfg.book = __spreadValues(__spreadValues({}, this.oCfg.book), oCfg.book);
|
|
3471
|
-
this.oCfg.log.max_len = (
|
|
3466
|
+
this.oCfg.log.max_len = (_h = (_g = (_f = oCfg.log) == null ? void 0 : _f.max_len) == null ? void 0 : _g.max_len) != null ? _h : this.oCfg.log.max_len;
|
|
3472
3467
|
this.oCfg.init = __spreadValues(__spreadValues({}, this.oCfg.init), oCfg.init);
|
|
3473
|
-
this.oCfg.init.bg_color = parseColor(String(this.oCfg.init.bg_color));
|
|
3474
3468
|
this.oCfg.debug = __spreadValues(__spreadValues({}, this.oCfg.debug), oCfg.debug);
|
|
3475
3469
|
CmnLib.debugLog = this.oCfg.debug.debugLog;
|
|
3476
3470
|
this.oCfg.debuger_token = oCfg.debuger_token;
|
|
@@ -6362,13 +6356,13 @@ function isMobile$1(param) {
|
|
|
6362
6356
|
return result;
|
|
6363
6357
|
}
|
|
6364
6358
|
/*!
|
|
6365
|
-
* @pixi/settings - v6.
|
|
6366
|
-
* Compiled Wed,
|
|
6359
|
+
* @pixi/settings - v6.3.0
|
|
6360
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
6367
6361
|
*
|
|
6368
6362
|
* @pixi/settings is licensed under the MIT License.
|
|
6369
6363
|
* http://www.opensource.org/licenses/mit-license
|
|
6370
6364
|
*/
|
|
6371
|
-
var isMobile = isMobile$1(
|
|
6365
|
+
var isMobile = isMobile$1(globalThis.navigator);
|
|
6372
6366
|
function maxRecommendedTextures(max) {
|
|
6373
6367
|
var allowMax = true;
|
|
6374
6368
|
if (isMobile.tablet || isMobile.phone) {
|
|
@@ -6397,8 +6391,8 @@ function canUploadSameBuffer() {
|
|
|
6397
6391
|
return !isMobile.apple.device;
|
|
6398
6392
|
}
|
|
6399
6393
|
/*!
|
|
6400
|
-
* @pixi/constants - v6.
|
|
6401
|
-
* Compiled Wed,
|
|
6394
|
+
* @pixi/constants - v6.3.0
|
|
6395
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
6402
6396
|
*
|
|
6403
6397
|
* @pixi/constants is licensed under the MIT License.
|
|
6404
6398
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -6620,8 +6614,8 @@ var settings = {
|
|
|
6620
6614
|
ROUND_PIXELS: false
|
|
6621
6615
|
};
|
|
6622
6616
|
/*!
|
|
6623
|
-
* @pixi/constants - v6.
|
|
6624
|
-
* Compiled Wed,
|
|
6617
|
+
* @pixi/constants - v6.3.0
|
|
6618
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
6625
6619
|
*
|
|
6626
6620
|
* @pixi/constants is licensed under the MIT License.
|
|
6627
6621
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -7450,8 +7444,8 @@ earcut.flatten = function(data) {
|
|
|
7450
7444
|
};
|
|
7451
7445
|
var earcut$1 = earcut$2.exports;
|
|
7452
7446
|
/*!
|
|
7453
|
-
* @pixi/utils - v6.
|
|
7454
|
-
* Compiled Wed,
|
|
7447
|
+
* @pixi/utils - v6.3.0
|
|
7448
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
7455
7449
|
*
|
|
7456
7450
|
* @pixi/utils is licensed under the MIT License.
|
|
7457
7451
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -7464,7 +7458,7 @@ var url = {
|
|
|
7464
7458
|
settings.RETINA_PREFIX = /@([0-9\.]+)x/;
|
|
7465
7459
|
settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = false;
|
|
7466
7460
|
var saidHello = false;
|
|
7467
|
-
var VERSION = "6.
|
|
7461
|
+
var VERSION = "6.3.0";
|
|
7468
7462
|
function skipHello() {
|
|
7469
7463
|
saidHello = true;
|
|
7470
7464
|
}
|
|
@@ -7486,9 +7480,9 @@ function sayHello(type) {
|
|
|
7486
7480
|
"color: #ff2424; background: #fff; padding:5px 0;",
|
|
7487
7481
|
"color: #ff2424; background: #fff; padding:5px 0;"
|
|
7488
7482
|
];
|
|
7489
|
-
(_a3 =
|
|
7490
|
-
} else if (
|
|
7491
|
-
|
|
7483
|
+
(_a3 = globalThis.console).log.apply(_a3, args);
|
|
7484
|
+
} else if (globalThis.console) {
|
|
7485
|
+
globalThis.console.log("PixiJS " + VERSION + " - " + type + " - http://www.pixijs.com/");
|
|
7492
7486
|
}
|
|
7493
7487
|
saidHello = true;
|
|
7494
7488
|
}
|
|
@@ -7501,7 +7495,7 @@ function isWebGLSupported() {
|
|
|
7501
7495
|
failIfMajorPerformanceCaveat: settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT
|
|
7502
7496
|
};
|
|
7503
7497
|
try {
|
|
7504
|
-
if (!
|
|
7498
|
+
if (!globalThis.WebGLRenderingContext) {
|
|
7505
7499
|
return false;
|
|
7506
7500
|
}
|
|
7507
7501
|
var canvas2 = document.createElement("canvas");
|
|
@@ -7831,14 +7825,14 @@ function hex2rgb(hex, out) {
|
|
|
7831
7825
|
}
|
|
7832
7826
|
function hex2string(hex) {
|
|
7833
7827
|
var hexString = hex.toString(16);
|
|
7834
|
-
hexString = "000000".
|
|
7828
|
+
hexString = "000000".substring(0, 6 - hexString.length) + hexString;
|
|
7835
7829
|
return "#" + hexString;
|
|
7836
7830
|
}
|
|
7837
7831
|
function string2hex(string) {
|
|
7838
7832
|
if (typeof string === "string") {
|
|
7839
7833
|
string = cssColorNames[string.toLowerCase()] || string;
|
|
7840
7834
|
if (string[0] === "#") {
|
|
7841
|
-
string = string.
|
|
7835
|
+
string = string.slice(1);
|
|
7842
7836
|
}
|
|
7843
7837
|
}
|
|
7844
7838
|
return parseInt(string, 16);
|
|
@@ -8127,12 +8121,12 @@ function trimCanvas(canvas2) {
|
|
|
8127
8121
|
var tempAnchor$1;
|
|
8128
8122
|
function determineCrossOrigin(url$12, loc) {
|
|
8129
8123
|
if (loc === void 0) {
|
|
8130
|
-
loc =
|
|
8124
|
+
loc = globalThis.location;
|
|
8131
8125
|
}
|
|
8132
8126
|
if (url$12.indexOf("data:") === 0) {
|
|
8133
8127
|
return "";
|
|
8134
8128
|
}
|
|
8135
|
-
loc = loc ||
|
|
8129
|
+
loc = loc || globalThis.location;
|
|
8136
8130
|
if (!tempAnchor$1) {
|
|
8137
8131
|
tempAnchor$1 = document.createElement("a");
|
|
8138
8132
|
}
|
|
@@ -8152,8 +8146,8 @@ function getResolutionOfUrl(url2, defaultValue2) {
|
|
|
8152
8146
|
return defaultValue2 !== void 0 ? defaultValue2 : 1;
|
|
8153
8147
|
}
|
|
8154
8148
|
/*!
|
|
8155
|
-
* @pixi/runner - v6.
|
|
8156
|
-
* Compiled Wed,
|
|
8149
|
+
* @pixi/runner - v6.3.0
|
|
8150
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
8157
8151
|
*
|
|
8158
8152
|
* @pixi/runner is licensed under the MIT License.
|
|
8159
8153
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -8234,8 +8228,8 @@ Object.defineProperties(Runner.prototype, {
|
|
|
8234
8228
|
run: { value: Runner.prototype.emit }
|
|
8235
8229
|
});
|
|
8236
8230
|
/*!
|
|
8237
|
-
* @pixi/ticker - v6.
|
|
8238
|
-
* Compiled Wed,
|
|
8231
|
+
* @pixi/ticker - v6.3.0
|
|
8232
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
8239
8233
|
*
|
|
8240
8234
|
* @pixi/ticker is licensed under the MIT License.
|
|
8241
8235
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -8591,8 +8585,8 @@ var TickerPlugin = function() {
|
|
|
8591
8585
|
return TickerPlugin2;
|
|
8592
8586
|
}();
|
|
8593
8587
|
/*!
|
|
8594
|
-
* @pixi/math - v6.
|
|
8595
|
-
* Compiled Wed,
|
|
8588
|
+
* @pixi/math - v6.3.0
|
|
8589
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
8596
8590
|
*
|
|
8597
8591
|
* @pixi/math is licensed under the MIT License.
|
|
8598
8592
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -8608,6 +8602,50 @@ var SHAPES;
|
|
|
8608
8602
|
SHAPES2[SHAPES2["ELIP"] = 3] = "ELIP";
|
|
8609
8603
|
SHAPES2[SHAPES2["RREC"] = 4] = "RREC";
|
|
8610
8604
|
})(SHAPES || (SHAPES = {}));
|
|
8605
|
+
var Point = function() {
|
|
8606
|
+
function Point2(x, y2) {
|
|
8607
|
+
if (x === void 0) {
|
|
8608
|
+
x = 0;
|
|
8609
|
+
}
|
|
8610
|
+
if (y2 === void 0) {
|
|
8611
|
+
y2 = 0;
|
|
8612
|
+
}
|
|
8613
|
+
this.x = 0;
|
|
8614
|
+
this.y = 0;
|
|
8615
|
+
this.x = x;
|
|
8616
|
+
this.y = y2;
|
|
8617
|
+
}
|
|
8618
|
+
Point2.prototype.clone = function() {
|
|
8619
|
+
return new Point2(this.x, this.y);
|
|
8620
|
+
};
|
|
8621
|
+
Point2.prototype.copyFrom = function(p) {
|
|
8622
|
+
this.set(p.x, p.y);
|
|
8623
|
+
return this;
|
|
8624
|
+
};
|
|
8625
|
+
Point2.prototype.copyTo = function(p) {
|
|
8626
|
+
p.set(this.x, this.y);
|
|
8627
|
+
return p;
|
|
8628
|
+
};
|
|
8629
|
+
Point2.prototype.equals = function(p) {
|
|
8630
|
+
return p.x === this.x && p.y === this.y;
|
|
8631
|
+
};
|
|
8632
|
+
Point2.prototype.set = function(x, y2) {
|
|
8633
|
+
if (x === void 0) {
|
|
8634
|
+
x = 0;
|
|
8635
|
+
}
|
|
8636
|
+
if (y2 === void 0) {
|
|
8637
|
+
y2 = x;
|
|
8638
|
+
}
|
|
8639
|
+
this.x = x;
|
|
8640
|
+
this.y = y2;
|
|
8641
|
+
return this;
|
|
8642
|
+
};
|
|
8643
|
+
Point2.prototype.toString = function() {
|
|
8644
|
+
return "[@pixi/math:Point x=" + this.x + " y=" + this.y + "]";
|
|
8645
|
+
};
|
|
8646
|
+
return Point2;
|
|
8647
|
+
}();
|
|
8648
|
+
var tempPoints$1 = [new Point(), new Point(), new Point(), new Point()];
|
|
8611
8649
|
var Rectangle = function() {
|
|
8612
8650
|
function Rectangle2(x, y2, width, height) {
|
|
8613
8651
|
if (x === void 0) {
|
|
@@ -8691,6 +8729,62 @@ var Rectangle = function() {
|
|
|
8691
8729
|
}
|
|
8692
8730
|
return false;
|
|
8693
8731
|
};
|
|
8732
|
+
Rectangle2.prototype.intersects = function(other, transform) {
|
|
8733
|
+
if (!transform) {
|
|
8734
|
+
var x0_1 = this.x < other.x ? other.x : this.x;
|
|
8735
|
+
var x1_1 = this.right > other.right ? other.right : this.right;
|
|
8736
|
+
if (x1_1 <= x0_1) {
|
|
8737
|
+
return false;
|
|
8738
|
+
}
|
|
8739
|
+
var y0_1 = this.y < other.y ? other.y : this.y;
|
|
8740
|
+
var y1_1 = this.bottom > other.bottom ? other.bottom : this.bottom;
|
|
8741
|
+
return y1_1 > y0_1;
|
|
8742
|
+
}
|
|
8743
|
+
var x0 = this.left;
|
|
8744
|
+
var x1 = this.right;
|
|
8745
|
+
var y0 = this.top;
|
|
8746
|
+
var y1 = this.bottom;
|
|
8747
|
+
if (x1 <= x0 || y1 <= y0) {
|
|
8748
|
+
return false;
|
|
8749
|
+
}
|
|
8750
|
+
var lt = tempPoints$1[0].set(other.left, other.top);
|
|
8751
|
+
var lb = tempPoints$1[1].set(other.left, other.bottom);
|
|
8752
|
+
var rt = tempPoints$1[2].set(other.right, other.top);
|
|
8753
|
+
var rb = tempPoints$1[3].set(other.right, other.bottom);
|
|
8754
|
+
if (rt.x <= lt.x || lb.y <= lt.y) {
|
|
8755
|
+
return false;
|
|
8756
|
+
}
|
|
8757
|
+
var s2 = Math.sign(transform.a * transform.d - transform.b * transform.c);
|
|
8758
|
+
if (s2 === 0) {
|
|
8759
|
+
return false;
|
|
8760
|
+
}
|
|
8761
|
+
transform.apply(lt, lt);
|
|
8762
|
+
transform.apply(lb, lb);
|
|
8763
|
+
transform.apply(rt, rt);
|
|
8764
|
+
transform.apply(rb, rb);
|
|
8765
|
+
if (Math.max(lt.x, lb.x, rt.x, rb.x) <= x0 || Math.min(lt.x, lb.x, rt.x, rb.x) >= x1 || Math.max(lt.y, lb.y, rt.y, rb.y) <= y0 || Math.min(lt.y, lb.y, rt.y, rb.y) >= y1) {
|
|
8766
|
+
return false;
|
|
8767
|
+
}
|
|
8768
|
+
var nx = s2 * (lb.y - lt.y);
|
|
8769
|
+
var ny = s2 * (lt.x - lb.x);
|
|
8770
|
+
var n00 = nx * x0 + ny * y0;
|
|
8771
|
+
var n10 = nx * x1 + ny * y0;
|
|
8772
|
+
var n01 = nx * x0 + ny * y1;
|
|
8773
|
+
var n11 = nx * x1 + ny * y1;
|
|
8774
|
+
if (Math.max(n00, n10, n01, n11) <= nx * lt.x + ny * lt.y || Math.min(n00, n10, n01, n11) >= nx * rb.x + ny * rb.y) {
|
|
8775
|
+
return false;
|
|
8776
|
+
}
|
|
8777
|
+
var mx = s2 * (lt.y - rt.y);
|
|
8778
|
+
var my = s2 * (rt.x - lt.x);
|
|
8779
|
+
var m00 = mx * x0 + my * y0;
|
|
8780
|
+
var m10 = mx * x1 + my * y0;
|
|
8781
|
+
var m01 = mx * x0 + my * y1;
|
|
8782
|
+
var m11 = mx * x1 + my * y1;
|
|
8783
|
+
if (Math.max(m00, m10, m01, m11) <= mx * lt.x + my * lt.y || Math.min(m00, m10, m01, m11) >= mx * rb.x + my * rb.y) {
|
|
8784
|
+
return false;
|
|
8785
|
+
}
|
|
8786
|
+
return true;
|
|
8787
|
+
};
|
|
8694
8788
|
Rectangle2.prototype.pad = function(paddingX, paddingY) {
|
|
8695
8789
|
if (paddingX === void 0) {
|
|
8696
8790
|
paddingX = 0;
|
|
@@ -8936,49 +9030,6 @@ var RoundedRectangle = function() {
|
|
|
8936
9030
|
};
|
|
8937
9031
|
return RoundedRectangle2;
|
|
8938
9032
|
}();
|
|
8939
|
-
var Point = function() {
|
|
8940
|
-
function Point2(x, y2) {
|
|
8941
|
-
if (x === void 0) {
|
|
8942
|
-
x = 0;
|
|
8943
|
-
}
|
|
8944
|
-
if (y2 === void 0) {
|
|
8945
|
-
y2 = 0;
|
|
8946
|
-
}
|
|
8947
|
-
this.x = 0;
|
|
8948
|
-
this.y = 0;
|
|
8949
|
-
this.x = x;
|
|
8950
|
-
this.y = y2;
|
|
8951
|
-
}
|
|
8952
|
-
Point2.prototype.clone = function() {
|
|
8953
|
-
return new Point2(this.x, this.y);
|
|
8954
|
-
};
|
|
8955
|
-
Point2.prototype.copyFrom = function(p) {
|
|
8956
|
-
this.set(p.x, p.y);
|
|
8957
|
-
return this;
|
|
8958
|
-
};
|
|
8959
|
-
Point2.prototype.copyTo = function(p) {
|
|
8960
|
-
p.set(this.x, this.y);
|
|
8961
|
-
return p;
|
|
8962
|
-
};
|
|
8963
|
-
Point2.prototype.equals = function(p) {
|
|
8964
|
-
return p.x === this.x && p.y === this.y;
|
|
8965
|
-
};
|
|
8966
|
-
Point2.prototype.set = function(x, y2) {
|
|
8967
|
-
if (x === void 0) {
|
|
8968
|
-
x = 0;
|
|
8969
|
-
}
|
|
8970
|
-
if (y2 === void 0) {
|
|
8971
|
-
y2 = x;
|
|
8972
|
-
}
|
|
8973
|
-
this.x = x;
|
|
8974
|
-
this.y = y2;
|
|
8975
|
-
return this;
|
|
8976
|
-
};
|
|
8977
|
-
Point2.prototype.toString = function() {
|
|
8978
|
-
return "[@pixi/math:Point x=" + this.x + " y=" + this.y + "]";
|
|
8979
|
-
};
|
|
8980
|
-
return Point2;
|
|
8981
|
-
}();
|
|
8982
9033
|
var ObservablePoint = function() {
|
|
8983
9034
|
function ObservablePoint2(cb, scope, x, y2) {
|
|
8984
9035
|
if (x === void 0) {
|
|
@@ -9507,8 +9558,8 @@ var Transform = function() {
|
|
|
9507
9558
|
return Transform2;
|
|
9508
9559
|
}();
|
|
9509
9560
|
/*!
|
|
9510
|
-
* @pixi/core - v6.
|
|
9511
|
-
* Compiled Wed,
|
|
9561
|
+
* @pixi/core - v6.3.0
|
|
9562
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
9512
9563
|
*
|
|
9513
9564
|
* @pixi/core is licensed under the MIT License.
|
|
9514
9565
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -9568,8 +9619,8 @@ function __extends$q(d2, b2) {
|
|
|
9568
9619
|
}
|
|
9569
9620
|
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
9570
9621
|
}
|
|
9571
|
-
var __assign$
|
|
9572
|
-
__assign$
|
|
9622
|
+
var __assign$8 = function() {
|
|
9623
|
+
__assign$8 = Object.assign || function __assign2(t) {
|
|
9573
9624
|
var arguments$1 = arguments;
|
|
9574
9625
|
for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
|
|
9575
9626
|
s2 = arguments$1[i2];
|
|
@@ -9581,7 +9632,7 @@ var __assign$7 = function() {
|
|
|
9581
9632
|
}
|
|
9582
9633
|
return t;
|
|
9583
9634
|
};
|
|
9584
|
-
return __assign$
|
|
9635
|
+
return __assign$8.apply(this, arguments);
|
|
9585
9636
|
};
|
|
9586
9637
|
function __rest$3(s2, e) {
|
|
9587
9638
|
var t = {};
|
|
@@ -10147,6 +10198,15 @@ var BaseImageResource = function(_super) {
|
|
|
10147
10198
|
var width = baseTexture.realWidth;
|
|
10148
10199
|
var height = baseTexture.realHeight;
|
|
10149
10200
|
source = source || this.source;
|
|
10201
|
+
if (source instanceof HTMLImageElement) {
|
|
10202
|
+
if (!source.complete || source.naturalWidth === 0) {
|
|
10203
|
+
return false;
|
|
10204
|
+
}
|
|
10205
|
+
} else if (source instanceof HTMLVideoElement) {
|
|
10206
|
+
if (source.readyState <= 1) {
|
|
10207
|
+
return false;
|
|
10208
|
+
}
|
|
10209
|
+
}
|
|
10150
10210
|
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, baseTexture.alphaMode === ALPHA_MODES$3.UNPACK);
|
|
10151
10211
|
if (!this.noSubImage && baseTexture.target === gl.TEXTURE_2D && glTexture.width === width && glTexture.height === height) {
|
|
10152
10212
|
gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, baseTexture.format, glTexture.type, source);
|
|
@@ -10178,11 +10238,11 @@ var CanvasResource = function(_super) {
|
|
|
10178
10238
|
return _super.call(this, source) || this;
|
|
10179
10239
|
}
|
|
10180
10240
|
CanvasResource2.test = function(source) {
|
|
10181
|
-
var OffscreenCanvas2 =
|
|
10241
|
+
var OffscreenCanvas2 = globalThis.OffscreenCanvas;
|
|
10182
10242
|
if (OffscreenCanvas2 && source instanceof OffscreenCanvas2) {
|
|
10183
10243
|
return true;
|
|
10184
10244
|
}
|
|
10185
|
-
return
|
|
10245
|
+
return globalThis.HTMLCanvasElement && source instanceof HTMLCanvasElement;
|
|
10186
10246
|
};
|
|
10187
10247
|
return CanvasResource2;
|
|
10188
10248
|
}(BaseImageResource);
|
|
@@ -10273,7 +10333,7 @@ var ImageResource = function(_super) {
|
|
|
10273
10333
|
_this.url = source.src;
|
|
10274
10334
|
_this._process = null;
|
|
10275
10335
|
_this.preserveBitmap = false;
|
|
10276
|
-
_this.createBitmap = (options.createBitmap !== void 0 ? options.createBitmap : settings.CREATE_IMAGE_BITMAP) && !!
|
|
10336
|
+
_this.createBitmap = (options.createBitmap !== void 0 ? options.createBitmap : settings.CREATE_IMAGE_BITMAP) && !!globalThis.createImageBitmap;
|
|
10277
10337
|
_this.alphaMode = typeof options.alphaMode === "number" ? options.alphaMode : null;
|
|
10278
10338
|
_this.bitmap = null;
|
|
10279
10339
|
_this._load = null;
|
|
@@ -10325,10 +10385,10 @@ var ImageResource = function(_super) {
|
|
|
10325
10385
|
if (this._process !== null) {
|
|
10326
10386
|
return this._process;
|
|
10327
10387
|
}
|
|
10328
|
-
if (this.bitmap !== null || !
|
|
10388
|
+
if (this.bitmap !== null || !globalThis.createImageBitmap) {
|
|
10329
10389
|
return Promise.resolve(this);
|
|
10330
10390
|
}
|
|
10331
|
-
var createImageBitmap =
|
|
10391
|
+
var createImageBitmap = globalThis.createImageBitmap;
|
|
10332
10392
|
var cors = !source.crossOrigin || source.crossOrigin === "anonymous";
|
|
10333
10393
|
this._process = fetch(source.src, {
|
|
10334
10394
|
mode: cors ? "cors" : "no-cors"
|
|
@@ -10517,7 +10577,7 @@ var VideoResource = function(_super) {
|
|
|
10517
10577
|
var _a3 = source[i2], src = _a3.src, mime = _a3.mime;
|
|
10518
10578
|
src = src || source[i2];
|
|
10519
10579
|
var baseSrc = src.split("?").shift().toLowerCase();
|
|
10520
|
-
var ext = baseSrc.
|
|
10580
|
+
var ext = baseSrc.slice(baseSrc.lastIndexOf(".") + 1);
|
|
10521
10581
|
mime = mime || VideoResource2.MIME_TYPES[ext] || "video/" + ext;
|
|
10522
10582
|
sourceElement.src = src;
|
|
10523
10583
|
sourceElement.type = mime;
|
|
@@ -10668,7 +10728,7 @@ var VideoResource = function(_super) {
|
|
|
10668
10728
|
configurable: true
|
|
10669
10729
|
});
|
|
10670
10730
|
VideoResource2.test = function(source, extension) {
|
|
10671
|
-
return
|
|
10731
|
+
return globalThis.HTMLVideoElement && source instanceof HTMLVideoElement || VideoResource2.TYPES.indexOf(extension) > -1;
|
|
10672
10732
|
};
|
|
10673
10733
|
VideoResource2.TYPES = ["mp4", "m4v", "webm", "ogg", "ogv", "h264", "avi", "mov"];
|
|
10674
10734
|
VideoResource2.MIME_TYPES = {
|
|
@@ -10684,7 +10744,7 @@ var ImageBitmapResource = function(_super) {
|
|
|
10684
10744
|
return _super.call(this, source) || this;
|
|
10685
10745
|
}
|
|
10686
10746
|
ImageBitmapResource2.test = function(source) {
|
|
10687
|
-
return !!
|
|
10747
|
+
return !!globalThis.createImageBitmap && source instanceof ImageBitmap;
|
|
10688
10748
|
};
|
|
10689
10749
|
return ImageBitmapResource2;
|
|
10690
10750
|
}(BaseImageResource);
|
|
@@ -10825,6 +10885,9 @@ var Framebuffer = function() {
|
|
|
10825
10885
|
var BaseRenderTexture = function(_super) {
|
|
10826
10886
|
__extends$q(BaseRenderTexture2, _super);
|
|
10827
10887
|
function BaseRenderTexture2(options) {
|
|
10888
|
+
if (options === void 0) {
|
|
10889
|
+
options = {};
|
|
10890
|
+
}
|
|
10828
10891
|
var _this = this;
|
|
10829
10892
|
if (typeof options === "number") {
|
|
10830
10893
|
var width = arguments[0];
|
|
@@ -11322,8 +11385,8 @@ var RenderTexturePool = function() {
|
|
|
11322
11385
|
multisample = MSAA_QUALITY$3.NONE;
|
|
11323
11386
|
}
|
|
11324
11387
|
var key;
|
|
11325
|
-
minWidth = Math.ceil(minWidth * resolution);
|
|
11326
|
-
minHeight = Math.ceil(minHeight * resolution);
|
|
11388
|
+
minWidth = Math.ceil(minWidth * resolution - 1e-6);
|
|
11389
|
+
minHeight = Math.ceil(minHeight * resolution - 1e-6);
|
|
11327
11390
|
if (!this.enableFullScreen || minWidth !== this._pixelsWidth || minHeight !== this._pixelsHeight) {
|
|
11328
11391
|
minWidth = nextPow2(minWidth);
|
|
11329
11392
|
minHeight = nextPow2(minHeight);
|
|
@@ -12306,7 +12369,7 @@ var ContextSystem = function() {
|
|
|
12306
12369
|
};
|
|
12307
12370
|
ContextSystem2.prototype.validateContext = function(gl) {
|
|
12308
12371
|
var attributes = gl.getContextAttributes();
|
|
12309
|
-
var isWebGl2 = "WebGL2RenderingContext" in
|
|
12372
|
+
var isWebGl2 = "WebGL2RenderingContext" in globalThis && gl instanceof globalThis.WebGL2RenderingContext;
|
|
12310
12373
|
if (isWebGl2) {
|
|
12311
12374
|
this.webGLVersion = 2;
|
|
12312
12375
|
}
|
|
@@ -12625,7 +12688,7 @@ var FramebufferSystem = function() {
|
|
|
12625
12688
|
var sameSize = sourcePixels.width === destPixels.width && sourcePixels.height === destPixels.height;
|
|
12626
12689
|
this.bind(framebuffer);
|
|
12627
12690
|
gl.bindFramebuffer(gl.READ_FRAMEBUFFER, fbo.framebuffer);
|
|
12628
|
-
gl.blitFramebuffer(sourcePixels.
|
|
12691
|
+
gl.blitFramebuffer(sourcePixels.left, sourcePixels.top, sourcePixels.right, sourcePixels.bottom, destPixels.left, destPixels.top, destPixels.right, destPixels.bottom, gl.COLOR_BUFFER_BIT, sameSize ? gl.NEAREST : gl.LINEAR);
|
|
12629
12692
|
};
|
|
12630
12693
|
FramebufferSystem2.prototype.disposeFramebuffer = function(framebuffer, contextLost) {
|
|
12631
12694
|
var fbo = framebuffer.glFramebuffers[this.CONTEXT_UID];
|
|
@@ -14903,7 +14966,7 @@ var TextureGCSystem = function() {
|
|
|
14903
14966
|
function mapTypeAndFormatToInternalFormat(gl) {
|
|
14904
14967
|
var _a3, _b3, _c3, _d2, _e, _f, _g, _h, _j, _k, _l2, _m, _o, _p2, _q, _r2, _s, _t, _u, _v, _w, _x;
|
|
14905
14968
|
var table;
|
|
14906
|
-
if ("WebGL2RenderingContext" in
|
|
14969
|
+
if ("WebGL2RenderingContext" in globalThis && gl instanceof globalThis.WebGL2RenderingContext) {
|
|
14907
14970
|
table = (_a3 = {}, _a3[TYPES$3.UNSIGNED_BYTE] = (_b3 = {}, _b3[FORMATS$3.RGBA] = gl.RGBA8, _b3[FORMATS$3.RGB] = gl.RGB8, _b3[FORMATS$3.RG] = gl.RG8, _b3[FORMATS$3.RED] = gl.R8, _b3[FORMATS$3.RGBA_INTEGER] = gl.RGBA8UI, _b3[FORMATS$3.RGB_INTEGER] = gl.RGB8UI, _b3[FORMATS$3.RG_INTEGER] = gl.RG8UI, _b3[FORMATS$3.RED_INTEGER] = gl.R8UI, _b3[FORMATS$3.ALPHA] = gl.ALPHA, _b3[FORMATS$3.LUMINANCE] = gl.LUMINANCE, _b3[FORMATS$3.LUMINANCE_ALPHA] = gl.LUMINANCE_ALPHA, _b3), _a3[TYPES$3.BYTE] = (_c3 = {}, _c3[FORMATS$3.RGBA] = gl.RGBA8_SNORM, _c3[FORMATS$3.RGB] = gl.RGB8_SNORM, _c3[FORMATS$3.RG] = gl.RG8_SNORM, _c3[FORMATS$3.RED] = gl.R8_SNORM, _c3[FORMATS$3.RGBA_INTEGER] = gl.RGBA8I, _c3[FORMATS$3.RGB_INTEGER] = gl.RGB8I, _c3[FORMATS$3.RG_INTEGER] = gl.RG8I, _c3[FORMATS$3.RED_INTEGER] = gl.R8I, _c3), _a3[TYPES$3.UNSIGNED_SHORT] = (_d2 = {}, _d2[FORMATS$3.RGBA_INTEGER] = gl.RGBA16UI, _d2[FORMATS$3.RGB_INTEGER] = gl.RGB16UI, _d2[FORMATS$3.RG_INTEGER] = gl.RG16UI, _d2[FORMATS$3.RED_INTEGER] = gl.R16UI, _d2[FORMATS$3.DEPTH_COMPONENT] = gl.DEPTH_COMPONENT16, _d2), _a3[TYPES$3.SHORT] = (_e = {}, _e[FORMATS$3.RGBA_INTEGER] = gl.RGBA16I, _e[FORMATS$3.RGB_INTEGER] = gl.RGB16I, _e[FORMATS$3.RG_INTEGER] = gl.RG16I, _e[FORMATS$3.RED_INTEGER] = gl.R16I, _e), _a3[TYPES$3.UNSIGNED_INT] = (_f = {}, _f[FORMATS$3.RGBA_INTEGER] = gl.RGBA32UI, _f[FORMATS$3.RGB_INTEGER] = gl.RGB32UI, _f[FORMATS$3.RG_INTEGER] = gl.RG32UI, _f[FORMATS$3.RED_INTEGER] = gl.R32UI, _f[FORMATS$3.DEPTH_COMPONENT] = gl.DEPTH_COMPONENT24, _f), _a3[TYPES$3.INT] = (_g = {}, _g[FORMATS$3.RGBA_INTEGER] = gl.RGBA32I, _g[FORMATS$3.RGB_INTEGER] = gl.RGB32I, _g[FORMATS$3.RG_INTEGER] = gl.RG32I, _g[FORMATS$3.RED_INTEGER] = gl.R32I, _g), _a3[TYPES$3.FLOAT] = (_h = {}, _h[FORMATS$3.RGBA] = gl.RGBA32F, _h[FORMATS$3.RGB] = gl.RGB32F, _h[FORMATS$3.RG] = gl.RG32F, _h[FORMATS$3.RED] = gl.R32F, _h[FORMATS$3.DEPTH_COMPONENT] = gl.DEPTH_COMPONENT32F, _h), _a3[TYPES$3.HALF_FLOAT] = (_j = {}, _j[FORMATS$3.RGBA] = gl.RGBA16F, _j[FORMATS$3.RGB] = gl.RGB16F, _j[FORMATS$3.RG] = gl.RG16F, _j[FORMATS$3.RED] = gl.R16F, _j), _a3[TYPES$3.UNSIGNED_SHORT_5_6_5] = (_k = {}, _k[FORMATS$3.RGB] = gl.RGB565, _k), _a3[TYPES$3.UNSIGNED_SHORT_4_4_4_4] = (_l2 = {}, _l2[FORMATS$3.RGBA] = gl.RGBA4, _l2), _a3[TYPES$3.UNSIGNED_SHORT_5_5_5_1] = (_m = {}, _m[FORMATS$3.RGBA] = gl.RGB5_A1, _m), _a3[TYPES$3.UNSIGNED_INT_2_10_10_10_REV] = (_o = {}, _o[FORMATS$3.RGBA] = gl.RGB10_A2, _o[FORMATS$3.RGBA_INTEGER] = gl.RGB10_A2UI, _o), _a3[TYPES$3.UNSIGNED_INT_10F_11F_11F_REV] = (_p2 = {}, _p2[FORMATS$3.RGB] = gl.R11F_G11F_B10F, _p2), _a3[TYPES$3.UNSIGNED_INT_5_9_9_9_REV] = (_q = {}, _q[FORMATS$3.RGB] = gl.RGB9_E5, _q), _a3[TYPES$3.UNSIGNED_INT_24_8] = (_r2 = {}, _r2[FORMATS$3.DEPTH_STENCIL] = gl.DEPTH24_STENCIL8, _r2), _a3[TYPES$3.FLOAT_32_UNSIGNED_INT_24_8_REV] = (_s = {}, _s[FORMATS$3.DEPTH_STENCIL] = gl.DEPTH32F_STENCIL8, _s), _a3);
|
|
14908
14971
|
} else {
|
|
14909
14972
|
table = (_t = {}, _t[TYPES$3.UNSIGNED_BYTE] = (_u = {}, _u[FORMATS$3.RGBA] = gl.RGBA, _u[FORMATS$3.RGB] = gl.RGB, _u[FORMATS$3.ALPHA] = gl.ALPHA, _u[FORMATS$3.LUMINANCE] = gl.LUMINANCE, _u[FORMATS$3.LUMINANCE_ALPHA] = gl.LUMINANCE_ALPHA, _u), _t[TYPES$3.UNSIGNED_SHORT_5_6_5] = (_v = {}, _v[FORMATS$3.RGB] = gl.RGB, _v), _t[TYPES$3.UNSIGNED_SHORT_4_4_4_4] = (_w = {}, _w[FORMATS$3.RGBA] = gl.RGBA, _w), _t[TYPES$3.UNSIGNED_SHORT_5_5_5_1] = (_x = {}, _x[FORMATS$3.RGBA] = gl.RGBA, _x), _t);
|
|
@@ -15240,7 +15303,7 @@ var AbstractRenderer = function(_super) {
|
|
|
15240
15303
|
if (region.height === 0) {
|
|
15241
15304
|
region.height = 1;
|
|
15242
15305
|
}
|
|
15243
|
-
var renderTexture = RenderTexture.create(__assign$
|
|
15306
|
+
var renderTexture = RenderTexture.create(__assign$8({ width: region.width, height: region.height }, textureOptions));
|
|
15244
15307
|
tempMatrix$2.tx = -region.x;
|
|
15245
15308
|
tempMatrix$2.ty = -region.y;
|
|
15246
15309
|
this.render(displayObject, {
|
|
@@ -16097,8 +16160,8 @@ for (var name in _systems) {
|
|
|
16097
16160
|
_loop_2(name);
|
|
16098
16161
|
}
|
|
16099
16162
|
/*!
|
|
16100
|
-
* @pixi/loaders - v6.
|
|
16101
|
-
* Compiled Wed,
|
|
16163
|
+
* @pixi/loaders - v6.3.0
|
|
16164
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
16102
16165
|
*
|
|
16103
16166
|
* @pixi/loaders is licensed under the MIT License.
|
|
16104
16167
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -16262,7 +16325,7 @@ function parseUri(str, opts) {
|
|
|
16262
16325
|
});
|
|
16263
16326
|
return uri;
|
|
16264
16327
|
}
|
|
16265
|
-
var useXdr = !!(
|
|
16328
|
+
var useXdr = !!(globalThis.XDomainRequest && !("withCredentials" in new XMLHttpRequest()));
|
|
16266
16329
|
var tempAnchor = null;
|
|
16267
16330
|
var STATUS_NONE = 0;
|
|
16268
16331
|
var STATUS_OK = 200;
|
|
@@ -16467,7 +16530,7 @@ var LoaderResource = function() {
|
|
|
16467
16530
|
LoaderResource2.prototype._loadElement = function(type) {
|
|
16468
16531
|
if (this.metadata.loadElement) {
|
|
16469
16532
|
this.data = this.metadata.loadElement;
|
|
16470
|
-
} else if (type === "image" && typeof
|
|
16533
|
+
} else if (type === "image" && typeof globalThis.Image !== "undefined") {
|
|
16471
16534
|
this.data = new Image();
|
|
16472
16535
|
} else {
|
|
16473
16536
|
this.data = document.createElement(type);
|
|
@@ -16488,7 +16551,7 @@ var LoaderResource = function() {
|
|
|
16488
16551
|
LoaderResource2.prototype._loadSourceElement = function(type) {
|
|
16489
16552
|
if (this.metadata.loadElement) {
|
|
16490
16553
|
this.data = this.metadata.loadElement;
|
|
16491
|
-
} else if (type === "audio" && typeof
|
|
16554
|
+
} else if (type === "audio" && typeof globalThis.Audio !== "undefined") {
|
|
16492
16555
|
this.data = new Audio();
|
|
16493
16556
|
} else {
|
|
16494
16557
|
this.data = document.createElement(type);
|
|
@@ -16527,6 +16590,9 @@ var LoaderResource = function() {
|
|
|
16527
16590
|
this.xhrType = this._determineXhrType();
|
|
16528
16591
|
}
|
|
16529
16592
|
var xhr = this.xhr = new XMLHttpRequest();
|
|
16593
|
+
if (this.crossOrigin === "use-credentials") {
|
|
16594
|
+
xhr.withCredentials = true;
|
|
16595
|
+
}
|
|
16530
16596
|
xhr.open("GET", this.url, true);
|
|
16531
16597
|
xhr.timeout = this.timeout;
|
|
16532
16598
|
if (this.xhrType === LoaderResource2.XHR_RESPONSE_TYPE.JSON || this.xhrType === LoaderResource2.XHR_RESPONSE_TYPE.DOCUMENT) {
|
|
@@ -16545,7 +16611,7 @@ var LoaderResource = function() {
|
|
|
16545
16611
|
if (typeof this.xhrType !== "string") {
|
|
16546
16612
|
this.xhrType = this._determineXhrType();
|
|
16547
16613
|
}
|
|
16548
|
-
var xdr = this.xhr = new
|
|
16614
|
+
var xdr = this.xhr = new globalThis.XDomainRequest();
|
|
16549
16615
|
xdr.timeout = this.timeout || 5e3;
|
|
16550
16616
|
xdr.onerror = this._boundXhrOnError;
|
|
16551
16617
|
xdr.ontimeout = this._boundXhrOnTimeout;
|
|
@@ -16615,7 +16681,7 @@ var LoaderResource = function() {
|
|
|
16615
16681
|
}
|
|
16616
16682
|
} else if (this.xhrType === LoaderResource2.XHR_RESPONSE_TYPE.DOCUMENT) {
|
|
16617
16683
|
try {
|
|
16618
|
-
if (
|
|
16684
|
+
if (globalThis.DOMParser) {
|
|
16619
16685
|
var domparser = new DOMParser();
|
|
16620
16686
|
this.data = domparser.parseFromString(text, "text/xml");
|
|
16621
16687
|
} else {
|
|
@@ -16641,10 +16707,10 @@ var LoaderResource = function() {
|
|
|
16641
16707
|
if (url2.indexOf("data:") === 0) {
|
|
16642
16708
|
return "";
|
|
16643
16709
|
}
|
|
16644
|
-
if (
|
|
16710
|
+
if (globalThis.origin !== globalThis.location.origin) {
|
|
16645
16711
|
return "anonymous";
|
|
16646
16712
|
}
|
|
16647
|
-
loc = loc ||
|
|
16713
|
+
loc = loc || globalThis.location;
|
|
16648
16714
|
if (!tempAnchor) {
|
|
16649
16715
|
tempAnchor = document.createElement("a");
|
|
16650
16716
|
}
|
|
@@ -17080,7 +17146,7 @@ var Loader = function() {
|
|
|
17080
17146
|
}
|
|
17081
17147
|
if (this.defaultQueryString) {
|
|
17082
17148
|
var hash2 = rgxExtractUrlHash.exec(result)[0];
|
|
17083
|
-
result = result.
|
|
17149
|
+
result = result.slice(0, result.length - hash2.length);
|
|
17084
17150
|
if (result.indexOf("?") !== -1) {
|
|
17085
17151
|
result += "&" + this.defaultQueryString;
|
|
17086
17152
|
} else {
|
|
@@ -18311,7 +18377,6 @@ function allSettled(arr) {
|
|
|
18311
18377
|
});
|
|
18312
18378
|
}
|
|
18313
18379
|
var setTimeoutFunc = setTimeout;
|
|
18314
|
-
var setImmediateFunc = typeof setImmediate !== "undefined" ? setImmediate : null;
|
|
18315
18380
|
function isArray$1(x) {
|
|
18316
18381
|
return Boolean(x && typeof x.length !== "undefined");
|
|
18317
18382
|
}
|
|
@@ -18491,8 +18556,8 @@ Promise$1.race = function(arr) {
|
|
|
18491
18556
|
}
|
|
18492
18557
|
});
|
|
18493
18558
|
};
|
|
18494
|
-
Promise$1._immediateFn = typeof
|
|
18495
|
-
|
|
18559
|
+
Promise$1._immediateFn = typeof setImmediate === "function" && function(fn) {
|
|
18560
|
+
setImmediate(fn);
|
|
18496
18561
|
} || function(fn) {
|
|
18497
18562
|
setTimeoutFunc(fn, 0);
|
|
18498
18563
|
};
|
|
@@ -18570,14 +18635,21 @@ var objectAssign = shouldUseNative() ? Object.assign : function(target, source)
|
|
|
18570
18635
|
return to;
|
|
18571
18636
|
};
|
|
18572
18637
|
/*!
|
|
18573
|
-
* @pixi/polyfill - v6.
|
|
18574
|
-
* Compiled Wed,
|
|
18638
|
+
* @pixi/polyfill - v6.3.0
|
|
18639
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
18575
18640
|
*
|
|
18576
18641
|
* @pixi/polyfill is licensed under the MIT License.
|
|
18577
18642
|
* http://www.opensource.org/licenses/mit-license
|
|
18578
18643
|
*/
|
|
18579
|
-
if (
|
|
18580
|
-
self
|
|
18644
|
+
if (typeof globalThis === "undefined") {
|
|
18645
|
+
if (typeof self !== "undefined") {
|
|
18646
|
+
self.globalThis = self;
|
|
18647
|
+
} else if (typeof global !== "undefined") {
|
|
18648
|
+
global.globalThis = global;
|
|
18649
|
+
}
|
|
18650
|
+
}
|
|
18651
|
+
if (!globalThis.Promise) {
|
|
18652
|
+
globalThis.Promise = Promise$1;
|
|
18581
18653
|
}
|
|
18582
18654
|
if (!Object.assign) {
|
|
18583
18655
|
Object.assign = objectAssign;
|
|
@@ -18588,24 +18660,24 @@ if (!(Date.now && Date.prototype.getTime)) {
|
|
|
18588
18660
|
return new Date().getTime();
|
|
18589
18661
|
};
|
|
18590
18662
|
}
|
|
18591
|
-
if (!(
|
|
18663
|
+
if (!(globalThis.performance && globalThis.performance.now)) {
|
|
18592
18664
|
var startTime_1 = Date.now();
|
|
18593
|
-
if (!
|
|
18594
|
-
|
|
18665
|
+
if (!globalThis.performance) {
|
|
18666
|
+
globalThis.performance = {};
|
|
18595
18667
|
}
|
|
18596
|
-
|
|
18668
|
+
globalThis.performance.now = function() {
|
|
18597
18669
|
return Date.now() - startTime_1;
|
|
18598
18670
|
};
|
|
18599
18671
|
}
|
|
18600
18672
|
var lastTime = Date.now();
|
|
18601
18673
|
var vendors = ["ms", "moz", "webkit", "o"];
|
|
18602
|
-
for (var x = 0; x < vendors.length && !
|
|
18674
|
+
for (var x = 0; x < vendors.length && !globalThis.requestAnimationFrame; ++x) {
|
|
18603
18675
|
var p = vendors[x];
|
|
18604
|
-
|
|
18605
|
-
|
|
18676
|
+
globalThis.requestAnimationFrame = globalThis[p + "RequestAnimationFrame"];
|
|
18677
|
+
globalThis.cancelAnimationFrame = globalThis[p + "CancelAnimationFrame"] || globalThis[p + "CancelRequestAnimationFrame"];
|
|
18606
18678
|
}
|
|
18607
|
-
if (!
|
|
18608
|
-
|
|
18679
|
+
if (!globalThis.requestAnimationFrame) {
|
|
18680
|
+
globalThis.requestAnimationFrame = function(callback) {
|
|
18609
18681
|
if (typeof callback !== "function") {
|
|
18610
18682
|
throw new TypeError(callback + "is not a function");
|
|
18611
18683
|
}
|
|
@@ -18615,14 +18687,14 @@ if (!self.requestAnimationFrame) {
|
|
|
18615
18687
|
delay = 0;
|
|
18616
18688
|
}
|
|
18617
18689
|
lastTime = currentTime;
|
|
18618
|
-
return self.setTimeout(function() {
|
|
18690
|
+
return globalThis.self.setTimeout(function() {
|
|
18619
18691
|
lastTime = Date.now();
|
|
18620
18692
|
callback(performance.now());
|
|
18621
18693
|
}, delay);
|
|
18622
18694
|
};
|
|
18623
18695
|
}
|
|
18624
|
-
if (!
|
|
18625
|
-
|
|
18696
|
+
if (!globalThis.cancelAnimationFrame) {
|
|
18697
|
+
globalThis.cancelAnimationFrame = function(id) {
|
|
18626
18698
|
return clearTimeout(id);
|
|
18627
18699
|
};
|
|
18628
18700
|
}
|
|
@@ -18640,27 +18712,27 @@ if (!Number.isInteger) {
|
|
|
18640
18712
|
return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
|
|
18641
18713
|
};
|
|
18642
18714
|
}
|
|
18643
|
-
if (!
|
|
18644
|
-
|
|
18715
|
+
if (!globalThis.ArrayBuffer) {
|
|
18716
|
+
globalThis.ArrayBuffer = Array;
|
|
18645
18717
|
}
|
|
18646
|
-
if (!
|
|
18647
|
-
|
|
18718
|
+
if (!globalThis.Float32Array) {
|
|
18719
|
+
globalThis.Float32Array = Array;
|
|
18648
18720
|
}
|
|
18649
|
-
if (!
|
|
18650
|
-
|
|
18721
|
+
if (!globalThis.Uint32Array) {
|
|
18722
|
+
globalThis.Uint32Array = Array;
|
|
18651
18723
|
}
|
|
18652
|
-
if (!
|
|
18653
|
-
|
|
18724
|
+
if (!globalThis.Uint16Array) {
|
|
18725
|
+
globalThis.Uint16Array = Array;
|
|
18654
18726
|
}
|
|
18655
|
-
if (!
|
|
18656
|
-
|
|
18727
|
+
if (!globalThis.Uint8Array) {
|
|
18728
|
+
globalThis.Uint8Array = Array;
|
|
18657
18729
|
}
|
|
18658
|
-
if (!
|
|
18659
|
-
|
|
18730
|
+
if (!globalThis.Int32Array) {
|
|
18731
|
+
globalThis.Int32Array = Array;
|
|
18660
18732
|
}
|
|
18661
18733
|
/*!
|
|
18662
|
-
* @pixi/display - v6.
|
|
18663
|
-
* Compiled Wed,
|
|
18734
|
+
* @pixi/display - v6.3.0
|
|
18735
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
18664
18736
|
*
|
|
18665
18737
|
* @pixi/display is licensed under the MIT License.
|
|
18666
18738
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -18953,6 +19025,8 @@ var DisplayObject = function(_super) {
|
|
|
18953
19025
|
_this.alpha = 1;
|
|
18954
19026
|
_this.visible = true;
|
|
18955
19027
|
_this.renderable = true;
|
|
19028
|
+
_this.cullable = false;
|
|
19029
|
+
_this.cullArea = null;
|
|
18956
19030
|
_this.parent = null;
|
|
18957
19031
|
_this.worldAlpha = 1;
|
|
18958
19032
|
_this._lastSortedIndex = 0;
|
|
@@ -19134,6 +19208,7 @@ var DisplayObject = function(_super) {
|
|
|
19134
19208
|
this.parent = null;
|
|
19135
19209
|
this._bounds = null;
|
|
19136
19210
|
this.mask = null;
|
|
19211
|
+
this.cullArea = null;
|
|
19137
19212
|
this.filters = null;
|
|
19138
19213
|
this.filterArea = null;
|
|
19139
19214
|
this.hitArea = null;
|
|
@@ -19322,8 +19397,8 @@ var TemporaryDisplayObject = function(_super) {
|
|
|
19322
19397
|
}(DisplayObject);
|
|
19323
19398
|
DisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform;
|
|
19324
19399
|
/*!
|
|
19325
|
-
* @pixi/constants - v6.
|
|
19326
|
-
* Compiled Wed,
|
|
19400
|
+
* @pixi/constants - v6.3.0
|
|
19401
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
19327
19402
|
*
|
|
19328
19403
|
* @pixi/constants is licensed under the MIT License.
|
|
19329
19404
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -19738,12 +19813,40 @@ var Container = function(_super) {
|
|
|
19738
19813
|
};
|
|
19739
19814
|
Container2.prototype._calculateBounds = function() {
|
|
19740
19815
|
};
|
|
19816
|
+
Container2.prototype._renderWithCulling = function(renderer) {
|
|
19817
|
+
var sourceFrame = renderer.renderTexture.sourceFrame;
|
|
19818
|
+
if (!(sourceFrame.width > 0 && sourceFrame.height > 0)) {
|
|
19819
|
+
return;
|
|
19820
|
+
}
|
|
19821
|
+
var bounds;
|
|
19822
|
+
var transform;
|
|
19823
|
+
if (this.cullArea) {
|
|
19824
|
+
bounds = this.cullArea;
|
|
19825
|
+
transform = this.worldTransform;
|
|
19826
|
+
} else if (this._render !== Container2.prototype._render) {
|
|
19827
|
+
bounds = this.getBounds(true);
|
|
19828
|
+
}
|
|
19829
|
+
if (bounds && sourceFrame.intersects(bounds, transform)) {
|
|
19830
|
+
this._render(renderer);
|
|
19831
|
+
} else if (this.cullArea) {
|
|
19832
|
+
return;
|
|
19833
|
+
}
|
|
19834
|
+
for (var i2 = 0, j2 = this.children.length; i2 < j2; ++i2) {
|
|
19835
|
+
var child = this.children[i2];
|
|
19836
|
+
var childCullable = child.cullable;
|
|
19837
|
+
child.cullable = childCullable || !this.cullArea;
|
|
19838
|
+
child.render(renderer);
|
|
19839
|
+
child.cullable = childCullable;
|
|
19840
|
+
}
|
|
19841
|
+
};
|
|
19741
19842
|
Container2.prototype.render = function(renderer) {
|
|
19742
19843
|
if (!this.visible || this.worldAlpha <= 0 || !this.renderable) {
|
|
19743
19844
|
return;
|
|
19744
19845
|
}
|
|
19745
19846
|
if (this._mask || this.filters && this.filters.length) {
|
|
19746
19847
|
this.renderAdvanced(renderer);
|
|
19848
|
+
} else if (this.cullable) {
|
|
19849
|
+
this._renderWithCulling(renderer);
|
|
19747
19850
|
} else {
|
|
19748
19851
|
this._render(renderer);
|
|
19749
19852
|
for (var i2 = 0, j2 = this.children.length; i2 < j2; ++i2) {
|
|
@@ -19775,9 +19878,13 @@ var Container = function(_super) {
|
|
|
19775
19878
|
if (mask) {
|
|
19776
19879
|
renderer.mask.push(this, this._mask);
|
|
19777
19880
|
}
|
|
19778
|
-
this.
|
|
19779
|
-
|
|
19780
|
-
|
|
19881
|
+
if (this.cullable) {
|
|
19882
|
+
this._renderWithCulling(renderer);
|
|
19883
|
+
} else {
|
|
19884
|
+
this._render(renderer);
|
|
19885
|
+
for (var i2 = 0, j2 = this.children.length; i2 < j2; ++i2) {
|
|
19886
|
+
this.children[i2].render(renderer);
|
|
19887
|
+
}
|
|
19781
19888
|
}
|
|
19782
19889
|
if (flush) {
|
|
19783
19890
|
renderer.batch.flush();
|
|
@@ -19838,8 +19945,8 @@ var Container = function(_super) {
|
|
|
19838
19945
|
}(DisplayObject);
|
|
19839
19946
|
Container.prototype.containerUpdateTransform = Container.prototype.updateTransform;
|
|
19840
19947
|
/*!
|
|
19841
|
-
* @pixi/accessibility - v6.
|
|
19842
|
-
* Compiled Wed,
|
|
19948
|
+
* @pixi/accessibility - v6.3.0
|
|
19949
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
19843
19950
|
*
|
|
19844
19951
|
* @pixi/accessibility is licensed under the MIT License.
|
|
19845
19952
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -19891,7 +19998,7 @@ var AccessibilityManager = function() {
|
|
|
19891
19998
|
this.renderer = renderer;
|
|
19892
19999
|
this._onKeyDown = this._onKeyDown.bind(this);
|
|
19893
20000
|
this._onMouseMove = this._onMouseMove.bind(this);
|
|
19894
|
-
|
|
20001
|
+
globalThis.addEventListener("keydown", this._onKeyDown, false);
|
|
19895
20002
|
}
|
|
19896
20003
|
Object.defineProperty(AccessibilityManager2.prototype, "isActive", {
|
|
19897
20004
|
get: function() {
|
|
@@ -19939,8 +20046,8 @@ var AccessibilityManager = function() {
|
|
|
19939
20046
|
return;
|
|
19940
20047
|
}
|
|
19941
20048
|
this._isActive = true;
|
|
19942
|
-
|
|
19943
|
-
|
|
20049
|
+
globalThis.document.addEventListener("mousemove", this._onMouseMove, true);
|
|
20050
|
+
globalThis.removeEventListener("keydown", this._onKeyDown, false);
|
|
19944
20051
|
this.renderer.on("postrender", this.update, this);
|
|
19945
20052
|
(_a3 = this.renderer.view.parentNode) === null || _a3 === void 0 ? void 0 : _a3.appendChild(this.div);
|
|
19946
20053
|
};
|
|
@@ -19950,8 +20057,8 @@ var AccessibilityManager = function() {
|
|
|
19950
20057
|
return;
|
|
19951
20058
|
}
|
|
19952
20059
|
this._isActive = false;
|
|
19953
|
-
|
|
19954
|
-
|
|
20060
|
+
globalThis.document.removeEventListener("mousemove", this._onMouseMove, true);
|
|
20061
|
+
globalThis.addEventListener("keydown", this._onKeyDown, false);
|
|
19955
20062
|
this.renderer.off("postrender", this.update);
|
|
19956
20063
|
(_a3 = this.div.parentNode) === null || _a3 === void 0 ? void 0 : _a3.removeChild(this.div);
|
|
19957
20064
|
};
|
|
@@ -20141,8 +20248,8 @@ var AccessibilityManager = function() {
|
|
|
20141
20248
|
AccessibilityManager2.prototype.destroy = function() {
|
|
20142
20249
|
this.destroyTouchHook();
|
|
20143
20250
|
this.div = null;
|
|
20144
|
-
|
|
20145
|
-
|
|
20251
|
+
globalThis.document.removeEventListener("mousemove", this._onMouseMove, true);
|
|
20252
|
+
globalThis.removeEventListener("keydown", this._onKeyDown);
|
|
20146
20253
|
this.pool = null;
|
|
20147
20254
|
this.children = null;
|
|
20148
20255
|
this.renderer = null;
|
|
@@ -20150,8 +20257,8 @@ var AccessibilityManager = function() {
|
|
|
20150
20257
|
return AccessibilityManager2;
|
|
20151
20258
|
}();
|
|
20152
20259
|
/*!
|
|
20153
|
-
* @pixi/interaction - v6.
|
|
20154
|
-
* Compiled Wed,
|
|
20260
|
+
* @pixi/interaction - v6.3.0
|
|
20261
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
20155
20262
|
*
|
|
20156
20263
|
* @pixi/interaction is licensed under the MIT License.
|
|
20157
20264
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -20466,9 +20573,9 @@ var InteractionManager = function(_super) {
|
|
|
20466
20573
|
_this.moveWhenInside = false;
|
|
20467
20574
|
_this.eventsAdded = false;
|
|
20468
20575
|
_this.tickerAdded = false;
|
|
20469
|
-
_this.mouseOverRenderer = !("PointerEvent" in
|
|
20470
|
-
_this.supportsTouchEvents = "ontouchstart" in
|
|
20471
|
-
_this.supportsPointerEvents = !!
|
|
20576
|
+
_this.mouseOverRenderer = !("PointerEvent" in globalThis);
|
|
20577
|
+
_this.supportsTouchEvents = "ontouchstart" in globalThis;
|
|
20578
|
+
_this.supportsPointerEvents = !!globalThis.PointerEvent;
|
|
20472
20579
|
_this.onPointerUp = _this.onPointerUp.bind(_this);
|
|
20473
20580
|
_this.processPointerUp = _this.processPointerUp.bind(_this);
|
|
20474
20581
|
_this.onPointerCancel = _this.onPointerCancel.bind(_this);
|
|
@@ -20556,25 +20663,25 @@ var InteractionManager = function(_super) {
|
|
|
20556
20663
|
return;
|
|
20557
20664
|
}
|
|
20558
20665
|
var style = this.interactionDOMElement.style;
|
|
20559
|
-
if (
|
|
20666
|
+
if (globalThis.navigator.msPointerEnabled) {
|
|
20560
20667
|
style.msContentZooming = "none";
|
|
20561
20668
|
style.msTouchAction = "none";
|
|
20562
20669
|
} else if (this.supportsPointerEvents) {
|
|
20563
20670
|
style.touchAction = "none";
|
|
20564
20671
|
}
|
|
20565
20672
|
if (this.supportsPointerEvents) {
|
|
20566
|
-
|
|
20673
|
+
globalThis.document.addEventListener("pointermove", this.onPointerMove, this._eventListenerOptions);
|
|
20567
20674
|
this.interactionDOMElement.addEventListener("pointerdown", this.onPointerDown, this._eventListenerOptions);
|
|
20568
20675
|
this.interactionDOMElement.addEventListener("pointerleave", this.onPointerOut, this._eventListenerOptions);
|
|
20569
20676
|
this.interactionDOMElement.addEventListener("pointerover", this.onPointerOver, this._eventListenerOptions);
|
|
20570
|
-
|
|
20571
|
-
|
|
20677
|
+
globalThis.addEventListener("pointercancel", this.onPointerCancel, this._eventListenerOptions);
|
|
20678
|
+
globalThis.addEventListener("pointerup", this.onPointerUp, this._eventListenerOptions);
|
|
20572
20679
|
} else {
|
|
20573
|
-
|
|
20680
|
+
globalThis.document.addEventListener("mousemove", this.onPointerMove, this._eventListenerOptions);
|
|
20574
20681
|
this.interactionDOMElement.addEventListener("mousedown", this.onPointerDown, this._eventListenerOptions);
|
|
20575
20682
|
this.interactionDOMElement.addEventListener("mouseout", this.onPointerOut, this._eventListenerOptions);
|
|
20576
20683
|
this.interactionDOMElement.addEventListener("mouseover", this.onPointerOver, this._eventListenerOptions);
|
|
20577
|
-
|
|
20684
|
+
globalThis.addEventListener("mouseup", this.onPointerUp, this._eventListenerOptions);
|
|
20578
20685
|
}
|
|
20579
20686
|
if (this.supportsTouchEvents) {
|
|
20580
20687
|
this.interactionDOMElement.addEventListener("touchstart", this.onPointerDown, this._eventListenerOptions);
|
|
@@ -20589,25 +20696,25 @@ var InteractionManager = function(_super) {
|
|
|
20589
20696
|
return;
|
|
20590
20697
|
}
|
|
20591
20698
|
var style = this.interactionDOMElement.style;
|
|
20592
|
-
if (
|
|
20699
|
+
if (globalThis.navigator.msPointerEnabled) {
|
|
20593
20700
|
style.msContentZooming = "";
|
|
20594
20701
|
style.msTouchAction = "";
|
|
20595
20702
|
} else if (this.supportsPointerEvents) {
|
|
20596
20703
|
style.touchAction = "";
|
|
20597
20704
|
}
|
|
20598
20705
|
if (this.supportsPointerEvents) {
|
|
20599
|
-
|
|
20706
|
+
globalThis.document.removeEventListener("pointermove", this.onPointerMove, this._eventListenerOptions);
|
|
20600
20707
|
this.interactionDOMElement.removeEventListener("pointerdown", this.onPointerDown, this._eventListenerOptions);
|
|
20601
20708
|
this.interactionDOMElement.removeEventListener("pointerleave", this.onPointerOut, this._eventListenerOptions);
|
|
20602
20709
|
this.interactionDOMElement.removeEventListener("pointerover", this.onPointerOver, this._eventListenerOptions);
|
|
20603
|
-
|
|
20604
|
-
|
|
20710
|
+
globalThis.removeEventListener("pointercancel", this.onPointerCancel, this._eventListenerOptions);
|
|
20711
|
+
globalThis.removeEventListener("pointerup", this.onPointerUp, this._eventListenerOptions);
|
|
20605
20712
|
} else {
|
|
20606
|
-
|
|
20713
|
+
globalThis.document.removeEventListener("mousemove", this.onPointerMove, this._eventListenerOptions);
|
|
20607
20714
|
this.interactionDOMElement.removeEventListener("mousedown", this.onPointerDown, this._eventListenerOptions);
|
|
20608
20715
|
this.interactionDOMElement.removeEventListener("mouseout", this.onPointerOut, this._eventListenerOptions);
|
|
20609
20716
|
this.interactionDOMElement.removeEventListener("mouseover", this.onPointerOver, this._eventListenerOptions);
|
|
20610
|
-
|
|
20717
|
+
globalThis.removeEventListener("mouseup", this.onPointerUp, this._eventListenerOptions);
|
|
20611
20718
|
}
|
|
20612
20719
|
if (this.supportsTouchEvents) {
|
|
20613
20720
|
this.interactionDOMElement.removeEventListener("touchstart", this.onPointerDown, this._eventListenerOptions);
|
|
@@ -20649,7 +20756,7 @@ var InteractionManager = function(_super) {
|
|
|
20649
20756
|
InteractionManager2.prototype.setCursorMode = function(mode) {
|
|
20650
20757
|
mode = mode || "default";
|
|
20651
20758
|
var applyStyles = true;
|
|
20652
|
-
if (
|
|
20759
|
+
if (globalThis.OffscreenCanvas && this.interactionDOMElement instanceof OffscreenCanvas) {
|
|
20653
20760
|
applyStyles = false;
|
|
20654
20761
|
}
|
|
20655
20762
|
if (this.currentCursorMode === mode) {
|
|
@@ -21067,7 +21174,7 @@ var InteractionManager = function(_super) {
|
|
|
21067
21174
|
touch.isNormalized = true;
|
|
21068
21175
|
normalizedEvents.push(touch);
|
|
21069
21176
|
}
|
|
21070
|
-
} else if (!
|
|
21177
|
+
} else if (!globalThis.MouseEvent || event instanceof MouseEvent && (!this.supportsPointerEvents || !(event instanceof globalThis.PointerEvent))) {
|
|
21071
21178
|
var tempEvent = event;
|
|
21072
21179
|
if (typeof tempEvent.isPrimary === "undefined") {
|
|
21073
21180
|
tempEvent.isPrimary = true;
|
|
@@ -21130,8 +21237,8 @@ var InteractionManager = function(_super) {
|
|
|
21130
21237
|
return InteractionManager2;
|
|
21131
21238
|
}(EventEmitter$3);
|
|
21132
21239
|
/*!
|
|
21133
|
-
* @pixi/app - v6.
|
|
21134
|
-
* Compiled Wed,
|
|
21240
|
+
* @pixi/app - v6.3.0
|
|
21241
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
21135
21242
|
*
|
|
21136
21243
|
* @pixi/app is licensed under the MIT License.
|
|
21137
21244
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -21190,10 +21297,10 @@ var ResizePlugin = function() {
|
|
|
21190
21297
|
var _this = this;
|
|
21191
21298
|
Object.defineProperty(this, "resizeTo", {
|
|
21192
21299
|
set: function(dom) {
|
|
21193
|
-
|
|
21300
|
+
globalThis.removeEventListener("resize", this.queueResize);
|
|
21194
21301
|
this._resizeTo = dom;
|
|
21195
21302
|
if (dom) {
|
|
21196
|
-
|
|
21303
|
+
globalThis.addEventListener("resize", this.queueResize);
|
|
21197
21304
|
this.resize();
|
|
21198
21305
|
}
|
|
21199
21306
|
},
|
|
@@ -21223,9 +21330,9 @@ var ResizePlugin = function() {
|
|
|
21223
21330
|
_this.cancelResize();
|
|
21224
21331
|
var width;
|
|
21225
21332
|
var height;
|
|
21226
|
-
if (_this._resizeTo ===
|
|
21227
|
-
width =
|
|
21228
|
-
height =
|
|
21333
|
+
if (_this._resizeTo === globalThis.window) {
|
|
21334
|
+
width = globalThis.innerWidth;
|
|
21335
|
+
height = globalThis.innerHeight;
|
|
21229
21336
|
} else {
|
|
21230
21337
|
var _a3 = _this._resizeTo, clientWidth = _a3.clientWidth, clientHeight = _a3.clientHeight;
|
|
21231
21338
|
width = clientWidth;
|
|
@@ -21238,7 +21345,7 @@ var ResizePlugin = function() {
|
|
|
21238
21345
|
this.resizeTo = options.resizeTo || null;
|
|
21239
21346
|
};
|
|
21240
21347
|
ResizePlugin2.destroy = function() {
|
|
21241
|
-
|
|
21348
|
+
globalThis.removeEventListener("resize", this.queueResize);
|
|
21242
21349
|
this.cancelResize();
|
|
21243
21350
|
this.cancelResize = null;
|
|
21244
21351
|
this.queueResize = null;
|
|
@@ -21249,8 +21356,8 @@ var ResizePlugin = function() {
|
|
|
21249
21356
|
}();
|
|
21250
21357
|
Application.registerPlugin(ResizePlugin);
|
|
21251
21358
|
/*!
|
|
21252
|
-
* @pixi/extract - v6.
|
|
21253
|
-
* Compiled Wed,
|
|
21359
|
+
* @pixi/extract - v6.3.0
|
|
21360
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
21254
21361
|
*
|
|
21255
21362
|
* @pixi/extract is licensed under the MIT License.
|
|
21256
21363
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -21374,8 +21481,8 @@ var Extract = function() {
|
|
|
21374
21481
|
return Extract2;
|
|
21375
21482
|
}();
|
|
21376
21483
|
/*!
|
|
21377
|
-
* @pixi/compressed-textures - v6.
|
|
21378
|
-
* Compiled Wed,
|
|
21484
|
+
* @pixi/compressed-textures - v6.3.0
|
|
21485
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
21379
21486
|
*
|
|
21380
21487
|
* @pixi/compressed-textures is licensed under the MIT License.
|
|
21381
21488
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -22088,8 +22195,8 @@ var KTX_FIELDS = {
|
|
|
22088
22195
|
BYTES_OF_KEY_VALUE_DATA: 60
|
|
22089
22196
|
};
|
|
22090
22197
|
var FILE_HEADER_SIZE = 64;
|
|
22091
|
-
var TYPES_TO_BYTES_PER_COMPONENT = (_a$2 = {}, _a$2[TYPES$3.UNSIGNED_BYTE] = 1, _a$2[TYPES$3.UNSIGNED_SHORT] = 2, _a$2[TYPES$3.FLOAT] = 4, _a$2[TYPES$3.HALF_FLOAT] = 8, _a$2);
|
|
22092
|
-
var FORMATS_TO_COMPONENTS = (_b$1 = {}, _b$1[FORMATS$3.RGBA] = 4, _b$1[FORMATS$3.RGB] = 3, _b$1[FORMATS$3.LUMINANCE] = 1, _b$1[FORMATS$3.LUMINANCE_ALPHA] = 2, _b$1[FORMATS$3.ALPHA] = 1, _b$1);
|
|
22198
|
+
var TYPES_TO_BYTES_PER_COMPONENT = (_a$2 = {}, _a$2[TYPES$3.UNSIGNED_BYTE] = 1, _a$2[TYPES$3.UNSIGNED_SHORT] = 2, _a$2[TYPES$3.INT] = 4, _a$2[TYPES$3.UNSIGNED_INT] = 4, _a$2[TYPES$3.FLOAT] = 4, _a$2[TYPES$3.HALF_FLOAT] = 8, _a$2);
|
|
22199
|
+
var FORMATS_TO_COMPONENTS = (_b$1 = {}, _b$1[FORMATS$3.RGBA] = 4, _b$1[FORMATS$3.RGB] = 3, _b$1[FORMATS$3.RG] = 2, _b$1[FORMATS$3.RED] = 1, _b$1[FORMATS$3.LUMINANCE] = 1, _b$1[FORMATS$3.LUMINANCE_ALPHA] = 2, _b$1[FORMATS$3.ALPHA] = 1, _b$1);
|
|
22093
22200
|
var TYPES_TO_BYTES_PER_PIXEL = (_c = {}, _c[TYPES$3.UNSIGNED_SHORT_4_4_4_4] = 2, _c[TYPES$3.UNSIGNED_SHORT_5_5_5_1] = 2, _c[TYPES$3.UNSIGNED_SHORT_5_6_5] = 2, _c);
|
|
22094
22201
|
var KTXLoader = function() {
|
|
22095
22202
|
function KTXLoader2() {
|
|
@@ -22097,8 +22204,31 @@ var KTXLoader = function() {
|
|
|
22097
22204
|
KTXLoader2.use = function(resource, next) {
|
|
22098
22205
|
if (resource.extension === "ktx" && resource.data) {
|
|
22099
22206
|
try {
|
|
22100
|
-
var
|
|
22101
|
-
|
|
22207
|
+
var url_1 = resource.name || resource.url;
|
|
22208
|
+
var _a3 = KTXLoader2.parse(url_1, resource.data), compressed = _a3.compressed, uncompressed = _a3.uncompressed;
|
|
22209
|
+
if (compressed) {
|
|
22210
|
+
Object.assign(resource, registerCompressedTextures(url_1, compressed, resource.metadata));
|
|
22211
|
+
} else if (uncompressed) {
|
|
22212
|
+
var textures_1 = {};
|
|
22213
|
+
uncompressed.forEach(function(image, i2) {
|
|
22214
|
+
var texture = new Texture(new BaseTexture(image.resource, {
|
|
22215
|
+
mipmap: MIPMAP_MODES$3.OFF,
|
|
22216
|
+
alphaMode: ALPHA_MODES$3.NO_PREMULTIPLIED_ALPHA,
|
|
22217
|
+
type: image.type,
|
|
22218
|
+
format: image.format
|
|
22219
|
+
}));
|
|
22220
|
+
var cacheID = url_1 + "-" + (i2 + 1);
|
|
22221
|
+
BaseTexture.addToCache(texture.baseTexture, cacheID);
|
|
22222
|
+
Texture.addToCache(texture, cacheID);
|
|
22223
|
+
if (i2 === 0) {
|
|
22224
|
+
textures_1[url_1] = texture;
|
|
22225
|
+
BaseTexture.addToCache(texture.baseTexture, url_1);
|
|
22226
|
+
Texture.addToCache(texture, url_1);
|
|
22227
|
+
}
|
|
22228
|
+
textures_1[cacheID] = texture;
|
|
22229
|
+
});
|
|
22230
|
+
Object.assign(resource, { textures: textures_1 });
|
|
22231
|
+
}
|
|
22102
22232
|
} catch (err) {
|
|
22103
22233
|
next(err);
|
|
22104
22234
|
return;
|
|
@@ -22170,8 +22300,8 @@ var KTXLoader = function() {
|
|
|
22170
22300
|
}
|
|
22171
22301
|
mips[mipmapLevel] = {
|
|
22172
22302
|
levelID: mipmapLevel,
|
|
22173
|
-
levelWidth: numberOfMipmapLevels > 1 ? mipWidth : alignedMipWidth,
|
|
22174
|
-
levelHeight: numberOfMipmapLevels > 1 ? mipHeight : alignedMipHeight,
|
|
22303
|
+
levelWidth: numberOfMipmapLevels > 1 || glType !== 0 ? mipWidth : alignedMipWidth,
|
|
22304
|
+
levelHeight: numberOfMipmapLevels > 1 || glType !== 0 ? mipHeight : alignedMipHeight,
|
|
22175
22305
|
levelBuffer: new Uint8Array(arrayBuffer, elementOffset, mipByteSize)
|
|
22176
22306
|
};
|
|
22177
22307
|
elementOffset += mipByteSize;
|
|
@@ -22185,17 +22315,41 @@ var KTXLoader = function() {
|
|
|
22185
22315
|
mipByteSize = alignedMipWidth * alignedMipHeight * imagePixelByteSize;
|
|
22186
22316
|
}
|
|
22187
22317
|
if (glType !== 0) {
|
|
22188
|
-
|
|
22189
|
-
|
|
22190
|
-
|
|
22191
|
-
|
|
22192
|
-
|
|
22193
|
-
|
|
22194
|
-
|
|
22195
|
-
|
|
22196
|
-
|
|
22197
|
-
|
|
22198
|
-
|
|
22318
|
+
return {
|
|
22319
|
+
uncompressed: imageBuffers.map(function(levelBuffers) {
|
|
22320
|
+
var buffer = levelBuffers[0].levelBuffer;
|
|
22321
|
+
var convertToInt = false;
|
|
22322
|
+
if (glType === TYPES$3.FLOAT) {
|
|
22323
|
+
buffer = new Float32Array(levelBuffers[0].levelBuffer.buffer, levelBuffers[0].levelBuffer.byteOffset, levelBuffers[0].levelBuffer.byteLength / 4);
|
|
22324
|
+
} else if (glType === TYPES$3.UNSIGNED_INT) {
|
|
22325
|
+
convertToInt = true;
|
|
22326
|
+
buffer = new Uint32Array(levelBuffers[0].levelBuffer.buffer, levelBuffers[0].levelBuffer.byteOffset, levelBuffers[0].levelBuffer.byteLength / 4);
|
|
22327
|
+
} else if (glType === TYPES$3.INT) {
|
|
22328
|
+
convertToInt = true;
|
|
22329
|
+
buffer = new Int32Array(levelBuffers[0].levelBuffer.buffer, levelBuffers[0].levelBuffer.byteOffset, levelBuffers[0].levelBuffer.byteLength / 4);
|
|
22330
|
+
}
|
|
22331
|
+
return {
|
|
22332
|
+
resource: new BufferResource(buffer, {
|
|
22333
|
+
width: levelBuffers[0].levelWidth,
|
|
22334
|
+
height: levelBuffers[0].levelHeight
|
|
22335
|
+
}),
|
|
22336
|
+
type: glType,
|
|
22337
|
+
format: convertToInt ? KTXLoader2.convertFormatToInteger(glFormat) : glFormat
|
|
22338
|
+
};
|
|
22339
|
+
})
|
|
22340
|
+
};
|
|
22341
|
+
}
|
|
22342
|
+
return {
|
|
22343
|
+
compressed: imageBuffers.map(function(levelBuffers) {
|
|
22344
|
+
return new CompressedTextureResource(null, {
|
|
22345
|
+
format: glInternalFormat,
|
|
22346
|
+
width: pixelWidth,
|
|
22347
|
+
height: pixelHeight,
|
|
22348
|
+
levels: numberOfMipmapLevels,
|
|
22349
|
+
levelBuffers
|
|
22350
|
+
});
|
|
22351
|
+
})
|
|
22352
|
+
};
|
|
22199
22353
|
};
|
|
22200
22354
|
KTXLoader2.validate = function(url2, dataView) {
|
|
22201
22355
|
for (var i2 = 0; i2 < FILE_IDENTIFIER.length; i2++) {
|
|
@@ -22206,11 +22360,25 @@ var KTXLoader = function() {
|
|
|
22206
22360
|
}
|
|
22207
22361
|
return true;
|
|
22208
22362
|
};
|
|
22363
|
+
KTXLoader2.convertFormatToInteger = function(format2) {
|
|
22364
|
+
switch (format2) {
|
|
22365
|
+
case FORMATS$3.RGBA:
|
|
22366
|
+
return FORMATS$3.RGBA_INTEGER;
|
|
22367
|
+
case FORMATS$3.RGB:
|
|
22368
|
+
return FORMATS$3.RGB_INTEGER;
|
|
22369
|
+
case FORMATS$3.RG:
|
|
22370
|
+
return FORMATS$3.RG_INTEGER;
|
|
22371
|
+
case FORMATS$3.RED:
|
|
22372
|
+
return FORMATS$3.RED_INTEGER;
|
|
22373
|
+
default:
|
|
22374
|
+
return format2;
|
|
22375
|
+
}
|
|
22376
|
+
};
|
|
22209
22377
|
return KTXLoader2;
|
|
22210
22378
|
}();
|
|
22211
22379
|
/*!
|
|
22212
|
-
* @pixi/particle-container - v6.
|
|
22213
|
-
* Compiled Wed,
|
|
22380
|
+
* @pixi/particle-container - v6.3.0
|
|
22381
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
22214
22382
|
*
|
|
22215
22383
|
* @pixi/particle-container is licensed under the MIT License.
|
|
22216
22384
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -22658,8 +22826,8 @@ var ParticleRenderer = function(_super) {
|
|
|
22658
22826
|
return ParticleRenderer2;
|
|
22659
22827
|
}(ObjectRenderer);
|
|
22660
22828
|
/*!
|
|
22661
|
-
* @pixi/graphics - v6.
|
|
22662
|
-
* Compiled Wed,
|
|
22829
|
+
* @pixi/graphics - v6.3.0
|
|
22830
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
22663
22831
|
*
|
|
22664
22832
|
* @pixi/graphics is licensed under the MIT License.
|
|
22665
22833
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -22762,6 +22930,35 @@ function __extends$l(d2, b2) {
|
|
|
22762
22930
|
}
|
|
22763
22931
|
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
22764
22932
|
}
|
|
22933
|
+
function fixOrientation(points, hole) {
|
|
22934
|
+
var _a3, _b3;
|
|
22935
|
+
if (hole === void 0) {
|
|
22936
|
+
hole = false;
|
|
22937
|
+
}
|
|
22938
|
+
var m2 = points.length;
|
|
22939
|
+
if (m2 < 6) {
|
|
22940
|
+
return;
|
|
22941
|
+
}
|
|
22942
|
+
var area2 = 0;
|
|
22943
|
+
for (var i2 = 0, x1 = points[m2 - 2], y1 = points[m2 - 1]; i2 < m2; i2 += 2) {
|
|
22944
|
+
var x2 = points[i2];
|
|
22945
|
+
var y2 = points[i2 + 1];
|
|
22946
|
+
area2 += (x2 - x1) * (y2 + y1);
|
|
22947
|
+
x1 = x2;
|
|
22948
|
+
y1 = y2;
|
|
22949
|
+
}
|
|
22950
|
+
if (!hole && area2 > 0 || hole && area2 <= 0) {
|
|
22951
|
+
var n = m2 / 2;
|
|
22952
|
+
for (var i2 = n + n % 2; i2 < m2; i2 += 2) {
|
|
22953
|
+
var i1 = m2 - i2 - 2;
|
|
22954
|
+
var i22 = m2 - i2 - 1;
|
|
22955
|
+
var i3 = i2;
|
|
22956
|
+
var i4 = i2 + 1;
|
|
22957
|
+
_a3 = [points[i3], points[i1]], points[i1] = _a3[0], points[i3] = _a3[1];
|
|
22958
|
+
_b3 = [points[i4], points[i22]], points[i22] = _b3[0], points[i4] = _b3[1];
|
|
22959
|
+
}
|
|
22960
|
+
}
|
|
22961
|
+
}
|
|
22765
22962
|
var buildPoly = {
|
|
22766
22963
|
build: function(graphicsData) {
|
|
22767
22964
|
graphicsData.points = graphicsData.shape.points.slice();
|
|
@@ -22772,9 +22969,11 @@ var buildPoly = {
|
|
|
22772
22969
|
var verts = graphicsGeometry.points;
|
|
22773
22970
|
var indices2 = graphicsGeometry.indices;
|
|
22774
22971
|
if (points.length >= 6) {
|
|
22972
|
+
fixOrientation(points, false);
|
|
22775
22973
|
var holeArray = [];
|
|
22776
22974
|
for (var i2 = 0; i2 < holes.length; i2++) {
|
|
22777
22975
|
var hole = holes[i2];
|
|
22976
|
+
fixOrientation(hole.points, true);
|
|
22778
22977
|
holeArray.push(points.length / 2);
|
|
22779
22978
|
points = points.concat(hole.points);
|
|
22780
22979
|
}
|
|
@@ -22796,31 +22995,107 @@ var buildPoly = {
|
|
|
22796
22995
|
};
|
|
22797
22996
|
var buildCircle = {
|
|
22798
22997
|
build: function(graphicsData) {
|
|
22799
|
-
var circleData = graphicsData.shape;
|
|
22800
22998
|
var points = graphicsData.points;
|
|
22801
|
-
var x
|
|
22802
|
-
var y2
|
|
22803
|
-
var
|
|
22804
|
-
var
|
|
22805
|
-
|
|
22999
|
+
var x;
|
|
23000
|
+
var y2;
|
|
23001
|
+
var dx;
|
|
23002
|
+
var dy;
|
|
23003
|
+
var rx;
|
|
23004
|
+
var ry;
|
|
22806
23005
|
if (graphicsData.type === SHAPES.CIRC) {
|
|
22807
|
-
|
|
22808
|
-
|
|
23006
|
+
var circle = graphicsData.shape;
|
|
23007
|
+
x = circle.x;
|
|
23008
|
+
y2 = circle.y;
|
|
23009
|
+
rx = ry = circle.radius;
|
|
23010
|
+
dx = dy = 0;
|
|
23011
|
+
} else if (graphicsData.type === SHAPES.ELIP) {
|
|
23012
|
+
var ellipse = graphicsData.shape;
|
|
23013
|
+
x = ellipse.x;
|
|
23014
|
+
y2 = ellipse.y;
|
|
23015
|
+
rx = ellipse.width;
|
|
23016
|
+
ry = ellipse.height;
|
|
23017
|
+
dx = dy = 0;
|
|
22809
23018
|
} else {
|
|
22810
|
-
var
|
|
22811
|
-
|
|
22812
|
-
|
|
23019
|
+
var roundedRect = graphicsData.shape;
|
|
23020
|
+
var halfWidth = roundedRect.width / 2;
|
|
23021
|
+
var halfHeight = roundedRect.height / 2;
|
|
23022
|
+
x = roundedRect.x + halfWidth;
|
|
23023
|
+
y2 = roundedRect.y + halfHeight;
|
|
23024
|
+
rx = ry = Math.max(0, Math.min(roundedRect.radius, Math.min(halfWidth, halfHeight)));
|
|
23025
|
+
dx = halfWidth - rx;
|
|
23026
|
+
dy = halfHeight - ry;
|
|
23027
|
+
}
|
|
23028
|
+
var n = Math.ceil(2.3 * Math.sqrt(rx + ry));
|
|
23029
|
+
var m2 = n * 8 + (dx ? 4 : 0) + (dy ? 4 : 0);
|
|
23030
|
+
points.length = m2;
|
|
23031
|
+
if (m2 === 0) {
|
|
23032
|
+
return;
|
|
22813
23033
|
}
|
|
22814
|
-
if (
|
|
23034
|
+
if (n === 0) {
|
|
23035
|
+
points.length = 8;
|
|
23036
|
+
points[0] = points[6] = x + dx;
|
|
23037
|
+
points[1] = points[3] = y2 + dy;
|
|
23038
|
+
points[2] = points[4] = x - dx;
|
|
23039
|
+
points[5] = points[7] = y2 - dy;
|
|
22815
23040
|
return;
|
|
22816
23041
|
}
|
|
22817
|
-
var
|
|
22818
|
-
|
|
22819
|
-
var
|
|
22820
|
-
|
|
22821
|
-
|
|
23042
|
+
var j1 = 0;
|
|
23043
|
+
var j2 = n * 4 + (dx ? 2 : 0) + 2;
|
|
23044
|
+
var j3 = j2;
|
|
23045
|
+
var j4 = m2;
|
|
23046
|
+
{
|
|
23047
|
+
var x0 = dx + rx;
|
|
23048
|
+
var y0 = dy;
|
|
23049
|
+
var x1 = x + x0;
|
|
23050
|
+
var x2 = x - x0;
|
|
23051
|
+
var y1 = y2 + y0;
|
|
23052
|
+
points[j1++] = x1;
|
|
23053
|
+
points[j1++] = y1;
|
|
23054
|
+
points[--j2] = y1;
|
|
23055
|
+
points[--j2] = x2;
|
|
23056
|
+
if (dy) {
|
|
23057
|
+
var y22 = y2 - y0;
|
|
23058
|
+
points[j3++] = x2;
|
|
23059
|
+
points[j3++] = y22;
|
|
23060
|
+
points[--j4] = y22;
|
|
23061
|
+
points[--j4] = x1;
|
|
23062
|
+
}
|
|
23063
|
+
}
|
|
23064
|
+
for (var i2 = 1; i2 < n; i2++) {
|
|
23065
|
+
var a2 = Math.PI / 2 * (i2 / n);
|
|
23066
|
+
var x0 = dx + Math.cos(a2) * rx;
|
|
23067
|
+
var y0 = dy + Math.sin(a2) * ry;
|
|
23068
|
+
var x1 = x + x0;
|
|
23069
|
+
var x2 = x - x0;
|
|
23070
|
+
var y1 = y2 + y0;
|
|
23071
|
+
var y22 = y2 - y0;
|
|
23072
|
+
points[j1++] = x1;
|
|
23073
|
+
points[j1++] = y1;
|
|
23074
|
+
points[--j2] = y1;
|
|
23075
|
+
points[--j2] = x2;
|
|
23076
|
+
points[j3++] = x2;
|
|
23077
|
+
points[j3++] = y22;
|
|
23078
|
+
points[--j4] = y22;
|
|
23079
|
+
points[--j4] = x1;
|
|
23080
|
+
}
|
|
23081
|
+
{
|
|
23082
|
+
var x0 = dx;
|
|
23083
|
+
var y0 = dy + ry;
|
|
23084
|
+
var x1 = x + x0;
|
|
23085
|
+
var x2 = x - x0;
|
|
23086
|
+
var y1 = y2 + y0;
|
|
23087
|
+
var y22 = y2 - y0;
|
|
23088
|
+
points[j1++] = x1;
|
|
23089
|
+
points[j1++] = y1;
|
|
23090
|
+
points[--j4] = y22;
|
|
23091
|
+
points[--j4] = x1;
|
|
23092
|
+
if (dx) {
|
|
23093
|
+
points[j1++] = x2;
|
|
23094
|
+
points[j1++] = y1;
|
|
23095
|
+
points[--j4] = y22;
|
|
23096
|
+
points[--j4] = x2;
|
|
23097
|
+
}
|
|
22822
23098
|
}
|
|
22823
|
-
points.push(points[0], points[1]);
|
|
22824
23099
|
},
|
|
22825
23100
|
triangulate: function(graphicsData, graphicsGeometry) {
|
|
22826
23101
|
var points = graphicsData.points;
|
|
@@ -22828,15 +23103,26 @@ var buildCircle = {
|
|
|
22828
23103
|
var indices2 = graphicsGeometry.indices;
|
|
22829
23104
|
var vertPos = verts.length / 2;
|
|
22830
23105
|
var center = vertPos;
|
|
22831
|
-
var
|
|
23106
|
+
var x;
|
|
23107
|
+
var y2;
|
|
23108
|
+
if (graphicsData.type !== SHAPES.RREC) {
|
|
23109
|
+
var circle = graphicsData.shape;
|
|
23110
|
+
x = circle.x;
|
|
23111
|
+
y2 = circle.y;
|
|
23112
|
+
} else {
|
|
23113
|
+
var roundedRect = graphicsData.shape;
|
|
23114
|
+
x = roundedRect.x + roundedRect.width / 2;
|
|
23115
|
+
y2 = roundedRect.y + roundedRect.height / 2;
|
|
23116
|
+
}
|
|
22832
23117
|
var matrix = graphicsData.matrix;
|
|
22833
|
-
var x = circle.x;
|
|
22834
|
-
var y2 = circle.y;
|
|
22835
23118
|
verts.push(graphicsData.matrix ? matrix.a * x + matrix.c * y2 + matrix.tx : x, graphicsData.matrix ? matrix.b * x + matrix.d * y2 + matrix.ty : y2);
|
|
22836
|
-
|
|
23119
|
+
vertPos++;
|
|
23120
|
+
verts.push(points[0], points[1]);
|
|
23121
|
+
for (var i2 = 2; i2 < points.length; i2 += 2) {
|
|
22837
23122
|
verts.push(points[i2], points[i2 + 1]);
|
|
22838
23123
|
indices2.push(vertPos++, center, vertPos);
|
|
22839
23124
|
}
|
|
23125
|
+
indices2.push(center + 1, center, vertPos);
|
|
22840
23126
|
}
|
|
22841
23127
|
};
|
|
22842
23128
|
var buildRectangle = {
|
|
@@ -22891,6 +23177,10 @@ function quadraticBezierCurve(fromX, fromY, cpX, cpY, toX, toY, out) {
|
|
|
22891
23177
|
}
|
|
22892
23178
|
var buildRoundedRectangle = {
|
|
22893
23179
|
build: function(graphicsData) {
|
|
23180
|
+
if (Graphics.nextRoundedRectBehavior) {
|
|
23181
|
+
buildCircle.build(graphicsData);
|
|
23182
|
+
return;
|
|
23183
|
+
}
|
|
22894
23184
|
var rrectData = graphicsData.shape;
|
|
22895
23185
|
var points = graphicsData.points;
|
|
22896
23186
|
var x = rrectData.x;
|
|
@@ -22909,6 +23199,10 @@ var buildRoundedRectangle = {
|
|
|
22909
23199
|
}
|
|
22910
23200
|
},
|
|
22911
23201
|
triangulate: function(graphicsData, graphicsGeometry) {
|
|
23202
|
+
if (Graphics.nextRoundedRectBehavior) {
|
|
23203
|
+
buildCircle.triangulate(graphicsData, graphicsGeometry);
|
|
23204
|
+
return;
|
|
23205
|
+
}
|
|
22912
23206
|
var points = graphicsData.points;
|
|
22913
23207
|
var verts = graphicsGeometry.points;
|
|
22914
23208
|
var indices2 = graphicsGeometry.indices;
|
|
@@ -23388,14 +23682,6 @@ var _a;
|
|
|
23388
23682
|
var FILL_COMMANDS = (_a = {}, _a[SHAPES.POLY] = buildPoly, _a[SHAPES.CIRC] = buildCircle, _a[SHAPES.ELIP] = buildCircle, _a[SHAPES.RECT] = buildRectangle, _a[SHAPES.RREC] = buildRoundedRectangle, _a);
|
|
23389
23683
|
var BATCH_POOL = [];
|
|
23390
23684
|
var DRAW_CALL_POOL = [];
|
|
23391
|
-
function isPolygonClockwise(polygon) {
|
|
23392
|
-
var points = polygon.points;
|
|
23393
|
-
var sum2 = 0;
|
|
23394
|
-
for (var i2 = 0; i2 < points.length - 2; i2 += 2) {
|
|
23395
|
-
sum2 += (points[i2 + 2] - points[i2]) * (points[i2 + 3] + points[i2 + 1]);
|
|
23396
|
-
}
|
|
23397
|
-
return sum2 > 0;
|
|
23398
|
-
}
|
|
23399
23685
|
var GraphicsData = function() {
|
|
23400
23686
|
function GraphicsData2(shape, fillStyle, lineStyle, matrix) {
|
|
23401
23687
|
if (fillStyle === void 0) {
|
|
@@ -23609,6 +23895,9 @@ var GraphicsGeometry = function(_super) {
|
|
|
23609
23895
|
if (data.matrix) {
|
|
23610
23896
|
this.transformPoints(data.points, data.matrix);
|
|
23611
23897
|
}
|
|
23898
|
+
if (fillStyle.visible || lineStyle.visible) {
|
|
23899
|
+
this.processHoles(data.holes);
|
|
23900
|
+
}
|
|
23612
23901
|
for (var j2 = 0; j2 < 2; j2++) {
|
|
23613
23902
|
var style = j2 === 0 ? fillStyle : lineStyle;
|
|
23614
23903
|
if (!style.visible) {
|
|
@@ -23813,7 +24102,6 @@ var GraphicsGeometry = function(_super) {
|
|
|
23813
24102
|
};
|
|
23814
24103
|
GraphicsGeometry2.prototype.processFill = function(data) {
|
|
23815
24104
|
if (data.holes.length) {
|
|
23816
|
-
this.processHoles(data.holes);
|
|
23817
24105
|
buildPoly.triangulate(data, this);
|
|
23818
24106
|
} else {
|
|
23819
24107
|
var command = FILL_COMMANDS[data.type];
|
|
@@ -23850,17 +24138,7 @@ var GraphicsGeometry = function(_super) {
|
|
|
23850
24138
|
var nextMatrix = data.matrix || Matrix.IDENTITY;
|
|
23851
24139
|
var lineWidth = 0;
|
|
23852
24140
|
if (lineStyle && lineStyle.visible) {
|
|
23853
|
-
|
|
23854
|
-
lineWidth = lineStyle.width;
|
|
23855
|
-
if (type === SHAPES.POLY) {
|
|
23856
|
-
if (isPolygonClockwise(shape)) {
|
|
23857
|
-
lineWidth = lineWidth * (1 - alignment);
|
|
23858
|
-
} else {
|
|
23859
|
-
lineWidth = lineWidth * alignment;
|
|
23860
|
-
}
|
|
23861
|
-
} else {
|
|
23862
|
-
lineWidth = lineWidth * Math.max(0, alignment);
|
|
23863
|
-
}
|
|
24141
|
+
lineWidth = lineStyle.width * Math.max(0, lineStyle.alignment);
|
|
23864
24142
|
}
|
|
23865
24143
|
if (curMatrix !== nextMatrix) {
|
|
23866
24144
|
if (!sequenceBounds.isEmpty()) {
|
|
@@ -24528,12 +24806,13 @@ var Graphics = function(_super) {
|
|
|
24528
24806
|
this.batches = null;
|
|
24529
24807
|
_super.prototype.destroy.call(this, options);
|
|
24530
24808
|
};
|
|
24809
|
+
Graphics2.nextRoundedRectBehavior = false;
|
|
24531
24810
|
Graphics2._TEMP_POINT = new Point();
|
|
24532
24811
|
return Graphics2;
|
|
24533
24812
|
}(Container);
|
|
24534
24813
|
/*!
|
|
24535
|
-
* @pixi/sprite - v6.
|
|
24536
|
-
* Compiled Wed,
|
|
24814
|
+
* @pixi/sprite - v6.3.0
|
|
24815
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
24537
24816
|
*
|
|
24538
24817
|
* @pixi/sprite is licensed under the MIT License.
|
|
24539
24818
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -24849,8 +25128,8 @@ var Sprite = function(_super) {
|
|
|
24849
25128
|
return Sprite2;
|
|
24850
25129
|
}(Container);
|
|
24851
25130
|
/*!
|
|
24852
|
-
* @pixi/text - v6.
|
|
24853
|
-
* Compiled Wed,
|
|
25131
|
+
* @pixi/text - v6.3.0
|
|
25132
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
24854
25133
|
*
|
|
24855
25134
|
* @pixi/text is licensed under the MIT License.
|
|
24856
25135
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -25840,7 +26119,7 @@ var Text = function(_super) {
|
|
|
25840
26119
|
}
|
|
25841
26120
|
var style = this._style;
|
|
25842
26121
|
var letterSpacing = style.letterSpacing;
|
|
25843
|
-
var supportLetterSpacing = "letterSpacing" in CanvasRenderingContext2D.prototype || "textLetterSpacing" in CanvasRenderingContext2D.prototype;
|
|
26122
|
+
var supportLetterSpacing = Text2.experimentalLetterSpacing && ("letterSpacing" in CanvasRenderingContext2D.prototype || "textLetterSpacing" in CanvasRenderingContext2D.prototype);
|
|
25844
26123
|
if (letterSpacing === 0 || supportLetterSpacing) {
|
|
25845
26124
|
if (supportLetterSpacing) {
|
|
25846
26125
|
this.context.letterSpacing = letterSpacing;
|
|
@@ -26075,11 +26354,12 @@ var Text = function(_super) {
|
|
|
26075
26354
|
configurable: true
|
|
26076
26355
|
});
|
|
26077
26356
|
Text2.nextLineHeightBehavior = false;
|
|
26357
|
+
Text2.experimentalLetterSpacing = false;
|
|
26078
26358
|
return Text2;
|
|
26079
26359
|
}(Sprite);
|
|
26080
26360
|
/*!
|
|
26081
|
-
* @pixi/prepare - v6.
|
|
26082
|
-
* Compiled Wed,
|
|
26361
|
+
* @pixi/prepare - v6.3.0
|
|
26362
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
26083
26363
|
*
|
|
26084
26364
|
* @pixi/prepare is licensed under the MIT License.
|
|
26085
26365
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -26371,8 +26651,8 @@ var Prepare = function(_super) {
|
|
|
26371
26651
|
return Prepare2;
|
|
26372
26652
|
}(BasePrepare);
|
|
26373
26653
|
/*!
|
|
26374
|
-
* @pixi/spritesheet - v6.
|
|
26375
|
-
* Compiled Wed,
|
|
26654
|
+
* @pixi/spritesheet - v6.3.0
|
|
26655
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
26376
26656
|
*
|
|
26377
26657
|
* @pixi/spritesheet is licensed under the MIT License.
|
|
26378
26658
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -26562,8 +26842,8 @@ var SpritesheetLoader = function() {
|
|
|
26562
26842
|
return SpritesheetLoader2;
|
|
26563
26843
|
}();
|
|
26564
26844
|
/*!
|
|
26565
|
-
* @pixi/sprite-tiling - v6.
|
|
26566
|
-
* Compiled Wed,
|
|
26845
|
+
* @pixi/sprite-tiling - v6.3.0
|
|
26846
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
26567
26847
|
*
|
|
26568
26848
|
* @pixi/sprite-tiling is licensed under the MIT License.
|
|
26569
26849
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -26812,8 +27092,8 @@ var TilingSpriteRenderer = function(_super) {
|
|
|
26812
27092
|
return TilingSpriteRenderer2;
|
|
26813
27093
|
}(ObjectRenderer);
|
|
26814
27094
|
/*!
|
|
26815
|
-
* @pixi/mesh - v6.
|
|
26816
|
-
* Compiled Wed,
|
|
27095
|
+
* @pixi/mesh - v6.3.0
|
|
27096
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
26817
27097
|
*
|
|
26818
27098
|
* @pixi/mesh is licensed under the MIT License.
|
|
26819
27099
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -27223,8 +27503,8 @@ var MeshGeometry = function(_super) {
|
|
|
27223
27503
|
return MeshGeometry2;
|
|
27224
27504
|
}(Geometry);
|
|
27225
27505
|
/*!
|
|
27226
|
-
* @pixi/text-bitmap - v6.
|
|
27227
|
-
* Compiled Wed,
|
|
27506
|
+
* @pixi/text-bitmap - v6.3.0
|
|
27507
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
27228
27508
|
*
|
|
27229
27509
|
* @pixi/text-bitmap is licensed under the MIT License.
|
|
27230
27510
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -27420,13 +27700,13 @@ var XMLStringFormat = function() {
|
|
|
27420
27700
|
}
|
|
27421
27701
|
XMLStringFormat2.test = function(data) {
|
|
27422
27702
|
if (typeof data === "string" && data.indexOf("<font>") > -1) {
|
|
27423
|
-
var xml = new
|
|
27703
|
+
var xml = new globalThis.DOMParser().parseFromString(data, "text/xml");
|
|
27424
27704
|
return XMLFormat.test(xml);
|
|
27425
27705
|
}
|
|
27426
27706
|
return false;
|
|
27427
27707
|
};
|
|
27428
27708
|
XMLStringFormat2.parse = function(xmlTxt) {
|
|
27429
|
-
var xml = new
|
|
27709
|
+
var xml = new globalThis.DOMParser().parseFromString(xmlTxt, "text/xml");
|
|
27430
27710
|
return XMLFormat.parse(xml);
|
|
27431
27711
|
};
|
|
27432
27712
|
return XMLStringFormat2;
|
|
@@ -27886,7 +28166,7 @@ var charRenderDataPool = [];
|
|
|
27886
28166
|
charRenderData.position.y = pos.y + charData.yOffset;
|
|
27887
28167
|
charRenderData.prevSpaces = spaceCount;
|
|
27888
28168
|
chars2.push(charRenderData);
|
|
27889
|
-
lastLineWidth = charRenderData.position.x + charData.texture.orig.width;
|
|
28169
|
+
lastLineWidth = charRenderData.position.x + Math.max(charData.xAdvance, charData.texture.orig.width);
|
|
27890
28170
|
pos.x += charData.xAdvance + this._letterSpacing;
|
|
27891
28171
|
maxLineHeight = Math.max(maxLineHeight, charData.yOffset + charData.texture.height);
|
|
27892
28172
|
prevCharCode = charCode;
|
|
@@ -28352,8 +28632,8 @@ var BitmapFontLoader = function() {
|
|
|
28352
28632
|
return BitmapFontLoader2;
|
|
28353
28633
|
}();
|
|
28354
28634
|
/*!
|
|
28355
|
-
* @pixi/filter-alpha - v6.
|
|
28356
|
-
* Compiled Wed,
|
|
28635
|
+
* @pixi/filter-alpha - v6.3.0
|
|
28636
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
28357
28637
|
*
|
|
28358
28638
|
* @pixi/filter-alpha is licensed under the MIT License.
|
|
28359
28639
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -28415,8 +28695,8 @@ var fragment$4 = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nun
|
|
|
28415
28695
|
return AlphaFilter;
|
|
28416
28696
|
})(Filter);
|
|
28417
28697
|
/*!
|
|
28418
|
-
* @pixi/filter-blur - v6.
|
|
28419
|
-
* Compiled Wed,
|
|
28698
|
+
* @pixi/filter-blur - v6.3.0
|
|
28699
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
28420
28700
|
*
|
|
28421
28701
|
* @pixi/filter-blur is licensed under the MIT License.
|
|
28422
28702
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -28514,8 +28794,8 @@ function generateBlurFragSource(kernelSize) {
|
|
|
28514
28794
|
return fragSource;
|
|
28515
28795
|
}
|
|
28516
28796
|
/*!
|
|
28517
|
-
* @pixi/constants - v6.
|
|
28518
|
-
* Compiled Wed,
|
|
28797
|
+
* @pixi/constants - v6.3.0
|
|
28798
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
28519
28799
|
*
|
|
28520
28800
|
* @pixi/constants is licensed under the MIT License.
|
|
28521
28801
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -28905,8 +29185,8 @@ var BlurFilterPass = function(_super) {
|
|
|
28905
29185
|
return BlurFilter;
|
|
28906
29186
|
})(Filter);
|
|
28907
29187
|
/*!
|
|
28908
|
-
* @pixi/filter-color-matrix - v6.
|
|
28909
|
-
* Compiled Wed,
|
|
29188
|
+
* @pixi/filter-color-matrix - v6.3.0
|
|
29189
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
28910
29190
|
*
|
|
28911
29191
|
* @pixi/filter-color-matrix is licensed under the MIT License.
|
|
28912
29192
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -29583,8 +29863,8 @@ var ColorMatrixFilter = function(_super) {
|
|
|
29583
29863
|
}(Filter);
|
|
29584
29864
|
ColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale;
|
|
29585
29865
|
/*!
|
|
29586
|
-
* @pixi/filter-displacement - v6.
|
|
29587
|
-
* Compiled Wed,
|
|
29866
|
+
* @pixi/filter-displacement - v6.3.0
|
|
29867
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
29588
29868
|
*
|
|
29589
29869
|
* @pixi/filter-displacement is licensed under the MIT License.
|
|
29590
29870
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -29672,8 +29952,8 @@ var vertex$1 = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix
|
|
|
29672
29952
|
return DisplacementFilter;
|
|
29673
29953
|
})(Filter);
|
|
29674
29954
|
/*!
|
|
29675
|
-
* @pixi/filter-fxaa - v6.
|
|
29676
|
-
* Compiled Wed,
|
|
29955
|
+
* @pixi/filter-fxaa - v6.3.0
|
|
29956
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
29677
29957
|
*
|
|
29678
29958
|
* @pixi/filter-fxaa is licensed under the MIT License.
|
|
29679
29959
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -29842,8 +30122,8 @@ void main() {
|
|
|
29842
30122
|
return FXAAFilter;
|
|
29843
30123
|
})(Filter);
|
|
29844
30124
|
/*!
|
|
29845
|
-
* @pixi/filter-noise - v6.
|
|
29846
|
-
* Compiled Wed,
|
|
30125
|
+
* @pixi/filter-noise - v6.3.0
|
|
30126
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
29847
30127
|
*
|
|
29848
30128
|
* @pixi/filter-noise is licensed under the MIT License.
|
|
29849
30129
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -29922,15 +30202,15 @@ var fragment = "precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying v
|
|
|
29922
30202
|
return NoiseFilter;
|
|
29923
30203
|
})(Filter);
|
|
29924
30204
|
/*!
|
|
29925
|
-
* @pixi/mixin-cache-as-bitmap - v6.
|
|
29926
|
-
* Compiled Wed,
|
|
30205
|
+
* @pixi/mixin-cache-as-bitmap - v6.3.0
|
|
30206
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
29927
30207
|
*
|
|
29928
30208
|
* @pixi/mixin-cache-as-bitmap is licensed under the MIT License.
|
|
29929
30209
|
* http://www.opensource.org/licenses/mit-license
|
|
29930
30210
|
*/
|
|
29931
30211
|
/*!
|
|
29932
|
-
* @pixi/constants - v6.
|
|
29933
|
-
* Compiled Wed,
|
|
30212
|
+
* @pixi/constants - v6.3.0
|
|
30213
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
29934
30214
|
*
|
|
29935
30215
|
* @pixi/constants is licensed under the MIT License.
|
|
29936
30216
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -30360,8 +30640,8 @@ DisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy(o
|
|
|
30360
30640
|
this.destroy(options);
|
|
30361
30641
|
};
|
|
30362
30642
|
/*!
|
|
30363
|
-
* @pixi/mixin-get-child-by-name - v6.
|
|
30364
|
-
* Compiled Wed,
|
|
30643
|
+
* @pixi/mixin-get-child-by-name - v6.3.0
|
|
30644
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
30365
30645
|
*
|
|
30366
30646
|
* @pixi/mixin-get-child-by-name is licensed under the MIT License.
|
|
30367
30647
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -30388,8 +30668,8 @@ Container.prototype.getChildByName = function getChildByName(name, deep) {
|
|
|
30388
30668
|
return null;
|
|
30389
30669
|
};
|
|
30390
30670
|
/*!
|
|
30391
|
-
* @pixi/mixin-get-global-position - v6.
|
|
30392
|
-
* Compiled Wed,
|
|
30671
|
+
* @pixi/mixin-get-global-position - v6.3.0
|
|
30672
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
30393
30673
|
*
|
|
30394
30674
|
* @pixi/mixin-get-global-position is licensed under the MIT License.
|
|
30395
30675
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -30410,8 +30690,8 @@ DisplayObject.prototype.getGlobalPosition = function getGlobalPosition(point, sk
|
|
|
30410
30690
|
return point;
|
|
30411
30691
|
};
|
|
30412
30692
|
/*!
|
|
30413
|
-
* @pixi/mesh-extras - v6.
|
|
30414
|
-
* Compiled Wed,
|
|
30693
|
+
* @pixi/mesh-extras - v6.3.0
|
|
30694
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
30415
30695
|
*
|
|
30416
30696
|
* @pixi/mesh-extras is licensed under the MIT License.
|
|
30417
30697
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -30892,8 +31172,8 @@ var DEFAULT_BORDER_SIZE = 10;
|
|
|
30892
31172
|
return NineSlicePlane;
|
|
30893
31173
|
})(SimplePlane);
|
|
30894
31174
|
/*!
|
|
30895
|
-
* @pixi/sprite-animated - v6.
|
|
30896
|
-
* Compiled Wed,
|
|
31175
|
+
* @pixi/sprite-animated - v6.3.0
|
|
31176
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
30897
31177
|
*
|
|
30898
31178
|
* @pixi/sprite-animated is licensed under the MIT License.
|
|
30899
31179
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -31143,8 +31423,8 @@ var AnimatedSprite = function(_super) {
|
|
|
31143
31423
|
return AnimatedSprite2;
|
|
31144
31424
|
}(Sprite);
|
|
31145
31425
|
/*!
|
|
31146
|
-
* pixi.js - v6.
|
|
31147
|
-
* Compiled Wed,
|
|
31426
|
+
* pixi.js - v6.3.0
|
|
31427
|
+
* Compiled Wed, 23 Mar 2022 18:58:56 UTC
|
|
31148
31428
|
*
|
|
31149
31429
|
* pixi.js is licensed under the MIT License.
|
|
31150
31430
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -32308,6 +32588,7 @@ var OBJECT = "object";
|
|
|
32308
32588
|
var STRING = "string";
|
|
32309
32589
|
var NUMBER = "number";
|
|
32310
32590
|
var UNDEFINED = "undefined";
|
|
32591
|
+
var IS_WINDOW = typeof window !== UNDEFINED;
|
|
32311
32592
|
var OPEN_CLOSED_CHARACTERS = [{
|
|
32312
32593
|
open: "(",
|
|
32313
32594
|
close: ")"
|
|
@@ -32587,6 +32868,23 @@ function find$1(arr, callback, defalutValue) {
|
|
|
32587
32868
|
var index = findIndex(arr, callback);
|
|
32588
32869
|
return index > -1 ? arr[index] : defalutValue;
|
|
32589
32870
|
}
|
|
32871
|
+
var requestAnimationFrame$1 = /* @__PURE__ */ function() {
|
|
32872
|
+
var firstTime = now();
|
|
32873
|
+
var raf = IS_WINDOW && (window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame);
|
|
32874
|
+
return raf ? raf.bind(window) : function(callback) {
|
|
32875
|
+
var currTime = now();
|
|
32876
|
+
var id = window.setTimeout(function() {
|
|
32877
|
+
callback(currTime - firstTime);
|
|
32878
|
+
}, 1e3 / 60);
|
|
32879
|
+
return id;
|
|
32880
|
+
};
|
|
32881
|
+
}();
|
|
32882
|
+
var cancelAnimationFrame$1 = /* @__PURE__ */ function() {
|
|
32883
|
+
var caf = IS_WINDOW && (window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.msCancelAnimationFrame);
|
|
32884
|
+
return caf ? caf.bind(window) : function(handle2) {
|
|
32885
|
+
clearTimeout(handle2);
|
|
32886
|
+
};
|
|
32887
|
+
}();
|
|
32590
32888
|
function getKeys(obj) {
|
|
32591
32889
|
if (Object.keys) {
|
|
32592
32890
|
return Object.keys(obj);
|
|
@@ -32754,8 +33052,8 @@ function __extends$6(d2, b2) {
|
|
|
32754
33052
|
}
|
|
32755
33053
|
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
32756
33054
|
}
|
|
32757
|
-
var __assign$
|
|
32758
|
-
__assign$
|
|
33055
|
+
var __assign$7 = function() {
|
|
33056
|
+
__assign$7 = Object.assign || function __assign2(t) {
|
|
32759
33057
|
for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
|
|
32760
33058
|
s2 = arguments[i2];
|
|
32761
33059
|
for (var p in s2)
|
|
@@ -32764,7 +33062,7 @@ var __assign$6 = function() {
|
|
|
32764
33062
|
}
|
|
32765
33063
|
return t;
|
|
32766
33064
|
};
|
|
32767
|
-
return __assign$
|
|
33065
|
+
return __assign$7.apply(this, arguments);
|
|
32768
33066
|
};
|
|
32769
33067
|
function __rest$2(s2, e) {
|
|
32770
33068
|
var t = {};
|
|
@@ -32778,7 +33076,7 @@ function __rest$2(s2, e) {
|
|
|
32778
33076
|
}
|
|
32779
33077
|
return t;
|
|
32780
33078
|
}
|
|
32781
|
-
function __spreadArrays$
|
|
33079
|
+
function __spreadArrays$3() {
|
|
32782
33080
|
for (var s2 = 0, i2 = 0, il = arguments.length; i2 < il; i2++)
|
|
32783
33081
|
s2 += arguments[i2].length;
|
|
32784
33082
|
for (var r2 = Array(s2), k = 0, i2 = 0; i2 < il; i2++)
|
|
@@ -32888,7 +33186,7 @@ function createElement(type, props) {
|
|
|
32888
33186
|
type,
|
|
32889
33187
|
key,
|
|
32890
33188
|
ref: ref2,
|
|
32891
|
-
props: __assign$
|
|
33189
|
+
props: __assign$7(__assign$7({}, otherProps), {
|
|
32892
33190
|
children: flat$1(children).filter(function(child) {
|
|
32893
33191
|
return child != null && child !== false;
|
|
32894
33192
|
})
|
|
@@ -33257,7 +33555,7 @@ var Component = /* @__PURE__ */ function() {
|
|
|
33257
33555
|
}
|
|
33258
33556
|
clearTimeout(this.$_timer);
|
|
33259
33557
|
this.$_timer = 0;
|
|
33260
|
-
this.$_state = __assign$
|
|
33558
|
+
this.$_state = __assign$7(__assign$7({}, this.$_state), state);
|
|
33261
33559
|
if (!isForceUpdate) {
|
|
33262
33560
|
this.$_timer = setTimeout(function() {
|
|
33263
33561
|
_this.$_timer = 0;
|
|
@@ -33280,7 +33578,7 @@ var Component = /* @__PURE__ */ function() {
|
|
|
33280
33578
|
__proto.$_setState = function(callback, isForceUpdate) {
|
|
33281
33579
|
var hooks = [];
|
|
33282
33580
|
var provider = this.$_provider;
|
|
33283
|
-
var isUpdate = renderProviders(provider.container, [provider], [provider.original], hooks, __assign$
|
|
33581
|
+
var isUpdate = renderProviders(provider.container, [provider], [provider.original], hooks, __assign$7(__assign$7({}, this.state), this.$_state), isForceUpdate);
|
|
33284
33582
|
if (isUpdate) {
|
|
33285
33583
|
if (callback) {
|
|
33286
33584
|
hooks.push(callback);
|
|
@@ -33380,7 +33678,7 @@ function diffProviders(containerProvider, providers, children) {
|
|
|
33380
33678
|
childProvider.index = to;
|
|
33381
33679
|
return false;
|
|
33382
33680
|
});
|
|
33383
|
-
return __spreadArrays$
|
|
33681
|
+
return __spreadArrays$3(result.added, changed.map(function(_a3) {
|
|
33384
33682
|
_a3[0];
|
|
33385
33683
|
var to = _a3[1];
|
|
33386
33684
|
return to;
|
|
@@ -33607,15 +33905,18 @@ var OS_PRESETS = [{
|
|
|
33607
33905
|
}, {
|
|
33608
33906
|
test: "windows nt",
|
|
33609
33907
|
id: "window"
|
|
33908
|
+
}, {
|
|
33909
|
+
test: "win32|windows",
|
|
33910
|
+
id: "window"
|
|
33610
33911
|
}, {
|
|
33611
33912
|
test: "iphone|ipad|ipod",
|
|
33612
33913
|
id: "ios",
|
|
33613
33914
|
versionTest: "iphone os|cpu os"
|
|
33614
33915
|
}, {
|
|
33615
|
-
test: "mac os x",
|
|
33916
|
+
test: "macos|macintel|mac os x",
|
|
33616
33917
|
id: "mac"
|
|
33617
33918
|
}, {
|
|
33618
|
-
test: "android",
|
|
33919
|
+
test: "android|linux armv81",
|
|
33619
33920
|
id: "android"
|
|
33620
33921
|
}, {
|
|
33621
33922
|
test: "tizen",
|
|
@@ -33629,6 +33930,7 @@ function parseUserAgentData(osData) {
|
|
|
33629
33930
|
var brands = (userAgentData.uaList || userAgentData.brands).slice();
|
|
33630
33931
|
var isMobile2 = userAgentData.mobile || false;
|
|
33631
33932
|
var firstBrand = brands[0];
|
|
33933
|
+
var platform2 = (osData && osData.platform || userAgentData.platform || navigator.platform).toLowerCase();
|
|
33632
33934
|
var browser = {
|
|
33633
33935
|
name: firstBrand.brand,
|
|
33634
33936
|
version: firstBrand.version,
|
|
@@ -33655,12 +33957,11 @@ function parseUserAgentData(osData) {
|
|
|
33655
33957
|
browser.webkit = !!webkitBrand.brand;
|
|
33656
33958
|
browser.webkitVersion = webkitBrand.version;
|
|
33657
33959
|
}
|
|
33960
|
+
var platfomResult = find(OS_PRESETS, function(preset) {
|
|
33961
|
+
return new RegExp("" + preset.test, "g").exec(platform2);
|
|
33962
|
+
});
|
|
33963
|
+
os.name = platfomResult ? platfomResult.id : "";
|
|
33658
33964
|
if (osData) {
|
|
33659
|
-
var platform_1 = osData.platform.toLowerCase();
|
|
33660
|
-
var result = find(OS_PRESETS, function(preset) {
|
|
33661
|
-
return new RegExp("" + preset.test, "g").exec(platform_1);
|
|
33662
|
-
});
|
|
33663
|
-
os.name = result ? result.id : platform_1;
|
|
33664
33965
|
os.version = osData.platformVersion;
|
|
33665
33966
|
}
|
|
33666
33967
|
var browserBrand = findPresetBrand(BROWSER_PRESETS, brands);
|
|
@@ -33668,9 +33969,7 @@ function parseUserAgentData(osData) {
|
|
|
33668
33969
|
browser.name = browserBrand.brand;
|
|
33669
33970
|
browser.version = osData ? osData.uaFullVersion : browserBrand.version;
|
|
33670
33971
|
}
|
|
33671
|
-
if (
|
|
33672
|
-
os.name = "android";
|
|
33673
|
-
} else if (browser.webkit) {
|
|
33972
|
+
if (browser.webkit) {
|
|
33674
33973
|
os.name = isMobile2 ? "ios" : "mac";
|
|
33675
33974
|
}
|
|
33676
33975
|
if (os.name === "ios" && browser.webview) {
|
|
@@ -34186,7 +34485,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
34186
34485
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
34187
34486
|
PERFORMANCE OF THIS SOFTWARE.
|
|
34188
34487
|
***************************************************************************** */
|
|
34189
|
-
function __spreadArrays$
|
|
34488
|
+
function __spreadArrays$2() {
|
|
34190
34489
|
for (var s2 = 0, i2 = 0, il = arguments.length; i2 < il; i2++)
|
|
34191
34490
|
s2 += arguments[i2].length;
|
|
34192
34491
|
for (var r2 = Array(s2), k = 0, i2 = 0; i2 < il; i2++)
|
|
@@ -34371,7 +34670,7 @@ function getPointsOnLines(points, lines) {
|
|
|
34371
34670
|
});
|
|
34372
34671
|
}
|
|
34373
34672
|
function convertLines(points) {
|
|
34374
|
-
return __spreadArrays$
|
|
34673
|
+
return __spreadArrays$2(points.slice(1), [points[0]]).map(function(point, i2) {
|
|
34375
34674
|
return [points[i2], point];
|
|
34376
34675
|
});
|
|
34377
34676
|
}
|
|
@@ -34494,8 +34793,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
34494
34793
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
34495
34794
|
PERFORMANCE OF THIS SOFTWARE.
|
|
34496
34795
|
***************************************************************************** */
|
|
34497
|
-
var __assign$
|
|
34498
|
-
__assign$
|
|
34796
|
+
var __assign$6 = function() {
|
|
34797
|
+
__assign$6 = Object.assign || function __assign2(t) {
|
|
34499
34798
|
for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
|
|
34500
34799
|
s2 = arguments[i2];
|
|
34501
34800
|
for (var p in s2)
|
|
@@ -34504,9 +34803,9 @@ var __assign$5 = function() {
|
|
|
34504
34803
|
}
|
|
34505
34804
|
return t;
|
|
34506
34805
|
};
|
|
34507
|
-
return __assign$
|
|
34806
|
+
return __assign$6.apply(this, arguments);
|
|
34508
34807
|
};
|
|
34509
|
-
function __spreadArrays$
|
|
34808
|
+
function __spreadArrays$1() {
|
|
34510
34809
|
for (var s2 = 0, i2 = 0, il = arguments.length; i2 < il; i2++)
|
|
34511
34810
|
s2 += arguments[i2].length;
|
|
34512
34811
|
for (var r2 = Array(s2), k = 0, i2 = 0; i2 < il; i2++)
|
|
@@ -34579,7 +34878,7 @@ var EventEmitter$1 = /* @__PURE__ */ function() {
|
|
|
34579
34878
|
isStop = true;
|
|
34580
34879
|
};
|
|
34581
34880
|
param.currentTarget = this;
|
|
34582
|
-
__spreadArrays$
|
|
34881
|
+
__spreadArrays$1(events).forEach(function(info) {
|
|
34583
34882
|
info.listener(param);
|
|
34584
34883
|
if (info.once) {
|
|
34585
34884
|
_this.off(eventName, info.listener);
|
|
@@ -34597,7 +34896,7 @@ var EventEmitter$1 = /* @__PURE__ */ function() {
|
|
|
34597
34896
|
var events = this._events;
|
|
34598
34897
|
events[eventName] = events[eventName] || [];
|
|
34599
34898
|
var listeners = events[eventName];
|
|
34600
|
-
listeners.push(__assign$
|
|
34899
|
+
listeners.push(__assign$6({
|
|
34601
34900
|
listener
|
|
34602
34901
|
}, options));
|
|
34603
34902
|
};
|
|
@@ -34637,6 +34936,18 @@ function __extends$4(d2, b2) {
|
|
|
34637
34936
|
}
|
|
34638
34937
|
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
34639
34938
|
}
|
|
34939
|
+
var __assign$5 = function() {
|
|
34940
|
+
__assign$5 = Object.assign || function __assign2(t) {
|
|
34941
|
+
for (var s2, i2 = 1, n = arguments.length; i2 < n; i2++) {
|
|
34942
|
+
s2 = arguments[i2];
|
|
34943
|
+
for (var p in s2)
|
|
34944
|
+
if (Object.prototype.hasOwnProperty.call(s2, p))
|
|
34945
|
+
t[p] = s2[p];
|
|
34946
|
+
}
|
|
34947
|
+
return t;
|
|
34948
|
+
};
|
|
34949
|
+
return __assign$5.apply(this, arguments);
|
|
34950
|
+
};
|
|
34640
34951
|
function getDefaultScrollPosition$1(e) {
|
|
34641
34952
|
var container = e.container;
|
|
34642
34953
|
if (container === document.body) {
|
|
@@ -34648,10 +34959,12 @@ var DragScroll = /* @__PURE__ */ function(_super) {
|
|
|
34648
34959
|
__extends$4(DragScroll2, _super);
|
|
34649
34960
|
function DragScroll2() {
|
|
34650
34961
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
34651
|
-
_this.
|
|
34652
|
-
_this.
|
|
34653
|
-
_this.
|
|
34654
|
-
_this.
|
|
34962
|
+
_this._startRect = null;
|
|
34963
|
+
_this._startPos = [];
|
|
34964
|
+
_this._prevTime = 0;
|
|
34965
|
+
_this._timer = 0;
|
|
34966
|
+
_this._prevScrollPos = [0, 0];
|
|
34967
|
+
_this._isWait = false;
|
|
34655
34968
|
return _this;
|
|
34656
34969
|
}
|
|
34657
34970
|
var __proto = DragScroll2.prototype;
|
|
@@ -34671,83 +34984,115 @@ var DragScroll = /* @__PURE__ */ function(_super) {
|
|
|
34671
34984
|
width = rect.width;
|
|
34672
34985
|
height = rect.height;
|
|
34673
34986
|
}
|
|
34674
|
-
this.
|
|
34675
|
-
this.
|
|
34987
|
+
this._startPos = [e.clientX, e.clientY];
|
|
34988
|
+
this._startRect = {
|
|
34676
34989
|
top,
|
|
34677
34990
|
left,
|
|
34678
34991
|
width,
|
|
34679
34992
|
height
|
|
34680
34993
|
};
|
|
34994
|
+
this._prevScrollPos = this._getScrollPosition([0, 0], options);
|
|
34681
34995
|
};
|
|
34682
34996
|
__proto.drag = function(e, options) {
|
|
34683
|
-
var _this = this;
|
|
34684
34997
|
var clientX = e.clientX, clientY = e.clientY;
|
|
34685
|
-
var
|
|
34686
|
-
var
|
|
34687
|
-
var nowTime = now();
|
|
34688
|
-
var distTime = Math.max(throttleTime + this.prevTime - nowTime, 0);
|
|
34998
|
+
var _a3 = options.threshold, threshold = _a3 === void 0 ? 0 : _a3;
|
|
34999
|
+
var _b3 = this, _startRect = _b3._startRect, _startPos = _b3._startPos;
|
|
34689
35000
|
var direction = [0, 0];
|
|
34690
|
-
if (
|
|
34691
|
-
if (
|
|
35001
|
+
if (_startRect.top > clientY - threshold) {
|
|
35002
|
+
if (_startPos[1] > _startRect.top || clientY < _startPos[1]) {
|
|
34692
35003
|
direction[1] = -1;
|
|
34693
35004
|
}
|
|
34694
|
-
} else if (
|
|
34695
|
-
if (
|
|
35005
|
+
} else if (_startRect.top + _startRect.height < clientY + threshold) {
|
|
35006
|
+
if (_startPos[1] < _startRect.top + _startRect.height || clientY > _startPos[1]) {
|
|
34696
35007
|
direction[1] = 1;
|
|
34697
35008
|
}
|
|
34698
35009
|
}
|
|
34699
|
-
if (
|
|
34700
|
-
if (
|
|
35010
|
+
if (_startRect.left > clientX - threshold) {
|
|
35011
|
+
if (_startPos[0] > _startRect.left || clientX < _startPos[0]) {
|
|
34701
35012
|
direction[0] = -1;
|
|
34702
35013
|
}
|
|
34703
|
-
} else if (
|
|
34704
|
-
if (
|
|
35014
|
+
} else if (_startRect.left + _startRect.width < clientX + threshold) {
|
|
35015
|
+
if (_startPos[0] < _startRect.left + _startRect.width || clientX > _startPos[0]) {
|
|
34705
35016
|
direction[0] = 1;
|
|
34706
35017
|
}
|
|
34707
35018
|
}
|
|
34708
|
-
clearTimeout(this.
|
|
35019
|
+
clearTimeout(this._timer);
|
|
34709
35020
|
if (!direction[0] && !direction[1]) {
|
|
34710
35021
|
return false;
|
|
34711
35022
|
}
|
|
34712
|
-
|
|
34713
|
-
|
|
34714
|
-
|
|
34715
|
-
|
|
35023
|
+
return this._continueDrag(__assign$5(__assign$5({}, options), {
|
|
35024
|
+
direction,
|
|
35025
|
+
inputEvent: e,
|
|
35026
|
+
isDrag: true
|
|
35027
|
+
}));
|
|
35028
|
+
};
|
|
35029
|
+
__proto.checkScroll = function(options) {
|
|
35030
|
+
var _this = this;
|
|
35031
|
+
if (this._isWait) {
|
|
34716
35032
|
return false;
|
|
34717
35033
|
}
|
|
34718
|
-
this.
|
|
34719
|
-
var
|
|
34720
|
-
|
|
34721
|
-
|
|
34722
|
-
|
|
34723
|
-
this.
|
|
34724
|
-
container,
|
|
34725
|
-
direction,
|
|
34726
|
-
inputEvent: e
|
|
34727
|
-
});
|
|
34728
|
-
var nextPos = getScrollPosition({
|
|
34729
|
-
container,
|
|
34730
|
-
direction
|
|
34731
|
-
});
|
|
34732
|
-
var offsetX = nextPos[0] - prevPos[0];
|
|
34733
|
-
var offsetY = nextPos[1] - prevPos[1];
|
|
35034
|
+
var _a3 = options.prevScrollPos, prevScrollPos = _a3 === void 0 ? this._prevScrollPos : _a3, direction = options.direction, _b3 = options.throttleTime, throttleTime = _b3 === void 0 ? 0 : _b3, inputEvent = options.inputEvent, isDrag = options.isDrag;
|
|
35035
|
+
var nextScrollPos = this._getScrollPosition(direction || [0, 0], options);
|
|
35036
|
+
var offsetX = nextScrollPos[0] - prevScrollPos[0];
|
|
35037
|
+
var offsetY = nextScrollPos[1] - prevScrollPos[1];
|
|
35038
|
+
var nextDirection = direction || [offsetX ? Math.abs(offsetX) / offsetX : 0, offsetY ? Math.abs(offsetY) / offsetY : 0];
|
|
35039
|
+
this._prevScrollPos = nextScrollPos;
|
|
34734
35040
|
if (!offsetX && !offsetY) {
|
|
34735
35041
|
return false;
|
|
34736
35042
|
}
|
|
34737
35043
|
this.trigger("move", {
|
|
34738
|
-
offsetX:
|
|
34739
|
-
offsetY:
|
|
34740
|
-
inputEvent
|
|
35044
|
+
offsetX: nextDirection[0] ? offsetX : 0,
|
|
35045
|
+
offsetY: nextDirection[1] ? offsetY : 0,
|
|
35046
|
+
inputEvent
|
|
34741
35047
|
});
|
|
34742
|
-
if (throttleTime) {
|
|
34743
|
-
this.
|
|
34744
|
-
_this.
|
|
35048
|
+
if (throttleTime && isDrag) {
|
|
35049
|
+
this._timer = window.setTimeout(function() {
|
|
35050
|
+
_this._continueDrag(options);
|
|
34745
35051
|
}, throttleTime);
|
|
34746
35052
|
}
|
|
34747
35053
|
return true;
|
|
34748
35054
|
};
|
|
34749
35055
|
__proto.dragEnd = function() {
|
|
34750
|
-
clearTimeout(this.
|
|
35056
|
+
clearTimeout(this._timer);
|
|
35057
|
+
};
|
|
35058
|
+
__proto._getScrollPosition = function(direction, options) {
|
|
35059
|
+
var container = options.container, _a3 = options.getScrollPosition, getScrollPosition = _a3 === void 0 ? getDefaultScrollPosition$1 : _a3;
|
|
35060
|
+
return getScrollPosition({
|
|
35061
|
+
container,
|
|
35062
|
+
direction
|
|
35063
|
+
});
|
|
35064
|
+
};
|
|
35065
|
+
__proto._continueDrag = function(options) {
|
|
35066
|
+
var _this = this;
|
|
35067
|
+
var container = options.container, direction = options.direction, throttleTime = options.throttleTime, useScroll = options.useScroll, isDrag = options.isDrag, inputEvent = options.inputEvent;
|
|
35068
|
+
if (isDrag && this._isWait) {
|
|
35069
|
+
return;
|
|
35070
|
+
}
|
|
35071
|
+
var nowTime = now();
|
|
35072
|
+
var distTime = Math.max(throttleTime + this._prevTime - nowTime, 0);
|
|
35073
|
+
if (distTime > 0) {
|
|
35074
|
+
this._timer = window.setTimeout(function() {
|
|
35075
|
+
_this._continueDrag(options);
|
|
35076
|
+
}, distTime);
|
|
35077
|
+
return false;
|
|
35078
|
+
}
|
|
35079
|
+
this._prevTime = nowTime;
|
|
35080
|
+
var prevScrollPos = this._getScrollPosition(direction, options);
|
|
35081
|
+
this._prevScrollPos = prevScrollPos;
|
|
35082
|
+
if (isDrag) {
|
|
35083
|
+
this._isWait = true;
|
|
35084
|
+
}
|
|
35085
|
+
this.trigger("scroll", {
|
|
35086
|
+
container,
|
|
35087
|
+
direction,
|
|
35088
|
+
inputEvent
|
|
35089
|
+
});
|
|
35090
|
+
this._isWait = false;
|
|
35091
|
+
return useScroll || this.checkScroll(__assign$5(__assign$5({}, options), {
|
|
35092
|
+
prevScrollPos,
|
|
35093
|
+
direction,
|
|
35094
|
+
inputEvent
|
|
35095
|
+
}));
|
|
34751
35096
|
};
|
|
34752
35097
|
return DragScroll2;
|
|
34753
35098
|
}(EventEmitter$2);
|
|
@@ -34889,16 +35234,6 @@ var ClientStore = /* @__PURE__ */ function() {
|
|
|
34889
35234
|
this.length = clients.length;
|
|
34890
35235
|
}
|
|
34891
35236
|
var __proto = ClientStore2.prototype;
|
|
34892
|
-
__proto.addClients = function(clients) {
|
|
34893
|
-
if (clients === void 0) {
|
|
34894
|
-
clients = this.prevClients;
|
|
34895
|
-
}
|
|
34896
|
-
var position = this.getPosition(clients);
|
|
34897
|
-
var deltaX = position.deltaX, deltaY = position.deltaY;
|
|
34898
|
-
this.movement += Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
|
34899
|
-
this.prevClients = clients;
|
|
34900
|
-
return position;
|
|
34901
|
-
};
|
|
34902
35237
|
__proto.getAngle = function(clients) {
|
|
34903
35238
|
if (clients === void 0) {
|
|
34904
35239
|
clients = this.prevClients;
|
|
@@ -34911,8 +35246,15 @@ var ClientStore = /* @__PURE__ */ function() {
|
|
|
34911
35246
|
}
|
|
34912
35247
|
return getRotatiion(clients) - getRotatiion(this.startClients);
|
|
34913
35248
|
};
|
|
34914
|
-
__proto.getPosition = function(clients) {
|
|
34915
|
-
|
|
35249
|
+
__proto.getPosition = function(clients, isAdd) {
|
|
35250
|
+
if (clients === void 0) {
|
|
35251
|
+
clients = this.prevClients;
|
|
35252
|
+
}
|
|
35253
|
+
var position = getPosition(clients || this.prevClients, this.prevClients, this.startClients);
|
|
35254
|
+
var deltaX = position.deltaX, deltaY = position.deltaY;
|
|
35255
|
+
this.movement += Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
|
35256
|
+
this.prevClients = clients;
|
|
35257
|
+
return position;
|
|
34916
35258
|
};
|
|
34917
35259
|
__proto.getPositions = function(clients) {
|
|
34918
35260
|
if (clients === void 0) {
|
|
@@ -34951,10 +35293,6 @@ var ClientStore = /* @__PURE__ */ function() {
|
|
|
34951
35293
|
client.clientX -= deltaX;
|
|
34952
35294
|
client.clientY -= deltaY;
|
|
34953
35295
|
});
|
|
34954
|
-
this.prevClients.forEach(function(client) {
|
|
34955
|
-
client.clientX -= deltaX;
|
|
34956
|
-
client.clientY -= deltaY;
|
|
34957
|
-
});
|
|
34958
35296
|
};
|
|
34959
35297
|
return ClientStore2;
|
|
34960
35298
|
}();
|
|
@@ -34978,6 +35316,7 @@ var Gesto = /* @__PURE__ */ function(_super) {
|
|
|
34978
35316
|
_this.targets = [];
|
|
34979
35317
|
_this.prevTime = 0;
|
|
34980
35318
|
_this.doubleFlag = false;
|
|
35319
|
+
_this._dragFlag = false;
|
|
34981
35320
|
_this.onDragStart = function(e, isTrusted) {
|
|
34982
35321
|
if (isTrusted === void 0) {
|
|
34983
35322
|
isTrusted = true;
|
|
@@ -35010,6 +35349,7 @@ var Gesto = /* @__PURE__ */ function(_super) {
|
|
|
35010
35349
|
_this.clientStores = [new ClientStore(getEventClients(e))];
|
|
35011
35350
|
_this.flag = true;
|
|
35012
35351
|
_this.isDrag = false;
|
|
35352
|
+
_this._dragFlag = true;
|
|
35013
35353
|
_this.datas = {};
|
|
35014
35354
|
if (preventRightClick && (e.which === 3 || e.button === 2)) {
|
|
35015
35355
|
_this.initDrag();
|
|
@@ -35021,7 +35361,14 @@ var Gesto = /* @__PURE__ */ function(_super) {
|
|
|
35021
35361
|
inputEvent: e,
|
|
35022
35362
|
isTrusted,
|
|
35023
35363
|
isDouble: _this.doubleFlag
|
|
35024
|
-
}, _this.getCurrentStore().getPosition()
|
|
35364
|
+
}, _this.getCurrentStore().getPosition(), {
|
|
35365
|
+
preventDefault: function() {
|
|
35366
|
+
e.preventDefault();
|
|
35367
|
+
},
|
|
35368
|
+
preventDrag: function() {
|
|
35369
|
+
_this._dragFlag = false;
|
|
35370
|
+
}
|
|
35371
|
+
}));
|
|
35025
35372
|
if (result === false) {
|
|
35026
35373
|
_this.initDrag();
|
|
35027
35374
|
}
|
|
@@ -35057,20 +35404,22 @@ var Gesto = /* @__PURE__ */ function(_super) {
|
|
|
35057
35404
|
}
|
|
35058
35405
|
var clients = getEventClients(e);
|
|
35059
35406
|
var result = _this.moveClients(clients, e, false);
|
|
35060
|
-
if (_this.
|
|
35061
|
-
|
|
35062
|
-
|
|
35063
|
-
|
|
35064
|
-
|
|
35065
|
-
|
|
35066
|
-
|
|
35067
|
-
|
|
35407
|
+
if (_this._dragFlag) {
|
|
35408
|
+
if (_this.pinchFlag || result.deltaX || result.deltaY) {
|
|
35409
|
+
var dragResult = _this.emit("drag", __assign$4({}, result, {
|
|
35410
|
+
isScroll: !!isScroll,
|
|
35411
|
+
inputEvent: e
|
|
35412
|
+
}));
|
|
35413
|
+
if (dragResult === false) {
|
|
35414
|
+
_this.stop();
|
|
35415
|
+
return;
|
|
35416
|
+
}
|
|
35417
|
+
}
|
|
35418
|
+
if (_this.pinchFlag) {
|
|
35419
|
+
_this.onPinch(e, clients);
|
|
35068
35420
|
}
|
|
35069
35421
|
}
|
|
35070
|
-
|
|
35071
|
-
_this.onPinch(e, clients);
|
|
35072
|
-
}
|
|
35073
|
-
_this.getCurrentStore().addClients(clients);
|
|
35422
|
+
_this.getCurrentStore().getPosition(clients, true);
|
|
35074
35423
|
};
|
|
35075
35424
|
_this.onDragEnd = function(e) {
|
|
35076
35425
|
if (!_this.flag) {
|
|
@@ -35081,7 +35430,7 @@ var Gesto = /* @__PURE__ */ function(_super) {
|
|
|
35081
35430
|
removeEvent(container2, "touchstart", _this.onDragStart);
|
|
35082
35431
|
}
|
|
35083
35432
|
_this.flag = false;
|
|
35084
|
-
var position = _this.
|
|
35433
|
+
var position = _this._getPosition();
|
|
35085
35434
|
var currentTime = now();
|
|
35086
35435
|
var isDouble = !_this.isDrag && _this.doubleFlag;
|
|
35087
35436
|
_this.prevTime = _this.isDrag || isDouble ? 0 : currentTime;
|
|
@@ -35199,6 +35548,17 @@ var Gesto = /* @__PURE__ */ function(_super) {
|
|
|
35199
35548
|
}
|
|
35200
35549
|
return this;
|
|
35201
35550
|
};
|
|
35551
|
+
__proto.getCurrentEvent = function(inputEvent) {
|
|
35552
|
+
return __assign$4({
|
|
35553
|
+
datas: this.datas
|
|
35554
|
+
}, this._getPosition(), {
|
|
35555
|
+
movement: this.getMovement(),
|
|
35556
|
+
isDrag: this.isDrag,
|
|
35557
|
+
isPinch: this.isPinch,
|
|
35558
|
+
isScroll: false,
|
|
35559
|
+
inputEvent
|
|
35560
|
+
});
|
|
35561
|
+
};
|
|
35202
35562
|
__proto.getEventDatas = function() {
|
|
35203
35563
|
return this.datas;
|
|
35204
35564
|
};
|
|
@@ -35292,9 +35652,10 @@ var Gesto = /* @__PURE__ */ function(_super) {
|
|
|
35292
35652
|
return this.clientStores[0];
|
|
35293
35653
|
};
|
|
35294
35654
|
__proto.moveClients = function(clients, inputEvent, isAdd) {
|
|
35295
|
-
var
|
|
35296
|
-
|
|
35297
|
-
|
|
35655
|
+
var position = this._getPosition(clients, isAdd);
|
|
35656
|
+
if (position.deltaX || position.deltaY) {
|
|
35657
|
+
this.isDrag = true;
|
|
35658
|
+
}
|
|
35298
35659
|
return __assign$4({
|
|
35299
35660
|
datas: this.datas
|
|
35300
35661
|
}, position, {
|
|
@@ -35305,6 +35666,20 @@ var Gesto = /* @__PURE__ */ function(_super) {
|
|
|
35305
35666
|
inputEvent
|
|
35306
35667
|
});
|
|
35307
35668
|
};
|
|
35669
|
+
__proto._getPosition = function(clients, isAdd) {
|
|
35670
|
+
var store = this.getCurrentStore();
|
|
35671
|
+
var position = store.getPosition(clients, isAdd);
|
|
35672
|
+
var _a3 = this.clientStores.slice(1).reduce(function(prev2, cur) {
|
|
35673
|
+
var storePosition = cur.getPosition();
|
|
35674
|
+
prev2.distX += storePosition.distX;
|
|
35675
|
+
prev2.distY += storePosition.distY;
|
|
35676
|
+
return prev2;
|
|
35677
|
+
}, position), distX = _a3.distX, distY = _a3.distY;
|
|
35678
|
+
return __assign$4({}, position, {
|
|
35679
|
+
distX,
|
|
35680
|
+
distY
|
|
35681
|
+
});
|
|
35682
|
+
};
|
|
35308
35683
|
return Gesto2;
|
|
35309
35684
|
}(EventEmitter$2);
|
|
35310
35685
|
var Gesto$1 = Gesto;
|
|
@@ -35534,12 +35909,14 @@ var extendStatics$1 = function(d2, b2) {
|
|
|
35534
35909
|
d3.__proto__ = b3;
|
|
35535
35910
|
} || function(d3, b3) {
|
|
35536
35911
|
for (var p in b3)
|
|
35537
|
-
if (
|
|
35912
|
+
if (Object.prototype.hasOwnProperty.call(b3, p))
|
|
35538
35913
|
d3[p] = b3[p];
|
|
35539
35914
|
};
|
|
35540
35915
|
return extendStatics$1(d2, b2);
|
|
35541
35916
|
};
|
|
35542
35917
|
function __extends$1(d2, b2) {
|
|
35918
|
+
if (typeof b2 !== "function" && b2 !== null)
|
|
35919
|
+
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
|
|
35543
35920
|
extendStatics$1(d2, b2);
|
|
35544
35921
|
function __() {
|
|
35545
35922
|
this.constructor = d2;
|
|
@@ -35580,13 +35957,16 @@ function __decorate$1(decorators, target, key, desc) {
|
|
|
35580
35957
|
r2 = (c2 < 3 ? d2(r2) : c2 > 3 ? d2(target, key, r2) : d2(target, key)) || r2;
|
|
35581
35958
|
return c2 > 3 && r2 && Object.defineProperty(target, key, r2), r2;
|
|
35582
35959
|
}
|
|
35583
|
-
function
|
|
35584
|
-
|
|
35585
|
-
|
|
35586
|
-
|
|
35587
|
-
|
|
35588
|
-
|
|
35589
|
-
|
|
35960
|
+
function __spreadArray(to, from, pack) {
|
|
35961
|
+
if (pack || arguments.length === 2)
|
|
35962
|
+
for (var i2 = 0, l2 = from.length, ar; i2 < l2; i2++) {
|
|
35963
|
+
if (ar || !(i2 in from)) {
|
|
35964
|
+
if (!ar)
|
|
35965
|
+
ar = Array.prototype.slice.call(from, 0, i2);
|
|
35966
|
+
ar[i2] = from[i2];
|
|
35967
|
+
}
|
|
35968
|
+
}
|
|
35969
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
35590
35970
|
}
|
|
35591
35971
|
function makeAble(name, able) {
|
|
35592
35972
|
var _a3;
|
|
@@ -35601,7 +35981,6 @@ function getSVGCursor(scale, degree) {
|
|
|
35601
35981
|
}
|
|
35602
35982
|
function getCursorCSS(degree) {
|
|
35603
35983
|
var x1 = getSVGCursor(1, degree);
|
|
35604
|
-
var x2 = getSVGCursor(2, degree);
|
|
35605
35984
|
var degree45 = Math.round(degree / 45) * 45 % 180;
|
|
35606
35985
|
var defaultCursor = "ns-resize";
|
|
35607
35986
|
if (degree45 === 135) {
|
|
@@ -35611,7 +35990,7 @@ function getCursorCSS(degree) {
|
|
|
35611
35990
|
} else if (degree45 === 90) {
|
|
35612
35991
|
defaultCursor = "ew-resize";
|
|
35613
35992
|
}
|
|
35614
|
-
return "cursor:" + defaultCursor + ";cursor: url('" + x1 + "') 16 16, " + defaultCursor + ";
|
|
35993
|
+
return "cursor:" + defaultCursor + ";cursor: url('" + x1 + "') 16 16, " + defaultCursor + ";";
|
|
35615
35994
|
}
|
|
35616
35995
|
var agent = agent$1();
|
|
35617
35996
|
var IS_WEBKIT = agent.browser.webkit;
|
|
@@ -35653,7 +36032,7 @@ var DIRECTION_ROTATIONS = {
|
|
|
35653
36032
|
sw: 225,
|
|
35654
36033
|
se: 135
|
|
35655
36034
|
};
|
|
35656
|
-
var MOVEABLE_METHODS = ["isMoveableElement", "updateRect", "updateTarget", "destroy", "dragStart", "isInside", "hitTest", "setState", "getRect", "request", "isDragging", "getManager"];
|
|
36035
|
+
var MOVEABLE_METHODS = ["isMoveableElement", "updateRect", "updateTarget", "destroy", "dragStart", "isInside", "hitTest", "setState", "getRect", "request", "isDragging", "getManager", "forceUpdate"];
|
|
35657
36036
|
function multiply2(pos1, pos2) {
|
|
35658
36037
|
return [pos1[0] * pos2[0], pos1[1] * pos2[1]];
|
|
35659
36038
|
}
|
|
@@ -35662,7 +36041,7 @@ function prefix() {
|
|
|
35662
36041
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
35663
36042
|
classNames[_i] = arguments[_i];
|
|
35664
36043
|
}
|
|
35665
|
-
return prefixNames.apply(void 0,
|
|
36044
|
+
return prefixNames.apply(void 0, __spreadArray([PREFIX], classNames));
|
|
35666
36045
|
}
|
|
35667
36046
|
function getTransformMatrix(transform) {
|
|
35668
36047
|
if (!transform || transform === "none") {
|
|
@@ -35957,11 +36336,12 @@ function calculateElementInfo(target, container, rootContainer, isAbsolute3d) {
|
|
|
35957
36336
|
}, allResult);
|
|
35958
36337
|
}
|
|
35959
36338
|
function calculateMatrixStack(target, container, rootContainer, isAbsolute3d) {
|
|
36339
|
+
var _a3;
|
|
35960
36340
|
if (rootContainer === void 0) {
|
|
35961
36341
|
rootContainer = container;
|
|
35962
36342
|
}
|
|
35963
|
-
var
|
|
35964
|
-
var
|
|
36343
|
+
var _b3 = getMatrixStackInfo(target, container), matrixes = _b3.matrixes, is3d = _b3.is3d, prevTargetMatrix = _b3.targetMatrix, transformOrigin = _b3.transformOrigin, targetOrigin = _b3.targetOrigin, offsetContainer = _b3.offsetContainer;
|
|
36344
|
+
var _c3 = getMatrixStackInfo(offsetContainer, rootContainer, true), rootMatrixes = _c3.matrixes, isRoot3d = _c3.is3d;
|
|
35965
36345
|
var isNext3d = isAbsolute3d || isRoot3d || is3d;
|
|
35966
36346
|
var n = isNext3d ? 4 : 3;
|
|
35967
36347
|
var isSVGGraphicElement = target.tagName.toLowerCase() !== "svg" && "ownerSVGElement" in target;
|
|
@@ -35971,8 +36351,6 @@ function calculateMatrixStack(target, container, rootContainer, isAbsolute3d) {
|
|
|
35971
36351
|
var beforeMatrix = createIdentityMatrix(n);
|
|
35972
36352
|
var offsetMatrix = createIdentityMatrix(n);
|
|
35973
36353
|
var length2 = matrixes.length;
|
|
35974
|
-
var originalRootContainer = rootContainer || document.body;
|
|
35975
|
-
var endContainer = getOffsetInfo(originalRootContainer, originalRootContainer, true).offsetParent;
|
|
35976
36354
|
rootMatrixes.reverse();
|
|
35977
36355
|
matrixes.reverse();
|
|
35978
36356
|
if (!is3d && isNext3d) {
|
|
@@ -35985,6 +36363,11 @@ function calculateMatrixStack(target, container, rootContainer, isAbsolute3d) {
|
|
|
35985
36363
|
rootMatrixes.forEach(function(info) {
|
|
35986
36364
|
rootMatrix = multiply(rootMatrix, info.matrix, n);
|
|
35987
36365
|
});
|
|
36366
|
+
var originalRootContainer = rootContainer || document.body;
|
|
36367
|
+
var endContainer = ((_a3 = rootMatrixes[0]) === null || _a3 === void 0 ? void 0 : _a3.target) || getOffsetInfo(originalRootContainer, originalRootContainer, true).offsetParent;
|
|
36368
|
+
var rootMatrixBeforeOffset = rootMatrixes.slice(1).reduce(function(matrix, info) {
|
|
36369
|
+
return multiply(matrix, info.matrix, n);
|
|
36370
|
+
}, createIdentityMatrix(n));
|
|
35988
36371
|
matrixes.forEach(function(info, i2) {
|
|
35989
36372
|
if (length2 - 2 === i2) {
|
|
35990
36373
|
beforeMatrix = allMatrix.slice();
|
|
@@ -35994,7 +36377,7 @@ function calculateMatrixStack(target, container, rootContainer, isAbsolute3d) {
|
|
|
35994
36377
|
}
|
|
35995
36378
|
if (!info.matrix) {
|
|
35996
36379
|
var nextInfo = matrixes[i2 + 1];
|
|
35997
|
-
var offset = getSVGOffset(info, nextInfo, endContainer, n, multiply(
|
|
36380
|
+
var offset = getSVGOffset(info, nextInfo, endContainer, n, multiply(rootMatrixBeforeOffset, allMatrix, n));
|
|
35998
36381
|
info.matrix = createOriginMatrix(offset, n);
|
|
35999
36382
|
}
|
|
36000
36383
|
allMatrix = multiply(allMatrix, info.matrix, n);
|
|
@@ -36376,10 +36759,9 @@ function roundSign(num) {
|
|
|
36376
36759
|
return Math.round(num % 1 === -0.5 ? num - 1 : num);
|
|
36377
36760
|
}
|
|
36378
36761
|
function unset(self2, name) {
|
|
36379
|
-
|
|
36380
|
-
|
|
36381
|
-
|
|
36382
|
-
}
|
|
36762
|
+
var _a3;
|
|
36763
|
+
(_a3 = self2[name]) === null || _a3 === void 0 ? void 0 : _a3.unset();
|
|
36764
|
+
self2[name] = null;
|
|
36383
36765
|
}
|
|
36384
36766
|
function fillParams(moveable, e, params) {
|
|
36385
36767
|
var datas = e.datas;
|
|
@@ -36663,7 +37045,7 @@ function getRefTargets(targets, isSelector) {
|
|
|
36663
37045
|
var userTargets = isArrayFormat(targets) ? [].slice.call(targets) : [targets];
|
|
36664
37046
|
return userTargets.reduce(function(prev2, target) {
|
|
36665
37047
|
if (isString(target) && isSelector) {
|
|
36666
|
-
return
|
|
37048
|
+
return __spreadArray(__spreadArray([], prev2), [].slice.call(document.querySelectorAll(target)));
|
|
36667
37049
|
}
|
|
36668
37050
|
prev2.push(getRefTarget(target, isSelector));
|
|
36669
37051
|
return prev2;
|
|
@@ -37014,9 +37396,15 @@ function resolveTransformEvent(event, functionName) {
|
|
|
37014
37396
|
var index = datas.transformIndex;
|
|
37015
37397
|
var nextTransforms = originalDatas.nextTransforms;
|
|
37016
37398
|
var nextTransformAppendedIndexes = originalDatas.nextTransformAppendedIndexes;
|
|
37017
|
-
var nextIndex =
|
|
37018
|
-
|
|
37019
|
-
|
|
37399
|
+
var nextIndex = 0;
|
|
37400
|
+
if (index === -1) {
|
|
37401
|
+
nextIndex = nextTransforms.length;
|
|
37402
|
+
datas.transformIndex = nextIndex;
|
|
37403
|
+
} else {
|
|
37404
|
+
nextIndex = index + nextTransformAppendedIndexes.filter(function(i2) {
|
|
37405
|
+
return i2 < index;
|
|
37406
|
+
}).length;
|
|
37407
|
+
}
|
|
37020
37408
|
var result = getTransform(nextTransforms, nextIndex);
|
|
37021
37409
|
var targetFunction = result.targetFunction;
|
|
37022
37410
|
var matFunctionName = functionName === "rotate" ? "rotateZ" : functionName;
|
|
@@ -37033,7 +37421,7 @@ function resolveTransformEvent(event, functionName) {
|
|
|
37033
37421
|
datas.isAppendTransform = false;
|
|
37034
37422
|
} else {
|
|
37035
37423
|
datas.isAppendTransform = true;
|
|
37036
|
-
originalDatas.nextTransformAppendedIndexes =
|
|
37424
|
+
originalDatas.nextTransformAppendedIndexes = __spreadArray(__spreadArray([], nextTransformAppendedIndexes), [nextIndex]);
|
|
37037
37425
|
}
|
|
37038
37426
|
}
|
|
37039
37427
|
function convertTransformFormat(datas, value, dist) {
|
|
@@ -37200,6 +37588,10 @@ function fillOriginalTransform(e, transform) {
|
|
|
37200
37588
|
var originalDatas = e.originalDatas.beforeRenderable;
|
|
37201
37589
|
originalDatas.nextTransforms = splitSpace(transform);
|
|
37202
37590
|
}
|
|
37591
|
+
function getNextTransformText(e) {
|
|
37592
|
+
var originalDatas = e.originalDatas.beforeRenderable;
|
|
37593
|
+
return originalDatas.nextTransforms.join(" ");
|
|
37594
|
+
}
|
|
37203
37595
|
function fillTransformEvent(moveable, nextTransform, delta, isPinch, e) {
|
|
37204
37596
|
fillOriginalTransform(e, nextTransform);
|
|
37205
37597
|
return {
|
|
@@ -37572,7 +37964,7 @@ function getTotalGuidelines(moveable) {
|
|
|
37572
37964
|
var _a3 = moveable.state, snapOffset = _a3.snapOffset, _b3 = _a3.containerClientRect, overflow = _b3.overflow, containerHeight = _b3.scrollHeight, containerWidth = _b3.scrollWidth, containerClientHeight = _b3.clientHeight, containerClientWidth = _b3.clientWidth, clientLeft = _b3.clientLeft, clientTop = _b3.clientTop;
|
|
37573
37965
|
var _c3 = moveable.props, _d2 = _c3.snapGap, snapGap = _d2 === void 0 ? true : _d2, verticalGuidelines = _c3.verticalGuidelines, horizontalGuidelines = _c3.horizontalGuidelines, _e = _c3.snapThreshold, snapThreshold = _e === void 0 ? 5 : _e, _f = _c3.snapGridWidth, snapGridWidth = _f === void 0 ? 0 : _f, _g = _c3.snapGridHeight, snapGridHeight = _g === void 0 ? 0 : _g;
|
|
37574
37966
|
var elementGuidelines = getElementGuidelines(moveable);
|
|
37575
|
-
var totalGuidelines =
|
|
37967
|
+
var totalGuidelines = __spreadArray([], elementGuidelines);
|
|
37576
37968
|
if (snapGap) {
|
|
37577
37969
|
var _h = getRect(getAbsolutePosesByState(moveable.state)), top = _h.top, left = _h.left, bottom = _h.bottom, right = _h.right;
|
|
37578
37970
|
totalGuidelines.push.apply(totalGuidelines, getGapGuidelines(moveable, {
|
|
@@ -38131,7 +38523,7 @@ function isBoundRotate(relativePoses, boundDots, center, rad) {
|
|
|
38131
38523
|
var nextPoses = rad ? relativePoses.map(function(pos) {
|
|
38132
38524
|
return rotate(pos, rad);
|
|
38133
38525
|
}) : relativePoses;
|
|
38134
|
-
var dots =
|
|
38526
|
+
var dots = __spreadArray([center], boundDots);
|
|
38135
38527
|
return [[nextPoses[0], nextPoses[1]], [nextPoses[1], nextPoses[3]], [nextPoses[3], nextPoses[2]], [nextPoses[2], nextPoses[0]]].some(function(line) {
|
|
38136
38528
|
return !isSameStartLine(dots, line);
|
|
38137
38529
|
});
|
|
@@ -38483,7 +38875,7 @@ function renderGuideline(info, React) {
|
|
|
38483
38875
|
}
|
|
38484
38876
|
function renderInnerGuideline(info, React) {
|
|
38485
38877
|
return renderGuideline(__assign$2(__assign$2({}, info), {
|
|
38486
|
-
classNames:
|
|
38878
|
+
classNames: __spreadArray([prefix("line", "guideline", info.direction)], info.classNames).filter(function(className) {
|
|
38487
38879
|
return className;
|
|
38488
38880
|
}),
|
|
38489
38881
|
size: info.size || info.sizeValue + "px",
|
|
@@ -38707,11 +39099,11 @@ function renderGapGuidelines(moveable, guidelines, targetPos, targetRect, React)
|
|
|
38707
39099
|
var targetSideEnd = targetRect[sideNames.end];
|
|
38708
39100
|
nextGuidelines.forEach(function(_a3) {
|
|
38709
39101
|
var gap = _a3.gap, gapRects = _a3.gapRects, className = _a3.className;
|
|
38710
|
-
var sideStartPos = Math.max.apply(Math,
|
|
39102
|
+
var sideStartPos = Math.max.apply(Math, __spreadArray([targetSideStart], gapRects.map(function(_a4) {
|
|
38711
39103
|
var rect = _a4.rect;
|
|
38712
39104
|
return rect[sideNames.start];
|
|
38713
39105
|
})));
|
|
38714
|
-
var sideEndPos = Math.min.apply(Math,
|
|
39106
|
+
var sideEndPos = Math.min.apply(Math, __spreadArray([targetSideEnd], gapRects.map(function(_a4) {
|
|
38715
39107
|
var rect = _a4.rect;
|
|
38716
39108
|
return rect[sideNames.end];
|
|
38717
39109
|
})));
|
|
@@ -39145,7 +39537,7 @@ function getNextFixedPoses(matrix, width, height, fixedPos, direction, is3d) {
|
|
|
39145
39537
|
function getSizeOffsetInfo(moveable, poses, direction, keepRatio, isRequest, datas) {
|
|
39146
39538
|
var directions = getCheckSnapDirections(direction, keepRatio);
|
|
39147
39539
|
var lines = getCheckInnerBoundLines(poses, direction, keepRatio);
|
|
39148
|
-
var offsets =
|
|
39540
|
+
var offsets = __spreadArray(__spreadArray([], getSnapBoundInfo(moveable, poses, directions, keepRatio, isRequest, datas)), getInnerBoundInfo(moveable, lines, getPosByDirection(poses, [0, 0]), datas));
|
|
39149
39541
|
var widthOffsetInfo = getNearOffsetInfo(offsets, 0);
|
|
39150
39542
|
var heightOffsetInfo = getNearOffsetInfo(offsets, 1);
|
|
39151
39543
|
return {
|
|
@@ -39237,7 +39629,7 @@ function checkSnapRotate(moveable, rect, origin, rotation) {
|
|
|
39237
39629
|
var nextPoses = prevPoses.map(function(pos) {
|
|
39238
39630
|
return rotate(pos, rad);
|
|
39239
39631
|
});
|
|
39240
|
-
var result =
|
|
39632
|
+
var result = __spreadArray(__spreadArray([], checkRotateBounds(moveable, prevPoses, nextPoses, origin, rotation)), checkRotateInnerBounds(moveable, prevPoses, nextPoses, origin, rotation));
|
|
39241
39633
|
result.sort(function(a2, b2) {
|
|
39242
39634
|
return Math.abs(a2 - rotation) - Math.abs(b2 - rotation);
|
|
39243
39635
|
});
|
|
@@ -39329,6 +39721,7 @@ function addBoundGuidelines(moveable, verticalPoses, horizontalPoses, verticalSn
|
|
|
39329
39721
|
}
|
|
39330
39722
|
var Snappable = {
|
|
39331
39723
|
name: "snappable",
|
|
39724
|
+
dragRelation: "strong",
|
|
39332
39725
|
props: {
|
|
39333
39726
|
snappable: [Boolean, Array],
|
|
39334
39727
|
snapContainer: Object,
|
|
@@ -39432,7 +39825,7 @@ var Snappable = {
|
|
|
39432
39825
|
if (hasExternalPoses) {
|
|
39433
39826
|
addBoundGuidelines(moveable, [externalRect.left, externalRect.right], [externalRect.top, externalRect.bottom], verticalSnapPoses, horizontalSnapPoses, snapRenderInfo.externalBounds);
|
|
39434
39827
|
}
|
|
39435
|
-
var allGuidelines =
|
|
39828
|
+
var allGuidelines = __spreadArray(__spreadArray([], verticalGuidelines), horizontalGuidelines);
|
|
39436
39829
|
var elementGuidelines = allGuidelines.filter(function(guideline) {
|
|
39437
39830
|
return guideline.element && !guideline.gapRects;
|
|
39438
39831
|
});
|
|
@@ -39447,7 +39840,7 @@ var Snappable = {
|
|
|
39447
39840
|
elements: elementGuidelines,
|
|
39448
39841
|
gaps: gapGuidelines
|
|
39449
39842
|
}, true);
|
|
39450
|
-
return
|
|
39843
|
+
return __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], renderDashedGuidelines(moveable, elementGuidelines, [minLeft, minTop], targetRect, React)), renderGapGuidelines(moveable, gapGuidelines, [minLeft, minTop], targetRect, React)), renderGuidelines(moveable, "horizontal", horizontalGuidelines, [targetLeft, targetTop], targetRect, React)), renderGuidelines(moveable, "vertical", verticalGuidelines, [targetLeft, targetTop], targetRect, React)), renderSnapPoses(moveable, "horizontal", horizontalSnapPoses, minLeft, targetTop, width, 0, React)), renderSnapPoses(moveable, "vertical", verticalSnapPoses, minTop, targetLeft, height, 1, React));
|
|
39451
39844
|
},
|
|
39452
39845
|
dragStart: function(moveable, e) {
|
|
39453
39846
|
moveable.state.snapRenderInfo = {
|
|
@@ -39655,6 +40048,7 @@ var Draggable = {
|
|
|
39655
40048
|
var right = datas.right - beforeDist[0];
|
|
39656
40049
|
var bottom = datas.bottom - beforeDist[1];
|
|
39657
40050
|
var nextTransform = convertTransformFormat(datas, "translate(" + translate[0] + "px, " + translate[1] + "px)", "translate(" + dist[0] + "px, " + dist[1] + "px)");
|
|
40051
|
+
fillOriginalTransform(e, nextTransform);
|
|
39658
40052
|
moveable.state.dragInfo.dist = parentEvent ? [0, 0] : dist;
|
|
39659
40053
|
if (!parentEvent && !parentMoveable && delta.every(function(num) {
|
|
39660
40054
|
return !num;
|
|
@@ -39688,22 +40082,23 @@ var Draggable = {
|
|
|
39688
40082
|
var _a3 = e.datas, deltaOffset = _a3.deltaOffset, distOffset = _a3.distOffset;
|
|
39689
40083
|
if (deltaOffset[0] || deltaOffset[1]) {
|
|
39690
40084
|
datas.deltaOffset = [0, 0];
|
|
39691
|
-
distOffset[0]
|
|
39692
|
-
distOffset[1]
|
|
40085
|
+
distOffset[0] = deltaOffset[0];
|
|
40086
|
+
distOffset[1] = deltaOffset[1];
|
|
39693
40087
|
return this.drag(moveable, e);
|
|
39694
40088
|
}
|
|
39695
40089
|
return false;
|
|
39696
40090
|
},
|
|
39697
40091
|
dragEnd: function(moveable, e) {
|
|
39698
|
-
var parentEvent = e.parentEvent, datas = e.datas
|
|
40092
|
+
var parentEvent = e.parentEvent, datas = e.datas;
|
|
39699
40093
|
moveable.state.gesto = null;
|
|
39700
40094
|
moveable.state.dragInfo = null;
|
|
39701
40095
|
if (!datas.isDrag) {
|
|
39702
40096
|
return;
|
|
39703
40097
|
}
|
|
39704
40098
|
datas.isDrag = false;
|
|
39705
|
-
|
|
39706
|
-
|
|
40099
|
+
var param = fillEndParams(moveable, e, {});
|
|
40100
|
+
!parentEvent && triggerEvent(moveable, "onDragEnd", param);
|
|
40101
|
+
return param;
|
|
39707
40102
|
},
|
|
39708
40103
|
dragGroupStart: function(moveable, e) {
|
|
39709
40104
|
var datas = e.datas, clientX = e.clientX, clientY = e.clientY;
|
|
@@ -39744,9 +40139,10 @@ var Draggable = {
|
|
|
39744
40139
|
return;
|
|
39745
40140
|
}
|
|
39746
40141
|
this.dragEnd(moveable, e);
|
|
39747
|
-
triggerChildGesto(moveable, this, "dragEnd", [0, 0], e, false);
|
|
40142
|
+
var events = triggerChildGesto(moveable, this, "dragEnd", [0, 0], e, false);
|
|
39748
40143
|
triggerEvent(moveable, "onDragGroupEnd", fillEndParams(moveable, e, {
|
|
39749
|
-
targets: moveable.props.targets
|
|
40144
|
+
targets: moveable.props.targets,
|
|
40145
|
+
events
|
|
39750
40146
|
}));
|
|
39751
40147
|
return isDrag;
|
|
39752
40148
|
},
|
|
@@ -39795,7 +40191,7 @@ function renderDirectionControls(moveable, defaultDirections, React, additionalC
|
|
|
39795
40191
|
if (additionalClassName === void 0) {
|
|
39796
40192
|
additionalClassName = "";
|
|
39797
40193
|
}
|
|
39798
|
-
var _a3 = moveable.state, renderPoses = _a3.renderPoses,
|
|
40194
|
+
var _a3 = moveable.state, renderPoses = _a3.renderPoses, rotationRad = _a3.rotation, direction = _a3.direction;
|
|
39799
40195
|
var _b3 = moveable.props, _c3 = _b3.renderDirections, directions = _c3 === void 0 ? defaultDirections : _c3, zoom = _b3.zoom;
|
|
39800
40196
|
var directionMap = {};
|
|
39801
40197
|
if (!directions) {
|
|
@@ -39803,7 +40199,7 @@ function renderDirectionControls(moveable, defaultDirections, React, additionalC
|
|
|
39803
40199
|
}
|
|
39804
40200
|
var sign2 = direction > 0 ? 1 : -1;
|
|
39805
40201
|
var renderDirections = directions === true ? DIRECTIONS : directions;
|
|
39806
|
-
var degRotation =
|
|
40202
|
+
var degRotation = rotationRad / Math.PI * 180;
|
|
39807
40203
|
renderDirections.forEach(function(dir) {
|
|
39808
40204
|
directionMap[dir] = true;
|
|
39809
40205
|
});
|
|
@@ -39818,7 +40214,7 @@ function renderDirectionControls(moveable, defaultDirections, React, additionalC
|
|
|
39818
40214
|
"data-rotation": directionRotation,
|
|
39819
40215
|
"data-direction": dir,
|
|
39820
40216
|
key: "direction-" + dir,
|
|
39821
|
-
style: getControlTransform.apply(void 0,
|
|
40217
|
+
style: getControlTransform.apply(void 0, __spreadArray([rotationRad, zoom], indexes.map(function(index) {
|
|
39822
40218
|
return renderPoses[index];
|
|
39823
40219
|
})))
|
|
39824
40220
|
});
|
|
@@ -39833,7 +40229,7 @@ function renderLine(React, direction, pos1, pos2, zoom, key) {
|
|
|
39833
40229
|
var rotation = direction ? throttle(rad / Math.PI * 180, 15) % 180 : -1;
|
|
39834
40230
|
return React.createElement("div", {
|
|
39835
40231
|
key: "line" + key,
|
|
39836
|
-
className: prefix.apply(void 0,
|
|
40232
|
+
className: prefix.apply(void 0, __spreadArray(["line", "direction", direction], classNames)),
|
|
39837
40233
|
"data-rotation": rotation,
|
|
39838
40234
|
"data-line-index": key,
|
|
39839
40235
|
"data-direction": direction,
|
|
@@ -40103,13 +40499,14 @@ var Rotatable = {
|
|
|
40103
40499
|
return params;
|
|
40104
40500
|
},
|
|
40105
40501
|
dragControlEnd: function(moveable, e) {
|
|
40106
|
-
var datas = e.datas
|
|
40502
|
+
var datas = e.datas;
|
|
40107
40503
|
if (!datas.isRotate) {
|
|
40108
|
-
return
|
|
40504
|
+
return;
|
|
40109
40505
|
}
|
|
40110
40506
|
datas.isRotate = false;
|
|
40111
|
-
|
|
40112
|
-
|
|
40507
|
+
var params = fillEndParams(moveable, e, {});
|
|
40508
|
+
triggerEvent(moveable, "onRotateEnd", params);
|
|
40509
|
+
return params;
|
|
40113
40510
|
},
|
|
40114
40511
|
dragGroupControlCondition: dragControlCondition,
|
|
40115
40512
|
dragGroupControlStart: function(moveable, e) {
|
|
@@ -40176,9 +40573,10 @@ var Rotatable = {
|
|
|
40176
40573
|
return;
|
|
40177
40574
|
}
|
|
40178
40575
|
this.dragControlEnd(moveable, e);
|
|
40179
|
-
triggerChildAbles(moveable, this, "dragControlEnd", e);
|
|
40576
|
+
var events = triggerChildAbles(moveable, this, "dragControlEnd", e);
|
|
40180
40577
|
var nextParams = fillEndParams(moveable, e, {
|
|
40181
|
-
targets: moveable.props.targets
|
|
40578
|
+
targets: moveable.props.targets,
|
|
40579
|
+
events
|
|
40182
40580
|
});
|
|
40183
40581
|
triggerEvent(moveable, "onRotateGroupEnd", nextParams);
|
|
40184
40582
|
return isDrag;
|
|
@@ -40392,7 +40790,7 @@ var Resizable = {
|
|
|
40392
40790
|
distHeight = Math.sin(ratioRad) * distSize;
|
|
40393
40791
|
}
|
|
40394
40792
|
} else if (!keepRatio) {
|
|
40395
|
-
var nextDirection =
|
|
40793
|
+
var nextDirection = __spreadArray([], direction);
|
|
40396
40794
|
if (!startOffsetWidth) {
|
|
40397
40795
|
if (dist[0] < 0) {
|
|
40398
40796
|
nextDirection[0] = -1;
|
|
@@ -40521,19 +40919,18 @@ var Resizable = {
|
|
|
40521
40919
|
datas.prevHeight += errorHeight;
|
|
40522
40920
|
}
|
|
40523
40921
|
if (isErrorWidth || isErrorHeight) {
|
|
40524
|
-
this.dragControl(moveable, e);
|
|
40525
|
-
return true;
|
|
40922
|
+
return this.dragControl(moveable, e);
|
|
40526
40923
|
}
|
|
40527
40924
|
},
|
|
40528
40925
|
dragControlEnd: function(moveable, e) {
|
|
40529
|
-
var datas = e.datas
|
|
40926
|
+
var datas = e.datas;
|
|
40530
40927
|
if (!datas.isResize) {
|
|
40531
|
-
return
|
|
40928
|
+
return;
|
|
40532
40929
|
}
|
|
40533
40930
|
datas.isResize = false;
|
|
40534
40931
|
var params = fillEndParams(moveable, e, {});
|
|
40535
40932
|
triggerEvent(moveable, "onResizeEnd", params);
|
|
40536
|
-
return
|
|
40933
|
+
return params;
|
|
40537
40934
|
},
|
|
40538
40935
|
dragGroupControlCondition: directionCondition,
|
|
40539
40936
|
dragGroupControlStart: function(moveable, e) {
|
|
@@ -40605,9 +41002,10 @@ var Resizable = {
|
|
|
40605
41002
|
return;
|
|
40606
41003
|
}
|
|
40607
41004
|
this.dragControlEnd(moveable, e);
|
|
40608
|
-
triggerChildAbles(moveable, this, "dragControlEnd", e);
|
|
41005
|
+
var events = triggerChildAbles(moveable, this, "dragControlEnd", e);
|
|
40609
41006
|
var nextParams = fillEndParams(moveable, e, {
|
|
40610
|
-
targets: moveable.props.targets
|
|
41007
|
+
targets: moveable.props.targets,
|
|
41008
|
+
events
|
|
40611
41009
|
});
|
|
40612
41010
|
triggerEvent(moveable, "onResizeGroupEnd", nextParams);
|
|
40613
41011
|
return isDrag;
|
|
@@ -40964,9 +41362,10 @@ var Scalable = {
|
|
|
40964
41362
|
return;
|
|
40965
41363
|
}
|
|
40966
41364
|
this.dragControlEnd(moveable, e);
|
|
40967
|
-
triggerChildAbles(moveable, this, "dragControlEnd", e);
|
|
41365
|
+
var events = triggerChildAbles(moveable, this, "dragControlEnd", e);
|
|
40968
41366
|
var nextParams = fillEndParams(moveable, e, {
|
|
40969
|
-
targets: moveable.props.targets
|
|
41367
|
+
targets: moveable.props.targets,
|
|
41368
|
+
events
|
|
40970
41369
|
});
|
|
40971
41370
|
triggerEvent(moveable, "onScaleGroupEnd", nextParams);
|
|
40972
41371
|
return isDrag;
|
|
@@ -41046,7 +41445,7 @@ var Warpable = {
|
|
|
41046
41445
|
var linePosTo2 = getMiddleLinePos(pos4, pos3);
|
|
41047
41446
|
var linePosTo3 = getMiddleLinePos(pos2, pos4);
|
|
41048
41447
|
var linePosTo4 = getMiddleLinePos(pos4, pos2);
|
|
41049
|
-
return
|
|
41448
|
+
return __spreadArray([React.createElement("div", {
|
|
41050
41449
|
className: prefix("line"),
|
|
41051
41450
|
key: "middeLine1",
|
|
41052
41451
|
style: getLineStyle(linePosFrom1, linePosTo1, zoom)
|
|
@@ -41333,7 +41732,7 @@ var DragArea = {
|
|
|
41333
41732
|
enableNativeEvent: function(moveable) {
|
|
41334
41733
|
var state = moveable.state;
|
|
41335
41734
|
if (state.disableNativeEvent) {
|
|
41336
|
-
requestAnimationFrame(function() {
|
|
41735
|
+
requestAnimationFrame$1(function() {
|
|
41337
41736
|
state.disableNativeEvent = false;
|
|
41338
41737
|
});
|
|
41339
41738
|
}
|
|
@@ -41367,6 +41766,7 @@ var Scrollable = {
|
|
|
41367
41766
|
onScroll: "scroll",
|
|
41368
41767
|
onScrollGroup: "scrollGroup"
|
|
41369
41768
|
},
|
|
41769
|
+
dragRelation: "strong",
|
|
41370
41770
|
dragStart: function(moveable, e) {
|
|
41371
41771
|
var props = moveable.props;
|
|
41372
41772
|
var _a3 = props.scrollContainer, scrollContainer = _a3 === void 0 ? moveable.getContainer() : _a3;
|
|
@@ -41470,6 +41870,7 @@ var Default = {
|
|
|
41470
41870
|
container: Object,
|
|
41471
41871
|
portalContainer: Object,
|
|
41472
41872
|
rootContainer: Object,
|
|
41873
|
+
useResizeObserver: Boolean,
|
|
41473
41874
|
zoom: Number,
|
|
41474
41875
|
transformOrigin: Array,
|
|
41475
41876
|
edge: Boolean,
|
|
@@ -41630,7 +42031,7 @@ function getRadiusValues(values, width, height, left, top, minCounts) {
|
|
|
41630
42031
|
_d2 = calculateRatio([verticalPoses[1], verticalPoses[2]], height), verticalPoses[1] = _d2[0], verticalPoses[2] = _d2[1];
|
|
41631
42032
|
var nextHorizontalPoses = horizontalPoses.slice(0, Math.max(minCounts[0], horizontalValues.length));
|
|
41632
42033
|
var nextVerticalPoses = verticalPoses.slice(0, Math.max(minCounts[1], verticalValues.length));
|
|
41633
|
-
return
|
|
42034
|
+
return __spreadArray(__spreadArray([], nextHorizontalPoses.map(function(pos, i2) {
|
|
41634
42035
|
var direction = RADIUS_DIRECTIONS[i2];
|
|
41635
42036
|
return {
|
|
41636
42037
|
horizontal: HORIZONTAL_RADIUS_DIRECTIONS[i2],
|
|
@@ -41640,7 +42041,7 @@ function getRadiusValues(values, width, height, left, top, minCounts) {
|
|
|
41640
42041
|
raw: horizontalRawPoses[i2],
|
|
41641
42042
|
direction
|
|
41642
42043
|
};
|
|
41643
|
-
}), nextVerticalPoses.map(function(pos, i2) {
|
|
42044
|
+
})), nextVerticalPoses.map(function(pos, i2) {
|
|
41644
42045
|
var direction = RADIUS_DIRECTIONS[i2];
|
|
41645
42046
|
return {
|
|
41646
42047
|
horizontal: 0,
|
|
@@ -41785,7 +42186,7 @@ function getClipStyles(moveable, clipPath, poses) {
|
|
|
41785
42186
|
});
|
|
41786
42187
|
if (poses.length > 8) {
|
|
41787
42188
|
var _c3 = minus(poses[4], poses[0]), subWidth = _c3[0], subHeight = _c3[1];
|
|
41788
|
-
clipStyles.push.apply(clipStyles,
|
|
42189
|
+
clipStyles.push.apply(clipStyles, __spreadArray(["round"], getRadiusStyles(poses.slice(8), clipPoses.slice(8), clipRelative, subWidth, subHeight, left, top, right, bottom).styles));
|
|
41789
42190
|
}
|
|
41790
42191
|
return clipStyles;
|
|
41791
42192
|
} else if (isCircle || clipType === "ellipse") {
|
|
@@ -41864,7 +42265,7 @@ function getClipPath(target, width, height, defaultClip, customClip) {
|
|
|
41864
42265
|
radiusY_1 = convertUnitSize(yRadius, height);
|
|
41865
42266
|
}
|
|
41866
42267
|
var centerPos_1 = [convertUnitSize(xPos, width), convertUnitSize(yPos, height)];
|
|
41867
|
-
var poses =
|
|
42268
|
+
var poses = __spreadArray([{
|
|
41868
42269
|
vertical: 1,
|
|
41869
42270
|
horizontal: 1,
|
|
41870
42271
|
pos: centerPos_1,
|
|
@@ -41903,7 +42304,7 @@ function getClipPath(target, width, height, defaultClip, customClip) {
|
|
|
41903
42304
|
var nextRight = width - right;
|
|
41904
42305
|
var nextBottom = height - bottom;
|
|
41905
42306
|
var radiusPoses = getRadiusValues(radiusValues, nextRight - left, nextBottom - top, left, top);
|
|
41906
|
-
var poses =
|
|
42307
|
+
var poses = __spreadArray(__spreadArray([], getRectPoses(top, nextRight, nextBottom, left)), radiusPoses);
|
|
41907
42308
|
return {
|
|
41908
42309
|
type: "inset",
|
|
41909
42310
|
clipText,
|
|
@@ -42022,7 +42423,7 @@ var Clippable = {
|
|
|
42022
42423
|
css: [".control.clip-control {\n background: #6d6;\n cursor: pointer;\n}\n.control.clip-control.clip-radius {\n background: #d66;\n}\n.line.clip-line {\n background: #6e6;\n cursor: move;\n z-index: 1;\n}\n.clip-area {\n position: absolute;\n top: 0;\n left: 0;\n}\n.clip-ellipse {\n position: absolute;\n cursor: move;\n border: 1px solid #6d6;\n border: var(--zoompx) solid #6d6;\n border-radius: 50%;\n transform-origin: 0px 0px;\n}", ":host {\n --bounds-color: #d66;\n}", ".guideline {\n pointer-events: none;\n z-index: 2;\n}", ".line.guideline.bounds {\n background: #d66;\n background: var(--bounds-color);\n}"],
|
|
42023
42424
|
render: function(moveable, React) {
|
|
42024
42425
|
var _a3 = moveable.props, customClipPath = _a3.customClipPath, defaultClipPath = _a3.defaultClipPath, clipArea = _a3.clipArea, zoom = _a3.zoom;
|
|
42025
|
-
var _b3 = moveable.state, target = _b3.target, width = _b3.width, height = _b3.height, allMatrix = _b3.allMatrix, is3d = _b3.is3d, left = _b3.left, top = _b3.top, pos1 = _b3.pos1, pos2 = _b3.pos2, pos3 = _b3.pos3, pos4 = _b3.pos4, clipPathState = _b3.clipPathState, snapBoundInfos = _b3.snapBoundInfos;
|
|
42426
|
+
var _b3 = moveable.state, target = _b3.target, width = _b3.width, height = _b3.height, allMatrix = _b3.allMatrix, is3d = _b3.is3d, left = _b3.left, top = _b3.top, pos1 = _b3.pos1, pos2 = _b3.pos2, pos3 = _b3.pos3, pos4 = _b3.pos4, clipPathState = _b3.clipPathState, snapBoundInfos = _b3.snapBoundInfos, rotationRad = _b3.rotation;
|
|
42026
42427
|
if (!target) {
|
|
42027
42428
|
return [];
|
|
42028
42429
|
}
|
|
@@ -42065,7 +42466,7 @@ var Clippable = {
|
|
|
42065
42466
|
className: prefix("control", "clip-control", "snap-control"),
|
|
42066
42467
|
"data-clip-index": i3,
|
|
42067
42468
|
style: {
|
|
42068
|
-
transform: "translate(" + pos[0] + "px, " + pos[1] + "px) scale(" + zoom + ")"
|
|
42469
|
+
transform: "translate(" + pos[0] + "px, " + pos[1] + "px) rotate(" + rotationRad + "rad) scale(" + zoom + ")"
|
|
42069
42470
|
}
|
|
42070
42471
|
});
|
|
42071
42472
|
});
|
|
@@ -42076,7 +42477,7 @@ var Clippable = {
|
|
|
42076
42477
|
className: prefix("control", "clip-control", "clip-radius", "snap-control"),
|
|
42077
42478
|
"data-clip-index": 8 + i3,
|
|
42078
42479
|
style: {
|
|
42079
|
-
transform: "translate(" + pos[0] + "px, " + pos[1] + "px) scale(" + zoom + ")"
|
|
42480
|
+
transform: "translate(" + pos[0] + "px, " + pos[1] + "px) rotate(" + rotationRad + "rad) scale(" + zoom + ")"
|
|
42080
42481
|
}
|
|
42081
42482
|
});
|
|
42082
42483
|
}));
|
|
@@ -42114,7 +42515,7 @@ var Clippable = {
|
|
|
42114
42515
|
}));
|
|
42115
42516
|
}
|
|
42116
42517
|
if (clipArea) {
|
|
42117
|
-
var _d2 = getRect(
|
|
42518
|
+
var _d2 = getRect(__spreadArray([pos1, pos2, pos3, pos4], poses)), allWidth = _d2.width, allHeight = _d2.height, allLeft_1 = _d2.left, allTop_1 = _d2.top;
|
|
42118
42519
|
if (isPolygon || isRect || isInset) {
|
|
42119
42520
|
var areaPoses = isInset ? poses.slice(0, 8) : poses;
|
|
42120
42521
|
controls.push(React.createElement("div", {
|
|
@@ -42153,7 +42554,7 @@ var Clippable = {
|
|
|
42153
42554
|
}
|
|
42154
42555
|
});
|
|
42155
42556
|
}
|
|
42156
|
-
return
|
|
42557
|
+
return __spreadArray(__spreadArray([], controls), lines);
|
|
42157
42558
|
},
|
|
42158
42559
|
dragControlCondition: function(moveable, e) {
|
|
42159
42560
|
return e.inputEvent && (e.inputEvent.target.getAttribute("class") || "").indexOf("clip") > -1;
|
|
@@ -42177,7 +42578,7 @@ var Clippable = {
|
|
|
42177
42578
|
var _a3 = moveable.props, defaultClipPath = _a3.defaultClipPath, customClipPath = _a3.customClipPath;
|
|
42178
42579
|
var target = state.target, width = state.width, height = state.height;
|
|
42179
42580
|
var inputTarget = e.inputEvent ? e.inputEvent.target : null;
|
|
42180
|
-
var className = inputTarget
|
|
42581
|
+
var className = inputTarget && inputTarget.getAttribute("class") || "";
|
|
42181
42582
|
var datas = e.datas;
|
|
42182
42583
|
var clipPath = getClipPath(target, width, height, defaultClipPath || "inset", customClipPath);
|
|
42183
42584
|
if (!clipPath) {
|
|
@@ -42195,7 +42596,7 @@ var Clippable = {
|
|
|
42195
42596
|
datas.isClipStart = false;
|
|
42196
42597
|
return false;
|
|
42197
42598
|
}
|
|
42198
|
-
datas.isControl = className.indexOf("clip-control") > -1;
|
|
42599
|
+
datas.isControl = className && className.indexOf("clip-control") > -1;
|
|
42199
42600
|
datas.isLine = className.indexOf("clip-line") > -1;
|
|
42200
42601
|
datas.isArea = className.indexOf("clip-area") > -1 || className.indexOf("clip-ellipse") > -1;
|
|
42201
42602
|
datas.index = inputTarget ? parseInt(inputTarget.getAttribute("data-clip-index"), 10) : -1;
|
|
@@ -42206,16 +42607,16 @@ var Clippable = {
|
|
|
42206
42607
|
return true;
|
|
42207
42608
|
},
|
|
42208
42609
|
dragControl: function(moveable, e) {
|
|
42610
|
+
var _a3;
|
|
42209
42611
|
var datas = e.datas, originalDatas = e.originalDatas;
|
|
42210
42612
|
if (!datas.isClipStart) {
|
|
42211
42613
|
return false;
|
|
42212
42614
|
}
|
|
42213
|
-
var
|
|
42214
|
-
var _a3 = datas, isControl = _a3.isControl, isLine = _a3.isLine, isArea = _a3.isArea, index = _a3.index, clipPath = _a3.clipPath;
|
|
42615
|
+
var _b3 = datas, isControl = _b3.isControl, isLine = _b3.isLine, isArea = _b3.isArea, index = _b3.index, clipPath = _b3.clipPath;
|
|
42215
42616
|
if (!clipPath) {
|
|
42216
42617
|
return false;
|
|
42217
42618
|
}
|
|
42218
|
-
var
|
|
42619
|
+
var _c3 = getDragDist(e), distX = _c3[0], distY = _c3[1];
|
|
42219
42620
|
var props = moveable.props;
|
|
42220
42621
|
var state = moveable.state;
|
|
42221
42622
|
var width = state.width, height = state.height;
|
|
@@ -42234,7 +42635,7 @@ var Clippable = {
|
|
|
42234
42635
|
return [0, 0];
|
|
42235
42636
|
});
|
|
42236
42637
|
if (isControl && !isAll) {
|
|
42237
|
-
var
|
|
42638
|
+
var _d2 = clipPoses[index], horizontal = _d2.horizontal, vertical = _d2.vertical;
|
|
42238
42639
|
var dist = [distX * Math.abs(horizontal), distY * Math.abs(vertical)];
|
|
42239
42640
|
dists = moveControlPos(clipPoses, index, dist, isRect);
|
|
42240
42641
|
} else if (isAll) {
|
|
@@ -42245,7 +42646,7 @@ var Clippable = {
|
|
|
42245
42646
|
var nextPoses = poses.map(function(pos, i3) {
|
|
42246
42647
|
return plus(pos, dists[i3]);
|
|
42247
42648
|
});
|
|
42248
|
-
var guidePoses =
|
|
42649
|
+
var guidePoses = __spreadArray([], nextPoses);
|
|
42249
42650
|
state.snapBoundInfos = null;
|
|
42250
42651
|
var isCircle = clipPath.type === "circle";
|
|
42251
42652
|
var isEllipse = clipPath.type === "ellipse";
|
|
@@ -42302,12 +42703,12 @@ var Clippable = {
|
|
|
42302
42703
|
}
|
|
42303
42704
|
var boundDelta = [0, 0];
|
|
42304
42705
|
var _loop_12 = function(i3) {
|
|
42305
|
-
var
|
|
42706
|
+
var _e = checkSnapBounds(guidelines, props.clipTargetBounds && {
|
|
42306
42707
|
left: 0,
|
|
42307
42708
|
top: 0,
|
|
42308
42709
|
right: width,
|
|
42309
42710
|
bottom: height
|
|
42310
|
-
}, guideXPoses, guideYPoses, 5), horizontalSnapInfo =
|
|
42711
|
+
}, guideXPoses, guideYPoses, 5), horizontalSnapInfo = _e.horizontal, verticalSnapInfo = _e.vertical;
|
|
42311
42712
|
var snapOffsetY = horizontalSnapInfo.offset;
|
|
42312
42713
|
var snapOffsetX = verticalSnapInfo.offset;
|
|
42313
42714
|
if (horizontalSnapInfo.isBound) {
|
|
@@ -42380,6 +42781,9 @@ var Clippable = {
|
|
|
42380
42781
|
bottom: height
|
|
42381
42782
|
}, guideXPoses, guideYPoses, 1);
|
|
42382
42783
|
if (originalDatas.draggable) {
|
|
42784
|
+
var is3d = state.is3d, allMatrix = state.allMatrix;
|
|
42785
|
+
var n = is3d ? 4 : 3;
|
|
42786
|
+
_a3 = multiply(allMatrix, [boundDelta[0], boundDelta[1], 0, 0], n), boundDelta[0] = _a3[0], boundDelta[1] = _a3[1];
|
|
42383
42787
|
originalDatas.draggable.deltaOffset = boundDelta;
|
|
42384
42788
|
}
|
|
42385
42789
|
triggerEvent(moveable, "onClip", fillParams(moveable, e, {
|
|
@@ -42794,6 +43198,10 @@ var Roundable = {
|
|
|
42794
43198
|
moveable.state.borderRadiusState = "";
|
|
42795
43199
|
}
|
|
42796
43200
|
};
|
|
43201
|
+
function isIdentityMatrix(matrix, is3d) {
|
|
43202
|
+
var value = is3d ? "matrix3d(" + createIdentityMatrix(4) : "matrix(" + createIdentityMatrix(3) + ")";
|
|
43203
|
+
return matrix === value || matrix === "matrix(1,0,0,1,0,0)";
|
|
43204
|
+
}
|
|
42797
43205
|
var BeforeRenderable = {
|
|
42798
43206
|
isPinch: true,
|
|
42799
43207
|
name: "beforeRenderable",
|
|
@@ -42806,13 +43214,15 @@ var BeforeRenderable = {
|
|
|
42806
43214
|
onBeforeRenderGroup: "beforeRenderGroup",
|
|
42807
43215
|
onBeforeRenderGroupEnd: "beforeRenderGroupEnd"
|
|
42808
43216
|
},
|
|
43217
|
+
dragRelation: "weak",
|
|
42809
43218
|
setTransform: function(moveable, e) {
|
|
42810
43219
|
var _a3 = moveable.state, is3d = _a3.is3d, target = _a3.target, targetMatrix = _a3.targetMatrix;
|
|
42811
43220
|
var transform = target === null || target === void 0 ? void 0 : target.style.transform;
|
|
42812
43221
|
var cssMatrix = is3d ? "matrix3d(" + targetMatrix.join(",") + ")" : "matrix(" + convertMatrixtoCSS(targetMatrix, true) + ")";
|
|
42813
|
-
|
|
43222
|
+
var startTransform = !transform || transform === "none" ? cssMatrix : transform;
|
|
43223
|
+
e.datas.startTransforms = isIdentityMatrix(startTransform, is3d) ? [] : splitSpace(startTransform);
|
|
42814
43224
|
},
|
|
42815
|
-
resetTransform: function(
|
|
43225
|
+
resetTransform: function(e) {
|
|
42816
43226
|
e.datas.nextTransforms = e.datas.startTransforms;
|
|
42817
43227
|
e.datas.nextTransformAppendedIndexes = [];
|
|
42818
43228
|
},
|
|
@@ -42834,7 +43244,7 @@ var BeforeRenderable = {
|
|
|
42834
43244
|
triggerEvent(moveable, "onBeforeRenderStart", this.fillDragStartParams(moveable, e));
|
|
42835
43245
|
},
|
|
42836
43246
|
drag: function(moveable, e) {
|
|
42837
|
-
this.resetTransform(
|
|
43247
|
+
this.resetTransform(e);
|
|
42838
43248
|
triggerEvent(moveable, "onBeforeRender", fillParams(moveable, e, {
|
|
42839
43249
|
isPinch: !!e.isPinch
|
|
42840
43250
|
}));
|
|
@@ -42870,7 +43280,7 @@ var BeforeRenderable = {
|
|
|
42870
43280
|
var moveables = moveable.moveables;
|
|
42871
43281
|
var params = events.map(function(childEvent, i2) {
|
|
42872
43282
|
var childMoveable = moveables[i2];
|
|
42873
|
-
_this.resetTransform(
|
|
43283
|
+
_this.resetTransform(childEvent);
|
|
42874
43284
|
return _this.fillDragParams(childMoveable, childEvent);
|
|
42875
43285
|
});
|
|
42876
43286
|
triggerEvent(moveable, "onBeforeRenderGroup", fillParams(moveable, e, {
|
|
@@ -42917,21 +43327,22 @@ var Renderable = {
|
|
|
42917
43327
|
onRenderGroup: "renderGroup",
|
|
42918
43328
|
onRenderGroupEnd: "renderGroupEnd"
|
|
42919
43329
|
},
|
|
43330
|
+
dragRelation: "weak",
|
|
42920
43331
|
dragStart: function(moveable, e) {
|
|
42921
43332
|
triggerEvent(moveable, "onRenderStart", fillParams(moveable, e, {
|
|
42922
43333
|
isPinch: !!e.isPinch
|
|
42923
43334
|
}));
|
|
42924
43335
|
},
|
|
42925
43336
|
drag: function(moveable, e) {
|
|
42926
|
-
triggerEvent(moveable, "onRender",
|
|
42927
|
-
|
|
42928
|
-
|
|
43337
|
+
triggerEvent(moveable, "onRender", this.fillDragParams(moveable, e));
|
|
43338
|
+
},
|
|
43339
|
+
dragAfter: function(moveable, e) {
|
|
43340
|
+
if (e.resultCount) {
|
|
43341
|
+
return this.drag(moveable, e);
|
|
43342
|
+
}
|
|
42929
43343
|
},
|
|
42930
43344
|
dragEnd: function(moveable, e) {
|
|
42931
|
-
triggerEvent(moveable, "onRenderEnd",
|
|
42932
|
-
isPinch: !!e.isPinch,
|
|
42933
|
-
isDrag: e.isDrag
|
|
42934
|
-
}));
|
|
43345
|
+
triggerEvent(moveable, "onRenderEnd", this.fillDragEndParams(moveable, e));
|
|
42935
43346
|
},
|
|
42936
43347
|
dragGroupStart: function(moveable, e) {
|
|
42937
43348
|
triggerEvent(moveable, "onRenderGroupStart", fillParams(moveable, e, {
|
|
@@ -42940,16 +43351,33 @@ var Renderable = {
|
|
|
42940
43351
|
}));
|
|
42941
43352
|
},
|
|
42942
43353
|
dragGroup: function(moveable, e) {
|
|
43354
|
+
var _this = this;
|
|
43355
|
+
var events = fillChildEvents(moveable, "beforeRenderable", e);
|
|
43356
|
+
var moveables = moveable.moveables;
|
|
43357
|
+
var params = events.map(function(childEvent, i2) {
|
|
43358
|
+
var childMoveable = moveables[i2];
|
|
43359
|
+
return _this.fillDragParams(childMoveable, childEvent);
|
|
43360
|
+
});
|
|
42943
43361
|
triggerEvent(moveable, "onRenderGroup", fillParams(moveable, e, {
|
|
42944
43362
|
isPinch: !!e.isPinch,
|
|
42945
|
-
targets: moveable.props.targets
|
|
43363
|
+
targets: moveable.props.targets,
|
|
43364
|
+
transform: getNextTransformText(e),
|
|
43365
|
+
events: params
|
|
42946
43366
|
}));
|
|
42947
43367
|
},
|
|
42948
43368
|
dragGroupEnd: function(moveable, e) {
|
|
43369
|
+
var _this = this;
|
|
43370
|
+
var events = fillChildEvents(moveable, "beforeRenderable", e);
|
|
43371
|
+
var moveables = moveable.moveables;
|
|
43372
|
+
var params = events.map(function(childEvent, i2) {
|
|
43373
|
+
var childMoveable = moveables[i2];
|
|
43374
|
+
return _this.fillDragEndParams(childMoveable, childEvent);
|
|
43375
|
+
});
|
|
42949
43376
|
triggerEvent(moveable, "onRenderGroupEnd", fillParams(moveable, e, {
|
|
42950
43377
|
isPinch: !!e.isPinch,
|
|
42951
43378
|
isDrag: e.isDrag,
|
|
42952
|
-
targets: moveable.props.targets
|
|
43379
|
+
targets: moveable.props.targets,
|
|
43380
|
+
events: params
|
|
42953
43381
|
}));
|
|
42954
43382
|
},
|
|
42955
43383
|
dragControlStart: function(moveable, e) {
|
|
@@ -42958,6 +43386,9 @@ var Renderable = {
|
|
|
42958
43386
|
dragControl: function(moveable, e) {
|
|
42959
43387
|
return this.drag(moveable, e);
|
|
42960
43388
|
},
|
|
43389
|
+
dragControlAfter: function(moveable, e) {
|
|
43390
|
+
return this.dragAfter(moveable, e);
|
|
43391
|
+
},
|
|
42961
43392
|
dragControlEnd: function(moveable, e) {
|
|
42962
43393
|
return this.dragEnd(moveable, e);
|
|
42963
43394
|
},
|
|
@@ -42969,6 +43400,18 @@ var Renderable = {
|
|
|
42969
43400
|
},
|
|
42970
43401
|
dragGroupControlEnd: function(moveable, e) {
|
|
42971
43402
|
return this.dragGroupEnd(moveable, e);
|
|
43403
|
+
},
|
|
43404
|
+
fillDragParams: function(moveable, e) {
|
|
43405
|
+
return fillParams(moveable, e, {
|
|
43406
|
+
isPinch: !!e.isPinch,
|
|
43407
|
+
transform: getNextTransformText(e)
|
|
43408
|
+
});
|
|
43409
|
+
},
|
|
43410
|
+
fillDragEndParams: function(moveable, e) {
|
|
43411
|
+
return fillParams(moveable, e, {
|
|
43412
|
+
isPinch: !!e.isPinch,
|
|
43413
|
+
isDrag: e.isDrag
|
|
43414
|
+
});
|
|
42972
43415
|
}
|
|
42973
43416
|
};
|
|
42974
43417
|
function triggerAble(moveable, ableType, eventOperation, eventAffix, eventType, e, requestInstant) {
|
|
@@ -42981,15 +43424,15 @@ function triggerAble(moveable, ableType, eventOperation, eventAffix, eventType,
|
|
|
42981
43424
|
var eventName = "" + eventOperation + eventAffix + eventType;
|
|
42982
43425
|
var conditionName = "" + eventOperation + eventAffix + "Condition";
|
|
42983
43426
|
var isEnd = eventType === "End";
|
|
42984
|
-
var isAfter = eventType
|
|
43427
|
+
var isAfter = eventType === "After";
|
|
42985
43428
|
var isFirstStart = isStart && (!moveable.targetGesto || !moveable.controlGesto || !moveable.targetGesto.isFlag() || !moveable.controlGesto.isFlag());
|
|
42986
43429
|
if (isFirstStart) {
|
|
42987
43430
|
moveable.updateRect(eventType, true, false);
|
|
42988
43431
|
}
|
|
42989
|
-
if (eventType === "" && !
|
|
43432
|
+
if (eventType === "" && !isRequest) {
|
|
42990
43433
|
convertDragDist(moveable.state, e);
|
|
42991
43434
|
}
|
|
42992
|
-
var ables =
|
|
43435
|
+
var ables = __spreadArray([], moveable[ableType]);
|
|
42993
43436
|
if (isRequest) {
|
|
42994
43437
|
var requestAble_1 = e.requestAble;
|
|
42995
43438
|
if (!ables.some(function(able) {
|
|
@@ -43003,12 +43446,12 @@ function triggerAble(moveable, ableType, eventOperation, eventAffix, eventType,
|
|
|
43003
43446
|
if (!ables.length) {
|
|
43004
43447
|
return false;
|
|
43005
43448
|
}
|
|
43006
|
-
var
|
|
43449
|
+
var eventAbles = __spreadArray(__spreadArray([BeforeRenderable], ables), [Renderable]).filter(function(able) {
|
|
43007
43450
|
return able[eventName];
|
|
43008
43451
|
});
|
|
43009
43452
|
var datas = e.datas;
|
|
43010
43453
|
if (isFirstStart) {
|
|
43011
|
-
|
|
43454
|
+
eventAbles.forEach(function(able) {
|
|
43012
43455
|
able.unset && able.unset(moveable);
|
|
43013
43456
|
});
|
|
43014
43457
|
}
|
|
@@ -43017,23 +43460,44 @@ function triggerAble(moveable, ableType, eventOperation, eventAffix, eventType,
|
|
|
43017
43460
|
if (isEnd && inputEvent) {
|
|
43018
43461
|
inputTarget = document.elementFromPoint(e.clientX, e.clientY) || inputEvent.target;
|
|
43019
43462
|
}
|
|
43020
|
-
var
|
|
43463
|
+
var resultCount = 0;
|
|
43464
|
+
var results = eventAbles.filter(function(able) {
|
|
43021
43465
|
var ableName = able.name;
|
|
43022
43466
|
var nextDatas = datas[ableName] || (datas[ableName] = {});
|
|
43023
43467
|
if (isStart) {
|
|
43024
43468
|
nextDatas.isEventStart = !able[conditionName] || able[conditionName](moveable, e);
|
|
43025
43469
|
}
|
|
43026
43470
|
if (nextDatas.isEventStart) {
|
|
43027
|
-
|
|
43471
|
+
var result = able[eventName](moveable, __assign$2(__assign$2({}, e), {
|
|
43472
|
+
resultCount,
|
|
43028
43473
|
datas: nextDatas,
|
|
43029
43474
|
originalDatas: datas,
|
|
43030
43475
|
inputTarget
|
|
43031
43476
|
}));
|
|
43477
|
+
if (isStart && result === false) {
|
|
43478
|
+
nextDatas.isEventStart = false;
|
|
43479
|
+
}
|
|
43480
|
+
resultCount += result ? 1 : 0;
|
|
43481
|
+
return result;
|
|
43032
43482
|
}
|
|
43033
43483
|
return false;
|
|
43034
43484
|
});
|
|
43035
43485
|
var isUpdate = results.length;
|
|
43036
|
-
var isForceEnd =
|
|
43486
|
+
var isForceEnd = false;
|
|
43487
|
+
if (isStart && eventAbles.length && !isUpdate) {
|
|
43488
|
+
isForceEnd = eventAbles.filter(function(able) {
|
|
43489
|
+
var ableName = able.name;
|
|
43490
|
+
var nextDatas = datas[ableName];
|
|
43491
|
+
if (nextDatas.isEventStart) {
|
|
43492
|
+
if (able.dragRelation === "strong") {
|
|
43493
|
+
nextDatas.isEventStart = false;
|
|
43494
|
+
return false;
|
|
43495
|
+
}
|
|
43496
|
+
return true;
|
|
43497
|
+
}
|
|
43498
|
+
return false;
|
|
43499
|
+
}).length === 0;
|
|
43500
|
+
}
|
|
43037
43501
|
if (isEnd || isForceEnd) {
|
|
43038
43502
|
moveable.state.gesto = null;
|
|
43039
43503
|
if (moveable.moveables) {
|
|
@@ -43043,15 +43507,18 @@ function triggerAble(moveable, ableType, eventOperation, eventAffix, eventType,
|
|
|
43043
43507
|
}
|
|
43044
43508
|
}
|
|
43045
43509
|
if (isFirstStart && isForceEnd) {
|
|
43046
|
-
|
|
43510
|
+
eventAbles.forEach(function(able) {
|
|
43047
43511
|
able.unset && able.unset(moveable);
|
|
43048
43512
|
});
|
|
43049
43513
|
}
|
|
43514
|
+
if (isStart && !isRequest && isUpdate) {
|
|
43515
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
43516
|
+
}
|
|
43050
43517
|
if (moveable.isUnmounted || isForceEnd) {
|
|
43051
43518
|
return false;
|
|
43052
43519
|
}
|
|
43053
43520
|
if (!isStart && isUpdate && !requestInstant || isEnd) {
|
|
43054
|
-
moveable.updateRect(eventType, true, false);
|
|
43521
|
+
moveable.updateRect(isEnd ? eventType : "", true, false);
|
|
43055
43522
|
moveable.forceUpdate();
|
|
43056
43523
|
}
|
|
43057
43524
|
if (!isStart && !isEnd && !isAfter && isUpdate && !requestInstant) {
|
|
@@ -43069,7 +43536,7 @@ function getTargetAbleGesto(moveable, moveableTarget, eventAffix) {
|
|
|
43069
43536
|
var startFunc = function(e) {
|
|
43070
43537
|
var eventTarget = e.inputEvent.target;
|
|
43071
43538
|
var areaElement = moveable.areaElement;
|
|
43072
|
-
return eventTarget === areaElement || !moveable.isMoveableElement(eventTarget) || hasClass(eventTarget, "moveable-area") || hasClass(eventTarget, "moveable-padding");
|
|
43539
|
+
return eventTarget === areaElement || !moveable.isMoveableElement(eventTarget) && !moveable.controlBox.getElement().contains(eventTarget) || hasClass(eventTarget, "moveable-area") || hasClass(eventTarget, "moveable-padding");
|
|
43073
43540
|
};
|
|
43074
43541
|
return getAbleGesto(moveable, targets, "targetAbles", eventAffix, {
|
|
43075
43542
|
dragStart: startFunc,
|
|
@@ -43082,6 +43549,7 @@ function getAbleGesto(moveable, target, ableType, eventAffix, conditionFunctions
|
|
|
43082
43549
|
}
|
|
43083
43550
|
var _a3 = moveable.props, pinchOutside = _a3.pinchOutside, pinchThreshold = _a3.pinchThreshold;
|
|
43084
43551
|
var options = {
|
|
43552
|
+
preventDefault: false,
|
|
43085
43553
|
container: window,
|
|
43086
43554
|
pinchThreshold,
|
|
43087
43555
|
pinchOutside
|
|
@@ -43156,10 +43624,31 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43156
43624
|
"mouseEnter": null,
|
|
43157
43625
|
"mouseLeave": null
|
|
43158
43626
|
};
|
|
43627
|
+
_this._prevTarget = null;
|
|
43628
|
+
_this._prevDragArea = false;
|
|
43629
|
+
_this._observer = null;
|
|
43630
|
+
_this._observerId = 0;
|
|
43159
43631
|
_this.onPreventClick = function(e) {
|
|
43160
43632
|
e.stopPropagation();
|
|
43161
43633
|
removeEvent(window, "click", _this.onPreventClick, true);
|
|
43162
43634
|
};
|
|
43635
|
+
_this.checkUpdateRect = function() {
|
|
43636
|
+
if (_this.isDragging()) {
|
|
43637
|
+
return;
|
|
43638
|
+
}
|
|
43639
|
+
var parentMoveable = _this.props.parentMoveable;
|
|
43640
|
+
if (parentMoveable) {
|
|
43641
|
+
parentMoveable.checkUpdateRect();
|
|
43642
|
+
return;
|
|
43643
|
+
}
|
|
43644
|
+
cancelAnimationFrame$1(_this._observerId);
|
|
43645
|
+
_this._observerId = requestAnimationFrame$1(function() {
|
|
43646
|
+
if (_this.isDragging()) {
|
|
43647
|
+
return;
|
|
43648
|
+
}
|
|
43649
|
+
_this.updateRect();
|
|
43650
|
+
});
|
|
43651
|
+
};
|
|
43163
43652
|
return _this;
|
|
43164
43653
|
}
|
|
43165
43654
|
var __proto = MoveableManager2.prototype;
|
|
@@ -43201,17 +43690,21 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43201
43690
|
this.controlBox.getElement();
|
|
43202
43691
|
var props = this.props;
|
|
43203
43692
|
var parentMoveable = props.parentMoveable, container = props.container, wrapperMoveable = props.wrapperMoveable;
|
|
43204
|
-
this.
|
|
43205
|
-
this.
|
|
43693
|
+
this._updateTargets();
|
|
43694
|
+
this._updateNativeEvents();
|
|
43695
|
+
this._updateEvents();
|
|
43206
43696
|
if (!container && !parentMoveable && !wrapperMoveable) {
|
|
43207
43697
|
this.updateRect("", false, true);
|
|
43208
43698
|
}
|
|
43209
43699
|
this.updateCheckInput();
|
|
43700
|
+
this._updateObserver(this.props);
|
|
43210
43701
|
};
|
|
43211
43702
|
__proto.componentDidUpdate = function(prevProps) {
|
|
43212
|
-
this.
|
|
43213
|
-
this.
|
|
43703
|
+
this._updateNativeEvents();
|
|
43704
|
+
this._updateEvents();
|
|
43705
|
+
this._updateTargets();
|
|
43214
43706
|
this.updateCheckInput();
|
|
43707
|
+
this._updateObserver(prevProps);
|
|
43215
43708
|
};
|
|
43216
43709
|
__proto.componentWillUnmount = function() {
|
|
43217
43710
|
this.isUnmounted = true;
|
|
@@ -43284,77 +43777,6 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43284
43777
|
var rootContainer = parentMoveable ? parentMoveable.props.rootContainer : props.rootContainer;
|
|
43285
43778
|
this.updateState(getTargetInfo(this.controlBox && this.controlBox.getElement(), target, container, container, rootContainer || container), parentMoveable ? false : isSetState);
|
|
43286
43779
|
};
|
|
43287
|
-
__proto.isTargetChanged = function(prevProps, useDragArea) {
|
|
43288
|
-
var props = this.props;
|
|
43289
|
-
var target = props.dragTarget || props.target;
|
|
43290
|
-
var prevTarget = prevProps.dragTarget || prevProps.target;
|
|
43291
|
-
var dragArea = props.dragArea;
|
|
43292
|
-
var prevDragArea = prevProps.dragArea;
|
|
43293
|
-
var isTargetChanged = !dragArea && prevTarget !== target;
|
|
43294
|
-
return isTargetChanged || (useDragArea || dragArea) && prevDragArea !== dragArea;
|
|
43295
|
-
};
|
|
43296
|
-
__proto.updateNativeEvents = function(prevProps) {
|
|
43297
|
-
var _this = this;
|
|
43298
|
-
var props = this.props;
|
|
43299
|
-
var target = props.dragArea ? this.areaElement : this.state.target;
|
|
43300
|
-
var events = this.events;
|
|
43301
|
-
var eventKeys = getKeys(events);
|
|
43302
|
-
if (this.isTargetChanged(prevProps)) {
|
|
43303
|
-
for (var eventName in events) {
|
|
43304
|
-
var manager = events[eventName];
|
|
43305
|
-
manager && manager.destroy();
|
|
43306
|
-
events[eventName] = null;
|
|
43307
|
-
}
|
|
43308
|
-
}
|
|
43309
|
-
if (!target) {
|
|
43310
|
-
return;
|
|
43311
|
-
}
|
|
43312
|
-
var enabledAbles = this.enabledAbles;
|
|
43313
|
-
eventKeys.forEach(function(eventName2) {
|
|
43314
|
-
var ables = filterAbles(enabledAbles, [eventName2]);
|
|
43315
|
-
var hasAbles = ables.length > 0;
|
|
43316
|
-
var manager2 = events[eventName2];
|
|
43317
|
-
if (!hasAbles) {
|
|
43318
|
-
if (manager2) {
|
|
43319
|
-
manager2.destroy();
|
|
43320
|
-
events[eventName2] = null;
|
|
43321
|
-
}
|
|
43322
|
-
return;
|
|
43323
|
-
}
|
|
43324
|
-
if (!manager2) {
|
|
43325
|
-
manager2 = new EventManager(target, _this, eventName2);
|
|
43326
|
-
events[eventName2] = manager2;
|
|
43327
|
-
}
|
|
43328
|
-
manager2.setAbles(ables);
|
|
43329
|
-
});
|
|
43330
|
-
};
|
|
43331
|
-
__proto.updateEvent = function(prevProps) {
|
|
43332
|
-
var controlBoxElement = this.controlBox.getElement();
|
|
43333
|
-
var hasTargetAble = this.targetAbles.length;
|
|
43334
|
-
var hasControlAble = this.controlAbles.length;
|
|
43335
|
-
var props = this.props;
|
|
43336
|
-
var target = props.dragTarget || props.target;
|
|
43337
|
-
var isTargetChanged = this.isTargetChanged(prevProps, true);
|
|
43338
|
-
var isUnset = !hasTargetAble && this.targetGesto || isTargetChanged;
|
|
43339
|
-
if (isUnset) {
|
|
43340
|
-
unset(this, "targetGesto");
|
|
43341
|
-
this.updateState({
|
|
43342
|
-
gesto: null
|
|
43343
|
-
});
|
|
43344
|
-
}
|
|
43345
|
-
if (!hasControlAble) {
|
|
43346
|
-
unset(this, "controlGesto");
|
|
43347
|
-
}
|
|
43348
|
-
if (target && hasTargetAble && !this.targetGesto) {
|
|
43349
|
-
this.targetGesto = getTargetAbleGesto(this, target, "");
|
|
43350
|
-
}
|
|
43351
|
-
if (!this.controlGesto && hasControlAble) {
|
|
43352
|
-
this.controlGesto = getAbleGesto(this, controlBoxElement, "controlAbles", "Control");
|
|
43353
|
-
}
|
|
43354
|
-
if (isUnset) {
|
|
43355
|
-
this.unsetAbles();
|
|
43356
|
-
}
|
|
43357
|
-
};
|
|
43358
43780
|
__proto.isDragging = function() {
|
|
43359
43781
|
return (this.targetGesto ? this.targetGesto.isFlag() : false) || (this.controlGesto ? this.controlGesto.isFlag() : false);
|
|
43360
43782
|
};
|
|
@@ -43464,11 +43886,15 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43464
43886
|
if (!isChanged) {
|
|
43465
43887
|
return;
|
|
43466
43888
|
}
|
|
43889
|
+
var moveableContainer = container || this.controlBox;
|
|
43890
|
+
if (moveableContainer) {
|
|
43891
|
+
this.unsetAbles();
|
|
43892
|
+
}
|
|
43467
43893
|
this.updateState({
|
|
43468
43894
|
target,
|
|
43469
43895
|
container
|
|
43470
43896
|
});
|
|
43471
|
-
if (!parentMoveable &&
|
|
43897
|
+
if (!parentMoveable && moveableContainer) {
|
|
43472
43898
|
this.updateRect("End", false, false);
|
|
43473
43899
|
}
|
|
43474
43900
|
};
|
|
@@ -43486,15 +43912,11 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43486
43912
|
};
|
|
43487
43913
|
__proto.unsetAbles = function() {
|
|
43488
43914
|
var _this = this;
|
|
43489
|
-
|
|
43915
|
+
this.targetAbles.forEach(function(able) {
|
|
43490
43916
|
if (able.unset) {
|
|
43491
43917
|
able.unset(_this);
|
|
43492
|
-
return true;
|
|
43493
43918
|
}
|
|
43494
|
-
|
|
43495
|
-
}).length) {
|
|
43496
|
-
this.forceUpdate();
|
|
43497
|
-
}
|
|
43919
|
+
});
|
|
43498
43920
|
};
|
|
43499
43921
|
__proto.updateAbles = function(ables, eventAffix) {
|
|
43500
43922
|
if (ables === void 0) {
|
|
@@ -43506,7 +43928,7 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43506
43928
|
var props = this.props;
|
|
43507
43929
|
var triggerAblesSimultaneously = props.triggerAblesSimultaneously;
|
|
43508
43930
|
var enabledAbles = ables.filter(function(able) {
|
|
43509
|
-
return able && (able.always || props[able.name]);
|
|
43931
|
+
return able && (able.always && props[able.name] !== false || props[able.name]);
|
|
43510
43932
|
});
|
|
43511
43933
|
var dragStart = "drag" + eventAffix + "Start";
|
|
43512
43934
|
var pinchStart = "pinch" + eventAffix + "Start";
|
|
@@ -43556,6 +43978,52 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43556
43978
|
__proto.updateCheckInput = function() {
|
|
43557
43979
|
this.targetGesto && (this.targetGesto.options.checkInput = this.props.checkInput);
|
|
43558
43980
|
};
|
|
43981
|
+
__proto._updateObserver = function(prevProps) {
|
|
43982
|
+
var _a3;
|
|
43983
|
+
var props = this.props;
|
|
43984
|
+
var target = props.target;
|
|
43985
|
+
if (!window.ResizeObserver || !target || !props.useResizeObserver) {
|
|
43986
|
+
(_a3 = this._observer) === null || _a3 === void 0 ? void 0 : _a3.disconnect();
|
|
43987
|
+
return;
|
|
43988
|
+
}
|
|
43989
|
+
if (prevProps.target === target && this._observer) {
|
|
43990
|
+
return;
|
|
43991
|
+
}
|
|
43992
|
+
var observer = new ResizeObserver(this.checkUpdateRect);
|
|
43993
|
+
observer.observe(target, {
|
|
43994
|
+
box: "border-box"
|
|
43995
|
+
});
|
|
43996
|
+
this._observer = observer;
|
|
43997
|
+
return;
|
|
43998
|
+
};
|
|
43999
|
+
__proto._updateEvents = function() {
|
|
44000
|
+
var controlBoxElement = this.controlBox.getElement();
|
|
44001
|
+
var hasTargetAble = this.targetAbles.length;
|
|
44002
|
+
var hasControlAble = this.controlAbles.length;
|
|
44003
|
+
var props = this.props;
|
|
44004
|
+
var target = props.dragTarget || props.target;
|
|
44005
|
+
var isUnset = !hasTargetAble && this.targetGesto || this._isTargetChanged(true);
|
|
44006
|
+
if (isUnset) {
|
|
44007
|
+
unset(this, "targetGesto");
|
|
44008
|
+
this.updateState({
|
|
44009
|
+
gesto: null
|
|
44010
|
+
});
|
|
44011
|
+
}
|
|
44012
|
+
if (!hasControlAble) {
|
|
44013
|
+
unset(this, "controlGesto");
|
|
44014
|
+
}
|
|
44015
|
+
if (target && hasTargetAble && !this.targetGesto) {
|
|
44016
|
+
this.targetGesto = getTargetAbleGesto(this, target, "");
|
|
44017
|
+
}
|
|
44018
|
+
if (!this.controlGesto && hasControlAble) {
|
|
44019
|
+
this.controlGesto = getAbleGesto(this, controlBoxElement, "controlAbles", "Control");
|
|
44020
|
+
}
|
|
44021
|
+
};
|
|
44022
|
+
__proto._updateTargets = function() {
|
|
44023
|
+
var props = this.props;
|
|
44024
|
+
this._prevTarget = props.dragTarget || props.target;
|
|
44025
|
+
this._prevDragArea = props.dragArea;
|
|
44026
|
+
};
|
|
43559
44027
|
__proto._renderLines = function() {
|
|
43560
44028
|
var props = this.props;
|
|
43561
44029
|
var edge = props.edge, zoom = props.zoom, hideDefaultLines = props.hideDefaultLines;
|
|
@@ -43568,6 +44036,51 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43568
44036
|
};
|
|
43569
44037
|
return [renderLine(Renderer2, edge ? "n" : "", renderPoses[0], renderPoses[1], zoom, 0), renderLine(Renderer2, edge ? "e" : "", renderPoses[1], renderPoses[3], zoom, 1), renderLine(Renderer2, edge ? "w" : "", renderPoses[0], renderPoses[2], zoom, 2), renderLine(Renderer2, edge ? "s" : "", renderPoses[2], renderPoses[3], zoom, 3)];
|
|
43570
44038
|
};
|
|
44039
|
+
__proto._isTargetChanged = function(useDragArea) {
|
|
44040
|
+
var props = this.props;
|
|
44041
|
+
var target = props.dragTarget || props.target;
|
|
44042
|
+
var prevTarget = this._prevTarget;
|
|
44043
|
+
var prevDragArea = this._prevDragArea;
|
|
44044
|
+
var dragArea = props.dragArea;
|
|
44045
|
+
var isTargetChanged = !dragArea && prevTarget !== target;
|
|
44046
|
+
var isDragAreaChanged = (useDragArea || dragArea) && prevDragArea !== dragArea;
|
|
44047
|
+
return isTargetChanged || isDragAreaChanged;
|
|
44048
|
+
};
|
|
44049
|
+
__proto._updateNativeEvents = function() {
|
|
44050
|
+
var _this = this;
|
|
44051
|
+
var props = this.props;
|
|
44052
|
+
var target = props.dragArea ? this.areaElement : this.state.target;
|
|
44053
|
+
var events = this.events;
|
|
44054
|
+
var eventKeys = getKeys(events);
|
|
44055
|
+
if (this._isTargetChanged()) {
|
|
44056
|
+
for (var eventName in events) {
|
|
44057
|
+
var manager = events[eventName];
|
|
44058
|
+
manager && manager.destroy();
|
|
44059
|
+
events[eventName] = null;
|
|
44060
|
+
}
|
|
44061
|
+
}
|
|
44062
|
+
if (!target) {
|
|
44063
|
+
return;
|
|
44064
|
+
}
|
|
44065
|
+
var enabledAbles = this.enabledAbles;
|
|
44066
|
+
eventKeys.forEach(function(eventName2) {
|
|
44067
|
+
var ables = filterAbles(enabledAbles, [eventName2]);
|
|
44068
|
+
var hasAbles = ables.length > 0;
|
|
44069
|
+
var manager2 = events[eventName2];
|
|
44070
|
+
if (!hasAbles) {
|
|
44071
|
+
if (manager2) {
|
|
44072
|
+
manager2.destroy();
|
|
44073
|
+
events[eventName2] = null;
|
|
44074
|
+
}
|
|
44075
|
+
return;
|
|
44076
|
+
}
|
|
44077
|
+
if (!manager2) {
|
|
44078
|
+
manager2 = new EventManager(target, _this, eventName2);
|
|
44079
|
+
events[eventName2] = manager2;
|
|
44080
|
+
}
|
|
44081
|
+
manager2.setAbles(ables);
|
|
44082
|
+
});
|
|
44083
|
+
};
|
|
43571
44084
|
MoveableManager2.defaultProps = {
|
|
43572
44085
|
target: null,
|
|
43573
44086
|
dragTarget: null,
|
|
@@ -43579,6 +44092,7 @@ var MoveableManager$1 = /* @__PURE__ */ function(_super) {
|
|
|
43579
44092
|
wrapperMoveable: null,
|
|
43580
44093
|
parentPosition: null,
|
|
43581
44094
|
portalContainer: null,
|
|
44095
|
+
useResizeObserver: false,
|
|
43582
44096
|
ables: [],
|
|
43583
44097
|
pinchThreshold: 20,
|
|
43584
44098
|
dragArea: false,
|
|
@@ -43616,14 +44130,16 @@ var Groupable = {
|
|
|
43616
44130
|
left,
|
|
43617
44131
|
top
|
|
43618
44132
|
};
|
|
44133
|
+
var props = moveable.props;
|
|
43619
44134
|
return targets.map(function(target, i2) {
|
|
43620
44135
|
return React.createElement(MoveableManager$1, {
|
|
43621
44136
|
key: "moveable" + i2,
|
|
43622
44137
|
ref: refs(moveable, "moveables", i2),
|
|
43623
44138
|
target,
|
|
43624
44139
|
origin: false,
|
|
43625
|
-
cssStyled:
|
|
43626
|
-
customStyledMap:
|
|
44140
|
+
cssStyled: props.cssStyled,
|
|
44141
|
+
customStyledMap: props.customStyledMap,
|
|
44142
|
+
useResizeObserver: props.useResizeObserver,
|
|
43627
44143
|
parentMoveable: moveable,
|
|
43628
44144
|
parentPosition: position
|
|
43629
44145
|
});
|
|
@@ -43631,12 +44147,15 @@ var Groupable = {
|
|
|
43631
44147
|
}
|
|
43632
44148
|
};
|
|
43633
44149
|
var Clickable = makeAble("clickable", {
|
|
43634
|
-
props: {
|
|
44150
|
+
props: {
|
|
44151
|
+
clickable: Boolean
|
|
44152
|
+
},
|
|
43635
44153
|
events: {
|
|
43636
44154
|
onClick: "click",
|
|
43637
44155
|
onClickGroup: "clickGroup"
|
|
43638
44156
|
},
|
|
43639
44157
|
always: true,
|
|
44158
|
+
dragRelation: "weak",
|
|
43640
44159
|
dragStart: function(moveable, e) {
|
|
43641
44160
|
if (!e.isRequest) {
|
|
43642
44161
|
addEvent(window, "click", moveable.onPreventClick, true);
|
|
@@ -43654,10 +44173,12 @@ var Clickable = makeAble("clickable", {
|
|
|
43654
44173
|
var target = moveable.state.target;
|
|
43655
44174
|
var inputEvent = e.inputEvent;
|
|
43656
44175
|
var inputTarget = e.inputTarget;
|
|
43657
|
-
|
|
44176
|
+
var isMoveableElement = moveable.isMoveableElement(inputTarget);
|
|
44177
|
+
var containsElement = !isMoveableElement && moveable.controlBox.getElement().contains(inputTarget);
|
|
44178
|
+
if (!e.isDrag || containsElement) {
|
|
43658
44179
|
this.unset(moveable);
|
|
43659
44180
|
}
|
|
43660
|
-
if (!inputEvent || !inputTarget || e.isDrag || moveable.isMoveableElement(inputTarget)) {
|
|
44181
|
+
if (!inputEvent || !inputTarget || e.isDrag || moveable.isMoveableElement(inputTarget) || containsElement) {
|
|
43661
44182
|
return;
|
|
43662
44183
|
}
|
|
43663
44184
|
var containsTarget = target.contains(inputTarget);
|
|
@@ -43694,15 +44215,15 @@ var Clickable = makeAble("clickable", {
|
|
|
43694
44215
|
containsTarget
|
|
43695
44216
|
}));
|
|
43696
44217
|
},
|
|
43697
|
-
dragControlEnd: function(moveable) {
|
|
43698
|
-
this.
|
|
44218
|
+
dragControlEnd: function(moveable, e) {
|
|
44219
|
+
this.dragEnd(moveable, e);
|
|
43699
44220
|
},
|
|
43700
|
-
dragGroupControlEnd: function(moveable) {
|
|
43701
|
-
this.
|
|
44221
|
+
dragGroupControlEnd: function(moveable, e) {
|
|
44222
|
+
this.dragEnd(moveable, e);
|
|
43702
44223
|
},
|
|
43703
44224
|
endEvent: function(moveable) {
|
|
43704
44225
|
var _this = this;
|
|
43705
|
-
requestAnimationFrame(function() {
|
|
44226
|
+
requestAnimationFrame$1(function() {
|
|
43706
44227
|
_this.unset(moveable);
|
|
43707
44228
|
});
|
|
43708
44229
|
},
|
|
@@ -43754,7 +44275,7 @@ var edgeDraggable = makeAble("edgeDraggable", {
|
|
|
43754
44275
|
return Draggable.dragGroupEnd(moveable, getDraggableEvent(e));
|
|
43755
44276
|
},
|
|
43756
44277
|
unset: function(moveable) {
|
|
43757
|
-
moveable
|
|
44278
|
+
return Draggable.unset(moveable);
|
|
43758
44279
|
}
|
|
43759
44280
|
});
|
|
43760
44281
|
var IndividualGroupable = {
|
|
@@ -43852,31 +44373,6 @@ var MoveableGroup = /* @__PURE__ */ function(_super) {
|
|
|
43852
44373
|
return _this;
|
|
43853
44374
|
}
|
|
43854
44375
|
var __proto = MoveableGroup2.prototype;
|
|
43855
|
-
__proto.updateEvent = function(prevProps) {
|
|
43856
|
-
var state = this.state;
|
|
43857
|
-
var props = this.props;
|
|
43858
|
-
var prevTarget = prevProps.dragTarget || state.target;
|
|
43859
|
-
var nextTarget = props.dragTarget || this.areaElement;
|
|
43860
|
-
if (prevTarget !== nextTarget) {
|
|
43861
|
-
unset(this, "targetGesto");
|
|
43862
|
-
unset(this, "controlGesto");
|
|
43863
|
-
state.target = null;
|
|
43864
|
-
}
|
|
43865
|
-
if (!state.target) {
|
|
43866
|
-
state.target = this.areaElement;
|
|
43867
|
-
this.controlBox.getElement().style.display = "block";
|
|
43868
|
-
this.targetGesto = getTargetAbleGesto(this, nextTarget, "Group");
|
|
43869
|
-
this.controlGesto = getAbleGesto(this, this.controlBox.getElement(), "controlAbles", "GroupControl");
|
|
43870
|
-
}
|
|
43871
|
-
var isContainerChanged = !equals(prevProps.container, props.container);
|
|
43872
|
-
if (isContainerChanged) {
|
|
43873
|
-
state.container = props.container;
|
|
43874
|
-
}
|
|
43875
|
-
var _a3 = this.differ.update(props.targets), added = _a3.added, changed = _a3.changed, removed = _a3.removed;
|
|
43876
|
-
if (isContainerChanged || added.length || changed.length || removed.length) {
|
|
43877
|
-
this.updateRect();
|
|
43878
|
-
}
|
|
43879
|
-
};
|
|
43880
44376
|
__proto.checkUpdate = function() {
|
|
43881
44377
|
this.updateAbles();
|
|
43882
44378
|
};
|
|
@@ -43943,7 +44439,38 @@ var MoveableGroup = /* @__PURE__ */ function(_super) {
|
|
|
43943
44439
|
}
|
|
43944
44440
|
};
|
|
43945
44441
|
__proto.updateAbles = function() {
|
|
43946
|
-
_super.prototype.updateAbles.call(this,
|
|
44442
|
+
_super.prototype.updateAbles.call(this, __spreadArray(__spreadArray([], this.props.ables), [Groupable]), "Group");
|
|
44443
|
+
};
|
|
44444
|
+
__proto._updateTargets = function() {
|
|
44445
|
+
_super.prototype._updateTargets.call(this);
|
|
44446
|
+
this._prevTarget = this.props.dragTarget || this.areaElement;
|
|
44447
|
+
};
|
|
44448
|
+
__proto._updateEvents = function() {
|
|
44449
|
+
var state = this.state;
|
|
44450
|
+
var props = this.props;
|
|
44451
|
+
var prevTarget = this._prevTarget;
|
|
44452
|
+
var nextTarget = props.dragTarget || this.areaElement;
|
|
44453
|
+
if (prevTarget !== nextTarget) {
|
|
44454
|
+
unset(this, "targetGesto");
|
|
44455
|
+
unset(this, "controlGesto");
|
|
44456
|
+
state.target = null;
|
|
44457
|
+
}
|
|
44458
|
+
if (!state.target) {
|
|
44459
|
+
state.target = this.areaElement;
|
|
44460
|
+
this.controlBox.getElement().style.display = "block";
|
|
44461
|
+
this.targetGesto = getTargetAbleGesto(this, nextTarget, "Group");
|
|
44462
|
+
this.controlGesto = getAbleGesto(this, this.controlBox.getElement(), "controlAbles", "GroupControl");
|
|
44463
|
+
}
|
|
44464
|
+
var isContainerChanged = !equals(state.container, props.container);
|
|
44465
|
+
if (isContainerChanged) {
|
|
44466
|
+
state.container = props.container;
|
|
44467
|
+
}
|
|
44468
|
+
var _a3 = this.differ.update(props.targets), added = _a3.added, changed = _a3.changed, removed = _a3.removed;
|
|
44469
|
+
if (isContainerChanged || added.length || changed.length || removed.length) {
|
|
44470
|
+
this.updateRect();
|
|
44471
|
+
}
|
|
44472
|
+
};
|
|
44473
|
+
__proto._updateObserver = function() {
|
|
43947
44474
|
};
|
|
43948
44475
|
MoveableGroup2.defaultProps = __assign$2(__assign$2({}, MoveableManager$1.defaultProps), {
|
|
43949
44476
|
transformOrigin: ["50%", "50%"],
|
|
@@ -44022,14 +44549,16 @@ var MoveableIndividualGroup = /* @__PURE__ */ function(_super) {
|
|
|
44022
44549
|
};
|
|
44023
44550
|
__proto.updateRenderPoses = function() {
|
|
44024
44551
|
};
|
|
44025
|
-
__proto.updateEvent = function() {
|
|
44026
|
-
};
|
|
44027
44552
|
__proto.checkUpdate = function() {
|
|
44028
44553
|
};
|
|
44029
44554
|
__proto.triggerEvent = function() {
|
|
44030
44555
|
};
|
|
44031
44556
|
__proto.updateAbles = function() {
|
|
44032
44557
|
};
|
|
44558
|
+
__proto._updateEvents = function() {
|
|
44559
|
+
};
|
|
44560
|
+
__proto._updateObserver = function() {
|
|
44561
|
+
};
|
|
44033
44562
|
return MoveableIndividualGroup2;
|
|
44034
44563
|
}(MoveableManager$1);
|
|
44035
44564
|
var InitialMoveable = /* @__PURE__ */ function(_super) {
|
|
@@ -44057,7 +44586,7 @@ var InitialMoveable = /* @__PURE__ */ function(_super) {
|
|
|
44057
44586
|
this.defaultStyled = styled("div", prefixCSS(PREFIX, MOVEABLE_CSS + style));
|
|
44058
44587
|
};
|
|
44059
44588
|
InitialMoveable2.getTotalAbles = function() {
|
|
44060
|
-
return
|
|
44589
|
+
return __spreadArray([Default, Groupable, IndividualGroupable, DragArea], this.defaultAbles);
|
|
44061
44590
|
};
|
|
44062
44591
|
__proto.render = function() {
|
|
44063
44592
|
var moveableContructor = this.constructor;
|
|
@@ -44065,12 +44594,11 @@ var InitialMoveable = /* @__PURE__ */ function(_super) {
|
|
|
44065
44594
|
moveableContructor.makeStyled();
|
|
44066
44595
|
}
|
|
44067
44596
|
var _a3 = this.props, userAbles = _a3.ables, userProps = _a3.props, props = __rest(_a3, ["ables", "props"]);
|
|
44068
|
-
var refTargets =
|
|
44597
|
+
var refTargets = this._updateRefs(true);
|
|
44069
44598
|
var elementTargets = getElementTargets(refTargets, this.selectorMap);
|
|
44070
|
-
this.refTargets = refTargets;
|
|
44071
44599
|
var isGroup = elementTargets.length > 1;
|
|
44072
44600
|
var totalAbles = moveableContructor.getTotalAbles();
|
|
44073
|
-
var ables =
|
|
44601
|
+
var ables = __spreadArray(__spreadArray([], totalAbles), userAbles || []);
|
|
44074
44602
|
var nextProps = __assign$2(__assign$2(__assign$2({}, props), userProps || {}), {
|
|
44075
44603
|
ables,
|
|
44076
44604
|
cssStyled: moveableContructor.defaultStyled,
|
|
@@ -44103,15 +44631,20 @@ var InitialMoveable = /* @__PURE__ */ function(_super) {
|
|
|
44103
44631
|
}
|
|
44104
44632
|
};
|
|
44105
44633
|
__proto.componentDidMount = function() {
|
|
44106
|
-
this.
|
|
44634
|
+
this._updateRefs();
|
|
44107
44635
|
};
|
|
44108
44636
|
__proto.componentDidUpdate = function() {
|
|
44109
|
-
this.
|
|
44637
|
+
this._updateRefs();
|
|
44638
|
+
};
|
|
44639
|
+
__proto.getManager = function() {
|
|
44640
|
+
return this.moveable;
|
|
44110
44641
|
};
|
|
44111
|
-
__proto.
|
|
44112
|
-
var
|
|
44113
|
-
var
|
|
44114
|
-
|
|
44642
|
+
__proto._updateRefs = function(isRender) {
|
|
44643
|
+
var prevRefTargets = this.refTargets;
|
|
44644
|
+
var nextRefTargets = getRefTargets(this.props.target || this.props.targets);
|
|
44645
|
+
var isBrowser = typeof document !== "undefined";
|
|
44646
|
+
var isUpdate = prevRefTargets.length !== nextRefTargets.length || prevRefTargets.some(function(target, i2) {
|
|
44647
|
+
var nextTarget = nextRefTargets[i2];
|
|
44115
44648
|
if (!target && !nextTarget) {
|
|
44116
44649
|
return false;
|
|
44117
44650
|
} else if (target !== nextTarget) {
|
|
@@ -44119,11 +44652,11 @@ var InitialMoveable = /* @__PURE__ */ function(_super) {
|
|
|
44119
44652
|
}
|
|
44120
44653
|
return false;
|
|
44121
44654
|
});
|
|
44122
|
-
var selectorMap =
|
|
44655
|
+
var selectorMap = this.selectorMap;
|
|
44123
44656
|
var nextSelectorMap = {};
|
|
44124
44657
|
this.refTargets.forEach(function(target) {
|
|
44125
44658
|
if (isString(target)) {
|
|
44126
|
-
if (!selectorMap[target]) {
|
|
44659
|
+
if (!selectorMap[target] && isBrowser) {
|
|
44127
44660
|
isUpdate = true;
|
|
44128
44661
|
nextSelectorMap[target] = [].slice.call(document.querySelectorAll(target));
|
|
44129
44662
|
} else {
|
|
@@ -44131,13 +44664,12 @@ var InitialMoveable = /* @__PURE__ */ function(_super) {
|
|
|
44131
44664
|
}
|
|
44132
44665
|
}
|
|
44133
44666
|
});
|
|
44667
|
+
this.refTargets = nextRefTargets;
|
|
44134
44668
|
this.selectorMap = nextSelectorMap;
|
|
44135
|
-
if (isUpdate) {
|
|
44669
|
+
if (!isRender && isUpdate) {
|
|
44136
44670
|
this.forceUpdate();
|
|
44137
44671
|
}
|
|
44138
|
-
|
|
44139
|
-
__proto.getManager = function() {
|
|
44140
|
-
return this.moveable;
|
|
44672
|
+
return nextRefTargets;
|
|
44141
44673
|
};
|
|
44142
44674
|
InitialMoveable2.defaultAbles = [];
|
|
44143
44675
|
InitialMoveable2.customStyledMap = {};
|
|
@@ -45745,6 +46277,12 @@ const _TxtStage = class extends Container {
|
|
|
45745
46277
|
s2.paddingTop = ((_e = hArg.pt) != null ? _e : "0") + "px";
|
|
45746
46278
|
if ("pb" in hArg)
|
|
45747
46279
|
s2.paddingBottom = ((_f = hArg.pb) != null ? _f : "0") + "px";
|
|
46280
|
+
if ("kinsoku_sol" in hArg)
|
|
46281
|
+
__privateSet(_TxtStage, _reg\u884C\u982D\u7981\u5247, new RegExp(`[${hArg.kinsoku_sol}]`));
|
|
46282
|
+
if ("kinsoku_eol" in hArg)
|
|
46283
|
+
__privateSet(_TxtStage, _reg\u884C\u672B\u7981\u5247, new RegExp(`[${hArg.kinsoku_eol}]`));
|
|
46284
|
+
if ("kinsoku_dns" in hArg)
|
|
46285
|
+
__privateSet(_TxtStage, _reg\u5206\u5272\u7981\u6B62, new RegExp(`[${hArg.kinsoku_dns}]`));
|
|
45748
46286
|
__privateMethod(this, _lay_sub, lay_sub_fn).call(this);
|
|
45749
46287
|
__privateGet(this, _idc2).sethArg(hArg);
|
|
45750
46288
|
__privateSet(this, _left, this.spLay.position.x);
|
|
@@ -51641,7 +52179,7 @@ init_fn = async function() {
|
|
|
51641
52179
|
const hApp = {
|
|
51642
52180
|
width: __privateGet(this, _cfg3).oCfg.window.width,
|
|
51643
52181
|
height: __privateGet(this, _cfg3).oCfg.window.height,
|
|
51644
|
-
backgroundColor:
|
|
52182
|
+
backgroundColor: parseColor(__privateGet(this, _cfg3).oCfg.init.bg_color),
|
|
51645
52183
|
resolution: (_b3 = globalThis.devicePixelRatio) != null ? _b3 : 1,
|
|
51646
52184
|
autoResize: true
|
|
51647
52185
|
};
|