fuxi-topology 0.2.0 → 0.2.1
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/fuxi-topology.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EventEmitter as
|
|
1
|
+
import { EventEmitter as Ce, Container as ee, Graphics as We, Sprite as Ur, Texture as Se, Rectangle as hn, Point as Hr, MeshRope as Yr, TilingSprite as Br, TextStyle as Gr, Text as ii, Assets as Wr, ColorMatrixFilter as ri, Filter as oi, GlProgram as si, UniformGroup as ai, Application as Xr } from "pixi.js";
|
|
2
2
|
import it from "pathfinding";
|
|
3
|
-
import { zoom as qr, ZoomTransform as
|
|
4
|
-
import { ZoomTransform as
|
|
3
|
+
import { zoom as qr, ZoomTransform as Dt, zoomTransform as jr, zoomIdentity as Vr } from "d3-zoom";
|
|
4
|
+
import { ZoomTransform as ef } from "d3-zoom";
|
|
5
5
|
function ci(e) {
|
|
6
6
|
return typeof e > "u" || e === null;
|
|
7
7
|
}
|
|
@@ -27,7 +27,7 @@ function Qr(e, t) {
|
|
|
27
27
|
function eo(e) {
|
|
28
28
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
29
29
|
}
|
|
30
|
-
var to = ci, no = Jr, io = Kr, ro = Qr, oo = eo, so = Zr,
|
|
30
|
+
var to = ci, no = Jr, io = Kr, ro = Qr, oo = eo, so = Zr, I = {
|
|
31
31
|
isNothing: to,
|
|
32
32
|
isObject: no,
|
|
33
33
|
toArray: io,
|
|
@@ -58,8 +58,8 @@ function Rt(e, t, n, i, r) {
|
|
|
58
58
|
// relative position
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
61
|
+
function $t(e, t) {
|
|
62
|
+
return I.repeat(" ", t - e.length) + e;
|
|
63
63
|
}
|
|
64
64
|
function ao(e, t) {
|
|
65
65
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
@@ -75,10 +75,10 @@ function ao(e, t) {
|
|
|
75
75
|
r[s - c],
|
|
76
76
|
e.position - (i[s] - i[s - c]),
|
|
77
77
|
u
|
|
78
|
-
), a =
|
|
78
|
+
), a = I.repeat(" ", t.indent) + $t((e.line - c + 1).toString(), h) + " | " + l.str + `
|
|
79
79
|
` + a;
|
|
80
|
-
for (l = Rt(e.buffer, i[s], r[s], e.position, u), a +=
|
|
81
|
-
`, a +=
|
|
80
|
+
for (l = Rt(e.buffer, i[s], r[s], e.position, u), a += I.repeat(" ", t.indent) + $t((e.line + 1).toString(), h) + " | " + l.str + `
|
|
81
|
+
`, a += I.repeat("-", t.indent + h + 3 + l.pos) + `^
|
|
82
82
|
`, c = 1; c <= t.linesAfter && !(s + c >= r.length); c++)
|
|
83
83
|
l = Rt(
|
|
84
84
|
e.buffer,
|
|
@@ -86,7 +86,7 @@ function ao(e, t) {
|
|
|
86
86
|
r[s + c],
|
|
87
87
|
e.position - (i[s] - i[s + c]),
|
|
88
88
|
u
|
|
89
|
-
), a +=
|
|
89
|
+
), a += I.repeat(" ", t.indent) + $t((e.line + c + 1).toString(), h) + " | " + l.str + `
|
|
90
90
|
`;
|
|
91
91
|
return a.replace(/\n$/, "");
|
|
92
92
|
}
|
|
@@ -125,8 +125,8 @@ function fo(e, t) {
|
|
|
125
125
|
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = uo(t.styleAliases || null), ho.indexOf(this.kind) === -1)
|
|
126
126
|
throw new O('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
127
127
|
}
|
|
128
|
-
var
|
|
129
|
-
function
|
|
128
|
+
var C = fo;
|
|
129
|
+
function In(e, t) {
|
|
130
130
|
var n = [];
|
|
131
131
|
return e[t].forEach(function(i) {
|
|
132
132
|
var r = n.length;
|
|
@@ -155,12 +155,12 @@ function po() {
|
|
|
155
155
|
arguments[t].forEach(i);
|
|
156
156
|
return e;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Wt(e) {
|
|
159
159
|
return this.extend(e);
|
|
160
160
|
}
|
|
161
|
-
|
|
161
|
+
Wt.prototype.extend = function(t) {
|
|
162
162
|
var n = [], i = [];
|
|
163
|
-
if (t instanceof
|
|
163
|
+
if (t instanceof C)
|
|
164
164
|
i.push(t);
|
|
165
165
|
else if (Array.isArray(t))
|
|
166
166
|
i = i.concat(t);
|
|
@@ -169,30 +169,30 @@ Gt.prototype.extend = function(t) {
|
|
|
169
169
|
else
|
|
170
170
|
throw new O("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
171
171
|
n.forEach(function(o) {
|
|
172
|
-
if (!(o instanceof
|
|
172
|
+
if (!(o instanceof C))
|
|
173
173
|
throw new O("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
174
174
|
if (o.loadKind && o.loadKind !== "scalar")
|
|
175
175
|
throw new O("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
176
176
|
if (o.multi)
|
|
177
177
|
throw new O("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
178
178
|
}), i.forEach(function(o) {
|
|
179
|
-
if (!(o instanceof
|
|
179
|
+
if (!(o instanceof C))
|
|
180
180
|
throw new O("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
181
181
|
});
|
|
182
|
-
var r = Object.create(
|
|
183
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit =
|
|
182
|
+
var r = Object.create(Wt.prototype);
|
|
183
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit = In(r, "implicit"), r.compiledExplicit = In(r, "explicit"), r.compiledTypeMap = po(r.compiledImplicit, r.compiledExplicit), r;
|
|
184
184
|
};
|
|
185
|
-
var hi =
|
|
185
|
+
var hi = Wt, ui = new C("tag:yaml.org,2002:str", {
|
|
186
186
|
kind: "scalar",
|
|
187
187
|
construct: function(e) {
|
|
188
188
|
return e !== null ? e : "";
|
|
189
189
|
}
|
|
190
|
-
}), fi = new
|
|
190
|
+
}), fi = new C("tag:yaml.org,2002:seq", {
|
|
191
191
|
kind: "sequence",
|
|
192
192
|
construct: function(e) {
|
|
193
193
|
return e !== null ? e : [];
|
|
194
194
|
}
|
|
195
|
-
}), di = new
|
|
195
|
+
}), di = new C("tag:yaml.org,2002:map", {
|
|
196
196
|
kind: "mapping",
|
|
197
197
|
construct: function(e) {
|
|
198
198
|
return e !== null ? e : {};
|
|
@@ -215,7 +215,7 @@ function mo() {
|
|
|
215
215
|
function xo(e) {
|
|
216
216
|
return e === null;
|
|
217
217
|
}
|
|
218
|
-
var gi = new
|
|
218
|
+
var gi = new C("tag:yaml.org,2002:null", {
|
|
219
219
|
kind: "scalar",
|
|
220
220
|
resolve: go,
|
|
221
221
|
construct: mo,
|
|
@@ -247,14 +247,14 @@ function vo(e) {
|
|
|
247
247
|
function yo(e) {
|
|
248
248
|
return e === "true" || e === "True" || e === "TRUE";
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function _o(e) {
|
|
251
251
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
252
252
|
}
|
|
253
|
-
var mi = new
|
|
253
|
+
var mi = new C("tag:yaml.org,2002:bool", {
|
|
254
254
|
kind: "scalar",
|
|
255
255
|
resolve: vo,
|
|
256
256
|
construct: yo,
|
|
257
|
-
predicate:
|
|
257
|
+
predicate: _o,
|
|
258
258
|
represent: {
|
|
259
259
|
lowercase: function(e) {
|
|
260
260
|
return e ? "true" : "false";
|
|
@@ -268,7 +268,7 @@ var mi = new I("tag:yaml.org,2002:bool", {
|
|
|
268
268
|
},
|
|
269
269
|
defaultStyle: "lowercase"
|
|
270
270
|
});
|
|
271
|
-
function
|
|
271
|
+
function wo(e) {
|
|
272
272
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
273
273
|
}
|
|
274
274
|
function So(e) {
|
|
@@ -294,7 +294,7 @@ function bo(e) {
|
|
|
294
294
|
if (r === "x") {
|
|
295
295
|
for (n++; n < t; n++)
|
|
296
296
|
if (r = e[n], r !== "_") {
|
|
297
|
-
if (!
|
|
297
|
+
if (!wo(e.charCodeAt(n))) return !1;
|
|
298
298
|
i = !0;
|
|
299
299
|
}
|
|
300
300
|
return i && r !== "_";
|
|
@@ -317,7 +317,7 @@ function bo(e) {
|
|
|
317
317
|
}
|
|
318
318
|
return !(!i || r === "_");
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function Io(e) {
|
|
321
321
|
var t = e, n = 1, i;
|
|
322
322
|
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), i = t[0], (i === "-" || i === "+") && (i === "-" && (n = -1), t = t.slice(1), i = t[0]), t === "0") return 0;
|
|
323
323
|
if (i === "0") {
|
|
@@ -327,14 +327,14 @@ function Co(e) {
|
|
|
327
327
|
}
|
|
328
328
|
return n * parseInt(t, 10);
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !
|
|
330
|
+
function Co(e) {
|
|
331
|
+
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !I.isNegativeZero(e);
|
|
332
332
|
}
|
|
333
|
-
var xi = new
|
|
333
|
+
var xi = new C("tag:yaml.org,2002:int", {
|
|
334
334
|
kind: "scalar",
|
|
335
335
|
resolve: bo,
|
|
336
|
-
construct:
|
|
337
|
-
predicate:
|
|
336
|
+
construct: Io,
|
|
337
|
+
predicate: Co,
|
|
338
338
|
represent: {
|
|
339
339
|
binary: function(e) {
|
|
340
340
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -361,12 +361,12 @@ var xi = new I("tag:yaml.org,2002:int", {
|
|
|
361
361
|
// 2.5e4, 2.5 and integers
|
|
362
362
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
363
363
|
);
|
|
364
|
-
function
|
|
364
|
+
function Eo(e) {
|
|
365
365
|
return !(e === null || !To.test(e) || // Quick hack to not allow integers end with `_`
|
|
366
366
|
// Probably should update regexp & check speed
|
|
367
367
|
e[e.length - 1] === "_");
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Mo(e) {
|
|
370
370
|
var t, n;
|
|
371
371
|
return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
372
372
|
}
|
|
@@ -400,17 +400,17 @@ function Po(e, t) {
|
|
|
400
400
|
case "camelcase":
|
|
401
401
|
return "-.Inf";
|
|
402
402
|
}
|
|
403
|
-
else if (
|
|
403
|
+
else if (I.isNegativeZero(e))
|
|
404
404
|
return "-0.0";
|
|
405
405
|
return n = e.toString(10), Oo.test(n) ? n.replace("e", ".e") : n;
|
|
406
406
|
}
|
|
407
407
|
function Lo(e) {
|
|
408
|
-
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 ||
|
|
408
|
+
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || I.isNegativeZero(e));
|
|
409
409
|
}
|
|
410
|
-
var vi = new
|
|
410
|
+
var vi = new C("tag:yaml.org,2002:float", {
|
|
411
411
|
kind: "scalar",
|
|
412
|
-
resolve:
|
|
413
|
-
construct:
|
|
412
|
+
resolve: Eo,
|
|
413
|
+
construct: Mo,
|
|
414
414
|
predicate: Lo,
|
|
415
415
|
represent: Po,
|
|
416
416
|
defaultStyle: "lowercase"
|
|
@@ -421,17 +421,17 @@ var vi = new I("tag:yaml.org,2002:float", {
|
|
|
421
421
|
xi,
|
|
422
422
|
vi
|
|
423
423
|
]
|
|
424
|
-
}),
|
|
424
|
+
}), _i = yi, wi = new RegExp(
|
|
425
425
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
426
426
|
), Si = new RegExp(
|
|
427
427
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
428
428
|
);
|
|
429
429
|
function ko(e) {
|
|
430
|
-
return e === null ? !1 :
|
|
430
|
+
return e === null ? !1 : wi.exec(e) !== null || Si.exec(e) !== null;
|
|
431
431
|
}
|
|
432
432
|
function No(e) {
|
|
433
433
|
var t, n, i, r, o, s, a, c = 0, l = null, h, u, f;
|
|
434
|
-
if (t =
|
|
434
|
+
if (t = wi.exec(e), t === null && (t = Si.exec(e)), t === null) throw new Error("Date resolve error");
|
|
435
435
|
if (n = +t[1], i = +t[2] - 1, r = +t[3], !t[4])
|
|
436
436
|
return new Date(Date.UTC(n, i, r));
|
|
437
437
|
if (o = +t[4], s = +t[5], a = +t[6], t[7]) {
|
|
@@ -441,27 +441,27 @@ function No(e) {
|
|
|
441
441
|
}
|
|
442
442
|
return t[9] && (h = +t[10], u = +(t[11] || 0), l = (h * 60 + u) * 6e4, t[9] === "-" && (l = -l)), f = new Date(Date.UTC(n, i, r, o, s, a, c)), l && f.setTime(f.getTime() - l), f;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Do(e) {
|
|
445
445
|
return e.toISOString();
|
|
446
446
|
}
|
|
447
|
-
var Ai = new
|
|
447
|
+
var Ai = new C("tag:yaml.org,2002:timestamp", {
|
|
448
448
|
kind: "scalar",
|
|
449
449
|
resolve: ko,
|
|
450
450
|
construct: No,
|
|
451
451
|
instanceOf: Date,
|
|
452
|
-
represent:
|
|
452
|
+
represent: Do
|
|
453
453
|
});
|
|
454
|
-
function
|
|
454
|
+
function Ro(e) {
|
|
455
455
|
return e === "<<" || e === null;
|
|
456
456
|
}
|
|
457
|
-
var bi = new
|
|
457
|
+
var bi = new C("tag:yaml.org,2002:merge", {
|
|
458
458
|
kind: "scalar",
|
|
459
|
-
resolve:
|
|
460
|
-
}),
|
|
459
|
+
resolve: Ro
|
|
460
|
+
}), un = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
461
461
|
\r`;
|
|
462
462
|
function $o(e) {
|
|
463
463
|
if (e === null) return !1;
|
|
464
|
-
var t, n, i = 0, r = e.length, o =
|
|
464
|
+
var t, n, i = 0, r = e.length, o = un;
|
|
465
465
|
for (n = 0; n < r; n++)
|
|
466
466
|
if (t = o.indexOf(e.charAt(n)), !(t > 64)) {
|
|
467
467
|
if (t < 0) return !1;
|
|
@@ -470,13 +470,13 @@ function $o(e) {
|
|
|
470
470
|
return i % 8 === 0;
|
|
471
471
|
}
|
|
472
472
|
function Fo(e) {
|
|
473
|
-
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o =
|
|
473
|
+
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = un, s = 0, a = [];
|
|
474
474
|
for (t = 0; t < r; t++)
|
|
475
475
|
t % 4 === 0 && t && (a.push(s >> 16 & 255), a.push(s >> 8 & 255), a.push(s & 255)), s = s << 6 | o.indexOf(i.charAt(t));
|
|
476
476
|
return n = r % 4 * 6, n === 0 ? (a.push(s >> 16 & 255), a.push(s >> 8 & 255), a.push(s & 255)) : n === 18 ? (a.push(s >> 10 & 255), a.push(s >> 2 & 255)) : n === 12 && a.push(s >> 4 & 255), new Uint8Array(a);
|
|
477
477
|
}
|
|
478
478
|
function zo(e) {
|
|
479
|
-
var t = "", n = 0, i, r, o = e.length, s =
|
|
479
|
+
var t = "", n = 0, i, r, o = e.length, s = un;
|
|
480
480
|
for (i = 0; i < o; i++)
|
|
481
481
|
i % 3 === 0 && i && (t += s[n >> 18 & 63], t += s[n >> 12 & 63], t += s[n >> 6 & 63], t += s[n & 63]), n = (n << 8) + e[i];
|
|
482
482
|
return r = o % 3, r === 0 ? (t += s[n >> 18 & 63], t += s[n >> 12 & 63], t += s[n >> 6 & 63], t += s[n & 63]) : r === 2 ? (t += s[n >> 10 & 63], t += s[n >> 4 & 63], t += s[n << 2 & 63], t += s[64]) : r === 1 && (t += s[n >> 2 & 63], t += s[n << 4 & 63], t += s[64], t += s[64]), t;
|
|
@@ -484,7 +484,7 @@ function zo(e) {
|
|
|
484
484
|
function Uo(e) {
|
|
485
485
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
486
486
|
}
|
|
487
|
-
var
|
|
487
|
+
var Ii = new C("tag:yaml.org,2002:binary", {
|
|
488
488
|
kind: "scalar",
|
|
489
489
|
resolve: $o,
|
|
490
490
|
construct: Fo,
|
|
@@ -509,7 +509,7 @@ function Bo(e) {
|
|
|
509
509
|
function Go(e) {
|
|
510
510
|
return e !== null ? e : [];
|
|
511
511
|
}
|
|
512
|
-
var
|
|
512
|
+
var Ci = new C("tag:yaml.org,2002:omap", {
|
|
513
513
|
kind: "sequence",
|
|
514
514
|
resolve: Bo,
|
|
515
515
|
construct: Go
|
|
@@ -530,7 +530,7 @@ function qo(e) {
|
|
|
530
530
|
i = s[t], r = Object.keys(i), o[t] = [r[0], i[r[0]]];
|
|
531
531
|
return o;
|
|
532
532
|
}
|
|
533
|
-
var Ti = new
|
|
533
|
+
var Ti = new C("tag:yaml.org,2002:pairs", {
|
|
534
534
|
kind: "sequence",
|
|
535
535
|
resolve: Xo,
|
|
536
536
|
construct: qo
|
|
@@ -546,22 +546,22 @@ function Vo(e) {
|
|
|
546
546
|
function Jo(e) {
|
|
547
547
|
return e !== null ? e : {};
|
|
548
548
|
}
|
|
549
|
-
var
|
|
549
|
+
var Ei = new C("tag:yaml.org,2002:set", {
|
|
550
550
|
kind: "mapping",
|
|
551
551
|
resolve: Vo,
|
|
552
552
|
construct: Jo
|
|
553
|
-
}),
|
|
553
|
+
}), fn = _i.extend({
|
|
554
554
|
implicit: [
|
|
555
555
|
Ai,
|
|
556
556
|
bi
|
|
557
557
|
],
|
|
558
558
|
explicit: [
|
|
559
|
-
Ci,
|
|
560
559
|
Ii,
|
|
560
|
+
Ci,
|
|
561
561
|
Ti,
|
|
562
|
-
|
|
562
|
+
Ei
|
|
563
563
|
]
|
|
564
|
-
}), te = Object.prototype.hasOwnProperty, ct = 1,
|
|
564
|
+
}), te = Object.prototype.hasOwnProperty, ct = 1, Mi = 2, Oi = 3, lt = 4, Ft = 1, Ko = 2, Cn = 3, Zo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Qo = /[\x85\u2028\u2029]/, es = /[,\[\]\{\}]/, Pi = /^(?:!|!!|![a-z\-]+!)$/i, Li = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
565
565
|
function Tn(e) {
|
|
566
566
|
return Object.prototype.toString.call(e);
|
|
567
567
|
}
|
|
@@ -587,7 +587,7 @@ function ns(e) {
|
|
|
587
587
|
function is(e) {
|
|
588
588
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
589
589
|
}
|
|
590
|
-
function
|
|
590
|
+
function En(e) {
|
|
591
591
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
592
592
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
593
593
|
}
|
|
@@ -605,13 +605,13 @@ function ki(e, t, n) {
|
|
|
605
605
|
value: n
|
|
606
606
|
}) : e[t] = n;
|
|
607
607
|
}
|
|
608
|
-
var Ni = new Array(256),
|
|
608
|
+
var Ni = new Array(256), Di = new Array(256);
|
|
609
609
|
for (var ge = 0; ge < 256; ge++)
|
|
610
|
-
Ni[ge] =
|
|
610
|
+
Ni[ge] = En(ge) ? 1 : 0, Di[ge] = En(ge);
|
|
611
611
|
function os(e, t) {
|
|
612
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
612
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || fn, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
613
613
|
}
|
|
614
|
-
function
|
|
614
|
+
function Ri(e, t) {
|
|
615
615
|
var n = {
|
|
616
616
|
name: e.filename,
|
|
617
617
|
buffer: e.input.slice(0, -1),
|
|
@@ -623,12 +623,12 @@ function Di(e, t) {
|
|
|
623
623
|
return n.snippet = co(n), new O(t, n);
|
|
624
624
|
}
|
|
625
625
|
function y(e, t) {
|
|
626
|
-
throw
|
|
626
|
+
throw Ri(e, t);
|
|
627
627
|
}
|
|
628
628
|
function ht(e, t) {
|
|
629
|
-
e.onWarning && e.onWarning.call(null,
|
|
629
|
+
e.onWarning && e.onWarning.call(null, Ri(e, t));
|
|
630
630
|
}
|
|
631
|
-
var
|
|
631
|
+
var Mn = {
|
|
632
632
|
YAML: function(t, n, i) {
|
|
633
633
|
var r, o, s;
|
|
634
634
|
t.version !== null && y(t, "duplication of %YAML directive"), i.length !== 1 && y(t, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), r === null && y(t, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), s = parseInt(r[2], 10), o !== 1 && y(t, "unacceptable YAML version of the document"), t.version = i[0], t.checkLineBreaks = s < 2, s !== 1 && s !== 2 && ht(t, "unsupported YAML version of the document");
|
|
@@ -656,7 +656,7 @@ function Q(e, t, n, i) {
|
|
|
656
656
|
}
|
|
657
657
|
function On(e, t, n, i) {
|
|
658
658
|
var r, o, s, a;
|
|
659
|
-
for (
|
|
659
|
+
for (I.isObject(n) || y(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), s = 0, a = r.length; s < a; s += 1)
|
|
660
660
|
o = r[s], te.call(t, o) || (ki(t, o, n[o]), i[o] = !0);
|
|
661
661
|
}
|
|
662
662
|
function ve(e, t, n, i, r, o, s, a, c) {
|
|
@@ -674,7 +674,7 @@ function ve(e, t, n, i, r, o, s, a, c) {
|
|
|
674
674
|
!e.json && !te.call(n, r) && te.call(t, r) && (e.line = s || e.line, e.lineStart = a || e.lineStart, e.position = c || e.position, y(e, "duplicated mapping key")), ki(t, r, o), delete n[r];
|
|
675
675
|
return t;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function dn(e) {
|
|
678
678
|
var t;
|
|
679
679
|
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : y(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
680
680
|
}
|
|
@@ -687,7 +687,7 @@ function A(e, t, n) {
|
|
|
687
687
|
r = e.input.charCodeAt(++e.position);
|
|
688
688
|
while (r !== 10 && r !== 13 && r !== 0);
|
|
689
689
|
if (G(r))
|
|
690
|
-
for (
|
|
690
|
+
for (dn(e), r = e.input.charCodeAt(e.position), i++, e.lineIndent = 0; r === 32; )
|
|
691
691
|
e.lineIndent++, r = e.input.charCodeAt(++e.position);
|
|
692
692
|
else
|
|
693
693
|
break;
|
|
@@ -698,8 +698,8 @@ function At(e) {
|
|
|
698
698
|
var t = e.position, n;
|
|
699
699
|
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || L(n)));
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
t === 1 ? e.result += " " : t > 1 && (e.result +=
|
|
701
|
+
function pn(e, t) {
|
|
702
|
+
t === 1 ? e.result += " " : t > 1 && (e.result += I.repeat(`
|
|
703
703
|
`, t - 1));
|
|
704
704
|
}
|
|
705
705
|
function ss(e, t, n) {
|
|
@@ -725,7 +725,7 @@ function ss(e, t, n) {
|
|
|
725
725
|
break;
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
|
-
a && (Q(e, o, s, !1),
|
|
728
|
+
a && (Q(e, o, s, !1), pn(e, e.line - c), o = s = e.position, a = !1), ue(d) || (s = e.position + 1), d = e.input.charCodeAt(++e.position);
|
|
729
729
|
}
|
|
730
730
|
return Q(e, o, s, !1), e.result ? !0 : (e.kind = u, e.result = f, !1);
|
|
731
731
|
}
|
|
@@ -739,7 +739,7 @@ function as(e, t) {
|
|
|
739
739
|
i = e.position, e.position++, r = e.position;
|
|
740
740
|
else
|
|
741
741
|
return !0;
|
|
742
|
-
else G(n) ? (Q(e, i, r, !0),
|
|
742
|
+
else G(n) ? (Q(e, i, r, !0), pn(e, A(e, !1, t)), i = r = e.position) : e.position === e.lineStart && At(e) ? y(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
743
743
|
y(e, "unexpected end of the stream within a single quoted scalar");
|
|
744
744
|
}
|
|
745
745
|
function cs(e, t) {
|
|
@@ -753,7 +753,7 @@ function cs(e, t) {
|
|
|
753
753
|
if (Q(e, n, e.position, !0), a = e.input.charCodeAt(++e.position), G(a))
|
|
754
754
|
A(e, !1, t);
|
|
755
755
|
else if (a < 256 && Ni[a])
|
|
756
|
-
e.result +=
|
|
756
|
+
e.result += Di[a], e.position++;
|
|
757
757
|
else if ((s = ns(a)) > 0) {
|
|
758
758
|
for (r = s, o = 0; r > 0; r--)
|
|
759
759
|
a = e.input.charCodeAt(++e.position), (s = ts(a)) >= 0 ? o = (o << 4) + s : y(e, "expected hexadecimal character");
|
|
@@ -761,12 +761,12 @@ function cs(e, t) {
|
|
|
761
761
|
} else
|
|
762
762
|
y(e, "unknown escape sequence");
|
|
763
763
|
n = i = e.position;
|
|
764
|
-
} else G(a) ? (Q(e, n, i, !0),
|
|
764
|
+
} else G(a) ? (Q(e, n, i, !0), pn(e, A(e, !1, t)), n = i = e.position) : e.position === e.lineStart && At(e) ? y(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
765
765
|
}
|
|
766
766
|
y(e, "unexpected end of the stream within a double quoted scalar");
|
|
767
767
|
}
|
|
768
768
|
function ls(e, t) {
|
|
769
|
-
var n = !0, i, r, o, s = e.tag, a, c = e.anchor, l, h, u, f, d, p = /* @__PURE__ */ Object.create(null), g, v,
|
|
769
|
+
var n = !0, i, r, o, s = e.tag, a, c = e.anchor, l, h, u, f, d, p = /* @__PURE__ */ Object.create(null), g, v, _, x;
|
|
770
770
|
if (x = e.input.charCodeAt(e.position), x === 91)
|
|
771
771
|
h = 93, d = !1, a = [];
|
|
772
772
|
else if (x === 123)
|
|
@@ -776,12 +776,12 @@ function ls(e, t) {
|
|
|
776
776
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = a), x = e.input.charCodeAt(++e.position); x !== 0; ) {
|
|
777
777
|
if (A(e, !0, t), x = e.input.charCodeAt(e.position), x === h)
|
|
778
778
|
return e.position++, e.tag = s, e.anchor = c, e.kind = d ? "mapping" : "sequence", e.result = a, !0;
|
|
779
|
-
n ? x === 44 && y(e, "expected the node content, but found ','") : y(e, "missed comma between flow collection entries"), v = g =
|
|
779
|
+
n ? x === 44 && y(e, "expected the node content, but found ','") : y(e, "missed comma between flow collection entries"), v = g = _ = null, u = f = !1, x === 63 && (l = e.input.charCodeAt(e.position + 1), L(l) && (u = f = !0, e.position++, A(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Ae(e, t, ct, !1, !0), v = e.tag, g = e.result, A(e, !0, t), x = e.input.charCodeAt(e.position), (f || e.line === i) && x === 58 && (u = !0, x = e.input.charCodeAt(++e.position), A(e, !0, t), Ae(e, t, ct, !1, !0), _ = e.result), d ? ve(e, a, p, v, g, _, i, r, o) : u ? a.push(ve(e, null, p, v, g, _, i, r, o)) : a.push(g), A(e, !0, t), x = e.input.charCodeAt(e.position), x === 44 ? (n = !0, x = e.input.charCodeAt(++e.position)) : n = !1;
|
|
780
780
|
}
|
|
781
781
|
y(e, "unexpected end of the stream within a flow collection");
|
|
782
782
|
}
|
|
783
783
|
function hs(e, t) {
|
|
784
|
-
var n, i, r =
|
|
784
|
+
var n, i, r = Ft, o = !1, s = !1, a = t, c = 0, l = !1, h, u;
|
|
785
785
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
786
786
|
i = !1;
|
|
787
787
|
else if (u === 62)
|
|
@@ -790,7 +790,7 @@ function hs(e, t) {
|
|
|
790
790
|
return !1;
|
|
791
791
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
792
792
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
793
|
-
|
|
793
|
+
Ft === r ? r = u === 43 ? Cn : Ko : y(e, "repeat of a chomping mode identifier");
|
|
794
794
|
else if ((h = is(u)) >= 0)
|
|
795
795
|
h === 0 ? y(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : s ? y(e, "repeat of an indentation width identifier") : (a = t + h - 1, s = !0);
|
|
796
796
|
else
|
|
@@ -805,22 +805,22 @@ function hs(e, t) {
|
|
|
805
805
|
while (!G(u) && u !== 0);
|
|
806
806
|
}
|
|
807
807
|
for (; u !== 0; ) {
|
|
808
|
-
for (
|
|
808
|
+
for (dn(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!s || e.lineIndent < a) && u === 32; )
|
|
809
809
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
810
810
|
if (!s && e.lineIndent > a && (a = e.lineIndent), G(u)) {
|
|
811
811
|
c++;
|
|
812
812
|
continue;
|
|
813
813
|
}
|
|
814
814
|
if (e.lineIndent < a) {
|
|
815
|
-
r ===
|
|
816
|
-
`, o ? 1 + c : c) : r ===
|
|
815
|
+
r === Cn ? e.result += I.repeat(`
|
|
816
|
+
`, o ? 1 + c : c) : r === Ft && o && (e.result += `
|
|
817
817
|
`);
|
|
818
818
|
break;
|
|
819
819
|
}
|
|
820
|
-
for (i ? ue(u) ? (l = !0, e.result +=
|
|
821
|
-
`, o ? 1 + c : c)) : l ? (l = !1, e.result +=
|
|
822
|
-
`, c + 1)) : c === 0 ? o && (e.result += " ") : e.result +=
|
|
823
|
-
`, c) : e.result +=
|
|
820
|
+
for (i ? ue(u) ? (l = !0, e.result += I.repeat(`
|
|
821
|
+
`, o ? 1 + c : c)) : l ? (l = !1, e.result += I.repeat(`
|
|
822
|
+
`, c + 1)) : c === 0 ? o && (e.result += " ") : e.result += I.repeat(`
|
|
823
|
+
`, c) : e.result += I.repeat(`
|
|
824
824
|
`, o ? 1 + c : c), o = !0, s = !0, c = 0, n = e.position; !G(u) && u !== 0; )
|
|
825
825
|
u = e.input.charCodeAt(++e.position);
|
|
826
826
|
Q(e, n, e.position, !1);
|
|
@@ -843,24 +843,24 @@ function Pn(e, t) {
|
|
|
843
843
|
return a ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
844
844
|
}
|
|
845
845
|
function us(e, t, n) {
|
|
846
|
-
var i, r, o, s, a, c, l = e.tag, h = e.anchor, u = {}, f = /* @__PURE__ */ Object.create(null), d = null, p = null, g = null, v = !1,
|
|
846
|
+
var i, r, o, s, a, c, l = e.tag, h = e.anchor, u = {}, f = /* @__PURE__ */ Object.create(null), d = null, p = null, g = null, v = !1, _ = !1, x;
|
|
847
847
|
if (e.firstTabInLine !== -1) return !1;
|
|
848
848
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), x = e.input.charCodeAt(e.position); x !== 0; ) {
|
|
849
849
|
if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, y(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (x === 63 || x === 58) && L(i))
|
|
850
|
-
x === 63 ? (v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null),
|
|
850
|
+
x === 63 ? (v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null), _ = !0, v = !0, r = !0) : v ? (v = !1, r = !0) : y(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = i;
|
|
851
851
|
else {
|
|
852
|
-
if (s = e.line, a = e.lineStart, c = e.position, !Ae(e, n,
|
|
852
|
+
if (s = e.line, a = e.lineStart, c = e.position, !Ae(e, n, Mi, !1, !0))
|
|
853
853
|
break;
|
|
854
854
|
if (e.line === o) {
|
|
855
855
|
for (x = e.input.charCodeAt(e.position); ue(x); )
|
|
856
856
|
x = e.input.charCodeAt(++e.position);
|
|
857
857
|
if (x === 58)
|
|
858
|
-
x = e.input.charCodeAt(++e.position), L(x) || y(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null),
|
|
859
|
-
else if (
|
|
858
|
+
x = e.input.charCodeAt(++e.position), L(x) || y(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (ve(e, u, f, d, p, null, s, a, c), d = p = g = null), _ = !0, v = !1, r = !1, d = e.tag, p = e.result;
|
|
859
|
+
else if (_)
|
|
860
860
|
y(e, "can not read an implicit mapping pair; a colon is missed");
|
|
861
861
|
else
|
|
862
862
|
return e.tag = l, e.anchor = h, !0;
|
|
863
|
-
} else if (
|
|
863
|
+
} else if (_)
|
|
864
864
|
y(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
865
865
|
else
|
|
866
866
|
return e.tag = l, e.anchor = h, !0;
|
|
@@ -870,7 +870,7 @@ function us(e, t, n) {
|
|
|
870
870
|
else if (e.lineIndent < t)
|
|
871
871
|
break;
|
|
872
872
|
}
|
|
873
|
-
return v && ve(e, u, f, d, p, null, s, a, c),
|
|
873
|
+
return v && ve(e, u, f, d, p, null, s, a, c), _ && (e.tag = l, e.anchor = h, e.kind = "mapping", e.result = u), _;
|
|
874
874
|
}
|
|
875
875
|
function fs(e) {
|
|
876
876
|
var t, n = !1, i = !1, r, o, s;
|
|
@@ -912,7 +912,7 @@ function Ae(e, t, n, i, r) {
|
|
|
912
912
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = s = a = lt === n || Oi === n, i && A(e, !0, -1) && (l = !0, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)), c === 1)
|
|
913
913
|
for (; fs(e) || ds(e); )
|
|
914
914
|
A(e, !0, -1) ? (l = !0, a = o, e.lineIndent > t ? c = 1 : e.lineIndent === t ? c = 0 : e.lineIndent < t && (c = -1)) : a = !1;
|
|
915
|
-
if (a && (a = l || r), (c === 1 || lt === n) && (ct === n ||
|
|
915
|
+
if (a && (a = l || r), (c === 1 || lt === n) && (ct === n || Mi === n ? g = t : g = t + 1, v = e.position - e.lineStart, c === 1 ? a && (Pn(e, v) || us(e, v, g)) || ls(e, g) ? h = !0 : (s && hs(e, g) || as(e, g) || cs(e, g) ? h = !0 : ps(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && y(e, "alias node should not have any properties")) : ss(e, g, ct === n) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (h = a && Pn(e, v))), e.tag === null)
|
|
916
916
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
917
917
|
else if (e.tag === "?") {
|
|
918
918
|
for (e.result !== null && e.kind !== "scalar" && y(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, f = e.implicitTypes.length; u < f; u += 1)
|
|
@@ -952,7 +952,7 @@ function gs(e) {
|
|
|
952
952
|
s = e.input.charCodeAt(++e.position);
|
|
953
953
|
r.push(e.input.slice(n, e.position));
|
|
954
954
|
}
|
|
955
|
-
s !== 0 &&
|
|
955
|
+
s !== 0 && dn(e), te.call(Mn, i) ? Mn[i](e, i, r) : ht(e, 'unknown document directive "' + i + '"');
|
|
956
956
|
}
|
|
957
957
|
if (A(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, A(e, !0, -1)) : o && y(e, "directives end mark is expected"), Ae(e, e.lineIndent - 1, lt, !1, !0), A(e, !0, -1), e.checkLineBreaks && Qo.test(e.input.slice(t, e.position)) && ht(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && At(e)) {
|
|
958
958
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, A(e, !0, -1));
|
|
@@ -992,23 +992,23 @@ function xs(e, t) {
|
|
|
992
992
|
var vs = ms, ys = xs, Fi = {
|
|
993
993
|
loadAll: vs,
|
|
994
994
|
load: ys
|
|
995
|
-
}, zi = Object.prototype.toString, Ui = Object.prototype.hasOwnProperty,
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
var
|
|
995
|
+
}, zi = Object.prototype.toString, Ui = Object.prototype.hasOwnProperty, gn = 65279, _s = 9, $e = 10, ws = 13, Ss = 32, As = 33, bs = 34, Xt = 35, Is = 37, Cs = 38, Ts = 39, Es = 42, Hi = 44, Ms = 45, ut = 58, Os = 61, Ps = 62, Ls = 63, ks = 64, Yi = 91, Bi = 93, Ns = 96, Gi = 123, Ds = 124, Wi = 125, M = {};
|
|
996
|
+
M[0] = "\\0";
|
|
997
|
+
M[7] = "\\a";
|
|
998
|
+
M[8] = "\\b";
|
|
999
|
+
M[9] = "\\t";
|
|
1000
|
+
M[10] = "\\n";
|
|
1001
|
+
M[11] = "\\v";
|
|
1002
|
+
M[12] = "\\f";
|
|
1003
|
+
M[13] = "\\r";
|
|
1004
|
+
M[27] = "\\e";
|
|
1005
|
+
M[34] = '\\"';
|
|
1006
|
+
M[92] = "\\\\";
|
|
1007
|
+
M[133] = "\\N";
|
|
1008
|
+
M[160] = "\\_";
|
|
1009
|
+
M[8232] = "\\L";
|
|
1010
|
+
M[8233] = "\\P";
|
|
1011
|
+
var Rs = [
|
|
1012
1012
|
"y",
|
|
1013
1013
|
"Y",
|
|
1014
1014
|
"yes",
|
|
@@ -1043,22 +1043,22 @@ function zs(e) {
|
|
|
1043
1043
|
n = "U", i = 8;
|
|
1044
1044
|
else
|
|
1045
1045
|
throw new O("code point within a string may not be greater than 0xFFFFFFFF");
|
|
1046
|
-
return "\\" + n +
|
|
1046
|
+
return "\\" + n + I.repeat("0", i - t.length) + t;
|
|
1047
1047
|
}
|
|
1048
|
-
var Us = 1,
|
|
1048
|
+
var Us = 1, Fe = 2;
|
|
1049
1049
|
function Hs(e) {
|
|
1050
|
-
this.schema = e.schema ||
|
|
1050
|
+
this.schema = e.schema || fn, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = I.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Fs(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Fe : Us, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
1051
1051
|
}
|
|
1052
1052
|
function Ln(e, t) {
|
|
1053
|
-
for (var n =
|
|
1053
|
+
for (var n = I.repeat(" ", t), i = 0, r = -1, o = "", s, a = e.length; i < a; )
|
|
1054
1054
|
r = e.indexOf(`
|
|
1055
1055
|
`, i), r === -1 ? (s = e.slice(i), i = a) : (s = e.slice(i, r + 1), i = r + 1), s.length && s !== `
|
|
1056
1056
|
` && (o += n), o += s;
|
|
1057
1057
|
return o;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function qt(e, t) {
|
|
1060
1060
|
return `
|
|
1061
|
-
` +
|
|
1061
|
+
` + I.repeat(" ", e.indent * t);
|
|
1062
1062
|
}
|
|
1063
1063
|
function Ys(e, t) {
|
|
1064
1064
|
var n, i, r;
|
|
@@ -1068,13 +1068,13 @@ function Ys(e, t) {
|
|
|
1068
1068
|
return !1;
|
|
1069
1069
|
}
|
|
1070
1070
|
function ft(e) {
|
|
1071
|
-
return e === Ss || e ===
|
|
1071
|
+
return e === Ss || e === _s;
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1074
|
-
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !==
|
|
1073
|
+
function ze(e) {
|
|
1074
|
+
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== gn || 65536 <= e && e <= 1114111;
|
|
1075
1075
|
}
|
|
1076
1076
|
function kn(e) {
|
|
1077
|
-
return
|
|
1077
|
+
return ze(e) && e !== gn && e !== ws && e !== $e;
|
|
1078
1078
|
}
|
|
1079
1079
|
function Nn(e, t, n) {
|
|
1080
1080
|
var i = kn(e), r = i && !ft(e);
|
|
@@ -1083,16 +1083,16 @@ function Nn(e, t, n) {
|
|
|
1083
1083
|
(n ? (
|
|
1084
1084
|
// c = flow-in
|
|
1085
1085
|
i
|
|
1086
|
-
) : i && e !== Hi && e !== Yi && e !== Bi && e !== Gi && e !== Wi) && e !==
|
|
1086
|
+
) : i && e !== Hi && e !== Yi && e !== Bi && e !== Gi && e !== Wi) && e !== Xt && !(t === ut && !r) || kn(t) && !ft(t) && e === Xt || t === ut && r
|
|
1087
1087
|
);
|
|
1088
1088
|
}
|
|
1089
1089
|
function Bs(e) {
|
|
1090
|
-
return
|
|
1090
|
+
return ze(e) && e !== gn && !ft(e) && e !== Ms && e !== Ls && e !== ut && e !== Hi && e !== Yi && e !== Bi && e !== Gi && e !== Wi && e !== Xt && e !== Cs && e !== Es && e !== As && e !== Ds && e !== Os && e !== Ps && e !== Ts && e !== bs && e !== Is && e !== ks && e !== Ns;
|
|
1091
1091
|
}
|
|
1092
1092
|
function Gs(e) {
|
|
1093
1093
|
return !ft(e) && e !== ut;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1095
|
+
function Pe(e, t) {
|
|
1096
1096
|
var n = e.charCodeAt(t), i;
|
|
1097
1097
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (i = e.charCodeAt(t + 1), i >= 56320 && i <= 57343) ? (n - 55296) * 1024 + i - 56320 + 65536 : n;
|
|
1098
1098
|
}
|
|
@@ -1100,34 +1100,34 @@ function Xi(e) {
|
|
|
1100
1100
|
var t = /^\n* /;
|
|
1101
1101
|
return t.test(e);
|
|
1102
1102
|
}
|
|
1103
|
-
var qi = 1,
|
|
1103
|
+
var qi = 1, jt = 2, ji = 3, Vi = 4, me = 5;
|
|
1104
1104
|
function Ws(e, t, n, i, r, o, s, a) {
|
|
1105
|
-
var c, l = 0, h = null, u = !1, f = !1, d = i !== -1, p = -1, g = Bs(
|
|
1105
|
+
var c, l = 0, h = null, u = !1, f = !1, d = i !== -1, p = -1, g = Bs(Pe(e, 0)) && Gs(Pe(e, e.length - 1));
|
|
1106
1106
|
if (t || s)
|
|
1107
1107
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
1108
|
-
if (l =
|
|
1108
|
+
if (l = Pe(e, c), !ze(l))
|
|
1109
1109
|
return me;
|
|
1110
1110
|
g = g && Nn(l, h, a), h = l;
|
|
1111
1111
|
}
|
|
1112
1112
|
else {
|
|
1113
1113
|
for (c = 0; c < e.length; l >= 65536 ? c += 2 : c++) {
|
|
1114
|
-
if (l =
|
|
1114
|
+
if (l = Pe(e, c), l === $e)
|
|
1115
1115
|
u = !0, d && (f = f || // Foldable line = too long, and not more-indented.
|
|
1116
1116
|
c - p - 1 > i && e[p + 1] !== " ", p = c);
|
|
1117
|
-
else if (!
|
|
1117
|
+
else if (!ze(l))
|
|
1118
1118
|
return me;
|
|
1119
1119
|
g = g && Nn(l, h, a), h = l;
|
|
1120
1120
|
}
|
|
1121
1121
|
f = f || d && c - p - 1 > i && e[p + 1] !== " ";
|
|
1122
1122
|
}
|
|
1123
|
-
return !u && !f ? g && !s && !r(e) ? qi : o ===
|
|
1123
|
+
return !u && !f ? g && !s && !r(e) ? qi : o === Fe ? me : jt : n > 9 && Xi(e) ? me : s ? o === Fe ? me : jt : f ? Vi : ji;
|
|
1124
1124
|
}
|
|
1125
1125
|
function Xs(e, t, n, i, r) {
|
|
1126
1126
|
e.dump = (function() {
|
|
1127
1127
|
if (t.length === 0)
|
|
1128
|
-
return e.quotingType ===
|
|
1129
|
-
if (!e.noCompatMode && (
|
|
1130
|
-
return e.quotingType ===
|
|
1128
|
+
return e.quotingType === Fe ? '""' : "''";
|
|
1129
|
+
if (!e.noCompatMode && (Rs.indexOf(t) !== -1 || $s.test(t)))
|
|
1130
|
+
return e.quotingType === Fe ? '"' + t + '"' : "'" + t + "'";
|
|
1131
1131
|
var o = e.indent * Math.max(1, n), s = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), a = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
1132
1132
|
function c(l) {
|
|
1133
1133
|
return Ys(e, l);
|
|
@@ -1144,12 +1144,12 @@ function Xs(e, t, n, i, r) {
|
|
|
1144
1144
|
)) {
|
|
1145
1145
|
case qi:
|
|
1146
1146
|
return t;
|
|
1147
|
-
case
|
|
1147
|
+
case jt:
|
|
1148
1148
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
1149
1149
|
case ji:
|
|
1150
|
-
return "|" +
|
|
1150
|
+
return "|" + Dn(t, e.indent) + Rn(Ln(t, o));
|
|
1151
1151
|
case Vi:
|
|
1152
|
-
return ">" +
|
|
1152
|
+
return ">" + Dn(t, e.indent) + Rn(Ln(qs(t, s), o));
|
|
1153
1153
|
case me:
|
|
1154
1154
|
return '"' + js(t) + '"';
|
|
1155
1155
|
default:
|
|
@@ -1157,7 +1157,7 @@ function Xs(e, t, n, i, r) {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
})();
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function Dn(e, t) {
|
|
1161
1161
|
var n = Xi(e) ? String(t) : "", i = e[e.length - 1] === `
|
|
1162
1162
|
`, r = i && (e[e.length - 2] === `
|
|
1163
1163
|
` || e === `
|
|
@@ -1165,7 +1165,7 @@ function Rn(e, t) {
|
|
|
1165
1165
|
return n + o + `
|
|
1166
1166
|
`;
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function Rn(e) {
|
|
1169
1169
|
return e[e.length - 1] === `
|
|
1170
1170
|
` ? e.slice(0, -1) : e;
|
|
1171
1171
|
}
|
|
@@ -1193,7 +1193,7 @@ function $n(e, t) {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
function js(e) {
|
|
1195
1195
|
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
1196
|
-
n =
|
|
1196
|
+
n = Pe(e, r), i = M[n], !i && ze(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || zs(n);
|
|
1197
1197
|
return t;
|
|
1198
1198
|
}
|
|
1199
1199
|
function Vs(e, t, n) {
|
|
@@ -1205,7 +1205,7 @@ function Vs(e, t, n) {
|
|
|
1205
1205
|
function Fn(e, t, n, i) {
|
|
1206
1206
|
var r = "", o = e.tag, s, a, c;
|
|
1207
1207
|
for (s = 0, a = n.length; s < a; s += 1)
|
|
1208
|
-
c = n[s], e.replacer && (c = e.replacer.call(n, String(s), c)), (J(e, t + 1, c, !0, !0, !1, !0) || typeof c > "u" && J(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r +=
|
|
1208
|
+
c = n[s], e.replacer && (c = e.replacer.call(n, String(s), c)), (J(e, t + 1, c, !0, !0, !1, !0) || typeof c > "u" && J(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += qt(e, t)), e.dump && $e === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
1209
1209
|
e.tag = o, e.dump = r || "[]";
|
|
1210
1210
|
}
|
|
1211
1211
|
function Js(e, t, n) {
|
|
@@ -1223,7 +1223,7 @@ function Ks(e, t, n, i) {
|
|
|
1223
1223
|
else if (e.sortKeys)
|
|
1224
1224
|
throw new O("sortKeys must be a boolean or a function");
|
|
1225
1225
|
for (a = 0, c = s.length; a < c; a += 1)
|
|
1226
|
-
f = "", (!i || r !== "") && (f +=
|
|
1226
|
+
f = "", (!i || r !== "") && (f += qt(e, t)), l = s[a], h = n[l], e.replacer && (h = e.replacer.call(n, l, h)), J(e, t + 1, l, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && $e === e.dump.charCodeAt(0) ? f += "?" : f += "? "), f += e.dump, u && (f += qt(e, t)), J(e, t + 1, h, !0, u) && (e.dump && $e === e.dump.charCodeAt(0) ? f += ":" : f += ": ", f += e.dump, r += f));
|
|
1227
1227
|
e.tag = o, e.dump = r || "{}";
|
|
1228
1228
|
}
|
|
1229
1229
|
function zn(e, t, n) {
|
|
@@ -1271,21 +1271,21 @@ function J(e, t, n, i, r, o, s) {
|
|
|
1271
1271
|
}
|
|
1272
1272
|
function Zs(e, t) {
|
|
1273
1273
|
var n = [], i = [], r, o;
|
|
1274
|
-
for (
|
|
1274
|
+
for (Vt(e, n, i), r = 0, o = i.length; r < o; r += 1)
|
|
1275
1275
|
t.duplicates.push(n[i[r]]);
|
|
1276
1276
|
t.usedDuplicates = new Array(o);
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1278
|
+
function Vt(e, t, n) {
|
|
1279
1279
|
var i, r, o;
|
|
1280
1280
|
if (e !== null && typeof e == "object")
|
|
1281
1281
|
if (r = t.indexOf(e), r !== -1)
|
|
1282
1282
|
n.indexOf(r) === -1 && n.push(r);
|
|
1283
1283
|
else if (t.push(e), Array.isArray(e))
|
|
1284
1284
|
for (r = 0, o = e.length; r < o; r += 1)
|
|
1285
|
-
|
|
1285
|
+
Vt(e[r], t, n);
|
|
1286
1286
|
else
|
|
1287
1287
|
for (i = Object.keys(e), r = 0, o = i.length; r < o; r += 1)
|
|
1288
|
-
|
|
1288
|
+
Vt(e[i[r]], t, n);
|
|
1289
1289
|
}
|
|
1290
1290
|
function Qs(e, t) {
|
|
1291
1291
|
t = t || {};
|
|
@@ -1298,26 +1298,26 @@ function Qs(e, t) {
|
|
|
1298
1298
|
var ea = Qs, ta = {
|
|
1299
1299
|
dump: ea
|
|
1300
1300
|
};
|
|
1301
|
-
function
|
|
1301
|
+
function mn(e, t) {
|
|
1302
1302
|
return function() {
|
|
1303
1303
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
1304
1304
|
};
|
|
1305
1305
|
}
|
|
1306
|
-
var na =
|
|
1307
|
-
binary:
|
|
1306
|
+
var na = C, ia = hi, ra = pi, oa = yi, sa = _i, aa = fn, ca = Fi.load, la = Fi.loadAll, ha = ta.dump, ua = O, fa = {
|
|
1307
|
+
binary: Ii,
|
|
1308
1308
|
float: vi,
|
|
1309
1309
|
map: di,
|
|
1310
1310
|
null: gi,
|
|
1311
1311
|
pairs: Ti,
|
|
1312
|
-
set:
|
|
1312
|
+
set: Ei,
|
|
1313
1313
|
timestamp: Ai,
|
|
1314
1314
|
bool: mi,
|
|
1315
1315
|
int: xi,
|
|
1316
1316
|
merge: bi,
|
|
1317
|
-
omap:
|
|
1317
|
+
omap: Ci,
|
|
1318
1318
|
seq: fi,
|
|
1319
1319
|
str: ui
|
|
1320
|
-
}, da =
|
|
1320
|
+
}, da = mn("safeLoad", "load"), pa = mn("safeLoadAll", "loadAll"), ga = mn("safeDump", "dump"), Ji = {
|
|
1321
1321
|
Type: na,
|
|
1322
1322
|
Schema: ia,
|
|
1323
1323
|
FAILSAFE_SCHEMA: ra,
|
|
@@ -1336,10 +1336,10 @@ var na = I, ia = hi, ra = pi, oa = yi, sa = wi, aa = un, ca = Fi.load, la = Fi.l
|
|
|
1336
1336
|
function Te(e) {
|
|
1337
1337
|
return Ji.dump(e, { noRefs: !0, lineWidth: -1 });
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function Ee(e) {
|
|
1340
1340
|
return Ji.load(e);
|
|
1341
1341
|
}
|
|
1342
|
-
class
|
|
1342
|
+
class Xe extends Ce {
|
|
1343
1343
|
_options;
|
|
1344
1344
|
_selected = !1;
|
|
1345
1345
|
_activeStates = /* @__PURE__ */ new Set();
|
|
@@ -1445,7 +1445,7 @@ class We extends Ie {
|
|
|
1445
1445
|
}
|
|
1446
1446
|
/** 从 YAML 字符串反序列化 */
|
|
1447
1447
|
fromYAML(t) {
|
|
1448
|
-
this.setOptions(
|
|
1448
|
+
this.setOptions(Ee(t));
|
|
1449
1449
|
}
|
|
1450
1450
|
setOptions(t, n = !0) {
|
|
1451
1451
|
const i = [];
|
|
@@ -1476,7 +1476,7 @@ class We extends Ie {
|
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
1478
|
}
|
|
1479
|
-
class bt extends
|
|
1479
|
+
class bt extends Ce {
|
|
1480
1480
|
items = /* @__PURE__ */ new Map();
|
|
1481
1481
|
scene;
|
|
1482
1482
|
container;
|
|
@@ -1565,14 +1565,14 @@ class bt extends Ie {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
/** 从 YAML 字符串反序列化 */
|
|
1567
1567
|
fromYAML(t) {
|
|
1568
|
-
this.fromJSON(
|
|
1568
|
+
this.fromJSON(Ee(t));
|
|
1569
1569
|
}
|
|
1570
1570
|
/** 销毁管理器 */
|
|
1571
1571
|
destroy() {
|
|
1572
1572
|
this.clear(), this.removeAllListeners(), this.container.destroy();
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
|
-
const ye = Math.PI / 4, Ki = Math.PI / 6, de = Math.sin(Ki), dt = Math.cos(Ki), m = 100, bu = m * Math.sqrt(2) * dt,
|
|
1575
|
+
const ye = Math.PI / 4, Ki = Math.PI / 6, de = Math.sin(Ki), dt = Math.cos(Ki), m = 100, bu = m * Math.sqrt(2) * dt, Iu = m * Math.sqrt(2) * de, Cu = m * Math.sqrt(2) * dt, Zi = m * Math.sqrt(2) * de;
|
|
1576
1576
|
function Tu() {
|
|
1577
1577
|
const e = m * Math.sqrt(2) * dt, t = m * Math.sqrt(2) * de, n = m * Math.sqrt(2) * dt, i = m * Math.sqrt(2) * de;
|
|
1578
1578
|
return {
|
|
@@ -1586,12 +1586,12 @@ function Qi() {
|
|
|
1586
1586
|
const e = de, t = -Math.atan2(Math.sin(ye), Math.cos(ye) * e), n = Math.atan2(Math.sin(ye) * e, Math.cos(ye));
|
|
1587
1587
|
return { skewX: t, skewY: n };
|
|
1588
1588
|
}
|
|
1589
|
-
const er = Qi(), tr = er.skewX, nr = er.skewY, ir = Math.cos(nr), rr = Math.sin(nr), or = Math.sin(tr), sr = Math.cos(tr),
|
|
1590
|
-
function
|
|
1589
|
+
const er = Qi(), tr = er.skewX, nr = er.skewY, ir = Math.cos(nr), rr = Math.sin(nr), or = Math.sin(tr), sr = Math.cos(tr), It = ir * sr - or * rr, Jt = sr / It, Kt = -rr / It, Zt = -or / It, Qt = ir / It, ar = Math.atan2(Zt, Qt), cr = Math.atan2(Kt, Jt), lr = Math.sqrt(Jt * Jt + Kt * Kt), rt = Math.sqrt(Zt * Zt + Qt * Qt);
|
|
1590
|
+
function Eu(e, t, n = 0) {
|
|
1591
1591
|
const i = (e - t) * Math.cos(ye), r = (e + t) * de - n;
|
|
1592
1592
|
return { x: i, y: r };
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function Mu(e, t) {
|
|
1595
1595
|
const n = Math.cos(ye), i = de, r = (e / n + t / i) / 2, o = (t / i - e / n) / 2;
|
|
1596
1596
|
return { x: r, y: o, z: 0 };
|
|
1597
1597
|
}
|
|
@@ -1641,33 +1641,33 @@ function ya(e, t = { x: 0, y: 0 }) {
|
|
|
1641
1641
|
{ x: n - t.x, y: o + t.y }
|
|
1642
1642
|
];
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1644
|
+
function _a(e) {
|
|
1645
1645
|
const { lowX: t, lowY: n, highX: i, highY: r } = hr(e);
|
|
1646
1646
|
return {
|
|
1647
1647
|
width: i - t + 1,
|
|
1648
1648
|
height: r - n + 1
|
|
1649
1649
|
};
|
|
1650
1650
|
}
|
|
1651
|
-
function
|
|
1651
|
+
function wa(e, t) {
|
|
1652
1652
|
return {
|
|
1653
1653
|
x: t.x - e.x,
|
|
1654
1654
|
y: t.y - e.y
|
|
1655
1655
|
};
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function Ct() {
|
|
1658
1658
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
|
|
1659
1659
|
const t = Math.random() * 16 | 0;
|
|
1660
1660
|
return (e === "x" ? t : t & 3 | 8).toString(16);
|
|
1661
1661
|
});
|
|
1662
1662
|
}
|
|
1663
1663
|
const ur = /* @__PURE__ */ new WeakMap();
|
|
1664
|
-
function
|
|
1664
|
+
function Tt(e, t, n) {
|
|
1665
1665
|
ur.set(e, { itemType: t, itemId: n });
|
|
1666
1666
|
}
|
|
1667
1667
|
function Sa(e) {
|
|
1668
1668
|
return ur.get(e);
|
|
1669
1669
|
}
|
|
1670
|
-
class pt extends
|
|
1670
|
+
class pt extends Xe {
|
|
1671
1671
|
graphics;
|
|
1672
1672
|
icons;
|
|
1673
1673
|
iconSprite;
|
|
@@ -1689,7 +1689,7 @@ class pt extends We {
|
|
|
1689
1689
|
this.resolveOptions(), this.loadIcon(void 0);
|
|
1690
1690
|
};
|
|
1691
1691
|
constructor(t, n) {
|
|
1692
|
-
super(t, pt.DEFAULTS), this.rawOptions = { ...t }, this.icons = n, this.graphics = new
|
|
1692
|
+
super(t, pt.DEFAULTS), this.rawOptions = { ...t }, this.icons = n, this.graphics = new We(), Tt(this.graphics, "node", t.id), this.resolveOptions(!0), n.on("icon:updated", this._onIconUpdated), n.on("icon:removed", this._onIconRemoved), n.on("icons:cleared", this._onIconsCleared), this.drawNode();
|
|
1693
1693
|
}
|
|
1694
1694
|
/** 重新解析有效 options:DEFAULTS → icon.nodeOptions → rawOptions */
|
|
1695
1695
|
resolveOptions(t = !1) {
|
|
@@ -1792,7 +1792,7 @@ class Aa extends bt {
|
|
|
1792
1792
|
this.scene.lines?.removeLinesForNode(t);
|
|
1793
1793
|
}
|
|
1794
1794
|
}
|
|
1795
|
-
const
|
|
1795
|
+
const Ne = 64, Un = 200, en = /* @__PURE__ */ new Map(), tn = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
|
|
1796
1796
|
function fr() {
|
|
1797
1797
|
if ($.size <= Un) return;
|
|
1798
1798
|
const e = [...$.keys()].slice(0, $.size - Un);
|
|
@@ -1803,55 +1803,55 @@ function xn(e, t, n) {
|
|
|
1803
1803
|
return `c${e}_g${t ? 1 : 0}_l${n}`;
|
|
1804
1804
|
}
|
|
1805
1805
|
function ba(e, t, n) {
|
|
1806
|
-
const i = xn(e, t, n), r =
|
|
1806
|
+
const i = xn(e, t, n), r = en.get(i);
|
|
1807
1807
|
if (r) return r;
|
|
1808
1808
|
const o = document.createElement("canvas");
|
|
1809
|
-
o.width = n, o.height =
|
|
1809
|
+
o.width = n, o.height = Ne;
|
|
1810
1810
|
const s = o.getContext("2d"), a = e >> 16 & 255, c = e >> 8 & 255, l = e & 255;
|
|
1811
1811
|
if (t) {
|
|
1812
1812
|
const h = s.createLinearGradient(0, 0, n, 0);
|
|
1813
1813
|
h.addColorStop(0, `rgba(${a},${c},${l},0)`), h.addColorStop(0.2, `rgba(${a},${c},${l},0.8)`), h.addColorStop(0.25, `rgba(${a},${c},${l},1)`), h.addColorStop(0.5, `rgba(${a},${c},${l},1)`), h.addColorStop(0.5, `rgba(${a},${c},${l},0)`), s.fillStyle = h;
|
|
1814
1814
|
} else
|
|
1815
1815
|
s.fillStyle = `rgb(${a},${c},${l})`;
|
|
1816
|
-
return s.fillRect(0, 0, n,
|
|
1816
|
+
return s.fillRect(0, 0, n, Ne), en.set(i, o), o;
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1819
|
-
const i = xn(e, t, n), r =
|
|
1818
|
+
function Ia(e, t, n) {
|
|
1819
|
+
const i = xn(e, t, n), r = tn.get(i);
|
|
1820
1820
|
if (r) return r;
|
|
1821
1821
|
const o = ba(e, t, n), s = Se.from({ resource: o, antialias: !0 });
|
|
1822
|
-
return
|
|
1822
|
+
return tn.set(i, s.source), s.source;
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1825
|
-
const { color: t, width: n, dashPattern: i = [10, 5] } = e, r = i.reduce((v,
|
|
1824
|
+
function Ca(e) {
|
|
1825
|
+
const { color: t, width: n, dashPattern: i = [10, 5] } = e, r = i.reduce((v, _) => v + _, 0), o = Math.max(Math.round(n), 2), s = `dash_c${t}_d${i.join(",")}_w${o}`, a = $.get(s);
|
|
1826
1826
|
if (a) return a;
|
|
1827
1827
|
const c = t >> 16 & 255, l = t >> 8 & 255, h = t & 255, u = document.createElement("canvas");
|
|
1828
|
-
u.width = r, u.height =
|
|
1828
|
+
u.width = r, u.height = Ne;
|
|
1829
1829
|
const f = u.getContext("2d");
|
|
1830
|
-
f.clearRect(0, 0, r,
|
|
1830
|
+
f.clearRect(0, 0, r, Ne), f.fillStyle = `rgb(${c},${l},${h})`;
|
|
1831
1831
|
let d = 0;
|
|
1832
1832
|
for (let v = 0; v < i.length; v++)
|
|
1833
|
-
v % 2 === 0 && f.fillRect(d, 0, i[v],
|
|
1833
|
+
v % 2 === 0 && f.fillRect(d, 0, i[v], Ne), d += i[v];
|
|
1834
1834
|
const p = Se.from({ resource: u, antialias: !1 });
|
|
1835
1835
|
p.source.addressMode = "repeat";
|
|
1836
1836
|
const g = new Se({
|
|
1837
1837
|
source: p.source,
|
|
1838
|
-
frame: new
|
|
1838
|
+
frame: new hn(0, 0, r, o)
|
|
1839
1839
|
});
|
|
1840
1840
|
return $.set(s, g), fr(), g;
|
|
1841
1841
|
}
|
|
1842
1842
|
function Ta(e) {
|
|
1843
1843
|
const { color: t, width: n, gradient: i = !0, length: r = 100 } = e, o = Math.max(Math.round(n), 2), a = `${xn(t, i, r)}_w${o}`, c = $.get(a);
|
|
1844
1844
|
if (c) return c;
|
|
1845
|
-
const l =
|
|
1845
|
+
const l = Ia(t, i, r), h = new Se({
|
|
1846
1846
|
source: l,
|
|
1847
|
-
frame: new
|
|
1847
|
+
frame: new hn(0, 0, r, o)
|
|
1848
1848
|
});
|
|
1849
1849
|
return $.set(a, h), fr(), h;
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1852
|
-
$.forEach((e) => e.destroy()), $.clear(),
|
|
1851
|
+
function Ea() {
|
|
1852
|
+
$.forEach((e) => e.destroy()), $.clear(), tn.clear(), en.clear();
|
|
1853
1853
|
}
|
|
1854
|
-
class
|
|
1854
|
+
class Ma extends Xe {
|
|
1855
1855
|
container;
|
|
1856
1856
|
rope = null;
|
|
1857
1857
|
points = [];
|
|
@@ -1866,7 +1866,7 @@ class Ea extends We {
|
|
|
1866
1866
|
width: 6,
|
|
1867
1867
|
mode: "line",
|
|
1868
1868
|
flowSpeed: 0.5
|
|
1869
|
-
}), this.container = new ee(), this.container.label = `line:${t.id}`, this.container.zIndex = t.zIndex ?? 0,
|
|
1869
|
+
}), this.container = new ee(), this.container.label = `line:${t.id}`, this.container.zIndex = t.zIndex ?? 0, Tt(this.container, "line", t.id), this.nodeResolver = n;
|
|
1870
1870
|
}
|
|
1871
1871
|
onOptionsChanged(t) {
|
|
1872
1872
|
t.includes("zIndex") && (this.container.zIndex = this.options.zIndex ?? 0), (t.includes("color") || t.includes("width") || t.includes("anchor") || t.includes("mode") || t.includes("dashPattern") || t.includes("isStraight")) && (this.destroyRope(), this.draw());
|
|
@@ -1910,16 +1910,16 @@ class Ea extends We {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
if (n.length < 2)
|
|
1912
1912
|
return [];
|
|
1913
|
-
const i = ya(n, this.SEARCH_OFFSET), r = i.map((d) => d.x), o = i.map((d) => d.y), s = Math.max(...r), a = Math.max(...o), c =
|
|
1913
|
+
const i = ya(n, this.SEARCH_OFFSET), r = i.map((d) => d.x), o = i.map((d) => d.y), s = Math.max(...r), a = Math.max(...o), c = _a(i), l = { x: s, y: a }, h = n.map((d) => wa(d, l));
|
|
1914
1914
|
return h.reduce(
|
|
1915
1915
|
(d, p, g) => {
|
|
1916
1916
|
if (g === 0) return d;
|
|
1917
|
-
const v = h[g - 1],
|
|
1917
|
+
const v = h[g - 1], _ = va({
|
|
1918
1918
|
from: v,
|
|
1919
1919
|
to: p,
|
|
1920
1920
|
tileSize: c
|
|
1921
1921
|
});
|
|
1922
|
-
return [...d, ...
|
|
1922
|
+
return [...d, ..._];
|
|
1923
1923
|
},
|
|
1924
1924
|
[]
|
|
1925
1925
|
).map((d) => ({
|
|
@@ -1959,7 +1959,7 @@ class Ea extends We {
|
|
|
1959
1959
|
this.destroyRope(), this.points = t.map(
|
|
1960
1960
|
(r) => new Hr(r.x * m, r.y * m)
|
|
1961
1961
|
);
|
|
1962
|
-
const n = this.options.mode === "dashed", i = n ?
|
|
1962
|
+
const n = this.options.mode === "dashed", i = n ? Ca({
|
|
1963
1963
|
color: this.options.color,
|
|
1964
1964
|
width: this.options.width,
|
|
1965
1965
|
dashPattern: this.options.dashPattern
|
|
@@ -2062,7 +2062,7 @@ class Oa extends bt {
|
|
|
2062
2062
|
}
|
|
2063
2063
|
/** 创建线条实例,注入节点解析器而非整个 Scene */
|
|
2064
2064
|
createItem(t) {
|
|
2065
|
-
return new
|
|
2065
|
+
return new Ma(t, (n) => {
|
|
2066
2066
|
const i = this.scene.nodes?.get(n);
|
|
2067
2067
|
return i ? { x: i.options.x, y: i.options.y } : null;
|
|
2068
2068
|
});
|
|
@@ -2091,7 +2091,7 @@ class Oa extends bt {
|
|
|
2091
2091
|
for (const t of this.items.values()) t.draw();
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
|
-
class Pa extends
|
|
2094
|
+
class Pa extends Xe {
|
|
2095
2095
|
container;
|
|
2096
2096
|
tilingSprite = null;
|
|
2097
2097
|
constructor(t = {}) {
|
|
@@ -2152,7 +2152,7 @@ class Pa extends We {
|
|
|
2152
2152
|
this.tilingSprite && this.tilingSprite.destroy(), this.container.destroy();
|
|
2153
2153
|
}
|
|
2154
2154
|
}
|
|
2155
|
-
class La extends
|
|
2155
|
+
class La extends Xe {
|
|
2156
2156
|
container;
|
|
2157
2157
|
textSprite;
|
|
2158
2158
|
textStyle;
|
|
@@ -2167,7 +2167,7 @@ class La extends We {
|
|
|
2167
2167
|
position: "x",
|
|
2168
2168
|
depth: 0,
|
|
2169
2169
|
zIndex: 0
|
|
2170
|
-
}), this.container = new ee(),
|
|
2170
|
+
}), this.container = new ee(), Tt(this.container, "text", t.id), this.textStyle = new Gr({
|
|
2171
2171
|
fontSize: this.options.fontSize,
|
|
2172
2172
|
fill: this.options.color,
|
|
2173
2173
|
fontWeight: this.options.fontWeight,
|
|
@@ -2245,7 +2245,7 @@ class ka extends bt {
|
|
|
2245
2245
|
return new La(t);
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
|
-
class Na extends
|
|
2248
|
+
class Na extends Xe {
|
|
2249
2249
|
graphics;
|
|
2250
2250
|
constructor(t) {
|
|
2251
2251
|
super(t, {
|
|
@@ -2258,7 +2258,7 @@ class Na extends We {
|
|
|
2258
2258
|
borderOpacity: 1,
|
|
2259
2259
|
borderRadius: 0,
|
|
2260
2260
|
zIndex: 0
|
|
2261
|
-
}), this.graphics = new
|
|
2261
|
+
}), this.graphics = new We(), Tt(this.graphics, "rect", t.id), this.drawRect();
|
|
2262
2262
|
}
|
|
2263
2263
|
onOptionsChanged(t) {
|
|
2264
2264
|
this.drawRect();
|
|
@@ -2308,7 +2308,7 @@ class Na extends We {
|
|
|
2308
2308
|
this.removeAllListeners(), this.graphics.destroy();
|
|
2309
2309
|
}
|
|
2310
2310
|
}
|
|
2311
|
-
class
|
|
2311
|
+
class Da extends bt {
|
|
2312
2312
|
constructor(t) {
|
|
2313
2313
|
super(t, "rect");
|
|
2314
2314
|
}
|
|
@@ -2316,10 +2316,10 @@ class Ra extends bt {
|
|
|
2316
2316
|
return new Na(t);
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2319
|
+
function Ue(e) {
|
|
2320
2320
|
return `#${e.toString(16).padStart(6, "0")}`;
|
|
2321
2321
|
}
|
|
2322
|
-
function
|
|
2322
|
+
function Ra(e) {
|
|
2323
2323
|
return "convertToBlob" in e && typeof e.convertToBlob == "function" ? e.convertToBlob({ type: "image/png" }) : new Promise((t, n) => {
|
|
2324
2324
|
e.toBlob(
|
|
2325
2325
|
(i) => i ? t(i) : n(new Error("Failed to create PNG blob")),
|
|
@@ -2340,7 +2340,7 @@ function mt(e, t) {
|
|
|
2340
2340
|
async function Fa(e, t) {
|
|
2341
2341
|
const { pixelRatio: n = 2 } = t ?? {}, i = e.app, r = i.renderer.resolution, o = i.screen.width, s = i.screen.height;
|
|
2342
2342
|
i.renderer.resolution = n, i.renderer.resize(o, s), i.render();
|
|
2343
|
-
const a =
|
|
2343
|
+
const a = Ra(i.canvas);
|
|
2344
2344
|
return i.renderer.resolution = r, i.renderer.resize(o, s), i.render(), a;
|
|
2345
2345
|
}
|
|
2346
2346
|
async function za(e, t) {
|
|
@@ -2371,7 +2371,7 @@ async function Ua(e) {
|
|
|
2371
2371
|
return t;
|
|
2372
2372
|
}
|
|
2373
2373
|
async function Ha(e, t) {
|
|
2374
|
-
const { background: n = !0 } = t ?? {}, i = e.projectionContainer, r = i.skew.x, o = i.skew.y, s = i.scale.x, a = i.position.x, c = i.position.y, l = Math.ceil(e.app.screen.width), h = Math.ceil(e.app.screen.height), u = s * Math.cos(o), f = s * Math.sin(o), d = s * Math.sin(r), p = s * Math.cos(r), g = Math.cos(o), v = Math.sin(o),
|
|
2374
|
+
const { background: n = !0 } = t ?? {}, i = e.projectionContainer, r = i.skew.x, o = i.skew.y, s = i.scale.x, a = i.position.x, c = i.position.y, l = Math.ceil(e.app.screen.width), h = Math.ceil(e.app.screen.height), u = s * Math.cos(o), f = s * Math.sin(o), d = s * Math.sin(r), p = s * Math.cos(r), g = Math.cos(o), v = Math.sin(o), _ = Math.sin(r), x = Math.cos(r), w = g * x - v * _, S = x / w, T = -v / w, P = -_ / w, D = g / w, U = u * p - f * d, q = [
|
|
2375
2375
|
{ x: 0, y: 0 },
|
|
2376
2376
|
{ x: l, y: 0 },
|
|
2377
2377
|
{ x: 0, y: h },
|
|
@@ -2387,35 +2387,35 @@ async function Ha(e, t) {
|
|
|
2387
2387
|
y: Math.floor((Y - B) / m) * m,
|
|
2388
2388
|
width: Math.ceil((ne - H + B * 2) / m) * m,
|
|
2389
2389
|
height: Math.ceil((ie - Y + B * 2) / m) * m
|
|
2390
|
-
},
|
|
2391
|
-
|
|
2390
|
+
}, R = await Ua(e), E = [];
|
|
2391
|
+
E.push(
|
|
2392
2392
|
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"',
|
|
2393
2393
|
` width="${l}" height="${h}" viewBox="0 0 ${l} ${h}">`
|
|
2394
|
-
),
|
|
2395
|
-
for (const [b, j] of
|
|
2396
|
-
j &&
|
|
2394
|
+
), E.push(" <defs>");
|
|
2395
|
+
for (const [b, j] of R)
|
|
2396
|
+
j && E.push(
|
|
2397
2397
|
` <symbol id="icon-${gt(b)}" viewBox="0 0 100 100">`,
|
|
2398
2398
|
` <image href="${j}" width="100" height="100" />`,
|
|
2399
2399
|
" </symbol>"
|
|
2400
2400
|
);
|
|
2401
|
-
if (
|
|
2402
|
-
const b = e.grid.options, j =
|
|
2403
|
-
|
|
2401
|
+
if (E.push(" </defs>"), n) {
|
|
2402
|
+
const b = e.grid.options, j = Ue(b.bgColor ?? 0);
|
|
2403
|
+
E.push(` <rect width="${l}" height="${h}" fill="${j}" />`);
|
|
2404
2404
|
}
|
|
2405
|
-
const
|
|
2406
|
-
if (
|
|
2405
|
+
const Nt = `matrix(${u},${f},${d},${p},${a},${c})`;
|
|
2406
|
+
if (E.push(` <g transform="${Nt}">`), n) {
|
|
2407
2407
|
const b = await Ya(e, re);
|
|
2408
|
-
b &&
|
|
2408
|
+
b && E.push(b);
|
|
2409
2409
|
}
|
|
2410
2410
|
for (const b of e.rects.getAll())
|
|
2411
|
-
|
|
2411
|
+
E.push(Ba(b.options));
|
|
2412
2412
|
for (const b of e.lines.getAll())
|
|
2413
|
-
|
|
2413
|
+
E.push(Ga(b));
|
|
2414
2414
|
for (const b of e.nodes.getAll())
|
|
2415
|
-
|
|
2415
|
+
E.push(Wa(b.options, R, S, T, P, D));
|
|
2416
2416
|
for (const b of e.texts.getAll())
|
|
2417
|
-
|
|
2418
|
-
return
|
|
2417
|
+
E.push(Xa(b.options, S, T, P, D));
|
|
2418
|
+
return E.push(" </g>"), E.push("</svg>"), E.join(`
|
|
2419
2419
|
`);
|
|
2420
2420
|
}
|
|
2421
2421
|
async function Ya(e, t) {
|
|
@@ -2441,11 +2441,11 @@ async function Ya(e, t) {
|
|
|
2441
2441
|
}
|
|
2442
2442
|
}
|
|
2443
2443
|
function Ba(e) {
|
|
2444
|
-
const t = e.x * m - m / 2, n = e.y * m - m / 2, i = (e.width ?? 1) * m, r = (e.height ?? 1) * m, o =
|
|
2444
|
+
const t = e.x * m - m / 2, n = e.y * m - m / 2, i = (e.width ?? 1) * m, r = (e.height ?? 1) * m, o = Ue(e.bgColor ?? 3447003), s = e.bgOpacity ?? 0.8, a = Ue(e.borderColor ?? 16777215), c = e.borderWidth ?? 2, l = e.borderOpacity ?? 1, h = e.borderRadius ?? 0, u = h > 0 ? ` rx="${h}" ry="${h}"` : "";
|
|
2445
2445
|
return ` <rect x="${t}" y="${n}" width="${i}" height="${r}"${u} fill="${o}" fill-opacity="${s}" stroke="${a}" stroke-width="${c}" stroke-opacity="${l}" />`;
|
|
2446
2446
|
}
|
|
2447
2447
|
function Ga(e) {
|
|
2448
|
-
const t = e.options, n =
|
|
2448
|
+
const t = e.options, n = Ue(t.color ?? 4473958), i = t.width ?? 6, r = e.getPoints();
|
|
2449
2449
|
let o;
|
|
2450
2450
|
if (r && r.length >= 2)
|
|
2451
2451
|
o = r.map((a) => `${a.x},${a.y}`).join(" ");
|
|
@@ -2466,21 +2466,21 @@ function Wa(e, t, n, i, r, o) {
|
|
|
2466
2466
|
if (!(t.has(f) && t.get(f) !== "")) return "";
|
|
2467
2467
|
const p = 100, g = -p / 2 * h + Zi / 2 + u, v = [];
|
|
2468
2468
|
if (l) {
|
|
2469
|
-
const
|
|
2469
|
+
const _ = p * c, x = p * c, w = s - _ / 2, S = a + c * (g - p / 2);
|
|
2470
2470
|
v.push(
|
|
2471
|
-
` <use href="#icon-${gt(f)}" x="${
|
|
2471
|
+
` <use href="#icon-${gt(f)}" x="${w}" y="${S}" width="${_}" height="${x}" />`
|
|
2472
2472
|
);
|
|
2473
2473
|
} else {
|
|
2474
|
-
const
|
|
2474
|
+
const _ = p * c, x = p * c * h, w = -_ / 2, S = c * h * g - x / 2, T = `matrix(${n},${i},${r},${o},0,0)`;
|
|
2475
2475
|
v.push(` <g transform="translate(${s},${a})">`), v.push(` <g transform="${T}">`), v.push(
|
|
2476
|
-
` <use href="#icon-${gt(f)}" x="${
|
|
2476
|
+
` <use href="#icon-${gt(f)}" x="${w}" y="${S}" width="${_}" height="${x}" />`
|
|
2477
2477
|
), v.push(" </g>"), v.push(" </g>");
|
|
2478
2478
|
}
|
|
2479
2479
|
return v.join(`
|
|
2480
2480
|
`);
|
|
2481
2481
|
}
|
|
2482
2482
|
function Xa(e, t, n, i, r) {
|
|
2483
|
-
const o = e.x * m, s = e.y * m, a = e.fontSize ?? 16, c =
|
|
2483
|
+
const o = e.x * m, s = e.y * m, a = e.fontSize ?? 16, c = Ue(e.color ?? 16777215), l = e.fontWeight ?? "normal", h = e.fontFamily ?? "Arial", u = e.align ?? "center", f = e.position ?? "x", d = u === "left" ? "start" : u === "right" ? "end" : "middle", p = gt(e.text), g = `text-anchor="${d}" fill="${c}" font-size="${a}" font-weight="${l}" font-family="${h}"`;
|
|
2484
2484
|
if (f === "screen") {
|
|
2485
2485
|
const v = `matrix(${t},${n},${i},${r},0,0)`;
|
|
2486
2486
|
return [
|
|
@@ -2491,7 +2491,7 @@ function Xa(e, t, n, i, r) {
|
|
|
2491
2491
|
`);
|
|
2492
2492
|
} else return f === "y" ? ` <text x="${o}" y="${s}" transform="rotate(-90,${o},${s})" ${g}>${p}</text>` : ` <text x="${o}" y="${s}" ${g}>${p}</text>`;
|
|
2493
2493
|
}
|
|
2494
|
-
class
|
|
2494
|
+
class _e extends Ce {
|
|
2495
2495
|
/** 默认缩放级别 */
|
|
2496
2496
|
static DEFAULT_ZOOM = 0.8;
|
|
2497
2497
|
id;
|
|
@@ -2510,9 +2510,9 @@ class we extends Ie {
|
|
|
2510
2510
|
_isActive = !1;
|
|
2511
2511
|
_cameraHandler;
|
|
2512
2512
|
constructor(t, n, i, r) {
|
|
2513
|
-
super(), this.id = t, this.app = n, this.icons = i, this.states = r, this.projectionContainer = new ee(), this.lines = new Oa(this), this.nodes = new Aa(this), this.texts = new ka(this), this.rects = new
|
|
2513
|
+
super(), this.id = t, this.app = n, this.icons = i, this.states = r, this.projectionContainer = new ee(), this.lines = new Oa(this), this.nodes = new Aa(this), this.texts = new ka(this), this.rects = new Da(this), this.grid = new Pa();
|
|
2514
2514
|
const { skewX: o, skewY: s } = Qi();
|
|
2515
|
-
this.projectionContainer.sortableChildren = !0, this.projectionContainer.skew.set(o, s), this.projectionContainer.scale.set(
|
|
2515
|
+
this.projectionContainer.sortableChildren = !0, this.projectionContainer.skew.set(o, s), this.projectionContainer.scale.set(_e.DEFAULT_ZOOM), this.projectionContainer.position.set(n.screen.width / 2, n.screen.height / 2), this.projectionContainer.addChild(
|
|
2516
2516
|
this.grid.getGraphics(),
|
|
2517
2517
|
// 网格放在最底层
|
|
2518
2518
|
this.rects.getContainer(),
|
|
@@ -2552,7 +2552,7 @@ class we extends Ie {
|
|
|
2552
2552
|
}
|
|
2553
2553
|
/** 从 YAML 字符串反序列化 */
|
|
2554
2554
|
fromYAML(t) {
|
|
2555
|
-
this.fromJSON(
|
|
2555
|
+
this.fromJSON(Ee(t));
|
|
2556
2556
|
}
|
|
2557
2557
|
// ========== 导出 ==========
|
|
2558
2558
|
/**
|
|
@@ -2638,7 +2638,7 @@ class we extends Ie {
|
|
|
2638
2638
|
*/
|
|
2639
2639
|
getDefaultCamera() {
|
|
2640
2640
|
return {
|
|
2641
|
-
zoom:
|
|
2641
|
+
zoom: _e.DEFAULT_ZOOM,
|
|
2642
2642
|
x: this.app.screen.width / 2,
|
|
2643
2643
|
y: this.app.screen.height / 2
|
|
2644
2644
|
};
|
|
@@ -2687,10 +2687,10 @@ class we extends Ie {
|
|
|
2687
2687
|
this.emit("camera:change", o), t && this.emit("camera:move", o), n && this.emit("camera:zoom", o);
|
|
2688
2688
|
}
|
|
2689
2689
|
getViewRect() {
|
|
2690
|
-
const { width: t, height: n } = this.app.screen, i = this.projectionContainer, r = i.skew.x, o = i.skew.y, s = i.scale.x, a = i.scale.y, c = Math.cos(o) * s, l = Math.sin(o) * s, h = Math.sin(r) * a, u = Math.cos(r) * a, f = i.x, d = i.y, p = c * u - l * h, g = u / p, v = -l / p,
|
|
2690
|
+
const { width: t, height: n } = this.app.screen, i = this.projectionContainer, r = i.skew.x, o = i.skew.y, s = i.scale.x, a = i.scale.y, c = Math.cos(o) * s, l = Math.sin(o) * s, h = Math.sin(r) * a, u = Math.cos(r) * a, f = i.x, d = i.y, p = c * u - l * h, g = u / p, v = -l / p, _ = -h / p, x = c / p, w = (ne, ie) => {
|
|
2691
2691
|
const B = ne - f, re = ie - d;
|
|
2692
|
-
return { x: g * B +
|
|
2693
|
-
}, S =
|
|
2692
|
+
return { x: g * B + _ * re, y: v * B + x * re };
|
|
2693
|
+
}, S = w(0, 0), T = w(t, 0), P = w(0, n), D = w(t, n), U = Math.min(S.x, T.x, P.x, D.x), q = Math.min(S.y, T.y, P.y, D.y), H = Math.max(S.x, T.x, P.x, D.x), Y = Math.max(S.y, T.y, P.y, D.y);
|
|
2694
2694
|
return { x: U, y: q, width: H - U, height: Y - q };
|
|
2695
2695
|
}
|
|
2696
2696
|
/**
|
|
@@ -2718,7 +2718,7 @@ class we extends Ie {
|
|
|
2718
2718
|
return s ? { x: n, y: i, width: r - n, height: o - i } : null;
|
|
2719
2719
|
}
|
|
2720
2720
|
}
|
|
2721
|
-
class
|
|
2721
|
+
class qe {
|
|
2722
2722
|
topology;
|
|
2723
2723
|
sceneCleanups = /* @__PURE__ */ new Map();
|
|
2724
2724
|
_onSceneAdded;
|
|
@@ -2763,7 +2763,7 @@ class Xe {
|
|
|
2763
2763
|
onSceneRemoved(t) {
|
|
2764
2764
|
}
|
|
2765
2765
|
}
|
|
2766
|
-
class
|
|
2766
|
+
class Me extends qe {
|
|
2767
2767
|
activeScene;
|
|
2768
2768
|
hookScene(t) {
|
|
2769
2769
|
}
|
|
@@ -2786,7 +2786,7 @@ class qe extends Xe {
|
|
|
2786
2786
|
this.unbindActive(), super.uninstall(t);
|
|
2787
2787
|
}
|
|
2788
2788
|
}
|
|
2789
|
-
class qa extends
|
|
2789
|
+
class qa extends Me {
|
|
2790
2790
|
name = "hit-test";
|
|
2791
2791
|
_hoveredItemId = null;
|
|
2792
2792
|
_hoveredItemType = null;
|
|
@@ -2827,7 +2827,7 @@ class qa extends qe {
|
|
|
2827
2827
|
t && (t.off("pointerdown", this._handlers.onPointerDown), t.off("pointerup", this._handlers.onPointerUp), t.off("pointermove", this._handlers.onPointerMove)), this._handlers = void 0, this._hoveredItemId = null, this._hoveredItemType = null;
|
|
2828
2828
|
}
|
|
2829
2829
|
}
|
|
2830
|
-
class ja extends
|
|
2830
|
+
class ja extends Ce {
|
|
2831
2831
|
icons = /* @__PURE__ */ new Map();
|
|
2832
2832
|
textureCache = /* @__PURE__ */ new Map();
|
|
2833
2833
|
loading = /* @__PURE__ */ new Map();
|
|
@@ -2889,26 +2889,26 @@ class ja extends Ie {
|
|
|
2889
2889
|
}
|
|
2890
2890
|
/** 从 YAML 字符串反序列化(追加模式) */
|
|
2891
2891
|
fromYAML(t) {
|
|
2892
|
-
this.fromJSON(
|
|
2892
|
+
this.fromJSON(Ee(t));
|
|
2893
2893
|
}
|
|
2894
2894
|
destroy() {
|
|
2895
2895
|
this.clear(), this.removeAllListeners();
|
|
2896
2896
|
}
|
|
2897
2897
|
}
|
|
2898
|
-
const
|
|
2898
|
+
const zt = /* @__PURE__ */ new WeakMap();
|
|
2899
2899
|
function Ou(e, t, n) {
|
|
2900
2900
|
const i = n?.frequency ?? 2, r = n?.minAlpha ?? 0.2, o = n?.maxAlpha ?? 1;
|
|
2901
2901
|
return {
|
|
2902
2902
|
stateId: e,
|
|
2903
2903
|
type: t,
|
|
2904
2904
|
onEnter(s) {
|
|
2905
|
-
|
|
2905
|
+
zt.set(s, { elapsed: 0 });
|
|
2906
2906
|
},
|
|
2907
2907
|
onLeave(s) {
|
|
2908
|
-
|
|
2908
|
+
zt.delete(s), s.getGraphics().alpha = 1;
|
|
2909
2909
|
},
|
|
2910
2910
|
onUpdate(s, a) {
|
|
2911
|
-
const c =
|
|
2911
|
+
const c = zt.get(s);
|
|
2912
2912
|
if (!c) return;
|
|
2913
2913
|
c.elapsed += a;
|
|
2914
2914
|
const l = (Math.sin(c.elapsed * i * Math.PI * 2 / 1e3) + 1) / 2;
|
|
@@ -2939,18 +2939,18 @@ function Pu(e, t, n) {
|
|
|
2939
2939
|
}
|
|
2940
2940
|
};
|
|
2941
2941
|
}
|
|
2942
|
-
const
|
|
2943
|
-
function
|
|
2944
|
-
const t = e.getGraphics(), n = (
|
|
2945
|
-
if (
|
|
2942
|
+
const De = /* @__PURE__ */ new WeakMap();
|
|
2943
|
+
function Et(e) {
|
|
2944
|
+
const t = e.getGraphics(), n = (De.get(t) ?? 0) + 1;
|
|
2945
|
+
if (De.set(t, n), n > 1) return;
|
|
2946
2946
|
const i = t.getLocalBounds(), r = 100, o = 80, s = Math.min(i.x, -r) - o, a = Math.min(i.y, -r) - o, c = Math.max(i.x + i.width, r) + o, l = Math.max(i.y + i.height, r) + o;
|
|
2947
|
-
t.filterArea = new
|
|
2947
|
+
t.filterArea = new hn(s, a, c - s, l - a);
|
|
2948
2948
|
}
|
|
2949
2949
|
function Mt(e) {
|
|
2950
|
-
const t = e.getGraphics(), n = (
|
|
2951
|
-
n <= 0 ? (
|
|
2950
|
+
const t = e.getGraphics(), n = (De.get(t) ?? 1) - 1;
|
|
2951
|
+
n <= 0 ? (De.delete(t), t.filterArea = void 0) : De.set(t, n);
|
|
2952
2952
|
}
|
|
2953
|
-
const
|
|
2953
|
+
const Ut = /* @__PURE__ */ new WeakMap();
|
|
2954
2954
|
function Lu(e, t, n) {
|
|
2955
2955
|
const i = n?.brightness ?? 1.5;
|
|
2956
2956
|
return {
|
|
@@ -2958,18 +2958,18 @@ function Lu(e, t, n) {
|
|
|
2958
2958
|
type: t,
|
|
2959
2959
|
onEnter(r) {
|
|
2960
2960
|
const o = r.getGraphics(), s = new ri();
|
|
2961
|
-
s.brightness(i, !1),
|
|
2961
|
+
s.brightness(i, !1), Ut.set(r, s), Et(r), o.filters = [...o.filters ?? [], s];
|
|
2962
2962
|
},
|
|
2963
2963
|
onLeave(r) {
|
|
2964
|
-
const o =
|
|
2964
|
+
const o = Ut.get(r);
|
|
2965
2965
|
if (o) {
|
|
2966
2966
|
const s = r.getGraphics();
|
|
2967
|
-
s.filters = (s.filters ?? []).filter((a) => a !== o), Mt(r),
|
|
2967
|
+
s.filters = (s.filters ?? []).filter((a) => a !== o), Mt(r), Ut.delete(r);
|
|
2968
2968
|
}
|
|
2969
2969
|
}
|
|
2970
2970
|
};
|
|
2971
2971
|
}
|
|
2972
|
-
const
|
|
2972
|
+
const Ht = /* @__PURE__ */ new WeakMap();
|
|
2973
2973
|
function ku(e, t, n) {
|
|
2974
2974
|
const i = Math.max(0, Math.min(1, n?.brightness ?? 0.5));
|
|
2975
2975
|
return {
|
|
@@ -2977,13 +2977,13 @@ function ku(e, t, n) {
|
|
|
2977
2977
|
type: t,
|
|
2978
2978
|
onEnter(r) {
|
|
2979
2979
|
const o = r.getGraphics(), s = new ri();
|
|
2980
|
-
s.brightness(i, !1),
|
|
2980
|
+
s.brightness(i, !1), Ht.set(r, s), Et(r), o.filters = [...o.filters ?? [], s];
|
|
2981
2981
|
},
|
|
2982
2982
|
onLeave(r) {
|
|
2983
|
-
const o =
|
|
2983
|
+
const o = Ht.get(r);
|
|
2984
2984
|
if (o) {
|
|
2985
2985
|
const s = r.getGraphics();
|
|
2986
|
-
s.filters = (s.filters ?? []).filter((a) => a !== o), Mt(r),
|
|
2986
|
+
s.filters = (s.filters ?? []).filter((a) => a !== o), Mt(r), Ht.delete(r);
|
|
2987
2987
|
}
|
|
2988
2988
|
}
|
|
2989
2989
|
};
|
|
@@ -3132,7 +3132,7 @@ function Nu(e, t, n) {
|
|
|
3132
3132
|
outerStrength: o,
|
|
3133
3133
|
quality: c
|
|
3134
3134
|
});
|
|
3135
|
-
Ke.set(h, { elapsed: 0, filter: f }),
|
|
3135
|
+
Ke.set(h, { elapsed: 0, filter: f }), Et(h), u.filters = [...u.filters ?? [], f];
|
|
3136
3136
|
},
|
|
3137
3137
|
onLeave(h) {
|
|
3138
3138
|
const u = Ke.get(h);
|
|
@@ -3151,7 +3151,7 @@ function Nu(e, t, n) {
|
|
|
3151
3151
|
};
|
|
3152
3152
|
}
|
|
3153
3153
|
const Ze = /* @__PURE__ */ new WeakMap();
|
|
3154
|
-
function
|
|
3154
|
+
function Du(e, t, n) {
|
|
3155
3155
|
const i = n?.frequency ?? 1.2, r = n?.minScale ?? 0.92, o = n?.maxScale ?? 1.08;
|
|
3156
3156
|
return {
|
|
3157
3157
|
stateId: e,
|
|
@@ -3285,14 +3285,14 @@ class tc extends oi {
|
|
|
3285
3285
|
}
|
|
3286
3286
|
}
|
|
3287
3287
|
const Qe = /* @__PURE__ */ new WeakMap();
|
|
3288
|
-
function
|
|
3288
|
+
function Ru(e, t, n) {
|
|
3289
3289
|
const i = n?.frequency ?? 0.8, r = n?.width ?? 0.35, o = n?.intensity ?? 0.6, s = n?.angle ?? Math.PI / 6;
|
|
3290
3290
|
return {
|
|
3291
3291
|
stateId: e,
|
|
3292
3292
|
type: t,
|
|
3293
3293
|
onEnter(a) {
|
|
3294
3294
|
const c = new tc({ width: r, intensity: o, angle: s }), l = a.getGraphics();
|
|
3295
|
-
|
|
3295
|
+
Et(a), l.filters = [...l.filters ?? [], c];
|
|
3296
3296
|
const h = Math.abs(Math.cos(s)) + Math.abs(Math.sin(s));
|
|
3297
3297
|
Qe.set(a, { elapsed: 0, filter: c, maxProj: h });
|
|
3298
3298
|
},
|
|
@@ -3312,7 +3312,7 @@ function Du(e, t, n) {
|
|
|
3312
3312
|
}
|
|
3313
3313
|
};
|
|
3314
3314
|
}
|
|
3315
|
-
const
|
|
3315
|
+
const Yt = /* @__PURE__ */ new WeakMap();
|
|
3316
3316
|
function $u(e, t, n) {
|
|
3317
3317
|
const i = n?.color ?? 16711680;
|
|
3318
3318
|
return {
|
|
@@ -3320,15 +3320,15 @@ function $u(e, t, n) {
|
|
|
3320
3320
|
type: t,
|
|
3321
3321
|
onEnter(r) {
|
|
3322
3322
|
const o = r.getGraphics();
|
|
3323
|
-
|
|
3323
|
+
Yt.set(r, o.tint), o.tint = i;
|
|
3324
3324
|
},
|
|
3325
3325
|
onLeave(r) {
|
|
3326
|
-
const o =
|
|
3327
|
-
o !== void 0 && (r.getGraphics().tint = o,
|
|
3326
|
+
const o = Yt.get(r);
|
|
3327
|
+
o !== void 0 && (r.getGraphics().tint = o, Yt.delete(r));
|
|
3328
3328
|
}
|
|
3329
3329
|
};
|
|
3330
3330
|
}
|
|
3331
|
-
class nc extends
|
|
3331
|
+
class nc extends Ce {
|
|
3332
3332
|
states = /* @__PURE__ */ new Map();
|
|
3333
3333
|
/** stateId → 该状态下所有的插件定义 */
|
|
3334
3334
|
plugins = /* @__PURE__ */ new Map();
|
|
@@ -3394,13 +3394,13 @@ class nc extends Ie {
|
|
|
3394
3394
|
return Te(this.toJSON());
|
|
3395
3395
|
}
|
|
3396
3396
|
fromYAML(t) {
|
|
3397
|
-
this.fromJSON(
|
|
3397
|
+
this.fromJSON(Ee(t));
|
|
3398
3398
|
}
|
|
3399
3399
|
destroy() {
|
|
3400
3400
|
this.clear(), this.removeAllListeners();
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
|
-
class dr extends
|
|
3403
|
+
class dr extends Ce {
|
|
3404
3404
|
_app;
|
|
3405
3405
|
icons = new ja();
|
|
3406
3406
|
states = new nc();
|
|
@@ -3451,7 +3451,7 @@ class dr extends Ie {
|
|
|
3451
3451
|
/** 添加场景,首个场景自动激活 */
|
|
3452
3452
|
addScene(t, n) {
|
|
3453
3453
|
if (this.ensureReady(), this.scenes.has(t)) throw new Error(`Scene "${t}" already exists`);
|
|
3454
|
-
const i = new
|
|
3454
|
+
const i = new _e(t, this.app, this.icons, this.states);
|
|
3455
3455
|
return this.scenes.set(t, i), n && i.fromJSON(n), !this._isBatchLoading && this.scenes.size === 1 ? this.switchScene(t) : i.setActive(!1), this.emit("scene:added", i), i;
|
|
3456
3456
|
}
|
|
3457
3457
|
removeScene(t) {
|
|
@@ -3487,25 +3487,25 @@ class dr extends Ie {
|
|
|
3487
3487
|
{ x: u.x + u.width, y: u.y },
|
|
3488
3488
|
{ x: u.x, y: u.y + u.height },
|
|
3489
3489
|
{ x: u.x + u.width, y: u.y + u.height }
|
|
3490
|
-
], v = p.skew.x,
|
|
3491
|
-
let P = 1 / 0,
|
|
3490
|
+
], v = p.skew.x, _ = p.skew.y, x = Math.cos(_), w = Math.sin(_), S = Math.sin(v), T = Math.cos(v);
|
|
3491
|
+
let P = 1 / 0, D = 1 / 0, U = -1 / 0, q = -1 / 0;
|
|
3492
3492
|
for (const { x: oe, y: se } of g) {
|
|
3493
|
-
const ae = x * oe + S * se, ce =
|
|
3494
|
-
ae < P && (P = ae), ce <
|
|
3493
|
+
const ae = x * oe + S * se, ce = w * oe + T * se;
|
|
3494
|
+
ae < P && (P = ae), ce < D && (D = ce), ae > U && (U = ae), ce > q && (q = ce);
|
|
3495
3495
|
}
|
|
3496
|
-
const H = U - P, Y = q -
|
|
3497
|
-
let
|
|
3496
|
+
const H = U - P, Y = q - D, ne = (P + U) / 2, ie = (D + q) / 2, B = f - l - a, re = d - s - c;
|
|
3497
|
+
let R;
|
|
3498
3498
|
if (H <= 0 && Y <= 0)
|
|
3499
|
-
|
|
3499
|
+
R = _e.DEFAULT_ZOOM;
|
|
3500
3500
|
else if (B <= 0 || re <= 0)
|
|
3501
|
-
|
|
3501
|
+
R = _e.DEFAULT_ZOOM;
|
|
3502
3502
|
else {
|
|
3503
3503
|
const oe = H > 0 ? B / H : 1 / 0, se = Y > 0 ? re / Y : 1 / 0;
|
|
3504
|
-
|
|
3504
|
+
R = Math.min(oe, se);
|
|
3505
3505
|
}
|
|
3506
|
-
|
|
3507
|
-
const
|
|
3508
|
-
!Number.isFinite(b) || !Number.isFinite(j) || !Number.isFinite(
|
|
3506
|
+
R = Math.max(0.05, Math.min(R, 10));
|
|
3507
|
+
const E = l + (f - l - a) / 2, Nt = s + (d - s - c) / 2, b = E - R * ne, j = Nt - R * ie;
|
|
3508
|
+
!Number.isFinite(b) || !Number.isFinite(j) || !Number.isFinite(R) || await h.setCamera({ zoom: R, x: b, y: j });
|
|
3509
3509
|
}
|
|
3510
3510
|
get activeScene() {
|
|
3511
3511
|
return this.activeSceneId ? this.scenes.get(this.activeSceneId) : void 0;
|
|
@@ -3542,7 +3542,7 @@ class dr extends Ie {
|
|
|
3542
3542
|
}
|
|
3543
3543
|
/** 从 YAML 字符串反序列化 */
|
|
3544
3544
|
fromYAML(t) {
|
|
3545
|
-
this.fromJSON(
|
|
3545
|
+
this.fromJSON(Ee(t));
|
|
3546
3546
|
}
|
|
3547
3547
|
// ========== 导出 ==========
|
|
3548
3548
|
/**
|
|
@@ -3628,10 +3628,10 @@ class dr extends Ie {
|
|
|
3628
3628
|
t.uninstall(this);
|
|
3629
3629
|
this.plugins.clear();
|
|
3630
3630
|
for (const t of [...this.scenes.keys()]) this.removeScene(t);
|
|
3631
|
-
this.icons.clear(), this.states.clear(),
|
|
3631
|
+
this.icons.clear(), this.states.clear(), Ea(), this.emit("destroyed"), this.removeAllListeners(), this.app?.destroy(!0), this._isReady = !1;
|
|
3632
3632
|
}
|
|
3633
3633
|
}
|
|
3634
|
-
class
|
|
3634
|
+
class Ot extends qe {
|
|
3635
3635
|
activeItems = /* @__PURE__ */ new Map();
|
|
3636
3636
|
hookScene(t) {
|
|
3637
3637
|
const n = this.getCollection(t);
|
|
@@ -3671,7 +3671,7 @@ class rc {
|
|
|
3671
3671
|
graphics;
|
|
3672
3672
|
draw(t, n) {
|
|
3673
3673
|
this.destroy();
|
|
3674
|
-
const { padding: i, radius: r, color: o, lineWidth: s, alpha: a } = { ...ic, ...n }, c = t.getLocalBounds(), l = new
|
|
3674
|
+
const { padding: i, radius: r, color: o, lineWidth: s, alpha: a } = { ...ic, ...n }, c = t.getLocalBounds(), l = new We();
|
|
3675
3675
|
l.roundRect(c.x - i, c.y - i, c.width + i * 2, c.height + i * 2, r), l.stroke({ color: o, width: s, alpha: a }), l.position.copyFrom(t.position), l.skew.copyFrom(t.skew), l.scale.copyFrom(t.scale), t.parent?.addChild(l), this.graphics = l;
|
|
3676
3676
|
}
|
|
3677
3677
|
updatePosition(t) {
|
|
@@ -3684,7 +3684,7 @@ class rc {
|
|
|
3684
3684
|
return this.graphics !== void 0;
|
|
3685
3685
|
}
|
|
3686
3686
|
}
|
|
3687
|
-
class vn extends
|
|
3687
|
+
class vn extends qe {
|
|
3688
3688
|
selected = null;
|
|
3689
3689
|
highlight = new rc();
|
|
3690
3690
|
dragStates = /* @__PURE__ */ new Map();
|
|
@@ -3772,22 +3772,22 @@ class vn extends Xe {
|
|
|
3772
3772
|
this.selected === t && this.highlight.updatePosition(t.getGraphics());
|
|
3773
3773
|
}
|
|
3774
3774
|
}
|
|
3775
|
-
var
|
|
3775
|
+
var nn = "http://www.w3.org/1999/xhtml";
|
|
3776
3776
|
const Hn = {
|
|
3777
3777
|
svg: "http://www.w3.org/2000/svg",
|
|
3778
|
-
xhtml:
|
|
3778
|
+
xhtml: nn,
|
|
3779
3779
|
xlink: "http://www.w3.org/1999/xlink",
|
|
3780
3780
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
3781
3781
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
3782
3782
|
};
|
|
3783
|
-
function
|
|
3783
|
+
function Pt(e) {
|
|
3784
3784
|
var t = e += "", n = t.indexOf(":");
|
|
3785
3785
|
return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), Hn.hasOwnProperty(t) ? { space: Hn[t], local: e } : e;
|
|
3786
3786
|
}
|
|
3787
3787
|
function oc(e) {
|
|
3788
3788
|
return function() {
|
|
3789
3789
|
var t = this.ownerDocument, n = this.namespaceURI;
|
|
3790
|
-
return n ===
|
|
3790
|
+
return n === nn && t.documentElement.namespaceURI === nn ? t.createElement(e) : t.createElementNS(n, e);
|
|
3791
3791
|
};
|
|
3792
3792
|
}
|
|
3793
3793
|
function sc(e) {
|
|
@@ -3796,7 +3796,7 @@ function sc(e) {
|
|
|
3796
3796
|
};
|
|
3797
3797
|
}
|
|
3798
3798
|
function pr(e) {
|
|
3799
|
-
var t =
|
|
3799
|
+
var t = Pt(e);
|
|
3800
3800
|
return (t.local ? sc : oc)(t);
|
|
3801
3801
|
}
|
|
3802
3802
|
function ac() {
|
|
@@ -3867,10 +3867,10 @@ function yc(e) {
|
|
|
3867
3867
|
return xc.call(this.children, e);
|
|
3868
3868
|
};
|
|
3869
3869
|
}
|
|
3870
|
-
function
|
|
3870
|
+
function _c(e) {
|
|
3871
3871
|
return this.selectAll(e == null ? vc : yc(typeof e == "function" ? e : xr(e)));
|
|
3872
3872
|
}
|
|
3873
|
-
function
|
|
3873
|
+
function wc(e) {
|
|
3874
3874
|
typeof e != "function" && (e = mr(e));
|
|
3875
3875
|
for (var t = this._groups, n = t.length, i = new Array(n), r = 0; r < n; ++r)
|
|
3876
3876
|
for (var o = t[r], s = o.length, a = i[r] = [], c, l = 0; l < s; ++l)
|
|
@@ -3912,7 +3912,7 @@ function bc(e, t, n, i, r, o) {
|
|
|
3912
3912
|
for (; s < c; ++s)
|
|
3913
3913
|
(a = t[s]) && (r[s] = a);
|
|
3914
3914
|
}
|
|
3915
|
-
function
|
|
3915
|
+
function Ic(e, t, n, i, r, o, s) {
|
|
3916
3916
|
var a, c, l = /* @__PURE__ */ new Map(), h = t.length, u = o.length, f = new Array(h), d;
|
|
3917
3917
|
for (a = 0; a < h; ++a)
|
|
3918
3918
|
(c = t[a]) && (f[a] = d = s.call(c, c.__data__, a, t) + "", l.has(d) ? r[a] = c : l.set(d, c));
|
|
@@ -3921,28 +3921,28 @@ function Cc(e, t, n, i, r, o, s) {
|
|
|
3921
3921
|
for (a = 0; a < h; ++a)
|
|
3922
3922
|
(c = t[a]) && l.get(f[a]) === c && (r[a] = c);
|
|
3923
3923
|
}
|
|
3924
|
-
function
|
|
3924
|
+
function Cc(e) {
|
|
3925
3925
|
return e.__data__;
|
|
3926
3926
|
}
|
|
3927
3927
|
function Tc(e, t) {
|
|
3928
|
-
if (!arguments.length) return Array.from(this,
|
|
3929
|
-
var n = t ?
|
|
3928
|
+
if (!arguments.length) return Array.from(this, Cc);
|
|
3929
|
+
var n = t ? Ic : bc, i = this._parents, r = this._groups;
|
|
3930
3930
|
typeof e != "function" && (e = Ac(e));
|
|
3931
3931
|
for (var o = r.length, s = new Array(o), a = new Array(o), c = new Array(o), l = 0; l < o; ++l) {
|
|
3932
|
-
var h = i[l], u = r[l], f = u.length, d =
|
|
3933
|
-
n(h, u, g, v,
|
|
3934
|
-
for (var x = 0,
|
|
3932
|
+
var h = i[l], u = r[l], f = u.length, d = Ec(e.call(h, h && h.__data__, l, i)), p = d.length, g = a[l] = new Array(p), v = s[l] = new Array(p), _ = c[l] = new Array(f);
|
|
3933
|
+
n(h, u, g, v, _, d, t);
|
|
3934
|
+
for (var x = 0, w = 0, S, T; x < p; ++x)
|
|
3935
3935
|
if (S = g[x]) {
|
|
3936
|
-
for (x >=
|
|
3936
|
+
for (x >= w && (w = x + 1); !(T = v[w]) && ++w < p; ) ;
|
|
3937
3937
|
S._next = T || null;
|
|
3938
3938
|
}
|
|
3939
3939
|
}
|
|
3940
3940
|
return s = new N(s, i), s._enter = a, s._exit = c, s;
|
|
3941
3941
|
}
|
|
3942
|
-
function
|
|
3942
|
+
function Ec(e) {
|
|
3943
3943
|
return typeof e == "object" && "length" in e ? e : Array.from(e);
|
|
3944
3944
|
}
|
|
3945
|
-
function
|
|
3945
|
+
function Mc() {
|
|
3946
3946
|
return new N(this._exit || this._groups.map(vr), this._parents);
|
|
3947
3947
|
}
|
|
3948
3948
|
function Oc(e, t, n) {
|
|
@@ -3978,11 +3978,11 @@ function kc(e) {
|
|
|
3978
3978
|
function Nc(e, t) {
|
|
3979
3979
|
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
3980
3980
|
}
|
|
3981
|
-
function
|
|
3981
|
+
function Dc() {
|
|
3982
3982
|
var e = arguments[0];
|
|
3983
3983
|
return arguments[0] = this, e.apply(null, arguments), this;
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function Rc() {
|
|
3986
3986
|
return Array.from(this);
|
|
3987
3987
|
}
|
|
3988
3988
|
function $c() {
|
|
@@ -4040,7 +4040,7 @@ function Xc(e, t) {
|
|
|
4040
4040
|
};
|
|
4041
4041
|
}
|
|
4042
4042
|
function qc(e, t) {
|
|
4043
|
-
var n =
|
|
4043
|
+
var n = Pt(e);
|
|
4044
4044
|
if (arguments.length < 2) {
|
|
4045
4045
|
var i = this.node();
|
|
4046
4046
|
return n.local ? i.getAttributeNS(n.space, n.local) : i.getAttribute(n);
|
|
@@ -4091,16 +4091,16 @@ function el(e, t) {
|
|
|
4091
4091
|
function tl(e, t) {
|
|
4092
4092
|
return arguments.length > 1 ? this.each((t == null ? Zc : typeof t == "function" ? el : Qc)(e, t)) : this.node()[e];
|
|
4093
4093
|
}
|
|
4094
|
-
function
|
|
4094
|
+
function _r(e) {
|
|
4095
4095
|
return e.trim().split(/^|\s+/);
|
|
4096
4096
|
}
|
|
4097
|
-
function
|
|
4098
|
-
return e.classList || new
|
|
4097
|
+
function _n(e) {
|
|
4098
|
+
return e.classList || new wr(e);
|
|
4099
4099
|
}
|
|
4100
|
-
function
|
|
4101
|
-
this._node = e, this._names =
|
|
4100
|
+
function wr(e) {
|
|
4101
|
+
this._node = e, this._names = _r(e.getAttribute("class") || "");
|
|
4102
4102
|
}
|
|
4103
|
-
|
|
4103
|
+
wr.prototype = {
|
|
4104
4104
|
add: function(e) {
|
|
4105
4105
|
var t = this._names.indexOf(e);
|
|
4106
4106
|
t < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
|
|
@@ -4114,10 +4114,10 @@ _r.prototype = {
|
|
|
4114
4114
|
}
|
|
4115
4115
|
};
|
|
4116
4116
|
function Sr(e, t) {
|
|
4117
|
-
for (var n =
|
|
4117
|
+
for (var n = _n(e), i = -1, r = t.length; ++i < r; ) n.add(t[i]);
|
|
4118
4118
|
}
|
|
4119
4119
|
function Ar(e, t) {
|
|
4120
|
-
for (var n =
|
|
4120
|
+
for (var n = _n(e), i = -1, r = t.length; ++i < r; ) n.remove(t[i]);
|
|
4121
4121
|
}
|
|
4122
4122
|
function nl(e) {
|
|
4123
4123
|
return function() {
|
|
@@ -4135,9 +4135,9 @@ function rl(e, t) {
|
|
|
4135
4135
|
};
|
|
4136
4136
|
}
|
|
4137
4137
|
function ol(e, t) {
|
|
4138
|
-
var n =
|
|
4138
|
+
var n = _r(e + "");
|
|
4139
4139
|
if (arguments.length < 2) {
|
|
4140
|
-
for (var i =
|
|
4140
|
+
for (var i = _n(this.node()), r = -1, o = n.length; ++r < o; ) if (!i.contains(n[r])) return !1;
|
|
4141
4141
|
return !0;
|
|
4142
4142
|
}
|
|
4143
4143
|
return this.each((typeof t == "function" ? rl : t ? nl : il)(n, t));
|
|
@@ -4197,18 +4197,18 @@ function vl(e) {
|
|
|
4197
4197
|
function yl() {
|
|
4198
4198
|
return null;
|
|
4199
4199
|
}
|
|
4200
|
-
function
|
|
4200
|
+
function _l(e, t) {
|
|
4201
4201
|
var n = typeof e == "function" ? e : pr(e), i = t == null ? yl : typeof t == "function" ? t : yn(t);
|
|
4202
4202
|
return this.select(function() {
|
|
4203
4203
|
return this.insertBefore(n.apply(this, arguments), i.apply(this, arguments) || null);
|
|
4204
4204
|
});
|
|
4205
4205
|
}
|
|
4206
|
-
function
|
|
4206
|
+
function wl() {
|
|
4207
4207
|
var e = this.parentNode;
|
|
4208
4208
|
e && e.removeChild(this);
|
|
4209
4209
|
}
|
|
4210
4210
|
function Sl() {
|
|
4211
|
-
return this.each(
|
|
4211
|
+
return this.each(wl);
|
|
4212
4212
|
}
|
|
4213
4213
|
function Al() {
|
|
4214
4214
|
var e = this.cloneNode(!1), t = this.parentNode;
|
|
@@ -4218,10 +4218,10 @@ function bl() {
|
|
|
4218
4218
|
var e = this.cloneNode(!0), t = this.parentNode;
|
|
4219
4219
|
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
4220
4220
|
}
|
|
4221
|
-
function
|
|
4221
|
+
function Il(e) {
|
|
4222
4222
|
return this.select(e ? bl : Al);
|
|
4223
4223
|
}
|
|
4224
|
-
function
|
|
4224
|
+
function Cl(e) {
|
|
4225
4225
|
return arguments.length ? this.property("__data__", e) : this.node().__data__;
|
|
4226
4226
|
}
|
|
4227
4227
|
function Tl(e) {
|
|
@@ -4229,13 +4229,13 @@ function Tl(e) {
|
|
|
4229
4229
|
e.call(this, t, this.__data__);
|
|
4230
4230
|
};
|
|
4231
4231
|
}
|
|
4232
|
-
function
|
|
4232
|
+
function El(e) {
|
|
4233
4233
|
return e.trim().split(/^|\s+/).map(function(t) {
|
|
4234
4234
|
var n = "", i = t.indexOf(".");
|
|
4235
4235
|
return i >= 0 && (n = t.slice(i + 1), t = t.slice(0, i)), { type: t, name: n };
|
|
4236
4236
|
});
|
|
4237
4237
|
}
|
|
4238
|
-
function
|
|
4238
|
+
function Ml(e) {
|
|
4239
4239
|
return function() {
|
|
4240
4240
|
var t = this.__on;
|
|
4241
4241
|
if (t) {
|
|
@@ -4259,7 +4259,7 @@ function Ol(e, t, n) {
|
|
|
4259
4259
|
};
|
|
4260
4260
|
}
|
|
4261
4261
|
function Pl(e, t, n) {
|
|
4262
|
-
var i =
|
|
4262
|
+
var i = El(e + ""), r, o = i.length, s;
|
|
4263
4263
|
if (arguments.length < 2) {
|
|
4264
4264
|
var a = this.node().__on;
|
|
4265
4265
|
if (a) {
|
|
@@ -4270,7 +4270,7 @@ function Pl(e, t, n) {
|
|
|
4270
4270
|
}
|
|
4271
4271
|
return;
|
|
4272
4272
|
}
|
|
4273
|
-
for (a = t ? Ol :
|
|
4273
|
+
for (a = t ? Ol : Ml, r = 0; r < o; ++r) this.each(a(i[r], t, n));
|
|
4274
4274
|
return this;
|
|
4275
4275
|
}
|
|
4276
4276
|
function br(e, t, n) {
|
|
@@ -4290,19 +4290,19 @@ function kl(e, t) {
|
|
|
4290
4290
|
function Nl(e, t) {
|
|
4291
4291
|
return this.each((typeof t == "function" ? kl : Ll)(e, t));
|
|
4292
4292
|
}
|
|
4293
|
-
function*
|
|
4293
|
+
function* Dl() {
|
|
4294
4294
|
for (var e = this._groups, t = 0, n = e.length; t < n; ++t)
|
|
4295
4295
|
for (var i = e[t], r = 0, o = i.length, s; r < o; ++r)
|
|
4296
4296
|
(s = i[r]) && (yield s);
|
|
4297
4297
|
}
|
|
4298
|
-
var
|
|
4298
|
+
var Ir = [null];
|
|
4299
4299
|
function N(e, t) {
|
|
4300
4300
|
this._groups = e, this._parents = t;
|
|
4301
4301
|
}
|
|
4302
4302
|
function je() {
|
|
4303
|
-
return new N([[document.documentElement]],
|
|
4303
|
+
return new N([[document.documentElement]], Ir);
|
|
4304
4304
|
}
|
|
4305
|
-
function
|
|
4305
|
+
function Rl() {
|
|
4306
4306
|
return this;
|
|
4307
4307
|
}
|
|
4308
4308
|
N.prototype = je.prototype = {
|
|
@@ -4310,18 +4310,18 @@ N.prototype = je.prototype = {
|
|
|
4310
4310
|
select: cc,
|
|
4311
4311
|
selectAll: fc,
|
|
4312
4312
|
selectChild: mc,
|
|
4313
|
-
selectChildren:
|
|
4314
|
-
filter:
|
|
4313
|
+
selectChildren: _c,
|
|
4314
|
+
filter: wc,
|
|
4315
4315
|
data: Tc,
|
|
4316
4316
|
enter: Sc,
|
|
4317
|
-
exit:
|
|
4317
|
+
exit: Mc,
|
|
4318
4318
|
join: Oc,
|
|
4319
4319
|
merge: Pc,
|
|
4320
|
-
selection:
|
|
4320
|
+
selection: Rl,
|
|
4321
4321
|
order: Lc,
|
|
4322
4322
|
sort: kc,
|
|
4323
|
-
call:
|
|
4324
|
-
nodes:
|
|
4323
|
+
call: Dc,
|
|
4324
|
+
nodes: Rc,
|
|
4325
4325
|
node: $c,
|
|
4326
4326
|
size: Fc,
|
|
4327
4327
|
empty: zc,
|
|
@@ -4335,20 +4335,20 @@ N.prototype = je.prototype = {
|
|
|
4335
4335
|
raise: gl,
|
|
4336
4336
|
lower: xl,
|
|
4337
4337
|
append: vl,
|
|
4338
|
-
insert:
|
|
4338
|
+
insert: _l,
|
|
4339
4339
|
remove: Sl,
|
|
4340
|
-
clone:
|
|
4341
|
-
datum:
|
|
4340
|
+
clone: Il,
|
|
4341
|
+
datum: Cl,
|
|
4342
4342
|
on: Pl,
|
|
4343
4343
|
dispatch: Nl,
|
|
4344
|
-
[Symbol.iterator]:
|
|
4344
|
+
[Symbol.iterator]: Dl
|
|
4345
4345
|
};
|
|
4346
4346
|
function $l(e) {
|
|
4347
|
-
return typeof e == "string" ? new N([[document.querySelector(e)]], [document.documentElement]) : new N([[e]],
|
|
4347
|
+
return typeof e == "string" ? new N([[document.querySelector(e)]], [document.documentElement]) : new N([[e]], Ir);
|
|
4348
4348
|
}
|
|
4349
4349
|
var Fl = { value: () => {
|
|
4350
4350
|
} };
|
|
4351
|
-
function
|
|
4351
|
+
function Cr() {
|
|
4352
4352
|
for (var e = 0, t = arguments.length, n = {}, i; e < t; ++e) {
|
|
4353
4353
|
if (!(i = arguments[e] + "") || i in n || /[\s.]/.test(i)) throw new Error("illegal type: " + i);
|
|
4354
4354
|
n[i] = [];
|
|
@@ -4365,7 +4365,7 @@ function zl(e, t) {
|
|
|
4365
4365
|
return { type: n, name: i };
|
|
4366
4366
|
});
|
|
4367
4367
|
}
|
|
4368
|
-
ot.prototype =
|
|
4368
|
+
ot.prototype = Cr.prototype = {
|
|
4369
4369
|
constructor: ot,
|
|
4370
4370
|
on: function(e, t) {
|
|
4371
4371
|
var n = this._, i = zl(e + "", n), r, o = -1, s = i.length;
|
|
@@ -4407,70 +4407,70 @@ function Yn(e, t, n) {
|
|
|
4407
4407
|
}
|
|
4408
4408
|
return n != null && e.push({ name: t, value: n }), e;
|
|
4409
4409
|
}
|
|
4410
|
-
var
|
|
4410
|
+
var Ie = 0, Le = 0, Oe = 0, Tr = 1e3, vt, ke, yt = 0, pe = 0, Lt = 0, He = typeof performance == "object" && performance.now ? performance : Date, Er = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
4411
4411
|
setTimeout(e, 17);
|
|
4412
4412
|
};
|
|
4413
|
-
function
|
|
4414
|
-
return pe || (
|
|
4413
|
+
function wn() {
|
|
4414
|
+
return pe || (Er(Hl), pe = He.now() + Lt);
|
|
4415
4415
|
}
|
|
4416
4416
|
function Hl() {
|
|
4417
4417
|
pe = 0;
|
|
4418
4418
|
}
|
|
4419
|
-
function
|
|
4419
|
+
function _t() {
|
|
4420
4420
|
this._call = this._time = this._next = null;
|
|
4421
4421
|
}
|
|
4422
|
-
|
|
4423
|
-
constructor:
|
|
4422
|
+
_t.prototype = Mr.prototype = {
|
|
4423
|
+
constructor: _t,
|
|
4424
4424
|
restart: function(e, t, n) {
|
|
4425
4425
|
if (typeof e != "function") throw new TypeError("callback is not a function");
|
|
4426
|
-
n = (n == null ?
|
|
4426
|
+
n = (n == null ? wn() : +n) + (t == null ? 0 : +t), !this._next && ke !== this && (ke ? ke._next = this : vt = this, ke = this), this._call = e, this._time = n, rn();
|
|
4427
4427
|
},
|
|
4428
4428
|
stop: function() {
|
|
4429
|
-
this._call && (this._call = null, this._time = 1 / 0,
|
|
4429
|
+
this._call && (this._call = null, this._time = 1 / 0, rn());
|
|
4430
4430
|
}
|
|
4431
4431
|
};
|
|
4432
|
-
function
|
|
4433
|
-
var i = new
|
|
4432
|
+
function Mr(e, t, n) {
|
|
4433
|
+
var i = new _t();
|
|
4434
4434
|
return i.restart(e, t, n), i;
|
|
4435
4435
|
}
|
|
4436
4436
|
function Yl() {
|
|
4437
|
-
|
|
4437
|
+
wn(), ++Ie;
|
|
4438
4438
|
for (var e = vt, t; e; )
|
|
4439
4439
|
(t = pe - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
|
|
4440
|
-
--
|
|
4440
|
+
--Ie;
|
|
4441
4441
|
}
|
|
4442
4442
|
function Bn() {
|
|
4443
|
-
pe = (yt =
|
|
4443
|
+
pe = (yt = He.now()) + Lt, Ie = Le = 0;
|
|
4444
4444
|
try {
|
|
4445
4445
|
Yl();
|
|
4446
4446
|
} finally {
|
|
4447
|
-
|
|
4447
|
+
Ie = 0, Gl(), pe = 0;
|
|
4448
4448
|
}
|
|
4449
4449
|
}
|
|
4450
4450
|
function Bl() {
|
|
4451
|
-
var e =
|
|
4452
|
-
t > Tr && (
|
|
4451
|
+
var e = He.now(), t = e - yt;
|
|
4452
|
+
t > Tr && (Lt -= t, yt = e);
|
|
4453
4453
|
}
|
|
4454
4454
|
function Gl() {
|
|
4455
4455
|
for (var e, t = vt, n, i = 1 / 0; t; )
|
|
4456
4456
|
t._call ? (i > t._time && (i = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : vt = n);
|
|
4457
|
-
|
|
4457
|
+
ke = e, rn(i);
|
|
4458
4458
|
}
|
|
4459
|
-
function
|
|
4460
|
-
if (!
|
|
4461
|
-
|
|
4459
|
+
function rn(e) {
|
|
4460
|
+
if (!Ie) {
|
|
4461
|
+
Le && (Le = clearTimeout(Le));
|
|
4462
4462
|
var t = e - pe;
|
|
4463
|
-
t > 24 ? (e < 1 / 0 && (
|
|
4463
|
+
t > 24 ? (e < 1 / 0 && (Le = setTimeout(Bn, e - He.now() - Lt)), Oe && (Oe = clearInterval(Oe))) : (Oe || (yt = He.now(), Oe = setInterval(Bl, Tr)), Ie = 1, Er(Bn));
|
|
4464
4464
|
}
|
|
4465
4465
|
}
|
|
4466
4466
|
function Gn(e, t, n) {
|
|
4467
|
-
var i = new
|
|
4467
|
+
var i = new _t();
|
|
4468
4468
|
return t = t == null ? 0 : +t, i.restart((r) => {
|
|
4469
4469
|
i.stop(), e(r + t);
|
|
4470
4470
|
}, t, n), i;
|
|
4471
4471
|
}
|
|
4472
|
-
var Wl =
|
|
4473
|
-
function
|
|
4472
|
+
var Wl = Cr("start", "end", "cancel", "interrupt"), Xl = [], Or = 0, Wn = 1, on = 2, st = 3, Xn = 4, sn = 5, at = 6;
|
|
4473
|
+
function kt(e, t, n, i, r, o) {
|
|
4474
4474
|
var s = e.__transition;
|
|
4475
4475
|
if (!s) e.__transition = {};
|
|
4476
4476
|
else if (n in s) return;
|
|
@@ -4507,7 +4507,7 @@ function z(e, t) {
|
|
|
4507
4507
|
}
|
|
4508
4508
|
function ql(e, t, n) {
|
|
4509
4509
|
var i = e.__transition, r;
|
|
4510
|
-
i[t] = n, n.timer =
|
|
4510
|
+
i[t] = n, n.timer = Mr(o, 0, n.time);
|
|
4511
4511
|
function o(l) {
|
|
4512
4512
|
n.state = Wn, n.timer.restart(s, n.delay, n.time), n.delay <= l && s(l - n.delay);
|
|
4513
4513
|
}
|
|
@@ -4521,16 +4521,16 @@ function ql(e, t, n) {
|
|
|
4521
4521
|
}
|
|
4522
4522
|
if (Gn(function() {
|
|
4523
4523
|
n.state === st && (n.state = Xn, n.timer.restart(a, n.delay, n.time), a(l));
|
|
4524
|
-
}), n.state =
|
|
4524
|
+
}), n.state = on, n.on.call("start", e, e.__data__, n.index, n.group), n.state === on) {
|
|
4525
4525
|
for (n.state = st, r = new Array(f = n.tween.length), h = 0, u = -1; h < f; ++h)
|
|
4526
4526
|
(d = n.tween[h].value.call(e, e.__data__, n.index, n.group)) && (r[++u] = d);
|
|
4527
4527
|
r.length = u + 1;
|
|
4528
4528
|
}
|
|
4529
4529
|
}
|
|
4530
4530
|
function a(l) {
|
|
4531
|
-
for (var h = l < n.duration ? n.ease.call(null, l / n.duration) : (n.timer.restart(c), n.state =
|
|
4531
|
+
for (var h = l < n.duration ? n.ease.call(null, l / n.duration) : (n.timer.restart(c), n.state = sn, 1), u = -1, f = r.length; ++u < f; )
|
|
4532
4532
|
r[u].call(e, h);
|
|
4533
|
-
n.state ===
|
|
4533
|
+
n.state === sn && (n.on.call("end", e, e.__data__, n.index, n.group), c());
|
|
4534
4534
|
}
|
|
4535
4535
|
function c() {
|
|
4536
4536
|
n.state = at, n.timer.stop(), delete i[t];
|
|
@@ -4547,7 +4547,7 @@ function jl(e, t) {
|
|
|
4547
4547
|
o = !1;
|
|
4548
4548
|
continue;
|
|
4549
4549
|
}
|
|
4550
|
-
r = i.state >
|
|
4550
|
+
r = i.state > on && i.state < sn, i.state = at, i.timer.stop(), i.on.call(r ? "interrupt" : "cancel", e, e.__data__, i.index, i.group), delete n[s];
|
|
4551
4551
|
}
|
|
4552
4552
|
o && delete e.__transition;
|
|
4553
4553
|
}
|
|
@@ -4567,7 +4567,7 @@ function Pr(e, t) {
|
|
|
4567
4567
|
}
|
|
4568
4568
|
function Ve() {
|
|
4569
4569
|
}
|
|
4570
|
-
var
|
|
4570
|
+
var Ye = 0.7, wt = 1 / Ye, we = "\\s*([+-]?\\d+)\\s*", Be = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", W = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Jl = /^#([0-9a-f]{3,8})$/, Kl = new RegExp(`^rgb\\(${we},${we},${we}\\)$`), Zl = new RegExp(`^rgb\\(${W},${W},${W}\\)$`), Ql = new RegExp(`^rgba\\(${we},${we},${we},${Be}\\)$`), eh = new RegExp(`^rgba\\(${W},${W},${W},${Be}\\)$`), th = new RegExp(`^hsl\\(${Be},${W},${W}\\)$`), nh = new RegExp(`^hsla\\(${Be},${W},${W},${Be}\\)$`), qn = {
|
|
4571
4571
|
aliceblue: 15792383,
|
|
4572
4572
|
antiquewhite: 16444375,
|
|
4573
4573
|
aqua: 65535,
|
|
@@ -4717,7 +4717,7 @@ var He = 0.7, _t = 1 / He, _e = "\\s*([+-]?\\d+)\\s*", Ye = "\\s*([+-]?(?:\\d*\\
|
|
|
4717
4717
|
yellow: 16776960,
|
|
4718
4718
|
yellowgreen: 10145074
|
|
4719
4719
|
};
|
|
4720
|
-
An(Ve,
|
|
4720
|
+
An(Ve, Ge, {
|
|
4721
4721
|
copy(e) {
|
|
4722
4722
|
return Object.assign(new this.constructor(), this, e);
|
|
4723
4723
|
},
|
|
@@ -4744,7 +4744,7 @@ function rh() {
|
|
|
4744
4744
|
function Vn() {
|
|
4745
4745
|
return this.rgb().formatRgb();
|
|
4746
4746
|
}
|
|
4747
|
-
function
|
|
4747
|
+
function Ge(e) {
|
|
4748
4748
|
var t, n;
|
|
4749
4749
|
return e = (e + "").trim().toLowerCase(), (t = Jl.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Jn(t) : n === 3 ? new k(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? et(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? et(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Kl.exec(e)) ? new k(t[1], t[2], t[3], 1) : (t = Zl.exec(e)) ? new k(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Ql.exec(e)) ? et(t[1], t[2], t[3], t[4]) : (t = eh.exec(e)) ? et(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = th.exec(e)) ? Qn(t[1], t[2] / 100, t[3] / 100, 1) : (t = nh.exec(e)) ? Qn(t[1], t[2] / 100, t[3] / 100, t[4]) : qn.hasOwnProperty(e) ? Jn(qn[e]) : e === "transparent" ? new k(NaN, NaN, NaN, 0) : null;
|
|
4750
4750
|
}
|
|
@@ -4755,20 +4755,20 @@ function et(e, t, n, i) {
|
|
|
4755
4755
|
return i <= 0 && (e = t = n = NaN), new k(e, t, n, i);
|
|
4756
4756
|
}
|
|
4757
4757
|
function oh(e) {
|
|
4758
|
-
return e instanceof Ve || (e =
|
|
4758
|
+
return e instanceof Ve || (e = Ge(e)), e ? (e = e.rgb(), new k(e.r, e.g, e.b, e.opacity)) : new k();
|
|
4759
4759
|
}
|
|
4760
|
-
function
|
|
4760
|
+
function an(e, t, n, i) {
|
|
4761
4761
|
return arguments.length === 1 ? oh(e) : new k(e, t, n, i ?? 1);
|
|
4762
4762
|
}
|
|
4763
4763
|
function k(e, t, n, i) {
|
|
4764
4764
|
this.r = +e, this.g = +t, this.b = +n, this.opacity = +i;
|
|
4765
4765
|
}
|
|
4766
|
-
An(k,
|
|
4766
|
+
An(k, an, Pr(Ve, {
|
|
4767
4767
|
brighter(e) {
|
|
4768
|
-
return e = e == null ?
|
|
4768
|
+
return e = e == null ? wt : Math.pow(wt, e), new k(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
4769
4769
|
},
|
|
4770
4770
|
darker(e) {
|
|
4771
|
-
return e = e == null ?
|
|
4771
|
+
return e = e == null ? Ye : Math.pow(Ye, e), new k(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
4772
4772
|
},
|
|
4773
4773
|
rgb() {
|
|
4774
4774
|
return this;
|
|
@@ -4810,7 +4810,7 @@ function Qn(e, t, n, i) {
|
|
|
4810
4810
|
}
|
|
4811
4811
|
function Lr(e) {
|
|
4812
4812
|
if (e instanceof F) return new F(e.h, e.s, e.l, e.opacity);
|
|
4813
|
-
if (e instanceof Ve || (e =
|
|
4813
|
+
if (e instanceof Ve || (e = Ge(e)), !e) return new F();
|
|
4814
4814
|
if (e instanceof F) return e;
|
|
4815
4815
|
e = e.rgb();
|
|
4816
4816
|
var t = e.r / 255, n = e.g / 255, i = e.b / 255, r = Math.min(t, n, i), o = Math.max(t, n, i), s = NaN, a = o - r, c = (o + r) / 2;
|
|
@@ -4824,17 +4824,17 @@ function F(e, t, n, i) {
|
|
|
4824
4824
|
}
|
|
4825
4825
|
An(F, ah, Pr(Ve, {
|
|
4826
4826
|
brighter(e) {
|
|
4827
|
-
return e = e == null ?
|
|
4827
|
+
return e = e == null ? wt : Math.pow(wt, e), new F(this.h, this.s, this.l * e, this.opacity);
|
|
4828
4828
|
},
|
|
4829
4829
|
darker(e) {
|
|
4830
|
-
return e = e == null ?
|
|
4830
|
+
return e = e == null ? Ye : Math.pow(Ye, e), new F(this.h, this.s, this.l * e, this.opacity);
|
|
4831
4831
|
},
|
|
4832
4832
|
rgb() {
|
|
4833
4833
|
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, i = n + (n < 0.5 ? n : 1 - n) * t, r = 2 * n - i;
|
|
4834
4834
|
return new k(
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4835
|
+
Bt(e >= 240 ? e - 240 : e + 120, r, i),
|
|
4836
|
+
Bt(e, r, i),
|
|
4837
|
+
Bt(e < 120 ? e + 240 : e - 120, r, i),
|
|
4838
4838
|
this.opacity
|
|
4839
4839
|
);
|
|
4840
4840
|
},
|
|
@@ -4855,7 +4855,7 @@ function ei(e) {
|
|
|
4855
4855
|
function tt(e) {
|
|
4856
4856
|
return Math.max(0, Math.min(1, e || 0));
|
|
4857
4857
|
}
|
|
4858
|
-
function
|
|
4858
|
+
function Bt(e, t, n) {
|
|
4859
4859
|
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
4860
4860
|
}
|
|
4861
4861
|
const kr = (e) => () => e;
|
|
@@ -4881,7 +4881,7 @@ function Nr(e, t) {
|
|
|
4881
4881
|
const ti = (function e(t) {
|
|
4882
4882
|
var n = hh(t);
|
|
4883
4883
|
function i(r, o) {
|
|
4884
|
-
var s = n((r =
|
|
4884
|
+
var s = n((r = an(r)).r, (o = an(o)).r), a = n(r.g, o.g), c = n(r.b, o.b), l = Nr(r.opacity, o.opacity);
|
|
4885
4885
|
return function(h) {
|
|
4886
4886
|
return r.r = s(h), r.g = a(h), r.b = c(h), r.opacity = l(h), r + "";
|
|
4887
4887
|
};
|
|
@@ -4893,7 +4893,7 @@ function Z(e, t) {
|
|
|
4893
4893
|
return e * (1 - n) + t * n;
|
|
4894
4894
|
};
|
|
4895
4895
|
}
|
|
4896
|
-
var
|
|
4896
|
+
var cn = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Gt = new RegExp(cn.source, "g");
|
|
4897
4897
|
function uh(e) {
|
|
4898
4898
|
return function() {
|
|
4899
4899
|
return e;
|
|
@@ -4905,15 +4905,15 @@ function fh(e) {
|
|
|
4905
4905
|
};
|
|
4906
4906
|
}
|
|
4907
4907
|
function dh(e, t) {
|
|
4908
|
-
var n =
|
|
4909
|
-
for (e = e + "", t = t + ""; (i =
|
|
4910
|
-
(o = r.index) > n && (o = t.slice(n, o), a[s] ? a[s] += o : a[++s] = o), (i = i[0]) === (r = r[0]) ? a[s] ? a[s] += r : a[++s] = r : (a[++s] = null, c.push({ i: s, x: Z(i, r) })), n =
|
|
4908
|
+
var n = cn.lastIndex = Gt.lastIndex = 0, i, r, o, s = -1, a = [], c = [];
|
|
4909
|
+
for (e = e + "", t = t + ""; (i = cn.exec(e)) && (r = Gt.exec(t)); )
|
|
4910
|
+
(o = r.index) > n && (o = t.slice(n, o), a[s] ? a[s] += o : a[++s] = o), (i = i[0]) === (r = r[0]) ? a[s] ? a[s] += r : a[++s] = r : (a[++s] = null, c.push({ i: s, x: Z(i, r) })), n = Gt.lastIndex;
|
|
4911
4911
|
return n < t.length && (o = t.slice(n), a[s] ? a[s] += o : a[++s] = o), a.length < 2 ? c[0] ? fh(c[0].x) : uh(t) : (t = c.length, function(l) {
|
|
4912
4912
|
for (var h = 0, u; h < t; ++h) a[(u = c[h]).i] = u.x(l);
|
|
4913
4913
|
return a.join("");
|
|
4914
4914
|
});
|
|
4915
4915
|
}
|
|
4916
|
-
var ni = 180 / Math.PI,
|
|
4916
|
+
var ni = 180 / Math.PI, ln = {
|
|
4917
4917
|
translateX: 0,
|
|
4918
4918
|
translateY: 0,
|
|
4919
4919
|
rotate: 0,
|
|
@@ -4921,7 +4921,7 @@ var ni = 180 / Math.PI, cn = {
|
|
|
4921
4921
|
scaleX: 1,
|
|
4922
4922
|
scaleY: 1
|
|
4923
4923
|
};
|
|
4924
|
-
function
|
|
4924
|
+
function Dr(e, t, n, i, r, o) {
|
|
4925
4925
|
var s, a, c;
|
|
4926
4926
|
return (s = Math.sqrt(e * e + t * t)) && (e /= s, t /= s), (c = e * n + t * i) && (n -= e * c, i -= t * c), (a = Math.sqrt(n * n + i * i)) && (n /= a, i /= a, c /= a), e * i < t * n && (e = -e, t = -t, c = -c, s = -s), {
|
|
4927
4927
|
translateX: r,
|
|
@@ -4935,12 +4935,12 @@ function Rr(e, t, n, i, r, o) {
|
|
|
4935
4935
|
var nt;
|
|
4936
4936
|
function ph(e) {
|
|
4937
4937
|
const t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
|
|
4938
|
-
return t.isIdentity ?
|
|
4938
|
+
return t.isIdentity ? ln : Dr(t.a, t.b, t.c, t.d, t.e, t.f);
|
|
4939
4939
|
}
|
|
4940
4940
|
function gh(e) {
|
|
4941
|
-
return e == null || (nt || (nt = document.createElementNS("http://www.w3.org/2000/svg", "g")), nt.setAttribute("transform", e), !(e = nt.transform.baseVal.consolidate())) ?
|
|
4941
|
+
return e == null || (nt || (nt = document.createElementNS("http://www.w3.org/2000/svg", "g")), nt.setAttribute("transform", e), !(e = nt.transform.baseVal.consolidate())) ? ln : (e = e.matrix, Dr(e.a, e.b, e.c, e.d, e.e, e.f));
|
|
4942
4942
|
}
|
|
4943
|
-
function
|
|
4943
|
+
function Rr(e, t, n, i) {
|
|
4944
4944
|
function r(l) {
|
|
4945
4945
|
return l.length ? l.pop() + " " : "";
|
|
4946
4946
|
}
|
|
@@ -4970,7 +4970,7 @@ function Dr(e, t, n, i) {
|
|
|
4970
4970
|
};
|
|
4971
4971
|
};
|
|
4972
4972
|
}
|
|
4973
|
-
var mh =
|
|
4973
|
+
var mh = Rr(ph, "px, ", "px)", "deg)"), xh = Rr(gh, ", ", ")", ")");
|
|
4974
4974
|
function vh(e, t) {
|
|
4975
4975
|
var n, i;
|
|
4976
4976
|
return function() {
|
|
@@ -5003,7 +5003,7 @@ function yh(e, t, n) {
|
|
|
5003
5003
|
o.tween = r;
|
|
5004
5004
|
};
|
|
5005
5005
|
}
|
|
5006
|
-
function
|
|
5006
|
+
function _h(e, t) {
|
|
5007
5007
|
var n = this._id;
|
|
5008
5008
|
if (e += "", arguments.length < 2) {
|
|
5009
5009
|
for (var i = z(this.node(), n).tween, r = 0, o = i.length, s; r < o; ++r)
|
|
@@ -5024,9 +5024,9 @@ function bn(e, t, n) {
|
|
|
5024
5024
|
}
|
|
5025
5025
|
function $r(e, t) {
|
|
5026
5026
|
var n;
|
|
5027
|
-
return (typeof t == "number" ? Z : t instanceof
|
|
5027
|
+
return (typeof t == "number" ? Z : t instanceof Ge ? ti : (n = Ge(t)) ? (t = n, ti) : dh)(e, t);
|
|
5028
5028
|
}
|
|
5029
|
-
function
|
|
5029
|
+
function wh(e) {
|
|
5030
5030
|
return function() {
|
|
5031
5031
|
this.removeAttribute(e);
|
|
5032
5032
|
};
|
|
@@ -5050,14 +5050,14 @@ function bh(e, t, n) {
|
|
|
5050
5050
|
return s === r ? null : s === i ? o : o = t(i = s, n);
|
|
5051
5051
|
};
|
|
5052
5052
|
}
|
|
5053
|
-
function
|
|
5053
|
+
function Ih(e, t, n) {
|
|
5054
5054
|
var i, r, o;
|
|
5055
5055
|
return function() {
|
|
5056
5056
|
var s, a = n(this), c;
|
|
5057
5057
|
return a == null ? void this.removeAttribute(e) : (s = this.getAttribute(e), c = a + "", s === c ? null : s === i && c === r ? o : (r = c, o = t(i = s, a)));
|
|
5058
5058
|
};
|
|
5059
5059
|
}
|
|
5060
|
-
function
|
|
5060
|
+
function Ch(e, t, n) {
|
|
5061
5061
|
var i, r, o;
|
|
5062
5062
|
return function() {
|
|
5063
5063
|
var s, a = n(this), c;
|
|
@@ -5065,15 +5065,15 @@ function Ih(e, t, n) {
|
|
|
5065
5065
|
};
|
|
5066
5066
|
}
|
|
5067
5067
|
function Th(e, t) {
|
|
5068
|
-
var n =
|
|
5069
|
-
return this.attrTween(e, typeof t == "function" ? (n.local ?
|
|
5068
|
+
var n = Pt(e), i = n === "transform" ? xh : $r;
|
|
5069
|
+
return this.attrTween(e, typeof t == "function" ? (n.local ? Ch : Ih)(n, i, bn(this, "attr." + e, t)) : t == null ? (n.local ? Sh : wh)(n) : (n.local ? bh : Ah)(n, i, t));
|
|
5070
5070
|
}
|
|
5071
|
-
function
|
|
5071
|
+
function Eh(e, t) {
|
|
5072
5072
|
return function(n) {
|
|
5073
5073
|
this.setAttribute(e, t.call(this, n));
|
|
5074
5074
|
};
|
|
5075
5075
|
}
|
|
5076
|
-
function
|
|
5076
|
+
function Mh(e, t) {
|
|
5077
5077
|
return function(n) {
|
|
5078
5078
|
this.setAttributeNS(e.space, e.local, t.call(this, n));
|
|
5079
5079
|
};
|
|
@@ -5082,7 +5082,7 @@ function Oh(e, t) {
|
|
|
5082
5082
|
var n, i;
|
|
5083
5083
|
function r() {
|
|
5084
5084
|
var o = t.apply(this, arguments);
|
|
5085
|
-
return o !== i && (n = (i = o) &&
|
|
5085
|
+
return o !== i && (n = (i = o) && Mh(e, o)), n;
|
|
5086
5086
|
}
|
|
5087
5087
|
return r._value = t, r;
|
|
5088
5088
|
}
|
|
@@ -5090,7 +5090,7 @@ function Ph(e, t) {
|
|
|
5090
5090
|
var n, i;
|
|
5091
5091
|
function r() {
|
|
5092
5092
|
var o = t.apply(this, arguments);
|
|
5093
|
-
return o !== i && (n = (i = o) &&
|
|
5093
|
+
return o !== i && (n = (i = o) && Eh(e, o)), n;
|
|
5094
5094
|
}
|
|
5095
5095
|
return r._value = t, r;
|
|
5096
5096
|
}
|
|
@@ -5099,7 +5099,7 @@ function Lh(e, t) {
|
|
|
5099
5099
|
if (arguments.length < 2) return (n = this.tween(n)) && n._value;
|
|
5100
5100
|
if (t == null) return this.tween(n, null);
|
|
5101
5101
|
if (typeof t != "function") throw new Error();
|
|
5102
|
-
var i =
|
|
5102
|
+
var i = Pt(e);
|
|
5103
5103
|
return this.tween(n, (i.local ? Oh : Ph)(i, t));
|
|
5104
5104
|
}
|
|
5105
5105
|
function kh(e, t) {
|
|
@@ -5112,11 +5112,11 @@ function Nh(e, t) {
|
|
|
5112
5112
|
Sn(this, e).delay = t;
|
|
5113
5113
|
};
|
|
5114
5114
|
}
|
|
5115
|
-
function
|
|
5115
|
+
function Dh(e) {
|
|
5116
5116
|
var t = this._id;
|
|
5117
5117
|
return arguments.length ? this.each((typeof e == "function" ? kh : Nh)(t, e)) : z(this.node(), t).delay;
|
|
5118
5118
|
}
|
|
5119
|
-
function
|
|
5119
|
+
function Rh(e, t) {
|
|
5120
5120
|
return function() {
|
|
5121
5121
|
X(this, e).duration = +t.apply(this, arguments);
|
|
5122
5122
|
};
|
|
@@ -5128,7 +5128,7 @@ function $h(e, t) {
|
|
|
5128
5128
|
}
|
|
5129
5129
|
function Fh(e) {
|
|
5130
5130
|
var t = this._id;
|
|
5131
|
-
return arguments.length ? this.each((typeof e == "function" ?
|
|
5131
|
+
return arguments.length ? this.each((typeof e == "function" ? Rh : $h)(t, e)) : z(this.node(), t).duration;
|
|
5132
5132
|
}
|
|
5133
5133
|
function zh(e, t) {
|
|
5134
5134
|
if (typeof t != "function") throw new Error();
|
|
@@ -5199,7 +5199,7 @@ function Jh(e) {
|
|
|
5199
5199
|
typeof e != "function" && (e = yn(e));
|
|
5200
5200
|
for (var i = this._groups, r = i.length, o = new Array(r), s = 0; s < r; ++s)
|
|
5201
5201
|
for (var a = i[s], c = a.length, l = o[s] = new Array(c), h, u, f = 0; f < c; ++f)
|
|
5202
|
-
(h = a[f]) && (u = e.call(h, h.__data__, f, a)) && ("__data__" in h && (u.__data__ = h.__data__), l[f] = u,
|
|
5202
|
+
(h = a[f]) && (u = e.call(h, h.__data__, f, a)) && ("__data__" in h && (u.__data__ = h.__data__), l[f] = u, kt(l[f], t, n, f, l, z(h, n)));
|
|
5203
5203
|
return new K(o, this._parents, t, n);
|
|
5204
5204
|
}
|
|
5205
5205
|
function Kh(e) {
|
|
@@ -5209,7 +5209,7 @@ function Kh(e) {
|
|
|
5209
5209
|
for (var c = i[a], l = c.length, h, u = 0; u < l; ++u)
|
|
5210
5210
|
if (h = c[u]) {
|
|
5211
5211
|
for (var f = e.call(h, h.__data__, u, c), d, p = z(h, n), g = 0, v = f.length; g < v; ++g)
|
|
5212
|
-
(d = f[g]) &&
|
|
5212
|
+
(d = f[g]) && kt(d, t, n, g, f, p);
|
|
5213
5213
|
o.push(f), s.push(h);
|
|
5214
5214
|
}
|
|
5215
5215
|
return new K(o, s, t, n);
|
|
@@ -5314,7 +5314,7 @@ function pu() {
|
|
|
5314
5314
|
for (var s = i[o], a = s.length, c, l = 0; l < a; ++l)
|
|
5315
5315
|
if (c = s[l]) {
|
|
5316
5316
|
var h = z(c, t);
|
|
5317
|
-
|
|
5317
|
+
kt(c, e, n, l, s, {
|
|
5318
5318
|
time: h.time + h.delay + h.duration,
|
|
5319
5319
|
delay: 0,
|
|
5320
5320
|
duration: h.duration,
|
|
@@ -5367,8 +5367,8 @@ K.prototype = {
|
|
|
5367
5367
|
text: hu,
|
|
5368
5368
|
textTween: du,
|
|
5369
5369
|
remove: Vh,
|
|
5370
|
-
tween:
|
|
5371
|
-
delay:
|
|
5370
|
+
tween: _h,
|
|
5371
|
+
delay: Dh,
|
|
5372
5372
|
duration: Fh,
|
|
5373
5373
|
ease: Uh,
|
|
5374
5374
|
easeVarying: Yh,
|
|
@@ -5391,17 +5391,17 @@ function yu(e, t) {
|
|
|
5391
5391
|
throw new Error(`transition ${t} not found`);
|
|
5392
5392
|
return n;
|
|
5393
5393
|
}
|
|
5394
|
-
function
|
|
5394
|
+
function _u(e) {
|
|
5395
5395
|
var t, n;
|
|
5396
|
-
e instanceof K ? (t = e._id, e = e._name) : (t = zr(), (n = vu).time =
|
|
5396
|
+
e instanceof K ? (t = e._id, e = e._name) : (t = zr(), (n = vu).time = wn(), e = e == null ? null : e + "");
|
|
5397
5397
|
for (var i = this._groups, r = i.length, o = 0; o < r; ++o)
|
|
5398
5398
|
for (var s = i[o], a = s.length, c, l = 0; l < a; ++l)
|
|
5399
|
-
(c = s[l]) &&
|
|
5399
|
+
(c = s[l]) && kt(c, e, t, l, s, n || yu(c, t));
|
|
5400
5400
|
return new K(i, this._parents, e, t);
|
|
5401
5401
|
}
|
|
5402
5402
|
je.prototype.interrupt = Vl;
|
|
5403
|
-
je.prototype.transition =
|
|
5404
|
-
class Fu extends
|
|
5403
|
+
je.prototype.transition = _u;
|
|
5404
|
+
class Fu extends Me {
|
|
5405
5405
|
name = "viewport";
|
|
5406
5406
|
minScale;
|
|
5407
5407
|
maxScale;
|
|
@@ -5434,13 +5434,13 @@ class Fu extends qe {
|
|
|
5434
5434
|
const { x: c, y: l, k: h } = a.transform;
|
|
5435
5435
|
o.scale.set(h), o.position.set(c, l);
|
|
5436
5436
|
}), this.d3Sel = $l(i), this.d3Sel.call(this.d3Zoom);
|
|
5437
|
-
const s = new
|
|
5437
|
+
const s = new Dt(o.scale.x, o.x, o.y);
|
|
5438
5438
|
this.d3Sel.call(this.d3Zoom.transform, s), t.setCameraHandler((a) => {
|
|
5439
5439
|
if (!this.d3Sel || !this.d3Zoom) {
|
|
5440
5440
|
t.applyCamera(a);
|
|
5441
5441
|
return;
|
|
5442
5442
|
}
|
|
5443
|
-
const c = new
|
|
5443
|
+
const c = new Dt(a.zoom, a.x, a.y), l = this.transitionDuration;
|
|
5444
5444
|
if (l <= 0) {
|
|
5445
5445
|
t.applyCamera(a), this.d3Sel.property("__zoom", c);
|
|
5446
5446
|
return;
|
|
@@ -5471,7 +5471,7 @@ class Fu extends qe {
|
|
|
5471
5471
|
panTo(t, n) {
|
|
5472
5472
|
if (!this.d3Sel || !this.d3Zoom) return;
|
|
5473
5473
|
const i = this.getTransform().k;
|
|
5474
|
-
this.d3Sel.call(this.d3Zoom.transform, new
|
|
5474
|
+
this.d3Sel.call(this.d3Zoom.transform, new Dt(i, t, n));
|
|
5475
5475
|
}
|
|
5476
5476
|
}
|
|
5477
5477
|
class zu extends vn {
|
|
@@ -5499,7 +5499,7 @@ class zu extends vn {
|
|
|
5499
5499
|
t.setOptions({ x: t.x, y: t.y }), n.lines?.redrawLinesForNode(t.id);
|
|
5500
5500
|
}
|
|
5501
5501
|
}
|
|
5502
|
-
class Uu extends
|
|
5502
|
+
class Uu extends qe {
|
|
5503
5503
|
name = "line-editor";
|
|
5504
5504
|
editStates = /* @__PURE__ */ new Map();
|
|
5505
5505
|
selectedLineId = null;
|
|
@@ -5578,7 +5578,7 @@ class Uu extends Xe {
|
|
|
5578
5578
|
}), r.visible = !0;
|
|
5579
5579
|
}
|
|
5580
5580
|
createMarker(t, n) {
|
|
5581
|
-
const i = new ee(), r = new
|
|
5581
|
+
const i = new ee(), r = new We();
|
|
5582
5582
|
r.circle(0, 0, this.RADIUS), r.fill({ color: n ? this.COLOR_NODE : this.COLOR_POSITION, alpha: n ? 0.5 : 1 }), r.stroke({ color: 16777215, width: 2, alpha: n ? 0.4 : 0.8 });
|
|
5583
5583
|
const o = new ii({ text: t.toString(), style: { fontSize: this.TEXT_SIZE, fill: this.TEXT_COLOR, fontWeight: "bold" } });
|
|
5584
5584
|
return o.anchor.set(0.5), i.addChild(r, o), i;
|
|
@@ -5607,29 +5607,29 @@ class Uu extends Xe {
|
|
|
5607
5607
|
handlePathDrag(t, n, i) {
|
|
5608
5608
|
const r = i.projectionContainer, o = r.toLocal(t.global), s = le(o.x) / m, a = le(o.y) / m, c = n.options.anchor;
|
|
5609
5609
|
for (const x of c) {
|
|
5610
|
-
const
|
|
5611
|
-
if (
|
|
5610
|
+
const w = n.resolveAnchorPosition(x);
|
|
5611
|
+
if (w && w.x === s && w.y === a) return;
|
|
5612
5612
|
}
|
|
5613
5613
|
const l = n.getPoints();
|
|
5614
5614
|
if (l.length < 2) return;
|
|
5615
5615
|
const h = { x: s * m, y: a * m };
|
|
5616
5616
|
let u = 1 / 0, f = 0;
|
|
5617
5617
|
for (let x = 0; x < l.length - 1; x++) {
|
|
5618
|
-
const
|
|
5619
|
-
|
|
5618
|
+
const w = ma(h, l[x], l[x + 1]);
|
|
5619
|
+
w < u && (u = w, f = x);
|
|
5620
5620
|
}
|
|
5621
5621
|
const d = this.findAnchorInsertIndex(n, i, f), p = i.stage;
|
|
5622
5622
|
let g = !1;
|
|
5623
5623
|
const v = (x) => {
|
|
5624
5624
|
if (!g) {
|
|
5625
5625
|
g = !0;
|
|
5626
|
-
const
|
|
5627
|
-
n.insertAnchor(d, P), this.renderMarkers(this.editStates.get(n.id)), p.off("globalpointermove", v), p.off("pointerup",
|
|
5626
|
+
const w = r.toLocal(x.global), S = le(w.x) / m, T = le(w.y) / m, P = { x: S, y: T };
|
|
5627
|
+
n.insertAnchor(d, P), this.renderMarkers(this.editStates.get(n.id)), p.off("globalpointermove", v), p.off("pointerup", _), p.off("pointerupoutside", _), this.startAnchorDrag(n.id, d, i, !0);
|
|
5628
5628
|
}
|
|
5629
|
-
},
|
|
5630
|
-
p.off("globalpointermove", v), p.off("pointerup",
|
|
5629
|
+
}, _ = () => {
|
|
5630
|
+
p.off("globalpointermove", v), p.off("pointerup", _), p.off("pointerupoutside", _);
|
|
5631
5631
|
};
|
|
5632
|
-
p.on("globalpointermove", v), p.on("pointerup",
|
|
5632
|
+
p.on("globalpointermove", v), p.on("pointerup", _), p.on("pointerupoutside", _);
|
|
5633
5633
|
}
|
|
5634
5634
|
findAnchorInsertIndex(t, n, i) {
|
|
5635
5635
|
const r = t.options.anchor, o = t.getPoints();
|
|
@@ -5715,7 +5715,7 @@ class Yu extends vn {
|
|
|
5715
5715
|
};
|
|
5716
5716
|
}
|
|
5717
5717
|
}
|
|
5718
|
-
class Bu extends
|
|
5718
|
+
class Bu extends qe {
|
|
5719
5719
|
name = "rect-resize";
|
|
5720
5720
|
resizeHandles;
|
|
5721
5721
|
activeRect = null;
|
|
@@ -5795,18 +5795,18 @@ class Bu extends Xe {
|
|
|
5795
5795
|
if (!l) return;
|
|
5796
5796
|
const h = l.activeScene;
|
|
5797
5797
|
if (!h) return;
|
|
5798
|
-
c.forEach(({ type: p, x: g, y: v, cursor:
|
|
5799
|
-
const x = new
|
|
5800
|
-
x.rect(-r / 2, -r / 2, r, r), x.fill({ color: o }), x.stroke({ color: s, width: 2 }), x.position.set(g, v), x.eventMode = "static", x.cursor =
|
|
5801
|
-
|
|
5802
|
-
const S = h.projectionContainer.toLocal(
|
|
5798
|
+
c.forEach(({ type: p, x: g, y: v, cursor: _ }) => {
|
|
5799
|
+
const x = new We();
|
|
5800
|
+
x.rect(-r / 2, -r / 2, r, r), x.fill({ color: o }), x.stroke({ color: s, width: 2 }), x.position.set(g, v), x.eventMode = "static", x.cursor = _, x.on("pointerdown", (w) => {
|
|
5801
|
+
w.stopPropagation(), this.resizeState.isResizing = !0, this.resizeState.handle = p;
|
|
5802
|
+
const S = h.projectionContainer.toLocal(w.global);
|
|
5803
5803
|
this.resizeState.startMouse = { x: S.x, y: S.y }, this.resizeState.startRect = { x: t.x, y: t.y, width: t.options.width, height: t.options.height };
|
|
5804
5804
|
}), a.addChild(x);
|
|
5805
5805
|
});
|
|
5806
5806
|
const u = (p) => {
|
|
5807
5807
|
if (!this.resizeState.isResizing || !this.resizeState.handle) return;
|
|
5808
|
-
const g = h.projectionContainer.toLocal(p.global), v = (g.x - this.resizeState.startMouse.x) / m,
|
|
5809
|
-
this.applyResize(t, this.resizeState.handle, v,
|
|
5808
|
+
const g = h.projectionContainer.toLocal(p.global), v = (g.x - this.resizeState.startMouse.x) / m, _ = (g.y - this.resizeState.startMouse.y) / m;
|
|
5809
|
+
this.applyResize(t, this.resizeState.handle, v, _);
|
|
5810
5810
|
}, f = () => {
|
|
5811
5811
|
this.resizeState.isResizing && (this.resizeState.isResizing = !1, this.resizeState.handle = null);
|
|
5812
5812
|
};
|
|
@@ -5860,7 +5860,7 @@ class Bu extends Xe {
|
|
|
5860
5860
|
c < h && (c = h), l < h && (l = h), t.setOptions({ x: s, y: a, width: c, height: l }), this.drawResizeHandles(t);
|
|
5861
5861
|
}
|
|
5862
5862
|
}
|
|
5863
|
-
class Gu extends
|
|
5863
|
+
class Gu extends Ot {
|
|
5864
5864
|
name = "node-runtime";
|
|
5865
5865
|
targetType = "node";
|
|
5866
5866
|
getCollection(t) {
|
|
@@ -5870,7 +5870,7 @@ class Gu extends Et {
|
|
|
5870
5870
|
return t.id;
|
|
5871
5871
|
}
|
|
5872
5872
|
}
|
|
5873
|
-
class Wu extends
|
|
5873
|
+
class Wu extends Ot {
|
|
5874
5874
|
name = "line-runtime";
|
|
5875
5875
|
targetType = "line";
|
|
5876
5876
|
getCollection(t) {
|
|
@@ -5880,7 +5880,7 @@ class Wu extends Et {
|
|
|
5880
5880
|
return t.id;
|
|
5881
5881
|
}
|
|
5882
5882
|
}
|
|
5883
|
-
class Xu extends
|
|
5883
|
+
class Xu extends Ot {
|
|
5884
5884
|
name = "text-runtime";
|
|
5885
5885
|
targetType = "text";
|
|
5886
5886
|
getCollection(t) {
|
|
@@ -5890,7 +5890,7 @@ class Xu extends Et {
|
|
|
5890
5890
|
return t.id;
|
|
5891
5891
|
}
|
|
5892
5892
|
}
|
|
5893
|
-
class qu extends
|
|
5893
|
+
class qu extends Ot {
|
|
5894
5894
|
name = "rect-runtime";
|
|
5895
5895
|
targetType = "rect";
|
|
5896
5896
|
getCollection(t) {
|
|
@@ -5900,7 +5900,7 @@ class qu extends Et {
|
|
|
5900
5900
|
return t.id;
|
|
5901
5901
|
}
|
|
5902
5902
|
}
|
|
5903
|
-
class ju extends
|
|
5903
|
+
class ju extends Me {
|
|
5904
5904
|
name = "text-creator";
|
|
5905
5905
|
_isActive = !1;
|
|
5906
5906
|
_defaults = {};
|
|
@@ -5944,7 +5944,7 @@ class ju extends qe {
|
|
|
5944
5944
|
t && (t.dragEnabled = this._prevDragEnabled), this._prevDragEnabled = null;
|
|
5945
5945
|
}
|
|
5946
5946
|
createPreview(t) {
|
|
5947
|
-
const n =
|
|
5947
|
+
const n = Ct();
|
|
5948
5948
|
this._previewId = n;
|
|
5949
5949
|
const i = t.texts.add({
|
|
5950
5950
|
id: n,
|
|
@@ -5980,7 +5980,7 @@ class ju extends qe {
|
|
|
5980
5980
|
!t || !this._handlers || (t.off("globalpointermove", this._handlers.onMove), t.off("pointerdown", this._handlers.onDown), t.cursor = "default", this._handlers = null);
|
|
5981
5981
|
}
|
|
5982
5982
|
}
|
|
5983
|
-
class Vu extends
|
|
5983
|
+
class Vu extends Me {
|
|
5984
5984
|
name = "rect-creator";
|
|
5985
5985
|
_isActive = !1;
|
|
5986
5986
|
_defaults = {};
|
|
@@ -6043,7 +6043,7 @@ class Vu extends qe {
|
|
|
6043
6043
|
this._isDragging = !0;
|
|
6044
6044
|
const a = this.toTile(s, t);
|
|
6045
6045
|
this._startTile = a;
|
|
6046
|
-
const c =
|
|
6046
|
+
const c = Ct();
|
|
6047
6047
|
this._previewId = c;
|
|
6048
6048
|
const l = t.rects.add({
|
|
6049
6049
|
id: c,
|
|
@@ -6071,7 +6071,7 @@ class Vu extends qe {
|
|
|
6071
6071
|
!t || !this._handlers || (t.off("pointerdown", this._handlers.onDown), t.off("globalpointermove", this._handlers.onMove), t.off("pointerup", this._handlers.onUp), t.off("pointerupoutside", this._handlers.onUp), t.cursor = "default", this._handlers = null);
|
|
6072
6072
|
}
|
|
6073
6073
|
}
|
|
6074
|
-
class Ju extends
|
|
6074
|
+
class Ju extends Me {
|
|
6075
6075
|
name = "line-creator";
|
|
6076
6076
|
_isActive = !1;
|
|
6077
6077
|
_defaults = {};
|
|
@@ -6131,7 +6131,7 @@ class Ju extends qe {
|
|
|
6131
6131
|
const i = (s) => {
|
|
6132
6132
|
if (this._isDragging) return;
|
|
6133
6133
|
this._isDragging = !0;
|
|
6134
|
-
const a = this.toTile(s, t), c =
|
|
6134
|
+
const a = this.toTile(s, t), c = Ct();
|
|
6135
6135
|
this._previewId = c;
|
|
6136
6136
|
const l = t.lines.add({
|
|
6137
6137
|
id: c,
|
|
@@ -6159,9 +6159,114 @@ class Ju extends qe {
|
|
|
6159
6159
|
!t || !this._handlers || (t.off("pointerdown", this._handlers.onDown), t.off("globalpointermove", this._handlers.onMove), t.off("pointerup", this._handlers.onUp), t.off("pointerupoutside", this._handlers.onUp), t.cursor = "default", this._handlers = null);
|
|
6160
6160
|
}
|
|
6161
6161
|
}
|
|
6162
|
+
class Ku extends Me {
|
|
6163
|
+
name = "node-creator";
|
|
6164
|
+
_isActive = !1;
|
|
6165
|
+
_defaults = {};
|
|
6166
|
+
_previewId = null;
|
|
6167
|
+
/** 本次 start() 中新注册的临时图标 id 集合 */
|
|
6168
|
+
_tempIconIds = /* @__PURE__ */ new Set();
|
|
6169
|
+
/** 已被确认放置的节点所用图标 id(stop 时保留,升级为正式图标) */
|
|
6170
|
+
_promotedIconIds = /* @__PURE__ */ new Set();
|
|
6171
|
+
_prevDragEnabled = null;
|
|
6172
|
+
_handlers = null;
|
|
6173
|
+
/** 是否处于创建模式 */
|
|
6174
|
+
get isActive() {
|
|
6175
|
+
return this._isActive;
|
|
6176
|
+
}
|
|
6177
|
+
/**
|
|
6178
|
+
* 进入创建模式
|
|
6179
|
+
* @param options 预览节点的默认配置(icon、scale、label 等)
|
|
6180
|
+
* @param tempIcons 临时图标列表,进入时注册、退出时移除(已存在的不受影响)
|
|
6181
|
+
*/
|
|
6182
|
+
start(t, n) {
|
|
6183
|
+
this._isActive && this.stop();
|
|
6184
|
+
const i = this.activeScene;
|
|
6185
|
+
!i || !this.topology || (this._isActive = !0, this._defaults = t ?? {}, this._registerTempIcons(n), this._disableViewportDrag(), this._createPreview(i), this._bindEvents(i));
|
|
6186
|
+
}
|
|
6187
|
+
/** 退出创建模式,移除预览并清理临时图标 */
|
|
6188
|
+
stop() {
|
|
6189
|
+
this._isActive && (this._isActive = !1, this._removePreview(), this._unbindEvents(), this._restoreViewportDrag(), this._removeTempIcons());
|
|
6190
|
+
}
|
|
6191
|
+
// —— ActiveScenePlugin 生命周期 ——
|
|
6192
|
+
onBindActiveScene(t) {
|
|
6193
|
+
}
|
|
6194
|
+
onUnbindActiveScene() {
|
|
6195
|
+
this.stop();
|
|
6196
|
+
}
|
|
6197
|
+
uninstall(t) {
|
|
6198
|
+
this.stop(), super.uninstall(t);
|
|
6199
|
+
}
|
|
6200
|
+
// —— 临时图标管理 ——
|
|
6201
|
+
_registerTempIcons(t) {
|
|
6202
|
+
if (!(!t?.length || !this.topology))
|
|
6203
|
+
for (const n of t)
|
|
6204
|
+
this.topology.icons.has(n.id) || (this.topology.icons.add(n), this._tempIconIds.add(n.id));
|
|
6205
|
+
}
|
|
6206
|
+
_removeTempIcons() {
|
|
6207
|
+
if (this.topology) {
|
|
6208
|
+
for (const t of this._tempIconIds)
|
|
6209
|
+
this._promotedIconIds.has(t) || this.topology.icons.remove(t);
|
|
6210
|
+
this._tempIconIds.clear(), this._promotedIconIds.clear();
|
|
6211
|
+
}
|
|
6212
|
+
}
|
|
6213
|
+
// —— ViewportPlugin 拖拽互斥 ——
|
|
6214
|
+
_disableViewportDrag() {
|
|
6215
|
+
const t = this.topology?.getPlugin("viewport");
|
|
6216
|
+
t && (this._prevDragEnabled = t.dragEnabled, t.dragEnabled = !1);
|
|
6217
|
+
}
|
|
6218
|
+
_restoreViewportDrag() {
|
|
6219
|
+
if (this._prevDragEnabled === null) return;
|
|
6220
|
+
const t = this.topology?.getPlugin("viewport");
|
|
6221
|
+
t && (t.dragEnabled = this._prevDragEnabled), this._prevDragEnabled = null;
|
|
6222
|
+
}
|
|
6223
|
+
// —— 预览节点 ——
|
|
6224
|
+
_createPreview(t) {
|
|
6225
|
+
const n = Ct();
|
|
6226
|
+
this._previewId = n;
|
|
6227
|
+
const i = t.nodes.add({
|
|
6228
|
+
icon: "",
|
|
6229
|
+
...this._defaults,
|
|
6230
|
+
id: n,
|
|
6231
|
+
x: 0,
|
|
6232
|
+
y: 0
|
|
6233
|
+
});
|
|
6234
|
+
i.getGraphics().alpha = 0.5;
|
|
6235
|
+
}
|
|
6236
|
+
_removePreview() {
|
|
6237
|
+
this._previewId && this.activeScene?.nodes.has(this._previewId) && this.activeScene.nodes.remove(this._previewId), this._previewId = null;
|
|
6238
|
+
}
|
|
6239
|
+
// —— 事件绑定 ——
|
|
6240
|
+
_bindEvents(t) {
|
|
6241
|
+
const n = this.topology.stage;
|
|
6242
|
+
if (!n) return;
|
|
6243
|
+
const i = (o) => {
|
|
6244
|
+
if (!this._previewId || !this.activeScene) return;
|
|
6245
|
+
const s = t.projectionContainer.toLocal(o.global);
|
|
6246
|
+
this.activeScene.nodes.get(this._previewId)?.setOptions({
|
|
6247
|
+
x: Math.round(s.x / m),
|
|
6248
|
+
y: Math.round(s.y / m)
|
|
6249
|
+
});
|
|
6250
|
+
}, r = (o) => {
|
|
6251
|
+
if (!this._previewId || !this.activeScene) return;
|
|
6252
|
+
const s = this.activeScene.nodes.get(this._previewId);
|
|
6253
|
+
if (s) {
|
|
6254
|
+
s.getGraphics().alpha = 1;
|
|
6255
|
+
const a = s.options.icon;
|
|
6256
|
+
a && this._tempIconIds.has(a) && this._promotedIconIds.add(a);
|
|
6257
|
+
}
|
|
6258
|
+
this._previewId = null, this._createPreview(t);
|
|
6259
|
+
};
|
|
6260
|
+
n.on("globalpointermove", i), n.on("pointerdown", r), this._handlers = { onMove: i, onDown: r }, n.cursor = "crosshair";
|
|
6261
|
+
}
|
|
6262
|
+
_unbindEvents() {
|
|
6263
|
+
const t = this.topology?.stage;
|
|
6264
|
+
!t || !this._handlers || (t.off("globalpointermove", this._handlers.onMove), t.off("pointerdown", this._handlers.onDown), t.cursor = "default", this._handlers = null);
|
|
6265
|
+
}
|
|
6266
|
+
}
|
|
6162
6267
|
export {
|
|
6163
6268
|
ye as AZIMUTH,
|
|
6164
|
-
|
|
6269
|
+
Me as ActiveScenePlugin,
|
|
6165
6270
|
lr as BILLBOARD_SCALE_X,
|
|
6166
6271
|
rt as BILLBOARD_SCALE_Y,
|
|
6167
6272
|
ar as BILLBOARD_SKEW_X,
|
|
@@ -6172,10 +6277,11 @@ export {
|
|
|
6172
6277
|
tr as ISOMETRIC_SKEW_X,
|
|
6173
6278
|
nr as ISOMETRIC_SKEW_Y,
|
|
6174
6279
|
ja as IconManager,
|
|
6175
|
-
|
|
6280
|
+
Ot as InteractiveRuntimePlugin,
|
|
6176
6281
|
Ju as LineCreatorPlugin,
|
|
6177
6282
|
Uu as LineEditorPlugin,
|
|
6178
6283
|
Wu as LineRuntimePlugin,
|
|
6284
|
+
Ku as NodeCreatorPlugin,
|
|
6179
6285
|
zu as NodeEditorPlugin,
|
|
6180
6286
|
Gu as NodeRuntimePlugin,
|
|
6181
6287
|
Vu as RectCreatorPlugin,
|
|
@@ -6183,13 +6289,13 @@ export {
|
|
|
6183
6289
|
Bu as RectResizePlugin,
|
|
6184
6290
|
qu as RectRuntimePlugin,
|
|
6185
6291
|
de as SIN_ELEVATION,
|
|
6186
|
-
|
|
6187
|
-
|
|
6292
|
+
_e as Scene,
|
|
6293
|
+
qe as SceneAwarePlugin,
|
|
6188
6294
|
vn as SelectableEditorPlugin,
|
|
6189
6295
|
rc as SelectionHighlight,
|
|
6190
6296
|
nc as StateManager,
|
|
6191
|
-
|
|
6192
|
-
|
|
6297
|
+
Cu as TILE_HDIAGONAL,
|
|
6298
|
+
Iu as TILE_HEIGHT,
|
|
6193
6299
|
m as TILE_SIZE,
|
|
6194
6300
|
Zi as TILE_VDIAGONAL,
|
|
6195
6301
|
bu as TILE_WIDTH,
|
|
@@ -6198,7 +6304,7 @@ export {
|
|
|
6198
6304
|
Xu as TextRuntimePlugin,
|
|
6199
6305
|
dr as Topology,
|
|
6200
6306
|
Fu as ViewportPlugin,
|
|
6201
|
-
|
|
6307
|
+
ef as ZoomTransform,
|
|
6202
6308
|
Qi as calculateIsometricSkew,
|
|
6203
6309
|
Tu as calculateIsometricTileDiagonals,
|
|
6204
6310
|
Ou as createBlinkStatePlugin,
|
|
@@ -6206,22 +6312,22 @@ export {
|
|
|
6206
6312
|
Lu as createBrightenStatePlugin,
|
|
6207
6313
|
ku as createDarkenStatePlugin,
|
|
6208
6314
|
Nu as createGlowStatePlugin,
|
|
6209
|
-
|
|
6210
|
-
|
|
6315
|
+
Du as createHeartbeatStatePlugin,
|
|
6316
|
+
Ru as createShimmerStatePlugin,
|
|
6211
6317
|
$u as createTintStatePlugin,
|
|
6212
6318
|
dr as default,
|
|
6213
6319
|
mt as downloadFile,
|
|
6214
6320
|
va as findPath,
|
|
6215
|
-
|
|
6321
|
+
Ct as generateUUID,
|
|
6216
6322
|
ya as getBoundingBox,
|
|
6217
|
-
|
|
6323
|
+
_a as getBoundingBoxSize,
|
|
6218
6324
|
Sa as getItemMetadata,
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6325
|
+
Mu as isometricToWorld,
|
|
6326
|
+
wa as normalizePositionFromOrigin,
|
|
6327
|
+
Ee as parseYaml,
|
|
6222
6328
|
ma as pointToSegmentDist,
|
|
6223
|
-
|
|
6224
|
-
|
|
6329
|
+
Eu as projectToIsometric,
|
|
6330
|
+
Tt as setItemMetadata,
|
|
6225
6331
|
le as snapToTile,
|
|
6226
6332
|
hr as sortByPosition,
|
|
6227
6333
|
Te as toYaml
|